Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Algorithms and hardware designs for quadcopters

2,597 views

Published on

Algorithms and hardware designs for quadcopters.
For NTU Open Source Society - TGIFHacks

Published in: Engineering
  • Be the first to comment

Algorithms and hardware designs for quadcopters

  1. 1. Core Algorithms and Hardware Design for Quadcopters Shipeng Xu 30 Jan 2015 ! GitHub.com/BillHsu
  2. 2. MiniQ Size: 9cm x 9cm github.com/billhsu/MiniQ ~1 year to build it
  3. 3. MiniQ - Demo Video
  4. 4. • Hardware • Components! • Schematic • Propeller Installation • Algorithm • Sensor Fusion • PID Controller
  5. 5. STM32! (32bit ARM CPU) Bluetooth SPP! (Serial Port Profile) JTAG Motor ! + Propeller
  6. 6. Barometric Pressure! sensor Accelerometer! +Gyroscope Magnetometer Transistors
  7. 7. • Hardware • Components • Schematic! • Propeller Installation • Algorithm • Sensor Fusion • PID Controller
  8. 8. Micro Controller
  9. 9. Motor Control SI2302, N-Channel MOSFET
  10. 10. Power ME6206 large currents with a significantly small dropout voltage ME6206 voltage regulator
  11. 11. Sensors MPU6050, MEMS Gyro-Accel
  12. 12. Bluetooth SPP
  13. 13. • Hardware • Components • Schematic • Propeller Installation! • Algorithm • Sensor Fusion • PID Controller
  14. 14. Propeller rotation
  15. 15. Rotate
  16. 16. Move forward
  17. 17. Propeller installations
  18. 18. • Hardware • Components • Schematic • Propeller Installation • Algorithm! • Sensor Fusion • PID Controller
  19. 19. Attitude estimation Demo • Android Sensors • Sensor.TYPE_ACCELEROMETER • Sensor.TYPE_GYROSCOPE • Sensor.TYPE_ROTATION_VECTOR(Base line) • WebSocket Client on browser side • Receiving sensor data • Render altitude with WebGL
  20. 20. Accelerometer Gx Gz G
  21. 21. Accelerometer data: acclX, acclY, acclZ
  22. 22. Demo - Accelerometer
  23. 23. Noise :(
  24. 24. Gyroscope • measuring angular velocity
  25. 25. Gyroscope data: gyroDataX, gyroDataY, gyroDataZ integration
  26. 26. Demo - Gyroscope
  27. 27. Drifting :(
  28. 28. Attitude estimation • Accelerometer • Noise • Gyroscope • Drifting
  29. 29. • Hardware • Components • Schematic • Propeller Installation • Algorithm • Sensor Fusion! • PID Controller
  30. 30. Sensor Fusion
  31. 31. Sensor Fusion
  32. 32. Demo - Fusion
  33. 33. Rotation Vector Sensor in Android • services/sensorservice/Fusion.cpp
  34. 34. • Hardware • Components • Schematic • Propeller Installation • Algorithm • Sensor Fusion • PID Controller
  35. 35. Control rotor speed
  36. 36. Demo • Cannon.js • A physics engine written in JavaScript. • WebGL
  37. 37. PID Controller
  38. 38. PID Controller • Proportional(the present error) • Thrust = Error * alpha; • Integral(accumulation of past errors) • integral = integral + error * dt; • Derivative(prediction of future errors) • derivative = (error - lastError) / dt;
  39. 39. PID Demo
  40. 40. PID Controller
  41. 41. Sum up
  42. 42. MiniQ Real-time attitude data 3D attitude visualisation Serialportselection Quadcopter control
  43. 43. MiniQ github.com/billhsu/AndroidAHRSView
  44. 44. Thanks:) • GitHub.com/BillHsu/MiniQ • Android Sensor Server • GitHub.com/BillHsu/SensorServer • WebGL demos: • GitHub.com/BillHsu/GeekCamp2014/ • BillHsu.x@gmail.com

×