

Bachelor's Thesis 2026
- Size
- 53 × 53 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 5
- Nets
- 23
- Pads
- 40
- Tracks, vias
- 62, 8
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 8 Jun 2026
- Updated
- 24 Jul 2026
Overview
KandityöSchematic is an open-source printed circuit board by rafinjahan, from the rafinjahan/Object_Detection_Using_A_Smart_Pressure_Sensing_Textile_Mat repository on GitHub. It is a 2-layer board of 53 × 53 mm with 5 parts on 23 nets, routed with 62 tracks and 8 vias.
It is built around the CD74HC4051E. Its parts include 2 ICs, 2 connectors and 1 resistor. It belongs with the ESP32 boards of this library.
Main components
1README
README.mdObject Detection Using a Smart Pressure-Sensing Textile Mat
This repository contains the Python code and dataset for my bachelor thesis. The project uses a 4x4 woven piezoresistive pressure mat to classify everyday kitchen objects. It uses a Random Forest machine learning model to read the pressure footprint and total weight. I designed a custom printed circuit board using KiCad to upgrade the original breadboard prototype. This custom PCB connects the textile mat directly to the microcontroller and multiplexer for a reliable system. You can see 3D screenshots of the finished board in the images folder.
Hardware Setup
- 4x4 piezoresistive textile mat
- Seeed Studio XIAO ESP32S3 microcontroller
- CD74HC4051E analog multiplexer
Software Dependencies
- Python 3
- pandas
- numpy
- scikit-learn
- matplotlib
- pyserial
Project Structure
code/contains all Python scripts.data/contains CSV datasets and measurement files.hardware/contains the KiCad PCB project and Gerber manufacturing files and the 3D model of the PCB.images/contains generated PNG plots and confusion matrices.thesis/contains thesis-related files.
Project Files
data/tablecloth_dataset_flattened.csvcontains the recorded dataset of physical placements.code/thesis_project.pyreads serial data and saves new placements to the dataset.code/live_classifier.pytrains the model and shows real time predictions on a heatmap.code/confusin_matrix_result.pycalculates grouped cross validation accuracy and generates the confusion matrix.
How It Works
The microcontroller scans the 16 sensor nodes on the fabric. Custom data acquisition software stabilizes the analog signals and filters out background noise. The system sends the pressure data to a computer for real time visualization and recording. The Python script reads this data stream and updates a visual heatmap. The system includes a noise limit of 150 ADC units. When the pressure goes above this limit the Random Forest model predicts which object is on the mat.
Tested Objects
The dataset includes eight different classes.
- Iittala plate empty and full
- Kotikulta Ulappa bowl empty and full
- Arabia Muumi cup empty and full
- 0.33 L Coca-Cola can full
- 1.5 L Sprite bottle full
Future Work
Future improvements could include increasing the spatial resolution of the textile sensor. Another step is deploying the trained classifier directly on the microcontroller using a TinyML framework to improve user privacy.
Instructions
The physical setup requires connecting the textile matrix to the microcontroller and multiplexer.
- Connect the four row pins of the 4x4 piezoresistive textile mat to the digital output pins of the microcontroller.
- Connect the four column pins of the mat to the analog multiplexer inputs.
- Ensure the microcontroller and multiplexer share a common ground and a stable 3.3V power supply.
- Connect the microcontroller to the data collection computer using a USB cable.
Microcontroller Setup (Arduino IDE)
Before running the Python scripts, you must program the microcontroller and verify it is reading the sensors correctly.
- Install the Arduino IDE and add support for the Seeed Studio XIAO ESP32S3 board.
- Open the provided
.inofile in the Arduino IDE and upload it to the microcontroller. - Open the Serial Monitor in the Arduino IDE (set the baud rate to 115200).
- Apply pressure to different parts of the mat. You should see a stream of numbers appearing in the Serial Monitor. If the output changes when you press the mat, the hardware is working correctly.
- Important: Close the Arduino Serial Monitor before running the Python scripts, otherwise Python will not be able to connect to the serial port.
Software Installation (Python)
The software pipeline requires Python 3 and several scientific computing libraries.
- Install Python 3 on the data collection computer.
- Create a virtual environment to manage the project dependencies.
- Install the required libraries using the pip package manager.
pip install pandas numpy scikit-learn matplotlib pyserial
Data Collection and Heatmap Visualization
The data collection script reads raw analog values from the serial port and visualizes the spatial pressure distribution.
- Place the smart textile mat on a flat and rigid surface to ensure consistent pressure readings.
- Run the data collection script from your terminal using
python data_collection.py. - Observe the real time heatmap interface to verify all 16 sensor nodes respond correctly to physical pressure.
- Place a test object on the mat and allow the sensor values to stabilize for a few seconds.
- Press the designated keyboard key to record the current matrix values and the object label into the dataset file named
tablecloth_dataset_flattened.csv.
Model Training and Evaluation
The machine learning model uses the collected CSV dataset to train the Random Forest classifier.
- Verify the dataset file contains sufficient samples for all tested object categories.
- Run the model evaluation script from the terminal using
python model_evaluation.py. - The script will automatically load the CSV dataset and format the spatial arrays into one dimensional features.
- The Random Forest algorithm will train on the data and output the grouped cross validation accuracy results.
- Review the generated confusion matrix image to analyze the classification performance across different objects.
Parts
5| Qty | Value | Footprint | References |
|---|---|---|---|
| 1 | (D0-D3) | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J1 |
| 1 | (Y0-Y3) | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J2 |
| 1 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1 |
| 1 | CD74HC4051E | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U1 |
| 1 | XIAOESP32S3 | Library:MODULE_XIAO_ESP32_S3 | U2 |
Similar boards
- 2 layers165.1 × 110 mm

- 4 layers97.8 × 78.7 mm

- 2 layers

- 2 layers197 × 159 mm

- 4 layers150 × 150 mm

NLTL Lite
Javitax47/NLTL_Lite
Implementación pasiva de cinemática relativista general Agujeros negros · Agujeros blancos · Arrastre de marco · Proceso de Penrose · Lensing gravitacional · Solitones PCB 150 × 150 mm · 857 componentes · 37…
857 parts - 2 layers54.6 × 54.6 mm

- 2 layers89.5 × 61.6 mm

FreeDeck TH 2020-02
FreeYourStream/freedeck-hardware
all the stuff you need to build your own FreeDeck
20 parts772 - 2 layers151.8 × 32.4 mm

Questions
How big is the KandityöSchematic PCB?
It measures 53 × 53 mm and has 2 copper layers, 1.6 mm thick.
What parts does the KandityöSchematic use?
5 parts, built around the CD74HC4051E. 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 KandityöSchematic KiCad files?
From the rafinjahan/Object_Detection_Using_A_Smart_Pressure_Sensing_Textile_Mat repository on GitHub, at the commit this page was made from: the board is hardware/kandityöSchematic.kicad_pcb and its schematic hardware/kandityöSchematic.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the KandityöSchematic design in my own project?
Its repository states no licence, so its author keeps all rights: ask rafinjahan before reusing the design.