In this project, we’ll design an automatic, energy-efficient streetlight system using Arduino. A streetlight will automatically turn on when the outside ambient light falls below a certain threshold, as evening turns to night. They turn off when sufficient light returns in the morning to conserve energy. So, these streetlights only power on when needed.
The lighting system not only turns on and off but varies in brightness. Additionally, it will turn on if it detects any movement on the road (such as a vehicle or pedestrian) using a proximity sensor. If no movement is detected, the light remains off or dim to save energy.
When an object passes by, the light turns on in a sequence, turning brightest when the object is close and dimming as it moves away. For this demonstration project, we’ll use a series of IR proximity sensors to detect movement and a bright (high-intensity) white LED as the streetlight. Let’s get started.
As shown in the above diagram, this lighting system comprises four blocks of IR proximity sensors, an LDR, Arduino NANO development board, and LEDs
IR proximity sensor: This sensor detects any nearby object (such as a vehicle or pedestrian) and generates a high (+5 V) output as it passes by. The sensor emits IR light and detects IR light reflected by any object in front of it. So, IR light gets reflected, generating a high output. The output is low if there’s no nearby object.
Arduino: detects any nearby object by using proximity sensors. It also detects daylight with the help of the LDR. It turns the LED ON/OFF and also varies its intensity as per the requirements.
LDR: a light-dependent resistor, which varies its intensity depending on the brightness. Essentially, it’s used to detect daylight.
LED lights: white LED lights that are turned ON and OFF in sequence as per the requirements.
The circuit is built using six IR proximity sensor modules, two LDRs, and 12 white LEDs
- The IR proximity sensor module has three pins: (1) Vcc, (2) Gnd, and (3) Out.
- The Vcc pin connects to the Arduino’s 5V output, and the Gnd pin connects to the circuit ground. The out pin connects to Arduino’s pin A0 (digital pin 14).
- All six sensor’s output pins connect with Arduino’s pins A0 to A5.
- The two LDRs connect to Arduino’s analog input pins A6 and A7. Two 10K pull-up resistors also connect to this LDR.
- The digital IO pins D0 – D12 connect with the white LEDs (LED1 to LED12). The LED’s cathodes are shorted and connect with the ground and the anode connects with the pins.
Circuit operation
The circuit operation is simple and uses only one statement. When the sensor detects any object in front of it, two LED lights are turned ON. The LEDs are turned ON and OFF in sequence as each sensor detects a nearby object.
- When Sensor 1 detects any object, it will provide Logic high (1) input to Arduino’s pin A.
- When Arduino receives the Logic 1 input at pin A0, it will turn ON LED1 and LED2 for some time (say, 5 to 10 seconds).
- Similarly, when Sensor 2 detects an object, it provides input to Arduino’s pin A1, which turns ON LED3 and LED4 for a while.
- This sequence continues. For every sensor input, Arduino turns ON two consecutive LEDs.
- When both LDRs detect daylight, they’ll generate a low analog voltage output (0.3 – 0.6V). Arduino reads this low analog voltage and turns OFF all of the LEDs.
- At night, the LDR generates a comparatively high analog voltage output (3.5 – 4.5 V), and Arduino will turn ON all of the LEDs — but with 20% intensity. If a sensor detects an object nearby, the two LEDs will turn ON to full intensity. As the object passes, both LEDs dim to 20% intensity again. The aim is to conserve power so the light is only on when needed.
The program
You may also like:
Filed Under: Arduino Projects, Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.