Electronic color sensors find applications in many automated processes such as sorting objects by color, detecting presence of a color coating, etc to improve quality at production line speeds. The fundamental principle of color detection is very simple. You can use an RGB LED and a basic light dependent resistor (LDR) to construct a simple color sensor. The idea is to illuminate a sample material with three primary colors (red, green, and blue), one at a time, and measure the reflected amount of light using the LDR. Each material reflects different combination of red, green, and blue light. For example, the material with red color reflects red light the most. So the LDR response would be higher to the reflected red light than the other two colors. Thus, measuring the amount of light reflected from the sample surface under illumination from red, green, and blue LED individually, the color of the sample surface can be identified.
Tag Archives: ldr
A visual output always adds value to any project. In this third day tutorial, we are going to display some numeric, alphabetic as well as two symbolic characters on a 4-digit seven segment LED module. The way we are interfacing the seven segments LEDs is known as multiplexing, which allows to save some I/O pins of Netduino as compared to driving them individually. The seven segment LEDs are resource and power hungry, but we are going to do this experiment just to get our feet wet in the microcontroller or embedded world and to understand the basics of a seven segments LED displays.
We live in an analog world where most physical variables are analog signals. However, a microcontroller can only process data that is available in digital format. It is precisely for this reason that the analog-to-digital conversion (ADC) is so important in embedded systems that interact with an analog environment. In this tutorial, we will discuss about the ADC capabilities of chipKIT UNO32 board and illustrate how to read an analog input signal from its ADC channels.
Measurement of light intensity is a prime necessity in several occasions. The diversity of such needs make their way to various branches of physics and engineering as well as in media. For instance, in engineering, such kinds of measurements are needed to design optimum lighting conditions of a room. In photography, light intensity measurements ensure good quality pictures by determining the right exposure. Wiring a phototransistor or a light-dependent-resistor (LDR) with an analogue LED voltmeter chip like the LM3914 or even to a microcontroller and displaying the ADC values is a pretty simple technique of measuring light intensity. The bad part of this technique is that these simple and amateur-level devices can only measure relative intensity of light and are unable to provide measurements on an absolute scale. However, with a precise knowledge of the transfer characteristic (resistance vs light intensity) of the LDR it is possible to relate the LDR output to the intensity of light in standard unit. In case the LDR characteristic is unknown or unreliable, you can still calibrate the sensor output by using a variable light source and an external reference photometer. This project is about a microcontroller based light intensity meter where an LDR light sensor is calibrated against an external photometer to obtain the intensity of incoming light in the unit of lux. The lux is the SI unit of illuminance and luminous emittance, and measures lumens per square meter (lm/m2). The microcontroller used in this project is ATMega8L and its firmware is written using mikroElektronika’s MikroC Pro for AVR compiler.