Wednesday 11 October 2023

Unusual RC and INAV problems and solutions

This post will be an ongoing log of troubleshooting solutions that I come across in video comments and questions. 

Some solutions are obvious and just require reading the manual, or checking connections. But some solutions are unexpected and weird.

This will document some of the more unusual problems that can mess up an RC setup


List of odd problems and their solutions


INAV

"Pitch / Roll not centered" error message

Cause - Switch mistakenly assigned to Aileron channel in the radio


Disarming with any aileron input

Cause - Used an existing model setup in the radio which had aileron mixing on the same channel as Arming in INAV.

GOLDEN RULE - Create a new fresh model for your INAV setup to avoid any leftover mixes


Outputs working in the INAV configurator but actual servos don't move

5V servos used with 6V servo BEC setting. One servo burned out and prevented others from working.. 


AtomRC Penguin on INAV

Turning right and crashing during launch.

Cause -  ESCs were out of sync after lots of INAV VTOL configuration testing.

Recalibrating the ESCs in INAV Outputs Page corrected the problem.


SpeedyBee F405-Wing MINI 

USER modes not available for analog camera switching in INAV 7.0

Cause - This feature missed the deadline to be included in INAV 7.0. Updated firmware available on the Product page and INAV 7.1


Board stopped working after prolonged setup session

Cause - Bent pin on the "between-board" connector after repeated disassemblies.


SpeedyBee F405-Wing 

No voltage on DJI 9V port 

Cause - Bent ground pin needed straightening


No output on S8, no Soft Serial for S-Port function 

Cause - Factory firmware bugs, upgrade to INAV 6.1.1


FrSKY GRX8 

Receiver unable to enter bind mode 

Cause - Worn bind button contact. Needed to push harder on the bind button


Kootai A505 J3 Cub 

Will not initiate 

Cause - Futaba FASST protocol uses REVERSED throttle channel


Skywalker X8 

Wings out of alignment. 

Manufacturer glued the spar at the top of the channel in one wing and bottom of the channel in the other wing - Cut out spar and foam packing and re glue correctly.


FIMI Manta - Matek F405 VTOL - Ardupilot ELRS 

RC connection won't work 

Cause - SERIAL5 was set to CRSF (Parameter = 23) as well as SERIAL6 which prevented Rx connection.

Only SERIAL6 should be set to CRSF


Tuesday 12 September 2023

ArduPilot - QGroundControl for Mac

ArduPilot configuration using QGroundControl for Mac on a simple GPS enabled FPV wing. No ground station, no compass, no airspeed sensor.



Mission Planner is the most popular ArduPilot configuration program but there is no Mac version

My gear for this ArduPilot test:

Matek F405-Wing board, LTE Rambler Wing, RadioMaster Boxer, ELRS receiver and RF module.


QGroundControl for Mac

Download and install QGroundControl for Mac











ArduPilot firmware
Go to the ArduPilot Github repository and find the latest stable ArduPilot Plane firmware for Matek F405-Wing (or your FC). Download the hex file that includes the boot loader (arduplane_with_bl.hex)

Firmware page - https://firmware.ardupilot.org/Plane/



All of this information comes from the ArduPilot Plane documentation - https://ardupilot.org/plane/index.html


Initial firmware flashing with INAV

QGroundControl cannot be used to flash Ardupilot to a board that does not already have Ardupilot loaded. INAV or BetaFlight can be used for this.

Connect the board to INAV Configurator in DFU mode by holding the DFU button while connecting the USB

Select Firmware Flasher then Load Firmware (Local)

Locate the dowloaded arduplane_with_bl.hex file and select Flash Firmware

Once Ardupilot firmware is flashed to the board QGroundControl can be used for updates and configuring.


Configuration with QGroundControl

Open QGroundControl and connect the F405-Wing via USB

IMPORTANT: First step is to RELOAD the firmware using QGroundControl now that Ardupilot is on the board. 
Click on Firmware, unplug the board, then reconnect to start the upload.

This seems to be necessary to make the sensor calibration and servo outputs behave correctly, not sure why.


Once the firmware has been updated and the board rebooted, the Horizon icon should react to board movements, and sensor setup notices will pop up.



Click on the Q icon (top left) to open Tools, then Vehicle Setup

Parameters screen should appear in a few seconds.






Calibrate Accelerometer

Click on the Sensors tab (left of parameter screen) and select Accelerometer

Follow the prompts to calibrate the accelerometer while holding the board in all 6 orientations.




Set up the ArduPilot model in your radio.

It is important to create a fresh model in your radio to avoid any leftover inputs, mixes or overrides.

Model setup for ArduPilot must have no mixing, no rates or expo. No matter what style of plane you are configuring, this is how the mixing page on your radio should be. 

All control surface mixing and channel reversing is done in QGroundControl


Ch 1 100% AIL

Ch 2 100% ELE

Ch 3 100% THR

Ch 4 100% RUD

Ch 5 100% MAX (ELRS requirement)

 

All ArduPilot's Flight Modes are on Ch 8 by default

Ch 8 100% SC for 3 positions operating 3 Modes

OR

Mixing for 6 modes using combination of SC (3 pos) and SD (2 pos) switches

Ch 8  31% SC -45% Offset, SD Up

ADD  31% SC +45% Offset, SD Down

OR

Ch 8  65% S3 (6 position switch) 

Weight of 65% is required so the 6 PWM values match the ArduPilot Mode PWM ranges

Make sure the receiver is bound to the radio 


Parameter Setup

To find and edit items in the Full Parameter list, click on Parameters then type in the search field, then click on the relevant line to bring up the Parameter Editor box.

The firmware does not correctly preset all of the parameters for the F405-Wing board. The following changes are essential to configure the board for successful operation.

Configuring SERIAL inputs (UARTS)

Note that some FCBs have a different UART numbering sequence to the Ardupilot SERIAL numbering. Check the board's product page or the Ardupilot board info list. https://ardupilot.org/plane/docs/common-autopilots.html

Luckily the Matek F405-Wing board UARTs do match.

The following SERIAL parameters need to be entered

1. Receiver protocol and UART1 selection

SERIAL1_PROTOCOL - Manually enter "23" 
This changes the RC protocol to RCIN - ELRS/CRSF
This info is on the Matek product page and ELRS documentation

2. GPS connects to UART3 and/or UART4

SERIAL3_PROTOCOL - GPS

Baud Rate is automatically adjusted

No other SERIAL inputs need to be changed at this stage (Unless you have HD FPV that needs UART connection)

Connect ELRS receiver RX and TX to UART1 on the board. Connect receiver power to 4.5V pin if you want it to be powered from USB for setup


Calibrate Radio in QGroundControl

With the receiver connected and bound to the radio, click on the Radio tab.

Follow the prompts while moving sticks and switches to calibrate Ardupilot for the radio. 

This configures the stick functions or RC inputs, and sets the channel endpoints


Configuring motor and servo connections

SERVOn_FUNCTION


Edit SERVO Parameters to be as shown below

SERVO1_FUNCTION - Throttle

  Change SERVO1_MIN to 1000

ESC signal connects to S1 pins on the F405


SERVO3_FUNCTION - ElevonLeft 
May need to change and/or reverse later

  Change SERVO3_TRIM to 1500

Left Elevon connects to S3 pins on the F405


SERVO4_FUNCTION - ElevonRight 
May need to change and/or reverse later

Right Elevon connects to S4 pins on the F405


Configuring other parameters

SAFETY (Click the Safety tab)

Safety Checks - Leave ALL ticked.

Return To Launch Altitude - Change if desired. I use 7000cm (70m)


COMPASS_ENABLE - Disable 

Otherwise Safety Checks will prevent arming


ARSPD_TYPE - None 

Otherwise Safety Checks will prevent arming


ARMING_RUDDER - ArmorDisarm 

To allow arm and disarm with rudder stick. 

Arming by a Switch is also available


FS_LONG_ACTN - RTL 

Return to Launch on a "longer than short" Failsafe. 

Short Failsafe Action is preset to CIRCLE to attempt RC reconnection, then reverts to Long failsafe after 2 sec.


SERVO_AUTO_TRIM - Enable 

Continuously trim servo midpoints for level flight in Manual


TRIM_PITCH_CD - 300 

300 centi degrees for 3ยบ of nose up for level flight (maintain altitude) in FBWA. Adjust for your craft


TRIM_THROTTLE - 38 

For criuse throttle of 38%. Adjust for your craft


RSSI_TYPE - ReveiverProtocol 

Allows ELRS RSSI and LQ to be displayed correctly


Configuring Control surface movements

1. Correct stabilisation directions

IMPORTANT - Do this before step 2.

Check control surface movements for stabilisation in FBWA Mode

Without touching the sticks - 

Left elevon should move up and right elevon down, when the left wing is raised

Right elevon should move up and left elevon down, when the right wing is raised

Both elevons should move up when the tail is raised

I needed to make the following changes to give correct stabilisation elevon movements

SERVO3_FUNCTION - Change to ElevonRight

SERVO3_REVERSE - Change to Reverse

SERVO4_FUNCTION - Change to ElevonLeft


2. Correct stick input directions

Check control surface movement for stick inputs in Manual Mode

My elevator action was reversed, so I needed reverse the elevator input (RC2) in parameters 

RC2_REVERSED - Reverse

Coming from INAV I prefer to reverse RC inputs in QGroundControl and not in the radio. But I think either method is OK in Ardupilot.


Analog OSD Setup

Connect camera and video transmitter to the board


Search for OSD parameters

OSD_ENABLED - Enabled (To turn OSD on)

By editing the OSD parameters you can Enable and Disable OSD elements and position them by changing the X and Y parameters.

There are about 23 horizontal and 13 vertical positions

The F405-Wing board does not have enough memory to include alternative fonts. 

However other fonts can be stored on the SD card and called up using the OSD1_FONT parameter

Download fonts from the Ardupilot Font repository

I changed to the INAV style font (font2.bin) 

Copy the font2.bin file onto the SD card and choose OSD1_FONT = 2


Setup and maiden videos - https://www.youtube.com/@AndrewNewton/search?query=Ardupilot




Thursday 10 August 2023

CC2500 Multi-protocol list


Some of the smaller RadioMaster multi-protocol transmitters are only available with the CC2500 RF chip and not the full 4-in-1 RF chip.

This is fine if you use FrSKY receivers, but you will need a 4-in-1 radio for FlySKY and Spectrum receivers, and all the odd RTF model protocols like V761 etc .

Of course you can add a 4-in-1 external RF module to a CC2500 or ELRS radio for full multi-protocol compatibility


CC2500 RF chip supported protocols 

FrSKY (but not ACCESS, TD or Twin)

S-FHSS (Futaba)

RadioLink

Graupner HoTT 

Skyartec

Full list on GITHUB


4-in-1 RF chip 

Includes all the CC2500 protocols and many more, like Flysky (but not ANT) and Spektrum DSMX

Visit the Multi protocol page for the full list


ELRS 2.4 RF chip

Only compatible with ELRS 2.4 CRSF protocol receivers



Sunday 25 June 2023

Simplified INAV

How to simplify INAV model setup and start flying sooner.

The key to simplicity is having a plane that is trimmed and balanced well mechanically, and just starting with the basic INAV modes. The default tuning PIFFs (stabilisation parameters) will be OK for most normal performance planes using INAV 6 and beyond.

The advanced modes like Auto Launch, Auto Tune, Auto Trim and Missions will just complicate your first INAV experience. It is much simpler and safer to get the model flying well first, then add advanced modes later.

This article is intended for fixed wing pilots who know how to mechanically set up a model for correct throws, trims and CG. 

Start with a model that is easy to fly and has adjustable push rods.

Important first step 

Before you install the flight control board, adjust the pushrod lengths and connection holes to give reasonable throws using 100% servo travel. Test throws with a servo checker or PWM receiver. 

This is because INAV manual mode uses 100% weight and 30% expo by default. 

If possible, fly the model first to check aileron and elevator trims and CG placement. Adjust the trims by changing the pushrod lengths mechanically and don't use the radio trims.  

Radio trims should never be used in INAV because are only applied in manual mode.

The setup doesn't have to be perfect and it's OK if the plane is a little too agile with these full throws, as long as it is flyable.

Later you can enable "Continuously trim servos" in the INAV Configuration page. This will continuously save fine adjustments to the servo midpoints for level flight in Manual.

