Skip to the content
PCBKitNew board
2 layers25 × 30 mmAttiny rs485, the printed circuit board in 3D

Attiny rs485

ytr0/mkctrl-v2

DIYゲームコントローラー制作ツールキット

Size
25 × 30 mm
Copper layers
2
Thickness
1.6 mm
Parts
16
Nets
14
Pads
68
Tracks, vias
78, 5
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
4 Apr 2026
Updated
4 Apr 2026

Overview

Attiny rs485 is an open-source printed circuit board by ytr0, from the ytr0/mkctrl-v2 repository on GitHub. It is a 2-layer board of 25 × 30 mm with 16 parts on 14 nets, routed with 78 tracks and 5 vias.

It is built around the ATTINY1616-MN, MAX3485ED and RS485, with the TPS61291DRV among its other parts. Its parts include 5 capacitors, 3 ICs, 3 connectors, 1 resistor and 1 inductor. It belongs with the interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

4

README

hardware/attiny_rs485/README.md

ATtiny1616 RS485 Input Module - Hardware Design

Version: v2.5.1.2026.0401 KiCad: 8.0+ Status: 設計完了、製造待ち

外部ジョイスティック/センサをRS485経由でM5AtomS3に接続するための小型入力モジュール。

システム構成

text
┌─────────────────────────────┐      RS485       ┌───────────────┐
│   ATtiny1616 RS485 Module   │ ═══════════════> │  M5AtomS3 #1  │
│                             │   115200bps      │   (Sensor)    │
│  ┌─────────┐  ┌─────────┐   │   ~100m max      └───────┬───────┘
│  │Joystick │  │ Button  │   │                          │
│  │  X / Y  │  │         │   │                     ESP-NOW
│  └────┬────┘  └────┬────┘   │                      ~2ms
│       │            │        │                          │
│       ▼            ▼        │                          ▼
│  ┌──────────────────────┐   │                  ┌───────────────┐
│  │    ATtiny1616        │   │                  │  M5AtomS3 #2  │
│  │    ADC + UART TX     │   │                  │  (Receiver)   │
│  └──────────┬───────────┘   │                  └───────┬───────┘
│             │               │                          │
│             ▼               │                      USB Serial
│  ┌──────────────────────┐   │                      2Mbps
│  │      MAX3485         │   │                          │
│  │   RS485 Transceiver  │───┼──────────────────────────┘
│  └──────────────────────┘   │                          ▼
│                             │                  ┌───────────────┐
│   [3.3V]    [GND]           │                  │  Processing   │
└─────────────────────────────┘                  │    + OSC      │
       ↑                                         └───────┬───────┘
       │                                                 │
    外部電源                                          UE5/Game

設計仕様

電気仕様

項目値備考
動作電圧3.3V2.7V〜5.5V対応(ATtiny1616)
消費電流(アクティブ)~10mAADC + RS485送信時
消費電流(アイドル)~2mA送信停止時
消費電流(スリープ)~0.3mAパワーダウンモード
クロック20MHz内蔵RC

通信仕様

項目値備考
プロトコルRS485 半二重送信専用
ボーレート115200 bps
ポーリングレート100Hz10ms間隔
フレーム8N1
CRCCRC-16-CCITT
最大ケーブル長~100m終端抵抗使用時

ポーリングレートの設計根拠

100Hzは以下の比較から十分と判断:

コントローラポーリングレート
PS5 DualSense250Hz (USB)
Xbox Series125Hz
Switch Pro60Hz
本設計100Hz
  • ジョイスティック入力の特性上、人間の指の動きは100Hz以上のサンプリングで十分にキャプチャ可能
  • RS485の遅延(~1ms)を考慮しても10ms間隔は余裕がある
  • 将来の拡張で200Hzへ引き上げ可能(ファームウェア変更のみ)

電池駆動について

単三電池(AA)1本(1.5V)での駆動を検討:

条件推定駆動時間備考
連続アクティブ~50時間2500mAh × 0.85効率 ÷ ~45mA
50%アクティブ~85時間アイドル時省電力
スリープ多用~2ヶ月ウェイクオン入力で復帰

要件:

  • 1.5V → 3.3V 昇圧コンバータが必要
  • 推奨IC: TPS61200 / PAM2401 など
  • 効率85%程度を想定

注意: 現行基板は外部3.3V電源を想定。電池駆動版は別途設計が必要。


回路図

部品リスト (BOM)

Ref部品パッケージ値備考
U1ATtiny1616-MNRQFN-20 (3x3mm)-MCU
U2MAX3485EDSOIC-8-RS485トランシーバ
C1セラミックコンデンサ0603100nFU1デカップリング
C2セラミックコンデンサ0603100nFU2デカップリング
C3セラミックコンデンサ060310µF電源バルク
R1抵抗06031kΩLED電流制限
R2抵抗060310kΩPB0プルダウン
R3抵抗060310kΩPB1プルダウン
R4抵抗060310kΩPA3プルアップ(内蔵使用なら省略可)
D1LED0603緑ステータス
J1ピンヘッダ2.54mm 2x3-センサ接続
J2ピンヘッダ2.54mm 1x2-RS485 (A/B)
J3ピンヘッダ2.54mm 1x2-電源 (VCC/GND)
J4ピンヘッダ2.54mm 1x3-UPDI (VCC/UPDI/GND)
J53.5mmジャックPJ-320D SMD-RS485 (T=A, R1=B, S=GND)

回路図 (ASCII)

text
                                    VCC (3.3V)
                                       │
                                      ┌┴┐
                                      │ │ R4 10k (optional)
                                      └┬┘
          ┌─────────────────────────┐  │
          │      ATtiny1616-MNR     │  │
          │                         │  │
    VCC ──┤1  VCC           PA3  16├──┴── BTN (J1)
          │                         │
   UPDI ──┤2  PA0/UPDI      PA2  15├────── (NC)
          │                         │
          │3  PA1/TX        PA1  14├────── (see PA1/TX)
          │                         │
          │4  PA2           GND  13├────── GND
          │                         │
    GND ──┤5  GND           PA7  12├──┬── LED ──[R1 1k]── GND
          │                         │  │
          │6  PB5           PA6  11├──┼── DE/RE (U2)
          │                         │  │
          │7  PB4           PA5  10├──┼── (NC - RX unused)
          │                         │  │
  B0/S1 ──┤8  PB3           PA4   9├──┼── (NC)
          │                         │  │

詳細配線

ATtiny1616-MNR (QFN-20) ピンアウト
text
        ┌──────────────────┐
        │ 20 19 18 17 16   │
        │ ○              │
     1  │                  │ 15
     2  │                  │ 14
     3  │   ATtiny1616     │ 13
     4  │      -MNR        │ 12
     5  │                  │ 11
        │  6  7  8  9  10  │
        └──────────────────┘
        (PAD = GND)

Pin 1:  VCC
Pin 2:  PA4
Pin 3:  PA5
Pin 4:  PA6  → DE/RE (MAX3485)
Pin 5:  PA7  → LED (via R1)
Pin 6:  PB3  → (NC)
Pin 7:  PB2  → (NC)
Pin 8:  PB1  → ADC B1 (via R3 pulldown)
Pin 9:  PB0  → ADC B0 (via R2 pulldown)
Pin 10: PC3  → (NC)
Pin 11: PC2  → (NC)
Pin 12: PC1  → (NC)
MAX3485ED (SOIC-8) ピンアウト
text
        ┌───────┐
    RO ─┤1     8├─ VCC (3.3V)
   /RE ─┤2     7├─ B (RS485-)
    DE ─┤3     6├─ A (RS485+)
    DI ─┤4     5├─ GND
        └───────┘

接続:
- Pin 1 (RO): NC (受信未使用)
- Pin 2 (/RE): PA6 (DE と共通)
- Pin 3 (DE): PA6
- Pin 4 (DI): PA1 (TX)
- Pin 5 (GND): GND
- Pin 6 (A): RS485 A (+)
- Pin 7 (B): RS485 B (-)
- Pin 8 (VCC): 3.3V

デカップリング

text
VCC ──┬──[C3 10µF]──┬── GND
      │             │
      ├──[C1 100nF]─┤  (U1近傍)
      │             │
      └──[C2 100nF]─┘  (U2近傍)

ADCプルダウン

text
PB0 ──┬── センサ入力
      │
     [R2 10kΩ]
      │
     GND

PB1 ──┬── センサ入力
      │
     [R3 10kΩ]
      │
     GND

PCB設計

基板仕様

項目値
サイズ25mm x 30mm
層数2層
板厚1.6mm
銅箔厚35µm (1oz)
表面処理HASL or ENIG
レジスト緑
シルク白

配置ガイド(DRC検証済み v2.5.1)

以下は0 DRCエラーを達成した最終レイアウト。座標は基板左下原点(0,0)からのmm値。

text
Y=0    ──────────────────────────
       │                        │
Y=3.5  │  J1(3.5)      J3(17)   │  ← 上部ヘッダ
       │  Sensor       Power    │
       │  2x3          1x3      │
       │                        │
Y=8    │          C1(10)        │  ← 100nF (U1用)
       │                        │
Y=10   │          C2(10)        │  ← 100nF (U2用)
       │                        │
Y=12   │    R3(5)               │  ← 10k (ADC B1)
       │                        │
Y=13   │         ┌──────┐       │
Y=14   │  D1(5)  │ U1   │ R1(15)│  ← ATtiny1616 @ (10,13)
       │  LED    │(10,13)│ 1k   │
Y=16   │         └──────┘       │
       │       C3(10)  R2(13)   │  ← 10µF, 10k (ADC B0)
       │                        │
Y=17   │  J4(3)                 │  ← UPDI 1x3
       │  UPDI                  │
       │                        │
Y=20   │        ┌──────┐  J2(17)│  ← MAX3485 @ (10,20)
       │        │ U2   │  RS485 │
       │        │(10,20)│  1x2  │
最終座標一覧
Ref位置 (X, Y) mm部品
J1(3.5, 3.5)センサ 2x3
J3(17.0, 3.5)電源 1x3
C1(10.0, 8.0)100nF
C2(10.0, 10.0)100nF
R3(5.0, 12.0)10kΩ
U1(10.0, 13.0)ATtiny1616 QFN-20
D1(5.0, 14.0)LED 緑
R1(15.0, 14.0)1kΩ
C3(10.0, 16.0)10µF
R2(13.0, 16.0)10kΩ
J4(3.0, 17.0)UPDI 1x3
U2(10.0, 20.0)MAX3485 SOIC-8
J2(17.0, 20.0)RS485 1x2
コートヤードサイズ参考

配置時は以下のコートヤード(部品周囲の禁止領域)を考慮:

フットプリントコートヤード幅
2x3 ピンヘッダX: 5.5mm, Y: 8.1mm
1x3 ピンヘッダX: 3.0mm, Y: 8.1mm
1x2 ピンヘッダX: 3.0mm, Y: 5.5mm
QFN-20 (3x3mm)5.0mm × 5.0mm
SOIC-86.0mm × 7.0mm
0603 (R/C/LED)2.6mm × 1.6mm

設計ルール

項目最小値
トラック幅0.2mm
クリアランス0.2mm
ビア径0.6mm
ビアドリル0.3mm
シルク幅0.15mm

GNDプレーン(両面)

  • F.Cu(表面): GNDベタ(信号配線を避けて充填)
  • B.Cu(裏面): GNDベタ(全面)
  • U1, U2の直下にGNDビアを配置
  • サーマルリリーフ使用
  • ノイズ低減・熱拡散に効果的

配線(Freerouting使用)

自動配線ツール Freerouting を使用:

bash
# DSNエクスポート(KiCad Python API経由)
/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3 << 'EOF'
import pcbnew
board = pcbnew.LoadBoard("attiny_rs485.kicad_pcb")
pcbnew.ExportSpecctraDSN(board, "attiny_rs485.dsn")
EOF

# Freerouting実行
java -jar freerouting-2.0.0.jar -de attiny_rs485.dsn -do attiny_rs485.ses -mp 100

# SESインポート
/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3 << 'EOF'
import pcbnew
board = pcbnew.LoadBoard("attiny_rs485.kicad_pcb")
pcbnew.ImportSpecctraSES(board, "attiny_rs485.ses")
pcbnew.SaveBoard("attiny_rs485.kicad_pcb", board)
EOF
配線結果
項目値
トレース数48本
ビア数8個
配線層F.Cu(信号)、B.Cu(GND)
配線時間~2.4秒
KiCadでの後処理

Freerouting後、KiCad GUIで以下を実行:

  1. GNDゾーン塗りつぶし: Bキー
  2. DRC実行: Inspect → Design Rules Checker
  3. 重複ゾーン削除(必要に応じて)

KiCadシンボル/フットプリント

必要なライブラリ

部品シンボルフットプリント
ATtiny1616-MNRMCU_Microchip_ATtiny:ATtiny1616-MNRPackage_DFN_QFN:QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mm
MAX3485EDInterface_UART:MAX3485EPackage_SO:SOIC-8_3.9x4.9mm_P1.27mm
100nFDevice:CCapacitor_SMD:C_0603_1608Metric
10µFDevice:CCapacitor_SMD:C_0603_1608Metric
抵抗Device:RResistor_SMD:R_0603_1608Metric
LEDDevice:LEDLED_SMD:LED_0603_1608Metric
ピンヘッダ 2x3Connector_Generic:Conn_02x03_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical
ピンヘッダ 1x2Connector_Generic:Conn_01x02Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical
ピンヘッダ 1x3Connector_Generic:Conn_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical
3.5mmジャックlocal:PJ-320Dlocal:PJ-320D (16.4x11.1mm SMD, 3D付)

製造発注

JLCPCB/PCBWay用ガーバー出力設定

  1. File → Plot
  2. Output directory: gerber/
  3. Layers:
    • F.Cu, B.Cu
    • F.SilkS, B.SilkS
    • F.Mask, B.Mask
    • Edge.Cuts
  4. Generate Drill Files (Excellon)

発注時の指定

  • Quantity: 5 or 10
  • PCB Thickness: 1.6mm
  • PCB Color: Green
  • Surface Finish: HASL (Lead free)
  • Copper Weight: 1oz

組み立て

実装順序

  1. U1 (ATtiny1616-MNR) - QFN部品、リフロー or ホットエアー推奨
  2. U2 (MAX3485ED) - SOIC、はんだごてで実装可能
  3. C1, C2, C3 - コンデンサ
  4. R1, R2, R3 - 抵抗
  5. D1 - LED(極性注意)
  6. J1, J2, J3, J4 - ピンヘッダ

テスト手順

  1. 電源投入前に VCC-GND 間ショート確認
  2. 3.3V供給、消費電流確認(~10mA以下)
  3. UPDI接続、ATtinyにファームウェア書き込み
  4. LED点滅確認
  5. RS485信号確認(オシロスコープ)

Parts

16
QtyValueFootprintReferences
3100nFCapacitor_SMD:C_0603_1608MetricC1, C2, C3
1100uFCapacitor_SMD:C_1206_3216MetricC5
110uFCapacitor_SMD:C_0805_2012MetricC4
1120RResistor_SMD:R_0603_1608MetricR1
13.3uHInductor_SMD:L_0805_2012MetricL1
1ATtiny1616Package_DFN_QFN:QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mmU1
1MAX3485Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU2
1PowerConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1RS485local:PJ-320DJ5
1SensorConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ4
1TPS61291Package_SON:WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mmU3

The 13 most common of 16 parts.

Questions

How big is the Attiny rs485 PCB?

It measures 25 × 30 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Attiny rs485 use?

16 parts, built around the ATTINY1616-MN, MAX3485ED, RS485 and TPS61291DRV. 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 Attiny rs485 KiCad files?

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

Can I use the Attiny rs485 design in my own project?

Its repository states no licence, so its author keeps all rights: ask ytr0 before reusing the design.

Similar boards

  • 2 layers76.5 × 78 mmEmonTH, the printed circuit board in 3D

    EmonTH

    openenergymonitor/emonTH3

    Hardware for the emonTH3 temperature, humidity, and pulse sensing node

    56 partsCC-BY-SA-4.0
  • 2 layers100 × 100 mmExplorer, the printed circuit board in 3D

    Explorer

    anyshake/explorer

    🌏 Detecting seismic wave using 3 geophones and 3-axis accelerometer, pack & send data to AnyShake Observer over RS232 / RS485 serial.

    266 parts100
  • 2 layers62 × 73.7 mmDoorBirdPico, the printed circuit board in 3D

    DoorBirdPico

    fraxinas/DoorBirdPico

    A custom Raspberry Pi Pico PCB design and code to add functionality to the DoorBird Voip entryphone.

    42 parts4
  • 4 layers54 × 100 mmOxrs black 004, the printed circuit board in 3D

    Oxrs black 004

    austinscreations/Oxrs-Black

    a custom rack controller that is based of the rack32 but includes some upgrades and major changes

    92 parts1GPL-3.0
  • 2 layers100 × 50 mmGnss, the printed circuit board in 3D

    Gnss

    bclswl0827/openstation

    An open source, cross-platform, easy-to-use satellite automatic tracking system with hardware & software solutions.

    42 parts1
  • 2 layers56.7 × 25.4 mmBatteryMonitorATTiny3224, the printed circuit board in 3D

    BatteryMonitorATTiny3224

    ieb/BatterySensor

    A Modbus RTU Battery Current and Voltage sensor board based Attiny3224, MAX485, MAX9918 chips.

    24 parts1
  • 2 layers64.9 × 64.9 mm485modue, the printed circuit board in 3D

    485modue

    latonita/kicad-various-shematics

    Various projects schematics and pcbs

    23 parts1