Author Topic: film grade controller for rgbww leds  (Read 1805 times)

0 Members and 1 Guest are viewing this topic.

Offline vnsTopic starter

  • Contributor
  • Posts: 13
  • Country: es
film grade controller for rgbww leds
« on: June 22, 2020, 05:58:09 am »
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/_BO6lwY

the 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.
 

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
Re: film grade controller for rgbww leds
« Reply #1 on: June 22, 2020, 06:21:04 am »
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.
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8823
  • Country: fi
Re: film grade controller for rgbww leds
« Reply #2 on: June 22, 2020, 12:31:16 pm »
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, adjust the 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.
 

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
Re: film grade controller for rgbww leds
« Reply #3 on: June 22, 2020, 12:53:35 pm »
Why do you want to use PWM dimming?


When 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.
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: film grade controller for rgbww leds
« Reply #4 on: June 22, 2020, 02:08:24 pm »
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.
 

Offline vnsTopic starter

  • Contributor
  • Posts: 13
  • Country: es
Re: film grade controller for rgbww leds
« Reply #5 on: June 22, 2020, 03:38:06 pm »
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.

RGBWW 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 cheap prosumer examples 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?
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: film grade controller for rgbww leds
« Reply #6 on: June 22, 2020, 09:23:55 pm »
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 frequency :(

You may need a customized driver.

 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1236
  • Country: nz
Re: film grade controller for rgbww leds
« Reply #7 on: June 22, 2020, 10:21:10 pm »
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.)

 

Offline vnsTopic starter

  • Contributor
  • Posts: 13
  • Country: es
Re: film grade controller for rgbww leds
« Reply #8 on: June 23, 2020, 06:57:33 am »
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 subject https://www.red.com/red-101/flicker-free-video-tutorial

Banding 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.
 

Offline vnsTopic starter

  • Contributor
  • Posts: 13
  • Country: es
Re: film grade controller for rgbww leds
« Reply #9 on: June 23, 2020, 07:18:04 am »
This is the banding problem I am seeing at 24fps 1/50s with my Yeelight bulbs

1006086-0

This 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.

1006088-1

The camera is a Sony a6300 with a 24MP sensor.

Thanks for the help guys.
« Last Edit: June 23, 2020, 07:22:35 am by vns »
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: film grade controller for rgbww leds
« Reply #10 on: June 23, 2020, 09:56:27 am »
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  8)
 

Offline vnsTopic starter

  • Contributor
  • Posts: 13
  • Country: es
Re: film grade controller for rgbww leds
« Reply #11 on: June 23, 2020, 10:51:48 am »
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.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12694
  • Country: ch
Re: film grade controller for rgbww leds
« Reply #12 on: June 23, 2020, 11:02:09 am »
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/_BO6lwY

the 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.
If 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.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2130
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: film grade controller for rgbww leds
« Reply #13 on: June 23, 2020, 11:24:47 am »
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?
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: film grade controller for rgbww leds
« Reply #14 on: June 23, 2020, 12:15:16 pm »
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 practcals :(

As @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: FadeCandy
https://github.com/scanlime/fadecandy/blob/master/README.md
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12694
  • Country: ch
Re: film grade controller for rgbww leds
« Reply #15 on: June 23, 2020, 03:37:34 pm »
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.
 

Offline vnsTopic starter

  • Contributor
  • Posts: 13
  • Country: es
Re: film grade controller for rgbww leds
« Reply #16 on: June 24, 2020, 09:28:30 am »
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
 

Offline vnsTopic starter

  • Contributor
  • Posts: 13
  • Country: es
Re: film grade controller for rgbww leds
« Reply #17 on: July 30, 2020, 04:46:13 pm »
I am back :)

I 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.

1037054-0

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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf