Yes, this is another segway clone. This project won't be a success without Andrew Rodger's help. (He helped me to do the platform and other mechanical stuff)
I always want to build a Segway, early this year, I finally finished this project. It's not the greatest Segway clone, but it works.
I thought I can share the code here, hoping it will be useful for someone who want to build his/her own.
If you have any question, just ask.
The brain is Arduion Uno, IMU is the low cost MPU6050.
source code download link (too big to be upload to this site), IDE Visual Studio C++ and Visual Micro:
code download: https://app.box.com/s/mi61vwolslck2i5i5hqy
youtube demo:
PID without a PHD:
http://fabacademy.org/archives/2014/students/shooshtari.ali/week16/images/PID-Without-a-PhD.pdf
The best balance filter/complementary filter explained (IMO):
https://b94be14129454da9cf7f056f5f8.../host/0B0ZbiLZrqVa6Y2d3UjFVWDhNZms/filter.pdf
SG filter
http://en.wikipedia.org/wiki/Savitzky–Golay_filter
getting help with PD turning:
http://forum.allaboutcircuits.com/threads/pid-turning-help-balance-robot.91537/#post-667426
Find center of gravity (wrong approach):
http://forum.allaboutcircuits.com/threads/algorism-to-find-the-centre-of-gravity.69802/#post-484693
battery power motor and PID stuff:
http://forum.allaboutcircuits.com/threads/motor-driver-for-batteries-power-device.91659/#post-668197
deal with DC motor noise:
http://forum.allaboutcircuits.com/t...motor-to-arduino-mcu.90733/page-2#post-667031
some photos:

IMG 2353 by bug13 on All About Circuits

IMG 2235 by bug13 on All About Circuits

IMG 2323 by bug13 on All About Circuits

IMG 2238 by bug13 on All About Circuits

IMG 2295 by bug13 on All About Circuits
I always want to build a Segway, early this year, I finally finished this project. It's not the greatest Segway clone, but it works.
I thought I can share the code here, hoping it will be useful for someone who want to build his/her own.
If you have any question, just ask.
The brain is Arduion Uno, IMU is the low cost MPU6050.
source code download link (too big to be upload to this site), IDE Visual Studio C++ and Visual Micro:
code download: https://app.box.com/s/mi61vwolslck2i5i5hqy
youtube demo:
PID without a PHD:
http://fabacademy.org/archives/2014/students/shooshtari.ali/week16/images/PID-Without-a-PhD.pdf
The best balance filter/complementary filter explained (IMO):
https://b94be14129454da9cf7f056f5f8.../host/0B0ZbiLZrqVa6Y2d3UjFVWDhNZms/filter.pdf
SG filter
http://en.wikipedia.org/wiki/Savitzky–Golay_filter
getting help with PD turning:
http://forum.allaboutcircuits.com/threads/pid-turning-help-balance-robot.91537/#post-667426
Find center of gravity (wrong approach):
http://forum.allaboutcircuits.com/threads/algorism-to-find-the-centre-of-gravity.69802/#post-484693
battery power motor and PID stuff:
http://forum.allaboutcircuits.com/threads/motor-driver-for-batteries-power-device.91659/#post-668197
deal with DC motor noise:
http://forum.allaboutcircuits.com/t...motor-to-arduino-mcu.90733/page-2#post-667031
some photos:

IMG 2353 by bug13 on All About Circuits

IMG 2235 by bug13 on All About Circuits

IMG 2323 by bug13 on All About Circuits

IMG 2238 by bug13 on All About Circuits

IMG 2295 by bug13 on All About Circuits
Last edited: