Software

Software for the self balancing robot

Obs! This software is based on having a control-panel on it, to load parameters from. Have that in mind when trying to understand the code.

 

Main Code — > Arduino Mega

6 reaktion på “Software

  1. Would appreciate your code. Which accelerometer/gyro did you use?
    I just purchased the MCU6050. I hope I can use it. I built the following, but it is very unstable and erratic.

    ”http://www.instructables.com/id/Self-Balancing-Segway-Instructabot/”

    Thank you!

  2. Hi Librav! Im using an IMU (Internal Measurement Unit). Arduino has libraries for some of the IMU cards and it simplifies the coding. One just need to add the library and the IMU ”spits” out the angle, very simple and nice! When using Gyro and Accelerometer, in order to combine these to get an angle one must use complementary-filter or Kalman-filter.

    So my suggestion is to use a 6DOF or 9DOF IMU. I bought one on e-bay search for ”9DOF sensor stick” I will upload the sensor-card on ”hardware” and the code as soon as i can!

  3. I measure the angle with a IMU-card. And I use the I2C-bus to read the sensor values. The controller that I use is an Cascade connected PID controller. And also a PID-controller for wheel-speed. I will update the software-side soon. But you can read about the sensor in ”About the sensor and hoe to connect it”. There is also some test code that one can test the sensor with :)

  4. Yes, my intention is to share the code. I need to clean it up first, lots of old cod in it :) But I will upload the code.

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *

Följande HTML-taggar och attribut är tillåtna: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>