Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LED PWM Flicker

Status
Not open for further replies.

Scarr

Member
Hi All,

I want to control my LED brightness using a MCU but I would love to remove the flicker caused by PWM is this possible? When searching on the web you find loads about using PWM but not much else.

Thanks
 
A bit more information would be helpfull.

How many LED(s) ?

Are these just individual LEDs or is it a multiplexed seven segment display?

JimB
 
Naked eye flicker, or when filmed? Either way, it's typicelly just a case of raising the frequency so the flicker is still there, but now imperceptible
 
PWM can mean to turn on/off the current fast. The light will also turn on/off.
PWM can mean turning on/off the power fast and using a LC filter to average the power such that some power is flowing all the time in the LED.
Example: 50% on will filter to 1/2 the supply voltage.
 
yes you usually just need to raise the pwm frequency....but are you sure that youre power supply is stable in the first place, since if not then you will get flicker no matter how much you raise the pwm frequency
 
More info..... OK, when I first started looking at this I spotted the flicker, but now it has become more about understanding if I can remove the flicker than just controlling a LED.

Originally I was going to drive a single LED via the MCU pin directly, I was going to detect it with a sensor attached to the MCU or scope for testing. I suppose my goal has changed from just controlling a LED's brightness to controlling it without flicker, so my question is how can I control the LED brightness and not have any flicker?

Hope this all makes sense!!!
 
I would use one of the diodes.com led driver ic's which can be easily programmed by a micro...eg zxld1360 etc.
They will answer your questions as it will show you how to go on with it,.
 
If the PWM frequency is very low at up to 100Hz then you will see the LEDs flickering all the time. When the frequency is about 200Hz to 500Hz then you will see dots as you or the LEDs move. If the PWM is thousands or tens of thousand Hz then you will see no flickering.
 
Perceived flicker can be massively reduced if you can prevent the current from dropping to zero at any part of the cycle. A small capacitor in parallel with the LED will do that quite well. It does not have to be large enough to keep the current anywhere near constant for the PWM cycle.

A lot of LED lights are supplied from a transformer, and some don't have any smoothing capacitor, so there is significant 100 Hz flicker where the mains is 50 Hz. If you calculate the capacitor needed to keep the voltage largely constant for each half-cycle, you end up with a very large capacitor. I have found that the capacitor can be 10 times smaller and the flicker isn't visible.

For instance, if you have some lights that take 500 mA at 12 V or so, it would be normal to have a capacitor that would keep the ripple to 1 V or so. That would need somewhere around 5,000 μF. That is what you would need if you were running electronics that has to take the same current for the whole cycle. With LEDs, a capacitor of 470 μF will usually virtually eliminate visible flicker. Typically the LED voltages would be 8 - 10 V, and a series resistor limits the current. With a 470 μF capacitor, when the supply voltage falls each half-cycle, the capacitor voltage rapidly falls to near the LED voltage, and very little current flows, but the voltage stays above the LED voltage, and the current doesn't fall to zero before the next half cycle.

The dots that Audioguru describes are not visible in those conditions, because even at reduced current, the LEDs continue to emit light, so the contrast between the bright and dark points is far less than when there is no capacitor and the LEDs turn off.
 
I wish modern vehicles that use LEDs as tail lights would use a capacitor or a higher PWM frequency to prevent those awful dots.
 
Cadillac were famous when they introduced PWM LED brake lights.... that flicker with peripheral vision.

Although they used I think, 500Hz which did not appear to flicker when stationary behind the vehicle, it flickered with a dotted trail when it moved or your eye moves putting the LEDs in your peripheral vision.

As Audioguru said you must go much higher with high luminance ratio ( on/off) LED using PWM. So 500Hz may be ok for a TV but not a mobile object or rapid scanning eyes.

As Diver300 indicated a lower luminance ratio PWM reduces this effect, meaning not fully off.


If you require further clarification, then clarify your requirements.
 
I wish modern vehicles that use LEDs as tail lights would use a capacitor or a higher PWM frequency to prevent those awful dots.

1) Flicker in the center of the eye is different than flicker at the edge of your vision. The center of the eye is built for detail. The edge of the eye is built for speed. (tiger attacking)
2) When the object is moving, flicker is much more a problem.

My guess is the tail light looked good in the lab in a bench when viewed close up. When the light is moving, bouncing up/down, and not in the center of your vision it is a real problem.
 
Am I lucky that a tiger has never attacked me?? Maybe I was distracted and didn't see the tiger in my edge vision and the tiger missed.
 
Am I lucky that a tiger has never attacked me

Here is a picture of the AudioGuru when much younger. (Saber-Tooth Tiger)
upload_2015-4-6_17-39-13.png
 
Ron, the ever so assertive chap in the suit will surely beat the tiger without any problem.
He has it on its back, one foot on its goolies (ouch!) and with a swift blow from his knuckle duster bedecked hand will knock its teeth out in no time.
His appearance reminds me of Richard Nixon.

JimB
 
If the PWM frequency is very low at up to 100Hz then you will see the LEDs flickering all the time. When the frequency is about 200Hz to 500Hz then you will see dots as you or the LEDs move. If the PWM is thousands or tens of thousand Hz then you will see no flickering.
From real world experiments on my bench, the human eye tends to perceive an flickering image of more than 20FPS (Frames Per Second) -- as an still image. I should know since I have coded many video games. Pacman. Donkey Kong. Space Invaders. So an LED flashing at 20Hz would be perceive to the human eye as constantly lit. There would be no flicker at 20Hz or more. I have gotten away with doing moving message displays with thereabouts 20FPS with no flicker. 50Hz / 50FPS or more is optimal however, though. The images move smoothly across the screen. Most of my video games run at 50Hz. This is the same as the vertical scan rate on an television, although more modern screens tend to run at 100Hz or more for the vertical scan rate.
 
There would be no flicker at 20Hz
You need to go back and do the test. The 20 FPS you are talking about is for movies. There are more than one format for film. Often the picture is updated 20 times/second but the same picture is flashed 3 times. So the light is at 60hz.

TV in the USA runs at 60hz. One half of the picture is presented at 60hz. The entire picture is updated at 30hz but the light is presented at 60hz.
Video terminals started out at 60hz and moved up. Many run 75hz.
 
My big old fashioned fluorescent tube lights do not flicker at 120Hz maybe because their phosphor filters it. My LED Christmas tree lights obviously flicker but I do not know if it is rectified to 60Hz or if they have back-to-back LEDs flickering at 120Hz.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top