# Sparkfun Encoder switch.

**URL:** <https://community.sparkfun.com/t/sparkfun-encoder-switch/43433>\
**Category:** Miscellaneous\
**Created:** [February 2, 2022, 6:19pm UTC](https://community.sparkfun.com/t/sparkfun-encoder-switch/43433 "2022-02-02T18:19:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sparkyman](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Sparkyman](https://community.sparkfun.com/u/Sparkyman)\
**Post date:** [February 2, 2022, 6:19pm UTC](https://community.sparkfun.com/t/sparkfun-encoder-switch/43433/1 "2022-02-02T18:19:31Z")

</div>

This 5-pin Sparkfun part (dunno how to find the part number) shows A,B and C designations on one side of the part. I can’t see what the designations are on the opposite side of the part. (D and E?)

The popular KY40 has a linear 5-pin arrangement with pin designations :clk, dt, SW, +, Gnd .

How do I map the corresponding Sparkfun pins A,B,C and ?? (the pins on the opposite side of A,B and C ?

E.g.: A=clk, B=dt, C=SW D, E ???

Am I correct in that Sparkfun doesn’t sell KY40 encoders?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![darrellg](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/darrellg/32/3334_2.png) [@darrellg](https://community.sparkfun.com/u/darrellg)\
**Post date:** [February 2, 2022, 8:35pm UTC](https://community.sparkfun.com/t/sparkfun-encoder-switch/43433/2 "2022-02-02T20:35:52Z")

</div>

A=Clk

B=DT

C=GND

The other two are just a normally open switch, so SW and + could go to either.

---

<div class="post-metadata">

**Author:** ![Sparkyman](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Sparkyman](https://community.sparkfun.com/u/Sparkyman)\
**Post date:** [February 2, 2022, 10:12pm UTC](https://community.sparkfun.com/t/sparkfun-encoder-switch/43433/3 "2022-02-02T22:12:10Z")

</div>

Hmm … not sure what you mean by “SW and + could go to either”.

Like this?

A B C SW + OR A B C SW +

clk dt gnd gnd +5V clk dt gnd +5v gnd

Please advise.

Thanks

---

<div class="post-metadata">

**Author:** ![Sparkyman](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Sparkyman](https://community.sparkfun.com/u/Sparkyman)\
**Post date:** [February 2, 2022, 10:16pm UTC](https://community.sparkfun.com/t/sparkfun-encoder-switch/43433/4 "2022-02-02T22:16:50Z")

</div>

Sorry …

A B C SW + OR A B C SW +

clk dt gnd gnd +5V clk dt gnd +5v gnd

---

<div class="post-metadata">

**Author:** ![Sparkyman](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@Sparkyman](https://community.sparkfun.com/u/Sparkyman)\
**Post date:** [February 2, 2022, 10:18pm UTC](https://community.sparkfun.com/t/sparkfun-encoder-switch/43433/5 "2022-02-02T22:18:21Z")

</div>

Sorry, this editor doesn’t allow spaces.

I think I know what you mean.

---

<div class="post-metadata">

**Author:** ![darrellg](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/darrellg/32/3334_2.png) [@darrellg](https://community.sparkfun.com/u/darrellg)\
**Post date:** [February 2, 2022, 10:39pm UTC](https://community.sparkfun.com/t/sparkfun-encoder-switch/43433/6 "2022-02-02T22:39:29Z")

</div>

The other two, meaning the ones not marked A, B, or C, are the switch that is activated by pressing the shaft. It is a simple switch. There is a datasheet on the documents tab of the product page, as well as a tutorial. I’ve highlighted them in the attached screenshot.

![Screenshot 2022-02-02 143706.png](https://canada1.discourse-cdn.com/sparkfun/original/3X/c/5/c5b435657e6cd93f08e199aafd531b3f3fd11434.png)
