White Paper. Reflective Color Sensing with Avago Technologies RGB Color Sensor. Reflective Sensing System Hardware Design Considerations

Similar documents
RGB COLOR SENSING TECHNIQUE

In sum the named factors cause differences for multicolor LEDs visible with the human eye, which can be compensated with color sensors.

Data Sheet. HDJD-S831-QT333 Color Sensor Module

Light. intensity wavelength. Light is electromagnetic waves Laser is light that contains only a narrow spectrum of frequencies

Analog I/O. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Features. Applications

Data Sheet. HLMP-132x Series, HLMP-142x Series, HLMP-152x Series T-1 (3 mm) High Intensity LED Lamps. Features. Description.

Data Sheet. HLMP-132x Series, HLMP-142x Series, HLMP-152x Series T-1 (3 mm) High Intensity LED Lamps. Features. Description. Package Dimensions

Color , , Computational Photography Fall 2018, Lecture 7

Color , , Computational Photography Fall 2017, Lecture 11

Data Sheet. HLMP-331x, HLMP-341x, HLMP-351x Series T-1 3 / 4 (5 mm) High Intensity LED Lamps. Description. Features.

Application Note 5330

Figure 1: Energy Distributions for light

Color Computer Vision Spring 2018, Lecture 15

Designing the VEML6040 RGBW Color Sensor Into Applications

Features. ESD WARNING: Standard CMOS handling precautions should be observed to avoid static discharge.

HLMP-EG2E, HLMP-EG3E Data Sheet Description Features Applications Benefits

Computer Graphics Si Lu Fall /27/2016

Color Science. What light is. Measuring light. CS 4620 Lecture 15. Salient property is the spectral power distribution (SPD)

CS6640 Computational Photography. 6. Color science for digital photography Steve Marschner

Data Sheet. HLMP-KA45 T-1 (3 mm) High Intensity InGaN Lamp. Features. Description. Applications. Package Dimensions

Data Sheet. HLMP-D101/D105, HLMP-K101/K105 T-1 3 / 4 (5 mm), T-1 (3 mm), High Intensity, Double Heterojunction AlGaAs Red LED Lamps.

Data Sheet. HLMP-KA45 T-1 (3 mm) High Intensity InGaN Lamp. Description. Features. Applications. Package Dimensions

Class #9: Experiment Diodes Part II: LEDs

Color Measurement with the LSS-100P

HLMP-40xx, HLMP-08xx T-1 3/4, 2 mm x 5 mm Rectangular Bicolor LED Lamps. Features

Chapter 3-2 Semiconductor devices Transistors and Amplifiers-BJT Department of Mechanical Engineering

Linear electronic. Lecture No. 1

EXPERIMENT #3 TRANSISTOR BIASING

The RGB code. Part 1: Cracking the RGB code (from light to XYZ)

Data Sheet. HLMP-Pxxx Series, HLMP-Qxxx Series HLMP-6xxx Series, HLMP-70xx Series Subminiature LED Lamps. Features. Description

Experiments #6. Differential Amplifier

H34: Putting Numbers to Colour: srgb

Introduction to Color Science (Cont)

A Simple Portable Colour Identification and Matching Instrument Using AVR Microcontroller and a Provotech Sensor

Frequency Response of Common Emitter Amplifier

Data Sheet. ASMT-Lx50 Flexible Light Strip Module. Features. Description. Applications

Features MIN. CATHODE LEAD ± 0.10 Sq Typ ± MAX. EPOXY MENISCUS

Data Sheet. HLMP-1301, HLMP-1401, HLMP-1503, HLMP-K401, HLMP-K600 T-1 (3 mm) Diffused LED Lamps. Description. Features. Package Dimensions

b b Fig. 1 Transistor symbols

Visible Light Detector B

Data Sheet. HDSM-541x, HDSM-543x 0.56 (14.22mm) Dual digit surface mount LED display. Description. Features. Package Dimensions. Ordering Information

Application Note 5341

Visible Light Detector B datasheet - 150mm wafers

Data Sheet. HLMP-Yxxx. T-1 (3 mm) GaP/GaAsP LED Lamps. Description. Features. Applications. Package Dimension

Bipolar Junction Transistors

Lecture (09) Bipolar Junction Transistor 3

Data Sheet. HLMP-Pxxx Subminiature LED Lamps. HLMP-Pxxx Series, HLMP-Qxxx Series HLMP-6xxx Series, HLMP-70xx Series

Microprocessor based process control

Understand brightness, intensity, eye characteristics, and gamma correction, halftone technology, Understand general usage of color

Digital Image Processing

Design of PID Control System Assisted using LabVIEW in Biomedical Application

Data Sheet. HDSM-291x/293x (7.0mm) Dual digit surface mount LED display. Features. Description. Package Dimensions. Ordering Information

For a long time I limited myself to one color as a form of discipline. Pablo Picasso. Color Image Processing

Data Sheet. AT Up to 6 GHz Medium Power Silicon Bipolar Transistor. Features. Description. 100 mil Package. High Output Power:

Data Sheet. AT Up to 6 GHz Medium Power Silicon Bipolar Transistor. Description. Features. 85 Plastic Package

SKEE 2742 BASIC ELECTRONICS LAB

Features. Applications SQUARE TYP (0.022) 0.40 (0.016) 0.65 (0.026) max CATHODE LEAD 25.40(1.00) MINIMUM 1.52 (.060) 1.02 (.

Using DIAGNOSE.EXE with a ColorQuest 45/0

The Common Emitter Amplifier Circuit

Chapter 6. BJT Amplifiers

Data Sheet. HLMP-ED80 Radiometrically Tested AlInGaP II LED Lamps for Sensor-Based Applications. Description. Features. Applications.

Phy 335, Unit 4 Transistors and transistor circuits (part one)

Application Note 1005

14.2 Photodiodes 411

Color Science. CS 4620 Lecture 15

Analytical Chemistry II

EE 3111 Lab 7.1. BJT Amplifiers

Radiometric and Photometric Measurements with TAOS PhotoSensors

LABORATORY MODULE. Analog Electronics. Semester 2 (2005/2006)

Color Image Processing

Physics 623 Transistor Characteristics and Single Transistor Amplifier Sept. 12, 2017

Agilent HDJD-S831-QT333 Color Sensor Module

Light Intensity and Power Meter Based On LDR and Microcontroller

Transistor Biasing and Operational amplifier fundamentals. OP-amp Fundamentals and its DC characteristics. BJT biasing schemes

Technical Report. Evaluating Solid State and Tungsten- Halogen Lighting for Imaging Artwork via Computer Simulation Roy S. Berns

Features. Red Green Yellow Orange Description

Colour Management Workflow

Ambient Light Sensors General Application Note

Data Sheet. Description. Features. Applications

Interface Electronic Circuits

Dimensions in inches (mm) .268 (6.81).255 (6.48) .390 (9.91).379 (9.63) .045 (1.14).030 (.76) 4 Typ. Figure 1. Typical application circuit.

What will be on the final exam?

ELR 4202C Project: Finger Pulse Display Module

Chapter 8: Field Effect Transistors

12/02/2017. From light to colour spaces. Electromagnetic spectrum. Colour. Correlated colour temperature. Black body radiation.

Lecture 4. Integrated Electronics

Data Sheet. HLMP-3707 T-1 3 /4 (5 mm), T-1 (3 mm), Ultra-Bright LED Lamps

SPECTRAL SCANNER. Recycling

DETECTORS Important characteristics: 1) Wavelength response 2) Quantum response how light is detected 3) Sensitivity 4) Frequency of response

ET 438B Sequential Digital Control and Data Acquisition Laboratory 4 Analog Measurement and Digital Control Integration Using LabVIEW

HDSM-431x/433x 0.39 (10.0mm) Single digit surface mount LED display. Features

Technical Report. A New Encoding System for Image Archiving of Cultural Heritage: ETRGB Roy S. Berns and Maxim Derhak

Lab 2: Discrete BJT Op-Amps (Part I)

Chapter 8: Field Effect Transistors

GCMS-3 GONIOSPECTROPHOTOMETER SYSTEM

ECE 440 Lecture 29 : Introduction to the BJT-I Class Outline:

