Author Topic: PWM dimmers and supply line noise  (Read 7158 times)

0 Members and 1 Guest are viewing this topic.

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #25 on: April 28, 2021, 02:59:07 am »
Holy crap, Tim! Those posts!  ;D

I'm really sorry that I didn't see your replies until now. I haven't been on the forums for a couple days and the bulletin board system just notified me now that you had responded. I will need some time to digest all of this.

All I can say is... wow. I am so appreciative for your help!

Andy
 

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #26 on: May 12, 2021, 12:21:07 am »
I finally carved out some time to really dig into these responses. There's a wealth of information here, and I hope others will benefit from this thread. I had no idea it'd grow the way it did. :-+

In reading through Tim's response about snubbing and edge rates, it's really clear that the devil's in the details. I can't imagine that a lot of designers take the time to account for all of the nuanced relationships when producing cheap designs like the eBay circuit that I used to kick off this thread. I have always been a big fan of "best practices," so even knowing that all of this exists is a huge benefit for my understanding and future designs.

Electro Fan, you had asked about the length of the power wire in this circuit. The supply line to the LED strip is about 6 feet long, and the strip itself measures about 5 feet. It's the parallel-chained style, something like five LEDs in series per chain.

I think this thread started with me being concerned about radiated EMI (antennas) due to the switching behavior. One thing I considered trying, but haven't bothered to yet, is to run shielded wire to the LED strip. My most recent testing seems to suggest that the PWM is causing more ripple than noise. I do pick up some "fuzziness" on my scope when the LED strip lights are on, but that's probably from the SMPSes I'm using to drive the other, non-dimmable strips on my bench. Turn out the lights and the noise goes away.

Tim, on a slightly off-topic note regarding the mechanical analogs: I'm actually an ME, but I disagree that we have it harder :). You electrical guys have to deal with things you can't see (electrons), RF magic, and other phenomena that behave in strange ways... it's not always intuitive to a grease monkey like myself.

Years ago I worked as a junior vibrations engineer doing predictive maintenance for heavy machinery (really BIG stuff that you cannot afford to have go down unexpectedly). Characterize the responses and you can predeict when the equipment is likely to fail. It's the same idea with resonant frequencies and filtering on the EE side, but for some reason, it's just way more intuitive for me to see that mechanical connection--for example, a peak on an FFT correlates to a specific gear in a transmission based on the number of teeth, rotational speed, characteristic curve for a "good" machine, etc. At the end of the day, I guess it's all relative, though. :D

More to come in a bit... been testing the all-LM393 PWM circuits posted a few replies up and hopefully a little closer to laying out a board. Scope creep...
 

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #27 on: June 01, 2021, 02:49:05 am »
I've replaced the PWM dimming circuit with an LM393-based design that's essentially the same thing that Zero999 posted a while back. I only changed the PWM frequency, bumping it into the ~20 kHz range to avoid audible resonance from the power supply. The higher switching frequency also allowed me to use smaller filter caps and inductors.

After testing various configurations of filters, common mode chokes, and capacitance, I've managed to reduce the majority of the ripple and switching peaks. I'm curious if this design could be taken any further to: 1) reduce the remaining spikes on the circuit's +24 V rail, and 2) smooth out the ripple at the supply itself.

In the schematic below, I've identified four test points and posted their respective waveforms. The filtering components are highlighted in yellow.

I'm probably most "concerned" about the ~100 mVpp ripple at the power supply output terminals (TP1), caused by the circuit's switching behavior. (This test point is literally at the screw terminals, about two feet worth of wire away from the circuit under test.) When the LED strip is connected to the supply, without the dimmer, the output ripple is only 5 mVpp (SMPS @ 65 kHz). Besides adding more input capacitance, is there anything I can do to prevent the PWM circuit from inducing the ripple at the supply? (I'm thinking for future applications if I want to connect anything else up to the same supply.)

The other question I have relates to the waveform at TP3, measured "after" the LC input filter. The RMS ripple voltage is quite good now, but I'm not keen on the ~130 mVpp spikes caused by the MOSFET switching. I've already slowed down the gate rise/fall times via R10. Can anything be done to lessen the spikes, or is this just the nature of the beast? The LM393 doesn't seem to mind, but I want to see if I can flatten the curve a bit more.

Thanks in advance. :)



 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21567
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM dimmers and supply line noise
« Reply #28 on: June 01, 2021, 04:27:29 am »
Can you show the layout, how cables are arranged etc.?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19286
  • Country: gb
  • 0999
Re: PWM dimmers and supply line noise
« Reply #29 on: June 01, 2021, 11:10:14 am »
I would have reduced C2, rather than just R5 to keep the output from U1A closer to 50% duty. Try C2 = 10nF and R5 = 33k.

