Arduino / Node.js Motion Detector

After purchasing a house two months ago (hooray!), I decided I need to start making this house have custom technology that would benefit me on a daily basis. I love to listen to music at ridiculously high levels. That is actually one of the top reasons I wanted a house so I can really enjoy my sound systems and feel the music and explosions in action movies.

One of the biggest annoyances with loud music playing is you’re isolated to everything outside what you can see. My home office is down the in basement which isn’t in clear view of the steps downstairs. A few times Amber has snuck up without realizing I didn’t know she was behind me and scared the bejesus outta me! Mini heart attacks are not something I look forward to, so I needed to come up with a plan. At first I thought asking her to flick the lights when you come down so I know would suffice. This requires remembering every time she’s coming down stairs to do that which is quite a pain. I need an automated way to let me know. This is where my motion detector idea came from.

About a year ago, I was working on RadicalFlow. RadicalFlow was a real-time, collaborative canvas for designing, developing and connecting apps. What that meant was you could connect devices to each other via code and API’s to interact with each other. Derek (the CTO) and I built out a downloadable infrastructure that was framework free. Any developer could connect a Pebble Watch, to an iOS App, to a WeMo power switch, to turn on a light with the press of button on the watch. We also worked on initial connection to Arduino so developers could extend even further their capabilities.

Since I loved hacking away at hardware and software on a daily basis, the Arduino fascinated me. I wanted to build so many projects for my apartment at the time yet didn’t have the time nor space to do so. Now that I’ve been making more time for hobby projects, I have both space and some time to get back on those projects from a year ago.

Last night I was thinking about my future in development and where I want to go next. As hardware and software control most of my life, I’d love to work with more hardware devices connected to programs that trigger different states / moods around the house. So this is where I start my first project. A motion detection system that based on where the motion was triggered, lights up a specific color. Green for driveway, yellow for front door, and red for basement stairs. The idea is I will know to shut off my music or run upstairs when someone is arriving in a specific location. After roughly an hour of dusting my Arduino off and brushing up on Node.js I had the demo below working.



UPDATE 8/5/14

I purchased a PIR sensor and a Adafruit NeoPixel Shield for Arduino to make the light much brighter and noticeable. Here’s the final USB version working.

Next version will just contain the PIR sensor and a WiFi shield to pass the sensed motion back to the main light.