Self-Balancing Robot using Raspberry Pi 2
I’m working on my first Raspberry Pi 2 Model B project just to test the latest hardware. I will start baby step for this project, learning the Raspberry Pi robotics and beyond I hope.
Here are the parts I bought to start my Raspberry Pi Robot.
- Raspberry Pi 2 Model B with 8GB Micro SD card preloaded with NOOBS. $39.99 at http://on.king.net/raspberrypi
- Tontec® 3.5 Inches Touch Screen for Raspberry Pi Display TFT Monitor 480×320 LCD Touchscreen Kit with Transparent Case for Raspberry Pi 2 Model B and. This is optional but I bought anyway so I have to test the touch screen for Raspberry Pi, cost is $49.99 at http://on.king.net/raspberrypidisplay
- AA Battery Portable Charger Power Pack Power Supply / UPS for the Raspberry Pi Model B / Model B+ / Model A+ Motherboard. Of course you can use any micro-USB cable to power your Raspberry Pi, cost is $14.95 at http://on.king.net/aabattery
- Edimax EW-7811Un 150Mbps 11n Wi-Fi USB Adapter, Nano Size Lets You Plug it and Forget it, Ideal for Raspberry Pi / Pi2. You got to control your robot, let’s go wireless. Hopefully I can make this robot become autonomous, cost is $9.99 at http://on.king.net/edimax
- Kootek GY-521 MPU-6050 MPU6050 Module 3 Axis analog gyro sensors+ 3 Axis Accelerometer Module. This is for self-standing robot feature, cost is $5.99 at http://on.king.net/mpu6050
- L293D Stepper Motor Driver, cost is $6.74 at http://on.king.net/motordriver
- 2WD Motor Robot Car Chassis Kit. I search Amazon for a 2 wheel motor robot car that I can use for this project, cost is $12.88 at http://on.king.net/2wdmotorrobot
- MB102 Breadboard power module + 830 tie point Experiment Mini Breadboard w/Jumper Wires for integration of other parts of the robot, cost is $8.99 at http://on.king.net/jumperwires
- See all the parts of this project at http://store.que.com/listing-category/raspberry-pi/
A sub-total of $149.52, not bad compare to my other robot project (Robot.Guru).
It’s getting close, still waiting for some parts to complete the foundation of my Self Balancing Robot.

Assembled with all the parts … it’s looking good.



Next testing the program.
Testing MPU6050, not responding see below.
pi@raspberrypi ~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: — — — — — — — — — — — — —
10: — — — — — — — — — — — — — — — —
20: — — — — — — — — — — — — — — — —
30: — — — — — — — — — — — — — — — —
40: — — — — — — — — — — — — — — — —
50: — — — — — — — — — — — — — — — —
60: — — — — — — — — — — — — — — — —
70: — — — — — — — —
I need to check the wiring between MPU6050 and Raspberry Pi.
Testing Motors I’ve got some issues. When I test the motors. Only left wheel will spin for 5 secs, in reverse both of them spin for 5 seconds. Right now, a mystery to solve … help anyone!
Still in progress …
Please come back again for updates … use the comment below to post your feedback or suggestions.
Check other robot project at TestRobot.com.
This looks really cool!!!! I am thinking of starting the project as well, I am undecided between arduino and Raspberry pi. Any suggestion regarding that? Did you manage to make it work?
I prefer to use Raspberry pi but you can also use Arduino to make a similar project.