-
Magical LiPo tree
Since LiPo batteries are potentially dangerous, they can not be just put into garbage. They have to be properly handled, utilized, before they can be safely thrown out. I will write more on this topic later. Here is only a picture of my magical LiPo tree. Knife, electrical connector, 12V halogen lightbulb, some sand, a flowerpot and LiPo discharger ready.
Read more... -
Hands-on: Beitian BN-880 GPS module
Looking for a decent replacement for my u-blox NEO-6M GPS modules I came by super cheap, Chinese, Beitian BN-880 modules from Banggood. According to information found in the internet, it's build based on u-blox Neo-M8N and is capable of receiving signals from GPS, GLONASS, Galileo, BeiDou, QZSS and SBAS. Plus integrated magnetometer module. Yesterday package finally arrived and here are my first impressions:
- It's not single board, but 2 boards glued together
- There is not casing, and cases for popular Neo-6M wont fit. BN-800 is much taller
- It accepts both 5V and 3.3V voltage and 5V UART level is safe, nothing burned
- It connected to Cleanflight and iNav without any problems at 38400bps
- Quick windowsill test showed that indeed it works not only with GPS, but also other positioning systems. When GPS Neo-6M was barely able to acquire 4 satellites, Beitian BN-880 found 9 and a solid 3D fix
- I did not tested magnetometer yet
Hopefully I will be able to perform more tests next few weekends and provide more info on this module. For now it looks very promising.
Read more... -
iNav: Return To Home with land
New release of iNav is at the doors. Today I took testing version for a spin and tried few navigation scenarios. For example, transition for Position Hold to Return To Home with landing. It looked like this:
It behaved fantastically: nice accuracy, precise landing. There were few wobbles on descend, but that was caused not yet tuned FP-PID of Angle mode and hard flying conditions: gusty wind up to 15m/s.
Read more... -
Happy Multirotor Easter
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.
-
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.

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.
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.
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
-
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.

So, if you want to flash ESP8266 on any PC (Windows, Mac, Linux) here is what you should do: Read more...
I'm Paweł Spychalski and I do things. Mainly software development, FPV drones and amateur cinematography. Here are my YouTube channels:









