RoboteQ AX3500 Using the Encoder Module to Measure Distance, Using the Encoder to Measure Speed

Page 84
Motor 2 Fwd

Connecting and Using the Encoder Function

TABLE 16. Effects of Limit Switches 3 and 4 on Motor 2

SW3

SW4

Motor 2 Fwd

Motor 2 Rev

 

 

 

 

OFF

OFF

Allowed

Allowed

 

 

 

 

ON

OFF

Stopped

Allowed

 

 

 

 

OFF

ON

Allowed

Stopped

 

 

 

 

ON

ON

Stopped

Stopped

 

 

 

 

In Single Channel Mode, limit switches 3 and 4 are used. This is to allow direct connection of an encoder on the inputs for channel 1 and direct connection of switches on the inputs

for channel 2

TABLE 17. Effects of Limit Switches 3 and 4 on Motor 2 in Single Channel Configuration

SW3

SW4

Motor Fwd

Motor Rev

 

 

 

 

OFF

OFF

Allowed

Allowed

 

 

 

 

ON

OFF

Stopped

Allowed

 

 

 

 

OFF

ON

Allowed

Stopped

 

 

 

 

ON

ON

Stopped

Stopped

 

 

 

 

Using the Encoder Module to Measure Distance

As the encoders rotate, their quadrature outputs is automatically processed and incre- ments/decrements two 32-bit counter inside the Encoder Module. There is one 32-bit counter for each of the encoders.

