# Why does my Inrush Current Limitation not work sufficiently?

I have a battery powered application and want to somehow "protect" the battery from seeing too high currents. For that I have introduced a serial resistor to limit inrush current. After a certain time the resistor gets bypassed via a Mosfet.

It has an effect on the inrush current but it's still not like I would imagine it.

When meassuring with a current probe between the Battery and my circuit I can still see a peak when switching power on as well as when I activate the Mosfet (blue line). (red line shows voltage on uC pin)

can someone explain what happens here and how to prevent those spikes?

//e: uC is a STM32 and configured as openDrain without internal PullUp/Down

//e2: after adding a N-FET to activate the P-FET as suggested it looks like this:

//e3: so the first spike is still there, even when disconnecting the uC by removing R50 as suggested by @DKNguyen

//e4: implemented @Indraneel's Solution with C2=0.1uF and R2=500k and keeping R3 at the initial 18ohm. This could be a solution. Still curious why it is not working with the uC

• Is that spike even a concern? It doesnt look long enough to heat up the battery. I think thats just the MCU booting up and being unprepared. To verify, remove R50. Aug 15, 2019 at 14:20
• @DKNguyen It's no big concern... but I do not even understand why it is there. Aug 15, 2019 at 14:24
• @brhans right now the uC waits 80ms and then pulls the line low to activate the mosfet Aug 15, 2019 at 14:29
• Is your microcontroller's open-drain output "high-voltage tolerant"? If not it's very likely that at power-up you're sinking current from that pin into Vcc through the pin's 'parasitic' diode while Vcc 'slowly' ramps up from 0V. You'd probably have greater success using the micro to drive an external N-Channel MOSFET, which then pulls the other P-Channel MOSFET's gate low. Aug 15, 2019 at 14:39
• @brhans the pin is 5V tolerant. But since the uC is powered out of the same battery (after the inrush current limiter) it isn't even powered up when Vbat is activated. Aug 15, 2019 at 14:45

You've configured your micro's output for openDrain without internal PullUp/Down, and you think you have this:

simulate this circuit – Schematic created using CircuitLab

But in all likelihood what you actually have is this:

simulate this circuit

When you initially power up your circuit, Vcc and GND are at the same potential, so your micro's 'open-drain output' pin will quite happily sink current - and the way you have your external P-FET configured means that it will turn on.

I suggest that you configure your output pin as push-pull and use it to drive an external N-FET, which then in turn drives the P-FET.
Put a pull-down on the N-FET's gate to ensure that it stays turned off until the micro commands it to turn on.

• sounds reasonable but it doesn't seem that it will do the trick. I added a screeshot of the scope in the initial post. Aug 15, 2019 at 16:10
• @gloerk - You certain you hooked it up right? Your scope trace looks like the P-FET isn't switching at all now ... Aug 16, 2019 at 1:29
• Of course I did not. I updated the image above... Aug 16, 2019 at 8:42

This has a current limit of 300 mA. R3 can optionally be an NTC (e.g. 10D9). Mosfet needs to be logic level (SI2305 should work). Adjust C2 and R2 for your sweet spot (0.1u and 100K will also give same result). R1 is a load.

C2 when not charged pulls up the gate and prvents mosfet from conducting. When charged, R2 pulls the gate low and mosfet conducts. A bleeder resistor may be preferable somewhere in the circuit if device will be switched on and off repeatedly.

Output voltage (red), mosfet current (green) and 100uF capacitor current (blue). Increasing R3 will lower the initial peak. Changing to an NTC resistor will make the curve smoother....

• I tested it. Result is in the initial post. Where would you put a bleeding resistor? Wouldn't it effect the whole function of the inrush piece? Aug 16, 2019 at 15:38