Automatic Burger Maker
Shorter Version
Shorter Version
This page is a shorter, summarized version of the original, click the button to access the original ->
Attributes linked to this design project (CEAB's Graduate Attributes):
> Knowledge base for engineering
> Problem analysis
> Investigation
> Design
> Use of engineering tools
> (Individual and) Teamwork
> Communication skills
> Economics and project management
We designed and built a fully automated burger maker using microprocessors and microcontrollers, aiming to capitalize on the key trend of automation in manufacturing. Despite the complexity of food production, especially in terms of ingredients and quality control, our focus on burgers—a relatively simple food product—sought to achieve cost savings and enhanced quality through minimal human interference in the preparation process.
Microprocessor and its components:
> Arduino Mega[1]
> Stepper motor drivers A4988 (x2)
> Stepper motor drivers L298N
> Jumper wires (xn)
> External power supply 12V 5A (x1)
Structural and operational parts:
Old Ender 3 Printer structure: frame, wheels, base
Metal screw rods (x1 + x1)
Toaster (x1)
Motors:
(x2) - Robotic arm, for 2 different axial rotation
(x1) - Metal clamp with stepper motor
Motor/Rubber-tube - for sauce dispenser
System Overview:
Arduino Mega: The main controller of the system, responsible for executing the code and sending signals to the motor drivers.
Motor Drivers: Three motor drivers (two A4988 drivers and one L298N driver) receive signals from the Arduino and provide power and control signals to the stepper motors.
Stepper Motors: Three stepper motors control the vertical position (motor 1), horizontal position (motor 2), and clamp (motor 3).
Robotic Arm: A robotic arm that has a clamp on the end-effector and can move in horizontal and vertical directions.
The software framework and algorithms for controlling the hardware components in this robotic arm system were as follows:
Arduino Programming: The Arduino IDE was utilized to write, compile, and upload code to the Arduino Mega microcontroller.
Stepper Motor Control: The Stepper motor library controlled stepper motors connected to A4988 motor drivers. For the L298N motor driver, code employed digitalWrite() and analogWrite() functions for motor speed and direction.
Motion Control Algorithm: The code featured commands defining robotic arm motion in vertical, horizontal, and clamp directions. Stepper motor steps were calculated based on desired movements, using loops to control movements and introduce delays between steps.
Sequence Control: The main loop in the code executed robotic arm movements in a predefined order, directing motors to desired positions, manipulating objects, and returning to initial positions.
In summary, the software framework and algorithms, using the Arduino programming environment, controlled the Arduino Mega, which, in turn, managed stepper motors through motor drivers. The motion control algorithm determined motor steps for reaching desired positions, and sequence control dictated the order of motor movements to achieve the desired motion.
The design, controlled by an Arduino Mega, efficiently assembled a stack of heated buns, patties, and other ingredients on a conveyor belt using a 2-axis system. Modeled after kitchen tongs, the robotic arm's precise handling involved a translational and rotational axis with a secure clamp.
A 2-slot toaster with low ejection force was used for simultaneous cooking of buns and patties. Recognizing varying cooking times, the arm prioritized placing buns on the conveyor belt before the patty.
Integrating hardware and software components involved connecting motors and motor drivers to the Arduino Mega and coding for control. Hardware connections included linking stepper motors to A4988 and L298N motor drivers, connecting control pins, and providing power. Motor assignments on the Arduino were 2, 3, 4 pins for motor one, 5, 6, 7 pins for motor two, and 8, 9, 10, 11 pins for motor three.
The software implementation included developing Arduino code, defining constants, initializing motor drivers, and implementing motor control functions. Code upload through the Arduino IDE followed, ensuring secure hardware connections and adequate power supply.
Functional testing involved observing motor and robotic arm behavior, testing each motor individually before connecting them to the system. Unit tests isolated functions like individual motor movements. Integration testing validated the complete system, including arm movement, clamp operation, and the sequence of movements.
Debugging addressed issues through checks on hardware connections, motor driver settings, and code modification. Debugging techniques like Serial.print() statements in the code were used for troubleshooting.
Iterative improvements were made based on test results and debugging, refining code and hardware connections. Testing steps were repeated until the system functioned as intended.
Performance and stress testing evaluated the system under varied conditions to ensure reliability and performance.
While the motor movement distance is currently hard-coded, the motors can effectively carry out tasks involving rigid materials like cardboard. However, the system has not yet been tested with actual toasters and ingredients. The varying textures of food and the considerable heat generated by the toaster could potentially impact the system's structure and connections. Additionally, the existing toaster design may not be fully compatible with the clamp, necessitating the development of a specialized toaster structure to seamlessly integrate with the current system.
In our project, we touched on several topics related to the use of microcontrollers and embedded systems:
For code reuse and subroutines, we structured the code in a modular way by using separate functions for each motor's movement, such as moveMotor1(), moveMotor2(), and moveMotor3().
We optimized variable storage and memory usage by using const int data types for pin assignments in the Arduino code, allowing the compiler to make optimizations.
Timers and interrupts were utilized in the Arduino code through the use of delay() and delayMicroseconds() functions to control the speed and timing of the stepper motor movements.
Digital communication protocols were exemplified when connecting the A4988 stepper motor driver to the Arduino, using digital pins for step, and direction, and enabling signals to establish communication between the microcontroller and the driver.
We implemented control loops in the loop() function of the Arduino code, which repeatedly executed the desired sequence of motor movements and clamp operations.
Although state machines were not explicitly used in our code, one can imagine a more complex system where the state of the arm (moving, stationary) and the state of the clamp (open, closed) are tracked using a state machine to manage various actions and transitions between states more effectively.
Nema17 motor for vertical axis exhibited unexpected behavior due to varying current requirements, while L298N underperformed without clear reasons, potentially linked to excessive weight from repurposed parts.
Open-loop control system struggled with material size variations, leading to consideration of an ultrasonic distance sensor for precise clamp location detection; however, it was deemed impractical due to increased weight and wiring complexities.
Long-term challenges included difficulties in maintaining machine cleanliness due to electronic components and a need to transition from elastic bands to screws for certain parts to enhance stability.
Initial design for bun and patty handling faced challenges in food safety due to non-food-safe materials; future iterations may explore specific models with a motor-compatible clamp and a more space-efficient single rotating arm.
Original metal machining plan, especially for the clamp, posed difficulties. Adjusting dimensions could improve space, weight, and stability on the horizontal axis. Opting for Arduino over Raspberry Pi for real-time capabilities and simplicity, using the Mega for enhanced power and port availability.
Future considerations include a hybrid approach using both Arduino and Raspberry Pi to capitalize on real-time control (Arduino) and higher-level tasks like image processing and data analysis (Raspberry Pi) for a more tailored auto burger maker system.
There are also some features that we did not use for Arduino Mega that could possibly be helpful in the future.
Analog-to-Digital Converter (ADC) channels: Use analog sensors, such as temperature sensors, to monitor and control the cooking temperature of the burger patties. Could also use an analog force-sensitive resistor to detect when buns or patties are picked up by the gripper.
Pulse Width Modulation (PWM) pins: Control the speed of the motors used in the burger assembly process or adjust the intensity of indicator LEDs. This would provide more precise control and feedback during operation.
Interrupts: Use interrupts to respond to real-time events, such as detecting when a bun or patty is placed on the assembly line or when a component has reached a specific position. This would allow the system to respond more quickly and efficiently to external stimuli.
Serial Peripheral Interface (SPI) and Inter-Integrated Circuit (I2C) communication: Use SPI or I2C to interface with additional sensors, such as distance sensors or accelerometers, to improve the accuracy and efficiency of the system. This could help optimize the burger assembly process.
Built-in EEPROM: Store calibration data, user preferences, or error logs in the EEPROM to maintain this information even when the Arduino loses power. This could improve the user experience and aid in troubleshooting.
Sleep modes and power-saving features: Implement power-saving techniques to reduce the energy consumption of auto burger makers, especially during idle times. This would make the project more environmentally friendly and potentially save on energy costs.
We successfully managed to get the motors operational, and the machine is now capable of clamping and holding a simulated patty. This achievement suggests that, in theory, the arm can pick up and manipulate various components of a burger. However, the machine's size, efficiency, and safety concerns highlight that it is not yet optimized for the burger-making process. To enhance its performance, further refinements are necessary, such as custom-designing specific metal parts instead of relying on pre-existing materials.