License

Tags
Recommend Projects

12 WAY

10 months ago 426
  • Description
  • Documents
  • BOM
  • Attachments
  • Members
  • Comments

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);

 

}

 

 

Documents

Main sheet

PCB_12 WAY

BOM

ID Name Designator Footprint Quantity BOM_Supplier
1 100nF C1 C0402 1 LCSC
2 10K R1,R2,R3,R4,R5,R6,R7,R8,R9,R10,R11 R0402 11 LCSC
3 1K R12 R0402 1 LCSC
4 12 POSITION STEPPED RESISTOR ROT 12 POSITION STEPPED RESISTOR 1 LCSC

Attachments

None
Success
The owner does not allow comments in this project now

Comments (0)

goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.