Product Documentation

MD25 - Dual 12Volt 2.8Amp H Bridge Motor Drive
I2C mode documentation
(Click here for Serial 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 in the command register.
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, if not required. See the command register.
Controlling the MD25
The MD25 is designed to operate in a standard I2C bus system on addresses from 0xB0 to 0xBE (last bit of address is read/write bit,
so even numbers only), with its default address being 0xB0. This is easily changed by removing the Address Jumper or in the
software see Changing the I2C Bus Address.
I2C mode allows the MD25 to be connected to popular controllers such as the PICAXE, OOPic and BS2p, and a wide range of
micro-controllers like PIC's, AVR's, 8051's etc.
I2C communication protocol with the MD25 module is the same as popular EPROM's such as the 24C04. To read one or more of
the MD25 registers, first send a start bit, the module address (0XB0 for example) with the read/write bit low, then the register
number you wish to read. This is followed by a repeated start and the module address again with the read/write bit high (0XB1 in
this example). You are now able to read one or more registers. The MD25 has 17 registers numbered 0 to 16 as follows;
Register Name Read/Write Description
0 Speed1 R/W Motor1 speed (mode 0,1) or speed (mode 2,3)
1 Speed2/Turn R/W Motor2 speed (mode 0,1) or turn (mode 2,3)
2 Enc1a Read only Encoder 1 position, 1st byte (highest), capture count when read
3 Enc1b Read only Encoder 1 position, 2nd byte
4 Enc1c Read only Encoder 1 position, 3rd byte
5 Enc1d Read only Encoder 1 position, 4th (lowest byte)
6 Enc2a Read only Encoder 2 position, 1st byte (highest), capture count when read
7 Enc2b Read only Encoder 2 position, 2nd byte
8 Enc2c Read only Encoder 2 position, 3rd byte
9 Enc2d Read only Encoder 2 position, 4th byte (lowest byte)
10 Battery volts Read only The supply battery voltage
11 Motor 1 current Read only The current through motor 1
12 Motor 2 current Read only The current through motor 2
13 Software Revision Read only Software Revision Number
14 Acceleration rate R/W Optional Acceleration register
15 Mode R/W Mode of operation (see below)
16 Command R/W Used for reset of encoder counts and module address changes
Speed1 Register
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
set the speed and direction of motor 1. The larger the number written to this register, the more power is applied to the motor. A mode
of 2 or 3 will control the speed and direction of both motors (subject to effect of turn register).
Speed2/Turn Register
When in mode 0 or 1 this register operates the speed and direction of motor 2. When in mode 2 or 3 Speed2 becomes a Turn register,
and any value in this register is combined with the contents of Speed1 to steer the device (see below).
Turn mode
MD23 Technical Documentation http://www.robot-electronics.co.uk/htm/md25i2c.htm
1 of 3 2013-05-31 10:26

Summary of content (3 pages)