Freewheeling diodes and stepper motor - Page 1
Forum section: electronics / projects

author: poorchava
author_rank: Super Contributor
timestamp: April 29, 2012, 11:34:16 am
content: Hello,I'm currently building a small project, which is a stepper motor driver. Circuit is very simple: consists of 2 current sources based on LM317, low side switches made of TIP122 (+SK26 diode across CE junction). Whole thing is driven from PIC18f2550.This is the rough schematic:Bypoorchavaat 2012-04-28Motor parameters are unknown. It was made by ECM motor company, but I can't find any P/N. As the motor is NEMA 23 size I assumed 0.6A to be safe current level. It's an 8 wire one driven in unipolar fashion.Now the problem:I'm able to get motor to spin. But for some reason there is audible sound coming from PCB (can't say where from exactly). Also when I ass some diodes across motor windings for current recirculation the motors turque decreases ALOT and so does the maximum speed.Why is that? I thought that adding a freewheeling diodes helps recirclate current better and faster so it should actually improve the performance, not diminish it

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 29, 2012, 08:55:04 pm
content: The only thing that I can think of is that it has something to do with driving the steppers from a constant current source rather than a CV source. Off of the top of my head I'm not sure what the freewheeling diodes will do in that case.You might use an appropriate constant voltage source to see if things improve.

author: nctnico
author_rank: Super Contributor
timestamp: April 29, 2012, 09:51:01 pm
content: The freewheeling diodes short the back-EMF. You want to use high voltage transistors so the internal diodes will start to conduct in reverse at low currents. For very high speeds only energize one winding instead of two. BUT... the best way to drive a stepper at high speed is to use a 4 phase bipolar sine wave (from a class-D amplifier). More complicated but adds microstepping as a bonus.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 29, 2012, 10:17:36 pm
content: Technically, in this configuration the freewheeling diodes don't short the stepper coils. Instead it will connect the coils to the source and ground. (The source is typically a voltage source.)A short across the coils would cause the decay to be slower. The decay is sped up by providing the current a low impedance path (through the diodes) from ground to the (voltage) source.In the case of this particular circuit the source is a a current source. This current source likely looks like a very high impedance to the load. I don't know what that does to the decay but I'm pretty sure it doesn't help.

author: free_electron
author_rank: Super Contributor
timestamp: April 29, 2012, 11:20:47 pm
content: power supplies cannot absorb energy. their output impedance while delivering current may be low , but when you feed them current the output impedance goes infinte. simply becasue the transistor in the supply can only conduct one way....As for flyback diodes. when you send current through a coil and interrupt it , it wants to keep flowing IN THE SAME DIRECTION.so the didoes across your transistor do nothing.... they would block the current. the flyback diode needs to be across the coil. the energy stored in the coil now has a path through the diode. this current does not flow back into the supply ! this is a common mistake. the current runs in a circle through diode and coil. if the diode and coil were superconducting the current would run forever. unfortunately the coil has resistance and the diode has forward drop.... so you are actually burning off the stored energy as heat. (I2R in the inductor and Ix0.6 in the diode )if you want to burn off the energy fast you need to add a resistor in series with the diode that has the same resistance as the winding resistance. ( you can do the math and draw power curves if you want. your maximum power dissipation happens when you match the resistance.)now , since you are dealing with a motor... this decay has a side effect that it also produces a mechanical force that will actually slow your motor down. especially if two windings re energized. The motor becomes a transformer ! do not think of the currents through the motor as DC currents... they are actually AC currents when the motor is spinning ( current rises and falls continously... ) since the other winding is energized as well by a changing current you get this transformer effect....you could even saturate the motor core and then the field would collapse ...there is more than meet the eye.motors like stepper motors and BLDC should be driven from H bridges and not from simple single ended drivers with flyback diodes.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 29, 2012, 11:41:13 pm
content: Using diodes like this is common when driving abi-polarstepper. That may be the problem. I assumed that the OP was treating his uni-polar stepper as a bi-polar and driving it with two H-bridges. (And he just showed one of them in the partial schematic.)So... yes, those diodes aren't flyback diodes in the case of a uni-polar driver.This will be perfectly clear if you actually show the stepper coils in the schematic.

author: nctnico
author_rank: Super Contributor
timestamp: April 30, 2012, 11:49:50 am
content: Quote from: TerminalJack505 on April 29, 2012, 10:17:36 pmActually they do when the voltage spike caused by the coils reaches the reverse breakdown voltage. At this (usually high) voltage the current is too low to cause any damage. The worst thing to do is put the freewheeling parallel to the windings. This will short the windings and act as a brake.The problem of the circuit are the schottky diodes. They probably have a low reverse breakdown voltage. Removing those will fix the problems. Driving stepping motors with an unipolar drive won't give the maximum torque from a stepper motor but it is still possible to achieve thousands of steps per second (accelleration en de-accelleration is necessary though).

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 30, 2012, 07:16:42 pm
content: Quote from: nctnico on April 30, 2012, 11:49:50 amYep. My original statement was based on my misreading the poster's circuit. I thought that was an H-bridge driver.I basically thought I was looking at one of these.free_electron, you said something that made me wonder. When this circuit freewheels,where would that current go? I'm guessing, if the designer is lucky, the current goes into some other load that happens to be on the same rail. Are there voltage regulators that can handle current being driven back into them?

author: muvideo
author_rank: Frequent Contributor
timestamp: April 30, 2012, 07:31:17 pm
content: Quote from: TerminalJack505 on April 30, 2012, 07:16:42 pmIn this case the DC_BUS will have capacitors connected on it that act as momentary storage, sometimethe energy involved is high (usually during braking) and is handled in some way, some invertershave internal or external resistors that dissipate the enegy when the rail voltage start climbing.In the case of electric vehicles that energy goes back to the batteriesFabio.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 30, 2012, 07:56:39 pm
content: Quote from: muvideo on April 30, 2012, 07:31:17 pmI see. Thanks for the reply. I guess the lesson is to be aware of what is going to happen so that you can ensure the voltage regulator is protected.It reminds me of a circuit I saw before (which I can't find now) where they used a 2.5V regulator and diodes to clip 5V signals to 3.3V. There was a resistor in series with the signal and on the output (3.3V) side of the signal a diode's cathode was connected. The anode was connected to the 2.5V regulator.It seemed like a clever way to do the clipping but I always wondered where the current went since the 2.5V regulator was solely dedicated to this function and, therefore, had no other load. (The inputs were high-z so they weren't sinking the current.)Sounds like it was just a bad design and why you don't see it more often. I guess theoretically, with an ideal voltage source, it would have been fine.

author: SeanB
author_rank: Super Contributor
timestamp: April 30, 2012, 08:08:42 pm
content: It probably worked because a lot of 2.5V regulators were designed for use in terminating logic signals, or were for 5V opamp circuits, so they could both source and sink current equally well.With inverters you often have to get an external Brake Chopper module, and a resistor sized for the load. When you are driving a motor from an inverter and do either rapid stopping, or have a large inertia in the load the inverter can trip off on overvoltage without the brake resistor to dissipate the excess power. If you have a few drives, you can connect the DC bus wires together, with a single chopper rated for the largest load. Then the braking energy is used by the other motors. For this they all have to be fed via the same power source, and all the AC inputs have to be wired in parallel as well, preferably with a line reactor as well.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 30, 2012, 09:00:59 pm
content: Quote from: SeanB on April 30, 2012, 08:08:42 pmThat's good information. Thanks.Sorry to sidetrack this thread. Anyway, the OP doesn't seem to be around to participate in the discussion he started.