✨ Use RCAPP and get 5% off 👇
Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

I Built a WiFi Controlled Car Using ESP32

I Built a WiFi Controlled Car Using ESP32
-
Written By - Robocraze -
📅 Updated on 12 Jun 2026
Summarize with AI
✅ Prompt copied

Summary

Most beginner robot cars are controlled using buttons, switches, or Bluetooth modules. They are great for learning the basics, but I wanted to build something that felt a little closer to a real IoT project. That is what led me to build a WiFi-controlled car using an ESP32. Instead of controlling the robot with physical buttons, the ESP32 hosts a simple webpage that can be opened from a phone or laptop. Once connected, the robot can be driven wirelessly using on-screen controls. The project combines robotics, motor control, networking, and embedded programming into a single build, making it an excellent learning project for anyone exploring an esp32 car project.

I Built a WiFi Controlled Car Using ESP32 - Cover Image

How the Project Works

The idea behind the project is straightforward.

The ESP32 connects to a WiFi network and hosts a web server. When a user opens the webpage, they see movement controls for the robot.

When a button is pressed:

  • The webpage sends a command to the ESP32.
  • The ESP32 processes the command.
  • The ESP32 updates the motor driver outputs.
  • The motors move in the requested direction.

The communication happens almost instantly, which makes the robot feel very responsive.

Components and Supplies

7Semi ESP32-C3-Dev-BoardC-02 WiFi Bluetooth Development Board -IOT&Wireless -ESP Module -Robocraze7Semi ESP32-C3-Dev-BoardC-02 WiFi Bluetooth Development Board -IOT&Wireless -ESP Module -Robocraze

7Semi ESP32-C3-Dev-BoardC-02 WiFi Bluetooth Development Board

7Semi ESP32-C3-Dev-BoardC-02 WiFi Bluetooth Development Board The 7Semi ESP32-C3-Dev-BoardC-02 is a compact and powerful wireless development board built around the ESP32-C3 microcontroller featuring a 32-bit RISC-V processor architecture. Designed for IoT and embedded system development, it integrates WiFi and Bluetooth 5 connectivity, enabling seamless...
Rs 767/-
Rs 767/-
Rs 1,199/-
Save Rs 432/-
7Semi ESP32-S3-WROOM-1U-N16R8 WiFi Bluetooth Module with IPEX Connector 16MB Flash 8MB PSRAM - Robocraze7Semi ESP32-S3-WROOM-1U-N16R8 WiFi Bluetooth Module with IPEX Connector 16MB Flash 8MB PSRAM - Robocraze

    7Semi ESP32-S3-WROOM-1U-N16R8 WiFi Bluetooth Module with IPEX Connector 16MB Flash 8MB PSRAM

    7Semi ESP32-S3-WROOM-1U-N16R8 WiFi Bluetooth Module with IPEX Connector 16MB Flash 8MB PSRAM The 7Semi ESP32-S3-WROOM-1U-N16R8 is a high-performance wireless communication module designed for advanced IoT, AIoT, and embedded applications. Powered by the ESP32-S3 chipset, the module features integrated WiFi and Bluetooth connectivity along with...
    Rs 949/-
    Rs 949/-
    Rs 1,632/-
    Save Rs 683/-
    Dual L298N Motor Driver Module with PWM Control – Powerful motor driver for robotic applications – RobocrazeDual L298N Motor Driver Module with PWM Control – Powerful motor driver for robotic applications – Robocraze

      2A Dual L298N Motor Driver Module with PWM Control

      2A Dual L298N Motor Driver Module with PWM Control The L298N Motor Driver Module is a great choice for controlling motors! It contains a double H bridge L298N chip, which has a maximum voltage of 46V and a current of 2A. This L298N dual...
      Rs 136/-
      Rs 136/-
      Rs 179/-
      Save Rs 43/-
      2WD Smart DIY Robot Car Chassis Kit – Lightweight 2-wheel chassis for robotics. -Robot Wheels and Chassis -Robocraze2WD Smart DIY Robot Car Chassis Kit – Lightweight 2-wheel chassis for robotics. -Robot Wheels and Chassis -Robocraze

      2WD Smart DIY Robot Car Plastic Chassis Kit

      2WD Smart DIY Robot Car Plastic Chassis Kit This is a 2-wheel smart robot car chassis kit, featuring 2 pairs of BO motors and wheels. All components in the DIY Car kit are high-quality, ensuring reliable performance. The chassis is transparent, offering a clear...
      Rs 284/-
      Rs 284/-
      Rs 324/-
      Save Rs 40/-
      2WD Two Wheel Drive DIY Smart Robot Car Chassis kit - Robocraze2WD Two Wheel Drive DIY Smart Robot Car Chassis kit - Robocraze

        2WD Two Wheel Drive DIY Kit - A Smart Robot Car with Chassis

        2WD Two Wheel Drive DIY Kit - A Smart Robot Car with Chassis 2WD Two Wheel Drive DIY Kit - A Smart Robot Car with Chassis! This innovative DIY robot car kit allows you to build your very own smart robot car with ease....
        Rs 292/-
        Rs 292/-
        Rs 450/-
        Save Rs 158/-
        4WD Double Layer Smart Car Chassis Kit (Long Version) – Durable DIY Kits, STEM Kits, Robot Kits -Robocraze4WD Double Layer Smart Car Chassis Kit (Long Version) – Durable DIY Kits, STEM Kits, Robot Kits -Robocraze

        4WD Double Layer DIY Smart Car Plastic Chassis Kit (Longer Version)

        4WD Double Layer DIY Smart Car Plastic Chassis Kit (Longer Version) The longer version of the 4WD Double Layer Smart Car Plastic Chassis Kit is equipped with four pairs of high-performance geared motors and wheels. In this 4WD car kit, each component is crafted...
        Rs 597/-
        Rs 597/-
        Rs 899/-
        Save Rs 302/-
        Jumper Wire Set - M2M, M2F, F2F (40 pcs each) – Ideal for Arduino & prototyping. Electronic Components - RobocrazeJumper Wire Set - M2M, M2F, F2F (40 pcs each) – Ideal for Arduino & prototyping. Electronic Components - Robocraze

          Jumper Wire Set - M2M, M2F, F2F (40 pcs each)

          Jumper Wire Set - M2M, M2F, F2F (40 pcs each) These DuPont jumper wires for electronics is a premium quality wire manufactured by using quality assured material and advanced techniques, which make them up to the standard in this highly challenging field. This 120pcs...
          Rs 139/-
          Rs 139/-
          Rs 169/-
          Save Rs 30/-

          Components Required

          For this project, I used:

          Most of these parts are commonly used in beginner robotics projects and can easily be reused in future builds.

          Building the Chassis

          The first step is assembling the robot platform.

          Mount the two DC geared motors onto the chassis using the mounting brackets provided with the robot kit.

          Once the motors are secure:

          • Attach the wheels to the motor shafts.
          • Install the castor wheel at the front or rear of the chassis.
          • Verify that all wheels rotate freely.
          • Check that the robot sits level on a flat surface.

          Next, mount the battery holder near the center of the chassis. This helps maintain balance and prevents the robot from leaning toward one side.

          Leave enough space on the top plate to mount the ESP32 and motor driver later.

          Installing the Motor Driver

          The L298N motor driver acts as the bridge between the ESP32 and the motors.

          Mount the motor driver on the chassis using screws or double-sided tape.

          Connect the left motor wires to:

          • OUT1
          • OUT2

          Connect the right motor wires to:

          • OUT3
          • OUT4

          Do not worry if the motors rotate in the wrong direction during testing. This can easily be corrected later by swapping the motor wires.

          Connecting the ESP32

          The ESP32 cannot drive motors directly because the GPIO pins do not provide enough current.

          Instead, the ESP32 sends control signals to the L298N.

          Connect the motor driver inputs as follows:

          • IN1 → GPIO 26
          • IN2 → GPIO 27
          • IN3 → GPIO 14
          • IN4 → GPIO 12

          These pins control motor direction.

          For speed control, connect:

          • ENA → GPIO 33
          • ENB → GPIO 25

          These PWM-enabled pins allow motor speed adjustment through software.

          Next, connect the grounds:

          • ESP32 GND → L298N GND

          This shared ground connection is essential. Without it, the ESP32 and motor driver will not communicate reliably.

          Power Connections

          Connect the battery pack to the motor driver:

          Battery Positive → 12V Input on L298N

          Battery Negative → GND on L298N

          Depending on the battery and motor driver configuration, the ESP32 can either be powered through USB during development or through a regulated 5V supply connected to the board.

          Before switching the system on, inspect all wiring carefully.

          Pay particular attention to:

          • Battery polarity
          • Ground connections
          • Motor terminal connections

          A few minutes spent checking wiring can prevent a lot of troubleshooting later.

          Programming the ESP32

          Open Arduino IDE and install the ESP32 Board Package if it is not already installed.

          Navigate to:

          • Tools → Board → ESP32 Dev Module
          • Select the correct COM port.

          The program for this project performs three tasks:

          • Connects the ESP32 to WiFi.
          • Creates a web server.
          • Processes movement commands.

          Inside the sketch, update the WiFi credentials:

          const char* ssid = "YourWiFiName";
          const char* password = "YourWiFiPassword";

          • Upload the code to the ESP32.
          • After uploading, open the Serial Monitor and set the baud rate to 115200.
          • Within a few seconds, the ESP32 should display an IP address similar to:
          • 192.168.1.105
          • Write down this address because it will be used to access the control interface.

          Creating the Control Interface

          The ESP32 hosts a simple webpage that can be opened from any device connected to the same WiFi network.

          Open a browser on a smartphone or laptop.

          Enter the IP address displayed in the Serial Monitor.

          The control page should contain buttons for:

          • Forward
          • Backward
          • Left
          • Right
          • Stop
          • Each button sends a request to the ESP32.

          When the ESP32 receives the request, it updates the motor driver outputs accordingly.

          For example:

          Forward activates both motors in the forward direction.

          Backward reverses both motors.

          Left slows or reverses one side to turn the robot.

          Right performs the opposite action.

          Stop disables all motor outputs.

          This simple interface eliminates the need for a dedicated mobile application.

          Testing the Robot

          Before placing the robot on the floor, perform an initial motor test.

          Lift the chassis slightly so the wheels can rotate freely.

          Open the control webpage and test each movement command individually.

          Start with Forward.

          Both wheels should rotate in a way that would move the robot straight ahead.

          Next test:

          Backward

          Left

          Right

          Stop

          If the robot moves backward when Forward is pressed:

          • Reverse the motor wires for both motors.

          If the robot spins instead of moving straight:

          • Reverse the wiring for one motor.

          Continue testing until all movement directions behave correctly.

          Only then should the robot be placed on the floor for driving tests.

          • First Drive
          • Place the robot on a smooth surface and reconnect to the control webpage.
          • Drive the robot slowly at first.

          Pay attention to:

          • Turning response
          • Motor synchronization
          • WiFi responsiveness
          • Battery performance

          During my first test, one motor was slightly faster than the other, which caused the robot to drift to one side.

          Small speed adjustments in the PWM values helped improve straight-line movement.

          This is a normal part of the tuning process and something almost every robot requires.

          Common Problems

          The webpage does not load

          Check:

          • ESP32 is connected to WiFi.
          • Correct IP address is being used.
          • Phone and ESP32 are on the same network.
          • Motors do not move

          Verify:

          • Battery is charged.
          • L298N power LED is on.
          • Motor wires are connected correctly.
          • Common ground exists between ESP32 and L298N.
          • Robot moves in the wrong direction
          • Swap the motor wires connected to the affected motor.
          • This is usually the quickest fix.
          • Robot disconnects frequently

          Check:

          • Battery voltage.
          • WiFi signal strength.
          • Loose jumper wire connections.
          • Upgrades to Try Next

          Once the basic WiFi-controlled car is working, there are several ways to expand the project.

          Some upgrades that work particularly well include:

          • Ultrasonic Sensor Modules for obstacle avoidance
          • ESP32 Camera Modules for video streaming
          • Line-following sensors
          • Bluetooth control mode
          • Cloud-based IoT dashboards
          • Voice-controlled navigation

          The nice thing about using an ESP32 is that the same board can support all of these upgrades without major hardware changes.

          Final Thoughts

          This WiFi-controlled car was one of those projects that felt much more advanced than it actually was. The hardware itself is relatively simple, but the addition of wireless control makes the robot feel far more interactive and practical.

          More importantly, the project introduces several concepts that appear repeatedly in robotics and IoT development, including motor control, networking, web servers, and real-time communication. For anyone looking for an engaging esp32 car project, this build offers a great balance between learning, experimentation, and hands-on fun.

          Excerpt

          Learn how I built a WiFi-controlled car using ESP32, covering the components, circuit setup, programming, and wireless control through a smartphone or web interface.
          Prev Post
          Next Post

          Leave a comment

          Please note, comments need to be approved before they are published.

          Thanks for subscribing!

          This email has been registered!

          Shop the look

          Choose Options

          Edit Option
          Back In Stock Notification
          Compare
          Product SKU Description Collection Availability Product Type Other Details

          Choose Options

          this is just a warning
          Login
          Shopping Cart
          0 items
          FREE SHIPPING!
          ₹100 OFF
          ₹200 OFF
          ₹999
          ₹2500
          ₹4900
          WhatsApp Chat Chat