Is the power supply big enough?
big_mark
Posts: 49
Hi
I want to use my Propellor dev. board to drive a bipolar stepper motor. I'm going to use an L293D motor driver and some simple logic to drive it in full step mode to start with (circuit on page 8 here, not sure why it needs two NOT gates on each input though : focus.ti.com/lit/ds/symlink/l293.pdf ). Since the chip runs on 5 volts and is TTL compatible I am assuming after reading the sticky that the Propellor can drive it ok?
The motor I am using is only rated at 4.25 volts, 0.425A per coil. First of all, will driving it at 5 volts do any damage (it must be driven at 5 volts as the motor power supply cannot be lower than the logic power supply)? Is the 5 volt supply on the dev. board able to deliver that much current? And is it a good idea to run the logic and motor from the same power supply? I only intend to use my dev. board to prototype my control software and hardware and will be building my own circuit when testing is complete, so finding space for additional components won't be a problem.
Thanks
I want to use my Propellor dev. board to drive a bipolar stepper motor. I'm going to use an L293D motor driver and some simple logic to drive it in full step mode to start with (circuit on page 8 here, not sure why it needs two NOT gates on each input though : focus.ti.com/lit/ds/symlink/l293.pdf ). Since the chip runs on 5 volts and is TTL compatible I am assuming after reading the sticky that the Propellor can drive it ok?
The motor I am using is only rated at 4.25 volts, 0.425A per coil. First of all, will driving it at 5 volts do any damage (it must be driven at 5 volts as the motor power supply cannot be lower than the logic power supply)? Is the 5 volt supply on the dev. board able to deliver that much current? And is it a good idea to run the logic and motor from the same power supply? I only intend to use my dev. board to prototype my control software and hardware and will be building my own circuit when testing is complete, so finding space for additional components won't be a problem.
Thanks
Comments
What is is not saying is that no voltages higher than 4.25v can be used in fact steppers are very often driven at much higher voltages(up to 20X) to get more speed. HOWEVER if running at higher than the rated voltage the current should be limited. This is often done with PWM or in some cases resisters.
So to answer the question more directly, if you drive the motor at 5v it will draw more than the rated current which is bad for the motor. What's more that is 0.425A per phase so the total load on the supply will be 0.85A. I think the regulator is fine with that, I'm not sure about the wallwart.
Graham
Graham is right though when he says that steppers are usually powered from a much high supply voltage and usually pulse-width modulated. My advice would be to run it off an unregulated DC supply in the 12 to 24V range that can handle the high-current peaks and to tie the ground of the logic back to the motor supply ground. That really depends on the wiring but you want to avoid "ground bounce" etc.
The 293 has a minimum high-level input threshold of 2.3V so it is quite ok to drive it from the propeller directly. The four inverter gates that are shown on page 7 of the datasheet are really there to allow the 293 to be driven with 2 inputs rather than 4. Of course it would only need 2 inverters anyway but there is no problem in driving all 4 inputs directly without inverters. It isn't all that hard if you are doing PWM to do half-step or even micro-step if you want, the propeller is more than up to it.
BTW, my experience with TI brand 293's was that they just do not handle inital peak currents as well as some other brands even though the spec sheet looks good (smoke).
*Peter*
Really? I'll add this to the things I wish I'd known earlier! And there was me getting worried about supplying an extra 0.75 volts. Doh!! I've been looking at chips to drive my motors, but rejected most of them because they specified a minimum motor supply voltage of 10 volts.
I am using the L293D which has diodes built in. Won't they send any harmful back-emf to ground?
I am planning on building a DMX-controlled two-axis moving-mirror for use in the theatre where I work. My setup will be powered by a dmx/power distribution unit which we already own. It sends out DMX and 48 volts DC, so the propellor, logic chips, and motors will all get their power from the same place. Obviously each part will need its own regulator to step the voltage down, but they will all be sharing the same ground. Also, since I'm using bipolar motors, the only motor-ground is whatever comes off the L293D. What do you mean by "ground-bounce"?
I'm actually using the L293D from ST Microelectronics (www.st.com/stonline/products/literature/ds/1330.pdf). Its functionally the same as the TI part, but ST's spec sheet did not include a circuit diagram.
Many thanks
The back EMF diodes don't protect you from a power supply "sag". Most power supplies don't respond that quickly to sudden high current loads and their output voltage will drop for a short time until the regulator can adjust. There's a lot of "room" to sag from a 48V power supply, so, as long as you have separate regulators for the logic and motors, you should be fine. I assume that, with the high voltage drop (48 to 5), you're using switching regulators. If not, most of that voltage drop will go up in heat ... not good for the regulators.
How will this be possible if I only have one ground for everything? (DMX, Propellor power, logic power, motor power, etc) Also the L293D chip has 4 ground pins, which I assume are all connected to each other. How do I separate logic and motor ground if they are connected internally? Do you mean that I should use some sort of star-grounding setup where logic grounds go to one point, motor grounds go to another, and both points get connected to the power supply ground? This setup is often used in diy audio amplifiers.
Will a capacitor between ground and the regulator output go some way to compensate for this voltage sag? If so, how big does it need to be? Failing that, can regulators be connected in parallel to boost current output?
I haven't actually got that far in the design yet. I am just in the process of getting the software written and the motors spinning, but if switching regulators are what I need then that is what I will get.
Once again, many thanks for the advice.
Mark
You will definitely need to use switching regulators because of the high voltage drop. Say you really do run the motor off 5V and it draws 4A. Peak draw will be higher, but lets just look at the average current. You need to dissipate 43V x 4A = 172W. Even if you run the motor off 24V and use PWM (pulse width modulation) to keep the average current to 4A, you're still dissipating 24V x 4A = 92W in heat in the voltage regulator. A switching regulator gets around this, but still has the problem of response time. With most modern high speed (100KHz+) switching regulators, there'll be a couple of cycle lag, but with a motor that shouldn't be much of a problem.
When computing the motor voltage supply (assuming you won't be doing any current regulation), be sure to consider the drive transistors' saturation voltage at the chosen current. For ST's L293, this is about 1V at 0.5A for each transistor, or 2V total. (The L293D's datasheet doesn't show a saturation curve, but it's probably the same.) So to get the 4.25V you need for each motor, you'll have to have closer to 6V for the supply. The high saturation voltage also means these chips will dissipate about 2W (2V * 0.5A * 2 sections) of power. That's a lot for a 0.3" DIP, so a good heatsink will be mandatory.
If you want to use a higher voltage with PWM current regulation, use the L293E. This device brings the drive transistor ground connections out separately, so you can attach a current sense resistor. This will not only give you faster response, but will also facilitate more precise microstepping than a simple PWM on the enable inputs can. (Microstepping may be necessary in your app, since discrete steps will get magnified between the mirror and the stage. If you want smooth motion, microstepping would be the way to go.) Of course, this adds a bit of complication to the circuitry, as the L293E datasheet suggests.
But I wonder if all this might be overkill for your app. You didn't say how big your mirror is. But a couple hobby servos would have plenty of torque for driving a small mirror. Plus you don't have to worry about position feedback, since that's built in to the servo. Just a thought...
-Phil
At these high voltages the peak currents can be very high if you do not PWM at a high enough frequency. When voltage is applied to an inductor the current lags behind the voltage which in simple terms means that initially it does not draw any current and over a short period of time the current will increase to a point which matches the DC resistance. If you applied 24V to the coil without PWM then you would have I = V/R = 24/10 = 2.4A flowing within milliseconds or less and eventually cooking the coil (don't do it). If you are worried about this then you can place a polyfuse or some suitable current limiter (even a lamp) in the supply lines to protect the motor while you are doing your testing. However, seeing this is all new to you I would suggest working with a low-voltage initially until you get it fairly right. Using a higher supply later allows more torque at faster stepping speeds etc.
Ground problems are things to watch out for when mixing logic and power devices. The ground or common is not a perfect conductor and exhibits some resistance and inductance. At low freqencies and low currents you will probably never know about it but it's there and it certainly shows up while switching high-current loads. But to try and explain even 1% would take too long and it would be more beneficial if you look-up the relevant info yourself or just stumble about and make a few mistakes. The latter method tends to make a deeper and more lasting impression and besides, making mistakes is definitely part of the learning process, just ask me [noparse]:)[/noparse]
*Peter*
I'm hoping that micro stepping won't be necessary, at least to begin with. The motors I've got do 400 steps per revolution in full-step mode, and 800 in half-step mode! My mirror will be panning 115.2 degrees (256 steps * 0.45 degrees per step). and tilting 57.6 degrees (128 steps * 0.45 degrees per step). It only needs to tilt that far because 1 degree of mirror tilt equals 2 degrees of beam movement. When I've finished building it I'll post some pictures, but until then here's where I got my inspiration from : www.rosco.com/us/lightingequipment/icue.asp
If I do need to use microstepping to smooth things out, I'll most likely use one of the chips from Allegro. They do microstepping, PWM current control, and they even have a translator built in. All I'll need to give them is a direction and step and they do all the hard work for me. This one seems most promising : www.allegromicro.com/sf/3987/ The only downside is I'll need to learn to solder surface mount components first!
Absolutely! Thats the main reason I'm doing this. I mean, I could have gone out and spent less on buying a couple of the iCue systems mentioned above than I will do building my own version, but I would not be learning nearly as much. I see this whole process as being as much about learning more about electronics and software as it is about producing a working moving mirror. I've already learned quite a bit about serial comms from my earlier thread about my DMX software, and all the information in this thread has been extremely helpful as well. Many thanks to you all.
Once all the hardware and software is complete, I will be posting all the source code and circuit diagrams here in the hope that some of you find it useful for your own projects. I feel it would be unfair to all of you who have so willingly given me help and advice if I didn't, and more than a little ungrateful.
Mark