P-Channel MOSFET + Capacitor Causes Arduino to Reset

I'm using a P-Channel MOSFET (http://www.digikey.com/product-detail/en/NDP6020P/NDP6020P-ND/1055922) to control flow of power to two NeoPixel rings from Adafruit. Power is supplied by a 7.4 V 2200mAh 2S 40C Lipo Pack connected to a Step-Down Voltage Regulator that outputs 5V.

Using their best practices guide (Best Practices | Adafruit NeoPixel Überguide | Adafruit Learning System) if I add a 10V 1000uF capacitor across + - terminals my board gets stuck in a reset loop and sketch fails to run. If I remove the capacitor or MOSFET individually my circuit works fine. They don't work together.

MOSFET and No Capacitor. This works. I can toggle the power on and off to the NeoPixel rings with the MOSFET:

Capacitor and NO MOSFET. This works but now I can't control power to the NeoPixel rings.

Capacitor + MOSFET. This causes board reset loop:

What I'm doing wrong here?

Yeah, the surge of current associated with charging the caps is pulling supply down enough to reset the board.

There's no need to put caps after the mosfet here - the neopixel rings already have the bypass caps on them, and no additional cap is needed.

If anything, that cap should be placed across the supply (ie, between ground and the supply before the mosfet)

Let me show you what you did by switching in that 1000 µF capacitor.

I used a 2200 µF cap which I had to hand, and at the point you are watching you can see that connecting it drags the 5V supply down to about 1.7V. This was with a supply capable of delivering one amp.

The voltage gradually recovers over about 3 mS, by which time the processor would have reset.

As DrAzzy said, put the capacitor on the main supply, not after the MOSFET.

(The small glitch just after the voltage started dropping would be the power supply reacting to a sudden much larger load).

Adafruit suggests a 1000uF on the pixel strip.
This is to prevent damage to the strip when powered up.
However, in this application Nicks scope image shows you what happens when the processor uses the same power supply as the pixels.

If you want to use the 1000uF capacitor, the processor must be on it's own supply.

So since I admittedly have not looked into the specifications myself, what is the idle current of the NeoPixels?

What is the idle current of the regulator?

And why are you using a separate output line to each NeoPixel?

Hi all. Thanks for the great info. The Arduino community never fails.

Here's my revised circuit. Does this look right?

I haven't tested it yest because I have a bit of desoldering to do. I should have bread boarded the circuit first instead of slapping right onto my proto board. But I learned something this way I guess.

I didn't put the cap on the main supply, as LarryD mentioned the Arduino should be on it's own supply. I moved it just upstream of the MOSFET.

Can I just use the one 10V 1000uF capacitor instead of the original two I was using for each ring?

Here are some more specs for Paul_B:

This is the step down regulator I'm using: Pololu 5V, 9A Step-Down Voltage Regulator D24V90F5

Continuous output current: 9 A
Maximum quiescent current: 15 mA

NeoPixel Rings I'm using: NeoPixel Ring - 24 x 5050 RGB LED with Integrated Drivers : ID 1586 : $16.95 : Adafruit Industries, Unique & fun DIY electronics and kits
24 pixels per ring that with ~18mA constant current drive each

I can daisy chain the rings, but I have separate lines keep my code modular and control them independently. Is this bad for performance? I will consider daisy chaining them if it means faster animation time, freeing up a pin and reduced clutter.

The point of using a 1000uF capacitor on the input power line to the neopixel is to have the power slowly rise.
In your case moving to the other side of the FET, WILL NOT accomplish this.

I am not saying you need the capacitor at all but, if you want this feature, move the capacitor back and use two power supplies i.e. one for the processor itself.

Adding a second LIPO battery to this circuit, just to accommodate a capacitor seems like overkill.

Why does the capacitor have to be on the main terminals? If I eliminate the MOSFET, and just have the capacitor before the NeoPixel power lines, both NeoPixel rings and the microcontroller work fine running of the same power supply.

Why is moving capacitor to the other side of the FET not the same?

LarryD:
The point of using a 1000uF capacitor on the input power line to the neopixel is to have the power slowly rise.

Really? Surely its a bulk decoupling capacitor for a high current load to reduce
EMI back along the power rails.

In your case moving to the other side of the FET, WILL NOT accomplish this.

I am not saying you need the capacitor at all but, if you want this feature, move the capacitor back and use two power supplies i.e. one for the processor itself.

Unless the point is to save the queiscent drain of the neopixel rings, there
is no need to switch their power at all.

@MarkT
I am not a fan of using the 1000uf capacitor with the neopixel.

I would and have used a separate power supply for these strips (along with a 220uF cap for 5 meter lengths)

Adafruit is recommending the capacitor.
https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices

Before connecting a NeoPixel strip to ANY source of power, we very strongly recommend adding a large capacitor (1000 µF, 6.3V or higher) across the + and – terminals. This prevents the initial onrush of current from damaging the pixels.

.

Since the cap is to lower the inrush current why not simply use a larger
gate resistor on the p-FET for slower switching? Then the capacitor isn't
needed to limit ringing on the power rail (which seems to be the neopixel
sensitivity they are worried about).