Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: FunkMasterBob on February 19, 2009, 03:09:30 PM
-
Hey, so after reading the tutorial for your first robot, I have a question. Won't hooking a motor up directly to the microcontroller cause a burnout of the microcontroller? If not, why not? I'm looking into building a device using motors and a microcontroller, and want to make sure i don't have to buy two microcontrollers because of a stupid mistake. Thanks for any help you can give.
-
If you are driving a DC motor then DONT connect it to the microcontroller. You will need to buy a motor controller that converts the low current from you microprocessor into the high current for the motor. Or you could one yourself - see my tutorial http://www.societyofrobots.com/member_tutorials/node/159 (http://www.societyofrobots.com/member_tutorials/node/159)
But you CAN connect a servo directly to the microcontroller (thiis is because a servo has a kinda mini motor controller board built into its casing).
-
You could use a H-Bridge (http://www.societyofrobots.com/schematics_h-bridgedes.shtml), although this only allows you to use one speed for the motor, but it DOES allow forwards and backwards spinning.
-HyperNerd
-
NEVER ...EVER ....connect the motor directly to the mcu..use any motor driver like l293d which can supply ypto 600 ma of current or the l298 which can supply upto 2 A of current...the schematics can be found out on the net..
-
You could use a H-Bridge (http://www.societyofrobots.com/schematics_h-bridgedes.shtml), although this only allows you to use one speed for the motor, but it DOES allow forwards and backwards spinning.
-HyperNerd
Actually can't you use pulse width modulated signals to the H-Bridge to get variable speed? A lot of the mcus have at least a couple channels of PWM available.
-
Actually can't you use pulse width modulated signals to the H-Bridge to get variable speed? A lot of the mcus have at least a couple channels of PWM available.
Madchimp,
You're right... I must have had a blank moment ;)
-HyperNerd