LED lamp / driver project - Page 1
Forum section: electronics / projects

author: stefan_o
author_rank: Regular Contributor
timestamp: April 05, 2023, 11:54:40 pm
content: Hi,currently most of my home is illuminated by high-cri T5 (16mm) fluorescent tubes (from a time where LEDs for illumination was still science fiction), some of them dimmable. After the first one now failed I thought maybe it's time for a change and get LEDs instead. So I made some criteria and started looking: CRI>=90, high-efficiency (>150lm/Watt), dimmable, tuneable white, preferable as a T5 retrofit-tube and with a bit more light output than the fluorescent tubes. Well, I couldn't even find anything close to my requirements.So I assume I have to make something myself. I started looking for LED modules/stripes, but a) I couldn't find one with CRI>90 and high-efficiency and b) They are all designed for low-voltage DC (12V/24V), which is not really great for a 230V design.I questioned if what would like to have would be impossible or ridiculously expensive, so I started looking for suitable LEDs and found these two in stock at Digi-Key:https://www.digikey.de/en/products/detail/creeled-inc/JB2835BWT-G-U22GA0000-N0000001/14554783https://www.digikey.de/en/products/detail/samsung-semiconductor-inc/SPMWH1228MD7WAPMVL/13926354They are not cheap (considering the amount I need), but also not overly expensive. At least it seems that I can get aluminum boards for them at JLCPCB for next to nothing (50 boards 10cm x 1cm for around 10 $).I'm not sure what's the best way to drive them (from 230V), but I found theMicrochip HV9961, not sure if there are better alternatives. It provides linear and PWM dimming input. I would like to use the linear input for a 1-10V dimming option (using the existing dimmer switches) and the PWM input for white tuning, probably using Wifi/ESP32.The datasheet of the HV9961 does only gives a minimal example circuit, not a full demo circuit with all parts given.My questions areHow is the resulting light quality in the 3000-5000K area when combing CRI 90 LEDs at 2200K and 6500K? Will it at least be CRI 90 or are there other things to consider?By the amount of LEDs I will need to have at least two strings in parallel. Usually there is a resistor in series with each string to balance current. How do I dimension that? I would like to have it as small as possible to not waste energyWhat is there to consider/how to dimension the parts in the circuit of the HV9961. High efficiency and no flicker in mindIs there a special reason why there is no capacitor in the buck-converter output?Best regardsStefan

author: mariush
author_rank: Super Contributor
timestamp: April 06, 2023, 12:27:30 am
content: TME.eu has over 90k in stock of these Bridgelux CRI 95 2700k leds - 94lm; 2700K; 95; 116°; 100mA; 8,8÷9,3V; :https://www.tme.eu/gb/details/bxen-27s-13h-9c/smd-white-leds/bridgelux/bxen-27s-13h-9c-00-0-0/They're around 10 euro cents + vat if you order 100 or more.Also same 2835 footprint , 80k pieces of this at around 7 euro cents if you get 100+ : 56lm; 3000K; 95; 150mA; 2,9÷3,3V; :https://www.tme.eu/gb/details/bxen-30s-11m-3c/smd-white-leds/bridgelux/bxen-30s-11m-3c-00-0-0/later edit : and neutral white in 3030 footprint , liteon CRI 90, 84÷112lm; 4000K; 90; 120°; 150mA 5.8...6.6V :https://www.tme.eu/gb/details/ltw-3030aql40/smd-white-leds/liteon/You could even mix these leds so that you'd have both 2700k and 300k in your lights.As for led drivers ... tons of drivers on digikey and other places.It's 3:30 am here and I have to wake up at 7 am to go to work so... maybe I'll come back to this thread.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 07, 2023, 01:11:33 pm
content: Hi,these LEDs look ok, but they are not as efficient as the ones I found (and only marginally cheaper) and if I would like to adjust the color temperature I need a low and high color temperature one. The question remains, what are the drawbacks of mixing white of two CRI90 LEDs with 2200K and 6500K.For the LED driver, there are a lot at Digi-Key, but I couldn't find one that fits and is affordable. The datasheets often say for industrial and/or street lighting. For that application 80 bucks is ok, but I would need to have two of them in each lamp, that's a bit much.I started designing my own driver with a HV9961. Unfortunately the datasheet only provides a "Typical Application Circuit", not a fully worked-out example. I only found one circuit with this chip at another place that according to the designer blows up the diode after a few minutes. I attached my initial circuit.Are the FET (selected for very low gate charge) and the diode a good choice?I bypassed the internal linear regulator of the HV9961 with an external capacitor dropper/z-diode to have lower losses and a slightly higher operating voltage, that should be better for the FET (higher gate voltage) and allows 1-10V dimming. I'm still not sure if/why connecting the grounds of both rectifiers (with and without capacitor dropper) works, but according to LTSpice it's fine as long as I have a capacitor in both AC linesI know the rule of thumb for buck converters: Lower frequency means higher efficiency but requires larger inductor/capacitor at the output. The datasheet has a formula for the inductor size, but I'm not sure I'm using it correctly, as it gives me inductor values in the range of 30mH, which is quite a lot.Best regardsStefan

author: mariush
author_rank: Super Contributor
timestamp: April 07, 2023, 05:03:28 pm
content: The higher the CRI, the less efficiency you get. You seem to want high CRI, but also willing to trade CRI for higher output.100 lm for CRI95 and 2700K is imho quite good.so CRI 95 2700k vs CRI80 2200k ... 2200k may be too warm white.The links I gave you had no "cool white" as in 5000k or higher, I could have spent more time to find something in that 5000-6500k range with similar efficiency on tme.eu with cri 90 or higher.I was thinking more along the line of buying ready made small ac-dc converters which produce 24-36-48v-60v and then using led drivers that accept pwm input to adjust the brightness.There's lots of cheap 1 channel led drivers that support up to around 40v ... for example AL8861 is 50 euro cents at digikey and can do up to 1A of current - you could have 16 of your 480mA leds with one :https://www.diodes.com/assets/Datasheets/AL8861.pdf

author: stefan_o
author_rank: Regular Contributor
timestamp: April 07, 2023, 05:54:27 pm
content: Quote from: mariush on April 07, 2023, 05:03:28 pmOf course higher CRI is lower efficiency in lm/Watt. Lumen is a somewhat weird unit, as it is based on the human vision, not only physical phenomena (unlike for example Meter or Second). So emitting photons at wavelengths our eyes are not so sensitive at may help our color vision, but is considered not as bright and that results in lower Lumen, even though the LED itself may output the same amount of energy as visible light.I think CRI 90 is a good compromise for me, because I have a few LEDs with CRI 80 and sometimes a few colors look odd, my bench work lights are CRI 90 LEDs, everything looks fine in them.As I said I would like to be able to tune the the color temperature between 2200K (light like dimmed incandescent light bulbs) to 6500K (cold sunlight). The LEDs I found are both CRI 90, 140 lm/Watt (the 2200K, higher color temperature from the same series are a lot more efficient in lm/Watt) and 180 lm/Watt with around 10 cents each when buying at least 100.I had a look at TME, but I couldn't anything better than that.Quote from: mariush on April 07, 2023, 05:03:28 pmThe AL8861 states up to 97% efficiency, that's great, but if you need an additional AC/DC converter, that will lower the efficiency considerably. There is also no need for an isolated power supply, as the LEDs are not touchable. There a quite a few driver chips that operate at higher voltage, but the HV9961 allows for external voltage regulation.

author: Zero999
author_rank: Super Contributor
timestamp: April 08, 2023, 09:03:52 am
content: Quote from: stefan_o on April 05, 2023, 11:54:40 pm1) What do you mean? The CRI will depend on the LEDs. CRI is also questionable.2) Most commercial LED lamps I've seen which have LED strings in parallel do not have current sharing resistors. Matching the forward voltages and using a much lower current, than the maximum rating helps.3) Presumably you've read theHV9961data sheet. What do you mean? The switching frequency is so high there will be no flicker.4) A capacitor will reduce the ripple current through the LEDs but it's such a high frequency, it will be imperceivable, so there's no point.How are you going to dim it? Is dimming required? Don't forget the HV9961 isn't isolated, so an opto-isolator is required if it's going to interface with a microcontroller, or if you want to use a potentiometer, it must be made of plastic.I'm looking at using a similar IC for an LED driver. The LM3409. Although it's designed for lower voltages, so no good for you, it works on the same principle as the HV9961, so I strongly recommend reading the data sheet, which gives more detail about how it works.https://www.ti.com/lit/ds/symlink/lm3409hv.pdf

