Yannis Caff - Sensor Technology Projects.


Assignment One - Arduino and Music (software)

For this task I used an ultrasonic sensor and two potentiometers to control the parameters of a granular synth patch in Max. As the ultrasonic sensors that I have are digital they needed four pins connecting to the Arduino, One for the outgoing pulse(Trigger), one for the pulse return reader (Echo) and one each for 5v and GND.
The Arduino source code for this project was taken from Trollmaker.com, but was adapted as to suit my needs, which has been demonstrated in the video below.
The Max patch was developed by myself using a combination of old Patches from previous semesters and was adapted for this project.
One issue that I have found with using these cheap sensors is that they do regularly go out of range so the reading Isn’t always as accurate as you’d like, but that said this was an easy issue to get around as is demonstrated in the video below.
The Arduino Sketch for this project can be viewed Here and MAX Patch Here.


Assignment Two - Arduino and Music (hardware)

In this task I used the Arduino to control six servos on a loop. Each servo was effecting a different object as to generate a variation of sounds.
The first sketch that I designed for this task using the example code in the Arduino software was quite effective, however I quickly noticed that the use of ‘Delay()’ in the language of C can be quite limiting as each time you introduce another Delay to the sketch you are effectively applying the delay over the entire code multiple times and thus slowing everything down.

As a result of this I had to use use ‘millis’ instead, which is effectively a timer that counts the number of milliseconds since the code is started.
As this is a very complicated area I resorted to requesting help on the Arduino Forum. and also received assistance from Krisztian Hofstadter.
The second version of this code was much more versatile and allowed me to change the timing of each servo without affecting the timing of everything else in the sketch. I did however feel that I would have liked to have gained more versatility in regards to modulating the speed of which each servo is going in real time. This seemed to be much to big of a task so unfortunately I was unable to achieve this.
The Arduino Sketch for this project can be viewed Here.


Assignment Three - Performance/Exhibition

For the third and final task for this module I have combined my previous two projects to make a much larger and more complex device.
Designing this project involved splicing the two Arduino sketches from the first tasks together, which took a lot of trial and error. I did also have to add additional lines of code, which have been demonstrated in the video below.
I have also had to incorporate an additional power supply to the device then what I had originally drawn up in the schematic. This is due to the servos drawing much more power than I had originally expected.
The casing for this device is made out of a plastic storage container. To easily remove everything from the casing I design a scaffolding that attached to the underside of the lid, which allowed me to remove everything from inside the container all at once.
As well as adding to the aesthetics of the device the container also acted as soundproofing for the noisy servos.
One main issue that I came across when designing this project was that the servos seemed to have much less power than they did in the previous project. I think that this due to the fact that the servo that is moving the bell is experiencing far too much resistance and therefore is unable to complete the full loop. This in turn has resulted in the rest of the servos losing much of their power. To get around this I could have simply removed the bell altogether or perhaps preferably adapted the code so that each servo loop is somewhat more independent of each other.
The Arduino Sketch for this project can be viewed Here and MAX Patch Here.