Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #568643 > unrolled thread

Fairy Lights PWM Part 2

Started byTim Watts <tw@example.com>
First post2019-12-07 14:08 +0000
Last post2019-12-11 09:19 -0800
Articles 16 — 8 participants

Back to article view | Back to sci.electronics.design


Contents

  Fairy Lights PWM Part 2 Tim Watts <tw@example.com> - 2019-12-07 14:08 +0000
    Re: Fairy Lights PWM Part 2 Rick C <gnuarm.deletethisbit@gmail.com> - 2019-12-07 10:50 -0800
      Re: Fairy Lights PWM Part 2 Tim Watts <tw@example.com> - 2019-12-07 19:50 +0000
        Re: Fairy Lights PWM Part 2 Rick C <gnuarm.deletethisbit@gmail.com> - 2019-12-07 12:22 -0800
    Re: Fairy Lights PWM Part 2 Tim Watts <tw@example.com> - 2019-12-07 20:04 +0000
    Re: Fairy Lights PWM Part 2 Jasen Betts <jasen@xnet.co.nz> - 2019-12-07 20:18 +0000
      Re: Fairy Lights PWM Part 2 Tim Watts <tw@example.com> - 2019-12-08 18:10 +0000
        Re: Fairy Lights PWM Part 2 Rick C <gnuarm.deletethisbit@gmail.com> - 2019-12-08 12:22 -0800
      Re: Fairy Lights PWM Part 2 Tim Watts <tw@example.com> - 2019-12-08 18:16 +0000
    Re: Fairy Lights PWM Part 2 tabbypurr@gmail.com - 2019-12-07 20:29 -0800
      Re: Fairy Lights PWM Part 2 Klaus Kragelund <klauskvik@hotmail.com> - 2019-12-08 09:42 -0800
        Re: Fairy Lights PWM Part 2 Tim Watts <tw@example.com> - 2019-12-08 18:06 +0000
          Re: Fairy Lights PWM Part 2 Jasen Betts <jasen@xnet.co.nz> - 2019-12-08 18:57 +0000
            Re: Fairy Lights PWM Part 2 klaus.kragelund@gmail.com - 2019-12-08 11:07 -0800
    Re: Fairy Lights PWM Part 2 antispam@math.uni.wroc.pl - 2019-12-09 13:40 +0000
    Re: Fairy Lights PWM Part 2 bloggs.fredbloggs.fred@gmail.com - 2019-12-11 09:19 -0800

#568643 — Fairy Lights PWM Part 2

FromTim Watts <tw@example.com>
Date2019-12-07 14:08 +0000
SubjectFairy Lights PWM Part 2
Message-ID<h51q2nFau6dU1@mid.individual.net>
Follow up from the thread Oct 2019
Minimising EM noise from PWM switched fairly lights?

Hi folks,

Recap - this is an educational project for my son to drive some existing 
garden LED fairy lights from a Raspberry Pi ZeroW

The only problem, as fully expected, is they are chucking out more EMI 
than I'd like and I don't want to be causing problems for others. So - 
yes, it's a crappy control method but we are where we are (see below) 
This is a case of trying to do a little more with a non ideal starting 
point and I'd be super grateful for any pointers on that basis :)


The noise I have is showing up on an AM radio as a clear buzz at the 
base PWM frequency (100Hz), audible across the MW range. This becomes 
undetectable about 5 - 10 yards from my property boundary depending on 
direction. The locals have been warned and no one's complained yet. 
However it's a lot noisier than the supplied controller and without a 
scope I can't see what the manufacturer did - but that leads us to Q1:


Q1) Would I understand this better with a £99 PicoScope, basic 10Mhz 
model, simple few turnes of wire antenna and looking at the spectrum (I 
think spectrum software comes bundled with the Picoscope)?

Q2) I've read about frequency dithering of PWM to spread the noise out 
from narrow to broadband. That's something I could do in software 
easily. No quite sure how far to dither - 100-200Hz, 100-1000Hz? Anyone 
heard of that?

Q3) Low pass LC filter to attentuate some of the higher harmonics:
https://imgur.com/a/8UeNy2f - analogue isn't my thing, not quite sure 
where to start with L and C values. Happy to buy a few values and suck 
it and see, if Q1 gives me a sensible method of measuring the effect.




On the plus side, I am really pleased with the software :) Pity my 
electonics skills suck which is why I'm reduced to using pre built 
HBridge L298 modules from ebay. But I'm keen to try to learn a little 
more and this is as educational for me as the lad - any help gratefully 
received :)


