DIY

Visitor counter using laser motion sensor

Visitor counter using laser motion sensor  Visitor counter using laser motion sensor Visitor counter using a laser motion sensor Visitor counter using laser motion sensor What is a visitor counter for? Based on the operation of this device, you can, for example, track the number of people who have visited the institution, the hours when the maximum number of people in the institution and vice versa is the minimum. Based on this information, you can plan your work schedule as efficiently as possible.
But recently, the visitor counter can still be used to notify visitors about the number of people in the room. This measure is required in some countries to prevent COVID.
The visitor counter described in this article uses a laser sensor to count people and can be connected to any device using Wi-Fi. This allows a simple web interface to be displayed on all types of devices.
Tools and materials: -WEMOS D1 Mini; -VL53L1X ToF sensor module; -Breadboard; -Jumpers for breadboard; -Micro USB cable; -Power adapter; -3D printer; -Soldering iron;
 Visitor counter using laser motion sensor Step one: theory, principle of operation, components
Counting people is no different from counting objects. You just need to place the detector in the field of human movement. The detector can be any infrared sensor, laser sensor, and even recognition systems over Wi-Fi and Bluetooth radio channels. In order to be able to count the input and output, at least two sensors are needed. In addition, the sensor may not react to two people walking side by side or one after the other. For more accurate counting, you can use systems with face recognition.
Visitor counter using laser motion sensor  Visitor counter using laser motion sensor Visitor counter using laser motion sensor The people counter discussed in this article is slightly different from those currently available. He is using a new sensor. This sensor is called VL53L1X. It is a small and inexpensive laser sensor. It can work with any Arduino board. The sensor has both an emitter and a receiver. Those. the device is able to measure the time interval with which the beam reaches the object, bounces off it and returns back.
The sensor measures distances with an angle of about 27 degrees. This angle is called the field of view (FOV). However, the sensor does not have to cover the entire cone. The VL53L1X receiver is actually an array of small 16×16 light sensors. You can use software to adjust measurements only in a specific area of ​​this array. This area is called the area of ​​interest (ROI). Using this function, you can split the cone, which will give two different zones. Those. you can detect a person in every zone.
The sensor can count people, but it has no display. The easiest way is to transfer data over Wi-Fi to any external device.
The easiest way to create a smart device that can communicate with smartphones, laptops and TVs is to use a microcontroller with built-in Wi-Fi capabilities. The master is going to use the ESP8266 module for this purpose. The module is also compatible with Arduino, which makes it very easy to program and allows you to use many libraries for the sensor.
 Visitor counter using laser motion sensor Counter of visitors with using a laser motion sensor Visitor counter using laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990758_1-12.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Visitor counter using laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990701_1-14.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Step two: assembly
The master assembles the device on a breadboard. Assembly according to the scheme. The connection is as follows.
Microcontroller & lt; = & gt; Sensor
3V3 & lt; = & gt; VCC
GND & lt; = & gt; GND
D1 (GPIO5) & lt; = & gt; SCL D2 (GPIO4) SDA
Visitor counter using a laser motion sensor Visitor counter using a laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990739_1-19.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Visitor counter using laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990783_1-21.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Step three: building
The master prints the case on a 3D printer. A prototype board with accessories should be placed in the case. It should have a hole at the bottom for the sensor and another one for the micro USB cable.
The master has printed the body with white PLA with a layer thickness of 0.2 mm and an infill of 20%. Be sure to print the upper part of the body at a 135 degree angle, as shown in the image.
Visitor counter using a laser motion sensor Files download below for printing.
EnclosureBottom.stlEnclosureTop.stl
Step Four: Software
After assembling the device, you need to install the software.
First you need to prepare the Arduino IDE.
Download and install the Arduino IDE
In Arduino IDE go to File- & gt; Preferences.
In the Add-on Board Manager URLs section, set the following URL: http: //arduino.esp8266.com/stable/package_esp8266 … and click OK.
Go to Tools-> Board-> Boards Manager.
Search for esp8266 and install the ESP8266 package
The next thing to do is download the firmware. Download the entire repository as a zip file and unzip it. In the Zip archive, you need to find a folder with the name of the library, which contains the pieces of software needed to interact with the sensor and to use websockets. Take the contents of this folder and move it to the Arduino IDE Libraries folder. It should be in Documents/Arduino/libraries.
Next, you need to open the PeopleCounterFirmware.ino file in the Arduino IDE. You will need to configure the visitor counter using a configuration file. Open Config.h which contains many important parameters. DEFAULT_PEOPLE_LIMIT defines the maximum number of people that should be in the room. This limit is set at startup, but can also be changed with an additional web page that the device hosts at/Correction.
Must uncomment MOUNTED_INSIDE if your counter counts negative.
STASSID and STAPSK must include username and password local Wi-Fi network.
Next, you need to connect the Micro USB cable, which can transfer power and data to the Micro USB port of the meter. The other end of the cable connects to your PC.
In Arduino IDE go to Tools-> Board-> ESP8266 and select LOLIN (WEMOS) D1 R2 & amp; mini “. Then select the correct COM port via Tools-> Port. There may be several different COM ports. To find out which one is correct for a given counter, you need to turn it off and see which port to “fall off”.
Next, you need to compile and download the firmware using the download button (the second round button in the upper left corner).
Visitor counter using laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990802_1-24.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Visitor counter using laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990727_1-26.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Visitor counter using laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990742_1-28.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Step five: connecting and installing the sensor
Next, you need to connect the device to a USB power source, and the meter will establish a connection to the specified Wi-Fi network. Then you need to get its IP address. This can be done in a number of ways. You can use the Serial Monitor in the Arduino IDE to see the debug data of the device, or you can access the web interface of the WiFi router and check which devices are on the network.
The IP address must be copied and pasted into the line of your web browser.
The device should be placed above the entrance door with the sensor facing down. Since the detection areas are cones, they become wider as they move away from the sensor. For this reason, the sensor must be installed about 30 cm above the door. The sensor must be installed so that it is not blocked by the opening door. That is, if the doors open outward, the counter must be installed inside and vice versa.
Visitor counter using a laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990722_1-30.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Visitor counter using laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990746_1-32.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Visitor counter using a laser motion sensor < a href = "https://usamodelkina.ru/uploads/posts/2021-06/1622990712_1-34.jpg" rel = "prettyPhoto"> Visitor counter using laser motion sensor Everything is ready, now you can use the device as intended.
 Visitor counter using laser motion sensor  Visitor counter using laser motion sensor

Source:

usamodelkina.ru

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button