NewPot

From blwiki
Jump to: navigation, search

Tindie-larges-v2.png

NewPot - Smart potentiometer

NewPotFront-OSH.png

Features

  • Microprocessor controlled
    • ATTiny85 @ 20 MHz
  • Arduino Compatible
  • Extender ISP Connector
  • Starts at off when powered up
  • Rotary Encoder
  • 20-position
  • Encoder's Pushbutton switch resets Micrprocessor
  • PCB mounts on the back of the Rotary Encoder

Rotary Encoder Specifications

  • Rotary Shaft Length: Approx. 12mm
  • Shaft Full Length: Approx. 20mm
  • Shaft Diameter: Approx. 6mm
  • Size (L x W): Approx. 15 x 12mm
  • Output: 2-bit gray code
  • Closed Circuit Resistance: 3 ohms maximums
  • Max. Rating: 10 mA at 5 VDC
  • Operating Temperature Range: 30 to 70 degrees celsius
  • Storage Temperature Range: 40 to 85 degrees celsius
  • 20 clicks per turn

12mmRotaryEncoder-L623419-01.gif

Obscure Factoids

  • These kinds of rotary encoders are really incremental encoders
  • Incremental encoders have pins which are normally open.
  • Turning an incremental encoder results in four state changes
  • The order of the state changes shows the direction of the rotatiojn
  • If you are counting every state change you are counting 4 times per click
  • Counting four times per click results in a quick rate of change

Digitalization of turns

  • If you want 256 counts (8 bits) of data, then a 20 click per turn rotary encoder would result in almost 12 rotations for full scale
    • Formula is NumberOfRotations = 2^NumberOfBits / clicks/turn

Connectors

NewPotISPConn.PNG

  • Pins 1-6 are the ISP connectors

Arduino Code

const int EncoderA = 0;    // Encoder pins
const int EncoderB = 1;
const int MOSI = 2;        // SPI-POT pins
const int SCK = 3;
const int CS = 4;

External Links