Arduino Mini Radar Kit
Arduino Mini Radar Kit
Content
Step 1:Assembly Tutorial .......................................................1
Step 2:Wiring .........................................................................2
Step 3:Install Arduino IDE .....................................................4
Step 4:Install CH340 Driver .................................................. 5
Step 5:Install Arduino Library ............................................. 13
Step 6:Upload Main Code ....................................................17
Step 7:Test ........................................................................... 22
Frequently Asked Questions ................................................ 24
Step 1:Assembly Tutorial
For more details refer to Assembly Video Tutorial.mp4
1/29
Step 2:Wiring
2/29
3/29
Step 3:Install Arduino IDE
Go to https://www.arduino.cc/en/Main/Software. If you have questions about the installation of Arduino IDE,
you can refer to Getting Started with Arduino products.
Before starting this installation procedure, make sure you have the latest version of the Arduino IDE
installed in your computer. If you don’t, uninstall it and install it again. Otherwise, it may not work.
4/29
Step 4:Install CH340 Driver
What is CH340 Driver?
CH340 is a TTL (serial) to USB converter and vice versa. This chip has been used in some boards such as A
rduino boards, ESP8266, etc. The boards using the CH340 chip,need a programmer in order to access the
processor or to program them.But there is a downside. An extra driver must be installed before starting to w
ork with boards having this IC.
So before uploading the code, you need to install the CH340 driver. Otherwise you won't be able to find the
correct COM port in the Arduino IDE.If your computer has already installed the CH340 driver, you can skip
this step.
5/29
If you connect your board to the computer before installing the driver, your computer will not recognize the
board correctly and you will see following image in Device Manager.
6/29
Follow the steps below to install the CH340 driver:
You can also download the latest version of the driver directly from the manufacturer site
7/29
②: Installing the driver
Tip:Before installing the driver software, you must connect the Arduino board to your
computer with a USB cable
8/29
After successful installation you should see this message
Note:In some cases, you may need to reset Windows after the driver installation is complete.
9/29
③: Checking Correct Driver Installation in Device Manager
If your driver has been installed correctly, and if you connect your board to a computer, then you can see its
name and port number in the Port section. For example, my Arduino board is connected to COM28.
10/29
④: Checking Correct Driver Installation in Arduino IDE
Open the Arduino IDE software. Go to the Tools menu and from the Port section, select the port number app
ropriate port that your board is connected to. Note that this port number must be the same as the number you
saw in the previous step.
11/29
If you don't find the Arduino CH340 device in your computer's device manager or Arduino IDE, it means
you didn't install the driver successfully. You can try uninstall the driver, restarting your computer, and then
repeating the above steps.
12/29
Step 5:Install Arduino Library
Before uploading the code, you need to install the LCD library file "Ucglib.h". Otherwise, an error will
occur when the Arduino IDE compiles the code.
13/29
14/29
15/29
After the installation is successful, ucglib will appear in the Open Arduino IDE—>Sketch—>Include
Library list.
16/29
Step 6:Upload Main Code
①Start Arduino IDE, open the code in
File->Open...->->Main Code>Arduino_Mini_Radar_Kit.ino
17/29
②Select your Board in Tools > Board menu>Arduino Uno
18/29
③Select the Port (if you don’t see the COM Port in your Arduino IDE, you need to Install the Arduino UNO
Drivers)
19/29
⑤Click Upload button in the Arduino IDE. Wait a few seconds while the code compiles and uploads to
your board.
20/29
If everything went as expected, you should see a “Done uploading” message.If the Arduino IDE reports
errors maybe you missed some steps. Arduino getting started guide is as follows
Upload a sketch in Arduino IDE Errors when uploading a sketch Getting Started with Arduino products
21/29
Step 7:Test
Principle:
By utilizing the 180-degree scanning range of the servo motor, combined with the distance measurement cap
ability of the ultrasonic sensor, Arduino can detect targets and represent them on the screen with different co
lored dots. Targets detected within a 1-meter range will be represented by red dots, while targets beyond 1 m
eter will be represented by yellow dots. The TFT screen provides intuitive visual feedback, allowing users to
understand the distance information of the targets.
22/29
The Arduino radar simulation provides the following functionalities: Function Demo Video
①Distance Measurement: By using the ultrasonic sensor to measure the distance between objects and the
sensor, it enables distance measurement and obstacle detection.
②Direction Sensing: By controlling the direction of the sensor through the servo motor, it allows obtainin
g the approximate directional position of objects in space.
③Real-time Monitoring: By continuously rotating the sensor and acquiring distance data, it enables real-ti
me monitoring of the position and distance changes of objects.
23/29
Frequently Asked Questions
Q: The screen flickers, and the display turns into a white screen after running for a while
A: Because the power consumption of the screen is slightly larger, the power supply of UNO may be
insufficient. This problem can be solved by increasing the external power supply. You can use the external
power supply of the shield, or other 5V 1A adapter or mobile power supply.
24/29
Q:The screen is white when booting, or the screen is always black
A: Obviously the wiring is wrong, please check the wiring diagram carefully and reconnect. Or maybe the
dupont wire connection is loose.
25/29
Q: The accuracy of ranging is not high
A: Part of the reason is also due to insufficient power supply. In addition, the surface and orientation of
different materials are different, and the reflection of ultrasonic waves is also different, which will cause a
large error in distance measurement. For example, a cylindrical object will become wider, and a messy
desktop will cause a large jump in the measured distance.
A: If it is very slow, and the measured distance is all 0, it is generally because the ultrasonic module line is
not connected properly, the echo cannot be detected, and it has been in a waiting state.
26/29
Q: How to view the distance value output by the ultrasonic sensor?
A: After uploading the code,click to open the Serial Monitor.The baud rate is set to 115200, the angle
27/29
28/29
Q: The distance value output by the ultrasonic module has not changed
A: You need to power cycle the Arduino Uno. Unplug the USB cable and reconnect it. If you use external
power supply, you need to restart the external power supply.
29/29