Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

switches SPST like DPDT?

Status
Not open for further replies.

Norlin

New Member
I have a problem where I want to have 6 switches controlling four lines. Each switch drives two lines high, each seperate switch drives a different combination of two lines. So if I have four lines labelled A through D, each switch would do the following:
1 AB
2 AC
3 AD
4 BC
5 BD
6 CD

The problem comes that if you wire the switches up like this, all four lines will be connected together. You could overcome this with a double pole double throw switch (or is there another switch that has one common line on one side and two on the other?) you'd tie the two poles on one side of the switch to your voltage source and each of the other two poles to one line each.
eg:
Code:
Vcc --- SWITCH --- A
Vcc --- SWITCH --- B

However, I haven't been able to find tiny DPDT switches, so I have a bunch of SPST switches which are of perfect size. The only way I know how to solve this problem is to use a bunch of diodes, so I'd have
Code:
Vcc --- SWITCH --- diode to A
               --- diode to B

This solution would work for me, but I'd end up with 12 diodes and I'm trying to keep the size (and complexity) of the circuit to a minimum as it's to be a keyfob sized transmitter...can anyone think of another way to implement this with SPST switches? If I were to have to use a 12pin or larger IC, I might as well use the diodes as they'd be around the same size.
 
With individual switches what happens if two are ON at the same time? It seems to me this requires a 6 position rotary switch or a set of push-switches where pusing one releses the others.
 
If you resign yourself that you will need a chip, a simple microcontroller would be easy. John
 
The simplest standard logic circuit I could think of to work with SPDT switches uses 4 triple-input OR gates. But that would require 2 chips since I think the most available on one chip is 3 gates.
 
Hi,

Yes, using simple spst switches, i think 12 diodes
is the minimum you would need to do this.

John :)
 

Attachments

  • Switches.jpg
    Switches.jpg
    25.5 KB · Views: 271
Hi,

however some of the small DIL switches, (like a chip) are spdt switches,
and if you can use those then you can do it using four switches and
two diodes.
If you can spare the room, you could use six of the switches and replace
the diodes ive drawn with another two switches, but i think the diodes
are actually smaller than the switches, so ive left the drawing as four
switches and two diodes.
I've drawn the same circuit six times, cos that is easier than trying
to look at one drawing, in six different states.

John :)
 

Attachments

  • Switches2.jpg
    Switches2.jpg
    46.8 KB · Views: 561
Ah wow, I like that solution john1, I went ahead and made a PCB for the prototype (which will probably end up being the production model as I'm only planning on making one unless is breaks) using 12 diodes, but I'll keep your drawing in mind if I make it again (or anything similar in the future). I know I have a few SPDT switches that I salvaged, I think they came from computer mouses (mice?). Most of my tiny switches are SPST though.
 
Ooops, looking at the drawing again I see that multiple switches might have to be simultaneously pushed to get the outputs, in which case singly wiring each switch to an output would have the same results. Am looking to press a single button to get the desired output.
 
Hi Norlin,

Thank you for your very positive reply,
and i am sorry i did not spot that you wanted to press a single button to do it.
Yes, more than one switch would have to be operated using that arrangement.
I was very tired when i posted that circuit, and opon looking at it again, i now
see that the diodes i included could just as easily be wires, with the same result.
So it would just be the switches, no diodes.

However, if you want six different buttons to press, for the six different outputs,
then i dont think you can get the components down below twelve diodes.
Unless the current demands are quite small, then maybe six transistors could be
used as 'diode-pairs' instead of 12 diodes.

It might be possible to incorporate a tiny slide-switch, (spdt) just to halve the
number of buttons, so you would move the slide switch, then press one of three buttons
but i haven't looked at the circuit possibilities, although i know that some very
small slide switches are used here and there, but i don't know how much room you
have to play with.
Or if moving a small preset slide switch before pressing the button
is a practical option for your purpose.

John :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top