Record Boyz | Miniature Gramaphone With Different Drum Tracks & Melodies | Jayden Skuladottir & Mallory Prescott

by sask5403 in Workshop > Laser Cutting

987 Views, 11 Favorites, 0 Comments

Record Boyz | Miniature Gramaphone With Different Drum Tracks & Melodies | Jayden Skuladottir & Mallory Prescott

Final Project Advertising + Demo Video

*The designers for this project: Jayden Skuladottir, Mallory Prescott

Inspired by the gramophone, we've created a record player with different drum tracks and melodies that can be mixed and matched to create your own custom music. Not only can you change what drum track and melody is playing, you can also control the speed of the music for even more customization options.

Supplies

MATERIALS

  • Photo Resistor (x1)
  • BT Speaker (x1)
  • Arduino R3 Uno Controller Board
  • Jumper Wires
  • Potentiometers (x3)
  • Button (x1)
  • Servo Motor (x1)
  • DC Motor (x1)
  • Wall Plug Adaptor (x1)
  • USB-Arduino Cord (x1)
  • Plywood 18x30in
  • Dark Brown Wood Stain
  • Velcro
  • Protoboards
  • Hot Glue
  • Windows Laptop
  • Gold Spray Paint
  • Paper

SOFTWARE

  • Arduino IDE
  • Processing IDE
  • Fritzing
  • Ableton Live 11
  • Adobe Illustrator

Brainstorming & Concepts

Concept Sketch 1.jpg
Concept Sketch 2.jpg
Concept Sketch 3.jpg
[Object] Final Project Interactive Graphic 2.jpg
[Object] Final Project Interactive Graphic 1.jpg

From the beginning, we knew we wanted our project to involve sound. After we solidified our project idea, we focused on obtaining all the materials needed and began making concepts/prototypes of our enclosure. Many of our original ideas for this project changed as time went on.

Building the Circuit + Code

3C97CFD2-3EB8-41FE-BCE9-39DABE5E19DA.jpg
Screenshot_2023-04-25_145130.png

Before we started coding, we set up a breadboard with a power module and Arduino. To connect the rest, we also used jumper wires, male/female wires, and ultrasonic sensor, DC motor, servo motor, 9V battery, a push button, a 220 Ohm resistor, and a L293D. We used the L293D to connect the power supply and an analog pin to the DC motor. The sensor and servo motors were also connected to analog pins, while the button was attached to a digital pin. 

We started our programming by focusing on getting the motors and serial code to work alongside our sensors and inputs. We started by implementing code to get the ultrasonic sensor and button to work, using inspiration from our Labs 6 and 7. We set up a string to serial print for future processing use but mostly used them to create variables as a reference for our actions. We used an if case and while loop to allow our code to start the motor functions. When the ultrasonic sensor detected something was close enough, it would ramp up the speed on the DC motor and move the servo motor 45 degrees. While in the while loop, it continues to read the inputs so when the button is pressed it exits the loop, ramps down and reverts the servo motor to its original position.

This was the intended base functionality for the code, so it was important we used this for testing. That way, once we were sure it functioned, then we could implement the processing code, potentiometers, and audio tracks. As we were testing, we found we had the most issues with the touchy values from Ultrasonic Sensor. After much trial and error, we decided to swap it out for a photoresistor. Since it still had the function to detect the sort of change in distance/lighting, we thought we could try to use it as a replacement. After some modifications to the circuit and the code, we sampled the same code with the photoresistor. Thankfully, it worked and was much more reliable than the ultrasonic sensor’s readings. We decided from then on to use that in our code.

The next step was integrating the potentiometers. We wanted to use the readings from the potentiometers to alternate between different audio tracks and to modify them. To start, we tried added just one potentiometer to the code, one of the ones from the kit, not one of the ones we purchased to use in the final version. After implementing it into the system, we noticed we could receive the readings from the device, but they could not be changed. It was simply broken, but we had not yet received the final potentiometers, so we decided to keep moving on. This led us to begin the processing code.

We used what we learned from inputting data from Arduino to processing alongside a function called play() to perform most of the mechanisms. By working off of processing code from previous labs, we changed the functions to parse the information from the button, potentiometers, and a variable called ‘play’ which would signify the condition where the music would be played (i.e. the photoresistor reaching a certain setting). Using audio files Jayden created in Ableton, we uploaded them into the same folder to start testing them. We just wanted to see that the songs would play, and once we received the other potentiometers, we could make those changes later. There were a lot of additions to the code. We had to make arrays for the drum and melody tracks, initializing them in a loop, and specifying how to play the songs. The biggest issue we ran into was how the songs sounded. They would play over each other before they had a delay, and when the delay was implemented, there were still issues when the pitch and speed was changed. 

