Wi-Fi Status Box

by Arnov Sharma in Circuits > Microcontrollers

570 Views, 9 Favorites, 0 Comments

Wi-Fi Status Box

29.gif
28.gif
thumb.jpg

Greeting everyone and welcome back, Here's something interesting and useful: The Wi-Fi Status Box is a do-it-yourself Internet status indicator that monitors whether the internet has been disconnected by linking to a nearby network.

My network has been experiencing some stability issues, which infuriated me enough to construct an Internet indicator to monitor my router. The objective was to create a Wi-Fi indicator that indicates whether the internet is connected or unavailable.

The XIAO ESP32 C3 microcontroller board, together with two custom PCBs, is the focal point of this project. One PCB is a breakout for XIAO that is connected to four WS2812B LEDs, and the other PCB is a power board, which has a power management IC for using a 3.7V lithium cell as a power source.

This Instructables is a brief build guide about how this project was prepared, so let's get started.

Supplies

These were the materials used in this project.

  1. Custom PCBs (Provided by HQ NEXTPCB)
  2. XIAO ESP32 C3
  3. 3D Printed Enclosure and Lid
  4. Female Header Pin CON7
  5. IP5306 IC
  6. 1uH Inductor SMD
  7. 1206 Capacitor 10uF
  8. Vertical Push Switch
  9. Type C port
  10. Indicator LED 0805
  11. 10K Resistor
  12. 3 Ohms 1206 Resistor
  13. M2.5 Screws
  14. 3.7V 2000mAh Li-ion Cell

3D DESIGN

07.PNG
16.gif
08.PNG
09.PNG

We started by creating the 3D model, which included a small box enclosure with a lid attached to the top side of the enclosure. To secure it to the main body, we inserted four holes into the lid.

We modeled two PCBs inside the enclosure: the power board and the one that will hold the SMD RGB LED and XIAO microcontroller. Additionally, we created a model of the lithium cell that will serve as this project's power source.

Additionally, we designed the ribs that would hold the lithium cell in place and created screw bosses for mounting the power board and the XIAO LED Board.

Our goal was to create two key slots on the bottom side of the enclosure so that it could be mounted on a wall using two nails.

Once the model was complete, we used an Orange PLA 0.4mm nozzle and a 0.2mm layer height to 3D print the enclosure body.

We used two different filament colors to print the enclosure's lid: transparent PLA for the base and black PLA for the Wi-Fi graphics.

CIRCUIT DESIGN

MAINBOARD_page-0001.jpg
POWERBOARD_page-0001.jpg
main.PNG
power.PNG
01.PNG
04.PNG
02.PNG
03.PNG

We developed two separate boards for this project: one for the XIAO and WS2812B RGB LEDs, and another for the IP5306 power management IC, which will be used to properly charge and discharge lithium cells and even provide battery indications.

First, let us look at the XIAO RGB Breakout Board. In order to create its schematic, we added the XIAO footprint to the schematic manager together with the WS2812B LED footprint and the decoupling capacitor footprint.

We connected the WS2812B LEDs in their standard configuration, which involves connecting the GND and VCC of each LED in parallel. The first LED's din will be linked to XIAO's GPIO0. The Dout of the first LED will be connected to the Din of the second, the Dout of the second to the Din of the third, and the Dout of the third to the Din of the fourth LED.

After the setup had been completed, we converted the schematic into a board file and made the PCB. We used the Cad file's outline to create the board outline and arrange the components and holes.

We then created the power board's schematic, which was centered around the IP5306 Power Management IC that provides a steady 5V/2A of power from a 3.7V lithium battery.

After creating the basic layout according to the datasheet, we used a Cad file to add components such as the Type C port, right-angle switch, and LEDs after converting the schematic into a board file.

After finalizing both boards, we exported their gerber data and shared it with HQ NextPCB for samples.

HQ NextPCB Service

01.gif
IMG_20241102_135831.jpg

For this project, we chose a green solder mask with white silkscreen for both PCBs.

After placing the order, the PCBs were received within a week, and the PCB quality was pretty great.

In addition, I have to bring in HQDFM to you, which helped me a lot through many projects. Huaqiao's in-house engineers developed the free Design for Manufacturing software, HQDFM, revolutionizing how PCB designers visualize and verify their designs.

HQDFM: Free Online Gerber Viewer and DFM Analysis Tool

05.PNG
06.PNG

Also, NextPCB has its own Gerber Viewer and DFM analysis software.

Your designs are improved by their HQDFM software (DFM) services. Since I find it annoying to have to wait around for DFM reports from manufacturers, HQDFM is the most efficient method for performing a pre-event self-check.

Here is what online Gerber Viewer shows me. Would not be more clear. However, for full function, like DFM analysis for PCBA, you need to download the software. The online version only provides a simple PCB DFM report.

With comprehensive Design for Manufacture (DFM) analysis features, HQDFM is a free, sophisticated online PCB Gerber file viewer.

It provides insights into advanced manufacturing by utilizing over 15 years of industry expertise. You guys can check out HQ NextPCB if you want great PCB service at an affordable rate.

PCB ASSEMBLY PROCESS—Power Board

07.gif
08.gif
09.gif
10.gif
  1. Using a solder paste dispensing needle, we apply solder paste to each component pad after assembling the power board to begin the PCB assembly process. In this case, we are using 63/37 SnPb solder paste.
  2. The pick-and-place process comes next, in which each component is placed in its allotted location.
  3. The circuit is then placed on our MHP50 Reflow hotplate, which melts solder paste by heating the surface from below. This causes the components to be soldered to their pads.
  4. After adding each THT component to the PCB, we use a soldering iron to solder the pads from the bottom of the board.

Power Board Battery Assembly and Testing

11.gif
12.gif
13.gif
14.gif

Once the power board was ready, we connected the positive and negative terminals of a lithium cell to the battery terminals on the power board.

The system activates with a single tap, and the power board's output terminals show a steady 5V.

On double tap, the system turns OFF.

It is easier and faster to solder wires to a nickel strip which does not heat the cell terminals, avoiding damage to the battery. For this reason, I have used a cell that has a tiny nickel strip TIG welded onto its terminals rather than soldering wires directly onto the cell's terminals.

Never attach wires straight to the cell's terminal; this will shorten the cell's lifespan, drastically lower its capacity, and frequently raise the risk of a battery explosion.

PCB ASSEMBLY PROCESS-LED Board

02.gif
03.gif
04.gif
05.gif
06.gif
  1. The LED Board Assembly process then begins, with solder paste applied to each pad of the SMD components.
  2. Next, we pick and place WS2812B LEDs and capacitors in their correct spots.
  3. Following that, the entire circuit is put on the reflow hotplate, which heats the PCB to melt the solder paste and reattach the components.
  4. Next, we place two CON7 female header pins in their place and solder them from the bottom side of the PCB.

CODE

15.gif

We added the XIAO ESP32 C3 in its place on the LED Board and uploaded the below sketch into it.

This sketch continuously monitors the Wi-Fi connection status and updates a strip of NeoPixel LEDs to indicate whether the device is connected or not using green and red colors, respectively.

Install the Adafruit_NeoPixel Library before using this sketch.

#include <WiFi.h>
#include <Adafruit_NeoPixel.h>
#define LED_PIN D0 // GPIO pin connected to the LEDs
#define NUM_LEDS 4 // Number of WS2812B LEDs
#define WIFI_SSID "Ur SSID" // Replace with your WiFi SSID
#define WIFI_PASSWORD "Ur PASS" // Replace with your WiFi Password
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
strip.begin();
strip.show(); // Initialize all pixels to 'off'
// Connect to Wi-Fi
Serial.print("Connecting to WiFi...");
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
int attempts = 0;
while (WiFi.status() != WL_CONNECTED && attempts < 20) {
delay(500);
Serial.print(".");
attempts++;
}
if (WiFi.status() == WL_CONNECTED) {
Serial.println("Connected to WiFi");
} else {
Serial.println("Failed to connect to WiFi");
}
}
void loop() {
if (WiFi.status() == WL_CONNECTED) {
setLEDColor(strip.Color(0, 255, 0)); // Green
} else {
setLEDColor(strip.Color(255, 0, 0)); // Red
}
delay(10000); // Check the connection every 10 seconds
}
void setLEDColor(uint32_t color) {
for (int i = 0; i < NUM_LEDS; i++) {
strip.setPixelColor(i, color);
}
strip.show();
}

LED Board Placement

17.gif
18.gif
19.gif
20.gif
  1. The LED Board is initially placed inside the Main Housing to start the assembly, but first the tape from the XIAO ESP32 C3's antenna is taken off, and the antenna sticker is placed inside the housing.
  2. After that, we position the LED board in its designated spot and mount it to the body with two M2.5 screws.

Power Board Placement

21.gif
22.gif
23.gif
  1. After placing the lithium cell in place, we apply hot glue inside the battery part of the enclosure.
  2. After that, we install the power board inside the enclosure and fasten it using two M2.5 screws.

WIRING

24.gif
25.gif

To begin the wiring process, we attach a wire between the LED board's VCC and the power board's 5V connector. This connects the power board's 5V output to the LED board's input.

GND is connected to GND.

Final Assembly

26.gif
27.gif

In order to carry out the final assembly, we placed the Dual Color Printed Logo cover over the enclosure and fastened it in place with four M2.5 screws.

RESULT

28.gif
29.gif

Here's the end result of this build: the Wi-Fi Status Box, a small sign displaying the Wi-Fi connection status as green when the signal is connected or red when it has been disconnected.

After mounting the Status Box on a wall close to the computer configuration, we manually disconnected the internet from the router to test the setup. A few seconds later, the Wi-Fi Status Box flashed red, indicating that the router was having issues. Upon reconnecting the internet, it turned green once more.

Special thanks to HQ NextPCB for providing components that I've used in this project; check them out for getting all sorts of PCB or PCBA-related services for less cost.

Thanks for reaching this far, and I will be back with a new project soon.