I’m working with the LTC6804-1 on a project for a large battery pack for a client that’s intended as a UPS for data center applications.
They are using 4 boards with 8 cells per board (schematic attached) connected and series and then attached to an LTC6820 and from there to a controller via SPI bus. I'm running the SPI bus at 125KHz (which I would think should be plenty slow for communicating with the chips).
I’m having a number of issues and hope you can help me sort these out or point me in some direction. I’ll describe each below:
1) I can read the cells on the 1st chip in the stack just fine 100% of the time. However, I’m only rarely able to read the cells on the 2nd chip (i.e. PEC valid) though PDFwhen I do read it the cell values are correct. For the time being I have 2 cells installed on both chips (the same 2 cells) and the chip is powered by an isolated 15v DC-DC through R49 (100 ohm resistor).
2) However, I can’t seem to be able to read the two GPIO pins reliably with the ADCVAX command or with the ADAX command. I noticed that the VREF1-2 pins are turning on for ~200ms and then turning off (likely due to the REFON bit not being set in the CFG0 register, which would make sense). Though I am writing an 0xE4 to that register, but when I read that register back I read 0x02 on the first chip, but 0x06 on the second chip (which would be correct, though VREF1-2 are doing the same thing on that chip).
Here’s what I’m doing in the firmware:
- On startup I’m waking the chip by sending 120 bytes (0xFF) and then waiting 1.5ms (like your demo code WakeUpSleep ),
- Then before every command I send a single byte (0xFF) and wait 100us (sort of like your demo code WakeUpIdle ),
- After the wake-up I write the configuration registers for all chips (valid PECs, etc.)
- Then I read the configuration registers from all chips. If all the received PECs are correct I move on (but this is where the 1st chip reads back 0x02, but I ignore that at the moment),
- Then I go into a loop where I read the cell voltages:
- Send ADCV command,
- Wait 350ms,
- Read RDCVA, RDCVB, RDCVC, RDCVD and validate PECs and then parse out cells from each board,
- Wait 50ms,
- Start sequence over reading ADCV,
- I keep track of the current state and set an error bit if there’s an issue and also have an error counter. If I run the above with just the 1st chip in the cell stack I get no errors and read the cell voltages reliably all the time. However as I noted above I can rarely read the cells in the second chip in the stack successfully, the PEC is invalid on nearly every read.
The datasheet doesn’t have a lot of details on the commands, the sequencing, etc. And, I couldn’t find any application level code showing use with your library files (and near as I can see I’m doing most of the same things).
By the way, I’m writing the following values to the configuration registers:
CFG0 => 0xE4
CFG1 => 0x00
CFG2 => 0x00
CFG3 => 0x00
CFG4 => 0x00
CFG5 => 0x00
When I read them back registers 1-5 are 0x00 as expected, but as I noted for CFG0 on the 1st chip I see 0x02 and on the second chip 0x06. I’m only using 2 of these boards at the moment (I figured once I had 2 of these working I could add more).
Any thoughts or help is appreciated,