Failsafe auto leveling.
-
- Posts: 13
- Joined: Wed Mar 21, 2012 9:37 pm
Failsafe auto leveling.
I think this would be a sensible idea, a lot of people fly in acro mode even if they have an accelerometer. To have the option of auto leveling when failsafe kicks in would be sensible as it will stop moving horizontally and make sure it lands flat.
Re: Failsafe auto leveling.
Code: Select all
// note: if FAILSAFE is disable, failsafeCnt > 5*FAILSAVE_DELAY is always false
if (( rcOptions[BOXACC] || (failsafeCnt > 5*FAILSAVE_DELAY) ) && ACC ) {
// bumpless transfer to Level mode
if (!f.ACC_MODE) {
errorAngleI[ROLL] = 0; errorAngleI[PITCH] = 0;
f.ACC_MODE = 1;
}
} else {
// failsafe support
f.ACC_MODE = 0;
}
That is already the case ... failsafe activates level mode if accelerometer is present.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Failsafe auto leveling.
Please note: The Failsafe will only work if the RX used stop outputting a signal to the FC when the the signal from the TX is lost.
Re: Failsafe auto leveling.
copterrichie wrote:Please note: The Failsafe will only work if the RX used stop outputting a signal to the FC when the the signal from the TX is lost.
Does that also apply when using the Spektrum Satellite Receiver? I haven't tried in in flight yet, but my last bench tests showed rather erratic behavour when I switched off my TX while the motors where running.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Failsafe auto leveling.
LenzGr wrote:copterrichie wrote:Please note: The Failsafe will only work if the RX used stop outputting a signal to the FC when the the signal from the TX is lost.
Does that also apply when using the Spektrum Satellite Receiver? I haven't tried in in flight yet, but my last bench tests showed rather erratic behavour when I switched off my TX while the motors where running.
I wish I could answer this but I don't own a Spektrum system. However sorting through the code, it should work. This code segment is from version 2.0.
Code: Select all
#if defined(SPEKTRUM)
ISR(SPEK_SERIAL_VECT) {
uint32_t spekTime;
static uint32_t spekTimeLast, spekTimeInterval;
static uint8_t spekFramePosition;
spekTime=micros();
spekTimeInterval = spekTime - spekTimeLast;
spekTimeLast = spekTime;
if (spekTimeInterval > 5000) spekFramePosition = 0;
spekFrame[spekFramePosition] = SPEK_DATA_REG;
if (spekFramePosition == SPEK_FRAME_SIZE - 1) {
rcFrameComplete = 1;
#if defined(FAILSAFE)
if(failsafeCnt > 20) failsafeCnt -= 20; else failsafeCnt = 0; // clear FailSafe counter
#endif
} else {
spekFramePosition++;
}
}
#endif
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Failsafe auto leveling.
You say, you fly an object with 3 to 8 spinning sharp blades and do not know what it is doing if , lets say, the batteries of your tx are dead!?
Sorry for saying this, but this is irresponsible...
The behavior of failsafe is always the FIRST thing I check after including a new RX or a new software.
This should be standard operation procedure for every pilot.
My failsafe levels the copter holds position for 5 seconds and lets it crash, I never fly over people or water, so I know that where it crashes it won't hurt anybody.
Guys: These things are no toys...
Nils
Sorry for saying this, but this is irresponsible...
The behavior of failsafe is always the FIRST thing I check after including a new RX or a new software.
This should be standard operation procedure for every pilot.
My failsafe levels the copter holds position for 5 seconds and lets it crash, I never fly over people or water, so I know that where it crashes it won't hurt anybody.
Guys: These things are no toys...
Nils
Re: Failsafe auto leveling.
Hi !
I tested FailSafe with Spectrum AR6200, AR6110 & HK OrangeRX R610.
After TX off Throttle graph in WinGui drop to 910 and motors drop to MINTHROTTLE value (1120 for SS ESC).
If Yaw stick is hold left during TX power of FC will disarm after little time - this indicate than RX is sending some signal.
I tested all RX's with logic analyzer, all of them send only THROTTLE signal when TX is OFF other lines are flat.
Looks like I can't use FailSafe with Spectrum radios - is this true ???
Can FailSafe procedure check other than throttle channel to be activated ???
Thanks
Tom
I tested FailSafe with Spectrum AR6200, AR6110 & HK OrangeRX R610.
After TX off Throttle graph in WinGui drop to 910 and motors drop to MINTHROTTLE value (1120 for SS ESC).
If Yaw stick is hold left during TX power of FC will disarm after little time - this indicate than RX is sending some signal.
I tested all RX's with logic analyzer, all of them send only THROTTLE signal when TX is OFF other lines are flat.
Looks like I can't use FailSafe with Spectrum radios - is this true ???
Can FailSafe procedure check other than throttle channel to be activated ???
Thanks
Tom
Re: Failsafe auto leveling.
Tifani wrote:Looks like I can't use FailSafe with Spectrum radios - is this true ???
Can FailSafe procedure check other than throttle channel to be activated ???
interesting. failsafe currently uses THROTTLE_PIN for testing; will be fun to test against other pin.
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: Failsafe auto leveling.
there are different approaches to test the signal valid status: stick values between boundaries
ppm pulse time valid
heartbeat etc
I tested some receivers and sum signal generators and there are quite some differences.If you have a scope, see what your rx is doing and implement it.
One more option would be a lack of change in the signals but this is quite dangerous if you use gps rth or ph.
just an option though.
nils
ppm pulse time valid
heartbeat etc
I tested some receivers and sum signal generators and there are quite some differences.If you have a scope, see what your rx is doing and implement it.
One more option would be a lack of change in the signals but this is quite dangerous if you use gps rth or ph.
just an option though.
nils
Re: Failsafe auto leveling.
Spektrum is known for doing its failsafe on the throttle output. Now if we could get MWii detect a rx failsafe state by monitoring yaw pin instead of throttle pin in rx.ino, then that could greatly enhance the usefulness of current failsafe implementation without further changes required.
Re: Failsafe auto leveling.
Hi
I will test (on the weekend) how an Orange Spektrum RX will behave on signal lost - e.g. turn the TX off.
If there is no signal on a pin but Throttle I will write a patch for RX.ino.
My idea is to select an rcChannel in config.h which triggers the failsave.
Shouldn't be that complicated.
Greetings
Thorsten
I will test (on the weekend) how an Orange Spektrum RX will behave on signal lost - e.g. turn the TX off.
If there is no signal on a pin but Throttle I will write a patch for RX.ino.
My idea is to select an rcChannel in config.h which triggers the failsave.
Shouldn't be that complicated.
Greetings
Thorsten
Last edited by Th0rsten on Sat Jul 21, 2012 9:11 am, edited 1 time in total.
Re: Failsafe auto leveling.
Ok, I can confirm that the Orange Spektrum RX switches to sending 1000ns on throttle if the TX is switched off.
All other channels are flat on my DSO.
Option to select a failsavepin is in r998.
Please check. It's working fine in the GUI.
All other channels are flat on my DSO.
Option to select a failsavepin is in r998.
Please check. It's working fine in the GUI.
Last edited by Th0rsten on Sat Jul 21, 2012 5:27 pm, edited 1 time in total.
Re: Failsafe auto leveling.
comitted a simplification to all that case handling and duplicate code fragments.
Please check. It's working fine with Speltrum and ROLLPIN.
Besides - cannot we change the default pin for failsafe checking from throttlepin to rollpin or yawpin?
Please check. It's working fine with Speltrum and ROLLPIN.
Besides - cannot we change the default pin for failsafe checking from throttlepin to rollpin or yawpin?
Re: Failsafe auto leveling.
Hi Hamburger
Yes, it's working and the code looks nicer.
IMHO is moving the default to ROLLPIN a good idea.
Grüsse aus der Schweiz.
Thorsten
Yes, it's working and the code looks nicer.
IMHO is moving the default to ROLLPIN a good idea.
Grüsse aus der Schweiz.
Thorsten
Re: Failsafe auto leveling.
Tested failsave in the field.
Works great except the default throttle value of 1450 was a bit to high - it started gaining height instead of landing.
So i switched the TX back on and got back control to land it.
I think, we should lower the default FAILSAVE_THROTTLE to 1300 (or even lower).
Works great except the default throttle value of 1450 was a bit to high - it started gaining height instead of landing.
So i switched the TX back on and got back control to land it.
I think, we should lower the default FAILSAVE_THROTTLE to 1300 (or even lower).
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: Failsafe auto leveling.
Th0rsten wrote:Tested failsave in the field.
Works great except the default throttle value of 1450 was a bit to high - it started gaining height instead of landing.
So i switched the TX back on and got back control to land it.
I think, we should lower the default FAILSAVE_THROTTLE to 1300 (or even lower).
I agree however this would greatly depend on the individual copter. What is needed is some automatic means of determining the right value to descend quickly but safely.
Re: Failsafe auto leveling.
Since failsafe auto leveling depends on an accelerometer to be present, MultiWii could use the z-axis measurement to either land with a constant downward acceleration or integrate that value over time to descent with a constant velocity ... ideally using baro and/or sonar, if present
Re: Failsafe auto leveling.
Hi guys, I just new here but I following your discussion on this matter. I built my quad y4 and using mwii std se, I used HobbyKing AR6110B rx and using the aux1 pin for the throttle to my mwii std se. This evening I test and monitored using GUI and result success.The aux1 pin is not failsafe and it armed the failsafe on multiwii std se. May be, this info can share together.
Re: Failsafe auto leveling.
copterrichie wrote:I agree however this would greatly depend on the individual copter. What is needed is some automatic means of determining the right value to descend quickly but safely.
Not exactly automatic but http://www.multiwii.com/forum/viewtopic.php?f=7&t=2183