Mechanics of (older) traffic signal controllers

Started by noelbotevera, December 21, 2024, 01:21:55 AM

Previous topic - Next topic

noelbotevera

A pretty common exercise in electrical / computer engineering degrees when learning about finite state machines is modeling and implementing a very basic traffic signal controller. A traffic signal, at its core, consists of 4 states*:

  • RED on, GREEN on
  • RED on, YELLOW on
  • GREEN on, RED on
  • FLASHING RED (assumed to be an error state)

*Obviously, you can add states for walk cycles, turn phases, presence of overheight vehicles or trains, etc.

Hop over to the Econolite website where industrial controllers are sold, and...yep, they're just microcontrollers. Now they connect to a network (probably an intranet? Be a bad idea to be able to ping a traffic signal and send junk data), and there's lovely software for monitoring, statistics, and what have you. Advances such as sensing cars using a pressure plate becomes pretty trivial with control theory and PLCs.

The thing about implementing finite state machines with digital logic is that they tend to require using a flip flop to store data about the current state. In order to send and receive data about the current state or the next state, a clock signal (a fast and stable square wave) is required, because of the edge triggered nature of flip flops.

Digital logic found its wings in the 1970s, but traffic signals have existed before then. Without microcontrollers, how do you implement a state machine, or any kind of sequential logic? How would additional phases such as walk cycles or turn phases be implemented?** How would it be possible to control traffic at busy intersections like this one (this is 5th Avenue and 34th Street in NYC, photo taken in 1922)?***


**An easy solution is to trigger the walk phase no matter what, but if there's no pedestrians at the intersection then it becomes a waste of time (for motorists). I guess normal operation would require waiting for a button press, at which point switch the phases to a walk cycle.

***An easy solution is to place the signal at the middle of the intersection, and hire somebody to watch traffic (plenty of pictures and therefore examples of this). But that's a boring answer.
Pleased to meet you
Hope you guessed my name

(Recently hacked. A human operates this account now!)


pderocco

I seem to remember from my youth in the 1960s that the traffic lights in Brockton MA, which used red+yellow to indicate a pedestrian phase, did that unconditionally.

By the way, I believe cars were always sensed with inductive loops, because even before digital electronics, they were simple devices. Machine vision may be the first advance in that technology in almost a century.

Bitmapped

They were implemented mechanically, using things like rotating wheels, switches, and relays.

roadman65

Every day is a winding road, you just got to get used to it.

Sheryl Crowe

lepidopteran

One of the earlier methods was a rotating camstack.  A slow-turning motor turned a series of electrical contacts corresponding to each signal phase.  When a contact was made, the low-voltage contact activated a load switch which turned on the actual bulbs.  You could usually hear a buzz or "ka-chunk" sound from the control box when the signal changed phases.

mrsman

Quote from: lepidopteran on December 22, 2024, 01:44:17 AMOne of the earlier methods was a rotating camstack.  A slow-turning motor turned a series of electrical contacts corresponding to each signal phase.  When a contact was made, the low-voltage contact activated a load switch which turned on the actual bulbs.  You could usually hear a buzz or "ka-chunk" sound from the control box when the signal changed phases.
Quote from: roadman65 on December 21, 2024, 06:13:28 PMNew York City still uses click boxes. :bigass:

Absolutely.  You can go to many NYC corners and you can hear the noises of the motors and the relays in this purely mechanical system.

 It is very frustrating that they do not implement actuation-based signaling in NYC.  (Is there even one intersection there that is not purely based on signal timing?)  Many times I sit at a red light for no good reason, no peds and no cross-traffic and not even allowed to make a right on red.

Dirt Roads

Quote from: noelbotevera on December 21, 2024, 01:21:55 AMDigital logic found its wings in the 1970s, but traffic signals have existed before then. Without microcontrollers, how do you implement a state machine, or any kind of sequential logic? How would additional phases such as walk cycles or turn phases be implemented?** How would it be possible to control traffic at busy intersections like this one (this is 5th Avenue and 34th Street in NYC, photo taken in 1922)?***



Quote from: lepidopteran on December 22, 2024, 01:44:17 AMOne of the earlier methods was a rotating camstack.  A slow-turning motor turned a series of electrical contacts corresponding to each signal phase.  When a contact was made, the low-voltage contact activated a load switch which turned on the actual bulbs.  You could usually hear a buzz or "ka-chunk" sound from the control box when the signal changed phases.

The other technique was a rotary motor connected to multiple interlocking "lock-dogs", similar to how early railroad signalling and switching worked.  The motor would first retract a lockrod from its slot; then push the slot left or right, as appropriate; then push a different lockrod into the new slot location.  Each lockpin location would have a small contactor cam that would energize the appropriate lamp.  On the railroads, we had to backcheck any opposing lockrod cams before it was considered safe to illuminate a "proceed" indication (but I've never seen a traffic signal controller use the backcheck of the contactor).  The positions of the "dogs" and the "slots" had to been meticulously maintained, otherwise they would wear out or get jammed.


Quote from: noelbotevera on December 21, 2024, 01:21:55 AMThe thing about implementing finite state machines with digital logic is that they tend to require using a flip flop to store data about the current state. In order to send and receive data about the current state or the next state, a clock signal (a fast and stable square wave) is required, because of the edge triggered nature of flip flops.

Indeed, in the days before electronics, some railroads designed flip-flops using relays (and yes, railroaders called them flip-flops back then).  Notably, railroad signal relays are of fail-safe design with gravity-drop contacts, which allows for an additional possible state where both the "flip" and the "flop" outputs are not energized.  Inexplicably, hardly anybody ever designed a reset circuit and you would have to send someone out to the location to perform a manual reset.  I also cam across a few "flip-flop relays" that had opposing magnet coils that would avoid the double-deenergized state, but these were very expensive and difficult to refurbish.

I've never heard on any traffic signal controllers designed with relays in a multiple flip-flop configuration, but the design would have been quite simple and elegant.  The main issue with a such a design was the tendency to want to use the contacts of inexpensive relays as the contactors for energizing the signal bulbs.  If any manufacturer had ever done so, poor reliability would have tainted this design approach.



Opinions expressed here on belong solely to the poster and do not represent or reflect the opinions or beliefs of AARoads, its creators and/or associates.