Arduino Output Pins power


Recently bought an Arduino Unu for a PiR project (May not actually need Arduino for this) but something has puzzled me. One of the main purposes of Arduino is to control objects, usually of higher voltage via relays.

Now I read from the Arduino site that the output of pins is around 40mA and not enough to power most relays, solenoids and motors.

Output Pins

Appreciate solenoids and motors but why would they say not able to drive most relays?


I don’t have an answer as to why, but its not only Arduino. The Raspberry Pi has a similar restriction. And the BBC Micro bit is really restricted current wise to any added devices. I would say its because of the IC used to control the output pins and how much they cost? They try to get the most functionality at the least cost and that’s a trade off. Best guess anyway. Just put a mosfet in there someplace. Have the Arduino turn on the mosfet and have that activate your relay. Feed 5v though the relay and mosfet.

I used this in one of my raspberry Pi projects, I used to turn on 4 10mm LED’s. 1 red, green, yellow and blue. 3.3v just isn’t enough to turn on the Blue LED. I wired the Pi’s GPIO to the 3V side and my LEDS with series resistors to the 5V side. Saved me having to wire up mosfets by hand.

1 Like

Or use a solid state relay. ;) Basically just an opto isolator.

1 Like

That looks a decent option.


One benefit from the solid state relay is there is no back EMF spike to worry about.

There is also stuff like this, or this if you need more than one relay.
You can also just get the opto isolator all by itself, and solder it to a Prot pHat or proto board.

It’s pretty standard for Microcontroller output pins to only be able to source or sink a few tens of milliamps at most. If you look at the size and thermal characteristics of anything designed to source or sink more, you’ll soon realise why. A full H-bridge motor driver for any serious application, for example, might be 90% heatsink. Sticking that right onto your microcontroller would not only give you additional thermal load to worry about, but would also limit the use-cases of what would otherwise be a very general purpose chip.

Simply put- a microcontroller is only supposed to be the brain. Somewhat like how your brain needs muscles to move your arm, the micro needs IO buffers, transistors and relays to control any significant load.

That’s what the bonnets, capes, shields, pHats, Hats, lol etc are for. ;)