Apart from the Korry-like push buttons there are some toggle switches on the overhead panel, too. Not many but some of them are three-state. For example the landing lights have On – Off – Retract states, the strobe lights have On – Auto – Off states, etc. So I headed over on the usual online places and found out those three state toggle switches are so insanely expensive! It got me thinking…
To build those landing (and other) light switches, you need to get ones that can do ON-ON-ON for it to work. Why? Because of the Flight Factor A320 button assignments. They follow the switch logic and require for each switch state a control input is assigned.
Here’s the trick
Use ON-OFF-ON switches, which are so much cheaper, and an IC with NOR gates such as 74HC02 – you can get them dirt cheap too so the overall costs drop significantly compared to the ON-ON-ON switches.
The schematic looks like this:
You hook the outputs 1, 2 and 3 to the Arduino inputs and you’re done. From there on, the Arduino gets all three signals from a switch that can physically only do two.
The magic here is that when there is no signal on 1A and 1B pins of the 74HC02 the 1Y pin becomes active. But when there’s a signal on either 1A or 1B, or both, the 1Y pin goes low.
And here’s the proof it really works:
And the most beautiful thing on this is that you don’t even need a complicated PCB for this. Just get a generic prototyping board, cut it to measure, solder in the ICs and wires that go to the toggle switches and Arduino board inputs, and that’s it.
Until next time!