Author Topic: Advice for smooth 5V power for large PWM LED array  (Read 1001 times)

0 Members and 1 Guest are viewing this topic.

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Advice for smooth 5V power for large PWM LED array
« on: January 10, 2018, 04:36:04 pm »
I'm building a 256x64 pixel RGB led array using those P5 LED panels from china.

The display is up and running but i'm getting some display issues which i'm sure its just noisy 5V power
Each display block is PWMed with a 10mhz pixel clock, so they do have lots of high current spikes.

Up until now i've been running the screen from two ATX computer psu's.
I had to go through 4 or so before i found 2 that worked solid with no draw issues. (stable picture).
Others where causing issues such as dim rows, flickering or randomly missing a clock.

Now that the display code is working well i'm moving to a more finalized power system.
I have removed the computer power supplies and replaced them with something more permanent.

The display uses up to 2A per panel and there are 16 panels, so 32A at 5V which i will split over a few powersupply modules.
I want to use maybe 2 of these kind of DC modules.
https://www.digikey.co.nz/product-detail/en/tdk-lambda-americas-inc/I6A4W020A033V-002-R/285-2668-ND/6605121

But from testing its clear i need some filtering as they are glitching the display like i had before.
I've tried just adding bulk capacitance at the PSU and at the LED ends, but it doesn't help.

The scope is showing this on the 5V rail at the LED array power connectors. (see scope pic)

400mV of noise on a 5V rail definitely seems like its the cause of the problem.
Does anyone have recommendations for how to filter this out?
The freq looks to be around 85Mhz
« Last Edit: January 10, 2018, 04:44:38 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #1 on: January 10, 2018, 06:13:39 pm »
Edit:

Ok, so i've tested a few more things and i seem to have another issue which maybe related.

Does anyone know what might cause a STM32 IO pin to do this periodic half rail oscillation?
This is with the LED display disconnected,  it's the raw IO pin which goes to a 3.3-5V converter IC (unloaded)

[/img]

The pin is being driven via DMA -> GPIO and this half rail oscillation is around 60Mhz.
The waveform shown is one of the color lines (so high = blue pixel on) loaded in via 10mhz clock

Seems kinda weird.





« Last Edit: January 10, 2018, 06:18:06 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11077
  • Country: gb
    • Mike's Electric Stuff
Re: Advice for smooth 5V power for large PWM LED array
« Reply #2 on: January 10, 2018, 10:04:53 pm »
Don't use PC power supplies for anything other than PCs.
Modern PC supplies are designed to primarily supply 12V, and unles this rail has a decent load, other rails will not perform well.

Proper 5V SMPSs are dirt cheap. Locate them as close as possible to the display with heavy ( 2.5mm^2) cable.

Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: Asuka

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1869
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Advice for smooth 5V power for large PWM LED array
« Reply #3 on: January 10, 2018, 11:09:17 pm »
I can't speak to weird oscillation on I/O pin, but the prior rail
noise image, not all capacitors are equal. Examine datasheets
closely for actual performance.  Polymer tantalums for bulk.

Consider a MLC cap, in addition to bulk, to handle the low Mhz kinds of
transients. MLC, ceramic caps, have Freqs ESR curves that perform
into the Mhz area. And "stiff" low inductance electrical grounding very
important.


Also make sure scope probe ground lead very short -

https://www.edn.com/design/test-and-measurement/4359071/Are-you-measuring-your-circuit-or-your-scope-probe-


http://web.mit.edu/6.101/www/reference/ABCprobes_s.pdf


Regards, Dana.


Regards, Dana.
« Last Edit: January 10, 2018, 11:12:56 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline ogden

  • Frequent Contributor
  • **
  • Posts: 744
Re: Advice for smooth 5V power for large PWM LED array
« Reply #4 on: January 10, 2018, 11:27:30 pm »
Does anyone know what might cause a STM32 IO pin to do this periodic half rail oscillation?
This is with the LED display disconnected,  it's the raw IO pin which goes to a 3.3-5V converter IC (unloaded)

