An open source hardware solution for TMS Controls.
Welcome to the TMS-TouchPad-P4R4 repository — an open-source interface developed to enhance and simplify Transcranial Magnetic Stimulation (TMS) sessions in neuroscience research.
🔗 GitHub Repository: Merluin/TMS-TouchPad-P4R4
This tool combines an Arduino-based control system with a Python GUI running on a Raspberry Pi, providing a modular and user-friendly solution for interacting with TMS hardware and EEG/EMG recording systems.
This is a work-in-progress research tool.
The authors assume no responsibility for damage, injury, or misuse of the hardware or software.
Use is strictly limited to individuals trained and competent in the handling of TMS and EEG/EMG systems.
We welcome collaboration with:
Please reach out if you’d like to contribute, provide feedback, or test the system.
The TMS-TouchPad-P4R4 enables precise control over TMS stimulation parameters using a graphical interface and real-time communication with an Arduino-compatible board.
It is compatible with:
Arduino Integration
Low-level control of TMS triggers and BNC output via R4_ppTMS.ino
Python GUI for Raspberry Pi
Intuitive interface to adjust delay times, TTL duration, and trigger sequences
EEG/EMG Compatibility
Outputs clean TTL pulses aligned with stimulation events
Dual Serial Communication
Uses both Serial (USB) and Serial1 (TX/RX) for flexible setup
| File | Description |
|----------------------------------|---------------------------------------------------------------|
| `R4_ppTMS.ino` | Arduino sketch for managing BNC TTL outputs and TMS triggers |
| `ppTMS.py` | Python script for GUI-based control on Raspberry Pi |
| `User Manual for TMS TouchPad P4R4.pdf` | Setup, usage, and safety instructions |
Serial1.available() for TX/RX pin communicationSerial.available() for USB cable inputThis device is intended for research use only. If you plan to adapt or extend this interface, please consider sharing your improvements with the community via pull requests or forks.
This blog — The Coffee Machine — is where ideas percolate. If you found this project useful, consider supporting the time and caffeine behind it.
You’re also warmly invited to fork the repo, contribute, or reach out if you’re working on similar tools. Collaboration brews innovation!
👉 Scroll down and leave a comment below! I’d love to hear from you.