The Simplest Bot Possible

Published on 2015-12-02 in Micro:bot.

I knew what I wanted to do with the micro:bit – I wanted to put it into robots and program them in Python. So I decided to start with the simplest thing possible – a two-wheeled robot, with continuous rotation servos and a caster wheel. I only had two criteria for choosing the parts:

  1. I had to have them already, because I only had a few days, and they had to be off the shelf – no salvaged or custom-made stuff, so that it can be replicated easily.

  2. No soldering, laser-cutter, 3d-printer etc. Just two-sided tape and some glue.

I started by gluing everything together with the two-sided tape in several different configurations. At the beginning, I didn’t have the white depron bar to hold the screws, so I simply hotglued them to the servos:

../../../_images/9494211449080532177.jpg

This is actually the only interface the robot has with the micro:bit, because I didn’t have the edge connector for accessing all the other pins yet. But three pins is enough for me – two for the servos, and one for the distance sensor.

After assembling and testing it with some simple code, I noticed that the servos have a lot of problems with the PWM signal generated by the micro:bit. They would basically rotate at maximum speeds in random directions… So I went to the nearby hackerspace and used their oscilloscope to look at the signal. Turns out that you have to set the frequency of the PWM signal several times for it to have the desired effect. After just one time, the frequency is off by an order of magnitude:

../../../_images/2852911449080749124.jpg

But then if you actually start sending a signal and set it again, it becomes correct:

../../../_images/3197871449080840080.jpg

Well, correct apart from some twitching, and it would still change directions randomly. Since I couldn’t find the reason for that in the signal, I turned to the power. And yes, replacing the two alkaline AAA batteries with a 3.7V LiPo battery solved that problem.