Skip to the content
PCBKitNew board
2 layers18.3 × 43.5 mmCuicuit, the printed circuit board in 3D

2024/12/27に桃山大学テック部主催で開催されたハッカソンに出した作品Griconのコントローラー側のプログラム

Size
18.3 × 43.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
13
Nets
34
Pads
56
Tracks, vias
66, 0
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
28 Dec 2024
Updated
30 Jan 2026

Overview

Cuicuit is an open-source printed circuit board by naka6ryo, from the naka6ryo/Gricon_Controller-s_Code repository on GitHub, published under the MIT licence. It is a 2-layer board of 18.3 × 43.5 mm with 13 parts on 34 nets, routed with 66 tracks and 0 vias.

It is built around the 2SC1815. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

Gricon_Controller-s_Code

2024/12/27に桃山大学テック部主催で開催されたハッカソンに出展した作品 Gricon のコントローラー側プログラムです(2024/12/28 時点)。

このArduinoプログラムは、IMU(姿勢センサ)、曲げセンサ、モーターを統合し、姿勢推定・屈曲検出・振動出力を通じて新しい入力体験を提供します。

公式サイト:https://gricon.netlify.app/

🎥 デモ動画

Gricon デモ動画


🔗 関連リンク


📌 特徴 / Features

  • 9軸IMUセンサ(LSM9DS1) によるピッチ・ロール・ヨーの推定
  • Madgwickフィルタ による高精度な姿勢推定
  • 曲げセンサ を使ったアナログ入力処理と平滑化
  • 加速度のグローバル変換・振動検出 によるリアクティブ入力対応
  • 振動モーター出力 を通じたハプティクスフィードバック
  • シリアル通信 による外部機器(ゲーム)との双方向連携

🔧 使用ハードウェア

  • Arduino Nano 33 BLE Sense または LSM9DS1 搭載の互換ボード
  • 曲げセンサ(アナログ入力:A7)
  • 振動モーター(デジタル出力:D9)
  • 外部通信:Serial1(9600bps)

📷 回路図

以下は、本デバイスの回路図です(Arduino Nano 33 BLE + 曲げセンサ + モータ + Bluetooth構成):

Gricon回路図


📤 センサ出力フォーマット

コントローラは以下のフォーマットでバイナリ形式のデータを送信します。

[S][pitch (2 bytes)][roll (2 bytes)][yaw (2 bytes)][bend (1 byte)]

  • S: データ開始を示すヘッダ(1バイト)
  • pitch, roll, yaw: 姿勢角(各2バイト、0.1°単位)
  • bend: 曲げセンサ値(0〜20の範囲にクランプ)

🔁 モーター制御プロトコル(Serial1 受信)

シリアル経由で以下の1文字コマンドを送ることで、モーターの振動出力パターンを変更可能:

コマンド周波数 (Hz相当)デューティ比内容
'1'約25Hz40%弱い振動
'2'約50Hz20%中程度の振動
'3'約100Hz12.5%強い振動
'4'約125Hz90%連続振動
その他-0%モーター停止

🧭 キャリブレーション

プログラム開始時に自動実行され、地磁気・ジャイロのオフセットや曲げセンサの初期値を取得・補正します。


🔄 処理周期とスムージング

  • 処理周期:1msごとのループ実行(約100Hz)
  • 各種センサ値に対してフィルタ係数を用いた平滑化処理あり
  • 姿勢角の推定には Madgwick フィルタを使用

🚀 セットアップコード例

cpp
void setup() {
  Serial.begin(9600);       // デバッグ用
  Serial1.begin(9600);      // 外部機器との通信
  pinMode(motorPin, OUTPUT);
  initializeIMU();
  delay(100);
}

📚 使用ライブラリ

ライブラリ名説明インストール方法
Arduino_LSM9DS1IMU(加速度・ジャイロ・地磁気)センサ用Arduino IDE → ライブラリマネージャから検索して導入
MadgwickAHRS姿勢推定アルゴリズムArduino IDE → ライブラリマネージャから検索して導入

📝 ライセンス

このプロジェクトは MIT License のもとで公開されています。

Gricon Controller Code

This repository contains the controller-side program for Gricon, a project exhibited at a hackathon hosted by the Momoyama University Tech Club on December 27, 2024 (status as of December 28, 2024).

This Arduino program integrates an IMU (inertial measurement unit), a flex sensor, and a vibration motor to provide a new input experience through orientation estimation, bend detection, and haptic feedback.

Official site: https://gricon.netlify.app/


🎥 Demo Video

Gricon Demo Video


🔗 Related Links


📌 Features

  • 9-axis IMU (LSM9DS1) for estimating pitch / roll / yaw
  • High-accuracy orientation estimation using the Madgwick filter
  • Analog flex sensor processing with smoothing
  • Global-frame acceleration conversion & vibration detection for reactive input
  • Haptic feedback via vibration motor output
  • Bidirectional communication with external devices (e.g., a game) via serial

🔧 Hardware Used

  • Arduino Nano 33 BLE Sense or a compatible board with LSM9DS1
  • Flex sensor (analog input: A7)
  • Vibration motor (digital output: D9)
  • External communication: Serial1 (9600 bps)

📷 Circuit Diagram

Below is the circuit diagram for this device (Arduino Nano 33 BLE + flex sensor + motor + Bluetooth configuration):

Gricon Circuit Diagram


📤 Sensor Output Format

The controller sends data in the following binary format:

[S][pitch (2 bytes)][roll (2 bytes)][yaw (2 bytes)][bend (1 byte)]

  • S: 1-byte header indicating the start of a packet
  • pitch, roll, yaw: Euler angles (2 bytes each, in 0.1° units)
  • bend: flex sensor value (clamped to 0–20)

🔁 Motor Control Protocol (Serial1 Receive)

You can change the vibration output pattern by sending a single-character command over serial:

CommandFrequency (approx.)Duty CycleDescription
'1'~25 Hz40%Weak vibration
'2'~50 Hz20%Medium vibration
'3'~100 Hz12.5%Strong vibration
'4'~125 Hz90%Continuous vibration
Other–0%Motor off

🧭 Calibration

Calibration runs automatically at startup to obtain and compensate:

  • Magnetometer / gyroscope offsets
  • Initial baseline for the flex sensor

🔄 Loop Rate & Smoothing

  • Loop cycle: executed every 1 ms (≈ 100 Hz)
  • Sensor values are smoothed using filter coefficients
  • Orientation estimation uses the Madgwick filter

🚀 Setup Code Example

cpp
void setup() {
  Serial.begin(9600);       // For debugging
  Serial1.begin(9600);      // Communication with external device
  pinMode(motorPin, OUTPUT);
  initializeIMU();
  delay(100);
}

📚 Libraries Used Library Description Installation Method Arduino_LSM9DS1 IMU (accel / gyro / magnetometer) library Arduino IDE → Library Manager → search & install MadgwickAHRS AHRS orientation estimation algorithm Arduino IDE → Library Manager → search & install 📝 License

This project is released under the MIT License: https://opensource.org/licenses/MIT

Parts

13
QtyValueFootprintReferences
2Conn_01x02_FemaleConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalBend, PW
2MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2
2RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R2
11N4007Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal1N4007
12SC1815Package_TO_SOT_THT:TO-92_Inline_Wide2SC1815
1Arduino_Nano_EveryModule:Arduino_NanoArduino_nano_33_ble1
1Conn_01x03_FemaleConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalDCDC
1Conn_01x06_FemaleConnector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalBLE
1LOGOSign:SignG***
1Motor_DCConnector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_VerticalMotor

Questions

How big is the Cuicuit PCB?

It measures 18.3 × 43.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Cuicuit use?

13 parts, built around the 2SC1815. 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 Cuicuit KiCad files?

From the naka6ryo/Gricon_Controller-s_Code repository on GitHub, at the commit this page was made from: the board is Cuicuit/Cuicuit.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Cuicuit 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).

Similar boards

  • 2 layers357.8 × 124.5 mmVic2020mainboard, the printed circuit board in 3D

    Vic2020mainboard

    danwerner21/vic2020

    A Vic-20 clone created with [almost] all readily available parts

    142 parts78
  • 2 layers110 × 48 mmJack pedal, the printed circuit board in 3D

    Jack pedal

    GuitarML/GuitarPedalPCBs

    Collection of KiCad circuit board designs for guitar pedals you can build yourself.

    86 parts62MIT
  • 2 layers310 × 229.8 mmNeoGeoAES-3.5, the printed circuit board in 3D

    NeoGeoAES-3.5

    Board-Folk/NeoGeoAES-3.5

    NeoGeo AES 3.5 Schematics and PCB

    320 parts47
  • 2 layers123.2 × 77.5 mmFMSoundGenerator, the printed circuit board in 3D

    FMSoundGenerator

    captainys/FM

    Code for Fujitsu FM-7 and FM TOWNS series computers

    58 parts27
  • 2 layers172.1 × 143.5 mmAcCCS, the printed circuit board in 3D

    AcCCS

    IdahoLabResearch/AcCCS

    A collection of tools and scripts used to communicate and emulate Electric Vehicle Communication Controllers (EVCC) and Supply Equipment Communication Controllers (SECC).

    111 parts19MIT
  • 2 layers170.5 × 128.5 mmToolbox v2.1, the printed circuit board in 3D

    Toolbox v2.1

    StudioKAT/Toolbox

    主な機能: - オーディオ/CVミキサー(加算・減算) - CVへのオフセット追加(5V/10V)・極性反転 - 1:3 バッファード・マルチプル - 2:2 ユニティミキサー - 3:1 アベレージミキサー(各チャンネルのゲイン = 1/3) - SIGNセクション:インバーター / 半波整流 / 全波整流 - LOGICセクション:アナログOR / アナログAND - S&Hセクション:サンプル&ホールド / ホワイトノイズ出力…

    340 parts15
  • 2 layers60.8 × 99.9 mmReSeed, the printed circuit board in 3D

    ReSeed

    SukkoPera/ReSeed

    Sounds from C64 now for Plus/4!

    59 parts15
  • 2 layers100 × 88.9 mmGen2, the printed circuit board in 3D

    Gen2

    Alignof/Juggernaut

    疑似時限爆弾解除競技

    41 parts10MIT