Abstract

As most of you know, I am doing a quadcopter from scratch project where I make almost everything from scratch. In doing so, I had to understand the dynamics behind the software/firmware and in order to explain the quadcopter, I can start by explaining a balancing robot. In this post, I explain the build and provide a video demo for the robot. Lets go!

 

The build

I usually build stuff from scrap and recycle what I can and this project is no different. I start with some scrap wood and made a simple box like frame. I trimmed off wood from the sides to reduce weight and to make it a little more presentable. Finally I added some paint and a quick and dirty job later, I have a robot frame.

IMG_20150411_201416.jpg

As you can see, in the above pic, I have some motors and wheels attached as well. I bought the wheels a long time back and the motors were purchased online. These motors are 288RPM 12V rated and have optical encoders so that we can track the distance moved by each wheel. I clamped these motors in place using some sheet metal pieces I cut up from the scrap tin boxes I had. You can use soft-drink Tins etc as a source of the sheet metal and self threading screws to attach them to the wooden base.

 

In order to drive the motors, I am using an L293D motor driver which came from an older robot which lost it's wheels in an accident.

Since we need a place to put the control board, I used a cardboard box and cut out an H shaped plane to sit atop the motor driver floor. The control board itself if an Arduino Uno which I received as a part of the Internet Of Holiday Lights Challenge from Element14 and I made a shield for the MPU9150 breakout board. The image below shows the same shield but on the FRDM K64F board which I was using for the quadcopter.

IMG_9611.jpg

I scraped together some libraries from the internet for the MPU9150 as well as PID control and a few hours of head scratching later, it actually worked! The video below shows the working robot in action.

I had some failures along the way but it was quite easy and only a few hours of work once you know what you are doing. In the next post, I will be sharing some more details on the code as well as things that you need to consider when making one yourself.

 

Cheers,

IP