Project tutorial

Automatizing Percussion with Solenoids: "The Sound Compass" © CC BY-NC-SA

A very simple circuit to activate four timed solenoids for automated percussion: in this case hitting resonant plastic pipes.

  • 3,787 views
  • 4 comments
  • 13 respects

Components and supplies

Apps and online services

About this project

Here is a basic project used for a sound installation called "The Sound Compass". It can be adapted to any project where you need to time four solenoids. In this special case, a MIDI file was used as a score and translated into an Arduino sketch.

The schematics hereunder, made with Fritzing, shows how the components are connected. I used 24V solenoids mostly because that’s what was available at the store. In this version you need to power the Arduino separately, but a smarter solution can be found.

This scheme is basically derived from this instructable.

You can easily use solenoids with a lower voltage. In that case you can choose an adequate power supply.

The code was generated (and then modified) by programming a custom software that would create MIDI files with one MIDI note each time a recording went above a certain volume threshold. Then the duration of these notes was adjusted to few ms by using a MIDI editor. The resulting MIDI file was sent through this MIDI-to-arduno processor, after having named the MIDI tracks as needed.

It doesn’t make sense to share the whole code (more than 11.000 lines), so you find the first 100 lines in the code section hereunder.

This very basic project lets you control four solenoids; in my case it was produce for a sound art installation called "The Sound Compass":

The listener sits at the middle of four pipes, which are hit by motors producing percussive patterns. Four recordings were taken with a microphone pointing at each one of the cardinal points, at different times of the day; the pipes’ length is tuned to the corresponding “keynote” of the soundscape. The rhythm is also derived from an analysis of the sound attacks in the recordings.

Made at the I-Park residency for the Site-Responsive Art Biennale, I-Park Foundation, East Haddam CT (USA) – May/June 2017

This sound art installation appears on www.alessandroperini.com

For further permissions: https://alessandroperini.com/contact/.

Code

"The Sound Compass"Arduino
Example of a short pattern.
void setup(){
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
 
doPerformance();
}
 
void loop(){
}
 
void doPerformance(){
 
delay(10);
digitalWrite(2,HIGH);
digitalWrite(4,HIGH);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
delay(984);
digitalWrite(2,LOW);
digitalWrite(4,LOW);
digitalWrite(7,LOW);
digitalWrite(8,LOW);
delay(299);
digitalWrite(2,HIGH);
delay(740);
digitalWrite(2,LOW);
delay(485);
digitalWrite(8,HIGH);
delay(551);
digitalWrite(8,LOW);
delay(165);
digitalWrite(8,HIGH);
delay(354);
digitalWrite(8,LOW);
delay(1);
digitalWrite(8,HIGH);
delay(344);
digitalWrite(4,HIGH);
delay(103);
digitalWrite(8,LOW);
delay(24);
digitalWrite(4,LOW);
delay(283);
digitalWrite(8,HIGH);
delay(747);
digitalWrite(8,LOW);
delay(318);
digitalWrite(8,HIGH);
delay(683);
digitalWrite(8,LOW);
delay(1);
digitalWrite(8,HIGH);
delay(58);
digitalWrite(8,LOW);
delay(493);
digitalWrite(4,HIGH);
delay(32);
digitalWrite(8,HIGH);
}

Schematics

Four solenoids 24V, schematics
Automatize four solenoids with Arduino
Soundcompass schem t0ewhdqpjj

Comments

Similar projects you might like

Sound Sensor Activated LEDs with LCD for Sound Level Data!

Project tutorial by Heathen_Hacks-v2

  • 1,412 views
  • 2 comments
  • 8 respects

Soil Moisture Sensor With LCD Display

Project tutorial by Patel Darshil

  • 19,349 views
  • 4 comments
  • 37 respects

Talking Clock 2 - New Version (Bilingual: EN-PT)

Project tutorial by LAGSILVA

  • 7,649 views
  • 19 comments
  • 33 respects

Candy Dispenser

Project tutorial by Hada Amira

  • 7,233 views
  • 7 comments
  • 20 respects

Measuring Distance with Sound

by Giannis Arvanitakis

  • 5,602 views
  • 1 comment
  • 31 respects
Add projectSign up / Login