
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 do
need just let us know.
Use
heat-sink on the Q1 (7805), Q2 does not need it. The ZD1 & ZD2 are options,
you may just use the jumper wire or 0 Ohm resistor instead.
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.
|
|
The MD4 is a basic design of 8031 microcontroller, The design is very similar to the MD-2 board except that this board has the on-board +5V regulator so it does not require a dual voltage power supply to run. . It uses two Allegro UDN2540B ICs as motor drivers. 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.
For your convenient you may download this page in MS word format.
the whole KIT which includes all the
components and PCB for just $20.00 plus
shipping/handling.