Skip to content

hightechu/hightechu-ez-distancing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EZ Distancing

badge licence

EZ Distancing is an Arduino project that encourages users to follow social distancing protocols

This Arduino project uses 2 Passive Infrared Sensors (PIR) and 2 Ultrasonic Distance Sensors to detect if another person is within the users 2 meter social distancing bubble. If the device detects that a person is within a 2 meter radius of the user, it will alert them, letting them know that they should move away to maintain social distancing. If the person is maintaining their social distancing, it will let them know that they are the recommended distance away from others.

How it works

  • The 2 Ultrasonic sensors measure the distance of the target object by emitting ultrasonic sound waves. The sensor determines the distance of an object by calculating the time it takes to send and receive a pulse.

  • The Passive Infrared sensors measure the amount of IR light (or heat) that an object gives off. These sensors are being used to differentiate between non-living and living things.

  • When the device detects that another person is too close, it will give the user alerts via an OLED or LCD display and a LED/vibration motor.

  • The DIP switches allow the user to choose which alerts they want to receive. Individual components can be turned off, like the LED or vibration motor.

Component Usage

  • Arduino Uno: Microcontroller that will be handling all of the code, data, and inputs/outputs

  • OLED or LCD Screen: To give the user different text based alerts

  • Distance Sensors: Ultrasonic sensor that measures distance from 2cm - 400cm

  • Motion Sensors: Passive Infrared Sensor that measures 6 to 7 meters at 110 degrees

  • Vibration Motor: Vibration to physically alert the user

  • LED: Light to visually alert the user

  • DIP switches: This is to turn off any specific components, such as the LCD, OLED display, or vibration motor. This component is optional and wont require any changes to the code.

  • Switch: This will be used to turn the whole system on or off.

Components List

All of the components used can be easily sourced on Amazon for about $100USD or $130 CAD

EZ Social Distancing EZ Social Distancing Labels

Schematic | Drawn using Fritzing

EZ Social Distancing Schematic

Wiring List

LCD (Note: This is for the Arduino 16x2 display. This will need the LCD specific code)

  • GND → Ground
  • VCC → Positive
  • V0 → potentiometer wiper pin → Positive (5V) + Ground
  • RS → Digital 2
  • R/W → Ground
  • E → Digital 6
  • D0 → Nothing
  • D1 → Nothing
  • D2 → Nothing
  • D3 → Nothing
  • D4 → Digital 5
  • D5 → Digital 4
  • D6 → Digital 3
  • D7 → Digital 7
  • A (Anode) → 220 Ohm resistor → Positive (5V)
  • K (Cathode) → Ground

OR

OLED (Note: This wiring list is for the OLED. This will need the OLED specific code)

  • GND → Dipswitch 2 → Ground
  • VCC → Positive (5V)
  • SCK → Analog 4
  • SDA → Analog 5

LED:

  • Cathode (Long Side) → Dipswitch 3 → Ground
  • Anode (Short Side) → 330 Ohm resistor → Digital 10

Vibration Motor:

  • GND → Ground
  • VCC → Positive (5V)
  • IN → Digital 9

DIP switches:

  • Switch 1 (LED Resistor) → Digital 10 (This dipswitch is to turn the LED alerts on/off)
  • Switch 2 (Vibration Motor In) → Digital 9 (This dipswitch is to turn the vibration alerts on/off)

PIR Sensor 1:

  • Signal → Digital 11
  • Power → Positive (5V)
  • GND → Ground

PIR Sensor 2:

  • Signal → Digital 12
  • Power → Positive (5V)
  • GND → Ground

Ultrasonic Distance Sensor 1:

  • VCC → Positive (5V)
  • Trig → Analog 2
  • Echo → Analog 3
  • GND → Ground

Ultrasonic Distance Sensor 2:

  • VCC → Positive (5V)
  • Trig → Analog 1
  • Echo → Analog 0
  • GND → Ground