Once we had the potentiometers and added them to the system, we started to test things to see why that was happening. Over much trial and error, we found it was an issue with the delay time. We continued to test it, and eventually found our solution to be taking the inverse of the value the pitch was played by and multiplying it by the duration. This, and the addition of all three potentiometers, allowed us to play and alter a drum and melody track simultaneously without running into issues.

Our project has two motors: a DC motor and a servo motor. The DC motor spins the disk, and the servo motor rotates the arm. Both of these motors will activate based on ultrasonic distance sensors. The sensors will be detecting whether or not a disk has been placed above them at a certain range.

We soldered on April 29, 2023. All the soldering was done in one sitting. There were a few loose parts that had to be re-soldered, but overall, the soldering was successful.


ARDUINO CODE: https://gist.github.com/pvmallard/48a7744a8de1c204b07b4e9af8a2cf17

PROCEESING CODE: https://gist.github.com/pvmallard/f5b97901938abddd57773a640546921b

Music

Sound Files Screenshot.JPG
Ableton Demos

At first, we decided to have 10 songs for our project which we stored in a folder on the computer inside the same folder as the processing file. We were going to have four potentiometers for our record player to control the song, the volume, the pitch, and the tempo. However, we decided we wanted to be more creative and original with our project and instead made several different drum tracks and melody tracks that could be mixed and matched and changed with the potentiometers. The music for our project was created in Ableton Live 11.

Cardboard Prototype

PXL_20230418_181836758.jpg
PXL_20230419_024924912.jpg
5AD8553A-6F54-4949-B518-68AADE0DF37A.jpg

Our first prototype was created with cardboard in case we had to make any changes to the design. For the laser cutting guidelines, we used Adobe Illustrator and uploaded it to the laser cutter. The Illustrator files had to be changed a little bit for the final enclosure.

Once the code was implemented and tested, we made some cardboard mockups of the disk and arm to test how they could move with the added weight. Both the DC and Servo motor worked well.

We used a piece of scrap material from our cardboard prototype to create a temporary arm.

Final Enclosure

OBJECT Final Project | Laser Cutting
PXL_20230427_181305535.jpg
7C633398-F7CC-4160-943D-52B4A69D9522.jpg
0B2C15A9-E6E7-4654-B1CB-AB92FE580DE3.jpg
PXL_20230430_214730166.jpg
PXL_20230430_214719884.jpg
PXL_20230501_215555819.jpg
PXL_20230504_162702729.jpg
OBJECT Final Project | Demonstration

We used the laser cutter and plywood to create the pieces of our enclosure. We began constructing our final enclosure by laser cutting plywood, sanding it down, and using dark brown wood stain to color the wood darker, but still have it look natural. We then hot glued all the parts together. The top portion of our enclosure can be lifted off the base. We decided to attach it more securely with Velcro strips so the top would not move around while the player is in use, but we’d still be able to remove it. 

The gramophone was created using cardstock paper, golden spray paint, glue, tape, and superglue. I found a paper gramophone template online and adjusted the size in photoshop. I then printed out the template, cut everything out, and assembled it. After the gramophone was assembled, I used gold spray paint to make it look shiny and metallic. Overall, we are very happy with how the gramophone turned out.

For the arm, a friend cut down a scrap of wood and we sanded and painted it to attach to the servo motor. The potentiometers were secured into place with a strip of cardboard on the inside of our enclosure. The back side of the enclosure has a small opening for the USB cable, wall-plug cable, and the small speaker.

The disk was the last part of the enclosure that we worked on. We needed to use something light, and we decided to use acrylic for our material. We used a laser cutter to create the disk shape and then we painted it black.

Getting all of the hardware into the enclosure was a challenge. Implementing the button in our final enclosure was a bit difficult because the button was so small. We tried to glue the potentiometer piece to the button, but it would not stay. We tried a different approach by using hot glue to hold the button up to the small space in the wall of our record player. After we secured the button, we then tried to hot glue a small part to it so it could be pressed easier.

Both of us are extremely pleased with the results of our project and we are proud of our hard work.