Page 1 of 1

Electronic Switch Control

Posted: Tue Jul 03, 2018 5:21 pm
by keninvic
I have a receiver channel electronic switch that controls leds. It has different modes, flashing,alternating,on,off, depending on how many times the channel is toggled. I simply want them to go on when I operate the SF retract down switch. I cant be toggling that switch 3 times just to get the landing lights to stay on. Have tried using the timer option on the logical switches but cant figure out how to stop them after 3 cycles. Any help on this would be greatly appreciated.

Re: Electronic Switch Control

Posted: Tue Jul 03, 2018 7:55 pm
by jhsa
Good challenge :) Will try this just for the fun of it :) but I use Ersky9x, not opentx.. I will try to translate it to opentx if i can still find companion on my computer ;)

There is a project that I posted a while ago here on the forum that is a switch controlled only by one channel of the receiver, but it can control 4 different switches independently from each other.. If you want blinking it is programmed on the radio.. :)

João

Re: Electronic Switch Control

Posted: Tue Jul 03, 2018 8:35 pm
by jhsa
and how many times after the light is already on do you need to toggle the switch to turn them off??
I think iI have turning ON already working :)
João

Re: Electronic Switch Control

Posted: Tue Jul 03, 2018 8:47 pm
by MikeB
Set up a logical switch like:
L01 AND SAv SAv duration 2.9
then another:
L02 Timer 0.5 0.5 AND switch L01
then use L02 as the source of a channel and the channel will toggle 3 times.

Mike

Re: Electronic Switch Control

Posted: Tue Jul 03, 2018 8:55 pm
by jhsa
I did it in Ersky9x but used a GVAR and a few logical switches :)
Perhaps because we don't have the "duration" option in Ersky9x?? ;)

João

Re: Electronic Switch Control

Posted: Tue Jul 03, 2018 9:17 pm
by jhsa
I tried your suggestion but had to use "1-shot" for the duration..

João

Re: Electronic Switch Control

Posted: Tue Jul 03, 2018 10:29 pm
by keninvic
Thanks for the quick reply guys. It takes 3 pulses (on-off cycles) to get to both LEDs on mode, and one more pulse to turn them off. LED lights out would be linked to the SF switch toggled the other way for gear up.

Re: Electronic Switch Control

Posted: Tue Jul 03, 2018 10:30 pm
by keninvic
Mike, what is SAv?

Re: Electronic Switch Control

Posted: Tue Jul 03, 2018 10:50 pm
by jhsa
SAv is SA down

Try as Mike suggested.. I will add the bit to turn the lights OFF

L1 AND SFv SFv duration 2.9
L2 Timer 0.5 0.5 AND switch L1
L3 AND SF^ SF^ duration 0.8
L4 OR L1 L3

then use L04 as the source of a channel and the channel will toggle 3 times.
When you turn the switch OFF it should toggle once.

João

Re: Electronic Switch Control

Posted: Wed Jul 04, 2018 6:04 pm
by keninvic
Tried your code Joao, still unpredictable outcome unfortunately. It does give me something to play with though so will keep trying. There are 3 locations on the L1 line where I could put SFv, I put SFv in the 1st two slots.

Re: Electronic Switch Control

Posted: Wed Jul 04, 2018 6:38 pm
by jhsa
What you mean with unpredictable outcome??

Please check on your radio's channel monitor that the channel is going to +100% 3 times when you turn the switch ON, and once when you turn the switch back OFF..

João

Re: Electronic Switch Control

Posted: Wed Jul 04, 2018 6:49 pm
by jhsa
I do apologize, I did do a couple mistakes :( I have just tried again.

Try this:

L1 AND SFv SFv duration 2.9
L2 Timer 0.5 0.5 AND switch L4
L3 AND SF^ SF^ duration 0.8
L4 OR L1 L3

then use L2 as the source of a channel and the channel will toggle 3 times.
When you turn the switch OFF it should toggle once.

João