#trying to connect a 3 position On/On/On switch.

1 messages · Page 1 of 1 (latest)

chilly horizon
#

Hi guys, I’m currently in the early stages of making an a320 overhead panel.

I want to make the Emergency Exit Light (On/Arm/Off) and I have a 3 position on/on/on switch with 6 pins, I connected one side of the pins (top to an arduino pin, middle to ground and bottom to another arduino pin)

I set the top pin to On, bottom pin to off and then on the release setting for both pins to arm. This isn’t working.

So my question is: why isn’t this working? And is there another way I can wire it or program it to make it work.

Sorry if this is hard to read or doesn’t make sense, thanks for any help.

shell rover
#

you need to explain a bit more. Enable "info" log in settings and first verify that your button events work properly, so that you get a OnPress and OnRelease for both of the side positions

#

and then you need to verify that the sim events do what you want - assign them to a simple pushbutton for example

#

its always two parts:

  • the switches are wired and configured right and create events the way you expect
  • the simulator event / preset has the desired effect on the simulator

Those are different things, but of course very related. But you need to separately verify that both parts work properly.

wild chasm
#

Please post a link to this 3 position switch, so we know exactly what you have.

wild chasm
#

It seems this is the action of the poles for each position of the switch.

wild chasm
#

if you are going to wire only the up and down positions, note pin 2 is GND and pins 1 and 6 are connected to arduino pins.

1   4
2   5
3   6
#

pins 3 and 5 are bridged

chilly horizon
wild chasm
#

wired together

#

forming a connection bridge

#

if you need to wire the middle position to another arduino pin (not really needed) then it would be to pin 4.

chilly horizon
#

So in this the white box would go to an arduino pin for the middle position. The yellow would got to a pin for top position, Red would go to a pin for bottom position and black to ground?

shell rover
#

you could use a multimeter continuity beep to verify the pinout, but basically your ground is either of the center pins, and your UP and DOWN pins are those that are NOT connected to the center pins when the switch is in the middle

wild chasm
shell rover
#

@wild chasm to my logic you could connect GND to both center pins even

wild chasm
#

yes, but you would not be able to use the center position

shell rover
#

and then move the switch to center, and see which of the side pins are NOT giving a connection

#

those are the ones you need to use

#

and then yes you need to do OnRelease for center position

#

if I thought this through correctly

wild chasm
#

the wiring I posted is for being able to use all three positions as ON ON ON

chilly horizon
wild chasm
# chilly horizon That’s what I’m aiming for.

Not really, as you are wanting to configure the on release for the middle position, so you are not using the middle position ON for anything. Thus, you could also do what Tuomas suggested of just wiring the middle pins together.

#

If you really wanted an ON ON ON, you would use three arduino pins and configure as three buttons in Mobiflight, all triggering on On Press.

chilly horizon
wild chasm
#
  1. bridge pins 3 and 5
#
  1. wire arduino pins to pins 1, 4 and 6
#
  1. wire GND to pin 2
chilly horizon
#

What is the bridge used for?

wild chasm
#

to connect pin 4 and 6 to GND when appropriate

chilly horizon
#

Okay

wild chasm
#

follow the diagram and you will understand it

chilly horizon
#

Thanks for bearing with me. 🤣

wild chasm
#

there is no real added value to using an ON ON ON configuration versus and ON OFF ON configuration. You use one extra arduino pin with no operational advantage.

#

that is because Mobiflight can act on the On Release event.

#

which makes the extra third pin not really necessary. I mean, you can do it if you so choose.

#

it will work just fine.

wild chasm
#

Like Tuomas said, if you only wish to wire the ON OFF ON configuration, then bridging the center pins also works with arduino pins on terminals 1 and 6.

#

it seems we need to document this in the wiki. Not many people use these DP ON ON ON switches.

chilly horizon
#

Thanks for the help both of you, I’m sure I’ll have many questions in the future. 👍

wild chasm