Yeah, it should work, it uses the same chip.
Thank you!
Do you have a photo or wire diagram of the hardware? I’m very interested trying to do this at my house.
You could just implement the two beams as the A and B lines of a Rotary Encoder.
The built-in state machine would then tell your code when a person moved inward, or outward, through the beams, just as it can tell when the rotary encoder is turned one way or the other.
And it’d all be handled in one simple entity reference.
I’m testing your code and it works very well.
I have the sensors next to each other at a distance of 15 cm.
Question: you have been tested at the smallest distance it is possible to place sensors next to each other so that they do not affect each other.
Thank you
Hey @Shannondalebreaux, no, I don’t have any diagrams, but it is easy to figure it out from the code.
I’m going to omit the power part of it because it just connecting the correct voltage to the Vin pin for and the ground to the GND pin for each device.
The sensors have 3 pins for data and control, the Enable pin is setup as follow:
- platform: vl53l0x
name: "Sensor 1"
id: sens_1
i2c_id: bus_a
address: 0x41
update_interval: 50ms
enable_pin: GPIO25
timeout: 500us
internal: true
- platform: vl53l0x
name: "Sensor 2"
id: sens_2
i2c_id: bus_a
address: 0x42
update_interval: 50ms
enable_pin: GPIO32
timeout: 500us
internal: true
So you connect the enable pin of the sensor 1 to the GPIO25 of the ESP32 and the enable pin of the sensor 2 to the GPIO32.
Then the data pins for both sensors goes like this:
i2c:
sda: GPIO21
scl: GPIO22
scan: True
id: bus_a
Where the SDA pin of both sensors goes to the GPIO21 and the SCL to the GPIO22.
and that should be it if you are using an ESP32 and the vl53l0x sensor. You can modify the code according to your setup.
@glyndon Yeah, that was my first approach, but it didn’t work consistently. Maybe I didn’t coded it right.
@pepe59 I’m glad you find this code working good for you.
Yes, I have them separated by 6cm each other and I installed them into a door frame to count people that go in and out of my lab. It works very well.
Thank you very much. So far, I’m testing at the kitchen door on the shelf and I wanted to find out the distance from each other when I use other sensors in the door frame. Haven’t you looked at the VL53L1X sensor? Unfortunately, it does not yet have support in ESPhome, but it would also be an interesting solution.
yes. With that sensor you only need one since it can be setup by regions. Also if I don’t mistake it supports gestures. But as you said, it is not supported in ESPhome yet.
Gentlemen, this is not entirely true. It already works under esphome in beta and I have been testing it myself for about a month. So if you have these sensors, you can connect Here’s everything, plus any discussion and discord support for this project.
I have two of these sensors. I’ve been looking at it, I just need to understand how to install it all. What are the first findings, reliability, features? Thanks
Gentlemen, this is not entirely true. It already works under esphome in beta and I have been testing it myself for about a month. So if you have these sensors, you can connect Here’s everything, plus any discussion and discord support for this project.
OMG! This is fantastic! It is like a late Christmas present!
Alexa! order VL53L1X sensor… Yes! Next day delivery please!
This is also great news for me. I have never installed my own component. You can share how you understand the installation or the procedure. I’ll wait until you have them and test them. I will be very grateful for any information because I am very interested. Thank you
Those are new grounds for me aswell. I’ll share my experience here afte.
It’s in development but I can already say that it works quite well. Much depends on the installation site. Mine is only on trial in the fur studio, and there are no ideal conditions, but 95% of seizures are OK anyway. Others who have it in better cities say they are without mistakes. If you connect to that discord, if you don’t have it I’ll send it. If I advise what I can.
would you please upload a sketch of wiring the parts?
I put the VL53L1X sensor into operation on both the esp32 and D1 mini 8266, it works perfectly.
Has anyone 3d printed any cases for the vl53l1x solution yet? I’m happy to look at that side of things if people can let me know how they plan on setting them up in a doorway.
and second question. For rooms with more than one door or even using them to count people inside the house using a sensor on both front and back doors, can anyone shed light on how to use 2 sensors to count a total both up and down assuming someone walks in the front then out the back door. Thanks!