Power supply design always wrong

Almost every time I build an Arduino based project, I run into power supply issues.
Always my fault (lack of planning etc!)

Take my current project.

I have a Mega, with an RTC module and an mp3 module attached, running off the Mega's 5v supply. They seem to work OK.

12v from my bench supply comes in, and splits into two feeds. One directly feed the amplifiers (small 3w) and the other feeds the Mega.

At the incoming point (2.1mm jack), I have a board with a 1000uf, 100uf and 0.1uf cap.
Tried my best to avoid ground loops etc.

BUT... the issue is nearly always these ws2812B, 5v Leds. These draw a lump of power, and different wall PSU's give me different issues.

With all six sets of RGB's lit at full, the 12v supply draws about 2.8A.
I originally had each strip fed from it's own 7805 regulator, but they just could not handle the current of each strip. The data corrupted all the time.

Finally I got them working by using 4x buck regulator boards. These are adjusted to 5v, supplied directly at the incoming source and only feed the LED strips (some of the LED strips share a supply, as they are not that big).

This seems to work, but the whole setup is still very tempermental to the original incoming 12v supply. Bench supply works OK, but most wall adapters fail (corrupted data).
Just ordered a new 6A 12v PSU. See if that works.

All data lines to the RGB's have ferrite coils on. Quite literally anywhere I think I need it, I stick a capacitor or two nearby.

YET... I still suffer supply noise issues.

I also have an IR receiver on the project (resistor and capacitor attached next to it as the datasheet suggests), and this is reading corrupted data unless I strip out all the code for the RGB leds (Then it works fine).

Can someone point me in the direction of a decent power supply design that would allow me to build my projects without this constant supply noise issue.

My projects are nearly always 12v based.

I don't have a scope, so I can't narrow down noise that way.

The only thing I never use is inline inductors or coils. I don't have any and have no idea how to calculate what I would require (and whether they would make any difference).
Thanks

1 Like

I don't think the solution to your problem is capacitors or ferrite beads etc, but it's hard to be sure based on only a description.

I suspect the issue will be around layout, grounding and poor connections, and possibly inadequate power supplies.

Forget linear regulators like the 7805, they just convert excess voltage to heat. Moving to buck converters is a good move, but they still need to be connected correctly.

A schematic and some clear photos of how you have things wired up might reveal some obvious problems.

So why didn't you order a 5volt supply.
Leo..

Hey, for any serious project - which really means just about anything other than the bare Arduino board flashing its "L" LED on pin 13, you really must completely forget about using "Vin" or the "barrel jack". These are just ornaments based on the original history of the Arduino (well) over ten years ago. In the meantime, switchmode power supplies are now really the default and you need a very special reason to use anything else.

The Arduino - its microcontroller chip - runs on 5 V, not 12. So just provide it with 5 V using a 5 V power supply adequately rated for whatever else requires your 5 V. Note - I keep repeating five Volts because that is what it uses. :grin: (Various other/ later devices use 3.3 V. :sunglasses:)

Just be careful when using USB at the same time :wink:

I use 5V for the strips (and other electronics) and a small converter to create 9V for Vin from 5V.

Consider getting one.

For simulating (&calculating values etc.) I always use LTSpice. It's free - but has a learning curve. But lots of documentation is available online.

There's not a single design that will fit all bills. The best you can do is collect information on the power usage pattern of all parts of your project and then decide on a power supply architecture; i.e. decide how you will get from 115/230VAC (or whatever) to the main voltages that will supply all parts and how you will locally distribute that power across individual components & modules. Power supply design is an integral part of overall system design. Yes, it usually involves off-the-shelf modules for many steps (e.g. 230VAC->12VDC SMPS units etc), but the power supply as a sub-system is usually still specific to the task.

Hey all. Thanks for the advice.

12v supply is because the amps, a lot of the lighting effects, and relays are 12v coils.
I would use 12v WS2812B leds, but I literally have 50m of the 5v stuff, so would like to use those up.

I used the 12v jack to the Mega because I am trying to keep any output load low on the processor, so I thought that would be fine. I could supply it with 5v, but then it's another clean 5v I need to find (sharing with the WS2812 leds is a no no for noise).

Switched mode supplies? I ALWAYS seem to have noise issues when I use those. Especially with projects that have audio components.

I think maybe I need to design a basic PSU PCB with multiple outputs and plenty of filtering.
Then use that for the basis for my projects.

I'll have a tinker

DC to DC isolated converters are good for eliminating ground loops, you should look into those. Also if LEDs give you trouble, try powering them from completely separate supply, all the way from the mains.

Trouble is, most of my projects tend to have a single 230v or 12v input.
I think my best foot forward would be to design a PCB that has say 6x 5v outputs all nice and clean, 2x 12v and maybe 3.3v as well.

You don’t have to stick with your typical designs if you are not satisfied with the result. I don’t quite understand what stops you from not using a single supply?

1 Like

For your power source look into using an old PC power supply. You will have more 5 volt power than you can shake a stick at. There will probably be enough 12 volt too. There are several adapter boards on eBay that will adapt the power supply connector to something you can use. There are also YouTube videos about bench power supplies using excess PC power supplies. If part of your problem is ground, all power from one power supply will fix that. Good luck.

The 7805 requires bypass capacitors from the noise they generate.

I've had good luck with these:

1 Like

Hi,
Can you post a schematic of you project when you used LM7805 regulators.

How do you mean they couldn't handle the current?

Did they get hot and/or shut down?
Did you have each LM7805 bypassed as shown in the datasheet.

2.8A / 6 strips = 0.466A per strip. (Assuming the greatest current even though some goes to the Mega)
Power dissipated in regulator;
P = (supply volts - output volts) * output current
P = (12 - 5) * 0.466 = 7 * 0.466 = 3.2Watts

A standard TO220 heatsink should do the trick, or bolt it to a metal part of the chassis of your project if the chassis has a metal plate.

Tom... :smiley: :+1: :coffee: :australia:

Because I make props (for myself) and I don't want to have 2x plugs on it, when it could have 1!
I would rather design all the power supply parts within the project itself and have a single plug on it.

Tried computer PSU's and that failed miserably. I too thought I had found a great power supply basis.

I built a project a while back, based on a 700W computer PSU (New one).
I had horrific issues with noise on the MP3 part of the project. Just could not cure it.

After literally weeks of filtering, ferrite coils, rewiring and adjustments.... I binned the computer PSU and fixed the issue overnight.

Never tried one since

As for the 7805's....

100uf and 0.1uf caps on the in and the out. Mounted on a heatsink.

I measured the load of the WS2812 Leds to be considerably more than you do. I powered a strip directly off the bench PSU and some of them were peaking at 1.2A.
Certainly more than 0.466A per strip. Not sure in fact why I am not pulling more amperage on the final 12v supply.

I determined they were failing because I didn't have the issue off the bench supply, but they didn't work correctly off the 7805's. Plus... the heatsinks were bulky anyway.

I realise I am stabbing in the dark a bit, and a lot can be down to wiring.
I am super neat with my wiring, and I usually run everything back to one point and star the supplies from that.

So it's annoying when you have to start un-stitching your neat work to troubleshoot

Hi,

Did you notice if the 7805's were hot even with the heatsink?
You didn't happen to measure the input and output voltages AT the LM7805 leads?

If peaking 1.2A, then 1.2 * 7 = 8.4Watts.
Grounds are important and I would make sure that the strip supply was star joined at the power supply.
You are using 330R that they recommend in series with the signal wire to the first 2812 of each leg?

I can imagine you would be neat with your wiring due to audio floating around as well. :+1:

Tom... :smiley: :+1: :coffee: :australia:

It took you weeks because you were stumbling in the dark. I'll say it again - consider getting a scope. Even a cheap scope is better than no scope. If you struggle with noise issues a lot, then there's no other valid way in my opinion to proceed than to make your problem observable.

1 Like

Yes.... 330R on each data line to the RGB leds.
New 12v PSU just arrived. Seems better, but will push it later on to see how it performs.

I start off super neat, then it doesn't work and you end up ruining all your nice looming, routing and connections pulling it apart again to find the issues :roll_eyes:

Yeah, that's how it goes. It's what prototyping is for.