The Filler Upper

by eitafilemoni in Circuits > Arduino

320 Views, 1 Favorites, 0 Comments

The Filler Upper

filler upper.png

Authors:

Nora Anastasi - eanastasi.uni@gmail.com

Bowen Fei - bowenfei20@gmail.com

Eita Filemoni - eitafilemoni@gmail.com

Acknowledgements:

California Maritime Academy - Engineering Technology

Dr. Evan Chang-Siu - ET370 Professor

Ben Bashor - ET370 Tutor

Marty Kulmus - Electrical Engineer

Erin Cole - Cal Maritime Makerspace Coordinator

The Main Idea:

The legal drinking age in America is 21 and over. Any person younger than that age is not allowed to buy or drink any alcoholic beverage. That said, this project was created to ensure that there is no illegal underage drinking happening under your watch. It was designed so that when one’s birthday is inputted into the button keypad, a sequence of events will happen. If 21 and over, the Arduino will activate the level sensor which will read the level in the cup and then communicate with the Arduino to start up the pump and begin filling the cup. However, if the birthday that was inputted indicates that the user is under 21, there will be no filling of the cup. Attached below is the link to a YouTube video that goes into further detail as to how the Filler Upper operates.

Click here for video

Supplies

Below is a list of materials needed to implement this project. In the parentheses to the right of each component is the material needed for each specific product. Links for the items that were bought online are provided below as well.

1. Peristaltic Pump (1)

2. Real Time Clock (1)

3. Real Time Clock Batteries (1)

4. Diode (1)

5. 10k Resistor (1)

6. 320 Resistor (1)

7. NMOS Transistor (1)

8. Ultrasonic Sensor (1)

9. LCD Screen (1)

10. 12V Power Source (1)

11. Raw stock of about 1/4'' thick acrylic and wood material (1)

12. Laser Cutter (1)

- Used to cut the raw material and make into tiles to case project

13. Zip Ties (as needed)

14. Jumper Wires (as needed)

15. Pump tubing (1 coil)

16. PCB Board/Breadboard (1)

17. Soldering Tools (1)

- Only necessary with use of a PCB board

- If using a breadboard, soldering tools are not required

CAD Files and Project Code

Attached are the files that were used to make the casing of the project. The entire project was designed with using a laser cutter in mind. Also attached is the entire project code.

Project Functionality

functionality.png

Here is an image that illustrates the functionality of the project. As seen in the image, if anyone under the age of 21 were to enter in their birthday, the LCD screen would read "Child Alert! No drink for you" and they would not be able to fill their cup. For the users that have entered in their birthday and are indeed 21 and over, the LCD screen will read "Congratulations! How full would you like your cup?" When that message displays, the user will be able to choose a fill amount using the A, B, C, and D buttons. The four fill options are 1/4 full, 1/2 full, 3/4 full, and completely full.

Electrical Circuit Diagram

electrical diagram.JPG

Above is an image showing how the electrical components of our project were wired up and where each piece was connected.

For clarification, the pinouts for the NMOS transistor are as follows:

Gate - one leg of each of the 2 resistors

Drain - one leg of the diode

Source - jumper that connects to the ground of the pump motor

Power Consumption

The LCD screen that was used for this project runs on 5V, consumes 1.1mA and draws 5.5mW. The peristaltic pump is 12V, consumes 80mA, and draws 960mW of power. The level sensor that was used is 5V, consumes 15mA, and draws 75mW of power. The real-time clock (RTC) runs on 5V, consumes 4mA, and draws 20mW. The total power draw is 1.06W and the 12V power source that was used was able to supply more than enough power to run the project since it has 24W of power available.

State Machine

state mach diag.png

For this project, there are a total of seven states. The first state is the machine's "Do Nothing" state and how it appears upon start up. The LCD screen will prompt the user to enter their birthday using the button keypad.

The next state after is where the user's age is checked. Once the age check is done, there are two possible situations that can occur. If the user is under 21, it will go to the seventh state and will not fill up your cup. After some time passes, it will return to the first state and ask the user to input their birthday. If over 21, it moves onto the third state which is where the LCD will display a message that congratulates you. At the third state, the user will move forward to the fourth state.

The fourth state is where the level sensor is activated and the user will be prompted to choose a fill amount. Once that fill amount is chosen, it goes into the fifth state which is where the pump turns on and begins filling the cup after the level sensor reads the level in the cup and tells the Arduino. Once the cup is done being filled, it will then move onto the sixth state and display "Drink responsibly." Once two seconds passes, it will return back to the initial state and the process will start itself all over again.

At any point during states three, four, and five, the user has the option of cancelling out their request by pressing the star button. By pressing the star button, it will return back to the first state.

Code Snippets

Since we had so many electrical components, we started off by first working on getting each electrical component to work individually and then coding it so that it would communicate with one another. This can be seen in the two code files that are attached. One of the code files is the individual code for the LCD Screen and the other is the individual code for the Level Sensor. This helped us in staying organized and being able to know how and what made each component work in the way that we wanted it to.

CAD Drawings

Drawing of Project Body.png
Drawing of Stands.png

These are the CAD drawings for the main body of the project and the stands which held the body together. All the measurements seen are in inches. The circular hole to the right of the board is where the pump was placed. The rectangular hole in the middle at the top of the board is where the LCD was mounted, and the rectangular hole in the bottom left is where the wires for the button keypad went. We had cut out the project body using both plexiglass and wood. The plexiglass went on top of the wooden board.

The stands are in a simple "T" shape. Its main purpose was to hold the boards together and make sure it would stand in an upright fashion. Unlike the project body, we only cut out the stands from the plexiglass. When cutting out the stands, it is important to keep in mind that the width of the cut-out portion took into account the depths of both the plexiglass and wooden blocks.

Manufacturing and Assembling

20210430_123931.jpg
20210428_153843.jpg
20210430_143608.jpg
20210505_211757.jpg

After cutting out all the necessary pieces with the laser cutter, it is now time to assemble it altogether. Since we had cut out the project body using both the plexiglass and the wood, we had to glue the two boards together. Once the two boards were glued together, we had to work on the back.

On the back of the board is where the Arduino, perf board, and the real-time clock went. The files that are attached and are labelled Arduino Bottom, Arduino & PCB Sides, and PCB Bottom are the pieces that will make up the casing to hold said pieces. These pieces were all glued down using wood glue.

Once the glue has set and dried, the next step is to glue the stands to the boards. The stands were glued with Super glue.

The last piece is to glue the mount for the level sensor. The mount was cut out of the plexiglass material and was glued down to the front of the board using Super glue.

The final step for the manufacturing process was to drill any holes that are needed for the wiring to go through.

Conclusion

Upon completion of this project, there were a lot of things that we learned and took away as a group. After discussing with one another, we also found some things that we believed we could have improved on in the implementation of it.

If we were to do this project over again, there are many improvements we felt that we could make. A lot of the improvements that we could make have to do with the specific items that we chose to buy and the overall design of it. Some examples of those "poor" purchases being the pump and tubing we had bought. We would recommend buying a faster pump and using straighter and a more pliant tubing. As for improvements to our code, the only improvement we felt that we could have made would be to showcase the numbers while they are being entered into the button keypad and display it on the LCD screen. This is mostly to show the user what numbers are being entered into the machine since we had a lot of difficulty trying to figure out if and when a button was pressed.

This project used a lot of coding in order to get the many electrical components communicating to one another and as a result, we were able to gain more experience in coding and had the opportunity to increase our skill in it. We also improved our skills in using CAD and with using a laser cutter. Our biggest takeaways though are patience and Murphy's Law. It is important to realize that not everything will go your way, but continue to push through and troubleshoot your way through it.