If starting from nothing, I wouldn't do it like this - I'd go straight 
to NeoPixels and have all the lamp control localised to each lamp. I 
might indeed order some strngs from China next year - but for this year, 
I do have these existing lights wrapped around trees already - and PWM 
is an instructive project in its own right. I am just mindful that I 
have the responsibility to not wreck havoc on my neighbours :)


Cheers and all the best,

Tim



============Lights spec =============

This is the equivalent circuit: The LEDS are wired in alternate-reversed 
configuration so that lamp 1,3,5... are driven on a forward current, 
lamp 2,4,6... are driven on reverse current.

Drive voltage 30V, about 140mA for all 150 lamps in 3 strings.

https://imgur.com/a/K9iGr2J

That's what it is - they're wrired like that as bought based on 4 
wires. Not certain of the exact configuration - might be 5, 6 or more in 
series depending on the exact Vf of the LED.
=====================================

[toc] | [next] | [standalone]


#568666

FromRick C <gnuarm.deletethisbit@gmail.com>
Date2019-12-07 10:50 -0800
Message-ID<8fbff63e-b527-4688-a902-bf099b07a18f@googlegroups.com>
In reply to#568643
On Saturday, December 7, 2019 at 9:08:28 AM UTC-5, Tim Watts wrote:
> Follow up from the thread Oct 2019
> Minimising EM noise from PWM switched fairly lights?
> 
> Hi folks,
> 
> Recap - this is an educational project for my son to drive some existing 
> garden LED fairy lights from a Raspberry Pi ZeroW
> 
> The only problem, as fully expected, is they are chucking out more EMI 
> than I'd like and I don't want to be causing problems for others. So - 
> yes, it's a crappy control method but we are where we are (see below) 
> This is a case of trying to do a little more with a non ideal starting 
> point and I'd be super grateful for any pointers on that basis :)
> 
> 
> The noise I have is showing up on an AM radio as a clear buzz at the 
> base PWM frequency (100Hz), audible across the MW range. This becomes 
> undetectable about 5 - 10 yards from my property boundary depending on 
> direction. The locals have been warned and no one's complained yet. 
> However it's a lot noisier than the supplied controller and without a 
> scope I can't see what the manufacturer did - but that leads us to Q1:
> 
> 
> Q1) Would I understand this better with a £99 PicoScope, basic 10Mhz 
> model, simple few turnes of wire antenna and looking at the spectrum (I 
> think spectrum software comes bundled with the Picoscope)?
> 
> Q2) I've read about frequency dithering of PWM to spread the noise out 
> from narrow to broadband. That's something I could do in software 
> easily. No quite sure how far to dither - 100-200Hz, 100-1000Hz? Anyone 
> heard of that?
> 
> Q3) Low pass LC filter to attentuate some of the higher harmonics:
> https://imgur.com/a/8UeNy2f - analogue isn't my thing, not quite sure 
> where to start with L and C values. Happy to buy a few values and suck 
> it and see, if Q1 gives me a sensible method of measuring the effect.
> 
> 
> 
> 
> On the plus side, I am really pleased with the software :) Pity my 
> electonics skills suck which is why I'm reduced to using pre built 
> HBridge L298 modules from ebay. But I'm keen to try to learn a little 
> more and this is as educational for me as the lad - any help gratefully 
> received :)
> 
> 
> If starting from nothing, I wouldn't do it like this - I'd go straight 
> to NeoPixels and have all the lamp control localised to each lamp. I 
> might indeed order some strngs from China next year - but for this year, 
> I do have these existing lights wrapped around trees already - and PWM 
> is an instructive project in its own right. I am just mindful that I 
> have the responsibility to not wreck havoc on my neighbours :)
> 
> 
> Cheers and all the best,
> 
> Tim
> 
> 
> 
> ============Lights spec =============
> 
> This is the equivalent circuit: The LEDS are wired in alternate-reversed 
> configuration so that lamp 1,3,5... are driven on a forward current, 
> lamp 2,4,6... are driven on reverse current.
> 
> Drive voltage 30V, about 140mA for all 150 lamps in 3 strings.
> 
> https://imgur.com/a/K9iGr2J
> 
> That's what it is - they're wrired like that as bought based on 4 
> wires. Not certain of the exact configuration - might be 5, 6 or more in 
> series depending on the exact Vf of the LED.
> =====================================

I think others have explained pretty well that it is the fast rise and fall times that are the problem.  They have harmonics well up into the MHz range.  While those harmonics fall off, they don't go to zero and have potential of being radiated well by the "long wire" antenna you call a pixie light string.  

So there are two ways of fixing the problem.  One is to find a way to not radiate the noise such as improving (or degrading, depending on how you look at it) the antenna properties of your wiring.  The other is to minimize the edge rates of your transitions to reduce the harmonics.  

One way of minimizing the harmonics that just occurred to me is to not have any, by driving the strings with a combination of a low frequency sine wave and DC.  Any brightness level of the two sets of LEDs can be obtained by combining a DC level between the +max and -max along with an AC component with an amplitude of 0 to max value pp.  A class D amplifier can drive the lights and a simple filter can remove all the problematic harmonics that would be generated by the class D output.  All that remains is a 100 or even 60 Hz output and a DC component.  No harmonics, no interference.  

-- 

  Rick C.

  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209

[toc] | [prev] | [next] | [standalone]


#568671

FromTim Watts <tw@example.com>
Date2019-12-07 19:50 +0000
Message-ID<h52e3sFf1hfU1@mid.individual.net>
In reply to#568666
On 07/12/2019 18:50, Rick C wrote:

Hi Rick,

Thanks for your reply.

> I think others have explained pretty well that it is the fast rise and fall times that are the problem.  They have harmonics well up into the MHz range.  While those harmonics fall off, they don't go to zero and have potential of being radiated well by the "long wire" antenna you call a pixie light string.
> 
> So there are two ways of fixing the problem.  One is to find a way to not radiate the noise such as improving (or degrading, depending on how you look at it) the antenna properties of your wiring.  The other is to minimize the edge rates of your transitions to reduce the harmonics.

That's the RC filter option?


> 
> One way of minimizing the harmonics that just occurred to me is to not have any, by driving the strings with a combination of a low frequency sine wave and DC.  Any brightness level of the two sets of LEDs can be obtained by combining a DC level between the +max and -max along with an AC component with an amplitude of 0 to max value pp.  A class D amplifier can drive the lights and a simple filter can remove all the problematic harmonics that would be generated by the class D output.  All that remains is a 100 or even 60 Hz output and a DC component.  No harmonics, no interference.
> 

I'm not going to pretend to understand why that works - but I understand 
what you describe. So we do as you say by using what we have (HBridge) 
but driving at a higher clock rate and finding a digital tranform to 
represent the 100Hz sine + DC offset. Did I understand that correctly?

The pigpio library is set up by describing a waveform in terms of a 
chain of on and off times for a set of GPIO pins.

So if a complete 100Hz cycle can be adequately represented in the 
available memory which should be possible, a full cycle can be set up 
and left running, until it needs adjusting for a new brightness.


I'm going to have to get my head around how (set-1-duty-%, set-2-duty-%) 
maps to x.DC-level + y.sin-amplitude though :)

[toc] | [prev] | [next] | [standalone]


#568679

FromRick C <gnuarm.deletethisbit@gmail.com>
Date2019-12-07 12:22 -0800
Message-ID<b823b757-1a02-4a72-bc48-adcd00514158@googlegroups.com>
In reply to#568671
On Saturday, December 7, 2019 at 2:50:24 PM UTC-5, Tim Watts wrote:
> On 07/12/2019 18:50, Rick C wrote:
> 
> Hi Rick,
> 
> Thanks for your reply.
> 
> > I think others have explained pretty well that it is the fast rise and fall times that are the problem.  They have harmonics well up into the MHz range.  While those harmonics fall off, they don't go to zero and have potential of being radiated well by the "long wire" antenna you call a pixie light string.
> > 
> > So there are two ways of fixing the problem.  One is to find a way to not radiate the noise such as improving (or degrading, depending on how you look at it) the antenna properties of your wiring.  The other is to minimize the edge rates of your transitions to reduce the harmonics.
> 
> That's the RC filter option?

No, that would be changing the geometry of the wiring to not be an effective radiator and it is not likely to work well.  Even with twisted pair it's still going to radiate enough.  

I don't think a simple RC filter will do a very good job with your circuit.  By definition you need to have a strong AC component in order to drive both polarity LEDs.  It could be worth a try, but you will lose power in the R and need a larger C to make up for keeping the R low.  


> > One way of minimizing the harmonics that just occurred to me is to not have any, by driving the strings with a combination of a low frequency sine wave and DC.  Any brightness level of the two sets of LEDs can be obtained by combining a DC level between the +max and -max along with an AC component with an amplitude of 0 to max value pp.  A class D amplifier can drive the lights and a simple filter can remove all the problematic harmonics that would be generated by the class D output.  All that remains is a 100 or even 60 Hz output and a DC component.  No harmonics, no interference.
> > 
> 
> I'm not going to pretend to understand why that works - but I understand 
> what you describe. So we do as you say by using what we have (HBridge) 
> but driving at a higher clock rate and finding a digital tranform to 
> represent the 100Hz sine + DC offset. Did I understand that correctly?

I was thinking of ditching the H bridge and using a class D amp, but you could use the H bridge to roll your own amp.  It would in essence be PWM of the instantaneous drive level required.  This CAN be filtered much more easily, better by an LC than an RC though.  With the higher frequency it will work with much smaller L and C.  


> The pigpio library is set up by describing a waveform in terms of a 
> chain of on and off times for a set of GPIO pins.
> 
> So if a complete 100Hz cycle can be adequately represented in the 
> available memory which should be possible, a full cycle can be set up 
> and left running, until it needs adjusting for a new brightness.
> 
> 
> I'm going to have to get my head around how (set-1-duty-%, set-2-duty-%) 
> maps to x.DC-level + y.sin-amplitude though :)

You will have three mappings.  One is two LED levels mapped to an AC plus DC levels.  The DC plus AC levels are mapped to instantaneous levels over the course of the sine wave.  These instantaneous levels are mapped to a duty cycle in a pretty simple manner.  0 to max is zero pulse width to max pulse width and then deal with the polarity.  

There will be some complications involved.  Don't forget to take into account that the original circuit every drove an LED to half amplitude because of the duty cycling.  So the max DC ever needed is half the max amplitude.  There is also the issue of the max AC value will only be 0.707 time the peak value, but that is RMS and I expect what will be important is average which is 0.637 times the peak value.  So you may not be able to get full brightness from the string with the AC waveform.  The same would be true of an RC filtered square wave since the ramp times take away from the amplitude.  This can be improved by adding in the third and maybe the fifth harmonics.  300 and 500 Hz are still well outside of anything that will cause interference.  That will give you something pretty close to a square wave without the annoying harmonics. 

-- 

  Rick C.

  + Get 1,000 miles of free Supercharging
  + Tesla referral code - https://ts.la/richard11209

[toc] | [prev] | [next] | [standalone]


#568675

FromTim Watts <tw@example.com>
Date2019-12-07 20:04 +0000
Message-ID<h52ev7Ff6gkU1@mid.individual.net>
In reply to#568643
On 07/12/2019 14:08, Tim Watts wrote:
> Follow up from the thread Oct 2019
> Minimising EM noise from PWM switched fairly lights?
> 
> Hi folks,
> 
> Recap - this is an educational project for my son to drive some existing 
> garden LED fairy lights from a Raspberry Pi ZeroW

Just an aside:

If this all proves too tricky, we'll relegate the idea to a spare set of 
the same lights on the Christmas Tree: 1/3 of the problem, small area, 
indoors, round the back and much less likely to cause long range issues.


But I'll have a try with some of the new ideas just for education - but 
playing it safe.

[toc] | [prev] | [next] | [standalone]


#568681

FromJasen Betts <jasen@xnet.co.nz>
Date2019-12-07 20:18 +0000
Message-ID<qsh1f7$e1d$1@gonzo.revmaps.no-ip.org>
In reply to#568643
On 2019-12-07, Tim Watts <tw@example.com> wrote:
> Follow up from the thread Oct 2019
> Minimising EM noise from PWM switched fairly lights?
>
> Hi folks,
>
> Recap - this is an educational project for my son to drive some existing 
> garden LED fairy lights from a Raspberry Pi ZeroW
>
> The only problem, as fully expected, is they are chucking out more EMI 
> than I'd like and I don't want to be causing problems for others. So - 
> yes, it's a crappy control method but we are where we are (see below) 
> This is a case of trying to do a little more with a non ideal starting 
> point and I'd be super grateful for any pointers on that basis :)
>
>
> The noise I have is showing up on an AM radio as a clear buzz at the 
> base PWM frequency (100Hz), audible across the MW range. This becomes 
> undetectable about 5 - 10 yards from my property boundary depending on 
> direction. The locals have been warned and no one's complained yet. 
> However it's a lot noisier than the supplied controller and without a 
> scope I can't see what the manufacturer did - but that leads us to Q1:

if it's audio-frequency PWM but it's coming out an AM radio it's the
broadband noise of the steps that's making the noise, you need to
round off those PWM corners.  

