Skip to the content
PCBKitNew board
2 layers26 × 18 mmTS USB, the printed circuit board in 3D
Size
26 × 18 mm
Copper layers
2
Thickness
1.6 mm
Parts
19
Nets
28
Pads
86
Tracks, vias
163, 20
Pours
2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
16 Jun 2024
Updated
14 Nov 2025

Overview

TS USB is an open-source printed circuit board by seiken-dev, from the seiken-dev/TinyStick repository on GitHub, published under the BSD-3-Clause licence. It is a 2-layer board of 26 × 18 mm with 19 parts on 28 nets, routed with 163 tracks and 20 vias.

It is built around the CH340E, ME6217C33M5G and 1N5819WS, with the CD4053BE and NSR0320MW2T1G among its other parts. Its parts include 5 resistors, 4 capacitors, 4 diodes, 2 connectors and 1 IC.

Main components

5

README

README.md

TinyStick

TinyStick

TinyStickは、ATtiny3217(32KB Flash, 2KB SRAM, 256B EEPROM)を搭載した、Arduino互換の開発キットです。消費電流は約4.5mA(クロック10MHz。スリープ時は0.1mA未満)と小さく、コイン電池で長期間動作します。プログラムの書き込みは、付属のUSBシリアル変換基板(CH340E搭載)で行います。詳しくは、 tinystick.jpをご覧ください。

コンテンツ

  • Arduino
    PlatformIOでビルドできるデモのソースコードです。
  • KiCad
    KiCad(7.0)のプロジェクトです。TinyStick本体のTS_Core.kicad_proと、USBシリアル変換基板のTS_USB.kicad_proが含まれます。
  • schematic
    TinyStick本体とUSBシリアル変換基板の回路図PDFです。
  • Blender
    3Dプリントケース作成用のBlenderのプロジェクトファイルと、発注に使用したSTLファイルです。

プログラミング

TinyStickのプログラミングは、PlatformIOで行います。Arduino IDEは、2.3版ではTinyAVR用のボードマネージャーの定義が読み込めない等の理由で推奨しません。(→参考)

ビルド

  • PlatformIOのプロジェクトフォルダにArduino以下をコピーし、適当な名前(例:TinyStickDemo)に変更します。
  • PlatformIOのHome画面から[Open Project...]で、このプロジェクトを開きます。
  • 必要なplatform(Atmel megaAVR)のインストールが自動的に始まります。
  • インストールが完了したらBuildしてください。

UPDI書き込み

  • USBシリアル変換基板をUSBケーブルで接続して、スイッチをオンします(赤いLEDが光ります)。このとき、ドライバを自動認識しない場合は、メーカーのHPからCH340のドライバをダウンロードしてインストールしてください。
  • Windowsの場合は、デバイスマネージャの「ポート(COMとLPT)」に「USB-SERIAL CH340 (COMxx)」と表示されれば完了です。
  • PlatformIOのUploadをクリックすると、プログラムを転送します。

シリアルデバッグ

  • 横のボタン(Button5)を押して「Bounce Ball」デモに切り替えたあと、PlatformIOのSerial MonitorまたはTera Term等のターミナルアプリを起動すると、加速度の数値が流れてきます。
  • このUSBシリアル変換基板は、ターミナルアプリを起動するとRTS信号がLOWになることを利用して、UPDI書き込みとシリアル通信モードを自動的に切り替えます。(Windowsで確認 →参考)

platformio.ini

プロジェクトのルートにある設定ファイルです。重要な項目について説明します。

board_build.f_cpu = 10000000
CPUクロックを設定します。初期値は10MHz、最大は20MHzです。必ず5の倍数にしてください。そうしないとシリアル通信が文字化けします。また5MHzにすると、I2Cが正常に動作しません。記述しないと16MHzになります。

ソースコード

  • main.cpp
    メインプログラムで、初期化、タイトル表示、サイドボタン(Button5)によるデモの切り替え、長押しによるバックライトのオンオフを処理します。

  • TinyStickDef.h
    共通の#define、ピン定義です。

  • TinyStick.h .cpp
    ボタン、圧電ブザーのクラス、スリープ関連のグローバル関数です。

  • TinyLCD.h .cpp
    バックライト付きLCD AQM1248Aに、ビットマップまたは文字を表示するクラスです。文字は、拡大・ボールド・白黒反転・縦・プロポーショナル表示に対応しています。

  • font8x8.h
    8x8ドットフォントです。0x20から0x7Fまでの英数記号です。

  • TinyApp.h .cpp
    複数のアプリを切り替えるときは、このクラスの派生クラスを作成してmain.cppに定義するだけで、サイドボタン(Button5)で切り替えられます。

  • I2Cbase.h .cpp
    本体内蔵の加速度センサ(LIS2DH12)と、M5StickC用のENV Hat(SHT30)の基底クラスです。

  • octave.h
    ドレミの周波数を定義したファイルです。

  • playDigit.h .cpp
    2桁の整数値をドレミの音程で鳴らす関数です。

  • app/
    6つのデモアプリです。TinyAppの派生クラスです。

    • EnvHat.h .cpp
      ENV Hatで温度/湿度を表示します。Button1で次のアプリに切り替えます。装着されていないときはスキップします。

    • KitchenTimer.h .cpp
      キッチンタイマーです。最大99分。スタートすると、分をEEPROMに保存します。

    • AccelDemo.h .cpp
      加速度センサのデモです。傾けると玉が転がります。

    • FontTest.h .cpp
      8x8ドットフォントをダンプします。Button1で拡大、Button2,3でスクロールします。

    • Tetris.h .cpp
      お馴染みのゲームで、縦向きで遊びます。

    • Maze3D.h .cpp
      Line関数を利用した3次元迷路です。

スリープ機能

一定時間のスリープが出来ます。いずれかのボタンを押すと、スリープから復帰します。

  • 時間は任意の時間ではなく、TinyStick.hのenum SleepTimeの時間しか設定できません。
  • 本来PX2,PX6ピンに接続されたボタン(TinyStickではButton1のみ)でしかスリープからの復帰はできませんが、これはFALLINGモードの場合で、LOWモードならどのボタンでも復帰が可能です。このため、LOWモードでスリープし、起きたらFALLINGモードに変更して、連続して割り込みが入らないようにしています。

Parts

19
QtyValueFootprintReferences
20.1uCapacitor_SMD:C_0402_1005MetricC3, C4
210uCapacitor_SMD:C_0603_1608MetricC1, C2
2470Resistor_SMD:R_0603_1608MetricR4, R5
25.1KResistor_SMD:R_0402_1005MetricR1, R2
2LEDJSB01_Lib:LED0603-RD_GREEND2, D3
11N5819WSJSB01_Lib:SOD-323_L1.8-W1.3-LS2.5-RDD4
12.7KResistor_SMD:R_0603_1608MetricR3
1CD4053BJSB01_Lib:SOIC-16_L9.9-W3.9-P1.27-LS6.0CD4053B
1CH340EJSB01_Lib:MSOP-10_L3.0-W3.0-P0.50-LS5.0CH340E
1Conn_01x06_PinJSB01_Lib:PinHeader_1x06_P2.54mmJ2
1ME6217C33JSB01_Lib:SOT-23-5_L3.0-W1.7-P0.95-LS2.8U3
1NSR0320MW2T1GJSB01_Lib:SOD-323_L1.8-W1.3-LS2.5-RDD1
1SlideJSB01_Lib:SW-SMD_SSSS211603SW1
1USB_C_Receptacle_USB2.0JSB01_Lib:USB-C-SMD_TYPE-C-16P-1J1

Questions

How big is the TS USB PCB?

It measures 26 × 18 mm and has 2 copper layers, 1.6 mm thick.

What parts does the TS USB use?

19 parts, built around the CH340E, ME6217C33M5G, 1N5819WS and CD4053BE. 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 TS USB KiCad files?

From the seiken-dev/TinyStick repository on GitHub, at the commit this page was made from: the board is KiCad/TS_USB.kicad_pcb and its schematic KiCad/TS_Core.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the TS USB design in my own project?

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

More from seiken-dev/TinyStick

1
  • 2 layers58.4 × 22.6 mmTS Core, the printed circuit board in 3D

    TS Core

    seiken-dev/TinyStick

    59 partsBSD-3-Clause

Similar boards

  • 2 layers68.6 × 53.3 mmINK-128DA28, the printed circuit board in 3D

    INK-128DA28

    TheEccentricGenius/INK4u_Board

    An UNO form factor board with a AVR128DA28 processor.

    59 parts5CERN-OHL-W-2.0
  • 2 layers33.2 × 40 mmDesk Display, the printed circuit board in 3D

    Desk Display

    ANSHUMANDOCX/Desk-Display

    It is a desk display made using an E ink display.

    63 parts
  • 4 layers43.2 × 17.8 mmGeekble Nano ESP32S3, the printed circuit board in 3D

    Geekble Nano ESP32S3

    SooDragon/Geekble-nano-ESP32S3

    Geekble nano ESP32S3

    94 parts6CC0-1.0
  • 4 layers111 × 110 mmComplex vco ranged, the printed circuit board in 3D

    Complex vco ranged

    lennartquerter/euro-rack-synth

    Lenimal Github for DIY for a Eurorack Synth

    234 parts13
  • 4 layers70 × 35 mmMIRA, the printed circuit board in 3D

    MIRA

    piecol/MIRA

    172 parts2CERN-OHL-S-2.0
  • 2 layers100 × 60 mmMother Ctrl, the printed circuit board in 3D

    Mother Ctrl

    Tomoshibi-technology/RCJ-Japan2024-Circuit

    RoboCup JapanOpen 2024とEindohoven 2024に向けての回路開発

    253 parts1MIT
  • 4 layers50.8 × 22.9 mmQuill stm32wl, the printed circuit board in 3D

    Quill stm32wl

    4f48/quill-stm32wl

    An Adafruit Feather-sized STM32 development board with integrated 868 MHz LoRa radio.

    34 parts