Control an LED with your breathe


This Arduino radar lets you control the brightness of an LED with your breath.


A few months ago, Norwegian sensor developer Novelda unveiled a pair of adaptive Atmel | SMART ATSAM4E16E powered sensor modules capable of monitoring human presence, respiration and other vital information in real-time. Based on the company’s XeThru technology, they use radio waves rather than infrared, ultrasound or light, enabling them to ‘see through’ an assortment of objects ranging from lightweight building materials to blankets. These modules can even be employed to detect movement in a room, as well as measure the breath of a person, without contact.

cdrwoybwoaaa00n-1-jpg-large

With one of these boards on hand, Maker Øyvind Dahl decided to build an Arduino radar that could control the brightness of an LED with his breath. To accomplish this, he hooked the X2M200 respiration monitoring sensor up to an Arduino Uno (ATmega328). The module, which was tasked with detecting his chest movement, also required both a USB communication board and a level shifter to interface the 2.8V levels of the XeThru with the 5V of the Uno.

Dahl connected an RGB LED to the project, whose brightness faded in unison with his breathing. When he inhales, the light fades in. And when he exhales, it fades out. Beyond that, the faster that he breathes, the faster the LED will fade.

arduino-radar-breadboard-42-e1439468718498

In order to make this work, the Maker wrote his own code for the radar — which can be found on GitHub here — that would would send over the respiration data.

“Another thing I was struggling with, was type conversion. And with only an RGB LED as my output, it was a bit hard to debug,” he explains. “So I connected another Arduino with SPI, that I could use as a debugging console for a while, and got the type conversion sorted out. I parsed the data that was coming in, and used the movement-value to set the brightness of the LED.”

Arduino-radar-with-rgb-led-1024x413

Since the Arduino did not process the data quick enough, Dahl ended up adding a function to his code that would empty the buffer and sync the data each time that he fetched a new measurement.

While this is merely a prototype, there’s plenty of potential for development. Dahl says that upon completion of his “useful device,” he will share the code and detailed breakdown of the project on his site. As we await to see what the Maker comes up with, you can find his first tutorial here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s