google-site-verification: google25d4af7aa2d8937a.html "v=spf1 +a +mx +ip4:67.227.191.15 ~all"

DIY Self-Balancing Robot using balancewii

Yes, you read it right! A bot that knows how to balance. In this post we’ll learn how to make your own Self Balancing Robot using balancewii. 

Components required in this project: 

  1.  Arduino NANO 
  1.  MPU6050 Gyro Sensor 
  1.  HC-05 Bluetooth module 
  1.  A4988 Stepper Driver 
  1.  Nema 17 Stepper motors 
  1.  100mm Wheels 
  1.  Acrylic Sheet 
  1.  150mm Threaded Rods 
  1.  Orange 1500mAh 3S 40C/80C (11.1V) Li-Po Battery Pack 
  1.  6 x 8 cm Universal PCB Prototype Board Double-Side 
  1.  100uF, 50V capacitor 

CIRCUIT DIAGRAM:

Make the connections as shown in the above circuit diagram. We have used a 6×8 cm universal PCB prototype board to solder out the connections.

Note: Check for short circuits using DMM before mounting the hardware.

Basic Connections:

A4 SDA
A5 SCL
D4 ENABLE (both)
D5 STEP1
D6 STEP2
D7 DIR1
D8 DIR2

CONSTRUCTION: 

For the framework, you need 4 x 150 mm Threaded rods.

Three 140×75 mm acrylic sheets for lower, middle and upper platforms.

Drill suitable holes to fix stepper motor on the bottom platform.

Screw tight the stepper motors suing angle support.

Add the frame work rods at each corner of the base platform.

Now it’s time to add the middle platform.

Fix tightly the middle platform and now also add the top platform, fix it using dome nuts.

Place the Li-Po on the base, fix it to place using zip-ties.

Now place the circuit board on the middle platform, the orientation of the board should be similar as shown.

Connect both the stepper motors to A4988 drivers as shown.

Bravo! The structure is ready, Now It’s time to program the Arduino.

PROGRAMMING:

To begin programming the Arduino, we must first download balancingwii firmware for the balancing robot.

This firmware is based on the Multiwii firmware, which is commonly used for quadcopter and multi-rotor flying drones.

Mahowik, who created this firmware, deserves special recognition.

Download the firmware balancingwii by clicking here, then click the green clone or download button.

The firmware will be downloaded in ZIP format to your computer.

Rename the folder containing balancingwii.ino file to “BalancingWii” to avoid compiling error.

Now open the balancingwii.ino file in arduino and compile and upload the code without making any changes.

NOTE:

If your MPU6050 orientation is similar to us, keep the CURRENT_AXIS to PITCH otherwise change it to ROLL.

 BT module should be turned OFF before uploading the code.

APP CONFIGURATION:

We are going to use app called EZ-GUI, It is an Android based Ground Control Station (GCS) for UAVs based on MultiWii and Cleanflight.

  1. Open the app, click on the three dots at the top right corner of screen.
  2. Go to settings.
  3. Click on BT Device to select BT module “HC-05”
  4. Now select the firmware as “Multiwii 2.40” and click next till you reach at home screen.
  5. Click on CONNECT and wait for the app to connect to your BT module.
  6. Swipe left and navigate to settings.
  7. Click on AUX, select ARM, SIMPLE, POS HOLD for AUX1, AUX2, AUX3 respectively.
  8. Click upload and send the data to controller.
  9. Go to PID, alter the values to the one given below and click upload.

Now place the bot at a flat elevation for calibration. Wait till the calibration ends.

Now back from this screen, and click on three dot at top right corner and go to “advance” and then go to “Untested” and then click on “Model control”

NOTE: If you are not able to control your bot try changing the channel to “ROLL” and “PITCH”.

And it’s ready, Use the joystick to run your self-balancing bot.

Play with the settings to learn more about the bot and its working.

That’s it for the blog. Stay safe. Stay tuned at Robu.in

Add a Comment

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