So it's time to drive the motors. And here I've put together a circuit that I think is the absolute cheapest and easiest way to control stepper motors with step and direction signals. It works with many of the free or low cost softwares that produce step and direction signals through the parallel printer port. I'll explain how it works but for those of you who just want to get on with it... The_Next_Step
But I would suggest for those of you who are unfamiliar with circuits to do it on a bread board (see pictures). This way you can easly correct any mistakes and try different things.
This schematic is just to control one motor so for the milling machine you need 3 of these circuits and 3 motors.
From Left to right and top to bottom. I try to draw schematics so that positive voltages are toward the top and ground or negative volge is toward the bottom. Inputs are to the left and outputs to the right. Fist off the voltage that you are going to use to run the motor needs to be stepped down and regulated for the logic chips. I used a 6.2 volt Zener to do this because it's low enought for the logic chips to receive the signals from your printer port and high enough for the outputs to drive many of the standard power FETs, so you may not have to use logic FETs like the schematic shows. So the resistor R1 drops the voltage, the Zener diode regulates it to 6.2 volts and the capacitor C1 filters out any noise from the motor, and this voltage powers the two IC's.
The first IC (CD4516) is called an up/down counter. One signal from the printer port will tell the counter if it will count up or down and the other signal, called step, will increment or decrement the counter by one count. Now were only going to use two outputs from the counter Q1 and Q2. With this binary counting method there are only 4 combinations of output from the counter: 00, 01, 10, and 11. These lines are fed to the A and B inputs of the other IC (CD4028) which decodes these combinations to 4 seprate outputs.
I did a trick here using the C input to work as an Enable input. If the Enable(optional) is connected to the parallel port and the computor tells it to shut off all of the outputs to the FETs will go low(Off). So the four outputs of the decoder drive the FET transistors and the FETs drive the four poles of the motor.
Now everybody wants to know what the light bulb is for. Its not so much whether you use a bulb or a resistor, its that a bulb comes with a socket. You can get these wedge base light bulbs from 1 watt to 20 watts. Start with may be a 4 watt bulb and if you find you need a little more beef you just pull it out and put in a 10 watt bulb. It's really handy. And I found it's good to have some voltage drop there as kind of a ballast for the motor windings. The diodes catch some of the current that comes out of the motor each time the FET transistors turn off. The diode feeds this current back to the supply.
When you get the circuit up and running find a power supply that puts out more voltage than you really need and then change out light bulbs till you get it running smoothly. Some of my stepper motors are 5 or 6 volt and some are 12 volt but it all works out.
Step 1: The Circuit Board of Appeals
On the left side are places for the lamp sockets. You need to look over the schematic to see where some of the parts go but it's all there.
- C:\Documents and Settings\Tom\Desktop\StepCheap3DBOT.pdf
Step 2: Circuit Cloning
Any way look over the schematic and place the parts accordingly. I added a few capacitors along the power lines just for general principals. There were so few traces on the top side of the board I didn't bother milling it. I just used jumper wires. See the pictures below of the populated board. All the little FETs ligned up like marching soldiers.
Step 3: Photo Etching a Driver Board
If you want to go easy Just do the Bottom Copper. There's not that much on the top and you can just solder jumpers where you need to.
Step 4: TESTING..1..2..3
For power I like to use one if these universal power adapters with selectable voltage output. They're cheap and they don't put out a lot of current so if something goes wrong it's less likely to damage your circuit. Set the voltage low and see if you have some vlotage on the power pins(16) of the CD4516 and the CD4028. If you don't have a volt meter just take an LED and tie a 10K(BRN,BLK,ORN) resistor to the positive(the long leg) and wire to ground tied to the negative(the short leg). Now you can use this as a probe to see where you have voltage. It will be very dim but we don't want to draw too much current away from the circuit.
Now go into the computer program and find the Setup Table. Set the steps per inch to 1000. Then open the CNC control and set the single step for .001 inch and activate the single step mode. Now each time you click the yellow arrows (up and down for the Y axis) the computor will output one pulse to the stepper motor driver circuit.
Put your LED probe on pin 10 of the CD4516. This is the up down input. When you click the up arrow the input will be low(LED off) and when you click the down arrow the input will be high(LED on). Pin 15 is the step input you will see a very short blink each time you click a n up or down arrow on this pin. Pin 6 is the Q1 output. It will change state(high/low) each time you click an arrow. And Pin 11 is the Q2 output. It will change state every other time you click an arrow.
On the output side of things we should see some activity on the CD4028 chip. Putting your probe on any of the output pins 1,4,6,or 7. These outputs drive the FETs. You should see the output go high every 4th time you click the up or down arrow.
If this all makes sense so far it's time to get the motor running. The common wire or wires of the motor which are the center tap of the windings should be connected to the light bulb. The other four wires should go to the four FETs on the circuit. If you are really lucky you will get the combination just right in the first couple of trys. Other wise just keep switching the wires arround until the motor steps in the same direction each time you click the arrows.
Watch the video in the next step. It may give you a better idea what to do.
Step 5: Let's Watch It on TV