Controlling DC motors with basic stamp
Nuby
Posts: 18
·I must be·totally nuts treying to use a basic stamp to run a DC motor. Please let me know where·I can get information to do that.
Thanks
Nuby·
Thanks
Nuby·
Comments
Hook it up.
Run the sample code.
try to use (AD5220 10K Digital Potentiometer) & NPN transsister with high current support like 20Amp or more
the connection is very easy i did it already and i'm controlling small car speed through this
one important note that the volt range will be 0 - 5 volts because of the basic stamp output is 5 volts only
if you are using a DC motor required more to work better to go for the ( HB-25 Motor Controller )
if you have any problem for this let me know please
may be i can help you
regards
The H-Bridge is responsible for sourcing/sinking current to the motor. You can use a chip (like L293) that have an H-Bridge built into it, or you can build your own with four power transistors or MOSFETs, depending on how much current you need. You can control the MOSFETs with opto-transistors or general transistors coming from the Stamp (also depending on how much current you need). With lots of current and voltage to the motor, use opto-transistors.
The motor is controlled by the duty cycle of the PWM signal. When the duty cycle is 0%, the motor is OFF, when it's 100% the motor is fully ON. The frequency is not critical, but should not be too high as the MOSFETs and transistors need time to switch (anywhere from 50-10000 Hz is OK).
You can generate the PWM signal with a 555 circuit, your Stamp, or some other PWM cabable circuit. There are many circuits available where you control the duty cycle by adjusting a (digital) potentiomer.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy
1) discovercircuits.com/H/hbridge.htm
2) www.mcmanis.com/chuck/robotics/tutorial/h-bridge/index.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy
If you need lots of current, here is a similar circuit with MOSFETs which uses a potentiometer to control the PWM signal. This circuit can provide up to 50A to a motor.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy
you are right, these circuits are the best to control a DC motor
but i used a simple potentiometer with two transistors because it was difficult to get the electrical components in my area
and it gave me good result too
at any how i prefer your method because it is more safe on the BASIC STAMP and with low power waste
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy