Robotics: Inchworms with Motivation

Inchworm robot

As a teacher of relatively hands-on subjects, I regularly get roped into running sessions with groups of Year 6 students coming in for Orientation Days. Since getting my first batch of Micro:bits I have been running short sessions with physical computing since it's short and accessible, and the kids can achieve something concrete by the end of a 45 minute session.

The last couple of years I have been running sessions using laser cut Inchworm robots, where students hook up a servo, battery, and infrared sensor (to demonstrate external sensing but also to remove the need to fiddle with buttons on moving objects) to the Micro:bit, and then write some basic code investigating ideal angles of movement for the servo, delay time in between moves, and utilising loops.

Inchworms That Are Afraid of the Dark

This year I decided to give my Inchworms a bit of a story, removing the infrared sensor and adding a light sensor in the form of a light dependent resistor (LDR). I know the Micro:bit has a light sensor built into it, but it introduces students adding external sensors, and also allows for the sensor to be pointing in any direction I choose.

The key factor in this activity is that students can test out their basic coding and get their robots moving, but when finished, can place them under desks and watch them struggle to get out, stopping when they hit light, or turn off all the lights and have them all activate at once.

I accidentally triggered the whole class' robots when transitioning between sessions by turning off the lights so students could see the projector, only to have all the dormant robots (still with the previous group's code) go nuts. It was glorious.

Here are the relevant files if you'd like to build your own or modify the plans:

I've provided a couple of different designs for the front claws. I've found the saw edge versions quite effective on carpet, but I just think the other ones look cooler.

Fusion sketches of the Inchworm
A screenshot of the Fusion 360 sketches.

The materials I use are:

  • 3mm MDF
  • 10kOhm Light dependent resistor
  • 10kOhm resistor
  • 180 degree 9g servo (90 degree would work fine too)
  • DFRobot Micro:mate addon board (supplies 5V to the servo)
  • 2000mAh power banks (I use $5 Keji ones from OfficeWorks here in .au)
  • Some stiff wire to connect the servo horn to the front face, and make the hinges (not the best material, but it works - I bought a bundle of ~2mm fencing wire in straight lengths and use it for all sorts of things)