5

If I took a regular LED that is either on or off, the brightness of which can be controlled by the amount of voltage it's getting, then at half power I could in theory get a 3rd "shade" which could be used to make some cool effects.

Is there a white LED that looks black when turned off, blinding white when on, and gray when supplied with a small voltage? I am trying to make a "grayscale" LED matrix by the way.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
Chadley123
  • 169
  • 1
  • 7
  • 9
    LEDs are non-linear to voltage, so getting a desired brightness from voltage is difficult. Current would be better, but is harder to control. PWM is the way to go, see user1850479's answer. – Mattman944 Sep 21 '22 at 23:22
  • 5
    There's much to say as humans are complicated beasts. Perceptions are complicated enough, let alone bringing in grays or browns, where these perceptions are doubly so a matter of what's nearby surrounding them. You cannot decide a pixel is 'gray' without nearby context. And it's all non-linear. Worse, different 'RGB' LEDs don't even fill out the same portions of the 3D color space [(there's more than one of those, too.)](https://wwweic.eri.u-tokyo.ac.jp/computer/manual/eic2015/doc/intel/en_US/ipp/ipp_manual/GUID-AE698C04-81DB-402B-88E7-2BEED820D4DF.htm) May need more than PWM alone. Enjoy. ;) – jonk Sep 21 '22 at 23:48
  • 1
    What I'm thinking is that you need some diffusor in front of the LEDs that seems black/dark when not backlit, but letting most/all light from the backside through. I got a hunch that you could do something like that with polarizer foils or half-mirror foil ("spy mirror foil"), maybe in conjunction with opalized acrylic glass ... but I never tried that. – orithena Sep 22 '22 at 11:46
  • 2
    Gray only looks gray when you have something white next to it, otherwise any kind of gray looks like white with a lower brightness. – Dmitry Grigoryev Sep 22 '22 at 18:17
  • Despite of "white LEDs" being actually blue ones, you should make an experiment where you linearly raise the voltage while recording the result with a spectral-photometer (like [ArgyllPro](http://www.argyllcms.com/pro/index.html)) that decodes the color temperature. Then when you look at the graph showing input voltage and output brightness, as well as the color temperature, you can guess how easy or impossible it is to get what you desire. – U. Windl Sep 23 '22 at 06:39

6 Answers6

14

Grey is white at a lower brightness, so all white LEDs produce grey when put next to a brighter white LED.

The most common way to produce different shades from LEDs is to use PWM. Nearly all addressable rgb or rgbw LEDs use this method to produce different colors.

user1850479
  • 14,842
  • 1
  • 21
  • 43
  • 18
    That part about _**"when put next to a brighter white LED"**_ is an important part here. Even the weakest white LED will still look white to the human eye _in isolation_. – pipe Sep 22 '22 at 08:52
  • 5
    yeah, there is no grey colour - it's just how your brain interprets dim white next to bright white. Fun thought (or actual) experiment: Look at a projector shining at a white wall. What colour is the wall? What colour are the white parts of the picture? What colour are the black parts of the picture? Why are the grey pixels *brighter* than the white wall, even though white is brighter than grey? How does that make any sense? – user253751 Sep 22 '22 at 14:51
  • Note that controlling LED brightness using PWM is patented. So beware, you may get into legal trouble (yes, I know it's stupid but it's true). Here's the patent: https://patents.google.com/patent/US9192007B2/en – slebetman Sep 23 '22 at 04:20
  • 1
    Hopefully that patent does not cover encoding bits over fibre optics ;-) Any bit pattern transmitted by a LED can be seen as PWM to some extent... And isn't the classic dimmer also using PWM? – U. Windl Sep 23 '22 at 06:49
  • @slebetman if they were to come after someone, wouldn't showing that there is previous art invalidate the whole patent? (I have no idea about patents). – Davidmh Sep 23 '22 at 14:34
  • @Davidmh I'm not a lawyer, but having been paranoid about my own stuff getting patented out from under me, I've looked into this sort of thing. There is supposed to be a review by an official expert to see if this thing is already in widespread use or would be obvious to another expert, etc. But because they're stuck in an office reviewing mostly ridiculous claims, they really don't know a whole lot. So stuff like this still gets through. – AaronD Sep 23 '22 at 21:40
  • A lawsuit would straighten it out in no time, by showing prior art EVERYWHERE, even before the application in 2013, and invalidating the patent because it never should have been granted in the first place. But there's still the cost of the suit. – AaronD Sep 23 '22 at 21:40
  • Also, the official inventor and assignee are Chinese, if that means anything. They're not known for Western reasonability or legality, more for immediate profit in whatever way works. (My church had a hymn-sing a few years ago - all public-domain and all performed by the church - that I tossed up on the church's YouTube channel, and one of the more well-known classics got flagged by someone with Chinese characters for a name...) – AaronD Sep 23 '22 at 21:41
  • 1
    @AaronD There have been several lawsuits related to PWM dimming of LED and all have resulted in wins for the patent holder. Apple was at one point sued for this for using LED backlight for their laptops (instead of CFL) and making the backlight brightness controllable. But as noted by another commenter the patents (yes, there are multiple patents related to this, not just one) are fairly narrow like generating the PWM from an input voltage, generating the PWM from another PWM signal, generating the PWM from AC dimmer input etc. All related to LED dimming. Just be careful or have a good lawyer – slebetman Sep 24 '22 at 06:32
11

Is there a grayscale LED

If you have a clear LED and put a black background behind it it will look black when off and in-between when partly lit. If you have a diffuse LED and paint the base and sides black that also works.

Voltage:

Controlling brightness with current works better, but if you have a large enough series resistor on the LED voltage will work fairly well.

PWM is also an option.

JRE
  • 67,678
  • 8
  • 104
  • 179
  • 2
    Note that controlling LED brightness by PWM is patented. Yes, I know it's stupid because it's so obvious and in fact I've been doing it in college courses way back in the late 90s before the patent date (2013) but there is a patent. So beware if you want to use the most obvious/simplest technique for controlling LED brightness. Here's the patent: https://patents.google.com/patent/US9192007B2/en – slebetman Sep 23 '22 at 04:19
  • 1
    @slebetman I highly doubt that the patent you reference would actually be valid if challenged, since (as you mention) it's so obvious and there is plenty of prior art. However, it's good to raise awareness of potential patent/legal issues – camerondm9 Sep 23 '22 at 15:10
  • 4
    @slebetman That's a patent on a specific implementation of *receiving* a PWM signal (synchronous with some clock, which you also receive), figuring out what duty cycle it represents, and using that to steer a current driver that powers some LEDs. It doesn't cover the general case of PWMing a LED. The everyday thing that people are suggesting here isn't in scope of that patent. – hobbs Sep 23 '22 at 16:57
  • @slebetman That would not survive prior art, it is sad that the USPO did not do diligence. – copper.hat Sep 23 '22 at 18:34
  • 1
    @copper.hat I have bad news for you. It has already been challenged for prior art but it was awarded anyway. It's been 7 years since the patent was granted. It's also not just one patent. There are several related patents regarding using PWM to dim LEDs. One of the patent holders is Phillips. There have been several court cases and all have upheld the patents. Apple was one of those who got sued for using LED backlight for their laptops - they were sued for the circuit that control the brightness of the display. – slebetman Sep 24 '22 at 04:38
  • @slebetman That is a sad state of affairs. – copper.hat Sep 24 '22 at 06:12
  • 1
    @copper.hat As hobbs mentioned. The patents are fairly specific: controlling PWM dimmer with PWM, controlling PWM dimmer with voltage, controlling PWM dimmer with AC dimmer (I think this was the Phillips patent) etc. I think if you are controlling the LED directly from software on your microcontroller you should be OK but I'm not a lawyer. The point is you should check the patents or have a good lawyer if you're using PWM to control your LED – slebetman Sep 24 '22 at 06:28
3

LEDs have linear luminance with current, so you can control them with analog voltage. Or PWM but depending on what frequency it might just look flickering. Also note that human eyes are non-linear devices so you need a logarithmic drive curve for the LED for the eyes to perceive linear brightness curve.

Justme
  • 127,425
  • 3
  • 97
  • 261
3

I've played with this a bit (mainly with a red LED) as a single status indicator with multiple states.

It's worth giving it a try with an Arduino, because that gives you PWM very easily and it can drive reasonable LEDs directly off GPIO pins (up to 40mA from one pin). You can put the LED in a box with a lid made of smoke colour (dark grey) polycarbonate or acrylic sheet to get a blacker baseline, but you'll need more brightness than you would for a bare LED. You may be planning on using an Arduino anyway to drive the final matrix.

I found that 50% wasn't dim enough compared to 100% to be noticeably different given variable lighting conditions. 20% was far better. In the end I had one LED with flickering at 10Hz at 20% (ready), steady at 100% (active), steady at 20% (wait).* However in a matrix you might be able to use 50% as you'll have the contrast of 100% pixels to show which are dimmer, and could even go to more levels of grey. If you only want 2 brightness levels you could tune the drive voltage (or easier the series resistance with a fixed drive voltage) to achieve the contrast you want, but then you'd need 2 output pins per LED; with PWM you'd only need 1.

*This was with a big red LED built into a pushbutton, used to fire a single pulse from laser. The piezo-speaker playing pew-pew noises wasn't strictly necessary.

Chris H
  • 2,331
  • 11
  • 18
3

The brightness of LEDs is most often controlled with pulse-width modulation (PWM) because it is quite complex to build the efficient voltage or current regulator. If it is just a ballast resistor, it dissipates more power than the LED itself when less than half of the brightness is required. Not an idea at all if you dim to save the energy.

From the other side, the LEDs blink when using PWM, and in some applications (like using them for illuminating video captures done by digital camera) this is very undesirable.

As other questions already answered, otherwise this works.

h22
  • 881
  • 6
  • 14
  • As you can modulate any LED in GHz easily, the real question probably is: How does the human eye respond to very short light pulses? I also guess that most measurement equipment for lightness assumes a continuous "steady" light. – U. Windl Sep 23 '22 at 06:52
  • 1
    Not human eye. When we attempted to illuminate our bay with industrial LEDs while taking movies with digital camera, we got horrible stroboscopic effects. They flashing rate seems in the same range as the camera FPS. – h22 Sep 23 '22 at 06:59
  • 1
    Actually @U.Windl you can't modulate white LEDs that fast. The phosphor lifetime will start to be an issue at considerably lower frequencies. Nanosecond pulsing of single-colour LEDs is possible but if you want it to be reasonably bright you need specially designed drivers close to the emitters. Of course in this application you don't need clean edges to your waveform, but it's not as easy as you make out – Chris H Sep 23 '22 at 12:00
  • 1
    @h22 I've seen kHz PWM, and it's not the frame rate that matters but the (rolling electronic) shutter speed which can easily be in the millisecond range under bright light. I've also seen flicker at higher frequencies, possibly PSU switching frequencies. You can measure easily enough with an oscilloscope and photodiode – Chris H Sep 23 '22 at 12:03
  • 1
    And (@U.Windl) the human eye has an integration time of about 100ms (though flicker a bit faster than that can be detected). Even a low PWM frequency of 1kHz that can be annoying on cameras is far too fast to be seen by eye – Chris H Sep 23 '22 at 12:08
  • @ChrisH I read the question again: It does not mention any digital camera. And on the phosphor (that provides the yellow to make the blue LED appear white): Wouldn't the phosphor "integrate" the pulses? I mean: The PWM stuff was not to provide light pulses actually, but to leave the impression of varying intensity/lightness. So would the phosphor effect really matter? – U. Windl Sep 24 '22 at 20:47
  • @U.Windl the question doesn't mention cameras but the answer does. My main point though was that your "you can modulate any LED in GHZ easily" doesn't really hold - not any LED, and not easily. Averaging, whether from the phosphor or electronic means the LED isn't really modulated even if the PWM frequency is that fast. Think of the dI/dt you need to get GHz frequencies with tens to hundred of mA – Chris H Sep 24 '22 at 21:09
  • @ChrisH I remembered to have read that in a book dated in the 80ies with the title "Dioden und Transistoren" (actually found a reference online at https://www.ebay-kleinanzeigen.de/s-anzeige/dioden-und-transistoren-j-g-lehmann-isbn-3-8023-0025-4/1175660067-77-1455). Maybe I mis-remembered and the text said MHz, not GHz (at the time the book was written fast CPUs had less than 8 MHz). – U. Windl Sep 24 '22 at 21:27
0

Using different brightnesses certainly works, and "greyscale" LED walls have been used to great effect in a number of places; perhaps the biggest is the BMW Museum in Munich, which (from memory) is something like 10 mm pitch behind white diffuser. You can see from the picture below the wall is enormous compared to the cars.

Image from Dezeen

enter image description here

jonathanjo
  • 12,049
  • 3
  • 27
  • 60