Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

University of California, Irvine | An Introduction to Internet of Things Programming Specialization | Final Project

License

Notifications You must be signed in to change notification settings

devancakra/IoT-based-Radar-with-Wemos-D1-R2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Source Love License: MIT GitHub last commit IoT

IoT-based-Radar-with-Wemos-D1-R2

UCI Coursera Final Project 2023

This radar is closely related to defense technology, where this tool can function as a determinant of the direction of movement / position / shape of a detected object. The purpose of this project is to be able to make a simple radar system from the utilization of Ultrasonic sensors. This project has been implemented and took approximately 1 day. This radar system is based on the Internet of Things, so it uses MQTT as its communication protocol. The system interface can be accessed alternately through Serial Monitor and Processing. The benefit of making this project is none other than to gain experience. The results show that the system can function properly.



Project Requirements

Part Description
Development Board Wemos D1 R2
Code Editor • Arduino IDE
• Processing
Driver CH340 USB Driver
IoT Platform mosquitto
Communications Protocol Message Queuing Telemetry Transport (MQTT)
IoT Architecture 3 Layer
Application Support MQTT Explorer
Programming Language • C/C++
• Processing
Arduino Library • ESP8266WiFi (default)
• PubSubClient
• ArduinoJson
• Servo
Actuators Servo Motor SG90 180° (x1)
Sensor HC-SR04: Ultrasonic Sensor (x1)
Other Components • Micro USB cable - USB type A (x1)
• Jumper cable (1 set)
• Screws (1 set)
• HC-SR04 Mounting Bracket (x1)



Download & Install

  1. Arduino IDE

    https://bit.ly/ArduinoIDE_Installer
    

  2. Processing

    https://bit.ly/Processing_Installer
    

  3. MQTT Explorer

    https://bit.ly/MQTT_Explorer_Installer
    

  4. CH340 USB Driver

    https://bit.ly/CH340_USB_Driver
    



System Flow Schematic

When an object is in the sensor detection area, the sensor will respond by sending publish data to the IoT platform (mosquitto) and then sending back in the form of subscribe data to be displayed on the serial monitor. As for the graph, users can also see a significant color difference in the detection area. If no object is found, the sensor and actuator will always be on standby.



Project Designs

Block Diagram Pictorial Diagram
Block-Diagram Pictorial-Diagram
Wiring
Wiring



Arduino IDE Setup

  1. Open the Arduino IDE first, then open this project by clicking File -> Open :

    wemos_d1r2_radar.ino


  2. Fill in the Additional Board Manager URLs in Arduino IDE

    Click File -> Preferences -> enter the Boards Manager Url by copying the following link :

    http://arduino.esp8266.com/stable/package_esp8266com_index.json
    

  3. Board Setup in Arduino IDE

    How to setup the WEMOS D1 R2 board

    • Click Tools -> Board -> Boards Manager -> Install esp8266.

    • Then click Tools -> Board -> ESP8266 Board -> LOLIN(WEMOS) D1 R2 & mini.


  4. Change the Board Speed in Arduino IDE

    Click Tools -> Upload Speed -> 115200


  5. Install Library in Arduino IDE

    Download all the library zip files. Then paste it in the: C:\Users\Computer_Username\Documents\Arduino\libraries


  6. Port Setup in Arduino IDE

    Click Port -> Choose according to your device port (you can see in device manager)


  7. Change the WiFi Name, WiFi Password, and Client ID according to what you are currently using.

  8. Before uploading the program please click: Verify.

  9. If there is no error in the program code, then please click: Upload.

  10. If there is still a problem when uploading the program, then try checking the driver / port / others section.



Processing Setup

  1. Open the Processing first, then open the Radar GUI project by clicking File -> Open :

    radar_gui.pde


  2. Customize your port with the one in the Arduino IDE. This is so that the board can be recognized by Processing, so that the code can be run properly.

  3. The last step, please click: Run.



MQTT Explorer Setup

  1. Open the MQTT Explorer. Then, click the Connections: test.mosquitto.org.

  2. Click the ADVANCED -> Delete All Topics.

  3. Create a new Topic with QoS "0":

    coursera/uci/radar
    

  4. Copy and paste the Client ID into the Arduino IDE project.

  5. Next, click: BACK. The last step, please click: CONNECT.



Get Started

  1. Download and extract this repository.

  2. Make sure you have the necessary electronic components.

  3. Make sure your components are designed according to the diagram.

  4. Configure your device according to the settings above.

  5. Please enjoy [Done].



Highlights

Hardware View
IMG-1 IMG-2
MQTT Explorer (JSON data on Topic)
IMG-3 IMG-4
Serial Monitor (Publish & Subscribe)
IMG-5 IMG-6
Processing (Radar Graphic User Interface)
IMG-7



Reminder

  1. Before starting the project, you should test the components first to make sure the devices used can work properly. This has been provided by the creator of the program, please download and try one section at a time.

  2. The use of serial communication between Arduino IDE and Processing cannot be run simultaneously, so if you want to open the Processing GUI then at the same time you cannot open the Serial Monitor Arduino IDE. It also applies to the other way around.



Component Testing

You can download the component test file via the following link: Click Here



Appreciation

If this work is useful to you, then support this work as a form of appreciation to the author by clicking the ⭐Star button at the top of the repository.



Disclaimer

This application has been created by including third-party sources. Third parties here are service providers, whose services are in the form of libraries, frameworks, and others. I thank you very much for the service. It has proven to be very helpful and implementable.



LICENSE

MIT License - Copyright © 2023 - Devan C. M. Wijaya, S.Kom

Permission is hereby granted without charge to any person obtaining a copy of this software and the software-related documentation files to deal in them without restriction, including without limitation the right to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons receiving the Software to be furnished therewith on the following terms:

The above copyright notice and this permission notice must accompany all copies or substantial portions of the Software.

IN ANY EVENT, THE AUTHOR OR COPYRIGHT HOLDER HEREIN RETAINS FULL OWNERSHIP RIGHTS. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, THEREFORE IF ANY DAMAGE, LOSS, OR OTHERWISE ARISES FROM THE USE OR OTHER DEALINGS IN THE SOFTWARE, THE AUTHOR OR COPYRIGHT HOLDER SHALL NOT BE LIABLE, AS THE USE OF THE SOFTWARE IS NOT COMPELLED AT ALL, SO THE RISK IS YOUR OWN.

About

University of California, Irvine | An Introduction to Internet of Things Programming Specialization | Final Project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published