Author Topic: Turning an LED Strip On and Off with Arduino with Microsecond Precision  (Read 1953 times)

0 Members and 1 Guest are viewing this topic.

Offline christopher_gabaldonTopic starter

  • Newbie
  • Posts: 4
  • Country: ar
Hi! I need help with a project that involves turning an LED strip on and off, which was originally part of the backlight of an LCD monitor. The goal is to control the pulse duration (square wave signals) with an Arduino. We tried using a voltage source with a MOSFET and a MOSFET driver, where the gate was connected to the Arduino, but we only achieved switching times in the millisecond range. What we’re aiming for are fall/rise times below 1 microsecond. We’re considering building a current source since we need to control at least 30 LEDs, as it’s for a monitor backlight. We don’t have much experience in electronics as we’re physics students. We’d appreciate any advice on how to approach the design of the current source.
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2923
  • Country: us
  • Not An Expert
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #1 on: August 25, 2024, 08:25:14 pm »
Thoughts:

Use an LED driver chip.  Don't make your own circuit.  Lots of solutions for 1/many LEDs, constant current, linear/switching, etc: https://www.digikey.com/en/products/filter/led-drivers/745?s=N4IgTCBcDaIDYFMAmACJAnAlgNwekAugL5A

If you are getting ms delays you are probably running into Arduino high level code overhead.  Tighten up your code, go lower level (register toggles), or ditch arduino and go straight to the chip SDK (avr or whatever).

You should be able to find many examples of app notes/projects that switch LEDs (for a backlight).  Go copy something that someone else already got working.

Good luck!
« Last Edit: August 25, 2024, 10:24:11 pm by Smokey »
 
The following users thanked this post: christopher_gabaldon

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6266
  • Country: es
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #2 on: August 25, 2024, 09:30:09 pm »
You might actually be able to turn the leds with microsecond speed, but the emitted light won't, phosphor on white leds has some persistence and won't stop glowing instantly.
« Last Edit: August 25, 2024, 09:32:11 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: Overspeed, christopher_gabaldon

Online pardo-bsso

  • Regular Contributor
  • *
  • Posts: 222
  • Country: ar
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #3 on: August 25, 2024, 09:43:39 pm »
As others said here, even if you can switch them on-off that fast the response of the phosphors is still quite slow.

How did you arrive at that speed?
 
The following users thanked this post: christopher_gabaldon

Online Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #4 on: August 25, 2024, 11:28:20 pm »
Who said they are white LEDs? It might be a green LCD.
But the phosphor issue is a bit of a killer if it's white LEDs.
Controlling LEDs in the sub-us range is certainly possible, but not easy.

We need to know what the objective is here.
 
The following users thanked this post: christopher_gabaldon

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4991
  • Country: au
    • send complaints here
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #5 on: August 26, 2024, 01:13:39 am »
Have any of you tried measuring phosphor response? microsecond is feasible and not out by orders of magnitude
 
The following users thanked this post: christopher_gabaldon

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6266
  • Country: es
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #6 on: August 26, 2024, 01:22:48 am »
It might be a green LCD.
So where have you seen a green LCD monitor?
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: christopher_gabaldon

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4991
  • Country: au
    • send complaints here
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #7 on: August 26, 2024, 02:37:51 am »
It might be a green LCD.
So where have you seen a green LCD monitor?
RGB backlight
 
The following users thanked this post: christopher_gabaldon

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3891
  • Country: nl
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #8 on: August 26, 2024, 06:42:59 am »
I assume here that the "microsecond" stuff is mainly intended to manage heat loss in the FET. Switching a MOSfet from a microcontroller is going to be slow, because the uC pin can only deliver a low current and therefore charges the gate capacitance of the fet "slowly".

For DIY experiments an NE555 is a decent FET driver. It can deliver 200mAdc on it's output (Don't know peak current), and it can also boost the voltage. But real mosfet driver IC's are better. Some can deliver peak currents of several amperes.

If you just want to control the amount of light coming out of the LED's, then a dedicated LED driver IC is probably a better Idea. These exist both in buck and in boost variants and are readily available and cheap.
 
The following users thanked this post: christopher_gabaldon

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: de
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #9 on: August 26, 2024, 08:09:10 am »
As others said here, even if you can switch them on-off that fast the response of the phosphors is still quite slow.

How did you arrive at that speed?
A typical decay time of YAG-phosphors as used it white LEDs is around 50ns. That´s indeed quite fast.
 
The following users thanked this post: pardo-bsso, tooki, christopher_gabaldon


Online Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #11 on: August 26, 2024, 11:08:20 am »
It might be a green LCD.
So where have you seen a green LCD monitor?

With 30 LEDs, I'd expect a dot-matrix display, not a monitor. And I've seen plenty of those in green.
 

Online ArdWar

  • Frequent Contributor
  • **
  • Posts: 718
  • Country: sc
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #12 on: August 26, 2024, 11:27:33 am »
We really need to take a look at your previous attempt to offer any meaningful advice. Schematics, parts, input signal waveforms, observed waveform/performance (if applicable), etc. It appears there are something that slows down your output. A linear modulated sources should give you much finer control than milliseconds for sure. High dynamic range LED drivers routinely control in microseconds.

