We will descirbe the different parts of our system, and how it builds together to form a automated system.
Lazy Susan:
The Lazy Susan is the centre piece of our project.
Our goals of making an automated system requires a part that would deliver the bag to each station. In our project, we used a lazy susan which had many benefits compared to using a standard conveyor belt system.
A lazy susan would provide a 360-Degree Access for Rotating Items, thus proving effective for positioning the drip bag reliably at distinct parts of the wheel to perform different task. It also provides a compact design as compared to a conveyor setup, which helps to make our workspcae more space efficient.
1. Heat Sealer:
The heat sealer melts the seal of the drip bag, closing it to ensure that the drip bag is portable and able to be brought around.
2. Coffee Grinder:
The Coffee Grinder had to be manually dismantled to analyse the parts and so that we could utilise the limit switch and implement into the Arduino system where the Coffee Grinder can be a part of automated system. We had to use a retractable arm to be able to reach the coffee bags on the lazy susan, this meant we had to use gear motion and a stepper motor to create the back and forth motion for the arm.
Arduino:
In our project, the Arduino served as the heart of our entire operation, automating all of its components, including the coffee grinder, heat sealer, Lazy Susan, hall sensors, retractable arm, relay switch. It acts as a central controller, managing each device and ensuring the precise timing and coordination necessary for the automation process.
In a automation process, timing is crucial, hence the Arduino is able to coordinate the timings between each step, to ensure that every step is not too slow or too quick. Each task flows to the next, ensuring efficiency and minimising delays.
Below describes the code of how our arduino works:
Code Explanation
This code is designed to automate a coffee bagging process using a lazy susan with two bag holders, allowing for the simultaneous preparation of two coffee bags. The setup involves three stepper motors and a relay switch: one stepper motor for rotating the lazy susan, one for controlling a retractable arm, another for managing a slider that operates a sealer, and a relay switch to activate the coffee grinder.
Code Breakdown
Pin Connections and Motor Configuration:
The initial code segment defines the pin connections and motor steps for:
- Stepper1: Controls the rotation of the lazy susan.
- Stepper2: Manages the retractable arm, which dispenses coffee powder into the bags.
- Stepper Slider: Operates the sealer by moving it to open and close.
- Relay Switch: Controls the coffee grinder’s power.
Setup Function:
Within the setup function, the code initializes the motors and relay pin. Four key functions are also defined here:
moveArmUp
and moveArmDown
: These control the retractable arm, allowing coffee powder to be dispensed into the bags.
moveSlider
: Controls the slider’s movement to open and close the sealer.
moveGrinder
: Turns the grinder on and off.
Main Loop:
The main loop starts by enabling Stepper1 and a Hall sensor, which is located near the coffee grinder, with a magnet positioned by the bag holder on the lazy susan. The stepper.move(3)
command enables the motor to rotate the lazy susan in small increments until the Hall sensor detects the magnet, positioning the bag precisely under the grinder.
- Once the bag holder is aligned, Stepper1 is deactivated, and Stepper2 is activated to lower the retractable arm. This arm allows the user to place bag 2, followed by a short delay before the grinder is turned on to dispense coffee into the bag. The arm then lifts, and Stepper2 is deactivated.
- Next, Stepper Slider is activated to push the sealer, sealing bag 1. Once sealed, the slider retracts, releasing the sealer. Stepper Slider is then deactivated.
- Stepper1 is re-enabled, rotating the lazy susan to the next position where the Hall sensor detects the magnet again.
This loop ensures a continuous, automated process of coffee dispensing and bag sealing, with the lazy susan rotating to alternate between the two bags.