AX2550 AX2850 Dual Channel High Power Digital Motor Controller User’s Manual v1.9b, June 1, 2007 visit www.roboteq.com to download the latest revision of this manual ©Copyright 2003-2007 Roboteq, Inc.
AX2550 Motor Controller User’s Manual Version 1.9b.
Revision History Revision History Date Version Changes June 1, 2007 1.
AX2550 Motor Controller User’s Manual Version 1.9b.
Revision History 3 SECTION 1 Important Safety Warnings 13 This product is intended for use with rechargeable batteries 13 Do not Connect to a RC Radio with a Battery Attached 13 Beware of Motor Runaway in Improperly Closed Loop 13 SECTION 2 AX2550 Quick Start 15 What you will need 15 Locating the Switches, Wires and Connectors 15 Connecting to the Batteries and Motors 17 Connecting to the 15-pin Connector Connecting the R/C Radio 18 19 Powering On the Controller 20 Button Operation 20 Default
SECTION 5 General Operation 41 Basic Operation 41 Input Command Modes 41 Selecting the Motor Control Modes 42 Open Loop, Separate Speed Control 42 Open Loop, Mixed Speed Control 42 Closed Loop Speed Control 43 Close Loop Position Control 43 User Selected Current Limit Settings 44 Temperature-Based Current Limitation Battery Current vs.
SECTION 7 Installing, Connecting and Using the Encoder Module 71 Optical Incremental Encoders Overview 71 Recommended Encoder Types 72 Installing the Encoder Module 73 Connecting the Encoder 75 Cable Length and Noise Considerations 76 Motor - Encoder Polarity Matching 76 Voltage Levels, Thresholds and Limit Switches Wiring Optional Limit Switches 78 Wiring Limit Switches Without Encoders Effect of Limit Switches 76 79 79 Using the Encoder Module to Measure Distance 80 Using the Encoder to Mea
Tachometer or Encoder Mounting 98 Tachometer wiring 98 Speed Sensor and Motor Polarity 99 Adjust Offset and Max Speed 100 Control Loop Description 100 PID tuning in Speed Mode SECTION 10 102 Normal and Fault Condition LED Messages 103 Use of the LED Display 103 Motor Direction Status 104 Fault Messages 105 No Control 105 Temporary Faults 106 Permanent Faults 106 Self-Test Display SECTION 11 106 R/C Operation 109 Mode Description 109 Selecting the R/C Input Mode 110 Connector I/O Pin Assignment
Analog Deadband Adjustment Power-On Safety 127 128 Under Voltage Safety 128 Data Logging in Analog Mode 128 SECTION 13 Serial (RS-232) Controls and Operation 131 Use and benefits of RS232 131 Connector I/O Pin Assignment (RS232 Mode) 132 Cable configuration 133 Extending the RS232 Cable 133 Communication Settings 134 Establishing Manual Communication with a PC 134 RS232 Communication with the Encoder Module 135 Entering RS232 from R/C or Analog mode 136 Data Logging String in R/C or Analog mode 136 R
Default PID Gains 150 Joystick Min, Max and Center Values 150 Reading & Changing Operating Parameters at Runtime Operating Modes Registers 152 Read/Change PID Values 152 PWM Frequency Register 153 Controller Status Register 153 Controller Identification Register 154 Current Amps Limit Registers 154 151 RS232 Encoder Command Set 155 Read Encoder Counter 155 Set/Reset Encoder Counters and Destination Registers 155 Read Speed 156 Read Distance 157 Read Speed/Distance 157 Read Encoder Limit Switch Status 15
SECTION 15 Using the Roborun Configuration Utility 177 System Requirements 177 Downloading and Installing the Utility 177 Connecting the Controller to the PC 178 Roborun Frame, Tab and Menu Descriptions 179 Getting On-Screen Help 180 Loading, Changing Controller Parameters Control Settings 181 Power Settings 182 Analog or R/C Specific Settings 183 Closed Loop Parameters 184 181 Encoder Setting and Testing 184 Encoder Module Parameters Setting 185 Exercising the Motors 186 Viewing Encoder Data 186 R
AX2550 Motor Controller User’s Manual Version 1.9b.
SECTION 1 Important Safety Warnings Read this Section First The AX2550 is a high power electronics device. Serious damage, including fire, may occur to the unit, motors, wiring and batteries as a result of its misuse. Please review the User’s Manual for added precautions prior to applying full battery or full load power.
Important Safety Warnings 14 AX2550 Motor Controller User’s Manual Version 1.9b.
SECTION 2 AX2550 Quick Start This section will give you the basic information needed to quickly install, setup and run your AX2550 controller in a minimal configuration. The AX2850 is a version of the AX2550 controller with the addition of Optical Encoder inputs.
AX2550 Quick Start The front side (shown in Figure 1) contains the buttons and display needed to operate and monitor the controller. The 15-pin connector provides the connection to the R/C radio, joystick or microcomputer, as well as connections to optional switches and sensors. Program Set Reset Controller Configuration buttons Connector to Optical Encoders (AX2850 only) Connector to Receiver/Controls and sensors Operating Status and Program LED Display FIGURE 1.
Connecting to the Batteries and Motors Connecting to the Batteries and Motors Connection to the batteries and motors is shown in the figure below and is done by connecting the set of wires coming out from the back of the controller.
AX2550 Quick Start the Controller” on page 29 for more information about batteries and other connection options. Important Warning Do not rely on cutting power to the controller for it to turn off if the Power Control is left floating. If motors are spinning because the robot is pushed are pushed or because of inertia, they will act as generators and will turn the controller, possibly in an unsafe state. ALWAYS ground the Power Control wire to turn the controller Off and keep it Off.
Connecting the R/C Radio Connecting the R/C Radio Connect the R/C adapter cables to the controller on one side and to two or three channels on the R/C receiver on the other side. If present, the third channel is for activating the accessory outputs and is optional. When operating the controller in “Separate” mode, the wire labelled Ch1 controls Motor1, and the wire labelled Ch2 controls Motor2.
AX2550 Quick Start Powering On the Controller Important reminder: There is no On-Off switch on the controller. You must insert a switch on the controller’s power wire as described in section“Connecting to the Batteries and Motors” on page 17. To power the controller, center the joystick and trims on the R/C transmitter. In Analog mode, center the command potentiomenter or joystick.Then turn on the switch that you have placed on the on the Power Control input.
Default Controller Configuration TABLE 1. AX2550 Buttons Function Prog and Set button status Function Press Program while Programming Mode Accept previous parameter change and select next parameter Press Set while in Programming mode Change value of selected parameter Press Program pressed alone during normal operation No effect Press Set alone during normal operation No effect Press Program and Set together during normal operation Emergency stop Default Controller Configuration Version 1.
AX2550 Quick Start Restart Press & hold Prog Program mode entered after 10 seconds Press Prog to select next parameter Press Set to select next value for parameter Press Prog to store change and select next parameter Reset controller to exit Press and hold the Prog button for 10 seconds while resetting or powering on the controller After 10 seconds, the controller will enter the programming mode and flash alternatively the current parameter (I= Input Mode) and its value (0= R/C mode).
Obtaining the Controller’s Software Revision Number FIGURE 6. Roborun Utility screen layout To connect the controller to your PC, use the provided cable. Connect the 15-pin connector to the controller. Connect the 9-pin connector to your PC’s available port (typically COM1) use a USB to serial adapter if needed. Apply power to the controller to turn it on. Load your CD or download the latest revision of Roborun software from www.Roboteq.com, install it on your PC and launch the program.
AX2550 Quick Start It is also possible to get the controller to display the software version number by following these simple steps • Disconnect the power from the motor batteries. Power the controller only via the Power Control input. • Press and hold the Set button while powering or resetting the controller. The LED will display a sequence of two numerical digits and an optional letter separated by dashes as shown in the examples below. = Software version 1.9b FIGURE 7.
SECTION 3 AX2550 Motor Controller Overview Congratulations! By selecting Roboteq’s AX2550 you have empowered yourself with the industry’s most versatile, powerful and programmable DC Motor Controller for mobile robots. This manual will guide you step by step through its many possibilities. Product Description The AX2550 is a highly configurable, microcomputer-based, dual-channel digital speed or position controller with built-in high power drivers.
AX2550 Motor Controller Overview The motors are driven using high-efficiency Power MOSFET transistors controlled using Pulse Width Modulation (PWM) at 16kHz. The AX2550 power stages can operate from 12 to 40VDC and can sustain up to 120A of controlled current, delivering up to 4,800W (approximately 6 HP) of useful power to each motor. The many programmable options of the AX2550 are easily configured using the supplied PC utility or one-touch Program and Set buttons and a 7-segment LED display.
Technical features • • • • • • Motor temperature sensor inputs External voltage sensors User defined purpose (RS232 mode only) Potentiometer input for position while in analog command mode User defined purpose (RS232 mode only) One Switch input configurable as • • • • • Potentiometer input for position (servo mode) 2 Extra analog inputs (on RevB hardware).
AX2550 Motor Controller Overview • • • 12 to 40 V operation High current 8 AWG cable sets for each power stages Temperature-based Automatic Current Limitation • • • • • • • • 120A up to 15 seconds (per channel) 100A up to 30 seconds 80A extended High current operation may be extended with forced cooling 250A peak Amps per channel 16kHz Pulse Width Modulation (PWM) output Auxiliary output for brake, clutch or armature excitation Heat sink extruded case Advanced Safety Features • • • Safe power on mod
Power Connections SECTION 4 Connecting Power and Motors to the Controller This section describes the AX2550 Controller’s connections to power sources and motors. Important Warning Please follow the instructions in this section very carefully. Any problem due to wiring errors may have very serious consequences and will not be covered by the product’s warranty. Power Connections The AX2550 has three Ground (black), two Vmot (red) power cables and a Power Control wire (yellow).
Connecting Power and Motors to the Controller Controller Power Power Control Yellow Ground (-) Black (top) Motor (+) White Motor (-) Green 12 to 40V (+) Red Motor 1 Ground (-) Black 12 to 40V (+) Red Motor(+) Yellow or White Motor (-) Green Motor 2 FIGURE 8. Controller rear plate and power wiring Controller Power The AX2550 uses a flexible power supply scheme that is best described in Figure 9.
Controller Power Mot1(-) Mot1(+) 5Vmin 40V max Channel 1 MOSFET Power Stage 9.5V min 13V max DC/DC 10.5V min 40V max Channel 2 MOSFET Power Stage GND Power Control &Backup ENABLE Microcomputer & MOSFET Drivers VBatt Vmot GND 5Vmin 40V max GND VBatt Vmot Mot2(+) Mot2(-) FIGURE 9.
Connecting Power and Motors to the Controller TABLE 3. Controller Status depending on Power Control and VMot Power Control input is connected to And Main Battery Voltage is Action 10.5V to 40V 0V Controller is On. 10.5V to 40V 1V to 40V Controller is On. Power Stage is Off Power Stage is Active All 3 ground (-) are connected to each other inside the controller. The two main battery wires are also connected to each other internally.
Controller Powering Schemes There is no need to insert a separate switch on Power cables, although for safety reasons, it is highly recommended that a way of quickly disconnecting the Motor Power be provided in the case of loss of control and all of the AX2550 safety features fail to activate. The two red wires are connected to each other inside the controller. The same is true for the black wires. You should wire each pair together as shown in the diagram above.
Connecting Power and Motors to the Controller Motor2 Power switch + On - Off + - VMot M1M1+ PwrCtrl GND GND GND M2M2+ VMot Motor1 Controller 12V to 40V 12V to 40V Motor Battery Backup Battery FIGURE 11. Powering the AX2550 with a Main and Backup Supply Important Warning Unless you can ensure a steady 12V to 40V voltage in all conditions, it is recommended that the battery used to power the controller’s electronics be separate from the one used to power the motors.
Single Channel Operation If you are using this type of motor, make sure that it is mounted on isolators and that its casing will not cause a short circuit with other motors and circuits which may also be inadvertently connected to the same metal chassis. Single Channel Operation The AX2550’s two channel outputs can be paralleled as shown in the figure below so that they can drive a single load with twice the power.
Connecting Power and Motors to the Controller • Then place the load on channel 2 and verify that is also activated by commands on channel 1. • Commands on channel 2 should have no effects on either output. It will be safe to wire in parallel the controller’s outputs only after you have verified that both outputs react identically to channel 1 commands. Jumper "open" Xilinx MCU Place solder ball to close jumper and enable single channel mode Single Channel FIGURE 13.
Wire Length Limits during acceleration and braking. However, it also means that the fuse may not be able to protect the controller. Wire Length Limits The AX2550 regulates the output power by switching the power to the motors On and Off at high frequencies. At such frequencies, the wires’ inductance produces undesirable effects such as parasitic RF emissions, ringing and overvoltage peaks. The controller has built-in capacitors and voltage limiters that will reduce these effects.
Connecting Power and Motors to the Controller It is therefore essential that the AX2550 be connected to rechargeable batteries. If a power supply is used instead, the current will attempt to flow back in the power supply during regeneration, potentially damaging it and/or the controller. Regeneration can also cause potential problems if the battery is disconnected while the motors are still spinning.
Using the Controller with a Power Supply backup voltage drop below 12.V, the DC/DC converter’s output will be approximately 0.5V lower than the highest input. Using the Controller with a Power Supply Using a transformer or a switching power supply is possible but requires special care, as the current will want to flow back from the motors to the power supply during regeneration.
Connecting Power and Motors to the Controller 40 AX2550 Motor Controller User’s Manual Version 1.9b.
Basic Operation General Operation SECTION 5 This section discusses the controller’s normal operation in all its supported operating modes.
General Operation Selecting the Motor Control Modes For each motor, the AX2550 supports multiple motion control modes. The controller’s factory default mode is Open Loop Speed control for each motor. The mode can be changed using any of the methods described in “Programming using built-in Switches and Display” on page 171 and “Loading, Changing Controller Parameters” on page 181.
Selecting the Motor Control Modes Controller FIGURE 16. Effect of commands to motors examples in mixed mode Closed Loop Speed Control In this mode, illustrated in Figure 18, an analog tachometer or an optical encoder (AX2850 only) is used to measure the actual motor speed. If the speed changes because of changes in load, the controller automatically compensates the power output. This mode is preferred in precision motor control and autonomous robotic applications.
General Operation Position Feedback Position Sensor Gear box FIGURE 18. Motor with potentiometer assembly for Position operation User Selected Current Limit Settings The AX2550 has current sensors at each of its two output stages. Every 16 ms, this current is measured and a correction to the output power level is applied if higher than the user preset value. The current limit may be set using the controller’s switches or the supplied PC utility.
Battery Current vs. Motor Current When the measured temperature reaches 80oC, the controller’s maximum current limit begins to drop to reach 0A at 100oC. Above 100oC, the controller’s power stage turns itself off completely. TABLE 5.
General Operation Vbat On Motor Off FIGURE 19. Current flow during operation On Off I mot Avg I bat Avg FIGURE 20. Instant and average current waveforms The relation between Battery Current and Motor current is given in the formula below: Motor Current = Battery Current / PWM Ratio Example: If the controller reports 10A of battery current while at 10% PWM, the current in the motor is 10 / 0.1 = 100A. Important Warning Do not connect a motor that is rated at a higher current than the controller.
Programmable Acceleration Programmable Acceleration When changing speed command, the AX2550 will go from the present speed to the desired one at a user selectable acceleration. This feature is necessary in order to minimize the surge current and mechanical stress during abrupt speed changes. This parameter can be changed by using the controller’s front switches or using serial commands.
General Operation TABLE 6. Acceleration setting table Acceleration Setting Using RS232 Acceleration Setting Using Switches %Acceleration per 16ms Time from 0 to max speed 15 Hex - 17.97% 0.089 second 05 Hex 5 18.75% 0.085 second When configuring the acceleration parameter using the Roborun utility, four additional acceleration steps can be selected between the six ones selectable using the switch, extending the slowest acceleration to 2.04 seconds from 0 to max speed.
Left / Right Tuning Adjustment % Forward (Motor Output) 100 80 Logarithmic Strong Logarithmic Weak 60 Linear (default) Exponential Weak Exponential Strong 100 80 60 20 0 40 - 20 - 40 - 60 20 - 80 - 100 40 % Command Input 20 Deadband 40 60 80 100 % Reverse FIGURE 21. Exponentiation curves The AX2550 is delivered with the “linear” curves selected for both joystick channels.
General Operation is found on all R/C transmitters, and which is actually an offset correction, the Left/Right Adjustment is a true multiplication factor as shown in Figure 22 100 80 60 60 40 40 20 40 40 60 60 80 5.25% 3% 100 % Reverse 0% % Forward (Motor Output) 100 80 0 20 60 % Command Input - 20 - 40 - 60 20 - 80 - 100 100 80 60 20 0 40 - 20 - 40 - 60 - 80 20 40 80 - 100 % Forward (Motor Output) 0% -3% -5.
Activating Brake Release or Separate Motor Excitation TABLE 8. Left/Right Adjustment Parameter selection Parameter Value Speed Adjustment Parameter Value Speed Adjustment 5 -1.5% 12 4.5% 6 -0.75% 14 5.25% Activating Brake Release or Separate Motor Excitation The controller may be configured so that the Output C will turn On whenever one of the two motors is running. This feature is typically used to activate the mechanical brake release sometimes found on motors for personal mobility systems.
General Operation The switch connection is described in “Connecting Switches or Devices to EStop/Invert Input” on page 62. The switch must be such that it is in the open state in the normal situation and closed to signal an emergency stop command. After and Emergency Stop condition, the controller must be reset or powered Off and On to resume normal operation.
Self-Test Mode When the input is pulled high, all the power MOSFETs are turned Off so that the motors are effectively disconnected from the controller. This function is typically used to create a “dead man switch” when the controller is driven using an analog joystick. The motors will be active only while the switch is depressed. If the switch is left off for any reason, the motors will be disconnected and allowed to freewheel rather than coming to an abrupt stop.
General Operation • Encoder Speed or Position if module is installed The entire string is repeated every 208 or 224 milliseconds (depending whether the encoder module is present) with the latest internal parameter values. This information can be logged using the Roborun Utility (see “Viewing and Logging Data in Analog and R/C Modes” on page 192). The string and data format is described in “Analog and R/C Modes Data Logging String Format” on page 166.
AX2550 Connections SECTION 6 Connecting Sensors and Actuators to Input/Outputs This section describes the various inputs and outputs and provides guidance on how to connect sensors, actuators or other accessories to them. AX2550 Connections The AX2550 uses a set of power wires (located on the back of the unit) and a DB15 connector for all necessary connections. The diagram on the figure below shows a typical wiring diagram of a mobile robot using the AX2550 controller.
Connecting Sensors and Actuators to Input/Outputs 2 1 3 4 3 Re Se se t t Res 5 et Set am gr Pro 7 9 8 6 1- DC Motors 5- Controller 2- Optional sensors: - Tachometers (Closed loop Speed mode) - Potentiometers (Servo mode) - Optical Encoder (AX2850 only - all closed loop modes) 6- R/C Radio Receiver, microcomputer, or wireless modem 7- Command: RS-232, R/C Pulse 8- Miscellaneous I/O 3- Motor Power supply wires 9- 4- Power Control wire Running Inverted, or emergency stop switch
AX2550’s Inputs and Outputs AX2550’s Inputs and Outputs In addition to the RS232 and R/C channel communication lines, the AX2550 includes several inputs and outputs for various sensors and actuators. Depending on the selected operating mode, some of these I/Os provide feedback and/or safety information to the controller. When the controller operates in modes that do not use these I/O, these signals become available for user application.
Connecting Sensors and Actuators to Input/Outputs I/O List and Pin Assignment The figure and table below lists all the inputs and outputs that are available on the AX2550. 9 15 Pin1 8 FIGURE 27. Controller’s DB15 connector pin numbering TABLE 10.
Connecting devices to Output C TABLE 10. DB15 connector pin assignment Pin Number Input or Output Signal depending on Mode Description 7 +5V In +5V Optocoupler +5V Input.
Connecting Sensors and Actuators to Input/Outputs Relay, Valve Motor, Solenoid or other Inductive Load Lights, LEDs, or any other non-inductive load + + 5 to 24V DC - Output C 1,9 Internal Transistor 5 to 24V DC - Ground 5 Output C 1,9 Internal Transistor Ground 5 FIGURE 28. Connecting inductive and resistive loads to Output C This output can be turned On and Off using the Channel 3 Joystick when in the R/C mode. See “Activating the Accessory Outputs” on page 120 for more information.
Connecting Switches or Devices to Input F Input E is a high impedance input with a pull-up resistor built into the controller. Therefore it will report an On state if unconnected, and a simple switch as shown on Figure 29 is necessary to activate it. +5V Out 14 50kOhm Input E 8 10kOhm 50kOhm Ground Internal Buffer 5 FIGURE 29. Switch wirings to Input E The status of Input E can be read in the RS232 mode with the ?i command string. The controller will respond with three sets of 2 digit numbers.
Connecting Sensors and Actuators to Input/Outputs On controllers prior to RevB, Input F is an opto-coupled input and requires the buffer to be powered with a connection between pin 14 and 7, and between 13 and 6, to operate.This power connection in not needed on RevB hardware. +5V Out 14 +5V Out 14 +5V In 7 10kOhm GND In 6 Input F 4 10kOhm 10kOhm Input F 4 +5V In 7 Internal Buffer GND Out 5 Internal Buffer 10kOhm GND In 6 GND Out 5 FIGURE 30.
Analog Inputs +5V 14 AX2500 Internal Buffer and Resistor 10kOhm Input EStop/Inv 15 Ground 5 FIGURE 31. Emergency Stop / Invert switch wiring The status of the EStop/Inv can be read at all times in the RS232 mode with the ?i command string. The controller will respond with three sets of 2 digit numbers. The status of the ES/Inv Input is contained in the last set of numbers and may be 00 to indicate an Off state, or 01 to indicate an On state.
Connecting Sensors and Actuators to Input/Outputs Connecting the potentiometer to the controller is as simple as shown in the diagram on Figure 33. +5V 14 Ana 1: Ana 2: Ana 3: Ana 4: 11 10 12 8 Internal Resistors and Converter 47kOhm A/D 10kOhm 10kOhm 47kOhm Ground 5 FIGURE 33. Potentiometer wiring in Position mode The potentiometer must be attached to the motor frame so that its body does not move in relationship with the motor.
Connecting Tachometer to Analog Inputs Since the controller only accepts a 0 to 5V positive voltage as its input, the circuit shown in Figure 34 must be used between the controller and the tachometer: a 10kOhm potentiometer is used to scale the tachometer output voltage to -2.5V (max reverse speed) and +2.5V (max forward speed). The two 1kOhm resistors form a voltage divider that sets the idle voltage at mid-point (2.5V), which is interpreted as the zero position by the controller.
Connecting Sensors and Actuators to Input/Outputs Connecting External Thermistor to Analog Inputs Using external thermistors, the AX2550 can be made to supervise the motor’s temperature and adjust the power output in case of overheating. Connecting thermistors is done according to the diagram show in Figure 35. The AX2550 is calibrated using a 10kOhm Negative Coefficient Thermistor (NTC) with the temperature/resistance characteristics shown in the table below. TABLE 13.
Using the Analog Inputs to Monitor External Voltages To read the temperature, use the ?p command to have the controller return the A/D converter’s value. The value is a signed 8-bit hexadecimal value. Use the chart data to convert the raw reading into a temperature value. Using the Analog Inputs to Monitor External Voltages The analog inputs may also be used to monitor the battery level or any other DC voltage.
Connecting Sensors and Actuators to Input/Outputs +5V 14 Ana 1: Ana 2: Ana 3: Ana 4: 11 10 12 8 47kOhm A/D 10kOhm 47kOhm Ground 5 FIGURE 38. AX2550 Analog Input equivalent circuit Internal Voltage Monitoring Sensors The AX2550 incorporates voltage sensors that monitor the Main Battery voltage and the Internal 12V supply.
Temperature Conversion C Source Code 300 Reported Analog Value 250 200 150 100 50 15 0 14 0 13 0 12 0 11 0 90 10 0 80 70 60 50 40 30 20 0 10 -1 0 -2 0 -3 0 -4 0 0 Temperature in Degrees C FIGURE 39. Analog reading by controller vs. internal heat sink temperature Temperature Conversion C Source Code The code below can be used to convert the analog reading into temperature. It is provided for reference only. Interpolation table is for the internal thermistors.
Connecting Sensors and Actuators to Input/Outputs 70 AX2550 Motor Controller User’s Manual Version 1.9b.
Optical Incremental Encoders Overview SECTION 7 Installing, Connecting and Using the Encoder Module This section describes the Encoder input module that is factory installed inside the AX2850 or that may be added onto the AX2550. Optical Incremental Encoders Overview Optical incremental encoders are a means for capturing speed and travelled distance on a motor. Unlike absolute encoders which give out a multi-bit number (depending on the resolution), incremental encoders output pulses as they rotate.
Installing, Connecting and Using the Encoder Mod- A Channel 1 Pulse = 4 Transitions = 4 Counts B Channel Quadrature Signal Count Down Count Up FIGURE 40. Quadrature encoder output waveform The figure below shows the typical construction of a quadrature encoder. As the disk rotates in front of the stationary mask, it shutters light from the LED. The light that passes through the mask is received by the photo detectors.
Installing the Encoder Module Specifically, the encoder module can process 250,000 counts per seconds. As discussed in the previous section, a count is generated for each transition on the Channel A and Channel B. Therefore the module will work with encoders outputting up to 62,500 pulses per second. Commercial encoders are rated by their numbers of “Pulses per Revolution” (also sometimes referred as “Cycles per Revolution).
Installing, Connecting and Using the Encoder Mod- Follow these simple steps to install: 1- With the power removed, remove the controller’s face plate and slide off the cover. 2- Carefully insert the encoder module on top of the two headers present on the controller’s main board and shown in Figure 43. Beware that the two matting connectors are precisely aligned. FIGURE 43.
Connecting the Encoder Encoder Module Solder wire Main Board FIGURE 45. Solder wire for robust assembly 4- Slide the cover back on. Install the new face plate. Connecting the Encoder The Encoder module uses a widely available 8-pin RJ45 connector identical to those found on all Ethernet devices. The connector provides 5V power to the encoders and has inputs for the two quadrature signals from each encoder.
Installing, Connecting and Using the Encoder Mod- Cable Length and Noise Considerations Cable should not exceed one 3’ (one meter) to avoid electrical noise to be captured by the wiring. A ferrite core filter must be used for length beyond 2’ (60 cm). For longer cable length use an oscilloscope to verify signal integrity on each of the pulse channels and on the power supply. Ferrite Core Encoder FIGURE 47.
Voltage Levels, Thresholds and Limit Switches On the 2850 family of controllers, the threshold voltage may be changed under software control to any value between 0 and 5V in order to meet unusual encoder specifications. By default, the threshold level is 2.5V. Another set of comparators on the same input signals detects pulses that are above and below a fixed 0.5V threshold.
Installing, Connecting and Using the Encoder Mod- Important Warning When a limit switch is activated, the encoder signal that is shared with the switch is no longer visible by the encoder module, and pulse counting and speed measurement stops. Wiring Optional Limit Switches If limit switches are needed by the application, additional circuitry is required in order to create a multi-level signal that shares the encoder and the switch information.
Wiring Limit Switches Without Encoders Wiring Limit Switches Without Encoders If no encoder is used, the Encoder Module’s inputs can be used to wire limit switches directly with solely a pull-up resistor as shown in the diagram below. 5V Out 4.7kOhm 4.7kOhm 4.7kOhm 4.7kOhm Ch B In SW1 SW2 SW3 8-4 5 Ch A In 6 Ch B In 1 Ch A In 2 Encoder Input SW4 GND 7-3 FIGURE 51.
Installing, Connecting and Using the Encoder Mod- TABLE 16. Effects of Limit Switches 3 and 4 on Motor 2 SW3 SW4 Motor 2 Fwd Motor 2 Rev 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.
Using the Encoder to Track Position A simple procedure is included in the Roborun PC utility to easily determine and set these parameters. For information, the exact formula is shown below: Measured Speed Value = RPM * PPR * 4 * (Time Base+1) * 256 / (60 * 1000000) or Measured Speed Value = RPM * PPR * (Time Base + 1) / 58593.
Installing, Connecting and Using the Encoder Mod- The actual formula is as follows: Distance = (Destination - Counter value) / Divider Where: divider is a configurable parameter of value 1, 2, 4, 8, 16, 32, 64 or 127 If computed distance is less than -127, then reported distance is -127 If computed distance is larger than +127, then reported distance is +127 Destination= 50,050 Counter= 50,000 distance 50 25 12 6 3 1 0 0 at divider 1 2 4 8 16 32 64 128 FIGURE 52.
Encoder Testing and Setting Using the PC Utility Encoder Testing and Setting Using the PC Utility Extensive diagnostic, calibration, setting and testing support is provided in the Roborun PC utility. Basic instructions on how to install and run the PC utility can be found in “Encoder Setting and Testing” on page 184.
Installing, Connecting and Using the Encoder Mod- 84 AX2550 Motor Controller User’s Manual Version 1.9b.
Mode Description Closed Loop Position Mode SECTION 8 This section describes the AX2550 Position mode, how to wire the motor and position sensor assembly and how to tune and operate the controller in this mode. Mode Description In this mode, the axle of a geared-down motor is coupled to a position sensor that is used to compare the angular position of the axle versus a desired position. The controller will move the motor so that it reaches this position.
Closed Loop Position Mode Position Sensor Selection The AX2550 may be used with the following kind of sensors: • • • Potentiometers Hall effect angular sensors Optical Encoders (with Encoder Module) The first two are used to generate an analog voltage ranging from 0V to 5V depending on their position. They will report an absolute position information at all times. Optical encoders report incremental changes from a reference which is their initial position when the controller is powered up or reset.
Feedback Potentiometer wiring The mechanical coupling between the motor and the sensor must be as tight as possible. If the gear box is loose, the positioning will not be accurate and will be unstable, potentially causing the motor to oscillate. Some sensor, such as potentiometers, have a limited rotation range of typically 270 degrees (3/4 of a turn), which will in turn limit the mechanical motion of the motor/potentiometer assembly.
Closed Loop Position Mode 14 2k - 10k +5V 2k - 10k Feedback 1 Feedback 2 5 Ground 11 Ana1 10 Ana2 12 Ana3* 8 Ana4* FIGURE 55. Pot wiring for RS232 or RC Command and Analog Feedback Feedback Potentiometer wiring in Analog Mode When the controller is configured in Analog mode, the analog inputs 1 and 2 are used for commands while the analog inputs 3 and 4 are used for feedback.
Analog Feedback on Single Channel Controllers Analog Feedback on Single Channel Controllers On Single Channel controllers (SC Version - not to be confused with Dual Channel controllers of which only one channel is used for position control - See “Single Channel Operation” on page 177.), the controller accepts one command and uses one input for feedback.
Closed Loop Position Mode This wiring is also the one to use when the controller is in Analog mode but switched to RS232 after reset using the method discussed in “Entering RS232 from R/C or Analog mode” on page 136 Using Optical Encoders in Position Mode The AX2550 and AX1500 may be equipped with an optional Optical Encoder Module. Optical Encoders require special handling. See Figure 7, “Installing, Connecting and Using the Encoder Module,” on page 71 for a detailed discussion.
Encoder Error Detection and Protection 9. If the motor turns in the direction in which the sensor was moved, the polarity is correct. The sensor axle may be tighten to the motor assembly. 10. If the motor turns in the direction away from the sensor, then the polarity is reversed. The wire polarity on the motors should be exchanged. If using a potentiometer as sensor, the GND and +5V wires on the potentiometer may be swapped instead. If using an Optical Encoder, ChA and ChB outputs can be swapped. 11.
Closed Loop Position Mode The diode polarity depends on the particular wiring and motor orientation used in the application. If the diode is mounted backwards, the motor will not stop once the limit switch lever is pressed. If this is the case, reverse the diode polarity. The diodes may be eliminated, but then it will not be possible for the controller to move the motor once either of the limit switches has been triggered.
Using Current Limiting as Protection Manual Emergency Stop Switch SW1 SW2 Motor Ground Controller Emergency Stop Input FIGURE 60. Safety limit using AX2550’s Emergency Stop input Important Warning Limit switches must be used when operating the controller in Position Mode. This will significantly reduce the risk of mechanical damage and/or injury in case of damage to the position sensor or sensor wiring.
Closed Loop Position Mode A higher Proportional Gain will cause the algorithm to apply a higher level of power for a given measured error, thus making the motor move quicker. Because of inertia, however, a faster moving motor will have more difficulty stopping when it reaches its desired position. It will therefore overshoot and possibly oscillate around that end position.
PID tuning in Position Mode The Roborun PC utility makes this experimentation easy by providing one screen for changing the Proportional, Integral and Differential gains and another screen for running and monitoring the motors. When tuning the motor, first start with the Integral Gain at zero, increasing the Proportional Gain until the motor overshoots and oscillates. Then add Differential gain until there is no more overshoot. If the overshoot persists, reduce the Proportional Gain.
Closed Loop Position Mode 96 AX2550 Motor Controller User’s Manual Version 1.9b.
Mode Description Closed Loop Speed Mode SECTION 9 This section discusses the AX2550 Close Loop Speed mode. Mode Description In this mode, an analog or digital speed sensor measures the actual motor speed and compares it to the desired speed. If the speed changes because of changes in load, the controller automatically compensates the power output. This mode is preferred in precision motor control and autonomous robotic applications.
Closed Loop Speed Mode Using Optical Encoder for Speed Feedback (AX2850 only) Digital Optical Encoders may be used to capture accurate motor speed. This capability is only available on controllers fitted with the optional encoder module. Detailed information on how to install and wire optical encoders is provided at “Installing, Connecting and Using the Encoder Module” on page 71.
Speed Sensor and Motor Polarity Connecting the tachometer to the controller is as simple as shown in the diagram below. +5V 14 1kOhm Zero Adjust 100 Ohm pot Max Speed Adjust 10kOhm pot Tach Ana 1: Ana 2: Ana 3: Ana 4: 11 10 12 8 Internal Resistors and Converter 47kOhm A/D 10kOhm 47kOhm 1kOhm Ground 5 FIGURE 63. Tachometer wiring diagram Speed Sensor and Motor Polarity The tachometer or encoder polarity (i.e.
Closed Loop Speed Mode 7. Move the cursor of the desired motor to the right so that the motor starts rotating, and verify that a positive speed is reported. Move the cursor to the left and verify that a negative speed is reported. 8. If the tachometer or encoder polarity is the same as the applied command, the wiring is correct. 9. If the tachometer polarity is opposite of the command polarity, then either reverse the motor’s wiring, or reverse the tachometer wires.
Control Loop Description ence measured between the desired speed (set by the user) and the actual position (captured by the tachometer). Figure 64 shows a representation of the PID algorithm. Every 16 milliseconds, the controller measures the actual motor speed and subtracts it from the desired position to compute the speed error. The resulting error value is then multiplied by a user selectable Proportional Gain. The resulting value becomes one of the components used to command the motor.
Closed Loop Speed Mode PID tuning in Speed Mode As discussed above, three parameters - Proportional Gain, Integral Gain, and Differential Gain - can be adjusted to tune the Closed Loop Speed control algorithm. The ultimate goal in a well tuned PID is a motor that reaches the desired speed quickly without overshoot or oscillation.
Use of the LED Display Normal and Fault Condition LED Messages SECTION 10 This section discusses the meaning of the various messages and codes that may be displayed on the LED display during normal operation and fault conditions. Use of the LED Display The AX2550 uses a single 7-segment LED display to report a number of operating or fault conditions.
Normal and Fault Condition LED Messages Motor Direction Status When the controller is running, two pairs of LED segments are directly related to command informations to the Power Output stage. The position and meaning of the segments are shown in the figure below. Motor 2 Direction Lit: Forward Off: Reverse Motor 1 Direction Lit: Forward Off: Reverse FIGURE 65. Each command bit is wired to 2 LED segments Note that the display does not provide Power information.
Fault Messages TABLE 18.
Normal and Fault Condition LED Messages FIGURE 66. No Radio signal scrolling message Temporary Faults Temporary Faults are condition that cause the controller’s Power Output stage to turn Off and remain off for as long as the fault is present. Temporary Faults are indicated with the LED displaying a solid “8”.
Self-Test Display = Software version 1.9b FIGURE 67.
Normal and Fault Condition LED Messages 108 AX2550 Motor Controller User’s Manual Version 1.9b.
Mode Description SECTION 11 R/C Operation This section describes the controller’s wiring and functions specific to the R/C radio control mode. Mode Description The AX2550 can be directly connected to an R/C receiver. In this mode, the speed or position information is contained in pulses whose width varies proportionally with the joysticks’ positions. The AX2550 mode is compatible with all popular brands of R/C transmitters.
R/C Operation Selecting the R/C Input Mode The R/C Input Mode is the factory default setting.
R/C Input Circuit Description TABLE 19. Connector pin-out in R/C mode Pin Number Input or Output Signal Description 8 Digital In R/C: Ch 3 / Ana In 4 R/C radio Channel 3 pulses - (Not available when encoder module present) 10 Analog in Ana in 2 Channel 2 speed or position feedback input 11 Analog in Ana in 1 Channel 1 speed or position feedback input 12 Analog in Ana in 3 Unused 14 Power Out +5V +5V Power Output (100mA max.
R/C Operation 1 2 3 1 8 9 15 FIGURE 71. RC Cable wiring diagram 3 2 1 . FIGURE 72. RC connection cable Powering the Radio from the controller The 5V power and ground signals that are available on the controller’s connector may be used to power the R/C radio. The wire loop is used to bring the controller’s power to the the radio as well as for powering the optocoupler stage. Figure 73 below shows the connector wiring necessary to do this. Figure 74 shows the equivalent electrical diagram.
Powering the Radio from the controller Channel 3 Channel 2 3: 4: 6: 7: 8: Channel 1 Channel 1 Command Pulses Channel 2 Command Pulses Radio battery (-) Ground Radio battery (+) Channel 3 Command Pulses 8 9 Pin 1 Wire loop bringing power from controller to RC radio 15 FIGURE 73. Wiring for powering R/C radio from controller 14 Controller Power R/C Radio Power 7 R/C Radio R/C Channel 1 3 R/C Channel 2 4 R/C Channel 3 8 R/C Radio Ground 6 5-13 MCU Controller Ground FIGURE 74.
R/C Operation Connecting to a Separately Powered Radio This wiring option must be used when the controller is used with a RC receiver that is powered by its own separate battery. The red wire in the loop must be cut so that the 5V out from the controller does not flow to the radio, and so that the battery that is connected to the controller does not inject power into the controller. The figure below show the cable with the loop cut. Figure 76 shows the equivalent electrical diagram.
Reception Watchdog ond indicates the minimum joystick position and 2.0 milliseconds indicates the maximum joystick position. When the joystick is in the center position, the pulse should be 1.5ms. Note that the real pulse-length to joystick-position numbers that are generated by your R/C radio may be different than the ideal 1.0ms to 2.0ms discussed above. To make sure that the controller captures the full joystick movement, the AX2550 defaults to the timing values shown in Figure 77.
R/C Operation If no pulses are present, the motors are disabled, and the controller’s display will scroll alternatively the letters “no ctrl” as shown in Figure 78 below. FIGURE 78. “No control” message will scroll when no valid radio signal is present After powering on the R/C radio receiver and transmitter, and if the wiring is correct, the controller will start receiving pulses.
Joystick Deadband Programming noise is generated. Section “Electrical Noise Reduction Techniques” on page 37 provides a few suggestions for reducing the amount of electrical noise generated in your robot. Joystick Deadband Programming In order to avoid undesired motor activity while the joysticks are centered, the AX2550 supports a programmable deadband feature. A small deadband is set in the controller by default at the factory.
R/C Operation Min Reverse Deadband (no action) Max Reverse Min Forward Max Forward Centered Position FIGURE 79. Effect of deadband on joystick position vs. motor speed Command Control Curves The AX2550 can also be set to translate the joystick motor commands so that the motors respond differently depending on whether the joystick is near the center or near the extremes. Five different exponential or logarithmic translation curves may be applied.
Automatic Joystick Calibration There are two methods for calibrating the joysticks: • The automatic method is the simplest and is based on the controller “learning” the joystick’s parameters using the simple training sequence described below. • The manual method lets you enter actual timing numbers directly in the controllers flash memory using your PC running the Roborun configuration utility. This method is described in “Loading, Changing Controller Parameters” on page 181.
R/C Operation Notes: If you attempt to calibrate the joysticks while the radio is off or not connected to the controller, the calibration data will not change and the previously stored information will continue to be used. If calibration is performed with only one R/C channel connected to the controller, then only the joystick that is active will be calibrated. The other channel will keep its original settings. A minimum amount of travel is required between the min, max and center joystick positions.
Data Logging in R/C Mode Output C OFF Output C OFF Output C ON FIGURE 81. Using Channel 3 to activate accessory outputs Data Logging in R/C Mode While in R/C Mode, the AX2550 will continuously send a string of characters on the RS232 output line. This string will contain 12 two-digit hexadecimal numbers representing the following operating parameters.
R/C Operation DB9 Female To PC DB15 Male To Controller 1 1 RX Data 6 9 7 10 8 11 9 12 2 2 RS232 Data Out 3 R/C Ch 1 3 4 R/C Ch 2 4 GND 5 5 13 14 15 GND 6 7 R/C GND R/C +5V 8 FIGURE 82. Modified R/C cable with RS232 output for data logging to a PC 122 AX2550 Motor Controller User’s Manual Version 1.9b.
Mode Description Analog Control and Operation SECTION 12 This section describes how the motors may be operated using analog voltage commands. Mode Description The AX2550 can be configured to use a 0 to 5V analog voltage, typically produced using a potentiometer, to control each of its two motor channels. The voltage is converted into a digital value of -127 at 0V, 0 at 2.5V and +127 at 5V. This value, in turn, becomes the command input used by the controller.
Analog Control and Operation Connector I/O Pin Assignment (Analog Mode) 9 15 Pin1 8 When used in the Analog mode, the pins on the controller’s DB15 connector are mapped as described in the table below TABLE 21.
Connecting to a Voltage Source Connecting to a Voltage Source The analog inputs expect a DC voltage of 0 to 5V which can be sourced by any custom circuitry (potentiometer, Digital to Analog converter). The controller considers 2.5V to be the zero position (Motor Off). 0V is the maximum reverse command and +5V is the maximum forward command. The inputs’ equivalent circuit is show in Figure 83 below. +5V 14 Internal Resistors and Converter Analog In1: pin 11 In2: pin 10 47kOhm A/D 0V = Min 2.
Analog Control and Operation +5V 14 Internal Resistors and Converter Analog Input 1 2 3 or 4 10kOhm 10 11 12 8 47kOhm A/D 10kOhm 47kOhm 13 Ground FIGURE 84. Potentiometer connection wiring diagram The controller includes two 47K ohm resistors pulling the input to a mid-voltage point of 2.5V. When configured in the Analog Input mode, this will cause the motors to be at the Off state if the controller is powered with nothing connected to its analog inputs.
Analog Deadband Adjustment 100K or higher potentiometer. Figure 86 shows how the output voltage varies at the various potentiometer positions for three typical potentiometer values. Note that the effect is an exponentiation that will cause the motors to start moving slowly and accelerate faster as the potentiometer reaches either end. This curve is actually preferable for most applications.
Analog Control and Operation TABLE 22. Analog deadband parameters and their effects Parameter Value Pot. Position resulting in Motor Power at 0% Pot. Position resulting in Motor Power at -/+100% 0 0% 2.5V 94% 0.15V and 4.85V 1 0% to 2.4% 2.44V to 2.56V 96% 0.10V and 4.90V 2 0% to 4.7% 2.38V to 2.62V 93% 0.18V and 4.83V 3 (default) 0% to 7.1% 2.32V to 2.68V 95% 0.13V to 4.88V 4 0% to 9.4% 2.27V to 2.74 93% 0.18V and 4.83V 5 0% to 11.8% 2.21V to 2.80V 95% 0.13V to 4.
Data Logging in Analog Mode • • • • Internal Heat Sink temperatures 1 and 2 Main Battery voltage Internal 12V voltage Encoder Speed or Position (AX2850) The entire string is repeated every 213 milliseconds with the latest internal parameter values. This information can be logged using the Roborun Utility (see “Viewing and Logging Data in Analog and R/C Modes” on page 192). It may also be stored in a PDA that can be placed in the mobile robot.
Analog Control and Operation 130 AX2550 Motor Controller User’s Manual Version 1.9b.
Use and benefits of RS232 Serial (RS-232) Controls and Operation SECTION 13 This section describes the communication settings and the commands accepted by the AX2550 in the RS232 mode of operations. This information is useful if you plan to write your own controlling software on a PC or microcomputer. These commands will also allow you to send commands manually using a terminal emulation program.
Serial (RS-232) Controls and Operation Connector I/O Pin Assignment (RS232 Mode) 9 15 Pin1 8 FIGURE 1. Pin locations on the controller’s 15-pin connector When used in the RS232 mode, the pins on the controller’s DB15 connector are mapped as described in the table below TABLE 23.
Cable configuration Cable configuration The RS232 connection requires the special cabling as described in the figure below. The 9pin female connector plugs into the PC (or other microcontroller). The 15-pin male connector plugs into the AX2550. It is critical that you do not confuse the connector’s pin numbering. The pin numbers on the drawing are based on viewing the connectors from the front (facing the sockets or pins). Most connectors have pin numbers molded on the plastic.
Serial (RS-232) Controls and Operation DB9 Female DB9 Male 1 1 RX Data TX Data 6 6 7 7 8 8 9 9 2 3 Data Out 3 Data In 4 4 GND 2 5 5 GND FIGURE 90. RS232 extension cable/connector wiring diagram Communication Settings The AX2550 serial communication port is set as follows: 9600 bits/s, 7-bit data, 1 Start bit, 1 Stop bit, Even Parity Communication is done without flow control, meaning that the controller is always ready to receive data and can send data at any time.
Establishing Manual Communication with a PC COM1port. You can easily change this setting to a different port from the program’s menus. Note that starting with version 1.9, the Roborun PC utility also includes a Terminal Emulation Console for communicating with the controller using raw data. See “Using the Console” on page 191.
Serial (RS-232) Controls and Operation Power up prompt from main MCU Hardware Code of main board Power up prompt from encoder MCU Hardware Code of Encoder Module FIGURE 92. Hyperterm session showing power up messages from both MCUs After this information is sent, the Encoder’s MCU will “listen” for approximately 100ms and will enter the In System Programming mode (ISP) if the letter “Z” is sent to it.
Commands Acknowledge and Error Messages RS232 Mode if default If the controller is configured in RS232 mode, it will automatically be in the RS232 mode upon reset or power up. In this case, the “OK” message is sent automatically, indicating that the controller is ready to accept commands through its serial port. Commands Acknowledge and Error Messages The AX2550 will output characters in various situations to report acknowledgements or error conditions as listed below.
Serial (RS-232) Controls and Operation RS-232 Watchdog For applications demanding the highest operating safety, the controller may be configured to automatically stop the motors (but otherwise remain fully active) if it fails to receive a character on its RS232 port for more than 1 seconds. The controller will also send a “W” character every second to indicate to the microcomputer that such a time-out condition has occurred.
Controller Commands and Queries TABLE 24. Controller’s basic Commands and Queries Command Type Description ?m or ?M Query Read Heatsink Temperature ?e or ?E Query Read Battery and Internal Voltage ?i or ?I Query Read Digital Inputs ?k or ?K Query Quick read of Encoder Speed or Position if present Set Motor Command Value Description: Send a speed of position value from 0 to 127 in the forward or reverse direction for a given channel.
Serial (RS-232) Controls and Operation Query Power Applied to Motors Description: This query will cause the controller to return the actual amount of power that is being applied to the motors at that time. The number is a hexadecimal number ranging from 0 to +127 (0 to 7F in Hexadecimal). In most cases, this value is directly related to the command value, except in the conditions described in the notes below.
Controller Commands and Queries values represent the actual speed measured by the tachometer. When used in position mode, the values represent the actual motor position measured by a potentiometer. In all other modes, the values represent the measured voltage (0 to 5V) applied to the analog inputs. The values are signed Hexadecimal numbers ranging from -127 to +127. The -127 value represents 0V at the input, the 0 value represents 2.5V, and the +127 value represents +5V.
Serial (RS-232) Controls and Operation drivers. The values are unsigned Hexadecimal numbers ranging from 0 to 255. To convert these numbers into a voltage figure, use the formulas described in “Internal Voltage Monitoring Sensors” on page 68. Syntax: ?e or ?E Reply: nn mm Where: nn = main battery voltage value mm = internal 12V voltage value Notes: The hexadecimal format is intended to be deciphered by a microcontroller.
Accessing & Changing Configuration Parameter in Flash Accessing & Changing Configuration Parameter in Flash It is possible to use RS232 commands to examine and change the controller’s parameters stored in Flash. These commands will appear cryptic and difficult to use for manual parameter setting. It is recommended to use the Graphical configuration utility described in “Using the Roborun Configuration Utility” on page 177.
Serial (RS-232) Controls and Operation Reply: + Success, changed parameters are now active - if error Table 25 below lists the complete set of configuration parameters that may be accessed and changed using RS232 commands. Flash Configuration Parameters List TABLE 25.
Accessing & Changing Configuration Parameter in Flash TABLE 25. Configuration parameters in Flash Location Description Active after ^1D Joystick Max 2 LS Instant ^F0 Amps Calibration Parameter 1 Reset ^F1 Amps Calibration Parameter 2 Reset These parameters are stored in the controller’s Flash memory and are not intended to be changed at runtime. Important Notice The above parameters are stored in the MCU’s configuration flash.
Serial (RS-232) Controls and Operation This parameters selects the various open loop and closed loop operating modes as well as the feedback method.
Accessing & Changing Configuration Parameter in Flash Acceleration Address: Access: Effective: ^03 Read/Write After Reset or ^FF This parameter configures the rate at which the controller internally changes the command value from the one it was to the one just received.
Serial (RS-232) Controls and Operation Bit 5:4 Definition Input E See pages Unavailable when Encoder Module is present page 52 page 52 (00) = No action (default) 01 = Cut FET power when Input E is Low 10 = Activate output C 11 = Cut FET when Input E is High 7:6 Input F (00) = No action (default) page 52 01 = Cut FET power when Input E is Low page 52 10 = Activate output C 11 = Cut FET when Input E is High RC Joystick or Analog Deadband Address: Access: Effective: ^06 Read/Write After Reset or ^
Accessing & Changing Configuration Parameter in Flash This parameter configures the transfer curve that is applied the input command. Bit 7:0 Definition See pages (0) = Linear (no exponentiation - default) page 118 1 = strong exponential 2 = normal exponential 3 = normal logarithmic 4 = strong logarithmic Left/Right Adjust Address: Access: Effective: ^0B Read/Write After Reset or ^FF This parameter configures the compensation curve when motors are spinning in one direction vs. the other.
Serial (RS-232) Controls and Operation Default Encoder Distance Divider Address: Access: Effective: ^0E Read/Write After Reset or ^FF This parameters is the Encoder’s Distance Divider that is loaded after the controller is reset or powered on. The Encoder Distance Divider can be changed at Runtime using separate commands (see page 152). Parameter values are integer number from 0 to 7. This parameter is only effective on controllers equipped with Encoder Modules.
Reading & Changing Operating Parameters at Runtime ^1C - Joystick Max 2 MS ^1D - Joystick Max 2 LS Instantly Effective: These parameters are the Gains values that are loaded after the controller is reset or powered on. These Gains apply to both channels. Gains can be changed at Runtime, and values can be different for each channel using separate commands (see page 152). Gains values are integer number from 0 to 63. This number is divided by 8 internal so that each increment equals 0.125.
Serial (RS-232) Controls and Operation TABLE 26. Runtime R/W Parameters list Location Function R/W ^86 PID Differential gain 1 R/W ^87 PID Differential gain 2 R/W ^88 PWM frequency R/W ^89 Controller Status R Only ^8A Controller Model R Only ^8B Current Amps limit 1 R Only ^8C Current Amps limit 2 R Only Important Notice: Do not write in the locations marked as Read Only. Doing so my cause Controller malfunction.
Reading & Changing Operating Parameters at Runtime ^86 - I2 ^87 - D2 Read/Write Instantly Access: Effective: The Proportional, Integral and Derivative gain for each channel can be read and changed onthe-fly. This function also provides a mean for setting different PID values for each channel. Actual Gain value is the value contained in the register divided by 8. Changes take effect at the controller’s next 16ms iteration loop.
Serial (RS-232) Controls and Operation TABLE 28. Controller Status Register Definition Bit Fault Condition Effect 5 Confirmed Short Circuit Permanent 6 Confirmed Encoder Error Permanent 7 Emergency Stop Pressed Permanent Controller Identification Register Address: Access: Effective: ^8A Read Only Instantly This register may be used to query the Controller’s model and some of its optional hardware configurations. TABLE 29.
RS232 Encoder Command Set RS232 Encoder Command Set When present, the Encoder module responds to a dedicated set of commands and queries. The serial port setting and basic command format is identical to this for all other functions of the controller as described in “Serial (RS-232) Controls and Operation” on page 131. Read Encoder Counter Description: Read the value of the Encoder counter(s). The number is a signed 32 bit number that may range from -2,147,836,648 to +2,147,836,647.
While resetting is a single step command, setting the counters to a non-zero value requires two steps: 1- load a 4 byte buffer (32-bit) with the desired value. 2- Transfer the buffer’s content to the counter(s). Loading the buffer can be done using the commands described in “Read / Modify Encoder Module Registers and Parameters” on page 158. The buffer will also be altered after a Counter Read command, in which case it will contain the last read counter value.
RS232 Encoder Command Set Read Distance Description: This query will cause the controller to return the distance between the current position and the value in the destination register. The values are signed Hexadecimal numbers ranging from -127 to +127. The -127 value represents the relative distance according to the formulas described in “Using the Encoder to Track Position” on page 81.
Reply: 0n Where: n = switch status The relationship between the value of n and the switch status is shown in the table below. Extracting the status of a given switch from this number is easily accomplished in software using masking. TABLE 30.
RS232 Encoder Command Set Example: *84 01 Read value of parameter at address hex 84 Controller replies, value is 01 Modify parameter Syntax: *mm nn Reply: + if command was executed successfully - if error Where mm= parameter address nn= new parameter value Examples: *84 03 Store 03 into parameter at address hex 84 Notes: All parameters and values are expressed with 2 hexadecimal digits. The table below lists maps the few relevant parameters that can be accessed using this command. TABLE 31.
TABLE 31. Encoder Registers Address Parameter Description *98 Destination Register 1 MSB (bits 31 to 24) *99 Destination Register 1 (bits 23 to 16) Size Access 4 bytes Full *9A Destination Register 1 (bits 15 to 8) *9B Destination Register 1 LSB (bits 7 to 0) *9C Distance 1 (when Position Mode enabled) 1 byte Full *8D Distance 2 (when Position Mode enabled) 1 byte Full *86 Speed 1 1 byte Full *87 Speed 2 1 byte Full *A2 Time Base for speed computation of Encoder 1.
Register Description These two registers contain either the measured speed or the measured distance. Whether speed or distance information is returned depends on the settings contained in the Mode register described at. This information is returned using the ?p query (see “Query Analog Inputs” on page 140).
*9A *9B - Least Significant Byte These two 32-bit (4-bytes) registers are used to store the desired destination when the controller is used in position mode. These registers should always be set using the mailbox mechanism described above. See “Using the Encoder to Track Position” on page 81 for a complete description of the position mode.
Counter Read Data Format Counter Read Data Format When receiving a counter read query, the encoder module will output the value of its 32-bit counter. If all 32-bit are sent, this would require 8 ASCII digits to represent the value. A 32-bit counter can store over 2 billion counts in each direction. In practice, it will be rare that counts will be so large than only a partial number of the counter’s bits will be significant at any given time.
AX2550 Motor Controller User’s Manual Version 1.9b.
Automatic Switching from RS232 to RC Mode Automatic Switching from RS232 to RC Mode In many computer controlled applications, it may be useful to allow the controller to switch back to the RC mode. This would typically allow a user to take over the control of a robotic vehicle upon computer problem. While the AX2550 can operate in either RC Radio or RS232 mode, the RS232 Data Input and RC Pulse Input 1 share the same pin on the connector.
Controller is on, Radio is turned Off (or Radio On with RC ch3 Off) • • • Relay deactivates. RS232 is now connected to shared input. String of Carriage Returns now received by controller. Computer looks for OK prompt to detect that the RS232 mode is now active. Note: Wait 5 seconds for the capacitor to discharge before attempting to switch to RC mode if doing this repeatedly. Controller will not reset otherwise.
Decimal to Hexadecimal Conversion Table logging purposes. This cable has a 15-pin male connector and 3 15-pin connectors. The Front View Rear View Female to PC with RxData Only 4 1 3 2 Cut Wire Female to PC with Rx and Tx Data 1 Female to Application 1 Male to controller 1 1 FIGURE 95. ASCII string sent by the controller while in R/C or Analog mode male connector plugs into the controller.
TABLE 33.
Decimal to Hexadecimal Conversion Table TABLE 34.
AX2550 Motor Controller User’s Manual Version 1.9b.
SECTION 14 Configuring the Controller using the Switches The AX2550 Speed Controller can be programmed to operate in many modes using a simple set-up procedure. Two buttons and a 7-segment LED display allow the user to examine and change these settings. Alternatively, the controller may be programmed using a PC connected to the AX2550 controller through the RS232 serial communication port.
Configuring the Controller using the Switches Program Set Reset 1- Press and hold for 10 seconds while resetting or powering up to enter Program mode 4- Press once to record value change (if any) and move to next parameter 3- Press to advance to next value for parameter. 2- When in Programing mode, display flashes parameter and its current value Press and hold Program and Set buttons together for 10 second while resetting or powering on to restore factory defaults FIGURE 96.
Programming using built-in Switches and Display Be careful not to confuse the Set and Program button when entering the Programming Mode. Pressing and holding the Set button alone for 10 seconds after reset will cause the controller to enter in self-test mode. This will cause the motors to be turned On and Off according the test sequence described in the Self Test section of this manual. See“Self-Test Mode” on page 53.
Configuring the Controller using the Switches the controller. All parameters, including Joystick limits, will be reset to their default values shown in the “Programmable Parameters List” on page 174 Exiting the Parameter Setting Mode Exiting the Programming Mode can be done only by pressing the Reset button or powering down the controller. The new parameters will be the ones in use after the controller is reset or first powered up.
Programmable Parameters List This table shows only the parameters that can be programmed using the switches and display. Other less commonly used parameters exist and are only accessible and programmable using the Configuration Utility (page 177) or the RS232 commands (page 143). TABLE 35.
Configuring the Controller using the Switches TABLE 35.
SECTION 15 Using the Roborun Configuration Utility A PC-based Configuration Utility is available, free of charge, from Roboteq. This program makes configuring and operating the AX2550 much more intuitive by using pull-down menus, buttons and sliders. The utility can also be used to update the controller’s software in the field as described in “Updating the Controller’s Software” on page 194.
Using the Roborun Configuration Utility • after the installation is complete, run the program from your Start Menu > Programs > Roboteq The controller does not need to be connected to the PC to start the Utility.
Roborun Frame, Tab and Menu Descriptions Roborun Frame, Tab and Menu Descriptions 2 1 5 4 3 FIGURE 98. Roborun screen layout The Roborun screen contains the four main set of commands and information frames described below: 1- Program Revision Number This is the revision and date of the Roborun utility. It is recommended that you always verify that you have the latest revision of the utility from Roboteq’s web site at www.roboteq.
Using the Roborun Configuration Utility featuring the additional Analog Inputs 3 and 4 are automatically identified as Rev. B in this area of the screen. 3- Parameter Selection and Setting and Special Functions This is the program’s main frame and includes several types of tabs, each of which has several buttons, menus and other User Interface objects. These tabs and the functions they contain are described in detail in the following sections.
Loading, Changing Controller Parameters Loading, Changing Controller Parameters The first set of tabs allows you to view and change the controller’s parameters. These tabs are grouped according to the general type of parameters (Controls, Power Setting, and R/C Settings). When starting Roborun, this screen is filled with the default values. If the controller is connected to your PC, Roborun will automatically detect it and ask you if you wish to read its settings.
Using the Roborun Configuration Utility This pull down menu is used to choose whether the controller will operate in Separate or Mixed mode. For more information on these modes, see “Selecting the Motor Control Modes” on page 42. 3- Input Command Adjustment These pull down menus will let you select one of five conversion curves on each of the input command values. See “Command Control Curves” on page 48.
Loading, Changing Controller Parameters 2- Left/Right Adjust This slider will let you configure the controller so that it applies more power to the motors in one direction than in the other. See “Left / Right Tuning Adjustment” on page 49. 3- Acceleration Setting This slider will let you select one of seven preset acceleration values. The label on the right shows a numerical value which represents the amount of time the controller will take to accelerate a motor from idle to maximum speed.
Using the Roborun Configuration Utility These fields are enabled only if the R/C mode is selected. These number areas will let you read and modify the R/C pulse timing information used by the controller. New values can be entered manually to create different capture characteristics. They are also useful for viewing the stored values after an automatic joystick calibration sequence. See “Joystick Calibration” on page 118 and “Automatic Joystick Calibration” on page 119. Closed Loop Parameters FIGURE 103.
Encoder Setting and Testing 1 4 6 2 5 3 7 7 FIGURE 104.
Using the Roborun Configuration Utility The Time Base parameter is used to compute the speed measured by the module. The measured speed is a relative number ranging from 0 to +/-127.
Running the Motors 1 7 4 3 2 6 8 5 FIGURE 105. Motor exercising and monitoring screen 1- Run/Stop Button This button will cause the PC to send the run commands to the controller and will update the screen with measurements received from the controller. When the program is running, the button’s caption changes to “Stop”. Pressing it again will stop the motors and halt the exchange of data between the PC and the controller.
Using the Roborun Configuration Utility case the power level will be the one needed to keep the Amps within the limit. Note that the display value is not signed and thus does not provide rotation direction information. The Ana fields contain the analog input values that are measured and reported by the controller. When the controller is in the position mode with Analog Feedback, the Ana1 and Ana2 fields will display the position sensed on the feedback potentiometer.
Running the Motors three digital inputs present on the controller. Black represents a “0”level. Green represents a “1” level. 7- Data Logging and Timer A timer is provided to keep track of time while running the motors. An additional set of buttons and displays are provided to operate a data logger. The data logger is fully described in the section that follows. 8- Joystick Enable Enable and configure a joystick.
Using the Roborun Configuration Utility line of the save file contains the Header names. Each following line contains a complete set of parameters. The Header name, order and parameter definition is shown in Table 36: TABLE 36.
Using the Console A joystick test program name “Joytest” is automatically installed in the Start menu when installing the Roborun utility. This program may be used to further verify that the joystick is properly installed in the PC and is fully operational. Using the Console The console screen allows you to communicate with the controller using raw ASCII data. This function is very useful for troubleshooting when normal communication with Roborun cannot be established (e.g.
Using the Roborun Configuration Utility ries. See “RS232 Encoder Command Set” on page 155 for the list of Encoder related commands and queries. 3- Keep Watchdog Alive If the controller is in the RS232 mode with the watchdog enabled, then after 1 second of inactivity motors will be stopped if they were one and a “W” character will be sent to the terminal. When this checkbox is checked, Roborun will send a Null character to the controller on a regular basis so that the watchdog time-out is never reached.
Operating the AX2550 over a Wired or Wireless LAN Operating the AX2550 over a Wired or Wireless LAN The Roborun utility supports connection and operation of the AX2550 controller over a Wired or Wireless TCP/IP network. This feature makes it easy to tele-operate and monitor the controller across a lab or across the globe via Internet. To operate over the network, two computers are required, as show in Figure 107 below. The top computer is connected to the controller via its COM port.
Using the Roborun Configuration Utility FIGURE 108. Roboserver screenshot when idle Note that it is not possible to use this configuration to change the controller’s parameters or update the controller’s software. Updating the Controller’s Software The AX2550’s operating software can be easily upgraded after it has left the factory. This feature makes it possible to add new features and enhance existing ones from time to time.
Creating Customized Object Files Notes: The Updating utility will automatically detect whether the new software is intended for the main or encoder’s MCU and program one or the other accordingly. It is a good idea to load the controller’s parameters into the PC and save them to disk prior to updating the software. After the new software in transferred to the controller, you can use the “Load Parameters from Disk” function and transfer them to the controller using the “Save to Controller” button.
Using the Roborun Configuration Utility FIGURE 109. Objectmaker creates controller firmware with custom defaults Creating a custom object file can easily be done using the Objectmaker utility. This short program is automatically installed in the Start menu when installing the Roborun utility. 196 1- Use the Roborun utility to create and save to disk a profile with all the desired parameter value. 2- Launch Objectmaker from the Start menu.
Mechanical Dimensions Mechanical Specifications SECTION 16 This section details the mechanical characteristics of the AX2550 controller. Mechanical Dimensions . The AX2550 is built into a extruded aluminum case which also serves as a heat sink for its electronics. Figure 110 and Figure 111 show drawings of the controller and its mechanical dimensions.
Mechanical Specifications 1.60" (40 mm) Program Set Reset 4.00" (102 mm) 5.50" (140 mm) FIGURE 110. AX2550 front view and dimensions 5.50" (140 mm) 4.00" (101.6 mm) 0.25" (6.3 mm) 3.00" (76.2 mm) 8.00" (203 mm) 7.00" (177.8 mm) 9.00" (228.6 mm) FIGURE 111. AX2550 top view and dimensions Mounting Considerations 198 AX2550 Motor Controller User’s Manual Version 1.9b.
Thermal Considerations Mounting brackets on each end are provided for durable assembly of the controller onto any chassis. Optional shock mount absorbers may be added for use in the most brutal environment. Thermal Considerations The AX2550 is built into a heat-sinking aluminum extrusion. The large fin area on the side of the extrusion ensures sufficient heat dissipation for operation without a fan in most applications.
Mechanical Specifications TABLE 37. AX2550 wire identification and dimensions Wire Gauge Outside Diameter Color Length Power Control or Backup Controller Battery AWG22 0.07” (1.8mm) Yellow 17”(43mm) Controller Battery- AWG22 0.07” (1.8mm) Black 17”(43mm) Weight Controller weight is 3.3 lbs (1500g) 200 AX2550 Motor Controller User’s Manual Version 1.9b.