Analog Light Sensor Interfacing with ATmega16 and LED Display
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 1×8 LED array. But the LED array can display only 8-bit at a time. So, the 1×8 LED array will first display the lower 8-bit and then the upper 2-bit of the 10-bit digital output with a delay of 500ms. 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 1×8 LED array.
Softwares Required
Hardwares Required
Name | Quantity |
AVR Trainer Board-100 with ATmega16 | 1pc |
AVR USB Programmer | 1pc |
12V, 1A DC SMPS Adaptor | 1pc |
1 to 1 Connector-Female to Female | 3pc |
10 to 10 FRC Female to Female Connector | 2pc |
Analog Light Sensor | 1pc |
Post a Comment