# Arduino powering an external circuit with higher voltage

First of all, I'm sorry for the newbie question. I'm a software engineer and only a hobbyist in electronics.

I'm trying to power up an external circuit using an Arduino digital pin.

The external circuit uses a 12V power source and drains about 4mA. I have successfully done this using a transistor.

According to the specs, the Arduino digital pins can supply up to 20mA with no problem.

Therefore, I was wondering if it is possible to power up this circuit directly from the pin, without using the transistor, nor the 12V external source.

The questions are:

1) Is it possible? How can I accomplish this?

2) What about the higher voltage? I think the circuit is designed to work with 12V and if I supply a lower voltage it should drain less current (according to Ohm's law) and the current wouldn't be enough. Does it makes sense?

3) If (2) makes sense. Is there any trick to do to achieve this needed higher voltage from the pin?

• An Arduino can only work on 5 V max, go above that, you will break it. What is that "external circuit" ? Can it work on 5 V ? There is no guarantee that it will work on 5 V. You cannot rely on ohm's law here as the external circuit might contain a DCDC converter which might draw more current if you supply it with 5 V instead of 12 V. – Bimpelrekkie Mar 31 '16 at 7:14
• Sounds like an external transistor is a very good solution for this. Why are you against using a transistor? – Dan Laks Mar 31 '16 at 7:19
• These guys are overly pessimistic. You can easily whip together a capacitor step-up to 12 volts from a 5 volt Arduino pin, I do it myself in another project with a pic where I need a 10-15 volt bias. The problem is the 4 mA current, which may be too much for such a circuit, but I don't have the time to calculate it and make a real answer right now. – pipe Mar 31 '16 at 7:37
• Ok which is better a transistor solution or using capacitors @pipe – Jasser Mar 31 '16 at 7:38
• Not pessimistic, realistic. Why go to the trouble of upconverting 5 V to 12 V (which might need additional transistors to make the power, sort of defeats the purpose) when we don't know what the external circuit is. Maybe it's only a LED and a 2.2 k ohm resistor ?? – Bimpelrekkie Mar 31 '16 at 7:40

Basically, no.

It can be legitimate to power devices directly from a processor pin, and I have done this. However, the device power voltage needs to be the processor output voltage or less for this to make sense. If the processor output is 5 V, for example, then you can power a low-current device from a pin if that device can use 5 V power. If it uses 3.3 V, for example, then you can have the processor pin power a linear regulator, which then powers the device.

While it is theoretically possible to step up the voltage from a processor pin, this isn't really practical. You would have very little power available at the higher voltage. If you are going to go thru all this trouble, it would be better to have the processor output enable a switching power supply that makes the higher voltage from the same power that is running the processor, not coming thru the processor out the pin.

In any case, the first thing you have to determine is how much power the device requires. You say the processor output can deliver 20 mA, which is probably not at the full processor voltage. Let's say that's guaranteed to be at least 4 V at 20 mA. That means the maximum power out of the pin is (4 V)(20 mA) = 80 mW. No matter how you convert that, you can't make more power.

Let's say you did convert this to 12 V, and that converter is 60% efficient. That means only 48 mW are available at 12 V. The current capability of the 12 V supply would then be (48 mW)/(12 V) = 4 mA.

You are seeing this in wrong way,, 1)if a device is rated at 12V (say a relay) you can use it with various voltages defined by the manufacturer if you refer the "Datasheet" of the product it will tell you what is the minimum voltage (say 9V),Typical voltage(say 12V) and Maximum voltage(say 14V) that the device should be operated.

2)So you even if u connect a 12V device to a 5V battery with 10A it simply wont power up

3)Ohm says V=IR is only applicable to simple linear circuits if you observe this carefully there is an R so if u supply a device lower voltage it necessarily wont drain less current as it is purely decided by 'R'. Higher the R lesser the current it draws ,Less the R more current it draws,,,which is in General cases.

4)You cannot get higher voltage from Arduino DIOP until u use a BuckUp converter either as the loss of current or bandwidth,there is always a trade off

Hope this helps...

Powering a device directly from Arduino digital pin is generally a bad idea. Even if the device is rated for 4ma, it may have some power consumption peaks during which it drows enough to damage Arduino pin.

The correct solution would be to use boost DC/DC converter, preferably with some enable input to turn it on/off with the Arduino digital pin. Power the converter from Arduino 5V pin and you will be fine.

No, You cannot directly deal with higher voltage such as(12v,19vetc..) with arduino, You should use either voltage regulator or voltage converter to accomplish this problem because arduino can only works with 5v.

• So what you really mean is "Yes, it is possible, you need a voltage converter". – pipe Mar 31 '16 at 7:38
• You should use either voltage regulator or voltage converter to accomplish this Hmm, that sounds more complicated then the single transistor solution OP is trying to avoid. – Bimpelrekkie Mar 31 '16 at 7:56