# B404X USB Not Providing Enough Current

**URL:** <https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625>\
**Category:** Firmware\
**Created:** [September 20, 2024, 7:28pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625 "2024-09-20T19:28:17Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarki012](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sarki012](https://community.particle.io/u/sarki012)\
**Post date:** [September 20, 2024, 7:28pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/1 "2024-09-20T19:28:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [September 20, 2024, 10:17pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/2 "2024-09-20T22:17:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sarki012](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sarki012](https://community.particle.io/u/sarki012)\
**Post date:** [September 20, 2024, 11:19pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/3 "2024-09-20T23:19:34Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/6/c/6cee3e0fb6009c31ee4adadb4eba9aad6865eebb.png)

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

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [September 21, 2024, 8:56am UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/4 "2024-09-21T08:56:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sarki012](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sarki012](https://community.particle.io/u/sarki012)\
**Post date:** [September 24, 2024, 8:13pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/5 "2024-09-24T20:13:15Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [September 25, 2024, 9:42am UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/6 "2024-09-25T09:42:30Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![sarki012](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sarki012](https://community.particle.io/u/sarki012)\
**Post date:** [October 1, 2024, 4:16pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/7 "2024-10-01T16:16:42Z")

</div>

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(),

```auto
  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](https://www.digikey.com/en/products/detail/tdk-corporation/MLP2012H2R2MT0S1/4327857?s=N4IgTCBcDaILIBkAKYAMBGMAJMAlMcAKqgMrogC6AvkA)

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.

 ![schematic_pmic](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/f/e/fe29ad2b2083b3368b5a03ed9875b9f96e8bb31a.png)

Thanks in advance!

Sincerely,  
Erik

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [October 1, 2024, 4:20pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/8 "2024-10-01T16:20:32Z")

</div>

What is the voltage on VBUS when powered by USB?

---

<div class="post-metadata">

**Author:** ![sarki012](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@sarki012](https://community.particle.io/u/sarki012)\
**Post date:** [October 1, 2024, 4:37pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/9 "2024-10-01T16:37:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [October 1, 2024, 8:23pm UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/10 "2024-10-01T20:23:39Z")

</div>

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](https://docs.particle.io/hardware/som/basic-som-design/) that I built uses [this inductor](https://www.digikey.com/en/products/detail/bourns-inc/SRN2512-2R2M/4867759) and it does work with the B404X. I don't see an obvious reason why you one you selected would not work, however.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [April 2, 2025, 8:24am UTC](https://community.particle.io/t/b404x-usb-not-providing-enough-current/67625/11 "2025-04-02T08:24:15Z")

</div>

Closed on April 2, 2025, 8:24am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
