Failsafe?

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Post Reply
User avatar
mapes12
Posts: 138
Joined: Tue Jul 09, 2013 6:44 am
Country: United Kingdom
Location: Lichfield UK
Contact:

Failsafe?

Post by mapes12 »

On my Taranis running ersky9x I can set failsafe from the Tx. Model Setup > Protocol > Failsafe > Custom then set the custom settings I want. I'm setting up er9x on a (aged) Turnigy 9XR. I've flashed the latest FW (821) but I've noticed the same Failsafe screen isn't there. The Rx is a Frsky S6R and setting failsafe on the Rx isn't an option. At least I don't think it is because the FS button invokes self check, not FS. Is there a way to set failsafe in er9x in this scenario?

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Failsafe?

Post by MikeB »

er9x doesn't (currently) support setting FrSky failsafe from the Tx. This is due to a lack of flash space on the M64, and the need to extend the EEPROM for each model by 16 bytes to store the failsafe data. While those 16 bytes may be OK in the EEPROM, it also means we need 16 bytes more of RAM as well, and we are tight on RAM as well, both on the M64 and the M128 (the M128 actually needing more RAM).

I've noted this as a possible enhancement, but it will probably only be possible on the '128/'2561 versions, and then only if I can be sure the extra RAM usage isn't a problem.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Failsafe?

Post by MikeB »

I've got failsafe setting from the Tx working in er9x, but only for the '128 and '2561. The M64 version is at 65508 bytes out of 65536, so only 28 bytes of flash spare, so no space to add the failsafe code in.

I've tested it with a XJT module to a X6R, and also with a Multi module in FrSkyX mode to the X6R. I've been using the V2 version of er9x for this, but the code should be the same for the V1 firmware. I need to update eepe so it, at least, preserves the failsafe settings, even if it doesn't alow them to be edited.

I'll hopefully post a test version tomorrow.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Failsafe?

Post by jhsa »

Wow, I never thought I would see this on the AVR radios :)

Thank you

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Failsafe?

Post by MikeB »

Well the M64 is just plain FULL, so anything extra is only really possible on the '128 and '2561.However, since much of the code for er9x and ersky9x is similar, adding things to er9x, that are in ersky9x, for the larger processors can be relatively easy. The main limitation is RAM (on the '128).
My other problem is I only have 1 M64 radio and 1 '2561 radio, I no longer have a '128 radio for testing.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Failsafe?

Post by jhsa »

Mike, I also no longer have m64 or m128 radios for testing. My only AVR radio is the m2561.
My only m128 board is in my 9XT. I do have a couple boards with m64 and I think I still have some m128 chips. Need to check. The boards I have were sent to me damaged somehow and I kinda repaired them. I sent working (repaired) boards to forum users in exchange for the damaged boards. Like this I could continue to help others.
If you want, and if I have the parts, I can try replacing the chip on one of them and send it to you. it's been a while since I replaced a chip with so many pins. But if I did it before I can't see why I wouldn't be able to do it now :D

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Failsafe?

Post by MikeB »

I still have a 9X mainboard with a '128 on it, just not in a radio. I have 6 9X radios M64, M2561, SKY, AR9X-3S8 CPU, AR9X-4S8 CPU and 9Xtreme. I'm working on the basis that the 2561 is like the 128, I just need to keep an eye on the 128 RAM usage.

I really would like to move to the V2 version since this makes some flash space available on the M64, while making many things "better" (e.g. AND switches in logical switches). I'm happy the V2 code is fine, I need to do more checking on eepeV2, and the transfer of V1 models to V2.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Failsafe?

Post by jhsa »

Would that not mess my hardware config completely? I remember that there was some good reason why I stepped away from the V2. i can't remember what, but I think it was related to hardware. I have the serial voice module, a couple push buttons on the back of the radio (connected to the voice module I think), and also changed the ELE switch to 3 position using 2 (I think) of the available pins on the processor. If V2 can be configured for the same hardware connections as the V1 then I can mover to it.. Otherwise I would prefer to stay on V1. I have the m2561 chip on this radio.. The only thing missing on this radio is the haptic.

I know you said this is hardware related a while ago, but it would be really wonderful if the AVR radios could also have the possibility to have 2 RF modules connected to it.
What about an arduino connected in serial, or one of those multiplexer chips? wouldn't they do the PPM / Serial generation if connected via serial to the mainboard?

Thanks

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Failsafe?

Post by MikeB »

V2 should have the same hardware options as V1. Maybe you could have a look at eepeV2 to see if it gives you everything you need.
The AVR processor cannot drive two modules at the same time. The best I can think of is to have power switches to the two modules, and have a method of selecting any telemetry data (logic level?). The PPM (etc.) signal could probably go to both modules.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Failsafe?

Post by jhsa »

MikeB wrote: Sat Mar 10, 2018 6:42 pm V2 should have the same hardware options as V1. Maybe you could have a look at eepeV2 to see if it gives you everything you need.
Thanks Mike. First I will have to remember what I did to the radio.. it was quite a while ago :) I think I never had a radio case closed for so long ;)
The AVR processor cannot drive two modules at the same time. The best I can think of is to have power switches to the two modules, and have a method of selecting any telemetry data (logic level?). The PPM (etc.) signal could probably go to both modules.
Perhaps we could modify my "RF Soft Power Switch circuitry ? The one I use for the Ersky9x radios with Skyboard and Ar9x. The ATtiny still has some free pins..

Maybe the ATtiny could detect the PPM signal and the state of another pin another pin to decide which module to power.

- When this pin is high and PPM present, then the Tiny would turn the Internal module power ON only.

- PPM present and pin OFF would mean only the external module ON.

- If no PPM present, and Pin low, Both modules would be OFF.

- PPM signal would be present at both modules all the time. No need for any switching of the signal.

I think this could work, but I am not sure about turning the PPM signal off (both modules OFF) because of the trainer :( would this be a problem. it would be cool if it worked. But maybe we do not need both modules off because the trainer plug already takes care of that, correct?

I think it would need just a small modification of the ATtiny's code to do this pin state detection. basically it is just detecting it AND together with the PPM detection, take some action.. What do you think? The hardware is already there and working. it's just change Er9x and the ATtiny code :)

João

EDIT: I think detecting the PPM signal is not even needed? Pin High means Internal module ON, pin low means External module ON. Heck, we might even not need the ATTiny. we can do it with a couple Mosfets and transistors :)

EDIT_2: Another idea. no need for an extra CPU pin that could be used for a switch. :)
At power ON, Model change and protocol selection, send some kind of code that the ATTiny will understand, decode, and power the correct module ON. This way, only the ATtiny code needs changing and of course Er9x. Doable? :)
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Failsafe?

Post by MikeB »

I've posted test versions with failsafe added, on the test versions thread, both V1 and V2, with corresponding eepe and eepeV2 that handle the extra model data, although they don't support editing the values (yet).

João: I'm not sure how many users would want two modules with er9x, particularly if they have a Multi module.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Failsafe?

Post by jhsa »

Well, not everybody has a multi module, and there are people using those long range modules as well.

Also, the multi module doesn't support all existing protocols. Not sure if there are hitec modules, or multiplex modules, or Graupne.. And what is that new one as well? Crossfire??

I think it would be a good implementation as it is with ersky9x.
Shame that we can't send 16 channels in 2 modules?? That would be nice too :)

João

Sent from my BLN-L21 using Tapatalk

My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “er9x”