
Arduino WiFi Shield Library for Proteus: HDG204 and SD Card

Hello friends, I hope you all are doing great. Today, I am going to share the Arduino WiFi Shield Library for Proteus. The Arduino WiFi Shield is the original Wi-Fi shield of Arduino: an HDG204 802.11 b/g module and an AT32UC3 processor that runs the shield's own firmware and TCP / IP stack, talking SPI to the Arduino through the WiFi library, with a micro SD socket on the same bus. Arduino has retired it, but the WiFi library and its examples are still in the Arduino IDE, and many projects and books were built on it. With this library you can place the shield in Proteus, stack your UNO beside it and run those sketches as they are.
Arduino WiFi Shield 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 ESP32 and sends it commands
- Serial Monitor Advance: a serial terminal window for the UART of your board
This is the eighteenth library of our Wi-Fi series. Its demo puts the shield's two halves together: the UNO serves the files of the micro SD card as web pages - the list of files, any file opened by a click, and a log file the sketch adds a reading to every ten seconds - and our Laptop WiFi Monitor and Mobile WiFi Monitor browse them.
NOTICE: the antenna colours, the PANEL pad and the panel are TEP additions; the mini-USB socket, the firmware updates, WEP and the FTDI header are not simulated (see the limits at the end). The shield works with the Arduino WiFi library, not with WiFi101 or WiFiNINA. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the Arduino WiFi Shield board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the Arduino WiFi Shield Library for Proteus:
What is the Arduino WiFi Shield?
The Arduino WiFi Shield connects an Arduino to a Wi-Fi network. The radio is the HDG204, an 802.11 b/g module; next to it an AT32UC3A1256 (a 32-bit AVR) runs the shield's firmware with its TCP / IP stack. The Arduino only sends commands over SPI - join this network, open a server, send these bytes - so even an UNO can serve web pages. The shield joins open, WEP and WPA2 Personal networks, keeps up to four sockets and has a micro SD socket for the SD library. Its last firmware is 1.1.0; the mini-USB socket is for updating it.
| Real Arduino WiFi Shield | This library in Proteus | |
|---|---|---|
| Wi-Fi | HDG204 802.11 b/g module | our model of the shield firmware (1.1.0, a property) |
| Processor | AT32UC3A1256 with the shield firmware | drawn; its firmware is the model |
| Link | SPI from the ICSP header, CS D10, handshake D7 | the same pins (SCK, MISO, MOSI on the right edge) |
| Arduino library | WiFi (Arduino) | the same library, unchanged (1.2.7 in the demo) |
| Sockets | four (TCP client, server, UDP) | four, a server socket carries its connection |
| Micro SD | socket on CS D4, SD library | the same, with our 64 MB card model |
| LEDs | L9, LINK, ERROR, DATA | the same four, the same colours |
| Mini-USB, FTDI | firmware updates, debugging | drawn only |
The Pins the Shield Uses
The shield takes SPI from the ICSP header (D11, D12, D13 on an UNO; D51, D50, D52 on a Mega), D10 as the chip select of the Wi-Fi part, D4 as the chip select of the micro SD card and D7 as the handshake line: the shield pulls D7 LOW when it is ready for the next command. Do not use D7 for anything else. The WiFi library also makes D9 an output - it drives the yellow L9 LED, free for your sketch.
One Command, One Transaction
Every WiFi call becomes one SPI transaction: the library waits for D7 LOW, selects the shield, sends the command, waits for D7 LOW again while the shield works on it, then clocks the answer out and lets go. Our model does exactly this, so the WiFi library from the Arduino IDE runs unchanged. The same handshake means the shield needs no interrupt at all - it works on the UNO in Proteus.
Features of the Arduino WiFi Shield Library for Proteus
- The shield as it looks: the Arduino shield outline with its stacking headers and labels, the HDG204 module and its chip antenna, the AT32UC3 and its crystal, the four LEDs, the micro SD socket with a card, the mini-USB socket, the FTDI header and the ICSP socket.
- The real WiFi library: our model answers the shield firmware's commands exactly as the library expects - we ran the WiFi library 1.2.7 and the demo sketch unchanged against the model on the PC (19 checks) and in Proteus.
- The D7 handshake with one transaction per command, as the library waits for it.
- Wi-Fi and sockets: join, status, IP, RSSI, scan and DNS; four sockets for WiFiServer, WiFiClient and WiFiUDP, a server socket carrying its current connection as on the real shield.
- The four LEDs: L9 follows D9, LINK is on while the shield is joined, ERROR lights on a communication error and DATA flickers with the traffic.
- The micro SD socket with our 64 MB card model - the SD library reads and writes it; click the socket to take the card out.
- Wi-Fi in Proteus: a virtual router with DHCP, a phone in the panel, 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 shield card, an SPI page with every WiFi library command and the shield's answers, the sockets and the micro SD card, a Test page, Settings and Help.
- A compact package: about 2.81 MB, without the C++ source code of the models.
The Arduino WiFi Shield in Proteus
Search WIFI SHIELD or HDG204 in Pick Devices; the device ARDUINO WIFI SHIELD HDG204 is in TEPWIFISHIELD.LIB. Its pins sit on the header positions the real shield uses. Click the PANEL pad or the HDG204 module to open the panel.
Every State of the Arduino WiFi Shield
We ran the demo and paused the simulation for each picture. At Run the shield's firmware starts; the UNO first opens the card, then asks for the firmware version and calls WiFi.begin():
Download Arduino WiFi Shield Library for Proteus
Click the button below to download Arduino-WiFi-Shield-Library-for-Proteus-v1.0.zip (about 2.81 MB, without the C++ source code of the models):
Arduino WiFi Shield Library for Proteus V1.0- README.txt: the device, installation, the demo, the pins, the properties, troubleshooting and the limits.
- Proteus Library Files:
TEPWIFISHIELD.LIB(the shield),ArduinoV4TEP.LIB(our Arduino boards V4.0 - the UNO of the demo),TEPLAPTOP.LIBandTEPMOBILE.LIB(our Laptop and Mobile WiFi Monitors). - Proteus Model Files:
TEPNET.DLL(the shield, its micro SD card, the two monitors and the Wi-Fi network) andTEPARDUINO.DLL(the Arduino boards). - Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
- Arduino Code: the demo sketch. The WiFi and SD libraries are not included - install them in the Arduino IDE.
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 Arduino WiFi Shield Library for Proteus
- Close Proteus and extract the whole zip file, for example to your Desktop.
- 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). - Copy
TEPNET.DLLandTEPARDUINO.DLLfrom Proteus Model Files into the MODELS folder - replace older copies (this TEPNET.DLL is the first one that knows the original WiFi shield, and it still runs the AirLift boards, the WiFi Shield 101, the ATWINC1500 breakout, all our ESP32 boards, the ESP8266 and ESP32 modules and the two monitors). - Delete
TEPWIFISHIELD.IDX,ArduinoV4TEP.IDX,TEPLAPTOP.IDXandTEPMOBILE.IDXfrom the LIBRARY folder if they are there. - Start Proteus, press P and search for WIFI SHIELD.
The sketch is a normal UNO sketch: install the WiFi library by Arduino in the Library Manager (older IDEs have it built in), 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: The Micro SD Card on the Web
Open WiFi-Shield-SD-Server-with-Laptop-and-Mobile.pdsprj. On the left is our UNO V4.0 (ARD1, from our Arduino UNO Library for Proteus V4.0) with its built-in serial monitor and a pot on A0, in the middle the WiFi shield (U1), and on the right the laptop (PC1) and the phone (MOB1) - no wires to them, they are on the TEP-WiFi network like the real ones.
In Proteus we place the shield beside the UNO, so net labels do the stacking. SCK, MISO and MOSI come from the UNO's D13, D12 and D11 to the shield's right edge (its ICSP side); WIFI_CS (D10), L9 (D9), WIFI_RDY (D7) and SD_CS (D4) go to the pins of the same names. 5V goes to VCC. RV1 (10k, at 35 %) on A0 gives the value the log records:
The two tools come from our Laptop WiFi Monitor Library for Proteus and Mobile WiFi Monitor Library for Proteus. In this project their browsers open http://192.168.1.101/, the shield's address. The laptop is 192.168.1.21 and the phone 192.168.1.41:
The Sketch: SD and WiFi on One Bus
The sketch includes both libraries and names the shield's pins. The WiFi library's begin() takes a char*, so the network name and password are char arrays:
#include <SPI.h>
#include <WiFi.h>
#include <SD.h>
char ssid[] = "TEP-WiFi"; // (the WiFi library's begin() takes char*)
char pass[] = "12345678";
const int SD_CS = 4, WIFI_CS = 10, L9 = 9;
WiFiServer server(80);
The card starts first, with D10 HIGH so the Wi-Fi part stays off the bus; WL_NO_SHIELD means the shield did not answer. WiFi.begin() waits five seconds before it asks the shield for the result - a real shield needs that time too:
digitalWrite(WIFI_CS, HIGH); // the Wi-Fi chip off the bus while the card starts
if (!SD.begin(SD_CS)) Serial.println(F("SD: no card in the shield's socket (CS D4)"));
else { Serial.println(F("SD: card ready, files:")); listCard(); }
if (WiFi.status() == WL_NO_SHIELD) {
Serial.println(F("No WiFi shield found - check CS D10, D7 and the SPI pins"));
while (true) delay(1000);
}
while (WiFi.begin(ssid, pass) != WL_CONNECTED) Serial.print('.');
server.begin();
Press Run and watch the UNO's monitor: the card's files, the firmware version, the join, the address:
WiFi Shield SD Server - The Engineering Projects
SD: card ready, files:
README.TXT 372 bytes
HELLO.TXT 31 bytes
DATA.CSV 344 bytes
CONFIG.INI 69 bytes
BIG.TXT 4380 bytes
LOGS/
IMAGES/
WiFi shield firmware 1.1.0
Joining TEP-WiFi... connected
IP 192.168.1.101, RSSI -46 dBm
Card on the web: http://192.168.1.101/
The Card in the Laptop's Browser
server.available() gives the sketch the visitor; it reads the request line - GET /f/DATA.CSV HTTP/1.1 - and answers. On the shield the server's own socket carries the connection, so the sketch serves one visitor at a time and stops the client after each page:
WiFiClient client = server.available();
if (client) servePage(client);
char* path = req + 4; // "GET /f/DATA.CSV HTTP/1.1"
char* end = strchr(path, ' ');
if (end) *end = 0;
pages++;
The home page lists the root of the card with the SD library: openNextFile() walks the folder, and every file becomes a link with its size:
if (!f.isDirectory()) {
snprintf(buf, sizeof buf, "<p><a href=\"/f/%s\">%s (%lu bytes)</a></p>\r\n", f.name(), f.name(), (unsigned long)f.size());
c.print(buf);
}
In the laptop, open the Browser and press Go:
A click on a file opens /f/NAME. The sketch sends the file line by line, each line one paragraph, in pieces of up to 64 bytes - a print(F(...)) on a WiFiClient would send each byte as its own command:
while (f.available() && lines < 24) { // one line = one paragraph, sent in 64-byte pieces
uint8_t n = 3;
strcpy(buf, "<p>");
while (f.available()) {
const char ch = f.read();
if (ch == '\n') break;
if (ch == '\r') continue;
buf[n++] = (ch == '<' || ch == '>') ? ' ' : ch;
if (n == sizeof buf) { c.write((const uint8_t*)buf, n); n = 0; }
}
if (n > sizeof buf - 6) { c.write((const uint8_t*)buf, n); n = 0; }
memcpy(buf + n, "</p>\r\n", 6);
c.write((const uint8_t*)buf, n + 6);
lines++;
}
Every page also toggles the shield's yellow L9 LED - D9 is ours to use:
l9 = !l9; digitalWrite(L9, l9 ? HIGH : LOW); // the shield's L9 LED: a page
The Phone
The phone's browser opens the same address; its links are buttons:
Page: /
Page: /f/DATA.CSV
Page: /
Page: /f/BIG.TXT
Page: /
LOG.TXT: Writing the Card
Every ten seconds the sketch adds a line to LOG.TXT - FILE_WRITE opens it at the end, and the file appears in the list after the first reading:
File f = SD.open("LOG.TXT", FILE_WRITE);
if (!f) { Serial.println(F("SD: could not open LOG.TXT")); return; }
f.print(F("t=")); f.print(millis() / 1000); f.print(F(" s, pot ")); f.println(pot);
f.close();
CLEAR LOG opens /clear, which deletes the file with SD.remove(). The monitor takes commands too: /dir lists the card, /log prints LOG.TXT, /status and /help:
DATA.CSV 344 bytes
CONFIG.INI 69 bytes
BIG.TXT 4380 bytes
LOGS/
IMAGES/
LOG.TXT 34 bytes
/log
t=15 s, pot 358
t=25 s, pot 358
/status
IP 192.168.1.101, RSSI -45 dBm, 2 readings, 7 pages
/help
Monitor: /dir, /log, /status, /help
And the whole demo running:
The Arduino WiFi Shield 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 SHIELD card with the chips and firmware, the MAC address, the host link with its command rate and the four LEDs, the WI-FI card and the TRAFFIC card:
OPEN SHIELD PAGE asks the shield for the page the UNO serves; the ROUTER tab lists the DHCP clients:
The SPI page lists the WiFi library's commands and the shield's answers, newest first. The library asks for the status of its sockets all the time; those polls are counted, not listed. The RDY (D7) row shows the handshake, the sockets card the server socket, and the micro SD card has its own card:
Why so many commands? In the WiFi library every client.read() is one GET_DATA_TCP command and every available() or connected() is a status command, so a request of 114 bytes takes 114 reads plus the polls between them - about 4,400 commands a second while the sketch waits for a visitor. The real shield works the same way; that is why the sketch writes its pages in 64-byte pieces and keeps its request buffer small.
OUT OF RANGE on the phone takes the router away; WiFi.status() stops saying WL_CONNECTED, so the sketch joins again. The server keeps its socket, so there is no second server.begin():
if (WiFi.status() != WL_CONNECTED) { // lost the router: join again
Serial.println(F("Wi-Fi lost - joining again"));
while (WiFi.begin(ssid, pass) != WL_CONNECTED) {}
Serial.println(F("Back on Wi-Fi")); // (the server keeps its socket: no second server.begin())
}
The Test page measures the running model: the phone opens the page several times, and the router goes out of range for 3 seconds to time the re-join:
Page: /
SD: logged t=35 s, pot 358
Page: /
Page: /
Page: /
Wi-Fi lost - joining again
Back on Wi-Fi
SD: logged t=56 s, pot 358
Wi-Fi lost - joining again
Pins of the Arduino WiFi Shield
| Pin | Arduino pin | What it does |
|---|---|---|
| CS | D10 | the Wi-Fi chip select (LOW = selected) |
| L9 | D9 | the yellow L9 LED (HIGH = on) |
| RDY | D7 | the handshake, the shield's output: LOW = ready for the next command |
| SD CS | D4 | the micro SD card's chip select |
| SCK, MISO, MOSI | ICSP (D13, D12, D11 on an UNO) | SPI; MISO is the shield's or the card's while its CS is LOW |
| 5V, GND | 5V, GND | power |
Properties of the Arduino WiFi Shield
| Property | What it does |
|---|---|
| WIFISSID / WIFIPASS | the router in range (TEP-WiFi / 12345678) |
| FIRMWARE | the version WiFi.firmwareVersion() reports (1.1.0) |
| SDCARD | the micro SD card at Run: DEMO, EMPTY, RAW or NONE |
| PANEL | the phone's tab at start (BROWSER, ROUTER, CLOUD) |
| PAGEPORT | the port OPEN SHIELD PAGE opens (80) |
| CLOCK | the clock of the panel: PC or a 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 WiFi shield found" or the sketch stops at the first WiFi call: check SCK, MISO, MOSI, CS (D10), D7 and 5V / GND - the library waits for D7 LOW before every command.
- The card is not found: SD CS on D4, and D10 HIGH while
SD.begin()runs. - WiFi.begin() takes five seconds or more: the library waits five seconds before it asks the shield - normal.
- A second visitor waits: the server socket serves one connection at a time -
stop()the client after each page. - A paused simulation shows the log: the AVR model notes "Clock frequency changed while in the Master mode" when the SD library changes the SPI speed - harmless; click the Schematic Capture tab.
- No panel: click the PANEL pad or the HDG204 module, or turn "Open the panel at Run" back on in Settings.
Things to Know Before Using a Real Arduino WiFi Shield
- A retired board: Arduino no longer makes it; the newer boards in our series are the AirLift WiFi Shield Library for Proteus (WiFiNINA) and the WiFi Shield 101 Library for Proteus (WiFi101). The original shield needs the WiFi library, not those two.
- The firmware: the WiFi library's examples check for firmware 1.1.0 and print "Please upgrade the firmware" otherwise; the update goes in through the mini-USB socket.
- The pins: D7 is the handshake - leave it alone; D10 and D4 are the two chip selects; on a Mega keep D53 an output, as the SPI library needs.
- The networks: open, WEP and WPA2 Personal, 2.4 GHz only; no WPA2-Enterprise.
- The card: the SD and Wi-Fi parts share SPI - only one chip select LOW at a time, as the two libraries do on their own. Our Micro SD Card Module Library for Proteus shows the card on its own module.
Limitations of the Simulation
- The shield runs our model of its firmware as the WiFi library (1.2.x) uses it - not the real firmware.
- Not modelled: the mini-USB socket and the firmware updates, the FTDI header, the J3 jumper, WEP (joined as WPA2), the HDG204's power modes, the supply's voltage and current, 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 PANEL pad, the panel, its phone, the router, the two neighbour networks, the internet host and the two monitors are TEP additions; the MAC address is a locally administered TEP address.
- Arduino is a name of Arduino, HDG204 of H&D Wireless and AT32UC3 of Microchip Technology; this library is not made or endorsed by Arduino, H&D Wireless, Microchip or Labcenter.
- Tested in Proteus 8.5 in October 2026 (the demo as shipped, the UNO, the shield, the card, the laptop and the phone together at 0.2 to 0.4 x real time on our PC). Proteus 7 is not supported.
So, that was all about the Arduino WiFi Shield Library for Proteus. I hope it helps you run the classic WiFi library sketches in Proteus - web servers, clients and the micro SD card together - and watch every command to the shield on the panel while you do. The newer shields are in our AirLift WiFi Shield Library for Proteus and WiFi Shield 101 Library for Proteus, and the Laptop and Mobile WiFi Monitors talk to every one of our Wi-Fi boards and modules. If you use the Arduino WiFi Shield 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