Voltage comparisons - Page 1
Forum section: electronics / beginners

author: fsleeman
author_rank: Regular Contributor
timestamp: April 19, 2010, 06:47:42 pm
content: I was planning on making a simple circuit to test the voltage of rechargeable and non-rechargeable AA batteries and am wondering what is the best way to determine if a battery is less than some know voltage. My plan is to have three LEDs showing the relative voltage level and to have a switch to change between checking 1.5V and 1.2V batteries.The LM339 seems like a option but it looks like it wouldn't work with voltages less than 1 or 2 volts. Is there a similar product that works down to around 0.8V? The first way that occurred to me was to bias the base of switching transistors but ran into a problem when trying to divide the 5V source three ways cleanly. I am figuring there probably is a totally different solution that would work better. Still trying to learn about all the IC's out there.

author: Simon
author_rank: Unknown
timestamp: April 19, 2010, 09:09:23 pm
content: your best bet is to use an indipendant supply, you will need a reference voltage. if you want to use the same circuit for 1.2 and 1.5 voltage batteries and are assuming the same percentages of voltage for the same percentages of charge then use two potential dividers with different ratios to make the 1.2 and 1.5 volt ratios the same. Another option is the use of a microcontroller as you could use the onboard ADC,use an external voltage reference and set different parameters in the software

author: djsb
author_rank: Super Contributor
timestamp: April 19, 2010, 09:53:28 pm
content: Hi,Maybe this circuit can be adaptedhttp://kd1jv.qrpradio.com/batmon/batmon.HTMDavid.

author: fsleeman
author_rank: Regular Contributor
timestamp: April 19, 2010, 11:11:03 pm
content: I think I misread the data sheet the first time I saw it. It looks like its the supply voltage that goes down to 2V and the input voltage actually goes from -0.3V to VCC. I did think about using an microcontroller ADC but it just seemed like overkill for something that is really so simple.

author: Simon
author_rank: Unknown
timestamp: April 20, 2010, 06:29:52 am
content: why is a uc overkill ? it gives huge flexibility and would practically eliminate the need for most external parts

author: fsleeman
author_rank: Regular Contributor
timestamp: April 20, 2010, 02:28:26 pm
content: Its true that I could get away with a couple fewer parts but I believe the hardware solution is simpler and cheaper. I have done a lot more software than hardware so I am using projects like this to increase my understanding. Most of the projects I am working on will be using uc's but since this thing is supposed to do just one thing I don't really care about extensibility. Plus, using a comparator will probably use less power.

author: Simon
author_rank: Unknown
timestamp: April 20, 2010, 04:15:58 pm
content: then you need two selectable resistor networks.

author: fsleeman
author_rank: Regular Contributor
timestamp: May 08, 2010, 12:46:10 am
content: Quote from: Simon on April 20, 2010, 04:15:58 pmI got a 339 and using a resistor network got it working on my breadboard. One thing I noticed was that if my reference voltage was on the + pin and the battery was on the - pin, the output is grounded when the - pin is floating, i.e. no battery connected. This would make LEDs connected to the output pins to be turned on when the input battery was missing. Is there a simple way to have the LEDs off until an actual voltage is present? Using transistors or inverters would work but would be a bunch of parts and wiring, it seems like something much more simpler would work. What about connecting the - pin to ground with a large value resistor?

author: marianoapp
author_rank: Regular Contributor
timestamp: May 08, 2010, 02:44:15 am
content: did you add a pull-up resistor on the output pin?

author: fsleeman
author_rank: Regular Contributor
timestamp: May 08, 2010, 04:13:32 am
content: Nope, but when I did that fixed the problem. Like I mentioned in my earlier post, I was thinking about a pull-down resistor but wasn't thinking about it correctly. Thanks for the advice, this all makes sense now.

author: Simon
author_rank: Unknown
timestamp: May 08, 2010, 05:40:47 am
content: the comparator output is simply the collector of a BJT with a grounded emitter, if you don't take that into account weird things will happen