My traffic light project has been kicking around for a while now, but I have been pushed to pick it up again by two great discoveries. The first is a Python library for Jira, which makes keeping count of tickets a whole lot easier. The other was what looks like an incomplete project posted by XodusTech which had a really nice case. The lamp that XodusTech used is out of production, but I was still able to find it on eBay. As you can see from the below the difference in size between the new housing and the old one is significant.
I stripped the guts out of the lamp as Xodus did and squirreled it away as possible parts for a future project. It had a very odd rotating switch which I have not seen before. At best guess these are more common the other side of the pond.
I like to keep things as simple as I can, so I stuck with three simple LEDs and cut another piece of plastic to mount them on inside the case. It is a bit Heath Robinson, but these are held in place by electrical tape in case I need to replace them down the line. I also cut a new back plate for the traffic light, so I didn't have to remove the projecting parts from the original but got a bit more space for the Pi.It is a tight squeeze putting one of my older Raspberry Pi B+ inside the case. Sadly there wasn't going to be room for the speaker from my original project. The mess on the left of the image below is a common ground, so I only have a single ground pin on the board in use. The cables for the LEDs are colour coded. The largest issue was having no way to connect a micro USB to the side of the PI. I had to supply power by linking it directly to the GPIO pins which bypasses fuses on the board and is not advised.

You might be wondering where my resistor is in this circuit. After I produced a distressing smell of burning electronics so did I. I had to swap out the burnt out LEDs and I added a resistor to the common ground route.
A quick test of the re-written software and I was good to go. I still have a few things that I would like to do with this yet as a good project is never really finished. I would like to add an inline fuse to try and protect the Pi a little and I would like to add shutdown switch to the base of the traffic light. I can also make things more robust by solder and heat shrinking some of my connections and looking again at how I mount the LEDs as after moving around a bit I am finding connections coming loose.








Comments
Post a Comment