Kids And Hacking: Blind Robotics

If you are a Hackaday reader, it is a good bet that when you were a kid there was some adult who infected you with the madness you have for science, engineering, tinkering, or whatever it is that brings you here. Maybe it was a parent or a teacher. For many of us, it was a local ham radio operator. But it was probably someone who had the passion for this kind of thing and you caught it.

Paying that debt forward can be very rewarding. Schools and youth organizations are always looking for people to share their passions with kids and at the right age and the right school, you could be that one push that moves a kid off a bad path.

The real problem is what do you do? Kids don’t respond well to long PowerPoint presentations and abstract lectures. I was always taught “to teach, you have to be heard.” The best way to get kids to listen is to engage them in some activity.

I’ve done a little exercise with kids for many years that I wanted to share as a good example of what you can do with limited time and resources. The only special equipment you need is something that will work as a blindfold (like a bandanna or a sleep mask). Everything else you can improvise and you can tailor the exact details based on what you have handy, the age of the students, and the amount of time you have.

Programming Robots with Your Mind

I start off asking the kids about robots. Do they have any (like a Roomba, maybe)? What have they seen in movies? How do robots move? Get them talking with you instead of just listening and you’ve won half the battle. Then I split the kids into at least two teams. The teams should be 4-6 kids, although the more teams you have, the more time you’ll need.

I set a task for a fictional robot. I’ll stand at a trash can or some other handy landmark and say, “I’m a robot at this charging station.” I’ll walk to, for example, a chair and say “I have to go get some water from this water fountain.” Then I’ll pace over to some other easy to find spots and tell them these are plants that need to be watered (two is plenty). Then I will go back to the charging station.

The kids can use a notebook, a flip chart, or a whiteboard to write a “program” which is just the steps required to get the job done in English. You can pick one kid from each team to be the robot and another to be the computer. that controls the robot. If I have older kids or other adults I’ll give each team a “coach” but sometimes I do it and just float between the teams. But here’s the catch: the coach should push at least one team to do an open loop set of steps and another team to go closed loop.

Thinking in Open and Closed Loops

Here’s what I mean. One set of students might write things like “Take 4 steps forward and turn to 3 o’clock.” That’s open loop. Another set might program saying “Walk forward until you touch the table then turn to 3 o’clock.” That’s closed loop.

When the teams are ready the robot gets a blindfold (I usually don’t tell them this in advance). The computer has to read exactly what’s on the program and the robot has to obey. The results are often hilarious. Usually (but not always) the closed loop teams do better.

When it is over, you can review what they learned with them: computers are very literal; sensors are important; the difference between open loop and closed loop control. I might show or mention some other examples. For instance, most 3D printers are open loop (other than the home switches) because price is a factor and stepper motors are very accurate. A toilet uses a closed loop control to operate the water filling mechanism (for the right grade level, discussing the toilet is funny).

Grow the Next Generation of Hackers

If you have an hour with some kids, this is a pretty good exercise and great fun too. You can tailor it to the age (high school kids ought to be able to do a rougher course, for example, and write a more rigorous program).

You might have sworn you’d never go back to school. But doing activities like these with the kids is enjoyable and you never know when one of them will come through town after finishing college with an engineering degree and stop to say thanks.Β Even if they don’t, the satisfaction of paying it forward is worth it. You might even learn something yourself.

21 thoughts on “Kids And Hacking: Blind Robotics

    1. Reminds me of my computer science teacher. He had us to write the steps cooking spaghetti using the Top-Dow method. At this time I was already in programming and kinda bored and I couldn’t wait to write the real code :D.

        1. Tell him, please, that I really love his drawings!

          All he published so far on Hackaday looks incredibly inspirational, bright and endeavor inciting.
          His drawings are an unique form of pure art and talent of the finest quality. Thanks!

  1. This is great. To take it one step forward, I remember attending a conference (I can’t remember for the life of me which one), but the researchers were describing their experiences “simulating” large multi-robot swarm systems with crowds of people. People were given a T-shirts with different colours, and depending on the colour of their shirt, they were given different rule sets that they had to follow. They then would “let them all loose: in a gym while they filmed the whole thing from above to record the resulting behaviour. Their point was that, for the cost of a bunch of pizza, you could prototype a lot of algorithms really quickly. I don’t know how productive it was for them in the end (it’s hard to ensure that the individuals follow your script exactly and don’t start cutting corners), but it would be a great fun to do this with kids.

  2. I have two friends that are both retired middle-school science teachers. They both have said to me, at different times, that if you want to interest kids in science, you have to blow something up in front of them.

  3. Start when they are 10 years old.

    Get the mic and speaker from the old fashion telephone; connect in series mic to speaker to 9v battery over 30ft of cable.

    Play ‘fax machine game’ flashlight in the hand and pieces of paper on the floor on the ‘sender’,
    get kid on the ‘receiver’ (20 ft. away) to follow the sender and drop the objects on the floor (used small sand bags … but pretty much anything not bauncable will work) when they see the flashlight lights up.

    Use flowcharting to describe the detection of the direction of rotary encoder (use linear method on the board first … once the concept ‘clicks’ switch to the rotary).

    Show them PWM on the oscilloscope (perfect time to explain what Hz and duty cycle is).

    NOT, AND, OR gates. Put NOT after OR.

    Bits/bytes/word

    Binary addition of two bytes (with carry)

    Left shift of a byte (with carry)

    Hex

    If you did good job and they get all you have told them then introduce 6800 (http://www.hvrsoftware.com/6800emu.htm) – load accumulator, add then left shift only (or you lose them) observe flags.
    Don’t confuse them with index register, looping etc…. simple load add left shift of values and its effect on the flags is all they need to now.

    If you get a bright kid you can jump him to Arduino at this stage then after couple of months of blinking the light, reading the encoders and potentiometers you can come back to the 6800.

    After a year … NetBeans with Java is a good place to continue.

    Simple robots:
    – 2 geared motors
    – make sure they do all the coding from beginning to end
    – use tank control (2 linear pots – scanned by analog inputs)

    The kid will never be the same…

    Remember you cannot MAKE THEM to like engineering…

    If the kid does not have ‘it’ within him/her nothing you will do will help.
    However … if the kid has ‘it’ within him/her you have changed a life of someone who had no idea what to do in life
    to someone who will always find a way to hack / change and improve the world.
    With a bit of luck this kid will find a cure or apparatus for the (nonexistent yet) old age disease which you will suffer from 40 years from now.

    Get involved with your kids (and their friends) early on…
    Show them how to add/subtract/divide and multiply (school will not teach them this).
    When you in the park show them how to measure the height of the tree by measuring the distance to the tree and angle to the tree top.
    Show them how to draw perfectly square lines in the ground with nothing by the stick and rope (throw in the pharaoh and pyramid story when you at it).
    Get them to measure the volume of hockey puck and banana (for example) by measuring the water overflowing from the jar.
    When changing the tire get a long pipe and get them to use it as a leverage to loosen up the lugs.
    When they wake up get them to measure outside temperature ask them to graph it.

  4. a nice addition to the robot game is to get the kids to first come up with a programming language they all then have to stick to.

    these hands on type games are called ‘computer science unplugged’ and a search will unearth loads of them.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.