Tag: L298N motor driver

1 articles found.

Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation

Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation: the ESP32, the HC-SR04 on an SG90 servo, the L298N and two TT gear motors

Hello friends, I hope you all are doing great. Today, I am going to share the Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation, project 101 of our IoT Projects series. The obstacle avoiding robot is probably the most popular first robot project of all, and for a good reason: with one ultrasonic sensor, one servo and two motors it already behaves like something alive. Here is a complete one, with the circuit, the code and a Proteus simulation you can run before you build anything. The robot drives forward on its own and keeps measuring the distance ahead with an HC-SR04 ultrasonic sensor. When something comes closer it slows down, and when the way is blocked it stops, backs up, turns its head to look right and left, and drives off towards the side with more room. If both sides are blocked, it turns around. The head is the HC-SR04 mounted on an SG90 servo, the brain is an ESP32, and an L298N drives the two TT gear motors. Because it is an ESP32, there is also a dashboard: start and stop the robot and watch its decisions from a laptop or a phone. In this tutorial, we will go through the circuit, how the ultrasonic sensor measures distance, how the servo turns the head, how the L298N drives the wheels, the robot's decision logic and the code. Then we put walls in front of the robot in the simulation and watch it find its way. At the end, you can download the project with the sketch and every library file. NOTICE: Our team has put a lot of effort into this ...