|Dec 14, 2005, 04:47 PM|
bipolar stepper control
I have designed a CNC foam cutting machine which is going to be powered by 4 bipolar stepper motors. I will program the steppers on the PC and use the parallel port as an output.
I realise that using a bi-polar stepper requires 2 H-bridge circuits to reverse the current in each coil.
This is the circuit that I have designed so far for each individual coil. It works in the simulation but before I order the components does it look like it will work in reality!?
I have put a motor in the H-bridge just to simulate the reversing of current in the coil
I plan on using a PC power supply for the stepper motors.
|Dec 14, 2005, 06:58 PM|
Maybe I missunderstoord or something but how are you going to control a stepper motor with a H-bridge? Stepper motors are generally atleast 3-phase AC motors and I have never seen anyone use them for something CNC before with out a stepper motor drive for them.
|Dec 14, 2005, 07:50 PM|
New York City, USA
Joined Oct 2003
You can control a bipolar stepper motor with an H-bridge for each coil. Typical bipolar steppers have 4 leads going to 2 coils so you need 2 H-bridges.
You just have to be verrrrrrry careful how you set up the logic circuits to drive the bridges. One combinations of inputs to the logic circuitry can short out the power supply thru the FETs or transistors. It makes for a great magic smoke generator.
|Dec 14, 2005, 08:03 PM|
Joined Nov 2000
There are a few problems with your circuit. It could be made to work, but I would certainly not recommend it. First thing is you will need a diode across the output of each transistor to handle the flyback from the motor coils. Without diodes, the flyback would exceed thousands of volts and destroy your transistors and possibly your computer. Also, to drive 1 amp from the 5ma of the parallel port, you would need really high gain transistors, probably darlingtons. Other than that, if you can write the software to drive the ports in sequence, making sure that you never enable both the top and bottom transistors at the same time, you should be able to get the motors to turn, however, the rpm of the steppers would be very limited by the 5V power supply.
The speed of stepper motors is limited by the inductance of the motor coils, and the driving voltage. The rate at which the current in the coils can change is equal to the applied voltage divided by the inductance of the motor coil. Driving the motors with 5volts like you show, you might get much less than 100rpm out of the steppers. Normally, stepper motors are driven with voltages 8 to 10 times higher than their rated voltage. The drivers use either PWM or series resistors to limit the current. Here is a page with many homebrew stepper drives which would be much better suited to your application, and would also work with many standard CNC programs. http://www.pminmo.com/
|Dec 15, 2005, 01:02 PM|
Thanks for the links. I will probably have to buy something like that eventualy if i am going to get the cnc machine to work!
I have been looking to make a circuit to interface directly with the parrelel port so that I can do the programing on the computer rather than having to use a PIC or a too comlicated circuit.
I will program it so that both top and bottom transistors are never on so the power supply will not short out. However I will fuse the power supply Just in case! I will also fuse every output from the parrelel port which should keep that safe? (I wont be using an onboard parrelel port!!)
The speed of the steppers is not too much of a problem, it doesnt matter if the motor is slow.
However how could I modify the circuit to allow a larger power supply voltage??? I asume as I have the 5v from the parallel port I cant just increase the voltage from the power supply
Here is a link to the motor
I have inserted some diodes as you said?
Thanks for the help
|Dec 15, 2005, 02:58 PM|
Look at the IC L6208. They are a bit pricey(approx $10 a piece), but work fairly well. I designed my stepper driver board using one of these chips for each motor. The spec. sheet for the ic and the application notes will give you enough info to design a basic circuit. I have a seperate adjustable power supply for the Steppers. Logic comes from the parallel port. I am using GFMC software which outputs a step and direction bit for each motor over the parallel port which turns out to be what the L6208 IC needs for input. The IC handles all the step sequencing and what coils and direction each need to be engergised.
I have pictures of my setup on my site.
Look in the gallery section. I have a photo album of my cnc foam cutting machine. I have since upgraded my motors since the pictureswere taken to give me more torque in the horizontal plane.
I have schematics of my setup around somewhere but in PCAD format.
Be careful with the parallel port on your computer. It will only source/sink so much current before you pop fuses (if your lucky) or IC's. Adding say a TTL logic gate to the gate drives of you transistors will help protect you parallel port and allow you to source/sink more current to the gates. You can design the whole gate drive mechanism with logic gates (nands, nots, ands, ors) that would allow you to only give a step and direction bits over the parallel port. The gate drive circuit will have to give the coils on the motor the correct sequence somehow though (correct sequence depends on how you drive the motors, Full, Half, Micro, etc).
Even if you don't want to use the L6208 chips I recommend reading the spec sheet. It will give you lots of info on how steppers are usually hooked up.
|Dec 16, 2005, 12:08 PM|
If obtaining the L6208 is a problem, try the good 'ole combi of L297/L298...
This guy has schematics/PCB layouts for both of them: http://www.otocoup.com/CarteL6208_e.htm
I built 4 L297/L298 boards for a friend, they work perfectly.
As a side bonus, the L297/L6208 use chopper regulation for the motor current, so you can run the motors with as high a voltage as you please (+42V for the L298) and not worry about the current once you've set it.
In fact, with chopper-control IC's, the higher the voltage, the better the motors will perform..
|Dec 17, 2005, 04:48 AM|
Do you know offhand what the requirements of your steppers are? How much current
and at what voltage?
The usual H-bridge driver circuit uses darlington transistors in the output stage to get
enough current gain from the (pitiful) logic inputs. However, a darlington has a significant
(1.2V or so) voltage drop, and if you're driving stepper from a 5V supply with a darlington
on both "top" and "bottom", you're cutting the available voltage to the motor nearly in half!
(not that the 298/etc are darlington drivers as well, so the same problem arises there.)
This is one reason why mosfets are so popular in motor drivers. There are also mosfet
based hbridge chips...
But for a CNC machine, you usually need pretty powerful steppers, which usually means
a higher-than-5V motor supply anyway, which would cause your proposed driver not to
work so well (you have to watch when you have to do voltage level changes as well as
that does pretty much everything else as well. If you blow the parallel port, you blow
that engire chip, and it's time to replace your motherboard. Some kind of protection, or a
sacrificial add-on parallel port card is definately called for if you're going to be playing
a lot with external electronics on the port. (of course, nowdays a new
motherboard might be cheaper than an add-on parallal card. YMMV.)
Here's a voltage-shifting H-bridge from (IIRC) Bob Blick. the actual component
values are for an EL-lamp driver, rather than a motor driver, but the basic
concept should be relevant (you'll need the blocking diodes for a motor, too...)
|Dec 17, 2005, 06:40 AM|
Thanks for the H-bridge circuit. I couldnt find a circuit that allowed me to use a higher voltage from the power supply than the voltage from the parrelel port. The principle of that circuit solves the problem.
The only specifications that I have about the motor are on the website where I will buy the stepper. Rapid online
It is only a small stepper but I have built part of the cnc machine and the force needed to move the wire will be very small. There is very little friction on any of it. The speed the machine will probably cut will mean that the wire wont drag!
REF. blowing the mother board up. I will certainly not use a modern PC to test this on. I will use an old cheap PC, which will probably be cheaper than the add-on parellel card or a new motherboard!
I will fuse everything comming out of the PC, cant think of any other ways of protecting it.
Thanks for your help