The counter values are stored as a signed binary numbers, ranging from -2,147,836,648 to +2,147,836,647 (Hexadecimal format of value 80000000 to 7FFFFFFF respectively. When the maximum or minimum counter values are reached, the counters automatically roll over to zero.

The counters can be read and set using the commands described in “The AX3500 contains its own Microcontroller and firmware in Flash. When present, it responds to a large set of dedicated commands and queries via the controller’s serial port. See “RS232 Encoder Command Set” on page 159.” on page 87.

Using the Encoder to Measure Speed

The encoder module will automatically compute rotation speed for each encoder. The resulting measured speed is a value ranging from 0 to + 127 and 0 to -127, where 127 rep- resent a relative ratio of a maximum speed value chosen by the user.

For example, if the encoder module is configured so that the highest measured speed value is 3,000 RPM, then a reading of 63 (127/2) would be 1,500 RPM.

84

AX3500 Motor Controller User’s Manual

Version 1.9b. June 1, 2007

Image 84
Contents Dual Channel High Power Digital Motor Controller AX3500User’s Manual AX3500 Motor Controller User’s Manual Version 1.9b. June 1Revision History Revision HistoryDate VersionAX3500 Motor Controller User’s Manual Revision History General Operation SECTION SECTIONSECTION SECTION SECTION SECTION Programming using built-in Switches and Display AX3500 Motor Controller User’s Manual Important Safety Avoid Shorts when Mounting Board against ChassisDo not Connect to a RC Radio with a Battery Attached WarningsImportant Safety Warnings Locating the Switches and Connectors AX3500Quick Start What you will needAX3500 Quick Start Connecting to the Batteries and Motors Connecting to the Batteries and MotorsConnecting to the 15-pin Connector Important WarningSignal RC ModeConnecting the R/C Radio Powering On the ControllerConnecting the R/C Radio Button Operation Prog and Set button statusFunction Default Controller Configuration Default Controller ConfigurationDefault Values ParameterConnecting the controller to your PC using Roborun Obtaining the Controller’s Software Revision Number Obtaining the Controller’s Software Revision NumberExploring further = Software version 1.9bSECTION 3AX3500 Motor Controller Overview Product DescriptionTechnical features Multiple Command ModesAutomatic Joystick Command Corrections AX3500 Motor Controller OverviewTechnical features Low Power ConsumptionHigh Efficiency Motor Power Outputs Optical Encoder InputsAdvanced Safety Features Data Logging CapabilitiesCompact Open Frame PCB Design Connecting Power and Motors to the Controller Power ConnectionsPower Connections Controller Power Connecting Power and Motors to the ControllerController Power Power Control input isAnd Main Battery mended Off ConfigurationController Powering Schemes Powering the Controller from a single BatteryPowering the Controller Using a Main and Backup Battery Controller Powering SchemesConnecting the Motors Single Channel Operation Converting the AX3500 to Single ChannelSingle Channel Operation Power Fuses Wire Length Limits Power Regeneration ConsiderationsElectrical Noise Reduction Techniques Wire Length LimitsOvervoltage Protection Undervoltage ProtectionUsing the Controller with a Power Supply Using the Controller with a Power SupplyConnecting Power and Motors to the Controller Input Command Modes General OperationBasic Operation Basic OperationSelecting the Motor Control Modes Open Loop, Separate Speed ControlOpen Loop, Mixed Speed Control General OperationClosed Loop Speed Control Close Loop Position ControlSelecting the Motor Control Modes User Selected Current Limit Settings Temperature-Based Current LimitationPosition Feedback Position Sensor Gear box SettingBattery Current vs. Motor Current Battery Current vs. Motor CurrentMotor Current = Battery Current / PWM ratio TemperatureRegeneration Current Limiting Motor Current = Battery Current / PWM RatioProgrammable Acceleration Setting UsingSwitches Programmable AccelerationCommand Control Curves 15 Hex17.97% 0.089 secondLeft / Right Tuning Adjustment Left / Right Tuning AdjustmentExponentiation Parameter Value Selected CurveSpeed Adjustment Parameter ValueEmergency Shut Down Using Controller Switches Emergency Stop using External SwitchActivating Brake Release or Separate Motor Excitation Activating Brake Release or Separate Motor ExcitationSpecial Use of Accessory Digital Inputs Using the Inputs to Activate the Buffered OutputUsing the Inputs to turn Off/On the Power MOSFET transistors Inverted OperationSelf-Test Mode Self-Test ModeEncoder Speed or Position Connecting Sensors and Actuators to Input/Outputs AX3500 ConnectionsAX3500 Connections AX3500’s Inputs and Outputs Connecting Sensors and Actuators to Input/OutputsAX3500’s Inputs and Outputs I/O typeActivated Pin1 I/O List and Pin AssignmentSignal depending Input orConnecting devices to Output C Connecting devices to Output CConnecting Switches or Devices to Input F Important warningConnecting Switches or Devices to EStop/Invert Input Connecting Switches or Devices to EStop/Invert InputConnecting Position Potentiometers to Analog Inputs Analog InputsConnecting Tachometer to Analog Inputs Connecting Tachometer to Analog InputsAna2 Operating ModeAna 1 p11 Ana2 p10Ana 3 p12 Ana 4 p8Connecting External Thermistor to Analog Inputs Connecting External Thermistor to Analog InputsTemp oC Resistance kOhmUsing the Analog Inputs to Monitor External Voltages Connecting User Devices to Analog Inputs Internal Voltage Monitoring SensorsInternal Heatsink Temperature Sensors Connecting User Devices to Analog InputsTemperature Conversion C Source Code ValueAnalog Internal Heatsink Temperature Sensors elseLoTemp = i * 5 HiTemp = LoTemp + 5 lobound = TempTablei hibound = TempTablei+1Connecting Sensors and Actuators to Input/Outputs RC Pulses Output RC Pulse Output OverviewRC Pulse Output Overview Connector Location and Pinout Connecting Servos to ControllersServo Connection to RevA Controllers RC Pulses OutputConnecting to Slave Controllers Servo Connection to RevB ControllersConnecting to Slave Controllers Pulse Timing Information Command ValuePulse Width 1.00ms 1.50msRC Channel Testing Using the PC Utility RC Channel Testing Using the PC UtilityRC Pulses Output Connecting and Using the Encoder Function Optical Incremental Encoders OverviewOptical Incremental Encoders Overview Recommended Encoder Types Connecting and Using the Encoder FunctionConnecting the Encoder Connecting the EncoderPulse Frequency in Hz = RPM / 60 * PPR Cable Length and Noise Considerations Motor - Encoder Polarity MatchingName Cable Color Voltage Levels, Thresholds and Limit Switches Voltage Levels, Thresholds and Limit SwitchesWiring Optional Limit Switches Wiring Limit Switches Without Encoders Effect of Limit SwitchesWiring Limit Switches Without Encoders Motor 1 FwdUsing the Encoder Module to Measure Distance Using the Encoder to Measure SpeedMotor 2 Fwd Motor 2 RevUsing the Encoder to Track Position Important NoticeUsing the Encoder to Track Position The actual formula is as follows Distance = Destination - Counter value / DividerEncoder Testing and Setting Using the PC Utility RS232 Communication with the Encoder ModuleRS232 Communication with the Encoder Module Connecting and Using the Encoder Function Closed Loop Position Mode Mode DescriptionSelecting the Position Mode Mode DescriptionPosition Sensor Selection Sensor MountingPosition Feedback Position Sensor Gear box Closed Loop Position ModeFeedback Potentiometer wiring Feedback Potentiometer wiring in RC or RS232 ModeFeedback Potentiometer wiring Feedback Potentiometer wiring in Analog Mode Feedback Wiring in RC or RS232 Mode on Single Channel Controllers Feedback Wiring in Analog Mode on Single Channel ControllersAnalog Feedback on Single Channel Controllers Analog Feedback on Single Channel ControllersUsing Optical Encoders in Position Mode Sensor and Motor PolarityImportant Safety Warning Encoder Error Detection and ProtectionAdding Safety Limit Switches Encoder Error Detection and ProtectionFIGURE 62. Safety limit switches interrupting power to motors Using Current Limiting as Protection Control Loop DescriptionUsing Current Limiting as Protection PID tuning in Position Mode PID tuning in Position Mode Applied Power = Command Value - Actual Position * Proportional GainClosed Loop Position Mode Closed Loop Speed Mode Selecting the Speed ModeUsing Optical Encoder for Speed FeedbackDigital Optical Encod Tachometer wiringTachometer or Encoder Mounting Closed Loop Speed ModeSpeed Sensor and Motor Polarity Speed Sensor and Motor PolarityAdjust Offset and Max Speed PID tuning in Speed Mode PID tuning in Speed ModeIn Speed Mode, the Integral component of the PID is the most important and must be set first. The Proportional and Differential component will help improve the response time and loop stability Normal and Fault Condition LED Messages Use of the LED DisplayUse of the LED Display Motor Direction Status Normal and Fault Condition LED MessagesPossible Display MotorFault Messages No ControlFault Messages Rapidly FlashingTemporary Faults Permanent FaultsSelf-Test Display = Software version 1.9b Self-Test DisplayNormal and Fault Condition LED Messages SECTION 12 R/C Operation Connector I/O Pin Assignment R/C Mode Selecting the R/C Input ModePin1 R/C OperationR/C Input Circuit Description Supplied Cable DescriptionR/C Input Circuit Description Powering the Radio from the controller FIGURE 74. RC Cable wiring diagramFIGURE 75. RC connection cable Powering the Radio from the controller Connecting to a Separately Powered Radio Operating the Controller in R/C modeReception Watchdog Reception WatchdogImportant Notice about PCM Radios R/C Transmitter/Receiver Quality ConsiderationsJoystick Deadband Programming Joystick Deadband ProgrammingDeadband Parameter Value Deadband as Percent of full Joystick TravelLeft/Right Tuning Adjustment Joystick CalibrationAutomatic Joystick Calibration Automatic Joystick CalibrationData Logging in R/C Mode On before entering joystick calibrationData Logging in R/C Mode DB15 MaleTo Controller R/C Operation Analog Control and Operation Connector I/O Pin Assignment Analog Mode Analog Control and OperationConnecting to a Voltage Source Connecting a PotentiometerConnecting to a Voltage Source Selecting the Potentiometer Value Analog Deadband Adjustment Power-On Safety Under Voltage SafetyData Logging in Analog Mode Motor Power at 0%Data Logging in Analog Mode Analog Control and Operation Serial RS-232 Controls and Operation Use and benefits of RS232Use and benefits of RS232 Connector I/O Pin Assignment RS232 Mode Serial RS-232 Controls and OperationCable configuration Extending the RS232 CableCable configuration Communication Settings 9600 bits/s, 7-bit data, 1 Start bit, 1 Stop bit, Even ParityEstablishing Manual Communication with a PC RS232 Communication with the Encoder Module Establishing Manual Communication with a PCRoboteq v1.9b 06/01/07 s Entering RS232 from R/C or Analog mode Data Logging String in R/C or Analog modeCommands Acknowledge and Error Messages RS232 Mode if defaultCommand Acknowledgement Command ErrorController Commands and Queries RS-232 WatchdogCommand TypeSet Motor Command Value Set Accessory OutputQuery Power Applied to Motors Controller Commands and QueriesQuery Amps from Battery to each Motor Channel SyntaxQuery Analog Inputs Query Heatsink Temperatures?r or ?R ?m or ?MQuery Battery Voltages Reset ControllerQuery Digital Inputs ExamplesAccessing & Changing Configuration Parameter in Flash Apply Parameter ChangesAccessing & Changing Configuration Parameter in Flash Read parameterFlash Configuration Parameters List LocationActive after Input Control Mode Motor Control ModeAccess After ResetAmps Limit AccelerationDefinition Input Switches Function Left/Right Adjust RC Joystick or Analog DeadbandExponentiation on Channel 1 and Channel 08 - ChannelDefault Encoder Time Base 1 and Default Encoder Distance Divider0B - Encoder 0C - EncoderDefault PID Gains Joystick Min, Max and Center Values0F - Proportional Gain 10 - Integral GainReading & Changing Operating Parameters at Runtime Reading & Changing Operating Parameters at RuntimeOperating Modes Registers Read/Change PID ValuesAccess Read/Write Effective Instantly 80 - ChannelPWM Frequency Register Controller Status RegisterAddress Access Read/Write Effective Instantly Fault ConditionController Identification Register Current Amps Limit RegistersModel or Function 8B - ChannelRS232 Encoder Command Set Set/Reset Encoder Counters and Destination RegistersRead Encoder Counter RS232 Encoder Command SetRead Speed q or !Q n7 Set Encoder 1 destination register with value in buffer 8 Set Encoder 2 destination register with value in bufferRead Encoder Limit Switch Status Read DistanceRead Speed/Distance Important Note Read / Modify Encoder Module Registers and ParametersSwitch n ValueParameter Description SizeSwitch Status Register DescriptionEncoder Hardware ID code Address *84Speed or Distance 1 or Counter Read/Write MailboxCounter 1 and Destination Register 1 andDistance 1 and Speed 1 andTime Base 1 and Encoder ThresholdCounter Read Data Format RC Pulse Outputs ActivationDefault Value Counter Read Data FormatDecimal 32-bit HexController Output Automatic Switching from RS232 to RC Mode Automatic Switching from RS232 to RC Mode00 11 22 33 44 55 66 77 88 99 AA BB CC Analog and R/C Modes Data Logging String FormatData Logging Cables Decimal to Hexadecimal Conversion Table Decimal to Hexadecimal Conversion TableAX3500 Motor Controller User’s Manual Decimal to Hexadecimal Conversion Table AX3500 Motor Controller User’s ManualAX3500 Motor Controller User’s Manual SECTION 15 Configuring the Controller using the Switches Programming using built-in Switches and DisplayProgramming Methods Entering Programming Mode Configuring the Controller using the SwitchesProgram Changing parameters The Special Case of Joystick CalibrationProgramming using built-in Switches and Display Restoring factory defaults Exiting the Parameter Setting ModeProgrammable Parameters List This manual is for software version 1.9bPossible Values default For safety reasons, the modes belowcannot be selected using the switches Programmable Parameters ListConfiguring the Controller using the Switches SECTION 16 Using the Roborun Configuration Utility Downloading and Installing the UtilitySystem Requirements Connecting the Controller to the PC Using the Roborun Configuration UtilityRoborun Frame, Tab and Menu Descriptions Roborun Frame, Tab and Menu Descriptions1- Program Revision Number 2- Controller and Communication Link InformationGetting On-Screen Help 3- Parameter Selection and Setting and Special Functions4- File and Program Management Commands 5- View Controller Connector PinoutControl Settings Loading, Changing Controller ParametersLoading, Changing Controller Parameters 1- Controller InputPower Settings 3- Input Command Adjustment4- Emergency Stop or Invert Switch Select 5- Effect of Digital InputsAnalog or R/C Specific Settings Loading, Changing Controller Parameters 2- Left/Right Adjust3- Acceleration Setting 1- DeadbandEncoder Setting and Testing Closed Loop ParametersEncoder Module Parameters Setting Encoder Setting and TestingRC Output Testing Exercising the MotorsViewing Encoder Data Running the Motors Running the Motors2- Motor Power setting 1- Run/Stop Button3- Measurement 4- Real-Time Strip Chart Recorder 6- Input Status and Output Setting5- Transmit and Receive Data Logging Data to Disk 7- Data Logging and Timer8- Joystick Enable 4- Reset Timer buttonConnecting a Joystick Parameter HeaderData type/range Measured ParameterUsing the Console 2- Command Entry1- Terminal Screen Viewing and Logging Data in Analog and R/C Modes Loading and Saving Profiles to Disk4- Send Reset String Viewing and Logging Data in Analog and R/C ModesOperating the AX3500 over a Wired or Wireless LAN Updating the Controller’s Software Updating the Controller’s SoftwareCreating Customized Object Files Updating the Encoder SoftwareCreating Customized Object Files Using the Roborun Configuration Utility Mechanical Specifications Mechanical DimensionsMechanical Dimensions Mounting Considerations Thermal ConsiderationsMechanical Specifications Attaching the Controller Directly to a Chassis Attaching the Controller Directly to a ChassisPrecautions to observe Wire Dimensions WeightWire Dimensions Mechanical Specifications AX3500 Motor Controller User’s ManualVersion 1.9b. June 1
Related manuals
Manual 2 pages 10.03 Kb