Drawing more output current

I want to use a microcontroller to run the small vibration motor that Spark Fun sells. But I think I may have to draw more mA’s than what the microcontroller can deliver on one pin.

  1. Would it make sense to connect several output pins together in order to draw more current (switching all of them on and off together) and hence use less components than otherwise?

  2. Is it necessary to place a reversed diode in parallel with the motor in order to protect the microcontroller?

Help would be appreciated.

Thomas

From what I know, to get more current you should use transistor circuit. There are couple of solution, so try google “microcontroller more current” :D.

This one seems nice: http://www.scienceprog.com/interfacing- … l-devices/

Cheers!

Tom

Thanks, Tom. Yes, a transistor would be a solution that would work.

However, I have a lot of output pins in excess so I was hoping to lower the number of components by connecting multiple pins. I’ve seen the approach for a solution that used a Cypress microcontroller - a hack really but nice if it works - but I don’t know if it’s really a sound/stable/sane way of doing it.

I have a feeling, for example, that differences in the internal resistance of the pins might distribute the current unevenly if additional resistors are not added for each output (increasing the number of components). But I really don’t know and would hate to kill the microprocessor.

Thomas

Why not calculate the current required, and see whether using paralleled output pins will meet the MCU specification in terms of output current and power dissipation? However, a transistor would be much safer and is the usual way to do it.

Either way, you need a diode across the motor.

Leon

leon_heller:
Why not calculate the current required, and see whether using paralleled output pins will meet the MCU specification in terms of output current and power dissipation? However, a transistor would be much safer and is the usual way to do it.

Either way, you need a diode across the motor.

Leon

Don’t forget to check the spec for max output from a port. While individual pins may allow a certain current, the max from a port or for the chips is usually signifcantly less than the sum of the pin outputs. A transistor on a single output will also be more resistant to software errors :slight_smile: .

I’ve seen people use the paralleled-pins approach, so presumably it works reasonably well. Or at least well enough for them to build a prototype. :slight_smile: The FET output circuit should have a positive temperature coëfficient and probably looks very resistive, so I don’t think one pin would end up hogging the current. As muntron points out, be sure to check not just the per-pin max current but also the per-port and whole-device max current (and max power dissipation, possibly).

Just tried it out using three different ports. Works nicely and draws about 60 mA.

Thanks for the advice.