This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ78350-R1: Charging Current Value mismatch

Part Number: BQ78350-R1
Other Parts Discussed in Thread: BQSTUDIO, BQ78350, BQ76940, , EV2400

Greetings ,

I am using BQ78350 for my battery management system. I am analyzing BQ78350 register values using BQStudio. On the AFE side I am using BQ76940 connected to 15 cells of Li-ion battery.

All values are matching (as seen in BQStudio). Problem arises when I start charging my battery pack using my DC source. Problem is that when I keep current output of my  DC source to between .7mA to .9mA then BQStudio Charging Current readings (register 10) shows 100mA while when I keep output current more or equal to 1A then BQStudio Charging Current readings (register 10) shows 4400mA. When current for charging is less than .7mA then BQStudio shows 0mA.

What may be causing this issue?

Thanks   

  • Hi Bhushan,

    The measured current depends on a few factors. First, what is the value of your sense resistor? The BQ76940 measures the voltage across the sense resistor through an ADC. When you calibrate the current in the BQ78350 (see the calibration section of the Technical Reference Manual), what value does it show for the sense resistor? Do you use the IPSCALE feature (this is only available on BQ78350-R2 firmware)? 

    If you are still unable to identify the issue, please send your data flash settings (.gg file). This can be exported from BQStudio from the Data Memory screen.

    Best regards,

    Matt

  • Hi Bhushan,

    Have you been able to resolve this issue? Please let me know or send you gg file if you need further help.

    Thanks,

    Matt

  • Hi Matt Sunna,

    Extremely sorry for late reply. I have resolved the issue(it was a calibration issue) but I got  a new problem. I will give details of the problem soon.

    Thanks very much.

    Regards

    Bhushan

  • Greetings Matt Sunna,

    I am using BQ78350-R1 and BQ76940(as AFE). I am using PIC32MX for communicating to BQ78350-R1 via SMB. I read chapter 17 of BQ78350-R1 Technical Reference and on page 96 there is a summary table of SBS commands. Using the SBS commands given in the mentioned table I am able to correctly read the cell voltages of my battery pack, temperature,charging/discharging current,cycle count .Following is function I am used for reading above mentioned parameters:-

    unsigned int FrameRead_SMB(unsigned char slave_address,unsigned char registerAdd,unsigned char *databyte,unsigned char Length)
    {

             IdleSMB();                                                //Ensure Module is Idle
            StartBit_SMB();                                                //Generate Start COndition
            TxSingleByte_SMB(slave_address);                //Slave address(0x16)+write bit(0)
             IdleSMB();                                          //wait for bus Idle
           TxSingleByte_SMB(registerAdd);                        //Transmit address of register from which data is to be fetch
            IdleSMB();                                         //wait for bus Idle
            RestartBit_SMB();                                //Generate restart condition
           TxSingleByte_SMB(slave_address | 0x01);        //Send slave address(0x16) with read bit(1)
            IdleSMB();                                          //wait for bus Idle
            ReceiveData_SMB(databyte, Length);                //read Length number of bytes
            NotAck_SMB();                                //Send Not Ack
            StopBit_SMB();                                        //Generate Stop
    }

    Now I am trying to read  "SafetyStatus" (SBS command = 0x51). I used the same technique by which I was reading previous parameters but now I am getting 0x04 from BQ78350-R1(showing over-current during charge ,which is wrong since I am not charging my battery pack and also BQ-STUDIO is showing 0x00 in registers window). BQ Studio is interfaced with BQ78250-R1 using Texas Instruments EV2400 module.Then I tried sending 0x51 using BQ STUDIO ADVANCE COMMAND SMB(I have attached image of this step with this post) and there also I received 0x04. Then I probed the SMBus and captured waveforms which were sent by BQ Studio during sending of SBS command 0x51. I have attached images of waveforms with this post. As you can see in image named as " First packet transfer of SMB" BQ Studio is sending slave address of BQ78350-R1 that is 0x16 and then register SBS command that is 0x51(all looks fine for me). Now after Restart condition BQ Studio is sending 0x45( if I am not wrong) and as we can see in image named "Second transfer on SMB " the second clock pulse looks distorted(why?). In response BQ78350-R1 is sending 2 data packets. First data packet is 0x04(which is displayed on BQ Studio Advance Comm window) and second data packet having data byte 0x01. What is this second data packet transmitted by BQ78350-R1? Also in response to 0x51 , BQ78350-R1 had to sent 4 bytes of data packet then why it is sending 2 data packets? Also there is no error condition then why 0x04 (showing over current during charging was sent) ?

    Sorry for too many questions.

    Thanks

    Regards

    BhushanSMB+Advance Command.rar 

  • Hi Bhushan,

    SafetyStatus() is 4 bytes and will be reported in Little Endian format when you do a block read using the ManufacturerBlockAccess command.

    Matt

  • Greetings Matt Sunna,

    Thanks for your guidance. I will try your suggestions and will let you know about my result.

    Regards

    Bhushan

  • Thanks Bhushan. Let me know how it works.

    Matt

  • Greetings Matt Sunna,

    For the past 6 hours I am trying to read "SafetyStatus" (SBS command = 0x51)  but failed. I am sending 0x16,0x00(ManufacturerAccess() command) and then 0x5100(SafetyStatus() address) and then reading through using BQStudio Advanced COMM SMB  utility( Block Read/Write by using 0x44 in Read Block command). I am not getting any data in Read Block of BQStudio. Here is my part of code for write of ManufactureAccess() :-

    unsigned int ManufacturerAccess_Write()
    {
      unsigned char ErrorCode ;
      IdleSMB();                                                //Ensure Module is Idle
      StartBit_SMB();                                      //Generate Start COndition
      TxSingleByte_SMB(0x16);                //Slave Addree + write bit
      IdleSMB();                                            //Ensure transmission complete
      ErrorCode = ACKStatus();                 //Check for acknowledge bit
      TxSingleByte_SMB(0x00);                //Transmit ManufactureAccess() command(0x00)
      IdleSMB();                                             //Ensure transmission complete
      RestartBit_SMB();                                // Send restart bit for recapturing SMB
      TxSingleByte_SMB(0x51);                  //Transmit 0x51 for SafetyStatus() lower byte address
      IdleSMB();                                            //  //Ensure transmission complete
      RestartBit_SMB();                            // Send restart bit for recapturing SMB
      TxSingleByte_SMB(0x00);            //Transmit 0x51 for SafetyStatus() upper byte address
      IdleSMB();                                     //Ensure transmission complete
      StopBit_SMB();                         //End of SMB frame
    }

    Can you tell me what is wrong in my approach?

    Thanks for your cooperation.

    Regards

    Bhushan

  • Hi Bhushan,

    I just tested this on an EVM using the Advanced Comm window and it is working correctly. I start with no bits high on the SafetyStatus, then I lower the voltage to cause the CUV bit to go high to verify that I see a change:

    Here it is confirmed on the Registers window:

    Maybe the issue is you need to read from 0x44?

    Regards,

    Matt

  • Greetings Matt Sunna,

    We are developing a product based on BQ78350-R1. In the product we are going to communicate with BQ IC using PIC32 microcontroller via SMB. In the end product we aren't using BQStudio(it is just for the purpose to analyze that PIC32 is giving correct commands and receiving correct data from BQ IC). So as I said in my previous comment I am sending Start bit 0x16 0x00 Restart 0x51 Restart 0x00 through PIC32 and reading through BQStudio Read block but I am not able to get any data.

    Can you tell me what is wrong in my approach?

    Thanks for your cooperation.

    Regards

    Bhushan

  • Hi again ,

    Now I am writing 0x00 command and 0x51 word using Advance Command SMB tool of BQStudio and reading the data bytes transmitted by BQ78350-R1 using PIC32 microcontroller (sending 0x16 with 0x23 then restart and sending 0x17 and then reading the data transmitted by BQ IC). I am able to read correctly. So now my only issue is about writing 0x16 0x00 0x51 0x00. Even if I send the length of data bytes with write command( 0x16 0x00 0x02 0x51 0x00) then SMB stops working(either master or slave pulls the SDA and  SCL down forever).

    Can you suggest what is the issue.

    Thanks

    Regards

    Bhushan

  • Bhushan,

    Are you trying to write to SafetyStatus? This is read only.

    Matt

  • Greetings Matt Sunna,

    No, I am not trying to write any value to SafetyStatus(). SafetyAccess() can be read either through ManufactureAccess() or ManufactureBlockAccess().

    In ManufactureAccess() Start bit ,0x16+0x00 and then Restart+0x51,Restart+0x00 and Stop bit are sent to BQ78350  and then Start bit ,0x16+0x23,Restart+0x17 are sent and then data bytes are rceived.

    In ManufactureBlockAccess(), start bit+0x16+0x44, Restart+0x02,Restart+0x51,Restart+0x00 and Stop bit are sent and then Start bit +0x16+0x44,Restart+0x17 are sent and then data bytes are received.

    I am doing the same procedure but I am not getting data bytes at all.

    Thanks

    Regards

    Bhushan

  • Hi Bhushan,

    I am not sure what the problem is. Can you connect an oscilloscope or a logic analyzer to the SMBus and capture transactions using both BQStudio and your MCU? This is probably the best way to debug what is different between the two.

    Matt

  • Greetings Matt Sunna,

    I have attached the images of signals transferred by BQSTudio and by my MCU. Kindly find them attached with this comment.

    Thanks

    Regards

    Bhushan2783.Images.rar

  • Hi Bhushan,

    I think the problem is with the start bit at the end of your scope capture. The EV2400 picture has a correct waveform for the start bit, the other waveform does not look correct. Do you agree?

    Matt

  • Greetings Matt Sunna,

    Now I am able to read SafetyStatus() value correctly using the same function by which I was reading other parameters(total battery voltage,specific cell voltages,cycle count ). The function code snippet is as follows :-

    unsigned int FrameRead_SMB()
    {

             IdleSMB();                                                //Ensure Module is Idle
            StartBit_SMB();                                                //Generate Start COndition
            TxSingleByte_SMB(0x16);                //Write slave_address
             IdleSMB();                                          //wait for bus Idle
           TxSingleByte_SMB(0x52);                        //Write registerAdd of SafetyStatus()
            IdleSMB();                                         //wait for bus Idle
            RestartBit_SMB();                                //Generate restart condition
           TxSingleByte_SMB(0x16 | 0x01);        //Write slave address + read bit(1)
            IdleSMB();                                          //wait for bus Idle
            ReceiveData_SMB(5);                //read 5 number of bytes
            NotAck_SMB();                                //Send Not Ack
            StopBit_SMB();                                        //Generate Stop
    }

    So I am able to read safetystatus() correctly but I got  confused with the following paragraph at page number 98 of Texas Instrument's bq78350-R1
    Technical Reference :-

    The ManufacturerAccess() and ManufacturerBlockAccess() commands make available a variety of data:
    • ManufacturerAccess() provides access to the data through the Smart Battery data set standard,
    including when in SEALED mode, using a sequence of a ManufacturerAccess() write word and a
    ManufacturerData() block read.
    • The ManufacturerBlockAccess() is an extended command that enables access to the same data, but
    through a simpler block write/read sequence to the same command.
    ManufacturerAccess() example to read LifetimeDataBlock1():
    a. Send LifetimeDataBlock1() command through the ManufacturerAccess(): SMBus Write Word of
    0x0060 to command 0x00.
    b. SMBus Read Block of command 0x23: The first two bytes of the return block will be the data length
    and the next bytes will be the data of the command.
    ManufacturerBlockAccess() example to read LifetimeDataBlock1():
    a. Send LifetimeDataBlock1() command through the ManufacturerBlockAccess(): SMBus Write Block of
    0x60 + 0x00 to command 0x44. (Data must be sent in Little Endian.)
    b. SMBus Read Block of command 0x44: The first two bytes of the return block will be the Manufacturer
    Access command, followed by return data of the command.

    My question is that if I can read/access all registers using SBS commands then what does above paragraph is all about ?

    Thanks

    Regards

    Bhushan

  • The ManufacturerAccess block reads allow you to read several blocks of data faster than with SBS commands. It also allows you to read data flash while in Sealed mode.

    Best regards,

    Matt

  • Greetings Matt Sunna,

    Thanks for your guidance. It really helps to gain more knowledge. Anyway I am still not able to read safetystatus() using manufactureaccess(). Last time I provided you with images of SMB signals generated by EV2400(from Texas Instruments and BQstudio) and by my MCU(PIC32). You said that there is a problem in start bit but I am using the same SMB specifications as I used for reading other SMB commands.

      Although I am able to read SafetyStatus() using SMB command(not using ManufactureAccess()) so my question is do I will face any problem in future to use only SMB command to access BQ78350-R1(as you said that manufactureaccess() is helpful in sealed mode) ?

    Thanks

    Regards

    Bhushan

  • Hi Bhushan,

    The answer really depends on your system needs. If you plan to use the SEAL feature or if you need to access any data flash information that is only accessible through ManufactureAccess, then you will need to get this command working. 

    My comment about the Start bit was that it did not look correct in the scope waveforms. The clock must go low at least 4us after the data line goes low. I'm not sure if this is the issue, but it looks like a key difference in the waveforms. 

    Best regards,

    Matt

  • Greetings Matt Sunna,

    Thanks for your guidance. So moral of the story is that I have to anyhow access the BQ78350 using ManufactureAccess().

    Coming to start bit, I am using the standard SMB code provided by Microchip for my MCU. As start bit condition automatically(in the hardware) pulls down clock line after pulling data line low so I can't change it in software part. Correct me if I am wrong in my previous statement.

    I doubted the last bit(which I have encircled using red ink in both images) as in PIC32 the last bit is high simultaneously with clock pulse(means that micro-controller will take it as 1). Even my software part is not generating that last bit. I will post again when I restart my this project again.

    Thanks(infinity times)

    Regards

    Bhushan