This tutorial will show you how to make your own DIY SBUS to USB converter. This would allow you to fly FPV simulators wirelessly using any FrSky SBUS Receiver. All you need is a cheap STM32F1 development board.
Before we begin, I should make it clear that it would not be cost effective to buy a brand new SBUS receiver just for the sole purpose of doing this project. If you don’t have any spare SBUS capable receivers lying around already, you might as well just buy a dedicated USB simulator dongle for a similar price instead.
You can also fly simulators wirelessly using a flight controller instead of an STM32F1 if you have a spare one lying around. If not, it’s cheaper to buy an STM32F1 board.
This tutorial is written by Darren Louw, huge thanks to him for sharing this with the community.
You can use any Frsky receivers with SBUS output for this USB converter, R-XSR, XM, X4R… these should all work. In this example, I will be using a FrSky RX8R which is bound to a Taranis QX7.
STM32F1 Development Board
This is a micro controller, the “brain” of the converter that will handle the SBUS to USB conversion. It basically encodes the SBUS signal into a “language” that your computer can understand, thus functioning like a virtual joystick on your computer.
The good news is, you won’t need to write any code to get this board working, I will provide the necessary file in this guide, and you just need to upload it to the board.
These boards are very cheap, usually only costing around $3 to $7. Here are some vendors:
Flashing the STM32F1 Board
The STM32F1 board cannot be flashed through its micro USB port, and needs a USB to Serial FTDI adapter, such as this one: http://bit.ly/2I2jD8K.
This is in fact an extremely useful tool in FPV and can be used in many situations, like flashing flight controller when the USB port is dead, flashing your goggle modules, updating firmware on iSDT chargers…
Here is mine:
It should normally work out of the box, but if your PC does not recognize the USB to Serial adapter, you might need to install the driver first. It’s easy on Windows 7 and 10, simply enable windows update to allow automatic driver detection.
- FTDI 5V pin to STM32 board’s 5V pin
- FTDI GND pin to STM32 board’s GND pin
- FTDI RX pin to STM32 board’s PA9 pin
- FTDI TX pin to STM32 board’s PA10 pin
- Connect the FTDI chip’s USB to your PC
- Download the SBUSJoystick firmware for the STM32 board here: https://github.com/DarrenLouw/SBUS/releases/
- To flash the firmware on the board, you need to install this STM32 Flashloader: https://www.st.com/en/development-tools/flasher-stm32.html
You will also need to register a free account on ST.COM, before you can download the Flashloader.
Flashing the Firmware
Wire the FTDI chip to the STM32F1 board, and change the Boot0 jumper to high.
Connect your FTDI chip to the PC, then run STM32 FlashLoader Demo program.
Press the Reset button on the STM32F1 board.
In the FlashLoader program, select your FTDI’s COM port (in my case it’s COM9) & hit next.
It should say “Target is readable”. If you get an error, double check that Boot0 jumper is set to high, power your board off & on, then hit the reset button and try again.
Choose STM32F1_Med-density_128K in the Target option, and hit Next.
Select the option “Download to device” and browse for the SBUSJoystick.bin file you downloaded earlier.
If you can’t find it, make sure you have set the file extension to *.bin.
Now, hit Next and wait for it to flash.
Finally, Move the board’s Boot0 jumper back to the low position, then disconnect the FTDI chip and ensure that the board is powered off (no LEDs are on).
If you forget to do this step, the program will automatically erase itself when the board loses power and you will need to re-upload the program from scratch.
The original SBUS signal from Frsky receiver is “inverted”, but the STM32F1 board does not have built-in signal inverters, and so you will need to un-invert your SBUS signal using one of the following methods:
Method 1 (Recommended): Bypassing the receiver’s built in SBUS inverter (No inverter circuit needed)
See this guide for detail: https://oscarliang.com/uninverted-sbus-smart-port-frsky-receivers/
This is recommended because you don’t need extra hardware and soldering, probably looks cleaner too.
Method 2: Make a serial inverter circuit
Use a general purpose NPN transistor + 2 resistors in the following circuit configuration.
I soldered this circuit onto some vero board, added female pin headers to mount the STM32F1 board and added additional pin headers for pins: 5v, GND, PA9, PA10 (Programming pins in case I need to re-flash/update firmware in future).
- Transistors: http://bit.ly/2W9PIjj
- Resistors: http://bit.ly/2RaiZqm
- Proto Board: http://bit.ly/2HtTQau
- Female Pin Headers: http://bit.ly/2MrNFm9
- Male Pin Headers: http://bit.ly/2R5W27H
To hook your receiver up to the STM32F1 board, connect:
- Receiver 5V to STM32F1 5V pin
- Receiver GND to STM32F1 GND pin
- “Uninverted” SBUS output to STM32F1’s PB11
Configure Radio Transmitter
In the radio, ensure that CH1-6 output a signal value of around 1000-2000.
The output channel order should be this:
- CH1: Throttle
- CH2: Roll
- CH3: Pitch
- CH4: Yaw
- CH5: AUX1 ( greater than 1800 will toggle virtual button 1 on)
- CH6: AUX2 ( greater than 1800 will toggle virtual button 2 on)
Check If It Works
Windows users can check the stick outputs here:
- Start => Search “Set up USB Game Controllers”
- You should see a list of controllers, open the one called: “Maple”
- In the new window, go to the “Test” tab, and wiggle the sticks on the radio, flip the switches, and it should show the stick inputs if it’s working.
Now you can configure your radio in your preferred FPV simulators :)