These days, most of us take the instant availability of a high-speed link to the Internet for granted. But despite all of the latest technology, things still occasionally go pear-shaped — meaning that blistering fiber optic connection you’ve got to the world’s collected knowledge (not to mention, memes) can still go down when you need it the most.
After suffering some connectivity issues, [Arnov Sharma] decided to put together a little box that could alert everyone in visual range to the status of the local router. It won’t fix the problem, of course, but there’s a certain value to getting timely status updates. Using a 3D printed enclosure and a couple of custom PCBs, the build is fairly comprehensive, and could certainly be pressed into more advanced usage if given the appropriate firmware. If you’ve been thinking of a Internet-connected status indicator, this is certainly a project worth copying studying closely.
The aptly named “Wi-Fi Status Box” uses two PCBs: one to hold the Seeed Studio XIAO ESP32C3 microcontroller and four WS2812B addressable LEDs, and another that plays host to the IP5306 power management IC.
That latter board in particular is something you may want to file away for a future project, as it not only handles charging lithium-ion batteries such as common 18650 cells, but it also features an LED “fuel gauge” and the ability to boost the output power to 5 VDC with relatively few external components.
As for the firmware on this one, it’s simplicity itself. The goal is to see if the router has gone down, so all the code does is check every ten seconds to see if the ESP32 is still able to connect to the given wireless network. If the connection is good the LEDs are green, but if the link fails, they flip over to red. Combined with a printed front panel that uses transparent filament to soften the glow of the LEDs, and you’ve got an attractive way of knowing when it’s time to panic.
Too obvious for you? Perhaps you’d prefer this version that uses an analog multimeter to display when the net drops out.
The firmware seems TOO simple for the hardware its given. Some rudimentary speed test etc would make it more functional I think.
I was dealing with a particularly unreliable ISP a few years ago at my parent’s house, so I wrote something similar.
It was a simple firmware for ESP8266 nodemcu board which pinged google, youtube and a bunch of other popular websites, and checked the time it took for the ping to return (pong) and adjusted the blinking frequency of the onboard LED accordingly.
I could easily look at this board hanging in a corner of the room and know how my internet was doing at a glance. Of course it wasn’t proper performance metrics or anything but it worked out well for my family.
I don’t really like the code either although it’s tough to find and read on hackaday.io
WiFi.status()
actually returns some useful flags and why not match a colour to each flag as a starter?https://docs.arduino.cc/language-reference/en/functions/wifi/wificlass/#wifistatus
It’d be very naughty but you can just assume the WL_* flags are continuous values 0 to whatever and make an array of status_colours to index.
… or be boring and make map function using a switch case.
I checked the definition https://github.com/arduino-libraries/WiFi/blob/master/src/utility/wl_definitions.h
typedef enum {
WL_NO_SHIELD = 255,
WL_IDLE_STATUS = 0,
WL_NO_SSID_AVAIL,
WL_SCAN_COMPLETED,
WL_CONNECTED,
WL_CONNECT_FAILED,
WL_CONNECTION_LOST,
WL_DISCONNECTED
} wl_status_t;
switch case it is.
This is one reason there are so many memory safety bugs in c code.
I did say it was very naughty. But you could fix it with
status_colour[static_cast<int8_t>(status) + 1]
?definitely needs the esp32, just an esp8266 wouldn’t be enough.
(in some universe different from this one)
definitely needs the esp32, just an esp8266 wouldn’t be enough.
(in some universe different from this one)
Why do you think an esp8266 wouldn’t be able to do the job?
It can make WiFi connections to the local router/modem and can ping a variety of IP addresses. It can also check that DNS resolution is working. As suggested elsewhere, it can also both ping and connect to local services as required. For status display, an ESP8266 is capable of accessing more WS2812 style LEDs than you are ever likely to need.
I have my roommates to do same indication
I build a WiFi status box some ten years ago, using a ESP8266 and and a WS2812 LED.
It wouldn’t just check the status of the WiFi network, but it would also check that the connection to the internet was valid by attempting connections to the local network as well to a couple of internet servers.
It worked pretty well, and aided me debug for the source of the issue if there was any, just by glancing colour of the LED.
Now my internet connection is very reliable, so I don’t use it anymore, but it might come back out of the drawer to monitor the state of my home servers.
I’ve had something like this in my living room for 15 years. My wife loves it. Mine is a glowing ball that “breathes” green when the internet connection is OK and red when not.
You need to check if you can connect to a website as the providers infrastructure can go down, like DNS etc.
They must have a Linksys router…
I have this weird problem where my network sometimes stops at about the same time in the evening (I know because I’m usually streaming something at that time) so I built a breadboard with an ESP8266 and setup three LEDs
Red means it can’t reach 8.8.8.8, yellow means it can’t reach 192.168.0.1 and green means it reaches both.
the network doesn’t even waver when the movie stops. Yet at the media server I can’t ping either. I’m running IP over power line, but the status lights on those show activity.
It’s still a mystery but at least I am able to eliminate connectivity as the issue.
Anyway, the point was that an 8266, 3 led’s, 3 resistors and about 10 minutes you’ve got yourself a pretty good reporting mechanism
But the project is cool too.
You need to find out what other device (yours or your neighbors) kicks in at that time. SIbce its over the power line you’ve probably hit noise that’s messing with the quality of the connection.
You could step up the testing as well and try sending/download a file to dropbox or something and timing the results.
Might be a neighbour’s microwave? Since he mentioned both ESP8266 and IP-over-power I’m not sure.
So… can we do this with a 555?
I would want a little more out of a box like this…1) can I reach the router, 2) can I reach my service provider, 3) does DNS work, 4) can I get a response from google.
STUPID implementation of a good idea. Green LED for good connection. What part of the connection? How about a reasonable matrix of LEDs that reflect the quality of direct connections to multiple preferred/favorite websites? Red, yellow and green LEDs for the connection quality of your local (home/building/site) WIFI router/access point connections? The same setup to monitor the connection quality from your local WIFI to the Internet (your ISP?). A PINK LED for DNS issues. Then, there are all the user devices with old WIFI software (drivers) or using WIFI 4 or older technology? How much will a WIFI monitor help you if only one person’s one wireless device is having problems? Currently, du jour and de facto network performance tests are available on ALL device and server software (OpenSpeedTest, Ookla SpeedTest.net, iPerf3) for FREE! You can install the device app and server software, if needed, and measure the quality of the IP network service from your specific wired (ethernet + IP) or WIFI device at any time. Gadgets like this one are an incomplete and half-assed gimmick. Spend your money on top level WIFI router/access point products and wireless user devices that have up-to-date WIFI technology (WIFI 5 or newer). Buen Provecho!