REPORT
REPORT
REPORT
TABLE OF CONTENTS
ABOUT TEAM MEMBERS
PART 1: OVERVIEW MOBILE ROBOT
1. Overview of the robot
1
is either flat or changing, as well as convex and concave. This project has been thoroughly
investigated as a self-propelled robot in a maze.
Mobile robots are an important component in the industry of Robotics. Along with the
strong development of automation systems, self-propelled robots are more and more
perfected and show its benefits in industry and daily life. A very interesting issue when
researching self-propelled robots is how do robots know?
knows the position it is standing in and can move to a specified position, and can
automatically. Avoid the obstacles on the way. Therefore, the successful fabrication of the
topic
This will open up a new approach and contribute to promoting the application of robots
today more and more in daily life and in manufacturing research.
MATERIAL AMOUNT
2
Wheel 2
Robot’s frame 2
DC motor gear V3 2
Module L298N 1
Battery box 1
Battery 2
3
DC gear motor V3: Which is the type chosen and used most today for simple robot
designs. The good quality V3 geared DC motor and its ease of assembly provide cost
savings and user convenience.
Specification:
Operating Voltage: 3-6 VDC
Power Consumption: 60mA
Transmission ratio: 1:120
Number of revolutions per minute: 100 revolutions/1 minute in 6V.
Moment: 4500mg.cm
Yellow, Blue, Orange
Module L298N
4
*Specifications
5
14. DC motor 2 “-” or stepper motor B
Module L298N is a motor control module, the motor here is a geared motor. To be
flexible in keeping the vehicle stable, the engine must continuously reverse rotation thanks
to the H-bridge circuit integrated in the engine control module L298N.
On the other hand, to control the direction of rotation, we only need to reverse the
direction of the DC current through the motor, and the most common method is to use an H-
bridge. An H-Bridge circuit contains four switching components, the bulb. transistors or
MOSFETs, with the motor at the center forming an H-like configuration. By activating two
specific switches at the same time, we can change the direction of the current flow, thus
changing the current. direction of rotation of the motor.
2.1.3. Arduino UNO R3
* About Arduino UNO R3: Arduino is a hardware open circuit design platform (Open-
source hardware) and software (Open-source software). Arduino hardware are single-board
microcontrollers (Single-board microcontrollers) created in the town of Ivrea in Italy, in
order to build applications that interact with each other or with a more conducive
environment.
Introduced in 2005, the designers of Arduino strive to provide an easy, inexpensive way for
hobbyists, students, and professionals to create devices that can interact with the
environment through sensors and actuators. Popular examples for beginner hobbyists
include simple robots, temperature control, and motion detection. Accompanying it is an
integrated development environment (IDE) that runs on common personal computers and
allows users to write programs for the circuit using the Arduino language, a native language
developed based on C. /C++.
It is because of its convenience and simplicity for users that Arduino has become a
phenomenon in the world electronics village. The products of the Arduino user community
as well as the devices that support the Arduino are so large that they cannot be counted. It's
grown to the point where we can call it an ecosystem as diverse as the title - like Windows
or Android.
6
With Arduino you can apply to simple circuits such as light sensor circuits turning lights on
and off, motor control circuits, ... or even higher, you can make products such as 3D
printers, Robots, etc. hot air balloons, drones, etc
An Arduino system can provide users with a lot of interaction with their surroundings with:
- Functional modules (shield) support wired connection with other devices or common
wireless connections (3G, GPRS, Wifi, Bluetooth, 315/433Mhz, 2.4Ghz,...), ...
Referring to the Arduino line of circuits used for programming, the first thing that people
often talk about is the Arduino UNO series. Currently, this circuit has been developed to the
3rd generation (R3).
7
Board Arduino uno R3
When connected to the computer board, it will be powered, and this is also the place to
transmit programming data from the computer to the circuit board.
Can be supplied from 5-20V but the manufacturer recommends 7-12V is reasonable, more
than 12V components in the circuit may overheat, below 7V may not be enough for the
circuit to work properly.
3: Power IC
Its main function is to provide a stable voltage for the control chip and operating peripherals
4: Vibrating Quartz
Each quartz oscillation corresponds to one chip clock. Usually on board UNO R3 will use
16Mhz quartz (meaning in 1s it will execute 16 million instructions. Note that 1 C
instruction will take many machine instructions)
5: Arduino Reset
8
When you want to get your circuit running again, you need this reset. You have 2 ways to
reset your arduino board, the first is to use the reset button (17) on the board, the second is
to use an external push button to connect to the reset position (5) on the circuit.
6: Source area
• Vin Pins: Supply external power to the Arduino, connect the positive pole of the source to
this pin, the negative pole of the source to the GND pin of the arduino
• 5V & 3.3V: 5V (or 3.3V) output voltage. The maximum allowed current at these pins is
500mA(for 5V) and 50mA(for 3.3V pin)
Note:
The Arduino Uno R3 has no input reverse protection. Therefore, you must be very careful,
check the negative - positive poles of the source before supplying the Arduino Uno R3.
• The 3.3V and 5V pins on the Arduino are the pins used to supply power to other devices,
not the input power pins. Power supply in the wrong place can damage the board. This is
not recommended by the manufacturer.
• Powering the Arduino Uno R3 externally without a USB port with a voltage below 6V
may damage the board.
• Supplying a voltage above 13V to the RESET pin on the board can damage the
ATmega328 microcontroller.
• The input/output current at all Digital and Analog pins of the Arduino Uno R3 if exceeded
200mA will damage the microcontroller.
• Supplying voltages above 5.5V to the Digital or Analog pins of the Arduino UNO will
damage the microcontroller.
• Amperage through any Digital or Analog pin of Arduino UNO exceeding 40mA will
damage the microcontroller. So if you're not using it to transmit or receive data, you'll need
a current limiting resistor.
7: Digital Pins
• There are 14 pins from pin 0 to pin 13 used to get signal or output digital signal (Digital
Input, Digital Output)
9
• Only pin 13 is connected to the LED solder on the board
• The pins marked ~(3,5,6,9,10,11) are pins that can output PWM pulses with a resolution
of 8 bits (values from 0-28-1 respectively 0 to 5V ) and have The value can be adjusted in
the range from 0 to 5V, used to change the motor speed or light brightness, ...
Note:
Each pin can withstand up to 40mA but should be used at 20mA . threshold
8: Analog Pins
The Arduino has 6 Analog pins from A0 to A5, these pins are commonly used as analog
inputs but can also be used as digital inputs or outputs. ) of the Digital pin9: AREF
comparator voltage
The AREF pin is used as a reference voltage for an analog signal. The voltage applied here
ranges from 0-5v and is the upper limit for analog input signals.
Serial Pins
• These pins are used to communicate between the Arduino board and the computer or other
modules and devices.
• Includes 2 pins 0(RX) and 1(TX): used to send (TX - transmit ) and receive (RX -
Receive) TTL Serial data
• The most basic application that we often use is any Serial monitor through the Serial port
to view or check the value. This is a way to debug programs for arduino
SPI Pins
• The pins SS/SCK/MISO/MOSI are pins used for SPI (Serial Peripheral Interface)
communication.
• On the Arduino Uno board, the pins used for SPI communication are chan 10-13 and they
are also on the ICSP pins.
I2C Pins
SCL/SDA are pins used for I2C communication (pin A4 and pin A5)
10
Interrupt Pins
INT0 and INT1 are 2 pins used for interrupts, then the program will jump into the interrupt
function, finish executing the statements in the interrupt function, and then return to running
the main program.
Memory
- 32KB of Flash memory: the programming instructions will be stored in the Flash memory
of the microcontroller.
- 2KB for SRAM (Static Random Access Memory): the values of variables declared when
programming will be stored here. The more variables you declare, the more RAM you need.
In the event of a power failure, the data on the SRAM will be lost.
- 1KB for EEPROM (Electrically Erasable Programmable Read Only Memory): this is like
a mini hard drive - where you can read and write your data here without having to worry
about losing it when the power goes out like data on SRAM.
11
+. It's called the "Arduino language," and so does the Arduino development team. The
Arduino language originates from the popular C/C++ today, so it's easy to learn and
understand.
To program as well as send commands and receive signals from the Arduino circuit, the
development team of this project has also provided users with an Arduino programming
environment called the Arduino IDE.
• Programming for Arduino
Download Arduino 1.8.19 software to your computer to program the arduino circuit
HC-SR04 is an ultrasonic sensor mainly used to determine the distance of the target object.
It measures distance accurately using contactless technology, i.e. there is no physical
contact between the sensor and the object.
The transmitter and receiver are the two main parts of the sensor, the transmitter converts
the electrical signal into ultrasonic waves, and the receiver converts that ultrasonic signal
back into an electrical signal.
These ultrasonic waves are audio signals that can be measured and displayed at the
receiving end.
It provides precise measurement details and comes with a resolution of about 3mm, there
may be slight differences in the calculated distance from the object and the actual distance.
*Specifications:
- Voltage: 5V DC
12
- Operating current: <2mA
- High level: 5V
- Low level: 0V
- Maximum angle: Not more than 15 degrees
- Distance: 2cm-450cm(4.5m)
- Accuracy: 3mm
- Output signal: High pulse level 5V, low level 0V
- Connection mode: VCC/Trig(T-Trigger)/Echo(R-Receive)/GND
needs.
In principle, these speakers need a high voltage source to play well (manufacturer
announced = 30V). On the power circuit, IC MAX232 is used as a buffer. This IC will take
the signal from the controller, amplify the amplitude to +/-30V to power the upper speaker.
This IC will be switched through a transistor to limit current consumption.
b/ Reflective ultrasonic receiver unit
The receiver is a ceramic loudspeaker that is only sensitive to one frequency, such as
40KHz. Through a series of components such as OPAM TL072, NPN transistor… This
signal is continuously amplified in amplitude and finally passed through a comparator,
combined with the signal from the controller to return to the controller.
c/ Signal processing and control unit
Microcontrollers (PIC16F688, STC11, ...) are used as pulse generators, processing and
calculating the time from transmitting to receiving ultrasonic waves if TRIG signal is
received.
*Operating principle of sensor HC-SR04
To measure the distance with the ultrasonic sensor HC-SR04, we will emit a very short
13
pulse (5 microSeconds) from the Trig pin. Next, a HIGH pulse at the Echo pin will be
generated and transmitted by the sensor until it receives a reflected wave at this pin. At this
point, the pulse width will be equal to the time the ultrasonic wave is emitted from the
sensor and reflected back.
In air, the speed of sound reaches 340 m/s (constant), equivalent to 29,412
microSeconds/cm (106 / (340*100)).
Once we have calculated the time, we will divide by 29,412 to get the distance value.
• Then the ultrasonic module records the time and sends out 40Khz . frequency sound waves
• Ultrasonic waves propagate down to the liquid surface in the tank and reflect back
• The ultrasonic module receives the reflected wave and timestamps it received
Finally, the ultrasonic module puts the ECHO pin high in the time (microseconds) to
respond to the sound wave (Send – receive) and calculate the distance.
14
Result on ECHO pin: 58 μs/cm
So, if the ECHO pin goes high for 5800 μs (5.8 ms), then we calculate the distance between
the sensor and the liquid level in the tank as:5800μs / 58μs/cm = 100cm = 1m
// L298N
#define ENA 9
#define IN1 11
#define IN2 8
#define IN3 13
#define IN4 12
#define ENB 10
15
long duration_l, duration_c, duration_r;
int distance_l, distance_c, distance_r;
void setup() {
Serial.begin(9600);
pinMode(trigPin_l, OUTPUT);
pinMode(trigPin_c, OUTPUT);
pinMode(trigPin_r, OUTPUT);
pinMode(echoPin_l, INPUT);
pinMode(echoPin_c, INPUT);
pinMode(echoPin_r, INPUT);
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENB, OUTPUT);
}
void loop() {
16
Serial.print(" || Distance_r: ");
Serial.println(distance_r);
//logic
if (distance_c > 10) {
(distance_l < 5) ? turnRight(8) : (distance_r < 5) ? turnLeft(8) :
mvForward(85);
stop(40);
} else if (distance_l > 20 && distance_r < 20) {
turnLeft(155);
stop(200);
} else if (distance_l < 20 && distance_r > 20) {
turnRight(170);
stop(200);
} else if (distance_l < 20 && distance_r < 20) {
turnRight(180);
stop(500);
}
}
// qua trái
void turnLeft(int time) {
Motor(0, 1, 1, 0, 255, 255);
delay(time);
}
// qua phải
void turnRight(int time) {
Motor(1, 0, 0, 1, 255, 255);
delay(time);
}
17
// đi thẳng
void mvForward(int time) {
Motor(1, 0, 1, 0, 160, 150);
delay(time);
}
// dừng
void stop(int time) {
Motor(0, 0, 0, 0, 0, 0);
delay(time);
}
2.3. Assembly and design:
1. Connect the wheel (motor) to the L298N module.
- Connect the wire of the first wheel to OUT1, OUT2 and the wire of the 2nd wheel to
OUT3, OUT4 of L298N. IN1, IN2 are 2 poles that will control the direction of wheel 1.
IN3, IN4 are 2 poles that will control the direction of wheel 2. ENA is used to adjust the
speed of the first wheel. ENB is used to adjust the speed of the 2nd wheel.
2. Connect the L298N module to the arduino board
Connect the 12V wire to one side of the switch. Next, connect the red wire of the battery
and add 1 red wire to the switch. The 5V wire connects to the positive terminal of the
breadboard to supply power to the sensors and the board. The black wire of the power
supply combines with 1 black wire of the GND of the arduino board circuit.
3. Connect 3 ultrasonic sensors HC-SR04 to the Arduino uno R3 board.
We will plug the GND pin of the 3 sensors together to the negative terminal on the
breadboard. Then from the breadboard negative terminal add a common wire to connect to
the GND pin of the Arduino Uno. The VCC pins of the three sensors are attached to the
anode on the bread board. Then from the breadboard anode add a common wire to connect
to the 5V pin of the arduino Uno. As for trig and echo, plug in the declaration.
18
2.4. Product:
Video:
19
TEST, ANALYZE AND THE CONTRIBUTION OF TEAMMATES
The robot runs well but still can't run to cover the whole maze. Need to improve in some
places so that the robot can run on many different mazes, without being too difficult to
move. Guaranteed to be able to handle any difficult situation.
We need to work together in groups more effectively, team members actively learn, and
come up with actionable ideas. Contribute a piece of knowledge to the whole team to
achieve success later.
One last note should be made about cost. If the investment is assessed for the short term, it
is considered very expensive. However, if the project is successful, it will most likely pay
off in the long run. Overall, mobile robots have a lot to offer the industry, albeit with some
limitations.
20
3. Autonomous robots perform well in environments with a large workload.
Autonomous robots work to improve the efficiency of your business by lowering
journey time. The less time an employee spends traveling, the more time they spend
picking and filling orders in their zone of the warehouse. The good news is that
autonomous robots perform admirably when faced with a large amount of labor. As a
result, the robots are able to significantly reduce staff travel time.
DRAWBACKS
1. The cost of a mobile robot
The cost of making a self-propelled robot is also quite expensive. To make a
complete robot we need quite expensive materials such as circuit boards, chips,
spare devices, etc. The manufacturing of a robot also depends on the working
conditions of the robot and different working environments. We also have to
experiment and evaluate to come up with some reasonable calculations.
Therefore, we need to consider a number of problems, come up with safe
solutions. Make sure it doesn't cost too much
2. Potential Job Losses
One of the most significant worries about the adoption of robotic automation
is the impact on workers' jobs. The danger is that if a robot can execute at a
faster, more consistent rate, humans will be obsolete. These concerns are
understandable, but they are not entirely correct.
During the early years of the industrial revolution, the same was asserted, and
as history has shown, humans continued to play an important role. This is
exemplified by Amazon. During a period in which they went from using roughly
1,000 robots to over 45,000, the employment rate has risen substantially.
REFERENCES
[1] Trịnh Quang Tùng, Trần Văn Đến, Trịnh Thúy Tình, Đặng Văn Trung “ Thiết kế và chế tạo robot vẽ
tranh’’ , Đại học Mỏ- Địa Chất Hà Nội, 2017
21
[2] Nguyễn Thị Phương Chi Khoa Điện - Đại học Kỹ thuật Công nghiệp “ Thiết kế xe điều khiển từ xa qua
bluetooth design mini car controlled via bluetooth’’
[3] Thạc sĩ Trần Thái Anh Âu khoa Điện – Đại học Bách Khoa Đà Nẵng “ Thiết kế robot mini tự hành dò
đường, năm 2010”
[5] http://codientu.org/
[6] http://arduino.vn/bai-viet/893
[7] https://vi.wikipedia.org/wiki/Segway_PT
[9] https://howtomechatronics.com/tutorials/arduino/arduino-dc-motor-control-tutorial-l298n-pwm-h-
bridge/
[10] https://mcuoneclipse.com
[11] https://create.arduino.cc/projecthub/twob/self-balancing-robot-using-blubug-8894c6
[12] http://www.instructables.com/id/2-Wheel-Self-Balancing-Robot-by-using-Arduino-a
22