Yes, layout is very important. Please post a picture of the build.

But why not change to a linear constant current source? That will get rid of all the problems of EMI due to switching. Presumably the LED strip's length is fixed, rathar than variable? If so, use a constant current circuit.
 

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #30 on: June 01, 2021, 02:22:36 pm »
I'll post a picture later today of the layout. It's pretty rough, just cobbled together on perfboard, but all of the joints are soldered--not using solderless breadboard. When I settle on a circuit that works, I was going to design a board to fit inside a low-profile DIN rail enclosure.

If I recall, I think I originally had reduced C2, but the waveform looked a little distorted. I'll have to check again and see.

Yes, the LED length is fixed. The constant current supply is an interesting idea. I'm using a spare CV DIN-rail-mount supply for this LED strip. Is there any advantage to keeping the CV supply and building a discrete CC source instead of driving the MOSFET through PWM? The LED load draws around 1 A when powered straight through with the 24 VDC supply.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21567
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM dimmers and supply line noise
« Reply #31 on: June 01, 2021, 04:18:39 pm »
CC is DC, no noise.  Downsides are higher power dissipation and probably poorer CRI (white LED spectrum varies with If).

The mitigation is filtered PWM, so that noise stays on the PCB only; of course you have to have good filtering and shielding to actually realize that.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #32 on: June 01, 2021, 06:28:10 pm »
Gotcha. And by "filtered PWM," do you mean controlling the CC source with a PWM drive signal instead of the usual 0-10 VDC input? Something like this from Mean Well supports both DC and PWM current control.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19286
  • Country: gb
  • 0999
Re: PWM dimmers and supply line noise
« Reply #33 on: June 01, 2021, 08:05:36 pm »
CC is DC, no noise.  Downsides are higher power dissipation
Not with LED strip, which is just resistors and LEDs.

Quote
and probably poorer CRI (white LED spectrum varies with If).
Probably true, but I've not noticed much difference. It's more of an issue with the high efficiency green LEDs, which have a positive current/frequency characteristic.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21567
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM dimmers and supply line noise
« Reply #34 on: June 01, 2021, 08:22:30 pm »
CC is DC, no noise.  Downsides are higher power dissipation
Not with LED strip, which is just resistors and LEDs.

Uh, how you gonna control the current with a linear circuit, if not by dropping voltage?  The resistors don't matter, that's the point it's CC.  (The resistors act to share current between strings, but not to limit total current.)


Quote
Probably true, but I've not noticed much difference. It's more of an issue with the high efficiency green LEDs, which have a positive current/frequency characteristic.

Yeah, I've not noticed a difference with the desk lamp I made myself, though I rarely operate it at low throttle so *shrug*.


Gotcha. And by "filtered PWM," do you mean controlling the CC source with a PWM drive signal instead of the usual 0-10 VDC input? Something like this from Mean Well supports both DC and PWM current control.

Probably.

I mean running PWM fast enough to use an LC filter, in other words a power converter.  Preferably with all the features that entails: current mode control, feedback regulation and etc.; you'd most likely use a bog standard switching regulator, adjusting it by offsetting its feedback input pin.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19286
  • Country: gb
  • 0999
Re: PWM dimmers and supply line noise
« Reply #35 on: June 01, 2021, 09:29:33 pm »
CC is DC, no noise.  Downsides are higher power dissipation
Not with LED strip, which is just resistors and LEDs.

Uh, how you gonna control the current with a linear circuit, if not by dropping voltage?  The resistors don't matter, that's the point it's CC.  (The resistors act to share current between strings, but not to limit total current.)
I meant that, in this case a linear CC circuit, won't be any more efficient, than PWM, because the power is just burnt up in the current limiting resistors.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21567
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM dimmers and supply line noise
« Reply #36 on: June 01, 2021, 11:49:14 pm »
Ah, compared to full voltage operation, yes.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #37 on: June 02, 2021, 02:25:19 am »
I mean running PWM fast enough to use an LC filter, in other words a power converter.  Preferably with all the features that entails: current mode control, feedback regulation and etc.; you'd most likely use a bog standard switching regulator, adjusting it by offsetting its feedback input pin.

So, maybe something like this [PDF] CC switching regulator IC? As you and Zero were discussing, the resistors built into the LED strip would balance the strands and the CC regulator would limit the overall current.

--

Back to the discussion about noise... here are some pictures of the circuit layout and cables. I know it's a messy prototype :). The RC snubber and various capacitors were add-ons from testing. The only non-soldered connections are where the mini-grabbers attach to the circuit. Yellow is +24 V, Black is ground, and Blue is drain. The last picture is the LED strip as installed.








 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21567
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM dimmers and supply line noise
« Reply #38 on: June 02, 2021, 06:25:33 am »
And the blue clip is... ah, that goes to the black wire (just a thin stripe of red) of the pair, doesn't it.

