Inspiration

We wanted to focus more on hardware hacking than software hacking, because we were more familiar with Arduino and its components than web and app development. We looked into many projects online involving Arduino and Raspberry Pis, but this one caught our attention. We thought it was a beautifully simple project, but challenging and interesting enough to try out for 24 hours.

What it does

The robot uses a 3-axis accelerometer wired to an Arduino to detect changes in height and angle. This data is given to a PID (proportional integral derivative) algorithm, which will tell the servo motors in which direction to move to make the robot balance.

How We Built It

We 3D printed the base and top for the main body. The housing for the Arduino Uno and the battery pack was created by laser cutting acrylic.

Challenges We Ran Into

The most challenging part of this project was to properly implement the PID algorithm so the robot would balance on its two wheels on its own. While we found the appropriate libraries, the trouble was finding the three constants for proportionality, integration, and derivation. One problem was the fact that we were using an accelerometer, not a gyroscope, to give data to the PID algorithm. We round that Segways have 5 gyroscopes. Another issue we had was that the accelerometer was on the very top of the robot, instead of towards the bottom, similar to other projects we found online and to Segways. This made tuning the constants for the PID algorithm incredibly difficult.

Accomplishments that We're proud of

We are proud of the compact and simple casing we had produced for the robot. While the 3D part did not come out perfectly, we are still impressed that we were able to fit the battery pack and the Uno inside the body, and that all the wiring fit on the tiny breadboard on the top.

What We learned

We developed an understanding of PID and the mathematics underlying the principle. We also learned about library interfacing. We also developed skills to program an ATMEGA board directly connected through the breadboard.

What's next for Segway Robot

The next step would be to use a gyroscope, which we believe would more reliably and accurately handle the data going to the servo motors, enabling a greater balance for the robot. Next, we would want to have the robot move forward and maintain balance. Finally, we would want to include an ultrasonic sensor on the front surface to detect obstacles in front and turn to avoid it.

Built With

Share this project:
×

Updates