3 pole switch
2-Zons wrote 02/26/2019 at 20:03 • 0 pointsI'm working on my 8 bit TTL computer (https://hackaday.io/project/162659-8-bit-breadboard-cpu) and have just received a sack of 3 pole switches I ordered. I'm using them to run the control signals for testing all modules working together. I was finding that using too many dip switches was drawing too much current and that a 3 pole toggle switch would be much better. These are the switches I ordered: https://www.taydaelectronics.com/electromechanical/switches-key-pad/push-button/push-button-switch-latching-on-off-dpdt-0-5a-50vdc-8x8mm.html
They may not be what I was looking for. What I wanted was a 3 pole on/on. I thought these were that. Strange thing is the outside two pins are shorted together and the switch selects between them. Since the outside pins are shorted I don't know how you could even use this as an on/off switch. Is there something I'm missing? Does anyone know how one might use a switch like this?
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
This switches are latching button switches, not toggles switches (still work as a switch fine, just a different style). They are double pole, double throw which will do what you want. On/on is kind of a bad term and is usually used by car guys to distinguish between a single throw or double throw switch, and on/off/on means there would be a deadspot between the two.
What matters is the number of positions the switch can be in, which is called the throw. This switch can be in two positions, so it is double throw. The pole number is the number of physically connected, electrically isolated switches inside of the physical switch. This switch is double pole, which means when you push the button it actually operates two switches inside of it.
You have already noticed that there appears to be a lead that connects to one lead when the button is pushed, and another when the button is released. This lead is known as the common lead, and should be connected to the TTL input. The lead the common connects to while the switch is off is known as the normally closed lead, and should connect to ground. The lead that common connects to while the switch is on is called the normally open lean, and should connect to power. Before powering this up, check with an ohmmeter that the switch definitely isn't wired in a way that will short out your power rail. There will be three pins on the switch you won't be using.
Since contacts bounce from the contact to high impedance, simply placing a small capacitor at the common terminal of the switch will provide very effective debounce with no delay, and will be suitable for clock and pulse signals.
It has been suggested that you just use dip switches with no pull up resistors since the TTL inputs float high on their own, but this is generally considered a bad practice. Further, I can almost guarantee you that most of your memory chips are actually TTL level compatible CMOS, which is not tolerant of floating inputs and picks up random noise. It's one of those things that may not mess you up immediately, but will mess you up eventually and leave you very confused. (Also, in case you haven't, you need to put decoupling capacitors on every chip or you will have similar headaches).
So these switches will do exactly what you wanted them to do. If this isn't clear let me know and I will draw a schematic and help you determine the pinout of the switches.
Are you sure? yes | no
It depends on whether OP is using LS or HCT parts. It seems from the schematics there is a mix. (Which means it's not truly an all TTL design, as 74HCT parts are actually CMOS.) I hope OP understands the difference between the two technologies. Be careful with HC parts, see this page: https://electronicsclub.info/74series.htm
Are you sure? yes | no
How does a DIP switch draw more current?
Also the poles means the number of independent circuits controlled. You probably meant a SPDT or DPDT switch which is what the link depicts. See https://electronicsclub.info/switches.htm
Are you sure? yes | no
Dip switches use more current because they short a resistor to ground when set to zero. With a 2 position switch I don't have to make a connection from Vcc to ground. I've got like 64 control signals to switch plus 8 data bus switches. Having 72 resistors to ground draws a lot of current. If I use too large of a resistor value then the voltage divider will drop the input voltage below TTL level. That's how I understand it anyways. Maybe I'm looking at it wrong.
Are you sure? yes | no
You can get SPDT DIP switches if that's a concern. Also you don't need a resistor to ground, you can simply pull the TTL input to ground. So you only need a pull-up resistor, no voltage divider.
Are you sure? yes | no
It seems to me on thinking about it, your talk of a voltage divider indicates that you misunderstand the operation of a TTL gate. The key thing is TTL is a current based logic, not a voltage based logic as MOS is. Although specs talk about <= 0.8V as logic 0 and >= 2.4V as logic 1, these voltages are the consequence of sinking or not sinking the input current respectively. A 74 series gate requires you to sink 1 unit load = 1.6 mA to be logic 0, a 74LS gate requires sinking 0.25 UL = 0.4 mA. You cannot avoid sinking this current to get logic 0, whether the input is the output of another gate, or a switch. If you try to raise the input voltage, you will simply reduce the noise margin, and the reduction in sink current will only be 16% at most.
So to connect a switch to a TTL gate, simply close the input to ground circuit get 0, and open the switch to let the pull-up resistor give logic 1. If your input is simply a configuration input, as opposed to a signal input, then you don't have to worry about sharp rising edges, and the pull-up resistor can be relatively high, say 22k. It's there simply so that the input doesn't float and be prone to picking up noise.
If you are using the switch to generate clocking signals you need to consider switch bounce or you will get multiple edges.
Are you sure? yes | no
Never mind, on further investigation I have determined that these are just on/off toggle switches.
Are you sure? yes | no