Runner’s Odometer

Runners's Odometer: Tracey's Miles as of December 25, 2011

Tracey, my wife, runs a lot. This year she is already over 2000 miles logged. She runs marathons and ultra-marathons and crazy things like 50 mile runs. We have long joked together that she clocks more miles running in a year than i put on my beloved 1999 Chevy Prism driving it to the train station and back. This made me think that i should make an odometer for her. I decided to do this for real a couple of weeks ago and had a prototype ready for her to open on Christmas morning.

Her immediate reaction? “You got me a box of wires and stuff?!” Once i explained it to her and showed it in action, she thought it was a lot of fun.

I initially wanted to use a real car odometer, but i didn’t have one handy. I went over to the fantastic American Science and Surplus and looked for some counters or an odometer there. While i didn’t find an odometer, they did have some 24v industrial counters from Durant. These are nice little counters that were (are?) made in Watertown, WI, not too far from our space. They are super simple devices. 6 geared dials have the numbers 0-9 on them. A solenoid ticks the rightmost number with each pulse of voltage it receives. When the dial on the right rolls over from 9 to 0, the next gear is ticked up by one and so on. These counters are not resettable or reversible, except by some manual intervention. I took the little guy apart and cranked the wheels over to where i wanted them.

A quick rummage through the hack rack turned up an 18V wall wart that we clipped the plug off of and used for our power source. Royce helped me out with this and with his help and a couple of alligator clips we proved that the 18V was enough to activate the solenoid and tick the counter up by 1. This particular counter moves 1 tick regardless of how long the voltage is applied. To crank up multiple ticks, i need to cycle the power on and off. I had an Adafruit MotorShield lying around that had all of the necessary high-voltage gear on it and we got the device up and running pretty quickly with it. I did not have time to build a circuit board just for this device, so the MotorShield is what is being used for the working device now. That wrapped up a quick night of experimentation at the space and at the end of it i had a working counter and the Arduino code to control it!

My next task was to integrate it with DailyMile, the social networking site that Tracey uses to log her runs and connect with her running friends locally and around the country. Thankfully, DailyMile has a nice little REST+JSON API that made it super easy to snag all of Tracey’s details. I used their ruby client, but will probably switch my app over to Python because i have been doing more Python development lately. The API returns a simple JSON structure for all logged activities and i simply snag that data and store it locally in a pretty-printed JSON file. A sample activity record and URL look like this:

Edited response from https://api.dailymile.com/people/tmgessner/entries.json?page=5

{"entries":[
{"id":10441284,
"url":"http://www.dailymile.com/entries/10441284",
"at":"2011-10-16T14:34:34Z",
"message":"My legs felt a little bit tired today but my lungs felt GOOD! I tried to stay relaxed and just enjoyed the feeling of breathing in and out. Really, a lovely Sunday morning.",
"comments":[...],
"likes":[],
"geo":{
"type":"Point",
"coordinates":["-87.8961323","42.9935854"]},
"location":{"name":"Milwaukee, WI"},
"user":{
"username":"tmgessner",
"display_name":"Tracey G.",
"photo_url":"http://s1.dmimg.com/pictures/users/9744/1322699474_avatar.jpg",
"url":"http://www.dailymile.com/people/tmgessner"
},
"workout":{
"activity_type":"Running",
"distance":{
"value":7.1079,
"units":"miles"
},
"felt":"good","duration":3968}},
...
]}

I save all of the activity events locally, but for this odometer, i am only interested in the “Running” events.

The ruby application runs forever and polls the DailyMile API every minute for new data and stops paging through the results if it finds entries that it has seen before. If any new runs are found, the app figures out how many miles are missing from the odometer and sends that value along as a byte to the arduino over the serial port using the serialport gem and waits for a successful response.

If you would like to build a version of this yourself, you can download the code used from http://code.google.com/u/jason.gessner/p/runners-odometer/.

The device and code work right now, but the presentation leaves a lot to be desired, though, so i am working on a version with a more lovely display. I like the analog odometer feel and I think the next step will be to make some larger gears for this project on the CNC router at the space and build a bigger version. I’d also like to work with my father on a nice wooden case for the display and the gear.

The more immediate next steps will be to make a smaller circuit for this that doesn’t need a full arduino and a motor shield. I can control the solenoid with a transistor (like we did for the Beer Project). The bigger challenge will be to make the connectivity to the data from the API more compact. I would love for this device to be wireless, but i need to figure out how much i want it to cost. This would be a fun project to offer as a kit or for sale, but i don’t want it to cost close to 100 dollars, so i’ll be doing some more prototyping to make it a bit more standalone. The other challenge i have is that Tracey typically only uses her laptop, so there is no desktop machine sitting around that she would hook this up to so it will constantly update. I do have some new Xbee gear that might work, but i think the trickiest thing to design will be the standalone version that doesn’t need a computer connected to it.

Runner's Odometer: The Motor Shield Powering the Counter

New Laser Cutter!

New member Jason H likes to make an entrance.  He didn’t just join up as a member tonight, he rolled in with a Universal Laser Cutter and fired it up. It goes without saying that folks are pretty excited about this new addition to the space. Thanks for bringing it in, Jason!

New Laser Cutter Opening Night

New Laser Cutter Opening Night

You can hear him ask for his beer from the Beer Automated Dispensing and Security System at the end of the video. I think we can all agree that he earned that frosty brew!

Beer Automated Dispensing And Security System

Adam, Kevin and I have been working on a secure kegerator project. We made a kegerator that uses an Arduino Duemilanove with an RFID reader for access control, a solenoid for controlling the tap and a flow meter for recording how much beer was dispensed. We are reusing our Makerspace keycards and fobs for access. The system is pretty simple and only has a few components. We’ve done a couple of iterations on it so far and are currently working on a custom-etched Arduino shield for the components. While the system currently uses a little Nokia 5110 screen from AdaFruit, we are also working on a version that uses an android phone for display, data logging and cloud-connected goodness.

The old, tired way of storing and dispensing beer relies on cans and refrigerators. This simply won’t do for today’s tech-savvy connoisseur.

Milwaukee Makerspace Beer Project

Our kegerator has an RFID reader that hangs off the front. This shot is from an earlier version that did not have a screen attached.  Classy.

Milwaukee Makerspace Beer Project

The screen has a glorious 1-bit Milwaukee Makerspace logo (courtesy of the generous folks at RasterWeb, Inc.) and an inviting message. After the beer is poured, the amount of beer dispensed will also be displayed.

Milwaukee Makerspace Beer Project

The kegerator is very perceptive.  It uses advanced computer vision to detect that you are thirsty and suggests that you would like a beer.

Milwaukee Makerspace Beer Project

Kevin uses his Makerspace keyfob to badge in and is greeted by his stage name.

Milwaukee Makerspace Beer Project

With his identity verified and his tankard filled with a tasty brew, Kevin can do nothing but obey.

Milwaukee Makerspace Beer Project

Ridiculously Large Jacks

On June 18th, Milwaukee Makerspace participated in The Great Milwaukee Race as a challenge sponsor.

Great Milwaukee Race 2011 - Ridiculously Large Jacks

The Great Milwaukee Race is a scavenger hunt/series of challenges across downtown Milwaukee that was started in 2010 by Fit Milwaukee and friends.  This year’s event was put on by Fit Milwaukee, AJ Bombers and Performance Running Outfitters.  In 2010, 50 teams of 2-4 racers competed in the inaugural race. This year 75 teams raced throughout downtown Milwaukee and along the lakefront to find all 10 of the challenge locations and get their passports stamped.

The post i made a couple weeks ago (I’m welding! I’m a welder now!) about my Ridiculously Large Jacks was a preview of the challenge that we would run at the race.  After the initial batch of jacks was finished, Sean, Kevin, Adam and David helped me fine tune the game a bit in our hangar before the event itself.

Shane helped me run the event on race day and it worked like this:

  • Team would decode the clue to our location and decide on when they should come to our station.
  • When they showed up, they had to nominate two players.
  • One player was the bouncer and was in charge of bouncing and catching a kickball.
  • The other player (the grabber) donned a pair of gardening gloves and had to pick up the jacks.
  • On the first bounce, the grabber would have to pick up and hold onto one jack before the bouncer caught the ball.
  • On the second bounce, the grabber would have to pick up 2 more jacks while holding onto the previous jacks.
  • Repeat for 3 and 4 jacks.

The game only took a couple of minutes when done correctly, but some teams were faster than others. We also saw a variety of techniques.  Some grabbers would try to stash the nearly 12″ diameter jacks under their arms.  Some folks spread the jacks out between their hands and used them like claws to scoop up the remaining jacks.  One women even stashed the jacks in her running shorts, but they were a bit heavier than she bargained for.

We were stationed at the underpass at water and pearson, across from Trocadero.  After watching what was happening for a while, the Trocadero bartenders popped out to see what was happening up close.  We invited them to play a game and they did pretty well!  Another couple came by to watch and started laughing at the silliness they saw so we invited them to play as well.  They had a few close calls with some wild bounces, but took care of the round with only a couple of do-overs.  They looked pretty happy by the end of the game.

Great Milwaukee Race 2011 - Ridiculously Large Jacks

We heard really good feedback from racers and the organizers of the event.  The game was odd enough to give people pause before they jumped in, but easy enough that it could be completed in a couple of minutes.  The fun we had with this has led us to discuss making some more oversized games to bring to parks in the area. Stay tuned for more info on this front.

Thanks again to Fit Milwaukee and the other Great Milwaukee Race organizers for letting us be a part of this event and thanks to the racers for being such good sports!