Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: mike_co on June 03, 2012, 01:41:03 PM
-
Hi this is my first post, I just have a small question to ask about a project I'm working on.
I am trying to use these vibrating motors with the Arduino Uno board:
http://www.robotshop.com/ca/productinfo.aspx?pc=RB-Sbo-46&lang=en-US (http://www.robotshop.com/ca/productinfo.aspx?pc=RB-Sbo-46&lang=en-US)
The buzzers run on 80mA of current, while the Arduino can take 50mA. I know I need to build a small circuit to get this working, can anyone point me in the right direction? Thanks.
-
Probably the easiest way to do any DC motor control from a microcontroller is to use an H-Bridge circuit.
You can buy H Bridges as integrated circuits or breakout boards, although if all you need is 80mA you're going to be going into overkill mode by buying one :-P
However, if you're going to be doing other projects with bigger motors, it's always good to have a few. I use these: http://parts.digikey.com/1/parts/577889-ic-h-bridge-5a-dc-motor-to220-7-tle5206-2.html (http://parts.digikey.com/1/parts/577889-ic-h-bridge-5a-dc-motor-to220-7-tle5206-2.html) although there are a ton of others around.
If you want to play with circuits, though, an H-Bridge is only 4 transistors and some diodes. Just be sure you're choosing the right transistors (this is...sadly something I don't know how to do, but am interested in learning).
Keep one thing in mind, though: if you're using an H Bridge like the one I just showed you, you have to use TWO PWM outputs, not just one. If you modify it with a bit of logic circuitry, you can only use one PWM and one digital IO pin (not in PWM mode, just on/off). This is because you need to be able to set the direction of motor as well as its speed.
MIKE
-
I assume there is no need to change the direction of the motor (since it's just a vibrator), so one would really only need one corner of an H bridge.