Project Overview:
For my final project in the Interaction Lab, I drew inspiration from the vending machines that are scattered all over our school. These machines are convenient and functional, but I wanted to add a fun and interactive twist to this everyday object. That’s when I had the idea to combine the simplicity of a vending machine with something more engaging—a Spin the Wheel game. The thought of transforming a mundane experience into something more exciting really intrigued me, and I decided to challenge myself by integrating Arduino and Processing into the design.
Vending machines are an everyday part of student life at our school, and I’ve always found it interesting how their basic functionality (inserting a coin, selecting a product, and getting the item) has remained largely unchanged for years. While the function is simple, I wanted to make the experience more dynamic. What if, instead of just selecting a product, you had to spin a wheel to determine which prize you’d get?
The twist I envisioned was incorporating a Spin the Wheel game directly into the vending machine experience. When you insert a coin, you would be able to trigger the wheel, and it would land on a random prize. The corresponding prize would then be dispensed by a servo motor connected to the Arduino.
The next challenge I faced was figuring out how to incorporate Processing into the project. As the Arduino would be handling the physical components, like detecting the push button and controlling the servo motors, I wanted Processing to handle the visual aspect—specifically, creating an interactive screen that would show the Spin the Wheel animation and display the outcome of the game.
My idea was simple: when you press a button (simulating the insertion of a coin), the Processing code would trigger the wheel to spin on the screen, with the outcome clearly displayed after it stops. This would not only make the experience visually entertaining but also make it feel more engaging and immersive. The wheel would be divided into several segments, each corresponding to a different prize. Once the wheel stopped spinning, the system would select the appropriate prize, and the Arduino would activate the servo motor to release it from the corresponding slot.
While my project initially seemed simple—a vending machine powered by Arduino and Processing—one of the biggest challenges I faced was how to balance the functionality of both Arduino and Processing in a way that truly showcased both technologies. The goal was to make sure each component added something meaningful and interactive to the experience, rather than just having one piece overshadow the other. It became clear to me that in order to push the boundaries of my project, I needed to incorporate more Processing features that would make the interaction both more dynamic and engaging for the user.
At the same time, I was encouraged to infuse a bit of culture into my project—something that would reflect creativity and fun. This idea led me to the concept of a Karaoke Booth. While the vending machine and karaoke booth are two very different concepts—one focused on dispensing prizes, the other on entertainment—they each offered an opportunity for interaction, which sparked an idea: What if I could combine both, making them part of a larger interactive arcade system?
To integrate the karaoke booth with the vending machine, I created a reward system: after a successful performance (based on pitch, accuracy, and volume), the user earns a coin. This coin can then be used to activate the vending machine. The goal was to ensure the karaoke booth and vending machine felt like separate yet complementary parts of an interactive system. By connecting the booth's performance metrics to the dispensing of coins, I created a experience where actions in one area (karaoke) directly influenced interactions in the other (vending machine).
To begin the building process, I first focused on constructing the Arduino components for the vending machine. The core functionality of the machine relies on servo motors to control the release of items from the vending slots. I initially set up an external power source connected to the breadboard to power the motors. However, this approach didn't work as expected. The motors weren't receiving sufficient power, which led to inconsistent behavior and failure to activate properly. This issue required me to reassess the power setup and explore alternative solutions to ensure reliable operation of the servos and overall system.
After several trial and error attempts, I decided to power the servo motors directly from the 5V pin on the Arduino, which thankfully resolved the power issues and allowed the motors to function properly. My next challenge was controlling these motors with a push button. The idea was that when the button was pressed, it would randomly activate one of the servo motors to dispense a product. This part of the project involved a lot of frustration, as many of the servo motors I had initially tried didn't work consistently. I spent a lot of time swapping out motors and troubleshooting the system, only to face the same issues repeatedly. Fortunately, with the support of my IMA friends and fellow students, we were able to work through the coding issues.
Here is video showcasing how the button can control the movement of the servo motors. Together with the fellows, we developed a script that allowed the push button to randomly activate one of the servo motors. These fellows were incredibly helpful in fine-tuning the code and getting the motors to behave as expected, which ultimately led to the smooth operation of the vending machine's dispensing mechanism.
To build my first prototype, I decided to use cardboard for the vending machine structure. This allowed me to quickly map out and visualize the features of the machine. The process was a lot of trial and error as I had to figure out the best way to arrange all the components and design the box to accommodate the Arduino, servo motors, and other parts. After finalizing the layout, I was able to get the push button working to activate the Spin the Wheel game. The wheel would randomly land on one of four degrees (30, 60, 90, 180), and this random selection was connected to the servo motors, which in turn would push out a product from the selected slot. Additionally, I integrated a distance sensor into the machine. The sensor’s role was to detect when the prize had fallen from the vending machine. Once it detected the prize, a buzzer would sound to signal the user that the prize had been dispensed, adding an extra layer of feedback to the experience.
However, my initial plan to use servo motors to push out the items didn’t work as expected. During the first round of user testing, I received feedback suggesting that linear actuators would be a more effective solution for dispensing the products. Linear actuators provide smoother and more reliable motion for pushing out items, so I decided to switch to this method to improve the functionality of the vending machine. Additionally, I was advised to focus more on the electronics and the karaoke booth integration. I realized that the karaoke component was underdeveloped, and I needed to prioritize sound analysis to make the singing experience more challenging and interactive. Looking ahead, my next step is to figure out how to implement sound analysis in the karaoke booth, ensuring that the system provides useful and engaging feedback for the users. At the same time, I need to work on integrating the karaoke booth and vending machine into a more coherent system, where the user's performance in the karaoke booth can directly influence their ability to interact with the vending machine. The goal is to create a unified experience where both parts of the project complement each other and tell a more engaging, interactive story.
One of the chellenges I faced when hooking trying to setup the arduino to the box. I had issues where the wires keep coming loose and then I'll have a hard time trying to figure out where to re-hook the wires. I ended up taping all the wires that go together. This helped keep everything organized and prevented me from wasting time tracing wires back to their correct connections. While it wasn't the most elegant fix, it definitely made the process smoother and more manageable.
I was really excited to use the laser cutter for my project, so I began by taking accurate measurements and asking my friends for help with the design using "Makerbox" and "Cuttle.xyz" software. The laser cutting process really elevated the quality of my project, giving the vending machine a sleek and professional look. Assembling the pieces took some time, but I found it both fun and rewarding as I watched the machine come together. I also decided to use acrylic for the window, which gave the box a more realistic feel and allowed users to see inside the vending machine. To give it an electrifying touch, I painted the entire box blue, adding to the futuristic and arcade-inspired look. My next challenge was to focus on the internal components of the box, which I had to build on my own. This included placing the Arduino, servo motors, and other electronics, and ensuring everything was neatly organized and functional inside the machine.
After three all-nighters, I pushed through to finish the project as best as I could. I managed to create two laser-cut boxes: one for the vending machine and another as a placeholder for my computer, which would run the interface for the karaoke booth. For the karaoke booth, I connected an external microphone to my computer, which would be used to analyze the user's voice volume and frequency during their performance. This was definitely a hard and frustrating process. Every time I got something to work, it would suddenly stop for no apparent reason, leaving me to troubleshoot and figure out what went wrong. A significant portion of my time was spent debugging the code, which often felt like an endless cycle of trial and error. At times, I resorted to ChatGPT for help with running and debugging the code, which was a lifesaver during moments of frustration. Despite all the challenges and setbacks, the system eventually came together - maybe not what I had hoped it to be, but it was definitely something that I could further improve on.
Here’s a preview of how the karaoke booth functions. In the video, I asked my friend to test it out and provide some feedback. The interface displays a selection of song options for the user to choose from. Once a song is selected, the user is redirected to a separate page that plays the corresponding karaoke video.
On this page, I included several key controls:
A pause/play button to start or pause the video.
A next song button to skip to another song.
A home button to return to the main song selection screen.
Using the external microphone, the system analyzes the user’s voice in real-time, displaying the frequency and volume of their singing on the screen. I was really happy with how the system performed, as it provided clear, interactive feedback that made the experience feel dynamic and engaging. Overall, I was satisfied with the output and how the karaoke booth came together.
Throughout my project, I utilized Generative AI, specifically ChatGPT, to help debug and refine my code. Initially, I relied on the presentation slides and general online resources to understand how to initialize the code and set up the basic structure. However, I quickly ran into limitations when it came to customizing the code for the specific needs of my project—particularly with the integration of the karaoke booth and vending machine, as well as handling real-time sound analysis. ChatGPT proved invaluable in generating more tailored solutions, offering specific snippets of code and troubleshooting advice that aligned with my exact requirements.
Looking back on the entire project, I’ve learned a huge amount—both from the challenges I faced and from the process of pushing through them to reach a finished product. This project tested my ability to think critically, problem-solve, and stay persistent, and it was filled with moments of both frustration and accomplishment.
One of the main challenges I encountered was the integration of hardware and software. When I started, the concept seemed simple enough—building a vending machine and a karaoke booth—but the complexity of getting everything to work together was far more difficult than I had anticipated. The servo motors, which I initially used to push out the prizes, didn’t work as expected. This led to frustration, as I spent a significant amount of time troubleshooting and replacing motors. However, when I switched to linear actuators, the machine's performance improved. This experience taught me the importance of being flexible with my approach, and that sometimes, quick fixes or alternative solutions are necessary when things don’t go as planned.
Another major challenge was the sound analysis for the karaoke booth. While I had a solid understanding of the basics of coding from the presentation slides, I quickly realized that making the system responsive to users' voices in real-time required more specific coding and integration than I initially thought. The system needed to analyze frequency, volume, and pitch, and then display this data in a meaningful way for the user. Debugging this feature was probably the most time-consuming part of the project, and I often found myself stuck. It was during these moments that I turned to Generative AI, specifically ChatGPT, for help. The AI was able to provide tailored solutions and help me troubleshoot, which was incredibly valuable and saved me so much time.
As the project progressed, I also faced challenges with physical assembly. The cardboard prototype was a great starting point, but when it came to building the final version, I encountered issues with wiring and organizing components inside the box.
The most rewarding part of the process, though, was seeing everything come together. Watching the vending machine successfully dispense prizes, and seeing the karaoke booth measuring the voice pitch and volume, made all the frustrations worthwhile. I was proud of how both components interacted and contributed to the overall arcade-like experience. I also realized that the project was more than just about coding and building hardware; it was about creating a story and an experience for the user. In the end, I enjoyed every single part of the process—though filled with challenges—was incredibly rewarding, and I now have a stronger foundation for tackling future projects, which I intend to do.