DS2438 query

Hi all,
I am currently working on ds2438 ic for battery monitoring, in that i am getting voltage value, temperature value and current register value properly, but ICA register in ds2438 is showing 0x00 value continuously. So actually i want to calculate remaining battery capacity of my device using ICA register, since i am getting 0x00 value in ICA register i am unable to calculate remaining battery capacity. So anybody having solution on that? or else you just tell me step wise procedure to read ICA register value.

Thank you.

Did you read the Application Note on capacity calculations?

http://pdfserv.maximintegrated.com/en/an/AN131.pdf

Here is a bit from the datasheet:
"The ICA is only incremented/decremented if the IAD bit is set to 1 in the Status/Configuration Register. Table 5 illustrates the contents of the ICA. See Memory Map section for the address location of the ICA."

What value of sense resistor are you using?

Hi JohnWasser,

First of all thanks for your reply. I am using Rsense of 33mohm since my battery is of 3300mAh. And yes you are correct that ICA will incremented or decremented if we set IAD bit of status/configuration register, and i have set that one but still i am getting ICA value 0x00. And when i write some value like 0xFF in that ICA register then it gets decremented upto 0x00 immediately( within half minute ), that means there is a discharging current in my device, but when i put my device on charger that value not get incremented. I am bit confused on that ICA register related to calculation of remaining battery capacity. I am getting temperature value and battery voltage value properly but i got stuck in this ICA register for calculating remaining battery capacity. So please reply me soon.

Thank you so much..

My guess would be that the current sense resistor circuit is wired incorrectly.

Hi Johnwasser,

Sir, actually i am getting values in current register which is of 16bit in two's complement form which is nothing but a voltage drop across Rsense, that means it is connect properly correct? But though there is a problem then can you just send me that circuit connection. Actually i tried 2-3 circuit connections for that but result is 0x00 in that ICA register. Can you just suggest me step by step how to read ICA register so that i can understand that where i am doing mistake. I want that ICA register value just to determine the remaining battery capacity. Is there any other way by which i can do the same thing instead of using that voltage register value. Because i want to show exact battery capacity using remaining current capacity. I searched this same thing on google but i didnt get any help. Reply me soon sir.

Thank you so much sir...

Did you set the Offset Register each time you changed the Sense Resistor circuit?

The following process can be used to calibrate the current ADC:

  1. Write all zeroes to the Offset Register
  2. Force zero current through RSENS
  3. Read the Current Register value
  4. Disable the current ADC by setting the IAD bit in the Status/Configuration Register to “0”
  5. Change the sign of the previously-read Current Register value by performing the two’s complement
    and write the result to the Offset Register
  6. Enable the current ADC by setting the IAD bit in the Status/Configuration Register to “1”

Yes sir, i have done these steps also.

When you enable the Charge Current Accumulator and Discharge Current Accumulator do they work as expected? CCA going up while charging and DCA going up while discharging?

No they are also not working properly. I get a constant value in DCA it does not increment or decrement, as well as i am getting CCA value 0x00, sometimes CCA gives me 0x03 but it is not proper output. Your doubt is correct i am not getting incrementing or decrementing values in CCA and DCA resp. So what do you think, what might be the problem?
Thanks.

Since ICA, CCA and DCA are all working badly but the current value looks right my guess is that the bits in the Status/Configuration register are not being set correctly.

Ok. But sir i am setting my configuration register to 0x0F, that mean AD, CA, EE and IAD all four bits. Even i tried with 0x07, 0x03, 0x01 values to put into the configuration register. But still getting same problem.

If you are doing everything correctly and the chip is not producing the expected results then the chip must be faulty. Try another one.

I tried it with 2 different chips and 3 different circuits, but no proper output. Since my ICA register giving me 0x00 so can you tell me is there any other way by which i can calculate remaining battery capacity using remaining current capacity in battery instead of using battery voltage? Can you just send me circuit diagram for that ic? Reply me soon please.
Thank you sir...

If I had that chip I would use the circuit diagram from the datasheet.

If the ICA, CCA and DCA registers aren't working you could just integrate the current yourself. Every second you take the current reading and add it to your software ICA. The value in the software ICA would be the amount of charge in your battery. Set it to 0 when the voltage drops to 2.5V.

That means you are saying that, i should take current reading for every second from current register( LSB or MSB ) and add it to ICA register, correct?

Jonam:
That means you are saying that, i should take current reading for every second from current register( LSB or MSB ) and add it to ICA register, correct?

Yes. That's basically what the hardware should be doing. If the hardware won't do it you have to do it yourself.

Yes you are correct sir. But you know if that register gives me proper value then my work would be perfect. But due to this condition i have to select this way to display remaining battery capacity. Thank you for your help sir.

If i found my mistake or if i found something that is not even mentioned in datasheet but after doing that i got the output i will inform you sir.

I must find out that problem. Because i have seen many forums, most of them are facing same problem.

Hi Jonam,

I think I know what your problem is. I was having a similar problem and came across this forum when trying to find an answer. My problem was exactly the same as you described, in that all measurements form the DS2438 were working correctly except for ICA, CCA and DCA despite having them enabled in the configuration. However, my battery charges perfectly when my charger is connected.

It turns out my problem was that I did not have the charger connected correctly. My charger was connected directly to the battery - i.e. batt+ was connected to charg+ and bat- was connected to bat-. This does not allow the DS2438 to detect the direction of current through Rsens and thus cannot tell if the battery is charging or discharging. You can confirm this by taking a current value from the DS2438. Notice that regardless of whether the charger is connected or not, the current reads as a negative value.

The solution - make sure that your charge- pin is connected to your circuit's ground and not to bat-. Now the direction of current through Rsens will change when a charger is connected. My ICA is now functioning as it should.

I hope this helps!