Building the Backbone: System Architecture of the Rehab Theremin Device

March 12, 2024

A robust architecture is the backbone of any innovative device. For our Theremin Physiotherapy Device, we divided functionality between two Arduino-powered modules—one remote, one main—ensuring reliable data capture, processing, and feedback. This modular approach fosters flexibility, ease of maintenance, and consistent performance across environments.

Module Overview

The remote module houses an ultrasonic sensor to measure one hand’s distance, converting readings into an 8 bit value for wireless transmission. The main module integrates a second ultrasonic sensor, decodes incoming data, and orchestrates audio/visual feedback. This separation of concerns streamlines development and debugging.

Electronics Integration

Both modules leverage 5 V logic and shared peripherals: PAM8302 amplifiers for RF bursts and speaker output, MCP6281 op-amps, and MCP6546 comparators for signal conditioning. Thoughtful PCB and breadboard layouts, paired with 3D-printed enclosures, ensure compactness and electromagnetic compatibility.

Programming Strategy

Timers and interrupts are the heart of our firmware. Timer0 handles RF burst PWM, Timer1 generates sine waves for audio, and Timer2 manages ultrasonic timing. A second Arduino in the main module offloads servo control, preserving precise timing for each function. Collaborative splits of code and parallel testing accelerated delivery.

Consistency and Modularity

By adhering to clear communication protocols (fixed 255 ms frames, envelope-detected PWM bursts), we achieved near-real-time data transfer with minimal interference. Modular code libraries for sine-wave lookup, sensor measurement, and RF decoding promote reuse and simplify future upgrades.

Conclusion

Chapter 2 demonstrates how thoughtful architecture—combining clear module delineation, reliable electronics, and disciplined firmware design—yields a device that’s both powerful and adaptable. This foundation sets the stage for seamless iteration and real-world application.