empty

Arduino traffic light controller with PIR & light sensor



This is my traffic light controller. It uses a Trinket from Adafruit (Arduino / ATTINY85 processor). The sequence is activated by a PIR sensor. After a POST flash sequence, if motion is sensed, the lights go through yellow, red, green, off sequence. Program will not run if digital light sensor does not see daylight (the traffic light is pointed towards my bedroom window).

Trinket only has 5 I/O pins. I used 3 outputs – one for each color light, and 2 inputs – one for the PIR and one
. for the light sensor. So to display whether day or night is detected, I added a couple transistors to control a green led for day mode and red led for night mode. The transistors are switched by the signal from the digital light sensor.

In the final assembly, the Trinket will be mounted to a circuit board with the day/night circuit. This board is currently being made by Fritzing.org. the Trinket outputs will control opto-isolated relays for the 120v light circuits in the traffic light device. All control components will be housed in a project enclosure.

More later when it’s finished.


Post time: Aug-31-2017
INQUIRY NOW
  • * CAPTCHA: Please select the Cup