Share this project


Share this project

A low-cost, open-source, Arduino-compatible balancing robot for learning, hacking and delight
A low-cost, open-source, Arduino-compatible balancing robot for learning, hacking and delight
138 backers pledged $18,174 to help bring this project to life.

Linear robot motion, finally

Posted by Chris Hakim (Creator)

Here is a video of Lil’Bot running in a square figure, showing its ability to stop, go and turn:

Now the work is mostly cleaning up the code and adding various bells and whistles, which are already working as separate bits, such as the proximity sensor, sounds, etc. There is also the motor hurdle, not quite over (see my last update).

The Arduino code is very messy, so I am not ready to put it online just yet. But if anyone wants to take a peek, please contact me.


Only backers can post comments. Log In
    1. Robotics Today on

      Hi Chris,

      Great progress. Nice to see the video.



    2. Chris Hakim Creator on

      I think not. Whether one is combining torque mechanically or electrically, one still faces the problem of conflicting needs, such as rolling forward and balancing backward.
      In order to make the robot move forward, I make the target angle slightly forward from the balance point. This causes the balancing algorithm to make the wheels go forward to regain balance. The target angle must then gently ease back to the equilibrium, so that the robot does not accelerate indefinitely, based on a certain maximum speed. At cruising speed with no acceleration, the tilt is in principle the same as at rest. In the Arduino code, going forward is accomplished thus:

      tiltForMotion = 0.035 - 1e-3 * (double)wheelSpeed;

      The variable tiltForMotion is then added to the target balance angle. The 0.035 bias is in radians. That’s about two degrees forward, and more if the wheels happen to be going backward.

    3. Missing avatar

      David Penney on

      Very good progress!
      Would it be easier if a second set of motors were used to focus on being upright whilst the existing motors focus on movement?
      Both operating on the same axle?