Product Documentation
MD25 - Dual 12Volt 2.8Amp H Bridge Motor Drive
Serial mode documentation
(click here for I2C mode)
Automatic Speed regulation
By using feedback from the encoders the MD25 is able to dynamically increase power as required. If the required speed is not being
achieved, the MD25 will increase power to the motors until it reaches the desired rate or the motors reach there maximum
output. Speed regulation can be turned off with the use of the REGULATOR DISABLE command..
Automatic Motor Timeout
The MD25 will automatically stop the motors if there is no I2C communications within 2 seconds. This is to prevent your robot
running wild if the controller fails. The feature can be turned off with the DISABLE TIMEOUT command
Controlling the MD25
The MD25 is designed to operate with a TTL level serial bus (5v levels). Do not connect to RS232 directly, if you wish to connect to
RS232 it must be with the aid of a voltage level converter such as a ST232 or serial interface such as S13 which is available here:
www.robot-electronics.co.uk/acatalog/Serial_Interface.html
Commands
An easy to use command set provides all of the functions that the MD25 has to offer. The commands are sent with a sync byte of 0
at the start and then the command followed by any data bytes. The MD25 will then respond if the command is applicable.
command Name
Bytes sent to
MD25
Bytes
returned by
MD25
Description
0x21 GET SPEED 1 2 1 returns the current requested speed of motor 1
0x22 GET SPEED 2 2 1 returns the current requested speed of motor 2
0x23 GET ENCODER 1 2 4 motor 1 encoder count, 4 bytes returned high byte first (signed)
0x24 GET ENCODER 2 2 4 motor 2 encoder count, 4 bytes returned high byte first (signed)
0x25 GET ENCODERS 2 8 returns 8 bytes - encoder1 count, encoder2 count
0x26 GET VOLTS 2 1 returns the input battery voltage level
0x27 GET CURRENT 1 2 1 returns the current drawn by motor 1
0x28 GET CURRENT 2 2 1 returns the current drawn by motor 1
0x29 GET VERSION 2 1 returns the MD25 software version
0x2A GET ACCELERATION 2 1 returns the current acceleration level
0x2B GET MODE 2 1 returns the currently selected mode
0x2C GET VI 2 3 returns battery volts, motor1 current and then motor2 current
0x31 SET SPEED 1 3 0 set new speed1
0x32 SET SPEED 2 / TURN 3 0 set new speed2 or turn
0x33 SET ACCELERATION 3 0 set new acceleration
0x34 SET MODE 3 0 set the mode
0x35 RESET ENCODERS 2 0 zero both of the encoder counts
0x36 DISABLE REGULATOR 2 0 power output not changed by encoder feedback
0x37 ENABLE REGULATOR 2 0 power output is regulated by encoder feedback
0x38 DISABLE TIMEOUT 2 0 MD25 will continuously output with no regular commands
0x39 ENABLE TIMEOUT 2 0 MD25 output will stop after 2 seconds without communication
For example to read the battery voltage, send:
0x00 - sync byte
0x26 - READ VOLTS command
and the MD25 would respond with
0x77 - returned byte (119 decimal) 11.9v
Speed1
Depending on what mode you are in, this register can affect the speed of one motor or both motors. If you are in mode 0 or 1 it will
MD25 Serial Documentation http://www.robot-electronics.co.uk/htm/md25ser.htm
1 of 3 2013-05-31 10:27