• INAV: how to setup asynchronous gyro

    Together with version 1.4, INAV introduced asynchronous gyroscope processing. What is async gyro and why it is useful to have it, you can read here. In short worlds: data from gyroscope is read and filtered faster than PID controller updates motor and servo output.

    When it is worth to enable asynchronous processing

    In general, async gyro can be enabled when:

    • Flight controller does not ave enough processing power to run control loop faster than 2000us (500Hz mode). This is the case for all SMT32F1 boards like Naze32, Flip32 or CC3D
    • Flight controller is powerful enough to process PID control loop faster than ESC protocol (PWM, Oneshot125, Multishot) transfer commands to ESC and servos. This is usually true in case of all STM32F4 boards
    • INAV is setup on a "racer" machine that requires the best gyro signal possible

    Async gyro should not be enabled when gyro and control loop frequency are the same. For example, 1kHz gyro and 1kHz control loop would give worse results than 1kHz synchronous processing. Read more...

  • Simplest hardware inverter for flight controller

    Together with increasing popularity of STM32F4 flight controllers, telemetry became hard topic again. Why? Most popular telemetry protocols, SmartPort and FrSky telemetry , requires inverted signal. Zero becomes one, one becomes zero.

    In case on STM32F3 that was not a big problem. Those CPUs have built in inverters. STM32F1 and STM32F4 does not. So, if flight controller designer did not put external inverters on UART ports, FrSky telemetry, SmartPort and even S.Bus would not work.

    Luckily, simple inverter for FrSky telemetry and S.Bus can be build using only few electronic parts:

    • Small logic level N-channel MOSFET transistor. One of the best choices is 2N7000
    • 10kOhm resistor
    • few cables

    Read more...

  • Flip32 F4 and Airbot F4 Software Serial

    When STM32F4 based flight controllers made its way to the world of MultiWii derivatives (Cleanflight and whole family), all I think all developers assumed that SoftwareSerial feature will not be needed on those boards. Why it should be? STM32F4 has enough hardware UARTs to satisfy everyones needs.

    Unfortunately, live had it's own point of view on that topic:

    1. Most F4 flight controllers have only 2 to 3 hardware UARTs available and usually one of them is shared with I2C (Revolution, Airbot F4)
    2. STM32F4 does not have internal hardware inverters. Hardware manufacturers usually put only one external inverter for S.Bus and that's all

    Because of that, Software Serial feature is coming back to F4 boards. Together with INAV 1.5, SoftSerial will be available on Airbot F4 / Flip32 F4 target on two small pads located near UART3 connector. RX line on pad CH5, TX line on CH6 line. Pads are quite small, but with basic soldering skills and decent soldering iron there should be no problems to solder thin cables to them.

    Since F4 CPU is much more powerful than F1, limitation of 19200bps on Software Serial UARTs is no longer actual. I have tested 57600bps and 115200bps should be archivable.

    Read more...
  • INAV Advanced Accelerometer Calibration: why and how

    One of the most often forgotten tasks required to bring the most of INAV, is good accelerometer calibration. Why? While flight controller software like Cleanfligth and Betaflight use accelerometer only to compute UAV's body inclination (Angle and Horizon modes as well as artificial horizon), INAV uses it also for position estimation.

    Cleanfligt has to only know where "down" is. For this, simple accelerometer calibration is fully enough: place UAV on a level surface and hit "Calibrate accelerometer" button. Few seconds and done.

    INAV not only has to know where bottom is. It also has to know where all other directions are, and how fast UAV is accelerating in those directions to be able to estimate its position. For this, advanced, or 6 point accelerometer calibration is required.

    How to perform Advanced Accelerometer Calibration [AAC]

    During AAC, each side of flight controller has to be positioned "down" during calibration. Order is not important with one exception: during first step, top of flight controller has to positioned up. This is impotrant: we are calibrating accelerometer, not whole UAV. Even is FC is mounted upside-down, during first step, FC has to to positioned upwards.

    1. Prepare stable surface that will allow to keep FC stable in all required positions. Angles does not have to be super precise, even few degrees should be enough, but flight controller has to be motionless during calibration
    2. Plug-in USB and connect to INAV Configurator
    3. Position flight controller facing up and hit "Calibrate acccelerometer" button. Wait for success message
    4. Rotate FC 180 degrees so it is bottoms-up and hit "Calibrate acccelerometer" button. Wait for success message
    5. Rotate FC so its rear edge is facing down and hit "Calibrate acccelerometer" button. Wait for success message
    6. Rotate FC so its right edge is facing down and hit "Calibrate acccelerometer" button. Wait for success message
    7. Rotate FC so its front edge is facing down and hit "Calibrate acccelerometer" button. Wait for success message
    8. Rotate FC so its left edge is facing down and hit "Calibrate acccelerometer" button. Wait for success message
    9. Disconnet and power down
    10. Advanced accelerometer calibration is done. If is succeeded, acczero_x, acczero_y and acczero_z should different than 0, while accgain_x, accgain_y and accgain_z should be different than 4096

    Advanced accelerometer calibration

    Worth remembering: calibration values can be restored via CLI when flight controller firmware is updated. It is hardware, not software dependent. Calibration should be executed when new hardware is used.

    Read more...
  • Yaw unstable at full throttle

    Last weekend I've experienced quite serious problem with Reptile X4R 220 racing quadcopter: on full throttle quad was loosing stability. At first, it was starting to drift yaw to the right. Then, if throttle was not lowered, roll and pitch was also becoming unstable and quad was doing crazy things in the air.

    I do not have a video footage of those issues, but Blackbox footage looks like this:

    yaw unstable at full throttle 1

    Roll, Pitch and Yaw sticks are at zero, throttle is raised from aroung 45% up to 90%. When throttle reaches around 80%, gyro starts to record movement on all axises. At one point, yaw gets a kick and reaches more that 200dps. Finally, I lowered throttle and quadcopter stabilized (moment of stabilization is not visible, but trust me, it is there).

    The reason for such a behavior became pretty visible as soon as I displayed motor output:

    yaw unstable at full throttle motor output

    Flight controller requests much more power from Motor #1 than from other motors. Not only in this short scenario. Look at this graph:

    yaw unstable at full throttle motors

    FC requests more thrust from Motor #1 almost all the time. Why? Motor #1 provides less thrust than other motors. There are few possible reasons:

    1. Damaged propeller
    2. Damaged motor
    3. Damaged ESC
    4. ESC not calibrated

    In my case, it was ESC calibration issue. While this might sound strange, ESCs loses calibration from time to time. Usually after a crash that resulted in detached battery.

    Proper ESC calibration solved all the problems I was experiencing.

    Read more...
  • STM32 VirtualComPort driver for Windows

    Virtual Com Port, VCP to method of choice for almost all recent flight controllers to connect to PCs. No more onboard USB-to-UART converters like CP2102. SMT32 can work as USB device too after all... But for this, Windows users will require dedicated driver.

    I have no idea why STMicroelectronics made it so hard do download and use STM32 VCP driver for Windows. You have to register, confirm and then you can download, install package and look for the driver on HDD... Why, oh why....

    So, to fix this issue, here it is: STM VCP driver for Windows as a zip, ready for download. Just unzip...

    Read more...
  • Marabou Stork: Depron airplanes do not last long

    Marabou Stork, my Depron FPV airplane had a bad luck. Few weeks ago, when I was testing development version of INAV, it crashed during take off. Poor accelerometer calibration combined with a software bug resulted in heavy roll 2 meters above ground. As a result, whole front section was smashed. Everything else more less survived. Luckily, winter is coming, flying season is more less over. I have few month to rebuild the nose and glue it back into place. With some extra reinforcements.

    marabou stork crash 2

    marabou stork crash

    While Marabou Stork awaits new nose, I still have some footage to show...

    Read more...
  • Hobbyking Mini DLG Pro 990mm durability fix

    Entry level DLG (Discus Launch Glider) from HobbyKing has a quite important flaw for a "entry" level model: it is not durable. As a matter of fact, it is quite fragile, specially where plastic nose section is attached to composite fuselage tube. It is attached only with 3 small screws, and I can guarantee: every harder landing will result with something broken. During 3 first weekends with my Mini DLG Pro, I had to glue it back together every second flying session.

    Those 3 screws are just not stron enough to keep everything together, so I've decided to fix it with epoxy glue and I suggest all new owners of this DLG do it at the beginning. Thin layer of epoxy put everywhere where plastic meets fuselage tube is enough. It make glider strong like it should be from the beginning.

    hobbyking dlg pro 990mm epoxy reinforcement 2

    hobbyking dlg pro 990mm epoxy reinforcement

    There is a penalty of course: nose section no longer can be detached. Since HobbyKing does not sell replacement parts for this model, this is not a big problem after all...

    Read more...
  • What's new in INAV 1.4

    Although INAV 1.4 was not released yet, it's going to happen very soon. When? Probably in the beginning of a next week. Release Candidate is already available and until now, there are no major bugs discovered.

    So, what's new in INAV 1.4? Quite a few...

    • IMPORTANT: by default, motor output is disabled after flashing. This is to prevent servos from being damaged with too fast PWM rate. User has to enable motor output using Configurator (version 1.4 or newer) or with CLI command feature PWM_OUTPUT_ENABLE
    • Asynchronous gyroscope processing. I've described some time ago why this is good idea to have something like this. With 1.4, asynchronous gyroscope is available, but not enabled by default yet. I will try to write a longer article how to set it up later (I hope at least I will find time for it). Until then, this entry in INAV docs is all that has been written on the topic
    • Airplane launch assistant. Launching an airplane with INAV is almost as easy as it can be! You can read documentation on this feature on INAV Wiki
    • Improved throttle PID attenuation (or rather PID scaling) for airplanes. Read documentation on the topic
    • Emergency landing for airplanes
    • Experimental Pitot tube support (logging only) compatible with Pixhawk PX4 Airspeed Sensor
    • Improved handling for GPS+MAG and GPS+BARO configurations. With INAV 1.4 it should be not required to disable MAG and BARO when GPS is used
    • Improved failsafe
    • New targets: Airbot F4 / Flip32 F4, Omnibus F4 and YuPiF4
    • Multiple bugs fixed

    Additionally, new version of INAV Configurator has been already released. All users are advised to update! With Configurator 1.4.1 and firmware 1.4 following new features will be available:

    • Possibility to enable motor output
    • Gyroscope hardware filtering (gyro_lpf) and syncing PID loop with gyroscope (gyro_sync) setup
    • Advanced PID tuning now allows to set:
      • Gyroscope software LPF cutoff frequency
      • Accelerometer software LPF cutoff frequency
      • D-term cutoff frequency
      • Yaw P-term cutoff frequency
      • MAG_HOLD yaw rate limit
      • Axis acceleration limits
      • Yaw P limit and yaw jump prevention limit
      • I-term ignore rates
    Read more...
  • Omnibus F4 Pinout

    Omnibus F4 is a new family of All-In-One (AIO) STM32F4 based flight controllers with integrated OSD (On-Screen-Display) for FPV purposes. Basically, it is Airbot F4 / Flip32 F4 with added MAX7456 and some minor tweaks.

    • OSD connected via SPI bus
    • VCP port
    • 3 UART ports, UART3 is shared with I2C
    • Hardware inverter on UART1 allows to connect S.Bus receivers
    • Dedicated PPM/S.Bus connector
    • DSMX connecter
    • PWM connector that allows to connect 4 PWM channels
    • Integrated voltage stabilizer and voltage monitoring
    • Analog current monitoring
    • Analog RSSI monitoring
    • Buzzer connector
    • Integrated 16MB Blackbox flash memory

    Currently, only Betaflight and Raceflight (?) supports OSD on this board. INAV OSD support is on its way.

    Notes:

    • RAM pins are connected only to each other. For OSD only GND and Video IN and Video OUT lines have to be connected with camera and VTX
    • Integrated voltage stabilizer tends to get hot when powered from 4S. Do not try to power camera or VTX from it
    • Current and RSSI are NOT 5V tolerant. 3.3V max
    • S.Bus and DSMX are shared with UART1
    • To use UART1 and PPM, SBUS jumper has to be removed

    Airbot Omnibus F4 Bottom What is where

    Omnibus F4 can be purchased as Airbot Omnibus F4, Flip32 F4 Omnibus and "no-name" from Banggood and other Chinese shops.

    Read more...
Paweł Spychalski

I'm Paweł Spychalski and I do things. Mainly software development, FPV drones and amateur cinematography. Here are my YouTube channels: