Introduction: Solar Charged Battery Powered Arduino Uno

Picture of Solar Charged Battery Powered Arduino Uno

This instructable shows how to create a time switching battery powered solar charged circuit, which is used to power an Arduino Uno and some peripherals (sensors, communication modules, etc.).

If you want to design a remote data logger, power supply is always a problem. Most of the times there is no power outlet available, and that forces you to use some batteries to power your circuit. But eventually your device will go out of batteries... and you don't want to go there and charge it, right? So a solar charging circuit was proposed to user free energy from the sun to charge the batteries and to power your beloved Arduino.

Another problem your are going to face is the efficiency of your Arduino. It will consume a lot for your batteries, even if you put it to sleep. As described in Arduino's website (http://playground.arduino.cc/Learning/ArduinoSleepCode) "sleep is commonly used to save power on Arduino boards. For some Arduino variants, however, there is not much benefit. For example, the Arduino serial and USB boards use a 7805 type of power regulator, which needs 10 mA when the Atmega IC is in idle mode. Putting these boards to sleep will cut a few mA off the total power consumption however it will still be high".

If you bypass the inefficient regulator with your own power supply circuit, or use a board with a fairly efficient power supply, such as an Arduino Pro, then sleep can be very beneficial for reducing power and extending battery life. The regulator can even be removed altogether when using some Li-ion batteries.

But most of the times, you don't want to use your poor soldering skills directly on your Arduino Uno, or don't want to buy a more energy efficient device. If this is your case, this instructable is for you.

Another issue is that even if your Arduino is sleeping, your sensor might still be active, draining your batteries. So a timer circuit was added to the solar charged battery, which powers the Arduino only for a few seconds and then turns it off again to save power. It fits applications where your microcontroller is only used to read some sensors, transmit or save the data, and go back to sleep for a few minutes.

The circuit described here is still under test, a thorough analysis of the components used was not carried out (models diodes, transistors and resistor values). I intend to turn this circuit into a battery powered solar charging shield for Arduino Uno later, but for now I'm still on try and error fase. So, feel free to comment and to follow this project, and use it at your own risk!

I designed this circuit to power my Arduino mini-weather station ( https://www.instructables.com/id/Arduino-UNO-Mini-...). It uses a dust sensor that consumes a lot of power, and I wanted to turn off the whole circuit periodically to save my batteries.

Step 1:

Picture of

Step 2: Materials

Picture of Materials

You'll need the following components for the construction of this solar powered circuit:

Step 3: Assembling Solar Powered Battery Charger

Picture of Assembling Solar Powered Battery Charger

First you'll have to assemble the solar powered battery charger circuit. This uses the energy from some solar cells to charge the batteries, and boosts the voltage from it to the 5V used by the Arduino Uno.

This circuit was based on the awesome tutorial by deba168, Solar powered Arduino weather station.

Solar cells are connected to the input of the lithium battery charger (TP4056), whose output is connected to the 18560 lithium battery. A 5V step-up voltage booster is also connected to the battery and is used to convert from 3.7V dc to 5V dc. You can check the connection between the components in the picture.

Some pins were soldered to the bottom of both modules (TP4056 and booster), to allow easier connection to a breadboard. If you don't to use a breadboard, you might connect the components with wires and solder them.

At this point you may already power your Arduino Uno, connecting it to booster's USB connector, and your Arduino will work until the battery is depleted. When there is enough sun light, the battery will automatically start to charge.

Notice that the TP4056 input is limited between 4.5 and 5.5V. I this circuit there is no voltage limiter between the solar panel and the battery charger. A Zener diode might be used limite the voltage and protect your circuit.

Depending on your power consumption, your battery will discharge quickly. If that's the case, follow to next step.

Step 4: Timer Circuit

Picture of Timer Circuit

There are lots of projects involving Arduinos and a bunch of sensors. In most of the cases the Arduino read the sensors periodically and store the readings internally or transmit their values using Wi-Fi, bluetooth, ethernet, etc... After that, it usually enters in an idle state until it reaches the next sempling time.

During this idle time, you may put you Arduino to sleep, but it won't save a lot of power. Although the microprocessor reduces its power consumption, the regulator and other peripherals (your sensors and communication modules, for instance) keep working, consuming most of the power.

The alternative proposed here is to use an external timer circuit, which switches the power on/off periodically. When it's on, the Arduino will perform its setup, read the sensor, and save or transmit the data. All of this in a few seconds. After that the circuit will cut the power for a few minutes and then restart the process.

During the off state the timer circuit consumes only a few miliamps.

The timer circuit was mounted on Autodesk Circuits (https://circuits.io/circuits/4588121-timer-1) so that it would be simulated before the implementation with real components.

A 555 timer circuit in astable mode was designed to controll when the Arduino and its peripherals will be ON/OFF. In an astable circuit, the output voltage alternates between Vcc (+5V) (high state) and GND (0V) (low state) on a continual basis. This output was used to drive a relay, which will cut the Arduino's power periodically.

By selecting values for R1, R2 and C1, one can determine the period (the length of time it takes for the ON/OFF cycle to repeat), and the duty cycle (percentage of time the output is ON). Increasing C1 will increase the period. Increasing R1 will increase time high (T1), but will leave time low (T0) unaffected. Increasing R2 will increase time high (T1), increase time low (T0) and decrease the duty cycle.

Minimum duty for this kind of circuit is 50%. This means that, in the best scenario, the astable would cut the circuits power only half of the time, which was not enough. So it was decided to add a simple logical inverter (TQ1 and R4) at the output of the timer. This way the values of R1, R2 and C1 would be choosen so that the duty cycle was around 90% (before the logical inverter). After the inverter, output is ON for only 10% of the time. This inverted output is used to drive another transistor (TQ2), which is used to actuate a 5V relay (K1), which will finally cut the power of the Arduino and its peripherials.

Arbitrary values for resistors and capacitores were used in the first simulations, in order to verify the power consumption of the circuit. During the off state, the circuit indicate a consumption of only 0,8 mA. When the circuit is on (for a short time), it consumes around 40 mA, which is added to the current consumed by the Arduino (and other peripherals).

It's hard to measure the actual values, but the Arduino Uno usually consumes around 52 mA. When in sleep mode (using LowPower library), the consumption falls to 35 mA. New values for R1, R2 and C1 were calculated using a 555 Astable Circuit Calculator (http://www.ohmslawcalculator.com/555-astable-calcu...). Their values were choosen so that the circuit is off for 5 minutes, and then powered on for 27 seconds for sampling and transmitting data.

Considering those values (5 min OFF and 27 seconds ON), The Arduino with sleep mode would consume around 36 mAh. If we use the timer switching circuit, the consumption is only around 8 mAh. 77% reduction in power consumption seems good to me. You'll have also have to consider the current consumed by the rest of the electonics (sensor and communication modules), and voltage booster and battery charger in order to have a precise current value...

Step 5: Assembling Timer Circuit

Picture of Assembling Timer Circuit

Assemble the timer circuit according to the schematic.

The following values might be used for resistors and capacitor to achieve the 5 minutes off / 27 seconds on times:
R1 = 2 Mohms

R2 = 200 kohms

R4 = 10 kohms

R5 = 10 k ohms

C1 = 200 uF

C2 = 10 nF

It's important to notice too I used the normally open (NO) output of my SPDT relay. I realized that some relays only have a normally closed output, althought they have the same kind of package, and all the indications are the same.

Also notice that in the picture I use different values, because I didn't want to wait for 5 minutes to see my circuit working.

The picture shows the circuit mounted on a breadboard. I has one input (+5V/GND from voltage booster) and one output (+5V/GND to the Arduino).

Power the time circuit, with the Arduino connected to it, an see if it works. You listen the relay being actuaded from time to time.

Step 6: Complete Circuit and Testing

Picture of Complete Circuit and Testing

After the timer circuit is working, connect it output to Arduino 5V and GND pins. It will look like the one in the picture.

The Arduino will be powered every 5 minutes and stay on for 27 secons. You might change those values selecting differente values for the resistors and capacitores as described eartlier.

Design a nice case to protect your circuit, put it on the sun and see if it works!

Step 7: Power Consuption and Time of Operation

I'd like to make some considerations on the power consumption and time of operation.

Considering 5 min OFF and 27 seconds ON, the power consumption of the circuit + Arduino are the following:

Without switching circuit (using sleep mode):
Average currenge (Iavg) = (Ton*Ion + Toff*Ioff ) / (Ton +Toff)

Ton (Arduino is active) = 27 s

Ion = 51.7 mA

Toff (arduino off) = 5min = 300 s

Ioff = 34.9 mA

Iavg = 36.3 mA

Operating voltage (Vo) = 5V

Average power (Pavg) = Vo * Iavg = 5 * 36.3 = 181 mW

Li Ion battery capacity = 3000 mAh

Battery voltage = 3.7V

Power =3.7 * 3000 = 11100 mWh

Battery life = 11100/181 = 61 h = 2,5 days

With timer switching circuit:

Average currenge (Iavg) = (Ton*Ion + Toff*Ioff ) / (Ton +Toff)

Ton (arduino is active) = 27 s

Ion = 92 mA

Toff (arduino off) = 5min = 300 s

Ioff = 0.8 mA

Iavg = 8.2 mA

Operating voltage (Vo) = 5V

Average power (Pavg) = Vo * Iavg = 5 * 8.2 = 41 mW

Li Ion battery capacity = 3000 mAh

Battery voltage = 3.7V

Power =3.7 * 3000 = 11100 mWh

Battery life = 11100/41 = 270 h = 11 days

Power losses on the TP4056 and voltage booster were not considered here and will certailly decrease the battery life in both cases.

The important thing to notice here is that this timer circuit will save the some energy cutting the power of sensors as well, while the sleeping mode will onde reduce the consumption of the microprocessor.

Comments

Rene046 (author)2017-01-15

Im thinking of using the same thoughts, "im just starting with Arduino"

only using the 555 in monstable mode so i can switch off all parts (boost circuit, arduino and sensors) except the 555 circuit and the lipo charger board. And using a pin of the arduino to switch all off (AFTER sending all data) by putting pin 2 from high (pullup) to low on the 555 circuit. then after 1-15 minutes all starts up and repeating all.

http://www.learnabout-electronics.org/Oscillators/...

fig.4.5.3.55 Monostable Circuit.


Till now i tested only with one bc327 pnp transistor on the out with an resistor, i'm looking for a type that can handle around 1 amp. to be safe.i used the pnp because the output of the 555 is high while timer is counting and low if ready.

sorry for my bad englisch.

IgorF2 (author)Rene0462017-01-24

Hi! Using a PNP transistor might be a great improvement. I used a transistor only for inverting the signal, but your idea seems better.

GreenPVtech (author)2016-10-27

Cool charger. I'm also working on similar things for remote sensing of my balcony green house. I'm looking around for alternative solar cells (flex and maybe transparent (at least somehow)

I wonder if this would work we these organic solar cells. The company behind also offers optimized charger and/or USB output electronic boards

https://infinitypv.com/infinitypro/electronics

IgorF2 (author)GreenPVtech2016-10-30

Nice! I´ll take a look at this! :D

Skorekaj (author)2016-10-25

Great Article. Have you considered doing a barebones arduino (barduino) in stead to save more power? : https://www.instructables.com/id/BareDuino-How-to-P...

IgorF2 (author)Skorekaj2016-10-25

Thanks!

You are right: if I want to save more power, I'll have to use a barebones Arduino , avoiding the losses on voltage regulators, for instance. Although, I wanted to develop a circuit for a standard Arduino Uno. I also wanted a circuit that could cut the power to my sensors, in order to reduce their consumption.

I'd also use more efficient components, like a mosfet instead of a relay... :p

dgrc (author)2016-10-17

The N555 is a nice idea and probably allows more precise timing than the Arduino sleep mode but, if you can power your sensors from the Arduino 5V out 3.3V pins then the sensors won't draw down the battery while the Arduino is sleeping. The code gets a little weird because you can't use loop() {//do stuff;} with deep sleep but there are work arounds.

IgorF2 (author)dgrc2016-10-17

According to some references (http://playground.arduino.cc/Learning/ArduinoSleep...) for some Arduino variants, the 7805 voltage regulator will keep working during the sleep mode. Thus, I believe any sensor connected to Arduino's 5V pin will still be powered while the microprocessor sleeps.

This is a great issue for me, because I'm using a dust sensor that consumes a lot of power.

Tecwyn Twmffat (author)2016-10-14

You say "A Zener diode might be used limite the voltage and protect your circuit." - why not use a voltage regulator IC such as the good old 7805?

dgrc (author)Tecwyn Twmffat2016-10-17

I'm not too sure about the zener but the 7805, like all linear voltage regulators, is pretty inefficient; it might not be the first choice in a circuit where low power matters.

IgorF2 (author)dgrc2016-10-17

You are right. I think the best option is to use the right solar cell (a 6V one), and avoid the use of additional electronics.

IgorF2 (author)Tecwyn Twmffat2016-10-14

I believe you can also use a 7805 and some capacitors if you are using a solar cell with more than 6V. But I think a zener would be cheaper.

If you use a 6V solar cell, you won't need this voltage limiter. The output of the cell will be 6V or less, and there is a 0.7V voltage drop in the diode.

Tecwyn Twmffat (author)2016-10-14

Nice work - I may build one of these myself. Thanks!

IgorF2 (author)Tecwyn Twmffat2016-10-14

Thanks! :D

About This Instructable

7,858views

157favorites

License:

More by IgorF2:3D Printed Articulating LED Lamp3D Printed Tool HangerWiDC - Wi-Fi Controlled FPV Robot (with Arduino, ESP8266 and DC Motors)
Add instructable to: