Arduino Yun with batteries


I would like to build a little accessory that starts a WiFi network (accesspoint mode) and then redirects all HTTP requests to a html page served on the arduino. The HTML page has a link to a file which could be up to 300mb big, which should be downloaded to the clients.

I want this little accessory to be battery powered. I simply want to take it with me, press a button to turn it on, connect a device, download the file and then turn the device off again (or let it turn off automatically if possible).

I could not find any information or tutorials of people powering their Arduino Yun from batteries. Is it energy efficient enough to do that?

Greetings, Kim

I succesfully use the Yun with battery, and i have to say that is quite battery efficent. The power consumption is around 1.25W. So with two 2500mAh NiMh AA battery and an adeguate step up power supply it could last up to 4 hours.

That is amazing. I am a complete newbie with arduino. Could you tell me which components you used to connect the batteries and what I would need?

If you have followed some how to or tutorial could you please link me to it?

You just have to supply +5V to the Vin PIN of the Arduino Yun, so you can use every form of power supply rated @ 5V DC.
Ore you can use the onboard microUSB connector connected to a USB powerbank.

Amazing, thank you!

I suggest that you use a regulated power supply. Check out - it is easy to build.


do someone knows how much tolerant of the voltage the yun is (possibly both under and over 5V)?

I mean, if it is not too fuzzy, just using four 1.2V NiMH and it should last more than 4 hours, no upconverter needed.

Good question, I wondered too. However, in the description it says

If you are powering the board though the Vin pin, you must supply a regulated 5VDC. There is no on-board voltage regulator for higher voltages, which will damage the board.

and also in other texts it is warned not to regulate the Yun. Therefore I prefer to use a regulator to be on the safe side.


Hi ...

I intend to power Arduino Yun using batteries and I have tried a couple of approaches :

  1. I have tried a 9 V battery along with LM 1117 (LDO - 5 v fixed output) based voltage regulator circuit. The Arduino Yun run for about 3 minutes and then it turns off. I have tested the current drawn by Arduino Yun while it is powered ON and found it to be in the range of 250 mA. I think this large current might be responsible for rapid discharging of the 9V battery.

  2. I then experimented using 12V, 2 A NiMh battery with the same LM 1117 based voltage regulator circuit. This time the Arduino Yun powers and operates perfectly. However, the LDO IC LM 1117 dissipates a lot of heat and the IC gets heated.

I want to know what circuit should I use to provide a regulated 5V DC for powering the Arduino Yun.

Please advise on the type of regulator to use and about designing the power circuit.


I find theses regulator very cheap and reliable:

I have just tested a setup based on Arduino Yun. This is what I'v learned so far (I'm still testing):

My setup include a voltage regulator based on this example (LM317): Basic breadboard tutorial - SparkFun Electronics.

  1. 9V Alkaline Battery -> LM317 regulator -> 5V to arduino vin pin
    Arduino Yun is completely unstable. It hangs with led 13 flashing for a while, then stop working after some seconds. No way to connect via WiFi.

  2. 4 Alkaline AA Battery (6V) -> LM317 regulator -> 5V to arduino vin pin
    Arduino yun work for some seconds, but as soon as you stress it by accessing web pages on the httpd and the SD card, the SD card itself became unstable and fail to serve some files. In this setup the problem seems to be related only to the linino side and related HW components. I think also that in this specific case, the 6V is too low to be correctly regulated via LM317.( They suggest > 2 Volt as input).

  3. 7.2V from external power source (8-900 mA) -> LM317 regulator -> 5V to arduino vin pin
    Arduino works like a charm, serving web pages, talking via I2C with another arduino and acting as remote control for a robot. Tested for hours in this way.

In all these setup I'v read the voltage output from the regulator and it was stable at 5V. This is why I think the problem was related to current drag.

All the setups above were also tested with a standard Arduino Mega and Uno and I had no problems at all with them. (obviously without wifi support and embedded linino).

My perception is that the yun can drag a huge amount of current depending on the resource you are going to use on the linino side (web server, sd card access...). Standard battery with low current are not able to serve it in a stable way. You should probably try to power the Yun with a NiMh 7.2V battery or similar (800 or more mA) to avoid stability problems.

I should say I'm everything but an electronic pro, thus keep my assumption accordingly,
hope this could help in your project in any case,

How can you factory reset a Yun? I tried roughly #1 above and it seems to have fried it (I tried it before I saw this post).

The higher the difference between the source voltage and the input voltage of the Arduiono, the more preferable is a step-down controller over a linear controller.
"ProfePaco" shows here the right way.
Step-Down regulators are more efficient.

Using a 12V battery with the Yun an a "linear regulator":
5V for the Yun
7V for the Regulator
0,25A drawn bei the Arduino

5V * 0,25A = 1,25W for the Arduino
7V * 0,25A = 1,75W for the regulator -> very much heat
This means 3W for the battery.

step-down regulator:
90% efficiency
1,25W for the Arduino
1,4W for the battery (calculation is not quite correct, but ok)

Do not use LM317 when the voltage gap ist too big.

HI Guys,

I am not sure if it could be of any help but I am using a Samsung Galaxy charger and plug it into the Yun usb. As far as I know it should be a regulated 5V - 1A. Everything seems to work fine.


I ordered a 230 AC to 5V 1A DC power supply from eBay. Based on what the Valeriou said, I think it should work fine for a Yun. Just to be sure, does the Yun draw the needed current from that 1A or is it too much?

The load draws the needed current from the supply, up to the limit of the supply. The power supply does not force current into the load. You always want the current rating of the power supply to be higher than the power needs of the load.

You should be good with a 1A supply. The real question is how well regulated is the supply, and how clean is the power?

This is how it looks like:

I read on the Yun's guide page that it can be powered through it's 5V and Vin pins. What's with the "and" in the sentence?

Can't tell anything from the picture, it's the specifications that count. And you usually don't get any that are meaningful when looking at an inexpensive supply.

I think "and" is wrong. To power the Yun, you use either the USB port, or you feed regulated 5 Volts into the VIN pin. On the Yun, 5V is an output only. You can't feed power in that pin because there is a diode that prevents current from going in that pin. (Actually, it's more like 4.5 Volts out because of a diode drop on the VIN pin and another on the 5V pin.)

Most other Arduinos can accept higher regulated voltages on the VIN pin, or regulated 5 Volts in on the 5V pin. If you feed power in VIN, you can also use 5V as a regulated power output. But the Yun is quite different in that regard and the same power rules don't apply.

Here's the datasheet of an 8 pin IC on the supply:

The supply outputs 5V +/- 0.2V. That means it can go up to 5.2V.

The 32U4 on the board can take up to 5.5V. Am I still on the safe side even though it's possible the supply doesn't have a regulated output?

It's more of a case of the whole circuit that determines things like stability, noise rejection, ripple, etc. I'm sure you'll be OK with it, it looks to have a lot of filtering capacitance and reasonable construction. The picture doesn't really raise any red flags in my mind, unless the board is really cheaply priced.