2. SINGLE STAGE BIPOLAR JUNCTION TRANSISTOR (BJT) AMPLIFIERS

Color vision and representation

Lab VIII Photodetectors ECE 476

Transcription:

Reflective Color Sensing with Avago Technologies RGB Color Sensor White Paper Abstract Reflective color sensing is typically realized through photodiodes with multiple illuminants or photodiodes coated with color filters containing a single illuminant. This paper presents the concept of reflective color sensing using an RGB color sensor. First, reflective color sensing theory and its basic elements are discussed. Then hardware design considerations and sensor output interpretations are addressed. Reflective Sensing Theory There are three important elements in reflective sensing: detector, target and illuminant. The detector is a device that captures light reflected from an object. The target is an object whose color is measured, like colored paper or paint. Typically non-emissive, it reflects and absorbs different amounts of light at different wavelengths. The illuminant is a light source whose spectrum covers the visible wavelengths, like sunlight. In a reflective color sensing system, the detector and illuminant are usually mounted together in a module. When the module is placed close to the target, light from the illuminant will fall onto the target surface and reflect to the detector. The color of the light reflected off the surface is a function of the color of the surface. For example, white light focused onto a red surface is reflected as red. The reflected red light impinges on the color sensor producing R, G, and B output voltages. By interpreting the three voltages, the color can be determined. Since the three output voltages increase linearly with the intensity of the reflected light, the color sensor also measures the reflectivity of the surface or object. Reflective Sensing System Hardware Design Considerations There are three basic elements in a reflective sensing system: the RGB color sensor, an external illuminant such as an LED, and a non-emissive object. 1) Selecting a detector What kind of detector is suitable for reflective sensing? A suitable detector needs to have good sensitivity and spectral coverage. In reflective sensing, light captured by the detector is reflected from the object under measurement. Hence, the intensity of the reflected light is lower than the intensity of the direct lighting source. The spectral response of the individual Red, Green and Blue channels should be overlapping to ensure all wavelength information is captured. Figures 1 and 2 below show the overlapping and non-overlapping spectral responses, respectively. Figure 3 shows an arbitrary spectrum of a signal reflected from a bluish surface. NORMALIZED SENSITIVITY BLUE CHANNEL GREEN CHANNEL RED CHANNEL 400 nm 700 nm Figure 1. Non-overlapping spectral response

NORMALIZED SENSITIVITY BLUE CHANNEL GREEN CHANNEL RED CHANNEL 400 nm 700 nm Figure 2. Overlapping spectral response NORMALIZED SENSITIVITY SPECTRUM OF REFLECTED LIGHT 400 nm 700 nm Figure 3. Spectrum of light reflected from bluish surface NORMALIZED SENSITIVITY 400 nm 700 nm Figure 4. Sensor spectral profile overlaps with reflected light 2

NORMALIZED SENSITIVITY 400 nm 700 nm Figure 5. Sensor spectral profile overlaps with reflected light In a mathematical context, sensor output is directly proportional to the overlapping area of the reflected signal and sensor spectral profile. Figure 4 shows two non-overlapping areas. Information in those regions will not be captured by the sensor. In Figure 5, we observe that the information of the reflected signal is properly captured by the sensor with an overlapping spectral response. Avago Technologies has a range of color sensors suitable for reflective color sensing. These color sensors have good sensitivity and spectral response profiles. Look for these Avago Technologies part numbers: a) HDJD-S722-QR999 b) ADJD-E622-QR999 c) ADJD-S313-QR999 d) ADJD-S312-QR999 2) Selection of Illuminant The illuminant should have a spectrum that is as broad as possible. Why? A broad-spectrum illuminant ensures that the object surface reflectance or characteristic is fully recovered. Figure 6 shows the D65 illuminant spectrum. Other than having a broad spectrum, the illuminant should be relatively bright and available in various sizes. One option to consider is a white LED. One with high brightness and a narrow angle is preferable. In addition, the selection of packages greatly depends on the end application. If space is a constraint, surface mount white LEDs are the ideal choice; otherwise, use through hole lamps. Several recommendations are the HLMP-CW11 and the HSMW- C191. To find out more about Avago Technologies color sensing solutions, contact your distributor, or visit the Avago Technologies website, www.avagotech.com. 1.2 D65 SPECTRUM RELATIVE SENSITIVITY 1.0 0.8 0.6 0.4 0.2 D65 0 380 410 440 470 500 530 560 590 620 650 680 710 WAVELENGTH (nm) Figure 6. D65 illuminant spectrum 3

3) Mounting of the Detector and Illuminant How are the detector and illuminant mounted? Is the mounting of the device important? There are two types of reflection: specular and diffuse reflection (see Figure 7). In specular reflection, equal light is bounced off the surface at a 90 degree angle with respect to the incident light. This type of reflection does not carry much color information. Glossy material will have a higher specular reflectance compared to a matte surface. INCIDENT LIGHT DIFFUSE REFLECTION In reflective color sensing, we are more interested in diffuse reflectance. In this type of reflection, incident light is modified by the surface properties. The degree of reflection at each wavelength is dependent on the surface reflectance. The spectrum of the incident light source will be modified by the object/target surface reflectance. Figures 8 and 9 show the surface reflectance of a red target and the white LED spectrum, respectively. Figure 10 shows the spectrum of the reflected light signal. SPECULAR REFLECTION Figure 7. Specular and diffuse reflection RELATIVE INTENSITY 80 60 40 20 RED SURFACE REFLECTANCE RED SURFACE REFLECTANCE 0 400 440 480 520 560 600 640 680 WAVELENGTH (nm) Figure 8. Example surface reflectance plot of a reddish surface 1.2 HLMP-CW11 RELATIVE INTENSITY 1.0 0.8 0.6 0.4 HLMP-CW11 0.2 0 135791113151719212325272931 WAVELENGTH (nm) Figure 9. HLMP-CW11 spectrum 4

16 REFLECTED LIGHT SPECTRUM REFLECTED LIGHT SIGNAL 14 12 10 8 6 4 2 REFLECTED LIGHT SPECTRUM 0 400 430 460 490 520 550 580 610 640 670 700 WAVELENGTH (nm) Figure 10. Reflected light signal Figures 11 and 12 show the geometrical setup of the illuminant and detector. The setup can also include more than one LED if the brightness from one bulb is not sufficient. Figure 13 shows the top view of a detector with four LEDs. TARGET PATCH COLOR SENSOR DIFFUSE SPECIMEN DIFFUSE Figure 11. A typical setup is 45 /0 geometry Figure 13. 45 /0 geometry COLOR SENSOR DIFFUSE SPECIMEN DIFFUSE Figure 12. A 45 /0 geometry 5

Ambient light rejection/elimination The detector and illuminant pair are enclosed in a housing to eliminate ambient light. The design rule is simple: use an enclosure to minimize ambient light and light traveling directly from the illuminant to the detector. 4) Post Sensor Output Signal Processing a) Second level amplification. Sometimes the output voltage level from the sensor may be too low. Adding a post amplifier will amplify the voltage. A simple amplifier can be constructed using a bipolar junction transistor as shown below. V CC ENCLOSURE/HOUSING (THROUGH HOLE LED) DETECTOR (COLOR SENSOR) R 1 R C V OUT V IN R 2 R E Figure 14. Example setup for a through-hole LED with color sensor ENCLOSURE/HOUSING (SURFACE MOUNT LED) DETECTOR (COLOR SENSOR) The circuit above is a Current-Gain-Stabilized Circuit that provides both stabilization for leakage and current gain change. It is necessary to determine the four resistor values. Usually the manufacturer s datasheet will provide information for the recommended supply voltage (Vcc) and operating point (VCEQ, ICQ, IBQ). Otherwise, the operating point can be chosen as half the supply voltage (VCEQ = 1/2 VCC) to maximize the efficiency of the amplifier. The ICQ and IBQ can then be found by drawing a load line on the transistor characteristics graphs. The selection of the emitter resistor needs some engineering judgment. It must not be too large where it limits the range of the voltage swing of collector to emitter voltage. The typical value of RE will be: CC R E = where 0.1 < k < 0.25 I CQ R E = CC CEQ I CQ R E Figure 15. Example setup for a surface mount LED with color sensor Next are some considerations when selecting the base resistors, R1 and R2. For the circuit to operate efficiently, it is assumed that the current through R1 and R2 be approximately equal to or greater than the base current by 10:1. R E 0.1 x h FE x R E V B = R 2 CC = V BE + V E R 1 + R 2 R 2 R 1 = CC R 2 V BE + V E 6

Another common method of constructing an amplifier is to use an op-amp. The figure below shows the circuit of a non-inverting amplifier with a low-pass filter. The gain and the cutoff frequency are defined with the following equations: R f Vout = 1 + R a 1 f OH = 2π R1 C 1 Vin R a R 1 C 1 + R f Vout b) A/D conversion. An analog to digital converter may be needed to convert the analog voltage outputs from the RGB color sensor if further processing by the microprocessor is needed. Most microcontrollers have built-in ADC, however, a simple microcontroller can be built using a ladder network with a counter and comparator circuits. VOLTAGE INPUT COMPARATOR Stop Sount CONTROL CIRCUIT D0 DIGITAL COUNTER D1------- LADDER NETWORK In the circuit diagram above, the digital counter counts from zero, driving a ladder network that produces a staircase voltage increasing one voltage level for each step count. A comparator circuit, receiving both the staircase voltage and analog input voltage, provides a stop signal once the staircase voltage is greater than the input voltage. The counter value at that time is the digital output. Dn Vref The resolution of this circuit will depend on the number of bits of the counter, n, and the reference voltage of the ladder network. Resolution = Vref 2" There are many ADC chips in the market with a wide selection of resolutions. Avago Technologies color controller chip, HDJD-J822-SCR00, can take in a 3-channel sensor voltage input and convert it to a digital value, which can then be interfaced with other devices using the 2-wire serial interface. The HDJD-J822 has a 10-bit resolution ADC and Vref up to 2.5 V. The best option is Avago Technologies digital color sensor, the ADJD-S313/S312, with an integrated ADC and RGB color sensor in one-chip. 5) Sensor Output Interpretation How do we interpret the sensor output? Color sensor output data can be interpreted via either a look-up table or transformation to a standard color space such as CIE XYZ, CIE LAB, etc. a) Look-up Table The look-up table method is suitable when a set of colors needs to be identified without requiring the actual color point. First, the color of the set of media is measured by the color sensor. The RGB readings are stored in memory together with the color information (teach mode). During the operation mode, the measured RGB readings are compared with the RGB data stored earlier. If the RGB measured matches the RGB stored, usually within a certain tolerance, then the color information for that color can be retrieved. If brightness information is not significant in the application, the ratio of the Red, Green, and Blue readings can be stored instead of the RGB raw readings. The ratio is obtained by dividing the Red, Green, and Blue channels with the value of one of the channels. For example, if the Green channel is selected to be divided, the data stored will be: R n G n B n, = 1, ; Color _inf n where n = 1, 2, 3,... N G n G n G n 7

Below are the flow charts for the programming of teach mode and operation mode: TEACH MEASURE OBJECT READ SENSOR STORE R, G, B READINGS WITH COLOR INFORMATION (CI) R 1, G 1, B 1, CI 1 R 2, G 2, B 2, CI 2 R N, G N, B N, CI N TEACH OPERATION MEASURE OBJECT READ SENSOR (R, G, B) R = R n ±TOLERANCE? NO YES NO G = G n ±TOLERANCE? n = N? YES YES B = B n ±TOLERANCE? NO NO n = n + 1 YES DISPLAY COLOR INFORMATION CI n 8

b) Transformation Matrix The color sensor output can be transformed to standard tri-stimulus values, CIE XYZ using linear models, by multiplying the RGB values with a 3x3 transformation matrix: X Z R G B The question now is: how does one find the 3x3 transformation matrix? One method is the statistical method described below. Statistical Method: The color sensor output can be transformed to a standard color space via a mapping process. The mapping process involves solving the following matrix equation: CIE Camera Matrix Sensor Matrix X1 Y1 Z1 X2 Y2 Z2 R1 G1 B1 R2 G2 B2... =............... Xn Yn Zn Rn Gn Bn Coefficient Matrix a11 a12 a13 a21 a22 a23 a31 a32 a33 or C = S x T where Xn,Yn,Zn denotes the standard color checker values in CIE XYZ. Rn, Gn, Bn denotes the RGB values measured by a color sensor. The goal here is to solve for the coefficient matrix to enable the formation of mapping equations. X = a11 x R + a21 x G + a31 x B Y = a12 x R + a22 x G + a32 x B Z = a13 x R + a23 x G + a33 x B The coefficient matrix, and therefore the individual mapping coefficients, are easily obtained by multiplying the pseudo-inverse of the Sensor Matrix by the camera matrix. c) Conversion from XYZ to CIE Yxy The tri-stimulus values X, Y, and Z define a color in the CIE XYZ space. The CIE XYZ is a 3-D linear color space, and the results are not easily visualized. Because of this, CIE also defined a color space in 1931 for graphing color in 2-D independent of lightness, known as Yxy color space. The Y is the lightness component of color, while the xy are the chromaticity coordinates calculated from the XYZ tristimulus values. The concept of color can be divided into two parts: brightness and chromaticity. For example, the color white is a bright color, while the color grey is considered to be a less bright version of that same white. In other words, the chromaticity of white and grey are the same, while their brightness differs. The x and y are calculated based on the following formulas: x = X X + Y + Z Y y = X + Y + Z Y is identical to the tri-stimulus value Y. d) Conversion from XYZ to another RGB Color Space To convert XYZ to another RGB color space, we can again map it using a 3x3 matrix. R B X Y Z Note: Some XYZ systems use a (100, 100, 100) scale. In this case, divide the RGB by 100 to get a (1, 1, 1) scale. Next, the RGB values obtained are inserted into the following equations to achieve the actual R'G'B' values. R' = round (255 (1 + offset) R( γ ) offset) for 1 R transition R' = round (255 x slope x R) for transition > R 0 The same formula applies to obtain G' and B'. The 3x3 Matrix, offset, gamma, and transition values for most of the RGB color space can be obtained from other literature. T = S -1 x C (Methods for finding a Moore Penrose pseudo-inverse matrix are out of the scope of this paper, but are widely available in other literature). Once the coefficient matrix is established, any measured RGB values can be converted to the standard CIE XYZ space. 9

Example: Conversion from XYZ to srgb R 3.2406-1.5372-0.4986 X B 0.0557-0.2040 1.0570 Z If 0.00313 > R, G, B 0 then R' srgb = round (255 x 12.92 x R) G' srgb = round (255 x 12.92 x G) B' srgb = round (255 x 12.92 x B) else if 1 R, G, B 0.00313 References [1] Understanding Avago Technologies RGB Color Sensors, Publication number: AV01-0444EN [2] Using the HDJD-S722 Color Sensor Application Note 5096, Publication number: 5989-1845EN [3] The Basics of Color Perception And Measurement, HunterLab [4] Electronic Devices and Circuit Theory Robert Boylestad, Louis Nashelsky. Prentice Hall, 1991 Hardcover, ISBN 0132509946 [5] A Review of RGB Color Spaces, Danny Pascale, 2003 R' srgb = round (1.055 R(0.42) -0.055) G' srgb = round (1.055 R(0.42) -0.055) B' srgb = round (1.055 R(0.42) -0.055) The final srgb values can be reproduced in any monitor. Conclusion The two basic elements in reflective sensing system hardware design are the detector and illuminant. A detector with good sensitivity and spectral coverage is desirable, while an illuminant with a broad spectrum is suitable for reflective sensing. Sensor output can be processed or interpreted via two methods: the look-up table and the transformation matrix. Avago Technologies offers a wide range of RGB color sensors and LEDs that meet the above mentioned requirements. The hardware design consideration, post sensor signal conditioning, and methods of sensor output interpretation serve as a general guideline for customers who wish to design a reflective sensing system with Avago Technologies RGB color sensors. For product information and a complete list of distributors, please go to our web site: www.avagotech.com Avago, Avago Technologies, and the A logo are trademarks of Avago Technologies in the United States and other countries. Data subject to change. Copyright 2005-2010 Avago Technologies. All rights reserved. AV02-0172EN - March 22, 2010