This repository contains the resources for a bio-sonification instrument: a system that captures the faint bioelectric signals of a houseplant and converts them into real-time MIDI music. It covers the full signal chain — analog acquisition, an Arduino-based processing stage, and a Raspberry Pi sound engine — from circuit design to a working, headless installation.
- Analog Front-End: Op-amp based acquisition circuit (CA3140) with low-pass filtering for clean bioelectric signal capture.
- Arduino Signal Processing: Real-time sampling, digital smoothing, and threshold-based MIDI note/chord generation.
- Raspberry Pi Sound Engine: Python MIDI bridge feeding a SunVox-based synthesizer for continuous, evolving sound.
- Autostart Setup: Scripts for a fully headless installation that starts on boot.
test_plante.mp4
For a detailed walkthrough of the project, including the analog design, signal processing algorithm, and testing results, check out the full article:
This article includes:
- Signal Characterization: Understanding plant bioelectric activity and the noise challenges around it.
- Circuit Design: The full analog front-end, gain and filter calculations.
- Firmware Walkthrough: How raw sensor readings become MIDI chords and melody.
- Results and Testing: Filter performance, noise rejection, and sensor validation.
-
Arduino:
Arduino/code_arduino_2_capteurs: Main firmware — signal acquisition, filtering, and MIDI generation for two sensor channels.Arduino/detect_manu: Standalone test sketch for validating raw sensor readings before running the full system.
-
Raspberry Pi:
RaspberryPi/bio_bridge.py: Python script that bridges Arduino serial MIDI messages to a virtual MIDI port.RaspberryPi/start_bio_instrument.sh: Startup script that launches SunVox and the MIDI bridge.RaspberryPi/bio_instrument.desktop: Autostart entry for headless boot-time launch.
-
Documentation:
Documentation/hardware_list.txt: Full bill of materials.Documentation/setup_guide.txt: Step-by-step installation and configuration guide, including troubleshooting.Documentation/schematics/: Circuit schematics, Arduino pinout, and component datasheets.
-
Download the Files:
- Clone this repository or download the files directly from the GitHub repository.
-
Build the Acquisition Circuit:
- Follow the schematics in
Documentation/schematics/to assemble the analog front-end on a breadboard.
- Follow the schematics in
-
Flash the Arduino:
- Open
Arduino/code_arduino_2_capteursin the Arduino IDE and upload it to an Arduino Nano (or compatible board).
- Open
-
Set Up the Raspberry Pi:
- Install SunVox and Python dependencies (
pyserial,python-rtmidi), then runRaspberryPi/bio_bridge.py.
- Install SunVox and Python dependencies (
-
Circuit Assembly:
- Wire the CA3140-based acquisition stage as shown in the schematics, one channel per plant sensor.
-
Firmware Upload:
- Flash the Arduino with the provided sketch and verify sensor readings via the Serial Monitor.
-
Software Setup:
- Install SunVox on the Raspberry Pi, configure the virtual MIDI port, and enable autostart using the provided
.desktopand.shfiles.
- Install SunVox on the Raspberry Pi, configure the virtual MIDI port, and enable autostart using the provided
-
Sensor Validation:
- Verify that contact with a plant produces a measurable, variable signal on the Arduino's Serial Monitor.
-
Filter Validation:
- Inject test signals at different frequencies to confirm the low-pass filter rejects mains-frequency noise while preserving the biological signal band.
-
Full System Test:
- Confirm MIDI messages reach SunVox and trigger audible notes in response to plant activity.
- SunVox: Lightweight modular synthesizer used for sound generation — warmplace.ru/soft/sunvox
- python-rtmidi: Python MIDI I/O library (MIT license)
- pyserial: Python serial communication library (BSD-3-Clause license)
- Move from breadboard to a custom PCB.
- Improve sensor design and long-term contact reliability.
- Add more simultaneous plant channels for a larger "plant orchestra."
- Battery-powered, fully portable enclosure.
For questions or support, please open an issue on this GitHub repository or contact [email protected].