DC Motors
Matt32493
Posts: 23
I am new to the basic stamp
and happenedto have a few small DC motors laying around
and was trying to program it
but can not figure out how to program it
could someone please help me program this dc motor
and is it possible to have variable speed with it?
thanks
and happenedto have a few small DC motors laying around
and was trying to program it
but can not figure out how to program it
could someone please help me program this dc motor
and is it possible to have variable speed with it?
thanks
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
This is too much for the Stamp to handle, so you need some way to isolate the Stamp from the motor. Most
people use either a relay or an H-bridge (Which is sorta like a set of smart relays).
With an H-bridge you can spin a motor both ways (if the motor supports that) and you can control the
speed with PWM (Pulse Width Modulation) which is basicly just sending signals to the H-bridge to pulse the
motor slower than at full-speed. This happens so fast that you won't see the motor start/stop or coast,
instead it will only appear to slow the motor. This works quite well.
Parallax sells some very powerful and very safe H-bridges and motor controllers. They also support these
products with this forum and their own tech support, so if your new to the stamp, I'd recommend those.
There are also other H-bridges on the market like the SN754410 or L293 motor driver. I don't recommend
these to newbies because they are slightly complex.
To find the parallax products, go to www.parallax.com then click on Accessories then Motor/Servo Controllers.
Many people swear by the HB-25 or the Micro Dual Serial Motor Controller.
Since you are new to microcontrollers--so am I--I highly recommend you begin by either downloading, for free, Parallax's great "What's a Microcontroller" or, if your budget will stand it, buying the book and parts kit. You will zip through the book! It is great. However, the closest it is going to get you to controlling a DC motor is a chapter on controlling a servo-motor. This is not the same, although many of the same principles apply.
Your next step--assuming your goal remains controlling DC motors--would be to buy an appropriate motor controller for one or more of your existing motors. To determine what motor controller you need you have this forum to help! Everyone here will be glad to "re-answer" all those question that I asked a few months ago (well, I guess I am still asking them!) to help you get the motor controller that will fit your needs. (A motor controller is a device that sits between the microcontroller--a Stamp, in our case--and your motor. It allows you to run the motor forward, stop, reverse, and at different speeds as instructed by the program you write for the Stamp.)
Not only do you have excellent support via this forum, the folks at Parallax will provide TREMENDOUS support to help ensure your success. (I know this from personal experience.) They will provide support via phone, e-mail, and/or this forum. (Gee. I bet if you went to their MAJOR BIG TIME FACTORY they would help you there, as well.)
Either most, or a lot, of Parallax's books are available free via download or (if they exist) in printed version at very economical prices.
If this stuff really interests you, I know of no other company that will make it so easy. Parallax offers a full range of products and (in my opinion) even better support for what they sell (and often even what they do not sell!) than anyone I have ever experienced in my long life of buying stuff and trying to make it work.
Have fun!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.