Data Sheet
Status register
Bit 7 (msb) 6 5 4 3 2 1 Bit 0 (lsb)
Busy - - - -
over-temperature
limiter
over-current
limiter
Acceleration
in progress
Bit 0 is read as high when the drive is accelerating the motor. It will be cleared when the requested
speed is achieved or the over current or over temperature limiters are active.
Bit 1 set high indicates that the current through the motor has reached 20Amps and is being limited to
that value, the red LED will be illuminated when this happens.
Bit 2 set high indicates that the over temperature limiter is active. Above a preset threshold, the motor
current will be reduced in proportion to the MD04 temperature. The module can still be used but the
motor power will be limited, the red LED will be illuminated when this happens. It should be noted that
a few minutes of running continuously at 20A will cause the heatsink to get hot - watch your fingers!
Bit 7 is the busy flag. It is set high when you issue a new command to the module. It is cleared very
quickly and you are unlikely ever to see it set.
Speed register
Sets the maximum speed that the motor will accelerate to. It is actually the 8-bit value sent to the
modules PWM controller. Write a value of 0 to 243 (numbers from 243 to 255 are clamped to 243) .
The larger the number, the more power is applied to the motor.
Acceleration register
This sets the rate at which the motor accelerates or decelerates from where it is towards the new speed
set by the speed register. Write a value of 0 to 255, the larger the number the longer the module will
take to reach the new speed. Writing zero to the acceleration register will allow maximum acceleration
of 0 to full in 0.187 seconds. This value actually controls a timer which steps the current motor speed
towards the requested motor speed. It does this every (((acceleration register)*125)+768)uS. A value of
zero gives 768uS/step or 243*768=186624uS (0.187s) to accelerate from 0 to full. A value of 255 is
((255*125)+768)*243=7932249uS or just under 8 seconds.
Temperature register
Register gives a reading of the current surface temperature of the PCB in degrees centigrade.
Motor current
This is the value used internally to limit the motor current to 20A. You do not need to read or do
anything with it. The value is proportional to motor current, with a value of 186 representing the 20A
limit.
Software revision number
The revision number of the software in the modules PIC controller.
© Devantech Ltd 12/07/15 MD04 documentation 5/8