Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2023:apredescu:milywaymaker [2023/05/28 22:45]
mara_sofia.stan [Conclusions]
pm:prj2023:apredescu:milywaymaker [2023/05/30 14:36] (current)
mara_sofia.stan [Download]
Line 3: Line 3:
  
 <note tip> <note tip>
-**Name**: Mara Sofia STAN \\ +**Name**: Mara Sofia **STAN** \\ 
 **Group**: 1221A - FILS **Group**: 1221A - FILS
 </​note>​ </​note>​
  
-This Arduino-based system offers a convenient and customizable way to make delicious cocoa milk drinks at home. The project contains a smart liquid dispenser with a keyboard that allows the user to input the desired quantity of milk and a distance sensor that detects the presence of a cup to activate the powder dispensing mechanism. The idea behind this project was to simplify and automate the process of making these drinks and ensure consistent quality every time. MilkyWay Maker is a project that was born out of a love for milk-coffee beverages, such as Nescafe and Nesquik thus I strongly believe that this project is not only useful for coffee lovers, but also for those interested in learning about electronics and programming. +This Arduino-based system offers a convenient and customizable way to make delicious cocoa milk drinks at home. The project contains a smart liquid dispenser with a keyboard that allows the user to input the desired quantity of milk and a distance sensor that detects the presence of a cup to activate the powder dispensing mechanism. ​\\  
- +The idea behind this project was to simplify and automate the process of making these drinks and ensure consistent quality every time. MilkyWay Maker is a project that was born out of a love for milk-coffee beverages, such as Nescafe and Nesquik thus I strongly believe that this project is not only useful for coffee lovers, but also for those interested in learning about electronics and programming. ​\\  
 +\\  
 +{{ :​pm:​prj2023:​apredescu:​nes_mara_stan.jpg?​200 |}}
 ===== General Description ===== ===== General Description =====
  
Line 45: Line 46:
  
 ===== Software Design ===== ===== Software Design =====
 +
 +Here are the features of this setup:
 +
 +  * **User Input**: The keypad allows the user to input the desired volume of liquid. The code reads the input and stores it as the target volume for dispensing.
 +  * **Liquid Dispensing**:​ The flow sensor measures the flow rate of the liquid. The code calculates the amount of liquid dispensed based on the flow rate and time. It keeps track of the total amount of liquid dispensed until it reaches the target volume.
 +  * **Powder Dispensing**:​ The ultrasonic sensor detects the presence of a glass near the machine. When the glass is detected, a servo motor is activated to dispense the coffee powder.
 +  * **Display and Feedback**: The LCD display shows various information such as the input volume, flow rate, and total dispensed volume. It provides feedback messages like "​Insert volume,"​ "​Volume reached,"​ and "​Remove cup" to guide the user through the process.
 +  * **Buzzer**: The buzzer is used to generate beeping sounds during certain events, such as when the volume is entered correctly or when the target volume is reached.
 +
  
 Below is the overall flow and explanation of the code. It combines input from the keypad, measurements from the ultrasonic sensor and flow sensor, and control of the water pump and servo motor to automate the process of dispensing milk based on the desired volume. ​ Below is the overall flow and explanation of the code. It combines input from the keypad, measurements from the ultrasonic sensor and flow sensor, and control of the water pump and servo motor to automate the process of dispensing milk based on the desired volume. ​
  
-  - Include the necessary libraries for the keypad, LCD display, and servo motor( //<​Keypad.h>,​ <​LiquidCrystal_I2C.h>,​ <​Servo.h>//​) and define the pin connections for various components. +Include the necessary libraries for the keypad, LCD display, and servo motor( //<​Keypad.h>,​ <​LiquidCrystal_I2C.h>,​ <​Servo.h>//​) and define the pin connections for various components. 
-  ​Declare global variables for pins, counters, calibration factors, and flags. +<​code>​ 
-  - Call the ''​setup()''​ function to initialize the settings and configurations of the Arduino board and connected components. Set pin modes, attach interrupts, and initialize the LCD display. +#include <​Keypad.h>​ 
-  - Enter the ''​loop()''​ function, which is the main execution loop of the program. It continuously checks for inputs from the keypad and performs actions based on the input. It also checks for the presence of a cup using the ultrasonic sensor and controls the servo motor accordingly. +#include <​LiquidCrystal_I2C.h>​  
-  - Read inputs from the keypad within the ''​loop()''​ function and accumulate them to form a volume value. Display the entered volume on the LCD display. +#include <​Servo.h>​ 
-  - If the entered volume is within the specified range (1000 mL or less), enter the volume dispensing loop. Activate the water pump and calculate the flow rate using the flow sensor. Display the flow rate and cumulative volume dispensed on the LCD display and serial monitor. + 
-  - If the total dispensed volume exceeds the entered volume, stop the water pump, display a message indicating that the desired volume has been reached, wait for a few seconds, and reset the process to allow a new measurement.+const int ROW_NUM = 4; //4 rows 
 +const int COLUMN_NUM = 3; //3 columns 
 +const int thresholdDistance = 5; // in cm 
 + 
 +char keys[ROW_NUM][COLUMN_NUM] = { 
 +  ​{'​1','​2','​3'​},​ 
 +  {'​4','​5','​6'​},​ 
 +  {'​7','​8','​9'​},​ 
 +  {'​*','​0','#'​} 
 +}; 
 + 
 +LiquidCrystal_I2C lcd(0x27, 16, 2);   
 +byte pin_rows[ROW_NUM] = {4, 5, 6, 7}; //connect to the row pinouts of the keypad 
 +byte pin_column[COLUMN_NUM] = {8,9, 10}; //connect to the column pinouts of the keypad 
 +Keypad keypad = Keypad(makeKeymap(keys),​ pin_rows, pin_column, ROW_NUM, COLUMN_NUM);​ 
 +</​code>​ 
 + Declare global variables for pins, counters, calibration factors, and flags. 
 +<​code>​ 
 +const int ultrasonicTrigPin = 12; 
 +const int ultrasonicEchoPin = 13; 
 +const int servoPin = 11; 
 + 
 +int sensorInterrupt = 0;  // interrupt 0 
 +int sensorPin = 2; //Digital Pin 2 
 +unsigned int SetPoint = 400; //400 milileter 
 +int buzzerPin = A3; 
 +String code="";​ 
 + 
 +/*The hall-effect flow sensor outputs pulses per second per litre/​minute of flow.*/ 
 +float calibrationFactor = 40; //You can change according to your datasheet 
 +  
 +volatile byte pulseCount =0;   
 +  
 +float flowRate = 0.0; 
 +unsigned int flowMilliLitres =0; 
 +unsigned long totalMilliLitres = 0, volume = 0; 
 +  
 +unsigned long oldTime; 
 +const int relais_moteur = 3; // the relay is connected to pin 3 of the Arduino board 
 +Servo myServo; 
 +bool objectDetected = false; 
 +bool volumeEntered = false; 
 +bool beepSequence = false; 
 +bool beepSequence2 = false; 
 +</​code>​ 
 + 
 +  -  ​Call the ''​setup()''​ function to initialize the settings and configurations of the Arduino board and connected components. Set pin modes, attach interrupts, and initialize the LCD display.\\ 
   - Call the ''​pulseCounter()''​ function, which is an interrupt service routine that increments a pulse count variable. It is triggered by the falling edge of the pulse from the flow sensor, indicating the flow of liquid.   - Call the ''​pulseCounter()''​ function, which is an interrupt service routine that increments a pulse count variable. It is triggered by the falling edge of the pulse from the flow sensor, indicating the flow of liquid.
   - Call the ''​resetProcess()''​ function to reset the variables and settings related to the flow measurement process. Clear the LCD display, set it to the initial state, and initialize the necessary variables.   - Call the ''​resetProcess()''​ function to reset the variables and settings related to the flow measurement process. Clear the LCD display, set it to the initial state, and initialize the necessary variables.
   - Call the ''​getDistance()''​ function to measure the distance using the ultrasonic sensor. Send a trigger pulse and calculate the duration of the echo pulse to determine the distance. Return the distance value in centimeters.   - Call the ''​getDistance()''​ function to measure the distance using the ultrasonic sensor. Send a trigger pulse and calculate the duration of the echo pulse to determine the distance. Return the distance value in centimeters.
-  - Call the ''​playBeepSequence()''​ function to generate a beep sound using a buzzer. Play a sequence of three short beeps with a delay between them.+  - Call the ''​playBeepSequence()''​ function to generate a beep sound using a buzzer. Play a sequence of three short beeps with a delay between them. \\  
 +**Below I added a .zip file containing a demo video of the project:​** 
 + 
 +{{:​pm:​prj2023:​apredescu:​milkywaymaker-demovideo.zip|}}
  
  
Line 74: Line 133:
 In conclusion, the development of the Milky Way Maker coffee maker machine using Arduino has been a successful project. It has demonstrated the potential of integrating electronics and programming into everyday appliances to automate processes and enhance functionality. The user-friendly interface, sensor integration,​ and customization options make it a versatile and enjoyable coffee-making experience. The project has provided valuable learning opportunities and highlights the possibilities for future innovation in home automation.;​-) In conclusion, the development of the Milky Way Maker coffee maker machine using Arduino has been a successful project. It has demonstrated the potential of integrating electronics and programming into everyday appliances to automate processes and enhance functionality. The user-friendly interface, sensor integration,​ and customization options make it a versatile and enjoyable coffee-making experience. The project has provided valuable learning opportunities and highlights the possibilities for future innovation in home automation.;​-)
 ===== Download ===== ===== Download =====
 +An archive containing the source code and the additional libraries used: 
 {{:​pm:​prj2023:​apredescu:​milkywaymaker.zip|}} {{:​pm:​prj2023:​apredescu:​milkywaymaker.zip|}}
-===== Jurnal =====+===== Jurnal ​Log =====
  
-<note tip> +  * **15.05**: Researched for a project theme 
-Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului+  * **17.05**: Decided on Milky Way Maker as the project (reflecting my love for chocolate drinks in general so I knew this was the one for me) 
-</note>+  * **18.05**: Ordered the components required for the project 
 +  * **21.05**: Components arrived, began brainstorming the design and took a trip to //IKEA// to purchase a wooden box and recipients 
 +  * **23.05**: Enlisted my dad's help in cutting the wood box and creating necessary indents for the pump hose and other components m( 
 +  * **26.05**: Finally assembled all the components and completed the Milky Way Maker coffee maker machine
  
-===== Bibliografie/Resurse ​=====+===== Bibliography/Resources ​=====
  
 <​note>​ <​note>​
-Listă cu documente, ​datasheet-uri, resurse Internet folosite, eventual grupate pe **Resurse Software** şi **Resurse Hardware**.+Inspo for the liquid dispensing process: [[https://​www.robotique.tech/​robotics/​intelligent-water-filling-system-controlled-by-arduino/​]] \\  
 +Important documentation for calibrating the flow sensor (factor & vertical inclination) : [[https://​www.epitran.it/​ebayDrive/​datasheet/YF-S401.pdf]]
 </​note>​ </​note>​
  
 <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​ <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​
  
pm/prj2023/apredescu/milywaymaker.1685303125.txt.gz · Last modified: 2023/05/28 22:45 by mara_sofia.stan
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0