Mechanical Design and Analysis Group Project: Built to Change


Andrew Overby
12 / 7 / 2017

As part of the ME 223 Mechanical Design and Analysis curriculum, we were given groups mid way through the semester in order to create a project that could: help the general public, use any kind of sensor to tell the device when to perform a task, and use a mechanical device to carry out that task.

My group consisted of three others: Luke Johnson, Alyssa Keyes, and Lane Scroggin. At the beginning of the project, we were required to create a proposal which needed to be approved by the professor to carry on the project. An important thing to consider while brainstorming ideas was the scope of the project. Although there are countless avenues we could have embarked on, the time frame is what limited the potential.

We decided on creating an automated coin sorter and counter. The idea sounded simple; however, we soon came to find out it was no easy task.

Our project proposal can be seen below:

A quick representation of what we wanted to achieve can also be seen below:


For the project, we were required to create a math model, 3D printed part, a sensor, any kind of motor, and Arduino integration. The University of Idaho provided each team with a $55 reimbursable budget. Our team decided to meet biweekly; once on Tuesday to prototype our product, and once on Thursday to catch up and see what needs to be done over the weekend. A member was in charge of the action register and scheduling what needed to be done before every meeting. Having this schedule saved us from falling behind, and it helped keep the group motivated by staying on track.

Our first deadline was in two weeks, so it was immediately to the drawing board. At our first meeting, we began by drawing out ideas to make sure we were all on the same page. I created this rough sketch and it was agreed upon the group that this was the rough avenue we would pursue.


Early Development 

Our team stuck with primarily drawings to stay on the same page. It was hard to visualize everyone's ideas at first and creating 2D representations of the device helped clear those gaps.

The DC motor would be used as a means to vibrate the machine in order for coins to fall down the chute quicker and to help the coins from stacking on to each other when they are dumped in the hopper. We chose that the best way to read the coins would be through a photo interrupter. Essentially, the coin was to fall down a chute (our 3D printed part) where the bigger coins would fall on the end and the smaller coins at the beginning. This allowed the big coins to slide over the little coins’ slots.

A member created a math model describing how the larger coins will fall quicker. This was extremely helpful because if a dime or penny was to get stuck due to friction, the larger coins would help push them down their designated chutes. Once the coins were falling into their designated slots, that is when the photogate would be triggered. These signals would then process through the Arduino to where calculations and other commands would be made in the microcontroller.

Photogates are the main aspect in our product. Without them, our coins would not be counted and displayed on the screen; therefore, it was very important that we did them right the first time and performed the research to do so. We decided to go with a HY301A photogate not only for its compact size, but its common uses with Arduino. We wanted to choose a device that was already proven and would not take any second guessing once we purchased it.



Provides easy fitment with its size and a small break beam sensor perfect for sending coins through. 

For prototyping, we began by using TinkerCad, a free online software that allows users to create trinkets and wiring diagrams with Arduino integration. You can also test if your circuit works which proved to be extremely helpful for us down the road since we would not have to troubleshoot with the physical wiring later on (as so we thought). The circuit diagram created in TinkerCad is shown below.


We thought that a potentiometer would be the best way to control the motor at first since we were not sure what speed would be ideal for the system. We would later pinpoint that speed, measure the resistance, and use a PWM signal from the Arduino to go directly to the motor.

At first, we assumed that the photogate was wired up exactly like a push-button switch. In Tinker-CAD, this is how we automated the design. After finally attempting to wire up the photogate, however, that was not so. It turned out that the photogate had to have power supplied to both sides of the nodes. Although the pulldown resistor concept was the same for the photogate as the tactile switches, power had to be going through both sides and not just one to work. This was because the infrared beam had to be powered on both towers. The proper wiring for the photo interrupter is shown on the HY301A data sheet in the photo below:


Photo Interrupter Diagram

This diagram proved to be extremely helpful when prototyping. It helped solve our wiring issue with the photo gates quickly and effectively.

For all of our coding, I used the Arduino IDE open source software. This provides an easier means of C++ coding through the use of libraries directly interfaced for Arduino. It proved to be an enormous time saver by being able to incorporate these features. This is where all of our calculations would be made and how we would program the buttons, motor, photogates, and LCD screen.

A simple yet effective way to make our product even better was through the use of the Arduino’s memory. EEPROM is essentially a small 1KB hard drive on the Arduino that can store integers, floats, or any other type of variable in your Arduino code.

The code is very simple for this process, for all you need are two commands and setting integers to store and access your values. One thing someone must realize is that different types of variables take up difference amounts of space. A byte (any number from 0-255) will take up one byte of space while an integer (about -200000 to 200000), will take up two bytes of space. It is important to note that when naming the variables about which space of memory these values will be assigned to, to take into account the type of data you will be storing. For example, in our code:

int addrD = 0;
int addrP = 2;
int addrN = 4;

Notice above how we used intervals of 2 to store our data.
Commanding the arduino to store these values only took three steps: first you must access the library <EEPROM.h>, then in order to access values from your last session, use EEPROM.get(memorySpaceValue, variableToWrite); in order to write new values that override the old EEPROM variables, simply use EEPROM.put(memorySpaceValue, variableToWrite).
For more information on EEPROM and all the commands, visit the Arduino forum below:

Here is a quick summary of the code we used in the project including the dimes portion only. You  can also reference the full code as well.

An issue I kept running into with the circuit was continuous feedback on the LCD screen when the motor would turn on. After hours of troubleshooting, it turned out to be a simple ground issue. To fix the problem, I isolated the ground connections going to the motor; therefore, it would not create any feedback throughout the circuit. The revised circuit is shown below:


Original Circuit

TinkerCAD provided a great basis for our circuit design; however, we still ran in to issues with the circuit proving that no method can cut out errors completely.

Other groups seemed to have the same issue as well, and the best solution turned out to be a different motor. For some reason it was the DC motor that came in our Arduino kits that was creating all the feedback. Instead, we decided to use an old Xbox controller vibrating motor instead, which made the other DC motor look obsolete.

At this point about a week had gone by and next up was the assembly. We used cardboard as our first go, and it gave us a good idea on how everything would go together in the future. The coins would fall through their chutes onto a ramp that would direct them into their specified slots as seen below.



Our initial design used a mechanism that allowed the coin to slide down the ramp and through the photo gate. This provided issues later on because although the coin was falling into its chute properly, it would sometimes bounce around and not pass through the photo gate.

3D printing the part for this deadline proved to be a challenge, for we could not find a time period within the 2 weeks where 3D printers on campus were not reserved. However, we did have a working circuit with the code integrated which proved to be a step ahead of the other teams at this deadline. Pictures of the circuit for deadline two are shown below.

Essentially, the Arduino Uno has two ground pins. One is attached to the digital pins and one is attached to the power pins. By only attaching the LCD to the digital pin ground and all the other components to the power ground, the feedback on the LCD screen was lost and the problem was solved.

Essentially, the Arduino Uno has two ground pins. One is attached to the digital pins and one is attached to the power pins. By only attaching the LCD to the digital pin ground and all the other components to the power ground, the feedback on the LCD screen was lost and the problem was solved.

After the first deadline, we were required to evaluate our team performance. Our team was running strong. I felt like we were much ahead of all the other teams. However, we were having trouble with a group member who was not showing up to meetings and was not completing the assigned tasks. Knowing this would be prove to be an issue, we talked things over and thought of ways the issue could be fixed and came to a conclusion on what would work best.

For the second deadline out of the three, we were required to use more permanent materials in our design and the object was to present good functionality with only minor bugs present. We all agreed that the best way to create our assembly would be through laser cutting. A member was in charge of creating the CAD sketch for our first laser cut prototype. We used tabs in order to lock the pieces together. We also wanted to create an easy way for users to retrieve their coins after they were sent through the system, so we made a small drawer that the user could pull out of the front of the device. A PDF of the original sketches for laser cutting can be seen in the file below.


Original Laser Cutting Drawing

This file was a great start to our assembly; however, we learned that it is very important to assemble everything in 3D and not take chances with the parts fitting incorrectly.


As seen in the sketch above, there would be a housing for an LCD screen and a few buttons. The buttons would power on the device, reset the current data, and tell the user specific coin values. For example, the user will have the ability to know how many dollars in just dimes they have. We also created a battery drawer to allow easy access to the 9V that powered the motor.

We ran in to a lot of fitment issues with our first laser cutting attempt. Not only that, the assembly was not quite what we wanted mechanically nor physically. It was not sturdy, the coins did not move through the hopper well, and it did not look to great either. However, this was only for our second deadline, and although we wanted to see it come out great, it was a learning experience for the next time we were to cut. The hopper, below, was our biggest issue because it was not feeding the coins into the chute as we were expecting. Instead, it was clogging up the system. We did not have enough time to fix all of these issues before the second deadline, but we were determined to fix it as soon as possible.

The hopper was not organizing the coins properly. Its task was to file the coins into single-file so they would fall down the chute effectively. The coins continued to clog up at the end of the funnel and would not fall down the chute.

The hopper was not organizing the coins properly. Its task was to file the coins into single-file so they would fall down the chute effectively. The coins continued to clog up at the end of the funnel and would not fall down the chute.

For the second deadline, we thought is would be a good idea to solder all of our wiring together. The use of a breadboard was huge because it helped being able to picture how the wiring would go together when putting it onto PCB board. All issues that I came across when soldering were with connections that proved to be an easy fix once pinpointed. The photogates all belongs to their own piece of PCB, while the motor and power control belonged to its own as well.

Overall, I was happy with our performance for the second deadline; however, seeing some of the teams making more progress this time around gave even more determination to bounce back for the final deadline.

It was time to start prepping for deadline 3, the mini expo, and we had a lot on our plate. It was tough figuring out how to split everything up because it was so much but we came to the conclusion that a member would work with the 3D printed part, a member would work on the portfolio, and I would work on creating the new laser cutting assembly.

The third deadline was fast approaching and we began with the laser cutting. We needed to make revisions to fitment, but also needed to incorporate more into our design to improve off of the last assembly. We wanted to create an easier way for the user to see the screen, since it was difficult when it was parallel to the face of the wall. We decided to put it at an angle that way it would be readable from the average level the user would be using the coin sorter from.


Revised LCD Housing

By creating this angular design for the screen, the user can press the buttons easier than before and it creates less glare on the screen when in direct light. 

A model for 2D design of the parts is shown below. Each cut was assigned to its own 12” x 24” sheet of 1/8” thick Baltic plywood in order to fit the parameters of the laser cutter.

This time, the laser cutting came out almost flawlessly. We were even able to use the engraving function on the machine to help indicate the buttons on the device.

After assembly, all that was left were the final touches. This included some rubber feet to keep the device from vibrating on the table, fitting the wiring accordingly inside the assembly, and product testing to make sure no last-minute changes needed to be made. Our final budget came in only five dollars above our max. If we were to prototype more efficiently; however, we would have not gone over budget.


To complete the project, we created an instruction sheet on how to use it.


Overall, I was very pleased with the performance of the group and the amount of project learning from this experience. It was a great to be exposed to the project environment and understand what works and what does not in a group setting.

  • Key learning points:
    • Develop early and often
    • Communication is key
    • Bounce back through struggles
    • Never assume 
    • Enjoy your work