Sounding Canvas Project Report

1. Overview

The project successfully integrates capacitive sensing into an Arduino Duemilanove connected to a Raspberry Pi 4 Model B. The goal was to create a setup where changes in capacitance of a sensor (aluminum foil) can be detected, leveraging the CapacitiveSensor library. This report documents the progress, circuit explanation, software implementation, and the underlying electronics.

The following links have been very useful.

2. Hardware Setup

Components:

Connections:

3. Software Implementation

Library:

The CapacitiveSensor library by Paul Stoffregen was used.

Arduino Sketch:

CapacitiveSensor cs = CapacitiveSensor(sendPin, receivePin);
        

Sensitivity was fine-tuned by adjusting the number of samples (default 30). By bringing a hand close to the aluminum foil, the change in capacitance was detected and printed via the serial monitor.

4. Circuit Explanation

The capacitive sensing circuit relies on measuring the time delay caused by an RC (resistor-capacitor) network. The key components and their roles are:

5. RC Delay Calculation

The delay in the RC circuit depends on the RC time constant, given by: τ = R × C

Charging Curve:

Voltage across the capacitor during charging follows:

V(t) = Vmax × (1 - e^(-t/RC))
        

At V(t) = 2.5V, solving for t:

t = -RC × ln(1 - 2.5/5) ≈ 0.693 × RC
        

6. Multiple Sensors Consideration

Adding sensors increases processing time linearly. Optimization by adjusting sample size and RC values can ensure performance remains acceptable.

7. Testing Results

8. Next Steps

The circuit is functioning as intended for one sensor, with the ability to detect capacitance changes due to touch or proximity. Future work includes:

Technical Report: From Sensors to the Final Sounding Canvas

1. Addition and Testing of Sensors

Initial Setup:

Initially, one capacitive sensor was tested using aluminum foil and a resistor to determine proper sensitivity levels. Success with a single sensor led to the addition of three more sensors, resulting in a total of four.

Configuration:

Testing:

Sensor values were read and calibrated via the Arduino IDE Serial Monitor. Threshold values for activation were determined experimentally to minimize false positives and ensure responsiveness. The system successfully detected individual sensor activation without interference from the others.

2. Fine-Tuning of Resistor Values and Aluminum Foil Dimensions

Resistor Value Optimization:

Experimentation revealed that 1.4 MΩ resistors provided the best balance between sensitivity and stability. Lower values caused under-sensitivity, while higher values introduced excessive noise.

Aluminum Foil Dimensions:

Each sensor was created with an aluminum foil area of approximately 40 square centimeters. This size offered a reliable detection range for finger touches while avoiding unintentional activation.

3. Mounting Sensors on the Canvas

Placement:

Sensors were mounted on the back of the canvas using adhesive to keep them flat and secure. A 3 cm gap was maintained between the canvas and a wooden back panel to accommodate the sensors and other components.

Insulation:

Non-conductive layers were added between the aluminum foil and the canvas to avoid false triggers caused by external electrical interference.

4. Mounting Other Components

Components Mounted:

Loudspeaker Installation:

Speakers were fixed to the wooden back panel using screws and circular recesses to ensure stability and reduce protrusion.

Final Assembly:

All components were secured to the wooden panel, which was then mounted behind the canvas, ensuring easy access for maintenance.

5. Creation of Sounds

Process:

Sounds were recorded using a sustained electric guitar. Each sensor corresponded to a folder containing four distinct sound samples, creating variety.

6. Python Program for Integration

Overview:

The Python program executed on the Raspberry Pi serves as the glue for the system, reading sensor data from the Arduino and triggering corresponding audio samples.

Key Features:

  1. Serial Communication: Reads sensor data from the Arduino over USB.
  2. Threshold-Based Triggers: Activates sounds when sensor values exceed predefined thresholds.
  3. Debouncing: Ensures a minimum of two seconds between successive activations for each sensor.
  4. Randomized Sound Selection: Selects a random sound file from the corresponding folder for variety.
  5. Parallel Playback: Supports simultaneous playback of multiple sounds.

Credits

OpenAI's ChatGPT: Technical assistant for software development, troubleshooting, and documentation.

Special thanks to the OpenAI team for providing tools that empowered this innovative project.

This interactive sound canvas represents the fusion of art and technology, offering a dynamic platform for creative expression. It exemplifies the potential of collaborative efforts between humans and AI in the realization of artistic and technical visions.