Sunday, January 13, 2013

Robot Girl is Awesome

So my youngest niece really liked the "robot" I built for Willy Wonka.

 Which was of course basically a carved shell over a cheap mall-store R/C car:

Somehow, the discussion evolved until we decided I'd work with her to build her own robot.  The first chance we got to have a real sit-down about it, we went over some of the things she was hoping to do and covered some of the basics of how things worked and how plausible.  She's a smart kid, and had been reading up, so she understood the gulf between what is depicted in movies and what real-world robots usually do.

And it is important when brainstorming, no matter what the age, not to start with "No, we can't do that," or "No, that's too expensive, let's try this other thing."  Instead you want to start by dreaming of the impossible.  THEN you can start working out what is actually possible, in a context of how much you are willing to put in to get there.

So we scribbled some ideas, and talked about ideas such as voice recognition.  But it was important to me that we should finish this first "Robot Day" with something built.  Something she could take home.

And I got really lucky here.

I'd brought a whole bag full of servos and Arduinos and Xbees and so on.  But there just wasn't room in the bags for carving materials, paints, and all the other stuff to make a physical robot shell with working joints.  Not that we really had the time!

But I did have my custom BlinkM.

And this wasn't just a color-changing LED; it was one that I'd already programmed with multiple routines.  Except that the potentiometer had fallen off.  And even better; I didn't have a 4.5V battery pack on me.

Oh; the BlinkM is factory-set by ThinkM with a custom bootloader and their own software, which allows creation of and uploading of a single multi-step color pattern.

As it happens, though, the core part is an ATtiny45/85 (driving a single RGB Piranha LED.)  Which means you can load new software on to it; the programming lines (MISO, MOSI, SCK and RST) are already broken out.  And it is even, via the High-Low Tech group at MIT and Alessandro Saporetti, Arduino compatible.

So I'd already used my Adafruit USB TinyISP

to stick new software on a BlinkM.  I thought I had a picture of the thing on breadboard where I was trying out the XBee integration, but anyhow...!

The thing is, it had multiple modes already programmed in, which were reached by changing the voltage presented to an Analog Read pin.

So I didn't have a 3xAA power pack.  I had a 2xAA I was briefly tempted to hack up, but that is barely enough to light the blue channel on the Piranha.  But I DID happen to have, in my grab-bag of parts, a 7805 voltage regulator.

And a chunk of nice Adafruit perma-proto -- which is like what Strip Board wants to be when it grows up:

Which meant I could have HER do half the work of putting together a 7805-based voltage regulator, and at the end of it she'd have a multi-color selectable blinky that ran off a 9v battery.

So I had her look over my shoulder as I looked up a 7805 schematic online, and explained some of the basics of reading a schematic.  Soldered the first pins myself.  Then handed her the iron.

The first solder joint she did EVER was clean and solid.  In fact, it was neater than most of the joints I do!  My niece is AWESOME.  She also stripped wires...and her uncle showed his great dexterity and skill by puncturing his thumb with one of the ones he prepped.

She did manage to burn her arm (just a white mark, fortunately!) by not paying attention to where the iron was.  Which is also a good lesson, although not the kind you really want to happen.

We built the power supply, used a VOM to confirm it was good, then hooked up the BlinkM and it lit.

But that wasn't enough for me.  I could tell she was fading but we'd made good use of the built-in bus of the perma-proto and that meant we only had three wires to go to add a tiny trim-pot I also had in my box of random parts.  So we added that.

No light.  And the 7805 got hot to the touch.  Oops!  So also a lucky, unplanned, and very useful teaching opportunity.  Pulled the connections from the potentiometer, and in the process discovered a solder bridge across the main power bus.

Put the potentiometer back one leg at a time, each time looking carefully for new solder bridges before connecting the battery, and testing at each stage to see if the thing was still lighting.  She was getting pretty ragged at this point but when we had the color control knob working she definitely felt that had been worth it.

I didn't have a copy of the original software on my laptop, and I told her to turn the knob slowly and map out the various color nodes.

Which, from my memory, are:


And, yeah, the thing is on a perf board and a little big to hang on a shirt.  But that form factor meant she could learn to solder and work with stripping wires and putting parts in holes and diagnosing failures and building and testing modularly.

And maybe she won't do any electronics on the robot she eventually builds.  Maybe it will be all software.  Maybe she'll be focused on the crafts.  But knowing that you can do it, and having a basic familiarity with what it feels like to solder parts to a board and what tools you need is something that will always be a help to you in a whole range of hobby and Maker activities.

So I'd say day well spent.  Next session, I'll bring in a Speech Recognition chip and start teaching her C++ !

1 comment:

  1. As the sister, I have to add my two cents. The kid was beyond thrilled with what she had been able to accomplish, and was particularly proud of the soldering. Takes a patient and understanding teacher to build a robot in a few hours with a 9 year old. Took the thing to the bar to show the grandpa and before the kid could say anything, the grandpa recognized the work of the uncle behind the kid!