I solve my problem with a control for motors, I say because sb could have the same problem. Bye
Hi, I have a similar problem as you had before. I got a 5V 0.16A DC motor, and I don't know how to drive it. Can you give me some advice? THX
I think maybe you can use transistor
Here is my "prototype" for driving a small electric motor using one of the Mbed's digital out pins (actually a PWM pin, but that's not important).
The Mbed can only source about 40mA from a single pin, so in order to drive an electric motor, one needs to use a transistor... The only transistor I had lying around were some BC337's, which are pretty normal NPN transistors, but the maximum current they can drive is 800mA... so I used this tool to find out what value resistor I needed on the Base... as the 5v electric motor I use had a resistance of 2.2ohms, I decided to use 400ohm resistor... which, if I've understood everything, will mean the maximum current through the transistor will be 654.5mA... Hooray! That gives me a 145.5mA tolerance for variance in the components :)
See below for a screenshot :)
/media/uploads/bloodline/mycircuit.jpg
-Edit- I've modeled the electric motor as a 2.2ohm resistor with a flyback diode, which I included in my design to protect the transistor from any reverse current off the motor (which I know happens with solenoids... not sure about motors).
http://mbed.org/forum/electronics/topic/2392/
This page is missing the link to the library API details.