PWM questions picking a driver for my LED project - Page 1
Forum section: electronics / beginners

author: amaschas
author_rank: Regular Contributor
timestamp: March 14, 2020, 10:31:02 pm
content: Hi all, I'm currently of building a custom RGB LED array for a film scanning project I'm working on, and I'm getting a little overwhelmed and confused with the number of choices and variations of LED drivers—specifically around PWM frequencies, minimum on times, slew rates and topologies, and I'm hoping some here can provide some guidance.My array drives 9 rows alternating red, green and blue, with 8 LEDs in each row. I'm using Luxeon 2835 color LEDs at 200mA, so depending on the color the voltage will range from 16V to about 24V, and since there are three rows of each color, I will need a driver capable of outputting 200 x 3 600mA. I considered using multi-channel drivers, but I might be adding additional channels down the line, so it seemed easier to design with one driver per color channel in mind. There are plenty of LED drivers that can manage my power needs, but what's really confusing is figuring out what the frequency and slew rate of the driver needs to be in order to handle the PWM frequency and resolution I want to support.Because the LED array is designed for use with camera sensors, I want the PWM frequency to be high enough avoid interacting with the shutter frequency of the equipment, and I'd also like to avoid the auditory range (over 20khz), so I'm designing for a 30khz PWM frequency. I'd like to have 10-bit resolution at this frequency, though I could probably get by with 8-bit if it significantly simplified my design. To support this frequency and resolution, I'm going to prototype with a Cortex M0 running at 48mhz, which will also let me play with on-board USB and radio control for some automation features I'd like to implement down the line. So where I've gotten stuck is trying to figure out if there's a driver out there than can actually turn on and off faster enough to let me drive my LEDs the way I want to. I'm aware I can also use a shunt-FET solution, but that's a bit more complicated, and given I'm still trying to wrap my head around a simpler topology I'd rather avoid that route unless I absolutely have to. I imagine I'd also still have to understand the intricacies of the on times and slew rates to design a shunt-FET solution regardless, so it's not necessarily a shortcut.So here's how I am approaching the problem. I need the sum of the minimum on time, plus the time to turn on, plus the time to turn off of the driver to be less than the PWM frequency I want to run at, divided by the number of divisions in my target resolution. So:1/30,000s = ~33µs33µs / 1024 = 32nsAt 8-bit resolution, I would need:33µs / 256 = 120nsWhich means that my driver would need to be able to turn on and off in under that time. Looking at the available drivers, the best I've been able to find have turn on and off times on the order of 100ns, for a total of ~200ns, which wouldn't even work for my 8-bit target.So I suppose I have four questions:1) Is my math correct?2) Can anyone recommend a driver that has a minimum pulse time of around 30ns, or failing that, around 120ns?3) Can I get a way with potentially lowering my PWM frequency to 20khz without my driver circuit creating a high pitched noise?4) Can I achieve my goal with shunt-fet dimming, or are there limitations there I am overlooking.

author: David Hess
author_rank: Super Contributor
timestamp: March 15, 2020, 12:48:42 am
content: Usually it is not important for the LEDs to be driven at the extremes of the PWM duty cycle so even if it takes the driver 100s of nanoseconds to turn on or off which limits the minimum on and off times to 100s of nanoseconds, a slow driver will still have a resolution much better than its on and off time over the rest of the PWM duty cycle. With this in mind, practically any PWM driver intended for use in switching regulators will work.If you really do need to be able to produce an accurate 120 nanosecond pulse, then things get complicated.

author: amaschas
author_rank: Regular Contributor
timestamp: March 16, 2020, 10:12:51 pm
content: Quote from: David Hess on March 15, 2020, 12:48:42 amAh OK, I didn't realize that the on/off times of driver impacted the extremes of the PWM duty cycle more than the rest of the duty cycle, but now that I'm thinking about it that makes a lot of sense. It seems like the low end of the duty cycle would be affected worse than the high end as well, and I'm really more interested in the resolution of the upper 50% of the duty cycle. For my application I could probably just disable dimming below 50% entirely.