No coding needed. Just load existing code onto the ESP32-S3.
Adrian Kingsley-Hughes/ZDNET
Key Technical Insights
- A low-cost microcontroller can effectively filter advertisements across an entire network.
- The system operates as a DNS-level ad blocker, preventing unwanted content from loading.
- Alternative implementations include Raspberry Pi solutions and dedicated hardware appliances.
Rising costs of Raspberry Pi boards have prompted exploration of more economical alternatives for various IoT projects. While Raspberry Pi devices offer robust performance, they often exceed requirements for simpler applications, making lower-cost options increasingly attractive.
This ad-blocking project emerged from bandwidth constraints rather than ad aversion. Initially reaching for a Raspberry Pi solution, cost considerations led to investigation of ESP32-based alternatives, which can be acquired for under $10.
ESP32-S3 (left) vs ESP32 (right).
Adrian Kingsley-Hughes/ZDNET
Technical Specifications: ESP32-S3 vs Raspberry Pi 5
Significant architectural differences exist between Raspberry Pi 5 and ESP32 platforms. The Pi 5 features a 2.4 GHz quad-core Arm Cortex-A76 64-bit processor with multiple gigabytes of RAM and expandable storage via microSD or NVMe SSD. In contrast, the ESP32-S3 utilizes a dual-core Tensilica Xtensa LX7 32-bit processor running up to 240 MHz, with 520 KB of RAM and up to 16MB flash storage.
Power consumption represents another major distinction: Raspberry Pi 5 can consume up to 12 watts, whereas ESP32 boards operate on milliwatt levels. These differences necessitate certain compromises when selecting the ESP32 platform for network applications.
Required Components
An ESP32-S3 board with 8MB PSRAM is essential for optimal performance (though 4MB versions exist with reduced capabilities). These boards typically cost around $7 individually or $20 for multipacks.
The compact form factor surprises new users, measuring roughly the size suitable for finger balancing. Required accessories include a USB-C cable for programming and power delivery; no additional storage media is necessary.
Software requirements encompass the ESP32_AdBlocker application and Arduino IDE development environment. Installation involves configuring Arduino IDE for ESP32 compatibility, loading the ad-blocking software, physically connecting the board, and uploading the program.
Important connectivity notes: the ESP32-S3 provides two USB ports, requiring selection of the COM or USB/Native port (typically right-side when viewing the board’s ports downward). Charge-only USB cables frequently cause connection issues, and Arduino IDE compilation settings may require adjustment.
Configuration Process
Initial board startup activates Wi-Fi access point mode using an auto-generated network identifier beginning with “ESP32_Adblocker_XXXXXXXXXXXX.” Connecting to this network enables basic configuration.
Navigate to IP address 192.168.4.1 to input local network credentials. Following reboot, specify preferred blocklist sources from available repositories. Device-level configuration requires pointing DNS settings to the ESP32 board’s address.
We’re in. ESP32_Adblocker successfully installed.
Screenshot by Adrian Kingsley-Hughes/ZDNET
Operational Mechanism
Network navigation triggers Domain Name System (DNS) lookups to resolve web addresses. Browsers query DNS servers to locate webpage components including images, videos, and advertisements across potentially distributed servers worldwide.
This ESP32 implementation functions as a DNS sinkhole by intercepting lookup requests before forwarding them to upstream DNS servers. The ad-blocking software maintains databases of millions of advertising domain addresses.
When queried addresses match known advertising domains, the system responds with 0.0.0.0 address information, effectively preventing ad content delivery while preserving bandwidth for legitimate traffic. Non-advertising requests pass through normally to standard DNS resolution services.
Limitations include ineffectiveness against YouTube advertisements (served from identical addresses as video content) and incompatibility with IPv6 addressing schemes.
The ESP32-S3 in action, filtering ads.
Adrian Kingsley-Hughes/ZDNET
Alternative Implementation Options
For temporary bandwidth-constrained scenarios, this ESP32 solution proves adequate and educational. Long-term deployment might favor Raspberry Pi Zero 2 W running PiHole, though costs increase to approximately $15 plus storage requirements.
Additional alternatives include standalone Pi-hole installations, virtual machine implementations, or commercial appliances with integrated ad-blocking capabilities. Selection depends on performance requirements and implementation preferences.


