1 / 22

DISCLAIMER!!!!

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.

Audrey
Download Presentation

DISCLAIMER!!!!

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 :)

  2. What is a Segwii? SegWii 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).

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

  4. Mach 1 (Ghetto bot) Wiring (AVR ATMega128) H-Bridge MEMS Accelerometer Cheap Lego Motors Total Cost: $130 (could be as low as $80)

  5. But there is a problem!! What about how fast you are going at that angle? 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! 0 -X X ±X /s ±X /s ±X /s = W (Omega) Torque = angle*gain + angular velocity*gain

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

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

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

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

  10. 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

  11. PID Proportional Integral Derivative Everything is error! P I D Proportional Integral Derivative 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. Iterm = (Iterm + (angle_error * Igain)) * .9999; Dterm = (angle_error - old_angle_error) * Dgain; Pterm = angle_error * Pgain; How off it is from 0°

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

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

  14. 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

  15. 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.

  16. 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...

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

  18. 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.com

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

  20. The End

More Related