All else fails, you can even use LED laser driver that can drive sub-nanoseconds.
 
The following users thanked this post: christopher_gabaldon

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19990
  • Country: gb
  • 0999
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #13 on: August 26, 2024, 12:33:59 pm »
As others said here, even if you can switch them on-off that fast the response of the phosphors is still quite slow.

How did you arrive at that speed?
A typical decay time of YAG-phosphors as used it white LEDs is around 50ns. That´s indeed quite fast.
The experiments I conducted awhile ago, show phosphor LEDs to much slower than that.
https://www.eevblog.com/forum/chat/20w-halogen-bulb-viewed-by-a-photodiode/msg2388798/#msg2388798
 
The following users thanked this post: christopher_gabaldon

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: de
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #14 on: August 26, 2024, 01:01:49 pm »
The only LED phosphors I know that are in the microsecond-range are red ones. So it´s easily possible that the phosphor converted amber LED of the linked thread is somehow slower.

But with own experiments I´ve never managed to see a delay of the usual yellow cerium doped YAG phosphor that delivers by far the largest contribution to the spectrum of usual white LEDs. Maybe some strongly warm white devices may differ.

A while ago I wired up a Hamamatsu S10942-01CT photodiode for a similar purpose. It has a typical rise time of 0.1us and we couldn't see any difference in the blue and green channel when we were analysing white LEDs. If the phosphor would have a significant delay, then the green channel (mainly affected by converted light) should show some "latency" compared to the blue channel (coming directly from the LED emitter).

If there is interest and I find the S10942-01CT anywhere I can upload a few measurements of different LEDs.
 
The following users thanked this post: christopher_gabaldon

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19990
  • Country: gb
  • 0999
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #15 on: August 26, 2024, 03:54:10 pm »
Red LEDs are normally not phosphor converted, unless they're designed to be used in parallel with blue or violet ones, so the forward voltage is the same.

I didn't test any cool white LEDs, only warm white LEDs. I wonder if they're LEDs with a mixture of phosphors for higher colour rendering index?
 

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: de
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #16 on: August 26, 2024, 05:05:24 pm »
Many new red LEDs are phosphor converted - even if they look very normal.

I got a batch of red 3mm LEDs that have a suspiciously high forward voltage around 2.8V. I first really wondered if they have some kind of defect, but then I shined with a UV-flashlight on them and they started fluorescing. They clearly are phosphor converted, even if they look completely normal.

Many red high power LEDs are also phosphor converted because direct emitting red LEDs get very inefficient with higher temperatures. If you need a red LED that is still powerful at an ambient temperature of >80°C, like in a video beamer optical engine or potentially in the brake light of a car, then it can be more efficient to use phosphor converted red, although it needs more voltage.

And yes, the white LEDs with "classical" cerium doped YAG phosphor indeed have a catastrophic CRI because they principally just mix yellow with blue light. To get a better CRI you also mix gadolinium dopant into the YAG which just broadens the yellow emission into longer wavelengths. I suppose that doesn't influence the decay time. If you want even better CRI, you really mix different phosphor types with different emission maxima.

two 3mm LEDs in daylight:
2351505-0

the same LEDs in UV-light:
2351509-1

the same LEDs in operation:
2351513-2
 
The following users thanked this post: Zero999, tooki, globoy

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19990
  • Country: gb
  • 0999
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #17 on: August 26, 2024, 09:26:39 pm »
Where did you get those phosphor converted red LEDs from?

I'm interested in getting some, but yellow, rather than red. The only PC yellow ones I've seen are SMT. The through hole ones tend to be inefficient GaAsP.
 

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: de
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #18 on: August 27, 2024, 06:40:01 am »
Unfortunately from the most unreputable and non-traceable source I know: These 3 parts for 2€ each deals at aliexpress  (I think it was a box of 500 3mm LEDs for 2€) |O

For yellow you can find three types on the market, without necessarily being exhaustive:
- The old-style GaAsP: They are really quite dim. GaAsP has only a small ratio of direct recombination in the semiconductor crystal - so it can't be efficient
- The newer style AlInGaP: AFAIK they are most efficient in lm/W for yellow
- The phosphor converted ones: They are again more efficient at higher temperatures, as the red LEDs.

You can get AlInGaP as well as phosphor converted ones with crazy intensities and good efficiencies from the automotive portfolios of the major suppliers. But for sure not as through-hole 3mm types  ::)
 

Offline christopher_gabaldonTopic starter

  • Newbie
  • Posts: 4
  • Country: ar
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #19 on: August 27, 2024, 03:32:03 pm »
We use a phototransistor to verifie that times, so you think that if we use another type of LED we could achieve the sub us range, although using a supply voltage instead of a current suply? We where using the strip carried in the original LCD monitor . I upload an image of that strip.

Thanks!
 

Offline christopher_gabaldonTopic starter

  • Newbie
  • Posts: 4
  • Country: ar
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #20 on: August 27, 2024, 03:37:51 pm »
Thanks for the quick response.

the LEDs are white. I upload an image of the strip we are using. Do you know how could we find out the material of this strip? i think its a generic one.

On the other hand, do you think that employing another type of LED we could achieve the us range altought using a  supply voltage power?

Thanks again
 

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: de
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #21 on: August 27, 2024, 04:09:06 pm »
The problem is that the LED-stripes of the LCD screens are usually not intended for pulse operation.

It should be quite easy to switch it on and off with an arduino output controlling a mosfet. You could use a standard N-channel mosfet specified for a few amperes. Connect it´s gate with a small resistor to the arduino IO pin, connect the source to GND and the drain to the kathode of the LED-stripe.

Then use a laboratory power supply, connect it´s negative output to GND and it´s positive output with a power resistor to the anode of the LED-stripe. Resistor value needs to be (V_powersupply - V_LED)/I_LED . The difference between V_powersupply and V_LED should at least be 25% of the LED voltage. For fast switching applications the current limiting resistor is much easier and more reliable than other types of current regulation.

The problem here will be the LED current I_LED. The single LEDs in such a stripe won't be specified for much more than 350mA. Driving them out-of-spec with e.g. 1A may be possible - though it means you are constantly risking acute failure.

But with 1A very short pulses won't produce a decent brightness. Can you tell more about the desired pulse length, repetition rate and the required brightness?
 

Offline christopher_gabaldonTopic starter

  • Newbie
  • Posts: 4
  • Country: ar
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #22 on: August 28, 2024, 07:42:24 pm »
The problem is that the LED-stripes of the LCD screens are usually not intended for pulse operation.

It should be quite easy to switch it on and off with an arduino output controlling a mosfet. You could use a standard N-channel mosfet specified for a few amperes. Connect it´s gate with a small resistor to the arduino IO pin, connect the source to GND and the drain to the kathode of the LED-stripe.

Then use a laboratory power supply, connect it´s negative output to GND and it´s positive output with a power resistor to the anode of the LED-stripe. Resistor value needs to be (V_powersupply - V_LED)/I_LED . The difference between V_powersupply and V_LED should at least be 25% of the LED voltage. For fast switching applications the current limiting resistor is much easier and more reliable than other types of current regulation.

The problem here will be the LED current I_LED. The single LEDs in such a stripe won't be specified for much more than 350mA. Driving them out-of-spec with e.g. 1A may be possible - though it means you are constantly risking acute failure.

But with 1A very short pulses won't produce a decent brightness. Can you tell more about the desired pulse length, repetition rate and the required brightness?

Yes, indeed, we did what you mentioned, and we also used a driver to control the MOSFET. However, with our photodiode connected to the oscilloscope, we observed a t-fall of approximately 3ms. What we aim to do is project images in short times; practically speaking, the LED strip would need to be on for T seconds, in a sub-millisecond regime. Our problem was that the t-fall and t-rise were on the order of the pulse duration. We are aiming for t-rise and t-fall times on the order of 1 microsecond or less. In fact, we are also considering building a custom LED strip from scratch for these purposes, with approximately 35 LEDs that can achieve these times. Regarding illumination, it should be around 200 cd/m² (typical for an LCD monitor).

Thanks for your help!!
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: lt
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #23 on: August 28, 2024, 08:31:40 pm »
However, with our photodiode connected to the oscilloscope, we observed a t-fall of approximately 3ms.

What amplifier you used for the photodiode? My point is that if you don't have characterization of your measurement equipment, you can't move forward. If you are physics students, maybe you could ask for help in lasers lab. They should be able to test rise and fall times of your photodiode and amplifier. Ideally your measurement setup should have rise and fall of 100ns or so. When you are absolutely sure, that you can really measure such fast transitions (it's not trivial, really), proceed testing various LEDs and drivers.
 

Online tooki

  • Super Contributor
  • ***
  • Posts: 12730
  • Country: ch
Re: Turning an LED Strip On and Off with Arduino with Microsecond Precision
« Reply #24 on: August 28, 2024, 10:09:51 pm »
Many red high power LEDs are also phosphor converted because direct emitting red LEDs get very inefficient with higher temperatures. If you need a red LED that is still powerful at an ambient temperature of >80°C, like in a video beamer optical engine or potentially in the brake light of a car, then it can be more efficient to use phosphor converted red, although it needs more voltage.
Thanks for the pictures of the red LED. I’m kinda flabbergasted that they bother doing that!

As for powerful red LEDs: I have a little project at work that I need to resume, using 150W LEDs that are not phosphor-converted! They’re apparently intended for video projection*. As you might imagine, they require robust cooling.

When testing with the smaller 50W version, I forgot to remove the Kapton protective film before powering it up (at below the 50W maximum in fact), and within a few seconds, it simply vaporized the Kapton that was touching the die. 😂 And yes, with a heatsink attached.

(OSRAM P3MQ, for anyone who is curious. The updated versions they sell now are slightly lower power, as they managed to improve them to give the same light output at lower voltage.)




*FYI, in English, the word “beamer” is completely unknown for video projectors. Native speakers do not know what it means, other than guessing from context!
 
The following users thanked this post: Phil1977


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf