film grade controller for rgbww leds - Page 1
Forum section: electronics / projects

author: vns
author_rank: Contributor
timestamp: June 22, 2020, 05:58:09 am
content: Hi,I want to design/implement a controller for rgbww leds to use in film/photography illumination.It has to be flicker and banding free, and also it cannot emit any sound in the audible range, which means that leds need to be controlled with pwm above 20khz, my plan is to use 25khz.All leds will be emitting the same color.rgbww leds integrate 5 different leds, red, green, blue, and two white leds with different color temperatures, to create different colors and intensities I need 5 pwm pins with different duty cycles running at 25khz, I need enough precision to have a good color spectrum coverage while I am able to dimm intensity, I am not sure how many bits I need, but probably no less than 12, maybe 16.I will use wifi to control the color/intensity.These are the leds I will be using:https://a.aliexpress.com/_BO6lwYthe question is, how do I get 5 pwm pins at high frequencies with enough resolution?Mi initial idea was to use a eps12 or esp8266 module with a pca9685 or pca9635, but the first one doesn’t provide enough frequency and the second one lacks the precision.PWM dithering to increase resolution could be an option, but I don’t know what hardware I can use...This is something I am doing as a hobbyist, so my resources are limited. There are out there illumination products providing what I want, but I really want to learn how to do this.Thanks in advance.

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: June 22, 2020, 06:21:04 am
content: I would look at external PWM controller ICs. You either feed these with an analog reference voltage which you can generate with any of the many multi-channel DACs out there, or some you can control directly digitally. Those often go well into the hundreds of kHz switching frequency. If you need more current capacity, just add a good switch after it that can keep up. Some of the controllers might even have a FET driver output stage as many of the PWM controller ICs are aimed at DC/DC power supplies.

author: Siwastaja
author_rank: Super Contributor
timestamp: June 22, 2020, 12:31:16 pm
content: Why do you want to use PWM dimming?For illumination, you would be typically using proper constant-current LED driver anyway. You would be then use PWM to toggle the enable pin of said converter; and they have requirements for the pulse width, limiting the maximum PWM frequency.Instead,adjustthe current limit; many have current limit adjustment pins, or a register if it's digitally controlled. The downside is, constant current drivers typically do not go all the way to zero. Additional PWM dimming is then required if you need very low intensities. The flicker is still much better because if you want to output say 5%, having a 50% PWM of 10% current is way less flickery than having a 5% PWM of 100% current.I don't think PCA9685 or PCA9635 are suitable at all. For photography illumination, you would likely use high-power LEDs, and drive them with (current, not voltage)regulated switch mode supplies, not with linear supplies. Then adjusting the current limit becomes the obvious way to control light output.

author: TheUnnamedNewbie
author_rank: Super Contributor
timestamp: June 22, 2020, 12:53:35 pm
content: Quote from: Siwastaja on June 22, 2020, 12:31:16 pmWhen you want very high CRI and consistent color, you usually need to go for PWM because of the non-linear relationship between input current and output spectrum. (note that there is also a difference with respect to temperature, but that should be similar for both constant-current and PWM if the average power is the same). You need to drive them at the same current to get the same light out.I seem to recall that the differences can be quite significant.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: June 22, 2020, 02:08:24 pm
content: So how many colors is your video light going to produce? Can your RGBWW leds produce a color gamut that will render colors correctly in a camera? RGBW leds are often quite crude in their chromacity, because they're not made for use in accurate color reproduction.Most professional video lights are grids of color matched cold white and warm white leds, which give adjustable color temperatures from 6500K sunlight to 2400K tungsten.

author: vns
author_rank: Contributor
timestamp: June 22, 2020, 03:38:06 pm
content: Quote from: Syntax Error on June 22, 2020, 02:08:24 pmRGBWW does exactly that, it combines RGB + two white leds with different color temperatures, one at 2400K and the other one at 6500k.Non professional commercial solutions usually provide a wide color reproduction, CRI97 seems to be pretty standard. Some cheapprosumerexamples are: falcon f7, Aputure MC or the more powerful GVM-50RS.What I really mean when I talk about film grade illumination is the quality of the light in terms of color reproduction, dimming smoothness (I need enough precision to finely tune the intensity at low levels) and of course flickering and banding free. I don't really need super powerful lights. Removing flickering can be relatively easy, banding is way more problematic because the camera sensor readout speed is involved and we don't want different rows in the sensor with different amount of light for a given frame, hence the high pwm frequency. I have some Yeelight rgb bulbs that can create a nice color gamut, they are flicker free, but the produce some nasty banding more or less visible depending on the dimming level the color used and what other light sources there are in the room, nice for use for home lighting but bad for video, Philips Hue is not problem free either.The use case here is to have lights to create accent colors in low light situations.@TheUnnamedNewbie do you know what "external PWM controller" could I use?

author: Syntax Error
author_rank: Frequent Contributor
timestamp: June 22, 2020, 09:23:55 pm
content: The LED driver is out of sync with the camera's frame rate?Reading around the flicker/banding problem, it seems the PWM stream that's driving the leds needs to be a multiple of the frame rate used (just like with old studio cameras). But there's nothing diffinitive other than examples which state 25fps should use a frequency based on multiples of 50Hz (europe), 30fps should use multiples of 60Hz (usa), and 24fps use multiples of 48Hz (movie). And there's no indication that lights can be synced with each other or a master clock.To achieve brightness control, a comment suggested 'pro' lights alter the mark-space ratio and keep the frequency the same to avoid flicker. Whilst 'pro-am' lights change the PWM frequency and cause flicker. Which makes sense. But 'pro' lights can cause banding too if the operating frequency is too low.It's difficult to find any information on any led driver's operating frequencyYou may need a customized driver.

author: jbb
author_rank: Super Contributor
timestamp: June 22, 2020, 10:21:10 pm
content: I wonder if really fancy equipment does synch to camera frame rate? It could eliminate some of the frequency mixing worries.For deep PWM dimming you might want 12 bits (i think source was mikeselectricstuff). So 25kHz * 2^12 gives around 100MHz counter clock, which is doable.If it’s necessary to feed the LEDs with constant current to maintain colour stability, then it seems like you would effectively be enabling and disabling the current source (or sink) with the PWM signal, which means you need a nice fast current sink.I think Linear Tech (now Analog Devices) makes some chips intended for this application.How many individual LEDs will you have? Is there scope to achieve some dimming by splitting them into banks? (Eg if you have 2 banks of LEDs you get 50% and 100% light options without flicker.)

author: vns
author_rank: Contributor
timestamp: June 23, 2020, 06:57:33 am
content: Flicker an banding are two different problems, the source of the problem is the same, light, but the solution is different though.FPS is not the only factor involved in flickering, the second factor is “angle” or shutter speed. For example, I don’t have troubles with lights in Europe recording at 24fps with a shutter speed of 1/50, this shutter speed warranties that all frames get a full cycle of light, in other words all frames get the same amount of light. 24fps and 1/50 is closer enough to the settings used for a cinematic look, 24fps and 1/48s (a 180 degrees window in a circular shutter).Here is a nice article on the subjecthttps://www.red.com/red-101/flicker-free-video-tutorialBanding is different, because it is caused when some of the rows of the sensor get less light than others while all the frames get the same amount of light. This is specially problematic when using rgb leds, because at a given instant in time we can have different leves of total light output. In a rgbww led this means 5 different duty cycles for a particular color, at t1 all leds can be on and at t1+d maybe only two are on. I will try to post later an example of this.I would like to hace at least 10w at full output, so maybe 30 - 50 of those 0.3w leds.

author: vns
author_rank: Contributor
timestamp: June 23, 2020, 07:18:04 am
content: This is the banding problem I am seeing at 24fps 1/50s with my Yeelight bulbsThis is a picture at 1/4000s shutter speed, it is clearly visible how red and green are combined to get this dark orange color. And how different pixels in the sensor get different colors because of the readout speed. 1/4000s shutter speed it is a little bit extreme, but it clearly illustrates the problem with this type of lights.The camera is a Sony a6300 with a 24MP sensor.Thanks for the help guys.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: June 23, 2020, 09:56:27 am
content: Thanks for posting those images.I assume that you're just using the CCD and have no in between mechanical shutter?Certainly some aliasing going on with the digital shutter speed and the lights. The Yeelight looks reminiscent of the way aircraft propellers look bent because they are sweeping across a progressive scanned CCD.Out of curiosity, what happens to the patterns if you turn the camera on it's side, so the scanning at 90 degrees?Really though, the only way to nail this is to see the RGBWW data timings on an oscilloscope.Very nice camera btw

author: vns
author_rank: Contributor
timestamp: June 23, 2020, 10:51:48 am
content: There is a mechanical shutter, and it used for pictures, but obviously not for video.The images at 90 degress show the same pattern.Yeah, it would be nice to see a disasembly of one of the yeelight bulbs and see what's going on with a scope but I don't have one.

author: tooki
author_rank: Super Contributor
timestamp: June 23, 2020, 11:02:09 am
content: Quote from: vns on June 22, 2020, 05:58:09 amIf you decide not to use a commercial controller chip, then I’d recommend using this dimmer circuit:https://www.electro-tech-online.com/articles/simple-pwm-circuit-for-lamp-dimming-etc-improves-on-555-pwm-circuits.797/I built one using a 20KHz PWM frequency, which I use to dim my under-desk lighting. (The page says frequencies of 100KHz should be doable.) It supports far better low-end dimming than any 555 based circuit I’ve tried, and it doesn’t flicker. To control it from an MCU, you need to generate a control voltage, which you can do with a DAC, or by using the slow PWM from the MCU and filtering it through an LC filter.

author: fcb
author_rank: Super Contributor
timestamp: June 23, 2020, 11:24:47 am
content: You'll need to go at something like 200KHz to 500KHz to eliminate all the shutter issues. If you need finer control at higher frequencies (to blend colours) then probably some sort of dithering scheme might help, only watch for artifacts caused by a predicatable jitter sequence, you might need to add a pseudo random element to this.Could you use DC constant-current control and then correct the mix for the change in colour temperature at lower currents?

author: Syntax Error
author_rank: Frequent Contributor
timestamp: June 23, 2020, 12:15:16 pm
content: There are a few teardowns for those yeelights, because hackers love wifi IoT stuff. Unsurprisingly, inside it's an Arm microcontroller doing all of the color mixing/muxing. So not a practical option for practcalsAs @Tooki suggests, your going to need a very fast PWM with dithering, or a constant-current DC, which makes color matching a real pain. Pehaps a super simple solution; a bank of variable resistors per channel and a DC supply?btw I've been looking at other led video lighting, and I have found nowhere that gives a clue on operating frequencies on their lights!Fyi: FadeCandyhttps://github.com/scanlime/fadecandy/blob/master/README.md

author: tooki
author_rank: Super Contributor
timestamp: June 23, 2020, 03:37:34 pm
content: Depending on how much granularity one needs in terms of brightness, one flickerproof, color-shift-free approach is simply to control how many LEDs you turn on. For example, with an array of 512 (single color) LEDs, you have 512 levels of brightness control by simply turning individual LEDs on and off. With a really good diffuser, this would produce great control. Similarly, by controlling the ratio of RGB and WW/CW LEDs are on, one can control the color and color temperature, respectively.

author: vns
author_rank: Contributor
timestamp: June 24, 2020, 09:28:30 am
content: Maybe a teensy 4.0/4.1 is all I need? 12bit at 36khz out of the box, and I can easily add dithering.https://www.pjrc.com/teensy/td_pulse.html

author: vns
author_rank: Contributor
timestamp: July 30, 2020, 04:46:13 pm
content: I am backI ordered a Teensy 4.0 for testing, this is what I get in a 1/4000 shot @ 36621.09Hz which is the max frequency for 12bit resolution.A huge different vs the picture I posted using the Yeelight bulb but not perfect yet, so yeah, not an easy to fix problem.For video purposes, at least with my camera, it seems that 5khz is enough to remove the banding completely when shooting @ 24p(1/50 shutter speed), so 36621.09Hz is probably safe for any video shooting.Anyway, now I need a way to drive my leds, I order a 4m stripe of rgbww leds, I don't know how many leds I am going to use but it is going to be less than the whole stripe (which contains 240leds). The 4m take aprox 1.1A per channel. I want to keep everything as simple as possible, so I am thinking about some logic level mosfet maybe? I want to controller the gate using the PWM pins directly, 3.3v in the teensy, so I need a mosfet or other type of transistor that is fully open @ 3.3v, but it also should be able to handle the 36khz PWM frequency.When it comes to spec sheets I am a little bit lost, is the IRF3708 the right choice? I just want to avoid a driver circuit for the mosfet itself. I truly need some help. here.