Is there such thing as a mechanical switch whose position can be read AND set

Hi all!

I'm wondering if there exists switch that can do the following things:

  • Can be moved into a desired position by an arduino
  • If the user moves the switch, the arduino can read its current position

I know that a servo motor's position can be read, but I'm pretty sure you're not supposed to spin those manually.

Anyway, hopefully someone will know what I'm talking about. Do you guys know of any such device?

How many positions?

Mahkoe:
I know that a servo motor's position can be read, but I'm pretty sure you're not supposed to spin those manually.

Most hobby servos don't provide position feedback.

Dynamixel makes "servos" which do provide position feedback. A Dynamixel servo like the AX-12A could be used with its torque set to off and then the servo's position could be monitored for a change. The microcontroller could turn the servo's torque back on and issue a command to move the position.

The Dynamixel technique is likely overkill for this situation.

I'm almost sure, I've seen relays which also have a physical switch. I don't recall what they are called. It seems like a relay with a switch would be the easiest (and hopefully least expensive) solution.

You could use a manual switch and a servo for arduino operation with a slotted arm to allow manual operation.

I've only seen audio synthesizer slider switches move up and down by themselves in videos. Can you tell us why you need such a switch?

Like this .............

bluejets:
Like this .............

Mahkoe also wants to monitor the switches position. If the switch were a DPDT then I think your idea would probably work great. One side of the DPDT could be used to tell the Arduino the switch's position.

BTW, it's possible to embed your image into your post. Follow this handy dandy guide to learn how.

Often, this sort of thing is done in software, eg, with a MOSFET acting as the electrical switch and the physical switch is just a momentary pushbutton....

this is one type of switch that you can manually turn on and then the Arduino would turn off.

here is a version that can turn it on or off.

Typically, you'd do something like this -

Use a momentary DPST center-off switch (a switch that returns automatically to the center position when you release it).

The "real" on-off state is handled in software but the software can read the switch so it "knows" if you've moved the switch up or down and the software can change the on/off state if necessary.

You can optionally add an LED to indicate the current on/off state, but the LED state (like the on/off state) is controlled by software.

...That's how an [u]Insteon or X-10 switch[/u] works. The switch has 3 positions with a spring returning it to center-off. You lights can be controlled manually or by remote control, and the software/frimware remembers & holds the last "command", whither it came manually or remotely.