Controlling a Servo with Arduino

Servo motors are digitally controlled actuators, which allow the precise setting of angles via pulse-width encoding. Servos used in RC models are low-cost and easy to program, which makes them attractive for prototyping in sound art and other DIY projects. The following example is a copy of the original example at Arduino.


Breadboard Wiring

Connecting the servo motor to the Arduino requires no additional parts, except for jumper cables. It is directly powered from the Arduino's 5V pin (larger servos may require an additional power source) and receives data from the Pulse-With-Modulation pin ~9:

Arduino breadboard wiring for servo motor.

Arduino breadboard wiring for servo motor.


Arduino Code

The following code lets the sweep 180 degrees forward and backward, managed by two for loops (count up / count down) inside the main loop. Most consumer servos manage this range from 0 to 180 degrees and wrap exceeding values accordingly.

#include <Servo.h>

Servo myservo;
int pos = 0;

void setup() {
  myservo.attach(9);
}

void loop() {

  for (pos = 0; pos <= 180; pos += 1) {
    myservo.write(pos);
    delay(15);
  }

  for (pos = 180; pos >= 0; pos -= 1) {
    myservo.write(pos);
    delay(15);
  }
}

Exercise

Exercise

Combine the servo example with the sensor example to control the position 'manually'.

Diffusion

Following the tradition of Pierre Schaeffer, Diffusion refers to the live spatialization of tape music, respectively fixed media content. Typically, the music is played back in a low channel order (e.g. Stereo) and sent to a large number of loudspeakers using an 'inverted' mixing desk.

/images/spatial/natasha_villa.jpg

Natasha Barrett diffusing on a 3D system at a TU Studio concert (Villa Elisabeth, 2018).


The Acousmonium

The GRM (Groupe de Recherche Musicale) Acousmonium is an elaborate loudspeaker setup, designed for the diffusion of acousmatic music. It is made for touring and was first presented in Germany at the 1983 “Inventionen” festival by François Bayle. The system returned to Berlin for the 2008 edition of the SMC, where it was paired with the large WFS system at TU Berlin's H104:

/images/spatial/acousmonium_H104.JPG

The Acousmonium at TU Berlin (H104) during SMC 2008.


The BEAST

The Birmingham Electroacoustic Sound Theater (BEAST) is a modern version of the Acousmonium approach. It features 100+ loudspeakers in multiple groups with specific characteristics and purposes:

/images/spatial/beast_setup.JPG

Different loudspeakers of the BEAST system.

/images/spatial/beast_sketch.png

BEAST setup at CBSO Centre, Birmingham, May 2009 (Wilson, 2010).

The BEAST was presented in Berlin at the 2010 Inventionen Festival, when Jonty Harrisson was guest professor at TU Berlin. Read more in the online archive of the festival.

/images/spatial/BEAST_kirche.jpg

BEAST at Inventionen Festival 2008 (Elisabethkirche, Berlin).


References

2010