Thank you for giving us a fuller description, it is always helpful to start with that.It’s for real life for the wait time between paying and entering a car wash. So one car is one unit that’s being measured, doesn’t matter how many people are in the car.
The magnetic switch on each entrance gate will be the input to start a timer in our code, when opened. If another car enters (gate opens) before the first car exits, then there will be two timers running, both starting at the time of the respective gate open.
At the exit, there will be a motion sensor (since no gate). When the sensor detects a car, the first timer that started, will come to an end. This will continue throughout the day. If the gate doesn’t open, a timer doesn’t start.
The purpose of the RPI is to connect these input signals to my code to: start a timer, end a timer, calculate time elapsed per car, and flag any times that were longer than 45 seconds.
All of the above is independent of the gates actually opening and closing, as this functionality is already built and operational. Think of these sensors and RPIs as something I’m adding to our current systems in the cheapest way possible.
How are the gates controlled and interlocked now? It maybe possible to take information from the existing control system.
How are the gates powered? It maybe possible to use power from that system.
How do the gates sense when a car is present to open?
Do the gates swing or are they barrier arms that raise/lower? This will determine what type of sensor you require at each point.
In an earlier answer you said hard wiring the sensors back to a common point was not practical, if this is the case and you can not "piggyback" off of the existing control system, you best bet is to go wireless.
I have used wireless battery powered Reed switches commercially in the past, they have a small 12v battery and a reasonable transmit range to a receiver which in turn wires into the controller, but these are reasonably costly and were not sealed.
Based on the cost of RPi kit down here in NZ, I would look at using Raspberry Pi Pico W boards, these are low cost, wireless enabled small footprint devices that have a lower GPIO count. Given that at each "gate point" you will only need 1 or maybe 2 inputs, these will be perfect.
I would look at building a "MESH" system with the 4 gates all feeding back to the Raspberry Pi which in turn processes the timers etc and collates the numbers.
No matter what you use, if the sensors can't be hardwired back to a central point, you will need to power each sensor and wireless connection.
Statistics: Posted by Kiwi_bloke — Sat Jan 20, 2024 8:21 pm