This project is a musical keyboard/DJ board that utilizes Arduino Uno (with wifi) and arrangements of light sensors. Three light sensors arranged together will function as keys. We will use sliders to (partially or wholly) cover the light sensors in order to signal a distorted noise. There will also be buttons and other arrangements of light sensors that create different sounds. The analog output of the sensors will be captured in real-time through a wireless network. We will then use matlab to translate these raw figures and produce an audio track based on the movements of the sliders and buttons.

By April 3rd, we will have finished the mechanical design and general hardware design, as well as acquire all electrical components necessary to complete the project. By this time we will also plan to have the Arduino read the analog sensor values even if these do not include sound.

By April 17th, we will have finished the entire project. We will have a fully functioning light sensor slider keyboard. Potentially include LEDs to blink along with the music we create if time allows.


Both of us are interested in music, so we built a hybrid keyboard/DJ board that utilized light sensors as keys. The analog values of the light sensors were used to create the range of frequencies from the key to the key’s sharp. Each light sensor/key was associated with a button so that when the button was pressed, the light sensor values were read in. The frequencies were transmitted over bluetooth to a speaker, where the note was played.

For the first demo day, we built one of the keys and hooked it up to the speakers so that when covered it would play a note. Once we had one key working, we can replicate the circuit to do the same for the other 5 keys. For the final demo, we added the other keys and integrated the bluetooth component into the circuit.

The hardware for this project was not too complicated. The main components were a bluetooth slave and master, six light sensors, six pushbuttons, six 1 kOhm resistors, and two Arduinos. We will explain the wiring for one of the keys because it is the same for all six. A diagram of the circuit is shown in Figure 1 below. The black wires are GROUND, the red wires are 5V, and the green wire is the analog reading from the photoresistor light sensor. In order to turn on the single key, the pushbutton must be held down. When the pushbutton is not pressed, the analog reading is almost 0. When the button is pressed, it engages the pull-up resistor and the analog value increases. On the master side of the bluetooth, between the output signal from the Arduino and the speaker, we included a 1-5 kOhm potentiometer that could adjust the volume.

The master side of the circuit is shown in Figure 2. The receiver side of the circuit is shown in Figure 3.

The software for this project controlled how the raw values of the sensors were converted into notes and sent to the speakers. The program for the master side of the circuit reads in the raw values from the light sensors and scales them to the note that is associated with the key. We used a pitches.h file from the Arduino documentation that mapped the notes to the integer values for the tone function. Then, this converted value is sent via bluetooth (SoftwareSerial) to the receiver side of the circuit. The receiver side reads in characters until an EOL (‘\n’) character is read in; then, it converts this string to an integer so that the tone function can process it and play the note.

This project could be turned into a real product that could be sold if it had a better mechanical design. The current status of the project is still on a breadboard and has a lot ex exposed wires. With a better mechanical design, we could make our product look more like an actual instrument that people would want to buy. Also, ideally the product would be better if you could play more than one note at a time. We were constrained by the Arduino and the single bluetooth module because we could only send one tone at a time.

If we had to do anything additional, we would have soldered our components and improved the mechanical design. We also would have used more than one arduino so we could play more than one tone at a time. It also would have been nice to make our project portable. Rather than using a usb and the computer as a power source to power the arduinos, we would have used a battery pack. Also, if we had speakers that were not attached to the large power supply in Detkin, we could have made our product entirely portable.

Built With

Share this project:
×

Updates