Sunteți pe pagina 1din 5

ABSTRACT

​PROCESSOR LABORATORY

​8051 AUTOMATIC LED LIGHT CONTROLLER


DESCRIPTION

In this project, we implement an 8051 microcontroller-based led lighter. The main


function of the led lighter system is to detect the amount of ambience light
around the sensor and light up an led, based on it. In other words, the sensor will
detect whether it is day or night or whether someplace is dark or not. Accordingly,
the led will be switched on in cases of darkness.LED’s are now finding huge
applications in a household lighting system, automobiles, street lighting, etc. They
are being increasingly used in high-end car headlamps and tail-lamps. In homes,
they have increasingly favored over the traditional filament bulbs or CLF bulbs
because of the LED's longer operating life and very low power consumption. So it
becomes interesting to control an LED-based on the ambient light. For example, if
a car just drives into a dimly lit tunnel, it’s headlamps will automatically turn on
which is good because it eliminates the driver’s intervention. Our project aims to
explore this controlling of LED-based on the AT89C51 microcontroller.
Methodology: ​During daytime when a car drives into a tunnel, the tunnel may
be dark or dimly lit. So it is natural for the driver to turn on the headlamps to see
properly. But it will be one jobless for the driver if switching on or off of the
headlamps is automated. However, due to the limitations of the project, we only
implement the design on a small scale but the working model.

For the light sensor, we use an LDR (light dependent resistor). Since the output
from the LDR circuit is analog in nature, we use an ADC 0804 to interface with the
8051 microcontrollers. The ADC converts the analog signal from the LDR circuit
into an 8-bit binary output. This digital output is given to the 8051 through 8
parallel pins. The microcontroller compares this input with some threshold and
sends a high or low output to the LED. The LED is connected from one of the pins
of the microcontroller through a resistor.
​BLOCK DIAGRAM

Hardware and Software Used:


1). 8051 microcontroller

2).Keiluvision Software

3).LDR, ADC0804
Assembly Language Program​:
Org 0000h
//WR BIT P2.6 //RD BIT P2.5
INTR BIT P2.7
MY DATA EQU P1 //P1.0-P1.7= D0-D7 of the ADC0804
MOV P1 ,#0FFH //make P1 input
MOV B,#3H // store the threshold voltage in B register
SETB INTR
CLR P3.0
BACK:CLR WR
SETB P2.6
HERE:JB INTR,HERE
CLR P2.5
MOV A,P1
CJNE A,B,LOOP
LOOP:JC DEST
CLR P3.0
SETB P2.5
SJMP BACK
DEST:SETB P3.0
SETB P2.5

SJMP BACK

END
Circuit diagram:

Conclusion:
From the project, we find applications of LED when used with AT89C51
in many areas and their importance. This project makes us get a good
grip on the 8051 courses.

BY

YESWANTH(RA1711004010418)

BHAVNA(RA1711004010407)

SHAURYA(RA1711004010432)

S-ar putea să vă placă și