The simplest battery charge level indicator. Battery voltage indicator on LM3914 Voltage indicator 12V

The most surprising thing is that the battery charge level indicator circuit does not contain any transistors, microcircuits, or zener diodes. Only LEDs and resistors connected in such a way that the level of the supplied voltage is indicated.

Indicator circuit

The operation of the device is based on the initial turn-on voltage of the LED. Any LED is a semiconductor device that has a voltage limit point, only exceeding which it begins to work (shine). Unlike an incandescent lamp, which has almost linear current-voltage characteristics, the LED is very close to the characteristics of a zener diode, with a sharp slope of the current as the voltage increases.
If you connect LEDs in a circuit in series with resistors, then each LED will start to turn on only after the voltage exceeds the sum of the LEDs in the circuit for each section of the circuit separately.
The voltage threshold for opening or starting to light an LED can range from 1.8 V to 2.6 V. It all depends on the specific brand.
As a result, each LED lights up only after the previous one lights up.


I assembled the circuit on a universal circuit board, soldering the outputs of the elements together. For better perception, I took LEDs of different colors.
Such an indicator can be made not only with six LEDs, but, for example, with four.
The indicator can be used not only for the battery, but to create a level indication on music speakers. By connecting the device to the output of the power amplifier, parallel to the speaker. This way you can monitor critical levels for the speaker system.
It is possible to find other applications of this truly very simple circuit.

What could be sadder than a suddenly dead battery in a quadcopter during a flight or a metal detector turning off in a promising clearing? Now, if only you could find out in advance how charged the battery is! Then we could connect the charger or install a new set of batteries without waiting for sad consequences.

And this is where the idea is born to make some kind of indicator that will give a signal in advance that the battery will soon run out. Radio amateurs all over the world have been working on the implementation of this task, and today there is a whole car and a small cart of various circuit solutions - from circuits on a single transistor to sophisticated devices on microcontrollers.

Attention! The diagrams presented in the article only indicate low voltage on the battery. To prevent deep discharge, you must manually turn off the load or use.

Option #1

Let's start, perhaps, with a simple circuit using a zener diode and a transistor:

Let's figure out how it works.

As long as the voltage is above a certain threshold (2.0 Volts), the zener diode is in breakdown, accordingly, the transistor is closed and all the current flows through the green LED. As soon as the voltage on the battery begins to drop and reaches a value of the order of 2.0V + 1.2V (voltage drop at the base-emitter junction of transistor VT1), the transistor begins to open and the current begins to be redistributed between both LEDs.

If we take a two-color LED, we get a smooth transition from green to red, including the entire intermediate gamut of colors.

The typical forward voltage difference in bi-color LEDs is 0.25 Volts (red lights up at lower voltage). It is this difference that determines the area of ​​complete transition between green and red.

Thus, despite its simplicity, the circuit allows you to know in advance that the battery has begun to run out. As long as the battery voltage is 3.25V or more, the green LED lights up. In the interval between 3.00 and 3.25V, red begins to mix with green - the closer to 3.00 Volts, the more red. And finally, at 3V only pure red lights up.

The disadvantage of the circuit is the complexity of selecting zener diodes to obtain the required response threshold, as well as constant consumption current is about 1 mA. Well, it is possible that colorblind people will not appreciate this idea with changing colors.

By the way, if you put a different type of transistor in this circuit, it can be made to work in the opposite way - the transition from green to red will occur, on the contrary, if the input voltage increases. Here is the modified diagram:

Option No. 2

The following circuit uses the TL431 chip, which is a precision voltage regulator.

The response threshold is determined by the voltage divider R2-R3. With the ratings indicated in the diagram, it is 3.2 Volts. When the battery voltage drops to this value, the microcircuit stops bypassing the LED and it lights up. This will be a signal that the battery is completely discharged (minimum permissible voltage on one li-ion bank is 3.0 V).

If a battery of several lithium-ion battery banks connected in series is used to power the device, then the above circuit must be connected to each bank separately. Like this:

To configure the circuit, we connect instead of batteries adjustable block power supply and selecting resistor R2 (R4) we ensure that the LED lights up at the moment we need.

Option #3

And here is a simple diagram of a discharge indicator li-ion battery on two transistors:
The response threshold is set by resistors R2, R3. Old Soviet transistors can be replaced with BC237, BC238, BC317 (KT3102) and BC556, BC557 (KT3107).

Option No. 4

A circuit with two field-effect transistors that literally consumes microcurrents in standby mode.

When the circuit is connected to a power source, a positive voltage at the gate of transistor VT1 is generated using a divider R1-R2. If the voltage is higher than the cut-off voltage field effect transistor, it opens and pulls shutter VT2 to the ground, thereby closing it.

IN certain moment, as the battery discharges, the voltage removed from the divider becomes insufficient to unlock VT1 and it closes. Consequently, a voltage close to the supply voltage appears at the gate of the second field switch. It opens and lights up the LED. The LED glow signals to us that the battery needs to be recharged.

Any n-channel transistors with a low cutoff voltage will do (the lower the better). The performance of the 2N7000 in this circuit has not been tested.

Option #5

On three transistors:

I think the diagram needs no explanation. Thanks to the large coefficient. amplification of three transistor stages, the circuit operates very clearly - between a lit and not lit LED, a difference of 1 hundredth of a volt is sufficient. Current consumption when the indication is on is 3 mA, when the LED is off - 0.3 mA.

Despite the bulky appearance of the circuit, the finished board has fairly modest dimensions:

From the VT2 collector you can take a signal that allows the load to be connected: 1 - allowed, 0 - disabled.

Transistors BC848 and BC856 can be replaced with BC546 and BC556, respectively.

Option #6

I like this circuit because it not only turns on the indication, but also cuts off the load.

The only pity is that the circuit itself does not disconnect from the battery, continuing to consume energy. And thanks to the constantly burning LED, it eats a lot.

The green LED in this case acts as a reference voltage source, consuming a current of about 15-20 mA. To get rid of such a voracious element, instead of a reference voltage source, you can use the same TL431, connecting it according to the following circuit*:

*connect the TL431 cathode to the 2nd pin of LM393.

Option No. 7

Circuit using so-called voltage monitors. They are also called supervisors and voltage detectors. These are specialized chips, designed specifically for voltage monitoring.

Here, for example, is a circuit that lights up an LED when the battery voltage drops to 3.1V. Assembled on BD4731.

Agree, it couldn’t be simpler! The BD47xx has an open collector output and also self-limites the output current to 12 mA. This allows you to connect an LED to it directly, without limiting resistors.

Similarly, you can apply any other supervisor to any other voltage.

Here are a few more options to choose from:

  • at 3.08V: TS809CXD, TCM809TENB713, MCP103T-315E/TT, CAT809TTBI-G;
  • at 2.93V: MCP102T-300E/TT, TPS3809K33DBVRG4, TPS3825-33DBVT, CAT811STBI-T3;
  • MN1380 series (or 1381, 1382 - they differ only in their housings). For our purposes, the option with an open drain is best suited, as evidenced by the additional number “1” in the designation of the microcircuit - MN13801, MN13811, MN13821. The response voltage is determined by the letter index: MN13811-L is exactly 3.0 Volts.

You can also take the Soviet analogue - KR1171SPkhkh:

Depending on the digital designation, the detection voltage will be different:

The voltage grid is not very suitable for monitoring li-ion batteries, but I don’t think it’s worth completely discounting this microcircuit.

The undeniable advantages of voltage monitor circuits are extremely low power consumption when turned off (units and even fractions of microamps), as well as its extreme simplicity. Often the entire circuit fits directly on the LED terminals:

To make the discharge indication even more noticeable, the output of the voltage detector can be loaded onto a flashing LED (for example, L-314 series). Or assemble a simple “blinker” yourself using two bipolar transistors.

An example of a finished circuit that notifies of a low battery using a flashing LED is shown below:

Another circuit with a blinking LED will be discussed below.

Option No. 8

A cool circuit that starts the LED blinking if the voltage is on lithium battery will drop to 3.0 Volts:

This circuit causes a super-bright LED to flash with a duty cycle of 2.5% (i.e. long pause - short flash - pause again). This allows you to reduce the current consumption to ridiculous values ​​- in the off state the circuit consumes 50 nA (nano!), and in the LED blinking mode - only 35 μA. Can you suggest something more economical? Hardly.

As you can see, the operation of most discharge control circuits comes down to comparing a certain reference voltage with a controlled voltage. Subsequently, this difference is amplified and turns the LED on/off.

Typically, a transistor cascade or operational amplifier, connected according to the comparator circuit.

But there is another solution. Logic elements - inverters - can be used as an amplifier. Yes, it's an unconventional use of logic, but it works. A similar diagram is shown in the following version.

Option No. 9

Circuit diagram for 74HC04.

The operating voltage of the zener diode must be lower than the circuit's response voltage. For example, you can take zener diodes of 2.0 - 2.7 Volts. Fine adjustment of the response threshold is set by resistor R2.

The circuit consumes about 2 mA from the battery, so it must also be turned on after the power switch.

Option No. 10

This is not even a discharge indicator, but rather an entire LED voltmeter! A linear scale of 10 LEDs gives a clear picture of the battery status. All functionality is implemented on just one single LM3914 chip:

Divider R3-R4-R5 sets the lower (DIV_LO) and upper (DIV_HI) threshold voltages. With the values ​​​​indicated in the diagram, the glow of the upper LED corresponds to a voltage of 4.2 Volts, and when the voltage drops below 3 volts, the last (lower) LED will go out.

By connecting the 9th pin of the microcircuit to ground, you can switch it to point mode. In this mode, only one LED corresponding to the supply voltage is always lit. If you leave it as in the diagram, then a whole scale of LEDs will light up, which is irrational from an economical point of view.

As LEDs you need to take only red LEDs, because they have the lowest direct voltage during operation. If, for example, we take blue LEDs, then if the battery runs down to 3 volts, they most likely will not light up at all.

The chip itself consumes about 2.5 mA, plus 5 mA for each lit LED.

A disadvantage of the circuit is the impossibility of individually adjusting the ignition threshold of each LED. You can set only the initial and final values, and the divider built into the chip will divide this interval into equal 9 segments. But, as you know, towards the end of the discharge, the voltage on the battery begins to drop very rapidly. The difference between batteries discharged by 10% and 20% can be tenths of a volt, but if you compare the same batteries, only discharged by 90% and 100%, you can see a difference of a whole volt!

A typical Li-ion battery discharge graph shown below clearly demonstrates this circumstance:

Thus, using a linear scale to indicate the degree of battery discharge does not seem very practical. We need a circuit that allows us to set the exact voltage values ​​at which a particular LED will light up.

Full control over when the LEDs turn on is given by the circuit presented below.

Option No. 11

This circuit is a 4-digit battery/battery voltage indicator. Implemented on four op-amps included in the LM339 chip.

The circuit is operational up to a voltage of 2 Volts and consumes less than a milliampere (not counting the LED).

Of course, to reflect the real value of the used and remaining battery capacity, it is necessary to take into account the discharge curve of the battery used (taking into account the load current) when setting up the circuit. This will allow you to set precise voltage values ​​corresponding to, for example, 5%-25%-50%-100% of residual capacity.

Option No. 12

And, of course, the widest scope opens up when using microcontrollers with a built-in reference voltage source and an ADC input. Here the functionality is limited only by your imagination and programming ability.

As an example we will give the simplest scheme on the ATMega328 controller.

Although here, to reduce the size of the board, it would be better to take the 8-legged ATTiny13 in the SOP8 package. Then it would be absolutely gorgeous. But let this be your homework.

The LED is a three-color one (from an LED strip), but only red and green are used.

The finished program (sketch) can be downloaded from this link.

The program works as follows: every 10 seconds the supply voltage is polled. Based on the measurement results, the MK controls the LEDs using PWM, which allows you to obtain different shades of light by mixing red and green colors.

A freshly charged battery produces about 4.1V - the green indicator lights up. During charging, a voltage of 4.2V is present on the battery, and the green LED will blink. As soon as the voltage drops below 3.5V, the red LED will start blinking. This will be a signal that the battery is almost empty and it is time to charge it. In the rest of the voltage range, the indicator will change color from green to red (depending on the voltage).

Option No. 13

Well, for starters, I propose the option of reworking the standard protection board (they are also called), turning it into an indicator of a dead battery.

These boards (PCB modules) are extracted from old batteries mobile phones almost in industrial scale. You just pick up a discarded mobile phone battery on the street, gut it, and the board is in your hands. Dispose of everything else as intended.

Attention!!! There are boards that include overdischarge protection at unacceptably low voltage (2.5V and below). Therefore, from all the boards you have, you need to select only those copies that operate at the correct voltage (3.0-3.2V).

Most often, a PCB board looks like this:

Microassembly 8205 is two milliohm field devices assembled in one housing.

By making some changes to the circuit (shown in red), we will get an excellent li-ion battery discharge indicator that consumes virtually no current when turned off.

Since transistor VT1.2 is responsible for turning off charger from the battery bank when recharging, then it is superfluous in our circuit. Therefore, we completely eliminated this transistor from operation by breaking the drain circuit.

Resistor R3 limits the current through the LED. Its resistance must be selected in such a way that the glow of the LED is already noticeable, but the current consumed is not yet too high.

By the way, you can save all the functions of the protection module, and make the indication using a separate transistor that controls the LED. That is, the indicator will light up simultaneously with the battery turning off at the moment of discharge.

Instead of 2N3906, any low-power one at hand will do. pnp transistor. Simply soldering the LED directly will not work, because... The output current of the microcircuit that controls the switches is too small and requires amplification.

Please take into account the fact that the discharge indicator circuits themselves consume battery power! To avoid unacceptable discharge, connect indicator circuits after the power switch or use protection circuits, .

As is probably not difficult to guess, the circuits can be used vice versa - as a charge indicator.


Content:

LEDs have long been used in various fields life and activities of people. Due to their qualities and technical characteristics, they have gained wide popularity. Based on these light sources, original lighting designs are created. Therefore, many consumers quite often have the question of how to connect an LED to 12 volts there. This topic is very relevant, since such a connection has fundamental differences from other types of lamps. Please note that LEDs only use D.C.. Great importance has to observe polarity when connecting, otherwise the LEDs simply will not work.

Features of connecting LEDs

In most cases, plug-in LEDs require current limiting using resistors. But sometimes it is quite possible to do without them. For example, flashlights, keychains and other souvenirs with LED bulbs powered by batteries connected directly. In these cases, the current limitation occurs due to the internal resistance of the battery. Its power is so low that it is simply not enough to burn the lighting elements.

However, if connected incorrectly, these light sources burn out very quickly. A rapid drop is observed when normal current begins to act on them. The LED continues to glow, but it can no longer fully perform its functions. Such situations occur when there is no limiting resistor. When power is applied, the lamp fails in just a few minutes.

One of the options for incorrect connection to a 12-volt network is to increase the number of LEDs in the circuits of more powerful and complex devices. In this case, they are connected in series, based on the battery resistance. However, if one or more light bulbs burn out, the entire device fails.

There are several ways to connect 12 volt LEDs, the circuit of which allows you to avoid breakdowns. You can connect one resistor, although this does not guarantee stable operation of the device. This is due to significant differences in semiconductor devices, despite the fact that they may be from the same batch. They have their own technical characteristics, differ in current and voltage. If the current exceeds the rated value, one of the LEDs may burn out, after which the remaining light bulbs will also fail very quickly.

In another case, it is proposed to connect each LED with a separate resistor. It turns out to be a kind of zener diode that ensures correct operation, since the currents become independent. However, this scheme turns out to be too cumbersome and overly loaded with additional elements. In most cases, there is nothing left to do but connect the LEDs to 12 volts there in series. With this connection, the circuit becomes as compact as possible and very efficient. For her stable operation care should be taken to increase the supply voltage in advance.

LED Polarity Determination

To solve the question of how to connect LEDs to a 12 volt circuit, you need to determine the polarity of each of them. There are several ways to determine the polarity of LEDs. A standard light bulb has one long leg, which is considered the anode, that is, the plus. The short leg is the cathode - a negative contact with a minus sign. The plastic base or head has a cut indicating the location of the cathode - minus.

In another method, you need to carefully look inside the glass bulb of the LED. Can be easily seen thin contact, which is a plus, and a contact in the form of a flag, which, accordingly, will be a minus. If you have a multimeter, you can easily determine the polarity. You need to set the central switch to the dialing mode, and touch the contacts with the probes. If the red probe touches the positive, the LED should light up. This means the black probe will be pressed to the minus.

However, if the light bulbs are incorrectly connected for a short time with the wrong polarity, nothing bad will happen to them. Each LED can only work in one direction and failure can only occur if the voltage increases. The nominal voltage value for a single LED is from 2.2 to 3 volts, depending on the color. When connected LED strips and modules operating from 12 volts and above, resistors must be added to the circuit.

Calculation of LED connections in 12 and 220 volt circuits

A separate LED cannot be connected directly to a 12V power source because it will burn out immediately. It is necessary to use a limiting resistor, the parameters of which are calculated using the formula: R= (Upit-Upad)/0.75I, in which R is the resistance of the resistor, Upit and Upad are the supply and drop voltages, I is the current passing through the circuit, 0.75 - LED reliability coefficient, which is a constant value.

As an example, we can take the circuit used to connect 12-volt LEDs in a car to a battery. The initial data will look like this:

  • Upit = 12V - voltage in the car battery;
  • Upad = 2.2V - LED supply voltage;
  • I = 10 mA or 0.01A - current of a separate LED.

According to the formula above, the resistance value will be: R = (12 - 2.2)/0.75 x 0.01 = 1306 ohms or 1.306 kohms. Thus, the closest would be a standard resistor value of 1.3 kOhm. In addition, you will need to calculate the minimum resistor power. These calculations are also used when deciding how to connect powerful LED to 12 volts there. The actual current value is preliminarily determined, which may not coincide with the value indicated above. For this, another formula is used: I = U / (Rres. + Rlight), in which Rlight is the resistance of the LED and is defined as Up.nom. / Inom. = 2.2 / 0.01 = 220 Ohm. Therefore, the current in the circuit will be: I = 12 / (1300 + 220) = 0.007 A.

As a result, the actual voltage drop of the LED will be equal to: Udrop.light = Rlight x I = 220 x 0.007 = 1.54 V. The final power value will look like this: P = (Usupply - Udrop)² / R = (12 - 1.54)²/ 1300 = 0.0841 W). For practical connection, it is recommended to increase the power value slightly, for example to 0.125 W. Thanks to these calculations, it is possible to easily connect an LED to a 12 volt battery. Thus, to correctly connect one LED to car battery at 12V, the circuit will additionally need a 1.3 kOhm resistor, the power of which is 0.125 W, connected to any LED contact.

The calculation is carried out according to the same scheme as for 12V. As an example, we take the same LED with a current of 10 mA and a voltage of 2.2V. Since the network uses alternating current with a voltage of 220V, the calculation of the resistor will look like this: R = (Up.-Up.) / (I x 0.75). By inserting all the necessary data into the formula, we get real value resistance: R = (220 - 2.2) / (0.01 x 0.75) = 29040 Ohm or 29.040 kOhm. The closest standard resistor value is 30 kOhm.

Next, the power calculation is performed. First, the value of the actual consumption current is determined: I = U / (Rres. + Rlight). The LED resistance is calculated using the formula: Rlight = Upd.nom. / Inom. = 2.2 / 0.01 = 220 Ohm. Therefore, the current in the electrical circuit will be: I = 220 / (30000 + 220) = 0.007A. As a result, the actual voltage drop across the LED will be as follows: Udrop.light = Rlight x I = 220 x 0.007 = 1.54V.

The formula is used for determination: P = (Upit. - Upad.)² / R = (220 -1.54)² / 30000 = 1.59 W. The power value should be increased to the standard 2W. Thus, to connect one LED to a 220V network, you will need a 30 kOhm resistor with a power of 2W.

However, alternating current flows in the network and the light bulb will burn in only one half-phase. The light will flash quickly at 25 flashes per second. For the human eye, this is completely invisible and is perceived as a constant glow. In such a situation, reverse breakdowns are possible, which can lead to premature failure of the light source. To avoid this, a reverse directional diode is installed to ensure balance in the entire network.

Connection errors

12V batteries are very popular (usually sealed lead acid battery capacity 7 Ah). I have tried several times to create a modern custom state of charge (SOC) meter that displays voltage levels using LEDs. However, each client requires its own functionality from such a device, and the differences often lie in the requirement to display the minimum and maximum voltage values.

If you need to provide an audible warning when reaching low level voltage, then three voltage levels need to be monitored. The standard method uses potentiometers for adjustment, but if there is a need for a second and third audible warning, then this method becomes unacceptable.

During testing, it turned out that the current range in the circuits is from 45 mA to 150 mA. The standard LM3914 battery monitor discharges a 7 Ah battery within 46 hours.

Target of this project– create a battery indicator with the following components and characteristics:

  • Led indicator
  • Adjustable maximum voltage level
  • Adjustable minimum voltage level
  • 3 adjustable alarm threshold levels (typically 50%, 30%, 20%)
  • The sound alarm should not be annoying and should have a mute function
  • Minimum number of buttons
  • Low power consumption.

For this project I used the ATmega328P micro microcontroller.

Step 1: LED Indicator

The project uses a simple and convenient LED indicator. The bar indicator has 6 LEDs that indicate different voltage levels:

  • LED 6 - 100%
  • LED 5 - 80%
  • LED 4 - 60%
  • LED 3 - 40%
  • LED 2 - 20%
  • LED 1 - 0%

The 0% LED is programmatically linked to the minimum voltage level.
The LED is 100% software linked to maximum level voltage.

The display scale between 0% and 100% is linear. At 0%, only LED 1 will be lit, and at 100%, all LEDs will be lit.

To save energy, the LED indicator is not always on. To turn on the indicator, you need to press the button, and after 30 seconds the indicator will automatically turn off.

Step 2: Voltage and Alarm Levels

For precise measurement voltage, you need to lower the battery voltage. For this purpose, a voltage divider is used, which reduces the voltage to 1.1 V using resistors with a nominal value of 1 mOhm and 82 kOhm. Since the ADC's internal voltage reference is set to 1.1V, this will allow comparison and measurement of a maximum voltage of up to 14.45V.

It is necessary to monitor 5 voltage levels:

  • Maximum voltage level
  • Minimum voltage level
  • 1 level undervoltage alarm
  • Low voltage alarm level 2
  • Level 3 undervoltage alarm

Instead of using potentiometers, I decided to use an unusual method. Using a software routine, I recorded the voltage levels and stored various A/D conversion results into EEPROM memory.

The indicator LEDs display the program sequence. Only one button is used to turn on the LEDs and enter programming mode.

Step 3: Sound Alarm

A standard piezo beeper is used to produce a sound signal. The system provides three levels of emergency sound signal:

  • Alarm 1 beeps once for a few seconds. This type sound signal ization can be disabled.
  • Alarm 2 beeps twice within a few seconds. This type of audible alarm can be disabled.
  • Alarm 3 beeps three times within a few seconds. This type of audible alarm cannot be disabled.

If the alarm is turned off, you can activate the auto reset feature to turn the alarm back on when the battery is fully charged. I used the reset feature, which reactivates the audible alarm if the battery voltage level exceeds 60%.

Step 4: Minimum number of buttons

All functions are performed using one button.

Indicator

Press the button to turn on the indicator. The LED indicator will turn on and turn off automatically after 30 seconds.

Signaling

The button allows you to turn off the sound in Alarm 1 and 2 modes.

Programming

To enter programming mode, press and hold the button for 5 seconds while power is applied to the device.

Step 5: Low Power Consumption

There are several ways to reduce device power consumption:

Indicator

The LED indicator is not constantly on (it can be turned on using a button, after which it will automatically turn off after 30 seconds). As a result, 120 mA can be saved.

Microcontroller supply voltage

The ATmega328P microcontroller operates at 5 V and consumes significantly more than at 3.3 V. Therefore, I optimized the voltage to 3.3 V using a buck regulator.

Voltage regulator

A standard 7805 regulator consumes about 20 mA of current. When using the 78L05 IC, the current consumption is 3.5 mA. However, when using the LP2950 3.3V, the current consumption drops to 0.1mA.

Clock frequency selection

Judging by the ATm ega328P datasheet, current consumption can be reduced from 10 mA to 1 mA by selecting an internal clock generator of 8 MHz, compared to the standard frequency of 16 MHz.

I chose a clock speed of 8 MHz for the project for the best speed/performance ratio. However, to do this it is necessary to reprogram the ATm ega328P configuration registers using .

Note:
If you don't want to change fuses, then the microcontroller will run at 16 MHz. Please change the delay() and Millis() values ​​to actual values ​​in ms.

Sleeping mode

By putting the AtMega328P microcontroller into sleep mode, you can also save energy. In this mode, most microcontrollers turn off interface units, which allows reducing current consumption to 0.001 mA. However, in this mode the microcontroller no longer works, and in our case, does not measure voltage.

A watchdog timer is used to wake up the microcontroller from sleep mode. Setting a timer to wake up the microcontroller every 8 seconds will significantly reduce power consumption.

Energy saving results

Using the above techniques, the power consumption of the circuit was reduced from 80 mA to 0.12 mA when the device was in sleep mode. On average, the circuit consumes 0.28 mA.

Without the use of energy-saving functions, the circuit discharges a 7 Ah battery in approximately 2.8 days. When using energy-saving features, the same battery will run out after 3.5 years.

Step 6: Outline

To design the PCB I used free version. All components, with the exception of the push button, are installed on printed circuit board. Assembly of the device does not pose any problems, with the exception of the LEDs. They must be precisely positioned at the same distance.

Since the circuit is powered at 3.3 V, some piezo buzzers designed for 5 V do not work. Therefore, the tweeter needs to be connected to a 12 V voltage source and controlled via a transistor. Select the value of resistor R6 to obtain good sound.

Step 7: Calibrate the Device

To calibrate the device, you must use a source adjustable voltage and a multimeter.

Entering calibration mode

Press and hold the button
- Connect the device to a power source
- After 5 seconds the device will emit a continuous beep
- Release the button
- The device will emit 6 beeps (maximum voltage is set)
- The top LED will light up
- The device has entered calibration mode. To exit the mode, turn off the power without pressing the button.
- Adjust the power supply output to maximum output voltage, displayed on the LED indicator (typically 12.7 V)
- Click the button
- The device will emit 5 beeps (minimum voltage is set)
- The lowest LED will light up
- Adjust the power supply output to the minimum output voltage shown on the LED indicator (usually 11.8V)
- Click the button
- The device will emit 4 beeps (setting Alarm 1)
- The 4 lower LEDs will light up
- Adjust the power supply output to Alarm 1 voltage level (typically 12.4 V)
- Click the button
- The device will emit 3 beeps (setting Alarm 2)
- The 3 lower LEDs will light up
- Adjust the power supply output to Alarm 2 voltage level (typically 12.2 V)
- Click the button
- The device will emit 2 beeps (setting Alarm 3)
- In this case, the 2 lower LEDs will light up
- Adjust the power supply output to Alarm 3 voltage level (typically 12.0 V)
- Click the button
- Next, the device will emit 1 beep, which means the end of the calibration procedure. The LED indicator will light up for 30 seconds.

All programmed values ​​are stored in EEPROM memory, so calibration is carried out only once.

List of radioelements

Designation Type Denomination Quantity NoteShopMy notepad
IC1 MK AVR 8-bit

ATmega328P

1 To notepad
IC2 Linear regulator

LP2950-33

1 To notepad
Q1 Bipolar transistor

MMBT2222A

1 To notepad
LED1-LED3 Light-emitting diodeGreen3 To notepad
LED4 Light-emitting diodeYellow1 To notepad
LED5, LED6 Light-emitting diodeRed2 To notepad
C1, C2 Capacitor0.1 µF2 To notepad
C3, C4 Capacitor 2 To notepad
R1 Resistor

1 MOhm

1 1% To notepad
R2 Resistor


If you find an error, please select a piece of text and press Ctrl+Enter.