ablab

Hello Readers, welcome to my Blog - A Blog For Bloggers By A Blogger. I'm Arun, an entrepreneur Blogger from India.

Analog Light Sensor Interfacing with ATmega16 and LCD Display

7669
Mark as Favourite

A light sensor, as its name suggests, is a device that is used to detect light. There are many different types of light sensors, each of which works in a slightly different way. A photocell or photo resistor for example, is a small sensor that changes its resistance when light shines on it; they are used in many consumer products to determine the intensity of light. A charged coupled device (CCD) transports electrically charged signals, and is used as a light sensor in digital cameras and night-vision devices. Photomultipliers detect light and multiply it. Many modern electronics, such as computers, wireless phones, and televisions, use ambient light sensors to automatically control the brightness of a screen, especially in low-light or high-light situations. The output of the Light sensor can be digital or analog. Here, we will use a light sensor with analog output.

In this project, we will learn How to interface an Analog Light Sensor with AVR ATmega16 microcontroller. Since, the output of the analog light sensor is analog in nature and these analog signals cannot be processed directly by the ATmega16 microcontroller. So, first this signal needs to be converted to digital form to be processed by the microcontroller. The conversion can be done with the help of ADC of the AVR ATmega16 microcontroller. After converting the analog signal to digital, the microcontroller will display the digital value in a 16X2 alphanumeric LCD. Now, using a torch we will put light on the sensor and we will see the changes in the output of Analog Light Sensor in the 16×2 alphanumeric LCD.

Softwares Required

Hardwares Required

Name Quantity
AVR Trainer Board-100 with ATmega16 1pc
AVR USB Programmer 1pc
12V, 1A DC SMPS Adaptor 1pc
RG1602A 16X2 Alphanumeric LCD Green 1pc
1 to 1 Connector-Female to Female 6pc
10 to 10 FRC Female to Female Connector 2pc
Analog IR Sensor 1pc

Circuit Diagram

Video

Connection Guide

The step-by-step connection guide for Analog Light Sensor Interfacing with ATmega16 and LCD Display is as follows

  • Steps - 1 ( 0f 10 )

    Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

  • Steps - 2 ( 0f 10 )

    Connect PortB header with LCD data header in AVR Trainer Board-100 with a 10 to 10 FRC Female Connector.

  • Steps - 3 ( 0f 10 )

    Connect RS, RW & EN pins of LCD control header with PD0, PD1 & PD2 pins of PortD header respectively in AVR Trainer Board-100 with 1 to 1 Connectors.

  • Steps - 4 ( 0f 10 )

    Connect the 16X2 Alphanumeric LCD to the LCD header of AVR Trainer Board-100.

  • Steps - 5 ( 0f 10 )

    Connect the VCC, GND & O/P pins of Analog Light Sensor header to 5V, GND and PA0 pins of PortA header of AVR Trainer Board-100 respectively with 1 to 1 Connectors.

  • Steps - 6 ( 0f 10 )

    Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

  • Steps - 7 ( 0f 10 )

    Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

  • Steps - 8 ( 0f 10 )

    Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-AF Cable.

  • Steps - 9 ( 0f 10 )

    Switch on the power with the help of Power Switch of AVR Trainer Board-100.

  • Steps - 10 ( 0f 10 )

    Download Analog Light Sensor Interfacing with ATmega16 and LCD Display Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

  • Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

    Steps - 1 ( 0f 10 )

  • Connect PortB header with LCD data header in AVR Trainer Board-100 with a 10 to 10 FRC Female Connector.

    Steps - 2 ( 0f 10 )

  • Connect RS, RW & EN pins of LCD control header with PD0, PD1 & PD2 pins of PortD header respectively in AVR Trainer Board-100 with 1 to 1 Connectors.

    Steps - 3 ( 0f 10 )

  • Connect the 16X2 Alphanumeric LCD to the LCD header of AVR Trainer Board-100.

    Steps - 4 ( 0f 10 )

  • Connect the VCC, GND & O/P pins of Analog Light Sensor header to 5V, GND and PA0 pins of PortA header of AVR Trainer Board-100 respectively with 1 to 1 Connectors.

    Steps - 5 ( 0f 10 )

  • Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

    Steps - 6 ( 0f 10 )

  • Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

    Steps - 7 ( 0f 10 )

  • Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-AF Cable.

    Steps - 8 ( 0f 10 )

  • Switch on the power with the help of Power Switch of AVR Trainer Board-100.

    Steps - 9 ( 0f 10 )

  • Download Analog Light Sensor Interfacing with ATmega16 and LCD Display Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

    Steps - 10 ( 0f 10 )

Downloads

Analog Light Sensor Interfacing with ATmega16 and LCD Display Project File
  • 25 downloads 0 Kb

Post a Comment