this post was submitted on 01 Apr 2024
28 points (74.1% liked)

Showerthoughts

29723 readers
608 users here now

A "Showerthought" is a simple term used to describe the thoughts that pop into your head while you're doing everyday things like taking a shower, driving, or just daydreaming. A showerthought should offer a unique perspective on an ordinary part of life.

Rules

  1. All posts must be showerthoughts
  2. The entire showerthought must be in the title
  3. Avoid politics
    1. NEW RULE as of 5 Nov 2024, trying it out
    2. Political posts often end up being circle jerks (not offering unique perspective) or enflaming (too much work for mods).
    3. Try c/politicaldiscussion, volunteer as a mod here, or start your own community.
  4. Posts must be original/unique
  5. Adhere to Lemmy's Code of Conduct-----

founded 1 year ago
MODERATORS
 

Ok so I got this idea not while showering, but because I'm very high. The story does come from my bathroom though! I have a night light in my bathroom, and I was looking at the night light as I turned off the bathroom light. I'm a big nerd so I remembered that the things that detect light levels are actually diodes wired in reverse. I thought it would be funny to make it flicker by reflecting the light back on the diode, but it didn't work. That's when I had this realization

all 19 comments
sorted by: hot top controversial new old
[–] Chozo@fedia.io 23 points 7 months ago

Modern night lights won't have this happen, as they have a built-in "buffer" to prevent rapid on/off cycles like that.

But I do remember having an old night light when I was younger, probably from the late 80s, that you could make flicker by putting your hand in front of the bulb so that the light reflects back onto the sensor, effectively turning it into a very fast Useless Machine.

[–] themeatbridge@lemmy.world 22 points 7 months ago (1 children)

Constant voltage LEDs use something called Pulse Width Modulation, or PWM, to simulate dimmed lights. That's basically what you're describing.

[–] rockSlayer@lemmy.world 7 points 7 months ago (1 children)

I knew that dimmable LEDs exist now, but I didn't know why they worked. Cool!

[–] SzethFriendOfNimi@lemmy.world 1 points 7 months ago (2 children)

Like some motors they operate best at a certain duty cycle.

The issue with some really cheap ones is that it’s obvious.

It’s also why, if you’re so inclined at Christmas time, led string lights on trees are hard to photograph since you’ll catch some of them on while others are off at the time of the photo.

[–] MentalEdge@sopuli.xyz 6 points 7 months ago* (last edited 7 months ago) (1 children)

Duty cycle does not refer to the frequency of the flicker.

The frequency on a PWM light doesn't change, it's the same for the full range of control. What that frequency is, is determined by the controller generating the PWM signal, not the light.

PWM can be done at different frequencies. Cheap PWM controllers can only manage lower frequencies, those are the kind you notice and have trouble with in pictures. Good ones will run at frequencies so high, the fact they aren't actually on continuously, will only matter in extremely high speed photography.

This is because a PWM controller can achieve the same reduction in brightness at any frequency. What matters is the fraction of time that the LED is lit each pulse. If you run the system at 1000Hz, half brightness means the flicker is 1000Hz, because you are sending 1000 pulses that are 0.5 milliseconds long. 75% brightness would mean the pulses are 0.75 milliseconds, but the number of pulses, and thus the frequency, is still 1000Hz. The flicker is the same.

Even at 99% brightness/duty cycle, a PWM light is still blinking at whatever frequency the controller is running at. Only at 100% does it not flicker, as 100% duty cycle means the controller simply keeps the light on continuously.

No matter what LED you use, they don't usually care what the frequency is, nor what duty cycle you are at.

I'm not sure what you mean by motors running best at a given duty cycle, either. Sure, there is an efficiency peak, but the whole point of PWM is to be able to run something at any duty cycle you desire (resulting in the desired brightness for lights, RPMs for motors).

[–] SzethFriendOfNimi@lemmy.world 1 points 7 months ago (1 children)

Thanks for clarifying. You’re right. It’s the duty cycle of the driver of the LED right?

And as for the motor analogy it is optimal efficiency which I thought did apply to led lifetime vs brightness output but I’m always open to be corrected.

Thanks for taking the time to break it all down for me.

[–] MentalEdge@sopuli.xyz 3 points 7 months ago* (last edited 7 months ago)

Heat does affect diode lifetime. So brightness/duty cycle certainly does affect how long it'll last, because more energy going through means higher temperatures.

But with any light/fixture that has sane heat dissipation, it's not worth worrying about. LEDs will last decades in most scenarios.

[–] fubbernuckin@lemmy.world 3 points 7 months ago

I hate the flickering Christmas lights. They give me headaches.

[–] fidodo@lemmy.world 13 points 7 months ago (2 children)

That's how all ac powered lights work because the current is constantly alternating.

[–] rockSlayer@lemmy.world 4 points 7 months ago (1 children)

I was going to protest this, but then I started looking into how ac is converted to dc and realized that it would be cheaper to just let the diodes run on ac.

oh shit, my stoned ass wasn't prepared for this

[–] MentalEdge@sopuli.xyz 4 points 7 months ago* (last edited 7 months ago)

Indeed, older bulbs work in both directions and the voltage fluctuation isn't visible in the light emitted, because the thermal mass of the filament smooths out the alternating current into a continuous glow.

But LEDs will flicker unless the AC is rectified and smoothed out. Cheap lights will just not come with the circuitry to do this, as you can just hook up the diode directly, the only drawback being it will only emit light some of time. 60Hz is slow enough that you will notice it, however. Especially with movement, it makes reality look like it's running at 60fps.

Even when rectified, unless a capacitor is added to the circuit, LEDs will flicker. AC merely rectified will still have the voltage hitting zero 60 times a second, otherwise.

[–] muntedcrocodile@lemm.ee 9 points 7 months ago

Bro juat reinvented pwm thats why lights can look weird when flashes are close to a factor of the framerate.

[–] OneLemmyMan@lemmy.world 3 points 7 months ago

ok but, are you high?

[–] Dkarma@lemmy.world 1 points 7 months ago (1 children)

You need to research how optical sensors actually work.

[–] rockSlayer@lemmy.world 6 points 7 months ago* (last edited 7 months ago)

From this source:

A phototransistor is a type of bipolar transistor in which the base-collector junction comes into light. This results in the same behavior of a photodiode

I'm high and I just wanted to post something low effort that I thought was funny. I know it's more complex than the way I described it.

Edit: also, diodes are directional. Saying that a photodiode is "a diode wired in reverse" should be the first sign that I know more than what I'm actually saying. All diodes are capable of reacting to light, a photodiode exploits and amplifies the principle.

[–] Norgur@kbin.social -1 points 7 months ago

Now take an LED light that has the exact opposite frequency to your local power grid and hold it onto the sensor. The night light won't know what hit it!