How to filter power supply for NeoPixel circuit

I built a circuit using a Pro Mini, which "listens" to an electret microphone (via interrupt 1) to determine if a certain frequency is being whistled. When the frequency is detected, it turns on a chase sequence of 36 NeoPixels driven at a 0.5 second rate. Whistling the same frequency again is supposed to turn the pixels off.

However, it whistled on just fine, but wouldn't whistle off. Checking with the oscope, I found that the microphone produced a spurious (approx.) 800 Hz. signal when the NeoPixels were on.

Then I checked the power supply (delivered through a 7805) with the oscope and found that it went to about 100 mv. ripple when the Neopixels were on -- maybe not surprising, because they represent a sudden rather large power demand.

So I then powered just the mic circuit with a separate power supply, and the problem disappeared, which verified my supposition that the power supply was at fault. But in the final product, I need the whole circuit to run from the 7805, so the question is, what is an efficient, inexpensive way to add filtering to the just the power supplied to the mic circuit, which draws maybe 10 ma. max.

Thanks in advance for any insights.

John Doner

Capacitors?

How much current do the neo-pixels draw, because I think usually the regulators only increase in ripple as you get close to their max output rating. So maybe you need a different voltage regulator.

Be surprised if it was as much as 10 mA, but try 150 ohms in series followed by 47µF to ground at the microphone supply. At worst, you might lose a volt.

And maybe 470 µF across the first NeoPixel. Importantly, check your power wiring; the supply to the NeoPixels should come directly from the output and ground terminals of the 7805 with no sharing of wire to the Arduino and microphone.

Try a 470mF cap from the output of the 7805 to ground.
Or add another 7805 and 470mF cap for the NeoPixels.

As it stands, I've decided to try using a separate 5v. zener power supply, taking my voltage directly from the battery (in front of the 7805). I haven't done it yet, but I'll bet it provides a reliable solution. Thanks for the tips.

John Doner

You probably just need more capacitors on the output.

PS: Ceramics, NOT electrolytics.

fungus:
PS: Ceramics, NOT electrolytics.

Why? This is 800Hz we are talking about!

Final update: used a 5.1 V. zener fed through a 68 ohm resistor, fed directly from the battery (before the 7805), and got a result which shows no ripple whatsoever.

Actually, this gives me an idea for a good power supply tester. Use a load consisting of LED's simultaneously turned on and off. Easy to vary the current and the rate, to really wring out the quality of a power supply.

Thanks for all the comments.

John Doner

jrdoner:
Final update: used a 5.1 V. zener fed through a 68 ohm resistor, fed directly from the battery (before the 7805), and got a result which shows no ripple whatsoever.

But you are powering this from a battery. 12V? 7V drop over a 68 ohm resistor is 100 mA - wasting a lot of current there even if the mic drew 10 mA which I rather doubt.

Far better to use a LM1117-5 or similar regulator, waste only - let's see - typical 5 mA, maximum 15 mA in addition to whatever current your mic actually draws.

And you still need capacitors.

Hi, what format are you going to make the final product?

Make sure that you put bypassing capacitors and some filtering in place because the 800Hz you measured was probably current load from the LED array.

Also what is the battery supply, if 12V make the 5.1V zener 1Watt, even thought it will not be shunting all the current, with no load it would be dissipating 0.5Watt, make space for it warm up.

Tom...... :slight_smile:

TomGeorge:
Also what is the battery supply, if 12V make the 5.1V zener 1Watt, even thought it will not be shunting all the current, with no load it would be dissipating 0.5Watt, make space for it warm up.

Oh come on!

For any battery supply, a Zener shunt regulator is simply the wrong way to do it.

What's the power source?

A couple of large caps to deal with the power supply, then feed that to the 7805?

Hard to imagine without a circuit

Hi.

Oh come on!

Hey, I didn’t say it was a good idea.

I’d suggest a buck switch mode supply.

Efficient and will provide better regulation over wider range of input voltages.

Tom… :slight_smile:

The power source for this whole shebang is a 7.4 v. 1400 mah batter (2xLiPo). Works great for my app. Current with the LED's off is about 40 ma. with LED's on, maybe 200 ma. But the LED's are only occasionally on. The zener power supply is only using about 4 ma., because it is only dropping on average about 2.5 v. through 68 ohms, and the mic circuit itself maybe another ma.

This whole thing is going to be a NeoPixel hatband for my Fedora, with the electronics in the top of the hat. I can whistle it on and off, and using a different tone, whistle changes to the rate at which the color patterns chase around the hatband. Works fine, now time to make the PC board and put it in the hat.

John Doner

jrdoner:
The zener power supply is only using about 4 ma., because it is only dropping on average about 2.5 v. through 68 ohms

You sure? Slip of the finger? My calculator says 36 mA. :astonished:

jrdoner:
and the mic circuit itself maybe another ma.

And you measured this? Using what range on the multimeter? {Hint: it is not easy to measure!}

Whoops! slipped a decimal point. You're right about current draw. That got me serious about current reduction, so I found that the mic still gets enough current even with a 330 ohm resistor in series with the zener. That gets current draw down to 7.5 ma. for the Zener power supply. That's a big savings. Thanks for noticing my error.

John Doner

Check in the datasheet if the microphone can withstand 7 volts.
The microphones I use can withstand 10 volts.

If they do that, just remove the zener.
You can also increase the resistor so you get 5-6 volts to the mic.

Pelle

Whoops! misplacement of decimal point. So I went back and increased the resistor from 68 ohms to 330. The supply still operates the mic from a battery voltage high of 8.3 v. to a low of 6.5 v., where I shut the circuit off to protect the batteries.

The zener power supply in that case passes an average of about 7 ma. to ground. I can accept that for such a clean power supply.

The circuit, driving 36 neopixels, uses about 65 ma. quiescent, 220 ma. when all NeoPixels are lit. The total draw of the Neopixels can be really large, if they are used at full intensity. I am using them at about 1/4 intensity, which s plenty bright enough for indoor use.

Thanks for pointing out my error. Saved me about 28 ma.

John Doner