Measuring Car Speed

by J.Beale 1994
Last year I lived just around a blind curve on a campus road. Students in a hurry to be elsewhere zipped by my door rather quickly, and I was almost run over a few times. I always thought people were going pretty fast, but one day I decided to actually measure this.

My solution took the form of two infrared photoelectric gates along the road, connected to a data-logging microcontroller. Each gate included a pulsed infrared source on one side of the road and a receiver on the other side of the road. With two gates I could measure the time of arrival, velocity, acceleration, and length of each car (although I had to assume that the acceleration (rate of change of velocity) was constant.) You can examine the data yourself to see what the traffic statistics are like. I didn't notice any correlation between car size and speed. You would expect to see a correlation between size and acceleration (note the setup was near a stop sign) and there is one, but it may be mostly artifact due to non-constant acceleration (which I couldn't directly measure).

All electronics and hardware were designed for the purpose, mostly out of spare parts I happened to have. I ended up with a car timer with 0.5 millisecond resolution, running standalone on lead-acid batteries for up to a week, logging data in a 128kB SRAM. Everything was waterproofed against rain and camouflaged against potentially sticky-fingered passerby (the one commercial item, the "Blue Earth Micro" microcontroller was \$200).

As it turns out, about 88% of traffic was actually speeding, but on average only by about 4 mph. Oh well! As expected for the large sample size, the distribution of car velocities follows a gaussian. The cumulative plot of the data (solid line) lies almost exactly along the gaussian fit (dot-dash).

Block diagram of IR beam xmit/rcvr system: GIF [31k] Postscript [24k]

IR transmitter schematic: GIF [59k] Postscript [27k]

IR sensor/preamp schematic: GIF [56k] Postscript [31k]