Looked at magnetic/inductive as well. A lot of places can't have, or don't want, installation of stuff on or in the ground like that; besides that, that tech has a history of problems with counting multiple close-following objects as one big object. The sensitivity has to be set very carefully, too - otherwise it starts counting individual axles, or things like wheelchairs and metal carts, or it can completely miss things like "lifted-up" pickup trucks.
Edit: Ok, I got the green light to ask ask ask away, with numerous details.
Yes, the goal is indeed trying to detect and
count vehicles passing by an arbitrary straight-line threshold, and also determine their direction of travel. Most of the time, we can't have inductive loops put into the ground. It adds cost, and in some cases, such as in a parking garage, my understanding is that that means that there are some legal hoops to jump through, to be sure that they're not compromising the integrity of the garage.
Right now, the sensors are IR light curtains, mounted to the ceiling and looking down across a lane of travel. Two of them are placed about 48" apart, and are connected to a controller board that monitors them, and communicates the vehicle counts to a central controller. Any object that can trip both of them at the same time is considered large enough to be a car. The sequence in which they are tripped and release determines direction of travel. The IR curtains have the benefit of handling tailgating
very well. Two cars would need to be following quite extremely close in order to cause the system sensors to miscount.
Problems with these sensors, or with this system setup:
- The sensors need to be angled away from vertical, otherwise water on the ground - standing or simply wetted - can cause them to see it as a change in environment, and they'll lock up. The controller
can sense a prolonged lockup and reset the stuck sensor, which causes it to relearn its environment.
- Upon a reset, the sensor needs some "quiet time" during which it can learn its background environment. If a reset occurs during rush hour, it won't see a break in traffic until most cars have left, meaning that it will have missed all of them. We can't just have a flag pop up and tell the drivers, "Hang on, this sensor needs everyone to stop!" That's not going to work.
- They trip from anything, including pedestrians. One or two people typically won't span enough space to trip both sensors concurrently, so they aren't counted. Person pushing a stroller though with spouse close behind? Counted. Someone pushing a person in a wheelchair? Counted. Motorcycle? Sometimes, sometimes not. Trash on the ground? Sensor's tripped. Cat wandering by? Sensor's tripped.
- Some very dark cars aren't easily seen by the sensors, and can result in a sporadic trip pattern - the controller doesn't see the clean transitions it is expecting, so it assumes that the trip sequence is noise and doesn't count the car.
- Cars can often park in spaces directly to the side of the sensors. If it's a large vehicle, it may be within the field of vision, so the sensor gets stuck until the controller resets it. Then when the vehicle leaves, the sensor gets stuck once again. Besides that, when the vehicle is backing out of the parking spot, the sequence it trips the sensors is quite unpredictable. It may or may not be counted as a vehicle, or it may even be counted as going in the opposite direction.
So that's what this sensor thing needs to answer:
- Is that thing a car?
- Which direction is it moving?
The vision sensor idea was on everyone's mind for awhile. My main concern: Shadows and puddles. "Oh wow, that's a big object! That must be a car!" Nope, it's just a big puddle running across the ground.
So, either make the sensor smart enough to handle that, or make it stereoscopic. "Oh wow, that's a big object! But it's 0" tall. That's not a car."
My idea is that the vision sensor would look down across the lane of travel, and if it sees an object that is both large, and X portion of the large object is at least 2ft off the ground, call it a car. Besides that, determine which direction it's moving. Every time it counts a vehicle, it would record the count and the direction of travel in a buffer in RAM, and then when the external control system queries it every 5-10 seconds, it reports how many cars it saw going one way, and how many it saw going the other way, and then when it receives an acknowledgement of that packet, it resets the buffer.
Microwave/radar sensors: Most lack presence detection. Car drives under the detection field, it's detected. Car sits there, and the sensor stops seeing it. Car starts moving again, and the sensor thinks it just popped up out of nowhere. Besides that, these don't handle tailgating well - tailgating vehicles tend to blur together in the sensor's field of vision. They also see people (water content) just as well as they see metals.
Ultrasonic:
Sonic "beam" hits the ground: Ok, that's a background. Great.
Beam hits the hood of a vehicle: Ah, something above the ground. Car!
Beam hits the windshield and bounces off into nowhere: Oh no, the ground disappeared! Now what? Uh....I'll just guess that it's still a car.
Beam hits the roof of the car: Oh,
there's the car!
Beam hits the back window: Car's disappeared again.
Beam his the trunk lid: And it's back.
Beam hits the ground: Back to normal.
Not every vehicle has that profile. In addition, the gain can be tricky. Experience shows that inadequate gain can cause problems on hot blacktop: Either the blacktop itself absorbs sound, or else the hot air layer over it does. Either way, the sensor can intermittently lose sight of the ground on a clear, hot day. So then you don't have any way of knowing if it lost the return signal because it's really hot out, or if the sensor is just hitting an angled windshield.
Inductive:
Loops have the problem of needing to be installed in the ground. An alternative is a sort of "mat" that is laid on the ground, but that's subject to increased wear, and I can't see that working well in surface lots where plowing is needed.
I've seen some other inductive sensors, but they're not directional. So if a car passes by in another lane, or on another level of a parking garage, it will still be detected.
Audio: There was an attempt some years ago, before I was working at the company, to try to profile the sound a "typical" car made, and figure out from there if it was a car. Nope. Way too much variation, way too much ambient noise, and way too much lack of anyone resembling an acoustics expert.
RFID: Ticket-spitters would need to be modified to include an RFID tag in the ticket. And I sure hope no one forgets a ticket inside their car. One car could suddenly become 5. Besides that, the car's a big metal cage. I could imagine some possible problems with RFID there, though I'm certainly not an expert in that particular (electromagnetic:awe
field.
So that's why the vision sensor is the main contender now. How does a person tell if something's a car or not? You look at it. The stereoscopic sensor eliminates the problem of shadows or puddles, since they're effectively zero-depth, and it could tell if an object is sufficiently large in three dimensions to be reasonably sure that it is indeed a vehicle.
Bonus points: Detecting motorcycles and counting them separately, as some parking locations have dedicated areas just for motorcycles.
Plan F was Monkey-With-A-Pushbutton. Trained monkey sits at the counting points, and when he sees a car, he pushes one of two buttons to indicate its direction. There are some potential problems with this though, such as logistics, warranty and maintenance, attention deficit issues, and field diagnostics.