Tuesday, 10 June 2014

Measuring Tilt Angle with Gyro and Accelerometer

Background knowledge

         Basic understanding on how the Segway works is; when the IMU is tilting to a certain angle, the accelerometer give command to the stepper motor to tilt to the respective angle. The gyro sensor reacts by giving command to the motor to tilt the angle to the reference position.

          The main and most complicated issues of self-balancing Scooter are the sensors. The sensors are very important as they give us the inclination of the bar regarding the base and the speed of its angle change. For this kind of scooter, we need an accelerometer and a gyroscope. The combination of these two devices provides us of very precise results because the error of one is cancelled by the other and vice-versa. In short, we could say that the gyroscope tells the short-time reading and the accelerometer the long-time reading.




This is the latest circuit which has Stepper motor, Arduino Uno, motor driver L293N and IMU sensor in the bread board. Using complementary filter for combination of gyro sensor and accelerometer is programmed into Arduino Uno and Stepper motor also.

this program is using Complementary filter which is easy for beginner but recommended to use Kalman filter that much more better so that it can more precious. PID control is needed to control the output of stepper motor but I didnt include it into it because I am still working on it. Hope this will help you!

a. Do the initiation for Arduino.


b. Set up the formula for angle and initiate LCD screen to read the data.


c. Plan the angle for the sensor angle and the reaction of stepper motor.


Process Flow Chart



References
1. http://www.ele.uri.edu/courses/ele205/Arduino%20-%20Learning.pdf
2. http://arduinotutorials.blogspot.com/
3. http://www.instructables.com/id/Accelerometer-Car/
4. http://www.instructables.com/id/Use-an-Accelerometer-and-Gyroscope-with-Arduino/
5. http://retardokiddo.blogspot.com/2010/09/arduino-processing-adxl330.html
6. http://www.nuclearprojects.com/ins/info.shtml

No comments:

Post a Comment