Circuit schematic design help needed

I’ve been watching Paul McWhorters super duper Arduino series and have learned a lot about IDE programming and circuit design.
Now I’ve have the need to create a circuit that is not covered in those tutorials or anywhere that I can find. It’s based on the function of an autopilot switch module that I am trying to repurpose.
The concept is as follows…there are two rocker switches. One is the autopilot on/off and the other is the heading on/off.
Let’s call them switches L and R for simplicity. Each switch is a momentary switch with 3 poles. They activate one circuit when normally open (down) and then the other circuit when flipped to the (up) position. The mechanics are handled by small electromagnets that hold the top of the rocker in place, but I am ignoring that for now and want to focus on designing a circuit that emulates the different states of these switches.
Here are the basics of the operation…
L can either be off or on and has no effect on the position of R when R is in the off (down) position.
However, if L is off (down) and R is flipped to the on (up) position then L is flipped to the on (up) position.
With both Switches on (up) R can be on or off without affecting L.
With both switches on (up), flipping L to off (down) also flips R to off (down) position.
My idea is to use the two switches, and four LEDs to represent the three different combinations.

  1. Both switches down - two bottom LEDs on
  2. Both up - two top LEDs on
  3. L up and R down - top left LED and bottom right LED

There is never a top R LED and bottom L LED
I would really appreciate any help on trying to develop a schematic for this circuit and perhaps some insight on how to go about the IDE programming.

Make sure that this is possible at all. If impossible your project deserves a change to the specs.

See StateChangeDetection example in the IDE.

Thinking more about it I realize that activating that physical rocker switch without human interaction would require a very large magnetic field to pull the top of rocker the 1/4” needed to depress and hold in the momentary switch. That force would be too much to disconnect with a simple push on the bottom of the rocker without some very complicated circuitry. I have another simpler idea and will move on to that.

image
the four LEDs represent the 4 possible different switching states. They will only be on one at a time.

It's impossible to do what you wanted with just two spdt switches (single pole, dual throw) without diodes. You can use dpdt (dual pole, dual throws)

What kind of diodes? Where in the circuit would they need to be?

I think it will require two separate power sources, one for each switch and a pair of LEDs. Separate pins for each circuit and a way for the code to determine the state of each.

skottky diode, or just regular switching diode.

Scrap that. You don't need one. I am being stupid.
image
This does both LrRd(left up right down) and LdRr, however. Unless if you don't mind that.

No you are thinking about it in the wrong way.

As much as this circuit meets your requirement, I think the first one (where, in any circumstance only one LED lights up) is more useful if you want to switch between four things. Just wire the four things in place of (or in tandeem with) the four LEDs, as each represent a distinct state.

Would this be better or is this scenario also impossible?
Using two LEDs instead of four.
These would be the different states:

  1. L off, R off - both LEDS off
  2. L on, R stays off - left LED on
  3. L on, then R on - both LEDs on
  4. With both on - L off forces R off - both LEDs off
  5. R on, forces L on - both LEDs on
  6. R off, L stays on - left LED only (same as 2 above)

If I can’t get this to work I will go with my alternate plan B…abandon the interdependency between switches and just manually activate each switch as needed. I’ll just use the magnets to hold the switches in the closed position.

(scratches head)

These two cases you will need dpdt switches (6 terminal). and perhaps other mess (diodes, relays, etc) as I feel like you need a latch

Why do you need this done? if you want autopilot without heading, just add a switch for the autopilot and add a separate switch for heading
image
in this case the green led will not be on unless both switch is in the "up" position and blue will be on when the top one is in the "up" position

If you really want to be foolproof, you can alter the design of the switch so that when you flip the R switch (bottom switch) upward it will also actuate the top switch upward. and thus if you flip the top switch down it will also flip the R switch down
like so
image
But mechatronics is such an old (albeit, reliable) way of doing it, nobody is selling anything like that anymore. you will have to use superglue and plastic tabs (or solder and metal tabs)

ok that drawing with toggle switch is horrendous. Here is a better one with sliding switches
image
There used to be these "latched switches" where you can push one button (and it will stay down), but certain other button presses will make it pop up, or when pressing down one button will cause other buttons to be "pressed". something like on a cassette player. but again, they dont make these anymore.
you can replicate these behavior using complicated circuit involving lots of pushbutton (one "set" and one "reset" for each input) and a lot of relays that latch themselves. but its quite a hassle and can take up quite some space.
I should make one of these gizmos someday. they are quite intriguing.

It’s very difficult to express the operation in words. It would take a short video clip of how the autopilot works in my Xplane aircraft to show the switch combinations. The attached pic is the module I am trying to reuse to emulate the operation of those two switches. I don’t need the rotary in the middle. It’s just for show.
Those electromagnets hold the switches in the top position. And that metal plate pushes on the momentary switch plunger activating not only the A/P and when wanted also the heading switch. A spring pulls the bottom of the switches to off when the power to the magnets is disconnected. The magnets are disconnected when the bottom of the switches are manually pushed in. So far I have been able to energize those coils with a 12v, 1.5A power supply. But I want that electromagnet power to disconnect when the A/P rocker is switched to off. I think that is where a relay and a Schlotty diode comes in to play. But I don’t fully understand the electronics of how to do that…..yet.
I at least need to find a way to either re-use those existing magnet coils or perhaps find some other 12v magnets I could use to energize that top plate. I can get some round rare earth magnets sitting on top of the coils to at least hold the switches closed. But It would be nice to utilize electromagnets that can be de-energized and allow both switches to spring to the off position by just selecting one switch.
The top image shows the switch positions after pushing the top right heading button to on. If both switches are off, pushing heading on turns them both on. If both switches are on, pushing the A/P switch off turns them both off.
In other words selecting A/P OFF denergizes both magnets and both switches are pulled to the off position by the small springs. If both are off, selecting A/P ON only energizes the left magnet. Selecting Heading ON will need to energize both magnets. I’d like to at least get that much working with the existing magnets. If that’s not possible then I need to find another magnet solution because I want / need to use those particular switches.

I understand the switches with user feedback by holding them in the closed position when energized until the user or system turns off the connected device.

I doubt that the magnets can throw the switch but you can find out easily yourself.

1 Like

That’s the part I think is impossible and why I suspect that the sim might be incorrect compared to the real thing. I have yet to find someone that can confirm the real autopilot operation. I need to get that confirmed today by going out to the airport.
It’s easy to change a flight sim image by moving pixels around on a computer screen. It’s a completely different thing to generate the amount of magnetic force required to attract the plate across that gap on the back of the switch. So I really don’t need that to happen. But the magnets do need to hold the switches closed after manually pushing them and then de-energizing the magnets when the off position is selected.
I don’t want the magnets to stay on all the time so I need to be able to cut the power to them, probably with a relay. But the flyback issue needs to be addressed if re-using the existing coils.
The two LEDs in my schematic example were to represent the two magnets in an effort to simulate the operation. The switches can be momentary type on a breadboard and the IDE sketch can use state change programming to emulate when the magnets are energized. Generate a “0” and LOW for the LEDs when “de-energized” and then “1” and HIGH for the LEDs when “energized”. There is a tutorial from Paul McWhorter that might help me with that.
Or maybe use a couple of latching type push buttons.

1 Like

I really wonder why you don't want to find out yourself what the magnets can be used for. If they are for 12V operation you can energize them and find out whether they can toggle the switch or only can hold it in the ON position. Too easy?

Do you have any idea what the power supply voltage in the actual aircraft is? The electromagnets may be designed to operate at higher than 12 volts.

If the magnets are capable of physically activating the switches, then it is likely that the magnet is activated with full voltage, or a low resistance dropping resistor, to pull the switch on, then maintained by using a lower current (higher resistance dropping resistor) to hold the switch in position. That is very common with magnetically operated devices (such as solenoids) because the needed pull-in force is greater than the holding force.

With an arduino, you can use transistors to switch the magnets, and the actual logic for the LEDS can be handled in the code. The switches would just need to connect to input pins, and the LEDS / relays to output pins.

I have energized the magnets from between 5 and 24 volts with a variable power supply and the max voltage wasn’t enough to pull the switch in. It may be more of a current issue. The power supply maxes out at 1.5A.
The aircraft is of course running off a 12 volt system so if the voltage to the magnet is significantly greater than that and / or the current is increased there must be some sort of transistor system on the original board (see attached) that would do that temporarily. I think those are some old Motorola transistors or capacitors that I removed from the bottom of the board.
But I think that is getting way too complicated for my skill level and not absolutely necessary for me to get a semblance of realism in my home cockpit. I just need the switches to stay put when closed. And that can only be done with magnets, either the existing ones or possibly something else that I can place on the top metal plate to energize and de-energize it similar to attaching the rare earth magnets on top of them. In a pinch that is a low tech way that works but I would not have any automatic functions. I do have some 12v magnets on order that have a force of 200n or so. I tried a Keyesstudio magnet connected to my Arduino and which didn’t have enough force to even hold the switch closed. It wasn’t enough to magnetize the top plate appropriately.

In an aircraft the magnets have to be insensitive to centrifugal forces, shock and vibration and therefore will draw much current. Find out how much voltage or current is required to just hold the switches in your environment.

I used A 24 volt variable power supply as a test and found that it will keep the switch closed above about 5 volts up to the max 24. I can notice the slight change in force. 24v is the max voltage I have applied to those coils. A typical 12 volt power supply works well in keeping the switches closed. Both power supplies max out at 1.5 amps. If I could figure out how to deal with the flyback, I could use two of those 12 volt power packs and two relays….I think.

Then use the lowest available voltage above 5V for lowest currents. 1.5A at 24V will reduce to only 0.5A at 8V.

I tried the variable power supply again and found that it won’t hold the switch until I hit 9 volts. Dropping it down to about 7.5 and it releases. The manual force required to disengage the switch feels best around 18 volts. But frankly I can’t tell much difference between 18 and 24, but there is a definite difference between 9 and 18.
Also the switch has to be moved to within a business card thickness from the magnet before the magnet will draw the switch to the magnet plate.
After cranking the volts up to 24 for 5 minutes, I saw that the coil temp went up to 140 F. Dropped to around 130 F at 18 volts.

If the aircraft has a 12v supply I doubt the magnet is designed to run at higher voltage. Have you measured the coil resistance? Also, have you measured the voltage across the coil while operating, I suspect you are hitting a current limit on the power supply you are using. Do you have access to a 12v battery for testing?