Discussing Pulse-Width Modulation

[Michael Kleinigger] posted a lengthy discussion on Pulse-Width Modulation that goes beyond the traditional beginner tutorial. He starts a bit of background info on PWM and a tip about using a camera to judge frequency and duty cycle of LEDs. From there it’s down the rabbit hole with some testing of power-loss versus frequency.

When you change from frequencies of 50 Hz to 1 MHz how does the parasitic power loss from switching affect the overall efficiency of the circuit? It turns out there’s a rather large amount of loss at the highest level, around 1.5 mW. The greatest balance of low power loss and elimination of flicker seems to be right in the 300-500 Hz range.

53 thoughts on “Discussing Pulse-Width Modulation

  1. You may get a wonderful efficiency at 300-500Hz, but you may also get significant side-effects such as audible noise when you drive anything bigger than an LED. For this reason, it is sometimes better to run PWM at frequencies higher than 20kHz

  2. @Satiagraha, definitely if you’re powering motors through PWM, I made an ESC using a Picaxe 08m and found that setting the PWM frequency to 40khz meant the motor didn’t make that awful whine like almost all ESC’s I’ve heard do when the motor is only being driven slowly. Not sure if the h-bridge I used was meant to take such a high PWM rate but it works fine.

    On the other hand you can purposely make the motor whine at different frequencies as an audible indicator of a setting or something, much like those people who have made played tunes on their DIY CNC’s etc.

  3. Yeah link no workey for me either.

    PWM depends on duty cycle and frequency, so maybe a nice chart comparing the two would be good to have (???). I dunno….methinks this has to be played with for each application, but some handy charts for LEDs, 5V motors, and other commonly driven things might be nice…

    As for the sound issue…yeah…sometimes it’s nice to actually hear your circuit working.

  4. 500Hz… Depends on what you are driving. I can see an led flickering at more than 2KHz as I was curious one day after being irritated by the light on my xbox 360 controller (which happens to flicker at 2KHz 64% duty cycle). Does any one else notice the flickering in the new LED brake lights on modern cars?!? This drives me nuts when I am driving at night. ~Aaron

  5. Aaron – I too can see the brake lights on LED using PWM… it does get annoying. If you’re like me, I can also tell when a DLP projection screen/ tv is being used, as the white objects look like a rainbow due to the color wheel… it gets pretty hard to get used to…

  6. @Travis and andrew,

    Yes, I’ve read in places that 60Hz is the cutoff for most people. And I think that’s about right, assuming you’re starting directly at the LED without any relative motion. However, when you start to move your eyes across the LED or if the LED is moving, you may notice the flicker, maybe even up to 2kHz depending on the speed of the motion. This is why POV displays work.

    @alankilian

    Speaking of 5Mhz modulations, I’ve been hearing lately about research into high-speed data transmission using ambient LED lighting. In the future, when incandescents and fluorescents are replaced by high-intensity LEDs, your laptop might actually connect to the internet via the lights in your room; they’ll be doing double duty – lighting the room and transmitting data via high-frequency modulation. Pretty cool, eh?

  7. @travis,

    When the flickering object is or is not moving? what is the difference between the flickering objects brightness and ambient? I’m willing to bet you can see 2kHz when it’s moving at night. Not moving in the sun, 20Hz might be enough. Human eyes are marvelously complex beasts, the whole 24fps, 30fps, 60fps thing is mostly a myth and highly dependent on individual, and conditions. A bright white pulse in a dark room for example is detectable at far more than 1/60th of a second.

  8. the 360 controller LEDs don’t flicker, they’re either always on or always off. The 360 ROL does flicker, and it’s a hell of a lot slower than 2kHz.

    There is no way you can see a 2kHz flicker on a stationary light. hell, I don’t think I’d believe you if you said 200Hz.

  9. Haven’t read the article yet, but the flicker talk is interesting. Perhaps he’s seeing nulls? I remember the lights in school bugging the hell out of me – between the tv’s, crt’s and 8-foot flourescents, I could see the bulbs flicker at 30hz when the tv was on and the crt flicker if the tv was on, provided both were in my field of view – it’s like the brain locks onto the highest frequency and lets you see the nulls in the lower one… Just a theory, I never really looked into it – Might be an interesting field of research, though…I’m sure I’m not the only one that’s ever noticed this.

  10. @allyouguystalkingaboutLEDflicker

    Just like the old LED clocks, you can kinda tell when things are pulsed, even over 60hz.

    One trick for detecting this is to motorboat your lips. The displays will vibrate…:)

  11. @mike

    Thank you for the info this is helpful but i mean the base bit, with the red and blue lines on it
    that all his things are stood in/on i want to start out and im looking for somewhere to buy one from but need the name first lol

  12. Now you all know you are not allowed to use PWM dimming on LEDs because you may get your ass sued by Color Kinetics. They own a patent on this shit and are quite liberal when it comes to handing out the lawsuits.

  13. Dom:
    For wire, don’t bother with the store bought lengths – the wire from a piece of cat 3/4/5 cable works just fine – I’ve used short lengths from telco 50 conductor cable, and it’s nice because each wire has its own color combination.

  14. @ johny

    im no lawyer but last i checked unless your building their circuit they cant sue or if they do you can get it thrown out of court. lets face it you cant patent the action of pwm but you can patent the circuit. just build a different one.

  15. stephen, i wouldn’t be so sure about the fairness of our legal system…. as it stands now, a good lawyer can turn the most unfair thing into a prosecution, as long it has a small amount of grey area.

    combine that with the fact that our justice system basically is a matter of stacking money on the scales of justice, and suddenly something as stupid and unfair as patenting the action of pwm suddenly becomes very possible.

    monsanto patented THE PIG, as well as corn. absolutely unfair, unjust, and in no way should be legal, but our justice system let it happen.

  16. The operating frequency of PWM (pulse width modulation) for some LED’s is indeed 2 to 3 KHZ’s and is a very real affect on some viewers! It is known as flicker fusion or critical fusion frequency and does not have the same effect on all viewers. Appropriate rigger for the consideration of human factors was not performed.
    mountainvision@hotmail.com

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.