Saturday , November 17 2018

Arduino Self Balancing Robot – Smartphone Control

This tutorial will show you how to build arduino self balancing robot. This Self Balancing Robot is a Two-wheeled Robot that balances vertically using a closed-loop algorithm. This Self Balancing Robot Features various modes like Position Hold, Simple Mode, Rise Mode and Joystick Control. This Robot is controllable by a Smartphone device or a Transmitter. Self Balancing robot uses data from the Accelerometer and Gyroscope to correct its orientation and position.

Objective

The objective of this project was to design and implement a self- balancing algorithm using the Cricket embedded processor. The implementation utilized both an accelerometer and a rate-gyroscope built into the micro-controller in order to achieve a vertical balance. The fusion of both sensor data into a single usable value was achieved through a complementary filter. Consequently, the output of the complementary filter was designed to be primarily dependent on the gyroscope data, to which a fraction of the accelerometer data was added to compensate for the gyroscopic drift.

Arduino self balancing robot

An 8-inch robot with a single plate aluminum chassis was powered through a high-current H-bridge circuit connected directly to the Cricket board. The control loop, which included both the software implementation of the complementary filter and the PID controller, was measured to run at 530 Hz (±20Hz). Additionally, a pulse-width-modulation signal generator was implemented in software using the interrupt service routines of the micro controller. Consequently, this resulted in a robust code-base which was able to achieve a self-balance with an oscillatory amplitude of 1 cm (± 0.3 cm) and a balance time of about 15 seconds.

How Does Robot Self Balancing Works?

For self balancing of robot, the motors must stop robot from falling. This action requires feedback and correcting elements. The feedback element is the MPU6050 gyroscope and accelerometer. They both gives acceleration and rotation in all three axes. The Arduino uses this to know the current orientation of the robot. The correcting element is the motor and wheel combination.

arduino self balancing robot
Self Balancing Robot Using Arduino

Hardware

  • Arduino Nano (atmega328p)
  • MPY6050 gyro-accelerometer (GY_521)
  • 2 x NEMA 17 Stepper Motor
  • 2 x A4988 Drivers
  • Lipo Battery
  • HC-05 Bluetooth Module
  • GY-521 Module
  • Prototype Board
  • 10 cm Wheels
  • M5 Rod
  • Angle Brackets
  • Screws and Nuts
DETAILED DATA & CODE

Download the complete guide over making it from the link given below: 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.