5 ms·
Hmm why can't you construct the signal amplitude from webcam image? You don't have to capture it as digital signal...
by atamyrat 15y ago
Hmm why can't you construct the signal amplitude from webcam image? You don't have to capture it as digital signal...
- comex 15y agoYeah, it's not necessarily to perfectly reconstruct the LED's signal, only the average amplitude over a relatively long period of time. Like, just sample the color of a certain pixel on each frame.
- joezydeco 15y agoIf the LED being used has a perfectly linear current-to-brightness curve then sure, it's possible. Most high-brightness LEDs, however, do not.
- tesseract 15y agoBut you could just map the current-to-brightness curve of your own LED and reconstruct the necessary PWM signal using that. Actually that'd be a good way to go anyway, since that curve may differ from the one on Apple's LED.
- djahng 15y agoGenerating a PWM signal based on a particular LED's characteristics is similar to designing the gain of an amplifier circuit around a particular BJT's beta. It's just not done. That's also the whole reason behind controlling LED brightness through PWM. By PWMing the drive current, you can ensure that the LED is being driven far into its conducting region, and therefore not relying on controlling dimness by varying current around the LED's "knee" (which literally is different for just about every LED in existence, even same part numbers). This way you also avoid other stuff like wavelength shifts that tend to occur near the knee.