Discussion in 'The Projects Forum' started by axeman22, Oct 5, 2009.

1. ### axeman22 Thread Starter Active Member

Jun 8, 2009
53
0
Hi,

all things being equal I plan to make the LED flash in accordance with the battery voltage reading - i.e. display battery voltage in morse code or similar.

appreciate all ideas!

Thanks,

Ian

File size:
26.4 KB
Views:
130
2. ### JDT Well-Known Member

Feb 12, 2009
658
85

I would start by putting a simple voltage divider across your 12V supply. Lets assume that both resistors in this divider are equal. Also assume, to keep things simple, that you want to monitor the battery voltage between +10 and +15V. The output of the divider over this range will be +5 to +7.5V.

Lets construct an inverting amplifier with a gain of 2 (strictly an amplifier with a gain of -2). Reference it to +5V. It's output swing with an input of +5V to +7.5V will be +5V to 0V. (Input swing +2.5V, output swing -5V)

The equivalent output resistance of your potential divider when both resistors = R will be R/2. So, you can combine your potential divider and the inverting amplifier input resistor.

Producing the final complete circuit. All the resistors are equal! Wow!

Of course the ADC input voltage is "upside down" but that's easy to sort out in software. The fact is you will probably have some thresholds for battery "high", "normal", "poor", "runout", etc. These are just binary numbers after all!

See the attached diagram.

Edit: to get your amplifier output to go up to +5V, the amplifier power needs to come direct from the battery.

• ###### InvertingAmplifier.png
File size:
14.4 KB
Views:
85
Last edited: Oct 5, 2009
3. ### MikeML AAC Fanatic!

Oct 2, 2009
5,450
1,066
Also, remember that the ADC reading is ratiometric with respect to the 5V Vdd. The accuracy of the ADC reading is no better than the accuracy of the 5V reference. Depending on your accuracy requirements, you might need a more precise 5V supply than just a typical LMxxx05.

4. ### kcarring Member

Jan 22, 2011
38
0
I am also trying to put together such a circuit. Quite surprised there are so few links, you'd think a few more out there would be using PICAXE to monitor battery voltages and do actions, with results... anyway...

Mike: Do you mean that the LMxxx05 reference, itself, will drop, while the battery drops? Are you suggesting that the power supply for the PICAXE be constant voltage with buck boost?

In my situation I hope to (eventually) have a circuit that will "aim" my solar charge controller at multiple battery banks, deciding which "bank" needs a charge, the most. Eventually I would have a microprocessor do load shifting to the best available bank, too.

If you are wondering why... I get a lot of free batteries (A LOT). Thousands of dollars worth. DEcommissioned deep cycle cells from radio communication towers; they get swapped out on a routine schedule - not based on their condition. So they are very useful to me, and it saves me THOUSANDS of dollars.

Problem is, it doesn't make sense to just "gang 'em up, as they arrive"...
They vary in capacity, and condition. After desulphation most are very serviceable, but that doesn't mean I want to just start "paralleling them" till the cows come home - that has proven to not work out well.

Thanks for any help.

To keep things simple I think I must tackle the monitor aspect first and forget the rest; that will come later.

So, I need to?
1. Learn the voltage divider circuit, and test it to make sure I am -never- sending higher than 5v to the ADC input?
2. Make sure that the PICAXE always has a steady voltage, via a constant voltage supply?

Is this the logical start?

Thanks