Esp8266 wifi robot car

Make Wi-Fi Controller Car Using Esp8266

We are going to talk about how to Make Internet or Wi-Fi Controller Car Using Esp8266. this can be easily controlled by your smartphone.

Things used in this project

Hardware components

Software apps and online services

Story

Hello guys, welcome back. In this tutorial, we are going to talk about how to Make Internet or Wi-Fi Controller Car Using Esp8266 . this can be easily controlled by your smartphone. We have described to you step-by-step how to do this through this tutorial.

This WiFi Controlled Robot is made using ESP8266 Chip as a control unit. To control the pair of Motors, we used L298n Motor Driver IC Module.

We can power on the circuit using any battery as the power requirement is more than 5V. I mean a robotic car that is controlled over a WiFi Network.

Thank You NextPCB

Guys if you have a PCB project, please visit their website and get exciting discounts and coupons.

Let’s get started!

  • ESP8266 : https://amzn.to/3GqzjwW
  • Wheels : https://amzn.to/3dxLfk4TT
  • Gear Motor : https://amzn.to/3dxLfk4TT
  • Li-Po Battery : https://amzn.to/3dxLfk4TT
  • Battery Holder : https://amzn.to/3dxLfk4TT
  • Wires : https://amzn.to/3dxLfk4TT
  • wood : https://amzn.to/3dxLfk4TT

Solder a 10cm cable to the each terminal of motor.

Attach Motors to Acrylic

First Cut an foam or any kind of Board in a Preferred Dimension such as 14CM x 10CM. Make sure as photo.

Secondly, glue the four gear motors to the foam board, To do this, use the Glue gun.

Attach the motor to the acrylic using hot glue gun on all four sides of the acrylic as shown in the picture.

Pass the motor cable to the back through the acrylic hole.

Here is the schematic for this Wi-Fi Controller Car Using Esp8266 Project designed using Fritzing software. We will control the two DC motors via L298 Motor Driver IC. I used L298N. This is a high power motor driver capable of running 5V to 35V DC Motor at a maximum of 25W.

You can use 200-300 RPM DC Motor for this application. The main control unit is ESP8266 Board which connects and controls the entire circuit and equipment.

You Can Also Follow the Following Pin Mapping.

Motor Driver-> ESP8266

  • ENA GPIO14(D5)
  • ENB GPIO12(D6)
  • IN_1 GPIO15(D8)
  • IN_2 GPIO13(D7)
  • IN_3 GPIO2(D4)
  • IN_4 GPIO0(D3)

Connect the battery to the L298 Motor Driver power supply input. Connect all 6 inputs of L298 to ESP8266 D3, D4, D7, D8, D5 & D6 Pin. Supply 5V to Wemos through L298 5V Pin. Connect the output pins of L298 to left and right motors.

Thirdly, attach the motor driver board and Esp8266 to the top of the board I have used the cardboard. You can use metallic or wooden anything that fulfills your requirement.

Читайте также:  Автоматически включать wifi дома

Tightly screw all the components and mount them on the chassis. Use good quality and strong wheels so that the robot can move even on rough surfaces.

Afterward, connect the gear motors to the Motor driver board. For that, use the above circuit diagram.

  • copu, compiled and then Uploaded to NodeMCU Car.
  • The source program for WiFi Controlled car is very simple and you can program the ESP8266 Board using Arduino IDE.
  • In this code part, change the WiFi SSID & Password from these lines.
const char* ssid = "DiYProjectslab"; const char* password = "Arduino";
#define ENA 14 // Enable/speed motors Right GPIO14(D5)
#define ENB 12 // Enable/speed motors Left GPIO12(D6)
#define IN_1 15 // L298N in1 motors Rightx GPIO15(D8)
#define IN_2 13 // L298N in2 motors Right GPIO13(D7)
#define IN_3 2 // L298N in3 motors Left GPIO2(D4)
#define IN_4 0 // L298N in4 motors Left GPIO0(D3)

#include
#include
#include

String command; //String to store app command state.
int speedCar = 800; // 400 - 1023.
int speed_Coeff = 3;

const char* ssid = "Make DIY";
ESP8266WebServer server(80);

void setup()

pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN_1, OUTPUT);
pinMode(IN_2, OUTPUT);
pinMode(IN_3, OUTPUT);
pinMode(IN_4, OUTPUT);

Serial.begin(115200);

// Connecting WiFi

WiFi.mode(WIFI_AP);
WiFi.softAP(ssid);

IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);

// Starting WEB-server
server.on ( "/", HTTP_handleRoot );
server.onNotFound ( HTTP_handleRoot );
server.begin();
>

void goAhead()

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
>

void goBack()

digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
>

void goRight()

digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
>

void goLeft()

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
>

void goAheadRight()

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar/speed_Coeff);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
>

void goAheadLeft()

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar/speed_Coeff);
>

void goBackRight()

digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar/speed_Coeff);

digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
>

void goBackLeft()

digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar/speed_Coeff);
>

void stopRobot()

digitalWrite(IN_1, LOW);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);

digitalWrite(IN_3, LOW);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
>

void loop()
server.handleClient();

command = server.arg("State");
if (command == "F") goAhead();
else if (command == "B") goBack();
else if (command == "L") goLeft();
else if (command == "R") goRight();
else if (command == "I") goAheadRight();
else if (command == "G") goAheadLeft();
else if (command == "J") goBackRight();
else if (command == "H") goBackLeft();
else if (command == "0") speedCar = 400;
else if (command == "1") speedCar = 470;
else if (command == "2") speedCar = 540;
else if (command == "3") speedCar = 610;
else if (command == "4") speedCar = 680;
else if (command == "5") speedCar = 750;
else if (command == "6") speedCar = 820;
else if (command == "7") speedCar = 890;
else if (command == "8") speedCar = 960;
else if (command == "9") speedCar = 1023;
else if (command == "S") stopRobot();
>

