From 77bfd1f708a275a31fcc52c18fab47d0888db356 Mon Sep 17 00:00:00 2001 From: idefixsin Date: Thu, 8 Jan 2015 11:21:30 +0800 Subject: [PATCH 1/8] Update Board - Sparky.md Added Device Firmware Upload (DFU, USB) instructions for Windows --- docs/Board - Sparky.md | 50 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/docs/Board - Sparky.md b/docs/Board - Sparky.md index c0616c598..af8c89bc7 100644 --- a/docs/Board - Sparky.md +++ b/docs/Board - Sparky.md @@ -27,7 +27,55 @@ Tested with revision 1 board. # Flashing -## Via Device Firmware Upload (DFU, USB) +## Via Device Firmware Upload (DFU, USB) - Windows + +These instructions are for flashing the Sparky board under Windows using DfuSE. +Credits go to Thomas Shue (Full video of the below steps can be found here: https://www.youtube.com/watch?v=I4yHiRVRY94) + +Required Software: +DfuSE Version 3.0.2 (latest version 3.0.4 causes errors): http://code.google.com/p/multipilot32/downloads/detail?name=DfuSe.rar +STM VCP Driver 1.4.0: http://www.st.com/web/en/catalog/tools/PF257938 + +A binary file is required for DFU, not a .hex file. If one is not included in the release then build one as follows. + +``` +Unpack DfuSE and the STM VCP Drivers into a folder on your Hardrive +Download the latest Sparky release (cleanflight_SPARKY.hex) from: https://github.com/cleanflight/cleanflight/releases and store it on your Hardrive + +In your DfuSE folder go to BIN and start DfuFileMgr.exe +Select: "I want to GENERATE a DFUfile from S19,HEX or BIN files" press OK +Press: "S19 or Hex.." +Go to the folder where you saved the cleanflight_SPARKY.hex file, select it and press open (you might need to change the filetype in the DfuSE explorer window to "hex Files (*.hex)" to be able to see the file +Press: "Generate" and select the .dfu output file and location +If all worked well you should see " Success for 'Image for lternate Setting 00 (ST..)'!" +``` + +Put the device into DFU mode by powering on the sparky with the bootloader pins temporarily bridged. The only light that should come on is the blue PWR led. + +Check the windows device manager to make sure the board is recognized correctly. +It should show up as "STM Device in DFU mode" under Universal Serial Bus Controllers + +If it shows up as "STMicroelectronics Virtual COM" under Ports (COM & LPT) instead then the board is not in DFU mode. Disconnect the board, short the bootloader pins again while connecting the board. + +If the board shows up as "STM 32 Bootloader" device in the device manager, the drivers need to be updated manually. +Select the device in the device manager, press "update drivers", select "manual update drivers" and choose the location where you extracted the STM VCP Drivers, select "let me choose which driver to install". You shoud now be able to select either the STM32 Bootloader driver or the STM in DFU mode driver. Select the later and install. + + +Then flash the binary as below. + +``` +In your DfuSE folder go to BIN and start DfuSeDemo.exe +Select the Sparky Board (STM in DFU Mode) from the Available DFU and compatible HID Devices drop down list +Press "Choose.." at the bootom of the window and select the .dfu file created in the previous step +"File correctly loaded" should appear in the status bar +Press "Upgrade" and confirm with "Yes" +The status bar will show the upload progress and confirm that the upload is complete at the end +``` + +Disconnect and reconnect the board from USB and continue to configure it via the Cleanflight configurator as per normal + + +## Via Device Firmware Upload (DFU, USB) - Mac OS X These instructions are for dfu-util, tested using dfu-util 0.7 for OSX from the OpenTX project. From 08cc4b38e3a6bcf0483f8e3d4531812132a3fc84 Mon Sep 17 00:00:00 2001 From: idefixsin Date: Thu, 8 Jan 2015 11:22:46 +0800 Subject: [PATCH 2/8] Update Board - Sparky.md --- docs/Board - Sparky.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Board - Sparky.md b/docs/Board - Sparky.md index af8c89bc7..22e0f492b 100644 --- a/docs/Board - Sparky.md +++ b/docs/Board - Sparky.md @@ -48,6 +48,7 @@ Press: "S19 or Hex.." Go to the folder where you saved the cleanflight_SPARKY.hex file, select it and press open (you might need to change the filetype in the DfuSE explorer window to "hex Files (*.hex)" to be able to see the file Press: "Generate" and select the .dfu output file and location If all worked well you should see " Success for 'Image for lternate Setting 00 (ST..)'!" + ``` Put the device into DFU mode by powering on the sparky with the bootloader pins temporarily bridged. The only light that should come on is the blue PWR led. @@ -70,6 +71,7 @@ Press "Choose.." at the bootom of the window and select the .dfu file created in "File correctly loaded" should appear in the status bar Press "Upgrade" and confirm with "Yes" The status bar will show the upload progress and confirm that the upload is complete at the end + ``` Disconnect and reconnect the board from USB and continue to configure it via the Cleanflight configurator as per normal From 94e4a0208f1f14064e867c39c4f5a4950a5e3f2f Mon Sep 17 00:00:00 2001 From: idefixsin Date: Thu, 8 Jan 2015 11:24:41 +0800 Subject: [PATCH 3/8] Update Board - Sparky.md Added Device Firmware Upload (DFU, USB) instructions for Windows --- docs/Board - Sparky.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Board - Sparky.md b/docs/Board - Sparky.md index 22e0f492b..9501b5912 100644 --- a/docs/Board - Sparky.md +++ b/docs/Board - Sparky.md @@ -40,12 +40,14 @@ A binary file is required for DFU, not a .hex file. If one is not included in t ``` Unpack DfuSE and the STM VCP Drivers into a folder on your Hardrive -Download the latest Sparky release (cleanflight_SPARKY.hex) from: https://github.com/cleanflight/cleanflight/releases and store it on your Hardrive +Download the latest Sparky release (cleanflight_SPARKY.hex) from: +https://github.com/cleanflight/cleanflight/releases and store it on your Hardrive In your DfuSE folder go to BIN and start DfuFileMgr.exe Select: "I want to GENERATE a DFUfile from S19,HEX or BIN files" press OK Press: "S19 or Hex.." -Go to the folder where you saved the cleanflight_SPARKY.hex file, select it and press open (you might need to change the filetype in the DfuSE explorer window to "hex Files (*.hex)" to be able to see the file +Go to the folder where you saved the cleanflight_SPARKY.hex file, select it and press open +(you might need to change the filetype in the DfuSE explorer window to "hex Files (*.hex)" to be able to see the file) Press: "Generate" and select the .dfu output file and location If all worked well you should see " Success for 'Image for lternate Setting 00 (ST..)'!" From b22f30500a6be2baa49b7cf87434359c65bc3306 Mon Sep 17 00:00:00 2001 From: Joel Fuster Date: Fri, 2 Jan 2015 20:27:57 -0500 Subject: [PATCH 4/8] Mixer and SBUS documenation updates --- docs/Mixer.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ docs/Rx.md | 6 +++++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 docs/Mixer.md diff --git a/docs/Mixer.md b/docs/Mixer.md new file mode 100644 index 000000000..777cae38d --- /dev/null +++ b/docs/Mixer.md @@ -0,0 +1,58 @@ +# Mixer + +Cleanflight supports a number of mixing configurations as well as custom mixing. Mixer configurations determine how the servos and motors work together to control the aircraft. + +## Configuration + +To use a built-in mixing configuration, you can use the Chrome configuration GUI. It includes images of the various mixer types to assist in making the proper connections. See the Configuration section of the documentation for more information on the GUI. + +You can also use the Command Line Interface (CLI) to set the mixer type: + +1. Use `mixer list` to see a list of supported mixes +2. Select a mixer. For example, to select TRI, use `mixer TRI` +3. You must use `save` to preserve your changes + +## Supported Mixer Types + +| Name | Description | Motors | Servos | +| ------------- | ------------------------- | -------------- | ---------------- | +| TRI | Tricopter | M1-M3 | S1 | +| QUADP | Quadcopter-Plus | M1-M4 | None | +| QUADX | Quadcopter-X | M1-M4 | None | +| BI | Bicopter (left/right) | M1-M2 | S1, S2 | +| GIMBAL | Gimbal control | N/A | S1, S2 | +| Y6 | Y6-copter | M1-M6 | None | +| HEX6 | Hexacopter-Plus | M1-M6 | None | +| FLYING_WING | Fixed wing; elevons | M1 | S1, S2 | +| Y4 | Y4-copter | M1-M4 | None | +| HEX6X | Hexacopter-X | M1-M6 | None | +| OCTOX8 | Octocopter-X (over/under) | M1-M8 | None | +| OCTOFLATP | Octocopter-FlatPlus | M1-M8 | None | +| OCTOFLATX | Octocopter-FlatX | M1-M8 | None | +| AIRPLANE | Fixed wing; Ax2, R, E | M1 | S1, S2, S3, S4 | +| HELI_120_CCPM | | | | +| HELI_90_DEG | | | | +| VTAIL4 | Quadcopter with V-Tail | M1-M4 | N/A | +| HEX6H | Hexacopter-H | M1-M6 | None | +| PPM_TO_SERVO | | | | +| DUALCOPTER | Dualcopter | M1-M2 | S1, S2 | +| SINGLECOPTER | Conventional helicopter | M1 | S1 | +| ATAIL4 | Quadcopter with A-Tail | M1-M4 | N/A | +| CUSTOM | User-defined | | | + + +## Servo filtering + +A low-pass filter can be enabled for the servos. It may be useful for avoiding structural modes in the airframe, for example. Currently it can only be configured via the CLI: + +1. Use `set servo_lowpass_freq_idx = nn` to select the cutoff frequency. Valid values range from 0 to 99. +2. Use `set servo_lowpass_enable = 1` to enable filtering. + +The actual cutoff frequency is determined by the value of the `looptime` variable and the selected index. +The formula is: +`Frequency = 1000000 * (servo_lowpass_freq_idx + 1)*0.0025 / looptime )` + + +For example, if `servo_lowpass_freq_idx` is set to 40, and looptime is set to the default of 3500 us (0.0035 s), the cutoff frequency will be 29.3 Hz. + + diff --git a/docs/Rx.md b/docs/Rx.md index 96c334067..361916ce1 100644 --- a/docs/Rx.md +++ b/docs/Rx.md @@ -47,7 +47,11 @@ http://www.lemon-rx.com/shop/index.php?route=product/product&product_id=118 ### S.BUS -16 channels via serial currently supported. +16 channels via serial currently supported. See the Serial chapter in the documentation for a configuration example. + +* In most cases you will need an inverter between the receiver output and the flight controller hardware. +* Softserial ports cannot be used with SBUS because it runs at too high of a bitrate (1Mbps). Refer to the chapter specific to your board to determine which port(s) may be used. +* You will need to configure the channel mapping in the GUI (Receiver tab) or CLI (`map` command). These receivers are reported working: From 61b08502e826ff36e52ecb20ba7f9c6b75490d43 Mon Sep 17 00:00:00 2001 From: Dustin Date: Mon, 29 Dec 2014 19:58:09 -0700 Subject: [PATCH 5/8] Added failsafe explanation and fixed minor errors Fixed grammar, typos, and adjusted formatting. Added additional explanation on items, and added a step by step instruction to setting up failsafe for the first time. --- docs/Failsafe.md | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/docs/Failsafe.md b/docs/Failsafe.md index afeedf96b..358bbcbb3 100644 --- a/docs/Failsafe.md +++ b/docs/Failsafe.md @@ -6,51 +6,72 @@ There are two types of failsafe: 2. flight controller based failsafe Receiver based failsafe is where you, from your transmitter and receiver, configure channels to output desired signals if your receiver detects signal loss. -The idea is that you set throttle and other controls so the aircraft descends in a controlled manner. +The idea is that you set throttle and other controls so the aircraft descends in a controlled manner. See your receiver's documentation for this method. Flight controller based failsafe is where the flight controller attempts to detect signal loss from your receiver. -It is possible to use both types at the same time and may be desirable. Flight controller failsafe can even help if your receiver signal wires come loose, get damaged or your receiver malfunctions in a way the receiver itself cannot detect. +It is possible to use both types at the same time which may be desirable. Flight controller failsafe can even help if your receiver signal wires come loose, get damaged or your receiver malfunctions in a way the receiver itself cannot detect. ## Flight controller failsafe system The failsafe system is not activated until 5 seconds after the flight controller boots up. This is to prevent failsafe from activating in the case of TX/RX gear with long bind procedures before they send out valid data. -After the failsafe has been forced a landing, the flight controller cannot be armed and has to be reset. +After the failsafe has forced a landing, the flight controller cannot be armed and has to be reset. The failsafe system attempts to detect when your receiver loses signal. It then attempts to prevent your aircraft from flying away uncontrollably. The failsafe is activated when: Either: -a) no valid channel data from the RX via Serial RX. + +a) no valid channel data from the RX is received via Serial RX. + b) the first 4 Parallel PWM/PPM channels do not have valid signals. And: + c) the failsafe guard time specified by `failsafe_delay` has elapsed. ## Configuration -There are a few settings for it, as below. +When configuring the flight controller failsafe, use the following steps: + +1. Configure your receiver to do one of the following: + +a) Upon signal loss, send no signal/pulses over the channels + +b) Send an invalid signal over the channels (for example, send values lower than 'failsafe_min_usec') + +See your receiver's documentation for direction on how to accomplish one of these. + +2. Set 'failsafe_off_delay' to an appropriate value based on how high you fly + +3. Set 'failsafe_throttle' to a value that allows the aircraft to descend at approximately one meter per second. + + +These are the basic steps for flight controller failsafe configuration, see Failsafe Settings below for additional settings that may be changed. + +##Failsafe Settings Failsafe delays are configured in 0.1 second steps. 1 step = 0.1sec + 1 second = 10 steps ### `failsafe_delay` -Guard time for failsafe activation after signal lost. +Guard time for failsafe activation after signal lost. This is the amount of time the flight controller waits to see if it begins receiving a valid signal again before activating failsafe. ### `failsafe_off_delay` -Delay after failsafe activates before motors finally turn off. If you fly high you may need more time. +Delay after failsafe activates before motors finally turn off. This is the amount of time 'failsafe_throttle' is active. If you fly at higher altitudes you may need more time to descend safely. ### `failsafe_throttle` Throttle level used for landing. Specify a value that causes the aircraft to descend at about 1M/sec. -Use standard RX usec values. See Rx documentation. +Use standard RX usec values. See RX documentation. ### `failsafe_min_usec` @@ -64,7 +85,7 @@ The longest PWM/PPM pulse considered valid. Only valid when using Parallel PWM or PPM receivers. -This setting helps catch when your RX stops sending any data when the RX looses signal. +This setting helps detect when your RX stops sending any data when the RX looses signal. With a Graupner GR-24 configured for PWM output with failsafe on channels 1-4 set to OFF in the receiver settings then this setting, at its default value, will allow failsafe to be activated. From e4277de822b19e5bc7beb166459ab5f0b2ee6b51 Mon Sep 17 00:00:00 2001 From: Dave Pitman Date: Thu, 1 Jan 2015 13:55:18 -0800 Subject: [PATCH 6/8] Update Battery.md --- docs/Battery.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/Battery.md b/docs/Battery.md index 99cb492b8..40dad080b 100644 --- a/docs/Battery.md +++ b/docs/Battery.md @@ -47,6 +47,8 @@ Configure min/max cell voltages using the following CLI setting: `vbat_max_cell_voltage` - maximum voltage per cell, used for auto-detecting battery voltage in 0.1V units, i.e. 43 = 4.3V +`set vbat_warning_cell_voltage` - warning voltage per cell, this triggers battery out alarms, in 0.1V units, i.e. 34 = 3.4V + `vbat_min_cell_voltage` - minimum voltage per cell, this triggers battery out alarms, in 0.1V units, i.e. 33 = 3.3V e.g. @@ -54,6 +56,7 @@ e.g. ``` set vbat_scale = 110 set vbat_max_cell_voltage = 43 +set vbat_warning_cell_voltage = 34 set vbat_min_cell_voltage = 33 ``` From bfc348b349ee7f40b0ab0a87d3f251b68a62d76f Mon Sep 17 00:00:00 2001 From: Dave Pitman Date: Wed, 31 Dec 2014 12:41:47 -0800 Subject: [PATCH 7/8] Update Controls.md Include link to a Multiwii TX stick command pdf file This File is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. --- docs/Controls.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Controls.md b/docs/Controls.md index 0171c8559..c2b6e14df 100644 --- a/docs/Controls.md +++ b/docs/Controls.md @@ -30,3 +30,5 @@ HIGH - the channel value for the mapped channel input is around 2000 | Trim Acc Backwards | HIGH | CENTER | LOW | CENTER | | Save setting | LOW | LOW | LOW | HIGH | + +##### Download a graphic [pdf cheat-sheet](https://multiwii.googlecode.com/svn/branches/Hamburger/MultiWii-StickConfiguration-23_v0-5772156649.pdf) with TX stick commands. From ac3d35d971886c52b3b9ec82ee1112d1e4b0dbbb Mon Sep 17 00:00:00 2001 From: Dave Pitman Date: Sat, 3 Jan 2015 12:01:26 -0800 Subject: [PATCH 8/8] Update Controls.md --- docs/Controls.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Controls.md b/docs/Controls.md index c2b6e14df..57e557822 100644 --- a/docs/Controls.md +++ b/docs/Controls.md @@ -32,3 +32,5 @@ HIGH - the channel value for the mapped channel input is around 2000 ##### Download a graphic [pdf cheat-sheet](https://multiwii.googlecode.com/svn/branches/Hamburger/MultiWii-StickConfiguration-23_v0-5772156649.pdf) with TX stick commands. + +The Latest version of this pdf can always be found [Here](https://code.google.com/p/multiwii/source/browse/#svn%2Fbranches%2FHamburger)