As I gain more experience flying, I want to have the ability to swap rate profiles while in flight. Some days I want easy flying, while others I want things a little more aggressive so I can do flips etc. Cleanflight has the ability to set profiles in the PID Tuning tab. You can set different PID values as well as RC Rate etc and save them to 1 of 3 profiles. Values on the Receiver Tab (i.e Roll Rate, Pitch Rate) will change with each profile as well. Once I had that nailed, I then dug into setting the AIL toggle switch on my Turnigy 9x so I could use it to flip between Profiles 1 and 2.
This set-up has PPM, so all my channels (8) go through on wire from the receiver to the Flip32+. Should not affect the approach below, but thought it would be worth noting.
I’m using Turnigy 9x (with ER9x),
modded with a FrSky DHT transmiter, and a FrSky D4R-II receiver. My flight controller is a Flip32+ (10DOF) with Cleanflight. Cleanflight v1.8.1 has a glitch in it when testing changes using the Refresh button. When toggling rate profiles via the TX and refreshing the interface, the Profile selection does not change (even though the values do). Take note of this in Step 4 below.
Er9x Mixer settings.
Step 1: Mixer – Select the next available channel and click Menu to edit the mix. In this case, we will be setting up the mix on the AIL toggle switch (far right front on the 9x).
Set the Source to FULL, Weight to 50, Offset to -50, and Switch to AIL. The reason for doing this is to have the value passed by the toggle (in off position) to be less than 1500 in Cleanflight, and then at ~1500 when toggled on. Since there are 3 profile options in Cleanflight, it assigns the 1st to < 1500, 2nd to 1500 and 3rd to > 1500. With these settings, this would allow Profiles 1 and 2 to be selected when toggling the switch from off to on. If it were a 3 position switch, you would want a similar set-up but want the value to swing from ~900 all the way up to ~2000 which would allow the selection of all 3 profiles. In this case, your weight would be 100 and offset would be near -100. You can play with this by changing these values and watching them on the Receiver Tab in Cleanflight.
Showing Switch set to AIL. Note that all other settings can be left at their default values.
Step 2: Open Cleanflight, connect to your FC, and go to the Receiver Tab. Ensure you have the battery plugged in as well. Check that the AIL value changes in Cleanflight. In my case it goes from about 998 to 1500. (The numbers don’t have to be exact)
Step 3: Go to the Adjustments tab. Check the box, select Aux 3, set the range to be full (if you toggle the Aux, you should see the little yellow line move back and forth). Select Rate Profile Adjustment, using Slot 1, and select Aux 3 in the last drop down. Essentially, this tells it to watch Aux 3 for change, and apply that change as Aux 3. Note: The channel selected here should match the channel you set-up on your TX and tested in the previous step.
Step 4: Go to the CLI tab. Type in dump rates. You will see your current rateprofile (i.e rateprofile 0). I suggest you start with rateprofile 0. If not showing, type rateprofile 0 to change it. Then type dump rates to see values for this profile. You can now use commands to change each item. For example, type “set rc_rate = 100” to change the value to 1.00. Continue to do this for the ones you want to change. You can see the changes by typing dump rates at any time. You should see your changed values. When done, type save to commit the settings to the current rate profile. Now switch to rate profile 1. Type rateprofile 1 hit enter, then type dump rates to see the values for this profile. Follow the steps above to change it’s rates. Don’t forget to save when done. When complete, check to ensure both profiles have the rates you entered. type rateprofile 0, hit enter, type dump rates and check the values. Do the same for profile 1. After you are done, click over to the Receiver tab. Your FC will reboot, so it may take a few seconds.
Note: When you look at the PID tab, you will only see Profiles 1,2,3 (you dont see 0). Dont worry about this as it seems buggy in 1.8.1. What is key is that rate profile 0 will be your default (toggle off or initial position), and then as you toggle down, it will go to the next profile.
Tip: Earlier, I tried changing these settings in the PID and Receiver tab interface. Although it seemed like it worked, I later found they did not save properly. After powering everything off and then back on, the settings were not as expected. I suspect this will be fixed at some point. For the time being, use the CLI as noted here.
Step 5: Now that you have made the changes, it’s time to see them working. Ensure you have your transmitter powered, a battery plugged into your quad (ensure your props are off before doing this!!!!). You should now be able to toggle the switch on the transmitter, and click the refresh button during each toggle. You should see the RC Rate and Expo values changing between the values you set on the 2 profiles. Go over to the PID tab and do the same. You should see the rates changing there. If this works, you now have the ability to change your flight characteristics in-flight!
Here’s a chart of profiles that I am playing around with. I am still learning to fly and wanted to keep track of flight profiles that have been suggested for different levels, and then try each of them and adjust as my skills develop. This will likely change (currently as of Sept 2015)
I don’t understand all of the hate for Openpilot/LibrePilot. It does a far better job in how it handles stability settings profiles than the google app based configurators.
Not sure why you are assuming there is “hate” for other offerings? I am simply documenting details about a product I have chosen to use. Feel free to blog about your choice, and I’d be happy to link to it. 😉