Fly FPVSIM with a Betaflight flight controller

Fly sim with FC. A Betaflight flight controller runs the PID loop for a virtual quad in FPVSIM, with about 1.5 kHz gyro-to-motor feedback.

In hardware-in-the-loop (HIL) mode, your radio talks to the receiver wired to your Betaflight flight controller. FPVSIM sends the virtual quad’s roll, pitch and yaw rates over USB. The board runs its filters, rates and PIDs and sends four motor commands back. The simulator supplies the 5-inch airframe, motors and collisions.

Use a spare controller on the bench. Remove every propeller, disconnect the flight battery and set ARM off with throttle at minimum. Flashing replaces the board’s firmware and can erase its settings. The HIL build disables physical motor outputs. To fly a real quad with this board again, restore its original flight firmware and configuration.

HIL or USB Joystick?

Choose one USB mode for your flight. Both use your radio and receiver.

FPVSIM HIL

Your Betaflight board runs the flight controller and flies the virtual quad.

FPVSIM sends gyro rates to the board. The board returns four motor commands.

or

Betaflight USB Joystick

Your board acts as a joystick. You fly with FPVSIM’s built-in flight controller.

The board sends stick and switch positions to FPVSIM.

Flight modeFPVSIM HILBetaflight USB Joystick
Flight controlBetaflight applies your board’s rates, gyro filters, PIDs and motor mix.FPVSIM applies the simulator’s rates, tuning and motor mix.
USB dataFPVSIM sends roll, pitch and yaw rates. The board returns four motor commands.The board sends stick and switch positions as joystick axes and buttons.
AircraftThe virtual 5-inch quad in Acro. Arm it with the switch on your radio.Your selected FPVSIM aircraft, with its usual flight modes and control mappings.
Update rateThe HIL HUD counts gyro samples with a matching motor reply.Each joystick report updates the stick and switch positions.
SetupFlash the simulator-only HEX, enable HIL in Settings and connect your board there or in the flight HUD.Find your board’s firmwareEnable HID Joystick on a supported Betaflight build. Leave HIL off in FPVSIM and calibrate the controller.USB Joystick setup guide

BLITZ F722 flight test. With a 2 kHz target, the board averaged 1,541 gyro-to-motor exchanges per second over a 60-second rendered flight.

1
Identify and back up your board

Connect the board with a USB data cable. In the Betaflight App, open the CLI and run the following commands separately.

version
diff all

Save both outputs. Record the original firmware version, board_name and manufacturer_id. Keep a backup of your original firmware or custom build options too. Similar board names and revisions can have different pin assignments.

2
Download the HEX for your exact target

This release covers the STM32F722 and STM32F745 boards listed below. Expand the list and use your browser’s Find command to look up the full board_name, including any suffix. If your target is absent, keep your current firmware. The HIL flight loop has been tested on an iFlight BLITZ F722. The downloads have been build-checked. Other board models still need hardware testing.

Open the GitHub firmware release for the source and all HEX files, or download the SHA-256 checksums. Each HEX can be loaded directly in the flasher.

Download by Betaflight board name

STM32F722

STM32F745

3
Flash and check the receiver

In the Betaflight App, open Firmware Flasher, choose Load Firmware [Local], select the downloaded HEX and flash it. Wait for verification and reboot. If the board needs manual DFU, follow the boot-button instructions for your board.

Reconnect in the app. Set the receiver port and protocol for your wired receiver. Verify channel movement in Receiver and the ARM switch in Modes. Use the Quad X mixer, props-out motor direction, ordinary one-way throttle and Acro mode. Leave Angle, Horizon and 3D mode off. Rates, PID gains and filters come from the board.

If USB power leaves the receiver dark, check your board’s documented USB-powered receiver pads. Keep the flight battery disconnected. Close the Betaflight App connection and other simulator tabs before pairing.

Betaflight Firmware Flasher instructions

4
Pair in FPVSIM and take off

Open the simulator in desktop Chrome or Edge over HTTPS, or on localhost. In Settings, check “Fly with Betaflight HIL (Hardware In the Loop).” Click “Connect flight controller” and choose your board. When the button says “Paired,” close Settings to start the flight with the 5-inch quad. This flight URL remembers HIL mode when you reload it.

You can also connect from the HIL row in the bottom-left flight HUD. A single board with existing permission reconnects automatically. Wait for Disarmed and a changing Hz reading, then use the radio’s ARM switch and raise throttle gently. Armed means the board is sending armed motor reports.

The Hz value measures fresh gyro-to-motor exchanges received each second. Rendering FPS and the board’s PID loop frequency are separate measurements. Hover over the HIL row to see missed slots and the longest recent gap.

Open FPVSIM

5
Recover a link or return to normal flight

Offline or no board in the chooser. Check the target and firmware, try another data cable and close other apps using the controller. On Windows the HIL interface must use the HID driver. The DFU bootloader uses a separate driver. Click Connect or Retry when the board is back in flight mode.

Waiting for USB, or an unexpected disarm. Lower throttle and switch ARM off. Return to the simulator tab and check for Disarmed and fresh replies before arming again. A prolonged loss of feedback stops virtual thrust. A normal crash or respawn reuses the USB connection.

Return to the built-in controller. Disarm, uncheck “Fly with Betaflight HIL (Hardware In the Loop)” in Settings and close Settings. Your regular aircraft and simulator controls return. Disconnect in the HUD only closes USB for that session. Switching HIL off in FPVSIM leaves the simulator firmware on the board.

Before real flight, flash the recorded original firmware for your exact target, restore its matching settings, and verify receiver, failsafe and motor assignments with the props removed.