Diy Gyroscope Controlled Robot Using Arduino (In 4 Steps)-

About: An Electronics engineer and a hobbyist. I love to keep experimenting with microcontrollers.

Hey folks I'm Sarvesh and welcome to today's instructable.

This is actually one of my old project and the first one using a Gyroscope module. So I made a bot whose movement is controlled using the gyroscope's roll and pitch movements. The main brain behind this project is the Arduino board. The Arduino after reading the sensor data uses it to give signals to the motor driver. Read this instructable carefully to make this project. And make sure you give it a heart and share it with your friends. Let's begin...

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Here Is the List of Supplies You Will Need to Make This Project -

1. Arduino Uno Board

2. Gyroscope Sensor

3. Motor Chassis

4. Wheels

5. Motor Driver Module

6. Connecting Wires/Male-Female Header Wires

You can buy these components from UTSource.net. They provide good quality components at a very low price. And these components are delivered at your door step in excellent condition and on time.

Step 2: Connecting Everything Together -

The gyroscope module uses the I2C protocol to communicate

with the arduino. So we just need two pins in order to connect the module (SCL and SDA). The motor driver module is connected to the arduino's Digital pin. You can refer the circuit from above. The connections are as follows -

*GYRO >> ARDUINO

VCC >> VCC

GND >> GND

SCL >> A5

SDA >> A4

AD0 >> GND

*ARDUINO >> MOTOR DRIVER

DIGITAL PIN 5 >> MOTOR PIN 1

DIGITAL PIN 6 >> MOTOR PIN 2

DIGITAL PIN 10 >> MOTOR PIN 3

DIGITAL PIN 9 >> MOTOR PIN 4

Step 3: Uploading the Code -

Once all the connections are done, it's time to upload the

code. Make sure you have the wire.h library installed. It is used for communication between the Arduino and the Gyroscope Module.

The robot's movements are controlled through the if else statements in the code. In short the Gyroscope gives it's tilt values to the arduino. Then these values are used by the arduino to move the robot.

Step 4: Working of the Project -

Here is the .gif file showing the working of this project.

As we tilt the sensor forward (pitch), the robot moves forward and as we tilt it back the robot moves back. Similar for left and right. That's it for this instructable. Hope you enjoy making it. If you have any trouble while making this project then you can leave a comment below. I will try my best to help you out. Thank you.

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    Discussions