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.

BQ28Z610 and BQ27GDK000EVM Learning Cycle Script? Commands?

Other Parts Discussed in Thread: BQ28Z610, EV2400, BQSTUDIO, DXP

I am doing a Learning Cycle with a battery using a BQ28Z610 gauge and the EV2400 from the BQ27GDK000EVM.  I found the "How to Complete a Successful Learning Cycle for the bq28z10" and I'm having trouble.  So I have two questions:

1. Since BQstudio and the EV2400 allow for script control, do we have a script that does the learning cycle automatically like the auto cycle?

2. If not, how do I send commands?  I know I can click the Commands given in BQstudio but some of the commands in the instructions are not present, such as IT enable (0x21).  And the Advanced Comm I2C is complicated.

Background on setup can be found here.  Thanks for your help!

-Sam

  • Hi Sam,

    1. Learning cycle with a GDK script would look something like this:

    #Discharge to empty
    DSG, CC, Cby2, TV, TERMINATE_VOLTAGE, true

    #Wait 5 hours
    RLX 300

    #Charge to full
    CHG, CHG_VOLTAGE, CHG_CURRENT, FC

    #Wait 2 hours
    RLX 120

    #Discharge to empty
    DSG, CC, Cby8, TV, TERMINATE_VOLTAGE, true

    #Wait 5 hours
    RLX 300

    Replace Cby2, TERMINATE_VOLTAGE, CHG_VOLTAGE, CHG_CURRENT and Cby8 with your own numbers. (Cby2 stands for Capacity/2 and Cby8 stands for Capacity/8).

    2. Use GAUGE_EN command in place of IT enable.

    Best Regards,
    Ben Lough
  • So to run a learning cycle, I select GAUGE_EN, then run this script? Anything else I need to do?
  • The gauge needs to know voltage, current, and battery temperature, correct? I have a diode-connected BJT on the GDK in the DXP/DXN terminals. Do I need to do anything special to tell it to read that temperature instead of the on-board thermistor on the bq28z610?
  • Sam,

    Send a GAUGE_EN command, then run the script. Use the script command External_Temp() to read external temperature.

    Best Regards,
    Ben Lough
  • Ben,

    So I would put External_Temp() in the script or GDK_READ_TEMPERATURE_EXTERNAL. And where do I put it so it constantly reads it? A sample script again would be perfect.

    Thank you.
  • Sam,

    Apologies, I misunderstood your original temperature question. You want to use the thermister on the bq28z610EVM to measure temperature for learning. In data memory, navigate to the "Settings" class then "Configuration" subclass. In the Temperature Enable register, make sure TS1 is set and TSInt is cleared.

    You will not need to make adjustments to your script.

    Best Regards,
    Ben Lough
  • Ben,

    That thermistor on the bq28z610 is kind of wedged in there.  It looks like I have 3 options:

    1. Rest the battery on top of the thermistor and make questionable contact/measurements

    2. Desolder the thermistor and add longer wires so I can put that thermistor right on the battery

    3. Use an external temp sensor, as shown in one of the users guides.  I have the external one all set up, taped to the battery, and displaying data on the left-hand side of BQstudio.  If the software is easy, I'd like to use that temp sensor to record the temperature of the battery.

    Could I do 1?  If not, how do I do 3 (specifically, code example)?  Worst case, I'll just go with 2.

    Thanks,

    -Sam

  • Sam,

    You will want to do option 2.

    Best Regards,
    Ben Lough
  • Awesome. To summarize for my own sanity:

    1. Use Autocycle and logging to do rel-dis-rel test to find battery chemistry (if not in database).
    2. Upload that data to TI to find a match. If close enough, select that chemistry.
    3. Click GAUGE_EN and run the script you gave with the proper values from the datasheet and the gauge's thermistor taped to the battery.
    4. Once run, the gauge Data Memory Ra tables will be updated. Click Data Memory - Export to get gg.csv Golden Image file.
    5. Upload this file to any gas gauge (of the same part number) to use with that battery.

    Have I understood this process correctly?
  • Sam,

    1. make sure to charge to full (taper at C/20) and relax for a full 2 hours. Discharge at C/8 to empty and rest for 5 hours

    2. Yes. Typically, you want a ChemID with < 3% error

    3. Yes. Make sure your configuration is set up correctly before you perform the learning cycle (taper rate, termination voltage, load mode, etc).
    Attach your gg.csv if you would like me to review it before you begin.

    4. Yes, export a gg.csv file once the learning has completed. Also export a .srec file (in bqstudio on the firmware tab, click "Read Srec from device").

    5. Yes, you may use your gg.csv or .srec file to program other bq28z610 gauges to work with this battery.

    Best Regards,
    Ben Lough
  • Ben,

    3. When you say configuration, are you referring to the Data Memory values or the values inserted into the script?  Does the gauge use the script for the charge/discharge but the Data Memory to calibrate the Ra tables?

    Yes, I'd like for you to review it.  That would be great.

    SamjaffeTest.zip

    4. What's the difference between a gg.csv and a .srec?

    6. Is the "Golden Image" file the gg.csv or the .srec?

    7. If I GAUGE_EN and run the script twice, does it just take the latest version?

    Thanks,

    -Sam

  • Sam,

    3. Yes, I'm referring to data memory. The GDK performs the charge/discharge cycle and pulls data from the gauge. The values in data memory will impact the results of the learning cycle.

    The following information would be helpful:
    Battery Capacity in mAh
    termination voltage of your system
    termination voltage of your battery
    Charging voltage you plan to use

    4. They are different file formats. A .srec would also program FW of the target device.

    6. Both of these files can be used as a "golden image"

    7. Qmax and the Ra table would update twice, once after each time the script runs

    Best Regards,
    Ben Lough

  • Ben,

    Capacity = 1030mAh
    Term voltage of system = Not sure. Should this be higher or lower than Vterm of battery?
    Term voltage of battery = 3000mV
    Charging voltage = 4200mV

    (This testing has been to get familiar with the hardware/software. I do not have a customer-related project at the moment but I'm expecting one soon. So I do not have the datasheet for this battery or a hard deadline).

    7. Does running twice make the Ra tables more accurate?
    8. If I wanted to start over with a new battery, I'd Import Defaults, change my configuration for the new battery, and do another learning cycle?

    Thanks,
    -Sam
  • Sam,

    Under Gas Gauging, change TD Set Voltage to 3000 and TD Clear Voltage to 3100. Everything else looks ok.

    7. In most cases, running the learning cycle once is sufficient if you have chosen an appropriate ChemID.

    8. You would want to program the correct ChemID for the new battery, set your configuration appropriately and then perform a learning cycle.

    Best Regards,

    Ben Lough

  • Ben,

    Great! I think that's all of my questions! Thank you for your patience through this learning process. I owe you a lunch or two next time I'm in Dallas.

    Thanks again!
    -Sam