Page 1 of 1

Failsafe and Sum-PPM

Posted: Wed Dec 19, 2012 5:59 pm
by copterrichie
Question, has anyone CHANGED how Failsafe works in connection with Sum-PPM since the Official MWC 2.1 release?

Thank you.

Re: Failsafe and Sum-PPM

Posted: Wed Dec 19, 2012 6:37 pm
by Mis
Failsafe is triggered after "FAILSAFE_DELAY" time IF:
1 - No valid PPM pulses at ppm input, OR
2 - one or more of first four channels in PPM stream have pulse time bellow 985us.

Re: Failsafe and Sum-PPM

Posted: Wed Dec 19, 2012 6:41 pm
by copterrichie
Well, it does not work in all situations. If there is a pulse regardless if it is good or not, the Failsafe does not kick in. Now sure where this started, I am trying to trace back now.

Re: Failsafe and Sum-PPM

Posted: Wed Dec 19, 2012 6:45 pm
by copterrichie
I can confirm that if the pulse is complete gone, the Failsafe does activate but if there is a partial pulse regardless of the quality, Failsafe does not activate.

Re: Failsafe and Sum-PPM

Posted: Wed Dec 19, 2012 11:47 pm
by copterrichie
Found the freaking problem, on the Turnigy 9xBC version 2, when the RX looses signal, Channels Four and Channels five STILL output a signal. 1400-1500 Channel 4 and 1000-1024 Channel 5. Going to scrap this RX and get something that already have PPM and know to work. Freaking Junk.

Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 3:54 am
by doughboy
It has to be something else causing the problem. If the RX is only sending out channel 4 and 5 pulse then failsafe will still kick in. I'll check the failsafe code again just to make sure, but I know the code works fine last time I checked it. This is based on stock _shared code with no modification like inverting the ppm logic etc.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 4:07 am
by copterrichie
What is needed in my opinion is a pulse counter in the frame. What I mean about that is, at start up, the FC count the number of pulses in the stream and if that pulse count falls below, then active the failsafe. So if there is eight channels at start up and for some reason that count drops to six for X amount if time, activate failsafe.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 4:21 am
by postaL
copterrichie wrote:Found the freaking problem, on the Turnigy 9xBC version 2, when the RX looses signal, Channels Four and Channels five STILL output a signal. 1400-1500 Channel 4 and 1000-1024 Channel 5. Going to scrap this RX and get something that already have PPM and know to work. Freaking Junk.


was this w/ the stock 2.4ghz setup?

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 4:22 am
by copterrichie
postaL wrote:
was this w/ the stock 2.4ghz setup?


Yes, just about as stock as they come.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 4:37 am
by postaL
copterrichie wrote:
postaL wrote:
was this w/ the stock 2.4ghz setup?


Yes, just about as stock as they come.


If you're looking for a PPM setup, but want to keep your 9x... try the FrSky setup. I've made the switch, and I'm lovin' it. You may also try flashing a aftermarket firmware (er9x), and see if you can make sure that upon failure, all channels are 0.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 5:17 am
by copterrichie
postaL wrote:
If you're looking for a PPM setup, but want to keep your 9x... try the FrSky setup. I've made the switch, and I'm lovin' it. You may also try flashing a aftermarket firmware (er9x), and see if you can make sure that upon failure, all channels are 0.


Thank you. I have been watching the FrSky systems closely but just have not make the purchase yet. I have a number of Flysky RXs and would need to replace them all or switch transmitter modular when using them. It was a sad day when Flysky removed the PPM from their cheap 6 channels RX, that was a real dream to work with.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 5:45 am
by vpb
I'm on Turnigy 9X, Frsky + Er9x, but I made switchable RF module, and the stock RF module and 6 other turnigy RX are all still usable :D.

About Failsafe, just curious, anyone here use Frsky failsafe instead of MW code. With Frsky RX failsafe the RX applies all saved channel's states, so we can easily hold POS, RTH... and I think it's more reliable. But still not test yet.

Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 7:16 am
by doughboy
copterrichie wrote:What is needed in my opinion is a pulse counter in the frame. What I mean about that is, at start up, the FC count the number of pulses in the stream and if that pulse count falls below, then active the failsafe. So if there is eight channels at start up and for some reason that count drops to six for X amount if time, activate failsafe.


That is what the failsafe/RX code does. It counts the pulses and resets after a long pause (I think >3ms). I know turnigy 9x RX will only have the pulse once per frame. So it is unlikely the problem is with the RX (I'd say it is impossible), so maybe it's the ppm sum circuit or if you are using a modified RX code, a bug in that code. The only way failsafe will not work is if the channel pulse is occurring more than once per frame.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 9:00 am
by scrat
vpb wrote:I'm on Turnigy 9X, Frsky + Er9x, but I made switchable RF module, and the stock RF module and 6 other turnigy RX are all still usable :D.

About Failsafe, just curious, anyone here use Frsky failsafe instead of MW code. With Frsky RX failsafe the RX applies all saved channel's states, so we can easily hold POS, RTH... and I think it's more reliable. But still not test yet.


I'm using FrSky failsafe instead of MWii code. It works.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 12:08 pm
by copterrichie
Correction: The Turnigy 9xBC version 2 maintains the last values received from the Transmitter on Channels 4 and 5 upon signal lost. I was going to just abandon this project however, it has revealed other problems else where. I will try to document this as best I can.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 4:00 pm
by copterrichie
Ok, I did some very extensive bench testing and even made a video. Seems the problem was fixed in the newest development version HOWEVER, all previous versions have a run-away copter scenario potentially at-hand. I am editing the video now and will share once done.

Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 5:08 pm
by doughboy
copterrichie wrote:Correction: The Turnigy 9xBC version 2 maintains the last values received from the Transmitter on Channels 4 and 5 upon signal lost. I was going to just abandon this project however, it has revealed other problems else where. I will try to document this as best I can.


Even if it does, it will occur only once per frame and current failsafe code will detect the missing pulses. Can you show the output of the RX channels 4 and 5 after turning TX off with the RX not connected to the ppm circuit? Just to see if it is pulsing more than once per frame.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 5:40 pm
by copterrichie
doughboy wrote:
copterrichie wrote:Correction: The Turnigy 9xBC version 2 maintains the last values received from the Transmitter on Channels 4 and 5 upon signal lost. I was going to just abandon this project however, it has revealed other problems else where. I will try to document this as best I can.


Even if it does, it will occur only once per frame and current failsafe code will detect the missing pulses. Can you show the output of the RX channels 4 and 5 after turning TX off with the RX not connected to the ppm circuit? Just to see if it is pulsing more than once per frame.


Correct, channels 4 & 5 only pulses once per frame however, the two pulse plus the stop/end pulse shifts to the left. With the 9X RX, this then becomes the Roll and Throttle Channels.

Video is coming.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 7:05 pm
by crashlander
Slightly off-topic question.
Would it be hard to implement failsafe routine also for RCSERIAL?

Basically we should be looking for timely arrival of MSP_SET_RAW_RC frames and if those are missing for short period (eg. 1 second) MWII should activate failsafe.

Regards
Andrej

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 7:11 pm
by copterrichie
crashlander wrote:Slightly off-topic question.
Would it be hard to implement failsafe routine also for RCSERIAL?

Basically we should be looking for timely arrival of MSP_SET_RAW_RC frames and if those are missing for short period (eg. 1 second) MWII should activate failsafe.

Regards
Andrej


Good Point because I also hope to implement a serial control link one day.


As promised, here is the video of my findings. In no way am I stating there is a problem with other systems, just what I have observed with the gear that I have. I just do not have the funds to purchase new gear right now, so for the time being, this will have to do or I can spend my days watching TV. Just do not like TV for this is my options. :)

http://youtu.be/I6lVYA7z9NE

While attempting to use a Turnigy 9X Receiver in conjunction with a Servo to PPM encoder, a few problems was noticed in the way the RX handles signal lost. I do not know if other 9X receivers has this same behavior, so I figured it would be best to document my findings and maybe others will come forward.

Re: Failsafe and Sum-PPM

Posted: Thu Dec 20, 2012 8:51 pm
by Mis
If you can setup failsafe in your RX - program throttle chanel to 980us and memorize this setting in receiver as failsafe.
In this case MWC recognize 980us on throttle as failsafe and start internal failsafe function.

Failsafe and Sum-PPM

Posted: Fri Dec 21, 2012 1:39 am
by doughboy
Your video and your description is all right. The change in failsafe code is in _shared. I don't know if it is in official release version, but apparently it is not. There was a thread that resulted in the change to check for signal on all 4 sticks channels and this is one of the reason for the fix.

Fwiw, the pulse on the oscilloscope will shift because that is the trigger point of the signal, hence it displays the triggering pulse (with the rising edge) on the left margin. And yes, multiwii will take that as channel 1 as well, but as I said before, it is irrelevant because not all 4 sticks pulses are present.

It looks like everything is good now.

Re: Failsafe and Sum-PPM

Posted: Fri Dec 21, 2012 1:50 am
by copterrichie
Awesome and Thank you, Thank you and another Thank you!!!

Re: Failsafe and Sum-PPM

Posted: Thu Aug 01, 2013 7:25 am
by fpv_downunder
Hi guys,

I thought it would add to this thread rather than make a new one. I recently switched to frsky setup on my 9x and am using cppm on my aio pro board. All working OK except that I cannot get the multiwii failsafe to trigger. I am running r1539 and my code is here:

/******** Failsafe settings ********************/

#define FAILSAFE // uncomment to activate the failsafe function
#define FAILSAFE_DELAY 10 // Guard time for failsafe activation after signal lost. 1 step = 0.1sec - 1sec in example
#define FAILSAFE_OFF_DELAY 80 // Time for Landing before motors stop in 0.1sec. 1 step = 0.1sec - 20sec in example
#define FAILSAFE_THROTTLE (MINTHROTTLE + 400) // (*) Throttle level used for landing - may be relative to MINTHROTTLE - as in this case


I have confirmed there is no failsafe configured in my tx/rx. I am not keen to fly till I have a working failsafe..... :lol:

Re: Failsafe and Sum-PPM

Posted: Sat Aug 10, 2013 8:53 am
by e_lm_70
People forget fail-safe is already in the rx

On FrSky, you have 3 fail save cases:

The rx keep the last know signal (valid for all 8 ch)
The rx change the signal to a configured fail safe signal (again all 8 ch involved)
The rx mute the cppm out, so no more signal send (this is the configuration that you may want to use for activate the failsafe on multiwii)