> Q1) Would I understand this better with a £99 PicoScope, basic 10Mhz 
> model, simple few turnes of wire antenna and looking at the spectrum (I 
> think spectrum software comes bundled with the Picoscope)?

if it has a spectrum analyser mode it could show you what others
describe.

> Q2) I've read about frequency dithering of PWM to spread the noise out 
> from narrow to broadband. That's something I could do in software 
> easily. No quite sure how far to dither - 100-200Hz, 100-1000Hz? Anyone 
> heard of that?

dithering the  PWM frequency will not reduce the noise amplitude in
any way and will make it more annoying to AM listeners.

> Q3) Low pass LC filter to attentuate some of the higher harmonics:
> https://imgur.com/a/8UeNy2f - analogue isn't my thing, not quite sure 
> where to start with L and C values. Happy to buy a few values and suck 
> it and see, if Q1 gives me a sensible method of measuring the effect.

perhaps just put a bigger resistor in series with the MOSFET gate.

> On the plus side, I am really pleased with the software :) Pity my 
> electonics skills suck which is why I'm reduced to using pre built 
> HBridge L298 modules from ebay. But I'm keen to try to learn a little 
> more and this is as educational for me as the lad - any help gratefully 
> received :)

oh, right modules. you have those anti-parallel LED strings. use a low 
resistance capacitor (10nF or so ceramic) across the lines and a 
common-mode choke in series with them. either salvage one from some
junk, or buy one. 

-- 
  When I tried casting out nines I made a hash of it.

[toc] | [prev] | [next] | [standalone]


#568784

FromTim Watts <tw@example.com>
Date2019-12-08 18:10 +0000
Message-ID<h54skqF12fU1@mid.individual.net>
In reply to#568681
On 07/12/2019 20:18, Jasen Betts wrote:

> dithering the  PWM frequency will not reduce the noise amplitude in
> any way and will make it more annoying to AM listeners.
> 

This is one of the references I found:

https://www.eetimes.com/novel-technique-improves-dithering-reduces-emi/#

It's too much for me to understand (I can only really grok the headline) 
but the claim is that it take sthe same noise and spreads it out over 
the spectrum, reducing the average EMI at any one frequency.

That's about as much I could get :)

[toc] | [prev] | [next] | [standalone]


#568791

FromRick C <gnuarm.deletethisbit@gmail.com>
Date2019-12-08 12:22 -0800
Message-ID<9b84097c-4cc3-4fd8-8113-4c3c73d560e8@googlegroups.com>
In reply to#568784
On Sunday, December 8, 2019 at 1:10:40 PM UTC-5, Tim Watts wrote:
> On 07/12/2019 20:18, Jasen Betts wrote:
> 
> > dithering the  PWM frequency will not reduce the noise amplitude in
> > any way and will make it more annoying to AM listeners.
> > 
> 
> This is one of the references I found:
> 
> https://www.eetimes.com/novel-technique-improves-dithering-reduces-emi/#
> 
> It's too much for me to understand (I can only really grok the headline) 
> but the claim is that it take sthe same noise and spreads it out over 
> the spectrum, reducing the average EMI at any one frequency.
> 
> That's about as much I could get :)

Dithering impacts the fundamental and likewise the harmonics, but the harmonics are only 100 Hz apart.  So you will still hear the impact on your AM band signals and all the harmonics would be running up and down your band of interested over top of one another.  

If you had a 1 MHz fundamental, the harmonics would be 1 MHz apart and dithering would spread the interfering signal so it appears as a lower amplitude.  I've never figured out if it actually reduces the interference or not.  If the signal being interfered with is narrow band enough it could help, but not with a 100 Hz carrier. 

-- 

  Rick C.

  -- Get 1,000 miles of free Supercharging
  -- Tesla referral code - https://ts.la/richard11209

[toc] | [prev] | [next] | [standalone]


#568785

FromTim Watts <tw@example.com>
Date2019-12-08 18:16 +0000
Message-ID<h54svhF12fU2@mid.individual.net>
In reply to#568681
On 07/12/2019 20:18, Jasen Betts wrote:
> On 2019-12-07, Tim Watts <tw@example.com> wrote:

>> On the plus side, I am really pleased with the software :) Pity my
>> electonics skills suck which is why I'm reduced to using pre built
>> HBridge L298 modules from ebay. But I'm keen to try to learn a little
>> more and this is as educational for me as the lad - any help gratefully
>> received :)
> 
> oh, right modules. you have those anti-parallel LED strings. use a low
> resistance capacitor (10nF or so ceramic) across the lines and a
> common-mode choke in series with them. either salvage one from some
> junk, or buy one.
> 

Thank you :)

To contain my nonsense - I'm going to do this to the little Xmas tree 
inside the house (1 LED string) rather than the 3 big trees I have 
lights on in the front garden.

It's educational, even if just to realise controlling antisocial EMI is 
sometimes more of a challenge than expected :-|

[toc] | [prev] | [next] | [standalone]


#568740

Fromtabbypurr@gmail.com
Date2019-12-07 20:29 -0800
Message-ID<973bab56-0182-4779-9932-3abc01734495@googlegroups.com>
In reply to#568643
On Saturday, 7 December 2019 14:08:28 UTC, Tim Watts  wrote:
> Follow up from the thread Oct 2019
> Minimising EM noise from PWM switched fairly lights?
> 
> Hi folks,
> 
> Recap - this is an educational project for my son to drive some existing 
> garden LED fairy lights from a Raspberry Pi ZeroW
> 
> The only problem, as fully expected, is they are chucking out more EMI 
> than I'd like and I don't want to be causing problems for others. So - 
> yes, it's a crappy control method but we are where we are (see below) 
> This is a case of trying to do a little more with a non ideal starting 
> point and I'd be super grateful for any pointers on that basis :)
> 
> 
> The noise I have is showing up on an AM radio as a clear buzz at the 
> base PWM frequency (100Hz), audible across the MW range. This becomes 
> undetectable about 5 - 10 yards from my property boundary depending on 
> direction. The locals have been warned and no one's complained yet. 
> However it's a lot noisier than the supplied controller and without a 
> scope I can't see what the manufacturer did - but that leads us to Q1:
> 
> 
> Q1) Would I understand this better with a £99 PicoScope, basic 10Mhz 
> model, simple few turnes of wire antenna and looking at the spectrum (I 
> think spectrum software comes bundled with the Picoscope)?
> 
> Q2) I've read about frequency dithering of PWM to spread the noise out 
> from narrow to broadband. That's something I could do in software 
> easily. No quite sure how far to dither - 100-200Hz, 100-1000Hz? Anyone 
> heard of that?
> 
> Q3) Low pass LC filter to attentuate some of the higher harmonics:
> https://imgur.com/a/8UeNy2f - analogue isn't my thing, not quite sure 
> where to start with L and C values. Happy to buy a few values and suck 
> it and see, if Q1 gives me a sensible method of measuring the effect.
> 
> 
> 
> 
> On the plus side, I am really pleased with the software :) Pity my 
> electonics skills suck which is why I'm reduced to using pre built 
> HBridge L298 modules from ebay. But I'm keen to try to learn a little 
> more and this is as educational for me as the lad - any help gratefully 
> received :)
> 
> 
> If starting from nothing, I wouldn't do it like this - I'd go straight 
> to NeoPixels and have all the lamp control localised to each lamp. I 
> might indeed order some strngs from China next year - but for this year, 
> I do have these existing lights wrapped around trees already - and PWM 
> is an instructive project in its own right. I am just mindful that I 
> have the responsibility to not wreck havoc on my neighbours :)
> 
> 
> Cheers and all the best,
> 
> Tim
> 
> 
> 
> ============Lights spec =============
> 
> This is the equivalent circuit: The LEDS are wired in alternate-reversed 
> configuration so that lamp 1,3,5... are driven on a forward current, 
> lamp 2,4,6... are driven on reverse current.
> 
> Drive voltage 30V, about 140mA for all 150 lamps in 3 strings.
> 
> https://imgur.com/a/K9iGr2J
> 
> That's what it is - they're wrired like that as bought based on 4 
> wires. Not certain of the exact configuration - might be 5, 6 or more in 
> series depending on the exact Vf of the LED.
> =====================================

the problem is due ot how fast you're switching. Changing the 100Hz will have no significant impact on that. Since you're using a module you can't slow its output down so easily, but you could add ferrite beads to the output lines, fitting them close to the driver module. You could also add a very small cap across the aerial close to the beads.


NT

[toc] | [prev] | [next] | [standalone]


#568782

FromKlaus Kragelund <klauskvik@hotmail.com>
Date2019-12-08 09:42 -0800
Message-ID<8a3e1bfc-dc47-4009-9e85-d9e4240ec02a@googlegroups.com>
In reply to#568740
Place a ferrite around the cable, easy fix, no soldering needed

http://www.meisongbei.com/emi_ferrites/2009-12-24/8919.chtml

[toc] | [prev] | [next] | [standalone]


#568783

FromTim Watts <tw@example.com>
Date2019-12-08 18:06 +0000
Message-ID<h54sd1FueiaU1@mid.individual.net>
In reply to#568782
On 08/12/2019 17:42, Klaus Kragelund wrote:
> Place a ferrite around the cable, easy fix, no soldering needed
> 
> http://www.meisongbei.com/emi_ferrites/2009-12-24/8919.chtml
> 

This removes common mode noise?

As the wires were balanced I assumed there wouldn't be much - but happy 
to give it a try :)

Cheers,

Tim

[toc] | [prev] | [next] | [standalone]


#568788

FromJasen Betts <jasen@xnet.co.nz>
Date2019-12-08 18:57 +0000
Message-ID<qsjh1v$ikl$1@gonzo.revmaps.no-ip.org>
In reply to#568783
On 2019-12-08, Tim Watts <tw@example.com> wrote:
> On 08/12/2019 17:42, Klaus Kragelund wrote:
>> Place a ferrite around the cable, easy fix, no soldering needed
>> 
>> http://www.meisongbei.com/emi_ferrites/2009-12-24/8919.chtml
>> 
>
> This removes common mode noise?
>
> As the wires were balanced I assumed there wouldn't be much - but happy 
> to give it a try :)

In common mode the differentce between A on and B on is small, but the difference
between either on and all off is significant.

-- 
  When I tried casting out nines I made a hash of it.

[toc] | [prev] | [next] | [standalone]


#568789

Fromklaus.kragelund@gmail.com
Date2019-12-08 11:07 -0800
Message-ID<4282bd8a-08dc-41da-85ae-b218cc5428e1@googlegroups.com>
In reply to#568788
Common mode is the typical problem for rf emissions

The differential has small area and primarily emits in near field

The CM antenna is huge for this garden light 

[toc] | [prev] | [next] | [standalone]


#568874

Fromantispam@math.uni.wroc.pl
Date2019-12-09 13:40 +0000
Message-ID<qslisv$p5r$1@z-news.wcss.wroc.pl>
In reply to#568643
Tim Watts <tw@example.com> wrote:
> Follow up from the thread Oct 2019
> Minimising EM noise from PWM switched fairly lights?
> 
> Hi folks,
> 
> Recap - this is an educational project for my son to drive some existing 
> garden LED fairy lights from a Raspberry Pi ZeroW
> 
> The only problem, as fully expected, is they are chucking out more EMI 
> than I'd like and I don't want to be causing problems for others. So - 
> yes, it's a crappy control method but we are where we are (see below) 
> This is a case of trying to do a little more with a non ideal starting 
> point and I'd be super grateful for any pointers on that basis :)
> 
> 
> The noise I have is showing up on an AM radio as a clear buzz at the 
> base PWM frequency (100Hz), audible across the MW range. This becomes 
> undetectable about 5 - 10 yards from my property boundary depending on 
> direction. The locals have been warned and no one's complained yet. 
> However it's a lot noisier than the supplied controller and without a 
> scope I can't see what the manufacturer did - but that leads us to Q1:
> 
> 
> Q1) Would I understand this better with a ?99 PicoScope, basic 10Mhz 
> model, simple few turnes of wire antenna and looking at the spectrum (I 
> think spectrum software comes bundled with the Picoscope)?

You are dealing with fast pulses, they have wide-band spectrum
and looking at spectrum tells you rather little.  What counts
is amplitude and for that AM radio directly gives you relevant
info.  Also, PicoScopes have (or at least had in the past)
quite limited bandwidth and my miss important info.

> ============Lights spec =============
> 
> This is the equivalent circuit: The LEDS are wired in alternate-reversed 
> configuration so that lamp 1,3,5... are driven on a forward current, 
> lamp 2,4,6... are driven on reverse current.
> 
> Drive voltage 30V, about 140mA for all 150 lamps in 3 strings.

You missed pretty important part of info: how you control the LED-s.
More precisely, each H-bridge in L298 has 3 control lines, IN1, IN2
and EN.  To minimize EMI you want signal coming from H-bridge
to be as balanced as possible, that is when you PWM after driving
one (or the other) polarity you want lines to float.  It is easy
to make mistake and in "idle" drive both lines low (or high)
To float output you need to use EN line.  This is somewhat long
shot but incorrect driving could easily explain difference
between your circuit and supplied controller.

