Get free access to our online edition!


Tech Forum





February 2017

Vehicle Detector

Does anyone have suggestions for buying or building a vehicle detector which can be used with the Arduino? I wish to sense and count passing vehicles.

#2175
Robert Johnson
Bolton, MA



Answers

I would try either a magnetic field disruption sensor (long iron core coil monitored by a hall effect sensor) or a security type passive infrared detector (frequently available cheaply from electronic surplus outlets).

Karl Aderer
Bay Saint Louis, MS

A couple of years ago I wanted to know how many cars were driving past my house each day so I built a counter for about $140. Here is the link to the 12 minute Youtube video describing how I did this: www.youtube.com/watch?v=Tw0P2DtB8Yo.

In addition to the car count, the laser detectors that I used also allowed me to acquire direction and speed. I saved the data to a SQL server and rendered the data on a webpage using highcharts (details in the video). This required a PC to be running all of the time (about 90 watts). I have now replaced the PC with a Beaglebone Black and use a MQTT listening service called mosquitto to acquire arduino data and pass it to the mysql database.

Programming and rendering is being done with Node-Red. I hope to develop a video with that configuration soon. Best of luck and please let me know if you have any questions.

Jeremy Lang
Madison, WI

This has been done before by several folks using a tube counter approach. The drawback is that you need to lay a tube across the roadway, but if this is OK for your project, this is the way to go. It’s the same way that professional traffic counts are often done. Two links on projects are https://hackaday.io/project/4567-traffic-counter-road-tube and www.tomorrow-lab.com/lab16.php.

Ultrasonic sensors might work if you you can put the sensor very close to the lane in question (e.g., if you just need to detect traffic on the nearest lane). Otherwise range becomes an issue and cost increases for longer range sensors. This site has a project that did just that: www.chris-sheppard.com/?page_id=40.

Radar rangefinders are the next step up for range if you can’t use a tube, one example would be something like the LIDAR-Lite 3 Laser Rangefinder, but you’re now using a >$100 sensor. There’s 3 pages of discussion on this topic on the arduino forum: https://forum.arduino.cc/index.php?topic=298000.30.

Mike McGurrin
Vienna, VA

Tags: