Pages

08 July 2015

Violet: making an introductory Arduino-based "robot" with my 6yr old (1 of 3)

This is part 1 of a 3 part series on building a "robot" of sorts with my 6yr old daughter.
- Part 1 (this post): some thoughts on the overall project, parenting lessons learned, etc.
- Part 2: the technical stuff
- Part 3: the after party
----------

   

Recently, my daughter had the option of participating in a project fair at her school, Somerset Elementary, in St. Paul, MN. When we asked her what she might want to study/do for it, I recalled my wife telling me a few weeks earlier that Felicity (~6.5yrs old) had exclaimed, "You know what I want the most in the world? A robot that could clean my room!"

So I tossed out the idea of making a robot together and she loved it! I'd dabbled with Arduino for perhaps a year at that point, and had an Adafruit sensor pack I hadn't really dug into, so I thought this would be a fantastic opportunity for both of us. I wanted write up a blog post about the experience, as it was as much a lesson in microprocessors as it was in parenting/teaching. The project ranks in my top highlights-of-fatherhood ever!

Here's a little animated gif showing what we ended up with; her name is Violet. Bear with the ice pack on the temperature sensor. I programmed her when it was early spring and my dining room must have been much colder. The heart is supposed to beat very faintly/slowly, gradually increasing to hyper speed as you hold her hand (she gets excited to see you!). With it so much warmer, it just goes crazy all the time and I haven't been able to motivate myself to uncram all the electro-guts out of her and reprogram...




The gist
I had no set plan for the project. I started by learning about how to wire up/read the sensors, primarily via Adafruit tutorials (e.g. fsr, tmp36, photocell). I'd prototype them on a breadboard, make sure I was getting coherent values, and then pair the input with something like and LED fade, RBG LED color change, or piezo speaker. This helped show Felicity what was possible and demonstrate the idea that changes in a sensor could be indicated with some sort of output.

We ended up settling on four inputs and outputs:
- Inputs: force sensitive resistor, photo resistor (light sensor), temperature sensor, rotary encoder
- Outputs: single color LEDs, RGB LED, speaker, servo motor


Formal learning
My wife stays home with our three kiddos (~6, 4, and 1) and took on the task of finding various robotics and electronics books and videos from the library. Felicity read a bunch of books with the two of us (moreso with Amanda), and I found a great Bill Nye episode on electricity along with various videos showing how robots are applied in the real world (e.g. automated manufacturing, the awesome Big Dog robot from Boston Dynamics, etc.).

I think the hands-on stuff we did provided a lot more opportunity for impromptu questions and learning, but the books/videos certainly helped with getting her exposed to some terminology like conductor, insulator, resistor, current, voltage, watt, and the like.


Our informal dialogs

There are so many levels to learning... how do you take something like electricity and make it accessible to a 6yr old mind? This is an interesting problem in general, and I think teaching starts with really basic models (and thus "wrong," in a sense), replacing/updating them later in life as the brain/background knowledge can handle more. Works well enough, so that's what we did.

I used the classic electricity-as-water-in-hose analogy, which seemed to work great, especially since Felicity was aware of what a kink in a hose does (thanks to my wife's love of gardening). I didn't do as much with trying to convey voltage as pressure or current as flow rate... mostly I just pointed out that electricity in a wire is like water in a hose, and that a kink slows things down (a resistor).

For the Arduino/inputs/outputs, I found the analogy of human perception to work pretty well. Our dialog was something like this:

----------
- Me: So, you know how you can feel and see and hear things?
- Felicity: Yeah.
Me: Well, your robot doesn't have skin and eyes and ears like you do, so we have to give it senses with these (illustrating the sensors we'd played with). The sensors pretty much all work the same. Want to know how?
Felicity: Sure.
Me: What happens if I kink a hose?
Felicity: The water stops.
Me: Right! So, what if I had you watch the end of a hose, turned the water on, and then I went around the corner. Let's say I'm around the corner and as you're watching, the water stops. What do you think happened?
- Felicity: Maybe you're kinking the hose?
Me: Exactly! And that's pretty much all that's happening here. I'm like the sensor, and you're the "brain" (how I'd beenn referring to the Arduino). You send some water down the hose and watch how much comes back. If it changes, something's happening with the sensor.
Felicity: Oh.
Me: Programming the brain is like saying, "Alright Felicity, when you see the water stop, I want you to run around the house as fast as you can!" And that's all we're doing. We have the brain watch the electricity, see how much comes back from the sensor, and do something if it sees a change.
----------

That seemed to work pretty well. Best of all, I later learned that one of her books defined a robot as "A machine that can sense, think, and act." It dovetailed perfectly with how I tried to get things across (finding it easy to draw analogies to how humans sense, think, and act as illustrated above). Neato.


Parental impulse control
I think I might have learned more from the project than Felicity. She just started kindergarten, so this was the first foray into the world of projects and assignments for our family. It was also my first activity with her where I had some "skin in the game" (people were going to see our creation at some fair in the future).

I was surprised by just how many "Hey, wait. Stop, Just let me do that" impulses that came up. And what to do about them? Generally they occurred when she was going to mess something up. Like trying to cut foam with a coping saw, or holding the button of the spray paint can without moving it (drips). Do you just let them wrestle with it and churn out something sort of mangled? Do everything for them and risk them learning nothing or feeling like you don't think they're capable? Is it better to let them churn out some a la Jim Carrey's "goose" outtake all by themselves, or watch a parent make the most technically perfect origami crane?

I took the middle ground. I wanted her to love the end result, as I hoped that being excited and happy about the robot would help her want to do more vs. feeling like everything was hard and awful. But I also wanted her to understand that making nice things take a lot of work. My primary (maybe only) rule was, "When I'm working, you're working." I had a pretty loose definitely of "working," and "watching dad" certainly qualified during the tricky parts. The point was that we were together. She wasn't coloring in princesses and flowers while dad was toiling on the project. In fact, I think the only times I worked on my own were late nights trying to figure out why in the world my code wasn't working, or wrestling with wiring optimization and cramming the rat's nest into the body.

Some practical illustrations of this "middle ground" were:
- I held the top of the coping saw to ease her from pushing forward too much and to steer it a bit; she could just focus on up and down motions.
- She primed the foam body with a brush by herself (she's used brushes, low risk). For the first coats of spray paint she pushed the button and I held/moved her arms to give her the gist of sweeping back and forth. I sprayed the last coat to keep everything wet so it would be nice and shiny.
- I rough sanded saw cuts and other big areas to knock them down flat (sanding foam is pretty awful and slow). Then I'd give her the pieces and she sanded all square edges into nice smooth fillets.

I also tried to monitor "meltdown" events. I had lots of those as a kid. Not tantrums, just intense experiences of frustration upon something not turning out, ruining a project, struggling to understand a new concept, not getting a piano piece right, and so on. That teary eyed feeling when things are just not going your way. Any time it seemed like we were anywhere near that cliff, I offered assistance or we just stopped for the day. I think at later ages, these experiences are quite formative (learning to push through the "ick," or accepting that you need to redo something to get it right), but at this age I'm not ssure it would have helped anyone involved.


What did she enjoy most?
I tried to pay attention to when Felicity really "came alive" during the project. This turned out to be pretty simple. First, it was not watching dad do something mundane (sanding, soldering, futzing with wires) or incomprehensible (staring at lines of code or reading through a tutorial). Basically, not being involved was understandably not engaging and I could tell she was more distracted/restless.

Anything in which something her actions caused a change right before her eyes was a gold mine of excitement. Her feeding solder and getting to watch it melt and re-solidify. Stripping wires. She is huge into stripping wires. Painting. Drilling the holes. Plugging in some wires and seeing the lights turn on. When her effort was in direct control of the resulting appearance/form was thrilling to her.

I guess this isn't that earth shattering. Who likes sanding down all the nooks and crannies of a table to refinish it? Re-staining it, or better yet, putting the final coat of finish on it and knowing you're 1 step away from a hard earned masterpiece is exhilarating.


Overall thoughts
The first comment I often hear when I mention that "Felicity and I are making a robot for her first school fair," is (accompanied by a winking eye), "Oh, you mean you're making a robot for her project fair." Well, yes and no.

The surface-level reality is that my 6yr old does not have the capacity to learn about electronics and sensors from scratch in a couple of months and whip up a robot. I never thought of it like that during the project -- would I expect her to? I was far more blown away by what she could take on and learn, and perhaps most of all by the simple reality of her persistence and interest in a singular thing over a solid couple of months.

So, I admit it: Felicity still can't code in C or wire up an atmega328 on a breadboard. But I had two months of near daily impromptu questions and discussions about electricity, sensors, physics and the world with my 6yr old daughter. And that's part of my motivation for writing this all up on a blog -- it feels like I stumbled blindly into this magical opportunity that had so many more wonderful facets than I could have imagined. It's my hope that if others find this they can intentionally recreate it (if so inclined). If there had been no school project... would I have thought about doing something like this or have actually done it, at least at this age? I'm thinking not, and that would have been a huge loss!

To date (and maybe aside from things like actual birth events), this is in my list of top parental experiences ever. While I'd like to think I won't love my kids any more or less based on their techie inclinations, it was such a joy to work on something in this genre with my daughter. It pushed me to learn on the side in order to be ready for the next day's "session" (no fun watching dad figure out why something isn't working when you should be making progress!), taught me a lot of patience, and was an incredible bonding experience. Just a treat all around!

She made me this when we were done :)



Alright, if you made it through all that and want to learn about the guts of the thing, go on to part 2!

No comments:

Post a Comment

formatting help: <i>italics</i>, <b>bold</b>