Have you ever thought it would be great if you know which part of your room will get the best WiFi signal reception. If yes, this project will be very helpful for you. Nowadays for most of our daily tasks we often rely on WiFi router to connect to the internet be it home or workplace. If WiFi router is placed far from us, we will face connectivity issues due to weak signal strength. As a solution to this I have designed a WiFi strength indicator that can measure WiFi signal strength and display that to us in real time.
The heart of this WiFi strength indicator project uses popular ESP8266 microcontroller. It has built in WiFi and it’s very cheap, easily available in the market. Also you can use any of its breakout versions such as NodeMCU or Wemos D1 mini as well. If you prefer using bare ESP8266 like me then you will need some passive components such as 10k ohm resistor, 10uf Capacitor etc. ESP8266 works on 3.3v so you will also need AMS1117 3.3v voltage regulator to run this module on 5v. Follow the bare minimum schematic to build usable version of ESP866 for our project.
WS2812B LEDs :
We need to visualize the data, for that we could use any kind of LED or LCD displays. But to give this project a cool look I have used WS2812B individually addressable RGB LEDs. These are also known as Neopixel LEDs. These LEDs are individually addressable, which means we can control many of such LEDs in series using only one pin from Microcontroller. I have connected the LEDs in a circular format to create a ring like formation. The ring type Neopixel rings are also available in the market, you can use that as well.
WS2812B WITH ESP8266:
Upon referring datasheet of WS2812B LED you will find a standard schematic for connecting LEDs. The VCC and GND pin will be connected to 5V and GND respectively. The DOUT pin or Data OUT pin of first LED will connect to DIN pin or Data IN pin of second LED. In this way LEDs will eventually make a daisy chain formation. Now the DIN pin of first LED will connect to any GPIO pin of Microcontroller or Pin 5 of ESP8266 in that case.
I have designed my custom PCB using EasyEDA and ordered it via JLCPCB. The above image shows the assembled PCB of this project. You can download Gerber file for this project below.
Gerber file of WiFi range detector project using ESP8266 modules
|Date:||March 3, 2020|
PROGRAMMING FOR WiFi STRENGTH INDICATOR:
That’s all we need for the hardware section, so now let’s move onto coding part of it.
Test code: Download the ESP_Signal_Strength_test code from my github repository.
WiFi RSSI: To get the signal strength data we will use WiFi RSSI function. In this code you need to change only the SSID and PASSWORD of your router and hit upload. Once you upload the code to ESP8266, open up the serial monitor and you will see the signal strength in dBm. The higher the RSSI value, stronger the signal will be.
Note that, you will get negative value in the serial monitor. So lower the number better the signal reception.
Final Code: Download EspRing_Signal_tester code from my github repository.
Adafruit_NeoPixel: We also need Adafruit_NeoPixel library to run the NeoPixel LEDs so download and install this library in your Arduino IDE. In this code, first we have included Adafruit Neopixel library and standard ESP8266WiFi library.
Pin Definition: We have to define the Pin number LEDs need to be connected and the total number of LEDs in the daisy chain. In our case it’s GPIO14 of ESP8266 and 12 LEDs in our case.
WiFi Credentials: Next you need to define the SSID and the PASSWORD of your WiFi router.
Signal Strength Limits: We have to define the Minimum and maximum value of signal strength. Change these values if required.
LED Integration: Now all is left to do is to take that value and map it from 0 to 11 because we have 12 LEDs. This way we have assigned LEDs, mapped signal strength values and defined their respective colors as well. You can change the colors as per your choice.
AND IT’S DONE:
That’s the changes you have to do in this code. Save and upload it to ESP8266 module. Once done you can see the signal strength of your router represented by RGB leds.
Hope this project is interesting and will help you with the WiFi issues. Share this project in Social media and other channels and follow our website for more of these projects.We publish new projects and circuits every Wednesday. If you have any queries/ feedback/ suggestions please then let us know in the comment section below. Check out other IOT projects in our website.
Up to $20 shipping discount on first order now: https://jlcpcb.com/quote