• Happy Multirotor Easter

    dav

    Read more...
  • Connecting ultrasonic rangefinder (Sonar) to Cleanflight and INAV

    Keeping constant altitude with a drone is not a trivial task. Specially, if drone is supposed to keep give altitude very precisely few meters above the ground. One of the reasons for it is difficulty of reading precise altitude. Barometer can drift when atmospheric pressure changes and can produce a lot of noise. GPS is very inaccurate when dealing with altitude. One of the options is to use some kind of rangefinder. Ultrasonic for example. Cleanflight and its derivatives supports exactly one kind of those: cheap HC-SR04 sonar. There are plans to integrate different sonars, but none of official builds supports it yet.

    dav

    Read more...

  • WiFi telemetry for Cleanflight with EZ-GUI and ESP8266

    Some time ago I have written a tutorial how to setup Bluetooth based telemetry link between Cleanflight and PC or smartphone. It's simple and it works. But it has some disadvantages. For example, connection is very very slow and has a limited range: up to 10 meters. While it is enough to change PIDs before flight or plan a mission with EZ-GUI, it is not enough to have a real, usable and reliable, telemetry link.

    ESP8266 ESP-01 Version 2

    Luckily, Bluetooth is not the only cheap radio protocol we can use for purposes like this. Why not to use WiFi? Since market saw ESP8266 some time ago, cheap programmable WiFi modules became a reality. There are cheap, they are simple to use and can be programmed to do much more than just act as Access Point or network client. There are many alternative firmwares. For example ones that provides transparent bridges via TCP to allow pass serial ports over WiFi. Almost like serial over Bluetooth, but using WiFi instead. In theory that gives more range, higher speed and lower delay. Why not to use it to connect Android smartphone to drone flight controller and have nice an cheap telemetry solution? Exactly, why not. In this example how to do it with Android EZ-GUI and Flip32 running Cleanflight 1.12, but exactly the same trick can be used for Betaflight, SPracingF3, iNav, Baseflight, Naze32, APM, Pixhawx, MultiWii. If anything is using UART, it can also use ESP8266 as serial bridge over WiFi. Read more...

  • New PID controller for iNav

    If anybody keeps track of my posts about iNav flight controller software, he or she should notice that I like it very much. Guy nicknamed DigitalEntity did excellent job improving Cleanflight's navigation modes. Maybe it is still not the same level as Pixhawk or Naza, but with this improvement speed those two are within reach for sure. When few days ago I noticed that he started to work on new PID controller called FP-PID, I've decided to take a look at.

    Question. What is the worse flaw of all MultiWii inherited PID controllers? No, not the fact that they are using integer math. It might not make much sense on FPU equippent CPU like STM32F3, but it is fine. The biggest problem with them is that they are not based on proven scientific methods. If you read the code, it will look like this: divide this by Y, multiply X, make a strange assumption, instead of running other control loop make another strange assumption. At the end, they work. But hmm... in a magical way... The only PID controller that was written according to "rules" is LuxFloat.

    And since I'm not an expert on control theory, I've decided to ask DigitalEntity why FP-PID is developed and what new will it bring. Here are the most important fragments of his reply.

    I believe that the only real reason to have lots of PID controllers if that some/most/all of them are flawed in some way (from calculus point of view). So instead of having 2-3-4-5 controllers based on coding voodoo I would prefer to have one controller that is based on solid math and well-known numeric methods. The only PID controller in Cleanflight with clear and simple design [...] is LuxFloat. That's the reason to take it as a base for future improvement.

    Comparing to LuxFloat, it is designed to improve the following:

    • Better integral anti-windup prevention. Instead of hard-limiting integral part [...] the FP-PID implements so-called 'backtracking' algorithm to keep the PID controller output within limits. Next step [...] PID will be aware when the motors are at their limit
    • Improved D-term calculation. All fuss around D-term is about noise. D-term tends to amplify high-frequency noise (usually vibration from props/motors) making the quad jitter. Current designs calculate D-term from current and previous readings and implement low-pass filtering and averaging to prevent D from amplifying noise, while allowing it to do it's job. They all fight the consequence, not the cause - they try to fight already amplified defivative of the noise instead of filtering the noise itself. My D-term code is based on Pavel Holoborodko's method of noise-robust derivative calculation [...]. I also kept BiQuad filter from Betaflight to filter out the remainder of the noise.
    • Modifier self-leveling logic. Current approach with self-leveling is to take angle error and feed it to gyro-based controller as if it was pilot's input in acro mode. However, roll/pitch angles are calculated from the same gyro data, leading to the phenomenon similar to D-term noise amplification - the faster the quad is rotating the bigger is PID response in self-leveling compared to rate mode. What I did is made the self-leveling code behave like human pilot. Human pilot does not correct for each and every slight attitude change, instead he corrects for bigger and slower changes. This is by definition the low-pass filter which is what I did in the code. This change makes self-leveling less jittery which is very evident when doing FPV flights in ANGLE or HORIZON modes.

    The way I see it, it sounds super intresting. If time and weather will allow, I will give it a try next weekend on my 250 build. Just for fun.

    Read more...
  • Quick review: DAL 5040 propellers

    My last review of cheap Chinese propellers, Gemfan 5x3 3 leaf, was quite negative. This time it will be much, much better: DAL 5040 (5x4") fiberglass reinforced propellers. They are cheap, only slightly more expensive than super popular Gemfans 5030. But they beat Gemfans in every aspect. Not only DAL 5040 give more power and pitch speed. They are also much more durable. The internet calls them "indestructible". No, they are not indestructible, but they are strong enough to survive crashes big enough to break Gemfans 5030.

    DAL 5040 (5x4") fiberglass reinforced propellers

    So, even if they are slightly more expensive, they last longer and give more power. It is also interesting how they break. It is either in the hub and whole leaf is gone, or they fracture is the middle of a leaf.

    DAL 5x4 fiberglass props

    DAL 5040 propellers

    Bottom line: I like these propellers very much, they are surely worth the price!

    Read more...
  • Antennas: power loss on polarization mismatch

    Most people in RC hobby knows that receiver and transmitter antennas should match polarization. But what would happen if there was a mismatch? For example when transmitter uses linear vertical and receiver circular left hand? There would be a loss of power, attenuation. How much? Look at table below. Remember: -3dBi means half of power is lost during polarization change and you need +6dBi power (4 times more) to increase range by factor of two.

     

    Vertical Horizontal LHCP RHCP
    Vertcal 0dBi -20dBi -3dBi -3dBi
    Horizontal -20dBi 0dBi -3dBi -3dBi
    LHCP -3dBi -3dBi 0dBi -20dBi
    LHCP -3dBi -3dBi -20dBi 0dBi
    • -20dBi is practical value. In theory, all power should be lost during this conversion. But we are living in not perfect world and always some power will go though
    • Vertical - Linear Vertical Polarization
    • Horizontal - Linear Horizontal Polarization
    • LHCP - Left Hand Circular Polarized
    • RHCP - Right Hand Circular Polarized
    Read more...
  • How to flash firmware to ESP-01 ESP8266 WiFi module

    One can think that internet know everything about everything. Yesterday I've learned the hard way that is does not. It took me better part of evening to find a working way to flash firmware, any firmware, to cheap ESP-01 ESP8266 WiFi modules. There are many tutorials, most of them were just wrong in my case. If I had Windows PC, that might have been simpler. But I don't.

    ESP8266 ESP-01 Version 2

    So, if you want to flash ESP8266 on any PC (Windows, Mac, Linux) here is what you should do: Read more...

  • 10 channels for FlySky FS-i6 radios

    This news might be not super fresh, but somehow it missed my attention. There is a good news for all owners of FlySky FS-i6 radios: there is an unofficial firmware that turns this cheap 6 channel radio into 10 channel one. Of course, there is a small catch, or even a few of them:

    • All 10 channels are available as PWM only using FS-ia10 receiver
    • PPM on FS-ia6B is still only 6 channels wide. To have all 10, iBus connection to flight controller or iBus to PPM converter required
    • PPM output still only on FA-ia6B and FS-ia10 receivers. No support for FS-ia6 RX module
      FlySky FS-i6 (Turnigy TGY-i6) 6 channel 2.4GHz radio system with FPV mount

    New firmware, as well as few additional mods, is available on GitHub. I did not checked that, since I no longer own FS-i6 radio, but I've read good oppinions: it is stable and functional. So, who will give it a try?

    Read more...
  • iNav: Cleanflight learned how to do missions

    In my recent post I mentioned that iNav flight controller software (fork of Cleanflight) introduced missions. Missions are preprogrammed waypoints that drone will fly to in specified order and/or do specified action at each of them. For example, if pilot wants to make a video on specified route, he does not have to pilot his drone all the time. He enters waypoints and lets machine do everything else. In this entry I will show how to configure iNav to do missions.

    Requirements

    • iNav compatible drone flight controller flashed with iNav software. Currently supported boards are: Naze32, Flip32, CC3D, SPracingF3, Sparky, RDMO
    • GPS module connected to flight controller board. This example shows how to do it for Flip32, but it will work for all other boards, only UART pins might be different
    • Magnetometer connected and properly calibrated
    • Barometer connected
    • EZ-GUI Ground Station Android application that will act as Mission Planner. Official Cleanflight Configurator does not support this function yet
    • Bluetooth telemetry. Some time ago I have written how to do it for Flip32, but it will work almost the same for all other flight controllers, only UART pins might be different

    Read more...

  • Better GPS for Cleanflight: iNav

    Cleanflight is an awesome piece of software for STM32 based flight controllers. But Cleanflight has one very serious flaw that makes its usage on bigger drones at least problematic. Cleanflight sucks in GPS and barometer support. Sucks a lot. It can handle Position Hold (somehow), Return To Home (barely) and Altitude Hold (oh man, up and down, up and down) but if you at least one tried that, you should know that is not only not reliable, but also not precise and hard to tune. Personally I gave up after few tires. It was not worth it. Comparing to Pixhawk (not talking even about Naza) it might as well not exists at all. But it has changed recently.... 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: