Saturday, 10 September 2011

Stepper motor control 2-phase 4-phase

Critical to getting our CNC-based pick-and-place machine working is driving the stepper motors.
We've already managed to get some 4-phase, six-wire motors spinning using a ULN2803A darlington array. But the problem was the current was too great and they started to smell really quickly. Not much longer after that, the magic smoke get let out.

We stripped a Lexmark Z73 printer scanner and salvaged some motors, and even stripped the steppers from old floppy disk drives. So we've no end of stepper motors to play with, but not much luck in getting them turning. The main problem has been that the motors we took from the old hardware and donated stuff off Freecycle are all 4-wire 2-phase/bipolar motors.

We upgraded the original stepper circuit, replacing the ULN2803A with 4 x IRF640 mosfets. The IRF640 chips have built-in fly-back diodes (they're designed for driving inductive loads) so we don't have to worry about any extra external components. The "gate" is isolated and can use logic-level (5V) voltages to switch them on.

This allows beefier stepper motors to be controlled (up to about 16A) but they are set up to drive 6-wire/4 phase/unipolar steppers. We still didn't have a way of driving 4-wire/2 phase bipolar motors correctly.

Until today.
Thanks to Jason at BuildBrighton, we've got a few L293D half-H-bridge chips to play with. And they work perfectly for driving scavenged stepper motors. Here's how we connected each IC to the coils on a bipolar stepper motor.

So now we've got a way of driving both 4-wire, 5-wire and 6-wire stepper motors.
We've got a nice beefy PC power supply to provide the power without having to worry about running more than two motors together (the earlier 500mA phone-charger just wasn't up to the job!) and the stepper driver chips can handle up to 1A per channel (4-wire/biopolar) and a massive 16A or more for six-wire (unipolar) motors.

The trick is to make our driver board(s) compatible with any combination of steppers so that anyone else who wants to make one of these machines can source parts for it cheaply and easily.

At the minute we're trying out a number of different ideas and don't have enough time to devote to developing each idea, AND write it up on the blog with photos/diagrams/full descriptions. So over the next few days, we're going to play about with a few ideas then write up the most successful ones here......