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.

  • 1,993 views
  • 2 comments
  • 8 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/.

Schematics

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

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);
}

Comments

Similar projects you might like

Infrared replicator

Project tutorial by Gustavo Gonnet

  • 73 views
  • 0 comments
  • 1 respect

Development Board for AtTiny MCU

by Vincenzo G.

  • 228 views
  • 0 comments
  • 7 respects

Version 2.0 Advanced Attendance System (Without Ethernet)

Project tutorial by GadgetProgrammers

  • 3,354 views
  • 5 comments
  • 46 respects

The Magnetic Field and RGB Tester

Project tutorial by Kutluhan Aktar

  • 1,048 views
  • 0 comments
  • 6 respects

Control LED Using Your Voice Command

by IoTBoys

  • 1,338 views
  • 1 comment
  • 12 respects
Add projectSign up / Login