robertha wrote:In my opinion have fixed throtle as a failsafe is a bit pathetic - when wrongly set (weight change - different batery, without camera), the copter will either fall as a brick or fly away - depend just on weight to thrust ratio - think the NH vario descent is an absolute minimum for failsafe.
That's really true. RTH worked already month ago..... .....a pitty it isn't in Main Branch...
TBH, I'm struggling to understand the purpose of the throttle mid-point setting and initially using this mid-point when engaging BARO mode. Shouldn't the ALT PID loop kick in on engaging BARO mode and stabilise altitude?
Bear in mind that this is a question from the uninitiated, I only wish to understand the reasoning.
At this point I have RTH triggered via my receiver failsafe. I also have the built in crappy multiwii failsafe enabled incase the receiver bites the dust or gets disconnected.
However this method sounds amazing. Has worked stopped on it since the release of 2.3? It kinda looks like people have moved onto base flight?
The RTH failsafe is great but if I can not regain control it'll just hover there until the battery dies... Of course if there are any trees it'll just run into them as there's no altitude to climb too.
Someone keeps using this code today ? There are some latest mod with these skills or this still the best ?
I already have installed on two AIOP ( V1.1 , and V2 ) , and not yet tested flight modes with gps and autoland , but I think I understood the setup , I have read enough this topic .
The main reason for this my message is that I try to upload the code for a Crius Se V2, and can not, it gives an error message : The sketch is too big .
Someone managed to install a Crius Se?
What modifications can I do to decrease the size of the sketch and fit in atmega 328 ?
Moraes wrote:What modifications can I do to decrease the size of the sketch and fit in atmega 328 ?
Without GPS enabled you can fit it in a 328.
For GPS Atmega 328 is dead!.. GPS after V2.3 is for Mega boards only. 328 is too small to fit the GPS code in.. Sorry..
Unless a slimmed RTH and Pos Hold version can be made for smaller FC's ex. The old version as define Lots of people have the mini and nano based FlightControllers.
Thank you for reply, I was already desperate for anyone to answer anything .
On the limitation of space , This mod works About Version 2.2 , But anyway , I did not have any trouble putting version 2.3 with gps in Crius SE with atmega 328 .
Nobody can give me tips to reduce this mod of this topic , the nhadriam , to fit a Crius SE ?
I would love to use this mod because doing failsafe return to home and autoland .
If it's below SAFE_RTH_ALT the Copter will start climb to reach that altitude before returning. Otherwise it will start returning at the current Altitude.
First I only used 2 parameters in the header config.h. I set "true" and set "10" meters.
When I test in Gui, switched off tx and nothing happened.
I return to arduino, uncomment original section failsafe, setting 1200 to disarm motors (2 minuts) and minthrottle + 200 (later I will try best value to descend with my setup).
And now, tested in Gui, after armed, if I switch off tx, I see Baro, MAg, GPShold And GPS Home armed. BUT disarm motors.
Yes, When I switch off TX, 1 sec later the failsafe work, but disarm motors, and If i switch on tx, still disarmed.
Please help me to understand whats wrong?
Thank you.
Ps. I will made one video to show this.
EDIT:
I tested one more time, making pictures to post here (upload video take more time), and now, the behavior was completely different.
Armed, switch of tx and FS work. armed baro, mag, and GPS HOLD. But the issue with disarming, vanish...
Tested one more time, And now.
Armed, switch of tx and FS work. armed baro, mag, and GPS HOME. The issue with disarming, still vanished...
In this moment I thinked this because number of sats in gps. And made new several tests
But the issue disarm motors when arm failsafe, It occurs randomly. And GPS hold or home, also seems to happen randomly.
Im make videos, Uploading now, Soon post here.
Ok, The randomly behaviour disarming motor if FS activated:
Hi Moraes, It is made from Devcode newer than 2.3 but 2.3 Gui works. You seem to have figured out the most questions i think.
Descending have a own routine Not minthrottle. Will disarm after landing in Failsafe but not after normal RTH.
For your safety. You need to move the copter away from home otherwise it's decides it's too close to your face to do a climb to altitude.
The RTH cycle.
Start climb in PosHold to RTH alt.(Mag hold) Start RTH with nose pointing towards home. At home radius. Switch back to Poshold and nose in Staring Direction. Start descending. Land and lower motors to idle. Disarm if in Failsafe.
If distance to home is to small it will make a RTH/Poshold at current altitude. If no GpsLock Do the Old Failsafe landing Minthrotle +200.
As yet I was able to use the code Patrike, I've been trying to solve the problems encountered with the original code in this topic, although abandoned, it seemed to me it was very good solutions.
And here's a video I made, which tests two identical boards, with the same code and the same settings, but different engines and frames. One is working relatively well, the other does not hold position and I doubt if the RTH okay, nor tested the autoland aind on the second board.
The way it disarms in the video is a sign on that it's Home and landed. You need to move the copter away from Home Position before it activates a RTH.
Make a test without propellers. Arm the Copter. Move it ~10 meters away. Turn off TX(Failsafe). It should now increase throttle to start climb and return.
If it behaves like that you can do it with props next.
PatrikE wrote:The way it disarms in the video is a sign on that it's Home and landed. You need to move the copter away from Home Position before it activates a RTH.
Make a test without propellers. Arm the Copter. Move it ~10 meters away. Turn off TX(Failsafe). It should now increase throttle to start climb and return.
If it behaves like that you can do it with props next.
Hi Patrike,
Its make sense... Why I dont think this???
I Try and report.
Its possible map one aux channel to trigger autoland?
Hi, I'm a newbie and have a newbie question: I was looking for a way to implement failsafe autoland with a cheap controller for the first quad I'm going to build (no GPS, so just autoland on loss of radio, and shut down motors, no RTH). I thought that multiwiii board would do that as it has a barometer, however it seems that it can't do that by default and I found this thread. Looks great, but it seems old, and the versions have progressed quite far since then. What are my options? Is there a better solution than this? Or do I have to use old version from herejust so it works? Looks like r23 is the latest... Or is there a way to implement this with a new version? Or any alternative solution?
PatrikE wrote:The way it disarms in the video is a sign on that it's Home and landed. You need to move the copter away from Home Position before it activates a RTH.
Make a test without propellers. Arm the Copter. Move it ~10 meters away. Turn off TX(Failsafe). It should now increase throttle to start climb and return.
If it behaves like that you can do it with props next.
Hi Patrike, does your mod work if there is no GPS - just as a failsafe autoland, without RTH part? How to program it?
I've just read this above for one of the earlier releases: "- Autoland works only with GPS / valid GPS data" Does it mean that autoland on failsafe can only work if GPS is present? What if I have no GPS at all - this code won't work? I really need immediate autoland on failsafe (descend, RMP lowered, disam) without RTH opr GPS. Is it possible?
/******** Failsafe settings ********************/ /* Failsafe check pulses on four main control channels CH1-CH4. If the pulse is missing or bellow 985us (on any of these four channels) the failsafe procedure is initiated. After FAILSAFE_DELAY time from failsafe detection, the level mode is on (if ACC or nunchuk is avaliable), PITCH, ROLL and YAW is centered and THROTTLE is set to FAILSAFE_THROTTLE value. You must set this value to descending about 1m/s or so for best results. This value is depended from your configuration, AUW and some other params. Next, afrer FAILSAFE_OFF_DELAY the copter is disarmed, and motors is stopped. If RC pulse coming back before reached FAILSAFE_OFF_DELAY time, after the small quard time the RC control is returned to normal. */ #define FAILSAFE // uncomment to activate the failsafe function #define FAILSAFE_DELAY 5 // Guard time for failsafe activation after signal lost. 1 step = 0.1sec - 1sec in example #define FAILSAFE_OFF_DELAY 2500 // Time for Landing before motors stop in 0.1sec. 1 step = 0.1sec - 20sec in example #define FAILSAFE_THROTTLE (MINTHROTTLE + 200) // (*) Throttle level used for landing - may be relative to MINTHROTTLE - as in this case
/***************** Failsafe descending to the ground by BARO *********************************/ /* For vario-controlled descending instead of having a fix throttle value, uncomment FAILSAFE_ALT_MODE. This allows to descend with preset vario. When flying on high altitudes, and would like to descend faster than apply FAILSAFE_SAFE_ALT and FAILSAFE_FAST_VARIO. This case will let copter descend faster from high altitude till reach the safety altitude, after will slow down to slow vario. If you have GPS and would like to have RTH activated when in failsafe, uncomment FAILSAFE_RTH_MODE. Please note that in this case FAILSAFE_ALT_MODE doesn't have to be uncommented, if GPS signal is weak, failsafe will work in FAILSAFE_ALT_MODE. Both with work only with FAILSAFE uncommented! Also Please note that both modes will work even if SUPPRESS_BARO_ALTHOLD is uncommented, so you can still save some space with better failsafe alt handling!
Please note that FAILSAE_OFF_DELAY is still active for security reasons, so set up long time enough to be able to RTH before this timer ends because motors will stop!!!*/
//#define FAILSAFE_ALT_MODE // uncomment for descending with constant vario if in Failsafe - use with FAILSAFE and define the FAILSAFE_SLOW_VARIO #define FAILSAFE_SLOW_VARIO 25 // in cm/s - slow desceding speed under SAFETY_ALT, this is default is SAFETY_ALT is not used. - maximum 250!!! #define FAILSAFE_FAST_VARIO 80 // in cm/s - fast desceding speed over SAFETY_ALT, maximum 250!!! #define FAILSAFE_SAFETY_ALT 200 // in cm - safety altitude, where to slow down descending before landing, in cm!!!
#define FAILSAFE_RTH_MODE // if GPS present and ready, copter starts RTH when signal lost. When signal is back, control is back again. #define FAILSAFE_RTH_VARIO 100 // in cm/s - vario for RTH function for failsafe, maximum 250!!! #define FAILSAFE_RTH_ALT 800 // in cm - minimum RTH altitude for failsafe. If copter is higher than this, it will keep altitude. #define FAILSAFE_RTH_HOME 400 // in cm - home altitude for RTH, copter will descend to this altitude and wait. #define FAILSAFE_RTH_DELAY 10 // in s - safety delay, after reaching HOME altitude, it'll land in FAILSAFE_ALT_MODE when safety delay terminates.
#define FAILSAFE_DETECT_TRESHOLD 900 //Failsafe threshold (in us)
Moraes wrote:I believe the NHA failsafe solutions do autoland without gps I think you need uncomment Failsade alt mode.
Thanks. I hope it works. Do you thing NHA r23 is good, safe and stable (bug-free) software to build my first quad with HobbyKing MultiWii 328P controller? Am I really missing anything not using latest versions?
One other thing - does multiwii with this software has voltage checking with beep when too low?