geek camp 2014: game of drones - algorithms and hardware designs for quadcopters

39
Algorithms and hardware designs for Quadcopters Shipeng Xu 18 Oct 2014 github.com/BillHsu

Upload: shipeng-xu

Post on 06-Jul-2015

254 views

Category:

Engineering


4 download

DESCRIPTION

For Geek Camp 2014.

TRANSCRIPT

Page 1: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Algorithms and hardware designs for Quadcopters

Shipeng Xu 18 Oct 2014

!github.com/BillHsu

Page 2: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

MiniQ

Size: 9cm x 9cmgithub.com/billhsu/MiniQ

~1 year to build it

Page 3: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

MiniQ - Demo Video

Page 4: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Barometric Pressure!sensor

Accelerometer!+Gyroscope

Magnetometer

Transistors

Page 5: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

STM32!(32bit ARM CPU) Bluetooth SPP!

(Serial Port Profile)

JTAG

Page 6: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Yaw Pitch Roll

Page 7: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Propeller rotation

Page 8: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Rotate

Page 9: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Move forward

Page 10: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Propeller installations

Page 11: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Stabilization

Page 12: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Attitude estimation• Demo

• WebSocket Server on Android

• “Rotation Vector Sensor” data

• WebSocket Client on browser side

• Receiving sensor data

• Render altitude with WebGL

Page 13: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Accelerometer

Gx

Gz G

Page 14: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Accelerometer data: acclX, acclY, acclZ

Page 15: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters
Page 16: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Demo - Accelerometer

Page 17: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Noise :(

Page 18: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Gyroscope• measuring angular velocity

Page 19: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Gyroscope data: gyroDataX, gyroDataY, gyroDataZ

integration

Page 20: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Demo - Gyroscope

Page 21: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Drifting :(

Page 22: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Attitude estimation

• Accelerometer

• Noise

• Gyroscope

• Drifting

Page 23: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters
Page 24: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Sensor Fusion

Page 25: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Sensor Fusion

Page 26: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Demo - Fusion

Page 27: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters
Page 28: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters
Page 29: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Rotation Vector Sensor in Android

• services/sensorservice/Fusion.cpp

Page 30: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Control rotor speed

Page 31: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Demo• Cannon.js

• A physics engine written in JavaScript.

• WebGL

Page 32: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

PID Controller

Page 33: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

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;

Page 34: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

PID Demo

Page 35: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

PID Controller

Page 36: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Sum up

Page 37: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

MiniQReal-time attitude data 3D attitude visualisation

Seria

l por

t sel

ectio

n

Quadcopter control

Page 38: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

MiniQ

github.com/billhsu/AndroidAHRSView

Page 39: Geek Camp 2014: Game Of Drones - Algorithms and hardware designs for Quadcopters

Thank you:)Demos can be found@

https://github.com/billhsu/geekcamp2014/ Demo videos can be found @

https://www.youtube.com/watch?v=AYtps6Gd9b0&list=PL-0UH2MdcDCfnZyLsbi_pZnb6fK4Vb9an