Building the 3Step stepper controller
Get out your soldering iron....
The idea is that if you're going to build this controller you're probably happy with strip board or vero board construction, and know one end of a resistor from the other.
In the Gallery you'll find some photos of my prototype, with some comments which might be of some help. In the files area you'll find the schematics, bill of materials and source code for the PIC16f870 processor.
As mentioned in the specs page there are two versions, the basic and the full version. The files are labeled as being for the full or basic version in the files section, if they are not labeled you can assume they apply to both.
Power Supply
I used a ATX computer power supply for my unit, using the 5V rail for the logic, and the 12V rail for the stepper supply. Read the information below about power resistors, do the maths, and pick a power supply. To use an ATX power supply you need to short two pins on the power supply connector to get it to stay permanently on, google will help with that process.
If you're going to use an ATX power supply for your stepper supply you need to add an additionally decoupling capactior on the rail you use for the steppers. About 470uf per amp of maximum current.
Therefore, for a set of three 2A steppers you're looking at 3x2x2= 12 Amps maximum, giving about 5600uf. This is because ATX switchmodes are not designed for the pulsing loads placed on them by a stepper controller, and the can start to oscillate if not provided with the extra decoupling.
Power resistors
One thing that makes this design simple is the lack of current limit circuit, instead it uses power resistors. The down side of this simplicity is that it is very inefficient. You'll see from my picture in the gallery of the resistor bank in my unit that the resistors are large, and they get hot, that fan is not there just for good looks.
There is a great deal of theory that I could insert here about stepper motors, and using a higher voltage rail than the spec on the steppers, but other people have already done that for me at great length, google 'stepper motor theory' and plan on reading for a few hours.
In a nutshell: more Voltage = more Speed = (lots) more Heat. The higher the supply rail voltage you use, the faster you can step, and the more heat will be dissipated in the power resistors.
If you are going to use the 12V rail on an ATX power supply as I did, and your steppers are rated at 2 Amps at 3 Volts (for example) you need to pick the power resistor value that will give you 2Amps through each coil.
The power resistor value can be obtained from the simple formula:
(Vsupply - Vmotor) / I
Where:
Vsupply = Power supply voltage
Vmotor = Motor voltage rating
I = Motor current rating
In our example we get 4.5 Ohms. These resistors are going to get hot, so you need to calculate the power rating of them as well, which can be obtained from the simple formula:
P=I2 x R
Where:
P = Power rating in watts
I = Current in Amps
R = Resistance in Ohms
Giving a result of 18 Watts in our example. Erring on the side of caution, choose the nearest value higher you can achieve from standard resistor values.
In this example a 20W 5 Ohm resistor is appropriate. Working backwards through those formula give us a resultant current of 1.85A when using a 5 Ohm resistor, and 17W of heat dissipated when things are on.
Think about this for a moment. There are six power resistors required for this design, and if you're using half-stepping and all three steppers stop on a 'half' step and remain motionless for any period of time you will have 102 Watts of heat being dissipated by the resistors. Take another look at the photo in the galley of the fan right beside my power resistors.
The power resistors will get hot!. This is the major compromise in building a stepper motor controller this way. It's very simplistic, but very inefficient, particularly when the steppers are not in motion.
Vero / Strip board hints.
Even though I said you should already be familiar with strip board or vero board construction, here's some tips for building the 3Step controller.
The common 0V rail for the mosfets will have to carry a fair bit of current, beef up this strip with solder or 20A fuse wire. I use solder myself, as it's fun pushing wads of molten metal around with the soldering iron!
One of the monocaps (C4 / C6) should be placed as close as possible to the processor pins 19 and 20. The other one should be close-ish to one of the 74HC14N's.
The 10uf cap (C8) in the spindle circuit should be as close to D4/Q13 as possible, it is there to help clamp 'glitches' from the relay turning off, which might annoy the processor, or generate false steps.
Check, check, then double check that you have no shorts before you attach power to the circuit, particularly if you are using the PC power supply for your initial testing. If you have access to a current limited bench supply, use that for your testing, or put a 1 Ohm 5Watt resistor in series with the power supply to do your initial testing.
X1, the ceramic resonator should be as close as possible to the processor, and the strips it is soldered to should be trimmed close to the resonator.