-- 
                              Waldek Hebisch

[toc] | [prev] | [next] | [standalone]


#569087

Frombloggs.fredbloggs.fred@gmail.com
Date2019-12-11 09:19 -0800
Message-ID<b78cfc96-e837-423b-8df4-b180dcab084c@googlegroups.com>
In reply to#568643
On Saturday, December 7, 2019 at 9:08:28 AM UTC-5, Tim Watts wrote:
> Follow up from the thread Oct 2019
> Minimising EM noise from PWM switched fairly lights?
> 
> Hi folks,
> 
> Recap - this is an educational project for my son to drive some existing 
> garden LED fairy lights from a Raspberry Pi ZeroW
> 
> The only problem, as fully expected, is they are chucking out more EMI 
> than I'd like and I don't want to be causing problems for others. So - 
> yes, it's a crappy control method but we are where we are (see below) 
> This is a case of trying to do a little more with a non ideal starting 
> point and I'd be super grateful for any pointers on that basis :)
> 
> 
> The noise I have is showing up on an AM radio as a clear buzz at the 
> base PWM frequency (100Hz), audible across the MW range. This becomes 
> undetectable about 5 - 10 yards from my property boundary depending on 
> direction. The locals have been warned and no one's complained yet. 
> However it's a lot noisier than the supplied controller and without a 
> scope I can't see what the manufacturer did - but that leads us to Q1:
> 
> 
> Q1) Would I understand this better with a £99 PicoScope, basic 10Mhz 
> model, simple few turnes of wire antenna and looking at the spectrum (I 
> think spectrum software comes bundled with the Picoscope)?
> 
> Q2) I've read about frequency dithering of PWM to spread the noise out 
> from narrow to broadband. That's something I could do in software 
> easily. No quite sure how far to dither - 100-200Hz, 100-1000Hz? Anyone 
> heard of that?
> 
> Q3) Low pass LC filter to attentuate some of the higher harmonics:
> https://imgur.com/a/8UeNy2f - analogue isn't my thing, not quite sure 
> where to start with L and C values. Happy to buy a few values and suck 
> it and see, if Q1 gives me a sensible method of measuring the effect.
> 
> 
> 
> 
> On the plus side, I am really pleased with the software :) Pity my 
> electonics skills suck which is why I'm reduced to using pre built 
> HBridge L298 modules from ebay. But I'm keen to try to learn a little 
> more and this is as educational for me as the lad - any help gratefully 
> received :)
> 
> 
> If starting from nothing, I wouldn't do it like this - I'd go straight 
> to NeoPixels and have all the lamp control localised to each lamp. I 
> might indeed order some strngs from China next year - but for this year, 
> I do have these existing lights wrapped around trees already - and PWM 
> is an instructive project in its own right. I am just mindful that I 
> have the responsibility to not wreck havoc on my neighbours :)
> 
> 
> Cheers and all the best,
> 
> Tim
> 
> 
> 
> ============Lights spec =============
> 
> This is the equivalent circuit: The LEDS are wired in alternate-reversed 
> configuration so that lamp 1,3,5... are driven on a forward current, 
> lamp 2,4,6... are driven on reverse current.
> 
> Drive voltage 30V, about 140mA for all 150 lamps in 3 strings.
> 
> https://imgur.com/a/K9iGr2J
> 
> That's what it is - they're wrired like that as bought based on 4 
> wires. Not certain of the exact configuration - might be 5, 6 or more in 
> series depending on the exact Vf of the LED.
> =====================================

LED strings are not driven by voltage sources or pulses, they are driven by current sources. The LED current is exponentially related to the impressed voltage which makes for a great fast harmonic generator, whereas the LED voltage resulting from a current drive has a logarithmic relation which is more less a smoothing function.
Radiated energy at any frequency is proportional to the square of the ratio of string length to the wavelength of the frequency. If you bandlimit the current drive to something like 20kHz, the far field radiation is attenuated by a factor of a million or more, which means there won't be any radiation. You can easily bandlimit with a differential C-L-C differential filter, which is 2x L's and 2x C's, for which you can use almost anything in the way of off-the-shelf components because your signal is relatively low power.
If you use an AM radio as a "sniffer" then it's important to make the distinction between far field and near field. Putting the receiver right up to the string is a worthless measurement for interference because you're just picking up close-in coupling which tells you nothing. You want to use the receiver in the far field which is displaced multiple wavelengths away from the string.

[toc] | [prev] | [standalone]


Back to top | Article view | sci.electronics.design


csiph-web