Building ESP-1 Balancing Robot

I was always fascinated with balancing robots and wanted to build one myself. Some time ago I started collecting IMU, arduino boards, wheels, motors for other wheeled robots and one day decided to build a balancing robot instead. I’ve used wheels from old four wheel drive robot that used mouse sensors for odometry and was driven by an Arduino Pro mini. That robot never went alive anyway :)

Originally the robot was built using Arduino pro mini and all it could do was balance. I was thinking to add BT module to control it until I discovered that I have ESP8266 lying around. Also I decided to use a better IMU algorithm instead of DPU of the MPU6050. Thus the ESPBalancingRobot was born. It does uses DC motors to balance and no encoders. Speed is being estimated using PWM signal averaging and constant angle is maintained using a double stage PID controller.

The source code for the robot can be found on GitHub.”

Link