Building a Sustainable Vending Machine Prototype

by sarahey2 in Workshop > Laser Cutting

707 Views, 3 Favorites, 0 Comments

Building a Sustainable Vending Machine Prototype

Screen Shot 2022-05-08 at 1.05.24 PM.png

Arthur, Kornkamol, Emily and Sarah are four students taking BADM 357: Digital Making at the University of Illinois. After surveying various freshmen around the campus' main dining hall, we found a shocking similarity; no one is going to care about being sustainable unless it is more EFFICIENT for them to be sustainable.
This is why we decided to create a prototype for a dining hall vending machine. Using a raspberry pi, servo motors, a card scanner, plywood, acrylic, and 3D prints, we were able to bring this idea to life!

Supplies

  • 1 Raspberry Pi
  • 2 Servo Motors
  • Plywood
  • Acrylic
  • 2 Hinges
  • I-Card Scanner
  • Acrylic- 3" x 4"
  • Plywood- 1/8" Russian Birch 12" x 12"
  • 3D printed stand for servo motor
  • Wires
  • Loctite Super Glue

Project Ideation

Screen Shot 2022-05-08 at 12.17.39 PM.png

To bring this idea to life, we first picked an area of campus we wanted to target based on campus issues. We selected the Ikenberry dining hall, focusing on dining hall sustainability, and surveyed a minimum of 10 students. Ikenberry is the largest dining hall on campus, so we were able to receive diverse responses.

From these responses, we began the process of brainstorming what we were going to prototype. Our "How Might We..." statements listed below helped us come up with project ideas:

  • How might we increase and encourage sustainability without putting the responsibility on the students?
  • How might we educate students on the impact of sustainability?
  • How might we make residents aware of what their waste really means and how much they are wasting immediately?
  • How might we make waste more inconvenient for the resident's daily lifestyle?
  • How might we make the solution beneficial to both the university and students?

Based on these statements, we came up with three ideas:

1. Bin Dryer System- This would aim to solve the issue of recycling bags and bottles having to go to the landfill due to leftover liquid.

2. Rental Vending Machine- This would help reduce the amount of paper and plastic waste that is produced from the dorms.

3. Waste Social Network- This would help make the idea of sustainability more exciting to raise awareness and call for action.

After evaluating each of these options, we decided that a rental vending machine would be the best option for us to pursue.

Gathering Materials

Screen Shot 2022-05-08 at 12.33.13 PM.png
Screen Shot 2022-05-08 at 12.33.24 PM.png

After coming up with our idea, we decided to create an initial prototype model to help us figure out what materials were needed for our project (attached above).


We initially wanted to create four vending machine boxes and one a return box and decided to make these out of plywood, and use acrylic for the glass door of the vending machine. Later, with the time constraints, we decided to make only one vending machine box and a return box. However, if we were to make three more vending machine boxes, it would only need to follow the same steps.

We then thought about how we wanted to give users access to opening and closing the doors. We decided that we could use a raspberry pi, an iCard scanner, buttons, and servo motors- users could scan their iCard, press the button of the box they wanted to open (vending machine, return box), and this could activate the servo motor pertaining to the specific box to open, and then close, the door.

Project Creation

Screen Shot 2022-05-08 at 12.53.54 PM.png
Screen Shot 2022-05-08 at 12.56.48 PM.png
Screen Shot 2022-05-08 at 12.56.59 PM.png

First, we wanted to get the plywood cuts for the two boxes together. After sketching out the correct measurements for the pieces to latch together, Emily created an .svg file that contained the compiled wood cuttings needed, each around 6” by 6” (file attached above).


Then, Kornkamol and Sarah went to the Siebel Center of Design to laser cut the wood. Luckily, we had no trouble and were able to cut each piece in respect to their measurements. We then superglued the sides together for each of the boxes. Then, for the two doors, we superglued hinges to each of the boxes and attached the doors using superglue (1 on final image for the vending machine, 2 on final image for the return box).

Emily then worked to print out the two latches to attach to our servo motors so that we could open and lock our doors. Once the bodies of the two boxes were formed, we used four small pieces of wood and attached them to the right side of each of the boxes to act as a stand for our servo motors using superglue (3 on final image). After the servo motors were in place on the box, Emily attached the 3D printed door latches to the servo motors and thanks to her precise measurements, they were able to latch right on (4 on final image).

Next, we added a handle to the vending machine (5 on final image). You will see the handle we added to the return box in Step 5.

Lastly, Emily 3D printed a cover for our wires (6 on final image). This cover also had a hole for the button corresponding to the vending machine. Another hole was put in the return box for this same purpose. The reason for the cover was to be able to access our circuit board and raspberry pi without much disassembly and so that the minimum amount of wires would be showing. Attached in order is our CAD design for the box, the design for the latches, the design for the handle, and the design for the cover. Now that the body was complete, we needed to implement the wiring.

Project Programming

Screen Shot 2022-05-08 at 12.57.17 PM.png

We had to program the raspberry pi with the servo motors and the iCard scanner so that a card swipe could activate the 3D printed locks on the vending machine and return box, separately. Attached above is the circuit diagram that we utilized.

First, Arthur had to understand what type of input the card scanner would send the raspberry pi. After some testing, he found that the scanner sends a set of keyboard input commands to type out the value read by the scanner to the raspberry pi. The raspberry pi does not have a built-in keyboard, so Arthur had to find ways to input one in. After plugging in the iCard scanner to the raspberry pi, Arthur had to scan through all of the ports to check which port to check and be notified when the key command “enter” was sent by the scanner. He used the Linux evdev package to read the keyboard inputs.

Once he was able to wire the servo motors with the iCard scanner, he then had to wire the buttons so that each button pertaining to its specific door would open upon pressing the button, given that a card was swiped prior to the button being pressed.

To have the raspberry pi check the inputs from the scanner and when the buttons were pressed, Arthur used the built-in crontab scheduler to run two python programs on startup, one to check the scanner, and the other to check the button.

After the wiring and programming was complete, we were able to test our final prototype!

Prototype Testing

Screen Shot 2022-05-08 at 1.05.24 PM.png

After all of our parts were in place, we tested our model and were able to get it running! A user would scan their iCard, then press the button of the door they wanted to open. After the door opened, the would have 10 seconds to take out or put in the item before the door would close and lock. Attached above is the picture of our final prototype!