
Here are some common usage of Softserial. I am using Betaflight F4 flight controller in all of my examples below, but the same steps and concept should apply to other FC’s. If you run into any problem or have any technical questions, you should always email your FC manufacturer first.
Motor 5, 6, 7 & 8 (if they are available).
LED pad (It’s LED_STRIP in CLI, not LED which is the status LED on the FC). In general you should be able to find the following pins on MOST FC’s and use them for soft serial: This depends on the FC, and what timers the pins are connected to, you can find out what pins can be used for Soft Serial on your particular FC at this page: īut most of the times, you just have to try. Assign SoftSerial TX/RX to spare pins using Betaflight Resource Remapping (in CLI)Ĭheck out this beginner’s guide to Resource Remapping in Betaflight.Īfter FC rebooting, you should see a newly added “Soft Serial” port in the Ports tab. Enable SoftSerial feature (in the Configuration tab). It’s much easier to understand how to use SoftSerial with examples, which I will show you later in this tutorial.īut in a nutshell, there are only 2 steps in configuring Softserial: Softserial can be picky about what pins you are allowed to use – LED_Strips almost always work but other pins are uncertain, you just have to try. In the current Betaflight firmware, only two Soft Serial ports are allowed. Soft Serial consumes processor resources and will increase CPU load. Baud rate limitation – Softserial works well at 9600 baud rate but not higher rates such as 115200. Duty cycle limitation – Softserial is not suitable for high duty cycle and “chatty” applications that occupy too much processor time like OSD and serial RX. Nothing is perfect, there are some disadvantages in using Soft Serial:
With Softserial, you can connect SmartPort directly to the FC without performing the uninversion hack. This is extremely useful for F1 and F4 flight controllers as they don’t have built-in inverters. This allows you to free up a whole UART for something else.Īnd Soft Serial also supports inverted signal like Smart Port.
you can use UART1 TX pin for SmartAudio or SmartPort if you set it to Soft Serial. For example if you use UART1 RX pin for ESC Telemetry. You can even “split“ one UART for two things. With the limited number of UART’s on a flight controller (only 2 or 3 on F3/F4 boards), you can turn unused pins like LED_Strip or PPM into softserial ports for connecting additional devices. Stuff that requires a UART connection but not timing critical, such as: