This repository contains the Python application that I developed for my master thesis at the Carinthia University of Applied Sciences. The application is purely written in Python and interfaces with a custom soft sensor from the ADMiRE research center, but also works with the Muca touchpad. It reads the capacitive sensor values and segregates anomalic regions (aka contact points) into clusters. A time-series visualization of the first three clusters provides a tool to further analyze the behavior of the contact points.
- The Muca touchpad with the Muca breakout board
- An Arduino Uno (or a similar microcontroller board)
- Flashed with the Muca code that uses the
SendRawString
method in the main loop
- Flashed with the Muca code that uses the
- A USB cable
- A computer running the Python application
Clone this repository and set up the development environment by executing the bootstrap.sh
script, it
- sets up a Python virtual environment,
- and installs dependencies.
Activate the virtual environment via
. ./.venv/bin/activate
Connect the hardware via a USB cable and find out the port name to which it is connected.
The AppConfig provides properties to configure the application. Entry point of the application is the main.py file whith the following default configuration. Adjust the settings according to your hardware setup:
config = AppConfig(
serial_port="/dev/ttyACM0",
baudrate=115200,
connection_timeout=0.1,
buffer_size=30,
top_k_buffer_size=100,
nrows=12,
ncols=21,
sensitivity=3.0,
log_data=True,
data_directory="~/tmp/soft-sensor-monitoring-logs/"
)
Run the application with
python3 src/soft-sensor-monitor/main.py
Run the tests with
poetry run pytest