# Question: What is a good way to track vehicular traffic?

stevie asked on July 13, 2018 17:19
149 | 4 answers | #16712

I've been speaking with a community member in Mobile County, Alabama who has been struggling with an adjacent gravel and asphalt processing facilities, and the dust their trucks cause around his home.

You might look into TPMS ( short for tire pressue monitoring system) by j. Boone. Its freeware that runs on linux. The hardware is a rtlsdr ( it will set you back about $25). The software is not set to count, but will give the the tire pressure and tire id on each tire that passes. It should be easy to modify to count. The older cars should be a small portion of the total. A linux computer is pretty cheap, so the whole system should be relatively inexpensive. Go to rtl-sdr.com. At the search function, try Tpms. Let me know of any problems. @stevie has marked ramseysprague as a co-author. @Ag8n That's good idea and clever way to do the job. The problem is that, this will be very complicated to set up everything. There was this thread where people were discussing traffic counting: https://groups.google.com/forum/#!msg/publiclaboratory/cw_i-JIH2kA/vn9GW1lzBAAJ Here's a link to a project available for purchase: http://www.tomorrow-lab.com/work/waycount, that has a link to https://countingcars.com/collections/road-tube-systems CodeForDC was working on extending TomorrowLab's work here in an open source manner: https://github.com/codefordc/traffic_counter, and i bet someone could get this up and running One option may be to use a computer vision system. Believe it or not its a fairly simple code. Not sure it would work at night but it could probably switch to counting (moving) lights if neded. You need to train a dataset but you could train it to only detect one type of truck (color or size). Google 'opencv' and 'car tracking' for more examples: Is this a question? Click here to post it to the Questions page. Log in to comment ### 4 Answers Ok. Let's go through it step by step. First, after a little digging, it looks like there are two frequencies used 315 mh z and 433 mhz. So it would take two rtlsdr dongIes. I'm more familiar with windows and sdr#. But, as long as you have two usb ports and two rtlsdr dongles, in Windows you could open multiple instances of sdr#. Both frequencies could be covered at the same time. This program is based on gnu radio. That part, I don't know about. Maybe the Reddit rtlsdr could fill in the details. Or compile the program so it could run on Windows in multiple instances? As for the cost, the dongles are often found on ebay for$10. You must be careful they are The right ones.

The programming changes for counting are beyond me. Sorry.

Go to:

https://github.com/jboone/tpms

It gives a working system with links to a hak5 video etc. It doesn't count cars, but...

Some people shared some other resources on a thread on the main list from earlier this year.

From @mkirk :

"I wanted to build a traffic counter to measure bicycle traffic in a few places around Los Angeles. I came across this: http://tomorrow-lab.com/lab16 ...which is just such a thing touting:

We have made the parts list and Arduino code available under a Creative Commons License. We have developed multilingual How-To guides to allow anyone to build a DIY Traffic Counter. But then I couldn't find their plans anywhere. After contacting the site administrator I was told they are now selling a revised model here: http://waycount.com/ .

They've also built some nice tooling around uploading the data and aggregating it into a central portal. Which is all cool stuff - but I'm interested in building my own sensor, and was disappointed that they took down the original instructions.

The basic design is a pneumatic tube connected to a differential pressure sensor. Results are logged onto the device. And the whole thing runs on a 9v battery for around 8 hours. I was able to go to the way back machine and find a guide (yay internet archive!): https://web.archive.org/web/20160128041311/http://tomorrow-lab.com/traffic_counter/traffic_counter_guide.pdf But haven't yet tracked down the parts list, which wasn't indexed due to it being a GDoc. There are some links to parts at the end of the aforlinked guide (last page). I'm also missing the arduino software that works with the sensor. Anyway - anyone have experience with this or a similar design? Or crosses fingers have the software?"

And Tim Pickering just shared this:

"I've just come across this thread, and with a bit of digging around, found https://github.com/codefordc/traffic_counter which seems to be a fork of the original code, and a link to the instruction manual originally found on the wayback machine.

Just for anyone else looking. I've just ordered the parts, and will be testing it out asap..."