Skip to content

suszczyk/ESP8266-WiFi-Robot-Car

Repository files navigation

ESP8266 WiFi Robot Car

13.02.2023 r.

Micro-controllers Programming

Created by Mateusz Suszczyk

Watch the video demo! -> link

Description

The main purpose of my robot is to drive accordingly depending on what button will be clicked on a website accessible from PC/smartphone. In addition, the robot collects sensor data such as temperature, humidity, motion detection, and noise value.

Components used

  • NodeMCU v2 WiFi ESP8266
  • Robot Chassis + tyres
  • Motor Driver LN298N
  • DHT 11 - temperature and humidity sensor
  • Sound sensor
  • HC-SR501 - PIR sensor
  • 4 DC motors
  • Breadboard
  • Wires
  • Powerbank 5V
  • USB Hub

Encountered problems

  • Using a power bank as a source of power for motors is sufficient, but not optimal. To get better performance of motors, I highly encourage to use better source of power (e.g. 2x 18650 batteries).
  • DHT11 tends to hang when reading values. To solve this problem try to reset the sensor by removing the cables and then putting it back.
  • I had problems with .js file used to properly visualize knobs on site. Automatic refreshing values finally worked after one of those methods:
    • Putting .js on my GitHub and then reach file using cdn.jsdelivr.net -> pureknob.js.
    • Uploading file on internal flash memory using server.streamFile(file, contentType);.

Connections

HTML website

Setup

  1. Clone repository.

  2. After uploading code from car.ino to ESP8266 (remember to change the credentials of the wifi network), upload index.html to ESP using the command below:

curl -F "[email protected]" x.x.x.x/upload

x.x.x.x is IP address of your ESP.

  1. Make sure that javascript library is added. For more accurate sensor values I have changed pureknob.js line 635:

from

value = Math.round(value);

to

value = Math.round(value * 10) / 10;

If the website does not work properly, add this line at the beginning of index.html: <script src="https://cdn.jsdelivr.net/gh/suszczyk/ESP8266-WiFi-Robot-Car@main/pureknob.js"></script> and rerun command from point 2.

  1. Connect your phone to the same wifi network as your robot. After reaching x.x.x.x you should see the page above.

  2. Happy driving :)

Libraries

Possible improvements

  • Adding LCD screen
  • Adding LM393 IR Speed sensor
  • Connecting another ESP or Arduino to get more pins

Worth mentioning

datasith projects:

Sensors:

Other: ESP8266 and the Arduino IDE - IOT Website Weather monitoring system using Blynk

UI:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published