element
Newbie level 5

I need to monitor voltages of Li-Ion cells stacked in series and appropriately operate protection circuitry using Arduino.
1. First I ran into the problem of using <10kOhm resistors for a voltage divider as per the ATmega328 datasheet because when I tried to use large value resistors the readings were jumping a lot even though I took mode of 5 analog readings in the software...
2. Then there is this problem of fluctuating Vcc of the arduino which is used as Vref for analog measurements...So, I decided to switch to the internal 1.1V which actually turned out to be 1.085V for my board....this gave nice results when I measured across each ResistorDivider separately...but when I try to measure the voltages of all the cells in series at the same time and subtracting them in the software to get each cell's voltage...1st two cell voltages were fine...but the third was always problematic...i tried to change the Arduino board..double checked all connections...but still it gave abnormal readings....although the same resistor divider when checked separately was working correctly for 3 cells....
3. I decided to use a difference amplifier...used an LM324N opamp and made a difference amplifier...but the problem is even though I connected 0-9V at its across its rails..and tried to measure a cell that has voltage of 3.66V...the output pin of the 324N gave 3.33V.....so I thought maybe it gives an output of (3.66-3.33)= 0.33V....but for the other cell this subtraction factor changed....
SOOO... what should I do.. should I use precision resistors or some Precision Difference Amp like INA154 or INA133 (would they give accurate output voltages when I have enough supply on the rails)??
I am stuck with this voltage measurement problem! :-x
PS: I tried to use the AREF pin and supplied it through LM7805..but when I connect the Output of 7805 to the AREF pin...the voltage drops from 4.99 to some 3.XX....now what's that? I am really a noob at electronics..don't know much
1. First I ran into the problem of using <10kOhm resistors for a voltage divider as per the ATmega328 datasheet because when I tried to use large value resistors the readings were jumping a lot even though I took mode of 5 analog readings in the software...
2. Then there is this problem of fluctuating Vcc of the arduino which is used as Vref for analog measurements...So, I decided to switch to the internal 1.1V which actually turned out to be 1.085V for my board....this gave nice results when I measured across each ResistorDivider separately...but when I try to measure the voltages of all the cells in series at the same time and subtracting them in the software to get each cell's voltage...1st two cell voltages were fine...but the third was always problematic...i tried to change the Arduino board..double checked all connections...but still it gave abnormal readings....although the same resistor divider when checked separately was working correctly for 3 cells....
3. I decided to use a difference amplifier...used an LM324N opamp and made a difference amplifier...but the problem is even though I connected 0-9V at its across its rails..and tried to measure a cell that has voltage of 3.66V...the output pin of the 324N gave 3.33V.....so I thought maybe it gives an output of (3.66-3.33)= 0.33V....but for the other cell this subtraction factor changed....
SOOO... what should I do.. should I use precision resistors or some Precision Difference Amp like INA154 or INA133 (would they give accurate output voltages when I have enough supply on the rails)??
I am stuck with this voltage measurement problem! :-x
PS: I tried to use the AREF pin and supplied it through LM7805..but when I connect the Output of 7805 to the AREF pin...the voltage drops from 4.99 to some 3.XX....now what's that? I am really a noob at electronics..don't know much