One musician makes a Solo.
Two musicians make a Duet.
Three musicians make a Trio.
So lets make a Trio.
Three is a weird number, we only have two hands after all, so to have three sensors you would need at least another person to make sure all sensors are occupied to control the sound that is made (of course the preferable number is three, but I do so wish to see two people flailing around).
Why did I create trio? I guess it was more along the lines of finding a project that seems fun to interact with, but at the same time you struggle to make it work for you. At the end of the day the device is really just a commentary of how sometimes in life while you are trying your best to make something work, the end result does not bear fruit, or even better, bears fruit but there is not really a take away to this situation now is there?
In summary, let me waste your time.
Initially in the previous post I had made my code entirely out of Piezzo Buzzers and ultrasonic sensors, made to beep in a set tempo. Which, to be honest, is not really what I wanted. I want the tempo to be set by removing the object in front of the sensors face. But after editing the code I realise a major issue: the ultrasonic sensor is kind of being influenced by the buzzer it self.
(insert confused noises) It was steady before? But that was when the ultrasonic sensor only needed to play one tone with an interval in between, hence meaning it was not reading the environment every second hence it does not get influenced before.
So at this point it was time to consider changing my components.
Image taken from: https://create.arduino.cc/projecthub/jenniferchen/distance-measuring-sensor-900520
So I tried out the Sharp infrared/proximity? sensor. It goes by distance sensor at Continental.
Putting the entire circuit together, a single Piezzo buzzer and an Arduino together, the circuit works.
However, duplicating the code becomes a bit more troublesome. As it turns out, you cannot fit 3 piezzo buzzers to a single Arduino and expect them to ‘sound’ at the same time (Trouble shooting this the night before and realising you have to duplicate the circuit and not the code is really bad for your health by the way).
I did not account for this tripling of the space needed to store my three Arduinos, three distance sensors, three piezzo buzzers and three power packs. It is a super tight fit, mind you. By right I can squeeze everything into the box,. But by left squeezing very thing in the night before the showcase and then snapping something is not an ideal situation.
Piecing them together:
From the last post I showed that I laser cut, filed and spray painted my pieces, accordingly:
Since that time, I had to redo the black pieces, to fit the Sharp Infrared Sensor instead of the Ultrasonic sensor. Hence cut a rectangular piece instead.
I have also cut some wedges to support the structure.
And I stacked all my pieces up and glued them together with a glue gun.
Finally I stuck my components inside the surface.
In this case I have achieved what I wanted to in this project, the three sensors play according to the distance of them and the object. However maybe in future I would like to be a bit more ambitious/annoying and make the circuit for more (time to make a symphony for one then).
Of course there are a bit more things I should have accounted for, like the size of the circuit, or the potential increase of the circuit.