|
|
(17 intermediate revisions by one user not shown) |
Line 7: |
Line 7: |
| == Hardware == | | == Hardware == |
| | | |
− | build on a hand-wired PCB as a prototype
| + | Build on a hand-wired PCB as a prototype |
| | | |
− | [[Drone control hardware]] | + | [[Drone control hardware]] |
| + | <!-- [[File:schematic_rev0.png | 150px]] --> |
| | | |
| == Drone software == | | == Drone software == |
Line 15: |
Line 16: |
| [[Drone firmware]] | | [[Drone firmware]] |
| | | |
− | == Propeller - motor performance == | + | == Magnetometer calibration == |
| | | |
− | [[Drone motor performance]]
| + | Calibration is used using a calibration version of firmware and a calibration app from Prop Shield manufacturer. |
| | | |
| + | [[Drone compass calibration]] |
| | | |
− | Measured with the "motortest" firmware and the python app below.
| + | == ESC calibration == |
− | The used motor is the 3508-700KV Turnigy Multistar 14 Pole Brushless and a 14x5.5 carbon propeller.
| + | |
− | The ESC is a Hobby-wing x-rotor 40A controller.
| + | |
| | | |
− | === Time responce ===
| + | The drone control uses ESC pulse width from 1 to 2 ms, and all ESCs should be calibrated to use this range. |
| | | |
− | [[File:3508-700-14x5.5-11v.png | 600px]] | + | [[ESC calibration]] |
− | [[File:3508-700-14x5.5-15v.png | 600px]]
| + | |
| | | |
| + | == Propeller - motor performance == |
| | | |
− | With 11 V supply (left) and 15V (right).
| + | [[Drone motor performance]] |
− | 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-11v.png | 150px]] |
− | | + | |
− | === Static response 3508-700 ===
| + | |
− | | + | |
− | Transfer measurement with different propellers.
| + | |
− | The Hobby Wing controller is calibrated to 1ms=off, 2ms=full power.
| + | |
− | Measurement is in a fixed setup on a scale with 1g resolution. Propeller 50cm above ground level.
| + | |
− | Power is a lab power supply. Motor and ESC temperature below 50 degree C.
| + | |
− | | + | |
− | The propellers
| + | |
− | * 8"x 3.8 APC composite propeller
| + | |
− | * 9"x 4.5 APC composite propeller
| + | |
− | * 13"x 4.5 carbon fiber
| + | |
− | * 14"x 5.5 carbon fiber
| + | |
− | * 18"x 5.5 carbon fiber Quanum
| + | |
− | | + | |
− | [[File:trust-per-power-3508-700.png | 600px]] | + | |
− | [[File:rpm-per-power-3508-700.png | 600px]] | + | |
− | | + | |
− | (Left) trust delivered for each propeller size as a function of motor input power.
| + | |
− | It shows that bigger propellers are more power-efficient.
| + | |
− | (Right) RPM as a function of input power.
| + | |
− | | + | |
− | === Static gain 3508-700 ===
| + | |
− | | + | |
− | For the same data as above, bot now related to the ESC input pulse width.
| + | |
− | The ESC has been calibrated to 1ms is zero power, 2ms is maximum power.
| + | |
− | All data has been scaler to 11V, as the curves scale almost 1:1 with the input voltage.
| + | |
− | | + | |
− | [[File:trust-TF-3508-700.png | 600px]]
| + | |
− | [[File:transfer_gain_N-per-ms.png | 600px]]
| + | |
− | | + | |
− | (Left) Trust curve as a function of ESC pulse width. Bigger propellers require more power but deliver more trust.
| + | |
− | (Right) Static transfer gain as a function of ESC pulse width.
| + | |
− | The transfer gain is fairly constant (within a factor 2) in the useful trust area.
| + | |
− | | + | |
− | === Software and files ===
| + | |
− | | + | |
− | The files for these results is in our subversion repository:
| + | |
− | | + | |
− | Install subversion - https://subversion.apache.org/packages.html - and from a command line
| + | |
− | | + | |
− | svn checkout svn://repos.gbar.dtu.dk/jcan/mobotware/drone_ctrl
| + | |
− | cd drone_ctrl/trunk/motortest_gui
| + | |
− | ls
| + | |
− | - motortest_gui.py is the application below.
| + | |
− | - plot_rpm_sensor.m is the Matlab script to make the plots above.
| + | |
− | ... other support and data files.
| + | |
− | cd drone_ctrl/trunk/doc/Matlab
| + | |
− | - Simulink version of hexacopter drone
| + | |
| | | |
| == Motor test app == | | == Motor test app == |
| | | |
− | A motor test GUI is available (in the motortest_gui directory) - it will talk to the motortest firmware - and there is no need for the prop-shield for this application.
| + | [[Drone motor test app]] |
− | | + | [[File:motortest_gui.png | 120px]] |
− | [[File:motortest_gui.png | 600px]]
| + | |
− | | + | |
− | Motor test GUI. There is the possibility to log time performance (in the log tab), to test run an ESC (or up to 6 ESCs) in the data tab.
| + | |
− | | + | |
− | The hardware configuration and pin-out are described in the hardware section above.
| + | |
− | | + | |
− | == MATLAB simulation ==
| + | |
− | | + | |
− | Once the drone hardware (mass, configuration, motor and propeller) is known, then it can be simulated in Matlab simulink.
| + | |
− | The script in the doc/matlab directory has scrips for the simulation and estimating a linear transfer function in an operating point and calculate the needed controller parameters (roll, pitch, yaw - velocity and position as well as height control).
| + | |
− | | + | |
− | Further controllers for lateral velocity are added too, but these last controllers are not included in the drone firmware.
| + | |
− | | + | |
− | [[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]] |
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.
Calibration is used using a calibration version of firmware and a calibration app from Prop Shield manufacturer.
The drone control uses ESC pulse width from 1 to 2 ms, and all ESCs should be calibrated to use this range.