|
|
Zeile 1: |
Zeile 1: |
| {{Projekt | | {{Projekt |
| |projectname=Self Balancing Scooter | | |projectname=Self Balancing Scooter |
− | |kewords_de=
| + | |subcat=Mobility, Logistics |
− | |kewords_en=
| |
− | |kewords_es=
| |
− | |subcat=Projects | |
| |Images={{ProjektImages | | |Images={{ProjektImages |
| |projectimage=177.1.jpg | | |projectimage=177.1.jpg |
Zeile 17: |
Zeile 14: |
| }} | | }} |
| |firstin=http://members.optusnet.com.au/~a4x4kiwi/scooter/ | | |firstin=http://members.optusnet.com.au/~a4x4kiwi/scooter/ |
− | |desc=<h3>Building an Open Source Self Balancing Scooter</h3><h4>Malcolm Faed</h4><br/><br/><h4><b>Copyright: </b>This document may only be reproduced with the author’s permission.</h4><h4>Introduction</h4><br/>In recent times, advanced electronic systems have become cheaper and cheaper and at the same time become more complex. The price of the components are now within reach of the hobbyist (e.g. Gyro and Accelerometer). This allows more complex systems to be built at relatively low cost. And most important these advanced technologies can be used by individuals and hobbyist where they were previously only available to more wealthy individuals and corporations.<br/><br/>This is also an excellent example of that brings together people from different continents and backgrounds to develop a common product.<br/><br/>This is a project I had contemplated for quite a few years since first seeing the on the Internet. I saw and had a ride on Geoffrey Bennett's home made scooter at the in 2007 in Sydney. he also offered the source code on his web site which was going to be the hardest part for me.<br/><br/>This project marries several of my passions, Electronics, Mechanics, Control Systems and Software.<br/><br/>Obligatory warning. Build this at your own risk. If you injure yourself or any one else its not my fault.<br/><br/><h4>Parts List</h4><ul><li>Wheels with motors and reduction gearboxes - Electric Wheelchair - AUD$100</li><br/><li>12mm Plywood to stand on and to hold the electronics - Free</li><br/><li>Batteries (3 x 12 volts) - Free with Wheelchair</li><br/><li>PWM motor controller - Locked Anti-phase for 2 motors - AUD$280</li><br/><li>Sensors - Accelerometer and Gyro - USD$114.95</li><br/><li>CPU - Atmel ATMega16 - AUD$43.76</li><br/><br/><li>RC Joystick</li><li>Misc cable and connectors.</li></ul><br/>Total ~ AUD$550<br/><br/><h4>Chassis</h4><br/><ul><li>(Russell Cragg)</li><li>Old electric wheelchair, cut chassis with grinder cutting wheel to suit</li><li>Has 2x 24v motors already conveniently attached.</li></ul><br/><br/><h4>Batteries</h4><br/><ul><li>Conveniently from old electric wheelchair</li><li>36 volts total</li><li>3 x 24ah, 12volt SLA batteries.</li><li>Charged in parallel, run in series.</li><li>60A circuit breaker doubles as a switch</li><li>Position the batteries in such a way that the scooter is naturally balanced when unpowered.</li></ul><br/><br/><h4>Motor Controller</h4><br/><ul><li>IBC From RoboWars.</li><li>Two x 50Amp MOSFET controllers</li><li>Replaced micro with Atmel ATtiny2313 and firmware to give locked anti phase control instead of default RC PWM inout ()</li><br/><li>Low dropout switching regulator</li><li>Regenerative braking (inherent from locked anti phase motor control)</li><li>Australian design and open source</li></ul><br/><br/><h4>Microprocessor</h4><br/><ul><li>Atmel ATMega16</li><li>8 bit</li><li>16k Flash</li><li>8MHz Clock</li><li>512 Bytes EEPROM</li><li>JTAG</li><li>ISP</li><li>3 Timer - Counters</li><li>8 channel 10 bit a-d</li><li>Hardware USART</li><li>32 IO lines</li><li>Many other features</li><li>Development in AVR-GCC</li><li>Prototype board from</li></ul><br/><br/><h4>Sensors</h4>Gyro and Accelerometer from<br/><br/>Which way is up?<br/><div>ADXL203 Precision ±1.7 g Single/Dual Axis Accelerometer 1 v/g</div><br/><br/>How fast am I tipping?<br/><div>ADXRS401 ±75°/s Single Chip Yaw Rate Gyro with Signal Conditioning</div><br/><br/>Current Sensor - hall effect device and iron core.<br/><br/><h4>Software</h4><br/><ul><li>Developed with AVR-GCC</li><li>Reads the analogue inputs</li><li>Drive the motors</li><li>Read from RC receiver</li><li>Write and read the serial port for logging and tuning</li></ul><br/><h4>Balancing</h4><br/><ul><li>If the robot is leaning, drive the wheels in the direction of the lean</li><li>f you lean more, go faster</li><li>This is a control systems problem:</li><ul><li>input variable is the platform angle</li><li>output variable is motor speed (PWM). 50% duty cycle is stationary.</li><li>by controlling the motor speed and direction, keep the platform horizontal</li></ul><li>Attempt to keep the platform angle zero</li><ul><li>output = Kp x input + Kd x input’ + Ki x input dt</li><li>Proportional — if you lean more, go faster</li><li>Derivative — if you lean quickly, go faster</li><li>Integral — if you’re still leaning, go faster</li></ul></ul>(Adapted from Geoffrey D Bennett presentation)<h4>Turning</h4><br/><br/><ul><li>Joystick for input (also RC)</li><li>Speed up one wheel one wheel</li><li>Slow down the other wheel.</li><li>Turn faster when stationary. Turn slower when traveling.</li></ul><ul><li>Accelerometer and gyro must be in center between the wheels otherwise it senses turning as tipping.</li></ul><br/><br/><h4>Measuring the platform angle</h4><br/><ul><li>The Gyro input gives the angular rate but it drifts a lot</li><li>The Accelerometer input gives the acceleration due to gravity and due to the scooter accelerating</li><li>When the scooter is not accelerating, the inverse-sine of the accelerometer input gives us angle</li><ul><li>This isn’t very precise</li><li>It is susceptible to vibration</li><li>But it doesn’t drift</li></ul><li>How to combine them?</li><ul><li>The Gyro input averaged over time should be zero</li><li>This lets the software adjust for drift</li><li>We assume initial angle is given by the accelerometer</li><li>Track angle changes with the gyro</li><li>If the tracked angle is different to the angle from the accelerometer, track towards it slowly</li><li>Subtract any acceleration force we apply to the motors from the accelerometer reading</li><li>When moving, rely less on the accelerometer reading</li><li>sin(x) ~ (for small x) This omits the need for Trigonometry in the software.</li></ul></ul><br/>(Adapted from Geoffrey D Bennett presentation)<br/><br/><h4>Over Speed</h4><br/><ul><li>At some point, the motors can’t go any faster</li><ul><li>Then you fall, because the wheels can’t keep up with you</li></ul><li>Solution: before that happens, “push back” on the rider by making the wheels go even faster</li></ul><br/>(Adapted from Geoffrey D Bennett presentation)<h4>Misc.</h4><br/><ul><ul><li>In the first few seconds of running, slowly ramp up to avoid lurching.</li></ul><li>Voltage Reference - ADXRS401 has a 2.5V precision output</li><ul><li>Used to measure regulator voltage and scale inputs appropriately</li></ul><ul><li>Use a-d to measure battery voltage and scale outputs appropriately to compensate for discharging battery</li></ul><li>Tuning</li><ul><li>Uses Perl-GTK on Linux with graphical UI in Linux from Geoffrey Bennett.</li></ul><br/><li>Tipped</li><ul><li>If the platform angle is “too large”, shut down</li></ul></ul><br/><p>(Adapted from Geoffrey D Bennett presentation)</p><h4>Future Improvements</h4><br/><ul><li>Better Heat sink for MOSFETs</li><li>Over current monitoring (LED)</li><li>Low battery voltage warning (LED)</li><li>Detect when rider not present / Present and adjust balance parameters accordingly</li><li>If the kill or dead-man switch is tripped, shut down</li></ul><br/><h4>Links, credits and inspirational people.</h4><p>This project would not have been possible without the assistance of the following people.</p><p>Geoffrey D Bennett - for the source code and tuning software</p><br/><br/><p>Trevor Blackwell</p> | + | |typeproject=TUBerlin |
| |lang=English | | |lang=English |
− | |typeproject=TUBerlin
| |
| |project_status=Inactive | | |project_status=Inactive |
| |maturity=production / DIY | | |maturity=production / DIY |
| + | |cad_files_editable=No |
| + | |assembly_instructions_editable=No |
| + | |bill_materials_editable=No |
| + | |free_redist_allowed_licence=No |
| |open_o_meter=1 | | |open_o_meter=1 |
| |product_category=Vehicles & Parts | | |product_category=Vehicles & Parts |
Zeile 27: |
Zeile 27: |
| |original_elect_h=No | | |original_elect_h=No |
| |original_soft=No | | |original_soft=No |
− | |cad_files_editable=No | + | |desc=In recent times, advanced electronic systems have become cheaper and cheaper and at the same time become more complex. The price of the components are now within reach of the hobbyist (e.g. Gyro and Accelerometer). This allows more complex systems to be built at relatively low cost. And most important these advanced technologies can be used by individuals and hobbyist where they were previously only available to more wealthy individuals and corporations. |
− | |assembly_instructions_editable=No
| + | |
− | |bill_materials_editable=No
| + | This is also an excellent example of [http://p2pfoundation.net/About_The_Foundation Peer to Peer Development] that brings together people from different continents and backgrounds to develop a common product. |
− | |free_redist_allowed_licence=No
| + | |
| + | This is a project I had contemplated for quite a few years since first seeing the [http://www.segway.com Segway] on the Internet. I saw and had a ride on Geoffrey Bennett's home made scooter at the [http://www.linux.org.au/conf/2007/ Linux Conf] in 2007 in Sydney. he also offered the source code on his web site which was going to be the hardest part for me. |
| + | |
| + | This project marries several of my passions, Electronics, Mechanics, Control Systems and Software. |
| }} | | }} |
| {{ProjektLink | | {{ProjektLink |