Speed control of DC motor using propeller
4Alex
Posts: 119
Good morning everybody,
I am looking at controlling the speed of a small 24VDC motor. RPM (no load) is 5'600. Under max load, the motor seems to stay between 1.2A and just shy of 2A peak. I have a question that I'd be really grateful if someone could answer:
Currently, I vary the speed of the motor using a manual rheostat. Quite inefficient but it works. I would like to replace it (and the human in the loop as well) with an electronic circuit, where the propeller would control directly the speed under a program. I intend to use Hall sensor as feedback and PID as constant speed control.
I've found the following (www.solorb.com/elect/solarcirc/pwm1/) PWM circuit that seems applicable but the PWM setting is still manual. How could a replace the manual portion generating the PWM signal in order to use PWM generated by the propeller is what I'm looking for. Could anyone suggest a proper circuit or at least point me in the general direction of an appropriate IC ?
Thank you so much for any assistance answering this question.
Cheers,
Alex
I am looking at controlling the speed of a small 24VDC motor. RPM (no load) is 5'600. Under max load, the motor seems to stay between 1.2A and just shy of 2A peak. I have a question that I'd be really grateful if someone could answer:
Currently, I vary the speed of the motor using a manual rheostat. Quite inefficient but it works. I would like to replace it (and the human in the loop as well) with an electronic circuit, where the propeller would control directly the speed under a program. I intend to use Hall sensor as feedback and PID as constant speed control.
I've found the following (www.solorb.com/elect/solarcirc/pwm1/) PWM circuit that seems applicable but the PWM setting is still manual. How could a replace the manual portion generating the PWM signal in order to use PWM generated by the propeller is what I'm looking for. Could anyone suggest a proper circuit or at least point me in the general direction of an appropriate IC ?
Thank you so much for any assistance answering this question.
Cheers,
Alex
Comments
This means you can feed the PWM-signal into the base of a transistor and the transistor drives the FET Q1 in the circuit from your link.
So all the circuitry U1a, U1b, U1c, U1d is obsolet.
There are several pwm-objects in the propeller object-exchange that create PWM-signals on any IO-Pin you like
Frequency is adjustable
Do a search with keyword pwm in the obex
best regards
Stefan
If you are not as much into circuits, you can look at some of the higher level motor drivers that Parallax or Pololu sells. The Propeller would talk serial or PWM depending on which product you buy.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
Thank you for your reply. Yes the PWM portion (U1) of the circuit is replaced by the propeller. My question was more as to how interface the propeller to Q1 (I'll use N-MOSFET IRFZ34N) at 24V: do I need an opto-isolator, what voltage is required to drive Q1, etc. Following your suggestion of using a transistor, do I need to drive the base of Q1 at 24VDC ? If so, can a PNP transistor be connected to 24VDC and the base of Q1 (acting as the 'load') okay ? Or is it better to use a cascade ON-OFF switch such as propeller drives a NPN 2N2222 which drives a PNP 2N3906 connected to 24VDC and the load ? I just want to make sure I'm not destroying anything...
Cheers,
Alex
Thanks for the suggestion but the motor does not need to run in reverse, so the H-bridge is unnecessary. My real concern is rather to not burn the propeller i/o...
Cheers,
Alex
H-bridges allow more than just forward/reverse... depending on how you pwm it, the reverse direction can be used as a brake. Much like how one pwms more to speed up, pwm in the opposite direction to do a controlled slow down(not just a coast)
Not sure if you would need that.
Also many h-bridge packages have all kinds of overtemp/overcurrent protection circuitry, and also diodes to prevent any inductance from doing funny things to your h-bridge(mosfets)
h-bridges are really cheap and your need for only 2amps... you can find surface mount h-bridges.
24bux will save you some time.
http://www.robotshop.ca/solutions-cubed-simple-hbridge-4.html
http://www.solutions-cubed.com/solutions cubed/MMB2003.htm <-- this one has a serial interface, no direct pwm, you just tell it basic commands.
I haven't tested it's limit, but I use it quite often at over 5KHz, and at all kinds of PWM ratios. There is a little bit of time required to switch states, but I would imagine for a motor it is not a big issue. I use the IRF7307PbF MOSFET, but there are plenty of other N/P-type combination out there. You could use IRF7343PbF, it could drive the motors at up to 3.4A (continuous) and 55V.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
@Bobb: Thank you for your circuit & recommendations. Just to clarify:
1. Power supply above C1 would be 24VDC in my case ?
2. Which values do you use for C1 and C2 (my environment could be noisy enough to justify caps) ?
3. I presume one terminal of the motor connects at G1 (the circle icon near C2, not MOSFET G1) and the other terminal goes
to ground. Is this correct ?
4. I saw the use of a snubbing diode in a lot of other circuits uusing MOSFETs. Should I consider adding one in your design ?
Thanks for your help.
Cheers,
Alex
2) If you put them: the larger the better. Most likely you won't need them, though. C1 will put less spiking load on the power supply (could be important on battery supplies -- a few thousand µF wouldn't hurt). C2 will just smooth the output. With electric motors it won't make much of a difference. It could quell some flyback from the motors. For smoothing at 2A you will need a fairly large electrolytic capacitor, but for flyback noise, large ceramic capacitors are usually better (put both if you really care, the more the merrier).
3) Correct, I forgot to change that symbol when I copied the image over.
4) That is always a good idea. A schottky diode (a volt or so higher than the maximum input voltage) parallel to C2 or a rectifying diode between the MOSFET and C2 (after the MOSFET) should prevent any potential problems.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
Thank you so much. I'll skip the caps then as I'm connected directly to the front end power supply (AC to 24VDC). The electronics are fed through smaller power supplies. I'll use a 25V 3A DIODE SCHOTTKY 25V 3A STmicro STPS3L25S.
Cheers,
Alex
Very nice idea the coupling of n/P channels. I did a similar thing with a BC547 transistor and a Mosfet, but i was not happy with it.
I tryed to find a logic level MosFet to be driven directly by the propeller, but i did not find the right component (they became all too hot)
Bobb can you suggest me a similar component suitable for a higher voltage ?
(65 Volts could be the minimum, maybe also·55, but 55 are too close to the limit)
ciao
Marcello
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!