This page provides full , extensive details into the project. To access a shorter, summarized version, click ->
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
Automation is a key trend in future manufacturing. Still, its application in food production and serving may be limited due to the complexity of ingredients and quality control requirements. Burgers, a relatively simple food product, could benefit from automation in terms of both cost savings and improved quality. We have taken this opportunity to design a fully functioning automatic burger maker to materialize this concept.
The goal of this project was to build and program a machine, using microprocessors and microcontrollers, that would prepare a burger with minimum human interference required.
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 can be described as follows:
Arduino programming environment: The Arduino IDE (Integrated Development Environment) is used to write, compile, and upload the code to the Arduino Mega microcontroller.
Stepper motor control: The Stepper motor library is used to control stepper motors connected to the A4988 motor drivers. For the L298N motor driver, the code uses digitalWrite() and analogWrite() functions to control the motor's speed and direction.
Motion control algorithm: The code includes a series of commands that define the motion of the robotic arm in the vertical, horizontal, and clamp directions. The stepper motor steps are calculated based on the desired movements in centimetres, and the number of steps per revolution of the motor. The code uses loops to control the motor movements and delays between the steps.
Sequence control: The code contains a main loop that executes the robotic arm's movements in a specific order. This order is defined by the series of commands that move the motors to their desired positions, grab or release objects, and return to their initial positions.
In summary, the software framework and algorithms for controlling the hardware components involve using the Arduino programming environment to write and upload the code to the Arduino Mega, which in turn controls the stepper motors through motor drivers. The motion control algorithm calculates the number of steps required for each motor to reach the desired position, and the sequence control dictates the order of motor movements to achieve the desired motion.
The design features a 2-axis system controlled by an Arduino Mega, that efficiently transfers the buns and patties heated by the toaster, as well as the other ingredients, such as lettuce and tomato, and arranges them in a stack on the conveyor belt. The arm's translational and rotational axis, along with its secure clamp at the end, modelled after kitchen tongs, ensures the precise handling of the various ingredients.
The toaster we used for our design was a 2-slot one, which enables simultaneous cooking of the buns and patty. It has a low ejection force so that the pre-positioned clamp can secure the bun and patty next to the toaster. Since the buns cook faster than the patty, the robotic arm will place the buns on the conveyor belt first and then the patty.
Integrating hardware and software components involves connecting the hardware devices, such as the motors and motor drivers, to the Arduino Mega and writing code to control them.
Hardware connections: Connect the stepper motors to their respective motor drivers (A4988 and L298N) following their datasheets and wiring diagrams. Then, connect the motor drivers to the Arduino Mega, making sure to connect the necessary control pins (step, dir, enable) and the power supply. Motor one uses 2, 3, 4 pins on the Arduino, motor 2 uses 5, 6, 7 pins, and motor 3 uses 8, 9, 10, 11 pins.
Software implementation: Develop the Arduino code that controls the motors, based on the requirements and design. This includes defining constants and variables, initializing motor drivers, and implementing functions to control each motor.
Code upload: Upload the code to the Arduino Mega using the Arduino IDE. Make sure the hardware connections are secure, and the power supply is adequate.
Functional testing: After uploading the code, test the system's functionality by observing the behaviour of the motors and the robotic arm. Each motor is tested individually before connecting all of them into the whole system. Check if the motors are moving as expected and if the sequence of movements is correct. This step is crucial to ensure the system is working as intended. Also, adjust the current for each motor driver to ensure motors can move smoothly.
Unit testing: Perform unit tests by isolating and testing individual functions or components of the system. For example, test each motor's movement independently to ensure they are functioning correctly.
Integration testing: Test the complete system, including the interaction between the motors, to validate the overall functionality of the robotic arm. This includes testing the arm's movement, the clamp's opening and closing, and the sequence of movements.
Debugging and troubleshooting: If issues arise during testing, debug the system by identifying the source of the problem. This may involve checking the hardware connections, adjusting the motor drivers' current settings, or modifying the Arduino code. Use debugging techniques such as adding Serial.print() statements in the code to display variable values or debug messages in the Serial Monitor.
Iterative improvements: Based on the test results and debugging, refine the code and hardware connections as necessary. This may involve modifying the movement algorithm, adjusting motor speeds, or changing the sequence of movements. Repeat the testing steps until the system works as desired.
Performance and stress testing: Test the system under various conditions, such as different loads or continuous operation, to ensure its 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.
A problem we encountered during testing was that the motors behaved unexpectedly under different conditions. The nema17 motor for the vertical axis for example, because it had to lift the whole structure of the arm, its current requirements were not the same as other motors, and the L298N behaved poorly for some inexplicable reason. As the axis was made using an old Ender 3 printer, it contained excessive parts which could be reduced for lighter weights.
During testing, one problem emerged: the current system used an open loop control. For different sizes of the tested materials, it does not behave well. It is possible to add a sensor to the clamp and make it able to detect the precise location of the things in the toaster, such as an ultrasonic distance sensor, but that would be even more weight and wiring on the already large system, indicating that our current design is not efficient enough to handle such task.
A potential long-term challenge that we may encounter is maintaining the cleanliness of the machines with regard to hygiene, as the presence of electronics throughout the system complicates the cleaning process. To address this issue, it is crucial to employ safe and effective methods for cleaning electronics. These may include using compressed air to remove dust and food debris, using isopropyl alcohol instead of water for gentle cleaning of sensitive components, and ensuring that the devices are powered off and unplugged during the cleaning process. By incorporating these precautions, we can help preserve the functionality and life of the burger maker.
Furthermore, some parts from the machine were connected through elastic bands, which might be helpful for short-term use, but in the long run, screws should be a more stable connecting method.
Our initial plan for the project was to create a machine capable of grabbing buns and patties. However, we realized that the existing structure was not food-safe due to the presence of wires and metals throughout the machine. To address this issue in the future, we think it is important to design more specific models for the system, like a clamp that should be more compatible with the clamp motor. Also, such a 2-axis system might not be a good choice for this product, rather a single robotic arm that can rotate around might be a more space-saving choice and easy to manipulate.
Moreover, our original idea also included metal machining which could be hard to realize, especially in the clamp part. If the dimension of the clamp motor and the metal pieces can be altered, the clamp should take much less space and weight, and be more stable on the horizontal axis.
We have also thought about implementing raspberry pi for this project as it is a more powerful processor, allowing for more complex calculations and data processing. Also, it runs a full operating system (Linux-based), providing the ability to run multiple programs simultaneously and use more advanced software which is better suited for applications that require image processing, advanced data analysis, or machine learning capabilities. However, after some discussion, we believe this is beyond our knowledge, and we decided to use the more straightforward programming environment from Arduino. It is better suited for real-time applications, as it runs dedicated firmware without an operating system, and is more focused on simple input/output operations, making it suitable for controlling sensors, motors, and actuators directly. We choose Mega instead of Uno because Mega supplies more power and has more ports so it is better for 3-stepper motor control.
In future, it might be more advantageous to combine both Arduino and Raspberry Pi, using the Arduino for real-time control of sensors and actuators, while the Raspberry Pi handles higher-level tasks like image processing, data analysis, or network communication. This hybrid approach can offer the benefits of both platforms, tailored to the specific needs of the auto burger maker project.
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.