Quadcopter Build 5: setting the flight controller


In this series we have already connected the last of the electronics together so now we are ready to plug the flight controller back to the computer, start the graphical user interface (GUI) that allows you to setup everything and get the model ready for the first test hover.

The majority of new builds will use one of the older flight controllers like and Naze32 or one of the newer STMF3 based flight control boards. Later flight controllers use improved sensors, have faster processors and more ports so you can add additional pieces easily like and OSD, LEDs, GPS, sonar, telemetry and others.  We’re using a Seriously Pro F3 board in this build.

These boards typically run one of the families of ‘Flight control software/firmware. The two most common are Cleanflight and Betaflight. There are lots of others now too but you tend to find that boards come pre-installed with one or the other of these two versions, usually Cleanflight.

Cleanflight – An open source project that came out of Baseflight. Cleanflight is designed for racing and now has a heavy focus on improving the code to improve the resilience for pilots and facilitate safe, reliable updates for developers and users too. One of the latest features added has been new features around OSDs.

Betaflight – A fork (copy) of Cleanflight to test out some changes and improvements to the flight characteristics. What originally started as a test platform has quickly grown to be the choice for many pilots with new features being added quickly and lots of innovation in every new release. The latest release V3.0 has many new features.
Which one to use? That is a very personal choice and every pilot has their own very dearly held belief and position about which is better. For a first build I’d stick with what was supplied on the flight controller and then look to experiment when you know it all works. Our board here came with Cleanflight installed so that’s what we will be using throughout this tutorial. The steps are almost identical if you are using Betaflight.

Other flight controllers and software have their own processes but all of the following steps need to be followed to prepare the model for the first test hover..

A word on safety


In the following steps we will be doing a few things that can be dangerous. We will be plugging in the battery and we will be spinning up the motors. Do not fit the propellers until you get to that stage just before you fly.

There is a small chance that something will happen during the setup that will cause the model to power up then it can get very exciting and dangerous very quickly if the props are attached!

Some builders use devices like a car bulbs in series with the battery to limit the current and power the battery can supply; they are a nice idea but are no substitute for keeping the props off the model until you are happy everything will work.

Step 1: Update the software on the flight controller

We’ve already connected the flight controller to the computer and downloaded Cleanflight to see if the flight controller was ok before we attached or soldered anything. Many vendors will not replace a faulty flight controller once it’s been modified or soldered so this is a worthwhile step.

We will go through the same process again here to make sure that nothing we’ve done in the last few tutorials has upset the flight controller. When you connect to the flight controller you will see the version of the software running on it in the top right hand corner of the screen. You can also see more detail by typing in ‘version’ into the CLI
There are two schools of through here; update the flight controller to the latest and greatest or leave well alone until you know everything is working, that way if something stops working after upgrading you know where to start looking.

Personally I like to upgrade to the latest version, settings like PIDs usually change between versions and setups are often overwritten so it can feel like going through the steps below twice if you upgrade later.

Upgrading also allows you to start to configure the flight controller with a vanilla setup so you do not have to work against something already setup that may cause you problems.

Step 2: Calibrate the Accelerometers

Once you are on the latest version then the first job is to calibrate the accelerometers. These are the sensors on the flight controller that sense the position of the model tilt. They are vital in all modes but especially those that provide auto-level features.

This step can be easily overlooked as the model in the GUI moves like the one on the screen but without an accurate calibration the model doesn’t know that ‘level’ should feel like making it more prone to drift and unexpected flight characteristics.

Pop the model on a flat surface and calibrate the accelerometers so that the model appears completely level on the screen.

Step 3: Setup the receiver type you have (S-Bus, PPM, PWM)

The next step is to setup the type of radio receiver you have. We looked at the common types last month but there is also support for the satellite receivers and protocols like iBus too. In the ‘Configuration’ tab, select the type of connection you have. NOTE: In Clenflight the GUI has been updated so if you can't find the settings for the receiver go to the bottom ofhte tab called 'Receiver'. Betaflight, iNavflight and others still have the setup for the radio in the position shown..

For PWM then simply select that option and click save and reboot in the bottom right hand corner
For PPM, select PPM and lick save and reboot in the bottom right hand corner

For S-Bus then select ‘Serial receiver’ from the menu then choose S-Bus from the list below. Click save and reboot in the bottom right hand corner. You may also need to select one of the unused UARTS in the ‘Ports’ tab as ‘Serial Rx’ if the settings don’t stick when you reboot.

Step 4: Checking the radio works as it should

With the radio connection set we can test that the radio works as it should. Most flight controllers do not power the radio receiver from the USB port, so you may need to plug in the battery for the first time. I’d disconnect the model from the PC in case of a problem and turn on the radio. Power on the model next and then plug the USB cable back into the PC and reconnect to be safe.

In the ‘Radio’ tab, move the sticks on the radio and you should see the bars on the screen move. If the controls are moving the wrong bars then simply try each of the ‘Channel Map’ settings until they match. The channel values should increase as the sticks move up or to the right. If not then reverse that channel on the radio to fix it.

While you are moving the controls make sure that each channel moves from just above 1000 to just below 2000. If they go beyond this range then use the ‘endpoint adjustment’ in your radio to reduce the travel slightly. I try and get a travel range of 1020-1980 for the throttle, elevator (pitch), rudder (yaw) and aileron (roll).

Once set, check that the values for the pitch, roll and yaw inputs settle on 1500 when you let go of the sticks. Most of the time they will be a little out so use the sub-trim menu in the radio to adjust the value to as close to 1500 as you can. The numbers may change by a point or two but don’t worry about that for now, as good as you can get it using sub-trim will be good enough for the test hover.

Arming can be done with a switch or the movement of the throttle and rudder control. By default arming by the radio controls is selected. With the battery still connected, push the throttle to the lowest right position and you should see a little warning triangle light up at the top of the screen. The model is armed (this is why we don’t install the props!).

Now that is all complete then you need to test the failsafe on the radio receiver is setup. Not having a failsafe that will reduce the throttle to zero and return the controls to the neutral position can dramatically increase the chance of a ‘flyaway’ if there is a radio problem. Arm the board and increase the throttle slightly then turn the radio off – the throttle should return to zero.

It’s useful to rebind the radio and receiver after doing this so that the new channel settings and positions are stored in the radio receiver so it uses these updated values in the event of a failsafe.

Step 5: Setting up the flight modes

In the section last month where we setup the radio we added an extra fifth channel to control the flight modes. Move that control on the radio and see which channel in the ‘Radio’ tab moves. It will normally be Aux1.

With that confirmed click on the flight modes tab, here we can setup what modes the position of that switch will activate. Select the control as Aux1 and then setup the modes as in the image, once set click ‘Save’. Move the switch and you should see the little bar move under the settings and the chosen mode highlight on the left.
This is how I’d suggest you setup the modes for a first build;
  • Angle Mode: The self-level mode, perfect for new pilots and test hovers! I use this as the mode to arm and take off in on all my models. Perfect for the coming test.
  • Horizon Mode: As a pilot, once you are conformable flying Angle mode then this allows you all of the safely of a self-level but also allows you to flip and roll by pushing the controls to the edges too.
  • Rate or Acro mode (No Mode selected): This is for experienced pilots. No auto level and the craft will flip roll and go upside down! Use this once you’re happy with Horizon mode.
There are lots of other modes like Airmode and LED, Buzzer but for now just setup these three.

Step 6: Calibrate ESCs

The ESCs all now need to be calibrated. Calibration teaches each of the ESCs what the range of the throttle will be for flying. Enter the motors tab and, with the battery disconnected, and click on the warning tab. Raise the main throttle bat to the top position and plug in the battery, wait for the beeps from the ESCs then pull the main throttle control down to its lowest position and the ESCs will make a confirmation tone. Unplug the battery.

If you now plug in the battery, arm the model and raise the throttle the motors should all start at exactly the same time, if not repeat the process. Also check that each of the motors is turning in the right direction and if not swap any two of the three wires connecting the ESC to the motor to reverse it. Heat-shrink the motor/esc connections and then cable tie them securely so they can’t be caught in the props.

Almost there!

Step 7: Balance and fit props

Now the ESCs are calibrated and the motors are all turning the right way then we can balance and fit the props.

Why balance? It’s to reduce vibration on the model and improves the efficiency of the model too. A blade balancer can be bought very cheaply and the process is well documented on places like YouTube. Cheaper blades will almost always be unbalanced and need a little tape on the lighter blade to make them fit to fly.

The props need to be installed on the motors with any markings facing up. Check that the blade will force air down when it spins with the motor, I check that the leading edge is the highest on the prop.

Now it’s time to charge the battery again and get ready for the test hover!

Step 8: Test hover

It’s tempting to take the new model out to a field and give it hell but until you know it’s going to be ok then you’re inviting disaster. Place the model on a soft surface, grass is perfect, and plug in the battery, let the model sit for a few moments to initialise and then arm it.

Make sure you are in Angle mode and increase the throttle very slightly and be prepared to disarm the model at the slightest sign of trouble. Increase the throttle until the model lifts off and keep it below knee height and test all of the controls act as you expect. Check the speed of the movement and if it’s too much you can reduce the rate of them later back in the GUI.
Keep the model hovering and try and maintain the hover for 3-5 minutes to check that nothing is going to fail.

Land and check that the motors and ESCs are not excessively warm. If not them you are ready to fly


So now it’s flying, there are few things as thrilling as hovering a model you’ve made with your own hands. Often things like flipping on take-off can happen (usually caused by the motors connected in the wrong order) or a problem arming may mean another trip back to tweak settings but now it’s flying it’s a case of fine tuning from here on in.

Next month we will look at adding FPV equipment to the model and the common choices and considerations.

Stay tuned and Happy Flying’!
About the Author
Painless360 Profile