Can you show where you were probing the waveforms as well?

The concern is that, the power supply leads act in parallel with the filter cap, so will share some of the (ripple) voltage drop, and where the probe is connected along there also matters.


Ah, compared to full voltage operation, yes.

Tim

Oh, I remember.  I meant that a CC circuit has to dissipate some power on the controlTotal power is less at lower output, but the distribution of that power shifts.  Whereas PWM can have arbitrarily low loss at the control.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19286
  • Country: gb
  • 0999
Re: PWM dimmers and supply line noise
« Reply #39 on: June 02, 2021, 09:01:16 pm »
I was talking about a linear constant current regulator. You know the type with a MOSFET and op-amp.
https://www.electronicsweekly.com/blogs/engineer-in-wonderland/current-sink-stability-2015-10/
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21567
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM dimmers and supply line noise
« Reply #40 on: June 02, 2021, 09:02:14 pm »
Yes, exactly.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #41 on: June 02, 2021, 10:14:47 pm »
Yep, the blue clip connects the MOSFET drain to the black wire (LED cathodes). The shorter yellow clip connects the power supply to the red wire (LED anodes), and is also where the output filter cap C5 ties in.

Here's an annotation showing the probe test points. I'm using Keysight N2841A 10:1 probes on an HP 54645A scope. The ground clips are attached to the nearest grounds... so, for TP2, 3, and 4, it's the thick black wire on the PCB; for TP1, it's the negative terminal at the power supply.

So, you're thinking that maybe the ~100 mVpp ripple I'm measuring at TP1 isn't actually there; it's more of a probing issue?

 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21567
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM dimmers and supply line noise
« Reply #42 on: June 02, 2021, 10:53:06 pm »
So, TP1 and TP2 were measured with their respective probe grounds in the respective locations?

I think the difference between TP1 and TP2 is voltage drop across the black (ground) clip lead, plus whatever that does to the voltage between probes (their grounds act in parallel with it).

For S&Gs, see what happens to the TP1 and TP2 waveforms when the other is disconnected (including ground).  I'll bet they change some.

I was suspicious when I saw the two different capacitors, connected in two different locations; I see I was correct to ask further.  Yeah just run the supply through the inductor, and wire both caps in parallel, it'll be quieter that way.  That eliminates loops, so you'll get more meaningful probing results.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #43 on: June 04, 2021, 12:42:32 am »
So, TP1 and TP2 were measured with their respective probe grounds in the respective locations?

Yes, that's correct.

For S&Gs, see what happens to the TP1 and TP2 waveforms when the other is disconnected (including ground).  I'll bet they change some.

Yeah, they do. The ripple on TP1 drops a little and TP2 goes up when the opposite is disconnected.

I was suspicious when I saw the two different capacitors, connected in two different locations; I see I was correct to ask further.  Yeah just run the supply through the inductor, and wire both caps in parallel, it'll be quieter that way.  That eliminates loops, so you'll get more meaningful probing results.

I tried that, moving C5 to be parallel with C1, all "after" the inductor L1. The TP1 and TP2 waveforms got a lot worse (see below). TP3 is more peaky, with some oscillations, and TP3 shows ~2 Vpp. TP2 didn't change much at all. It seems like C5 across the MOSFET is helping quite a bit. Or, did I misread your suggestion?


« Last Edit: June 21, 2021, 11:52:35 pm by iroc86 »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21567
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM dimmers and supply line noise
« Reply #44 on: June 04, 2021, 02:35:25 am »
Like this:

This way, the circuit is a linear chain: supply, control, LEDs.  You can probe anywhere along that chain with fewer limitations, and it will be easier to investigate more elusive behaviors like common mode noise.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline iroc86Topic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: us
Re: PWM dimmers and supply line noise
« Reply #45 on: June 21, 2021, 11:52:05 pm »
That makes sense, Tim. I've been away from this project for a bit. I changed the circuit around per your recommendation. I didn't notice any appreciable changes in the waveforms, but I can see how it'd make diagnostics a bit more straightforward... fewer loops.

In my last post, I had an error--the spiky second waveform should be @TP3, not TP2. I have updated the annotation in the picture.

Due to some other commitments, I might have to call this project "good enough" for now. Everyone has been so helpful here, and I've taken your advice to improve the ripple and learn a lot in the process. If I had more time, I'd like to delve deeper into ways to further mitigate the ripple on TP1 (+24 V @ supply) and spikes on TP3 (+24 V @ circuit), but this simple dimmer certainly works fine as-is. Splitting hairs!
 
The following users thanked this post: T3sl4co1l


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf