element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Open Source Hardware
  • Technologies
  • More
Open Source Hardware
Blog Low Battery Warning Indicator
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Open Source Hardware requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 22 Sep 2020 3:10 AM Date Created
  • Views 2377 views
  • Likes 18 likes
  • Comments 15 comments
  • low voltage
  • tl431
  • low voltage alert
  • battery warning
Related
Recommended

Low Battery Warning Indicator

shabaz
shabaz
22 Sep 2020

Introduction

I like building battery-powered circuits, but always in the back of my mind is the thought that I really ought to provide a ‘low-battery’ indication! Since it isn’t usually a core feature of the project, it often gets forgotten. This ultra-short blog post describes my attempt at a generic low-battery indicator that could (hopefully) be reused for many projects.

 

What does it do?

This circuit alerts the user when the battery needs changing or charging. I have chosen the simplest way of determining that the battery capacity is low, and that’s using the battery terminal voltage.

 

A couple of circuits are described here. One of them lights up a warning LED whenever the voltage drops below a certain value. The other circuit can be used to replace the typical power-on LED. The behavior, in that case, is to use the LED as a normal power-on indicator, but begin to flash when the battery voltage is low. In other words, the LED should permanently light up when the circuit is powered on and the battery is good. When the battery is bad, the LED should flash.

 

The design here avoids using a microcontroller, but if a microcontroller exists in the project then using that could be the most economical and effective way, especially if a comparator or other analog input peripheral is built-in to the microcontroller chip. The circuits in this blog post are more useful for a purely analog design, especially low-noise projects.

 

Basic Circuit

There are many ways to implement a low-battery indicator circuit. This circuit is very low-cost, it uses the TL431 integrated circuit, which costs as little as $0.10 in quantities of a few hundred. The TL431 is a component with dozens of example use-cases, it's extremely versatile, and comes in more than half a dozen different packages, from through-hole varieties to surface-mount SOT-23.

The programmed voltage is achieved using the potential divider circuit created by R1 and R2. The entire circuit is fairly accurate while still being low-cost, based on the premise that modern resistors are low-cost and accurate too, and that combined with the TL431 internal reference voltage (2.5V) should work for providing a low voltage indicator that is ‘good enough’.

 

The formula for calculating the resistor value is:

where Vref is 2.5V and Vcutoff is the desired threshold voltage for the alert indication. There is an Excel file attached to this blog post below, which can be used to quickly calculate the right resistance values.

 

Flashing LED Circuit

The circuit here keeps the low-cost theme going, by using a jellybean op-amp to implement a flashing LED.

 

Reading from right-to-left, op-amp U2B is unused (you could use a single op-amp chip if desired, but the LM2904 dual op-amp is cheap!). Next, op-amp U2B implements an oscillator circuit and the LED blinking rate can be varied by adjusting C2 or R7. The values in the diagram will implement a slow 1 Hz blink rate.

 

The circuit on the left is identical to the earlier simpler circuit, except that a PNP transistor is used to gate the oscillator. When the voltage is higher than the programmed threshold, transistor Q1 conducts and the oscillator does not run and the LED stays lit. When the voltage is lower than the threshold, the capacitor C2 can charge/discharge and the LED will blink. I like this circuit because it saves having to drill two holes for a power-on LED and a low-battery LED!

 

Circuit Adjustments

The circuit can function from 3V up to 26V or even higher (depending on the chosen op-amp). Here’s the detail on the adjustments that should be done to suit any particular needs.

 

Firstly, size the LED resistor (R5 or R8, depending on if you're using the simple or the flashing LED circuit) appropriately. The value in the diagram (1k) will probably work across the entire 3-26V range, but the LED may be extremely brightly lit at very high voltages, and dimly lit at very low voltages. 1k ohm is a good starting point. High-efficiency red LEDs are a good choice too.

 

Next, change the value of resistor R1, to suit the desired low-voltage indication threshold, using the formula mentioned earlier. There is a downloadable Excel file attached to this blog post, to make the calculation easier.

 

To change the blink rate, R7 can be modified. A lower value will result in a faster blink rate. A smaller capacitance value for C2 will also result in a faster blink rate.

 

Summary

These were a fairly trivial couple of circuits, but it solves what is perhaps a common problem, and it will hopefully enable battery-powered projects to be a bit more complete!

Attachments:
low-volt-tl431-calculator.xlsxlow-volt-tl431-calculator.xlsx
Anonymous

Top Comments

  • shabaz
    shabaz over 1 year ago in reply to genebren +5

    Hi Gene,

     

    Thanks! I forget to use it often too, but it's a really convenient part when I remember about it!

    This was a ultra-low-cost charger (5mA so not particularly fast, but that was ok for the use…

  • jw0752
    jw0752 over 1 year ago +4

    Hi Shabaz,

     

    Great spin off of the Amplifier Blog. You are providing lots of building blocks for anyone who likes to imagine and build their own projects.

     

    John

  • navadeepganeshu
    navadeepganeshu over 1 year ago +4

    Well depicted.

    I always love these kind of basic highly functional op-amp circuit applications and this is well explained. I feel, all challenges can be encountered and exiting applications can be created…

  • phoenixcomm
    phoenixcomm over 1 year ago

    shabaz my analog knowledge is very limited. Great Job.

    ~~Cris

    • Cancel
    • Up +2 Down
    • Reply
    • More
    • Cancel
  • BigG
    BigG over 1 year ago in reply to shabaz

    That's helped unravel my jumbled up thinking. Super pleased. Thanks.

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
  • shabaz
    shabaz over 1 year ago in reply to BigG

    Hi Colin,

     

    I think there's no problem of accuracy comparing the microcontroller internal comparator or ADC versus the external one, for the purposes of low-battery monitoring via voltage measurement, they will both result in more than accurate results, so if the microcontroller already has it, it will be lower cost to use that, than to find an external ultra-low-power device (although as mentioned, you could turn it on and off for periods only when you wish to check the voltage, to save power). However if you wish to provide a low battery indication even when the microcontroller cannot function due to the very low voltage, then an external circuit is needed.

    The fuel guage method is more involved, and tries to provide a more granular value (like 0-100%) which isn't feasible with just directly measuring the battery terminal voltage. It's mostly seen with rechargeable batteries. There's some info in a Roadtest from a couple of years ago, here: MAX17260GEVKIT# Fuel Gauge EVM - Review

    The microcontroller reset type of power monitor you mention is used to reset the microcontroller properly, and handle brownout situations by holding the microcontroller in reset during that period too. While it could be used as a voltage monitor for driving an LED, it will be hard-coded to a voltage (although some may have adjustment capability, but I've not checked). I think it's hard to make that a general solution, and would require a potential divider too, since the battery voltage may likely not be in the range of the chip.

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
  • BigG
    BigG over 1 year ago in reply to shabaz

    Hi Shabaz

     

    Thanks for clarifying. That has really helped me solidify my understanding (not being an electronic engineer). At least I got one part right - your circuit consumes mA so not suitable for low power apps. Unfortunately, I'm one of these people who needs a full understanding of all the options... hence more questions.

     

    Anyway, based on your response, I'm assuming you replied to an email notification rather than directly on the e14 website as I had listed a few comparators in reply to Gene's response and wondered whether they were suitable. Your response at least confirmed that these would be useful for micropower applications. So that's good. I'm assuming the decision I would need to make would be based on the accuracy you want from a comparator (interval micro option vs chip) and then consider the sleep current from either option.

     

    You mentioned battery 'fuel gauge' chips. Are there any that you consider suitable for low power coin cell battery operation.

     

    I had also spotted these nano power supervisor chips by Maxim:

    https://www.maximintegrated.com/en/products/power/supervisors-voltage-monitors-sequencers/MAX16056.html

     

    But I could not fathom what they actually do as they seemed to be linked to trigger a reset - but maybe this is because I did not fully understand Maxim's documentation (in summary it notes "nanoPower Supervisors are ultra-low 125nA current microprocessor supervisory circuits that monitor a single system supply voltage and feature capacitor-adjustable reset and watchdog timeouts."). So my take was these are somehow used in a watchdog function to reset your micro in case your micro gets stuck somehow. So not really suitable to tell you if your battery was low. I was not sure.

     

    Thanks.

     

    Colin

    • Cancel
    • Up +2 Down
    • Reply
    • More
    • Cancel
  • shabaz
    shabaz over 1 year ago in reply to BigG

    Hi Colin,

     

    I agree with Gene, if the microcontroller is already available, then it may have an ADC or comparator as an integrated peripheral, allowing the measurement to be done with a couple of resistors, and then you can conserve power by only sampling at certain periods (for instance).

    The suggestions in this blog post are more suited for circuits that consume a few mA or more of current, and not really for micropower or long standby time with power applied, where a microcontroller controlled indicator might be better. For microcontrollers intended for low power battery use, they will usually have the comparator built-in, or an ADC with enough channels to use one for this purpose. The voltage measurement method is crude anyway, so there may be a separate battery 'fuel gauge' chip anyway.

    If it were a micropower non-microcontroller circuit, there are some really neat ultra-low-power (hundreds of nA current consumption) and sub-1V supply comparators and op-amps, but they might cost a lot (I have not checked) for the needs of a low-battery indicator for the average project maybe. With them, depending on the need, either a potential divider might be feasible, or a ultra-low-power voltage reference, so that's an additional cost too. The methods in the blog post are low-cost, the total cost of the parts might be £0.50 in even fairly small quantities (few hundred or so).

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
>
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube