Required Slide and Video
As part of the Mechanical and Machine Design assignment, we prepared a presentation slide and a demonstration video to communicate the final machine concept, the assignments used during the process, the team members, and the functional test of the conveyor belt system.
The slide summarizes the machine as an integrated system. It shows the conveyor belt mounted on the wooden table, the ZOI laboratory identity, the team members, and the Fab Academy assignments that contributed to the development of the project: design, laser cutting, embedded programming, 3D printing, CNC machining, input devices, output devices, and dashboard/interface development.
Presentation slide for Assignment 12: Mechanical and Machine Design. The slide presents the final conveyor belt system, team members, ZOI laboratory identity, and the Fab Academy assignments used during the development process.
Machine Demonstration Video
The following video shows one of the complete system tests. In this test, the conveyor belt, sensors, electronics, embedded programming, and mechanical movement are evaluated together. This video also documents my individual contribution from the programming and electronics side during the machine validation process.
Demonstration video of the conveyor belt machine test with sensors, electronics, programming, and mechanical actuation working together.
Conveyor Belt Machine
This documentation describes the development of an automated conveyor belt machine for the Fab Academy 2026 Mechanical and Machine Design assignment. The project integrates mechanical design, digital fabrication, motor actuation, embedded electronics, sensor-based automation, programming, and user interaction.
The machine detects an object at the beginning of the conveyor belt, activates a 12V DC motor, transports the object along the belt, and stops automatically when the object reaches the final detection point. This prevents the object from falling and demonstrates a complete automated machine cycle.
Final conveyor belt machine developed for Mechanical and Machine Design.
Assignment Requirements
The Mechanical and Machine Design assignment focuses on understanding how a machine can be designed, fabricated, assembled, actuated, controlled, and validated as a group project.
Group Assignment
- Design a machine that includes mechanism, actuation, automation, function, and user interface.
- Build the mechanical parts and operate the machine manually.
- Document the group project and the individual contribution.
The conveyor belt was selected because it is a clear and practical example of an industrial machine. It includes a mechanical structure, rotating elements, a moving belt, a motorized actuation system, sensors, an embedded controller, and a basic user interaction sequence.
Project Context
This project was developed within the ZOI Ecuador node. The main assembly, system integration, calibration, and testing were carried out at START Labs of Universidad Politécnica Salesiana, Quito campus.
Jenny Rojas and Rodrigo Guamán, from Universidad de Cuenca, also designed and fabricated part of the components at the Industrial FABLAB UCUENCA. This collaborative workflow allowed the team to combine the resources of different laboratories and integrate mechanical fabrication, electronics, programming, and testing in a single machine.
Roberto Gallo, Fab Academy instructor for ZOI Ecuador, supervised the assembly, operation tests, calibration process, and final validation of the project.
Team Members and Contributions
| Team Member | Institution | Main Role | Contribution |
|---|---|---|---|
| Rodrigo Guamán | Universidad de Cuenca | Mechanical Design | Designed the conveyor belt mechanical structure, developed the CAD model, prepared the structure for laser cutting, and designed/fabricated the rollers. |
| Jenny Rojas | Universidad de Cuenca | Electronics, PCB and Assembly | Soldered the electronic components, fabricated the PCB using a fiber laser machine at Industrial FABLAB UCUENCA, assembled the machine, organized the wiring, and improved the aesthetic and safety integration with a protective case. |
| Diego Zhindón | ZOI Ecuador | Embedded Programming | Programmed the XIAO ESP32-C3, tested the HC-SR04 sensors, validated the electronic components, and implemented the automation logic for motor start and stop. |
| Roberto Gallo | ZOI Ecuador | Fab Academy Instructor | Supervised the machine assembly, mechanical adjustments, calibration, testing process, and final validation of the project. |
Machine Concept
The project consists of an automated conveyor belt. The machine transports an object from an initial point to a final point using a motorized belt. The object is detected by ultrasonic sensors, and the motor is controlled automatically by an embedded system.
The concept is related to industrial automation, logistics systems, assembly lines, and Industry 4.0. Although the prototype is small, it demonstrates important machine design principles such as motion, actuation, sensing, control, safety, and user interaction.
Functional Description
The operation of the machine follows a simple but complete automation sequence. The first sensor is positioned at the beginning of the belt and detects the presence of an object. Once the object is detected, the microcontroller activates the motor driver and the conveyor belt starts moving. The second sensor is located at the end of the belt. When the object reaches this point, the motor stops.
| Step | Input / Action | System Response | Result |
|---|---|---|---|
| 1 | An object approaches the beginning of the conveyor belt. | The first HC-SR04 sensor detects the object. | The system identifies that an object is ready to be transported. |
| 2 | The start sensor sends the distance value to the XIAO ESP32-C3. | The microcontroller compares the distance with the programmed threshold. | The start condition is validated. |
| 3 | The start condition is true. | The ESP32-C3 activates the L298N motor driver. | The 12V DC motor starts moving the conveyor belt. |
| 4 | The object moves along the belt. | The system continues monitoring the final sensor. | The machine remains in the moving state. |
| 5 | The object reaches the end of the conveyor belt. | The second HC-SR04 sensor detects the object. | The stop condition is activated. |
| 6 | The stop condition is true. | The ESP32-C3 disables the motor driver output. | The motor stops and the object does not fall from the belt. |
Bill of Materials
The Bill of Materials, or BOM, lists the main components and materials used to build the conveyor belt machine. For this assignment, the BOM includes electronic components, fabrication materials, mechanical parts, and assembly materials.
The electronic components were used to sense the position of the object, control the motor, protect the microcontroller inputs, and automate the conveyor belt. The physical materials were used to fabricate the conveyor structure, the table, the belt, the rollers, and the assembly system.
| Category | Component / Material | Quantity | Use in the Machine |
|---|---|---|---|
| Electronics | HC-SR04 ultrasonic sensor | 2 | Used as input devices to detect the object at the beginning and at the end of the conveyor belt. |
| Electronics | XIAO ESP32-C3 | 1 | Main microcontroller used to read the sensors and control the motor driver. |
| Electronics | DC motor with gearbox | 1 | Provides the mechanical movement required to move the conveyor belt. |
| Electronics | L298N H-bridge motor driver | 1 | Controls the DC motor using signals from the XIAO ESP32-C3 and allows the motor to be powered safely. |
| Electronics | 10 kΩ resistors | 6 | Used in the electronic circuit, including voltage divider and signal conditioning connections. |
| Electronics | 220 Ω resistors | 2 | Used as current-limiting resistors for the LEDs. |
| Electronics | LEDs | 2 | Used as visual output indicators for the machine states. |
| Electronics | Jumper wires | 16 | Used to connect the sensors, motor driver, microcontroller, power lines, and auxiliary electronic connections. |
| Electronics / Assembly | Solder wire | As required | Used to solder the electronic components and connectors to the PCB. |
| Electronics / Assembly | Solder paste | As required | Used to support the soldering process and improve the quality of the joints. |
| Electronics / Fabrication | Phenolic copper-clad PCB board | 1 | Used to fabricate the custom PCB for the conveyor belt control system. |
| Mechanical / Fabrication | 3 mm MDF | 0.5 m² | Used to fabricate the laser-cut parts of the conveyor belt structure and auxiliary machine components. |
| Mechanical / Fabrication | 18 mm plywood board | 1 board of 1.22 m × 2.44 m | Used to build the wooden table and support structure where the conveyor belt machine was mounted. |
| Mechanical | Motorcycle inner tube, rim size 17 | 1 | Used as the flexible belt material for the conveyor system. |
| Mechanical / 3D Printing | PLA filament | As required | Used to 3D print the conveyor rollers. |
| Mechanical / Assembly | 3 mm screws | 4 | Used to assemble and secure parts of the conveyor belt mechanism. |
| Mechanical / Assembly | 3 mm nuts | 4 | Used together with the 3 mm screws to secure mechanical parts. |
Mechanical Design
The mechanical design was developed in Fusion 360. The objective was to create a modular conveyor belt structure that could be digitally fabricated and assembled manually. MDF was selected as the main structural material because it is accessible, easy to laser cut, and suitable for prototyping.
The structure was designed using a press-fit system. This means that the parts are joined by mechanical interference between slots and tabs, without the need for glue or screws. This design strategy required careful attention to material thickness, kerf compensation, tolerance adjustment, and joint stability.
The roller system was designed to support the belt and allow continuous motion. Alignment was an important factor because even small deviations could increase friction, reduce belt stability, or affect the performance of the motor. During assembly, the rollers were adjusted manually to improve belt movement.
Fusion 360 CAD
The complete structure was modeled digitally before fabrication, allowing the team to visualize the machine and prepare files for laser cutting.
MDF Structure
MDF was used for the frame because it is easy to cut, low-cost, and appropriate for press-fit assembly in early machine prototypes.
Press-Fit Assembly
The parts were designed to fit mechanically without glue or screws, making the machine easier to assemble, modify, and test.
Roller Design
The rollers were designed and fabricated to support the belt and transmit the motion generated by the 12V DC motor.
Fusion 360 design of the mechanical structure.
MDF structure fabricated using laser cutting.
Rollers designed to support and move the belt.
Digital Fabrication Process
The fabrication process combined laser cutting, manual assembly, PCB production, soldering, and system integration. The MDF pieces were cut according to the CAD files and later assembled manually. The PCB was fabricated using a fiber laser machine at Industrial FABLAB UCUENCA.
After fabrication, several manual adjustments were required. These included checking the fit of the MDF pieces, verifying roller alignment, testing the belt movement, organizing the cables, and validating the electronic connections.
| Process | Machine | Material | Parameters | Location |
|---|---|---|---|---|
| Mechanical structure cutting | Laser cutter | MDF | Parameters adjusted according to material thickness and laser kerf | START Labs UPS Quito |
| Roller preparation | Digital fabrication and manual tools | Roller material | Adjusted to support belt motion and alignment | Industrial FABLAB UCUENCA / START Labs |
| PCB fabrication | Fiber laser machine | PCB material | Trace engraving and board preparation | Industrial FABLAB UCUENCA |
| Electronic assembly | Soldering station | PCB and electronic components | Soldering and continuity verification | Industrial FABLAB UCUENCA |
| Machine integration | Manual tools | MDF, belt, motor, sensors, PCB | Assembly, alignment, and testing | START Labs UPS Quito |
Electronics Design
The electronic system was designed around the XIAO ESP32-C3 microcontroller. This board was selected because it is compact, programmable through Arduino IDE, and suitable for embedded automation projects. The microcontroller reads the ultrasonic sensors and controls the motor through the L298N driver.
The motor used in the machine is a 12V DC motor. Since the microcontroller cannot drive the motor directly, the L298N motor driver was used as an intermediate power stage. The ESP32-C3 sends control signals to the driver, and the driver provides the required current and voltage to the motor.
Two HC-SR04 ultrasonic sensors were used. One sensor is positioned at the beginning of the belt and the other at the end. These sensors measure distance and allow the machine to know when to start and when to stop the motor.
PCB fabrication process.
PCB.
Electronic integration of the control system.
Soldering of the electronic components.
Voltage Divider Explanation
The voltage divider is an important protection circuit in this project. The HC-SR04 ultrasonic sensor normally uses 5V logic. Its Echo pin sends a pulse that can reach 5V. However, the XIAO ESP32-C3 GPIO pins are designed for 3.3V logic and are not intended to receive 5V signals.
To solve this issue, a voltage divider was connected between the Echo pin of each HC-SR04 sensor and the input pin of the XIAO ESP32-C3. This simple circuit uses two resistors to reduce the voltage from 5V to approximately 3.3V, allowing the microcontroller to read the signal safely.
PCB.
| Component | Voltage | Reason | Protection Function |
|---|---|---|---|
| HC-SR04 VCC | 5V | The ultrasonic sensor requires 5V power for stable operation. | Provides correct sensor operation. |
| HC-SR04 Trigger | 3.3V signal from ESP32-C3 | The ESP32-C3 can send a trigger pulse to activate the measurement. | No voltage reduction is required for this direction. |
| HC-SR04 Echo | 5V output | The sensor returns a pulse proportional to the measured distance. | The voltage divider reduces the signal before it reaches the ESP32-C3. |
| XIAO ESP32-C3 GPIO | 3.3V logic | The input pins must be protected from 5V signals. | Prevents possible damage to the microcontroller. |
PCB.
Electronic integration of the control system.
Embedded Programming
The XIAO ESP32-C3 was programmed using Arduino IDE. The program reads the distance values from two HC-SR04 ultrasonic sensors and controls the 12V DC motor through the L298N motor driver. The logic is based on a start condition and a stop condition.
When the first sensor detects an object at a distance below the defined threshold, the motor turns on. When the second sensor detects the object at the end of the conveyor belt, the motor turns off. This sequence allows the system to work as an automated conveyor belt.
Arduino IDE Reference Code
// Fab Academy 2026 - Week 12
// Mechanical and Machine Design
// Automated Conveyor Belt Machine
// Board: XIAO ESP32-C3
// Components: 2 HC-SR04 sensors, L298N driver, 12V DC motor
/*
Conveyor belt system
XIAO ESP32-C3
Sensor S1:
TRIG -> D0
ECHO -> D1
Sensor S2:
TRIG -> D7
ECHO -> D8
Motor:
IN1 -> D5
IN2 -> D6
EN1 -> VCC / HIGH
Logic:
- Motor starts OFF.
- S1 detects an object between 3 cm and 6 cm: motor turns ON.
- Motor remains ON even if S1 stops detecting.
- S2 detects an object between 3 cm and 6 cm: motor turns OFF.
- Repetitive cycle.
*/
// ---------------------- Sensor pins ----------------------
// Sensor 1
const int S1_TRIG = D0;
const int S1_ECHO = D1;
// Sensor 2
const int S2_TRIG = D2;
const int S2_ECHO = D3;
// ---------------------- Motor pins ----------------------
const int MOTOR_IN1 = D5;
const int MOTOR_IN2 = D6;
// ---------------------- Configuration ----------------------
const float DISTANCIA_MIN = 3.0;
const float DISTANCIA_MAX = 6.0;
bool motorActivo = false;
unsigned long tiempoArranqueMotor = 0;
const unsigned long TIEMPO_MINIMO_MOTOR = 500; // ms
// ---------------------- Measure distance ----------------------
float medirDistanciaCM(int trigPin, int echoPin) {
digitalWrite(trigPin, LOW);
delayMicroseconds(3);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
long duracion = pulseIn(echoPin, HIGH, 30000);
if (duracion == 0) {
return -1;
}
float distancia = duracion * 0.0343 / 2.0;
return distancia;
}
// ---------------------- Detect object ----------------------
bool objetoDetectado(float distancia) {
if (distancia < 0) {
return false;
}
return distancia >= DISTANCIA_MIN && distancia <= DISTANCIA_MAX;
}
// ---------------------- Motor control ----------------------
void encenderMotor() {
digitalWrite(MOTOR_IN1, HIGH);
digitalWrite(MOTOR_IN2, LOW);
motorActivo = true;
tiempoArranqueMotor = millis();
Serial.println("S1 detected an object. Motor ON.");
}
void apagarMotor() {
digitalWrite(MOTOR_IN1, LOW);
digitalWrite(MOTOR_IN2, LOW);
motorActivo = false;
Serial.println("S2 detected an object. Motor OFF.");
}
// ---------------------- Setup ----------------------
void setup() {
Serial.begin(115200);
delay(3000);
pinMode(S1_TRIG, OUTPUT);
pinMode(S1_ECHO, INPUT);
pinMode(S2_TRIG, OUTPUT);
pinMode(S2_ECHO, INPUT);
pinMode(MOTOR_IN1, OUTPUT);
pinMode(MOTOR_IN2, OUTPUT);
digitalWrite(MOTOR_IN1, LOW);
digitalWrite(MOTOR_IN2, LOW);
Serial.println();
Serial.println("======================================");
Serial.println("Conveyor belt system");
Serial.println("XIAO ESP32-C3 started correctly");
Serial.println("S1 TRIG: D0 | S1 ECHO: D1");
Serial.println("S2 TRIG: D7 | S2 ECHO: D8");
Serial.println("Motor IN1: D5 | Motor IN2: D6");
Serial.println("Driver EN1 must be connected to VCC/HIGH");
Serial.println("Motor starts OFF");
Serial.println("======================================");
}
// ---------------------- Main loop ----------------------
void loop() {
float distanciaS1 = medirDistanciaCM(S1_TRIG, S1_ECHO);
delay(50);
float distanciaS2 = medirDistanciaCM(S2_TRIG, S2_ECHO);
delay(50);
bool detectaS1 = objetoDetectado(distanciaS1);
bool detectaS2 = objetoDetectado(distanciaS2);
Serial.print("S1: ");
if (distanciaS1 < 0) {
Serial.print("No reading");
} else {
Serial.print(distanciaS1);
Serial.print(" cm");
}
Serial.print(" | S2: ");
if (distanciaS2 < 0) {
Serial.print("No reading");
} else {
Serial.print(distanciaS2);
Serial.print(" cm");
}
Serial.print(" | Motor: ");
Serial.println(motorActivo ? "ON" : "OFF");
// If the motor is OFF and S1 detects an object, it starts
if (!motorActivo && detectaS1) {
encenderMotor();
}
// If the motor is ON and S2 detects an object, it stops
if (motorActivo && detectaS2) {
if (millis() - tiempoArranqueMotor >= TIEMPO_MINIMO_MOTOR) {
apagarMotor();
delay(800);
Serial.println("Ready to receive another object at S1...");
}
}
delay(100);
}
Code Explanation: Conveyor Belt Automation
This code controls the automated conveyor belt using a XIAO ESP32-C3, two HC-SR04 ultrasonic sensors, and a DC motor connected through a motor driver. The main purpose of the program is to create an automatic transport cycle: the belt starts when an object is detected at the beginning and stops when the object reaches the end of the conveyor.
General Operation Logic
The conveyor belt starts with the motor turned off. Sensor S1 is located at the beginning of the belt and is responsible for detecting when an object is placed on the machine. When S1 detects an object between 3 cm and 6 cm, the microcontroller activates the motor. The motor continues running even if the object moves away from S1. This is important because once the object enters the belt, the system must continue transporting it.
Sensor S2 is located at the end of the belt. When the object reaches this final position and S2 detects it between 3 cm and 6 cm, the microcontroller stops the motor. This prevents the object from falling from the conveyor and completes the automation cycle. After that, the system remains ready to detect a new object again at S1.
Pin Configuration
The first part of the code defines the pins used by the sensors and the motor. Sensor S1 uses one pin to send the ultrasonic pulse and another pin to receive the reflected signal. Sensor S2 works in the same way. The motor is controlled using two digital pins connected to the motor driver inputs.
const int S1_TRIG = D0;
const int S1_ECHO = D1;
const int S2_TRIG = D2;
const int S2_ECHO = D3;
const int MOTOR_IN1 = D5;
const int MOTOR_IN2 = D6;
In this configuration, S1 is connected to pins D0 and D1, while S2 is connected to D2 and D3. The motor driver receives control signals from pins D5 and D6. When MOTOR_IN1 is HIGH and MOTOR_IN2 is LOW, the motor rotates in one direction and moves the conveyor belt forward. When both pins are LOW, the motor stops.
Distance Range Configuration
const float DISTANCIA_MIN = 3.0;
const float DISTANCIA_MAX = 6.0;
These two constants define the detection range. The system only considers that an object is detected when the measured distance is between 3 cm and 6 cm. This avoids false detections caused by objects that are too far away or by unstable readings from the ultrasonic sensors.
Motor State Variable
bool motorActivo = false;
This variable stores the current state of the motor. If motorActivo is false, the motor is off.
If it is true, the motor is running. This is important because the system needs to remember that the motor
must continue running after the object leaves S1.
Minimum Motor Time
unsigned long tiempoArranqueMotor = 0;
const unsigned long TIEMPO_MINIMO_MOTOR = 500;
This section creates a small protection time. Once the motor turns on, it must remain active for at least 500 milliseconds before it can be stopped by S2. This prevents the motor from turning off immediately due to noise, unstable readings, or accidental detection.
Distance Measurement Function
float medirDistanciaCM(int trigPin, int echoPin) {
digitalWrite(trigPin, LOW);
delayMicroseconds(3);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
long duracion = pulseIn(echoPin, HIGH, 30000);
if (duracion == 0) {
return -1;
}
float distancia = duracion * 0.0343 / 2.0;
return distancia;
}
This function measures the distance using an HC-SR04 ultrasonic sensor. First, the trigger pin sends a short ultrasonic pulse. Then, the Echo pin receives the reflected signal. The function measures how long the signal takes to return. Using the speed of sound, the program converts that time into distance in centimeters.
If no echo is received, the function returns -1. This means that the sensor did not obtain a valid reading. This helps the program ignore incorrect values.
Object Detection Function
bool objetoDetectado(float distancia) {
if (distancia < 0) {
return false;
}
return distancia >= DISTANCIA_MIN && distancia <= DISTANCIA_MAX;
}
This function checks whether the distance measured by the sensor is valid and within the detection range. If the distance is negative, it means there was no valid reading. If the distance is between 3 cm and 6 cm, the function returns true, meaning that an object has been detected.
Motor ON Function
void encenderMotor() {
digitalWrite(MOTOR_IN1, HIGH);
digitalWrite(MOTOR_IN2, LOW);
motorActivo = true;
tiempoArranqueMotor = millis();
Serial.println("S1 detecto objeto. Motor ENCENDIDO.");
}
This function turns the motor on. It sends a HIGH signal to MOTOR_IN1 and a LOW signal to MOTOR_IN2, causing
the motor to rotate in one direction. It also changes motorActivo to true and records the time
when the motor started using millis().
Motor OFF Function
void apagarMotor() {
digitalWrite(MOTOR_IN1, LOW);
digitalWrite(MOTOR_IN2, LOW);
motorActivo = false;
Serial.println("S2 detecto objeto. Motor APAGADO.");
}
This function stops the motor by setting both motor driver inputs to LOW. It also updates the motor state variable to false. In the conveyor belt, this happens when the object reaches the final sensor S2.
Setup Function
The setup() function runs once when the ESP32-C3 starts. It initializes serial communication,
configures the sensor and motor pins, and ensures that the motor starts turned off.
pinMode(S1_TRIG, OUTPUT);
pinMode(S1_ECHO, INPUT);
pinMode(S2_TRIG, OUTPUT);
pinMode(S2_ECHO, INPUT);
pinMode(MOTOR_IN1, OUTPUT);
pinMode(MOTOR_IN2, OUTPUT);
digitalWrite(MOTOR_IN1, LOW);
digitalWrite(MOTOR_IN2, LOW);
This is important for safety because the conveyor belt should not start moving unexpectedly when the system is powered on.
Main Loop
The loop() function runs continuously. In each cycle, the program measures the distance from
S1 and S2, checks whether each sensor detects an object, prints the values in the Serial Monitor, and then
decides whether to turn the motor on or off.
if (!motorActivo && detectaS1) {
encenderMotor();
}
This condition means: if the motor is off and S1 detects an object, turn the motor on. This starts the conveyor movement.
if (motorActivo && detectaS2) {
if (millis() - tiempoArranqueMotor >= TIEMPO_MINIMO_MOTOR) {
apagarMotor();
delay(800);
Serial.println("Listo para recibir otro objeto en S1...");
}
}
This condition means: if the motor is running and S2 detects the object, stop the motor. However, the code first checks that the motor has been running for at least 500 milliseconds. After stopping, the program waits 800 milliseconds and then becomes ready for another cycle.
What the Code Achieves in the Conveyor Belt
| Machine Stage | Code Action | Physical Result |
|---|---|---|
| Idle state | Motor starts as OFF | The belt remains stopped and waits for an object. |
| Object placed at the beginning | S1 detects distance between 3 cm and 6 cm | The motor turns on and the belt starts moving. |
| Object moves along the belt | The motor remains active even if S1 no longer detects the object | The object is transported toward the final position. |
| Object reaches the end | S2 detects distance between 3 cm and 6 cm | The motor stops automatically. |
| System reset | The motor state returns to OFF | The machine is ready for the next object. |
Technical Summary
In summary, this code transforms the conveyor belt into an automated machine. The first ultrasonic sensor works as the start trigger, the second ultrasonic sensor works as the stop trigger, and the motor driver controls the movement of the belt. The use of a motor state variable allows the conveyor to continue moving even after the first sensor stops detecting the object. This creates a complete and repetitive automation cycle suitable for the Mechanical and Machine Design assignment.
Automation Logic
The automation logic can be understood as a simple state machine. The system starts in an idle state. When the first sensor detects an object, the system changes to the moving state and activates the motor. When the final sensor detects the object, the system stops the motor and returns to the idle state.
| State | Condition | Motor Action | Next State |
|---|---|---|---|
| Idle | No object detected at the start sensor. | Motor OFF | Waiting for object |
| Object Detected | Start sensor detects an object below the threshold distance. | Motor ON | Moving |
| Moving | The object is transported along the conveyor belt. | Motor ON | Waiting for final detection |
| Final Detection | End sensor detects the object below the threshold distance. | Motor OFF | Reset / Idle |
Bill of Materials
| Item | Quantity | Description | Function |
|---|---|---|---|
| XIAO ESP32-C3 | 1 | Compact microcontroller board | Main control unit for sensors and motor logic |
| HC-SR04 ultrasonic sensor | 2 | Distance sensor | Detects object at the beginning and end of the belt |
| L298N motor driver | 1 | H-bridge motor driver module | Controls the 12V DC motor |
| 12V DC motor | 1 | Direct current motor | Provides movement to the conveyor belt |
| MDF | Several pieces | Laser-cut sheet material | Main mechanical structure |
| Rollers | 2 or more | Cylindrical rotating parts | Support and guide the conveyor belt |
| Belt material | 1 | Flexible conveyor belt surface | Transports the object |
| Wires | Several | Electrical connection cables | Connects sensors, driver, motor, and microcontroller |
| PCB material | 1 | Board fabricated using fiber laser | Supports the electronic circuit |
| Resistors | Several | Voltage divider resistors | Protects the ESP32-C3 Echo input pins |
| Power supply | 1 | 12V power source | Feeds the motor and driver system |
| Connectors | Several | Terminal and cable connectors | Allows modular wiring and easier maintenance |
Machines, Software and Technologies Used
| Category | Tool / Technology | Purpose | Location |
|---|---|---|---|
| CAD Design | Fusion 360 | Mechanical modeling and design of the conveyor structure | Universidad de Cuenca / START Labs |
| Programming | Arduino IDE | Programming the XIAO ESP32-C3 | START Labs UPS Quito |
| Digital Fabrication | Laser cutter | Cutting MDF mechanical parts | START Labs UPS Quito |
| PCB Fabrication | Fiber laser machine | PCB manufacturing process | Industrial FABLAB UCUENCA |
| Electronics | Soldering station | Soldering electronic components | Industrial FABLAB UCUENCA |
| Measurement | Multimeter | Checking continuity and voltage | START Labs UPS Quito |
| Control | XIAO ESP32-C3 | Embedded controller | Machine system |
| Actuation | L298N + DC Motor | Motor control and movement generation | Machine system |
| Sensing | HC-SR04 | Distance detection | Machine system |
Assembly Process
The assembly process was carried out in several stages. Each stage was important to ensure that the machine worked mechanically and electronically before testing the complete automation sequence.
- Design of mechanical parts: The conveyor belt structure and rollers were designed in Fusion 360.
- Laser cutting of MDF structure: The CAD files were prepared and cut using a laser cutter.
- Roller preparation: The rollers were designed, fabricated, and adjusted for belt movement.
- Manual assembly: The MDF structure was assembled using the press-fit system.
- PCB fabrication: The PCB was fabricated using a fiber laser machine at Industrial FABLAB UCUENCA.
- Soldering: The electronic components and connectors were soldered.
- Sensor installation: Two HC-SR04 sensors were installed at the beginning and end of the belt.
- Motor installation: The 12V DC motor was installed and mechanically connected to the belt system.
- Wiring: The sensors, motor driver, microcontroller, and power supply were connected.
- Case installation: A protective case was added to organize and protect the wiring.
- Programming: The automation code was uploaded to the XIAO ESP32-C3 using Arduino IDE.
- Testing: The complete sequence was tested and validated under instructor supervision.
User Interface and Aesthetic Integration
The user interface of the conveyor belt machine is based on physical interaction. The user places an object at the beginning of the conveyor belt, and the machine automatically starts the transportation sequence. No complex screen interface is required because the interaction is direct and intuitive.
A protective case was added to improve the organization of the cables and the visual presentation of the electronic system. This case also contributes to safety because it reduces exposed wiring and helps protect the components during testing and operation.
The aesthetic integration of the machine was important because the final prototype needed to show not only functionality, but also clarity, order, and care in the assembly process.
Before the aesthetic improvement to hide and organize the wiring.
Final result after the aesthetic improvement and cable organization.
Final mechanism operation and automated conveyor belt demonstration.
Problems Encountered and Solutions
During the development of the conveyor belt machine, several technical and mechanical challenges appeared throughout the fabrication, assembly, electronics integration, and automation stages. These issues became valuable learning opportunities that improved the final machine performance and reinforced important concepts related to digital fabrication, embedded systems, automation, and mechanical design.
| Problem | Cause | Solution | Learning Outcome |
|---|---|---|---|
| Voltage incompatibility between HC-SR04 and ESP32-C3 | The HC-SR04 Echo pin outputs 5V logic signals while the XIAO ESP32-C3 operates with 3.3V logic levels. | Voltage dividers using resistors were implemented on each Echo signal to safely reduce the voltage level before entering the microcontroller. | Understanding voltage compatibility is essential when integrating sensors and microcontrollers with different logic levels. |
| Excessive friction on the conveyor belt | Initial roller alignment and belt tension produced resistance during movement. | The rollers were adjusted manually and the belt tension was recalibrated to reduce friction and improve movement stability. | Mechanical calibration significantly affects motor efficiency and machine performance. |
| Roller misalignment | Small dimensional tolerances in the MDF structure affected roller positioning. | Additional alignment adjustments and manual corrections were made during assembly. | Press-fit systems require precise tolerances and careful assembly validation. |
| Loose press-fit joints | Laser kerf and MDF thickness variations affected the fitting precision. | The CAD design was adjusted and some joints were manually refined to improve structural stability. | Material tolerances and machine calibration are critical in laser-cut assemblies. |
| Sensor detection instability | Environmental reflections and object positioning occasionally affected ultrasonic sensor readings. | Detection thresholds were calibrated and sensor positioning was optimized. | Sensor calibration and physical placement are essential for reliable automation. |
| Disorganized wiring | Multiple electronic connections generated visual clutter and potential movement interference. | A protective case and organized cable routing system were implemented. | Proper cable management improves safety, maintenance, and aesthetics. |
| Motor performance under load | The conveyor behavior changed when transporting objects with additional weight. | Motor speed and power supply stability were tested and optimized. | Real operating conditions must be validated during automation projects. |
| PCB soldering difficulties | Some solder joints initially presented unstable electrical continuity. | The soldering process was repeated carefully and continuity tests were performed with a multimeter. | Electronic assembly quality directly affects system reliability. |
Testing and Validation
After the mechanical assembly and electronics integration were completed, several validation tests were carried out to verify the correct operation of the conveyor belt machine. The tests focused on confirming the behavior of the sensors, the motor control system, the automation logic, and the overall mechanical stability of the machine.
Multiple iterations were required to calibrate the distance thresholds, adjust the belt movement, and validate the synchronization between the sensors and the motor driver. These tests ensured that the conveyor could operate consistently and safely.
| Test | Expected Result | Observed Result | Status |
|---|---|---|---|
| Power supply validation | Stable voltage for motor and electronics | System operated correctly with stable power | ✔ Passed |
| Start sensor detection | Sensor detects object at beginning of belt | Object detected successfully | ✔ Passed |
| Motor activation | Motor starts after object detection | Motor activated correctly through L298N | ✔ Passed |
| Conveyor belt movement | Belt moves object smoothly | Stable transportation achieved | ✔ Passed |
| End sensor detection | Sensor detects object at end position | Detection completed successfully | ✔ Passed |
| Motor stop sequence | Motor stops automatically | Motor stopped immediately after detection | ✔ Passed |
| Complete automation cycle | Machine performs full autonomous sequence | Full operation validated successfully | ✔ Passed |
| Mechanical stability | Structure remains stable during operation | No structural failure observed | ✔ Passed |
Final Result
The final result was a fully functional automated conveyor belt machine capable of detecting objects, activating motion automatically, transporting elements, and stopping safely at the final position. The project successfully integrated mechanical design, laser cutting, embedded programming, sensor systems, electronics fabrication, automation logic, and collaborative development.
The machine demonstrated how digital fabrication tools and embedded technologies can be combined to create intelligent systems inspired by industrial automation and Industry 4.0 principles. The project also highlighted the importance of teamwork, iterative prototyping, calibration, and interdisciplinary integration.
Machine Demonstration Video
Individual Contributions
Rodrigo Guamán
Rodrigo Guamán was responsible for the mechanical development of the project. His work included the complete CAD modeling of the conveyor structure in Fusion 360, dimensional planning, structural analysis, and roller design.
He also participated in the laser cutting preparation process, optimization of the press-fit joints, and fabrication of the roller system used to move the conveyor belt. His contribution was fundamental for achieving structural stability and smooth mechanical movement.
Jenny Rojas
Jenny Rojas was responsible for the electronics integration and assembly process. Her work included PCB fabrication using a fiber laser machine at Industrial FABLAB UCUENCA, soldering electronic components, organizing the system wiring, and assembling the machine structure.
She also designed and integrated the protective case that improved the visual appearance, cable organization, and safety of the machine. Additionally, she participated in system testing and final adjustments.
Diego Zhindón
Diego Zhindón was responsible for the embedded programming and automation logic implementation. He programmed the XIAO ESP32-C3 using Arduino IDE, configured the ultrasonic sensors, controlled the motor driver, and implemented the automation sequence.
His contribution included testing the sensor behavior, calibrating the detection distances, validating motor control, and ensuring the complete automation workflow operated correctly.
Group Reflection
This project represented an important collaborative experience that combined digital fabrication, mechanical engineering, electronics, embedded programming, and automation concepts within the Fab Academy framework.
One of the most valuable aspects of the assignment was the integration between different laboratories and institutions. The collaboration between START Labs UPS Quito and Industrial FABLAB UCUENCA allowed the team to combine fabrication technologies, technical knowledge, and interdisciplinary skills.
From the mechanical perspective, the project reinforced concepts related to modular design, press-fit structures, roller alignment, tolerances, and motion transmission systems.
From the electronics and programming perspective, the project showed the importance of checking voltages, validating PCB continuity, correcting wiring problems, testing sensors individually, and programming the automation sequence before integrating the complete machine.
The project also demonstrated principles related to Industry 4.0, automation, and intelligent manufacturing systems through the development of an automated conveyor belt prototype.
Checklist
The following checklist summarizes the required tasks evaluated during the Mechanical and Machine Design assignment.
- ✔ Designed a machine with mechanism, actuation, automation, function and user interface.
- ✔ Built the mechanical parts.
- ✔ Operated the machine manually.
- ✔ Integrated motor actuation.
- ✔ Integrated HC-SR04 sensors.
- ✔ Programmed the XIAO ESP32-C3.
- ✔ Fabricated and soldered the PCB.
- ✔ Tested the automation sequence.
- ✔ Documented the group project.
- ✔ Documented individual contributions.
- ✔ Included the required presentation slide.
- ✔ Included the required machine demonstration video.
- ✔ Clarified my personal contribution in electronics, programming, testing, and integration.