4
\$\begingroup\$

I have a small motor which I removed from a mobile phone. I want to control it from a digital output on my Arduino board.

Will I damage it if I connect the motor directly to to the board and it needs more power?

Can I use 2 outputs of the Arduino together?

I know the best way to do this would be to use a transistor as a driver but I'd really like to avoid it since I don´t have it on stock and it is cold in Copenhagen now.

\$\endgroup\$

4 Answers 4

4
\$\begingroup\$

You need a suitable driver, like a BJT or MOSFET. Use an L293D if the motor is to operate bidirectionally.

\$\endgroup\$
1
  • \$\begingroup\$ Turns out the motor needs about 300 mA to run so the driver was the only option. \$\endgroup\$
    – Stulli
    Commented Jan 9, 2011 at 11:11
2
\$\begingroup\$

What is the current requirement of the motor? If it's less than 60mA, you can probably get away with sinking the current.

Be aware that some digital pins can sink more current than they source. At 60mA, you will still be at 1.5V out (so watch your power dissipation!), but you won't get far at all trying to source that kind of current. 40mA is a generous maximum for sourcing. Therefore, you should connect to the negative terminal of your motor.

If you need to use multiple outputs together, be aware that the transistors in those outputs will likely have subtle differences, and not share the current very accurately. A <10 ohm resistor on each output should help them to share the current more evenly.

Try to split shared outputs between different ports on the microcontroller, because this will separate the heat on the chip. This has the drawback that it takes more time to set multiple ports, so try to avoid doing read/write/modify if you can help it.

Finally, as Joby noted, don't forget a diode.

Edit: I'm assuming this is a simple DC motor, and you want to operate it in one direction. If you have anything more complex, you should brave the cold and get yourself a proper driver.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks.I will try sinking it. If it does not work I will go out in the snow and find me some driver. I don't know anything about the motor other than that it is used to make the phone vibrate and maybe I can just remove the transistor from the phone as well. \$\endgroup\$
    – Stulli
    Commented Dec 15, 2010 at 21:29
0
\$\begingroup\$

The problem is the motor's current requirement, it's likely about 70mA which is much more than can be safely drawn from an AVR pin.

You can probably scavenge a transistor from the mobile phone where you got the motor. Don't forget to add a diode to protect from the back-EMF too.

(If you're looking for an easy motor to interface with Arduino, consider micro servos - these require no other components)

\$\endgroup\$
0
\$\begingroup\$

Check the datasheet for the particular AVR chip you're using. Some modern MCUs have a high current source/sink (I seem to recall the PIC 2550 having a pin able to source/sink 50mA) pin that can be used to directly drive an LED, for example. It might be enough for the motor if its current requirements are low.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.