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.
-
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.
-
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.
- 1x Arduino R3 | Arduino | Amazon | Arduino Datasheet
- 1x OLED Display | Amazon | OLED Datasheet This Diplay is also an option: Adafruit
- 2x PIR Sensors | Amazon | Digikey | PIR Datasheet
- 2x Ultrasonic Distance Sensors | Amazon | Digikey | Ultrasonic Datasheet
- 1x Vibration Motor | Amazon | Banggood
- 1x LED Light | Amazon | Any basic LED light will work
- 1x 330 Ohm Resistor | Amazon | Any 330 ohm resistor will work
- 1x Power Switch | Amazon | This can be any type of basic switch
- 1x DIP Switches | Amazon | For the dipswitches, you can also use multiple normal switches
- 1x Arduino 9v Battery Clip | Amazon | This needs to be a 9V battery clip to 5.5mm barrel jack adapter
- 1x 9 Volt Battery | Amazon | Any 9V battery will work
Diagrams | See the Digital Circuit Here
Schematic | Drawn using Fritzing
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
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
- Cathode (Long Side) → Dipswitch 3 → Ground
- Anode (Short Side) → 330 Ohm resistor → Digital 10
- GND → Ground
- VCC → Positive (5V)
- IN → Digital 9
- 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)
- Signal → Digital 11
- Power → Positive (5V)
- GND → Ground
- Signal → Digital 12
- Power → Positive (5V)
- GND → Ground
- VCC → Positive (5V)
- Trig → Analog 2
- Echo → Analog 3
- GND → Ground
- VCC → Positive (5V)
- Trig → Analog 1
- Echo → Analog 0
- GND → Ground