I'd like to count the number of vehicles traveling down a certain street. I'm reading about inductive loops, but that requires putting the loop into the pavement. I've also seen sensors that I imagine are magnetically based, like this one from Streetline. Is there a sensor component that I could hook up to an Arduino board to mimic that type of system?

  • 2
    \$\begingroup\$ How much access do you have to the street? Can you put anything on the street, on the pavement? or just from your yard? \$\endgroup\$
    – Piotr Kula
    Jun 8, 2011 at 10:59

4 Answers 4


Something that is becoming very popular in europe is the ANPR system. http://en.wikipedia.org/wiki/Automatic_number_plate_recognition

There is various software available out there to handle a video stream/ pictures to recognize the plates from hundreds of typical number plate fonts.

Best camera to get is a wireless night mode (Infrared Emmitors) As number plates react well on IR beams to reflect the background and adsorbs on the letters. You connecto the WIFI cam to your local wireless N network (good coverage outside- up to 50metres! and good for streaming 640x480 or even 720p video now a days!) and have a computer/notebook/netbook run software that collects number plate data.

With this data you can determine frequency of each car. So you could see that car A drives on your road 4 times a day. rough 8am then 1pm then 1.30pm and lastly 5.45pm. You can get condendesed data and see peak times and dip times.

You will have to consult you local council/muunicipality/governing body on the law of cameras in a public place. Gathering ONLY number plates numbers will be ok because you are gathering statistical data and not asscotiating these figures with any personal details...e etc etc

You can use this one using a Video Transmitter


Or this one using a IP Network Router http://www.henrys-electronics.co.uk/shop/Wifi_IP_CCTV_Cameras.html




Its not wireless but its not 1000pounds either. some compromise can be made on all the cameras

The big boys who deal with stuff


Some OpenSoftware



Good luck :)


The one thing I wonder about is how easily these sensors might get fooled by multiple cars crossing, or by vehicles with strange axle spacing, or even multiple axles.

Have you considered using OpenCV to do vehicle detection? There are a few out there that have already implemented this. Here's an example. You can hook up a camera to your PC and use OpenCV with it.

If it has to be embedded, then the author of ViewPort for the Propeller microcontroller has integrated an OpenCV module, and perhaps it would be of use to you. I haven't tried ViewPort yet, but I assume that you can deploy a program on the Propeller that uses OpenCV, and then just saves the count in memory.

  • \$\begingroup\$ In the example you can see how the OpenCV solution is definitely fooled by multiple cars. \$\endgroup\$
    – AndreKR
    Jun 8, 2011 at 11:38
  • \$\begingroup\$ doesn't mean it can't be improved upon! :) \$\endgroup\$
    – Dave
    Jun 8, 2011 at 14:31

You'll often see the kind that's a pair of long rubber tubes laid across the lane that goes to a box. You could mimic that with a garden hose closed off on one end. When a vehicle travels over it, it will force air out the other end. You can fashion a sensitive switch that is blown closed when the air is forced through. That way you will detect the number of axles going over the road pretty easily. If you have two strips spaced a known distance apart, you can measure the speed of the vehicles. You could also tell the direction of the vehicles. If you put in a little filtering, you could also pretty reliably remove extra axles.

  • \$\begingroup\$ Good idea- but could have potential drawback on heavy traffic with determining direction and slight deviation actual cars passed data. \$\endgroup\$
    – Piotr Kula
    Jun 8, 2011 at 19:14
  • \$\begingroup\$ That happens to be the way that Bill Gates and Paul Allen got their start: en.wikipedia.org/wiki/Traf-O-Data \$\endgroup\$ Jun 8, 2011 at 21:06

The first thing I'd try would be modulated IR. Separate the transmitter and receiver, shield and angle them so that the only way the receiver can see signal from the transmitter is if it is reflected off of a passing car.

If I was just playing around, I might try to come up with a few Polaroid sonar transducers, and use one as a dedicated transmitter and the others receive-only. This would be something I'd play with if I had lots of time on my hands.

If you really need traffic counts, check with your town's traffic enforcement people, and see what they suggest. Plan to spend money.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.