Setting up your flight controller
This week of our Project Rosetta Stone S800 build is very straightforward. We’re setting up your flight controller. We wrote a guide for this step two years ago, and have updated it with the changes in INAV. It’s been used untold thousands of times. It explains how to setup INAV, tab by tab.
Things to focus in on
You’ll be thinking about these things in particular.
- Your Receiver
- SmartAudio/Tramp Telemetry
The GPS is fairly simple to understand. Some GPS modules have six wires, some have four. For planes we only worry about four. Two of the wires are ground and +5V. Simple. The other to are for TX and RX. When the GPS talks (TX) the flight controller listens (RX), and vice versa. Thus TX from the GPS module goes to the RX on the flight controller.
Here’s the wiring diagram from Matek for their F405-Wing. They show it being used with a compass. We don’t use the compass with Fixed Wings. Thus, I crudely crossed them out.
Notice the numbers TX4 and RX4? These are UART connections, similar to the USB on a computer. We are using UART 4 in this example. It’s a good idea to look at the wiring diagram from your flight controller to see how to wire to the UART. The Matek F405 Wing has more UARTs than you may need. You can use UART6 for example.
In the ports tab you will need to inform the flight controller what you’re doing with the UART. Unlike your desktop computer the flight controller isn’t plug and play. You have to inform your flight controller you’re using UART 4 in this example. By default, the UART is off. If you turn it on, you have to inform the flight controller what communications to expect. You do this in the ports tab. That’s all there is to setting up the GPS module, make sure you get the right end pointing up the to the sky.
The topic of the receiver and be fairly simple or extremely complex, depending upon how deep you want to go. Your transmitter sends packets of information (data) to the receiver. The receiver receives and hands the data over to the flight controller. The flight controller reads this, and executes commands. You may have said “move a servo” or “change the color of an LED” or “Change the flight mode from manual to acro.” These packets can send data 8, 12, 16 or 24 channels depending on your transmitter and receiver setup. With more channels, the transmitter will send multiple packets to send all the channel data.
Overview of what the receiver does
If you’re coming from the traditional Line-of-Sight RC plane community, here’s a receiver you may start off with. You may have this or have receivers that look similar to this. If you are putting this on a plane that has, rudder, elevator, throttle, and two ailerons you would use five of the eight channels. Thus you have 3 more channels left unused, which could be used for flaps or a gimbal setup. You have an option of putting an SBUS decoder on it and getting 8 more channels so that you can get the full 16 channels. I have no idea why you would need to hook up 16 things to a plane, but there you are. The S.Port (SmartPort) is used for hooking up optional sensors. There is an RSSI port out on the left bottom, for analogue RSSI.
You may own at least one of these receivers if you’re an old school RC LOS pilot. You can setup the plane to fly full manual at first and use it to setup a full manual trim. But once you’re done with a full manual trim, you should remove this receiver from your plane and use something else. True it does have SBUS and thus will work fine with INAV. But you’ll only be using the 3 pins on the bottom right (SBUS), and S.Port if you want telemetry. This is quite a large receiver that will take up space in your fuselage.
The FrSky XM+ is very small. It’s around 25mm (1 inch) tall. It weighs next to nothing. The three holes are for pins (included) or small wires you solder directly to the receiver. Nearly all the receivers you will use with INAV will need some type of soldering.
If you want something that just works, for starting out. There is a simple 3 wire solution. Follow the example from the GPS. Two wires are ground and power (usually 4.5v or 5v). The last wire is the signal wire, which provides SBUS. This just works. The great news is that it’s simple. The bad news is that it’s simple. If you want RSSI (so you can gauge the signal strength of your transmitter) you‘ll need more complex setups. There are some exceptions and work arounds like the FrSky XM+ which has an option (via firmware) to get a simplistic RSSI reading which is more than adequate.
The SBUS wire goes to the SBus pin on your flight controller, or a UART Rx on an F7 flight controller. Done and done. Even if you don’t get your RSSI to work you will still get all the channels your transmitter is capable of putting out.
But wait, you can see a fourth wire shown in the image. So, here’s the deal. If you stick with the three wires everything works great! But, if you want to know a bit more about what’s going on with your flight controller, it can broadcast information back to your receiver using telemetry. You can use a LUA Script and see information such as altitude, heading, and other cool things displayed on the screen of your transmitter.
If you have another UART to spare you can use it on some VTXs to turn up and down the power settings and change channels. You do this from your transmitter, or using features in iNav to change power automatically. This is a nice to have but not a need to have. You may want to circle back around to this later on after you have your plane flying. In the meantime, if your wiring up your VTX and it has SmartAudio or Tramp Telemetry, wire the appropriate cable to an available TX pad on your flight controller. Here’s a simple overview of how it’s done, though they are using BetaFlight in the video, it’s very similar to INAV.
Here are some base CLI settings to help start the build. This will set up some basic settings in iNav, so that you don’t have to worry about everything to begin with. Just got to the CLI tab, copy the text in the box below, and paste it in the CLI. Below, I’ll let you know what you’ve just changed.
set max_angle_inclination_rll = 600 set max_angle_inclination_pit = 400 set failsafe_procedure = RTH set roll_rate = 25 set pitch_rate = 12 set gps_ublox_use_galileo = ON set nav_fw_cruise_yaw_rate=30 set osd_failsafe_switch_layout = on set fw_turn_assist_pitch_gain = 0.100 save
- max_angle_inclination_rll is setting the maximum bank angle to 60 degrees in the Angle flight mode
- max_angle_inclination_pit is setting the maximum pitch angle to 40 degrees in the Angle flight mode
- failsafe_procedure sets the failsafe procedure to return to home
- roll_rate and pitch_rate sets the roll rate to 250 degrees per second and the pitch rate to 120 degrees per second. These will be good start points for the S800
- gps_ublox_use_galileo enables Galileo satellite use on your GPS module. This can only improve things
- nav_fw_cruise_yaw_rate increases the yaw rate in the Cruise mode
- osd_failsafe_switch_layout switches to the default OSD if you failsafe. This means you only need to put your GPS coordinates on the default OSD layout
- fw_turn_assist_pitch_gain lowers the pitch gain in turns. The default is too high for wings, like the S800
The wonderful thing about Project Rosetta Stone is that we’re out of sync with the release of the release candidate of INAV 3.0. So, pay attention to the process, because you may be doing most of this over again when INAV 3.0 comes out. It’s very, very different than INAV 2.6. You cannot copy and paste over the DIFF/All or Dump output and expect it to work.
The best thing you can do is install INAV on at least 10 planes. Because you’ll get very good and going over this, over and over again. Each update from scratch takes around 20 minutes once you’ve done it a few times.