SlideShare a Scribd company logo
Use of microcontroller
8051
IN LIGHT SENSING AND CONTROLLING DEVICES
Table of contents
● MICROCONTROLLER 8051
● BLOCK DIAGRAM OF 8051
● APPLICATIONS OF 8051
● APPLICATION OF 8051 IN LIGHT SENSING AND
CONTROLLING DEVICES
● INTENSITY METER USING 8051
MICROCONTROLLER 8051
Microcontrollers: It is a programmable integrated circuit (IC) that consists of a small CPU, RAM and I/O pins.
Microcontroller units (MCUs) are widely used in many devices The 8051 microcontroller was invented in 1980's by
Intel. Its foundation is based on Harvard architecture and this microcontroller was developed principally for
bringing it to be used in Embedded Systems. the 8051 microcontroller had a 16-bit address bus for data transfer
accompanied by an 8-bit data bus for carrying data for particular applications.the main features of 8051 are:
● 8-bit CPU through two Registers A & B.
● 8K Bytes – Internal ROM and it is a flash memory that supports while programming the system.
● 256 Bytes – Internal RAM where the first RAM with 128 Bytes from 00H to 7FH is once more separated into
four banks through 8 registers in every bank, addressable registers -16 bit & general-purpose registers – 80.
● The remaining 128 bytes of the RAM from 80H to FFH include Special Function Registers (SFRs). These
registers control various peripherals such as Serial Port, Timers, all I/O Ports, etc.
● Interrupts like External-2 & Internal-3
● Oscillator & CLK Circuit.
● Control Registers like PCON, SCON, TMOD, TCON, IE, and IP.
● 16-bit Timers or Counters -2 like T0 & T1.
● Program Counter – 16 bit & DPRT (Data Pointer).
● I/O Pins – 32 which are arranged like four ports such as P0, P1, P2 & P3.
● Stack Pointer (SP) – 8bit & PSW (Processor Status Word).
● Serial Data Tx & Rx for Full-Duplex Operation
LAYOUT OF 8051
P
Application of 8051
Light sensing &
controlling devices 1
Fire detection & safety
devices
4
Temperature sensing
and controlling devices
2
Industrial instrumentation
devices
3
APPLICATION OF 8051 IN LIGHT SENSING and conrolling
Microcontroller 8051 has many application, one such application is in light detection and controlling of light. Light
Sensing and detection involve variety of application and projects with microcontroller 8051 for example automatic
street light system, obstacle detector ,line follower , light intensity detector. Often these projects involves various
other devices and sensors .brief about the one which we are going to use tis given below:-
● LDR SENSOR:-A Light Dependent Resistor (LDR) is also called a photoresistor or a cadmium sulfide (CdS)
cell. It is also called a photoconductor. It is basically a photocell that works on the principle of
photoconductivity. The passive component is basically a resistor whose resistance value decreases when
the intensity of light decreases. This optoelectronic device is mostly used in light varying sensor circuit,
and light and dark activated switching circuits. Some of its applications include camera light meters, street
lights, clock radios, light beam alarms, reflective smoke alarms, and outdoor clocks..
Intensity meter using 8051
WORKING
Ldr works on the principle of photoconductivity. It’s made up of such material whose conductivity varies as
per light falls on it. As more light falls on it, more number of photon strikes. The kinetic energy of photons is
given to electrons – that makes more number of free electrons – that leads to increase in conductivity of the
device. Thus as light intensity increases, the conductivity increases (resistance decreases) and vice versa. So
the change is the resistance of LDR can be a measurement of the amount of falling light. LDR is used to
measure light intensity inside the room. With a minor change in the circuit, it can be used to measure outdoor
light intensity also. It uses microcontroller AT89C52 and LCD to display light intensity. It also indicates how
much light inside room like “full light”, “good light”, dim light” etc. However, microcontroller cannot detect the
change in resistance directly. LDR has to be given biasing voltage along with pull up or pull down resistance
so that change in resistance is converted into change in voltage. The change in analog voltage is converted
into digital equivalent using ADC and this digital value is read by microcontroller to vary the voltage as per the
change in light intensity and the resistance of LDR, the LDR can be connected with fixed value biasing
resistance in pull up configuration or pull down configuration. If it is connected in the pull down configuration
the voltage increases as light intensity increases and if it is connected in the pull up configuration the reverse
will happen.
CONNECTIONS
● · LDR is connected between Vcc supply and ground through a 10K resistor that gives it bias. The voltage
across biasing resistance is given as analog input to ADC0801
● · Digital outputs DB0 – DB7 are connected to port P1 of AT89C52 microcontroller
● · Control pins RD and WR of ADC are connected with port P3 pins P3.7 and P3.6 respectively
● · Interrupt output pin INTR from ADC is connected to external interrupt 1 pin INT1
● · Chip select pin CS is connected to ground to make chip always enable
● · RC components are connected to CLK R and CLK IN pins that provides internal clock to ADC
● · VREF/2 pin is given voltage through potential divider of R3 and R4
● · The LCD data pins D0-D7 are connected to port P2. Control pins RS and En are connected with port P3
pins P3.0 and P3.1 respectively. RW pin is connected to ground to enable LCD write always enable
● · 1K Pot (not shown in the circuit) is connected to VEE pin to vary brightness of LCD
● · A 12 MHz crystal is connected to crystal input pins XTAL1 and XTAL2 along with two capacitors (not
shown in the figure). It generates required clock signal for the microcontroller.
APPLICATION OF 8051 IN DETETCING LIGHT INTENSITY
CIRCUIT OPERATION
● When light falls on LDR, its resistances varies. More the light falls on LDR decrease
its resistances. As the LDR resistance decreases the analog input voltage to ADC
increases. That means the input voltage to ADC is directly proportional to light
intensity falling on LDR. So more light more voltage and less light less voltage.
● ADC converts this analog voltage into 8-bit digital value and gives it to the
microcontroller. Microcontroller gets this binary input converts it into decimal and
displays it on LCD as light intensity. As the voltage varies from 0 V to around 4.5 V
the corresponding digital output varies from 0 to maximum 240 – 250. The
maximum value is 255 because of its 8 bit ADC.
● The microcontroller compares this value with a different range of values and
decides how much light intensity is. If light intensity value is less than 50 then its
very low light so microcontroller displays message “dim light”. Likewise, as the
value increases the microcontroller decides whether its medium light, good light or
full light etc. Please refer the following table:
APPLICATION OF 8051 IN DETETCING LIGHT INTENSITY
● V = (R / R + LDR) × Vcc
● So as LDR resistance decreases – means light increases, the voltage increases, and vice versa
● In figure (b) the voltage equation changes to
● V = (LDR / R + LDR) × Vcc
● So in this connection as LDR resistance increases- means light decreases, the voltage increases, and vice
versa. So we cannot use this second configuration because we want an increase in voltage with
the increase in light intensity. In this project, LDR is used with pull down resistance configuration. Also, the
value of fixed resistance R should be chosen after calculations such that as the LDR resistance varies from
darkness to full light the voltage V should change from 0 to 5 V. It is very easy to find this value. Just
measure the value of LDR resistance in darkness and full light and select the value of R as the mid value of
this range. E.g. if LDR resistance varies from 1 K to 25 K (in full light to darkness) select R as 10 K.
Software program and logic:
● The program downloaded into internal FLASH of AT89C52 is the soul of the project. It performs following
functions
● · Handles LCD
● · Handles ADC
● · Converts HEX value into decimal and then decimal into ASCII
● · Compares light intensity value and decides how much light
CODE
CODE
Thank you

More Related Content

What's hot

microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
sagar Ramdev
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counterankit3991
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
Rahul Kumar
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
ShivamSood22
 
8251 USART
8251 USART8251 USART
8251 USART
coolsdhanesh
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
Hetauda City College
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counters
cjbas
 
8051 microcontroller and it’s interface
8051 microcontroller and it’s interface8051 microcontroller and it’s interface
8051 microcontroller and it’s interface
Abhishek Choksi
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
SARITHA REDDY
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE
Dr.YNM
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adcPRADEEP
 
Properties of dft
Properties of dftProperties of dft
Properties of dft
HeraldRufus1
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
 
Digital electronics logic families
Digital electronics logic familiesDigital electronics logic families
Digital electronics logic families
BLESSINAR0
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Pic18f458
Pic18f458Pic18f458
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
DominicHendry
 

What's hot (20)

microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
Timers
TimersTimers
Timers
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
 
8251 USART
8251 USART8251 USART
8251 USART
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counters
 
8051 microcontroller and it’s interface
8051 microcontroller and it’s interface8051 microcontroller and it’s interface
8051 microcontroller and it’s interface
 
Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adc
 
Properties of dft
Properties of dftProperties of dft
Properties of dft
 
MICROCONTROLLER 8051
MICROCONTROLLER 8051MICROCONTROLLER 8051
MICROCONTROLLER 8051
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
Digital electronics logic families
Digital electronics logic familiesDigital electronics logic families
Digital electronics logic families
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Pic18f458
Pic18f458Pic18f458
Pic18f458
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 

Similar to Microcontroller ppt

Upfc ppt
Upfc pptUpfc ppt
Upfc ppt
sagar shinde
 
Precise kilometer calculation by underground cable fault detector
Precise kilometer calculation by underground cable fault detectorPrecise kilometer calculation by underground cable fault detector
Precise kilometer calculation by underground cable fault detector
vivekmv716
 
Visiter counter doc
Visiter counter docVisiter counter doc
Visiter counter doc
Prem Kumar
 
AUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROLAUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROL
shiv kapil
 
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCYAUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
Gaurav Singh
 
File 1389427052
File 1389427052File 1389427052
File 1389427052
Aman_preet
 
Wireless greenhouse environment monitoring through sensors
Wireless greenhouse environment monitoring through sensorsWireless greenhouse environment monitoring through sensors
Wireless greenhouse environment monitoring through sensorsSudhanshu Tripathi
 
Street light controlling using Microcontroller
Street light controlling using MicrocontrollerStreet light controlling using Microcontroller
Street light controlling using Microcontroller
9989476539
 
Temperature Based Fan Controller
Temperature Based Fan Controller Temperature Based Fan Controller
Temperature Based Fan Controller
richa1910n
 
Building light automation (1)
Building light automation (1)Building light automation (1)
Building light automation (1)Jeyalakshmi Jei
 
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENTSTREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
m sivareddy
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
Chirag Lakhani
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdf
satyamsinha37
 
04 Arduino Peripheral Interfacing
04   Arduino Peripheral Interfacing04   Arduino Peripheral Interfacing
04 Arduino Peripheral Interfacing
Wingston
 
Cockpit White Box
Cockpit White BoxCockpit White Box
Cockpit White Box
ncct
 
Lica 7th chapter slides
Lica 7th chapter slidesLica 7th chapter slides
Lica 7th chapter slides
SIVA NAGENDRA REDDY
 
Distance Protection
Distance ProtectionDistance Protection
Distance Protection
ncct
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
IJERD Editor
 

Similar to Microcontroller ppt (20)

Upfc ppt
Upfc pptUpfc ppt
Upfc ppt
 
Precise kilometer calculation by underground cable fault detector
Precise kilometer calculation by underground cable fault detectorPrecise kilometer calculation by underground cable fault detector
Precise kilometer calculation by underground cable fault detector
 
Visiter counter doc
Visiter counter docVisiter counter doc
Visiter counter doc
 
AUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROLAUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROL
 
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCYAUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
AUTOMATIC GRID ON SENSING BAD VOLTAGE OR FREQUENCY
 
File 1389427052
File 1389427052File 1389427052
File 1389427052
 
Wireless greenhouse environment monitoring through sensors
Wireless greenhouse environment monitoring through sensorsWireless greenhouse environment monitoring through sensors
Wireless greenhouse environment monitoring through sensors
 
Street light controlling using Microcontroller
Street light controlling using MicrocontrollerStreet light controlling using Microcontroller
Street light controlling using Microcontroller
 
Automatic mall elevator
Automatic mall elevatorAutomatic mall elevator
Automatic mall elevator
 
Badal sharma
Badal sharmaBadal sharma
Badal sharma
 
Temperature Based Fan Controller
Temperature Based Fan Controller Temperature Based Fan Controller
Temperature Based Fan Controller
 
Building light automation (1)
Building light automation (1)Building light automation (1)
Building light automation (1)
 
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENTSTREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
STREET LIGHT THAT GLOWS ON DETECTING VEHICLE MOVEMENT
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdf
 
04 Arduino Peripheral Interfacing
04   Arduino Peripheral Interfacing04   Arduino Peripheral Interfacing
04 Arduino Peripheral Interfacing
 
Cockpit White Box
Cockpit White BoxCockpit White Box
Cockpit White Box
 
Lica 7th chapter slides
Lica 7th chapter slidesLica 7th chapter slides
Lica 7th chapter slides
 
Distance Protection
Distance ProtectionDistance Protection
Distance Protection
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 

Recently uploaded

欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
andreassenrolf537
 
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdfSchematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
nikoloco007
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
lorraineandreiamcidl
 
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Peter Gallagher
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
aozcue
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
u0g33km
 
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
aozcue
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
peuce
 

Recently uploaded (8)

欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
 
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdfSchematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
 
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
 
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样加急办理美国南加州大学毕业证文凭毕业证原版一模一样
加急办理美国南加州大学毕业证文凭毕业证原版一模一样
 
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
 

Microcontroller ppt

  • 1. Use of microcontroller 8051 IN LIGHT SENSING AND CONTROLLING DEVICES
  • 2. Table of contents ● MICROCONTROLLER 8051 ● BLOCK DIAGRAM OF 8051 ● APPLICATIONS OF 8051 ● APPLICATION OF 8051 IN LIGHT SENSING AND CONTROLLING DEVICES ● INTENSITY METER USING 8051
  • 3. MICROCONTROLLER 8051 Microcontrollers: It is a programmable integrated circuit (IC) that consists of a small CPU, RAM and I/O pins. Microcontroller units (MCUs) are widely used in many devices The 8051 microcontroller was invented in 1980's by Intel. Its foundation is based on Harvard architecture and this microcontroller was developed principally for bringing it to be used in Embedded Systems. the 8051 microcontroller had a 16-bit address bus for data transfer accompanied by an 8-bit data bus for carrying data for particular applications.the main features of 8051 are: ● 8-bit CPU through two Registers A & B. ● 8K Bytes – Internal ROM and it is a flash memory that supports while programming the system. ● 256 Bytes – Internal RAM where the first RAM with 128 Bytes from 00H to 7FH is once more separated into four banks through 8 registers in every bank, addressable registers -16 bit & general-purpose registers – 80. ● The remaining 128 bytes of the RAM from 80H to FFH include Special Function Registers (SFRs). These registers control various peripherals such as Serial Port, Timers, all I/O Ports, etc. ● Interrupts like External-2 & Internal-3 ● Oscillator & CLK Circuit. ● Control Registers like PCON, SCON, TMOD, TCON, IE, and IP. ● 16-bit Timers or Counters -2 like T0 & T1. ● Program Counter – 16 bit & DPRT (Data Pointer). ● I/O Pins – 32 which are arranged like four ports such as P0, P1, P2 & P3. ● Stack Pointer (SP) – 8bit & PSW (Processor Status Word). ● Serial Data Tx & Rx for Full-Duplex Operation
  • 5. Application of 8051 Light sensing & controlling devices 1 Fire detection & safety devices 4 Temperature sensing and controlling devices 2 Industrial instrumentation devices 3
  • 6. APPLICATION OF 8051 IN LIGHT SENSING and conrolling Microcontroller 8051 has many application, one such application is in light detection and controlling of light. Light Sensing and detection involve variety of application and projects with microcontroller 8051 for example automatic street light system, obstacle detector ,line follower , light intensity detector. Often these projects involves various other devices and sensors .brief about the one which we are going to use tis given below:- ● LDR SENSOR:-A Light Dependent Resistor (LDR) is also called a photoresistor or a cadmium sulfide (CdS) cell. It is also called a photoconductor. It is basically a photocell that works on the principle of photoconductivity. The passive component is basically a resistor whose resistance value decreases when the intensity of light decreases. This optoelectronic device is mostly used in light varying sensor circuit, and light and dark activated switching circuits. Some of its applications include camera light meters, street lights, clock radios, light beam alarms, reflective smoke alarms, and outdoor clocks..
  • 7. Intensity meter using 8051 WORKING Ldr works on the principle of photoconductivity. It’s made up of such material whose conductivity varies as per light falls on it. As more light falls on it, more number of photon strikes. The kinetic energy of photons is given to electrons – that makes more number of free electrons – that leads to increase in conductivity of the device. Thus as light intensity increases, the conductivity increases (resistance decreases) and vice versa. So the change is the resistance of LDR can be a measurement of the amount of falling light. LDR is used to measure light intensity inside the room. With a minor change in the circuit, it can be used to measure outdoor light intensity also. It uses microcontroller AT89C52 and LCD to display light intensity. It also indicates how much light inside room like “full light”, “good light”, dim light” etc. However, microcontroller cannot detect the change in resistance directly. LDR has to be given biasing voltage along with pull up or pull down resistance so that change in resistance is converted into change in voltage. The change in analog voltage is converted into digital equivalent using ADC and this digital value is read by microcontroller to vary the voltage as per the change in light intensity and the resistance of LDR, the LDR can be connected with fixed value biasing resistance in pull up configuration or pull down configuration. If it is connected in the pull down configuration the voltage increases as light intensity increases and if it is connected in the pull up configuration the reverse will happen.
  • 8. CONNECTIONS ● · LDR is connected between Vcc supply and ground through a 10K resistor that gives it bias. The voltage across biasing resistance is given as analog input to ADC0801 ● · Digital outputs DB0 – DB7 are connected to port P1 of AT89C52 microcontroller ● · Control pins RD and WR of ADC are connected with port P3 pins P3.7 and P3.6 respectively ● · Interrupt output pin INTR from ADC is connected to external interrupt 1 pin INT1 ● · Chip select pin CS is connected to ground to make chip always enable ● · RC components are connected to CLK R and CLK IN pins that provides internal clock to ADC ● · VREF/2 pin is given voltage through potential divider of R3 and R4 ● · The LCD data pins D0-D7 are connected to port P2. Control pins RS and En are connected with port P3 pins P3.0 and P3.1 respectively. RW pin is connected to ground to enable LCD write always enable ● · 1K Pot (not shown in the circuit) is connected to VEE pin to vary brightness of LCD ● · A 12 MHz crystal is connected to crystal input pins XTAL1 and XTAL2 along with two capacitors (not shown in the figure). It generates required clock signal for the microcontroller.
  • 9. APPLICATION OF 8051 IN DETETCING LIGHT INTENSITY
  • 10. CIRCUIT OPERATION ● When light falls on LDR, its resistances varies. More the light falls on LDR decrease its resistances. As the LDR resistance decreases the analog input voltage to ADC increases. That means the input voltage to ADC is directly proportional to light intensity falling on LDR. So more light more voltage and less light less voltage. ● ADC converts this analog voltage into 8-bit digital value and gives it to the microcontroller. Microcontroller gets this binary input converts it into decimal and displays it on LCD as light intensity. As the voltage varies from 0 V to around 4.5 V the corresponding digital output varies from 0 to maximum 240 – 250. The maximum value is 255 because of its 8 bit ADC. ● The microcontroller compares this value with a different range of values and decides how much light intensity is. If light intensity value is less than 50 then its very low light so microcontroller displays message “dim light”. Likewise, as the value increases the microcontroller decides whether its medium light, good light or full light etc. Please refer the following table:
  • 11. APPLICATION OF 8051 IN DETETCING LIGHT INTENSITY ● V = (R / R + LDR) × Vcc ● So as LDR resistance decreases – means light increases, the voltage increases, and vice versa ● In figure (b) the voltage equation changes to ● V = (LDR / R + LDR) × Vcc ● So in this connection as LDR resistance increases- means light decreases, the voltage increases, and vice versa. So we cannot use this second configuration because we want an increase in voltage with the increase in light intensity. In this project, LDR is used with pull down resistance configuration. Also, the value of fixed resistance R should be chosen after calculations such that as the LDR resistance varies from darkness to full light the voltage V should change from 0 to 5 V. It is very easy to find this value. Just measure the value of LDR resistance in darkness and full light and select the value of R as the mid value of this range. E.g. if LDR resistance varies from 1 K to 25 K (in full light to darkness) select R as 10 K.
  • 12. Software program and logic: ● The program downloaded into internal FLASH of AT89C52 is the soul of the project. It performs following functions ● · Handles LCD ● · Handles ADC ● · Converts HEX value into decimal and then decimal into ASCII ● · Compares light intensity value and decides how much light
  • 13. CODE
  • 14. CODE