Professional projects at Dinaf Traffic Control

Contrary to the what the name says, Dinaf Traffic Control has nothing to do with controlling traffic. This small Dutch company was founded in 1976, and started out by importing traffic counters and traffic signal lamps, the latter led to the company name. Some years later, Dinaf started developing their own brand of traffic counters and quit selling signal lamps altogehter. Today, it maintains a large network of traffic counters in the Netherlands, and provides all sorts of services in traffic counting for government bodies and companies. I worked there from 1997 to 2003 as an all-round technician, but came back in 2007. During that first period, I did some lightweight development work, which would officially become a part of the job in the second period. Below are some of the things I developed and helped develop.

Counting traffic

First, a short explanation of how traffic is counted. For temporary sites, mostly rubber tubes are used. The tubes are made of natural rubber for longevity, and are 13 mm outside diameter and 6.5 mm inside diameter. The tubes span across the road and are fixed with metal clamps and special nails on the sides. For simple counting, one tube per traffic lane is needed. The tube is overrun by a vehicle tyre, air is compressed inside it, and at the end, an air pulse comes out. A microphone-like device detects the sudden change in pressure and puts out an electrical pulse. The counter module of the counter system simply counts all pulses and stores them each 5, 15, 30 or 60 minutes or 24 hours.

For speed and length measurement, two tubes per lane are used, spaced 1 meter apart. From the time delay between the consecutive pulses, speed and axle distance can be calculated. The measurements are stored in classes, ie. all vehicles with speeds between for instance 30-39 km/h are counted separately. The same goes for 40-49 km/h, 50-59 km/h etc. Axle distance is also measured, and classified in the same manner. A device that counts traffic in this manner is hence called a classifier.

For long term sites, induction loops are used. Thin rectangular cuts are made into the road, and 4 loops of heavy duty wire are put into them. A counter or classifier with loop detectors is then installed on a 5 ft. pole at the side of the road. The detectors make the loops resonate at a frequency of about 40 kHz. When a large metal object passes over the loop, its frequency changes slightly and the detector signals the counter that a vehicle is passing.

Website

In September, 2007, I built a new Dinaf Traffic Control corporate website. It was a complete redesign, leaving literally nothing intact. The old website was not only designed very inefficiently, it was also not search engine optimized (not even slightly), it didn't conform to any known web standard (not even slightly) and it didn't supply a shred of information about Dinaf's main activities. It was time for a change.

Presentation

In 2010 I built a graphical presentation on a 42" HD monitor, to be used in the company building's entrance hall, and to draw the attention of visitors on the Intertraffic convention in Amsterdam. It's also available online at the Dinaf website. It's in Dutch, of course.

Software

I built a small application, a socalled file converter, so customers who partly work with a competing brand of traffic counters could import their data into our data processing and database software. The converter application has also come in very handy to very quickly assess a count on-site. We do this at every single site we stop by, and the new app can save up to 30 minutes of work a day, compared to the ancient DOS application we have been using for over 10 years, for lack of something substantially better.

Rampack reader

At the moment I'm finishing a design for a new Rampack reader. Our counters output their data into a module that contains up to 256 kB RAM memory and a battery. The device that reads these Rampacks into a PC was rather large and very slow, required separate grid power, and utilized a serial port. The newer design connects directly to USB, doesn't need separate power, and is 12 times as fast, and about 12 times as compact.

1. The printed circuit board.
1  

1. The printed circuit board.

2. PCB fitted into lower part of the enclosure.
2  

2. PCB fitted into lower part of the enclosure.

3. The prototype.
3  

3. The prototype.

GSM modems

Also known as cellular data modem. In order to remotely access traffic counter data, a cellular modem can be installed. Powered by a 6 Volts, 10-20 Watts solar panel and two or three 6 Volts / 12 Ah lead acid batteries, it can be left unattended virtually forever. A software package, specifically developed for Dinaf, can be instructed to call a list of counter sites, retreive all data and start a new count. Sites may be equipped with a standard V22 line modem (for plain old telephone service) or a GSM. Different script files allow different site setups to be read out.

I developed 4 different cellular modems over the years. The first two were external ones. I hacked a commercial cellular engine into taking a lower supply voltage, and reduced the power consumption down to an impressive 80 mW. It was labour intensive, though. I did about one hundred of them before taking a different approach, moving the modem to the counter rack as an internal module, the GSM-3:

GSM modem

Communication speed is fixed at 4800 baud. The microcontroller in the counter system can't reliably send data at 9600 baud. A flashing LED indicates registration status and call-in-progress. A nasty problem arose with these modems in the field. After being registered to the network for some time, some modules (especially the ones in crowded areas) failed to stay registered. Sometimes this manifested itself after as long as a month, but eventually it would be thrown off the network every time. I designed an external add-on box containing a microcontroller to force the modems to stay registered. This setup worked beautifully for many years, but the cellular engine became obsolete and was having trouble with high supply voltages, so the natural successor was, of course, the GSM-4:

GSM modem

I redid the existing design to fit a newer cellular engine and joined the external add-on box onto the modem circuit board, along with a powerful voltage regulator. The modem is now completely plug-and-play, and doesn't require any setup or adjustment, and is forced to stay registered to the network. It monitors its own power supply voltage and reception strength, and keeps a log of that, which can be accessed remotely. The (now bicolor) LED indicates power status, registration status, reception and call-in-progress. The heart of the board consists of a Microchip PIC16F88, and the firmware is about 2,100 lines of assembler. Plans to let it send a text message when power supply is below a certain level are on the drawing board. And to top it all off, the GSM-4 requires only one third of the power of its predecessors, and consumes as little as 25 mW.

Tube counter tester

Tube tester

I once got the crazy idea to build this tester. And I actually did. All we had was an aquarium pump that generated 25 Hz air pulses and could only connect two tubes. I thought at least to double that amount and to add actual vehicle simulation. For this to work I needed a microcontroller. Having gained experience with the FC-50 foot pedal, I of course used the same micro (PIC16F84-04P) for this project. And what a nice project it turned out. Upon power-up, it recalls its settings from permanent memory and starts simulating traffic on 2 lanes. To change the settings, one can connect a terminal (same one as the ones used for the traffic counters themselves) and change speed, length, number of axles and intervals of each lane, and store them in memory if required.

Being a speaker designer, I considered small loudspeakers to be a good method to generate air pulses. In the picture above you can see 4 Visaton FRS-5 loudspeakers connected to tube connectors. Two of the connectors in the picture have tubes on them. It simply puts 12 volts on the speaker for a very short period of time (0.01 seconds) and the speaker pops out an air pulse. One of the counter's air pressure sensors picks up the pulse as if it came from a tube over a road being depressed by a car tyre. When no tubes are attached, the air pulses can be clearly felt a few inches away from the connectors!

Dinaf now employs three of these testers, and they're in use very regularly.

Loop counter tester

Much like the tube tester, I made a loop classifier tester. Loops are a different way to detect traffic. A rectangular inductor (a loop) of 1.5 by 1.8 meters with 4 turns of heavy wire is embedded in the road surface. A socalled "detector" unit in the traffic counter puts a frequency of around 40 kHz on the coil. When a vehicles passes over, this frequency changes and the detector puts out a signal to the actual counter.

This tester simulates traffic on 4 lanes with different speeds and vehicle lengths. It has 4 preset buttons which call up different settings. A terminal can be connected to change every setting in every preset and presets can be stored and copied to other presets. Loops are simulated by switching small ferrite core inductors. Inside is a PIC16LF628-04I/P running at 3.6864 MHz.

As of this writing, there are two of them, with eight more in the making.

Calibration machine

This one-off piece of equipment is used to speed calibrate every single traffic classifier sold. It's made from an old daisy-wheel printer. All electronics, the paper transport system and the head were removed. Horizontal movement is controlled by a large DC servo with a quadrature encoder on its rear axle. The carriage is attached to a geared belt. The electronics let the motor synchronize with a crystal-based frequency, this way a very constant speed of the carriage is obtained. The carriage has a ferrous metal plate attached which passes along two 2" coils, simulating a vehicle passing over detection loops.

4 preset speeds can be selected. The carriage moves back and forth automatically, waiting for a few seconds every time it returns to its starting position. This project does not utilize a microcontroller. It is built with about 15 standard CMOS logic ICs.

After a few years of use, the mechanics were worn, which rendered it useless.

Matrix sign

This small unit can be connected to a traffic counter with loop detectors. It separately determines the speeds on 4 lanes of traffic, and puts out a signal on either or both of its 2 outputs when a vehicle is speeding. A socalled matrix sign (with a text along the lines of "You're speeding") is then switched on for a few seconds.

Speed limits, reaction times and calibration values can be programmed for each of the 4 incoming lanes through the serial terminal, that's normally used for the traffic counter itself.

The cost savings for our customers are quite large. Almost everything is already on-site: detection loops, detectors and power. Only this small module and the sign have to be installed. Future enhancements include a wireless connection between controller and sign, and on/off switching by modem.

Inside view:

The matrix sign controller is built around a PIC16LF628-04I/P, the same as used in the GSM-3 control add-on.

This is what the 60 by 100 cm sign looks like:



© Joris van den Heuvel, Fuzzcraft.com