Idea and inspiration:
My project idea is a smart coins box that dispense and sort coins automatically. I got this idea at high school (long far away!), as I noticed that carrying coins have several challenges like:
they get lost more often than banknote
the are heavier and harder to count and sort
So, making a box that can carry them in a more ordered and easily accessible way will be great especially for people that deals with coins more frequently (as different stores, pharmacies, etc.)
Similar projects:
this is a project that sort coins but without counting or dispensing
software I used:
Autodesk Fusion 360
Websites:
Grabcad
Design process:
Firstly, I designed the inner parts of the box, so that it will give me an overview about how much space every part will occupy, and their relative position to each others.
Then, I began to design the enclosure according to the measurements of the inner design after using Tinkercad to integrate all the inner components.
Inner parts:
1- Chamber body; I designed it with a size that can have the capacity of not more than 20 to 30 coin as a first version
2- Sorter part:
I tried different mechanisms for the sorting holes shape, then I chose the wide wholes mechanism that depend on the sliding speed of the coin body, which had the least errors and was more reliable. Also, I design walls for the slider to make a tracking way for the coins
3- Chamber despising opening:
I designed this part to give the chamber two functions
to provide an open with the dimensions of one coin, which will have a functionality in the dispensing mechanism
to give the chambers an inner geometry that prevent the coins from getting stuck at the corners, and to always fall on the open
I designed this part to be 3D printed.
4- Chamber supporting bar:
this bar has the function of holding the coins chambers all together inside the box at a suitable position from the other components
4- Dispensing unit:
those are the components which will work in the dispensing mode and they are as follow:
rotating disk, which is placed directly under the chamber open to hold the coin at a specific position, and when the servo motor rotate it, it will drag the coin and make it fall at a specific despising box the lay at the bottom of the box.
servo motors supporter, to hold the motors at a suitable position from the chamber
5- despising box:
which is a small box at the bottom of the chamber to collect the dispensed coins, then the user gram it manually to get the coins
outer part:
1- Box sides:
I designed the sides to have holes for fixing the inner components on them with screw and nuts.
For fixing the sorter at a suitable angle, I tried many angles for sorting, and after reaching an appropriate one, I calculated the required distance between the wholes on the left and the right side to give it the appropriate inclination
2- Box front/back:
I designed the front part with a place for mounting the LCD display and a place for the Keypad; to do so, I downloaded STEP files of those parts from Grabcad, then I imported them into my design, after that I sketched the required mounting places for each components by placing the component over the front body and then project the parts to be mounted on the body.
For the back part, it was identical to the front without any mounting parts.
3- Upper/bottom parts:
for the upper part, I placed the coins entry at a space to be suitable for making the coin fall on the sorter properly.
for the bottom part, I used the project technique to make a mounting place for the Arduino
For all the box parts (inner and outer), I used the tabs and T- slots to integrate all the components with each other.
All the inner parts integrated in fusion 360 using joints property
Chamber opening
Servo motors supporter
Inner components integration with the enclosure
Box front view
Software I used:
1-laser cutter to preparethe rld files of the designs for the laser machine with the cutting parameters shown in the following figure
First step: I fabricated the slider part to test its mechanism and check for errors before going ahead with the rest of the box.
second step: I fabricate the chambers wall and 3D printed the orifice part then integrated them together.
Third step: I fabricated the other inner components and integrated them together to check their fitting
Fourth step: I fabricated the enclosure part to gather the whole box together
Laser cutter setup for fabricating the designs
chambers unit
Slider Part
chambers with the back support
Box enclosure
Box parts before final integration
Software I used:
1- Arduino IDE to write and upload the code to the Arduino board
2- Tinkercad to simulate the circuit
Input components:
1- IR sensors: to keep track of the each coin category number when they pass though the orifices
2- 3x4 Keypad: to get the inputs from the user in the dispensing mode
output components:
1- Servo motors: to control the opening and closing of chambers orifice by controlling the dispensing disc
2- - LCD display: to display each coin category amount and dispensing mode interface
components communication:
the LCD display the amount of each coin category according to the IR sensor reading when a coin enter a chamber orifice
the Servo motor perform the dispensing function when the user enter the amount s to be dispensed through the Keypad and all of this is displayed on the LCD.
wiring:
1- Although each IR sensor in connected to an analog pin, it reads their signal as a digital signal, I just used those pins because the remaining digital pins gives unstable readings
2- each servo motor is connected to either a digital pin that write analog inputs, or analog pins, so that I can control the angle of the servo motors to perform their function
3- keypad connection need 7 pins; 4 for each row and 3 for each column and they are mapped as the following figure.
4- the LCD is connected to an I2C module to make more convenient wiring with the Arduino. It has two pins for data lines; the SLA AND SCL pins, which are connected to 4 AND A5 pins on the Arduino.
3x4 Keypad pins
My power source is a 5V DC adapter, as it provide suitable power supply for the servo motors and the other components
Libraries:
LiquidCrystal_I2C library, for controlling the LCD display
Keypad library, for controlling the keypad
chrono library, for giving stopwatch functionality in a simple way
Servo.h for the servo motor control
Pseudo code:
1- defining and setting up the code for each component
2- in the loop function, display the coins amount of each category and check the IR reading for updating the coins amount
3- defining a function called "dispense", that simply control the servo movement for dispensing
4- check if the user entered the dispensing mode by checking if he clicked on '*' on the keypad
5- if the user entered the dispensing mode, get the amount he want to dispense and set a timer for getting the user input, so that the program doesn't stuck in this mode if the user didn't enter a value
6- after getting the dispensing amount from the user, check if the box have enough coins to dispense these amount by checking each category, and if it has enough amount to be dispensed, dispense it form these category, and if not move to the next category until reaching the 0.25 coin category
7- if the program reached the last category without finding enough amount for dispensing, dispense all the coins that are in the box and print an error message for the user saying that the amount in the box is not enough
Dispensing mechanism
Components integration
Box Front
this question can be a whole journal by itself :D
I asked for help in almost most of the project fabrication steps, the one who helped me a lot in this was Amany the instructor, I can't thank her enough in her efforts with me in troubleshooting fabrication errors (as enclosure fitting errors, slots error, and using the laser machine to edit the fabricated pieces etc.)
when I got stuck in fabrication step I reach Amany mainly for help, but regarding the coding challenges I prefer to do my own search until reaching the solution.
mistakes to be avoided:
1- manage your time wisely and always be prepared for facing tons of errors (things will never ever get right from the first time)
2- when your are in the designing phase; test every functionality unit before designing the next component; because if you modified it this will probably affect other parts orientations and dimensions
as the separating part was not reliable, as I thought, I will work in developing it to be more efficient and have ess errors