logologo
Contact

HOMEABOUTSERVICESBLOGSBOOKSSHOPCONTACT

+977 9803661701support@nepatronix.orgLokanthali, Bhaktapur

© 2025 NepaTronix all rigths reserved

WiFi Based Remote Control Car(Robotics Project)

  Back To Blogs

The Bluetooth-controlled robot project focuses on developing a robot that can be controlled through a mobile application using the Blynk platform. This integration allows for remote control via a WiFi connection, enabling users to send commands to the robot and monitor its status in real-time. The project leverages components like the ESP32, motor drivers, DC motors, and an LCD for status display. This project aims to enhance understanding of WiFi-based communication, motor control, and mobile app interfacing with microcontrollers.

Project : 7


Wi-Fi Controlled Robot Mobile App

Introduction

The Bluetooth-controlled robot project focuses on developing a robot that can be controlled through a mobile application using the Blynk platform. This integration allows for remote control via a WiFi connection, enabling users to send commands to the robot and monitor its status in real-time. The project leverages components like the ESP32, motor drivers, DC motors, and an LCD for status display. This project aims to enhance understanding of WiFi-based communication, motor control, and mobile app interfacing with microcontrollers.


Components Required


  1. ESP32: A powerful microcontroller with built-in WiFi and Bluetooth capabilities.

  2. HC-05 Bluetooth Module: Facilitates Bluetooth communication between the mobile device and the Arduino.

  3. L298N Motor Driver: Controls the speed and direction of the DC motors.

  4. DC Motors: Provide movement for the robot, typically two or four motors are used.

  5. Chassis: The frame of the robot to which all components are attached.

  6. Wheels: Attached to the DC motors for movement.

  7. Power Supply: Typically a battery pack to power the ESP32 and motors.

  8. Connecting Wires: For connecting all components.

  9. LiquidCrystal_I2C Display: An optional component to display the status of the robot.

Pin Configuration


  • Motor Driver Pins:
    • in1: 27
    • in2: 26
    • in3: 25
    • in4: 33

Libraries Used


  • BlynkSimpleEsp32.h: For interfacing with the Blynk platform.
  • Wire.h: For I2C communication.
  • WiFi.h: For WiFi connectivity.
  • LiquidCrystal_I2C.h: For interfacing with the LCD display.

 

 

Circuit Diagram:

Code:

//Copy the blynk credential from your acoount device and paset it here

 

#define BLYNK_TEMPLATE_ID "TMPL670BbO1Nl"

#define BLYNK_TEMPLATE_NAME "Data Monitoring"

#define BLYNK_AUTH_TOKEN "4Q5w-qYfY3jO82qXBaL3O0E3irLFfDwb"

#define BLYNK_PRINT Serial

#include <BlynkSimpleEsp32.h>

#include <Wire.h>

#include <WiFi.h>

#include <LiquidCrystal_I2C.h>

 

LiquidCrystal_I2C lcd(0x27, 16, 2);

 

#define in1 27

#define in2 26

#define in3 25

#define in4 33

 

char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "nepatronix_2.4";  //Enter your WIFI SSID name

char pass[] = "CLB269DA03";      //Enter your WIFI password

BlynkTimer timer;

 

// Get the button value

BLYNK_WRITE(V0) {

  bool Value = param.asInt();

  if (Value == 1) { // If 1 receive then turn ON

    forward();

    display(1, 0, "FORWARD");

  } else {// Else turn OFF

    stop();

    display(1, 0, "STOP");

  }

}

// Get the button value

BLYNK_WRITE(V1) {

  bool Value = param.asInt();

  if (Value == 1) { // If 1 receive then turn ON

    backward();

    display(1, 0, "BACKWARD");

  } else {// Else turn OFF

    stop();

    display(1, 0, "STOP");

  }

}

 

// Get the button value

BLYNK_WRITE(V2) {

  bool Value = param.asInt();

  if (Value == 1) { // If 1 receive then turn ON

    right();

    display(1, 0, "RIGHT");

  } else {// Else turn OFF

    stop();

    display(1, 0, "STOP");

  }

}

 

// Get the button value

BLYNK_WRITE(V3) {

  bool Value = param.asInt();

  if (Value == 1) { // If 1 receive then turn ON

    left();

    display(1, 0, "LEFT");

  } else {// Else turn OFF

    stop();

    display(1, 0, "STOP");

  }

}

 

void setup() {

  Serial.begin(115200);

  Wire.begin();

  lcd.init();

  lcd.clear();

  lcd.backlight();

  lcd.setCursor(1, 0);

  lcd.print("**NEPATRONIX**");

  delay(2000);

  lcd.clear();

 

  Blynk.begin(auth, ssid, pass); //Connecting to Blynk Server with ssid and password

  delay(500);

  Serial.println(WiFi.localIP());

  pinMode(in1, OUTPUT);

  pinMode(in2, OUTPUT);

  pinMode(in3, OUTPUT);

  pinMode(in4, OUTPUT);

}

 

void loop() {

 

  Blynk.run(); //run the blynk function in loop

  timer.run();

}

void display(int col, int row, String msg) {

  lcd.clear();

  lcd.setCursor(col, row);

  lcd.print(msg);

}

 

void forward() {

  digitalWrite(in1, LOW);

  digitalWrite(in2, HIGH);

  digitalWrite(in3, LOW);

  digitalWrite(in4, HIGH);

}

void backward() {

  digitalWrite(in1, HIGH);

  digitalWrite(in2, LOW);

  digitalWrite(in3, HIGH);

  digitalWrite(in4, LOW);

}

void right() {

  digitalWrite(in1, HIGH);

  digitalWrite(in2, LOW);

  digitalWrite(in3, LOW);

  digitalWrite(in4, HIGH);

}

void left() {

  digitalWrite(in1, LOW);

  digitalWrite(in2, HIGH);

  digitalWrite(in3, HIGH);

  digitalWrite(in4, LOW);

}

void stop() {

  digitalWrite(in1, LOW);

  digitalWrite(in2, LOW);

  digitalWrite(in3, LOW);

  digitalWrite(in4, LOW);

}

 

Working


  1. Initialization:
    • The ESP32 initializes the serial communication at a baud rate of 115200.
    • The I2C LCD display is initialized, and a welcome message is displayed.
    • The ESP32 connects to the Blynk server using the provided credentials (auth token, WiFi SSID, and password).
    • The motor driver pins are configured as outputs.
  2. Main Loop:

    • The program runs the Blynk and timer functions continuously.
    • The Blynk platform listens for button presses on the mobile app and sends corresponding commands to the robot.

  3. Control Functions:
    • Forward: Sets motor driver pins to move the robot forward.
    • Backward: Sets motor driver pins to move the robot backward.
    • Right: Sets motor driver pins to turn the robot right.
    • Left: Sets motor driver pins to turn the robot left.
    • Stop: Sets motor driver pins to stop the robot.
    • The current action is displayed on the LCD.

Testing

  1. Setup: Assemble the robot and connect all components as per the pin configuration.
  2. Power Up: Turn on the power supply and ensure the ESP32 and motors are receiving power.
  3. WiFi Connection: Ensure the ESP32 is connected to the specified WiFi network.
  4. Blynk App: Configure the Blynk app with the provided template ID and auth token.
  5. Commands: Test each command ('F', 'B', 'R', 'L', 'S') and verify the robot's response.
  6. Display: Check the LCD to ensure it displays the correct status messages.

Conclusion

This Bluetooth-controlled robot project successfully demonstrates how to integrate WiFi communication with robotics using the ESP32 and the Blynk platform. The project provides practical experience in controlling a robot via a mobile application, enhancing understanding of WiFi-based communication, motor control, and interfacing microcontrollers with external devices. This hands-on project serves as a foundation for more advanced robotic and IoT applications.




Total likes : 4

Comments







Read More Blogs!

Combination of Resistance Parallel Connection(STEAM Education)

To understand the effect of resistance in parallel connection on circuit behavior, that we will observe from LED intensity.


1.9k03

TEMPERATURE HUMIDITY READER ON MOBILE (IoT Project)

The Temperature Humidity Reader project utilizes an ESP32 microcontroller in conjunction with a DHT11 sensor to monitor temperature and humidity levels. The collected data is displayed on an LCD and transmitted to a mobile application using the Blynk platform. This project provides an efficient way to remotely monitor environmental conditions in real time, making it useful for applications such as home automation, weather stations, and greenhouse monitoring.


2.2k03

FIRE DETECTION THROUGH ESP32 MOBILE APP (IoT Project in Nepal)

This project is designed to detect fire using an ESP32 microcontroller and a flame sensor. The system monitors the flame sensor's readings and sends data to a mobile app via the Blynk platform. Additionally, it displays the status on an LCD screen. If fire is detected, an alert message is displayed on both the mobile app and the LCD. This project demonstrates how IoT can be leveraged for fire detection and safety systems.


2.7k04

Water level Indicator(STEAM Education)

To learn and create about water level indication using a simple circuit.


1.7k04