ESP-12E Library for Proteus: the ESP8266 ESP-12E Wi-Fi module with an Arduino UNO, the Laptop and Mobile WiFi Monitors

ESP-12E Library for Proteus: ESP8266 Wi-Fi Module with PCB Antenna

2.5K Views
40
700
60
25
60
PCBWay

Hello friends, I hope you all are doing great. Today, I am going to share the ESP-12E Library for Proteus. The ESP-12E is the most popular ESP8266 module of all: it is the little shielded board inside most NodeMCU boards, with a PCB antenna printed at its top end, a blue LED on GPIO2 and 22 pins. With this library you can place it in Proteus on its own, wire it to an Arduino, send it AT commands and watch it join the Wi-Fi, serve a web page and a JSON reading, switch its own blue LED and talk UDP with other devices - all inside the simulation.

Updates

ESP-12E Library for Proteus

Latest version: V1.0 (October 2026, this tutorial)

Helping Tools

This is the eleventh library of our Wi-Fi series, and its demo is a small Wi-Fi meter: the Arduino reads a pot, and the ESP-12E broadcasts the reading over UDP every 5 seconds. Our Laptop WiFi Monitor and Mobile WiFi Monitor both receive it at once, send UDP commands back to switch the LED, open the module's web page, read its JSON and ping it. Our previous demo used TCP; this one shows the other half of networking - broadcast datagrams that reach every listener on the network.

NOTICE: real ESP-12E modules differ between makers: the antenna trace, the shield marking and the flash size vary, and the red power LED of our part is a TEP addition. Check your module before you wire it. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the ESP-12E board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the ESP-12E Library for Proteus:

ESP-12E Library for Proteus: the ESP8266 ESP-12E Wi-Fi module with an Arduino UNO, the Laptop and Mobile WiFi Monitors
Figure: The ESP-12E Library for Proteus: the ESP-12E (U1) with its EN pull-up and GPIO15 pull-down next to our Arduino UNO V4.0, its blue LED on; the UNO's monitor, the laptop's UDP terminal and the phone's browser all show the LED on.

What is the ESP-12E?

The ESP-12E is one of the Ai-Thinker modules built around the ESP8266 Wi-Fi chip. A metal shield covers the chip, its 4 MB flash and the crystal; the antenna is a zig-zag copper trace on the board itself, so the module needs nothing else to reach the router. It ships with the AT firmware, so an Arduino can use it through a serial port with commands such as AT+CWJAP and AT+CIPSEND. It is also the module on top of our ESP8266 WiFi Shield Library for Proteus and of most NodeMCU boards - here you get it bare, with every pin.

The real ESP-12E and the ESP-12E in Proteus
Real ESP-12EThis library in Proteus
ChipESP8266 under a metal shield, AT firmwareour AT firmware 1.7.4 model
Antennaa PCB antenna (the zig-zag trace)the PCB antenna, glowing while it sends and receives
Pins22: 8 on each side, 6 flash pins on the bottom edge, 2 mm pitchthe same 22, on the 0.1 inch grid of Proteus
Boot pinsEN and RST pulled up, GPIO15 pulled down, GPIO0 high for normal bootchecked at every boot, shown on the panel
LEDa blue LED on GPIO2 (lit when LOW)the blue LED on GPIO2, plus a red PWR LED (TEP addition)
GPIOGPIO0, 2, 4, 5, 12, 13, 14, 15, 16GPIO2, 4, 5, 12, 13, 14, 16 driven with AT+SYSGPIO
Supply3.3 V, about 300 mA peaksVCC on 3.3 V

The Six Pins on the Bottom Edge

Compared with the ESP-07 family, the ESP-12E has six more pads along its bottom edge: CS0, MISO, GPIO9, GPIO10, MOSI and SCLK. They are the SPI lines of the module's own flash memory - the chip reads its program from there - so a real project leaves them unconnected. Our part draws them on the bottom edge where they really are, and the model leaves them alone. The other 16 pins are in the same order as on our ESP-07 and ESP-07S, so a circuit made for those works here too.

The Boot Pins of a Bare ESP8266 Module

A bare ESP-12E needs the same few resistors as the ESP-07. EN (also called CH_PD) must be pulled up, or the chip stays off. RST resets it when it goes low. GPIO15 must be low when the chip starts - pulled down with a resistor - or the ESP8266 tries to boot from an SD card and the AT firmware never runs. GPIO0 low at boot selects the flash mode for loading new firmware. Our model checks all four at every boot and the panel shows them, so a missing resistor in Proteus looks the same as on the bench: no answer from the module.

The Blue LED on GPIO2

The real ESP-12E has one LED of its own: a small blue one on GPIO2, lit when the pin is low. It flashes while the chip boots, and with the AT firmware your Arduino can use it as a status light: AT+SYSGPIODIR=2,1 makes GPIO2 an output, AT+SYSGPIOWRITE=2,0 lights the LED and AT+SYSGPIOWRITE=2,1 puts it out. Our demo needs no extra LED at all - the laptop and the phone switch the module's own blue LED over Wi-Fi.

Features of the ESP-12E Library for Proteus

  • The ESP-12E as it looks: the black board with the PCB antenna, the metal shield, the LEDs and all 22 gold pads, including the six flash pins on the bottom edge.
  • A live PCB antenna: the trace turns orange while the module sends and green while it receives.
  • Real boot pins: EN low switches the module off, RST low resets it, GPIO15 must be low at boot and GPIO0 low selects the flash mode - the panel shows the state of each.
  • The blue LED on GPIO2, as on the real module, and six more GPIO pins (GPIO4, 5, 12, 13, 14 and 16) for AT+SYSGPIO.
  • The AT firmware 1.7.4 of our ESP-01 Library for Proteus: Wi-Fi join and scan, TCP and UDP (with broadcast), the server, +IPD with the sender's address (AT+CIPDINFO), CIPSEND to a chosen address, UART_CUR, SNTP, PING and more.
  • Wi-Fi in Proteus: a virtual router with DHCP and two neighbours for scans, a phone in the panel that opens your web page, an internet host, and TCP / UDP to every TEP Wi-Fi part in the design.
  • Our Laptop and Mobile WiFi Monitors: a laptop and a phone on the same network, with a browser, TCP and UDP terminals and ping - included in the package.
  • Our pop-up panel: the phone, the module card with the antenna and the boot pins, a Test page with four measuring tools, Settings and Help.
  • A compact package: about 2.54 MB, without the C++ source code of the models.

The ESP-12E Part in Proteus

ESP-12E in Proteus: the part with its PCB antenna, the metal shield and 22 pins
Figure: The part as the library draws it: the PCB antenna at the top, the PWR and IO2 LEDs, the metal shield, the PANEL pad, the 16 side pins and the six flash pins on the bottom edge.

Search ESP-12E in Pick Devices; the device ESP-12E WIFI MODULE is in TEPESP12E.LIB. The pins sit where they are on the real module: RST, ADC, EN, IO16, IO14, IO12, IO13, VCC on the left, TXD, RXD, IO5, IO4, IO0, IO2, IO15, GND on the right, and CS0, MISO, IO9, IO10, MOSI, SCLK along the bottom. Its pins sit on the 0.1 inch grid of Proteus while the real module uses a 2 mm pitch, so the part is drawn a little bigger than the real one; next to our UNO it is still small. Click the PANEL pad or the shield to open the panel.

ESP-12E in Proteus before Run: both LEDs off
Figure: The ESP-12E placed in a design, before Run: both LEDs off, the antenna trace quiet.

Every State of the ESP-12E

We ran the demo and paused the simulation for each picture. At Run the ESP-12E powers up and prints its boot text; the blue LED flashes during the boot, as on the real module:

ESP-12E in Proteus booting: the PWR and blue LEDs on
Figure: Booting: the red PWR LED on with the 3.3 V supply, the blue LED on GPIO2 lit while the chip starts.
ESP-12E in Proteus joining the Wi-Fi: the PCB antenna orange
Figure: Joining: the UNO sent AT+CWJAP and the module talks to the router - the antenna trace glows orange.
ESP-12E in Proteus on Wi-Fi with its web server running
Figure: On Wi-Fi: the antenna back to normal, the server listening on port 80, only the PWR LED lit.

While data flows, the antenna shows the direction:

ESP-12E in Proteus: the PCB antenna green while receiving
Figure: Receiving: the trace green - a request for the page arriving.
ESP-12E in Proteus: the PCB antenna orange while sending
Figure: Sending: orange - the page going out.
ESP-12E in Proteus with the router out of range
Figure: OUT OF RANGE: the router is gone, so the antenna stays quiet and the module has no IP address.

Download ESP-12E Library for Proteus

Click the button below to download ESP-12E-Library-for-Proteus-v1.0.zip (about 2.54 MB, without the C++ source code of the models):

ESP-12E Library for Proteus V1.0
  • README.txt: the device, installation, the demo, the pins, the properties, troubleshooting and the limits.
  • Proteus Library Files: TEPESP12E.LIB (the ESP-12E), ArduinoV4TEP.LIB (our Arduino boards V4.0 - the UNO of the demo), TEPLAPTOP.LIB and TEPMOBILE.LIB (our Laptop and Mobile WiFi Monitors).
  • Proteus Model Files: TEPNET.DLL (the ESP-12E, the two monitors and the Wi-Fi network) and TEPARDUINO.DLL (the Arduino boards).
  • Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
  • Arduino Code: the demo sketch. AltSoftSerial is not included - install it from the Library Manager.

No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.

How to Install ESP-12E Library for Proteus

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the four files from Proteus Library Files into the LIBRARY folder of Proteus (usually C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY).
  3. Copy TEPNET.DLL and TEPARDUINO.DLL from Proteus Model Files into the MODELS folder - replace older copies (this TEPNET.DLL is the first one that knows the ESP-12E, and it still runs all our ESP32 boards, ESP-01, ESP-01S, WiFi Shield, ESP-01 adapter, ESP-07, ESP-07S and the two monitors).
  4. Delete TEPESP12E.IDX, ArduinoV4TEP.IDX, TEPLAPTOP.IDX and TEPMOBILE.IDX from the LIBRARY folder if they are there.
  5. Start Proteus, press P and search for ESP-12E.

The sketch is a normal UNO sketch: select Arduino Uno in the Arduino IDE, install AltSoftSerial, write your sketch and use Sketch > Export Compiled Binary; then double-click the UNO in Proteus and set its Program File to the HEX (see How to get the HEX file from Arduino).

Demo: A UDP Wi-Fi Meter with the Laptop and Mobile WiFi Monitors

Open ESP-12E-UDP-Meter-with-Laptop-and-Mobile.pdsprj. On the left is our Arduino UNO Library for Proteus V4.0 (ARD1) with its built-in serial monitor and a pot on A0, in the middle the ESP-12E (U1) with its two resistors, and on the right the laptop (PC1) and the phone (MOB1). The laptop and the phone have no wires at all - like the real ones, they are simply on the TEP-WiFi network.

ESP-12E Proteus simulation with an Arduino UNO, a pot, the Laptop WiFi Monitor and the Mobile WiFi Monitor
Figure: The whole demo: the titles, ARD1 with RV1 on A0, U1 the ESP-12E with R1 and R2, PC1 the Laptop WiFi Monitor and MOB1 the Mobile WiFi Monitor.

The ESP-12E needs VCC on +3.3V and GND, R1 (10k) to pull EN up and R2 (10k) to pull GPIO15 down. Its TXD goes to the UNO's D8 and its RXD comes from D9 through the labels ESP_TXD and ESP_RXD. There is no LED in the circuit - the blue LED is on the module itself - and the six flash pins stay unconnected:

ESP-12E circuit in Proteus: EN pull-up and GPIO15 pull-down
Figure: The circuit around the ESP-12E: R1 10k from EN to +3.3V, R2 10k from GPIO15 to GND, VCC on +3.3V; TXD and RXD go up to the labels ESP_TXD and ESP_RXD; the flash pins at the bottom are left open.

The reading comes from RV1, a 10k pot between 5 V and ground with its wiper on the UNO's A0. It starts at 35 %, which the UNO reads as 358 of 1023, or 1.75 V:

Pot RV1 on the Arduino UNO A0 pin in Proteus
Figure: RV1 (POT-HG, 10k) at 35 %: the top on VCC, the bottom on ground, the wiper wired to A0.

The two tools come from our Laptop WiFi Monitor Library for Proteus and Mobile WiFi Monitor Library for Proteus. In this project both have their UDP port 4210 open at Run (the UDPPORT property) and the ESP-12E's address, http://192.168.1.101/, as the home page of their browser. The laptop is 192.168.1.21 and the phone 192.168.1.41 on the network:

Laptop WiFi Monitor in Proteus showing the ESP-12E UDP readings on its screen
Figure: PC1 on the sheet: its screen shows the UDP terminal on port 4210 - a reading, then READ, LED ON and HELP with their answers.
Mobile WiFi Monitor in Proteus on the TEP-WiFi network
Figure: MOB1 on the sheet: the browser's start page, connected to TEP-WiFi, with a link to the ESP-12E.

Why UDP?

Our ESP-07S demo used TCP: a connection opened between two devices, every byte confirmed, closed at the end. UDP sends single datagrams with no connection at all. That makes it light and fast, and a datagram sent to the network's broadcast address (192.168.1.255 here) reaches every device listening on that port at once. It is how sensors often send readings, how devices find each other on a network, and how a phone app can talk to a module without knowing its address first. The price: nothing tells the sender whether a datagram arrived, so the meter simply sends a fresh reading every few seconds.

The Sketch: UDP Readings, UDP Commands and a Page

The UNO talks to the module with AltSoftSerial on D8 / D9. The ESP-12E starts at 115200 bps, too fast for a software serial port to receive, so the sketch sends one AT+UART_CUR=9600 at that speed and then talks at 9600:

  espFast.begin(115200);               // the ESP-12E's factory speed
  espFast.print(F("AT+UART_CUR=9600,8,1,0,0\r\n"));
  espFast.end();
  esp.begin(9600);                     // AltSoftSerial takes D9 over
  delay(50);

After the join, the set-up allows several connections, asks the firmware to tell who sent each piece of data (AT+CIPDINFO=1), starts the web server and opens one UDP link: link 4, local port 4210, with the broadcast address as its default target:

  command("AT+CIPMUX=1");              // several connections - needed for the server and the UDP link
  command("AT+CIPDINFO=1");            // +IPD tells who sent the data
  command("AT+CIPSERVER=1,80");
  char udp[64];                        // local port 4210, default target the broadcast address
  snprintf_P(udp, sizeof(udp), PSTR("AT+CIPSTART=%d,\"UDP\",\"192.168.1.255\",%d,%d,0"), UDP_LINK, UDP_PORT, UDP_PORT);
  command(udp, 3000);

The blue LED is GPIO2, and it is lit when the pin is low, so ON writes a 0:

void setLed(bool on) {
  led = on;
  command(on ? "AT+SYSGPIOWRITE=2,0" : "AT+SYSGPIOWRITE=2,1");
}

The pot is read with analogRead. The UNO's snprintf cannot print floats, so the sketch works in hundredths of a volt:

void potText(char* out, byte size) {
  pot = analogRead(A0);
  const long cv = (pot * 500L + 511) / 1023;
  snprintf_P(out, size, PSTR("%d (%ld.%02ld V)"), pot, cv / 100, cv % 100);
}

Every 5 seconds one reading goes out. A plain AT+CIPSEND on the UDP link sends it to the link's default target - the broadcast address - so every laptop and phone listening on port 4210 gets the same datagram:

void broadcastReading() {
  char pv[24];
  potText(pv, sizeof(pv));
  snprintf_P(page, sizeof(page), PSTR("ESP-12E: pot %s, LED %s, RSSI %d dBm, up %lu s\r\n"), pv, led ? "ON" : "OFF", rssi, millis() / 1000);
  if (sendOn(UDP_LINK, page, false)) {
    ++readings;
    Serial.print(F("Broadcast "));
    Serial.print(readings);
    Serial.print(F(": pot "));
    Serial.print(pv);
    Serial.print(F(", LED "));
    Serial.println(led ? F("ON") : F("OFF"));
  }
}

With AT+CIPDINFO=1, data arrives as +IPD,<link>,<length>,<ip>,<port>:. The sketch keeps the link, the length and the sender's address and port:

    if (c == ':' && !strncmp(line, "+IPD,", 5)) {     // "+IPD,<link>,<length>,<ip>,<port>:" then the data
      line[lineLength - 1] = '\0';
      newLink = atoi(line + 5);
      char* p = strchr(line + 5, ',');
      ipdLeft = p ? atoi(p + 1) : 0;
      newIp[0] = '\0'; newPort = 0;
      if (p) p = strchr(p + 1, ',');
      if (p) {
        char* q = strchr(p + 1, ',');
        if (q) { *q = '\0'; strncpy(newIp, p + 1, sizeof(newIp) - 1); newIp[sizeof(newIp) - 1] = '\0'; newPort = atoi(q + 1); }
      }
      requestLength = 0; requestDone = false; lineLength = 0;
    }

A datagram on link 4 is a command. The answer goes back to the sender only: AT+CIPSEND accepts an address and a port after the length on a UDP link, and the send function adds them when it gets them:

void answerDatagram(const char* text) {
  ++commands;
  if (!strcasecmp(text, "LED ON") || !strcasecmp(text, "ON")) setLed(true);
  else if (!strcasecmp(text, "LED OFF") || !strcasecmp(text, "OFF")) setLed(false);
  char pv[24];
  potText(pv, sizeof(pv));
  if (!strcasecmp(text, "LED ON") || !strcasecmp(text, "ON") || !strcasecmp(text, "LED OFF") || !strcasecmp(text, "OFF") ||
      !strcasecmp(text, "READ")) {
    snprintf_P(page, sizeof(page), PSTR("ESP-12E: LED %s, pot %s\r\n"), led ? "ON" : "OFF", pv);
  } else if (!strcasecmp(text, "HELP")) {
    strcpy_P(page, PSTR("ESP-12E commands: LED ON, LED OFF, READ, HELP\r\n"));
  } else {
    snprintf_P(page, sizeof(page), PSTR("Unknown: %s - send HELP\r\n"), text);
  }
  sendOn(UDP_LINK, page, false, fromIp, fromPort);
}
bool sendOn(int link, const char* text, bool close, const char* toIp = NULL, int toPort = 0) {
  esp.print(F("AT+CIPSEND="));
  esp.print(link);
  esp.print(',');
  esp.print(strlen(text));
  if (toIp) { esp.print(F(",\"")); esp.print(toIp); esp.print(F("\",")); esp.print(toPort); }
  esp.print(F("\r\n"));
  bool sent = waitFor(">", 2000);
  if (sent) { esp.print(text); sent = waitFor("SEND OK", 5000); }
  if (close) {
    esp.print(F("AT+CIPCLOSE="));
    esp.print(link);
    esp.print(F("\r\n"));
    waitFor("OK", 2000);
  }
  return sent;
}

On port 80 the same reading is a web page for people and JSON for programs - a phone app, a script or a dashboard can read /json without parsing HTML:

  if (!strcmp(path, "/json")) {
    const long cv = (pot * 500L + 511) / 1023;
    snprintf_P(page, sizeof(page), PSTR("HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nConnection: close\r\n\r\n"
               "{\"pot\":%d,\"volts\":%ld.%02ld,\"led\":%s,\"rssi\":%d,\"uptime\":%lu}"),
               pot, cv / 100, cv % 100, led ? "true" : "false", rssi, millis() / 1000);

Press Run and watch the UNO's monitor. The module is found, joins TEP-WiFi, reports the signal of its PCB antenna and opens its UDP port and its page:

Arduino UNO serial monitor in Proteus: the ESP-12E found, joined to the Wi-Fi, UDP on port 4210
Figure: The UNO's monitor at 9600 baud: the ESP-12E found and switched to 9600 bps, joined to TEP-WiFi with RSSI -45 dBm on the PCB antenna, ready with UDP on port 4210 and the page at 192.168.1.101.
UNO + ESP-12E: a Wi-Fi meter for the Laptop and Mobile WiFi Monitors
www.TheEngineeringProjects.com
ESP-12E found, now at 9600 bps
Joining TEP-WiFi... connected
Signal: RSSI -45 dBm (PCB antenna)
Ready: UDP on port 4210, page on http://192.168.1.101/
Serial monitor: ON, OFF, READ, RSSI, SCAN, STATUS, BROADCAST, AT..., HELP

UDP Readings and Commands on the Laptop

The Laptop WiFi Monitor joins TEP-WiFi in about 2.4 seconds and opens its UDP port 4210 at Run. Open Terminal and choose UDP: the readings arrive every 5 seconds, each one marked with the ESP-12E as the sender:

Laptop WiFi Monitor UDP terminal in Proteus: the ESP-12E readings on port 4210
Figure: UDP, local port 4210, listening: joined in 2.38 s, then three readings from the ESP-12E U1 (192.168.1.101) at 8, 13 and 18 s.

The terminal sends to 192.168.1.255:4210 by default - the broadcast address on port 4210, which the ESP-12E listens to. Type READ, LED ON and HELP. Each answer comes back to the laptop alone, and the blue LED on the module lights at LED ON:

Laptop WiFi Monitor in Proteus: READ, LED ON and HELP sent to the ESP-12E over UDP
Figure: READ, LED ON and HELP sent from the laptop, each answered by the ESP-12E; the readings carry on between them.
ESP-12E: pot 358 (1.75 V), LED OFF, RSSI -45 dBm, up 8 s
ESP-12E: pot 358 (1.75 V), LED OFF, RSSI -45 dBm, up 13 s
ESP-12E: pot 358 (1.75 V), LED OFF, RSSI -45 dBm, up 18 s
READ
ESP-12E: LED OFF, pot 358 (1.75 V)
LED ON
ESP-12E: LED ON, pot 358 (1.75 V)
HELP
ESP-12E commands: LED ON, LED OFF, READ, HELP
ESP-12E in Proteus with its blue LED on GPIO2 lit over Wi-Fi
Figure: The blue LED on GPIO2 lit after LED ON - and the antenna trace orange while the answer goes out.

The Page and the JSON in the Laptop's Browser

The Browser tab lists the ESP-12E as a device and opens its page: the pot, the blue LED and four links. ON and OFF switch the LED, READ reloads the page:

Laptop WiFi Monitor browser in Proteus: the ESP-12E Wi-Fi Meter page
Figure: http://192.168.1.101/ on the laptop: Pot (A0) 358 (1.75 V), Blue LED (GPIO2) is ON, the links ON, OFF, READ and JSON.

Click JSON. The same values come back as one line that any program can read:

Laptop WiFi Monitor browser in Proteus: the ESP-12E reading as JSON
Figure: /json in the browser: the pot, the volts, the LED, the RSSI and the uptime - HTTP 200, 128 bytes in 0.44 s.
{"pot":358,"volts":1.75,"led":true,"rssi":-46,"uptime":24}

View source shows the HTTP header the UNO sent with it - Content-Type: application/json:

Laptop WiFi Monitor in Proteus: the HTTP header and the JSON body from the ESP-12E
Figure: View source: HTTP/1.1 200 OK, Content-Type application/json, Connection close, then the JSON body.

The Network tab lists every device on TEP-WiFi. Click Ping on the ESP-12E's row:

Laptop WiFi Monitor in Proteus: ping to the ESP-12E at 192.168.1.101
Figure: The Network tab: the devices on TEP-WiFi and the ping to 192.168.1.101 - 4 replies, 9 to 15 ms, average 12 ms.
Pinging 192.168.1.101:
Reply from 192.168.1.101: bytes=32 time=14ms TTL=255
Reply from 192.168.1.101: bytes=32 time=9ms TTL=255
Reply from 192.168.1.101: bytes=32 time=9ms TTL=255
Reply from 192.168.1.101: bytes=32 time=15ms TTL=255
Packets: sent = 4, received = 4, lost = 0 (0% loss)

The Same Meter on the Phone

The Mobile WiFi Monitor, 192.168.1.41, opens the same page; its links become big buttons for a finger:

Mobile WiFi Monitor browser in Proteus: the ESP-12E Wi-Fi Meter page
Figure: The phone's browser on http://192.168.1.101/: the pot, Blue LED (GPIO2) is ON, the ON, OFF, READ and JSON buttons.
Mobile WiFi Monitor in Proteus: the ESP-12E blue LED switched off from the phone
Figure: After OFF on the phone: /off, Blue LED (GPIO2) is OFF - page 4.

Its Terminal app has a UDP mode too, also on port 4210. It shows the readings, because they are broadcast - and it also hears the laptop's broadcast commands. Send LED ON from the phone and the answer comes back to the phone:

Mobile WiFi Monitor UDP terminal in Proteus: the ESP-12E readings and LED ON from the phone
Figure: The phone's UDP terminal: the readings, the laptop's READ, LED ON and HELP heard on the broadcast, then LED ON sent from the phone and its answer.
Mobile WiFi Monitor in Proteus: the devices on TEP-WiFi with the ESP-12E
Figure: Devices: the laptop PC1, this phone, the ESP-12E U1 at 192.168.1.101 with Ping and Open, and the panel's phone.

The UNO's monitor logs everything from its side: each broadcast, each datagram with its sender's address, and each page:

Arduino UNO serial monitor in Proteus: the ESP-12E broadcasts, UDP commands and pages
Figure: ARD1's monitor: the broadcasts, the UDP commands from 192.168.1.21 (the laptop) and 192.168.1.41 (the phone), and the pages.
Broadcast 2: pot 358 (1.75 V), LED OFF
Broadcast 3: pot 358 (1.75 V), LED OFF
UDP from 192.168.1.21: READ
UDP from 192.168.1.21: LED ON
UDP from 192.168.1.21: HELP
Page: GET / HTTP/1.1
Broadcast 4: pot 358 (1.75 V), LED ON
Page: GET /json HTTP/1.1
Page: GET / HTTP/1.1
Page: GET /off HTTP/1.1
Broadcast 5: pot 358 (1.75 V), LED OFF
UDP from 192.168.1.41: LED ON
Broadcast 6: pot 358 (1.75 V), LED ON

The reading follows the pot. In a second run we set RV1 to 70 % before pressing Run, and the readings said so:

Laptop WiFi Monitor in Proteus: ESP-12E readings with the pot at 70 percent
Figure: RV1 at 70 %: pot 717 (3.50 V) in every reading.

And the whole demo running, with the blue LED switched on over Wi-Fi:

ESP-12E Proteus simulation running with the Arduino UNO, the pot, the laptop and the phone
Figure: The demo running: ARD1 with RV1, U1 with its blue LED lit, PC1 showing the UDP terminal on its screen and MOB1.

The ESP-12E Panel

The panel opens at Run, in the look of our TEP Serial Monitor Advance for Proteus. Its Wi-Fi page has a small phone of its own and three cards: the ESP-12E card with the firmware, the mode, the UART speed, the antenna and the boot pins, the WI-FI card and the TRAFFIC card:

ESP-12E panel in Proteus: the ESP-12E, WI-FI and TRAFFIC cards
Figure: After the set-up: AT 1.7.4.0, SDK 3.0.4, 9600 bps (UART_CUR), CIPMUX 1 with the server on port 80; Antenna PCB antenna (on the module); Boot pins EN high, GPIO15 low, GPIO0 high; the last join 2.18 s.

Tap OPEN ESP PAGE and the panel's phone asks the sketch for its page too - a quick check without the monitors:

ESP-12E panel in Proteus: the page of the sketch on the panel phone
Figure: The panel's phone with the page: the pot and Blue LED (GPIO2) is OFF.
ESP-12E panel in Proteus: the blue LED switched on from the panel phone
Figure: After ON: Blue LED (GPIO2) is ON, GET /on HTTP/1.1 the last request.

The monitor is a small Wi-Fi tool too. Type ON or OFF for the LED, READ for the pot, RSSI for the signal, SCAN for the networks in range, STATUS for a summary and BROADCAST to stop or start the readings; any line starting with AT goes to the module as it is. A broadcast line slips in between when its 5 seconds are up:

Arduino UNO serial monitor in Proteus: READ, RSSI, SCAN and STATUS for the ESP-12E
Figure: READ, RSSI, SCAN and STATUS typed in the monitor: the pot, -46 dBm, three networks in range, the status line.
RSSI
Broadcast 1: pot 358 (1.75 V), LED ON
Signal: RSSI -46 dBm
SCAN
Scanning (AT+CWLAP)...
  TEP-WiFi  -47 dBm
  Neighbour_WiFi  -79 dBm
  Guest_Network  -88 dBm
3 network(s) in range
STATUS
LED ON, pot 358 (1.75 V), RSSI -46 dBm; sent 1, UDP commands 0, pages 2; up 13 s
Broadcast 2: pot 358 (1.75 V), LED ON

WEAK moves the router far away. The PCB antenna then reads about -81 dBm - still connected, but close to the edge:

ESP-12E panel in Proteus: a weak signal
Figure: WEAK: the signal in orange, still connected on the PCB antenna.
Arduino UNO serial monitor in Proteus: the ESP-12E RSSI with a weak signal
Figure: RSSI typed again with the weak signal: -81 dBm.

OUT OF RANGE takes the router away completely; the module loses its IP address and the readings stop until GOOD brings the router back and the module joins again:

ESP-12E panel in Proteus: the router out of range
Figure: OUT OF RANGE: the card on the phone turns red, No IP, the WI-FI card says out of range and the status bar Not on Wi-Fi.

The Test page has four tools that measure the running model: the Wi-Fi join test (the module really leaves and re-joins the router), the web request test, the cloud upload check and the AT check. Then Settings and Help:

ESP-12E Test page in Proteus: the Wi-Fi join test
Figure: The Test page: Wi-Fi join, Web request, Cloud upload and AT check; the join test can re-join, drop the router or reset the module 3, 5 or 10 times.
ESP-12E panel settings in Proteus: theme, text size, open at Run, window size
Figure: Settings: TEP Dark or Light, the text size, open the panel at Run, the window size.
ESP-12E panel help in Proteus: bug report, feature request, article, forum
Figure: Help: report a bug, suggest a feature, the article, the user guide, updates, donate, the website, the forum; Copy diagnostics.

One more thing the sketch does: every 30 seconds it checks that the module still answers at 9600. A reset puts the ESP-12E back to 115200 bps without its server and its UDP link, so the sketch finds it again and repeats the set-up:

  if (millis() - lastCheck > CHECK_EVERY) {
    if (!command("AT", 1000) && !command("AT", 1000)) {
      Serial.println(F("The ESP-12E restarted - setting it up again"));
      if (startEsp()) setupModule();
    }
    lastCheck = millis();
  }

Pins of the ESP-12E

The pins of the ESP-12E: left side, right side, then the bottom edge
PinWhat it is
RSTreset, low = in reset (pull it up on a real module)
ADCthe ESP8266's analog input (0 to 1 V) - not read by the AT firmware model
ENCH_PD, the enable pin: high = on, low = off - pull it up with 10k
IO16, IO14, IO12, IO13GPIO pins for AT+SYSGPIO
VCC3.3 V supply - not 5 V
TXDthe module's UART TX, to the Arduino's RX
RXDthe module's UART RX, from the Arduino's TX (3.3 V logic)
IO5, IO4GPIO pins for AT+SYSGPIO
IO0GPIO0: low at boot = flash mode
IO2GPIO2, the blue LED (lit when low); high at boot
IO15GPIO15: must be low at boot - pull it down with 10k
GNDground
CS0, MISO, IO9, IO10, MOSI, SCLKthe module's own flash (bottom edge) - leave them unconnected

Properties of the ESP-12E

Double-click the ESP-12E to change them; every run starts again from the properties
PropertyWhat it does
WIFISSID / WIFIPASSthe router in range (TEP-WiFi / 12345678)
BAUDthe ESP-12E's factory UART speed (115200)
PANELthe phone's tab at start (BROWSER, CLOUD, WIFI)
PAGEPORTthe port OPEN ESP PAGE opens (80)
CLOCKthe clock for SNTP: PC or a fixed start time

The IP address follows the part's number: U1 gets 192.168.1.101, U2 .102 and so on, so give every Wi-Fi part its own number. The laptop is always 192.168.1.21 and the phone 192.168.1.41.

Troubleshooting

  • "No answer from the ESP-12E": TXD must reach D8 and RXD D9 (AltSoftSerial's fixed pins), VCC 3.3 V and GND the supply - the panel says NO POWER without it, and "EN low - disabled" when EN is low.
  • The panel says "SDIO boot (GPIO15 not low)": GPIO15 needs its pull-down; without it the AT firmware does not start. "flash mode (GPIO0 low)" means GPIO0 was low at boot.
  • AT+SYSGPIOWRITE answers NOT OUTPUT!: send AT+SYSGPIODIR=2,1 first - the pins start as inputs.
  • No readings on the laptop or the phone: their UDP port must be open on 4210 (Terminal, UDP, Local port 4210, Open) - the demo opens it at Run.
  • No answer to a UDP command: send it to the ESP-12E's port 4210 - 192.168.1.101:4210, or the broadcast address 192.168.1.255:4210, the terminals' default.
  • No panel: click the PANEL pad or the shield, or turn "Open the panel at Run" back on in Settings.

Things to Know Before Using a Real ESP-12E

  • Power: the ESP-12E draws up to about 300 mA while it sends. Use a 3.3 V regulator that can deliver that - not the UNO's 3.3V pin.
  • Levels: the ESP-12E is a 3.3 V part. Put a divider (for example 1k / 2k) between a 5 V Arduino's TX and the module's RXD; the module's TXD can go straight to the Arduino.
  • The 2 mm pitch: the pins do not fit a breadboard. Solder the module to an adapter plate - many of them already carry the EN, RST and GPIO15 resistors - or use a NodeMCU board, which has the ESP-12E, the resistors and USB on board.
  • Boot resistors: on a bare module pull EN, RST, GPIO0 and GPIO2 up with 10k and GPIO15 down with 10k.
  • The flash pins: never connect anything to CS0, MISO, GPIO9, GPIO10, MOSI or SCLK - they run the module's own flash.
  • The antenna: keep metal, ground copper and other parts away from the end with the antenna trace.
  • The firmware: most ESP-12E modules ship with the AT firmware at 115200 bps; AT+GMR tells you the version, and the GPIO commands depend on it.

Limitations of the Simulation

  • The ESP8266 runs our model of the AT firmware 1.7.4, not your own ESP8266 firmware; GPIO0 low gives the flash mode, but nothing can be flashed.
  • In Proteus an open EN or a 10k pull-up to a 3.3 V terminal both count as on - only a low switches the module off. GPIO15 must really be low.
  • Not modelled: the ADC pin, the flash pins (only drawn), the soft access point (CWMODE 2 / 3 are accepted, but nothing can join it), SSL connections, the supply's voltage and current, the radio itself - the join and network times and the antenna's signal are realistic values, not a radio simulation.
  • The PWR LED, the antenna colours, the PANEL pad, the panel, its phone, the router, the two neighbour networks, the internet host and the two monitors are TEP additions.
  • ESP8266 and ESP-12E are names of Espressif and Ai-Thinker; this library is not made or endorsed by Espressif, Ai-Thinker, Arduino or Labcenter.
  • Tested in Proteus 8.5 in October 2026 (the demo as shipped, the UNO, the ESP-12E, the laptop and the phone together at about 0.3 x real time on our PC). Proteus 7 is not supported.

So, that was all about the ESP-12E Library for Proteus. I hope it helps you try the most popular ESP8266 module in Proteus before you solder the real one - and test UDP the way you would on your desk, from a laptop and a phone. Last time we shared the ESP-07S Library for Proteus with a TCP demo; our series started with the ESP32 DevKit V1 Library for Proteus V2.0, and the Laptop and Mobile WiFi Monitors talk to every one of our Wi-Fi boards and modules. If you use the ESP-12E Library for Proteus in a project, please share it in the comments or in our forum, and if you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!


Comments

0

Join the conversation