Looks like reflection on long cable or faulty IC. How long is line between uC pin and 3-5V converter IC? How long is line/wire from converter to LEDs? How it looks on bare pin, when 3-5V converter IC is disconnected? Does stm32 pin properly configured for hi-speed push-pull mode? Could you possibly show schematics,m preferably with line lengths specified - if they are considered as long?
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #5 on: January 10, 2018, 11:51:37 pm »
Does anyone know what might cause a STM32 IO pin to do this periodic half rail oscillation?
This is with the LED display disconnected,  it's the raw IO pin which goes to a 3.3-5V converter IC (unloaded)

Looks like reflection on long cable or faulty IC. How long is line between uC pin and 3-5V converter IC? How long is line/wire from converter to LEDs? How it looks on bare pin, when 3-5V converter IC is disconnected? Does stm32 pin properly configured for hi-speed push-pull mode? Could you possibly show schematics,m preferably with line lengths specified - if they are considered as long?

How long is line between uC pin and 3-5V converter IC?
About 15mm

How long is line/wire from converter to LEDs?
up to 2 feet, but it was occurring with the LED cable disconnected, so can't be this.

How it looks on bare pin, when 3-5V converter IC is disconnected?
Have not tried that yet

Does stm32 pin properly configured for hi-speed push-pull mode?
yep, init as push pull and max speed, then i let the DMA run and don't change it again.
« Last Edit: January 10, 2018, 11:58:44 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #6 on: January 10, 2018, 11:58:13 pm »
Don't use PC power supplies for anything other than PCs.
Modern PC supplies are designed to primarily supply 12V, and unles this rail has a decent load, other rails will not perform well.

Proper 5V SMPSs are dirt cheap. Locate them as close as possible to the display with heavy ( 2.5mm^2) cable.

The computer psus i was origionally using were rated for 30A at 5V and did work fine with 15A loading.
They were just a temporary thing so i could get the code working, and they worked fine.

The problem i'm having now started when i switched to using proper lambda switchmode modules.
However i need to do more investigations and see whats causing that random io pin half rail thing.
It maybe responsibly for all my issues and turn out to not be a power problem at all.
However the +/-200mV on a 5V rail that im seeing does seem a bit large to me.
« Last Edit: January 11, 2018, 12:01:51 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ogden

  • Frequent Contributor
  • **
  • Posts: 744
Re: Advice for smooth 5V power for large PWM LED array
« Reply #7 on: January 11, 2018, 12:02:40 am »
up to 2 feet, but it was occurring with the LED cable disconnected, so can't be this.

No cable reflection then. You shall suspect level converter or it's use. In your case you shall use high current buffer, not simply level converter. Could you tell at least what level converter you use?
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #8 on: January 11, 2018, 12:04:54 am »
I can't speak to weird oscillation on I/O pin, but the prior rail
noise image, not all capacitors are equal. Examine datasheets
closely for actual performance.  Polymer tantalums for bulk.

Consider a MLC cap, in addition to bulk, to handle the low Mhz kinds of
transients. MLC, ceramic caps, have Freqs ESR curves that perform
into the Mhz area. And "stiff" low inductance electrical grounding very
important.

The caps i was testing with were some 47uF 10V MLC and some low ESR 1200uF 10V Aluminium panasonic polymer caps.
I think there were good enough to fix the issue had it been a simple lack of capacitance at the load.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ogden

  • Frequent Contributor
  • **
  • Posts: 744
Re: Advice for smooth 5V power for large PWM LED array
« Reply #9 on: January 11, 2018, 12:07:46 am »
However the +/-200mV on a 5V rail that im seeing does seem a bit large to me.

To decrease power rail pulses (and EMI as well), it is common for hi-power LED systems to do "interleaving" - split display into many (>= 4) phases so all the display led's do not switch on or off at the same time.
 

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 522
  • Country: us
Re: Advice for smooth 5V power for large PWM LED array
« Reply #10 on: January 11, 2018, 12:08:54 am »
Edit:

Ok, so i've tested a few more things and i seem to have another issue which maybe related.

Does anyone know what might cause a STM32 IO pin to do this periodic half rail oscillation?
This is with the LED display disconnected,  it's the raw IO pin which goes to a 3.3-5V converter IC (unloaded)

[/img]

The pin is being driven via DMA -> GPIO and this half rail oscillation is around 60Mhz.
The waveform shown is one of the color lines (so high = blue pixel on) loaded in via 10mhz clock

Seems kinda weird.

Hmm, NTSC back porch color burst?  :-DD  :-DD
Sorry couldn't resist...
PEACE===>T
 
The following users thanked this post: SeanB

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11077
  • Country: gb
    • Mike's Electric Stuff
Re: Advice for smooth 5V power for large PWM LED array
« Reply #11 on: January 11, 2018, 01:43:23 am »
up to 2 feet, but it was occurring with the LED cable disconnected, so can't be this.

No cable reflection then. You shall suspect level converter or it's use. In your case you shall use high current buffer, not simply level converter. Could you tell at least what level converter you use?
These panels are designed for 5V levels - you should be using  74HCT buffers (e.g. 74HCT541) , plus about 100R damping resistor to drive any significant cable length. You may be able to get away with 3.3v but could see reliability issues, sepecially if the 5V rail is less than optimal, as variations will affect the thresholds of the input buffers.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #12 on: January 12, 2018, 09:39:40 pm »
I am driving them with 5V, the scope is showing the 3.3V mcu side, before the level shifter (NTS0104PW)
https://www.nxp.com/docs/en/data-sheet/NTS0104.pdf

Sorry the subject of the thread is a bit misleading now.
I originally thought i had a power issue because it only started misbehaving after I removed the ATX psus and went to some small DC/DC modules.
But given the weird waveform from the MCU i don't think this is power at all.

« Last Edit: January 12, 2018, 09:44:06 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11077
  • Country: gb
    • Mike's Electric Stuff
Re: Advice for smooth 5V power for large PWM LED array
« Reply #13 on: January 12, 2018, 09:50:13 pm »
I am driving them with 5V, the scope is showing the 3.3V mcu side, before the level shifter (NTS0104PW)
:scared: :scared: :scared:NO NO NO!
 These devices are terrible - only suitable for situations where you need the bidirectionality, and should NEVER be used for driving more than a few inches of track. They have negligible drive strength - capacitance and cable reflection on the output causes all sorts of oscillation and instability.

74HCT buffers should be used for 3.3-5V interfacing.

I once had to design & build 200 bodge boards in 5 days because someone had used these drivers to drive 2 ft. of cable for an installation. 

Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline ogden

  • Frequent Contributor
  • **
  • Posts: 744
Re: Advice for smooth 5V power for large PWM LED array
« Reply #14 on: January 13, 2018, 12:12:02 am »
74HCT buffers should be used for 3.3-5V interfacing.

Exactly. 5V HCT logic "1" input level ranges from 2v to 5v, so your 3V signal will toggle it w/o any problems/skew. Just replace level converter with HCT buffer.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #15 on: January 13, 2018, 11:13:10 am »
I am driving them with 5V, the scope is showing the 3.3V mcu side, before the level shifter (NTS0104PW)
:scared: :scared: :scared:NO NO NO!
 These devices are terrible - only suitable for situations where you need the bidirectionality, and should NEVER be used for driving more than a few inches of track. They have negligible drive strength - capacitance and cable reflection on the output causes all sorts of oscillation and instability.

74HCT buffers should be used for 3.3-5V interfacing.

I once had to design & build 200 bodge boards in 5 days because someone had used these drivers to drive 2 ft. of cable for an installation.

Interesting, that could definitely be part of the problem. Thanks.

If any reflections are large enough they might cause the NTS0104 to flip directions and try to drive into the MCU output. Which could easy look like the waveform i getting.

From memory the NTS0104 was just the first level shiftier i came across that was rated ~50Mhz. but having a second look i see there are some 74HTC options that go to 90mhz.
I will have a play with this and see if i can damp down the reflections. Otherwise I might have to re-spin the PCB to use 74HCT.

I take it you never found any pin compatible chips to replace NTS0104 with, or you would have used them rather than building bodge boards?
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11077
  • Country: gb
    • Mike's Electric Stuff
Re: Advice for smooth 5V power for large PWM LED array
« Reply #16 on: January 13, 2018, 11:53:02 am »

From memory the NTS0104 was just the first level shiftier i came across that was rated ~50Mhz. but having a second look i see there are some 74HTC options that go to 90mhz.
I will have a play with this and see if i can damp down the reflections. Otherwise I might have to re-spin the PCB to use 74HCT.

I take it you never found any pin compatible chips to replace NTS0104 with, or you would have used them rather than building bodge boards?
Nope. For a chip with nasty gotchas like this it's annoying they didn't do a non-bidirectional drop-in, but I suppose that would have needed multiple permutations of direction

74ACT may be an option if you need faster, though from memory I think the panels themselves use HC input buffers

If respinning, also add provision for series resistors to damping (50-100R - select to get cleanest waveform at end of cable)
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 6911
  • Country: us
  • DavidH
Re: Advice for smooth 5V power for large PWM LED array
« Reply #17 on: January 13, 2018, 01:07:45 pm »
The scope is showing this on the 5V rail at the LED array power connectors. (see scope pic)

400mV of noise on a 5V rail definitely seems like its the cause of the problem.
Does anyone have recommendations for how to filter this out?

I have faced this very problem before.  I had to add additional LC filtering for isolation between modules but the thing to do is use decoupling local to the LED driver which minimized the loop area and use a floating higher current supply for the display with a single point ground to prevent a ground loop.

Does anyone know what might cause a STM32 IO pin to do this periodic half rail oscillation?
This is with the LED display disconnected,  it's the raw IO pin which goes to a 3.3-5V converter IC (unloaded)

Your oscilloscope may have too low of a bandwidth or sample rate to see exactly what is going on.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #18 on: January 13, 2018, 03:10:11 pm »
The scope is showing this on the 5V rail at the LED array power connectors. (see scope pic)

400mV of noise on a 5V rail definitely seems like its the cause of the problem.
Does anyone have recommendations for how to filter this out?

I have faced this very problem before.  I had to add additional LC filtering for isolation between modules but the thing to do is use decoupling local to the LED driver which minimized the loop area and use a floating higher current supply for the display with a single point ground to prevent a ground loop.

Does anyone know what might cause a STM32 IO pin to do this periodic half rail oscillation?
This is with the LED display disconnected,  it's the raw IO pin which goes to a 3.3-5V converter IC (unloaded)

Your oscilloscope may have too low of a bandwidth or sample rate to see exactly what is going on.

Yeah, some LC filtering right at each module power input maybe needed. Will do some testing after i fix the other problems.
The P5 LED display can actually run from 4.5V without any issues, so +/- 200mV of ripple may actually be fine.

The LED pixel clock is 10Mhz and the scope is 100Mhz, should be able to see current pulses from the LEDs at least.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 11077
  • Country: gb
    • Mike's Electric Stuff
Re: Advice for smooth 5V power for large PWM LED array
« Reply #19 on: January 13, 2018, 08:33:48 pm »
The P5 LED display can actually run from 4.5V without any issues, so +/- 200mV of ripple may actually be fine.
In fact running at reduced voltage can help reduce heating as anything above the drivers' dropout voltage is just heat. Turning the supply down until the current starts to drop, then turning back up 0.5V to give some margin is a good way to optimise this. I wouldn't be concerned about 200mV ripple
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #20 on: January 14, 2018, 06:46:23 pm »
I've tracked my issue to the address lines voltage sagging. Almost definitely due to the level shifter not having the power to drive them hard enough.
Strange that other lines are fine, but i guess the others are likely buffered between display panels where as the address lines are probably just a passthrough.

When the address voltage low the noise is sometimes enough to corrupt the address and cause a glitch.

The reason i didn't have the issue with the ATX power supplies was due to the longer cable run and Vdrop on the 5V rail.
With less voltage getting to the displays the sagging address lines voltage was brought closer to spec (percentage to vcc wise) and the problem didn't occur.

So for now im running the displays on 4.5V instead of 5V.
Will look at a PCB re-spin later on once i get the software text/drawing side sorted.

Here's a picture of the driver PCB, in case anyone is interested.
That's 5x STM32F407's :) 
One master and one for each block of 4 led panels.
It's only a fun project so i give it plenty of CPU power, easier to code and more options to add fun stuff later.
If i wasn't so lazy i would have learned to write FPGA code instead



« Last Edit: January 14, 2018, 07:06:50 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 6378
  • Country: nz
Re: Advice for smooth 5V power for large PWM LED array
« Reply #21 on: January 14, 2018, 08:38:31 pm »


Lines are just the camera, and i've not aligned each panel properly yet.

Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf