Monday, March 2, 2020

A Small Robotics Project

Many Halloweens ago my then-five-year-old-son asked if we could make some animatronic zombies for the front yard that would leap out of their shallow graves and chase people.  After an extensive feasibility study that lasted at least fourteen milliseconds, I had to tell him “Umm… no”.

Now he’s eleven and, while he is still interested in robotics, he has tempered his expectations on what can be done with technology from 2020, a limited budget, and little to no access to magic.  I wish more people I have dealt with in the past were that reasonable.  I really do…

So it was no big surprise when he said “Dad, I want to make an animatronic dragon head that blinks and looks around and stuff.  If that works, then maybe we can make a bigger one that has a body and stuff.” I told him “Boy… did YOU come to the right place!  Let’s do it.”

Now, I know the very, very best way to absolutely and irrevocably crush someone’s interest in something is to “start from the beginning”.  Like a kid is going to totally dig a 45-minute lecture on Ohm’s Law or giggle with joy while sorting a bag of random resistors by color code…  Don’t even get me started.

But you gotta put the first stake in the ground somewhere, and I wasn’t going to just build it myself.
I believe the “Hello, World” for robotics is getting a light to turn on and off on command, so we started there.  I kept the “lessons” to 10 minutes or so, with each one building on the last.  Using an Arduino Uno as the base, here’s what we did, day by day:

1) Blinked a light on the Arduino at various rates using changes to software
2) Introduced breadboards, and blinked a light on a breadboard instead.
3) Blinked two LEDs on a breadboard at different rates using changes to code
4) Changed the blink rates using variable resistors on the breadboard instead of software changes
5) Replaced the potentiometers with photoresistors instead.  Now the lights blinked according to how much light fell on these devices.
6) Replaced the lights with an H-bridge and motor combination.  The motor now turned clockwise if the left photocell saw more light, and counterclockwise if the right one saw more light.  Nothing happened if the difference between the two wasn’t big enough (dead zone was programmed into software).
7) Embedded the photocells in a couple of ping-pong balls and glued them to a stalk that was coupled to the motor.

[I tried to embed a short video of it in action in this blog post but there seems to some sort of error with the upload.  Bummer.]

The next step is to Paper Mache a dragon head and embed the disembodied eye-balls into that.  At that point, he wants to stop work on that one (no blinking, he decided) and make a new head that tilts up and down or turns side-to-side in response to touch.  Easy-peasy, buddy.

Stand by for pics of our progress!