How should I jump into the world of embedded hardware? How about by building a portable clock for my outdoor workout group. Gone are the days of constantly checking your watch - now the group has a single reference point for the time that can change color with each interval.
Neopixels seemed the obvious choice, they are easy to code for and simple to connect. With only 58 nodes to light I can just use the output of a Raspberry Pi or a Spark Core without any additional power.
For the protoype I wanted to keep things simple, so I used a diffuser made of a plastic folder - this allowed me to glue the neopixels to the inside of the folder and use the cover to diffuse the light and hide the electronics. Someday I'll make a fancy diffuser but for now, Staples to the rescue!
I thought using 22 AWG hookup wire would work, but the wires were too stiff and difficult to work with - especially the smallest ones on the inside turn of the 90deg bends. I switched to some thinner speaker wire I found laying around after the first digit, then finally settled on ripping the insulation off for the last digit after I decided to cover the whole display in tape. I pulled the insulation off the wires, tinned along the length and then cut to size after soldering in each side. This was a LOT easier than stripping tiny wires and using tweezers to get them in place!
Writing the code for the Raspberry Pi was relatively simple, I used python and the jgarff neopixel library from github. The pi is pretty huge and quite a bit overkill for this simple project so I repurposed a spark core to control the pixels. Porting the code over from python to arduino/C was tricky at first but it was very helpful to have written it in python first as I didn’t have to think much about the structure of the program as I tussled with the syntax.
Testing the system in the field the first time did not work - one of the wires connecting the pi ripped out of it’s connector - doh! Second time around, after switching to a spark core it worked like a charm. I’m just using a usb battery to power the whole thing for now and have not made a case or any custom hardware for it yet.
Next step is to add blinking alert for the change of interval and some other niceties that will help with running the workout. Long term plans are to add a denser display for alpha characters & make a homemade flex circuit to eliminate soldering all those wires! Someday I’d like to sync up several of these to start based on a wireless input (3G would be great). Think of a race with cheap clocks at each mile instead of those >$1k models.
Comments
Please log in or sign up to comment.