DC Motor Control
Hi Guys,
What are my options using the BOE and BS2 to control a DC motor (forward, reverse and speed). The motor is from an 7.2 volt electric drill. I·like to run it a a lower voltage to slow it down (3.1 is fast and 1.5 is just right or should I do this with the motor control). Have been reading up on H bridges and was wondering whether to try to build one or buy something. Are there places to find examples of how to program the stamp to work with the H Bridge?· Can this motor control be done directly by the stamp? Any suggestions would be appreciated. This my first attemp at making a bot from scratch.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
Post Edited (Whit) : 4/5/2007 5:10:41 PM GMT
What are my options using the BOE and BS2 to control a DC motor (forward, reverse and speed). The motor is from an 7.2 volt electric drill. I·like to run it a a lower voltage to slow it down (3.1 is fast and 1.5 is just right or should I do this with the motor control). Have been reading up on H bridges and was wondering whether to try to build one or buy something. Are there places to find examples of how to program the stamp to work with the H Bridge?· Can this motor control be done directly by the stamp? Any suggestions would be appreciated. This my first attemp at making a bot from scratch.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
Post Edited (Whit) : 4/5/2007 5:10:41 PM GMT
Comments
The Parallax tutorials on Process Control and Robotics are also good starting places (www.parallax.com/html_pages/downloads/siccurriculum/documentation_sic_curriculum.asp).
The learning curve is steep, but I am having so much fun and learning so much.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
Post Edited (Whit) : 4/5/2007 5:10:09 PM GMT
My recommendation goes for the H-Bridge IC.... I am currently using the National Semiconductors LM18201 IC with great results... this is a single chip that can drive dc motors at up to 3 amps... the logic of the IC is adaptable... it has a "Brake Pin"... "Direction Pin" and "PWM Pin"... but.... it also has a feature that allows you to control the Speed and Direction with a single pin... for that to work you will have to drive this pin with a Pulse Width Modulated PWM type of signal.... so... a signal with a 50% duty cycle means no movement.. but variations of the dyte cycle percentage means movement in one direction or another (lets say 49% or less is forward and 51% or more is reverse) so.. the lower or the higher the Duty Cycle percentage goes.. the slower or faster the motor moves... it is important to mention that this pulse is not servo type of pulse.... you will have to play with your code in order to obtain the correct frecuency and duty cycles..... I love this feature because simplifies the connections, the number of microcontroller pins used for controlling the motors... and it also simplifies the code... I am using it to control a couple gearhead motors and in 50% duty cycle it actually serves as a brake... so... it looks like you can control speed, direction and braking with one pin.. neat...
Another nice feature of the LM18201 is the fact that if you need to drive a motor over 3 amps... you can actually connect two or more in parallel to double or triple the Amp rating, but you need to follow certain simple rules in the PCB design, here is more info about this possibly less known feature of the LM18200/LM18201 IC:
http://search.national.com/iphrase/query?query=lm18201 parallel
If your power needs are above this... you should consider Parallax's HB-25, but I do not believe a 7.2 Drill Motor needs that much power, I am driving a pittman gearhead motor with a single LM18201 with no issues, and this motor is more power hungry than a drill motor... especially since I believe the 7.2 Volts drills are not that big at all.. ??
... also.. in its most simple configuration it actually requires only a ceramic capacitor for Vcc bypassing (very important) that's it.. no sense resistors, no charge pump capacitors and diodes (well, only if you are planning to switch the motor at frecuencies above 1Khz... but even then it is just a couple ceramic capacitors for the charge pump, no diodes required).... the LM18201 doesn't provide a easy way to measure Amps through a sense resistor... if you require this option you should use the LM18200 instead...
I hope this helps.. Happy Roboting!!
Looks really good. Price is good too. I found a the data sheet pdf and have downloaded it and will read up on it some more.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
Post Edited (Whit) : 4/6/2007 9:36:12 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
1.- Is it possible to feed the LM18201 with less than 12 Volts?? the datasheet states a VCC range of 12 - 42 Volts
2.- Will your motors survive a continuous voltage around 12 Volts?? of course, your code will be modulating the power fed to the motor through a PWM signal so your motors won't be getting full power all the time, but what if your code at some point provides continuous power at 12 Volts in one direction for a long period of time???.. will the motor go down in flames???
Uhm... I am probably going to try to feed the LM12801 with less than 12 Vots and see what happens... I will let you know...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
Post Edited (TChapman) : 4/8/2007 5:31:40 PM GMT
Thanks for the great suggestions. I will do a little experimenting. I don't mind building or buying/trying 2 or 3 ideas. After all, I'm trying to learn what works well and how. Thanks for taking the time to respond.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D Faust
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D Faust
The reason that I said up to 5VDC is because I would like to buld a small robot about eight inches wide and I would like to use small motors. I would rather not have a large battery pack for this. Can 12 VDC be apllied to the logic and only 5 VDC for the motors themselves? Where can I get one of these? In case you were wonderind the kind of motor that I had in mind, it is the RE 260 Mabuchi motor with a gear box. Thanks for the advice, even if it doesn't work woith this project it might work on future ones.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D Faust
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D Faust
PWM is a trial for the stamp, but PWMPAL (easier to interface) or “A’s” answer may be suitable to your needs and skill level.
For the platform you describe, I’d use 6V to drive the H-bridges, regulated to 5V for the Stamp—should motor over flat carpet and bare floor at satisfactory speeds driven by one chip powering each motor. Total cost, around $50—including PWMPAL. Rock solid answer at a reasonable price. If you ever want to upgrade, soldier a second chip over the first, connect a 12V battery, and chase cats up trees...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D Faust
http://www.mouser.com/search/ProductDetail.aspx?R=EN2-1N1Svirtualkey55100000virtualkey551-EN2-1N1S
It is cheap.. but it requires around 95 miliamps and around 12 volts to excite the coil..... the good thing about it is that you only require one relay per motor, and only one control signal per motor (of course... in order to stop the motor you will need to control power to it, probably with another simple relay... just an idea...
About the LMD18201 .... I actually obtained a couple samples directly from National Semiconductors ( at no cost at all... they are so kind they even pay for the shipment of course, you will need a company email account in order to be able to request samples, personal accounts like hotmail or yahoo are not valid... feel free to IM me if you need more details... or anybody who is reading this ( is that Whit requesting
samples???
I hope this helps....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D Faust