This post is only a short update for SmartPort inverter for F4 flight controllers. Here is alternative SmartPort inverter circuit using bipolar BC547 instead of unipolar 2N7000. All other aspects of operations are the same like in MOSFET version.
It’s still middle of winter here in northern hemisphere, but I’m slowly preparing for next flying season. One of my goals is to push my DIY HC-12 Telelemetry System to a next level. In both range and quality. For quality I’m planning small hardware LTM decoder with LCD. For range, I want to reach at least 1.5km with 9600bps FU3 mode and 2.5km with 1200bps FU4 mode.
While STM32F4 family processors installed in newest flight controllers are superior to STM32F3 (and F1 of course) in terms of raw speed, they are inferior to F3 family in terms of IO handling capabilities. For example, F4 family is not equipped with UART port inverters. And that creates a series of problems when it comes to connecting various serial RX receivers and telemetry systems.
The most popular FrSky (Futaba) S.Bus serial RX protocol and FrSky SmartPort telemetry require inverted UART signal. If there is no hardware inverter on hardware UART port, they will not work. While S.Bus requires only one data line, external inverter is not a big issue. Some time ago I’ve published The Simplest Harware Inverter. One MOSFET transistor, one resistor and that’s all.
In case of SmartPort, it’s slightly more complicated. Not only signal is inverted, SmartPort also combines TX and RX UART line into single wire. That means the following:
- More complicated inverter is required
- Software has to support this case and fallback to unidirectional UART mode
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
As long as Naze32 / Flip32 are decent flight controllers for those who does not demand too much, they share very big flaw: low flash memory size. While even a year ago 128kB of flash was enough, times changed, and limited flash makes a problem for advanced flight controller software like INAV. Starting from INAV 1.1, STM32F1 flight controllers started to pay a penalty of disabled features. That time it was "only" telemetry providers other than LTM. Next time it might / will be more.
During last few weeks I've received few request to compile INAV 1.1 with enabled FrSky and/or SmartPort telemetry on Naze32 target. While I have nothing against doing that on request, I've decided it would be better to just prepare special version of INAV 1.1 for Naze32 users with all telemetry providers enabled. Link to ZIP file is at the bottom of this post.
- This version has LTM, FrSky, SmartPort and HOTT telemetry enabled
- To fit telemetry in limited flash memory, following features has been disabled:
- OLED display support
- DJI NAZA GPS module support
Short update on my DIY telemetry link for $20 from my previous post. In theory, it should be able to work up to 500m. Today I archived range of 850m. And I’m pretty sure it’s not the end if I was flying higher. At this distance signal was attenuated by 1st Fresnel zone. Next time, more altitude and higher mounted receiver antenna!
As I mentioned in my first post about HC-12 433MHz radio modules, I’ve put my interest in them for telemetry purposes. While S.Port telemetry I’m using in FrSky Taranis radio might have higher range than HC-12, it is closed environment. Since $10 for a pair of HC-12 is not much, I’ve decided for more open DIY solution.
Setup on a quadcopter consist of one HC-12 configured for FU3 mode and baud rate 9600bps connected to SPRacingF3 UART3 port and “air cooled” (shortened with a coil) 433MHz whip antenna. Well, to be precise, it’s 450MHz since I changed working frequency. Antenna is not tuned or scientifically computed. Just 433MHz version shortened a little using proportions. Antenna is mounted on GPS mast. In next version I will probably replace whip antenna with Vee antenna.
HC-12 are cheap 433MHz wireless serial port communication modules with a range up to 1800m in open space. Each costs about $5 when bought from China, and 2 of them can create wireless UART link that can be used, for example, to transfer telemetry data from UAV. Or drive IoT device. Or connect sensors. Or whatever else one can think of.
It is based on SI4463 RF chip, has build in microcontroller, can be configured using AT commands and allows to use external antenna. Working frequency is divided into 100 channels starting from 433,4MHz up to 473,0MHz with 400kHz channel separation. Maximum output power is 100mW (20dBm) and receiver sensitivity differs from -117dBm to -100dBm, depending on transmission speed. It accepts 3,2V-5,5V power supply and can be used with 3.3V and 5V UART voltage devices (5V safe). Continue reading “HC-12 433MHz wireless serial communication module configuration” »
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. Continue reading “WiFi telemetry for Cleanflight with EZ-GUI and ESP8266” »
With their latest transmitters and receivers FrSky changed telemetry protocol. XJT module, Taranis radios, X8R, X4R and X4RSB are using SmartPort telemetry protocol. And that creates few problems. First of all, SmartPort is a serial protocol. That means, flight controller has to have free serial port to connect S.Port device. Second of all, TX and RX lines shares the same wire. The work in half-duplex mode. Third of all, SmartPort signal levels are inverted: logical 0 is in HIGH state, logical 1 is in high state. All of that combined, connecting SmartPort receiver to flight controller and sending telemetry data is not so easy to archive. Specially on FCs without hardware inverters. That applies to most popular STM32F1 devices like Naze32 and Flip32. Not only numer of UARTs there is limited, but also they lack hardare inverters. Of curse, everything is possible and hardware solution for Cleanflight, Naze32 and SmartPort telemetry can be found here.
Luckily, there is simpler solution for Cleanflight that uses SoftSerial and does not require any hardware hacks besides special wire. Requirements:
- Cleanflight capable flight controller (STM32F1 or STM32F3),
- SmartPort enabled receiver: FrSky X8R, X6R, X4R, X4RSB,
- Possibility to enable SoftSerial. Depending on FC type, different fetures like Parallel PWM, Sonar, LED Strip or Current Meter collides with SoftSerial functionality. Check documentation first. In case of Naze32/Flip32 WS2812b LED strips and Parallel PWM can not be used.