TECAR — Therapy Control Software
Raspberry Pi-Based Capacitive & Resistive Physical Therapy Control System
Project Overview
TECAR (Transfer of Electricity Capacitive and Resistive) therapy is a radiofrequency-based physical therapy modality used in clinical rehabilitation, sports medicine, and pain management.
This project represents a dedicated touchscreen control application built on Raspberry Pi OS. It provides clinical physiotherapists with a structured touch interface to configure therapy modes (Capacitive vs. Resistive), select pulse or continuous RF delivery, monitor real-time sensor feedback from analog-to-digital converters, and enforce safety boundaries to protect patient tissue.
The Engineering Problem
Physical therapy equipment requires strict operational reliability:
- Clinicians need an intuitive, glove-friendly touch interface that avoids complex submenus during therapy sessions.
- Live energy output and temperature feedback must be continuously sampled without locking up the graphical user interface.
- Emergency stop cutoffs and footswitch triggers must be monitored with fail-safe logic to instantly cut RF output.
- The device must boot directly into the clinical interface upon power-on, operating as an appliance rather than an exposed desktop computer.
The Solution Built
Engineered a standalone PyQt6 touchscreen application configured as a Linux systemd kiosk service. The system incorporates custom high-contrast medical QSS stylesheets, non-blocking telemetry acquisition threads over I2C, dual-threshold thermal monitoring, and SQLite session persistence.
System Architecture
↓
Mode & Parameter Engine (Capacitive / Resistive Selection • 0–100% Intensity)
↓
Telemetry Acquisition Layer (I2C Bus • ADS1115 ADC • MLX90614 Thermal)
↓
Safety Supervisor & Interlock Logic (Hardware Footswitch & Emergency Stop Cutoff)
↓
Session Audit & Data Logging (SQLite Database • Joules & Duration Logs)
Key Capabilities
- Dual-Mode Therapy: Distinct capacitive (superficial tissue) and resistive (deep muscle/joint) workflow presets.
- Continuous vs. Pulsed Emission: Configurable pulse frequencies to control clinical thermal accumulation.
- Non-Blocking I2C Sensor Acquisition: Dedicated background worker threads poll ADS1115 ADC channels without UI lag.
- Thermal Safety Supervision: Continuous skin surface temperature monitoring with audible warnings and automatic RF attenuation.
- Footswitch & Cutoff GPIO: Interrupt monitoring that disengages output relays when the operator steps off the pedal.
- Session History Auditing: Records treatment duration, energy dosage, and timestamp to a local SQLite database.
Key Technical Challenges
QThread emitting Qt Signals back to the UI.