TEP DOWNLOAD CENTER

Project Files of PID Auto-Tune DC Servo Motor with ESP32 - Proteus Simulation

Libraries Code Projects Simulation
tep://download-terminal f5a84b46bedc44d79415467b21929f57.zip ZIP archiveV1.0Verified0 downloadsFree
PID Auto-Tune DC Servo Motor with ESP32 - Proteus Simulation: the ESP32, the TB6612FNG, the DC servo with its flywheel and encoder, and the OLED
Proteus library · File 1 of 1

PID Auto-Tune DC Servo Motor with ESP32 - Proteus Simulation V1.0

PID Auto-Tune DC Servo Motor with ESP32 - Proteus Simulation V1.0 comes as a ZIP archive of 18 files (3.8 MB, 8.4 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

PID-Auto-Tune-DC-Servo-Motor-ESP32-Proteus-Simulation-v1.0.zip: the complete Proteus simulation project (an ESP32 DevKit V1, a TB6612FNG, the DC servo lab with its encoder, an SSD1306 OLED, the Laptop and Mobile WiFi Monitors), the Arduino sketch ESP32_Servo_AutoTune.ino and its HEX, every LIB and DLL and a README.

Read PID Auto-Tune DC Servo Motor with ESP32 - Proteus Simulation

File Structure

f5a84b46bedc44d79415467b21929f57.zip18 files · 5 folders · 8.4 MB unpacked
ESP32-Servo-AutoTune-TEP-v1.0/18 files · 8.4 MB
Arduino Code/1 file · 16.7 KB
ESP32_Servo_AutoTune/1 file · 16.7 KB
INO ESP32_Servo_AutoTune.inoArduino sketch 16.7 KB
Proteus Library Files/6 files · 289.9 KB
LIB TEPESP32V1.LIBProteus library 36.6 KB
LIB TEPLAPTOP.LIBProteus library 39.5 KB
LIB TEPMOBILE.LIBProteus library 13.1 KB
LIB TEPOLED12864.LIBProteus library 112.4 KB
LIB TEPSERVOLAB.LIBProteus library 17.2 KB
LIB TEPTB6612.LIBProteus library 71.1 KB
Proteus Model Files/4 files · 4.0 MB
DLL TEPNET.DLLSimulation model 3.0 MB
DLL TEPOLED.DLLSimulation model 342.5 KB
DLL TEPSERVOLAB.DLLSimulation model 322 KB
DLL TEPTB6612.DLLSimulation model 296 KB
Proteus Simulation/6 files · 4.1 MB
DSN ESP32-Servo-AutoTune.pdsprjProteus simulation 29.5 KB
HEX ESP32_Servo_AutoTune.hexCompiled HEX file 118.5 KB
DLL TEPNET.DLLSimulation model 3.0 MB
DLL TEPOLED.DLLSimulation model 342.5 KB
DLL TEPSERVOLAB.DLLSimulation model 322 KB
DLL TEPTB6612.DLLSimulation model 296 KB
TXT README.txtText file 9.2 KB

README

README.txt 129 lines
===============================================================================================================
  PID Auto-Tune DC Servo Motor with ESP32 - 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/11/pid-auto-tune-dc-servo-motor-esp32-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
    DC servo lab (DC motor speed and position control lab):
      https://www.theengineeringprojects.com/2026/11/dc-motor-speed-and-position-control-lab-library-for-proteus.html
    TB6612FNG motor driver:
      https://www.theengineeringprojects.com/2026/10/tb6612fng-motor-driver-library-for-proteus-v1-0.html
    OLED SSD1306:
      https://www.theengineeringprojects.com/2026/10/oled-ssd1306-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-Servo-AutoTune-TEP-v1.0/
|-- Proteus Library Files/
|   |-- TEPESP32V1.LIB                                 36.6 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
|   |-- TEPOLED12864.LIB                              112.4 KB   a part of the project -> LIBRARY folder
|   |-- TEPSERVOLAB.LIB                                17.2 KB   a part of the project -> LIBRARY folder
|   |-- TEPTB6612.LIB                                  71.1 KB   a part of the project -> LIBRARY folder
|-- Proteus Model Files/
|   |-- TEPNET.DLL                                     3.01 MB   a model -> MODELS folder
|   |-- TEPOLED.DLL                                   342.5 KB   a model -> MODELS folder
|   |-- TEPSERVOLAB.DLL                               322.0 KB   a model -> MODELS folder
|   |-- TEPTB6612.DLL                                 296.0 KB   a model -> MODELS folder
|-- Proteus Simulation/
|   |-- ESP32_Servo_AutoTune.hex                      118.5 KB   the firmware U1 runs
|   |-- ESP32-Servo-AutoTune.pdsprj                    29.5 KB   the project simulation
|   |-- TEPNET.DLL                                     3.01 MB   copy of the model
|   |-- TEPOLED.DLL                                   342.5 KB   copy of the model
|   |-- TEPSERVOLAB.DLL                               322.0 KB   copy of the model
|   |-- TEPTB6612.DLL                                 296.0 KB   copy of the model
|-- Arduino Code/
|   |-- ESP32_Servo_AutoTune/ESP32_Servo_AutoTune.ino   16.7 KB   the sketch (source of the .hex)
|-- README.txt                                         ~9.8 KB   this file
Total: 8.36 MB (unzipped). The C++ source code of the models is not included.

WHAT IS IT?
  A DC servo that tunes its own PID loop, the way industrial controllers do. An ESP32 drives a DC motor with a
  flywheel through a TB6612FNG and reads its 400-count encoder. A bump test measures the motor, a relay test finds
  where the loop would oscillate, and the Ziegler-Nichols rules turn that into PID gains. Every move is measured:
  rise time, overshoot and settling time.
    * U1 ESP32 DEVKIT V1 runs ESP32_Servo_AutoTune.hex on TEP-WiFi at 192.168.1.101.
    * DRV1 the TB6612FNG (TB6612ADVTEP): PWMA = D25 (PWM at 20 kHz), AIN1 = D32, AIN2 = D33, STBY = D14; VM on +12V,
      VCC on +3.3V; AO1 / AO2 drive the motor; channel B unused.
    * U2 the DC servo lab (DCSERVOLABTEP, LINES 100 = 400 counts a turn, LOAD 0): a coreless DC motor with a brass
      flywheel; M+ / M- from AO1 / AO2, the encoder's A / B on D26 / D27, 5V on the VCC rail.
    * OLED1 an SSD1306 128x64 OLED (OLED12864WHITEADVTEP, 0x3C) on I2C: SDA D21, SCL D22, VCC +3.3V.
    * Laptop WiFi Monitor (PC1) and Mobile WiFi Monitor (MOB1) open http://192.168.1.101/.
  What the sketch does:
    the encoder   an interrupt on every edge of A and B, decoded x4 with a state table: 400 counts a turn
    1. bump       4 V for 1.2 s: the final speed gives K (counts/s per volt), 63 % of it the time constant tau
    2. relay      around the present angle the motor gets +3 V or -3 V by the sign of the error (hysteresis 3
                  counts); the loop oscillates with amplitude a and period Pu; Ku = 4 d / (pi sqrt(a^2 - eps^2))
    3. the rules  Ziegler-Nichols: Kp = 0.6 Ku, Ti = Pu / 2, Td = Pu / 8 (quick, some overshoot);
                  no overshoot: Kp = 0.2 Ku, Ti = Pu / 2, Td = Pu / 3
    the PID       every 5 ms with the real time step; the derivative on the measured speed (no kick when the target
                  jumps); the integral only within 10 counts of the target and while the output is under 6 V (no
                  windup); within 1 count the motor rests; after each test the driver brakes (IN1 = IN2 = HIGH)
    the measure   rise time 10 - 90 %, overshoot, settling time within 2 % of the move
  The sequence at start: bump, relay, Ziegler-Nichols and a move to 90 degrees, the no-overshoot rule and moves to
  180 and -90 degrees. The angles are the dial's, from the nearest whole turn after the bump test.
  Its pages:
    /             the dashboard with the links Refresh, TUNE, ZN, SOFT, GO 0, GO 90 and GO 180
    /data         JSON: the mode, the angle, the target, K, tau, Ku, Pu, the gains and the last move's numbers
  Libraries: WiFi and WebServer (part of the ESP32 core), Wire, Adafruit SSD1306 and Adafruit GFX.

TEST STATUS
  Tested in Proteus 8 Professional on Windows 11, the run that made the tutorial's screenshots:
  - Bump test (3.07 s): final speed 4,267 counts/s (640 rpm) - K = 1,067 counts/s per V, tau = 170 ms.
  - Relay test (5.42 s): amplitude 24.1 counts, Pu = 185 ms - Ku = 0.160 V per count.
  - Ziegler-Nichols (Kp 0.096, Ki 1.04, Kd 0.0022): the move to 90 degrees - rise 100 ms, overshoot 14.5 %,
    settled in 343 ms (the servo lab's own measure: OS 14.6 %).
  - No overshoot (Kp 0.032, Ki 0.35, Kd 0.0020): to 180 degrees - rise 140 ms, overshoot 0.0 %, settled in 243 ms;
    to -90 degrees - rise 140 ms, overshoot 0.7 %, settled in 228 ms.
  - GO 90 on the laptop's dashboard: from -90.9 to 90.0 degrees - rise 130 ms, overshoot 0.0 %, settled in 236 ms.
  - 26.1 s of simulation in 244 s.

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 DCSERVOLABTEP to check that the parts
     are there.

RUN THE SIMULATION
  1. Open "Proteus Simulation\ESP32-Servo-AutoTune.pdsprj". Keep ESP32_Servo_AutoTune.hex and the DLL files beside it.
  2. Press Play. At 3 s the bump test starts, then the relay test and the three moves (about 14 s of simulation).
  3. Click U2 for the servo lab's pop-up: the flywheel, the speed, angle and voltage graphs, the last move. Open the
     Laptop or the Mobile WiFi Monitor (Go) for the dashboard: ZN or SOFT picks the rule, GO 0 / 90 / 180 moves,
     TUNE runs the tests again.

PROPERTIES USED IN THIS PROJECT
  U1 ESP32 DEVKIT V1           PROGRAM=ESP32_Servo_AutoTune.hex
  DRV1 TB6612ADVTEP            (defaults)
  U2 DCSERVOLABTEP             LINES=100, LOAD=0
  OLED1 OLED12864WHITEADVTEP; PC1, MOB1 HOMEPAGE=http://192.168.1.101/

TROUBLESHOOTING
  * The motor does not turn: STBY (D14) must be HIGH, VM on +12V, AO1 / AO2 to M+ / M-.
  * The angle runs away or the moves never settle: A / B swapped turns the feedback positive - swap D26 / D27 (or
    M+ / M-).
  * The OLED stays dark: SDA / SCL on D21 / D22, VCC on +3.3V. It is redrawn only while the motor rests.
  * A real servo with a heavy load: run TUNE again after a change - the gains follow the plant.

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 and the Adafruit SSD1306 / GFX libraries.
  * Proteus is a product of Labcenter Electronics and is not included. ESP32 is a product of Espressif Systems;
    TB6612FNG of Toshiba. This project is not made or endorsed by them.

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

Development1 release

  1. V1.0PID Auto-Tune DC Servo Motor with ESP32 - 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 f5a84b46bedc44d79415467b21929f57.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-Servo-AutoTune-TEP-v1.0) as it is.

  2. 2

    Copy the library files into Proteus

    Move TEPESP32V1.LIB, TEPLAPTOP.LIB and TEPMOBILE.LIB and 3 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 TEPNET.DLL, TEPOLED.DLL and TEPSERVOLAB.DLL and 1 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_Servo_AutoTune.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_Servo_AutoTune.hex and run the simulation. For real hardware, flash the same file with your programmer.

  7. 7

    Open the example simulation

    Open ESP32-Servo-AutoTune.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

    PID Auto-Tune DC Servo Motor with ESP32 - 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 PID Auto-Tune DC Servo Motor with ESP32 - 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?

PID Auto-Tune DC Servo Motor with ESP32 - Proteus Simulation V1.0 comes as a ZIP archive of 18 files (3.8 MB, 8.4 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 18 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, b0ba4d80dbaed9bb6275e4f7383933a14b5b6b33b1cc323762bcd6b05a858841. In PowerShell run Get-FileHash "f5a84b46bedc44d79415467b21929f57.zip"; on macOS or Linux run shasum -a 256 "f5a84b46bedc44d79415467b21929f57.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 · f5a84b46bedc44d79415467b21929f57.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 b0ba4d80dbaed9bb6275e4f7383933a14b5b6b33b1cc323762bcd6b05a858841
DocumentationPID Auto-Tune DC Servo Motor with ESP32 - 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.