Technical

Technical Systems Involved

  • Radar Box
  • Display Box
    • Display Computer
  • Data/Process/Web Computer
    • Blue Iris
    • PHP
    • Apache Web Server
    • C++
    • MySQL Database
    • Python (this is the main language)
    • Open ALPR
  • Cameras
  • IR Lights
  • Old Prototypes

 

Radar Box

DRU III Radar unit has a serial output sending speed and direction data. It is FCC part 15 compliant, no license required. Data comes out of a serial port 9600, 8, 1, None. We connect to a serial to Ethernet converter and send to process computer. Data is set to send speed data very two seconds or any speed change. Data package looks like <dir><speed><cr>.

Range is as good or better than prototype I. This unit is designed to be much more responsive, and we can collect real time data.

Display Box

We will start with 4 7 segment LED’s controlled by a Arduino Yun hybrid computer.

Currently we are using prototype I for display concurrently with prototype II. The radar is on a slightly different frequency.

Control boxes

We will need control boxes at our two locations. These boxes will take input from 12v DC and an Ethernet connection. The box will have 12v relays for turning on IR lights, and warning lights. It will also contain a network switch to distribute network communication, 12V distribution, and 48v supply to the POE network switch box.

The radar unit, and serial to Ethernet converter can be package in the control box.

Data/Process/Web Computer

Web page to display current speed records. Blue Iris will control cameras and the texts overlay of current speed records. Speed data from DRU III is recorded via network com port. Math functions to record time, speed, max, min, and hourly. Data is sent to MySQL server.  ALPR (Automatic License Plat Recognition) is integrated into the data collection. Time synchronization is critical to syncing in all the sub systems, and data collection.

Serial data comes in through the network and is converted back to a serial com port. The data is processed by a Python program called “r_logger.py”.

Python program “r_logger.py” receives data from the com port and processes the speed data. It writes a text overlay to the camera recordings with current speed data, min, max, event count, and times. Each event is stored on the MySQL server for later processing, and review. Cameras are triggered when the measure speed exceeds a max speed limit value. Video and speed data are synced by GMT and Epoch time.

I was worried that Python would be too slow for this task. I was wrong. It turns out the to be faster that the Arduino units, much faster.

License plate data is processed and inserted into the collected speed data.

OpenALPR is a PIA to use. There is the commercial version that processes way too much data. Figure .01 to .03 cents a plate. We took 6000 scans in a week during the free trial. We are going to a combination of the free and commercial software to try to get down below the 1,000 per month threshold.  We  sort out just the “speeding” videos. Processing them for plate numbers, and then sending the captured pictures to the commercial software. In this way we are not wasting plate scan tries that cost money.

Blue Iris needs to be carefully setup to achieve desired results. I’m beginning to hate BI. The system is windows based and it has it’s plus and minus over Linux.

Cameras

We need a minimum of two camera  to access vehicle plates from each direction. Also needed to protect site from vandalism. The cameras are set to be controlled by the process computer. We trigger theses camera during a speeding event. Current speed and time data is displayed on the video while recording. BI has a web API to control the cameras via the network.

10/2019 Upgrade to 4 fixed Loryta IPC-HFW5241E-Z12E IP  2MP Starlight Cameras. 2 for LPR, 2 for wide view. 2 are connect to Blue Iris 24 hour surveillance. I am currently working on how to dump BI and use Python for speeder video.

Need to add side facing cameras to record high speed speeders. Had a Dodge Charger hit 84mph.

IR Lights

Need at night to balance out the headlight effect at night. Plate are not visible due to the contrast between dark, and the bright lights. Problem solved. Thanks IPCAM talk. HLC settings above 60. Manual  shutter control 500-1000. New Camera are amazing.

 

Stuff:

 

Paul from PB Electronics lead me on to Kustom Signals DRU III OEM radar box. It has an RS232 port, uses low power, and is FCC part 15. Its design for speed signs. Ordering two units to test. Also ordered LED display boards to test.

Cameras:

Amcrest Outdoor PTZ POE Camera, Pan/Tilt/ 12x Optical Zoom https://www.amazon.com/gp/product/B0797583CP/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 These were phased out.

Cameras are pointed in each others direction to protect from sabotage and record vehicles in each direction. Additional cameras protect property and record aggressive behavior.

IR Lights:

Will be used to light license plates at night.

Master computer with 16 cores and 16gb memory for web server, Blue Iris camera system, MySQL server.

Arduino YUN system computer to convert raw radar data and pass to master computer as well as camera trigger control, lights etc. Arduino SUCK. Too slow to do any real work. Replaced with Brainbox.

Many feet of cable. Needed for power as well as network connections. Need to switch to solar, and wifi.

 

*****

 

**

Arduino YUN setup – Gather speed from radar. Set max speed limit. Log speed/direction data into MySQL with current time. YUN communication can be via wired/wireless network. Trigger camera at set speed. Trigger warning lights at set speed. Too slow for my taste. There is a 1-2 second delay. Looking into wireless communication device to directly talk to PC from radar box taking most of the delay out.

OpenALPR – we are now storing license plate info in the MySQL database. Getting a 1000 hits a day which is TMI. Need a way to pause the system. We only need the plate info from the speeders.

The OpenALPR system is a data disaster. We are on a 2 week trial. There is no way to pause, throttle, or sync the data going to the cloud. 30% of the data are repeats from the camera video as the system re-targets the plate. Each hit costs money. We got over 4500 hits in 30 days. What an eye opener. The would cost over $100 per month per camera. I did get the data to feed back into the MySQL database.

Display Unit:

The original unit was a display for the Speedster III unit. We repackage for outdoor and 12v power. The problem with this unit is it is slow to react, and we have no data, or sync signal for cameras.

The 2nd display unit will only display speeds from 25-35 mph. At 35+ mph will will flash an icon display. This is too discourage the racers from “testing their acceleration”. At 25- mph we will display to dots.

Ordered some 12 inch 7 Segment LED for a new display. These LED’s are too costly unless we can get them directly from China. Looking into new display sign. Would an LCD monitor work?