Home Feedback Projects Search Links WZmart Store

[Under Construction]


Order Info
WZmart Store









MD-4 8031 Microcontroller Stepper motor driver kit

For additional information and resources on stepper motor drivers see the Links below...

Click image to enlarge

The MD4 is a stepper motor driver design utilizing the 80C31 microcontroller. The design is very similar to the MD-2 stepper motor driver board except that this board has an on-board +5V regulator so it does not require a dual voltage power supply to run. It uses two Allegro UDN2540B ICs to driver the stepper motors. The U1 is 8031AH microcontroller which can be replaced with any 80C32,87C51,87C52 or flash base microcontroller 89C51,89C52 families.

The port P1.0~P1.7 generate the step sequences to drive the stepper motors with U2 and U3 (UDN2540B). The port P3.4 and P3.5 enable/disable the power supply to the motors. You may wonder why does the design use Q2 & Q3 to turn on/off the power to the J2 motor instead of the using the enable pin on U2? Well, in some applications which require the motor to lift a heavy load, if  the simple belts drive or gears drive system is used, then when the motor is stopped, The holding torque of the motor alone may not able to hold the load in place. Of course using the worm gear or lead screw can easy solve the problem but they are not cost effective. If we apply some low voltage to the motor after it stop, that enough to lock the motor in place without overheat the motor, this way will increases the holding torque and serves the same purpose without adding cost to the whole system. 
When Q2 is cut off,  there's still some voltages apply to the motor winding thru R9. You may need to change the R9 value depending on the motor winding resistance. The R9 is omitted if there is no need to increase the motor holding torque.

In our EPROM sample code, we configured the J4 as input ports for controlling the two motors. Their functions are as follows:
                 J4-Pin1-------- Motor0 enable
                 J4-Pin4-------- Motor0 direction
                 J4-Pin6-------- Motor1 enable
                 J4-Pin8-------- Motor1 direction 
Shorting the pin1 to ground (pin2) will turn on the Motor0 in one direction,  with the Pin4 shorts to ground first then Pin1, the Motor0 will rotate in opposite direction. Same functions are on Pin6 and Pin8 for Motor1. Jumper J6 and J7 are not used in our sample code, but you may change the program so that with the different jumper setting on J6 & J7, the motor will run at different speed.

You can download the Intel hex code and the source file here. We offer the MD4 as a kit so you can build it yourself and customize it as needed.

Assembling the board should be very simple and straightforward. Make sure you use the IC sockets for U1 and U5. We hope that we don't need to show you how to identify the resistor or capacitor value, IC and diode orientation etc. but if you are beginner in electronics and need our help then just let us know.
A heatsink for the Q1 (7805) is required, Q2 is not needed. The ZD1 & ZD2 are options, you may just use the jumper wire or 0 Ohm resistor instead. The locking tab of the 6pin and 9pin headers for J2,J3 and J4 are facing the outside edge of the board. If you look at the solder side of the PC board, the square pad is pin1. Make sure you put the shunt on J5. The finishing board should look similar to this picture.






The motors are connected to J2 and J3. Incorrect motor winding connections may damage the driver chip, see the picture below for proper motor connections.

                     Figure 2  Stepper Motor connections


For your convenient you may download this page in MS word format.

The KIT which includes all the components and PCB for just $20.00 plus shipping/handling.


Back to Projects Page

View other projects:


Motor Driver Boards  | Z80 Boards  | Motor Integrated Circuits  | Passive components | Miscellaneous | RF transmitter/Receiver | CCD Camera / Module

www.wzmicro.com @1990 8031 stepper motor controllers source


Send mail to info@wzmicro.com with questions or comments about this web site.                                                                  Bookmark and Share