Drone control: Difference between revisions

From Rsewiki
 
(42 intermediate revisions by the same user not shown)
Line 7: Line 7:
== Hardware ==
== Hardware ==


== Drone software ==
Build on a hand-wired PCB as a prototype


== Propeller - motor performance ==
[[Drone control hardware]]
<!-- [[File:schematic_rev0.png | 150px]] -->


Measured with the app below, using the motor 3508-700KV Turnigy Multistar 14 Pole Brushless and a 14x5.5 carbon propeller.
== Drone software ==
The ESC is a Hobby-wing x-rotor 40A controller.


=== Time responce ===
[[Drone firmware]]


[[File:3508-700-14x5.5-11v.png | 600px]]
== Magnetometer calibration ==


With 11 V supply (3 lipo cells).
Calibration is used using a calibration version of firmware and a calibration app from Prop Shield manufacturer.  
From 1.1ms to the ESC (idle) to 1.9ms almost full throttle. The ESC update frequency is 400 Hz.


[[File:3508-700-14x5.5-15v.png | 600px]]
[[Drone compass calibration]]


With 11 V supply (4 lipo cells). note that 30 amps is not sustainable, the motor gets hot fast.
== ESC calibration ==


=== Trust 3508-700 14x5.5 ===
The drone control uses ESC pulse width from 1 to 2 ms, and all ESCs should be calibrated to use this range.


Transfer gain measurement from ESC pulse width to trust.
[[ESC calibration]]
The Hobby Wing controller is calibrated to 1ms=off, 2ms=full power.


[[File:trust-3508-700_14x5.5.png | 600px]]
== Propeller - motor performance ==
 
Normal size propeller (14x5.5) for the motor. The translation for ESC pulse to trust is almost linear.
The trust increases with the square of the rotation speed, but drag increases with power 3 of the rotation speed, so end result is almost linear.


Data for the graph above is
[[Drone motor performance]]
% Measurement from esc,motor,propeller test
[[File:3508-700-14x5.5-11v.png | 150px]]
% file created 2020-10-04 17:49:57.982360
% 1: esc value (motor 1) 0=1ms, 1024 = 2ms
% 2: rps (motor 1) a rotations per second)
% 3: rps (motor 1) b rotations per second)
% 4: Motor voltage (volt)
% 5: total current (amps)
% 6: trust force (gram force)
% 7: CCV (rotation direction)
% 8: Temperature motor (deg C)
% 9: Temperature ESC (deg C)
100 8.27 8.27 11.3 0.1 10 0 38.8 33.3
200 18.89 18.91 11.3 0.4 54 0 28.8 27.9
250 24.78 24.78 11.3 0.7 92 0 27.2 28.0
300 30.11 30.16 11.3 1.2 136 0 27.8 27.6
300 30.17 30.12 11.3 1.2 136 0 26.2 27.9
350 35.65 35.65 11.1 1.7 192 0 27.2 28.2
400 40.33 40.54 11.2 2.5 246 0 26.3 28.7
450 44.49 44.47 11.3 3.6 300 0 27.4 28.4
500 49.34 49.33 11.3 4.5 371 0 26.8 28.5
550 54.00 54.01 11.4 5.8 440 0 27.9 29.2
600 58.11 58.07 11.2 7.2 523 0 27.0 29.3
650 61.94 61.71 11.0 9.0 600 0 27.0 30.0
700 65.24 65.20 11.0 10.3 660 0 27.6 29.8
750 68.22 68.67 11.2 12.5 730 0 29.2 30.6
800 71.01 71.14 11.3 14.4 806 0 31.7 30.3
850 73.87 73.89 11.5 16.7 870 0 32.1 29.1
900 76.76 76.62 10.8 18.7 930 0 33.0 31.3


== Motor test app ==
== Motor test app ==


[[File:motortest_gui.png | 600px]]
[[Drone motor test app]]
 
[[File:motortest_gui.png | 120px]]
== MATLAB simulation ==
 
[[File:drone_ctrl_simulink.png | 800px]]
 
Simulink model of hexacopter.


[[File:drone_ctrl_sim_hex.png | 600px]]
==Matlab simulation==


Sim mechanics simulated hex-drone hoovering.
[[Drone MATLAB simulation]]
[[File:drone_ctrl_sim_hex.png | 120px]]

Latest revision as of 10:49, 21 December 2020

Drone project

This project is intended to be a rather simple core drone stabilizer application based on Teensy and the prop shield.

Intended to be expanded with an outer control loop with a non-realtime sensor, e.g. GNSS, camera or laser scanner.

Hardware

Build on a hand-wired PCB as a prototype

Drone control hardware

Drone software

Drone firmware

Magnetometer calibration

Calibration is used using a calibration version of firmware and a calibration app from Prop Shield manufacturer.

Drone compass calibration

ESC calibration

The drone control uses ESC pulse width from 1 to 2 ms, and all ESCs should be calibrated to use this range.

ESC calibration

Propeller - motor performance

Drone motor performance

Motor test app

Drone motor test app

Matlab simulation

Drone MATLAB simulation