Over the past few weeks I have been working with Elvin Ou to develop a Halloween themed project. We built a Halloween candy game and a skull shaped candy dispenser. When the user wins the game, they are rewarded with some candy dispensed from the skull’s mouth. Figure 1 shows the final product and some examples of users interacting with the piece.
During our first meeting, we settled on the concept of having the winning of a game be rewarded by some Halloween candy. From there we sketched out the general concept of a candy dispenser that is triggered when a game is won. Figure 2 shows our sketch from our first meeting. We knew we wanted some sort of box that would hold and dispense the candy. Initially we thought that we would build the box (shown in Figure 2) and cover it with a halloween themed skull and neck. After this meeting we went to the Halloween store and found a skull beer funnel. This was perfect for our application because we would not have to design and build our own box, but we could use this funnel as the main container for our project. The hallow neck was an added feature that we could use to thread and hide our electrical wiring.
With this baseline, we split up tasks to get an initial working prototype. Elvin built the game with p5.js while I designed a door opening system and coded the motor to open and close through a hole in the skulls mouth. Figure 3 shows a video of the original version of the game. The jack-o’-lantern was controlled by the users mouse. When the jack-o’-lantern collided with the candy, the candy would go away. The goal of the game was to collect all of the candy while avoiding the bats. If the user collided with a bat, the game would be over.
Once this version was working, we connected two potentiometers serially and changed the game to be controlled by the potentiometers. One potentiometer controlled the x-position of the jack-o’-lantern while the other controlled the y-position of the jack-o’-lantern (Figure 4). The code for the final version of the game can be found here.
Building the motor mount and door system was a multi-step process. First, I laser cut a mount out of cardboard to fit inside the jaw of the skull (Figure 5A & 5B). The motor fit inside the mount plates (as seen in Figure 5B) and four screws sandwiched the motor between the two plates. Then I designed a simple disk to fit on the motor axle with a hole to open and close the skull jaw and to allow candy to fall (Figure 5C).
Figure 6 shows how I attached the same acrylic pieces to mount the motor. I ended up only using one mounting plate on the inside of the skull and secured the motor to the skull with screws from the outside that go through the motor, the skull, and then the acrylic plate.
Then I drilled a hole in the skull for the candies to dispense (Figure 7).
Together we realized that the space between the bottom of the skull jaw and the door disk would cause a problem when the candies fell through so we redesigned the door piece to fit onto the bottom of the skull and create a close to flush surface for the door to open and close against (Figure 8).
Figure 9 shows the various iterations of the mouth piece as we were prototyping.
Figure 10 shows the door and motor mount mechanism working with our first candy test. The Arduino code to control the motor can be found here.
Once the motor system was set, I worked on the base. First I made a cardboard tests to map out the base (Figure 11).
The bottom was made to screw into the Arduino and the top piece of the base was made to screw into the bottom in order to cover the Arduino. Two holes were made on the top piece of the base for the potentiometers. Once this was planned out, I made the acrylic version of the base (Figure 12). Using the acrylic bender, I bent the top piece so that it formed around the Arduino and allowed for enough room for the electronics. Figure 12E shows the layout of the electronics and the neck of the skull before the base was closed. We used zip ties to secure the neck piece onto the base. We also threaded a lighting gooseneck through the neck piece of the skull in order to allow it to stand up on its own, bend the way we wanted, and to thread our electrical wiring through.
At this point, we connected all of the pieces and noticed that the candies often got stuck when two candies would fall through the whole next to each other and the dispenser would fail. Thus we spent a lot of time changing the dispensing mechanism to ensure the candies would not get stuck. We tried a funnel, different tube configurations, other candies, etc. Ultimately, we used a funnel and a small 45 degree copper tube to get the hole of the skull as close to the door as possible (Figure 13).
While this system helped, the candies still sometimes got stuck in the 45 degree section of the tubing. Because of the location of the hole and the shape of the skull, we needed this 45 degree angle in the tube to access the hole in the mouth. Thus, we ended up adding an additional feature, a vibrating motor, to shake the candy so if it did get stuck inside the tube, the vibrations would move them enough to release them down the tube. For the most part, this solved the problem. After doing many test, we noticed that on occasion, the candies got so stuck the vibration was not powerful enough to shake them out of place. Thus, we decided to try to find smaller, round, uniform candies to further ensure that the candies would dispense. After looking in many stores we came across these small jawbreakers that were exactly what we were looking for (Figure 14).
At this point the candy dispensing was working properly so we closed the base, added knobs to the potentiometers, and completed some user testing (Figure 15).
The last step was to put a top (a brain) on the skull to hide the candy and the project was complete. Pictures of the final product can be seen in Figure 16.
Overall, I think that this project went well and I am very happy with the result. We did not over extend ourselves at the beginning by creating a relatively simple design. What surprised us the most was the time it took to fabricate the enclosures and get a working dispenser. The computational side of things was relatively straight forward, but we spent the most time getting the physical and computational sides to work together such that the candy would dispense properly. If I were to complete this project again there are a few things I would change. First, I would put the dispenser hole in a place on the skull that is more easily accessible. If the candies did not need to curve down a 45 degree tube, we would not have had as many dispensing issues. I would also like to think more about the interactive piece of the project. Rather than two knobs, I may want to have the user collect the candy by moving their mouth in or biting motion or by stomping very aggressively on the candies. I think rethinking this interaction could elevate the project even more. The addition of the vibrating motor created a good learning experience for me. I had a feeling that we would need to add this feature to solve our problem but it would create more work on the computation side, so I was hesitant. We spent a long time trying other solutions before eventually switching to the inevitable, adding the vibrating motor. In the end, I think we would have saved a lot of time if we had just took the time to add the vibrating motor in the first place. Overall, the entire process to make this project was very fun. The final result definitely resembled what be initial had in mind, which was very exciting.