Robotics for kids… Obstacle avoidance with an ultrasonic sensor

As the school year was formally coming to a successful end, I set out to show my older daughter – well to explore together – how to avoid obstacles with the maqueen rover chassis and the BBC micro:bit (referenced for the first time in this post).

We first went ahead by flashing the provided example from DFRobot’s web page on the maqueen. Pretty straightforward:

Ultrasonic_Sensor_Rover-v1

microbit-screenshot-1

I then explained in simple terms the way the rover was moving about, and asked her to tell me how she would navigate if she was put in the same situation and under the same constraints. She came up – completely on her own and in her own words – with this:

Ultrasonic_Sensor_Rover-v2

microbit-screenshot-2

After observing how the rover was behaving – while at the same time I was constantly drawing comparisons from “real life”, she immediately corrected herself, and came up with the following (again – in her own words!):

Ultrasonic_Sensor_Rover-v3

microbit-screenshot-3

I was really pleased with the way she was approaching the problem and thinking about the solution!

All three programs are available from my Bitbucket repo.

But this is where the “robotics for kids” part ends!

After playing around for a while and modifying the “obstacle circuit”, I noticed the following:

  1. the distance from the detected obstacle wasn’t repeatable!
  2. at low motor throttle, the rover was sporadically skidding due to the fact one of the motors would go idle for “a split second” and then turn all of a sudden!?
  3. if the rover was approaching the obstacle at a very sharp angle, it would inevitably hit the obstacle!

I have to address this further or at least understand what is going on!?