check in
Ongoing

12 WAY

STD12 WAY

tag

1.7k
0
0
0
Mode:Full

License

Creation time:2021-02-25 23:18:17Update time:2022-03-26 07:22:36

Description

PCB to be mounted on a 12-way single pole rotary switch, to make it work like a stepped voltage divider. Connected to an MCU analog pin, you can read out different values depending on switch position.

 

It is designed in a way that you will have room for the wires between the PCB and the switch, meaning it will not add any volume to the original switch size. 

 

It is designed for the following switch: https://no.mouser.com/ProductDetail/611-A10005RNCQ

 

Example sketch (using arduino IDE and joystick library):

 

 

 

#include Joystick.h

#define rotPin A1

 

 

void setup () {

  pinMode (rotPin, input);

  Joystick.begin();

}

void loop() {

 

uint16_t rot = analogRead(rotPin);

rot = map (rot, 0, 1015, 0, 11);

for (int i = 0; i < 12, i++) {

  if (i != rot) {

     Joystick.releaseButton(i);

  }

}

Joystick.pressButton(rot);

 

}

 

 

Design Drawing

The preview image was not generated, please save it again in the editor.

BOM

Bom empty

Attachments

OrderFile nameDownload times
No data
Clone
Add to Album
0
0
Share
Report

Comment

All Comments(1)
Sort by time|Sort by popularity
Followers0|Likes0
Related projects
Empty

Bottom Navigation