Homemade Dance Dance Revolution Mat

It’s been a long winter.  I love taking the kids outdoors, even when it’s cold, but sometimes, it can be fun to play indoors too.  I haven’t acquired a game machine, the kids haven’t expressed much interest in playing video games, but we DID have fun playing a Dance Dance Revolution (DDR) type game at an arcade in hotel we stayed at once.  What would it take to play at home?

Searching around, I came across StepMania, an open-source, DDR type game.  I thought I’d look for a used mat on Craigslist, but when I started researching dance mats, I was surprised to see that many people actually preferred homemade mats over the cheap roll-up mats.

The simplest designs I came across measured the capacitance of the body on aluminium foil to detect steps.  I took a cardboard box from our closet, some sheets of aluminium foil, connected the foil to some resistors, connected to an Arduino.  I covered the aluminium foil with packing tape.  What’s cool with this design is I had everything in the house already, except suitably sized resistors, so the whole thing cost me $1 (plus tax).

Can you tell that it's home made?
Can you tell that it’s home made?
There’s an Arduino library (CapSense) that makes measuring capacitance really easy, and I found firmware called “Big Joystick”  that makes the Arduino UNO appear as a regular, USB, HID joystick.  Detecting steps works really well, and the whole thing works flawlessly with Stepmania.

What I didn’t get right was the positioning of the pads – it seems harder to get the steps/combinations right than I remember it being at the arcade.  Lisa thinks they are too far apart. But other than that, the sensors work really well.

Lisa and Rachel playing StepMania
Lisa and Rachel playing StepMania

I’m trying to think of other applications where a large “switch” like this one would be useful.  With the right configuration, these sensors will also sense proximity – not just touch.

Dance Mat Interface
Dance Mat Interface

Download Dance Mat Project Files

Robotics Projects for Kids

When I go to the library with the kids, I end up coming across books I wouldn’t ordinarily see.  I recently stumbled on Robotics: DISCOVER THE SCIENCE AND TECHNOLOGY OF THE FUTURE in the kids section.

Robotics book for kids
Robotics book for kids

Although this book is targeted at older children, and my children aren’t particularly interested in robotics, we still had fun completing a couple of the simpler projects at home.

First, we built a mechanical hand with cardboard, drinking straws, string, and a glue gun.  This was a great craft, because my six year old could complete all the assembly steps (given guidance) and the completed project was unanticipated, functional and fun.

Next, we built a drawing robot, which consisted of a plastic cup, tape, an electric motor with an added weight (like a mobile phone or pager vibrator), batteries, and markers.  This craft required more assistance – I connected the batteries, and the weight to the motor.  My six year old assembled the cup and the markers, and shot video footage.

Here’s what the output looked like:

Can your robot draw this?
Can your robot draw this?

 

WiFi Sailboat Passes Bathtub Test

Last summer, I built a pop-bottle sailboat with my (then) four year old.  After trying a couple of designs with keels in our bathtub, we settled on a catamaran style design with two pop bottles.  We tied a string to it, threw it into the pond, let the wind carry it away, and then pulled it back to shore.

And I thought, wouldn’t it be cool to add remote control functionality?

So I did.  I finished my smartphone controlled, WiFi sailboat on Saturday.
Field test on a rainy, windless day.  The bane of any sailor.
Field test on a rainy, windless day. The bane of any sailor.
The sailboat consists of:
  • 2 x 2L pop bottles
  • Rubbermaid body
  • Plastic shopping bag sail
  • Dowel mast, plywood rudder
  • 2 servos
  • Raspberry Pi with USB WiFi adapter
  • Arduino Uno
  • AA Battery pack with a 5V regulator
I configured the Raspberry Pi to act as a WiFi hot spot.  Using any smart phone, you can connect to the boat, and visit its web page.
The page has two jQuery slider controls.
Web Interface - jQuery sliders control the sail and rudder
Web Interface – jQuery sliders control the sail and rudder

When re-positioned, the slider controls drive a PHP page which sends commands over the USB interface to the Arduino, which then controls the servos.

It seems like overkill – an Arduino AND a Raspberry Pi for such a simple task?  I’d considered alternatives – using only an Arduino with Bluetooth or another wireless interface, or using the Raspberry Pi to directly control the servos – but in then end, I just used the parts I had on hand.

My initial design used a 7805 IC to supply the 5V for power – that didn’t work…  Everything would boot, the 7805 would get super-hot, and the Raspberry Pi would crash after moving a servo a few times.  A little reading lead me to pick up a switching regulator (I happened to pick up one from Castle Creations at my local hobby store).

I tested the design out with my assistant in our bathtub, and everything worked!

But, by the time everything was built, the city drained the reflecting pool I had intended to use for trials for the fall – I had to try it out in a nearby pond.  And, of course, there was no wind.  I’ll post more photos following a windy day test.

Check out these far grander projects – these individuals are trying to build autonomous boats that can cross the Atlantic:
http://gotransat.com/
http://www.gpss.force9.co.uk/autop.htm

With a little more money, and a little more time, I think it would be fun to build a boat I could launch in lake Ontario, at the foot of Yonge St., to sail autonomously down the St. Lawrence to Brockville, where friends in Ottawa could retrieve it.

Download Sailboat Project Files

Growing Popping Corn on a Balcony

The apartment we live in faces east, and in the morning, we get a lot of sun.  This year, I thought, wouldn’t it be cool to have a little natural shade?  As corn grows tall, it seemed like a good candidate.

We successfully grew 8 popping corn plants in two large pots.  It was pretty easy – plant the seeds, water daily, fertilize.  This was not organic corn.  The plants did grow tall, but 8 was not enough to provide us with any significant natural shade.

Popcorn, ready to harvest
Popcorn, ready to harvest

This year, we also grew pole beans, carrots, tomatoes, sun flowers and some other potted flowers.  It was a pretty good reminder of how dependant we are on big agriculture, farms, transportation systems, food terminals, and grocery stores to economically feed ourselves.  Given the start up costs of the containers and soil, these were not economically viable crops – it was vastly more expensive to grow than to buy.

Would your condo board allow this garden?
Would your condo board allow this garden?

The corn did pop.  We’ll likely do this again next year.

 

 

 

Electricity from a Toy Windmill

Electricity and energy are such abstract concepts.  We just plug things in and they work.  One day, my daughter brought home a toy windmill from school, and I guess I thought I could take that understanding a little bit further.  So I told her: “We can make electricity with that”.

I did a little reading beforehand, and found a few people who had made wind generators online, so I had a rough idea of what I was going to build, and what parts I needed.  We took the subway to Active Surplus, picked up a couple of electric motors, some flashlight-sized light bulbs, some LED lights, and some diodes.

Toy Windmill with Generator
Toy Windmill with Generator

First, I connected the windmill to the motor, and the motor to a flashlight bulb.  I didn’t do any math.  It may come as no surprise to some of you that we couldn’t get enough power from the windmill to drive the bulb.

Toy Windmill Generator Circuit
Toy Windmill Generator Circuit

Plan B.  I built a bridge rectifier with the diodes I picked up, to get DC power from the motor, and connected it to an LED light.  It worked!  I was able to illustrate that we could convert wind energy to light: harness energy from the wind, make a little electricity, and generate light.  Every toy windmill needs this built in!

Fun with Kites

I’ve been wanting to take aerial photos for a while now.  Suspending a camera from a kite seemed like the best way of doing this.

I picked up an inexpensive camera on craigslist.  I modified it with custom firmware from http://chdk.wikia.com/wiki/CHDK , which allowed me to trigger the shutter at pre-programmed intervals.  I picked up a kite that was recommended for this sort of task, a “Sutton Flow Form”, which has a parachute-like design and has 16 square feet of surface area for plenty of lift.  Finally, I cobbled together a mounting bracket with some screws and random stationary supplies from Staples.

Camera Rig
Camera Rig

We spent our Canada Day weekend in Guelph with our friends Craig and Jan, whom have a farm just north of the city, which seemed like a great opportunity to fly a kite.

Google Satellite View Of Areas Photographed
Google Satellite View Of Areas Photographed

I am really, really glad I attempted to do this in a wide open space first for my first attempt – there were a few times I was concerned the rig was going to smash into the ground, and there’s a much greater probability of this hitting someone in my neighbourhood.  Together with Craig and his son Ben, we managed to get some great photos.

My kite, in stock form, is a little unstable in gusty winds (the instructions recommend adding tails to address this), and did not provide great photos on our first attempt.  This was addressed on our 2nd attempt with the addition of another kite. Craig happened to have a super-stable delta-style kite with a 6 ft wingspan.  We launched my kite into the air about 30 ft, and then tied the rope
to his delta kite, launched the delta kite, and then once it was 20 ft in the air, suspended the camera rig to the line.

Camera Rig With Both Kites
Camera Rig With Both Kites

The amount of lift was incredible.  We had to wear gloves to prevent rope burn.  The camera periodically took photos for about 10 minutes.  We stopped for lunch.

Richard, Ben And Craig
Richard, Ben And Craig
Kite Photo 3
Kite Photo 3
Kite Photo 2
Kite Photo 2
Kite Photo 1
Kite Photo 1

We tried again after lunch.  I only had 300 ft of kite line, but Craig had a huge bag of hay bale twine – an essentially unlimited supply of rope.  We programmed the camera to take photos every 20 seconds for 30 minutes.  We took a photo from the ground early on, and an airplane passed by.

Plane Passing By
Plane Passing By

We continued to let the line out for about half an hour.  The kites and camera rig were impossibly high – it was unbelievable.

It came time to reel the kites back in.  It was impossible.  It took incredible strength to pull the kites in.  After about 10 minutes of pulling, the line snapped, and we watched the kites drift away.  Jan and I hopped into my car to chase them down.  Fortunately, the crops were still only about a foot high, and we actually saw the kites land in a neighbouring field about 3 km away.  We recovered the kites and camera, intact.

First Kite Recovery
First Kite Recovery

Unfortunately, my craigslist-special camera didn’t capture any photos of this round.

The kites, and cameras, were subsequently re-launched.  However, they ended up caught in a very tall tree.  We are all anxiously awaiting a strong wind to pull them down…

Great times were had by all –

The Power Of One

Here is a story that is unusual in that it illustrates both the importance of traditional media as well as the ability of the Internet to empower an individual.

Our federal government is a massive institution – our 2010 budget had the Canadian government spending 280 billion dollars despite only pulling in 230 billion dollars from its 33.5 million residents (source).  There are many opinions on deficit spending, but I’m sure for most of us, we just kind of accept what our elected representatives put on the table.  We might complain amongst our peers,  45% of us vote, some write our local newspapers or directly to their MPs.

An IT professional in Nova Scotia by the name of Drew McPherson has decided to take a more active role by highlighting the decisions being made about how our money is being spent.  He’s working to improve the transparency of a politically visible component of the federal budget: travel and hospitality expenses.  The federal government is obliged to disclose this information, but not in a useful or easy to analyze format.  Mr. McPherson uses his IT skills to collect and aggregate all expense information across various sites, and place it on his own, in a useful format.

Drew McPherson’s site can be found here: http://www.governmentexpenses.ca/

A site like this isn’t something you’re likely to stumble on, unless you happen to be researching government expenses yourself, which is where I have to thank Macleans magazine for drawing my attention to his work: http://www2.macleans.ca/2010/08/25/high-flying-civil-servants/print/

Greater transparency of the system should lead to better spending by our representatives.

Harder, Better, Faster, Stronger

Its always fun to talk about what’s around the corner.  In large part, it’s what I like to do here, playing armchair quarterback, pretending that I get to make the decisions that shape my world.  The best part about writing it down is looking back on it and checking your track record.

Growing up in the 1980s, with the rapid evolution of personal computers in the home, was a lot of fun.  It was so neat to play games as they evolved on the Vic-20, Commodore 64, Amigas, PCs.  Where would it end?  If you had asked me then what my next computer would be like, I would have said it will have better sound, better graphics, and would capable of more elaborate games.  One of these days, I’ll post papers that I wrote (in WordPerfect!) for various classes to illustrate what I was thinking at the time.  Like most, I could only think of Harder/Better/Faster/Stronger versions of what I had already.

Of course, PCs got faster, but those changes were almost inconsequential compared to other changes that were taking place.  The Internet, for one, grew to be so much more than I ever thought it would be.  Even in the mid-90s, I’d never thought it would grow to be used much beyond my peer group.  I certainly never thought of:
– grandparents viewing and posting pictures of their grandchildren on social networking sites
– collaborative projects like Wikipedia or Open Street Maps
– its potential for media streaming and distribution – completely shaking up the music and print industries, and certainly making its presence felt in the world of TV/movies

Knowing how hard it is to forecast, its kind of neat to look at a real futurist that happened to get some things right.

I present to you a local Torontonian, Steve Mann, as one of these futurists.

Wearcompevolution-1024x519

In the early 1980s, he obviously looks out of place, but certainly by the late 1990s, a lot of ideas he espoused were gaining traction.  By 2010, every smartphone wielding person was essentially practicing his vision of wearable computing, personal vision/sousveillance, connectivity, social broadcasting/”tweeting”, etc…  Its almost hard to think back to a time when this was really weird – but it was.

So, while it might be fun to think of what Apple will stuff into their iPhone 5 (Thinner! 5 cameras! 30 megapixels each! 3D! HD! Super-Duper-Fast Data!), a real exercise in contemplating tech would be to take a stab at guessing what the next leap might be.

Who else took a really good guess at what 2010 would hold?  Who out there is making bold predictions for 2040?

Steve Mann’s body of work:

Google AdWords Inching Closer To Grave

I exaggerate, of course.

A quick follow up to an earlier article I wrote, iAd. A big deal.

In recent weeks, Apple has essentially locked its primary mobile and advertising foes from delivering advertisements on mobile Apple devices, as covered in All Things Digital.

And, they’re a step closer to location-aware ads with a recent update to its privacy policy, which allows it to share your device location with third parties.

One thing I find odd (though perhaps I shouldn’t, given Apple’s history in developing walled garden technology) – I can’t just BUY an iAd like I can with Google AdWords.  I actually have to contact someone.  As someone who’s directed perhaps a couple thousand bucks on AdWords to market unique products to very niche markets – I have to say that my experience with Google’s system was great.

How the selection of your next phone got easy –

Not in a good way, or the way you might expect.

Rambling inspired by a recent article on CNN – What makes Apple so sticky

Not too long ago, when you bought a phone or a portable CD player, you would decide what functionality you wanted and bought the coolest looking device that fit your budget.  You were likely re-keying every phone number into your mobile’s address book no matter which one you bought.  So its 2004 and the battery in your Nokia phone no longer holds a charge – you go out and buy a Motorola Razr.

Now its 2010 and you’ve broken your second iPhone – are you going to go out and buy a Nexus One?  This time, its different.  You’ve got 10 puzzle games, that noise making app, and hundreds of dollars of music and video from the iTunes store.  You can’t throw that away.

Its starting to look like the 1980s again.  You buy a PC running MS-DOS to run Lotus.  And then you buy WordPerfect.  And then you can’t switch, because you’ve got so much invested in the PC platform, that you just buy a newer, faster one.  And before you know it, Bill Gates becomes the richest man on earth selling operating system licenses.

Perhaps its still early enough in the mobile platform game that Google can make a run at it with Android, or if everyone at Nokia and Intel crosses their fingers at the same time, perhaps they’ll pull it off with MeeGo.  If I were behind these two efforts, I’d take a look at what Palm attempted to do with WebOS, and attempt to get my system to work with iTunes.  Take a look at this fun column written by Joel Spolsky on how to take on an established competitor.