void HTTP_handleRoot(void)

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

Testing the WiFi Controlled Robot

Источник

ESP8266 Robot Car Programmed With ESP8266 Basic

license

Introduction: ESP8266 Robot Car Programmed With ESP8266 Basic

Dollar Store Robotics (Building Robots Cheaply)

How to Install Netlogo for Linux on a Chromebook

Cereal Box Robot Using Cricut Explore to Cut Chassis and Wheels

I am a middle school science teacher and also the Robotic Club Advisor. I have been looking for more cost effective ways to get robots into the hands of my students. With the low prices of ESP8266 boards, I have been able to create a autonomous robot car for under $20. With Lego Mindstorm Kits costing $300, MakeBlock kits costing about $100, this represents a significant savings allowing me to have more students involved in our robotics competitions. In order to compete with other robots, I realize that other sensors are required such as Ultrasonic distance sensors as well as line following sensors. but these can be purchased for under $20, making my robots costing under $50 that can do all that kits that cost twice as much can.

Our students all use chromebooks and with the collapse of the free Codebender web site, arduino robots have been placed a bit out of reach. I know that create.arduino.cc offers a solution, but with limited funding, I have been seeking free alternatives.

Using ESP8266 with a Motor Driver board, I am now able to control a robot car via wifi. Using ESP8266 Basic you can now modify your program also via wifi. All this can be done in a browser on student’s chromebooks.

While ESP8266 Basic will not let you use sensors as is, (Basic is too slow to read some of these sensors) I am hoping to create and program arduino sensor modules that interface with the ESP8266 basic modules so that robot control can be programmed in basic using these arduinos that I preprogram with sensing duties. This would only add about $5-$10 to costs of robot (however, I already do have many arduino boards that I can use for this purpose.)

Step 1: Either Buy a ESP8266 Car Kit or Buy ESP8266/Motor Driver Kit

Link for ESP8266/Motor Driver Kit:

Link for ESP8266 Smart Car Kit:

If you go for the esp8266/motor driver kit and want to DIY, then you will need motors:

I used black foam board purchased from Dollar tree for my robot car because I already had motors and the ESP8266/Motor Driver kit.

Step 2: Solder Wires to Motors . Then Connect to Motor Driver Board

I used 4 wire male-female jumpers which I cut in half. This way, after you connect wires to motors and driver board, all you need to do is connect male end with female end for final connection. This also makes routing wires a bit easier, but is not necessary, you can use 4 wires (2 for each motor) to connect motors to board.

You will need to solder wires to the motor so that you can connect motors to the driver board.

I used hot glue to keep wires in place as a form of stress relief.

Step 3: Put Together Your Car.

If you bought the car kit, then assemble according to the poorly translated directions. but it’s not to hard, pretty self explanatory.

Step 4: Put Together Your Car . Continued ..

If you are going DIY, it will go a bit faster, provided that you use zip ties / hot glue / duck or packing tape to assemble yours as I did mine.

Connect motors/wheel assembly to chassis and route wires to motor driver.

Step 5: Make All the Connections

Now, you need to connect motors and power wires to driver board. You also might have to plug in ESP8266 to driver board. Once everything is connected and secured, use micro USB cord to plug into your computer.

Connect power from battery pack to ground (black) and Vin (red).

Connection wires from one motor to a+ and a-, connect other motor wires to b+ and b-.

Connect Vin to Vm with a jumper.

Источник

Arduino IOT Project: Nodemcu ESP8266 wifi Robot Car “L298N motor driver + Blynk + Joystick”

Nodemcu ESP8266

Altium

Wifi Robot Car- In today’s tutorial, you will learn how to control a robot car using Arduino, Nodemcu esp8266 wifi module and Blynk application. The joystick widget will be used to control the Forward…Reverse….right …and left movement..while the slider widget will be used to control the speed of the dc motors in real-time…As this project is based on WIFI, it means this robot car can be controlled from anywhere around the world. For remote controlling, an IP camera can be used for live video streaming. I will make a separate video on how to use the IP cameras.

This is the 5th version of the Robot Car.while in the 4th version I used an ultrasonic sensor to make a safe distance maintaining robot car. in this project, the speed of the robot car is automatically adjusted depending on the distance between the cars.

While in the 3rd version, I used the flex sensor and the joystick together to control the same robot car, in this project the flex sensor was used as the accelerator and the joystick was used to control the car’s forward, left, right and reverse movement, I named this project a wireless hand gesture + joystick robot car… While in the 2nd version, I used only the joystick to control the speed and movement of the robot Car. The program used in this project was a little bit complex, so that’s why I decided to make another version of this robot and use a separate sensor for the speed controlling. So that’s why I created version 3.

While in the first version, I used an Android cell phone to control the Robot Car using the HC-05 Bluetooth module.

Today’s tutorial is based on my previous tutorial, in this tutorial, I explained, how to assemble the robot parts and how to use the L298N motor driver to control the forward, left, right and reverse movement. In this tutorial, I also explained how to control the speed of a dc motor using the pulse width modulation. If you are a beginner and you have never used the L298N motor driver then I highly recommend you should first watch this tutorial and then you can resume from here.

Note: this old version of the Blynk app is no more functional. For the blynk mobile App setup and Blynk.cloud dashboard setup ready my article on the New Blynk V2.0. In this article I have explained how to migrate your projects from Blynk 1.0 to the new Blynk V2.0. You can also watch the video.

Other Tools and Components:

Источник

Оцените статью
Adblock
detector