Normally, street lights operate throughout the night and are switched off during the day. Nevertheless, when there is no nighttime traffic, there is no need to keep street lights illuminated. The importance of conserving energy cannot be overstated in today’s world, given the rapid depletion of energy resources.
With alternative natural resources in short supply, future generations may grapple with significant challenges stemming from their scarcity. In a previous article, we examined the circuit diagram and its operation for the Auto Intensity Control of Street Lights system. This article, on the other hand, delves into the circuit responsible for detecting vehicle movement and subsequently switching off street lights after a predefined period.
- Construction and Output Video
- Street Lights that Glow on Detecting Vehicle Movement (using AVR Microcontroller)
- Principle Behind this Circuit
- Circuit Diagram
- Circuit Components
- Circuit Design
- How to Operate this Circuit?
- Street Light That Glows on Detecting Vehicle Movement Using 8051 and IR sensor
- Circuit Diagram
- Microcontroller Section
- IR Transmitter and Receiver Section
- Load Section
- Principle of Operation
- Circuit Design
Construction and Output Video
Street Lights that Glow on Detecting Vehicle Movement (using AVR Microcontroller)
Principle Behind this Circuit
The proposed system incorporates several components, including an Atmega8 microprocessor, an LDR, a PIR sensor, and a real-time clock (RTC). This configuration effectively employs a light-dependent resistor (LDR) and a PIR sensor to manage the operation of street lights.
The functioning of the system begins with the LDR, which governs the activation of street lights based on sunlight intensity. The resistance of the LDR is inversely proportional to the intensity of sunlight; it increases as daylight diminishes and reaches a high level in complete darkness. This resistance value serves as the trigger for turning on the street lights.
To account for the fact that the resistance value is at its peak at midnight, the real-time clock comes into play. The controller leverages this information to identify periods of minimal traffic during peak hours and subsequently switches off the lights. The PIR sensor plays a crucial role in detecting any vehicles on the road.
Whenever the PIR sensor detects the presence of a vehicle, it sends a signal to the microcontroller, prompting the activation of the street lights. These lights remain illuminated for a duration of 2 to 3 minutes before automatically turning off.
An alternative approach involves maintaining a minimum light intensity without fully extinguishing the lights, achieved through pulse-width modulation (PWM). In this method, the lights switch to maximum intensity when a vehicle is detected. However, in this article, the circuit is designed to completely switch off the lights, with activation occurring solely when a vehicle is detected.
- ATmega8 microcontroller
- DS1307 IC
- PIR sensor
- LED array
The proposed circuit incorporates essential components, including the ATmega8 microcontroller, PIR sensor, light-dependent resistor (LDR), real-time clock (RTC), and Liquid Crystal Display (LCD).
The Passive Infrared (PIR) sensor, situated at the PD0 pin of the microcontroller, serves as a pivotal element. Its primary function is to detect motion in the vicinity.
Within the PIR sensor lies an IR detector capable of sensing infrared radiation emitted by objects, although this radiation is typically invisible to the human eye. Objects emit IR photons at various wavelengths, and the PIR sensor detects these emissions. Initially set at a high level, the PIR sensor’s output gradually decreases over time and transitions to a low level when it detects any object in motion.
Meanwhile, the LDR is connected to the microcontroller’s ADC pin, specifically ADC0. This connection facilitates the conversion of the LDR’s analog output, which varies based on the incident light, into a digital format.
Light-dependent resistors exhibit low resistance when exposed to light and high resistance in darkness. Consequently, in well-lit conditions, the resistance of the LDR significantly decreases.
The DS1307 real-time clock (RTC) is an I2C-compatible IC, equipped with eight pins. Pins 1 and 2 connect to the crystal oscillator, while a battery is linked to the third pin. The RTC’s 6th pin interfaces with the microcontroller’s PC5 pin, and the fifth pin is connected to the microcontroller’s PC4 pin.
I2C, short for Inter-Integrated Circuit, represents a two-wire interface protocol used for data transmission between devices.
Lastly, the LCD serves as the interface for displaying the time. The circuit diagram indicates the 4-bit mode for interfacing with the LCD. Time data from the RTC is retrieved and then prominently displayed on the LCD screen.
How to Operate this Circuit?
- To begin, turn on the circuit.
- The time read from the RTC is displayed on the LCD.
- Place the LDR in the dark. The street light has now been turned on.
- The time is now constantly checked by the microcontroller. Street lights are turned on according to pre-programmed times.
- They are turned off automatically after this time.
- Place your palm in front of the PIR sensor to turn on the street lights again, illustrating that the street lights are turned on when any item is detected.
- The lights are automatically turned off after a 2-3 second delay.
Street Light That Glows on Detecting Vehicle Movement Using 8051 and IR sensor
The above circuit shows the street light that glows on detecting vehicle movement using avr. Here is the circuit that uses 8051 and IR sensors.
- AT89C52 Microcontroller
- AT89C52 Programmer Board
- 11.0592 MHz Quartz Crystal
- 22pF Ceramic Capacitor
- 2 x 10K Resistor
- 10uF Electrolytic Capacitor
- Push Button
IR Transmitter and Receiver Section
- 8 x IR LED (IR Transmitters)
- 8 x 470R Resistor
- 8 x Photo Diode (IR Receivers)
- 8 x 3.3K Resistor
- 1K x 8 Resistor Pack
- 8 x 2N2222 NPN Transistors
- 8 x 100R Resistor
- 8 x White LEDs
Principle of Operation
The project’s operation hinges on the functionality of the IR Sensor, specifically employing a Transmissive type IR Sensor.
Within the Transmissive IR Sensor setup, the IR transmitter and receiver are positioned in a manner where they face each other, ensuring a continuous detection of IR Rays emitted by the IR Transmitter.
However, when an obstacle intervenes between the IR Transmitter and Receiver, it obstructs the path of the IR Rays, causing the IR Receiver to cease detecting the IR Rays.
This configuration can then be programmed to facilitate the activation or deactivation of LEDs (or street lights) through the microcontroller’s intervention.
The project centers around key components including the AT89C52 Microcontroller, IR Sensor comprising an IR Transmitter and IR Receiver, as well as the LEDs.
To effectively set up the AT89C52 Microcontroller, three essential connections are required: a crystal connection, a reset connection, and external access.
For the microcontroller’s clock operation, an external clock is necessary due to its reliance on the on-chip oscillator. This requirement is met using a crystal oscillator, specifically an 11.0592MHz quartz crystal, with two 22pF ceramic capacitors connected to the XTAL1 and XTAL2 pins.
The reset circuit for the microcontroller comprises a 10K resistor, a 10uF capacitor, and a push button. The circuit diagram provides a detailed depiction of these connections.
Additionally, external access is attainable through a specific pin that can be grounded. However, for this project, which doesn’t require external RAM, a 10K resistor connects this pin to Vcc.
Moving on to the IR Receiver, it is connected to the microcontroller’s port 0 pins. To use PORT0 as an I/O port, external pull-up resistors are necessary, and the connections are illustrated accordingly.
Furthermore, the output of the IR receiver, i.e., the anode terminal of the photo diode, is linked to port 0 pins. The cathode terminals of the photo diodes are connected to the power supply, with a 3.3k resistor bridging the anode terminal and ground.
In contrast, the IR transmitter serves a different purpose, continuously emitting infrared rays, and therefore, it remains unconnected to the microcontroller. Instead, it is linked to power through 8 current limiting resistors of 470 ohms.
Finally, the LEDs are integrated into the circuit, necessitating the use of transistors for connectivity to the microcontroller’s PORT2. The bases of 8 2N2222 transistors are affixed to PORT2, while their emitters are connected to the ground.
Each LED is accompanied by a series current limiting resistor of 100 ohms, both of which are connected to the collector terminal of the respective transistor.
The primary objective of this project is to establish a street light control system through the utilization of an 8051 microcontroller, with the capability to autonomously activate or deactivate street lights based on vehicle movement. The detailed functionality of this project is elaborated upon in the following sections.
To provide a visual representation of the project’s operation, the GIF below illustrates its key functions and features.
The positioning of the IR transmitter ensures a direct line of sight with the IR receiver, guaranteeing a continuous reception of infrared rays by the IR receiver. Consequently, the microcontroller is designed to recognize a Logic 1 signal when the IR receiver receives infrared light, and conversely, it detects a Logic 0 signal when any obstruction interferes with the passage of infrared rays.
As a result, the microcontroller’s software must be intricately crafted to respond to these logic states. Specifically, it should be programmed to illuminate the LEDs, which in this context represent street lamps, upon detecting a Logic 0, and to extinguish the LEDs upon detecting a Logic 1.
Now, let’s consider the practical setup where two IR sensors, the IR Transmitter and IR Receiver, are positioned on opposite sides of the road. According to the circuit diagram, the IR receivers are wired to PORT0, while the LEDs are connected to PORT2 of the microcontroller.
Initially, the IR receiver consistently registers the presence of IR light transmitted by the IR Transmitter when there are no obstructions. However, when a vehicle or any other object obstructs either of the IR sensors, the microcontroller responds promptly by illuminating the three LEDs.
To elaborate further, if the vehicle obstructs the first IR sensor, the microcontroller activates the first three LEDs. As the vehicle progresses and blocks the second IR sensor, the next three LEDs are illuminated, while the first LED of the previous set is concurrently turned off. This sequential process continues in a similar fashion for all IR Sensors and corresponding sets of LEDs.
- The street light control circuit can be used in normal roads, highways, express ways etc.
- The project can also be used in parking areas of malls, hotels, industrial lighting, etc.
- If the lighting system implements all LED lights, the cost of the maintenance can be reduced as the life span and durability of LEDs is higher than Neon based lights which are normally used as street lights.
- As the lights are automatically turned ON or OFF, huge amount of energy can be saved.