SM3320A Optical Sensor IC Application Note 1. Overview Here we will introduce how to configure the optical receiver component of a system that exposed printed matter such as paper money to multiple and sequential wavelengths, and detects reflected and transmitted light, using the SM3320. 2. Features The SM3320 is an optical sensor IC with the following built-in components. The sensor module can be configured with few external parts. ・ Photodiode (hereafter, “PD”) with smooth wavelength sensitivity characteristic ・ Charge storage type IV converter with built-in storage time controller ・ Variable gain postamplifier ・ Analog output multiplexer Postamplifier Preamplifier Multiplexer OUT Charge Storage type Variable Gain VDD GND OE SE DATA CLK A1 Serial Interface A0 REF Reference Voltage Source A2 Photodiode Figure 1. SM3320 Function Block SEIKO NPC CORPORATION - 1 SM3320A 3. Image Sensing 3.1. System Overview Photo Detector (reflective) LED Paper Money Photo Detector (transmissive) Paper Feeding System Figure 2. Image Sensing Basics As is illustrated in Figure 2, the SM3320 is an IC designed to work with image sensing systems comprised of a paper feeding system with both an optical source and an optical sensor for authenticating paper money and like products. The high-impedance PD and preamplifier being on the same chip, it can obtain a clear image while picking up minimal noise. Additionally, with its built-in serial interface and output multiplexer, it can be configured as a multi-spot sensor using few external components. 3.2. Detection Method The SM3320 can detect a wide range of wavelengths. On the other hand, it cannot discern different wavelength colors. Therefore, the detection system is one that irradiates the target to light from a monochromatic optical source, and captures the reflected and transmitted light. By altering the wavelength of irradiated light, it can obtain image data from each respective color. Photodiode Spectral response PD分光感度特性 0.6 Photo受光感度[A/W] sensitivity [A/W] 0.5 0.4 0.3 0.2 0.1 0 300 400 500 600 700 800 波長[nm] Wavelength [nm] 900 1000 1100 1200 Figure 3. Spectral Characteristics SEIKO NPC CORPORATION - 2 SM3320A One need only use a single optical source and sensor pair. Figure 4 demonstrates an example of transmitted light detection, but as shown in Figure 5, reflected light can be detected when place on the same side as the LED. Further, as illustrated in Figure 6, there is also a method of irradiating with an edge light system using a light guide plate. light3 light2 light1 light3 light2 light1 light3 light2 light1 light3 light2 light1 LED Paper Money SM3320 To A/D Converter Figure 4. Discrete Irradiation (Transmitted Light Detection) SM3320 LED SM3320 LED SM3320 LED SM3320 LED To A/D Converter light3 light2 light1 light3 light2 light1 light3 light2 light1 light3 light2 light1 Paper Money Figure 5. Discrete Irradiation (Reflected Light Detection) light3 light3 LED Edge Light Type Light Guide Plate light2 light2 LED light1 light1 Paper Money SM3320 To A/D Converter Figure 6. Edge Light System SEIKO NPC CORPORATION - 3 SM3320A 3.3. Optical Receiver Module Construction Here is the control process when using multiple sensors. The VDD or VSS connect to the A0, A1, and A2 pins of the SM3320, and give each IC an individual address. Connected IC addresses must be completely discrete addresses. Up to eight IC’s can be connected to a single module. The CPU provides the same signal to the OE, SE, DATA, and CLK pins. The OUT pin shares the same connection and connects to the AD Converter (ADC). When the SM3320 receives instructions from the CPU, the address data and configuration data are sent together, and only the IC with a corresponding address executes the indicated function. REF A0 A1 A2 OUT REF A0 A1 A2 OUT REF A0 A1 A2 OUT REF A0 A1 A2 OUT Address "0" Address "1" Address "2" Address "3" DATA OE CLK SE DATA OE CLK SE DATA OE CLK SE Address "6" Address "7" REF A0 A1 A2 OUT REF A0 A1 A2 OUT REF A0 A1 A2 OUT DATA OE CLK SE Address "5" REF A0 A1 A2 OUT DATA OE CLK SE DATA OE CLK SE DATA OE CLK SE DATA OE CLK SE Address "4" ADC CPU Figure 7. Illustration of Optical Receiver Module Hard Wiring 3.4. Control Mechanism The SM3320 performs controls using a serial interface. The serial interface performs the following actions. ① Preamplifier transimpedance, postamplifier gain settings (resistor input) ② Selected transimpedance, gain data readout (data readout) ③ Analog signal output for specified IC (OUT pin) Serial data is comprised of the R/W bit, address data, configuration data (preamplifier transimpedance and postamplifier gain). Only the IC that corresponds to the address data executes the indicated function. SEIKO NPC CORPORATION - 4 SM3320A 3.5. Serial Data Configuration 3.5.1. Transimpedance Postamplifier Gain Settings 16-bit configuration. MSB-first input. This configuration is used when the OE bit is set to “L” or “OPEN”. Table 1 MSB LSB Address Data don’t care 0:W Address R/W A2 A1 A0 NC NC NC Preamplifier Transimpedance Feedback Capacitance CS1 CS0 NC Postamplifier Gain Conversion Time TS1 TS0 GS3 GS2 GS1 GS0 Feedback Capacitance: Storage Capacity for preamplifier charge If the MSB’s R/W bit is set to “0,” transimpedance and postamplifier gain are written to the IC corresponding to the address. Transimpedance and postamplifier gain are explained further in Section 5. 3.5.2. Transimpedance Gain Reading Table 2 MSB LSB Address Data don’t care 1:R Address R/W A2 A1 A0 NC NC NC Preamplifier Transimpedance Feedback Capacitance CS1 CS0 NC Postamplifier Gain Conversion Time TS1 TS0 GS3 GS2 GS1 GS0 If the MSB’s R/W is set to “1,” the transimpedance and postamplifier gain set the IC corresponging to the address can be read out. 3.5.3. Analog Signal Output 8-bit configuration. MSB-first input. This configuration is used when the OE pin is set to “H”. Table 3 Address 1:R Address O:W R/W A2 A1 don’t care A0 NC NC NC NC If the OE pin is set to “OPEN,” the analog signal is the firm output for the SM3320’s OUT pin. Since this uses a single IC independently, please do not set the OE pin to “OPEN” when using multiple SM3320’s with a wired-OR. SEIKO NPC CORPORATION - 5 SM3320A 4. Image Signal Readout 4.1. Readout Sequence 14us+17us+Conversion Time (MAX)*2, approx. 91us(MIN) gain setting SIF irradiation amplifier output output command Wavelength1 exposure Wavelength1 measurement gain setting output command gain setting Wavelength2 exposure Wavelength3 exposure Wavelength2 measurement IC ouput approx. 14us+ output command Wavelength3 measurement IC ouput IC ouput 60, 120, 240, 480us+ approx. 17us+ OE SE DATA CLK CLK 10MHz IC1 IC2 IC3 IC4 IC5 IC6 IC7 IC8 60us(code00) 120us(code01) setting setting setting setting setting setting setting setting CLK 10MHz 240us(code10) 480us(code11) each IC output command OUT 8out 7out 6out 5out 4out 3out 2out 1out Figure 8. Readout Sequence The readout sequence of the image signal is as follows. ① Transimpedance postamplifier gain setting matches the irradiated wavelength. (This must be determined in advance.) ② Irradiation time requires at least twice the maximum value of conversion time. There is no upper limit. ③ Analog signal command: after waiting for a settling time of at least 2us for the SM3320 output to stabilize, the AD converter will read the output analog signal. ④ Light irradiation OFF, followed by transition to the no.1 transimpedance gain for the next wavelength. SEIKO NPC CORPORATION - 6 SM3320A 4.2. Transimpedance Gain Settings This function can be set whether or not light irradiation is present. If programming consecutive settings, leave 100ns clear between settings. OE "L" or "OPEN" 1740nsMIN 100nsMIN SE 40nsMIN DATA W A2 A1 A0 don't care CS1 CS0 TS1 TS0 GS3 GS2 GS1 GS0 140nsMIN 40nsMIN 100nsMIN(fck10MHzMAX) 100nsMIN CLK OUT OE:"L" OUT OE: OPEN "Hi-Z" "Enable" Figure 9. Transimpedance Gain Settings 4.3. Transimpedance Postamplifier Gain Reading The transimpedance gain data readout can also be set regardless of the presence of light irradiation. OE "L" or "OPEN" SE 1740nsMIN SM3320 DATA output mode 100nsMIN 40nsMIN DATA R A2 A1 A0 40nsMIN don't care CS1 CS0 TS1 TS0 GS3 GS2 GS1 GS0 100nsMIN 100nsMIN CLK OUT OE:"L" "Hi-Z" OUT OE:"OPEN" "Enable" Figure 10. Transimpedance Postamplifier Gain Reading SEIKO NPC CORPORATION - 7 SM3320A 4.4. Light Measurement (Charge Storage) Until the initial IC readout from irradiation, a time of at least twice the conversion time must be allowed. Conversion time differs according to the value of transimpedance configuration bits TS1 and TS0. Conversion time is impacted by fluctuation in the SM3320’s built-in CR oscillator. [00]=20us(typ), 30us(max); [01]=40us(typ), 60us(max); [10]=80us(typ), 120us(max); [11]=160us(typ), 240us(max). Irradiation Continue irradiation until the readout ends. 2 times the conversion time (MAX) OE Settling time 2us+ SE DATA A2 A1 A0 don't care A2 A1 A0 don't care A2 CLK OUT Figure 11. Light Measurement (Charge Storage) 4.5. Analog Signal Output In analog signal output, 8-bit data that includes an address is delivered. Synchronizing with falling of SE signal, a signal is output by the OUT pin. When a new address is sent, that IC’s OUT pin changes to High-Z, and the signal of the IC matching the new address is output. If the OE pin changes to “L,” all IC OUT pins change to High-Z. Irradiation 2000nsMIN 40nsMIN OE 40nsMIN SE DATA 900nsMI A2 A1 A0 don't care A2 A1 A0 don't care 100nsMIN 100nsMIN CLK Settling Time 2us OUT 1st IC Signal 2nd IC Signal Disable Time 0.1us Figure 12. Analog Signal Output SEIKO NPC CORPORATION - 8 SM3320A 5. Transimpedance Postamplifier Gain Setting Procedure 5.1. Transimpedance The SM3320 preamplifier is the charge storage type IV converter shown in Figure13. The SW in the figure is controlled internally in the SM3320, requiring no external support. One of four is chosen by TS1 or TS0. When the SW is closed, amplifier output is 0V. If the SW opening time is set to “t,” amplifier output ⊿V becomes ⊿V=ip*t/C. Amplifier output is in proportion to photocurrent (ip) as well as charge time (t), and in inverse proportion to capacity (C). Proportional output voltage is obtained from photocurrent, so it can be treated as if it were impedance. Therefore, Zt=t/C is referred to as transimpedance. SW C ip ∆V= - ∆V + AGND ip*t C Transimpedance Zt t Zt= C -Bias Figure 13. Charge Storage Type IV Converter This storage time (TYP) take 10um from conversion time (TYP). Transimpedance is impacted by capacity and conversion time, but this configuration successfully negates that impact. The CR oscillator’s oscillation capacity and storage capacity utilize the same structure. When unit capacity expands, oscillation frequency decreases, extending storage time. Conversely, when unit capacity shrinks, oscillation frequency increases, and storage time shortens. Because oscillation capacity and storage time are proportional, transimpedance can negate capacity variation. SM3320 has a sample and hold circuit built-in, and can therefore maintain the previously stored signal even during charge storage time, so it can always receive a signal regardless of internal timing. Because internal timing cannot be taken concurrent to irradiation, it is necessary to allow twice the conversion time (MAX) for the required measurement time in order to obtain an irradiation signal for the full storage time. Continue irradiation until the analog signal readout ends. Table 4. Transimpedance TS1 TS0 0 0 1 1 0 1 0 1 Conversion Time Typ 20us 40us 80us 160us Max 30us 60us 120us 240us Charge Time Typ 10us 30us 70us 150us Required Measurement Time Min 60us 120us 240us 480us Irradiation Time Min 60us+trd 120us+trd 240us+trd 480us+trd Transimpedance CS[00] 0.5MΩ 1.5MΩ 3.5MΩ 7.5MΩ CS[01] 1.0MΩ 3.0MΩ 7.0MΩ 15.0MΩ CS[10] 2.0MΩ 6.0MΩ 14.0MΩ 30.0MΩ CS[11] 4.0MΩ 12.0MΩ 28.0MΩ 60.0MΩ trd:Analog Signal Readout Time Time relationships are as follows. Conversion Time (Typ)=Charge Time+10us Conversion Time (Max)= Conversion Time (Typ)×1.5 Required Measurement Time=Conversion Time (Max)×2 Irradiation Time=Required Measurement Time+Analog Signal Readout Time SEIKO NPC CORPORATION - 9 SM3320A 5.2. Postamplifier Gain It is possible to configure the postamplifier gain with 4-bit data, making it possible to make adjustments in even finer increments than with transimpedance. GS[3:0] GS3 0 0 0 0 0 0 0 0 Configured Data GS2 GS1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 GS0 0 1 0 1 0 1 0 1 Table 5. Postamplifier Gain Gain (times) GS3 1.00 1 1.08 1 1.17 1 GS[3:0] 1.27 1 1.38 1 1.50 1 1.63 1 1.78 1 Configured Data GS2 GS1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 GS0 0 1 0 1 0 1 0 1 Gain (times) 1.94 2.13 2.33 2.57 2.85 3.17 3.55 4.00 5.3. Basic Thinking for settings Transimpedance has a wide selection range (0.5MΩ to 60MΩ), making increments approximate. Further, selection of TS1 or TS0 assigns limitations to irradiation time. On the other hand, with postamplifier gain, each step moves in an approximate geometric series of 1.09. Therefore, transimpedance is recommended for larger changes in sensitivity such as wavelength and observation method (transmissive, reflective), while post-amplifier gain is recommended for making minute adjustments. Exposure intensity can also be regulated. SEIKO NPC CORPORATION - 10 SM3320A 5.4. Configuration Procedure Start Creation of Photocurrent Estimations Table If you have results with discrete PD, calculate the ratio of PD (discrete) and SM3320 optical receiver surface area. If no discrete PD results, calculate photocurrent thru experimentation. Cf: 5.5. Photocurrent Estimation Method/5.6.2 Photocurrent Estimation Full-Range Postamplifier Setting (target level) Postamplifier Gain Interim Selection Full-Range Preamplifier Calculation Determine based on electrical specifications of utilized ADC and SM3320. Cf: 5.6.3. Full-Range Postamplifier Settings Recommended: 3.0V (when VDD=5.0V, light current 3.5V, dark current 0.5V) For interim selection, use median value, modify later. Cf: 5.6.4 Postamplifier Gain Interim Selection Recommended: 1.94times GS[3:0] 1000(8Hex) Calculate from full-range postamplifier and postamplifier gain. Cf: 5.6.5. Full-Range Preamplifier Calculation Ex: 3.0V÷1.94=1.546V Calculate transimpedance of each wavelength, select approximate value. Transimpedance Selection Cf: 5.6.6. Transimpedance selection Ex: 1.546V÷(SM3320 photocurrent)≈transimpedance Select approximate value for full-range postamplifier target value. Postamplifier Gain Selection NG Cf: 5.6.7. Postamplifier Gain Selection Output Voltage OK NG Total Processing Total Processing Time=Configuration Time + Measurement Time + Readout Time Cf: 5.6.8. Confirming Total Processing Time/4.1.Readout Sequence OK End Figure 14. Configuration Flow Chart SEIKO NPC CORPORATION - 11 SM3320A 5.5. Photocurrent Estimation Method Determining the strength of a photocurrent requires experimentation, but if the system is already outfitted with a Si photodiode discrete component, the photocurrent obtained when using the SM3320 in place of the photodiode can act as a rough estimate. Photodiodes are configured to give an approximate estimation of photo sensitivity per unit area, so it can be assumed that when the same light is irradiated, the photocurrent per unit area will be almost the same. When optical receiver surface area and photocurrent of discrete components are understood, an estimate can be made from the calculation of the SM3320 photocurrent. The SM3320 optical receiver surface area is 1mm2. Table 6 shows an example estimation. Light Type infrared red green blue UV Table 6. Photocurrent Calculations for Light Portion Discrete PD SM3320 Optical Receiver Photocurrent Optical Receiver Photocurrent (uA) (uA) Area (mm2) Area (mm2) Transmitted Reflected Transmitted Reflected Transmitted Reflected Transmitted Reflected Transmitted Reflected 4 4 4 4 4 4 4 4 4 4 0.8 2 0.6 2.6 0.4 2.4 0.2 1.2 0.02 0.8 1 1 1 1 1 1 1 1 1 1 0.2 0.5 0.15 0.65 0.1 0.6 0.05 0.3 0.005 0.2 5.6. Configurations What we introduced here are example configurations when using the SM3320 with image sensing systems comprised of discrete components. 5.6.1. Requirement Specifications Measured Wavelength Count: 5 (IR, R, G, B, UV, Transmitted) Sensor Count: 8 Paper Feed Rate: 200mm/s Paper Feed Pitch: 0.5mm (Interval length of received light for 5 wavelength is 0.5mm, so unseen portion are created.) Measurement Time per Line: 2.5ms SIF Clock Frequency: 1MHz (setting: 18us/wavelength, signal output: 9us/wavelength) SEIKO NPC CORPORATION - 12 SM3320A 5.6.2. Photocurrent Estimation Discrete component optical receiver surface area: 4mm2 Light Type infrared red green blue UV Transmitted Transmitted Transmitted Transmitted Transmitted Table 7. Photocurrent Estimation Discrete PD SM3320 Optical Receiver Photocurrent Optical Receiver Photocurrent (uA) (uA) Area (mm2) Area (mm2) 4 0.8 1 0.2 4 0.6 1 0.15 4 0.4 1 0.1 4 0.2 1 0.05 4 0.02 1 0.005 5.6.3. Full-range Postamplifier Setting (Target Level) Supply Voltage: 5V The OUT pin’s output voltage is guaranteed at 0.7*VDD. Because standard voltage is 0.1*VDD, the output voltage becomes 0.7*5-0.1*5=3V, so set the full-range to 3V. 5.6.4. Postamplifier Gain Interim Selection Assuming 1.94 times the intermediate value GS[3:0] 1000(8Hex) 5.6.5. Full-range Preamplifier Calculation 3÷1.94≈1.546V Full-range preamplifier 1.546V 5.6.6. Transimpedance Selection Calculate the transimpedance of each wavelength individually, and select an approximate value. Using TS[1:0] for the same items makes it easier to control, so it is best to be well-organized. Select TS[1:0][11] for UV, as longer exposures are necessary. Table 8. Transimpedance Selection Target Value Selected Value Conversion Time ZT Light Current ZT Preamplifier (uA) Calculated Value(MΩ) TS[1:0] Max(us) CS[1:0] (MΩ) Full-Range 0.2 7.73 [10] 120 [01] 7 1.4 0.15 10.30666667 [10] 120 [10] 14 2.1 0.1 15.46 [10] 120 [10] 14 1.4 0.05 30.92 [10] 120 [11] 28 1.4 0.005 309.2 [11] 240 [11] 60 0.3 SEIKO NPC CORPORATION - 13 SM3320A 5.6.7. Postamplifier Gain Selection Full-range postamplifier selects a gain that is close to the target value. UV can be attained only with a full-range of 1.2V for maximum transimpedance and gain. If a higher voltage is required, irradiated light power must be increased. Light Type infrared red green blue UV Transmitted Transmitted Transmitted Transmitted Transmitted Table 9. Postamplifier Gain Selection Preamplifier Postamplifier PD Light Current ZT Full-Range Gain Full-Range 0.2 7 1.4 1.94 2.716 0.15 14 2.1 1.38 2.898 0.1 14 1.4 1.94 2.716 0.05 28 1.4 1.94 2.716 0.005 60 0.3 4 1.2 Required Measurement Time(us) 240 240 240 240 480 Configuration Code CS TS GS 0110 1000 1010 0100 1010 1000 1110 1000 1111 1111 5.6.8. Confirming Total Processing Time If using a 1MHz clock, transimpedance and gain must be set to 18us on a single IC. For asset of eight, 144us is required, and similarly, 9*8=72us is required with analog output. Light Type infrared red green blue UV Transmitted Transmitted Transmitted Transmitted Transmitted Table 10. Processing Time Check Configuration Measurement Readout Total Processing Full-Range CS TS GS Time Time Time Time (us) (V) (us) (us) (us) 0110 1000 2.716 144 240 72 456 1010 0100 2.898 144 240 72 456 2520 1010 1000 2.716 144 240 72 456 1110 1000 2.716 144 240 72 456 1111 1111 1.2 144 480 72 696 Exceeded the 2.5ms target. It is believed that a shorter conversion time can be used as a counter-measure by increasing the serial interface clock frequency. Set the IR conversion time (MAX) to 60us, and configure the ZT to a 6MΩ postamplifier gain at 2.33. The results of these modifications are shown in Table 11. Processing time was also able to hit the 2.5ms target. Light Type infrared red green blue UV CS TS Transmitted Transmitted Transmitted Transmitted Transmitted 1001 1010 1010 1110 1111 GS 1010 0100 1000 1000 1111 Table 11. Reset Results Configuration Measurement Readout Total Processing Full-Range Time Time Time Time (us) (V) (us) (us) (us) 2.796 144 120 72 336 2.898 144 240 72 456 2400 2.716 144 240 72 456 2.716 144 240 72 456 1.2 144 480 72 696 SEIKO NPC CORPORATION - 14 SM3320A 6. Mounting 6.1. Foot Pattern Figure 15. Foot Pattern SEIKO NPC CORPORATION - 15 SM3320A Please pay your attention to the following points at time of using the products shown in this document. 1. The products shown in this document (hereinafter ”Products”) are designed and manufactured to the generally accepted standards of reliability as expected for use in general electronic and electrical equipment, such as personal equipment, machine tools and measurement equipment. The Products are not designed and manufactured to be used in any other special equipment requiring extremely high level of reliability and safety, such as aerospace equipment, nuclear power control equipment, medical equipment, transportation equipment, disaster prevention equipment, security equipment. The Products are not designed and manufactured to be used for the apparatus that exerts harmful influence on the human lives due to the defects, failure or malfunction of the Products. If you wish to use the Products in that apparatus, please contact our sales section in advance. In the event that the Products are used in such apparatus without our prior approval, we assume no responsibility whatsoever for any damages resulting from the use of that apparatus. 2. NPC reserves the right to change the specifications of the Products in order to improve the characteristics or reliability thereof. 3. The information described in this document is presented only as a guide for using the Products. No responsibility is assumed by us for any infringements of patents or other rights of the third parties which may result from its use. No license is granted by implication or otherwise under any patents or other rights of the third parties. Then, we assume no responsibility whatsoever for any damages resulting from that infringements. 4. The constant of each circuit shown in this document is described as an example, and it is not guaranteed about its value of the mass production products. 5. In the case of that the Products in this document falls under the foreign exchange and foreign trade control law or other applicable laws and regulations, approval of the export to be based on those laws and regulations are necessary. Customers are requested appropriately take steps to obtain required permissions or approvals from appropriate government agencies. SEIKO NPC CORPORATION 1-9-9, Hatchobori, Chuo-ku, Tokyo 104-0032, Japan Telephone: +81-3-5541-6501 Facsimile: +81-3-5541-6510 http://www.npc.co.jp/ Email:[email protected] ND12028-E-00 2012.09 SEIKO NPC CORPORATION - 16