Report
Report
Group No. 10
Submitted by:
1.Utkarsh Shukla (20235091)
2.Ravikant Munda (20235067)
3.Rakesh Ranjan (20235066)
4.Rajkamal Gautam (20235065)
5.Anaranyo Sarkar (20235008)
Specification Table:
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
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);
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
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;
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);
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();
}
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.
Accelerometers and gyroscopes (IMU sensors) to detect tilt and movement along different axes.
LIDAR or depth sensors for accurate topographic analysis.
This enables:
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).
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:
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!