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.

BQ24160 Initiating USB Detection

Other Parts Discussed in Thread: BQ24160, BQ27530-G1

Hi team,

We are using the BQ24160 with the BQ27530-G1 in our design. We are having issues getting the USB detection to work. In the datasheet I see that it says:

If we set B0 to high, we can force D+/D- detection. However, when we read that register, it is already set to high. Is that because the fuel gauge is controlling the BQ24160? When we check the USB current limit, it is 100 mA which is the default. We've tried enabling the fuel gauge I2C communication with the BQ24160 before and after setting the D+/D-/EN bit but no changes. Is there something that we need to do to get the charge controller to initiate the USB detection?

Thank you,

Akash Patel

  • Detection should start as soon is V(IN) or V(USB) goes above the UVLO threshold.
  • It doesn't appear to be working because the first thing I do in the firmware is read the USB current limit and it says 100 mA no matter what I plug into. I've tried a wall charger and my computersUSB 3.0 port. That's why I was hoping to be able to initiate it manually. We are using the Fuel gauge as a pass through to the charge controller instead of having a direct I2C connection to the charge controller. Is that an issue? Also our USB on the device is a USB-C connector.

    Thanks,

    Andrew

  • The 160 only performs DCD and primary detection as specified in USB BC 1.2 spec. It can only distinguish between SDP (100mA) and DCP (1.5A) ports. It is not compatible with USB type C handshake via D+/D- lines. If there is not enough current to power the system load, I suggest shorting the D+/D- lines on the charger so that it detects 1.5A, relying on the charger's VINDPM function to prevent the charger from collapsing the USB rail. Then use a USB detection IC to detect the USB type C adapter. The host can then tell the gauge to reset the charger's input current limit.
  • We are using the USB-C plug but not the USB-C handshake protocol. the D+/D- are still passed to the charge controller as expected. We are still using USB 2.0 A to B type communication. The microcontroller on the PCB can enumerate with the usb no problem. The charge controller just doesn't seem to detect that its connected to a DCP when plugging into a DCP connection. I will try shorting the D+/D- inputs and see that will force it into charging 1.5A. 

  • Also when no battery is connected the charge controller allows the board to power up over USB but the current coming out of the USB is fluctuating repeatedly between 37 mA and 53 mA every 1 second interval. Its like the charge controller is constantly resetting or something. Do you know why that is?

    Thanks,

    Andrew

  • Can you provide a schematic, or at least tell me how the gauge REGIN is getting powered, how much capacitance is on the charger's BAT and SYS pins and how much SYS load is being drawn at startup? Can you provide scope shots of V(SYS), V(BAT) and I(IN) in the configuration above? Also, I assume this only occurs with USB input powered and input current limit is 100mA?
  • Can you also try setting Register 0x01H B0 (EN_NOBATOP) to 1?
  • We cannot release our schematic publicly is there a way I can send it to you privately with an NDA? REGIN on the fuel gauge is getting powered from VSYS which is supplied by the charge controller. The BAT pins are seeing about 46uF of capacitance to ground and SYS pins are seeing 53uF of capacitance to ground.

    There is a load of about 42mA from the battery when our board is running.

    I've attached three scope images that show the voltages fluctuating when the current drawn from the USB is fluctuation between 43-53mA as described above. This happens when no battery is connected. The blue shows V(SYS) and yellow shows V(BAT). We are currently not using V(IN). They all show same thing but one is using DC coupling to show the voltage levels. We are seeing the same result on V(IN) and V(BAT) and also changing the USB current limit to 1.5A still produced the same results.

  • setting EN_NOBATOP to 1 gets rid of the jitters on the V(BAT) line but it still exists on the V(SYS) and V(IN) lines.
  • As far as the USB type detection goes, I noticed from measuring the current on the USB that the charge controller does detect the difference between the SDP and DCP ports but when it is a DCP port the current is only 600 mA but if I disconnect the battery and reconnect it, the current jumps up to 1.1A. Do you have any ideas why disconnecting and reconnecting the battery would allow the charge controller to draw more current? Also I noticed that even though it shows the higher current draw coming from the USB, the charge controller Control Register 02h is still reading that the IUSB_LIMIT is 100mA. So I might have an issue with reading the register over I2C.

    Thanks
  • Regarding the plots, with a load on BAT instead of SYS, I am not certain what the battery detection routine will do. If you disable termination (which also disables battery detection), what happens? During this time, is the charger switching (i.e. squarish waveform on SW pins)? If the 42mA load were connected to SYS, I would not expect any dip on SYS. I assume V(USB) > VDPM threshold and the VDPM loop has not current limited the buck converter? Is the battery regulation voltage set to 3.6V or 4.2V? Can you measure currents (IN, BAT, SYS) on the scope?
  • Regarding removing and replacing the battery with input power applied, this IC was not designed for that. So, if you plan to do that, we recommend that you toggle HiZ mode following battery insertion.