CoViD-19 Social Distance Enforcing Device

Social distancing is one of the top recommended ways to stop the spread of CoViD-19 disease by the WHO. It is also important to make sure that this is enforced at all times as people can be absent minded or accidentally come close to each other. This is especially true in crowded areas like hospitals and work places.

Project Image
Project Owner:

John N. G. Samarasinghe

Project Outcome:

Design of an on-body social distance monitoring and warning system

Project End Date:

2020-05-06

Project tags:

CoViD-19, Electronics, ESP8266, NodeMCU, Project, WeMos

Dive in to details

Hope you are keeping safe in 2020/2021!

Social distancing is one of the top recommended ways to stop the spread of CoViD-19 disease by the WHO. It is also important to make sure that this is enforced at all times as people can be absent minded or accidentally come close to each other. This is especially true in crowded areas like hospitals and work places.

To continuously monitor and enforce this I have come up with a simple ESP based device. The idea is to provide everyone working in one location with this device that will continuously monitor if there is a similar device around them. If there is another similar distance around them close to a preset distance of roughly 1 meter or 3 meters according to the regulations in the location and use of PPE, the device will light up or ring loudly alerting the wearer to move away from the location or to be extra cautious.

The Device

The device that I have used is a WeMos ESP8266 device powered through the computer. This will be powered by a battery for the industrial version. Each ESP8266 device will be broadcasting its own Wi-Fi hotspot using the soft access point function. Thereafter, each device will also be listening in to the Wi-Fi signals in the surroundings. If there is a Wi-Fi signal in the surroundings from a similar device with a high signal strength, the built in LED is switched on.

I have tested this out with 6 WeMos devices that I currently had at home and this was a moderate success. There is a maximum delay of about 5 seconds to switch on the LED in the worst case, but the general response is within 1 second.

Covid Social Distance Enforcer

The Code

/*  Author - John Samarasinghe
 *  Creation Date: 2020.05.04
 *  
 *  @iamJohnnySam
 */
#include <ESP8266WiFi.h>
#define THRESHOLD 65
#define WATCH "CovidWatch-0005"
void setup(){
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
  boolean result = WiFi.softAP(WATCH, "administrator");
  if(result != true) while(1);
}
void loop(){
  int numberOfNetworks = WiFi.scanNetworks();
  digitalWrite(LED_BUILTIN, HIGH);
 
  for(int i =0; i<numberOfNetworks; i++){
    int strength = WiFi.RSSI(i) + THRESHOLD;
    String ssid = WiFi.SSID(i);
    
    if ((strength >= 0) and (ssid.substring(0,5) == "Covid")){
      Serial.print("Watch ID ");
      Serial.print(ssid.substring(11,15));
      Serial.println(" is too close to me!");
      digitalWrite(LED_BUILTIN, LOW);
    }
    else if (ssid.substring(0,5) == "Covid"){
      Serial.print("Watch ID ");
      Serial.print(ssid.substring(11,15));
      Serial.print(" is close... ");
      Serial.println(WiFi.RSSI(i));
    }
  }
  Serial.println("-----------------------");
  delay(1000);
}

Further Development

- The code can be definitely improved for better detection
- Battery module and recharging module needs to be added for portability
- The device can be miniaturized when moving to the bare version of the ESP8266

Please keep me updated if any of you have built this and made improvements for industrial use!

Similar Posts

See other projects and posts in the same category as this post

blog item CoViD-19 Social Distance Enforcing Device
Social distancing is one of the top recommended ways to stop the spread of CoViD-19 disease by the WHO. It is also important to make sure that this is enforced at all times as people can be absent minded or accidentally come close to each other. This is especially true in crowded areas like hospitals and work places.
CoViD-19, Electronics, ESP8266, NodeMCU, Project, WeMos 2020-05-06 | Read More....
blog item Project Spider Web
Wifi Mesh Network
wifi,mesh 2019-02-28 | Read More....
blog item Soap Dispenser Circuit Design
During my internship I worked in a company that had fitted automated soap dispenser units in their canteens. However, some of these soap dispensers would always malfunction. So I took on the task to build a circuit to replicate this circuit as the existing circuit was microcontroller driven and could not be repaired.
electronics, soap dispenser 2014-03-07 | Read More....
blog item Edge Lit Display
edge lit display, LED 2013-11-23 | Read More....
Comment Box is loading comments...