0% found this document useful (0 votes)
16 views10 pages

Report

This document details the design and development of a low-cost, WiFi-enabled autonomous vehicle prototype using the NodeMCU ESP8266 microcontroller, emphasizing safety features like obstacle detection. The project aims to provide a scalable platform for future enhancements in autonomous mobility and serves educational purposes within the field of embedded systems. Future upgrades include 360° sensor support, elevation change detection, speed control, and transitioning to a fully battery-operated system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views10 pages

Report

This document details the design and development of a low-cost, WiFi-enabled autonomous vehicle prototype using the NodeMCU ESP8266 microcontroller, emphasizing safety features like obstacle detection. The project aims to provide a scalable platform for future enhancements in autonomous mobility and serves educational purposes within the field of embedded systems. Future upgrades include 360° sensor support, elevation change detection, speed control, and transitioning to a fully battery-operated system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Development of a Safety-Enhanced W iFi-Enabled Autonomous

Vehicle Platform using NodeMCU ESP8266 Architecture.

Group No. 10

Submitted in partial fulfillment of the course


Computer Organization & Microcontrollers

Submitted by:
1.Utkarsh Shukla (20235091)
2.Ravikant Munda (20235067)
3.Rakesh Ranjan (20235066)
4.Rajkamal Gautam (20235065)
5.Anaranyo Sarkar (20235008)

Department of Electrical Engineering,


MNNIT Allahabad

DATE : 24 April 2025


Introduction:
This project presents the design and development of a low-cost, safety-enhanced,
WiFi-controlled autonomous vehicle prototype, utilizing the NodeMCU ESP8266
microcontroller as the core component. Developed as a collaborative effort by a
group of five team members, the project was carried out under a constrained budget
of ₹1,500, emphasizing both economic feasibility and functional robustness.
At its core, the project involves constructing a WiFi-enabled remote-controlled (RC)
car capable of being operated through a local wireless network. This is achieved
through the integration of the ESP8266 module, which serves as both the brain and
the communication gateway for the system. To elevate its functionality
beyond that of a simple RC car, the vehicle has been equipped with an HC-SR04
ultrasonic sensor, enabling real-time obstacle detection and avoidance. This key
safety feature allows the vehicle to respond dynamically to its environment by
altering its path when an obstruction is detected within a specified range. While the
prototype remains in its early developmental stages, it successfully simulates the
foundational
framework of an autonomous self-driving vehicle. By merging basic automation
principles with wireless control, the project offers a scalable and modular platform for
future enhancements such as path planning, environmental mapping, or integration
with additional sensors (e.g., infrared, GPS, or camera modules). The project not
only demonstrates fundamental concepts in embedded systems, wireless
communication, and sensor integration, but also provides a practical introduction to
the rapidly evolving field of autonomous transportation. Its low-cost nature and
adaptability make it suitable for educational purposes, hobbyist exploration, and
early-stage research into autonomous mobility solutions.

Specification Table:

Component Description Key Specifications Approx. Cheapest


Cost (INR) Amazon Link
(India)
7805 Voltage Fixed voltage linear Input Voltage: 7–35V ₹10–20 Buy 7805 on
Regulator regulator IC for providing Output Voltage: 5V ±2% Amazon India
stable +5V output. Max Output Current: 1A
(2.2A surge)
Drop-out Voltage: 2V
Package: TO-220
Operating Frequency: Not
applicable (linear
regulator)
Protections: Current
limiting, thermal shutdown
Component Description Key Specifications Approx. Cheapest
Cost (INR) Amazon Link
(India)
Buy L298N on
L298N Motor Dual H-bridge motor driver Dual Channel (2 DC ₹118–150
Amazon India
Driver module for controlling 2 DC motors or 1 stepper) Input
motors or 1 stepper motor. Voltage (Vs): up to 35V
Logic Voltage (Vss): 5V
Output Current: up to
2A/channel
Onboard 78M05 5V
regulator
PWM Frequency: Typically
up to 40 kHz Protections:
Over-
temperature
Package: Module with
screw terminals
Microcontroller:
ATmega328P
Arduino Uno Popular microcontroller ₹400–600 Buy Arduino
Operating Voltage: 5V
development board based (clone), Uno on
Input Voltage: 7–12V
on ATmega328P. ₹1,500+ Amazon India
Digital I/O: 14 (6 PWM)
(official)
Analog Inputs: 6
Clock Frequency: 16 MHz

Flash Memory: 32 KB
SRAM: 2 KB
EEPROM: 1 KB
ESP8266 Low-cost Wi-Fi microchip Wi-Fi: 802.11 b/g/n ₹100–250 Buy ESP8266
with full TCP/IP stack and CPU: 32-bit, 80 MHz on Amazon
microcontroller capability. (default, can be India
overclocked to 160 MHz)
Operating Voltage: 3.0–
3.6V
PWM Frequency: Up to

HC-SR04 Ultrasonic distance sensor Operating Voltage: 5V ₹50–80 Buy HC-SR04


for measuring distance to Measuring Range: 2–400 on Amazon
objects. cm India
Accuracy: ±3 mm
Operating Frequency: 40
kHz (ultrasonic)
Trigger/echo interface
Current:
Rated Voltage: 12V
12V DC Motor Standard DC motor ₹100–300 Buy 12V DC
Current: 100 mA–2A
commonly used in robotics Motor on
(varies by model)
and automation. Amazon India
Speed: 1000–6000 RPM
(varies)
Torque: varies
Operating Frequency: Not
applicable (depends on
supply and load)
Type: Brushed DC
Index:
1. Top view of the car
2. Microcontroller for sensor operation
3. Connections

Development cycle:
1. Chassis structural assembly
2. Attachment of breadboard and microcontrollers
3. Attachment of sensors and motors
4. Wire connection
5. Wheel attachment
6. Power supply connection

🚀 Code
<details>
<summary> 🔧 Arduino Code</summary>
const int trigPin = 9;
const int echoPin = 10;
const int signalstate1 = 4;
long duration;
int distance;

void setup() {
Serial.begin(9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}

void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);

digitalWrite(trigPin, HIGH);
delayMicroseconds(15);
digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH, 30000); // 30ms timeout


if (duration == 0) {
Serial.println("No pulse detected.");
distance = 0;
} else {
distance = duration * 0.034 / 2;
}

Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");

if (distance <= 15) {


digitalWrite(signalstate1, HIGH);
delay(50);
digitalWrite(signalstate1, LOW);
}

delay(500);
}

// NodeMCU code
#define IN_3 IN_4
D6
#define IN_1 IN_2
D7
#define inputPinD1
#define D2
#define D5

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>

long duration1;
long duration2;
int distance1;
int distance2;

const char* ssid = "Galaxy J62448";


const char* password = "pahn7693";
ESP8266WebServer server(80);
volatile bool obstacleDetected = false;

void ICACHE_RAM_ATTR obstacleISR() {


obstacleDetected = digitalRead(inputPin);
}

void HTTP_handleRoot(void) {
if (server.hasArg("State")) {
Serial.println(server.arg("State"));
}
server.send(200, "text/html", "");
delay(1);
}

void setup() {
pinMode(IN_1, OUTPUT);
pinMode(IN_2, OUTPUT);
pinMode(IN_3, OUTPUT);
pinMode(IN_4, OUTPUT);
pinMode(inputPin, INPUT);
Serial.begin(115200);

WiFi.mode(WIFI_AP);
WiFi.softAP(ssid);
WiFi.begin(ssid, password);

IPAddress myIP = WiFi.softAPIP();


Serial.print("AP IP address: ");
Serial.println(myIP);
server.on("/", HTTP_handleRoot);
server.onNotFound(HTTP_handleRoot);
server.begin();
attachInterrupt(digitalPinToInterrupt(inputPin), obstacleISR, CHANGE);
}

void forward() {
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
}

void backward() {
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
}

void stopRobot() {
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, LOW);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, LOW);
}

void goLeft() {
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, LOW);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
}

void goRight() {
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, LOW);
}

void clockwise() {
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
}

void anticlockwise() {
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
}

void loop() {
server.handleClient();
String command = server.arg("State");
int signalState = digitalRead(inputPin);
Serial.print("Signal state: ");
Serial.println(signalState);

if (command == "F") {
if (!obstacleDetected) {
forward();
} else {
Serial.println("Obstacle detected! Blocking forward motion.");
stopRobot();
delay(10000);
}
} else if (command == "B") backward();
else if (command == "L") goLeft();
else if (command == "R") goRight();
else if (command == "S") stopRobot();
else if (command == "C") clockwise();
else if (command == "A") anticlockwise();
}

Download the Remote App:


https://drive.google.com/drive/folders/1xtPp4QZhSWYLsrjwizcJ7hdYFRZYn
hgz?usp=sharing

Future Potential for Upgradation

1. 360° Sensor Support with Multiple Sensors or Servo Motor


The addition of 360° sensor support significantly enhances environmental awareness. This can be achieved
either by:

Mounting multiple ultrasonic/infrared sensors at various angles around the device, providing
simultaneous multi-directional obstacle detection.
Using a servo motor to rotate a single sensor, enabling a panoramic scan of the surroundings and
creating a real-time 360° map.

This upgrade enables:

Better navigation and collision avoidance in dynamic environments.


Applications in autonomous robotics, where spatial awareness is critical.
Potential for integration with SLAM (Simultaneous Localization and Mapping) algorithms for mapping
unknown terrains.

2. Elevation Change Detection


Incorporating elevation detection allows the device to sense changes in terrain, such as slopes, stairs, or
potholes. This can be implemented using:

Accelerometers and gyroscopes (IMU sensors) to detect tilt and movement along different axes.
LIDAR or depth sensors for accurate topographic analysis.

This enables:

Use in outdoor terrain navigation where uneven ground is common.


Safety features to prevent falls or missteps for mobile robots or assistive devices.
Enhanced suitability for search and rescue missions in rugged environments.

3. Speed Control Using Motor Driver Pin

By implementing speed control through PWM (Pulse Width Modulation) signals sent to motor driver pins:

Devices can adjust movement speed dynamically based on environmental conditions (e.g., slowing near
obstacles or tight corners).
Enables fine maneuvering for precise tasks.
Optimizes power consumption, especially when paired with battery operations.

This allows:

Creation of smart motion profiles (e.g., accelerate on open paths, decelerate near obstacles).
Improved robotic arm or mobile platform control for handling delicate tasks.
Customizable user modes (e.g., eco-mode, turbo mode).

4. Fully Battery Operated Functioning

Transitioning to a fully battery-operated system ensures portability and independence from power outlets. This
involves:

Selecting appropriate Li-ion/LiPo battery packs based on current and voltage requirements.
Implementing power management systems to monitor and optimize battery health.
Possibly adding solar charging or wireless charging capabilities for long-term use.

Benefits include:

Deployment in remote or outdoor locations where power access is limited.


Application in mobile robotics, drones, or wearable tech.
Supporting energy-efficient operations for longer runtimes and fieldwork adaptability.

Citations:
1. https://protosupplies.com/product/voltage-regulator-7805-5v-1a/
2. https://www.linkedin.com/pulse/everything-you-want-know-l298n-motor-driver-vayuyaan
3. https://forum.arduino.cc/t/what-is-the-arduino-uno-clock-frequency/91264
4. https://www.b4x.com/android/forum/threads/pwm-frequency-for-esp8266-accuracy-tested.115827/
5. http://eeshop.unl.edu/pdf/HC-SR04_Ultrasonic_Module_User_Guide.pdf
6. https://electronics.stackexchange.com/questions/455064/is-there-a-way-to-tell-what-frequency-i-need-a-
pwm-to-be
7. https://www.blikai.com/blog/what-7805-voltage-regulator-ic-is-and-how-it-works
8. https://components101.com/ics/7805-voltage-regulator-ic-pinout-datasheet
9. https://www.watelectrical.com/7805-voltage-regulator/
10. https://www.omo-ic.com/blog/2024-04/l298n-functional-features-methods-of-controlling-motor-speed-and-
direction.html
11. https://www.theengineeringprojects.com/2018/06/introduction-to-arduino-uno.html
12. https://forum.arduino.cc/t/esp8266-frequencies-crystal-frequency-cpu-frequency-flash-frequency/611373

Scan the above QR code for a digital copy of this report including clickable
links!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy