Submitted by dave on
Servo with Phone coil attached to Arduino
I started playing with an Arduino and a servo motor as preparation for a project I'm working on. Using an Arduino Nano on a breakout board, the setup just consists of plugging the three pin lead from the servo into one of the digital out ports. Using the [http://arduino.cc/en/Reference/Servo Servo] library, getting it moving is as simple as:
void setup() { myservo.attach( 9 ); } void loop() { myservo.write( 45 ); }
which will ask the servo to move to 45 degrees of its 180 degree travel.
As it was moving, the servo was making some great noises, so I grabbed a piezo pickup and a telephone coil and made some recordings, which sounded quite interesting - overall the phone coil seemed to get a better range of sounds out. So the logical next step was to turn it into a reactive instrument. To do this, I created a serial link between the arduino and Max/MSP, and used this in a Max4Live device.
ServoPatch
The patch is pretty simple, and uses a 'coll' to send out numbers in response to midi notes. The code on the arduino interprets the numbers as commands, to either move a certain number of degrees or to move to an end stop. Different small degree movements have different sonic characteristics, and this lets it be played as a percussive instrument.
Now, by sticking a phone coil on the side, it makes a easy to use instrument - there's a recording of a jam here:
I've fed the audio output from the MIDI controlled servo into Live, and then put it through some effects, so I can control the rhythms that the servo makes and the way it's processed at the same time. The jam's been edited down from about 20 minutes with no further processing, as an experiment in editing improvisations to make them more listenable. The max device and the processing sketch are attached to this post.
Attachment | Size |
---|---|
![]() | 1.22 KB |
![]() | 5 KB |