author: stefan_o
author_rank: Regular Contributor
timestamp: April 08, 2023, 11:07:29 am
content: Quote from: Zero999 on April 08, 2023, 09:03:52 am1) If I got 2200K LEDs and 6500K LEDs, both CRI 90 and then dim then independently to get for example 4000K, what are rules for the CRI of this mixed white? As far as I understand CRI it's a bunch of test colors that will be tested how similar they appear to human vision compared to being illuminated by a black body radiator. So my assumption here is, that the mixed white should also be at least CRI 90, because the LEDs can only add to the spectrum. Or is this a misconception of mine?2) That's great. I did plan to have the maximum current lower than the datasheet allows, so there is no need for additional heatsink except the aluminum PCBs.3/4) There is no fixed frequency, but a fixed off time that can be adjusted in the range of 1.5µs to 40.3µs (at 50% duty cycle that would be between 12 kHz and 333 kHz). For a minimum duty cycle of 20% I need at least 4µs off-time according to the datasheet (125 kHz at 50% duty-cycle). Even though 125 kHz is certainly not visible to the human eye, the LEDs may still flicker and for example interfere with infrared remote controls and just be noisy in the RF. I would like to reduce that as much as possible.Quote from: Zero999 on April 08, 2023, 09:03:52 amDimming should be possible in two ways: 1-10V dimming (AFAIK this standard does not need isolation), I do have "dimmers" for that installed connected to the electronic ballasts of fluorescent tubes I would like to replace. PWM for white temperature control dimming using WiFi (ESP32). The ESP32 would need a power supply, but I don't see the need for isolation as long as the ESP32 is inside the lamp (for programming I would of course need to power it differently). Opto-isolation may also be to slow (assuming I use PWM in the range of 50kHz). Unfortunately there is no maximum PWM frequency given in the datasheet. The TI datasheet states one magnitude lower to prevent aliasing. This would of course require a larger inductor and 12.5 kHz is in the audible range, that's definitely to low. Maybe using the DACs of the ESP32 and linear dimming (well, it's not linear, it just influences the switching of the driver instead of adding another switching) is the better option.

author: Zero999
author_rank: Super Contributor
timestamp: April 08, 2023, 12:22:31 pm
content: There are LEDs which have both cool and warm white on the same board and a high CRI, so that should definitely work.https://www.bridgelux.com/sites/default/files/resource_media/Bridgelux%20DS353%20Vesta%20Series%20Tunable%20White%2018mm%20Gen%202%20Array%2020190426%20Rev%20A.pdfAs far as RFI is concerned, the inductance will limit the dv/dt of the current. The risk of interference with remote controls is the same as fluorescent lamps driven by high frequency ballasts.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 08, 2023, 03:44:06 pm
content: Quote from: Zero999 on April 08, 2023, 12:22:31 pmThat it works in general is for sure, I'm concerned about the CRI of the mixed white. That datasheet doesn't say anything about that, only about the two LEDsFor RFI, I believe these high frequency ballast have reasonable filtering to prevent that.

author: Zero999
author_rank: Super Contributor
timestamp: April 08, 2023, 04:34:51 pm
content: Quote from: stefan_o on April 08, 2023, 03:44:06 pmWhy would mixing the different colour temperatures affect the CRI? Daylight has the highest CRI there is, yet no one is worried about the total CRI in a room illuminated both by daylight and high CRI LEDs.It isn't the RFI which interferes with remote controls, but the modulated light. LEDs have lower IR emissions than fluorescent lamps, so should be better. Proper filtering can reduce RFI to an acceptable level.

author: TZ400T3B
author_rank: Contributor
timestamp: April 08, 2023, 06:21:01 pm
content: For cheap and good LEDs:https://lumileds.com/products/mid-power-leds/luxeon-2835-architectural/Cheap at mouser. Had used them for homemade incandescent bulbs replacements for years.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 08, 2023, 06:59:04 pm
content: Quote from: TZ400T3B on April 08, 2023, 06:21:01 pmI had a look, they seem to be good and efficient, but those I would like (CRI 90 at 5700K or 6500K) are not in stock (neither at Mouser, nor Digi-Key, at TME not listed). They are also a lot cheaper, but I would have to order one million (!) of them.LEDs aren't the problem, I found some that are in stock, have CRI 90, high efficiency and the color temperatures I want. Probably not the cheapest ones, but cheap enough for me (10 cents per LED).What I'm really interested in is advice for designing the driver. As PWM dimming is rather problematic my idea is: Apply PWM to the linear dimming control voltage and have a low-pass filter to smooth it (just a small FET and a RC-Filter)

author: TZ400T3B
author_rank: Contributor
timestamp: April 09, 2023, 09:20:16 am
content: Ah-ha.. last time Ive ordered some 5000K Ra90, they were sold per piece for 6 cents.. you never know with mouser lol. Sorry should have checked.Depends on how much you gonna spend for that driver. You could have DC dimming like 0-10V or whatever the divider is set for, then use this IC to convert it into PWM of your chosen frequency. Of course this could be done with cheaper uC and some coding or even with TL494 but this is purpose made miniature and works immediately.https://www.analog.com/en/products/ltc6992-1.html#:~:text=The%20LTC6992%20is%20a%20silicon,LTC6992's%20internal%20master%20oscillator%20frequency.

author: xavier60
author_rank: Super Contributor
timestamp: April 09, 2023, 10:47:08 am
content: The HV9910B and HV9910C operated in Constant Off-time mode also give good line regulation.

author: Someone
author_rank: Super Contributor
timestamp: April 09, 2023, 11:43:51 am
content: Quote from: stefan_o on April 08, 2023, 11:07:29 amQuote from: Zero999 on April 08, 2023, 04:34:51 pmBlending two "white" sources will only work mathematically/perceptually/standards compliant over a very small range of temperature (100k or so). Few people would notice the deviation up to around 2000k span so you'll probably get away with it.For your example the intermediate point of blending will not pass through 4500k (or be as high CRI as the end points) but that would only become obvious if you had another "accurate" source sitting around illuminating some of the same space.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 09, 2023, 09:45:24 pm
content: Quote from: TZ400T3B on April 09, 2023, 09:20:16 amThe chip is pretty much the opposite of what I need: Convert a PWM signal to a analog voltage (PWM dimming has the downside that the PWM frequency has to be a magnitude lower than the standard switching frequency, that will cause RFI or will need larger filtering.Quote from: Someone on April 09, 2023, 11:43:51 amCan you elaborate on that? Of course adding the spectra of two ideal black body radiators with different temperature will not result in a spectrum that resembles a black body radiator with a temperature in between (the spectrum of a black body radiator has a single temperature-specific maximum, adding two different spectra will result in two maxima).But our vision is limited by the three types of cone-cells and the spectra of all white LEDs I had a look at where all based on two maxima: One at 450nm (probably the wavelength of the LED itself) and one at 630nm. The different color temperatures differ mostly in the balance of these two peaks and for higher CRI LEDs the dip in the 500nm range is reduced significantly (that's probably the reason why some greens look odd in low-CRI LED lighting). Adding two of these spectra should give a good approximation of a spectrum with a temperature in between. Unfortunately all the datasheets only show some simplified spectra rather than detailed measurement values one could actually add and compare.Quote from: xavier60 on April 09, 2023, 10:47:08 amThe HV9961 as well, if I understand the datasheet correctly I would need at least a 5mH inductor, that's quite a lot in my opinion. Is that realistic for a constant off time of 4.3µs?I've added a new version of my driver circuit, there is quite some complexity for the PWM-to-analog using buffering and active filtering (I want to apply the PWM at the 1-10V dimming voltage). I would really like to simplify the circuit and I tried a lot in LTspice, this works quite well.Best regardsStefan

author: xavier60
author_rank: Super Contributor
timestamp: April 09, 2023, 10:41:41 pm
content: From the data PDF,"Reducing the targeted output LED string voltage VO below VO(MIN) = VIN x DMIN, where DMIN = 1 µs/(TOFF+1 µs), may also result in the loss of regulation of the LED current. "seems to be a long way of advising against allowing ON time going below 1uS.What will the LED string voltage be?

author: Someone
author_rank: Super Contributor
timestamp: April 09, 2023, 11:27:46 pm
content: Quote from: stefan_o on April 09, 2023, 09:45:24 pmCRI (and in this situation color temperature) are not from mixing two monochromatic sources, high CRI LEDs use many phosphors to closer approximate a continuum. You can estimate this computationally by linear addition of the typical spectra, but that does not map linearly to color temperature or CRI (you can do those calculations if you want to see the result).Quote from: stefan_o on April 09, 2023, 09:45:24 pmBuy cheap crap, get cheap crap? If you want to have high CRI and maintain that through blending/dimming then you'll need the spectra.

author: TZ400T3B
author_rank: Contributor
timestamp: April 10, 2023, 10:59:42 am
content: How about high-performance 24V LED strips, and dimming those? Then you only need 24V CV supply and primitive dimmer. Also solves sourcing suitable LEDs and their mounting. In past Ive used OSRAM strips but those only come in 4000 or 6500K or mixed 3000+6500, maybe thats what you are looking for anyways, Ra guaranteed at 92 or whatever, look up specs for SUP2000 strips if interested. Nowadays I use ones from Chinese YUJI who offer daylight 5600K with exceptional Ra96+. With installed powers in kWs I would grow old making my own fixtures lol. Slap strip into alu rail and done. Dimming done either in suspended ceiling or distribution box.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 10, 2023, 12:49:06 pm
content: Quote from: xavier60 on April 09, 2023, 10:41:41 pmMy calculation was: 70 LEDs in series, maximum voltage 70*3.1V = 217V, minimum voltage 70*2.4V = 168V. Vin is maximum 240V(AC) * sqrt(2) = 340V, minimum 220V(AC) * sqrt(2) = 311V.Output voltage should not be higher than 75% of input according to datasheet: 0.75*311V = 233V > 217V => OkDMIN < 0.2 with 4.3µs Toff: 0.2*340V = 68V < 168V => okI could probably decrease Toff to reduce inductor sizeQuote from: Someone on April 09, 2023, 11:27:46 pmOf course these are not two monochromatic light sources (you would need at least three to fool the eye, but that's only good for displays, but not for illumination. What I meant is, that there are two distinct peaks in the spectrum whose intensity correlate with color temperature (unlike a black body radiator where there is one peak, and it's the position of the peak in the spectrum that changes with color temperature). LEDs don't try to mimic black body radiators precisely by using special phosphors with a specific peak, rather they vary the intensity of two (wide) peaks. The higher the CRI, the more additional phosphors are added to fill the gap between the peaks. That's what I see in the spectra given in the datasheetsQuote from: Someone on April 09, 2023, 11:27:46 pmI suspected Cree and Samsung to be respectable manufacturers of LEDs. Can you point me to any datasheet of LEDs that has actual measurement values of the spectrum, like 400 values in 1 nm steps with relative intensity for each wavelength? Than one could really add the spectra. (I think I once read/saw in a video a graph-"OCR", that will read values from graphs. Maybe that could help. I found this page to calculate CRI from a spectrum:https://www.waveformlighting.com/tech/color-rendering-index-calculatorThere is also the Colour Python package that should be able to do that, is probably easier (don't have to type 400 numbers).Quote from: TZ400T3B on April 10, 2023, 10:59:42 amThat was my first idea: But I couldn't find ones that met my expectations: High CRI (90), high efficiency (the SUP2000 is only 76 lm/W), tuneable white. Additionally you need quite a beefy power supply for 24V and they are not super efficient either, further reducing the efficiency. Also for "regular dimmer" I do have 1-10V dimmer switches (more like controls) installed, I would like to keep them.I had a look for the YUJI LEDs, there are quite efficient if you consider the very high CRI (>100 lm/W), but I couldn't find a place to buy them except the manufactoror, who sells only complete reels. Also no 2200K version.

author: xavier60
author_rank: Super Contributor
timestamp: April 10, 2023, 01:13:52 pm
content: If I have done the sums right, working with 200V, 4.3uS and 5mH, the ripple current will be 172mA P-P which could be getting close to discontinuous.

author: TZ400T3B
author_rank: Contributor
timestamp: April 10, 2023, 02:44:57 pm
content: Ah yes, SUP is discontinued by now. These are successor strips, P series.https://www.ledvance.com/professional/products/led-strips--modules-and-electronics/led-strips/led-strips-white/led-strips-for-professional-applications/high-performance-led-strips-with-2000-lmm-for-high-requirements-c199429?productId=184152around 120lm/W, not bad lol.For beefy power supplies, I use MeanWell HLG series. Best efficiency vs. price.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 10, 2023, 06:09:44 pm
content: Quote from: xavier60 on April 10, 2023, 01:13:52 pmHow does a capacitor influence that?I did a quick and dirty calculation: Energy consumption of 70 LEDs in 4.3µs:E = 0.5 A * 3V * 70 * 4.3µs = 0.0004515 JEnergy in a 220µF capacitor at the same voltageE = 0.5 * 220µF * (3V * 70)^2 = 4.851 JVoltage per LED after 4.3µs:V = sqrt((4.851 J - 0.0004515 J) / (0.5 * 220µF))/70 = 2.99986 VIf I'm not completely wrong here, the energy stored in a 220µF capacitor should be more than enough to run the LEDs for that 4.3µs.I did a quick check in LTSpice (replaced the LEDs with a single resistor): With no capacitor I get the same current ripple as you calculated. Adding a 220µF capacitor introduces a lot of ringing (very long settling time), but 1µF reduces the current ripple to almost zero and it takes only a few ms to settle.Are there any issues of adding that capacitor?Quote from: TZ400T3B on April 10, 2023, 02:44:57 pm120 lm/W is not bad, but certainly not good (that's almost what YUJI LEDs reach, but those have much higher CRI). The MeanWell HLG series is good, but also very expensive.

author: xavier60
author_rank: Super Contributor
timestamp: April 10, 2023, 06:42:06 pm
content: In practice I have found LED ripple current easy to filter with little capacitance also.I was mainly concerned that if the current becomes discontinuous, the HV9961 will lose regulation.

author: TZ400T3B
author_rank: Contributor
timestamp: April 10, 2023, 08:26:44 pm
content: I have both here at hand, while I use YUJI because OSRAM will not offer 5600K color I desire, their efficacy specs are Chinese BS.Just by mere comparison at rated power it is absolutely clear those 2400lm/m YUJI strips are MUCH dimmer than 2000lm/W OSRAM. Nothing surprising. With LEDs you either have peak efficiency with piss poor Ra~70 or top Ra with mediocre efficiency at best. No way Ra95+ LED will have better lm/W performance than rendering class lower Ra90. For comparison OSRAM GU10 9,5W lamps with Ra98 boast system efficiency of measly 65lm/W. YUJI dreamt up specs are Impossible. So if OSRAM suits your need, from what I understand 2700+6500K would, dont mourn over YUJI and go for it.

author: jonpaul
author_rank: Super Contributor
timestamp: April 10, 2023, 09:32:13 pm
content: Sylvania Belgium filament led lamps Helios !Variable color, 200 LPW efficient, easily available LED driversJon

author: stefan_o
author_rank: Regular Contributor
timestamp: April 10, 2023, 11:00:07 pm
content: Quote from: jonpaul on April 10, 2023, 09:32:13 pmThese lamps are indeed nice, but: No tuneable white and only limited color temperature options (3500K, 4000K, 6500K for CRI90). But if that's what you need they're probably a very good choice. Also it has the driver external, even though it is a retro-fit. So instead of removing the old ballast you just replace it and no need to squeeze all the electronics in the tube. Couldn't find a place that sells them.Quote from: TZ400T3B on April 10, 2023, 08:26:44 pmThat's good to hear (well not in general, fake values in datasheets are horrible, but for me in this case...)Quote from: stefan_o on April 10, 2023, 12:49:06 pmSo, what I have done now: I imported the spectrum of the Cree datasheet in Inkscape, removed the other graphs and made the line thin of the graph I want, exported it as as high-res PNG, used im2graph to get values as CSV, fixed the CSV header and then calculated the CRI using this Python script:Code: (Python)import colourimport sysimport pprintspectruma = colour.read_sds_from_csv_file(sys.argv)['Intensity']spectrumb = colour.read_sds_from_csv_file(sys.argv)['Intensity']ratio = float(sys.argv)/100.0pprint.pprint(spectruma)pprint.pprint(spectrumb)spectruma = spectruma.interpolate(colour.SpectralShape(380.0, 780.0, 1.0))spectrumb = spectrumb.interpolate(colour.SpectralShape(380.0, 780.0, 1.0))pprint.pprint(spectruma)pprint.pprint(spectrumb)pprint.pprint(colour.colour_rendering_index(spectruma, True))pprint.pprint(colour.colour_rendering_index(spectrumb, True))pprint.pprint(colour.colour_rendering_index(spectruma*(1.0-ratio)+spectrumb*ratio, True))print("Maximum efficacy for spectrum A: "+str(colour.luminous_efficacy(spectruma))+" lm/Watt")print("Maximum efficacy for spectrum B: "+str(colour.luminous_efficacy(spectrumb))+" lm/Watt")print("White Temperature of spectrum A: "+str(colour.xy_to_CCT(colour.XYZ_to_xy(colour.sd_to_XYZ(spectruma))))+" K")print("White Temperature of spectrum B: "+str(colour.xy_to_CCT(colour.XYZ_to_xy(colour.sd_to_XYZ(spectrumb))))+" K")print("White Temperatr of spectrum A+B: "+str(colour.xy_to_CCT(colour.XYZ_to_xy(colour.sd_to_XYZ(spectruma*(1.0-ratio)+spectrumb*ratio))))+" K")Result: The 2200K and 5700K spectra have a calculated CRI of 92 and 94, the calculated color temperatures are 2244K and 5887K. For the mixed spectrum with ratio of 50% the CRI is 96 and the color temperature 3658K.Even better: The values of all 14 references look good, with R9 and R12 at 85 the only ones below 90. (individually R9 is at 54 for 2200K and 77 for 5700K)The Samsung 5700K spectrum looks very similar, but the image is much worse in the datasheet, so I used the Cree one. Unfortunately the Cree is not available anywhere, only the Samsung:https://www.digikey.de/en/products/detail/samsung-semiconductor-inc/SPMWH1228MD7WAQUVK/12083603Best regardsStefan

author: coppice
author_rank: Super Contributor
timestamp: April 10, 2023, 11:12:12 pm
content: Quote from: Zero999 on April 08, 2023, 09:03:52 amCurrent CRI figures are highly questionable. Some lights say >80 and the light is OK. Some say >80 and the light is awful. I don't know whether that is people cheating (presumably some do), measurement techniques not being well defined, or the spectral flaws differing in ways that are perceptually very different for the same CRI. The worst seem to be the 4000K not quite warm or quite daylight LEDs.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 10, 2023, 11:33:03 pm
content: Quote from: coppice on April 10, 2023, 11:12:12 pmThe main issue seems to be that CRI is the average(?) of 14 test colors (R1-R14). CRI can still be above >90 even if one test point is horribly bad. R9 seems to be the weak point for many LEDs, that's why some manufactures (like the Sylvania Helios filament led lamps) not only give the CRI, but also the value for R9.I'm not sure if there are also some general issues with the way the CRI is calculated. It may also be possible that some LED/lamp manufacturers are just lying (if you deliberately give wrong specs of your product, that's lying, cheating would be if "just" have misleading specs that are open for interpretation).

author: stefan_o
author_rank: Regular Contributor
timestamp: April 11, 2023, 08:42:27 am
content: Saw that this package can also produce nice graphs. This also shows the problem with mixing these two whites: The result will not be on the white curve, but rather on a straight line between these two points. Could be that the resulting color may have a good CRI, but doesn't look very white. 2700K may not be as warm on the warm end, but the mixing result is probably better:CRIs:White curve:Code: (Python)import colourimport sysimport pprintspectruma = next(iter(colour.read_sds_from_csv_file(sys.argv).items()))spectrumb = next(iter(colour.read_sds_from_csv_file(sys.argv).items()))ratio = float(sys.argv)/100.0spectruma = spectruma.interpolate(colour.SpectralShape(380.0, 780.0, 1.0))spectrumb = spectrumb.interpolate(colour.SpectralShape(380.0, 780.0, 1.0))spectrumc = spectruma*(1.0-ratio)+spectrumb*ratiospectrumc.name = "Mix "+sys.argv+"%"spectrumc.display_name = "Mix "+sys.argv+"%"pprint.pprint(spectruma)pprint.pprint(spectrumb)pprint.pprint(spectrumc)pprint.pprint(colour.colour_rendering_index(spectruma, True))pprint.pprint(colour.colour_rendering_index(spectrumb, True))pprint.pprint(colour.colour_rendering_index(spectrumc, True))print("Maximum efficacy for spectrum A: "+str(colour.luminous_efficacy(spectruma))+" lm/Watt")print("Maximum efficacy for spectrum B: "+str(colour.luminous_efficacy(spectrumb))+" lm/Watt")print("White Temperature of spectrum A: "+str(colour.xy_to_CCT(colour.XYZ_to_xy(colour.sd_to_XYZ(spectruma))))+" K")print("White Temperature of spectrum B: "+str(colour.xy_to_CCT(colour.XYZ_to_xy(colour.sd_to_XYZ(spectrumb))))+" K")print("White Temperatr of spectrum A+B: "+str(colour.xy_to_CCT(colour.XYZ_to_xy(colour.sd_to_XYZ(spectrumc))))+" K")colour.plotting.plot_multi_sds_colour_rendering_indexes_bars([spectruma,spectrumb,spectrumc])spectra = []for i in range(2000,6000,50):spectra.append(colour.sd_blackbody(i,colour.SpectralShape(380.0, 780.0, 1.0)))for i in range(0,100,1):r = float(i)/100.0spectra.append(spectruma*(1.0-r)+spectrumb*r)colour.plotting.plot_sds_in_chromaticity_diagram_CIE1931(spectra,annotate_kwargs={'annotate': False})Edit: Cannot get the attachments inside post to work

author: TZ400T3B
author_rank: Contributor
timestamp: April 11, 2023, 12:54:40 pm
content: As for why high CRI rating alone can be misleading and lit items look bland.

author: jonpaul
author_rank: Super Contributor
timestamp: April 11, 2023, 02:34:10 pm
content: CRI of LEDs measurement and improvements very well known.Here is the 200 LPW Sylvania Helios LED filament lamps some are variable CT, all have excellet CRI and highest efficiency.https://www.sylvania-lighting.com/media/6737/sylvania-helios-led-brochure.pdfCan run from off the shelf LED ballasts and PSUJon

author: stefan_o
author_rank: Regular Contributor
timestamp: April 11, 2023, 10:23:03 pm
content: Quote from: TZ400T3B on April 11, 2023, 12:54:40 pmYes, that's whats shown in the Graphs, R9 is quite problematic.I extracted the spectra of the Samsung and the Lumileds datasheets: Unfortunately they are worse than Cree, especially at R9. They still manage to get an overall CRI above 90, but they are less even than Cree (assuming the spectra are representative).I now start thinking about 3 LED types: 1800K Lumileds, 2700K Cree and 5700K ? (Cree are nowhere in stock). This way I should be able to adjust color temperature over a wide range without the white color being "off" in the middle. Shouldn't add too much cost.I also had a look at the Osram GW QTLTS2.QM, but that datasheet does not provide a spectrum and the additional data provides two: One for the Led itself and one for the phosphor with the note you should add them in the desired ratio. That doesn't seem based on measurement but rather a simulation. Not great.Quote from: jonpaul on April 11, 2023, 02:34:10 pmDo you know who sells them?

author: jonpaul
author_rank: Super Contributor
timestamp: April 11, 2023, 11:00:57 pm
content: Please contact Sylvania Belgiumjon

author: stefan_o
author_rank: Regular Contributor
timestamp: April 20, 2023, 05:45:21 pm
content: I've now completed the schematics for the LED driver and designed the PCBs. Some lamps restrict the width/height to 2cm, therefore I split the PCBs: One PSU board, that rectifies the mains voltage, provides the 10V using a capacitive dropper and also the dimming voltage. Up to 3 driver boards can be connected, that will provide the current for the LEDs, and have the input for linear and PWM dimming (the PWM input has pulldown and pullup resistor, to populate only one to select weather the the default state without PWM input is on or off). Feedback is welcome.Mouser now seems to have 5700K CRI90 LEDs from Cree in stock, so this is my selection for the three LED types1800K:https://www.mouser.de/ProductDetail/Lumileds/L128-1890HA35000B1?qs=sGAEpiMZZMv0DJfhVcWlK3y20PkOQPHrB%252BFvLYmfGbunRBmNppZaow%3D%3D2700K:https://www.mouser.de/ProductDetail/Cree-LED/JB2835BWT-G-U27GA0000-N0000001?qs=sGAEpiMZZMv0DJfhVcWlK3y20PkOQPHrTEh747RlIMWIIx993kQPiw%3D%3D5700K:https://www.mouser.de/ProductDetail/Cree-LED/JE2835BWT-N-U57EA0000-N0000001?qs=sGAEpiMZZMv0DJfhVcWlK3y20PkOQPHr3lSk2v%252B7X0Y9LDuFpWvhDA%3D%3DThe 5700K isWN class. I couldn't really find a difference to J or G class, except that it is tested at a higher current, but weirdly maximum allowed current is lower. They are also a lot cheaper. Do I miss something why they are so much cheaper? I plan a maximum current of 150mA, which is significantly lower than the maximum current of any of these LEDs and should still give me more light output than the current fluorescent tubes.Best regardsStefanEdit: The Cree LED I meant was N class, not W class (Mouser does have N and W in stock for 5700K at 90CRI)

author: xavier60
author_rank: Super Contributor
timestamp: April 20, 2023, 11:59:32 pm
content: I also wonder why LEDs with a high Max Current tend to have low Test Current.Im using Cree J series G class at 200mA.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 21, 2023, 09:15:29 am
content: Yes, also the N class doesn't seem to be less efficient. If you use the graphs to calculate the lm/Watt at the same current you'll get pretty much the same values.The same lm/watt (with same output spectrum) would also mean the same amount of heat is generated. The theoretical maximum for that spectrum is at 282 lm/Watt, the G series has 188 lm/Watt (at 55mA, at 150mA it drops to 172 lm/Watt), which means an efficiency of 67% to 61%, which is quite good I think. For 150mA that would mean heat production of around 0.17 Watts

author: xavier60
author_rank: Super Contributor
timestamp: April 21, 2023, 09:38:12 am
content: For those who haven't stumbled across this yet, a method for confidently gauging LED junction temperature using the LED's own temperature coefficient.https://www.ledsmagazine.com/manufacturing-services-testing/article/14173251/jedec-technique-simplifies-led-junction-temperature-measurement

author: Zero999
author_rank: Super Contributor
timestamp: April 21, 2023, 09:47:23 am
content: Quote from: stefan_o on April 11, 2023, 08:42:27 amOh I see what you mean now. Mixing different high CRI colour temperature spectrums will yeild a lower CRI, but does it matter in practice? Don't forget CRI is just a number. I don't recall any issues with rooms lit by both daylight and halogen lamps, which both have a perfect CRI, yet will result in a lower number.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 21, 2023, 11:00:11 am
content: Quote from: Zero999 on April 21, 2023, 09:47:23 amNo, as you can tell from the charts, the mixed light will in general have a CRI value between or better than the two light sources. As you can tell from the bar graphs I posted, for some reference colors the result is in between, for some it is better than both individually.The problem is something else: Mixing two color temperatures will not result in a color temperature in between, but in a color that is not on the white line, because the white line is a curve in the CIE1931 diagram of visible colors (especially curved for low color temperatures), while the mixed color will be on a straight line between the two white points. That's why I choose 3 different LEDs.I could easily verify that with a cheap video light I borrowed, that has adjustable color temperature between 1800K and 6500K: Color temperatures in between (for example 3000K) doesn't look right, I pointed it to a white wall and I couldn't adjust it to have the same color as a 3000K halogen light (or a 3000K LED with CRI90).

author: Zero999
author_rank: Super Contributor
timestamp: April 21, 2023, 11:48:31 am
content: Quote from: stefan_o on April 21, 2023, 11:00:11 amOh I see, but the question I have is : does it really matter? How critical is it? I'm currenrly sitting in a lab, illuminated with LEDs and daylight and the fact the sum of the colours doesn't correlate with any colour temperature doesn't bother me at all. I can hardly notice it.What about using additional violet and deep red LEDs? As mentioned, many LEDs lack red, but they also lack violet, which causes some materials to fluoresce, giving whiter, whites.

author: coppice
author_rank: Super Contributor
timestamp: April 21, 2023, 12:50:08 pm
content: Quote from: Zero999 on April 21, 2023, 11:48:31 amThere is nothing magical about our perception of a black body curve. What messes up our perception is narrowish holes in the illumination spectrum when illuminating narrow band reflectors that only reflect at the missing, or weak, frequencies. Stand in most continuous light spectra and our eyes quickly white balance away any broad spectral tilts.

author: stefan_o
author_rank: Regular Contributor
timestamp: April 22, 2023, 07:17:21 pm
content: Quote from: Zero999 on April 21, 2023, 11:48:31 amWell, it personally bothers me when the light sources don't match. That's my personal preference and I know many people don't care at all. About adding violet/red LED (in case that was a serious suggestion): Controlling them to achieve a nice white would be a nightmare and even for my picky taste a bit overkill.Quote from: coppice on April 21, 2023, 12:50:08 pmIn my opinion the white from the video light just didn't look "white". The 1800K is so far down in the curve, that a mix will have a violet tint. You would probably adjust to that, but other light sources will look odd in comparison.Any remarks/notes to my circuit/pcb design?

author: orwa84
author_rank: Newbie
timestamp: January 30, 2024, 09:22:29 pm
content: Hello Stefan!I am very interested in this thread and I would like to ask you if you ended up fabricating the circuit, and if there are any lessons you learnt from doing so.I am planning on doing something very similar, and I discovered the HV9910C chip which I intend to use. It is cheaper than the chip you are using. The documentation is great but it lacks any information on the size of the inductor expected to be needed, unlike the more expensive chip, HV9911, which you are using.These are the high-CRI medium-power LEDs I intend on using:https://www.digikey.de/en/products/detail/bridgelux/BXEN-57S-13H-9C-00-0-0/11203648They have a CRI of 95+ and a power of 0.9W (100mA at 9.1V). They are comprised of 3 LEDs in series.Just like you, I immediately discovered that driving these LEDs would be far from strait-forward and economical. I went through similar paths of investigation, first thinking of using an off-the-shelf constant-voltage power supply, with some means of balancing the LED strings. Then to using separate power supplies for each one of the strings. Expensive!Eventually, I realised that the smartest thing is do would be to build my own AC-DC mini-supply for each one of the LED strings using an open-loop, buck-type converter directly from rectified mains voltage.So I went on DigiKey and set my filters to non-linear LED drivers that accepted high DC or mains AC voltage. Then sorted by price. This is when I encountered the HV9910C chip. The documentation was really appealing and easy to understand.Now looking at the documentation of the HV9911 chip, I am realising that I must slow down before buying a large number of these chips to drive 240 LEDs.Hence please do update me on how your project went and if you feel like it, I would love to see the final circuit and any feedback you may have for me from your experiments.Very exciting work. Thank you @stefan_o!Cheers from Aachen.Orwa.

author: stefan_o
author_rank: Regular Contributor
timestamp: January 30, 2024, 10:02:21 pm
content: I have build one board so far and it works, but some other stuff happened so I didn't had time to finish it (it takes quite some time to assemble). I also still wait for the 5 GHz ESP32 to be available to have WiFi control over the color temperature.

author: rteodor
author_rank: Frequent Contributor
timestamp: January 31, 2024, 08:54:24 am
content: I watched this thread for some time now and I am trying to understand your schematics from reply post #34. May I ask you the following:1. Why not power HV9961 chip from VDC ? It can take up to 450V. Does it have something to do with driving the MOSFET gate ?2. There seems to be a schematic error: J2,J3 and J4 have pin 5 to GND but driver boards have pin 5 to +10V3. What signal do you use for dimming ? It is confusing because it looks like you use Q1 and U1 on driver board as PWM filter ... but then there is C1 straight at the main board input. That could not be PWM unless I am missing something.It also looks like some components could be on the main board instead of being tripled on every driver board. At least Q1 I think.4. Are you satisfied with the lower dimming range ? I have built one dimmer with this chip (for 24V) but the analog lower threshold of 150mV leaves a lot of room for dimming there.

author: orwa84
author_rank: Newbie
timestamp: February 01, 2024, 10:31:33 pm
content: Thank you @rteodor! I actually have the very same questions! I also spotted what seemed to be an error in the interface pins (point 2).