![]() ![]() ![]() If this works then you have established communication between the LTC6802 chip and the Arduino. At first try to just write the register commands as in writeReg() and read the registers using readReg(). In my example that is the readV() function. On page 27 you see that as the first step, the next step is indeed reading the voltages. Also, when you call writeReg() you set the under voltage and over voltage limits and other configuration parameters. TOP device would probably mean the first or main chip and connect TOS to ground for the other devices in the daisy chain. In my wiring diagram I have it connect to ground. One more thing that I noticed in the datasheet is that it says to connect the TOS pin to VREG when your chip is the TOP device. Next I’ll implement an algorithm that will perform the balancing of battery cells and possibly another function that measures the temperature of the pack (via an external thermistor). This project is still in the early stages. It might have something to do with the ADC conversion multiplier but good enough for now. Great Success! All 4 battery voltages are read correctly with an error of +/-0.05V. Simple enough, just multiply to get the correct number. This has something to do with the ADC conversion algorithm (when the analog voltage is sampled and converted to a digital value). On p.23 of the datasheet we can see that the voltage value needs to be multiplied by 1.5mV. Another part of the code is the “1.5*0.001” value. *Do a quick calculation with random 8 bit registers for more clarification. Then using the OR (“|”) operator we add the 8 bit value to the 4 bit to give us the completed 12 bit voltage. The 0xFF value does “masking” of the voltage and eliminates all but the last 8 bits of voltage value. Therefore, the last part of the code takes the 8 bits and adds the other 4 from the next or previous register( see p.21 for details). Thus, a single voltage value is stored over two registers. If we look at page 21 of the datasheet, the voltage value is spread over 12bits but the values of the voltage registers read with the RDCV command are 8 bit. The last part of the code needs some explaining. We can also read the registers to check if they are properly set.įor(int i = 0 i > 4 | (volt & 0xFF) > 4 | (volt & 0xFF) << 4)*1.5*0.001) Next we start the WRITE command after which the value of each configuration register is written. Since we’re using only one in our configuration the address is 0 or 0x80, defined by the address pins on the chip (A0,A1,A2,A3). We start by giving the address of the LTC6802 chip. *Many other options of configuration are available. First we need to setup the registers with the values of the Over and Under voltage conditions. (*Note: the LTC 6802-2 works with minimum 4 batteries to achieve complete power ON) Now, the next step is to write the Arduino code. It will be much nicer if all the components were placed on a PCB but this works for the initial design and testing. *Visit the Arduino website for more on the SPI interface. In this case we use the Arduino Uno as the microcontroller. The diagram below shows the typical setup for a single monitoring chip connected to a microcontroller. Once set-up, the LTC6802-2 chip sends the voltage data to the microcontroller via the SPI interface. A digital isolator such as the Si8441AB ( ) between the monitoring chip and the microcontroller can also be included for extra protection. However, the chip registers need to be programmed via a microcontroller. This chip can monitor as well as balance a lithium battery pack consisting of no more than 12 cells. The battery management system (BMS) consists of an LTC6802-2 ( ) battery stack monitoring chip. ![]() Now I’m back at it and I finally have it working. I started designing a BMS a while back but I ran into problems and I paused the project for a while. For a while now I’ve been looking into battery management systems as part of the Solar Car club at the university. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |