Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Detecting individual cell voltages of a LiPo

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
5 postsPage 1 of 1
5 postsPage 1 of 1

Detecting individual cell voltages of a LiPo

Post by ksamay » Tue Mar 10, 2009 12:57 pm

Post by ksamay
Tue Mar 10, 2009 12:57 pm

Hi,

I was planning to read the individual cell voltages of a 11.1V (3 cell ) Lipo using the the balancer tab, so as to shut down the system incase any of the cells drops below 3V under load.

My basic approach is to connect 3 cells to individual analog input(ADC) pins of a Atmega 168 ( running at 5V).

I need some help with the electronics involved.

My thought is that the voltage should not be a problem as the max voltage of individual cell is 4.2V ( below the 5 V adc limit).

But the current might be , as the ADC pins have a 20 mA limit.

Any suggestions ?
Hi,

I was planning to read the individual cell voltages of a 11.1V (3 cell ) Lipo using the the balancer tab, so as to shut down the system incase any of the cells drops below 3V under load.

My basic approach is to connect 3 cells to individual analog input(ADC) pins of a Atmega 168 ( running at 5V).

I need some help with the electronics involved.

My thought is that the voltage should not be a problem as the max voltage of individual cell is 4.2V ( below the 5 V adc limit).

But the current might be , as the ADC pins have a 20 mA limit.

Any suggestions ?
ksamay
Robot Builder
Robot Builder
Posts: 13
Joined: Tue Oct 28, 2008 5:55 am

Post by RandomMatt » Tue Mar 10, 2009 8:45 pm

Post by RandomMatt
Tue Mar 10, 2009 8:45 pm

I think you are mistaken... if you are using the ADC pins as general IO then yes, 20ma is your limit. But you are going to use them as ADC inputs. A quick glance at the datasheet I have to hand (for a 164p - value is called R_AIN) shows the input resistance of the ADC pin at 100Mohms - so you needn't worry about it drawing any current when in ADC mode.

But... software errors do happen (say, using the pin as an output). So, if you want to be sure your safe, use a current limiting resistor... I think that you only need a resistor of 220ohms (or more) to do it - but feel free to go for whatever you have lying around.

V=IR says... 220ohm = 4.4v / 20ma
I think you are mistaken... if you are using the ADC pins as general IO then yes, 20ma is your limit. But you are going to use them as ADC inputs. A quick glance at the datasheet I have to hand (for a 164p - value is called R_AIN) shows the input resistance of the ADC pin at 100Mohms - so you needn't worry about it drawing any current when in ADC mode.

But... software errors do happen (say, using the pin as an output). So, if you want to be sure your safe, use a current limiting resistor... I think that you only need a resistor of 220ohms (or more) to do it - but feel free to go for whatever you have lying around.

V=IR says... 220ohm = 4.4v / 20ma
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Thanks Matt

Post by ksamay » Wed Mar 11, 2009 9:10 am

Post by ksamay
Wed Mar 11, 2009 9:10 am

it worked!, there was a little offset from the actual value which ill have to calibrate.

But i hit another roadblock.

I had initially planned to connect the Cell_GND to GND, 3 cell pins to ADC pin 0, 1 ,2.

But, after testing i discovered a fundamental flaw.

Although i can measure the voltage of the first cell, i can't do the same for the other cells as the V_ADCpin2= V_cell1 + V_cell2 ( 4.2V + 4.2 V ).


Any ideas ?

Thanks
it worked!, there was a little offset from the actual value which ill have to calibrate.

But i hit another roadblock.

I had initially planned to connect the Cell_GND to GND, 3 cell pins to ADC pin 0, 1 ,2.

But, after testing i discovered a fundamental flaw.

Although i can measure the voltage of the first cell, i can't do the same for the other cells as the V_ADCpin2= V_cell1 + V_cell2 ( 4.2V + 4.2 V ).


Any ideas ?

Thanks
ksamay
Robot Builder
Robot Builder
Posts: 13
Joined: Tue Oct 28, 2008 5:55 am

Post by RandomMatt » Wed Mar 11, 2009 9:57 am

Post by RandomMatt
Wed Mar 11, 2009 9:57 am

Resistor bridges.

In more detail...

connect cell 0 gnd to gnd
connect cell 0 pos to adc0
connect cell 1 pos to 10k resistor to adc1 to 10k resistor to gnd
connect cell 2 pos to 10k resistor to adc2 to 5k resistor to gnd

adc0 should 'see' the voltage of cell 0
adc1 should 'see' the voltage of (cell 0 + cell 1) / 2
adc2 should 'see' the voltage of (cell 0 + cell 1 + cell 2) / 3

--

The problem with this is accuracy - you only have a 9bit reading for cell1, and even fewer for cell 2. But I suspect that it is good enough for what you want.
Resistor bridges.

In more detail...

connect cell 0 gnd to gnd
connect cell 0 pos to adc0
connect cell 1 pos to 10k resistor to adc1 to 10k resistor to gnd
connect cell 2 pos to 10k resistor to adc2 to 5k resistor to gnd

adc0 should 'see' the voltage of cell 0
adc1 should 'see' the voltage of (cell 0 + cell 1) / 2
adc2 should 'see' the voltage of (cell 0 + cell 1 + cell 2) / 3

--

The problem with this is accuracy - you only have a 9bit reading for cell1, and even fewer for cell 2. But I suspect that it is good enough for what you want.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Thanks once again.

Post by ksamay » Wed Mar 11, 2009 10:37 am

Post by ksamay
Wed Mar 11, 2009 10:37 am

Yup, Accuracy is not that important as i just need to see if any of the cells reach 3 V.

Finally, This should work!

Thanks a lot,
Yup, Accuracy is not that important as i just need to see if any of the cells reach 3 V.

Finally, This should work!

Thanks a lot,
ksamay
Robot Builder
Robot Builder
Posts: 13
Joined: Tue Oct 28, 2008 5:55 am


5 postsPage 1 of 1
5 postsPage 1 of 1