Balance Bot Build | Maker’s Asylum

Build Groups are a great way to get the community involved in creating something together. Each member of the group has the drive to contribute and be a part of something big, and in a physical setting like the Makers Asylum, helps people get ready access to tools which would not possibly be available at home.

Posts on Facebook for the build group went out, and we met with the participants on a Saturday Afternoon. We went over how the build group is going to progress, what components are going to be used, how the mechanics of balance work, how the human brain acts as a very complex control system, and how a PID helps achieve smooth balance.

Feb 1st-Feb 7th

We worked on creating a laser cut frame for the Balancebot, keeping in mind all the parts that are going to be fit on the bot, holes for routing wires, motor mounts, and pieces that help make levels on the bot become flat and parallel to the ground. This is particularly important, because the bot has an IMU, and it needs to be level. We used inkscape to design it, and the laser cut it on acrylic.

Purchased the motors and all the electronics from the local electronics market, Lamington Road.


February 7th, 2015

Day progressed with the members starting to solder the Mapone. The group did smoke tests of the Blink LED, which confirmed that all is in good shape!

10958839_1056783704348455_5342622854484700537_n 10959856_1056783611015131_2667959998739226061_n 10983395_1056783497681809_6936510510697350485_n



February  14th

We brought all the parts to the group, and explained how the parts will fit together.  These were easy to fit, with all the holes drilled and the joints on acrylic fit really well.


The day started with identification of each component, its role, and testing it out with simple arduino programs. For example, I explained about the motor driver chip, what an H-bridge is, what back EMF is, why we need to have flywheel diodes in the circuit that drives a motor, and the L293d module. We interfaced this module to the arduino, connected the motors, and wrote simple programs to turn the motors clockwise and anticlockwise.


We used a LM2596 buck regulator module, the MPU6050 6 DOF IMU and a L293D motor driver module.



1546259_1062447147115444_6862714872980704416_n 10426076_1062447187115440_406048064052972092_n 10953227_1062447183782107_343978654256532121_n 10996688_1062447140448778_2952246855129121072_n


I spent some time over the week building the Maker's Asylum Balancebot as well. 10959761_1064302350263257_7737300821836095602_n


February 21st

This was a crucial day, we started early at 11 am. The plan of the day was to get the bot on its feet, er,  wheels.

1491654_1065886353438190_393909271905211404_n 1507956_1065886540104838_5151629657841666861_n 10428620_1065886170104875_7497893481804389180_n 10959825_1065886200104872_4472625701371248555_n 11002656_1065886270104865_6456960758097245096_n 11021259_1065886303438195_6616340513791183653_n

Everyone started with seeing if the gyro returned data well, and which axis of the gyro needed to be used, once we had the angle of tilt information, we started to do on/off triggering of motors based on angle. It wasn't a very good control strategy, because the response of the motors was the same irrespective of the magnitude of the angle, leading to wild oscillations. The bot rarely was able to keep up with the change in angle.

One of the groups tried to map ranges of angle to PWM speed of the motors. for example, a smaller angle has slow speed, larger error angle had a larger speed. The response improved, but still wasn't ideal.


We moved on to using the PID library, which is a great way of encapsulating a complex functionality inside a ready library, with good function interfaces.

The groups then tried to tune the library to get a steady response, but by the end of the day, none of them were successful.


The groups took their bots home, and tried to fix the issues with balancing them.


I started to build the balancebot at the Asylum, and that is still a WIP.


Will post a video once I am done with it. Here is a link the Makers Asylum github library where my code commits are done.