Welcome to Multi-Rotor UK. Please login or sign up.

Thursday,April 25, 2024, 20:27:57

Login with username, password and session length

Shoutbox

Gaza07:
23 Apr 2024 08:09:45
The Domain expires for the forum in 60 days, I'm not going to renew it this time unless I see any activity  :beer2:
Gaza07:
20 Apr 2024 18:02:50
Is there anyone who would like to see this forum stay open ? :shrug:
hoverfly:
17 Apr 2024 17:15:13
 :rolleyes:
Bad Raven:
26 Mar 2024 08:41:05
 :(
Andy7:
25 Mar 2024 14:49:21
An excess of work and rain.  :thumbdown:
Bad Raven:
23 Mar 2024 18:12:38
Almost a personal Blog, it would seem. LOTS of members, but NO posts.  :-/   :shrug:
Gaza07:
06 Mar 2024 16:59:49
Anyone still here  :shrug:
ched:
24 Dec 2023 11:48:48
Hope you all have a Great Christmas and a happy New Year.
Bad Raven:
20 Dec 2023 06:17:47
 ~~   :beer2: 
Gaza07:
19 Dec 2023 22:20:27
Merry Christmas All  :beer2:
Members
  • Total Members: 8,195
  • Latest: lokloks
Stats
  • Total Posts: 201,427
  • Total Topics: 20,261
  • Online today: 31
  • Online ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 22
Total: 22

Theme Changer





3d - Printworx

MultiWii 2.1 and FailSafe

Started by bunnygirl80, Monday,December 31, 2012, 18:14:45

Previous topic - Next topic

bunnygirl80

Now that I';ve finished building my 450 quad,  ::) I';m focusing on learning to fly and setting it up properly to make the learning easier. With all my aircraft';s I';ve always been a firm believer in preparation preparation and more preparation and this brings me to my next topic... the MultiWii (MW) Failsafe and Spektrum receivers. This may also apply to other receivers which work in a similar way to the Spektrums.

I would like my quad to be as safe as possible and using the standard Spektrum receiver failsafe which simply reduces the throttle to the bind throttle is simply not going to help keeping my quad in one piece. I want something a little smarter, something which auto levels the quad, reduces the power to the motors and brings it automatically and safely to the ground.

I noticed towards the end of the MW config.h that there was a failsafe option commented out.

//#define FAILSAFE // uncomment  to activate the failsafe function //stefw

So, I did some research and discovered that this can be used to bring your quad down safely when it loses RX signal. There is a similar option for bringing your quad down safely when it is on low battery.

So, I uncommented the FAILSAFE and gave it a try. Unfortunately, it didn';t work, so I started my research and discovered that the software works by checking for a loss of signal on the THROTTLE input (i.e. an input signal of 0 as opposed to the ~1000 LOW or ~2000 HIGH signal which happens during normal operation).

I then discovered that the Spektrum AR6210 receiver that I am using has the Spektrum SmartSafe feature (which cannot be turned off) and supplies a failsafe signal to the MultiWii when the signal is lost (i.e. stick position approx ~1000) which will never cause the MW FAILSAFE software to run for auto levelling, reducing the throttle and bringing the aircraft safely to the ground.

Ideally, I thought, if I could bind the AR6210 to 0 throttle, then this would be sufficient to make the MW FAILSAFE work, but I don';t know of a way to do this. Yet!

As I couldn';t easily set the RX throttle failsafe to 0, I decided to do some more research and downloaded the latest development MW code. I MUST stress that this code is for DEVELOPERS. The release bulletin mentions the following enhancements which I found real interesting - especially the bit about failsafe being more robust.

- baro Alt from mahowik (new functions to come, noted)
- baro calibration and some baro mods from Sebbi
- new task scheduler for a better computation time repartition
- better Ublox code detection
- HORIZON mode (mix between ACRO & ANGLE)
- ANGLE mode is the old LEVEL mode
- every UART for everything on MEGA
- cool GUI enhancement from magnetron
- spektrum bind button for spektrum receiver (Danal)
- telemetry cosmetic
- bug correction for servos on MEGA
- failsafe is more robust

Looking at the NEW MW failsafe code in more detail I discover quite a few nice changes and also some other future FAILSAFE enhancements, such as return to home on signal loss and/or battery voltage. The NEW MW Failsafe code checks for a drop in throttle to below 985 which can be easily programmed into the Spektrum RX.

Instead of uploading the NEW DEVELOPMENT MW software to my quad, I decided to copy across the FAILSAFE specific lines from the new code to the 2.1 version I already have (made a backup first of course). I did this using the Beyond Compare software which shows each NEW and current 2.1 version and program side by side on screen and even allows you to move lines from one code to the other.

After doing this and having my own new 2.1 code, I compiled (no errors) and uploaded to the quad. I then binded the SPEKTRUM RX by setting throttle travel to 150% (reduced my throttle reading to 910). Then after binding I reset throttle travel to the original value giving a reading of ~1000. Then I armed the quad, powered the motors to about 1400 whilst restrained above the table. Then i turned the TX off : after 1 second the motors reduced power to 1200, the gyros kept the quad level for 20 seconds, until a good landing, then the motors are shut off and the quad disarmed. I';ve increased the 1200 hover speed to 1350 which gives a lower rate of descent - this should make for a better and softer landing.

I hope this is useful to others out there and you at least find it informative. My next challenge is to develop a small MW program for connecting the bind pins and then passing a zero to the throttle pins. Similar to the MW ESC calibration program I ran yesterday for calibrating all ESC in one go. This will then make the current MW 2.1 software work without hacking.

Okay, I';m now off to choose a dress for my NYE party tonight! :o) Whippee! All the best for 2013. I might even post a photo tomorrow!  :laugh: xx
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

homersainty

wow bunnygirl sounds like you are on top of this already we shell be coming to you for help soon have a good evening and a great new year hope you are not to hungover tomorrow as the weather looks good ( well ok) for flying  ::)
If you find yourself in danger of being taken seriously, then try to do something which undermines or sabotages that perception in some way.

