---
# System prepended metadata

title: 'Project CROSS, A Coin Dispensor Project for ENGR 24 Final'

---

# Project CROSS, A Coin Dispensor Project for ENGR 24 Final 
A Preliminary Design Proposal submitted to Prof. C. Robinson.

**By: Aaron Wu
Professor Carolyn Freeman Robinson
December 6, 2022
FALL 2022**

[toc]

## Introduction and Problem Definition


Project CROSS stands for Coins Rearranging, Organizing, and Sorting System. The current project is determined to provide an applicable solution for the project requirements of sorting and dispensing coins, following along the project constraints provided by the instructor including 
- Each coin dispenser must hold at least 10 coins. 
- The coins being dispensed must have loading slot(s) to insert the coins. 
- The coin dispenser must include areas to accommodate quarters, dimes, nickels, and pennies. 
- The coins can only dispense when a human interacts with the constructed object and manually manipulates the dispenser in some way. 
- The design must allow the user to select a specific coin. 
- Each person in the group must create an exact prototype version.

Thus, the problem can be defined into four technical requirements including
- Coin Sorting 
- Coin Storing
- Coin Dispensing
- **Coin Counting** 

To achieve these technical requirements, a comprehensive and collaborative system should be designed in a way that subsystems can handle the mentioned technical requirements and be able to communicate with each other.
![](https://i.imgur.com/46yEAb3.png)

Figure 1: All System Overview

## Design Concept Description

### I. Coin Sorting 
Following along the technical requirements listed in the previous section, I proposed to solve the coin sorting requirements by using the difference in sizes of the coins to mechanically sort the coins. It should be easy to fabricate, the coin should be able to move and sort itself after we deploy the coin, and the mechanism should be as easy as possible which should consist of no part that is moving in this subsystem. 

As a result, I came up with a coin rail design that utilized the size differences between the coins to determine which coin to drop in a sequence where the coin rail start selecting coins from the smallest size to the largest.
![](https://i.imgur.com/k1422rT.jpg)
Figure 2: Coin Rail Hand Sketch 01

![](https://i.imgur.com/ojvvnuO.jpg)
Figure 3: Coin Rail Hand Sketch 02

### II. Coin Storing
The coin-storing mechanism should be able to hold more than 10 coins, allow the dispensing system to dispense the stored coins from the bay, allow the coins to drop and fall into the storying bay, align the coins, and clean out the jamming coin easily. I designed the coin bay that allows me to stack coins together for a minimum of 57 coins in each of the coin types. (minimum amount of coins is defined by the maximum number of quarters possible to be stored) And the coin will fall down to replace the coin and get dispensed by using gravitational force. This allows me to automatically reload the dispensing coin with easy design.
![](https://i.imgur.com/VzYN2Yp.jpg)
Figure 4: Coin Bay Hand Sketch

### III. Coin Dispensing
The coin-dispensing mechanism should be able to use a push bar to push the coins out from the coin bay one each time. It also needs to be possible to collaborate with both manual and servo mechanisms in order to have a plan-b after the decision point.  From that. I designed a 2-joints body that converts the rotational motion from servo into linear motion. And that allows me to use the push bar to push out the coins from the coin bay. 

![](https://i.imgur.com/Kog1btX.jpg)
Figure 5: Coin Dispensing Hand Sketch

### IV. Coin Counting
This is a special mechanism that requires a much more complicated system design including the electrical system. It remained undetermined and was not a part of my hand-sketching designs until the decision point after prototype II in order to decide whether I am going to stick with this design. But the original idea is to use an infrared sensor to detect the coin when the coin passes through the rail. It’s not only about “counting” the coin, but it also requires displaying the coin count result from the infrared sensor and a series of algorithms behind the scene. Which could potentially harm the project planning by overloading the timeline.

![](https://i.imgur.com/6Z523H7.png)
Figure 6: Coin Counting and Electrical System Sketch

## Analysis of the Design Concept
### Prototype I
#### Prototype I Testing Objective
Prototype I is designed to testify the mechanical designs in the project which includes the Mechanical Sorting Unit (coin rail), the Coin Storing Unit (coin bay), and the Mechanical Coin Output Unit (manual push bar).

#### Prototype I Systems
- System Overview
Prototype I System consists only of mechanical designs and can be rationalized as
    1. Coin Sorting System
        a. Coin Rail
        b. Coin Bay
    2. Coin Dispensing System (Output)
        a. Push bar
    
After the coin is deployed into the system, the coin will instantly get separated into different
categories based on the coin type and stored in the coin bay ready for dispensing.
![](https://i.imgur.com/KPYFcpZ.png)
Figure 7: Prototype I All System Overview

- Coin Sorting - Coin Rail
The design follows the idea of distinguishing coins from their sizes. Thus I measure the sizes ofdifferent coins, and separate the coin-type filter with the sequence of Dime → Penny → Nickel → Quarter. I added a 1.50mm small offset at the bottom of the holes where remains the friction for the coins to stay on the rail if their size does not match with the filter. And I also added a ~0.50 mm tolerance due to the manufacturing issue.
![](https://i.imgur.com/ubwzNPt.png)
Figure 8: Coin Rail v1 Sketch

![](https://i.imgur.com/WByArYE.png)
Figure 9: Coin Rail v1 CAD model

- Coin Storing - Coin Bay
I designed a coin bay for 4 different sizes of coins. There are rectangle slots on the side of the coin bay wall which helps the operator to observe and remove coin jamming easier. Also, it provides an intuitive indication of how many coins the coin bay has.
![](https://i.imgur.com/UGUgiO5.png)
Figure 10: Coin Bay v1 CAD Model

- Push Bar
I considered the thickness of the coin and made a conclusion that the thickness of all coins is between 1.30mm ~ 1.75mm. This means in order to dispense one coin at a time, the slot height must not exceed 2.60mm otherwise the thinnest coin (Dime) will be pushed out of the system more than one coin at the same time.

- Prototype I Design Summary
![](https://i.imgur.com/4X3FbZo.png)
Figure 12: Prototype I Exploded View

![](https://i.imgur.com/kfikgw8.png)
Figure 13: Prototype I Section View

![](https://i.imgur.com/JRax0UR.png)
Figure 14: Prototype I CAD Design

![](https://i.imgur.com/bEfUvfn.png)
Figure 15: Prototype I Fabrication

#### Prototype I Testing Outcome
The idea of the Mechanical Sorting Unit and the Mechanical Coin Output Unit is proven to be applicable. The current design of the Coin Rail with 10 degrees tilted aside is insufficient for applying gravitational force on the coin in order to drop it into the coin bay. Coin Rail with 30 degrees decline is more than efficient. Which speeds the coin too fast at the end
Testing Video: https://youtu.be/2cQ6RTAUb78

#### Prototype I Conclusion and Improvements
1. Mechanical Ideas are proven applicable
2. Tilt the Coin Rail from 10 degrees to 25 degrees
3. Reduce the incline of the Coin Rail from 30 degrees to 15 degrees
4. Extend the length of the Coin Rail and Coin Bay by 15%


### Prototype II
#### Prototype II Testing Objective
From prototype I, the main mechanical ideas including coin rail, coin bay, and coin dispensing push bar are proven to be applicable. Building on that, I rationalized the testing objective of prototype II to be:
1. Examine the effectiveness of Laser Cutting on Acrylic
2. Redesign and examine the new design of the Mechanical Sorting Unit (coin rail) and Coin Storing Unit (coin bay)
3. Examine the applicability of electrical components
4. Testify the electrical components assembly

Note that the electrical system in this phase is intentionally isolated from the main development in case the development sequence failed to match up with the timeline.

#### Prototype II Systems
1. Coin Sorting System
    a. Coin Rail v2.0
    b. Coin Bay v2.0
    c. Coin Rail Guide Plates
2. Coin Output System
    a. Mechanical Coin Output Unit (Bay Base)
3. Electrical System
    a. LCD I2C Output
    b. Servo Output
    c. Number Pad Input
    d. IR Sensor Input
    e. Arduino Algorithms

![](https://i.imgur.com/P4KMyxK.png)
Figure 16: Prototype II All System Overview

- Coin Sorting - Coin Rail v2.0
From the Conclusion of Prototype I, I upgrade the coin rail by reducing the decline angle and increasing the tilting angle. I also added a feature on the insert slot side of the coin rail which is exactly 15 degrees from the tilted angle. This design allows me to observe and calibrate my coin rail when I fabricate it in case the angle is off.
![](https://i.imgur.com/C9X4vN3.png)
Figure 17: Coin Rail v2.0

- Coin Sorting - Coin Bay v2.0
I added chamfers on the edge of the coin bay to help guide the coins falling into the bay smoother and reduce the jamming probability.

![](https://i.imgur.com/nJYbgsi.png)
Figure 18: Coin Bay v2.0

- Coin Sorting - Coin Rail Guide Plates
From Prototype I, I’ve been facing difficulty in assembling parts because prototype I was made of cardboard. The thickness of the cardboard is inconsistent and too thin to be considered and that causes the part really hard to assemble. Thus, an enhancement was made in which I isolated the middle separation plates into individual pieces. Each of them has the same decline angle and tilting angle as the coin rail which helps me to calibrate the coin rail when assembling it. This is different from the original design in the prototype I in figure 12 where the separation plates were directly fixed onto the coin bay because that’s easier to print without the need of
assembling.

![](https://i.imgur.com/z7tWAE1.png)
Figure 19: Coin Rail Guide Plates Assembled

![](https://i.imgur.com/WtNuw8F.png)
Figure 20: Coin Rail Guide Plates Exploded

- Coin Dispensing - Mechanical Coin Output Unit (Bay Base)
The Coin Bay Base is as explained in prototype I which the thickness for this design is intentionally limited within 2mm. And the width of each slot is determined by the coin width +2mm tolerance in case the coin or the push bar gets jammed when dispensing.
![](https://i.imgur.com/VSymEZN.png)
Figure 21: Coin Bay Base

- Electrical System - Components
In the electrical system, I started by finding the components that I need. Mainly, I need something to sense the coin, something to dispense the coin,
something to show the coin, and something to get the number of coins I want. Thus, I came up with a solution for this problem. I bought these components
from Amazon and testify them in Prototype II developmental phase. As for the development board, I chose to use Arduino MEGA 2560 which provides the most GPIO which reduces the amount of work for me to wire things.
![](https://i.imgur.com/VDQUyN1.png)
Figure 22: Electrical Components

- Electrical System - Algorithms
As mentioned above in Prototype II testing objective, the electrical system development is isolated in prototype II which only testify the components’ applicability but did not integrate them directly into the system. I started by designing a simple logic for the system, imagining the way it functions:

![](https://i.imgur.com/XRufetG.png)
Figure 23: Conceptional System Algorithm Overview

After the coin is deployed into the system, once it gets distributed by the coin rail and falls into one of the slots, the coin will reflect the infrared light back to Infrared Sensor (IR Sensor) will sense the motion and send the signal to the Arduino board. Every time when this mechanism gets triggered, the coin count integer in the algorithm gets 1 number more where n = n+1. On the other hand, the digital inputs from the number pad should allow the user to determine the coin type they want to dispense and also be able to select coin amounts for that particular coin type. In each dispensing mechanism, the coin count should decrease by 1 where n = n-1.

![](https://i.imgur.com/XZKVuVD.png)
Figure 24: System Algorithm Full-Overview

When initializing the system, the calibration triggered which set all servos back to their original place and set all parameters back to 0. In the right bottom corner, here I used a while loop to filter out the unreasonable digital input in order to get the correct data type of input. For example, if a user presses A, and selected coin type - dime, while loop is used to prevent the system triggers an error when the user presses A again by filtering out “A” input after A has been selected before.

For the servo, at the beginning of the testing sequence I faced difficulties when I try to calibrate the servos, they will execute the same angle again and again if there was no new signal to replace the current command which causes damage to the servo gears. To prevent this, I attach the servo every time I want to use them and detach them right away after they’ve done their job to prevent what’s mentioned above.

**Access Link to Full Code:** https://hackmd.io/@aaronwu052002/H1btMHoDi

- Electrical System - Preliminary Integration
The most difficult part of this project is actually bringing conceptual algorithmic ideas into reality and collaborating with the physics mechanisms. The collaboration consumed the most amount of time as one failure would trigger the entire reiteration loop. In order to efficiently reduce that, I designed schematics before the integration phase started to rationalize the relationship between different parts of the system.

![](https://i.imgur.com/bXRbONO.png)
Figure 25: System Conceptual Schematic

![](https://i.imgur.com/p9Y676y.jpg)
Figure 26: Electrical System Preliminary Assembly

![](https://i.imgur.com/zTyNYns.png)
Figure 27: Full Electrical Schematic

#### Prototype II Testing Outcome
- Coin Rail v2.0 Testing Outcome
I faced a challenge when testing this coin rail, where there are bumps caused by 3D printing extrusion in the middle of the rail that interrupts coin sorting.

**Coin Rail v2.0 Failing Video:** https://youtu.be/2aFkZRAaxJQ




| Figure 28: Coin Rail Extrusion Bump | Figure 29: Coin Rail Extrusion Bump after Grinding | 
| -------- | -------- | 
| ![](https://i.imgur.com/aCQVLCl.png)     | ![](https://i.imgur.com/cV3ZlmI.png)     | 

As the solution, I used Dremel to grind off those two bumps in the rail to make the surface as flat as possible. Moreover, I designed an acrylic rail cap to prevent the coins from jumping off the rail.

![](https://i.imgur.com/LqA1ahZ.png)
Figure 30: Coin Rail Cap

- Coin Bay v2.0 Testing Outcome
Coin Bay v2.0 printed and worked greatly.
![](https://i.imgur.com/iEqV0d0.png)
Figure 31: Coin Bay v2.0 Fabrication

- Electrical System Collaboration Outcome
The electrical system collaboration was successful I collaborated IR sensor and LCD I2C Display algorithm before heading into the final phase.
![](https://i.imgur.com/9R8hLVD.png)
Figure 32: Collaboration Code

- Prototype II Final Assembly Testing Outcome
As mentioned above in the Prototype II Systems, the design of Coin Rail Guide Plates is to help
me to assemble the prototype easily with precision. And it turns out that it worked pretty well
when assembling it.

![](https://i.imgur.com/LPCvfYc.png)
Figure 33: Prototype II CAD Model

![](https://i.imgur.com/dCseNbd.png)
Figure 34: Prototype II Fabrication

**Access to the testing video of Prototype II:** https://youtu.be/b1-Wcn3EVUI

#### Prototype II Conclusion
For Prototype II, the focus is to optimize the mechanical design and to start up the electrical system development. Based on the experimental results we received from building Prototype II,I concluded that:
1. Coin Rail v2.0 works. No update is required.
2. Coin Bay v2.0 works. No update is required.
3. Coin Rail Guide Plates work.
4. Electrical System is applicable. All components testified.

## Final Product
### All System Overview
The final version of the coin dispenser of project CROSS consists of four subsystems that collaborate with each other to form a comprehensive system that follows the initial design requirements and design concepts.

In this final phase of the project, I added structural design to assemble every subsystem in one piece, especially for helping the electrical system to be integrated. Also, the electrical controlled dispensing system has been integrated into the system, which uses kinematic joints to convert rotational motion from the servo into linear motion.

Here I created an overview flowchart for all systems to elaborate on the relationship between different subsystems. The solid line indicates the direct upper-lower relationship in each subsystem and the dashed line indicates the collaborative relationship that requires communication between each part.

![](https://i.imgur.com/2AyY5JC.png)
Figure 35: Final Version All System Overview

### Sorting System
Nothing has changed for the sorting system in the final version. As previously described in the prototype II conclusion, the coin rail, coin bay, and coin rail guide plates design has been finalized.

### Dispensing System
As mentioned above, the servo mechanism has finally been integrated into the system to replace the manual push bar dispensing mechanism. By utilizing the Slider-Crank Mechanism, I was able to convert the rotational force exerted by the servo into linear force which pushes the coin in the coin bay out from the coin bay base.

![](https://i.imgur.com/WjcE83c.png)
Figure 36: Slider-Crank Mechanism Explanation

More, because the slot is only 2mm high, there will be no more than 1 coin get dispensed at the same time.

![](https://i.imgur.com/3UIj8jB.png)
Figure 36: Final Dispensing sys. CAD model

![](https://i.imgur.com/a98fakD.png)
Figure 37: Final Dispensing sys. Fabrication

There were two difficulties when I approached solving this particular problem. The first problem knocked on the door was the insufficient length of the rotational radius. Because the servo arm provided by the commercial servo is actually too short for the mechanism to apply sufficient linear motion, I had to extend the rotational radius to solve this problem. For that, I designed and 3d printed the servo arm extension which the original commercial servo arm can directly fit into it and the design came with an M3 hole designed for the servo rod to be integrated in the extension in order to solve the problem.

![](https://i.imgur.com/kk9RPDM.png)
Figure 38: Arm Extension Sketch

![](https://i.imgur.com/gVyXiKQ.png)
Figure 39: Arm Extension CAD model

![](https://i.imgur.com/Exwsmsp.jpg)
Figure 40: Arm Extension Fabrication and Installation

The second problem I faced with the servo dispensing system was the problem of the push bar misplacement. In my original design for this mechanism, I planned to make the push bar one-directional fixed into the coin bay base like point b shown in figure 36. However, this design causes more problems including push bar misplacement, getting stuck in the coin bay, and for the worst scenario the entire servo will just pop off as the force it exerted onto the coin bay cannot be converted anywhere else due to the push bar jamming. I solved this problem with 2 approaches:

For one, I applied fillet on the edges of the push bar to reduce the chance that the corner of the push bar stuck in the wall of the coin bay base again. I also added an M3 hole on the tail of the push bar for it to connect directly to the servo rod.
![](https://i.imgur.com/HnQJnSa.png)
Figure 41: Push Bar

For two, I designed and 3d printed a new calibration holder specifically for the push bar to fix them into one directional motion before they even enter the coin bay.


![](https://i.imgur.com/aaggNY1.png)
Figure 42: Push Bar Guide 



These two designs for the push bar helps me to calibrate and fix the push bar in the right direction and reduce the probability of causing jamming.
**Coin Dispensing Video: **https://youtu.be/KWWpQUrZgVc

### Electrical System
The electrical system has completed the preliminary assembly before entering the final phase of the project. From there, my only job in the final phase is to integrate them into the system and connects all the wire following my design in the schematic. 
Before putting them all together collaboratively, I tested each of the components again to make sure there wasn’t anything that is broken.

![](https://i.imgur.com/7c6egz0.jpg)
Figure 43: Electrical Integrating Evolution

For IR Sensor, I used hot glue to fix them on the top of the coin rail guide plates to sense any coins that fall into the hole. Each sensor specifically counts the specific coin type, this allows me to not only calculate the total amount of coins but also count the coins for each coin type.

For the Arduino board, I measured the dimensions of the Arduino MEGA 2560, designed, and 3d printed a MEGA 2560 board holder for two reasons: First, to lift the bottom of the board from the ground in order to prevent some physical damage to the board. Second, to not directly glue the board onto the structure but instead, glue the holder onto the structure and allow us to use only screws to fix the board onto the holder which provides the possibility of removing the board.
![](https://i.imgur.com/8yVyAwl.png)
Figure 44: Arduino MEGA 2560 Holder CAD Model

As for the LCD I2C Display and Keypad, I designed a user panel to integrate them together which forms a user interface, and put some stickers to label the meaning of the keypad.

I designed four M3 holes in the corner which aligned with the LCD Display for future use. It turned out that I don’t even need to use a screw, the friction is enough for holding the display onto the panel. I also designed a 5mm*30mm slot at the bottom of the panel which allows the wire of the keypad to go through and provides the neatness of the user interface.

As for the attachment, I simply used plastic epoxy to attach the panel to the wooden base structure just like what I did for the previous gluing section.
![](https://i.imgur.com/AvBQOGD.png)
Figure 45: User Panel CAD Model
Figure 46: User Panel Fabrication

**Coin Counting Video:** https://youtu.be/P4u3DZS7LgM

### Structure
The structure is the sole new thing in the final phase which requires sturdy fabrication holding everything in one piece. I started by designing the top panel which I integrated the servo placer and the coin bay onto the same surface. As for the side, a cable hole was designed for the cable from the user interface can directly run through and enter the electronic bay.

I laser-cut the plywood with jigsaw edges and applied wood glue in it to reinforce the strength of the structure. More, I painted the entire structure with gloss white spray paint to provide a smoother surface. And the reason for choosing plywood is because it’s relatively cheaper than what I previously thought of using acrylic.

![](https://i.imgur.com/5CMlC3o.png)
Figure 47: Base Structure CAD Design

![](https://i.imgur.com/tiajCIo.png)
Figure 48: Base Structure Fabrication

### Design Analysis
1. Overview
![](https://i.imgur.com/4wdO8BL.png)
Figure 49: Final Assembly CAD Design
![](https://i.imgur.com/7Wlp0dv.png)
Figure 50: Final Assembly Fabrication

**Animation Video Link:** https://youtu.be/clSc8fnFcYE

2. Explosive View and Part Lists
![](https://i.imgur.com/9SX4hHm.png)
Figure 51: Explosive View and Part Lists

3. Assembled Part
![](https://i.imgur.com/A12f8CS.png)
![](https://i.imgur.com/3VY4mvS.jpg)
![](https://i.imgur.com/nKAiOHg.jpg)
![](https://i.imgur.com/nFHrD7D.jpg)
![](https://i.imgur.com/Ffis4bS.jpg)
![](https://i.imgur.com/uoU7DcR.jpg)
![](https://i.imgur.com/tzf1izX.jpg)
![](https://i.imgur.com/eudHjvr.jpg)
![](https://i.imgur.com/PW3WaGV.jpg)
![](https://i.imgur.com/i4h27EF.jpg)
![](https://i.imgur.com/mIWC2dv.jpg)
![](https://i.imgur.com/QyZlIUc.jpg)
![](https://i.imgur.com/00yi3XH.jpg)
![](https://i.imgur.com/unD4o9n.jpg)


## General Information
### General Development Timeline
![](https://i.imgur.com/Lfp4Wzr.png)
### General Development Sequence
![](https://i.imgur.com/dBNFlOZ.png)


## Summary and Conclusions
Project CROSS began with the request of the customer Carolyn Robinson who provided requirements and constraints for the development of a tool. From the initial design idea, I carried the thoughts and brought them into reality by strictly following the systematic timeline I developed at the beginning of the project. The manipulation of the project timeline turned out really well, which provides me to generate more content for the project. From prototype I, I testified that the mechanical approach of sorting and dispensing coins is applicable. Based on prototype I, prototype II is developed in a way to optimize the original design and at the same time examine the applicability of the electrical system before the decision point.

This ambitious project ended up in its best way and all systems successfully operated without any deadly trouble. Sorting System sorts the coins with minimum error occurrence, storing System never gets jammed dispensing System is operated efficiently and never gets jammed. counting System counts coins despite sometimes it will missense the dime since the reflecting area is too small.