Thread Tools
Dec 17, 2014, 07:33 PM
Vice President at MultiGP
Admiral_Red's Avatar
Thread OP

72mhz PCM radio and Failsafe implementation in Cleanflight.

I was recently flying my 250 quad and I am using my old 72mhz Futaba 9C to fly it. I have the radio in PCM mode with a base load antenna style antenna which I have used the same style in many of my electric/nitro/gas helis and quite a few of my aircraft. This was a brand new antenna and I had 30+ flights on the quad with no incident.

I purchased a Fatshark Predator V2, installed the VTX and camera and had two flights as a newbie under the goggles just fine. The third flight, I had a PCM lockout at a range where the video was still streaming fine, but I lost control of my quad. I had flown out to this distance LOS before, and had no problems, but not this time. Suffice it to say, my quad took a hard hit in parking lot inverted.

This is not an incident that I want to repeat and I realize that I may have caused the problem with my VTX placement. I am no stranger to setting up my PCM failsafe on my radio, but my question lies with the FC. If it detects a failsafe setting on my radio, will it continue in the same flight mode that I had it in? At the time, it was in Angle. I set up my failsafe on the RX to change flight mode to a leveling mode via stick output, it will change modes and adjust throttle to a descending setting? Will the FC level out the quad from the attitude it was at, which was at the time, inverted?

I realize that setting up a failsafe is something that you guys all preach about in this forum. Fire away, I know, I was stupid for not setting it up. It will be set before the quad flies again, but I need a little more understanding of what to expect. If it just sets the throttle to a descending amount and continues in the same attitude, I don't know that the outcome would have been any different.

Thanks! Hopefully someone has some experience in this matter.

Sign up now
to remove ads between posts
Dec 17, 2014, 09:21 PM
Team AlienWarpSquad
First, learn what is being detected on the FC as an RX Failure. It is a Pulse width less then "failsafe_min_usec" or greater than "failsafe_max_usec" (do a CLI dump to see the default values).

When your RX looses the TX's signal what does it output to the FC??????
This is the key to getting the FC FS to activate.
If the RX just holds the last 'good' TX signal and holds the outputs at the same pulse width then the FC will never see a failure and not activate FS.

An O'scope is perfect to determine what the RX outputs wen the TX is switched off.
Most likely you don't have one but if you have a freind with one then you can check the RX output.
Another method is to use a common RC servo. Connect to the RX, power RX, servo and TX. To servo will move with the TX's stick and not move if you try to turn it. Now turn off the TX. Does the servo hold its position and not move when you try and turn it? If so then the RX is outputting valid pulses and FS will not activate on the FC.
If the servo jitters and is easy to turn by hand then the RX is Not outputting pulses an the FC will detect this and activate FS.

Enable the FailSafe in CF (I use the CLI). Tie down the copter, power on, arm and raise the throttle some. Turn off the TX should activate the FS and the FC goes into Angle mode and sets throttle to "failsafe_throttle" you set in CLI, run for "failsafe_off_delay" then stop motor and Dis-arms.
Ensure this works as you expect and adjust the Failsafe throttle value (in the gui) for a descent (I prefer a fairly fast descent so the copter does drift off in wind (broken is better than a fly away).

You actually got lucky it crashed rather than a fly away.

Now go read the CleanFlight docs (and CF thread).
Dec 18, 2014, 07:37 AM
Vice President at MultiGP
Admiral_Red's Avatar
Thread OP
Waltr, thanks for your response. I figured when I said 72mhz everyone would just laugh and look the other way. Thanks for taking the time out of your day to respond. I've read the CF manual backward and forward, have yet to make my way through the full thread about it yet.

Just checked failsafe operation on the radio utilizing a servo. With the failsafe implementation of my radio I can either set one or all channels to go to a set value or hold last command.

So reading on github, it looks to me as if I can implement RX based failsafe on my radio by setting values up like so:

Flight controls = center values
Throttle = value that causes the quad to descend at a slow rate
Arming channel (5) = Armed
Flight mode channel (7) = switch to Horizon or angle mode

In this setup, I should expect the quad to level itself, reduce power to a decent setting and have a rather controlled descent. The FC would not have any clue that the radio link had failed and would just do as the RX commanded. Is this correct?

It also appears that I could set up flight controller failsafe. Which from what I read, I can set a min usec value and utilize that value to activate a failsafe? To activate, it seems I have to have the first 4 channels output an invalid value. Say 950 instead of 1020.

So to activate FC FS, I would have my rx output a value for the first 4 channels at 950 pulse width, which is below failsafe_min_usec=1000. Is this correct?

I think I understand the quads response with RX FS, it is still receiving signals, so it will quietly change flight modes and descend with the throttle at a predetermined setting.

What I don't understand is what to expect out of a FC FS. If my values are set in my RX to drop the pulsewidth below my failsafe_min_usec setting on the first 4 channels, then what is it's behavior? I can set my failsafe_throttle to a setting that descends the quad in a controlled manner, but what happens if the quad is not level? Will it level itself or just cut the throttle? (Edit: I just read that it will go into angle, so it should level and set throttle.)

I can see that an implementation of both could be of benefit. RX FS for link issues and FC FS if the RX was somehow disconnected physically or lost power completely.
Last edited by Admiral_Red; Dec 18, 2014 at 07:43 AM.
Dec 18, 2014, 08:28 AM
Team AlienWarpSquad
Setting the RX Fail safe like that is perfect. If the RX FS activates and is setup as you described the copter should self-level and descend. In this case the FC will not even know the RX is on FS mode.
However, if you setup the RX so that any of the first four RC channels go outside the Failsafe Threshold values in CF, then the FC FS will activate. The FC FS will go into Angle mode (self-level), Reduce throttle to the FS thottle value, run for the FS off time, then stop the motors and disarm.

To test the FC FS pull the power wire out of the RX to kill the RX's output to the FC.

The Default FS values in CF should also be fine. This would then be a back-up Fail safe in case the RX losses power (a wire breaks).

I do recommend always to setup both Failsafes, in the RX and in the FC.
I looks like you are catching on.

Hint: CleanFlight is ported from BaseFlight which was ported from MultiWii code. By studying MW & BF will help you learn how all this stuff works in CF.
So go to the MultiWii Wiki to start. Then to the BF manual and docs, then finally to the CF docs (these are mostly what is changed from BF).
Dec 18, 2014, 03:47 PM
Vice President at MultiGP
Admiral_Red's Avatar
Thread OP
Waltr, thanks again for taking your time to answer my questions.

I have a better grasp on a lot of things involved with the FC thanks to reading, searching for posts and trial and error. I had been searching for the answer long and hard after the crash, but had yet to find the "ah ha" bit of info that I needed. It all makes perfect sense now.

I've got a second airframe coming and another controller waiting. Yeah, you could say I'm hooked. I'm not exactly a bind and fly kind of guy and DIY quads are stimulating, unlike a lot of the items you find in a hobby shop these days.


Quick Reply

Thread Tools