B404X USB Not Providing Enough Current

Hello,

My B404X works with a battery. When I disconnect the battery and keep USB plugged in, the 3.7V line drops to 2.15V and the 3.3V line drops to 1.38V. I would like to be able to run the B-SOM with only USB and no battery. I am using a BQ24195LRGER PMIC. The input to the PMIC is 4.75V. Do I need to program the PMIC? And if so, can you please recommend any libraries? Also, what is the minimum current required for the B404X?

Thank you,
Erik

Yes, but since you are using the bq24195 you can use the support for it built into Device OS by enabling PMIC detection.

Make sure you've connected the USB data lines to the PMIC because they are needed for input current negotiation (DPDM). Also the I2C connection.

The reason setup is required is that the bq24195 defaults to an input current limit of 100 mA so it can work from any USB port including the weird ones on keyboards. Once Device OS sets the input current limit the B404X along with DPDM completing the B404X should work without a battery.

Hello ricckas7,

Thanks for your help. I have the USB D+ and D- lines connected. I also have the I2C connected with the pull-up resistors. Do I use SystemPowerFeature::PMIC_DETECTION in my code to enable the PMIC? Also, I was unable to do serial communication through the USB port. When I plugged the USB cord into my computer my computer said

usb_not_recognized

Could the two issues be related? Something wrong with the wiring of the USB data lines, so input current negotiation isn't working? I have D+ wired to pin 2 of the PMIC and pin 11 of the microcontroller. I have D- wired to pin 3 of the PMIC and pin 13 of the microcontroller.

Thanks,
Erik

Yes, SystemPowerFeature::PMIC_DETECTION is what you use to enable it.

The USB problem is suspicious and may be related. Those connections seem correct. I'd guess that there is a problem with the soldering of the bq24195 (which is just an annoying chip, especially if hand-placed), or possibly the USB connector (only because the big pool of solder that usually is used to hold it to the board if it's SMD).

If you connect a battery to the bq24195 it should boot the B-SoM even if the USB is broken.

You may also be able to connect a 5-12V power supply to VIN and as long as you have PMIC detection enabled it should work even if USB is not working.

Sometimes you can use a 2A USB micro B tablet charger and it will work if the USB data lines are not working but 5V and GND are OK. This works for "dumb" chargers that don't negotiate power, but you still need to enable the PMIC so the input current limit is increased.

Hello,

When I connect a battery to the B-SOM it boots just fine. When I connect a 5V power supply to the input to the PMIC, I get the same problem: The 3.7V line gets dragged down to 2.16V and the 3.3V line gets dragged down to 1.17V, which is not enough voltage to light the 3.3V and 3.7V power LEDs. That should rule out the USB problem. I added PMIC_DETECTION to my code. Here is my code:

void setup() {
  Wire.begin();
  // Apply a custom power configuration
  SystemPowerConfiguration conf;
  conf.feature(SystemPowerFeature::PMIC_DETECTION);
  int res = System.setPowerConfiguration(conf);
  Log.info("setPowerConfiguration=%d", res);
}

Is this code correct? And is there any more I2C setup I need to do besides Wire.begin()?

Thanks,
sarki012

That sounds like an input current limit issue. The code you flashed should have set it to 900 mA which should be sufficient for the B404X. Are you sure the code actually executed and the device didn't go into safe mode and not run that code?

I usually use

SYSTEM_MODE(SEMI_AUTOMATIC);

and do not add a call to Particle.connect so the device should breathe white. If it starts blinking green, the code did not run. Since this is a B404X I assume you don't have a blue D7 LED; that's another good thing to use for the Boron to tell if the code ran properly.

Hello,

I am still unable to power the B-Som with only the USB and the battery disconnected.

When I execute the following lines of code in loop(),

  PMIC power(true);
  Serial1.println("Current PMIC settings:");
  Serial1.printf("VIN Vmin: %u", power.getInputVoltageLimit());
  Serial1.printf("VIN Imax: %u", power.getInputCurrentLimit());
  Serial1.printf("Ichg: %u", power.getChargeCurrentValue());
  Serial1.printf("Iterm: %u", power.getChargeVoltageValue());

  int powerSource = System.powerSource();
  int batteryState = System.batteryState();
  float batterySoc = System.batteryCharge();

In my output window I get the following:

Current PMIC settings:
VIN Vmin: 3880 Imax: 900 Ichg: 896 Iterm: 4112 Power source: vin Battery state: charging Battery charge: 3.351562.

This clearly shows that the microcontroller is communicating with the PMIC and the max input current is 900mA. Also the power source is vin, not battery.

When I unplug USB and leave the battery plugged in, Power source changes to battery, so that part is working.

However, when I unplug the battery with USB plugged in, the 3V3, 3V7, and breathing B-Som LEDs turn off. With only the USB plugged in, the 3V7 test point is 2.2V and the 3V3 test point is 1.4V.

My suspicion is that I chose the wrong inductor. I used a 2.2 µH Shielded Multilayer Inductor 1 A 195mOhm Max 0805 (2012 Metric). MLP2012H2R2MT0S1 TDK Corporation | Inductors, Coils, Chokes | DigiKey

If I did use the wrong inductor, can you please recommend a good one in an 0805 footprint?

Or could my issue be a problem with the output capacitance? I have two 10uF capacitors in parallel from SYS to ground. Please see the below schematic.

Thanks in advance!

Sincerely,
Erik

What is the voltage on VBUS when powered by USB?

The voltage on Vbus when powered by USB is 4.75V.

The symptoms you're seeing don't make sense to me and it's not obvious to me what it could be.

I don't think it's the inductor, but the SoM Test Board that I built uses this inductor and it does work with the B404X. I don't see an obvious reason why you one you selected would not work, however.