Skip to the content
2 layers12.7 × 10.2 mmI2c rotary encoder, the printed circuit board in 3D

i2c_rotary_encoder

Size
12.7 × 10.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
3
Nets
8
Pads
16
Tracks, vias
29, 2
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
14 Aug 2022
Updated
15 Aug 2022

Overview

I2c rotary encoder is an open-source printed circuit board by palette-system, from the palette-system/i2c_rotary_encoder repository on GitHub, published under the MIT licence. It is a 2-layer board of 12.7 × 10.2 mm with 3 parts on 8 nets, routed with 29 tracks and 2 vias.

README

README.md

I2C ロータリーエンコーダ




説明

I2CロータリエンコーダはATTiny202を利用したロータリエンコーダの操作をI2C越しに読み込みをするための基板です。
(販売はDIP変換基板と、下記ファームウェアを書き込んだATTiny202を販売します)

ファームウェアソース
software/i2c_rotary_encorder/i2c_rotary_encorder.ino



ATTiny202 ピン

番号ピン接続 番号ピン接続
1VDDVCC8GNDGND
2PA6rotary1_B7PA3rotary0_B
3PA7rotary1_A6PA0rotary0_A
4PA1I2C SDA5PA2I2C SCL


アドレス設定方法

プログラムの中に固定値でアドレスを指定しているため、ビルドして書込みを行わない限りアドレスの変更はできません。
デフォルトで 0x45 が書き込まれています。


メリット、デメリット

■ メリット
 ・マイコンのI/Oを消費しない
 ・アドレス変えていけば割といっぱい付けられる

■ デメリット
 ・実装するICと消費電力が増える
 

読み込み方

I2Cでアドレスを指定して1バイトリクエストするだけで取得できます。
最後にデータ取得した時から現在までにロータリエンコーダの操作があった場合に該当のビットが1になって帰ってきます。
一度取得するとまた0になり、ロータリエンコーダが操作されるまで0を取得します。

text
  uint8_t r;
  Wire.requestFrom(0x45, 1); // 指定したアドレスのATTiny202に1バイト分データ取得要求
  r = Wire.read(); // 1バイトデータ受け取る
  if (r & 0x08) # ロータリエンコーダ0左回り
  if (r & 0x04) # ロータリエンコーダ0右回り
  if (r & 0x02) # ロータリエンコーダ1左回り
  if (r & 0x01) # ロータリエンコーダ1右回り

 

AZ-CORE、えむごっち等に接続する場合のAZTOOL手順

https://twitter.com/4py1/status/1559090793159458816 https://twitter.com/4py1/status/1559088312589365248

ATTiny202 開発環境の作り方

https://ameblo.jp/pta55/entry-12654450554.html

詳細情報

電圧: 1.8V ~ 5.5V
信号: I2C (~1.7MHz)

Similar boards

  • 2 layers40 × 30 mmBlinky, the printed circuit board in 3D

    Blinky

    earthtojake/text-to-cad

    Design physical products with AI

    3 parts26kMIT
  • 2 layers51.9 × 16 mmPassive2-rpi non standard adapter, the printed circuit board in 3D

    Passive2-rpi non standard adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    3 parts4.4kGPL-2.0
  • 2 layers16.3 × 16.3 mmSensor, the printed circuit board in 3D

    Sensor

    scottbez1/splitflap

    DIY split-flap display

    3 parts4.2k
  • 2 layersSub, the printed circuit board in 3D

    Sub

    atopile/atopile

    Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️

    3 parts4kMIT
  • 2 layers85 × 30 mmDual stomp, the printed circuit board in 3D

    Dual stomp

    torvalds/GuitarPedal

    Linus learns analog circuits

    3 parts2.5kGPL-2.0
  • 2 layers124.5 × 33.7 mm172319-1 connector, the printed circuit board in 3D

    172319-1 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    3 parts1.2k
  • 2 layers10.5 × 83 mmProgrammingAdapter, the printed circuit board in 3D

    ProgrammingAdapter

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    3 parts1.1k
  • 2 layers21.2 × 51.3 mmPico reset, the printed circuit board in 3D

    Pico reset

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    3 parts1.1kMIT

Questions

How big is the I2c rotary encoder PCB?

It measures 12.7 × 10.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the I2c rotary encoder use?

3 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the I2c rotary encoder KiCad files?

From the palette-system/i2c_rotary_encoder repository on GitHub, at the commit this page was made from: the board is hardware/i2c_rotary_encoder.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the I2c rotary encoder design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).