Interactive Live Performance System
Arduino sensors that control Ableton through Max MSP.

In my 5th semester at Metropolitan College, for the course “Music Technology and Production”, I built a system of an Arduino and sensors that, through Max MSP, drive controls in Ableton. This way, when I interact with the sensors in front of me, I can control the DAW's parameters live.
I used an Arduino Uno Rev3 as the mainboard. The sensors I chose are:
- The HC-SR04 ultrasonic sensor, which sends ultrasonic pulses and receives their reflection. From the time between sending and receiving, the Arduino returns the distance of the nearest object from the sensor.
- The MPU6050, a three-axis accelerometer and gyroscope. For this project I use the gyroscope, meaning the sensor's angle on each axis, not its acceleration.
- The Waveshare liquid level sensor, which uses vertical metal contacts and the conductivity of water so the Arduino can return a value based on how deep the sensor sits in the liquid.
First I read the setup guide for each sensor:
maker.pro: MPU-6050waveshare.com: Liquid Level Sensorprojecthub.arduino.cc: HC-SR04Wiring
Then I found the diagrams with the correct wiring.



Unlike the other two sensors, the MPU6050 had no pins ready for connection, so for the first test I connected it with crocodile clips.

Then I soldered on the header that came with the sensor.

Code
I connected each sensor to the Arduino separately and looked for its code. I found example code for each sensor in the Arduino IDE library.
I tested each sensor on its own, and once they all worked I merged the three programs into one so all three sensors could run at the same time.
Based on the photos, I then drew my own diagram with all three sensors connected to the Arduino at once.

As a result, all 3 sensors worked together, and the serial output printed this every 10 ms:
Distance is the ultrasonic sensor's reading in centimetres from 0 to 400, Water level is the water level from 0 to 650, and angle X, Y, Z are the gyroscope's angles on each axis, from about -90 to +90.