Traffic lights in my city are 12V variant so for testing purposes it is enough to connect our electronics directly to the traffic light bulb power supply. Bulbs are LEDs by the way.
In our case the PIC12F629 is powered from the green light bulb itself, and also the optocoupler on GP5 is also connected to power supply in order to provide information that green light is ON. This optocoupler is redundant in this setup, but I left it for situations where PIC would not be powered from the green light power supply.
Optocoupler that is connected to GP4 is connected to Vehicle Detector. Vehicle Detector must be setup so that it provides signal at output when vehicle is detected AND parked (not moving).
When both conditions are met the LEDs should start blinking. That is it!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.