Presentation is loading. Please wait.

Presentation is loading. Please wait.

DISCLAIMER!!!! I AM A N00B! Please do note that everything that I have worked on is subject to questioning.. in fact.. I suggest it. This entire project.

Similar presentations


Presentation on theme: "DISCLAIMER!!!! I AM A N00B! Please do note that everything that I have worked on is subject to questioning.. in fact.. I suggest it. This entire project."— Presentation transcript:

1

2 DISCLAIMER!!!! I AM A N00B! Please do note that everything that I have worked on is subject to questioning.. in fact.. I suggest it. This entire project was a learning experience for me. Ive worked very hard and built this all from scratch. Many of the things Ive learned I want to share with you, and any help or suggestion is good :)

3 What is a Segwii? Seg Wii Seg comes from Segway, which is a product. This is the self- balancing part (where the real coding happens). The Wiimote, aka one of the most hacked products out there. A bluetooth based controller. Libraries out there to interface (almost all open source).

4 Lets talk about the Seg part How do you balance? Lets start simple. 0 X-X Motor pushes the other way based on the angle. Angle measurement based off the accelerometer reading. Torque = angle*gain Gain is a constant based on your setup.

5 Mach 1 (Ghetto bot) MEMS AccelerometerH-BridgeWiring (AVR ATMega128) Cheap Lego Motors Total Cost: $130 (could be as low as $80)

6 But there is a problem!! 0 X-X How do you account for the angular speed you are going at a given angle? Gyroscopic sensor, This will measure Omega, which is angular velocity. Feed this into your torque! What about how fast you are going at that angle? ± X /s ±X /s = W (Omega) Torque = angle*gain + angular velocity*gain

7 Mach 2 (Now were getting somewhere) Wiring (AVR ATMega128) Accelerometer Gyroscopic Sensor H-Bridge Status Lights (Not necessary but helpful) Cheap Lego Motors Total Cost: $230 (could be as low as $180)

8 More problems! The readings from the accelerometer were very noisy! This caused the bot to jitter like mad! Noise and constant assistance needed! Solution: Filter the angle reading! But how? and without putting to much load on the processor?

9 Complementary Filter With many possible filters, this is the most efficient way to filter the angle without having to much processing load. Accelerometer (Angle) Gyroscope (Angular Velocity) Accelerometer (Angle) Gyroscope (Angular Velocity) Low Pass Filter High Pass Filter

10 Complementary Filter Angle = 90%*(Angle + Angular Velocity*dt) + 10%*(Non Filtered Angle) Clean Angle High Pass Constant Previous Clean Angle Angular Velocity Reading from Gyro Time Rate of sampling Low Pass Constant Raw Angle Reading from Accelerometer This integration converts angular velocity to angle. The angle noise is very accurate, but it can drift after a while. Gives you a general area of where the angle is. Low Pass High Pass

11 One problem left! Assistance is constantly needed... The bot may keep itself up for a few seconds but will keep over shooting the 0° mark. Solution? PID Proportional Integral Derivative

12 PID Proportional Integral Derivative PID ProportionalIntegralDerivative Proportional changes torque based on present information, Directly based on angle error. Integral changes torque based on past information, and what has occurred Derivative changes torque based on future trajectory. Pterm = angle_error * Pgain; Everything is error! How off it is from 0° Iterm = (Iterm + (angle_error * Igain)) *.9999; Dterm = (angle_error - old_angle_error) * Dgain;

13 0 X-X ±X /s = W (Omega) Torque = Pterm + Dterm + Iterm + angular velocity*gain Pterm = angle_error * Pgain; Iterm = (Iterm + (angle_error * Igain)) *.9999; Dterm = (angle_error - old_angle_error) * Dgain; One more thing.. AngVelTerm = angvelocity*gain; ± X /s

14 Mach 3 (Balance at last!) Total cost: $300 Could be as low as: $250 So now that its balancing! Lets hook it up to a Wiimote!

15 Wiimote Using the Wiring or Arduino we can interface easily with Processing Why? because they are married! Using the wrj4P5 and WiiRemoteJ Libraries, communication can be established with the wiimote via bluetooth. Wiimote gives computer an angle Computer scales and sends value to segwii via USB

16 Things I hated about this project! Don’t get me wrong, I loved this project.. I just wish a few things were different! 1) The middle man I say.. cut the middle man, give the Segwii bluetooth, and write drivers.

17 Things I hated about this project! 2) Segwii Hardware: - Gyro and Accelerometer need a temperature output - Encoders for the motor, for precise position control - Better motors, with a properly tuned gearbox - Better batteries 3) The drivers I wrote: - Refining the drivers I wrote for the IMU 5DOF (Gyro and Acc) - More precision! - Compensate for temperature, and add self calibration 4) The Wii part: - Based on the demo, you can see that the controls are quite crude, and lot of refining is needed. All of these need time and money...

18 Computer Requirements Segwii GUI is currently available for Mac and Linux. Hardware code IDE works on any OS.

19 I am Wii, and so can you! All the code and hardware is now open source! Help out, donate, or just learn! Code and Schematics, and additional information and support can be found here: http://www.segwii.com Questions? Email me: arko@segwii.comarko@segwii.com

20 DEFCON Any ideas? - Annoyance bot? - Goon Robot? - Robot army? - Robot Server/Control me?

21

22 The End


Download ppt "DISCLAIMER!!!! I AM A N00B! Please do note that everything that I have worked on is subject to questioning.. in fact.. I suggest it. This entire project."

Similar presentations


Ads by Google