Reverse engineering the Mac ‘breathing’ LED

Repost from 2006!


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:

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)

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.

Filed under: announce — by adafruit, posted August 26, 2010 at 2:10 pm


Try Adafruit's new iPhone & iPad app for makers! Circuit Playground! "Incredibly handy for anyone working in electronics. Perfect for engineers and non-engineers alike."
Looking for engineers, makers and the builders of dreams? Try our Adafruit job boards.
Join our weekly Adafruit SHOW-AND-TELL at 9:30pm ET every Saturday night! Then at 10pm, ASK-AN-ENGINEER with Ladyada and the Adafruit team!

5 Comments

  1. Could it just be abs(sin(w*t)) ?

    Comment by Rich — August 26, 2010 @ 2:56 pm

  2. 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.

    Comment by macegr — August 26, 2010 @ 3:06 pm

  3. certainly between 12-20 breaths per minute

    Comment by chris tighe — August 26, 2010 @ 3:35 pm

  4. Funny that it’s patented. I wonder if that’s why my Dell has such an un-natural, ugly pattern.

    Comment by Hal — August 26, 2010 @ 4:08 pm

  5. 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

    Comment by Adam Shea — August 26, 2010 @ 5:21 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

www.flickr.com
adafruit's items Go to adafruit's photostream
www.flickr.com
items in Adafruits More in Adafruits pool