Welcome to my final project!
I am thrilled to share my final project with you, and I hope you find it informative and engaging, and I am excited to showcase the skills and knowledge I have acquired throughout this process.
I invite you to explore my project and learn more about the ideas, techniques, and concepts that I have applied. Whether you are an expert in the field or simply curious about the topic, I hope you will find something of interest and value in my work.
Let's Go!
Hello, Makers
My final project is to build a landmine detection robot. I am excited to work on this project as it combines my interests in robotics and humanitarian issues, and I believe it has the potential to make a real difference in the world.
As you know, landmines are a persistent problem in many parts of the world, causing injuries and deaths to civilians and impeding economic development and social progress.
build a landmine detection robot it can be using various sensors, such as metal detectors and ground-penetrating radar, to detect landmines in my project I replaced the metal sensor with a magnetic reed switch, this is the first feature it should do.
the 2nd one is to make the robot avoid obstacles using an ultrasonic sensor and servo. The robot will be controlled remotely using a wireless connection using a mobile application and Bluetooth module
1- Fusion 360
For Designing Process
2- RdWorks
For Laser Cutting Preparing
3- UltraMakerCura
For 3D Printing Prepari
4- Arduino IDE
For Programing
4- Fritzing
Circuit Wiring
Free Hand Sketch For the design
Robot Base
Using Fusion 360 i start by drawing the base of the robot the length and width i measured them visually
using the ruler i see these dimensions suitable for my project
the taps is to link the base with the sides
the circles is to inter the jumper wires which will be connected with the dc motors( Yellow Gearbox, easily, to connect them with the motor driver (L298N)
Later I made other Circles to be closer to the motors
Robot Top
The top outer dimensions are the same as the base but I don't need more than one circle to enter servo motor wires
Robot Side /legs
I designed the legs you see to mount the motors with it and to lift the robot body up
Front and Back are the same shape and dimensions in the back we will make hole for Arduino usb and power source switch but the front we will make rectangle for the lcd and led
Import Component
Start Importing the Components
make suitable holes for components fixation using Project Feature
Final Assembly
(There is a recorded video for every design process will bel uploaded after editing )
1- Laser Cutting Process
First i exported all bodies as dxf files from fusion 360
After Exporting the dxf files from fusion I imported them to Laser Works Software to prepare them for cutting
I arranged the parts well so that it takes the least amount of wood
Select Them all and choose the black color to be cut
Setup the cutting setting the speed is 30mm/s and power is 50
Name the file and download it to the machine
Here Is the cutting process
2- 3D Printing Process
1- Ultrasonic and servo motor mounting printing
I download an open source Ultrasonic and servo motor mounting and edit their orientation to be like that
Prepare for slicing
Slicing
Load the filament with the color i choose
Get Sure the old filament has gone
Choosing the file
(Mukh.11g.78mins)
Printing Process
1- Components
Circuit Wiring Diagram
Arduino Uno
The Arduino board serves as the brain of the landmine detection robot. It is responsible for processing the input from the magnetic sensor, as well as controlling the movement of the robot using the L298N motor driver. It also communicates with the remote control device through the Bluetooth module.
4x Mini DC Gearbox Motors
The 4 DC motors are used to drive the robot's 4 wheels. They receive power from the L298N motor driver and allow the robot to move across various terrains.
4x Robot Wheel 65x26mm
The 4 wheels are attached to the DC motors and allow the robot to move across various terrains
Magnetic Sensor (magnetic Reed Switch)
The magnetic sensor is used to detect the presence of metal objects, such as landmines. It works by measuring the magnetic field strength in the vicinity of the sensor and detecting any changes in the field caused by metal objects.
L298 Dual Motor Driver Module 2A
The L298N motor driver is used to control the movement of the robot. It takes input signals from the Arduino board and converts them into outputs that can drive the motors of the robot. It allows the robot to move forward, backward, turn left, and turn right.
I2C LCD
The I2C LCD display provides feedback on the status of the robot, such as the battery level, the sensitivity of the magnetic sensor, and the location of any detected landmines. It allows the user to monitor the status of the robot and make adjustments as needed.
Micro Servo Motor
The servo motor is used to control the direction of the ultrasonic sensor. It allows the sensor to scan the surrounding area and detect obstacles in different directions.
Ultrasonic Sensor
The ultrasonic sensor is used to detect obstacles in the path of the robot. It emits high-frequency sound waves and measures the time it takes for the sound waves to bounce back from an obstacle, allowing the robot to determine the distance to the obstacle.
Bluetooth Module HC-05
The Bluetooth module enables wireless communication between the robot and the remote control device. It allows the user to control the movement of the robot and receive
Red Led
The red LED is an optional component that can be used to indicate when a landmine is detected. It can be connected to a digital pin on the Arduino board and be programmed to turn on when a landmine is detected.
Buzzer
The buzzer is used to alert the user when a landmine is detected. It emits a sound that indicates the presence of a landmine, allowing the user to take appropriate action.
Jumper Wires
The jumper wires are used to connect the components to the Arduino board and the breadboard. They provide a flexible and convenient way to connect the various components together.
Small Breadboard
The breadboard is used to create circuits for the components to connect to the Arduino board.
To select a suitable power source for my project, I will need to consider the power requirements of each component in the project and the total power consumption of the entire system. Here are some general steps we can follow to select a suitable power source for the project:
Determine the power requirements of each component: determine the voltage and current requirements of each component in the project. This information is usually available in the component's datasheet or technical specifications.
Calculate the total power consumption: Once we have determined the power requirements of each component, you can calculate the total power consumption of your system. This can be done by adding up the power requirements of each component.
Choose a power source with sufficient power output: Based on the total power consumption of our system, we can choose a power source with sufficient power output to meet the needs of your project. A power source with a higher power output than the total power consumption of our system can also be used, but may be unnecessary and more expensive.
Consider the voltage and current rating of the power source: The voltage and current rating of the power source should match the voltage and current requirements of our components. Choosing a power source with a voltage that is too high or too low for our components can damage them or cause them to malfunction.
Choose a power source with the appropriate form factor: The form factor of the power source should be appropriate for the project. in our case it is a mobile robot, so we need a battery pack that is small and lightweight.
Based on the components I listed above.
The Arduino board, ultrasonic sensor, magnetic sensor, motor driver, servo motor, buzzer, LED, and I2C LCD can be powered using a 5V power source, such as a USB power supply or a 5V battery pack.
The motors and wheels will require a higher voltage power source to operate. The voltage required will depend on the specifications of the motors. You may need to use a separate battery pack or power supply for the motors and wheels.
To power both the 5V components and the motors and wheels, you can use a voltage regulator or a power distribution board to regulate the voltage and distribute power to the different components.
Project Testing
1-Components Definitions
Defining the pins and other components at the beginning of the code helps keep the code organized and easy to read. by defining the pins and components at the beginning, you can easily locate and modify them if needed, without having to search through the entire code.
In this specific code, the pins are defined at the beginning to specify which pins are connected to the various components.
For example, the motor driver is connected to pins 2, 3, 4, 5, 6, and 7, so those pins are defined at the beginning with the int keyword, which means that their values cannot be changed later in the code.
Similarly, the magnetic sensor, LED, buzzer, and other components are defined with their respective pins so that the code knows which pins to read from or write to when interacting with these components. This also helps to ensure that the components are wired correctly and consistently, which can prevent errors and make the code more reliable.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
These lines include the necessary libraries for interfacing with an I2C LCD display.
LiquidCrystal_I2C lcd(0x27, 16, 2);
This line sets the I2C address of the LCD and initializes a LiquidCrystal object called "lcd" with 16 columns and 2 rows.
#define ENA 3
#define IN1 4
#define IN2 5
#define IN3 6
#define IN4 8
#define ENB 9
These lines define the pins used to control an L298N motor driver module. ENA and ENB are the enable pins, and IN1 through IN4 are the input pins.
#define Sensor A0
This line defines the analog input pin used to read data from a magnetic sensor.
#define BUZZER 11
This line defines the digital output pin used to control a buzzer.
#define LED 7
This line defines the digital output pin used to control an LED.
2-Void Setup
The void setup() function is a pre-defined function in the Arduino programming language that is executed once when the board is powered on or reset. The setup() function is used to initialize the board and set up any necessary configurations or variables before the main program loop begins executing in the void loop() function.
In my code, the setup() function initializes the pins that are used to control the motor driver, magnetic sensor, LED, and buzzer. Specifically, it sets the appropriate pins to either input or output mode using the pinMode() function. This is important because it ensures that the pins are configured correctly before the main program loop begins executing, which can prevent errors or unexpected behavior later in the code.
Additionally, the setup() function initializes the serial communication between the Arduino board and the computer using the Serial.begin() function. This sets the baud rate for the serial communication to be (9600) bps (bits per second) and prepares the board to send and receive data through the serial port.
Serial.begin(9600) initializes the serial communication with a baud rate of 9600. This is the rate at which data is transmitted and received between the Arduino and the Bluetooth module.
pinMode(ENA, OUTPUT) sets the mode of the ENA pin to output. This pin controls the speed of the motor connected to the L298N driver on the left side.
pinMode(IN1, OUTPUT) sets the mode of the IN1 pin to output. This pin controls the direction of the motor connected to the L298N driver on the left side.
pinMode(IN2, OUTPUT) sets the mode of the IN2 pin to output. This pin controls the direction of the motor connected to the L298N driver on the left side.
pinMode(IN3, OUTPUT) sets the mode of the IN3 pin to output. This pin controls the direction of the motor connected to the L298N driver on the right side.
pinMode(IN4, OUTPUT) sets the mode of the IN4 pin to output. This pin controls the direction of the motor connected to the L298N driver on the right side.
pinMode(ENB, OUTPUT) sets the mode of the ENB pin to output. This pin controls the speed of the motor connected to the L298N driver on the right side.
pinMode(Sensor, INPUT) sets the mode of the Sensor pin to input. This pin is used to read the value from the magnetic sensor.
pinMode(BUZZER, OUTPUT) sets the mode of the BUZZER pin to output. This pin is used to control the buzzer.
pinMode(LED, OUTPUT) sets the mode of the LED pin to output. This pin is used to control the LED.
lcd.init() initializes the LCD display.
lcd.clear() clears the LCD display.
lcd.backlight() turns on the backlight of the LCD display.
lcd.setCursor(0, 0) sets the cursor position to the first row and first column of the LCD display.
lcd.print("Hello Makers") displays the text "Hello Makers" on the LCD display.
delay(1000) adds a delay of 1 second to the program.
lcd.clear() clears the LCD display.
lcd.print("I'm Kuzmos") displays the text "I'm Kuzmos" on the LCD display.
delay(1000) adds another delay of 1 second to the program.
lcd.clear() clears the LCD display again.
3-Void Loop
The loop() function is the main body of the program that runs continuously as long as the Arduino board is powered on. The loop() function contains two main sections: reading serial input and controlling the motor and sensor outputs.
The first section of the loop() function checks whether there is any data available in the serial buffer using the Serial.available() function. If there is data available, the function reads a character from the serial buffer using the Serial.read() function and stores it in the direction variable. The direction variable is then used to control the motor outputs by setting the appropriate input pins of the motor driver to the appropriate logic levels using the digitalWrite() function and setting the motor speeds using the analogWrite() function.
The second section of the loop() function reads the value of the magnetic sensor using the analogRead() function and stores it in the sensorValue variable. The sensorValue variable is then used to control the LED and buzzer outputs by turning them on and off based on whether the sensor is detecting a magnetic field.
Robot Movement Code
if (Serial.available() > 0) checks if there is any data available to be read from the serial buffer.
char direction = Serial.read() reads a character from the serial buffer and stores it in the variable direction.
The if-else statements check the value of direction and set the appropriate motor direction and speed using the digitalWrite() and analogWrite() functions.
In my code, the if loop is used to check the value of the direction variable that is read from the serial buffer. The direction variable represents the desired direction of the motor, which is specified by a single character ('F', 'B', 'L', 'R', or 'S') that is sent to the Arduino board over the serial connection.
For each possible value of the direction variable, there is an if statement that checks whether the value matches the corresponding character.
For example, the first if statement checks whether the value of direction is equal to 'F', which corresponds to the forward direction.
If the value of direction matches the specified character, the code within the corresponding if statement is executed.
This code sets the appropriate input pins of the motor driver to the appropriate logic levels using the digitalWrite() function and sets the motor speeds using the analogWrite() function.
Similarly, the other if statements check for the other possible values of direction ('B', 'L', 'R', and 'S') and execute the appropriate code for each direction.
For example, the if statement for the 'S' (stop) direction sets all of the input pins to a low logic level and sets the motor speeds to zero using the analogWrite() function.
int sensorValue = analogRead(Sensor);
This line uses the `analogRead()` function to read the value of the magnetic sensor connected to the `Sensor` analog input pin and store the value in the `sensorValue` variable.
if (sensorValue > 50) {
lcd.clear();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Stay Away");
lcd.setCursor(0, 1);
lcd.print("Mines nearby");
digitalWrite(led, HIGH);
tone(buzzer, 255); 255 Hz}
This `if` statement checks if the value of `sensorValue` is greater than 50. If it is, the code within the curly braces is executed. This code clears the LCD screen with `lcd.clear()`, turns on the backlight with `lcd.backlight()`, sets the cursor position on the first row of the LCD with `lcd.setCursor(0, 0)`, prints the text "Stay Away" on the first row of the LCD with `lcd.print("Stay Away")`, prints the text "Mines nearby" on the second row of the LCD with `lcd.print("Mines nearby")`, turns on the LED with `digitalWrite(led, HIGH)`, and turns on the buzzer with `tone(buzzer, 255)`. The `tone()` function generates a tone with a frequency of 255 Hz on the `buzzer` pin.
if (sensorValue < 50) {
lcd.clear();
lcd.noBacklight();
digitalWrite(led, LOW);
noTone(buzzer); }
This `if` statement checks if the value of `sensorValue` is less than 50. If it is, the code within the curly braces is executed. This code clears the LCD screen with `lcd.clear()`, turns off the backlight with `lcd.noBacklight()`, turns off the LED with `digitalWrite(led, LOW)`, and turns off the buzzer with `noTone(buzzer)`.
Clear the printed Parts form supports
Mounting Ultrasonic and servo
Mounting Ultrasonic and servo
Mounting The Magnetic Sensor
Start Assembly
Fixing Arduino
Fixing the LCD
Fixing The Motors
Connect Wheels With it
Assembly The Sides With The Base
Assembly The Front with the body
I want to acknowledge the contributions of my colleague Khadija Rashwan to the project In particular, I wanted to thank her for taking the amazing shots that we used in our project. her photography skills are truly impressive, and you captured the essence of our project perfectly. I am grateful for her help and support.
I want to thank my instructor Eng/Menna El Badry for her great effort during the diploma and final project period.
I want to thank my Instructor Asmaa Saeid she suggests me to use the magnetic reed switch instead of the metal sensor
Lastly, I would like to thank all my classmates for their hard work and collaboration especially Khadija, Mohamed Alaa, Mayar Wael and Mariam Fathy and all my group members Essam, Hend, Menna,Ahmed,Fatma,Wissam
. It was a pleasure working with such a talented and dedicated group of individuals.
Thank you again for everything you have done for me. I truly appreciate it
The first problem I encountered while constructing the project was that after cutting the wood with the laser, I was unable to find the holes that I had previously marked for the motor driver. To solve the issue, I used a pencil to mark the four holes again and used a drill machine to drill them.
The second problem I faced during the construction of the project was that the tabs at the back of the body were larger than the rectangle allotted for them to enter. To resolve this issue, I used a Chiller to make the tabs smaller in width and thickness so that they could fit into the designated rectangle
During the assembly of the project, the electric current was cut off unexpectedly. However, my enthusiasm to see the project completed motivated me to continue working, even using the flashlight on my phone to illuminate the workspace.
If I had more time, I would do a lot of things, but according to the instructions and components we had during the diploma, let's talk about what's possible.
Aesthetically:
Paint the device with a durable and visually appealing coating or design.
I was going to change the design and the length of the sensor stand to be closer to the ground, because this sensor is somewhat weak
Programmatically:
Implement a mapping feature that displays the location of detected mines on a map or other graphical interface.
Improve the accuracy and sensitivity of the magnetic sensor to reduce false alarms and increase the detection range.
Create a phone application that allows users to remotely control the robot and view the location of detected mines in real-time.