Go Down

Topic: Looking for switches... (Read 588 times) previous topic - next topic

Kcarp

Hello everybody!

I am looking for two different types of switches.

First, I need a 3-way switch, ON, OFF, AUTO.  I'm not sure how they work with adruino.  Does each position output a different voltage so I can determine the position of the switch?

I also am looking for a 2-way switch, ON and OFF.  Basically the same thing, I need to determine the position of the switch.

Thanks for any help and recommendations.

Grumpy_Mike

Quote
I need a 3-way switch, ON, OFF, AUTO.

Most three way switches have three connections, the center connected to the lower, the center connected to the upper and the center connector not connected to anything.
This is not directly compatible with any digital system. It is best to have the center connected to an analogue input, with a 10K resistor also connected from the input to +5V. Then the one end of the switch are connected to a 10K  resistor to ground and the other switch connector to a 4K7 resistor to ground.
Do an analogue read and look at the result, that will give you three different readings.

CrossRoads

2 and 3-way Switches can be found inexpensively at taydaelectronics.com
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

DVDdoug

Quote
First, I need a 3-way switch, ON, OFF, AUTO.  I'm not sure how they work with adruino.
You can do that with a "center-off"(on-off-on) toggle switch  (example), or a rotary switch.  The toggle switch I linked to is a double-pole (6 connection) switch.  You can use a single-pole double-throw (3-connections) center-off switch, or ignore the 3 extra terminals on a double-throw switch.

You can find rotary switches with adjustable stops, so you can adjust the number of positions, in case you can't find the "right" 3-position rotary switch.

With a center-off switch, you can use two Arduino inputs and you'll have 3 states*...   Input "A" can be on, or input "B" can be on, or both inputs can be off.   You can use if-statements in your sketch to take different actions depending on the switch/input states.

This example shows you how to connect a switch an read the state.    Most likely, "on" will mean that you are grounding an input and reading zero.

Quote
I also am looking for a 2-way switch, ON and OFF.  Basically the same thing, I need to determine the position of the switch.
Any-old SPST (single-pole-single-throw) switch will work for that.


* With 2 inputs, there are actually 4 possible states.  But, with this type of switch, there is no way to turn-on both inputs at the same time.

MichaelMeissner

On other type of switch is typically used in camera shutter releases where you press the shutter 1/2 way and the camera focuses, and if you press it all of the way, it takes a picture.  I don't think I have a picture of a wired shutter release disassembled, but a wired shutter release has 3 wires leading out (ground, focus, and shoot).  Internally there is 3 pieces of metal held apart with a small spring.  When you press the button down 1/2 way, it connects the ground and focus wires.  If you press the button down all of the way, the ground, focus, and fire wires are all connected.

The camera has a small circuit that becomes active when the focus + ground wires are connected, and another for the shoot + ground wires.  Some cameras need the focus wire to be connected as well, others don't, which can become important if you are trying to trip the shutter from an Arduino.

Go Up