Tuesday, December 17, 2013

My First Electronics Project: A Very Happy Leapmas!

Two weekends ago I attended RobotsConf. It was excellent. The conference aims to take software developers and give them all the tools they need to let them start making. Well, it worked. Despite owning an arduino, various sensors and a RaspPi for months, I never really messed with them. But at RobotsConf I hatched my first major project: Leap Motion controlled LED Christmas lights (or Leapmas, for short).

First, I used the Leap Motion to track the user's palm position. The Leap Motion is kind of like a mini Kinect, but it isolates hands and fingers using IR cameras. Depending on where the user's palm is along the x, y or z axis, a Python script sends a color value (0-255) for the red, green and blue LEDs to the Arduino via a serial connection.

While at the conference, I got my project mostly working with just one RGB LED, since I would need to order the weatherproof RGB LED strips to go on my house. While stuck at Jacksonville airport due to Storm Dion, I put some finishing touches on the code and went home to wait for Amazon to deliver my LEDS.

It turns out that powering four strips (1200 LEDs total) was a bit more complicated than just the one LED. So with benchtop powerboard kit I borrowed from Timball and a circuit example from Make, I was able to wire up the full circuit to a 300 Watt desktop computer power supply.

Can you believe it? I wired that thing up right the first time.

Once I got that working, I started soldering things together. The lights I got had random connectors on the end (some all male, some all female) and they didn't quite match up, so I ended up cutting off the connectors and soldering them together. I also inserted a bunch of wire to extend the connection to the LED strip so it could start at my roofline. Here's a diagram of the overall setup:

What an artist!

Once that was all set it was a matter of setting up a station at the street so my neighbors could play with it. For housing I used a big plastic locking case that my Makita drill came in. I used my jigsaw to cut a hole in the top and gorilla glued a piece of plexiglass over the hole. Then I drilled some holes for cords and nestled the whole netbook-arduino-leapmotion assembly in the case. Once I was sure everything worked, I taped the leap motion up against the plexiglass so it could see out.

Plexiglass over the leap motion

Admiring my own work



the guts of the thing



 For that I made a jig to set it on out of scrap wood and screwed it to the big red maple by the street (sorry red maple!). I also screwed the inside of the case to another scrap piece of stud, making sure to leave enough room behind the hinge so I could still open the case. Lastly I topped it off with a small key lock because you don't want anyone to spoil the fun.



Oh and I also put a sign up to explain the whole thing. I'll post more pics if I can catch anyone interacting with it. 

Merry Leapmas!