Armed/ Dirarmed Logic switch help

Programing help and example for all firmwares based on thus's th9 firmware.
Post Reply
dec0y13
Posts: 4
Joined: Tue Nov 10, 2015 5:48 pm
Country: -

Armed/ Dirarmed Logic switch help

Post by dec0y13 »

Solved!

This works most closely with the Open Pilot arm and disarm options.
This is set to work with Throttle down and Yaw/ Rudder right.
and then disarm after 15 seconds...so you don't slice off your fingers :) (I think the default is 30, this is easily changed either way.)

Here is the final tested logic code:

L1 v<val Thr -98
L2 v>val Rud 98 L1
L3 NtmeOff 1 on 1 L2 (L3 Triggers "Armed" alert in the voices tab)
L4 Latch L3 L6
L5 v<val Thr -98 L4
L6 NtmeOff 14 on 1 L5 (L6 Triggers "Safe" alert in the voices tab) (after the delay 14 seconds here is almost perfect for the 15 second safety)

---------------------------------

The problem:

Hey guys, I looked around and couldn’t find a solution to the Logic Switch I’m trying to program.
I recently upgraded my Turnigy 9X with the 9X Extreme board.
I’m running the stock firmware that it was shipped with (v.1946-mike)

I want an audible alarm for both arming and safety mode for the engines on my Quad.
I am using the throttle down and rudder right for 15 seconds to arm and then throttle down for 15 to “disarm” or go to safe.

I want to set up a toggle that after arming the craft, if the throttle falls below -98 for 15 seconds, it will play my disarm message, and then loop back to my arm sequence.
Thanks to this forum I did find some information that got me this far.

L1 v<val Thr -98
L2 v>val Rud 98 L1
L3 NtmeOff 3 on 1 L2 (I don’t know why but the 3 here is close to 15 seconds)
I then Use L3 to trigger a “voice” for armed.

(This part works for my armed alarm just fine, Here is where I get into trouble)

L4 Latch L3 L1 ( I was trying to set up a switch to trigger IF L3 fired)
L5 v<val Thr -98 L4
L3 NtmeOff 3 on 1 L5 ( and then play a voice for disarm)
(and something to reset here)

Yeah, this isn’t quite working LOL
Can anyone help a Bro out?
Last edited by dec0y13 on Wed Nov 11, 2015 6:14 am, edited 2 times in total.

User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Armed/ Dirarmed Logic switch help

Post by Kilrah »

Not helping you but I do not recommend doing such a thing. As there is no actual feedback from the controller this only works out of assumptions - i.e. you may get your radio call you "disarmed" and you walking happily to the machine believing it's all safe when it actually decided not to disarm for whatever reason.
Info that might be wrong is worse than no info.
dec0y13
Posts: 4
Joined: Tue Nov 10, 2015 5:48 pm
Country: -

Re: Armed/ Dirarmed Logic switch help

Post by dec0y13 »

I had that thought too, but a warning of any sort would save me lol.

I've already picked up my copter and bumped the throttle once shredding a finger. It's just to help me not break myself.

I would love a direct signal from the FC to the radio, but I don't believe I have that option.
For now I know what I programmed into the FC for safe times from throttle down, so it's the best i can do.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Armed/ Dirarmed Logic switch help

Post by MikeB »

The line:
L3 NtmeOff 3 on 1 L2 (I don’t know why but the 3 here is close to 15 seconds)
should hold L3 off for 3 seconds, then turn on for 1 second, AND repeat this while L" is ON. I just tried this on my 9Xtreme and it worked as I describe.

With the LATCH, the first switch sets it (1) and the second resets it (0).
I'm not sure L1 is the correct entry here, you may want L6.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
dec0y13
Posts: 4
Joined: Tue Nov 10, 2015 5:48 pm
Country: -

Re: Armed/ Dirarmed Logic switch help

Post by dec0y13 »

Wow! Mike B!!!
I'm honored. I'm loving what you guys have done with the 9X Extreme!

I'm no programmer so I don't understand all the logic that happens behind the scenes.

I made these corrections and it works great! Thank you! I was much closer than I thought I was.
Now I just need to adjust my timing. (it seems to Arm the craft is much shorter than to go to safe.)

L1 v<val Thr -98
L2 v>val Rud 98 L1
L3 NtmeOff 3 on 1 L2 (L3 Triggers "armed" alert)
L4 Latch L3 L6
L5 v<val Thr -98 L4
L6 NtmeOff 10 on 1 L5 (L6 Triggers "Safe" alert)
L7 F-Flop L4 !lo L6 (not sure if I need this)

dec0y13
Posts: 4
Joined: Tue Nov 10, 2015 5:48 pm
Country: -

Re: Armed/ Dirarmed Logic switch help

Post by dec0y13 »

This works most closely with the Open Pilot arm and disarm options.
This is set to work with Throttle down and Yaw/ Rudder right.
and then disarm after 15 seconds...so you don't slice off your fingers :) (I think the default is 30, this is easily changed either way.)

Here is the final tested logic code:

L1 v<val Thr -98
L2 v>val Rud 98 L1
L3 NtmeOff 1 on 1 L2 (L3 Triggers "Armed" alert in the voices tab)
L4 Latch L3 L6
L5 v<val Thr -98 L4
L6 NtmeOff 14 on 1 L5 (L6 Triggers "Safe" alert in the voices tab) (after the delay 14 seconds here is almost perfect for the 15 second safety)
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Armed/ Dirarmed Logic switch help

Post by Kilrah »

dec0y13 wrote: I've already picked up my copter and bumped the throttle once shredding a finger. It's just to help me not break myself.
My solution to this is to use the FC's feature to have the motors running at idle whenever it's armed.

That way when it's armed it's obvious because the motors are turning, and when they don't turn It's certain it's disarmed.
User avatar
bob195558
Posts: 2377
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

Re: Armed/ Dirarmed Logic switch help

Post by bob195558 »

In Model Setup / Safety Switches set CH3: X / !THR / -100.

Bob B.
Er9x on 9x radio, with Smartieparts Programmer and TelemetrEZ Board.
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).

Post Reply

Return to “er9x / gruvin9x / th9 based firmwares”