Skye UAV brush Betaflight detailed graphic tutorials

Foreword

First of all very grateful TASKBL up the main station of the B video tutorials, and his patient guidance, video links https://www.bilibili.com/video/BV1gE411V7RN . Entire transformation process takes three days, now the transformation process as well as some of the problems encountered recorded.

1. Bill of Materials

ST-LINK V2 downloader, USB cable, electric iron, Dupont line and a plurality of pins.

2. The circuit transformation

Remove the five fixing screws, electric soldering iron in addition to the power supply line 4, remove the entire board.

Need to remove a bottom surface of the motherboard chip 8 feet --SN65HVD232D, they will affect the USB programming, in which four pins and FIG lead, wherein

USB_DP - USB cable Green Line

Black line data line GND --USB

Red data line VCC --USB

USB_DP - USB cable Green Line

4P interfaces may be employed to facilitate the detachment operation, USB data cable connected to the computer for debugging.

Next remove screws in FIG. 4, corresponding to the open side of PCB black block (CAUTION cable), heating the sheet to remove the inside, because it would have been after brushing BF heat burn chips. After removal of the available hot melt adhesive or the silicone rubber 704 filling inside it.

 Package as FIG SN65HVD232D

 

3. firmware programming Betaflight

After the hardware transformation is complete, we can begin to master the programming process where friends ~

The ST-LINK downloader downloads pin interfaces with SWD, the correspondence relationship shown in FIG.

Download into your computer, open the STM32 ST-LINK Utility software, click on the link;

Related Download Links : https://pan.baidu.com/s/1HTZUcf7GND3u7nu0Bez0Eg
extraction code: lw5f 

 

Click Target "Program ...;

 Open Betaflight firmware hex file ( in the network disk file link ), click programming. I use here is the 4.0.0 firmware, high version of the firmware can not start the author of the motor, I do not know how other machines.

Programming is completed can be disconnected from the ST-LINK, the next step Betaflight provided.

4.Betaflight flight control settings

Open Betaflight Configurator assistant software, before the USB cable connected to a good computer, select the corresponding port, click on the link;

Before the start setting is no such an interface, the master sensor is not recognized, it is necessary to perform debug CLI command line.

Image

Click CLI (command line), paste the following command, enter the command execution, then enter the save, press Enter to save the configuration;

CLI command segments: 

# start the command batch
batch start

board_name STM32F405
manufacturer_id STM32F

# name: STM32F

# resources
resource MOTOR 1 B06
resource MOTOR 2 B09
resource MOTOR 3 B08
resource MOTOR 4 B07
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 A02
resource SERIAL_TX 4 A00
resource SERIAL_TX 6 C06
resource SERIAL_RX 1 A10
resource SERIAL_RX 1 A10
resource SERIAL_RX 4 A01
resource SERIAL_RX 5 D02
resource I2C_SCL 2 B10
resource I2C_SDA 2 B11
resource LED 1 A08
resource BEEPER 1 B05
resource SPI_SCK 1 A05
resource SPI_SCK 2 B13
resource SPI_SCK 3 C10
resource SPI_MISO 1 A06
resource SPI_MISO 2 B14
resource SPI_MISO 3 C11
resource SPI_MOSI 1 A07
resource SPI_MOSI 2 B15
resource SPI_MOSI 3 C12
resource ADC_BATT 1 C02
resource ADC_CURR 1 C01
resource BARO_CS 1 A15
resource FLASH_CS 1 B12
resource GYRO_EXTI 1 C07
resource GYRO_CS 1 B12
# master
set gyro_lowpass2_hz = 300
set dyn_lpf_gyro_min_hz = 240
set dyn_lpf_gyro_max_hz = 600
set acc_calibration = -34,198,-36,1
set mag_spi_device = 1
set mag_hardware = NONE
set baro_spi_device = 3
set mid_rc = 1520
set min_check = 1200
set rc_smoothing_derivative_type = BIQUAD
set serialrx_provider = SBUS
set adc_device = 2
set blackbox_p_ratio = 4
set min_throttle = 900
set motor_pwm_protocol = OFF
set failsafe_throttle = 1100
set failsafe_procedure = AUTO-LAND
set current_meter = ADC
set current_meter = ADC
set battery_meter = ADC
set beeper_inversion = ON
set beeper_od = OFF
set yaw_motors_reversed = ON
set deadband = 2
set yaw_deadband = 2
set pid_process_denom = 16
set system_hse_mhz = 8
set dashboard_i2c_bus = 1
set flash_spi_bus = 2
set gyro_1_bustype = SPI
set gyro_1_spibus = 2
set gyro_1_sensor_align = CW0FLIP
set gyro_1_align_pitch = 1800

profile 0

# profile 0
set dyn_lpf_dterm_min_hz = 84
set dyn_lpf_dterm_max_hz = 204
set dterm_lowpass2_hz = 180
set dterm_lowpass2_hz = 180
set acro_trainer_angle_limit = 25
set p_pitch = 110
set i_pitch = 135
set d_pitch = 92
set f_pitch = 171
set p_roll = 101
set i_roll = 128
set d_roll = 84
set f_roll = 162
set p_yaw = 72
set i_yaw = 135
set f_yaw = 144
set d_min_roll = 48
set d_min_pitch = 53

rateprofile 0

# rateprofile 0
set roll_rc_rate = 95
set pitch_rc_rate = 95
set yaw_rc_rate = 95
set roll_expo = 10
set pitch_expo = 10
set yaw_expo = 10
set roll_srate = 10
set pitch_srate = 10
set yaw_srate = 10

save

Now the sensor can be identified, and can refer to more commands https://github.com/betaflight/betaflight ;

UAV horizontally, click Accelerometer calibration leveling;

Set up inside the port, baud rate setting UART4 start UART5 serial digital receiver (receiver in communication with the SBUS);

Configuration interface is provided for the mixing type Quad X 1234 and open inverting the motor rotation, so that it matches the steering motor drone;

ESC protocol PWM, open MOTOR_STOP, to prevent accidents during startup;

Receiver selects serial digital receiver, select the SBUS protocol;

PID parameters as the default, flying very stable; 

 FIG Rate parameters can be set, so that remote control lever is not so flexible, this UAV does not require too much heavy feedback angle;

Into the receiver interface, toggle the joystick, the change can be seen that the corresponding channel values, lower than the threshold value for the throttle stick set larger minimum, or can not be unlocked;

Set unlock and auto-switch channel, for the novice, be sure to turn on auto-switch, otherwise it is difficult to control the aircraft; 

Other patterns can be self-exploration, described herein give some (From http://www.5imx.com/forum.php?mod=viewthread&page=1&tid=1252868 )

    Horizon Mode (水平模式) :也是自稳模式,但是可以翻滚,感觉上和玩具的一建翻滚差不多。
    Acro Mode或者Rate mode (手动模式或者比率模式) :根据遥控器杆的输入进行相应比率的动作。真正意义 上的飞行模式就以上三种:角度模式、水平模式、手动模式,其他均为辅助飞行的模式。
    Beeper (蜂鸣器) :当你的通道输出某个值时,蜂鸣器会发声,如果设置了电调的话,电调也会发声。
    Airmode (空中模式) :当油门]打到最低时,还可以控制飞机。如果配置表中勾选了即默认开启,并且在模式列表中隐藏。
    Anti-Gravity (反重力模式) :1 飞行时模拟无重力。 通过检测油门]变化来实时干预PID参数中的|值运算,提供大机动大油门状态下的飞机l值的稳定性。
    一般来说Airmode和Anti-Gravity默认开启, 增加飞行的顺滑。
    Blackbox Start/Erase (黑匣子开启/清除) :名字很明显了。
    Camera Control 1, 2, 3 (相机控制) : 基本用不到,没描述。
    OSD Disable SW (OSD显示去除键) :去除屏幕上的OSD显示。
    Pre-arm (预解锁) :为了防止解锁键误按,多设置一个开关键, 解锁后可以关掉。
    Flip Over After Crash (反乌龟) :炸机后翻身,需要支持Dshot的电调。
    VTX Pit Mode (图传降功率) :图传功率将会降到接近0,为了防止干扰其他玩家。需要图传支持OSD调参,并设置好。
    Failsafe (失控保护) :手动进入失控保护,而不用等遥控器失控。需Betaflight另设置失控保护。
    FPV angle mix (摄像头角度补偿) :简单的来说,就是穿越机的摄像头-般都是朝上一 个角度。这个摄像机角度轴线和机身轴线有一个角度。如果飞机以机身角度横滚,那么从你的摄像头里面看出去会混合一个俯仰角度进去, 因为两个轴线不重合。
    Baro或alt hold (定高模式) :也就是barometer (气压计)的意思,使用气压计定高。
    Telemetry (遥控信号) :资料找不到Headfree (无头模式或简单模式) :当机头朝某个方向解锁,则方向杆向上打则是飞往那个指向,此时打油方向杆机头会转动,但方向杆向上打还是往那个方向飞。
    Headadj (头调整模式或超级简单模式) :不管机头往哪个方向朝,向杆向上打则是往你起飞点远处飞,向上打则是往你起飞点飞。(好像要GPS ,我只试过apm飞K控)Paralyze (瘫痪模式) :团队赛时,使用备用机,同时为了防止解锁坠毁的飞机。当在锁定时
    可以启动,启动后关闭模式改变、图传改成不常用频段且低功率输出、关闭遥控信号。解锁时
    会检测瘫痪模式是否开启。
    Acro trainer (手动模式练习) :和手动模式-样,但是有角度限制,新手可以慢慢加大限制角度。

Do not install propeller case, the open I understand the risks, the electric drag the slider, corresponding to the passage of the motor to rotate. His hands touch the motor side, the steering motor is determined whether the same software;

All settings have been completed, and now you can test it ~ 

5. Replace the remote control method

The official said the original remote control remote control can only 200m, so I replaced the other remote control. Remove the original receiver, SBUS master FIG lead pin;

FIG negated welding according to the following circuits, can achieve docking other remote controls. As if the software can also be negated, but does not support firmware 4.0.0 and higher versions of the firmware you can try to execute this command can be executed if you do not have negated the hardware.


set sbus_inversion = OFF

 

FIG pad is 3.3V, 5V power source voltage step-down can be used to obtain the L7805.

6. Welding buzzer

This step can be skipped, it does not affect the actual flight, but easy to fly hands to determine the flight control state. But this step requires a certain weld welding work, it is easy to pin adhesion, be sure to use the tip of a soldering iron ! It would almost overturned. Welding can be a buzzer circuit in FIG.

STM32F405RGT6 master pin package and the use of the following resources:

---------------------------------------------------------------------

Related Downloads

Links: https://pan.baidu.com/s/1HTZUcf7GND3u7nu0Bez0Eg
extraction code: lw5f 

Finally, thanks again for the support and assistance provided B of the main station TASKBL up!

Published 16 original articles · won praise 26 · views 40000 +

Guess you like

Origin blog.csdn.net/weixin_42268054/article/details/105135964