TEP DOWNLOAD CENTER

Project Files of Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation

Libraries Code Projects Simulation
tep://download-terminal 9ee3292401a64598ab82aed9240a4c7e.zip ZIP archiveV1.0Verified0 downloadsFree
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
Proteus library · File 1 of 1

Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation V1.0

Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation V1.0 comes as a ZIP archive of 21 files (4.1 MB, 9.0 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch and compiled HEX firmware.

  • LIBProteus library
  • DLLProteus model
  • DSNProteus simulation
  • INOArduino sketch
  • HEXHEX firmware

Description

Obstacle-Avoiding-Robot-ESP32-HC-SR04-Proteus-Simulation-v1.0.zip: the complete Proteus simulation project (an ESP32 DevKit V1, an HC-SR04 ultrasonic sensor on an SG90 servo, an L298N motor driver, two TT gear motors, the Laptop and Mobile WiFi Monitors), the Arduino sketch ESP32_Obstacle_Robot.ino and its HEX, every LIB and DLL and a README.

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

File Structure

9ee3292401a64598ab82aed9240a4c7e.zip21 files · 5 folders · 9.0 MB unpacked
ESP32-Obstacle-Robot-TEP-v1.0/21 files · 9.0 MB
Arduino Code/1 file · 9.4 KB
ESP32_Obstacle_Robot/1 file · 9.4 KB
INO ESP32_Obstacle_Robot.inoArduino sketch 9.4 KB
Proteus Library Files/7 files · 322.2 KB
LIB TEPESP32V1.LIBProteus library 36.6 KB
LIB TEPHCSR04.LIBProteus library 170.1 KB
LIB TEPL298N.LIBProteus library 21.4 KB
LIB TEPLAPTOP.LIBProteus library 39.5 KB
LIB TEPMOBILE.LIBProteus library 13.1 KB
LIB TEPSG90.LIBProteus library 24.5 KB
LIB TEPTTGEAR.LIBProteus library 17 KB
Proteus Model Files/5 files · 4.3 MB
DLL TEPHCSR04.DLLSimulation model 382.5 KB
DLL TEPL298N.DLLSimulation model 319 KB
DLL TEPNET.DLLSimulation model 3.0 MB
DLL TEPSG90.DLLSimulation model 294.5 KB
DLL TEPTTGEAR.DLLSimulation model 278.5 KB
Proteus Simulation/7 files · 4.4 MB
DSN ESP32-Obstacle-Robot.pdsprjProteus simulation 35.6 KB
HEX ESP32_Obstacle_Robot.hexCompiled HEX file 71.4 KB
DLL TEPHCSR04.DLLSimulation model 382.5 KB
DLL TEPL298N.DLLSimulation model 319 KB
DLL TEPNET.DLLSimulation model 3.0 MB
DLL TEPSG90.DLLSimulation model 294.5 KB
DLL TEPTTGEAR.DLLSimulation model 278.5 KB
TXT README.txtText file 10.3 KB

README

README.txt 143 lines
===============================================================================================================
  Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation - Project V1.0
  The Engineering Projects - www.TheEngineeringProjects.com
===============================================================================================================

IMPORTANT LINKS
  The project tutorial (circuit, code, simulation results):
  https://www.theengineeringprojects.com/2026/12/obstacle-avoiding-robot-esp32-hc-sr04-proteus-simulation.html
  The libraries this project is built from (each post has its own full download and tutorial):
    ESP32 DevKit V1 board:
      https://www.theengineeringprojects.com/2026/10/esp32-devkit-v1-library-for-proteus-v2-0.html
    HC-SR04 ultrasonic sensor:
      https://www.theengineeringprojects.com/2026/10/ultrasonic-sensor-library-for-proteus-v2-0.html
    SG90 servo motor:
      https://www.theengineeringprojects.com/2026/10/sg90-servo-motor-library-for-proteus-v1-0.html
    L298N motor driver:
      https://www.theengineeringprojects.com/2026/11/l298n-motor-driver-library-for-proteus.html
    TT gear motor:
      https://www.theengineeringprojects.com/2026/10/tt-gear-motor-library-for-proteus-v1-0.html
    Laptop WiFi Monitor:
      https://www.theengineeringprojects.com/2026/10/laptop-wifi-monitor-library-for-proteus.html
    Mobile WiFi Monitor:
      https://www.theengineeringprojects.com/2026/10/mobile-wifi-monitor-library-for-proteus.html
  Support our free work: https://www.theengineeringprojects.com/donate

FILE STRUCTURE
ESP32-Obstacle-Robot-TEP-v1.0/
|-- Proteus Library Files/
|   |-- TEPESP32V1.LIB                                 36.6 KB   a part of the project -> LIBRARY folder
|   |-- TEPHCSR04.LIB                                 170.1 KB   a part of the project -> LIBRARY folder
|   |-- TEPL298N.LIB                                   21.4 KB   a part of the project -> LIBRARY folder
|   |-- TEPLAPTOP.LIB                                  39.5 KB   a part of the project -> LIBRARY folder
|   |-- TEPMOBILE.LIB                                  13.1 KB   a part of the project -> LIBRARY folder
|   |-- TEPSG90.LIB                                    24.5 KB   a part of the project -> LIBRARY folder
|   |-- TEPTTGEAR.LIB                                  17.0 KB   a part of the project -> LIBRARY folder
|-- Proteus Model Files/
|   |-- TEPHCSR04.DLL                                 382.5 KB   a model -> MODELS folder
|   |-- TEPL298N.DLL                                  319.0 KB   a model -> MODELS folder
|   |-- TEPNET.DLL                                     3.01 MB   a model -> MODELS folder
|   |-- TEPSG90.DLL                                   294.5 KB   a model -> MODELS folder
|   |-- TEPTTGEAR.DLL                                 278.5 KB   a model -> MODELS folder
|-- Proteus Simulation/
|   |-- ESP32_Obstacle_Robot.hex                       71.4 KB   the firmware U1 runs
|   |-- ESP32-Obstacle-Robot.pdsprj                    35.6 KB   the project simulation
|   |-- TEPHCSR04.DLL                                 382.5 KB   copy of the model
|   |-- TEPL298N.DLL                                  319.0 KB   copy of the model
|   |-- TEPNET.DLL                                     3.01 MB   copy of the model
|   |-- TEPSG90.DLL                                   294.5 KB   copy of the model
|   |-- TEPTTGEAR.DLL                                 278.5 KB   copy of the model
|-- Arduino Code/
|   |-- ESP32_Obstacle_Robot/ESP32_Obstacle_Robot.ino    9.4 KB   the sketch (source of the .hex)
|-- README.txt                                        ~10.6 KB   this file
Total: 8.95 MB (unzipped). The C++ source code of the models is not included.

WHAT IS IT?
  The classic first robot: a two-wheel car that drives forward on its own, slows down when something comes close,
  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. The head is an HC-SR04 ultrasonic sensor on an SG90 servo; an ESP32 is the brain, an
  L298N drives the two TT gear motors, and a dashboard starts and stops the robot from a laptop or a phone.
    * U1 ESP32 DEVKIT V1 runs ESP32_Obstacle_Robot.hex on TEP-WiFi at 192.168.1.101.
    * U2 an HC-SR04 ultrasonic sensor (HCSR04ADVTEP, DISTANCE 200 cm at the start): TRIG on D5, ECHO on D18, VCC on
      the 5 V rail (the net VCC, with the DevKit's VIN); its pop-up's presets place the object in front of it.
    * SERVO1 an SG90 servo (SG90SERVOTEP): SIG on D13, V+ on VCC (5 V) - it turns the sensor: 90 deg ahead, 20 deg
      right, 160 deg left.
    * U3 an L298N driver (L298NDRIVERTEP, REG5V YES, ENAJUMPER / ENBJUMPER NO): the left motor on ENA D32, IN1 D33,
      IN2 D25; the right one on ENB D14, IN3 D26, IN4 D27; 12V on +7.4 V (a 2S Li-ion pack).
    * M1 / M2 TT gear motors (TTGEARMOTORTEP): LEFT on OUT1 / OUT2, RIGHT on OUT3 / OUT4.
    * Laptop WiFi Monitor (PC1) and Mobile WiFi Monitor (MOB1) open http://192.168.1.101/.
  What the sketch does:
    the ping      a 10 us TRIG pulse; the ECHO pulse in us / 58 = cm; no echo in 30 ms = nothing within range
    the drive     FORWARD: a ping every 60 ms; 60 cm or more = full cruise (80 %); 25 - 60 cm = slowing down (40 - 80
                  %); the speed ramps 5 % every 20 ms; a 500 Hz PWM on ENA / ENB
    the escape    under 25 cm = an obstacle: STOP, back up 0.4 s at 50 %, look right (the servo to 20 deg, 0.6 s to
                  swing and settle, a ping), look left (160 deg, a ping), the head back ahead, then turn 0.45 s
                  towards the side with more room - or turn around (0.9 s) when both sides are closer than 40 cm
    the servo     a 50 Hz PWM from the ESP32's ledc: 544 us = 0 deg, 2400 us = 180 deg (no servo library)
  Its pages:
    /             the dashboard with the links Refresh, START and STOP; the mode, the distances, the motors, the turns
    /data         JSON: the mode, the distance ahead, the last right / left looks, the motors, the obstacles and turns
  Libraries: WiFi and WebServer (part of the ESP32 core).

TEST STATUS
  Tested in Proteus 8 Professional on Windows 11, the run that made the tutorial's screenshots (the times are the
  sketch's clock; the HC-SR04's pop-up gives every ping, the L298N's each bridge, the SG90's the horn):
  - 2.26 s READY - ahead 199.0 cm (the wall at 200 cm; the pop-up: ECHO 11648 us). START from the laptop at 10.44 s:
    both wheels ramped to 80 % - 4.70 V and 0.15 A each, 190 RPM, 0.65 m/s at the wheel.
  - The wall at 50 cm: the ping read 50.2 cm (ECHO 2912 us), the wheels slowed to 68 % (3.99 V).
  - 10 cm: 14.78 s OBSTACLE at 9.9 cm - stop, back up; 15.18 s LOOK RIGHT; 15.78 s right: 25.0 cm (the servo then on
    its way to 160 deg: 43 deg, 2193 us); 16.40 s left: 199.6 cm - TURN LEFT; 16.85 s FORWARD at 80 % again.
  - A dead end: 20.07 s OBSTACLE at 9.9 cm; right 20.0 cm, left 15.0 cm - both blocked: TURN AROUND (the L298N: A
    forward 60 %, B reverse 60 %, 3.49 V each way); 22.58 s FORWARD.
  - The wall was moved away a moment after that turn ended, so the first ping still saw it (13.6 cm): the robot backed
    up and looked again - right 199.6 cm, left 199.6 cm - TURN RIGHT (equal: right), 24.66 s FORWARD.
  - 25.08 s STOP from the phone: both bridges coast, 0 V. The dashboard: 3 obstacles - 1 left, 1 right, 1 turned
    around - 14 s driving. 28.1 s of simulation in 1,007 s (the PC was busy).
  - Our probes: the HC-SR04 on a plain 5V net from the DevKit's VIN said NO POWER - on the VCC rail it works; the
    TT motors first ran past the sheet's border.

INSTALLATION
  1. Close Proteus. Extract the WHOLE zip file, for example to your Desktop.
  2. Copy the files from "Proteus Library Files" into the LIBRARY folder of Proteus, for example
     C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY
  3. Copy the files from "Proteus Model Files" into the MODELS folder (next to LIBRARY).
  4. Start Proteus. Press P in the schematic and search for ESP32 DEVKIT V1 or HC-SR04 to check that the parts are
     there.

RUN THE SIMULATION
  1. Open "Proteus Simulation\ESP32-Obstacle-Robot.pdsprj". Keep ESP32_Obstacle_Robot.hex and the DLL files beside
     it.
  2. Press Play and open the Laptop or the Mobile WiFi Monitor (Go): press START - both wheels speed up.
  3. Click U2 for the sensor's pop-up and move the object closer: the robot slows down, and under 25 cm it stops,
     backs up and looks around. Set a distance while it looks right and another while it looks left to choose
     where it turns.

PROPERTIES USED IN THIS PROJECT
  U1 ESP32 DEVKIT V1           PROGRAM=ESP32_Obstacle_Robot.hex
  U2 HCSR04ADVTEP              DISTANCE=200 (cm)
  SERVO1 SG90SERVOTEP          (no changes: START 90 deg)
  U3 L298NDRIVERTEP            REG5V=YES, ENAJUMPER=NO, ENBJUMPER=NO (the PWM reaches the bridges)
  M1, M2 TTGEARMOTORTEP        (no properties)
  PC1, MOB1 HOMEPAGE=http://192.168.1.101/

TROUBLESHOOTING
  * The wheels never turn: the L298N's enable jumpers must be off (ENAJUMPER / ENBJUMPER NO) so the PWM on ENA /
    ENB reaches the bridges; START from the dashboard.
  * The distance is always 400 cm: no echo - TRIG / ECHO swapped, or the sensor without 5 V.
  * It turns the wrong way: the servo's 20 deg is the right side and 160 deg the left; swap them if your servo is
    mounted the other way round.
  * Real hardware: the HC-SR04's ECHO is a 5 V signal - use a divider (1 k / 2 k) before the ESP32 pin; power the
    servo from its own 5 V regulator, not the ESP32's pin; a TT motor needs a few seconds of tuning of TURN_MS for
    a real 90 degree turn on your floor.

LICENCES
  * The project, the sketch, the parts (LIB files) and the models (DLL files) are made by The Engineering Projects
    and are free for learning and for your own projects. The models use only standard Windows libraries.
    The C++ source code of the models is not included; the source code is not included for any model.
  * The .hex file is built with the TEP Boards for Proteus.
  * Proteus is a product of Labcenter Electronics and is not included. ESP32 is a product of Espressif Systems. This
    project is not made or endorsed by them.

VERSION
  V1.0 - the first release of the project.
===============================================================================================================
Advertisement

Development1 release

  1. V1.0Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation V1.0this page

    V1.0 is the only release in the Download Center so far. When a newer version is published, it appears above with its own download page.

Installation8 steps

From the download to a working project, in order. The steps follow what the package contains.

You will need

  • Proteus Design SuiteProteus 8 or newer (Labcenter), on Windows
  • Arduino IDE1.8 or 2.x, with the board of the tutorial chosen under Tools → Board
  • Any archive toolWindows, macOS and Linux extract ZIP files on their own

Steps

  1. 1

    Extract the archive

    Right-click 9ee3292401a64598ab82aed9240a4c7e.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (ESP32-Obstacle-Robot-TEP-v1.0) as it is.

  2. 2

    Copy the library files into Proteus

    Move TEPESP32V1.LIB, TEPHCSR04.LIB and TEPL298N.LIB and 4 more and the files into the LIBRARY folder of your Proteus installation: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY for Proteus 8, or the matching Proteus 7 folder. Older versions keep it under ProgramData\Labcenter Electronics. If Proteus is open, close it first.

  3. 3

    Add the simulation model

    Copy TEPHCSR04.DLL, TEPL298N.DLL and TEPNET.DLL and 2 more into the MODELS folder next to LIBRARY, so the component can run, not only be drawn.

  4. 4

    Restart Proteus and place the component

    Start Proteus, open a schematic, press P (Pick Devices) and search for the component by the name used in the tutorial. It appears with its pins ready to wire.

  5. 5

    Open the sketch in the Arduino IDE

    Open ESP32_Obstacle_Robot.ino, select your board and port under Tools, then Verify. Sketch → Export Compiled Binary writes the HEX file a simulation needs.

  6. 6

    Load the HEX file

    In Proteus double-click the microcontroller, set Program File to ESP32_Obstacle_Robot.hex and run the simulation. For real hardware, flash the same file with your programmer.

  7. 7

    Open the example simulation

    Open ESP32-Obstacle-Robot.pdsprj in Proteus to see the wiring exactly as in the tutorial. Check the controller's Program File path, then press Play.

  8. 8

    Follow the tutorial

    Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation explains every connection and setting in order; keep it open beside the files while you build.

How to add a library in Proteus 8

FAQs9 questionsContact TEP

How do I download Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation V1.0?

Wait for the 30-second guest countdown on this page, then press the download button; the file comes straight from our storage. Members who are logged in skip the wait. If the browser opens the file instead of saving it, use its Save as option. The download link is made for you when the countdown ends and works for 15 minutes; a saved or shared link stops working, so share this page instead.

What is inside the archive?

Obstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation V1.0 comes as a ZIP archive of 21 files (4.1 MB, 9.0 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch and compiled HEX firmware. Open the File Structure tab for the full list of 21 files.

What should I do if the download does not start?

Check the browser's download list first; an ad blocker or a company firewall can also hold it back, so try another browser or network. If the file arrives incomplete, download it again. For an installation problem, read the Install tab or tell us in the comments with your software version and the exact error message.

Is this file free?

Yes. Every file in the TEP Download Center is free for learning, personal and student projects. If you share it, link back to this page or the tutorial so others find the latest version.

How do I check that the file arrived complete?

Compare its SHA-256 with the one on this page, e82bc6fb3dc5ce235a4e4fe7f18fa1ef2382a9fd76a81bb08b310fc49966d002. In PowerShell run Get-FileHash "9ee3292401a64598ab82aed9240a4c7e.zip"; on macOS or Linux run shasum -a 256 "9ee3292401a64598ab82aed9240a4c7e.zip". The same value means the file is exactly the one in our storage; a different one means the download broke off, so download it again.

Do I need WinRAR to open the ZIP file?

No. Windows, macOS and Linux open ZIP archives on their own (Extract All, or double-click). WinRAR and 7-Zip work too. Extract the whole archive before using the files.

Where do I put the LIB and IDX files?

Both files go into the LIBRARY folder of your Proteus installation (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY; Proteus 7 has the same folder under its own name). Restart Proteus afterwards and search for the component with P.

Which Proteus version does the library need?

The tutorial names the Proteus version the library was made and tested with. Most TEP libraries work in Proteus 7 and Proteus 8; if the component does not appear after a restart, check that both the LIB and the IDX file were copied and that Proteus was fully closed while copying.

How do I get the HEX file into the simulation?

Compile the sketch in the Arduino IDE (Sketch → Export Compiled Binary gives you the HEX next to the sketch), then in Proteus double-click the board, set Program File to that HEX and run.

preparing · 9ee3292401a64598ab82aed9240a4c7e.zip
Rating
Your download will be ready shortly
Preparing your download…

Members skip the wait. Log in or join TEP.

Last 14 days0 downloads
SHA-256 e82bc6fb3dc5ce235a4e4fe7f18fa1ef2382a9fd76a81bb08b310fc49966d002
DocumentationObstacle Avoiding Robot using ESP32 and HC-SR04 - Proteus Simulation
Need help with this file? Bug report Ask a question Download problemsGet updates
Advertisement

Comments

0

Join the conversation

Start the conversationAsk a question or share how you used this download.