Arduino Traffic Lights

10/04/2020: As part of my teaching job I have been looking for ways where I can set an assignment which varies by course and can have some sort of automated assessment. Typically we set an age old traffic light assignment using prototyping board and Arduino Unos. The results are often challenged as the students struggle with the mechanical elements e.g. bad connections, incorrect value resistors etc. It after all a structured programming module delivered in a very short time frame. So, in order to try and bring some order to the chaos I thought I’d build some hardware that could be used. I have just had the third iteration of the pcb I have designed back and will be building and testing it over the next week or so.

My requirements were something like:

  • Use an Arduino 2560 for full functionality and support an Uno where possible
  • Be able to monitor the students Arduino performance e.g. timings etc.
  • Allow for a wide variety of assignments to reduce student inspiration from previous courses
  • Support a standard crossroads layout
  • Support some form of junction extension e.g. a fire station
  • Padestrian lights and request button
  • Anything else I thought of as I developed it

Here are some shots from the first prototype

First run including bad connections
Here is the cure for a placement error with two LEDs

All the components are hand soldered on this first prototype however there were a few bad connections. Hardly surprising given the small surface mount nature of the components.

I have reflow soldered subsequent boards and these have been pretty much spot on and I’m getting better with practice.

Things have moved on a lot though and I have just received the v1.3 boards which have some significant redesigns in some areas driven from student feedback. I’ll get them built over the next few days and see if they work as I hope.

On the plus side though the couple of prototypes I have working and have been used by students have proven reliable and allowed more time for the actual programming which was one of the primary aims.

14/04/2020: Here we are in the middle of the Covid-19 lock down, the garden has had a lot of attention and more importantly so have my various garage projects.

I have built the v1.3 shield that plugs onto the Uno or 2560 and testing so far has been good. The only down side is I have run out of connectors and cable so I am now waiting on some components to arrive through the post.

More soon