Meditation strikes a special chord with me as a maker because it is said to foster creativity, intuition, imagination, and fantasy. I can’t think of traits better suited to making. I’ve tried meditation in the past, but it didn’t seem to stick. When I saw that NeuroSky’s Mindwave headsets had dropped to $100, I couldn’t resist trying meditation again, this time with feedback. These headsets measure electrical signals from your brain and determine two main metrics: attention and meditation. The charts and graphs in the headset’s app worked well enough for measuring attention, but the very nature of meditation is that you can’t focus on charts and graphs while doing it. I set out to build a more peaceful and serene visual output for my headset, one that would actually serve to calm me even further as it displayed the depth of my meditation.

My Brainwave-Controlled Zen Garden is similar to a standard desktop zen garden in that you rake sand to calm yourself. In my version, though, the rake and resultant patterns are controlled by your actual brainwaves. If you are tense and worrisome, the rake moves randomly and quickly, scribbling odd patterns in the sand:


If you are at peace, though, relaxed and meditative, the rake slowly draws neat spirals. In the week since I build it, this is the calmest I’ve been able to get:


To keep from messing up the sand while focusing on operating the still camera, I had to meditate, quickly switch off the garden, then take the picture.

The garden is spun at a constant rate when turned on. The Arduino uses a SparkFun BlueSMiRF Silver Bluetooth modem to continuously get the meditation score from the headset. The larger the score, the slower the rake servo is moved through its back and forth pattern. Low and sporadic scores result in sloppy sand drawings, while neat spirals can only be obtained through sustained meditation.

You can find the code for the Arduino on GitHub. I spent a lot of time debugging this project. One of my sticking points was where to put my custom code inside the code for reading the headset’s data. There is a place in NeuroSky’s example code that says “Put your code here”, but things only go well if you put your code elsewhere inside a “if (bigPacket)” statement.

Have fun making your own zen garden, and be sure to report back.

See the entire series here.