Betaflight

2021年9月14日
Download here: http://gg.gg/vyzv9
*Betaflight Configurator Releases
*Betaflight 4.3
*Betaflight Failed To Open Serial Port
*Betaflight Download
*Betaflight Cli Dump
*Betaflight Configurator
*Betaflight ConfiguratorWhat is CLI ?
CLI is abbreviation of the a Command Line Interface. It is special configuration mode where commands are given insted of the dedicated setting controls and inputs. Every flight controllers firmware configurator (Cleanflight, Betaflight, Butterflight, iNav, etc) has this mode. It is useful for more specific change of settings and detailed configuration the Flight Controller. It is also usefur for dumping the whole flight controller configuration, backuping and restoring the settings in the easy way. Read more about it below.
*Mamba F405 FC Item name: F405 Betaflight Flight Controller Input power: 12.6-25V (3-6S) BEC: 5V/1.5A MCU: STM32F405 Gyro: MPU6000 Flash: 16MB OSD: AT7456 Mounting hole: 30.5.30.5mm Weight: 6g Mamba F40 ESC Item name: Mamba F40HV ESC Input voltage: 3-6S (12.6V25V) Continue current: 40AA×4 Burst current: 40/50A (6S) BEC: NO Mounting: 30mm / φM3 Weight: 10g.
*Betaflight firmware release notes are on the main Release Candidate page, but below is a summary a some of the new features in the Betaflight Configurator:- Gyro update frequency is now locked to the native gyro sampling rate of the chip itself and can’t be changed.
Betaflight app uses your system’s WebKit rendering engine instead of Chrome, consuming way less memory.How to use CLI?
In order to start using CLI you have to connect to your flight controller with configurator software (See here how to install the standalone configurator software). Click on the “CLI” tab – this will enable flight controllers CLI mode. Write the command in the input field and hit the [Enter] to execute it.
You need to execute save command if you want all the commands and changes to be saved into Flight Controllers memory. Saving will reboot the flight controller. Close the CLI tab or send the exit command to exit the CLI mode without saving.CLI Dump or Diff?
dump command dumps all the setting of the flight controller. This can be quite a long listdiff command was introduced in the BetaFlight version 3.0 and it dumps only the settings that are different from the defaults. diff all command dumps only differencies from the defaults but also dumps all the PID profiles.
It is highly recommended to use diff instead of the dump as it results in the significant smaller settings list and only the ones that were changed or differ from the defaults.How to Backup/Restore the settings using CLI?
Sometimes it is usefull to save the Flight Controller settings and restore them in case you need. These cases include FC firmware upgrade, restoring the FC to the point where it worked and etc. Backuping and restoring is very simple task.
Backup: Go to CLI, enter diff (or diff all if you have multiple PID profiles) and copy the provided text to anywhere just to save it for later use.
Restore: Go to CLI, paste the saved settings text to the command input field, hit [Enter]. Your FC settings are restored. Don’t forget to save the settings.CLI commands listCommandDescription1wire <esc>passthrough 1wire to the specified escadjrangeshow/set adjustment ranges settingsauxshow/set aux settingscolorconfigure colorsdefaultsreset controller to defaults and rebootdumpprint configurable settings in a pastable formdiffdump only the settings that are different from the defaults. Includes only the current PID profile.diff alldump only the settings that are different from the defaults. Includes ALL PID profiles.exitexit without savingfeaturelist or -val or valgetget the value of the specified variablegpspassthroughpassthrough gps to serialhelplists all commandsledconfigure ledsmapmapping of rc channel ordermixermixer name or listmode_colorconfigure mode colorsmotorget/set motor output valueplay_soundindex, or none for nextprofileindex (0 to 2)rateprofileindex (0 to 2)rxrangeconfigure rx channel ranges (end-points)rxfailshow/set rx failsafe settingssavesave settings and rebootserialpassthroughserial passthrough mode, reset board to exitsetset the the given value to the variable. (name=value or blank or * for list)statusshow system statusversionshow versionserialconfigure serial portsservoconfigure servossd_infosdcard infotasksshow task statsmmixdesign custom motor mixersmixdesign custom servo mixer
Note that specific command list depends on the type of the firmware (BetaFlight, Butterflight, iNav) and firmware version you are using. For exact list of the commands type help in CLI mode.Usefull CLI commands
bl or dfu command to enter the DFU mode without pushing the button. Reboots the FC board in bootloader mode.
set small_angle = 180 – sets any angle your quadcopter will be able to arm. Usefull when you land unexpectedly severely angled and you are unable to re-arm.
set ledstrip_visual_beeper = ON – When set to on, and the LEDLOW mode is active (i.e. LED strip off), blink the LED strip in synch with beeping, as a visual indicator in cases where the craft is too far away for the beeper to be heard / multiple craft are flying. Values available: [ON,OFF (default)]
Binding with integrated Receivers (connected via SPI):
For Betaflight 4.x – command bind_rx_spiFor Betaflight 3.x: – command frsky_bindDon’t forget to issue save command after the sucessfull bind.
History:2018-05-23 – article created2019-02-13 – Usefull CLI commands updated2019-07-01 – Usefull CLI commands updated
* Guide: How to Arm, PreArm and start your quad What is Arm and why do we need it? All modern quadcopters (or any
* ExpressLRS – Open Source Long Range radio control system – Complete Guide ExpressLRS is the Open Source Long Range radio control system, developed by Alessandro Carcione (aka AlessandroAU)
Keeping devices firmware updated is always important, especially when awesome new features are out. This is the case of Betaflight quadcopter firmware, which has introduced incredible improvements in 4.2 version allowing to better control drone movements and trace smoother trajectories due to improved noise handling through the use of advanced control algorithms.
Moreover Betaflight Configurator interface has gone through some changes since the last configuration article on this blog, so it is a nice opportunity to take a look at the updated version.This is why in this article we are going to take a look at Betaflight 4.2, in particular version 4.2.8 (which at the time of this writing is the latest available), and how to setup and configure it.
Betaflight Configurator
As seen in some previous articles, Betaflight Configurator is a really popular application that allows to configure aircrafts loaded with Betaflight firmware via GUI.
Latest application version is available for download at this link for free. If you are using Windows, choose betaflight-configurator-installer_10.7.0_win32.exe, where 10.7.0 indicates the current Betaflight Configurator version: downloading this specific version (or above) is important in order to flash Betaflight firmware version 4.2 or above.
Once the application is correctly installed, it is possible to launch it. Then, it is just a matter of connecting the quadcopter to the PC using a micro USB (Flight Controller) to USB (PC) cable and clicking on “Connect” to establish the connection.
If you do not know how to install drivers to properly connect your drone to the PC in order to use DFU (Driver Firmware Update) mode, you can take a look at the “Drivers installation” section of this article.
Here is the Welcome screen of Betaflight:
Before proceeding, it is a good idea to click on Settings icon on the top right and enable permanently Expert Mode: in this way we can see all possible menus and options available in Betaflight Configurator, otherwise some of them are hidden. Another good move is to enable dark theme, since it reduces eyes strain.
In the bottom right corner of the window it is possible to verify Betaflight Configurator current version.
Betaflight Firmware Flashing
Before starting this process, remember to always backup your configuration. Betaflight 4.x PIDs configuration is completely reworked with respect to version 3.x, so it is not recommended to reuse old set up for PIDS parameters; however, having a backup is useful in case the quad is going to have issues with new version and we want to go back to the previous one. Moreover, LED strip or OSD configurations can be reapplied, so remember to launch a “diff” command in CLI tab and copy the output to a .txt file for eventual later use.
In order to install Betaflight latest firmware we need to know which flight controller board is mounted on our quad. If you do not know, you can simply navigate to the CLI tab, which is the Command Line Interface on the Betaflight Configurator and launch the “version” command (“Current firmware version check” section of this article).
In this article, the quad we are working on is the Eachine Wizard X220S (of course same following steps can be applied to every quad, just be careful selecting the correct hardware), which is equipped with OMNIBUSF4SD control board (F405), so we are going to select this board from the drop down menu combined with latest firmware version available:
Then we can click on the “Load Firmware [Online]” button to load the firmware. Once operation is completed, Betaflight firmware is ready to be flashed on the board, so we can click on “Flash Firmware”. The quad will go automatically on DFU mode and flashing procedure starts.
If the procedure ends correctly we can “Exit DFU Mode” and start navigating through Betaflight Configurator tabs.
Betaflight 4.2.8 installed
Once Betaflight firmware is installed, when connecting the drone with the new firmware for the first time we could get the following message:
Just click on “Apply Custom Defaults” to start with the suggested default configuration for the board.
Moreover some warnings could pop up:
The most common is the one presented in the previous image, which tells us to calibrate the accelerometer.
Betaflight Setup Tab
Accelerometer, like magnetometer, can be calibrated in the Setup tab by just clicking on the related button:
In Setup tab we can also reset settings to default, backup/restore configuration (even if CLI settings are not included, for that we must use “diff” command) and reboot the board into bootloader / DFU mode.Moreover drone current attitude (roll, pitch and yaw) is shown in real time through a 3D image.
In all the tabs we are going to review, changes are applied only after Save button at the end of the page is clicked.
If you do not plan to use Angle mode (stable / auto level) it is a good idea to disable accelerometer since this saves a good amount of resources reducing CPU Load, which should stay as low as possible. CPU Load should not go over 11-12% when the quad is sitting at the bench considering that during flight this value increases dramatically.
Betaflight Ports Tab
In Ports tab we set ports to be used by the board. In this case we have enabled USB port and UART6 serial port for receiver connection:
On OMNIBUSF4SD board UART6 is configured for SBUS, which is the protocol used by FrSky transmission systems: this is the configuration we have to use since on this X220S there is an XM+ receiver installed communicating with FrSky Taranis X9D Plus SE 2019 transmitter.
Betaflight Configuration Tab
In Configuration tab, in Mixer section it is possible to set quad type and reverse motor rotation direction. System configuration allows to set Gyro update frequency and PID loop frequency. Generally this is related to ESC/motor protocol chosen in ESC/Motor features section: if we set DSHOT600 we should go for 8KHz update frequency, while DSHOT300 is more suitable for 4KHz. Higher values are preferred, but this is a good choice only if CPU Load does not go over 11-12%. This is why at every configuration change comporting an increase in computational workload on the CPU, we have always to keep an eye on the bottom of the page where CPU Load value is reported: in this case it is at 9%.
Remember also to disable MOTOR_STOP because we want motors to spin when armed; even if this is a security option, we are going to address this issue by setting up a prearm switch in Modes tab, so motors do not start spinning if we inadvertently flip the arm switch.
Bidirectional DSHOT is not enabled by default, but it is a very nice feature. Basically it enables the capability to receive telemetry from the ESCs, so the flight controller can use the information received to better control the PID loop. This is why enabling bidirectional DSHOT allows RPM filtering settings (configuration is made on PID Tuning tab -> Filter Settings -> Gyro RPM Filter). Be careful to set the correct number of motor poles, i.e. the number of magnets on the motor bell (generally motors on 5 inch quads have 14 magnets). Bidirectional DSHOT can be enabled only if ESCs have been flashed with supported firmware and this can be done both for BLHELI_32 and BLHELI_S: for BLHELI_32 this can be done by updating the firmware through BLHeli Suite, while for BLHELI_S (which is the case of the Eachine Wizard X220S) we need to download JazzMaverick firmware (free) and flash it on the ESCs using BLHeli Configurator. We just need to download version 16.73 for our ESCs, because versions after 16.73 are declared incompatible with RPM filtering from Betaflight developers. In the case of the Eachine Wizard X220S correct firmware is A_H_30_REV16_73.HEX. To download the firmware just select the correct firmware from the list by left clicking it and then, on the page that opens, right click on the “Raw” button on the right selecting “Save link as” to save the file on your computer. Once done, you should find the .HEX file in the path you specified during the save.Then it is just a matter of flashing the firmware on the ESCs using BLHeli Configurator by selecting the downloaded .HEX file with “Select File Manually” option.Remember to always keep an eye on CPU Load when enabling this feature since it is computationally intensive.
Motor Idle Throttle Value indicates the percentage of throttle in idle: 6%-8% is generally a good compromise also in order to avoid death rolls and have more floating time when cutting off throttle.
Set 180° in Arming section so as to enable arming of the quad even if the aircraft is upside down (useful if quad crashed and it is stuck somewhere with a certain angle).
The other two important parameters we need to set are in Receiver section to complement what we have already set in Ports tab, i.e. our receiver configuration: since, as stated before, we are using FrSky XM+ receiver, we have to choose Serial-based receiver (SPEAKSAT, SBUS, SUMD) from the first drop down menu (Receiver Mode) and SBUS from the second one (Serial Receiver Provider).
In Other Features just remember to enable AIRMODE, OSD and DYNAMIC_FILTER. Airmode is a must since we need and want control of the quad at zero throttle. In this case, also LED_STRIP is enabled since Eachine Wizard X220S has a led strip on the back indicating aircraft movements.
Betaflight Failsafe Tab
In Failsafe tab we set failsafe stages: Stage 1 is generally entered when TX loses connection with receiver. At that moment, channel fallback settings are applied to all channels. From that moment there is a time, called guard time, until Stage 2 is entered: guard time is configured in Stage 2 - Settings section where a value of 1 means 0.1 sec, so a value of 10 means if Stage 1 is triggered then there is a guard time of 1 second to recover connection between transmitter and receiver (and the quad is armed) before Stage 2 is entered.
In Stage 2 - Failsafe Procedure we can configure the action to take when Stage 2 is entered; there are three options:
*Drop: quad turns off motors and drops down
*Land: quad attempts an emergency landing
*GPS Rescue: basically a “return to home point” like feature, available only if drone is equipped with a GPS module
Choosing one instead of the other is a matter of preference, however “Land” option is not recommended. “Drop” option is preferable for short range freestyle flights, while “GPS Rescue” is a must for long range builds.
On Channel Fallback Settings it is possible to set the value the channel will get when a failsafe happens: here it is a good idea to change the settings for the RSSI channel (AUX12) so RSSI value goes to zero when connection to the receiver is lost (otherwise by default it will “Hold” on that value). Since the value of 1000 corresponds to the minimum, i.e. zero, we are going to change “Hold” to “Set” and type this value.
Betaflight PID Tuning Tab
PID Tuning tab contains three sub tabs:
*PID Profile Settings
*Rateprofile Settings
*Filter Settings
PID Profile Settings
PID Profile Settings allows to configure PID (proportional, integral, derivative) values and Feedforward for each one of the rotational axes (x, y, z) by means for roll, pitch and yaw.This can be done by changing singular values in the table or using the four sliders:
*Master Multiplier: increases all PIDs in a balanced way (having a 5 inch quad as reference, for bigger quads -> slider to the right, for smaller quads -> slider to the left)
*PD Balance: slider to the right progressively increases P (in case we need more responsiveness)
*P and D Gain: this is the most important slider, from this one we get the compromise between responsiveness and oscillations/propwash occurrence; the good thing is that P and D values automatically balance while moving the slider
*Stick Response Gain: this slider modifies feedforward values; basically feedforward reduces PID controller action latency, i.e. how fast the quad responds to our commands. How to set this parameter depends from the flight style: slider to the right means a more nervous behavior for aggressive maneuvers; sliders to the left for a smooth/cinematic flight style.
Sliders are particularly useful for users new to tuning and largely simplify the process. While moving sliders to left or right, variations on PIDs can be seen in the table above. The fundamental step is to change sliders with small steps, flying after every change to test the difference in quad response. If Expert Mode is not enabled, sliders movement is reduced.
In PID Controller Settings section it is possible to set Feedforward transition, which represents how feedforward control acts and can vary from a minimum of 0 to a maximum of 1: higher values determine a more relaxed action (a value of zero gives more reactivity to input controls).
Dmin sets a minimum value for D parameter, so it will vary from a minimum to a maximum value depending on how we move the sticks, for example how fast we move them: this means that D parameter is dynamic. Personally I do no use this functionality, so I keep it disabled.
When changing values in PID Tuning tabs it is important to always check motors tempe

https://diarynote-jp.indered.space

コメント

お気に入り日記の更新

テーマ別日記一覧

まだテーマがありません

この日記について

日記内を検索