Vehicle Detection Sensor- Any Recommendation??

Hall sensors are good enough for instrument work if you get the precise ones.

The magnetic compass ones are amplified more. Park a car over one of those and watch "north" change?

I was reading that there is some magnetic change and this type of sensor is too sensitive. But I am not sure if it will work that's why I opened this thread for some better suggestions.

It is simple. Have you ever used an ordinary hand held magnetic compass?

If you hold it down by your waist and you have a heavy iron/steel belt buckle the the compass always points to or away from you, more due to proximity than mass of the metal to compass.

If you bury one center of parking spot how far away could a car or truck park and the sensor point to that? Next slot over? 2 slots over? Reality check: take a hand compass out in a parking lot and see what effect cars have on it at different distances. It tails off real quick.

That's using a digital compass which is passive. You can go active and use a Hall to monitor the field, even pick up induced fields. Have a coil circuit put out a strong burst and look for a return every 10 to 30 seconds.

You might check out capacitive sensing. People can be sensed standing a meter from a wall that was painted with conductive paint using capacitive sensing. You'd also do well to find a metal detector circuit.

why not use an IR or ultrasound distance sensor?

you wouldn't have to fiddle with magnetic anything, just tell the arduino if the sensor detects an object closer than 12" over the sensor, there is a car there.
put the sensor right in the middle of the parking space, so it wont miss the vehicle.
you could also program it to dismiss counting objects that are over the sensor for less than 1 minute. That way, if someone walks over it or something else like that, it wont record that as a parked car.

this seems like a much more simple option, and more reliable than a magnetic sensor.
if the parking space is in a lit parking garage, you could also use a light dependent resistor. when a car is over the sensor, it would be darker. even at night in a lit garage. you would just have to tinker with it to find a darkness level at witch to trigger the action you are looking for.

Just a few ideas I had, figured I would share :slight_smile:
N8

Another approach would be to put a large coil of wire where the car is to park. Use enough turns to get a measurable amount of inductance and use that inductance as the basis for an oscillator. When there is no metal interfering with the inductance of the coil, the oscillator will be at its design frequency. When ferrous metal interferes as when a car moves over the coil, the frequency will change.

It's probably better to use a buried sensor that's immune to rain, dirt, oil drips and spills.

I remember ultrasound on traffic lights in the 70's. It got replaced with buried sensors.

You could try force/pressure sensors, make car-size stomp boxes....

Thank You for the ideas.
I like Neight idea. I think might be easier to manage the distance.
Do you know any type of sensors (ultrasonic) that is not a hassle to connect to arduino?

Yeah. They're good to 4.5 meters in the best conditions, not happy with rain and put down in the middle of parking spaces not likely to last a whole season especially once they're noticed by the FTW crowd. But you can put them up on poles and close the lot when it rains....

google waterproof ultrasonic sensors.
There are loads of them to choose from.
you could make a small waterproof enclosure for the electronics, which should leave them fairly well protected.

The biggest hurdle to cross in my mind is placement.
How do you keep them from getting stolen or run over by drivers cutting through a space?

I like GoForSmoke's idea of putting them on poles, but that seems like a recipe for false readings. vehicles have a range of heights and angles, and reading a space from above would have a much wider range to activate the signal. There is also the possibility that a car could park and if the sonar didn't get bounced back directly, it may not even see the car.

Going from underneath would be much easier to code, and sounds more reliable to me. But that leads us right back to the stolen or crushed possibilities.

They had them on poles at intersections back in the 70's cranked up LOUD. That got switched for in-ground detectors.

From above you get a nice return distance to the space below. If the distance changes, something is there. Reflected at an angle, distance = maximum. Don't make the poles too high.

Will ultrasonic work in the rain or reflect from the drops?

Try a metal detector instead.

You still haven't gone into force/pressure sensors or capacitive sensors.

I know this is an old topic, but it's one I was researching now too, and came upon this discussion.. My application is that I am having some work done on my house, and would like to detect and report via SMS text message, when the construction trucks go up my driveway. My idea was to use a 3 axis magnetometer (compass) mounted in some PVC pipe with an arduino and a GSM shield, hidden in some bushes next to my driveway.

I figured SOMEONE must have done this, but I can't find any evidence.

I just ran across this document, which seems to indicate that it will work perfectly:
http://masters.donntu.edu.ua/2007/kita/gerus/library/amr.pdf

I'll report back my findings after I finish my build, just in case someone else stumbles on this thread.
-Steve

For a driveway, the easiest might be an IR beam-interruption scheme.

I figured SOMEONE must have done this, but I can't find any evidence.

I've done it. With the HMC5883L 3D compass chip, you can easily detect a moving automobile, even 3 meters away. I assume any other magnetometer chip with similar sensitivity would work just as well.

1 Like

jremington:
I've done it.

Could you please tell me what stuff(sensor only or some resistors?) you used, what programmcode you´ve written and will it work for distances between 3 and 5 meters?

Thanks!

See reply #15. Google will help find program code for that sensor.

jremington:
I've done it. With the HMC5883L 3D compass chip, you can easily detect a moving automobile, even 3 meters away. I assume any other magnetometer chip with similar sensitivity would work just as well.

I need to detect a parked car in a parking lot, so the 3 meters detection might be a problem, is there a way to fine tune this sensor to detect no more than 50cm.

No need to tune the sensor, just adjust your detection algorithm to be less sensitive.

What I do is to use a low pass filter to accumulate the average magnetic field strength, expressed as a 3D vector, measured by the sensor.

Any deviation from that average vector (computed as a distance) is a potential event. Larger deviations mean more of whatever is disturbing the ambient magnetic field. Adjust your threshold accordingly.

Here is the code I use for a automobile gate announcer:

	// read magnetometer
	read_mag_raw(m);

//  float variables below
	fm.x = m[0];
	fm.y = m[1];
	fm.z = m[2];

	diff.x = fm.x - fm_avg.x;
	diff.y = fm.y - fm_avg.y;
	diff.z = fm.z - fm_avg.z;

	//low pass filter
	fm_avg.x += (fm.x - fm_avg.x)*0.2;  
	fm_avg.y += (fm.y - fm_avg.y)*0.2;
	fm_avg.z += (fm.z - fm_avg.z)*0.2;

	// distance from this point to average
	deltaA = sqrt(diff.x*diff.x + diff.y*diff.y + diff.z*diff.z); 

	if(maxDelta < deltaA) maxDelta = deltaA; //max of difference in this interval
	passcounter++;

// the magic alarm value 22 (below) was determined by experiment (mean deltaA = 5.6, sd = 2.6)

// send a message, either upon alarm (two successive outliers) or at regular intervals

		if( ((deltaA > 22) && (last_deltaA > 22)) || passcounter == 0) {  
//send alarm or keepalive, every ~255/4 seconds           
...
}

Thanks a lot man i will find the sensor and start testing.

I'm starting my first real professional project my client wants to have a map of a parking lot in a mobile app and see through the app wich ones are available and wich ones aren't.

At first i thought to use a water resistant ultrasonic sensor (hcsr04t) to measure from top to ground but this is a very ugly solution because of the million poles i would have to put over all of the parking spots to hold the sensor, so that´s why i'm looking for a ground solution.

Any other comments would be greatly appreciated.

Aideepen HMC5983 Vehicle Detection Module Vehicle Magnetic Field Dynamometer STM8S003F3P6 Sensor to Test Parking Spaces Vehicles