Light Bulbs & Lasers

May 9th, 2015 Comments Off on Light Bulbs & Lasers

“I used to be a light bulb, but now I’m a laser.”

I love this quote (spoken by Nicholas Negroponte, regarding his intense focus on the $100 laptop project). It helped inspire the development of Clara, a brain-sensing, environment-augmenting, focus-enhancing smart lamp I built with Marcelo Mejía Cobo and Belen Tenorio for our combined MFA Interaction Design / MFA Products of Design Smart Objects course at SVA this spring.


Clara is designed to help creative, easily-distractible folks find their way down the “ideation funnel.” It’s a lamp with an embedded speaker, and it responds to your brain waves to subtly adjust your environment. At first, the lamp emits a warm, comforting glow, conducive to idea generation and creativity. But as you start homing in on a specific idea, the light becomes crisper and cooler, and the volume of the ambient noise flowing from the embedded speaker slowly increases, enhancing your ability to concentrate and block out external distractions.

The best part is, it actually works!

We used the Neurosky MindWave Mobile, a Bluetooth EEG-reading headset, to wirelessly detect “attention” and mapped the lamp’s color temperature and speaker volume accordingly.


Clara uses the following components:

…and relies on the following Arduino libraries:

The Arduino code is available on Github.

XE2S3719Working with the EEG headset was tons of fun. I started out using a Mattel MindFlex, a 5- or 6-year-old toy which enabled the user to move a ball through an obstacle course using nothing but their power of concentration. Some ITP grads figured out how to do this a few years ago, and their blog post on the topic was invaluable. They even put together a Processing sketch that allows you to visualize your brain waves in 1-second intervals as they’re coming in.

(Brief sidebar: brain waves? Yeah, yeah. This is some woo-woo stuff, for sure. I spent a lot of time early on trying to find reliable research about what kind of behavior can be predicted by an EEG. Some researchers figured out, apparently, that the brain basically shuts down in the half-second before a “eureka moment.” We were hoping to use this to predict a eureka moment and block out distractions, but that seemed impractical. After all, what could we do? A blaring klaxon in your genius moment, warning you not to lose your brilliant idea? So we decided, instead, to focus on setting up an environment conducive to having a eureka moment.)

After the MindFlex, we landed on the Neurosky MindWave, which uses the same chipset but is Bluetooth-enabled and geared for more professional uses. Sparkfun and Neurosky both have instructions (1, 2) for connecting the MindWave to an Arduino, which had overlapping utility. I’d recommend reading them both side-by-side. After some technical difficulties, the big breakthrough was to disconnect the BlueSMiRF’s RX pin. After all, we never need to send data to the headset – we’re just receiving. Also, disconnect the BlueSMiRF’s TX pin during sketch upload, or it’ll fail. After that, it was smooth sailing using the kitschpatrol library. I just needed to change the serial port from 9600 baud to 57600 baud to accommodate the MindWave.


The other big challenge was “fading” between colors on the Neopixel array. The ultimate solution is to use the map function to get the desired RGB color between the start and end points (warm light, cool light) and then use a bunch of for loops to adjust the color in many steps. There are plenty of forum posts about this, but I found this example code by Stack Overflow user ladislas to be invaluable.

The basic structure of the Arduino code is straightforward. The Neopixel strip is instantiated, then the Music Maker shield is instantiated, then we take advantage of interrupts to listen for, receive and act on Bluetooth serial data while the music is playing. When the MindWave detects “activity” (a number from 0-100 generated via some proprietary algorithm on the Neurosky chip), we initiate the “fade” of the music and the light.

IMG_2891And that’s Clara! Belen and Marcelo were responsible for the incredible industrial design, and they’re putting together a video of it in action. Since nothing will show off the effect better than that, I’ll update this post when it’s ready!