Home > Power Circuits >Charging Circuits > How to create a solar charging circuit powered by a time-switched battery

How to create a solar charging circuit powered by a time-switched battery

Source: InternetPublisher:aerobotics Keywords: Charging circuit battery powered Arduino Updated: 2024/03/04

This article shows how to create a solar charging circuit powered by a time-switched battery for powering an Arduino Uno and some peripherals (sensors, communication modules, etc.).

If you are designing a remote data logger, power is always an issue. Most of the time there are no power sockets available, forcing you to use some batteries to power the circuit. But eventually your device will run out of juice...and you don't want to have to go there to charge it, right? Therefore, a solar charging circuit is proposed to charge the battery and power your beloved Arduino using the free energy from the sun.

Another problem you will face is the efficiency of the Arduino. Even if you put it to sleep, it consumes a lot of battery power.

For example, the Arduino serial and USB board uses a 7805 type power regulator which requires 10 mA when the Atmega IC is in idle mode. Putting these boards to sleep will reduce the total power consumption by a few mA, but it will still be high".

If you use your own power circuit to bypass the inefficient regulator, or use a board with a fairly efficient power supply, such as an Arduino Pro, sleeping can be very beneficial for reducing power and extending battery life. When using some lithium-ion batteries, the regulator can even be removed entirely.

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

Another problem is that even if your Arduino is sleeping, your sensors may still be active, draining your battery. So a timer circuit was added to the solar rechargeable battery which only powers the Arduino for a few seconds and then turns it off again to save power. It's suitable for applications where your microcontroller is only used to read certain sensors, transfer or save data, and go back to sleep for a few minutes.

The circuit described here is still under testing and the components used have not been thoroughly analyzed (model diodes, transistors and resistor values). I plan to later turn this circuit into a battery powered solar charging pad for an Arduino Uno, but for now I'm still trying and making errors. So please feel free to comment and follow this project, and use it at your own risk!

Step 1: Materials

You will need the following components to build this solar powered circuit:

Arduino Uno

small bread board

5V booster

Lithium battery charger (TP4056)

6V solar cell

18560 lithium battery

Battery Holder

1N4004 diode (x2)

555 integrated circuit

2N3904 triode (x2)

1 megohm resistor (x2)

100 kohm resistor (x3)

10 kohm resistor (x1)

100 uF electrolytic capacitor (x2)

10 nF ceramic capacitor (x1)

5V SPDT relay

jumper

USB cable

Step 2: Assemble the Solar Battery Charger

First, you must assemble the solar battery charger circuit. This uses energy from some solar cells to charge the battery and boost its voltage to the 5V used by the Arduino Uno.

The solar cell is connected to the input of a lithium battery charger (TP4056) and its output is connected to a 18560 lithium battery. A 5V booster is also connected to the battery and is used to convert 3.7V dc to 5V dc. You can check the connections between components in the picture.

Some pins are soldered to the bottom of both modules (TP4056 and booster) to make it easier to connect to the breadboard. If you're not using a breadboard, you can connect the components with wires and solder them.

At this point, you may have powered the Arduino Uno, connected it to the booster's USB connector, and your Arduino will run until the battery dies. When there is enough sunlight, the battery will automatically start charging.

Please note that the TP4056 input is limited between 4.5 and 5.5V. In this circuit, there is no voltage limiter between the solar panel and the battery charger. Zener diodes may be used to limit the voltage and protect your circuit.

Depending on your power consumption, your battery will discharge quickly. If this is the case, proceed to the next step.

Step 3: Timer Circuit

There are a lot of projects involving Arduinos and a bunch of sensors. In most cases, the Arduino reads the sensor periodically and stores the readings internally or transmits their values ​​using Wi-Fi, Bluetooth, Ethernet, etc. . . . . . After that, it usually goes into idle state until the next sampling time is reached.

You might put the Arduino to sleep during this idle time, but this won't save much power. Although the microprocessor reduces its power consumption, the voltage regulator and other peripherals (such as your sensors and communication modules) are still working and consuming most of the power.

