# Switch 3 positions

**URL:** <https://forum.arduino.cc/t/switch-3-positions/891903>\
**Category:** General Electronics\
**Created:** [August 3, 2021, 9:23am UTC](https://forum.arduino.cc/t/switch-3-positions/891903 "2021-08-03T09:23:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 9:23am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/1 "2021-08-03T09:23:24Z")

</div>

Hello,

I need to use a 3 positions switch with lever (pos1, pos2, pos3). Do you know what is the hardware that i need and how to wire it to the arduino please ? Is it the same switch that the one we use for 2 positions ?

Thank you.

Marie

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [August 3, 2021, 9:28am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/2 "2021-08-03T09:28:34Z")

</div>

I presume that you want the Arduino to react to the switch being moved to each of its 3 positions

If so, then wire the switch common contact to GND and each of the position contacts to a separate Arduino pin. Use `pinMode(pinNumber, INPUT_PULLUP);` for each of the switch pins and detect when one of them is LOW to determine the switch position

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 9:35am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/3 "2021-08-03T09:35:15Z")

</div>

Ok thank you so much. So a basic switch with 3 pins should work perfectly. And i wire two of them to two different digital pins on the arduino.

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [August 3, 2021, 10:21am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/4 "2021-08-03T10:21:54Z")

</div>

> [@supermarie](#):
>
> a basic switch with 3 pins

I can't picture how a switch with 3 pins can have 3 positions or have you changed your requirements and are intending to use a two way switch now

To clarify things, please post a link to the type of switch that you intend to use

---

<div class="post-metadata">

**Author:** ![bezelsanddisplays](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@bezelsanddisplays](https://forum.arduino.cc/u/bezelsanddisplays)\
**Post date:** [August 3, 2021, 10:25am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/5 "2021-08-03T10:25:15Z")

</div>

Hi, a 3 position selector-type switch is going to have more than 3 pins.  
It depends on the switch, but read ukhelibob's response. If the switch has a common connection then wire that to GND and connect each of the 3 switched connections to the arduino pins.  
So, a basic 3 position switch will have 3 arduino connections. And the switch will have at least 4 connections.

If you have a switch with 3 pins, then its likely a SPDT (single pole toggle switch). Not a 3 way switch.

Maybe post a link to the switch you have or are buying?

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [August 3, 2021, 10:29am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/6 "2021-08-03T10:29:04Z")

</div>

> [@bezelsanddisplays](#):
>
> If you have a switch with 3 pins, then its likely a SPDT (single pole toggle switch)

It could, of course, be a 3 position switch with a centre off position. I have been caught out like that before when someone said they had a SPDT switch

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:36am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/7 "2021-08-03T11:36:55Z")

</div>

> **[WEKON 10pcs Mini Interrupteur à Bascule, AC 125V 6A ON-ON Interrupteur à Levier...](https://www.amazon.fr/WEKON-Interrupteur-Bascule-Positions-Commutateur/dp/B08HH21DL2)**
>
> WEKON Mini Interrupteur à Bascule Caractéristiques · Plastique et métal, interrupteur à bascule miniature en bleu et argent, AC 125V 6A, largement utilisé pour contrôler le fonctionnement de nombreux projets électroniques de petite puissance. · Il...

This is the type of switch i would have used for 2 positions and 3 positions. Does it work ?

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:40am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/8 "2021-08-03T11:40:04Z")

</div>

I tought that for 2 positions switch i had to use only 2 pins of the switch and for 3 positions i had to use all the 3 pins available. Isn't it ?

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [August 3, 2021, 11:41am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/9 "2021-08-03T11:41:04Z")

</div>

> WEKON 10pcs Mini Rocker Switch, AC 125V 6A ON-ON Lever Switch with 3 Pins 2 Position, Toggle Switch SPDT Single Joint Switch for Car Dashboard Light, Blue

An SPDT switch with **2 positions**

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:42am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/10 "2021-08-03T11:42:50Z")

</div>

so i cannot use it for 3 positions... but i cannot find what i need to use for 3 positions. Can u help me please ?

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:43am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/11 "2021-08-03T11:43:37Z")

</div>

and what does the wiring part look like

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 3, 2021, 11:45am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/12 "2021-08-03T11:45:09Z")

</div>

Aaaand that's how we end up with parts for our next project.  
What do you think of a 3 pin 3 position switch, using 2 Arduino pins?

> **[Amazon.com: HiLetgo 10pcs 6A/125V 3A/250V ON/Off/ON 3 Terminals 3 Position SPDT...](https://www.amazon.com/HiLetgo-Terminals-Position-Toggle-MTS-103/dp/B079JG2YSM)**
>
> Buy HiLetgo 10pcs 6A/125V 3A/250V ON/Off/ON 3 Terminals 3 Position SPDT Toggle Switch Single Joint MTS-103: Toggle Switches - Amazon.com ✓ FREE DELIVERY possible on eligible purchases

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:46am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/13 "2021-08-03T11:46:51Z")

</div>

That is my question. Does a switch like this with 3 pins can have 3 **differents** positions ?

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 3, 2021, 11:47am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/14 "2021-08-03T11:47:53Z")

</div>

The one I just linked should do it, but I'm interested in @UKHeliBob opinion first.

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:50am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/15 "2021-08-03T11:50:36Z")

</div>

Me too. @UKHeliBob what do you think ? What i understood is that for 2 positions we wire one pin to the GND and one pin to a digital pin. For a 3 positions switch, do we wire one pin to the GND and 2 on two differents digital pins ? Then this switch that @er_name_not_found showed should work ?

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:51am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/16 "2021-08-03T11:51:49Z")

</div>

@bezelsanddisplays can u show me what a 3 positions switch look like please ?

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:52am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/17 "2021-08-03T11:52:59Z")

</div>

And as you understood i do not want ON/OFF/ON because i need 3 **differents** positions. Maybe that i why we cannot use your switch @er_name_not_found

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 3, 2021, 11:53am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/18 "2021-08-03T11:53:29Z")

</div>

Well, I'd power the switch and run each on pin to an arduino pin  
if 1 is on then it's position 1  
if 2 is on then it's position 2  
if neither are on then it's position 3, the one in the middle

---

<div class="post-metadata">

**Author:** ![supermarie](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@supermarie](https://forum.arduino.cc/u/supermarie)\
**Post date:** [August 3, 2021, 11:55am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/19 "2021-08-03T11:55:00Z")

</div>

@UKHeliBob

---

<div class="post-metadata">

**Author:** ![er\_name\_not\_found](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/er_name_not_found/32/647693_2.png) [@er\_name\_not\_found](https://forum.arduino.cc/u/er_name_not_found)\
**Post date:** [August 3, 2021, 11:55am UTC](https://forum.arduino.cc/t/switch-3-positions/891903/20 "2021-08-03T11:55:29Z")

</div>

Just wait. People are busy sometimes

[Next page](https://forum.arduino.cc/t/switch-3-positions/891903.md?page=2)
