SPDT (on-off-on) circuit help

Thread Starter

Turby001

Joined Sep 2, 2009
4
Given that I have a 3 pin SPDT switch in ON-OFF-OFF configuration, (common pin, switch1, switch2), 5v and gnd is there a simple circuit using discrete components that would give me a 0v if switch 1 is set, 2.5v if off and 5v if switch 2 is set?

It seems overkill to use a small PIC microcontroller to rear the state of the switch and drive several transistors to generate the required voltage using resistor network.
 

Ian0

Joined Aug 7, 2020
9,846
Yes, just put two equal-value resistors between common and switch1 and between common and switch 2.
 

Jon Chandler

Joined Jun 12, 2008
1,055
Where is 2.5V coming from? If you have regulated +5 but no regulated 2.5V, I'd use an LM317 voltage regulator to make the 2.5 volts, depending on the current needed.

If you need any significant current at 2.5V (if you're actually trying to supply power to something), the voltage divider that lan0 is eluding to above won't work.
 

MisterBill2

Joined Jan 23, 2018
18,595
There is a bit missing as all of the 3 pin, 3 position switches that I am familiar with are center off.
Really, the question does not make much sense to me.
 

Thread Starter

Turby001

Joined Sep 2, 2009
4
Sorry, I got the original post wrong. It’s a on-off-on switch with middle position off. The output from the circuit is feeding an Ecu input which requires 2.5v if no switch is selected, 0v if one switch selected, and 5v if other switch is selected. There is a regulated 5v output from the Ecu which is available along with sensor ground
 

Thread Starter

Turby001

Joined Sep 2, 2009
4
I’ve done a simple circuit which was based on two separate switches, but not the SPDT 3 pin switch, which I have to keep as it’s part of an existing assembly.
 
Top