For the Duel nature sculpure, I wanted to have a ‘breathing’ pattern where all the LEDs vary in brightness in a natural/organic way. A good example is the ‘sleep indicator’ LED on recent Macs/Powerbooks. (There’s even a patent!) The problem is that, while the patent claims its a simple sinusoid (see the patent for the image), programming in a sinusoid doesn’t look nearly as good. So I decided to get the real waveform with a kludgy reverse engineering attempt:
[flickr 212611715 ]I used a MIDIsense instead of a simple voltage divider because I want to extract the absolute LED brightness pattern and a photocell voltage divider acts ‘inversely’ (well, 1/R) instead of linearly (ie, just R). (The MIDIsense has an opamp to linearize the resistive sensor output)
[flickr 212611654 ]
There it is! There is a bit of ‘noise’ on the peaks because I’m picking up some of the PWM artifacts through the diffused white plastic.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!
Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi
EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey
I would just go for the actual LED driving signal since that would be more useful for replicating the effect. LED brightness doesn’t correspond linearly to driving current. Also, diffusion material would never smooth or deteriorate the PWM signal. Phosphor, such as used in white LEDs, might smooth it a little.
Could it just be abs(sin(w*t)) ?
I would just go for the actual LED driving signal since that would be more useful for replicating the effect. LED brightness doesn’t correspond linearly to driving current. Also, diffusion material would never smooth or deteriorate the PWM signal. Phosphor, such as used in white LEDs, might smooth it a little.
certainly between 12-20 breaths per minute
Funny that it’s patented. I wonder if that’s why my Dell has such an un-natural, ugly pattern.
It’s probably exp(sin(t)) to correct for the logarithmic response of the rest of the optical system (LED->eye->brain).
http://www.wolframalpha.com/input/?i=plot+exp%28sin%28x%29%29