"Coronavirus Covid-19" 1 Meter Keep Away Alarm Gadget

by abdelhak_bourdim in Circuits > Sensors

450 Views, 2 Favorites, 0 Comments

"Coronavirus Covid-19" 1 Meter Keep Away Alarm Gadget

obs_assembly_6.PNG
obs_assembly_8.PNG

بسم الله الرحمن الرحيم

This article is a demonstration of the use of the Ultrasonic Distance Sensor HC-SR04.

The sensor will be be used as a measurement device to build the "1 Meter Keep Away Alarm Gadget" for distanciation purposes.

The brain of this gadget is the wonderful ATTINY85 µController powered by a 3.7V Lipo battery.

The gadget integrates the TP4056 charger.

A GREEN LED lights if the measured distance from any object is greater than 120 cm.

A RED LED blinks if the measured distance from any object is lower than 100 cm with a lovely (noisy) beep.

A YELLOW LED blinks if the measured distance from any object is between [100,120 ] cm with a less noisy beep.

Supplies

Many articles explain in details how the HC-SR04 works.

In a nutshell, The HC-SR04 Ultrasonic Distance Sensor is

1 - An Ultrasonic Transmitter – This transmits the ultrasonic sound pulses, it operates at 40 KHz

2 - An Ultrasonic Receiver – The receiver listens for the transmitted pulses. If it receives them it produces an output pulse whose width can be used to determine the distance the pulse travelled.

Components Sourcing (BOM)

components_obs.PNG
sonar_light_bom_obs.PNG

A few components are needed for this simple gadget.

These components are easily accessible from Amazon, Ebay or Aliexpress.

BOM : Bill of materials

Schematics

obs_schematics.PNG

The Open source Schematic Capture & PCB Design Software Kicad is used.

Pcb Design

obs_pcb_design.PNG

Kicad is used to route the board.

PCB Assembly

obs_assembly_1.PNG
obs_assembly_2.PNG
obs_assembly_3.PNG
obs_assembly_6.PNG
obs_assembly_8.PNG

A few components are to be soldered for this gadget.

Be careful and patient.

Arduino Sketch

obs_arduino_coding.PNG

The arduino sketch uses the famous NewPing library to read the distance from the sensor.

The NewPing Library is Open Source and very well documented.

Arduino Sketch Flashing

obs_arduino_programming.PNG

The flashing of code will use the Arduino Uno itself as an ISP programmer.

Hopefully, the "ATTINY85 ISP Programmer Shield " is used to flash the board.

Remark: Read the article "Yet Another ATTINY85 ISP Programmer Shield for Arduino"

Enjoy

In this article we have gone over all the steps to produce a funny gadget that might be helpful.

A 15 seconds home made video shows a use case.

Need more information, put a comment.

الحمد لله رب العالمين