Biffa

Any chance of uploading the code for others to have a bash with? Thus saving us all the monotonous work :cool:
Steve

shaktar

Could you not just use the Preset Fail safe mode on the spectrum to activate the Return to home mode in the software. So you just set it to that switch position at signal loss.
[url="http://www.facebook.com/TMadeImages"]http://www.facebook.com/TMadeImages[/url].

teslahed

Excellent work Stef - I';ve set the failsafe on my multiwii boards as well, but as i have a cheaper radio i didn';t have all the problems you had to overcome with your spektrum failsafe and multiwii failsafe interfering. So mine just activates on signal loss and, like yours is now setup, puts the motors to a setting that allows for a slow gentle decent with auto-level enabled before powering down after 10 seconds. I don';t have GPS on my stuntcopter so i haven';t had to worry about return to home on mine.

One circlip short of a quadcopter.
 1 lobe short of an antenna.

Gaza_07

I havent used the multi wii fail safe before as I had heard of it causing problems, but the new developers code has so many improvements that it is well worth having another look at it now, the new code also allows telemetry over any port which we have been waiting a very long time for, I have flown the latest dev code and it all seems to work fine and didnt do anything unexpected  ~~
it looks like your taking to multi wii very well and will soon be advising us  ~~ looking forward to the picture  :whistling:

bunnygirl80

Back home and back at work after spending Christmas and New Year with the family.  :blink

I';ll tidy up and post the MW 2.1 Fail Safe code.

I';ll also have a look to see if there is Return To Home Fail Safe code and how it works. Does anyone know this? Save me a few hours work!

Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

bunnygirl80

** MULTIWII 2.1 FIRMWARE WITH ENHANCED FAILSAFE **  :smiley:

I found a few hours today to tidy up and test the latest changes. Please note that this release of the MW 2.1 sketch is based on the standard MW 2.1, so you will need to uncomment your preferences as usual in Config.h and upload to your multirotor.

This enhanced version of the already tried and tested MW 2.1 firmware has FAILSAFE enabled by default. It checks for pulses on the four main control channels (THROTTLE, PITCH, ROLL and YAW). If the pulses are missing due to a signal loss or below 985 for longer than 1 second on any channel the failsafe is activated. The FAILSAFE will activate LEVEL mode, REDUCE POWER to the motors for 20 seconds and then DISARM the multirotor. If a GOOD signal is received at any point before the DISARM, control is regained

Please note I have set the FAILSAFE_THROTTLE to 1500. This is the best setting for my quad copter to bring it down at a safe rate. You can adjust this to the best setting for your multirotor.

CLICK THE LINK BELOW TO DOWNLOAD THE SOFTWARE. Please let me know if you have any questions.
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

Gaza07

Nice work Stef  ~~ I see you have changed your avatar picture to a party picture  :beer2:
[url="https://www.youtube.com/channel/UCN6zN99iLCIJea5FCQPKf_g"]YouTube[/url]   [url="https://www.printing-3d.co.uk"]printing-3d[/url]  [url="https://www.thingiverse.com/Gaza07/about"]Thingiverse[/url]  [url="https://www.3d-printworx.co.uk"]3d-printworx[/url]

bunnygirl80

Hi Gary, ::)

Yes, it was a lovely new years party. Continued eating, drinking and partying into the early hours. I just feel sooo fat now and started my healthy eating regime today!  ;) Hope you had a good Christmas and New Year. Shame about the weather! It was just rain, rain and more rain!  :(

Catch up later, I';m off to cook some bangers and mash!  ::) xx
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

paulcobra

Hi steff, im running a dx8 with an AR7100 rx, what changes do i need to make on my transmitter regarding failsafe options and does that mw code replace the one on the forum? As in is it your sketch i upload rather than the one in crius section on the forum

bunnygirl80

Hi Paul,

The code there completely replaces the MultiWii 2.1 from the forum. It is basically the same one, but with the latest FailSafe code from the official MW development team. If you want to compare and see the small handful of changes you can download a program called "Beyond Compare" and see both the original and the changed versions. http://www.scootersoftware.com/

You don';t need to change your transmitter settings at all, but it is cruicial that your throttle doesn';t go below the 998 threshold as this is when the MW code kicks in with the failsafe settings. Make sure when you bind your Spektrum RX to your TX that you have less than 998 on your throttle. You can view this figure in the WinGUI. Once you';ve done this binding, set your throttle to the 1000> and <2000 range.

To test, hold your copter, don';t let go,  :smiley: , arm it, put about half throttle, turn off your TX, test auto level by moving around, it should fight against you to auto level, throttle will reduce for 20 seconds, which gives it enough time to land safely and then it should cut off the motors and disarm.  ::)

Stef
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

paulcobra

I re did the full calibration and setup like you said and its miles better, but still not stable, dont know if its propwash or what but it sort of pendulums round , but i was only trying it on the bed and only a foot or so high.

bunnygirl80

Hi Paul,

I don';t think its your props themselves as I';ve got the cheapest props going. It could be propwash if it a small room and it is better to test outdoors like in a garden. There is also more propwash in the first foot or so, you need to get a bit higher to get out of it. I can hover mine on the rug in the living room with little space around and the propwash doesn';t cause any problems. So, i think it might be something else. Might be worth you trying it in the garden tomorrow if there isn';t too much snow.

Stef
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

secretman

dont forget to add FAILSAFE_OFF_DELAY more than 200 it equale to 20 seconde.....


Quote from: bunnygirl80 on Wednesday,January 02, 2013, 17:10:34
** MULTIWII 2.1 FIRMWARE WITH ENHANCED FAILSAFE **  :smiley:

I found a few hours today to tidy up and test the latest changes. Please note that this release of the MW 2.1 sketch is based on the standard MW 2.1, so you will need to uncomment your preferences as usual in Config.h and upload to your multirotor.

This enhanced version of the already tried and tested MW 2.1 firmware has FAILSAFE enabled by default. It checks for pulses on the four main control channels (THROTTLE, PITCH, ROLL and YAW). If the pulses are missing due to a signal loss or below 985 for longer than 1 second on any channel the failsafe is activated. The FAILSAFE will activate LEVEL mode, REDUCE POWER to the motors for 20 seconds and then DISARM the multirotor. If a GOOD signal is received at any point before the DISARM, control is regained

Please note I have set the FAILSAFE_THROTTLE to 1500. This is the best setting for my quad copter to bring it down at a safe rate. You can adjust this to the best setting for your multirotor.

CLICK THE LINK BELOW TO DOWNLOAD THE SOFTWARE. Please let me know if you have any questions.