RGB LED Light Design for Film Densitometry - Page 1
Forum section: electronics / projects

author: amaschas
author_rank: Regular Contributor
timestamp: January 12, 2022, 04:32:00 pm
content: Hey all, I wanted to share a project I've been working on intermittently over the past year, which I thought at first was going to be straightforward but turned out to be deceptively complex and offered some interesting challenges—particularly analyzing the proliferation of topologies available and finding one that would work given requiremnts that were outside of the normal use-cases.The context for this project is that I have an interest in film photography, and as a result I've been exploring the way that film scanners designed in the late 90s and early 2000s worked in order to better understand the film digitization process and maybe build something of my own that would take advantage of the significant technological advances of the past 20 years. What I discovered was that high end film scanning is a essentially an exercise of densitometry, measuring the density if the various dyes on the film substrate across the negative in order to reconstruct the image digitally. I don't want to get too far into the details here, but film scanners generally measure what is called status M densities, which are just the density of dyes which absorb certain colors using certain wavelengths of light. In the case of status M, these wavelengths are roughly 440nm, 540nm and 640nm.These wavelengths aren't generally available in any commercial video lights or even in standard RGB LED emitters, so I decided to design a light source specifically suited for making status M measurements of film dyes, which I could then use in conjunction with a digital camera, (preferably one with the bayer filter removed—another long story I won't go into here), to replicate the function of a film scanner. There's a whole community centered around scanning film with digital cameras which you can explore if you're interested.The design parameters of the light called for emitters that could produce the necessary wavelengths at high brightness because faster shutter speeds == less risk of vibration ruining exposures. I also wanted to be able to dim each channel independently, but the color needed to remain consistent with varying brightness which meant I needed to use PWM rather than analog dimming. I also wanted high PWM resolution, since I figure being able to make fine adjustments of channel brightness might come in handy, so I targeted 10-bit PWM. I also wanted to use a high PWM frequency, since the intended use case was with digital sensors with at fast shutter speeds. The research I did on lighting for video and photography indicated that 20khz was a popular frequency for such lights, since it was well beyond the region that would result in flicker or inconsistent exposure, and was also outside of auditory range.For the emitters, I went with the Lumileds Luxeon 2835 color line, which offered the wavelengths I needed at high brightness with low power consumption. After some research into high-frequency PWM dimming of LEDs, I found a well-documented solution that Texas Instruments refers to as "shunt-FET dimming", which is simply using PWM to drive an external MOSFET that shorts the output current of the LED driver to ground when the MOSFET is on. TI offered a reference design which I based my implementation on. I ended up using the TPS92515 constant-current driver because it had documented support for my PWM dimming approach and used fewer external components than some alternative drivers.The overall design of the light employs an ESP32 (for potentional later integration of bluetooth/wifi control) as an MCU and three constant-current LED drivers, each of which drives 3 rows of 8 series LEDs in parallel. So there are 9 total rows of 8 LEDs, with 3 alternating rows per channel. All of the channels share a common ground, which results in fewer connections between the driver and emitter board, but eliminated the ability to use cheaper ICs with higher availability, which generally use low-side current sensing. For this version of the design I'm hoping that having 8 LEDs in series in addition to using an aluminum PCB substrate for the emitter board will provide sufficient protection against current hogging and resulting failure from overheating. I'm also driving the LEDs at the recommended average current of 120mA, which is well below the maximum. The size of the light panel is designed to accomodate film sizes up to 4x5, which is the largest format I current shoot.I used a 4-layer stackup with a signal/ground/power/signal stackup. My power plane is split into several areas to support the various voltage supply rails (24V, 10V, 5V, 3.3V) and the LED driver currents.In future designs I may explore using one driver per row (probably LM3402s for cost and availability reasons, though this will force me to abandon the common-cathode layout and require more connections between the driver and emitter boards), or using one LM3466 (which balances current between parallel strings of LEDs on the low side) per row with three drivers.If anyone has an experience designing LED lighting solutions for video or photography applications, I'd be interested to hear what you think!

author: harerod
author_rank: Frequent Contributor
timestamp: January 12, 2022, 05:24:55 pm
content: Thanks for sharing. I am not sure if I missed something, so let me ask real quick: Are you using any optical filters in the path between LED and sensor?If you do - filter after the light source or in front of the sensor?

author: amaschas
author_rank: Regular Contributor
timestamp: January 12, 2022, 05:30:17 pm
content: Quote from: harerod on January 12, 2022, 05:24:55 pmI am not, though you could use bandpass filters to do the same thing that I am doing. There's actually a few people experimenting with using this approach, and very expensive drum scanners use bandpass filters or lasers in some cases. I went this route because LEDs are a cheaper way to get light emitted in specific, narrow wavelengths.

author: ajb
author_rank: Super Contributor
timestamp: January 12, 2022, 06:01:47 pm
content: This sounds like a really neat project!Quote from: amaschas on January 12, 2022, 04:32:00 pmI'm skeptical that this is really a meaningful design decision. There are some design benefits to using PWM dimming over analog dimming in terms of practical resolution and consistency, but I'm not convinced that color consistency is really improved. I've not seen a reference that directly shows variation in wavelength with current, only with temperature, which leads me to believe that claims about a current dependency are really indirect claims about temperature dependency (resistive losses even in the package itself increase with current squared, after all). The thermal time constants within the LED package and between the package and whatever it's attached to will affect how the different methods translate into thermal behavior of the junction, so that would be complicated to work out, but it's possible that all PWM does is effectively smear out the emission band because of the minute fluctuations in junction temperature over the PWM cycle.Setting that aside, the manufacturers of these sorts of LEDs for general illumination don't expect their customers to be this fussy about wavelength, so I looked at a manufacturer who does:https://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=6071If you look at some of those spec sheets, they plot center wavelength vs temperature, and they typically show something like 2nm over a temperature span of 40-50°C. So that works out to a coefficient something like 0.05nm/°C which is practically nothing if you aren't doing some sort of crazy interferometry. It's also swamped by the stated manufacturing variance in the peak wavelength, which is 20nm for the 2835 deep red (other colors have a similar overall range but are at least binned to ~5nm increments). Now it's possible the LEDs sold by Thorlabs are optimized for wavelength stability over temperature, I would love to see a similar chart for a standard illumination LED and see how it compares. But this still all adds up to temperature being the critical factor, not current, so if you were really concerned with wavelength stability then you probably need accurate temperature regulation more than any particular dimming method, and you'd need a pretty precise spectrometry setup to confirm that.

author: amaschas
author_rank: Regular Contributor
timestamp: January 12, 2022, 06:48:44 pm
content: Quote from: ajb on January 12, 2022, 06:01:47 pmMy understanding is that the color of the light emitted by the LED is more sensitive to voltage than anything else, which is why different color LEDs operate at different voltages. The LEDs I'm using, for instance, are documented to have a certain voltage drop that will emit color in a certain spectrum at 120mA, but if you supply more or less current the voltage drop will change, which is what affects the color.I actually happen to have a spectrometer (Sekonic C-700), so I just did a test. I hooked up one of my LED grids from a previous version to my bench supply and set it to provide 120mA of constant current/ Then I started reducing the current to see what affect this had on the color output. This actually revealed another limitation of analog dimming: the relationship between luminosity and supply current isn't even remotely linear. Reducing the current by half only reduced the perceptual brightness by about 20%, but after that the brightness fell off rapidly. I made a spectrum comparison measurement at 60mA, and the peak output had shifted up by ~10nm, which is what you would expect given that red LEDs generally have a lower voltage drop. Reducing the current further resulted in the LEDs shifting their peak wavelength significantly, and the emitters even took on a noticeably blue tinge. Given that I need accurate, linear in very specific wavelengths, I don't think analog dimming is going to cut it.That being said, I do think that you are absolutely right that the LED color is going to pretty temperature sensitive. One I get my latest boards with the aluminum substrate, I'm going to have to test to see how much the spectrum changes if I leave the light on for protected periods.

author: ajb
author_rank: Super Contributor
timestamp: January 12, 2022, 07:37:30 pm
content: Quote from: amaschas on January 12, 2022, 06:48:44 pmIt's actually sort of the other way around: the desired wavelength requires a particular construction/composition that results in a certain forward voltage. Operating voltage isn't something you can practically control at the driver level due to the nonlinear diode IV curve--current is a much better parameter to control in terms of setting the operating point, and the resulting final forward voltage is just a side effect of that. Vf also captures parasitic internal resistance of the LED, from the bondwires and bulk resistivity in the chip material itself, which are both also temperature dependent.QuoteThis isn't a consequence of analog dimming, it's a consequence of how the human eye perceives brightness. You'll see exactly the same effect with PWM, because the human eye is more sensitive to changes in brightness at lower brightness levels. If you were making some some sort of general illumination thing you would compensate for this by translating a linear 'brightness' value into a nonlinear current/PWM setting. Whether or not you'd do something like this for your application depends on whether or not your capture process is linear.QuoteThat's interesting! Can you share some plots and LED part numbers? However this doesn't at all imply that Vf is the critical factor, nor does it clarify that the current is directly affecting the wavelength rather than affecting wavelength via temperature. So a useful data point but hardly conclusive on that front. The small size of the LED chip (the semiconductor itself I mean) could easily cause a substantial temperature shift over the current range involved, teasing out the specifics experimentally out would be challenging.QuoteDid the red LEDs look more bluish after you reduced the drive current while looking at them? If so, that sounds like another perceptual thing--looking at a bright monochromatic red source will selectively desensitize the L (red) cone cells in your retina, then when you reduce the brightness the balance of stimulus between the desensitized L cones and the not-desensitized S/M cones shifts and you perceive a blueward shift. This is a more subtle effect of the same physiological process as when you look at a bright object and then see an inverted color afterimage. You really can't rely on perceptual effects for this sort of thing, don't believe it if it doesn't show up on your spectrometer!As a related aside, there's a reason that there are whole separate sets of units for radiometric measurements (based purely on optical power) and luminometric measurements (based on optical power compensated for eye response). When you design illumination for humans (or even things like indicators, warning lights, etc, where conspicuity matters) you really have to account for a lot of the visual processing that happens in and after the human retina. That processing is complicated, highly context-dependent (how bright is the room? what color are the walls?), and difficult to quantify. It gets even more complicated when dealing with mixed monochromatic sources because they can have weird effects that don't always show up with broadband sources. There are standard luminosity functions that model the basic response of the human eye in terms of spectral sensitivity, but even there the real curves have long tails that are especially difficult to quantify, but their precise shape results in notable perceptual effects. For example, the reason that 405nm light looks purplish instead of very very blue is because of the low sensitivity of the S (blue) cone at those wavelengths--plus a subtle kink in the L cone response that doesn't always show up on spectral response charts. So it's important to be aware of these confounding factors, and use quantitative measurements whenever you can. You have some advantage in that the camera will (hopefully!) have a much more consistent and quantifiable response, at least with a true raw capture (if you use the camera's built-in processing/encoding, then who knows!).

author: harerod
author_rank: Frequent Contributor
timestamp: January 12, 2022, 08:08:26 pm
content: Ah, alright. I had looked at the wrong LED. I guess you use these:https://lumileds.com/products/color-leds/luxeon-2835-color-line/I was just curious, because a couple of years ago we had an application that required a narrow band light source (BW<15nm). We ended up using an Edmund filter.

author: amaschas
author_rank: Regular Contributor
timestamp: January 12, 2022, 08:51:36 pm
content: Quote from: ajb on January 12, 2022, 07:37:30 pmTat's super useful to know, thanks! I guess I assumed that since these LEDs are all rated for the same optimal current (120mA) but consume that current at very different voltages that the voltage has some operative affect on the wavelength emitted. I've noted that LEDs that emit certain colors of light often operate a similar voltages, so while I know that the color emitted is partly a result of doping the emitter with certain substances, I figured voltage must play a role as well. I sort of want to play around with some white emitters and my spectrometer to see what happens now.QuoteYeah, that's a good point, I need to see if I can rig up an objective measurement of the intensity, because the output of the spectrometer is actually only indicating relative intensity which doesn't help if you're only looking at one color of emitter.QuoteYah! I'll try to sit down and take some more comprehensive measurements later this evening. I'll try to see if there's a significant temperature change as well, though all my snazzy accurate thermometers are at my photo studio currently so I'm limited to an IR thermometer. These are the emitters I'm using:https://lumileds.com/wp-content/uploads/2021/10/DS236-luxeon-2835-color-line-datasheet.pdf. Specifically the L128-DRD1003500000 (far red), L128-GRN1003500000 (green) and L128-RYL1003500000 (royal blue). I chose them because they were specifically advertised as being good for accurate color mixing. In practice, the emitters I received all seem pretty well matched (I assume they were binned), with voltage variance between strings (8 in series) <= 20mV over 30 minutes of operation and color output variance of < 5nm in a random sample of emitters.QuoteThese were the green ones, sorry forgot to mention that. And yeah it's entirely possible it was perceptual.QuoteYes one thing that I realized while working on this is that the fact that I am designing for a perceptual frame defined by medium with known, consistent color responses (light absorption of color film dyes and the spectral response of a camera sensor) makes things so much easier. A lot of the work that went into designing these film emulsions was actually intended to make this sort of thing easier as well, for instance the orange mask on color negative film is designed to eliminate unwanted absorption of wavelengths in the magenta and cyan dyes in a way that can be corrected by a simple adjustment of the intensity of each channel rather than having to apply a gamma curve to each channel in order to get correct color. This makes the parameters of success for this endeavor much clearer: if everything works properly than a color negative scanned with this approach can also be successfully inverted and color adjusted with a simple white balance on medium grey, without excess magenta or cyan in shadows and highlights.

author: amaschas
author_rank: Regular Contributor
timestamp: January 12, 2022, 08:55:22 pm
content: Quote from: harerod on January 12, 2022, 08:08:26 pmYep, those are the ones! I've actually looked at using those Edmund filters but the ones I need are just so incredibly expensive, and that's not even including the equipment needed to adapt everything to the camera and hold it all in place. When I cracked open both a Nikon Coolscan and a Fuji Frontier minilab scanner and saw that they were using a color LEDs to do the job I realized there might be a cheaper, simpler approach in my case.

author: amaschas
author_rank: Regular Contributor
timestamp: January 13, 2022, 06:08:20 pm
content: OK, did some tests with interesting results! The color shift was much less than expected, though there was still a measurable amount. I have a second spectrometer I can use with ArgyllCMS that I believe can output the peak wavelength, since the Sekonic just shows an image. From what I can tell the peak wavelength shifts a few nm per 10mA of current.The brightness test indicates that controlling brightness with current is probably linear enough for some applications, but probably not for mine. At half the recommended peak current (60mA) for instance, the brightness was 17% higher (1800lux vs 1538lux) than a linear brightness reduction. I put together a graph and an animation to demonstrate the effect of lowering the current by 10mA increments from 120mA to zero. There was still some illumination at zero, which was sort of interesting, though probably just a figment of the inaccuracy of the readouts on my bench supply.I wasn't able to take good temperature measurements. The temp varied by a few degrees over the board, but was generally in the range of 28-32C, but the IR thermometer wasn't consistent so I don't trust it. I'll have to try again with a probe I can take to the board in a specific spot.Change in peak wavelength as current fell from 120mA to 0 over 10mA increments.Graph of lux and voltage relative to current in mA. Also added a linear reference series for comparison.

author: Leo Bodnar
author_rank: Frequent Contributor
timestamp: January 13, 2022, 06:33:54 pm
content: I have only a few comment that might not be relevant here:1) Exposed film density spans huge range (10+ stops?) so overall accuracy has to be quite good (16bits probably?) assuming logarithmic brightness perception and the quality of photos mostly affected by distroted highlights and shadows.2) LEDs are notorious for shifting the colour spectrum based on their temperature and current. This is why a lot of precise colour applications use PWM (however annoying it visually is) and long accumulation time detectors30 years ago I had a German-made print room colour densitometer that had a photo-multiplier tube with rotating four colour multiplexer disk in the light path (RGB and neutral), followed by a logarithmic amplifier that produced readings.CheersLeo

author: amaschas
author_rank: Regular Contributor
timestamp: January 13, 2022, 07:19:32 pm
content: Quote from: Leo Bodnar on January 13, 2022, 06:33:54 pmThankfully most modern digital sensors have a dynamic range that exceeds that of color negative film. The camera I use has a dynamic range of almost 15 stops (14.77EV according to DXOMark:https://www.dxomark.com/sony-a7r-iv-sensor-review/). Here's an image of the histogram of a RAW capture of a film negative, you can see how little area the color information actually occupies, though of course a color negative compresses the dynamic range of the image, which is why inverted negatives have very low contrast before gamma adjustments. Of course, if dynamic range was a problem, you could take two exposures and use the HDR approach to get the entire range. In film scanners from the late 90s that had CCD sensors with limited dynamic range, the sensor would take multiple exposures of each color channel in order to capture the full exposure (which is why those scanners were so goddamn slow).QuoteYeah, if the color application requires accuracy in the single nm range, PWM is pretty necessary. I was sort of surprised at how little color shift there was in my (admittedly primitive) experiment above though. From what I could see it was < 10nm of color shift over the entire range. I wonder if these LEDs have been optimized for color stability in some way?QuoteI would love to be able to play with that thing. That actually sounds like the architecture used in drum scanners.

author: ajb
author_rank: Super Contributor
timestamp: January 13, 2022, 11:20:41 pm
content: Thanks for sharing your test results!Quote from: amaschas on January 12, 2022, 08:51:36 pmWhite LEDs being blue LEDs with a lump of phosphor on top (which describes them physically as well as spectrally) you'll see the blue spike in the spectrum shift just like any blue LED would. I don't know what will happen to the phosphor spectrum, that would be interesting to see. I don't see any indication of a shift in white point with temperature in the Luxeon 2835 datasheet, but they don't always show spectral change for the color line, so....QuoteYeah, I would still assume perception first there, the M cone response is closer to the L cone than the S cone, so you'll still see substantially more desensitization of the M and L cones than the S cone when looking at a green source. (The M and L cone opsin genes are generally believed to have diverged from a single predecessor gene, and the amount of spectral shift varies within populations because there are several alleles of each gene--so different people really do see different colors!)Quote from: amaschas on January 13, 2022, 06:08:20 pmThis is entirely expected. Per the datasheet the overall conversion efficiency does drop with temperature. In practice this will be nonlinear because the reduced efficiency means more heating and that means further reduced efficiency. Looking at the characteristic curves is interesting because they plot curves for different colors together and you can clearly see significant differences in their coefficients. They also have significant differences in package thermal resistances, I assume due to different construction necessitating different packaging/bonding arrangements, or possibly differences in die sizes.This doesn't mean that controlling brightness via current is bad--it certainly doesn't mean that PWM is better without a comparison test to confirm. Nonlinearity can be calibrated out to a certain extent, and you'll also need to calibrate the response of the rest of the system anyway. Or not necessarilycalibrate, since you don't directly care about what the precise luminance is, but whether or not the light level and color balance produces good results when combined with the camera and the film, which you could just determine experimentally.QuoteIR thermometers are easily confounded by materials with poor emissivity or notable reflectivity in the IR, so they need to be used with care in general. The temperature that really matters is that of the LED junction, which you're not going to be able to measure easily.Looking at the specs for the green 2835 and doing some figuring (with the disclaimer that I'm doing this quickly right here in the post editor window so may be a bit dodgy) :Junction-to-Pad thermal resistance: 69°C/WTyp. 47lm @ 120mANormalized Light Output vs Forward Current curve shows ~60% output at 60mA, which would be ~28.2lm. Luminous coefficient at 530nm is 0.875 (CIE 1964).60mA: 28.2lm, Vf=2.82Electrical power in=2.82*0.060=169mWRadiometeric power out=28.2/683.002/0.875=47mWThermal power=169-47=122mWConversion efficiency=47/169=28%Δtj-pad=0.122*69=8.4°C120mA: 47lm, Vf=3.15Electrical power in=3.15*0.120=378mWRadiometeric power out=47/683.002/0.875=78mWThermal power=378-78=300mWConversion efficiency=78/378=21%Δtj-pad=0.300*69=20.7°CThis all assumes that the junction is held at 25°C, which is not something that happens in the real world, but we can use it to estimate that at 120mA the junction will be at least 12°C warmer than at 60mA. The real world temperature difference will be larger, because the as the junction warms up its efficiency decreases further, with a normalized output coefficient of something like -0.17%/°C.But if we take that 12°C figure back to a table that I missed before, which DOES show temperature coefficients of wavelength for the various colors, we'd expect the green to shift by 0.05nm/°C * 12 = 0.6nm from 120mA to 60mA. So that's a significant discrepancy from the ~10nm total you saw in your test, we'd expect it to take a ~200°C change to get a 10nm change in wavelength. There's also a discrepancy in direction. The coefficients given in the datasheet are clearly meant to be signed (the PC Red-Orange has a negative term), but your animation shows (per your description) the wavelength increasing as the current is decreased which would indicate a negative coefficient. That suggests there's something else--or several something elses--going on here. (I could also be reading your description of the animation backwards, which would explain the difference in sign but not the difference in magnitude).This could partly be explained by thermal soak, the junction will get to a certain temperature above the temperature of the board fairly quickly, but then the board itself will take longer to heat up, and you could see the junction temperature rising notably even as you decrease the current as the board moves towards equilibrium. You'd need to either let the whole thing sit at the measurement condition for a while to reach equilibrium before taking the spectrum, or take very short measurements with some cooldown time in between to eliminate the thermal behavior from the system. (Or do some crazy direct cooling of the junction, I guess.)Another thing I would be suspicious of is the spectrometer/setup. The model you mention is designed for ambient light, and it's possible that it's going to get a little funny when dealing with a sharp, high intensity monochromatic source, or that a change in position of the sensor or the light path between the LED and the sensor causes some sort of error. These are all guesses, some careful setup and/or additional testing of the spectrometer itself would be useful to test these possibilities. So plenty more testing you could do to really dig into the LED performance if you're up for it!I think the most interesting test, and the most relevant to your application, would be to take the spectrum at a constant current, and then at a PWM duty cycle that delivers an equivalent average current, being sure to let the whole thing reach equilibrium before taking the spectra, and see if there's a difference. That would pretty much directly confirm what you really want to know for your application.