Skip to the content
2 layers53 × 56.5 mm.Software Defined Hardware Control Panel.spinrender tmp, the printed circuit board in 3D

.Software Defined Hardware Control Panel.spinrender tmp

SshgurkiratSingh/CONTROL_PANEL_ARDUINO

An integrated, multi-interface hardware control platform that bridges physical inputs, microcontrollers, desktop GUIs, and web services. The project features an Arduino-based firmware with a rotary encoder and I2C OLED display, a KiCad PCB design, a Python Tkinter Desktop GUI featuring a background Flask REST API, and a MATLAB dashboard.

Size
53 × 56.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
38
Nets
49
Pads
151
Tracks, vias
305, 50
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
15 Mar 2025
Updated
19 Jun 2026

Overview

.Software Defined Hardware Control Panel.spinrender tmp is an open-source printed circuit board by SshgurkiratSingh, from the SshgurkiratSingh/CONTROL_PANEL_ARDUINO repository on GitHub. It is a 2-layer board of 53 × 56.5 mm with 38 parts on 49 nets, routed with 305 tracks and 50 vias.

It is built around the ATMEGA8-16AU, CH340K and AP2112K-3.3, with the SS8050 among its other parts. Its parts include 9 capacitors, 9 resistors, 7 diodes, 3 ICs and 3 connectors. It belongs with the lEDs and displays and interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

4

README

README.md

Software-Defined Hardware Control Panel (SDH-CP)

An integrated, multi-interface hardware control platform that bridges physical inputs, microcontrollers, desktop GUIs, and web services. The project features an Arduino-based firmware with a rotary encoder and I2C OLED display, a KiCad PCB design, a Python Tkinter Desktop GUI featuring a background Flask REST API, and a MATLAB dashboard.


Repository Structure

directory
├── Software-Defined Hardware Control Panel/ # KiCad PCB & Schematic Design Files
│   ├── Software-Defined Hardware Control Panel.kicad_sch  # KiCad Schematic
│   ├── Software-Defined Hardware Control Panel.kicad_pcb  # KiCad PCB Layout
│   └── bom/
│       └── ibom.html                                       # Interactive Bill of Materials (iBOM)
├── src/                                     # Arduino C++ Firmware Source
│   ├── main.cpp                             # Main firmware loop and state machine
│   ├── helpers.cpp                          # RAM and hardware utility helpers
│   └── helpers.h                            # Circular Parameter Store class definitions
├── lib/                                     # Custom Hardware Libraries
│   └── ssd1306_128x64_i2c/                  # Optimized SSD1306 OLED display driver
├── include/                                 # PlatformIO headers directory
├── platformio.ini                           # PlatformIO Project Configuration
├── writeCommand.py                          # Python Tkinter GUI & Flask REST API Service
├── arduinoAMC.mlapp                         # MATLAB App Designer control panel/dashboard
├── package.json                             # Node.js dependencies (serialport tools)
└── README.md                                # Project Documentation (This file)

Key Features

Firmware (Arduino Uno + C++)

  • Dynamic Parameter Store: Manages up to 5 runtime parameters (e.g., setpoints, configuration coefficients) with safety bounds (minimum and maximum).
  • Dual Display Modes:
    • MODE_FULL: Shows the parameter name, current value, visual progress bar, and active connected software name.
    • MODE_RAPID: Switches to large-format value-only rendering during quick rotary encoder scrolls, reducing display redraw lag and maximizing responsiveness.
  • Hardware Integration: Uses interrupt/tick-based rotary encoder tracking and switch inputs.
  • Real-Time Remote Control: Provides a clean CSV-style serial communication protocol running at 9600 baud.

Python GUI & REST API Daemon (writeCommand.py)

  • Desktop Console: Multi-tab GUI for adding, reading, and updating parameters in real time. Contains a live serial traffic log and manual serial command terminal.
  • On-Demand Pin Reader: Direct interface to read analog (A0-A5) and digital (D2-D13) pins on the fly.
  • REST API Backend: Exposes a background Flask HTTP server on port 5000 to allow web apps or script automation to read and modify hardware states over simple network requests.

Hardware Design (KiCad)

  • Complete schematic and PCB design files for a dedicated control panel shield/device.
  • Interactive BOM (iBOM) included (ibom.html) for easy assembly and soldering.
Hardware Gallery
PCB 3D RenderPCB Routing
PCB 3D RenderPCB Routing
Schematic Diagram
Schematic

MATLAB Integration (arduinoAMC.mlapp)

  • Companion app for control, automation, and visualization of parameter values directly in MATLAB.

Serial Communication Protocol

The Arduino firmware communicates with host computers via 9600 baud serial connection. Messages use a command-response format:

Host Commands (Commands sent to Arduino)

Command FormatDescriptionExample
add:param,<name>,<min>,<max>,<cur>Register/Overwrite a parameter in the storeadd:param,Gain,0,100,50
get:paramCurval,<name>Query the current value of a parameterget:paramCurval,Gain
update:paramsCurval,<name>,<val>Force-update a parameter valueupdate:paramsCurval,Gain,65
get:AlladdedParamsList all parameters in the storeget:AlladdedParams
set:software,<name>Display active host software on the OLEDset:software,MATLAB_App
read:digital,<pin>Set digital <pin> to input and read stateread:digital,7
read:analog,<index>Read analog pin value (A0 + <index>)read:analog,0

Arduino Responses & Broadcasts

Response PrefixMeaningFormat / Response Example
A,<name>Parameter successfully addedA,Gain
U,<name>,<val>Parameter updated (via encoder or serial command)U,Gain,65
S,<index>,<name>,<val>Active parameter selection cycled (via button press)S,0,Gain,65
G,<name>,<val>Parameter query resultG,Gain,65
L,<idx>,<name>,<min>,<max>,<val>Parameter listing detailL,0,Gain,0,100,65
D,<pin>,<val>Digital pin read resultD,7,1
A,<index>,<val>Analog pin read resultA,0,512
ERR,<message>Command processing errorERR,Unknown command

REST API Documentation

When running writeCommand.py, a Flask API server starts automatically at http://localhost:5000.

Endpoints

1. Get All Parameters
  • URL: /parameters
  • Method: GET
  • Response Example:
    json
    {
      "Gain": {
        "index": "0",
        "min": "0",
        "max": "100",
        "current": 65
      }
    }
2. Get Single Parameter
  • URL: /parameter/<name>
  • Method: GET
  • Response Example:
    json
    {
      "Gain": {
        "index": "0",
        "min": "0",
        "max": "100",
        "current": 65
      }
    }
3. Add Parameter
  • URL: /parameters
  • Method: POST
  • Headers: Content-Type: application/json
  • Payload:
    json
    {
      "name": "Frequency",
      "min": 10,
      "max": 1000,
      "current": 100
    }
  • Response: {"status": "Command sent", "command": "..."}
4. Update Parameter Value
  • URL: /parameter/<name>
  • Method: PUT
  • Headers: Content-Type: application/json
  • Payload:
    json
    {
      "new_value": 75
    }
  • Response: {"status": "Command sent", "command": "..."}
5. Send Raw Serial Command
  • URL: /command
  • Method: POST
  • Payload: {"command": "read:analog,0"}
  • Response: {"status": "Command sent", "command": "..."}
6. Set Active Software Name
  • URL: /software
  • Method: POST
  • Payload: {"software_name": "API_Client"}
7. Retrieve Live GUI Console Log
  • URL: /log
  • Method: GET
  • Response: {"log": "..."}

Setup and Installation

1. Hardware Assembly

  • Open the KiCad project files inside Software-Defined Hardware Control Panel/ in KiCad.
  • Reference the interactive BOM under bom/ibom.html for component lists and layout locations.
  • Connect an I2C SSD1306 OLED screen to pins SDA (A4) and SCL (A5) of your Arduino.
  • Connect a Rotary Encoder:
    • CLK to Pin 3 (Interrupt enabled)
    • DT to Pin 4
    • Push Button to Pin 2 (Interrupt/cycle pin)

2. Firmware Installation (VS Code + PlatformIO)

  1. Open the project folder in VS Code with the PlatformIO IDE extension installed.
  2. PlatformIO will fetch dependencies (mathertel/RotaryEncoder, bblanchon/ArduinoJson) automatically.
  3. Build and upload:
    bash
    pio run --target upload

3. Desktop GUI & REST API Setup

Install python dependencies:

bash
pip install pyserial flask

Identify your Arduino serial port (e.g. /dev/ttyUSB0 on Linux or COM3 on Windows). Update the default port at the bottom of writeCommand.py or launch the script:

bash
python writeCommand.py

4. MATLAB Integration

  • Launch MATLAB.
  • Double-click and open arduinoAMC.mlapp in the App Designer to run the companion dashboard.

[!NOTE] Ensure that no other program (such as VS Code Serial Monitor or MATLAB) is occupying the serial port when executing writeCommand.py, as only one application can hold the serial connection handle at a time.

Parts

38
QtyValueFootprintReferences
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_PadH1, H2, H3, H4
3.1uFCapacitor_SMD:C_0805_2012MetricC6, C7, C8
3D_TVSDiode_SMD:D_SOD-523D3, D4, D5
3LEDLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD2, D6, D7
210uFCapacitor_SMD:C_0805_2012MetricC4, C5
222pFCapacitor_SMD:C_0805_2012MetricC9, C10
2330RResistor_SMD:R_0805_2012MetricR4, R5
25.1kResistor_SMD:R_0805_2012MetricR1, R2
2RResistor_SMD:R_0805_2012MetricR6, R7
2SS8050Package_TO_SOT_SMD:SOT-23Q1, Q2
1100kResistor_SMD:R_0805_2012MetricR8
110kResistor_SMD:R_0805_2012MetricR9
110uF/25VCapacitor_SMD:C_0805_2012MetricC1
1220RResistor_SMD:R_0805_2012MetricR3
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U2
1ATmega8-16APackage_QFP:TQFP-32_7x7mm_P0.8mmU3
1CCapacitor_SMD:C_0805_2012MetricC3
1CH340KPackage_SO:SSOP-10-1EP_3.9x4.9mm_P1mm_EP2.1x3.3mmU1
1Conn_01x02_PinConnector_JST:JST_EH_B2B-EH-A_1x02_P2.50mm_VerticalJ3
1Conn_02x07_Odd_EvenConnector_JST:JST_GH_BM14B-GHS-TBT_1x14-1MP_P1.25mm_VerticalJ2
1CrystalCrystal:Crystal_SMD_HC49-SDY1
1D_SchottkyDiode_SMD:D_SOD-123D1
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_XKB_U262-16XN-4BVC11J1

Similar boards

  • 2 layers37.9 × 14.8 mmConvertor, the printed circuit board in 3D

    Convertor

    Chockalingam-M/PCB-Designing

    🚀 Designed and developed this PCB as a demonstration of my skills in hardware design and precision layout. From component placement to trace optimization, every part of this board reflects my commitment to clean…

    27 parts
  • 4 layers149.5 × 113 mm1. PDU, the printed circuit board in 3D

    1. PDU

    SshgurkiratSingh/CCMS_PORTAL

    A full-stack smart streetlight fleet management system with real-time monitoring, remote control, and analytics.

    111 parts2
  • 2 layers54.5 × 74.8 mmKv4p ht MagSafe, the printed circuit board in 3D

    Kv4p ht MagSafe

    bi4wms/kv4p-ht-MagSafe

    MagSafe version for kv4p-ht

    72 parts3
  • 2 layers49 × 40 mmESP32, the printed circuit board in 3D

    ESP32

    Cloud-Lightning/ESP32_Distribution_board

    text BUS+ / GND |-- 7 x XT30 原始总线电源分配 | -- TPS5450DDA --> +5V --> AMS1117-3.3 --> +3.3V | | | -- ESP32、CH340K、逻辑电路 -- 5V 外设接口

    61 parts
  • 2 layers108.8 × 157 mm1. Mainboard, the printed circuit board in 3D

    1. Mainboard

    DangKhoa2210/Digital-Microfluidics

    This repository contains the design files, firmware, and documentation for a Digital Microfluidic (DMF) platform, developed for research in droplet manipulation and potential applications such as on-chip PCR…

    237 partsAGPL-3.0
  • 4 layers102.7 × 77.6 mmEspcam, the printed circuit board in 3D

    Espcam

    mazyacin/espcam-breakout-board

    high end espcam breackout board for IOT and monetering

    64 partsMIT
  • 4 layers72.6 × 35.8 mmEsp32 cam, the printed circuit board in 3D

    Esp32 cam

    akashh218/ESP32-CAM-Devlopment-board

    Custom 4-layer ESP32-S3 camera development board designed in KiCad, featuring camera and microSD interfaces, dual USB-C connectivity, UART programming, GPIO expansion, power management, and RF-aware PCB layout.

    54 parts
  • 2 layers102.9 × 103.7 mmDrone ESP32, the printed circuit board in 3D

    Drone ESP32

    Asaf66/Drone_ESP32

    Rev 2 fixes the issues found while assembling the first board:

    80 parts

Questions

How big is the .Software Defined Hardware Control Panel.spinrender tmp PCB?

It measures 53 × 56.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the .Software Defined Hardware Control Panel.spinrender tmp use?

38 parts, built around the ATMEGA8-16AU, CH340K, AP2112K-3.3 and SS8050. 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 .Software Defined Hardware Control Panel.spinrender tmp KiCad files?

From the SshgurkiratSingh/CONTROL_PANEL_ARDUINO repository on GitHub, at the commit this page was made from: the board is Software-Defined Hardware Control Panel/.Software-Defined Hardware Control Panel.spinrender-tmp.kicad_pcb and its schematic Software-Defined Hardware Control Panel/Software-Defined Hardware Control Panel.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the .Software Defined Hardware Control Panel.spinrender tmp design in my own project?

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