The alternative proposed here is to use an external timer circuit that turns the power on/off periodically. When it's turned on, the Arduino will perform its settings, read sensors, and save or transfer data. All this is done in seconds. Afterwards, the circuit cuts off power for a few minutes and then restarts the process.

During the off state, the timer circuit consumes only a few milliamps.

The 555 timer circuit in astable mode is designed to control when the Arduino and its peripherals turn on/off. In an astable circuit, the output voltage continuously alternates between Vcc (+5V) (high state) and GND (0V) (low state). This output is used to drive a relay that will periodically cut off power to the Arduino.

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

The minimum duty cycle for this circuit is 50%. This means that, in the best case, the astable will only cut power to the circuit half the time, which is not enough. So it was decided to add a simple logic inverter (TQ1 and R4) to the output of the timer. In this way, the values ​​of R1, R2, and C1 are chosen such that the duty cycle is approximately 90% (before the logic inverter). After the inverter, the output is ON only 10% of the time. This inverting output is used to drive another transistor (TQ2), which is used to drive a 5V relay (K1), ultimately cutting off power to the Arduino and its peripherals.

Resistors and capacitors of arbitrary values ​​were used in the first simulation to verify the power consumption of the circuit. During the shutdown state, the circuit indicates that it consumes only 0.8 mA. When the circuit is on (for a short time) it draws about 40 mA, which is added to the current drawn by the Arduino (and other peripherals).

It's hard to measure actual values, but the Arduino Uno typically consumes around 52 mA.

Taking these values ​​into account (5 minutes off and 27 seconds on), the Arduino with sleep mode will consume approximately 36 mAh. If a timer switch circuit is used, the power consumption is only about 8 mA. A 77% reduction in power consumption seems good to me. You also have to consider the current consumed by the rest of the electronics (sensors and communication modules) as well as the booster and battery charger to get an accurate current value...

Step 4: Assemble the timer circuit

Assemble the timer circuit according to the schematic diagram.

The following values ​​can be used for the resistors and capacitors to achieve 5 minutes off/27 seconds on time:

R1 = 2 megohms

R2 = 200 kilohms

R4 = 10 ohms

R5 = 10 kilohms

C1 = 200 uF

C2 = 10nF

It is worth noting that I used the normally open (NO) output of the SPDT relay. I realize that some relays only have a normally closed output, although they have the same package and all instructions are the same.

Also note that in the pictures I used different values ​​because I didn't want to wait 5 minutes to see my circuit working.

Pictured is the circuit mounted on a breadboard. I have an input (+5V/GND from the booster) and an output (+5V/GND to the Arduino).

Power the timing circuit, connect the Arduino to it and see if it works. From time to time you will hear the relay being activated.

Step 5: Complete Circuit and Test

Once the timer circuit is working, connect its output to the Arduino 5V and GND pins. It looks like the one in the picture.

The Arduino will power up every 5 minutes for 27 seconds. You can change these values ​​to choose different values ​​for the resistors and capacitors described previously.

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

Step 6: Power Consumption and Run Time

I'd like to make some considerations about power consumption and runtime.

Considering 5 minutes OFF and 27 seconds ON, the power consumption of the circuit + Arduino is as follows:

Without switching circuit (using sleep mode):

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

t (Arduino active) = 27 seconds

ion = 51.7 mA

Toff (arduino off) = 5 minutes = 300 seconds

Ioff = 34.9 mA

Iavg = 36.3 mA

Working 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 hours = 2.5 days

With timer switch circuit:

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

tons (arduino active) = 27 s

ion = 92 mA

Toff (arduino off) = 5 minutes = 300 seconds

Ioff = 0.8 mA

Iavg = 8.2 mA

Working 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 hours = 11 days

The power losses of the TP4056 and the booster are not taken into account here, both of which will certainly shorten battery life.

The important thing to note here is that the timer circuit will also save some energy by reducing sensor power, while sleep mode will continue to reduce microprocessor consumption.

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号