
NodeMCU ESP8266 V2 Library for Proteus: Amica Wi-Fi Simulation

Hello friends, I hope you all are doing great. Today, I am going to share the NodeMCU ESP8266 V2 Library for Proteus. The NodeMCU V2 is the board many of us call "the" NodeMCU: the NodeMCU DevKit 1.0, nicknamed Amica, with the ESP-12E module, the CP2102 USB chip and the rows only 0.9 in apart, so it fits a single breadboard and leaves a row of holes free on each side. With this library it runs your ESP8266 sketch in Proteus - ESP8266WiFi, ESP8266HTTPClient, ESP8266WebServer, ESP8266mDNS, the D0 to D8 names, A0 - and joins a Wi-Fi network inside the simulation.
NodeMCU ESP8266 V2 Library for Proteus
Latest version: V1.0 (October 2026, this tutorial)
Helping Tools
- Laptop WiFi Monitor: a laptop on the Wi-Fi of your design: a browser, a TCP / UDP terminal and ping
- Mobile WiFi Monitor: a smartphone that opens the pages of your Wi-Fi module and sends it commands
- Serial Monitor Advance: a serial terminal window for the UART of your board
This is the twentieth library of our Wi-Fi series and the partner of our NodeMCU ESP8266 V3 Library for Proteus V2.0 (the wider LoLin board). Its demo is a cloud logger: every 20 seconds the NodeMCU sends the pot on A0 to a cloud service over HTTP, stamps each upload with the time from NTP, tells our Laptop WiFi Monitor the result by UDP and shows the last uploads on a page our Mobile WiFi Monitor opens by its name, logger.local. The two blue LEDs of the board show the Wi-Fi and the uploads.
NOTICE: Proteus has no ESP8266 processor, so this is not a real ESP8266 chip: your sketch is compiled for a hidden ATmega2560 inside the board (16 MHz, 8 KB of RAM). The ESP8266 Arduino API, the Wi-Fi and the cloud are our model. The antenna colours, the red PWR LED, the PANEL pad and the panel are TEP additions. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the NodeMCU ESP8266 V2 board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the NodeMCU ESP8266 V2 Library for Proteus:
What is NodeMCU ESP8266 V2?
The NodeMCU boards put an ESP-12E module (the ESP8266EX chip with 4 MB of flash and a PCB antenna) on a breadboard-friendly board with a USB chip, a 3.3 V regulator, two buttons and 30 pins. Three versions are common. The V2 - the DevKit 1.0, made by Amica - uses the CP2102 USB chip and is 26 mm wide with the rows 0.9 in apart. The V3 from LoLin uses the CH340G and is wider. The pins carry the same names and the same GPIOs, so a sketch for one runs on the other. If the board is new to you, read our Introduction to NodeMCU V3 first.
| Real NodeMCU V2 (Amica) | This library in Proteus | |
|---|---|---|
| Processor | ESP8266EX, 80 / 160 MHz, about 80 KB RAM | a hidden ATmega2560 at 16 MHz, 8 KB RAM |
| Sketch | ESP8266 Arduino core | the same API from our board package TEP Boards for Proteus 1.6.0 |
| Wi-Fi | 802.11 b/g/n, 2.4 GHz | our model: a router, DHCP, TCP, UDP, mDNS, NTP, an internet host |
| USB chip | CP2102 | drawn; the micro-USB opens the built-in serial monitor |
| A0 | 0 to 3.2 V through a 220k / 100k divider, 0 to 1023 | the same: 0 to 1023 for 0 to 3.2 V |
| LEDs | blue on GPIO2 (the ESP-12E) and blue on GPIO16 (the board) | the same two, plus a red PWR LED |
| Buttons | RST and FLASH (GPIO0) | the same, clickable |
| Size | 48 x 26 mm, rows 0.9 in apart | the same proportions |
Two Blue LEDs
The V2 has two user LEDs, both blue and both lit when their pin is LOW: the one on the ESP-12E module is on GPIO2 (LED_BUILTIN, D4), and the board's own LED next to the USB socket is on GPIO16 (D0). The ESP8266 core calls the second one LED_BUILTIN_AUX; our board package does the same. Our model draws both and lights them as the sketch drives them.
How Your ESP8266 Sketch Runs in Proteus
Proteus 8 simulates many processors, but not the ESP8266. So, as for our NodeMCU V3, the board in Proteus has a hidden ATmega2560 inside, and our board package for the Arduino IDE compiles your ESP8266 sketch for it. The package gives the sketch the ESP8266 names - D0 is GPIO16, D4 is GPIO2, A0 answers 0 to 1023 - and the ESP8266 libraries, which talk to our model in TEPNET.DLL. The model is the radio: it joins the router, hands out the address, keeps the sockets, answers mDNS names and reaches the virtual internet.
Know the price before you start: the sketch runs at 16 MHz with 8 KB of RAM, an int is 16 bits (use long above 32767), and there is no SPIFFS or LittleFS, no OTA and no real TLS. For web pages, sockets, HTTP requests, sensors and LEDs it is plenty, and the same sketch compiles for a real NodeMCU without a change.
Features of the NodeMCU ESP8266 V2 Library for Proteus
- The Amica as it looks: the narrow black board turned on its side, the micro-USB on the left, RST and FLASH beside it, the CP2102 and the AMS1117, the board's blue LED, the ESP-12E with its blue LED and its meander antenna on the right, 15 + 15 header pins with the Amica's labels (3V3, GND, SD2, SD3, the two RSV pins).
- The ESP8266 Arduino API:
digitalWrite,analogRead(A0),analogWrite,attachInterrupt,LED_BUILTINandLED_BUILTIN_AUX,configTimeandtime(),ESP.getChipId()and more. - Wi-Fi and the internet: a virtual router (TEP-WiFi) with DHCP, mDNS names, NTP time, TCP and UDP to every TEP Wi-Fi part, and an internet host whose
/updateAPI stores values like a real cloud service - one update per key every 15 seconds. - Both blue LEDs on GPIO2 and GPIO16, lit when LOW, the FLASH and RST buttons, a red PWR LED and an antenna that changes colour with the traffic.
- A0 as on the NodeMCU: 0 to 1023 for 0 to 3.2 V.
- A built-in serial monitor at 115200 baud with Monitor, Plotter and Board tabs.
- Our pop-up panel: a phone with a browser, the router list and a CLOUD tab with every upload, the board, Wi-Fi and traffic cards, every pin live, a Test page, Settings and Help.
- Our Laptop and Mobile WiFi Monitors in the package: a browser, TCP and UDP terminals and ping on the same network.
- A compact package: about 2.17 MB with the board package for the Arduino IDE, without the C++ source code of the models.
The NodeMCU ESP8266 V2 in Proteus
Search NODEMCU in Pick Devices; the device NODEMCU ESP8266 V2 is in TEPNODEMCU2.LIB (Microprocessor ICs, ESP8266 Boards). Click the micro-USB to open the serial monitor and the PANEL pad or the ESP-12E to open the panel.
Every State of the NodeMCU V2
We ran the board with the demo sketch and paused the simulation for each picture. The sketch blinks the D4 LED while it joins the router, keeps it on when the board is on Wi-Fi, and lights the D0 LED while an upload runs:
The same in the demo, zoomed in on the board. The small squares at the pins are Proteus's logic levels - red HIGH, blue LOW, grey not driven:
Download NodeMCU ESP8266 V2 Library for Proteus
Click the button below to download NodeMCU-ESP8266-V2-Library-for-Proteus-v1.0.zip (about 2.17 MB, without the C++ source code of the models):
NodeMCU ESP8266 V2 Library for Proteus V1.0- README.txt: the device, installation, the demos, the pins, the properties, troubleshooting and the limits.
- Proteus Library Files:
TEPNODEMCU2.LIB(the board),TEPLAPTOP.LIBandTEPMOBILE.LIB(our Laptop and Mobile WiFi Monitors). - Proteus Model Files:
TEPNET.DLL(the board, the two monitors and the Wi-Fi network). - Proteus Simulation: the two demo projects, the HEX file and a copy of the DLL.
- Arduino Code: the demo sketch and TEP Boards for Proteus 1.6.0, our board package for the Arduino IDE with the ESP8266 libraries.
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 NodeMCU ESP8266 V2 Library for Proteus
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy the three files from Proteus Library Files into the LIBRARY folder of Proteus (usually
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY). - Copy
TEPNET.DLLfrom Proteus Model Files into the MODELS folder - replace an older copy (this one is the first that knows the NodeMCU V2, and it still runs our NodeMCU V3, the ESP32 boards, the ESP8266 modules, the shields and the two monitors). - Delete
TEPNODEMCU2.IDX,TEPLAPTOP.IDXandTEPMOBILE.IDXfrom the LIBRARY folder if they are there. - Start Proteus, press P and search for NODEMCU.
The Board Package for the Arduino IDE
The demo has its HEX file, so you need the Arduino IDE only for your own sketches. Copy the folder Arduino Code\TEP Boards for Proteus\hardware into your sketchbook folder (normally Documents\Arduino), so that Documents\Arduino\hardware\tep\avr\boards.txt exists, and restart the IDE; the Arduino AVR Boards platform must be installed. Version 1.6.0 adds the NodeMCU V2 and replaces 1.5.0 (it still has the V3 and the ESP32 boards). Choose Tools > Board > TEP Boards for Proteus > NodeMCU ESP8266 V2 (TEP Proteus), write your sketch and use Sketch > Export Compiled Binary; double-click the board in Proteus and set its Program File to the HEX (see How to get the HEX file from Arduino).
Demo: A NodeMCU Cloud Logger
Open NodeMCU-V2-Cloud-Logger-with-Laptop-and-Mobile.pdsprj. In the middle is the NodeMCU V2 (U1) with a pot on A0, on the left our phone (MOB1) and on the right our laptop (PC1) - no wires to them, they are on the TEP-WiFi network. The package also has NodeMCU-ESP8266-V2-Board.pdsprj, the board alone with the same sketch.
RV1 (10k) sits between the 3.3 V and ground with its wiper on A0; the board's first 3V3 pin carries a 3V3 label to the pot's top. That is the whole circuit - the LEDs and the FLASH button the sketch uses are on the board:
The two tools come from our Laptop WiFi Monitor Library for Proteus and Mobile WiFi Monitor Library for Proteus. The laptop is 192.168.1.21; its UDP terminal listens on port 4210. The phone is 192.168.1.41 and its home page is http://logger.local/:
The Sketch: Settings and Pins
The sketch is written as for a real NodeMCU. It includes the ESP8266 libraries, WiFiUdp for the laptop and time.h for the clock:
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <time.h>
The cloud key, the laptop's address and port, the two LEDs, the FLASH button, the time zone and the upload interval:
const char *API_KEY = "NODEMCU-V2";
const char *LAPTOP_IP = "192.168.1.21"; // the Laptop WiFi Monitor PC1: its UDP terminal
const uint16_t LAPTOP_UDP = 4210;
const int LED_WIFI = LED_BUILTIN; // D4 = GPIO2, the ESP-12E's blue LED (lit when LOW)
const int LED_CLOUD = D0; // GPIO16, the board's blue LED (lit when LOW)
const int FLASH_PIN = D3; // GPIO0, the FLASH button
const long UTC_OFFSET = 5 * 3600L; // PKT; change it for your time zone
const unsigned long UPLOAD_EVERY = 20000;
Joining the router: while WiFi.status() is not WL_CONNECTED, the D4 LED toggles every 250 ms; when the board is on Wi-Fi, the pin goes LOW and the LED stays on:
while (WiFi.status() != WL_CONNECTED) { // the Wi-Fi LED blinks while the board joins
digitalWrite(LED_WIFI, !digitalRead(LED_WIFI));
delay(250);
Serial.print('.');
}
Then the clock and the names. configTime() asks an NTP server for the time - in Proteus our model answers - and the ESP8266 sketch reads it with time() and localtime(). MDNS.begin() gives the board the name logger.local:
configTime(UTC_OFFSET, 0, "pool.ntp.org");
if (MDNS.begin("logger")) Serial.println("mDNS: http://logger.local/");
server.on("/", handleRoot);
server.on("/upload", handleUpload);
server.begin();
Press Run and watch the monitor (115200 baud): the join, the address, the mDNS name, the plan and the first upload with its time:
NodeMCU Cloud Logger - The Engineering Projects
Connecting to TEP-WiFi.........
IP address: 192.168.1.101
mDNS: http://logger.local/
Logging A0 to api.example.com every 20 s; results to the laptop by UDP (192.168.1.21:4210)
Upload 1 at 09:31:27: A0 527 (1.65 V), entry 1
The Upload: an HTTP GET to the Cloud
Each upload is one HTTP request with ESP8266HTTPClient. The sketch lights the D0 LED, reads A0, builds the /update address with the key and two fields - the raw value and the volts - and sends it:
digitalWrite(LED_CLOUD, LOW); // the cloud LED on while the request runs
const int raw = analogRead(A0);
String url = String("http://api.example.com/update?api_key=") + API_KEY + "&field1=" + raw + "&field2=" + volts(raw);
WiFiClient client;
HTTPClient http;
http.begin(client, url);
const int code = http.GET();
String answer = code > 0 ? http.getString() : String();
http.end();
digitalWrite(LED_CLOUD, HIGH);
The cloud answers with the number of the entry it stored, or with 0 when the same key sent an update less than 15 seconds ago - the rule of the usual free cloud plans, which our internet host follows. The sketch turns the answer into a line:
String line = "Upload " + String(uploads) + " at " + clockText() + why + ": A0 " + raw + " (" + volts(raw) + " V), ";
if (code != 200) line += "HTTP error " + String(code);
else if (answer.toInt() > 0) { ++stored; line += "entry " + answer; }
else { ++refused; line += "refused - one update per 15 s"; }
report(line);
Every line goes to the monitor and, by UDP, to the laptop - one datagram per line:
void report(const String &line) {
Serial.println(line);
udp.beginPacket(LAPTOP_IP, LAPTOP_UDP);
udp.print(line);
udp.endPacket();
}
In the laptop, open Terminal > UDP; it listens on port 4210 and shows every datagram with the sender:
The loop starts an upload every 20 seconds; the first one waits 5 seconds after the start, by then NTP has answered:
if (millis() - lastUpload >= UPLOAD_EVERY) upload("");
lastUpload = millis() - UPLOAD_EVERY + 5000; // the first upload 5 s from now (NTP has answered by then)
The Logger Page on the Phone
The web server has two pages: / with the time, A0, the counts and the last 8 results, and /upload, which uploads first and then shows the same page. In the phone, open the Browser and press Go - its home page is http://logger.local/, which the board's mDNS answers:
The laptop's browser opens the same page at the board's address:
Tap UPLOAD NOW on the phone: the handler uploads, then sends the page with the new result on top:
void handleUpload() {
Serial.print("Page /upload for ");
Serial.println(server.client().remoteIP());
upload(" (page)");
sendPage();
}
The FLASH Button and the 15-Second Rule
This time the FLASH button is read in loop() rather than by an interrupt: a change that lasts longer than 30 ms counts, and a press starts an upload right away:
const bool down = digitalRead(FLASH_PIN) == LOW; // FLASH: an upload right now (debounced)
if (down != flashWas && millis() - flashChangedAt > 30) {
flashWas = down;
flashChangedAt = millis();
if (down) upload(" (FLASH)");
}
Click FLASH on the board. More than 15 seconds after the last upload the cloud stores it; click again a second later and the cloud refuses it:
Upload 1 at 09:31:27: A0 527 (1.65 V), entry 1
Upload 2 at 09:31:46: A0 527 (1.65 V), entry 2
Upload 3 at 09:31:55 (monitor): A0 527 (1.65 V), refused - one update per 15 s
Upload 4 at 09:32:04 (page): A0 527 (1.65 V), entry 3
Upload 5 at 09:32:21 (FLASH): A0 527 (1.65 V), entry 4
Upload 6 at 09:32:22 (FLASH): A0 527 (1.65 V), refused - one update per 15 s
Commands from the Monitor
The monitor takes three commands - UPLOAD, STATUS and HELP:
if (fromMonitor == "UPLOAD") upload(" (monitor)");
else if (fromMonitor == "STATUS") Serial.println(status());
else Serial.println("Commands: UPLOAD, STATUS, HELP");
STATUS
Time 09:31:54, A0 527 (1.65 V), 2 uploads: 2 stored, 0 refused, RSSI -45 dBm
UPLOAD
Upload 3 at 09:31:55 (monitor): A0 527 (1.65 V), refused - one update per 15 s
HELP
Commands: UPLOAD, STATUS, HELP
And the whole demo after the run:
The NodeMCU ESP8266 V2 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 and three cards: BOARD, WI-FI and TRAFFIC. OPEN NODEMCU PAGE opens the sketch's page on the panel's phone:
The phone's CLOUD tab lists every request the internet host got - each upload, stored or refused:
The Pins page shows the 14 GPIOs live and A0 with its voltage and reading. WI-FI SIGNAL on the phone can take the router away (OUT OF RANGE) to test what your sketch does without Wi-Fi - this one blinks D4 again and joins once the router is back:
if (WiFi.status() != WL_CONNECTED) {
Serial.println("Wi-Fi lost - joining again");
digitalWrite(LED_WIFI, HIGH);
joinWiFi();
}
Pins of the NodeMCU ESP8266 V2
| Pin | GPIO | What it does in the simulation |
|---|---|---|
| D0 | GPIO16 | the board's blue LED (lit when LOW); digital I/O only (no PWM, no interrupt) |
| D1, D2 | GPIO5, GPIO4 | Wire SCL, SDA; I/O, PWM, interrupt |
| D3 | GPIO0 | the FLASH button (LOW when pressed); I/O |
| D4 | GPIO2 | the ESP-12E's blue LED (lit when LOW), Serial1 TX; I/O |
| D5, D6, D7, D8 | GPIO14, 12, 13, 15 | SPI SCK, MISO, MOSI, SS; I/O, PWM, interrupt |
| RX, TX | GPIO3, GPIO1 | Serial (the micro-USB and the board's monitor) |
| SD2, SD3 | GPIO9, GPIO10 | I/O |
| A0 | ADC | 0 to 1023 for 0 to 3.2 V |
| 3V3, VIN, GND | 3.3 V out (all three 3V3 pins), 5 V, ground | |
| RST | reset (LOW holds the board in reset, as the RST button) | |
| EN, CLK, SD0, CMD, SD1, RSV | drawn, not modelled |
analogWrite works on every output pin but D0, with a range of 255 and 1 kHz by default. All pins are 3.3 V logic. For more on the pins of the real board, see ESP8266: Knowing the NodeMCU GPIOs.
Properties of the NodeMCU ESP8266 V2
| Property | What it does |
|---|---|
| PROGRAM | the sketch's HEX (Export Compiled Binary with the board NodeMCU ESP8266 V2 (TEP Proteus)) |
| WIFISSID / WIFIPASS | the router in range (TEP-WiFi / 12345678) |
| MONITOR | YES = the built-in serial monitor on TX / RX |
| BAUD | the monitor's speed (115200, or AUTO) |
| AUTOOPEN | YES = the monitor opens at Run (the demos: YES) |
| TIME | the clock NTP gives the sketch: PC, or a start time in UTC |
The IP address follows the part's number: U1 gets 192.168.1.101, U2 .102 and so on. The laptop is always 192.168.1.21 and the phone 192.168.1.41.
Troubleshooting
- Nothing happens at Run: the HEX was not built with our board package - choose NodeMCU ESP8266 V2 (TEP Proteus) and export it again.
- "ESP8266HTTPClient.h: No such file": another board is selected, or an older copy of the package is installed.
- "refused - one update per 15 s": the cloud stores one update per key every 15 seconds - wait, or use another key.
- The time shows --:--:--: NTP has not answered yet, or
configTime()was not called. - Nothing in the laptop's UDP terminal: its local port must be 4210 and LAPTOP_IP the laptop's address.
- The board stays on "Connecting to TEP-WiFi": the network name or password differs from WIFISSID / WIFIPASS, or the phone's WI-FI SIGNAL is OUT OF RANGE.
- A number goes wrong above 32767: an int is 16 bits on the hidden AVR - use long.
Things to Know Before Using a Real NodeMCU V2
- The boot pins: D3 (GPIO0) and D4 (GPIO2) must be HIGH and D8 (GPIO15) LOW when the board starts - do not pull them the wrong way with your circuit. The simulation does not check this.
- D0 is special: GPIO16 has no PWM and no interrupt, and it drives the board's LED; for deep sleep it must be wired to RST.
- A0: the ESP8266's own ADC takes 0 to 1 V; the NodeMCU's divider stretches that to about 3.2 V. A bare ESP-12E module (our ESP-12E Library for Proteus) has no divider.
- The cloud: put your service's address and key in the sketch; most free plans refuse updates closer than 15 seconds, as our internet host does. Real services use https - on the real ESP8266 that means BearSSL and more RAM.
- The USB driver: the V2 uses the CP2102 (Silicon Labs driver); the V3 uses the CH340G.
- The same sketch: choose "NodeMCU 1.0 (ESP-12E Module)" of the ESP8266 core and upload - nothing to change.
Limitations of the Simulation
- The board runs your sketch on a hidden ATmega2560 at 16 MHz with 8 KB of RAM - not on an ESP8266. Long strings and big buffers that fit in the ESP8266's 80 KB may not fit here.
- Not modelled: SPIFFS and LittleFS, OTA updates, the soft AP and Wi-Fi events, real TLS, deep sleep timing (the board restarts), the EN, flash and RSV pins, the radio itself - the join and network times are realistic values, not a radio simulation.
- The internet host is a stand-in for the internet: every internet name is 203.0.113.10, and it answers HTTP, pings and the time.
- The antenna colours, the red PWR LED, the PANEL pad, the panel, its phone, the router, the internet host and the two monitors are TEP additions; the MAC address is a TEP address.
- NodeMCU is a name of the NodeMCU project, Amica of its maker, ESP8266 and ESP-12E of Espressif Systems and Ai-Thinker, CP2102 of Silicon Labs; this library is not made or endorsed by them or by Labcenter.
- Tested in Proteus 8.5 in October 2026 (the demos as shipped, the NodeMCU, 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 NodeMCU ESP8266 V2 Library for Proteus. I hope it lets you try your ESP8266 sketches in Proteus - cloud uploads, NTP time, UDP messages, web pages and the board's two LEDs - before the real Amica is on your desk, and watch every request on the panel while you do. Its wider brother is in our NodeMCU ESP8266 V3 Library for Proteus V2.0. If you use the NodeMCU ESP8266 V2 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