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:

[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!

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

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 11/15/2024 Featuring Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board! (Video)

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

Adafruit IoT Monthly — The 2024 Recap Issue!

Maker Business – Adafruit Daily — Apple to build another chip at TSMC Arizona

Electronics – Adafruit Daily — SMT Tip – Stop moving around!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !


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.