Essential INAV Modes

The only modes you need to set up initially are ACRO, ANGLE, MANUAL and RTH

ACRO is the default INAV mode and is active if no other mode is selected. In ACRO the plane is stabilised against any un-commanded rotations, like a side gust of wind. The model will tend to hold its orientation but respond normally to your stick inputs. ACRO is arguably the best general flying mode.

MANUAL is a mode that has to be selected, it is not the default mode. There is no stabilisation at all in this mode. Stick inputs are passed straight through to the servos, with whatever expo and rates are set up in INAV. It is used to check trim and CG balance, and for safety if something is wrong with other modes. Experienced pilots may prefer to fly in MANUAL mode.

ANGLE is the fully self levelling stabilised mode. It is a mode by itself, but it is also active when any of the nav or GPS modes are used. In this simplified INAV setup it is also used to check board pitch trim. Model airplanes usually need a few degrees of nose-up angle of attack to maintain level flight. This trim setting can be found in the PIDS page - Mechanics Tab - LEVEL TRIM (deg). I usually start with +4 degrees then check if the plane is rising or descending in ANGLE mode and adjust as required.

Flying in ANGLE mode may feel odd to experienced pilots because you have to hold the sticks at the angle you want to fly at and it will self level when you centre the sticks. 

RTH mode uses GPS data to automatically fly the model back to the home location. It can also be set as the Failsafe action, to bring the model back home if RC signal is lost. In the INAV Failsafe screen choose RTH.

The above modes are all you need for a basic setup

Non-essential INAV modes to add once you have a working model

NAV LAUNCH is fun to play with but I prefer to launch normally with full control. It is easy to muck up the switch sequence and cause a failed launch. 

CRUISE and LOITER modes are useful for FPV flights but not essential.

AUTO TUNE is used to fine tune rotation rates and throws

AUTO TRIM is not needed if  Continuously trim servos is enabled

Mode switches

It is best to have your starting switch positions with no modes selected, which means the board will always start in ACRO

Here are my modes for the simple setup

CH 5 (2 position) Nothing - ARM 

Arming on CH 5 is essential for ELRS receivers

CH 6 (3 position) Nothing - ANGLE - MANUAL

CH 7 (2 position) Nothing - RTH


Extra modes to add once your INAV setup is flying well

CH 8 (3 position) Nothing - NAV CRUISE - NAV LOITER


Note that when all switches are in the "Nothing" range the board will be in ACRO 


BEFORE THE FIRST FLIGHT

Check the control surfaces are responding correctly to stick movements. 

Do the High 5 check.

Check the control surfaces are responding correctly for stabilisation. 

Switch to Angle Mode and roll the plane to the right. Check that the left aileron moves up and right aileron moves down to counter the roll. Lift the tail up and check that the elevator moves up to counter the pitch change.

ACRO Throws

Check the control surface throws in ACRO Mode. They may be too small for sufficient control. Ideally they should be about 80% of the Manual Mode throws. If the throws are too small go to the PID Tuning page and increase the FF parameter for Roll and Pitch, then check throws again. If there is no difference between ACRO and MANUAL Mode throws then FF is too high. 

This will ensure you have enough control to launch in ACRO Mode and some headroom for stabilisation.

First Flight adjustments

On the first flight I will launch in MANUAL then switch to ACRO and fly a few circuits to make sure the plane is flying OK. 


Switch to ANGLE mode. Take note of whether the model holds altitude or climbs or descends. If you haven't entered anything in the Fixed Wing Level Trim window then the plane will most likely descend.

I usually start with +4ยบ and adjust more or less from there.


Launch again, climb to about 50m, fly out a bit then try RTH. Your model should turn and fly back to the arming site and circle above you at about 50m altitude and radius of 75m.

If that all works then you are ready to continue your INAV adventure.

INAV trouble-shooting checklist

What to check if your INAV setup is misbehaving

1. Flight Control Board orientation

Check that the model animation in the INAV setup page moves in the same direction as the actual plane.

If not, you will need to use the Alignment tool to tell INAV how you have mounted the board.




2. Radio setup

The model setup must have no mixing, no rates, no expo, no flight modes and no trims. Just 100% inputs for the first 4 channels. 

The plane-type selection, mixing, rates and expo are set up in INAV, not the radio.

GOLDEN RULE - Don't edit or reuse an existing model setup for INAV. Make a fresh blank model in your radio to ensure there are no leftover mixes, trims, logical switches or overrides.


Configure your model like this -

Ch1 - 100% Aileron 

Ch2  - 100% Elevator 

Ch3 - 100% Throttle

Ch4 - 100% Rudder

Ch5 - usually Arming switch (mandatory for ELRS)

Ch6 Ch7 Ch8 Ch9 etc - Mode switches



The model configuration works for flying wings, conventional planes, twins, V-Tails and even quads



Connect your receiver to the designated Serial RX UART on the FC and connect the FC to your computer. 

Check that the channel bars in the receiver page move to the right when the 4 sticks are moved up and right. This makes sure the stabilisation will work in the correct direction.

If a channel bar moves the wrong way you have an inverted channel in your radio. Go back to your radio and edit your model setup to un-invert the offending channel. This may happen if you have reused a previous model setup.

Note that the Roll Pitch Yaw Throttle bars do not match the channel order of Ch1 Ch2 Ch3 Ch4. As long as the stick inputs give the correct response all is good.


3. Receiver connection

If the channel bars don't move at all when you move the sticks - 

Check receiver is actually bound correctly to the INAV model in your transmitter. Test with a servo/signal checker if in doubt. 

Check the receiver is powered on. Not all boards provide power to the receiver via the USB plug. Some need a battery connected to the FC.

Check your receiver is actually producing a serial signal like SBUS, iBUS or CRSF. Some receivers need to be switched from PWM to Serial output. 

Check the receiver is plugged in to the correct UART on the board and this UART is set to Serial RX in the Ports page. 

SBUS receivers often connect to UART2, with SBUS signal on the RX2 pin or the designated SBUS pin.

For ELRS receivers check Receiver RX is connected to UART TX and Receiver TX is connected to UART RX

Check the correct Serial Receiver Provider is selected in the Receiver page - CRSF for ELRS and TBS,  SBUS for FrSKY, iBUS or SBUS for FlySKY.



4. Control surface movement

If a control surface moves in the wrong direction when you move the sticks - 

For control surfaces on a normal plane you can invert the channel in the Outputs page 

For control surfaces with mixed inputs, like Elevons or V-Tails, reverse the Weight in the INAV Mixer page for the offending control surface mixer line. For example - If the left elevator on this V-Tail is going down instead of up, change the Stabilised Pitch weight from 50 to -50 for S3

If you need to adjust the throws, change the weight in the INAV mixer or Outputs page.


5. GPS

If the GPS icon is greyed out or red -

Check the GPS is connected to the correct UART.

Look in the Ports page for the UART with GPS selected.




Check "GPS for telemetry and navigation" is turned on in the Configurations page

Connect the GPS to the recommended GPS UART (or any spare UART) and select GPS as the sensor on that UART in the PORTS page

Normal UART connection - G to G, V to 5V, RX to TX, TX to RX

Compass connection is not required for fixed wing INAV.  GPS can provide all the required heading data. A poorly calibrated compass will cause problems.

Check the GPS has power. Some boards can power the GPS through the USB, others may require the battery to be connected

Once it is connected correctly and powered up the GPS icon (top of configurator window) should turn blue and the Total Messages number (GPS page) should start counting up.


Now it's just a matter of placing the GPS with a clear view of the sky and antenna facing up, and waiting for satellites to be acquired. This can take from a few minutes to over 10 minutes if this is the first connection.


6. Connections

If you are still having problems it's time to go over your connection again.


Check your receiver, ESC, GPS and servos are plugged in where they are meant to be and the right way around. Look at the wiring diagrams on the product page.

Things that often catch me out are -

SBUS-Out from the FrSKY X8R and X6R receivers are in different places.

Changing from SBUS to ELRS on the SpeedyBee F405 Wing, also have to change from UART2 to UART1. 

Layout of the pins on the Matek F405 Wing is quite different to many other Matek boards.

Also check for bent pins and solder bridges.


7. Correct firmware target

Check on the product page for the correct firmware target for your board. 

The target name is sometimes not obvious. For example for the Matek F405 Wing firmware target is MatekF405SE. 

With incorrect firmware, some functions may work OK but some will not.




8. ESC constantly beeping

If your ESC beeps continuously it either means your receiver is not connected or the ESC needs calibration.

Make sure you have the correct protocol selected for your ESC in the Outputs page. If in doubt leave it at Standard.

ESC calibration in INAV

Connect the ESC and motor to the board

Remove the prop! Disconnect the flight battery

Go to the Outputs page

1. Slide the "I understand the risks..." button to the right

2. Move the Master slider to the maximum 

3. Connect the flight battery and wait for the ESC calibration beep

4. Slide the slider to the minimum and listen for the ESC calibration-done beeps.

Test the motor spin up by carefully raising the Master slider just a tiny amount


9. Motor will not arm

If a GPS is connected then at least 6 satellites and 3D position lock are required for arming.

If you are not using GPS then the Failsafe setting must be Land or Do Nothing, because RTH will prevent arming.

If all the control surfaces are working but the motor won't arm, look along the bottom of the INAV window for Arming flags or error messages. 
10. Servo voltage

It is safest to leave the servo BEC voltage at 5V for widest compatibility. If you have changed to 6V or 8V on the servo BEC make sure your servos can handle it.

Check that all your servos are functional. One burned out servo will stop all of them working.



Friday 26 May 2023

SpeedyBee F405 Wing soft serial fix

The SpeedyBee F405 Wing is an inexpensive but fully featured flight control board for INAV or Ardupilot.

The first release INAV 6 firmware for this board did not have soft serial support enabled, so it was not possible to use Smart Port telemetry from FrSKY receivers.

Smart Port connection from an FrSKY receiver allows all telemetry to be sent back to the radio.

Here are the updated firmware hex files to enable soft serial on the T2  pin of UART2:

SpeedyBee F405 Wing INAV 6.1.0 fix soft serial firmware 



UPDATE JUNE 2023

S8 bug fix - With the factory loaded firmware S8 pins did nothing, S9 acted as S8, S10 acted as S9 etc.

This has been remedied with the release of SB F405 Wing INAV 6.1 firmware. 


INAV UPDATE 

Latest firmware INAV 6.1.1 also fixes the "Dolphining" problem which was introduced by INAV 6.1 to all FCBs

Saturday 20 May 2023

Smart Port Telemetry, INAV and F4

FrSKY receivers with S-Port capability can send telemetry data back to the transmitter. The data can come from FrSKY S-Port telemetry sensors but also from flight control boards (FCBs).

SBUS and Smart Port are inverted signals, compared to normal convention for flight control boards and receivers. Flight control boards need to un-invert these inputs to be usable.

F7 boards have inverters on all UARTs which can be enabled in the configurator, so SBUS and SmartPort inputs can be connected to any UART.

F4 boards only have one UART inverter (for SBUS), usually on the Rx2 pin. But we need an inverted Tx pin for the Smart Port input.

So this is where Soft Serial comes in. Soft Serial creates a software defined UART which can be inverted.

By enabling Soft Serial or "CPU based serial ports" Tx2 becomes available as an inverted pin for Smart Port connection.

The steps below show how:

1. Enable "Enable CPU based serial ports" and "Telemetry output" in the INAV configuration page



2. Choose "SmartPort" in the Telemetry column for SOFTSERIAL1 in the Ports page


3. Choose SBUS, OFF, AUTO or OFF in the Receiver page


4. On the F4 board connect SBUS to the SBUS pin and SmartPort into the TX2 pin




5. "Discover new" sensors on your transmitter, and you should see all the extra FC telemetry appearing.










Friday 7 April 2023

Big Box Plane

 Design for a large slower flying cardboard plane.

1400mm wingspan

230mm chord (CG 65mm)

Clark Y airfoil

950g Flying weight with 3S 2200mah

ZOHD 2216 1300kv motor with 8x6 prop and 40A ESC

Materials

Cardboard box

Bamboo skewers

50mm packing tape

Hot glue

PVA glue



Build overview and flight video

https://youtu.be/DcXUbrYCyTM