2020-09-28 03:34 PM
The built unit will need a sensor thats able to tell if either side of the gate is open, the unit will be mounted to one of the gate posts and will need to reach both gates during day and night. Prefered to be low power since it will be solar powered.
2020-10-05 03:57 PM
Coming from a South Dakota ranching family, I think it would be totally cool if you could use my sensor to do this.
Your issues are that the ToF sensors don't particularly work well in bright sunlight, and they have problems with dust.
But if you put the senor at the end of one gate pointing toward the other gate and a bit of hightly reflective tape (3M or other) on the opposing gate, you would get a range of a few inches. Open the gate and you would get a "no target' indication.
As for power, you could range very infrequently. Once every 15 minutes say. At 20ms rangeing time *2mA ranging power* 1/900 second = 0.0004mA/second.
Shouldn't be a problem for solar. (If you are thinking robust security instead of just "some damn fool left the gate open", you will have to range more often just update the calculation.)
The reason for the reflective tape is to insure a good strong signal when the gate is closed. If you wrap the refletive tape around the opposing pipe the the sensor should be able to see it - even in a strong wind. However if you wrap the chain very loosly, you could allow enough movement to fool the sensor into thinking the gate was open. You would have to test that.
YOu will also need a dust free coverglass.
Look at the video:
VL53L1X Dirty Cover Glass: https://youtu.be/BHM2CZVXZGc
You can either build your own or buy it from Hornix - something like: IR080C0-IC09-A066-2
http://www.hornix.com.tw/en/home/
One last point. It gets hot inside those pipes. The temperature range of the sensor is pretty high, but it's not a automotive grade sensor. So do think about that.