Happy Thanksgiving! Adafruit is open and taking orders, all orders will ship starting Friday November 28th!

August 26, 2010 AT 2:10 pm

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.


Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!



5 Comments

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

  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.

  3. certainly between 12-20 breaths per minute

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

  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

Sorry, the comment form is closed at this time.