Reflective Proximity Sensor

Downloads #

Introduction #

Proximity Sensors for Education it’s a great deal for schools and teachers around the glode. Thinking about this matter, the PRESSON Reflective Proximity Sensor Circuit Module is a compact 1.6″ by 1.2″ two-sided circuit board that features the TCRT5000 Reflective Optical Sensor, manufactured by Vishay Semiconductors. While the board has very practical industrial applications as a non-contacting limit switch or proximity sensor, it is designed primarily for student experimentation. The board contains the familiar LM311P high-speed voltage comparator and a potentiometer that allows for sensitivity adjustment during experimentation. The board provides a discrete (digital) output signal that pulses to a logic high w hen a reflective object approaches the sensor. A small (3mm) red LED indicator illuminates with this condition, serving as a visual aid in sensitivity adjustment. The board also contains easily accessible test points, allowing the student to monitor and compare the output of the TCRT5000 sensor and an adjustable reference voltage. The module has two mounting holes for direct connection to a panel or baseplate. It also contains a right-angle pin header for easy attachment to a student’s breadboard. Figure 1 shows both the front and back sides of the fully assembled Reflective Proximity Sensor.

Figure 1: Front and Back View of Reflective Proximity Sensor

Figure 2 represents the silk screen (top) layer of the Reflective Proximity Sensor printed circuit board (PCB). This silk screen layer clearly indicates the location (land pattern or footprint) of each component.

Figure 2: Silkscreen Layer of Reflective Proximity Sensor

Figure 3 uses colors to represent the PCB layers. The ground plane and traces on the lower layer of the circuit board are represented in green while traces and pads on the upper layer of the board are shown in red. Locations of components on the upper layer of the PCB are shown in yellow.

Figure 3: Reflective Proximity Sensor Layers

Table 1 lists and defines several of the reference designators used to identify components contained on PRESSON circuit boards.

Table 1 – Common Component Designators
DesignationDescription
J (J1, J2, J3…) Input/Output Connector 
TP (Tp1, TP2, TP3…) Test Point 
JP (JP1, JP2, JP3…) Jumper Position
R (R1, R2, R3…) Resistor
C (C1, C2, C3…) Capacitor
L (L1, L2, L3…) Inductor
U (U1, U2, U3…) Integrated Circuit (IC)
Q (Q1, Q2, Q3…) Transistor
LED (LED1, LED2…) Light Emitting Diode
PTC (PTC1, PTC2…) Resettable Fuse
RT (RT1, RT2, RT3) Thermistor
K (K1, K2, K3…) PCB Relay
SW (SW1, SW2…) Switch

Table 2 contains the bill of materials (BOM) for the Reflective Proximity Sensor. With the exception of the PCMRPS060217 printed circuit board, the product numbers listed in this table are Mouser Electronics part numbers.

Proximity Sensors for Educationi and the Circuit Module Theory of Operation: #

Looking at Proximity Sensors for Education and its impact. The following is a detailed, component level introduction to the operation of the Reflective Proximity Circuit Module. The lesson begins with an explanation of the structure and operation of the Vishay TCRT5000 Reflective Optical Sensor. We will refer to the technical datasheet for that device throughout this part of the discussion. The lesson continues with an overview of the operation of the module’s comparator and LED indicator circuitry.

Figure 4 contains a diagram showing the operation of the TCRT5000 Reflective Optical Sensor. We will now search for additional technical data on this device to learn more details about its operation. We can find the manufacturer’s datasheet for this product by returning to Mouser Electronics website. Entering the manufacturer’s part number (TCRT5000) in the Part # / Keyword box could produce two possible search results: Mouser parts 782-TCRT5000 and 782-TCRT5000L. It is important to note that these numbers represent the same product, the only difference being in the packaging method. (One is shipped in bulk, while the other is enclosed in a protective tube.) Click on the Datasheet link (for either part number) to access the manufacturer’s PDF datasheet. (The user could download this document and save it on their computer, possibly creating a file of manufacturer’s datasheets for devices they plan to use in future projects.)

Figure 4: Structure and operation of the TCRT5000 Reflective Photosensor

The term infrared literally means “below” red, referring to that portion of the electromagnetic spectrum directly below the range of visible light. Infrared light is much preferred for optical signaling circuitry because the intensity of an IR light beam is relatively unaffected by changes in ambient visible light. Also, as stated in the bulleted FEATURES on page 1 of the datasheet, daylight filtering on the detector side of the device further inhibits the effects of ambient visible light. The small light-blocking barrier, shown in Figure 4 of this document, prevents IR energy produced by the emitter from directly entering the detector. Ideally, only the reflected light beam is sensed at the detector side of the device. The datasheet Features specify Emitter wavelength: 950 nm (where nm represents nanometers). It is important to note, in optoelectronics, the term “emitter” refers to the component within a device that produces or emits the light. For the TCRT5000, the emitter is an infrared (IR) LED producing a light beam with a wavelength of 950 nm. The FEATURES also identify the detector component within the TCRT5000 as a phototransistor. The phototransistor (left hand component in the symbolic diagram of the photosensor in Figure 4) has collector (C) and emitter (E) terminals. However, there is no base terminal. As the reflected 950 nm infrared light strikes the base material of the phototransistor, it stimulates the flow of electrons from the E terminal toward the C terminal of the device.

Figure 5 is a schematic diagram of the circuitry contained on the PRESSON Reflective Proximity Sensor Circuit Module.

Figure 5: Schematic Diagram of Reflective Proximity Sensor Circuitry

In the upper LH corner of Figure 5, the TCRT5000 (U1) and resistors R1 and R2 are identified as the Reflective IR Sensor section of the system. Here R1 serves as the ballast (current limiting) resistor for the IR diode within the TCRT5000 and R2 serves as the collector load resistor for the internal phototransistor. Referring to the BASIC CHARACTERISTICS table at the bottom of page 2 of the datasheet for the TCRT5000, we see the forward voltage drop (VF) of the internal IR diode could be as low as 1.25V or as high as 1.5V. Note this voltage range was determined with the test value of forward current for the diode (IF) held at 60mA. As seen in the table of ABSOLUTE MAXIMUM RATINGS, starting at the bottom of page 1 of the datasheet, 60mA represents the highest allowable value of IF for the internal diode! (Typically, a manufacturer would have tested the device at a much lower forward current, such as 20mA.)

We will now determine the actual value of IF for the IR diode inside the TCRT5000. In Table 2 of this document, we see that R1 equals 270Ω. Using Kirchhoff’s and Ohm’s laws, we can estimate the voltage developed over R1. Assuming VF of the diode to be the typical value given in the datasheet:

\[VR1 = {5.0 VDC – 1.25 V = 3.75 V}\]
\[IR1 = IF = {VR1 \over R1} = {3.75 V \over 270\Omega} {= 13.9 mA}\]

Because VF of the IR diode varies only slightly with temperature, we can assume that IF for the diode will remain near 14mA during the operation of the circuit module. However, the collector current of the internal phototransistor of the TCRT5000 varies as a function of the intensity of the IR beam reflected back to the detector side of the device. To understand the relationship of the nearly constant forward current of the IR diode and the variable collector current (IC) of the internal phototransistor, we must first understand an important photosensor parameter called the current transfer ratio (CTR). As indicated in the first note under the PRODUCT SUMMARY table on page 1 of the datasheet, the CTR is determined as Iout/Iin, where Iin is the IF of the IR diode and Iout is the phototransistor collector current. Typically, CTR is expressed as a percentage. For example, assume for the TCRT5000 that IF of the IR diode equals 14mA and IC of the phototransistor equals only 1.6mA:

\[CTR = {1.6mA / 14mA x 100% = 11.4%}\]

Due to the reflective operation of the TCRT5000, the CTR for that device varies with the distance between the sensing side of the device and a reflective object. Referring again to the PRODUCT SUMMARY on page 1 of the datasheet, we see the optimal sensing distance, that which exhibits the best CTR, is 2.5 mm, or nearly 0.1.” Referring to the graphs in Figures 8 and 9 on page 4 of the datasheet will help us further understand the relationships of IF of the IR diode, IC of the phototransistor, and the CTR. Figure 8 indicates the photosensor CTR will approach a maximum level (slightly higher than 10%) as the forward current for IR diode begins to exceed 10mA. Recall that in a previous calculation, we determined the bias point for IF to be nearly 14mA. This could be considered as an optimal operating region for the IR diode. According to the graph in Figure 8, any further increase in diode IF would have minimal effect on CTR. The graph in Figure 9 of the datasheet shows the relationship of the sensing gap (or working distance) and phototransistor collector current. Note this graph verifies the TCRT5000 sensitivity to be greatest with a working distance of 2.5 mm (nearly 0.1″).

Referring to Figure 5 of this document, we see that the emitter terminal of the phototransistor within the TCRT5000 is connected directly to the ground plane. Thus, with R2 connected between the collector terminal and the +5.0VDC supply, the phototransistor is effectively in a common emitter biasing configuration. By performing step 12 of the Reflective Photosensor Circuit Module Kit Testing Procedure, the user can verify the /Proxmity_Sense signal (measured at pin 2 of TP1) decreases in amplitude as the glossy side of the test card moves closer to the TCRT5000. As the glossy material approaches within nearly 0.1″ distance from the photosensor lenses, the collector current of the phototransistor should have increased toward its maximum value. At any given instant, the voltage developed over resistor R2 is determined as the product of collector current and the ohmic value of R2. Thus:

\[VR2 = {IC \times R2}\]

Also, per Kirchhoff’s law, at any given instant, the amplitude of the /Proximity_Sense signal represents the difference between the supply voltage and VR2. Thus:

\[Proximity Sense = {+5.0VDC – VR2}\]

Assume, for example, in performing step 12 of the testing procedure, the /Proximity_Sense voltage decreased to 0.9VDC. By manipulating the above equations, we could estimate the value of IC for the phototransistor and thus approximate the maximum CTR for the photosensor.

\[VR2 = {+5.0VDC – 0.9V = 4.1 VDC}\]

Using the 3.3KΩ value for collector resistor R2 specified in Table 2 of this user’s guide:

\[IC = {4.1 VDC \over 3.3K\Omega} = {1.24mA}\]

Assuming the IR diode IF remains at nearly 13.9mA:

CTR = 1.24mA / 13.9mA x 100% = 8.9%

Note the value of CTR determined above is below 10%, while the graph in Figure 8 of the datasheet indicates that the CTR could easily exceed 10%. A reason for this would, as indicated by the third note at the bottom of page 2 of the datasheet, an actual mirror was used by the manufacturer while testing the product (as opposed to using the glossy cardboard).

Integrated circuit U2 and resistors R5, R6, R7, and R8 comprise the voltage comparator section of the Reflective Photosensor Circuit Module. As described in Table 2 of this guide, U2 is a high-speed voltage comparator that continuously compares the instantaneous voltage levels of the Sensitivity_Adjust signal and the /Proximity_Sense signal. The Mouser part number given for U2 in Table-2 (595-LM311P) represents a Texas Instruments IC, manufactured in a DIP-8 package. We can find the manufacturer’s datasheet for this product by returning to Mouser Electronics website (www.mouser.com). Because there are several Texas instruments parts sold by Mouser that start with the sequence “595-LM311P,” entering the Mouser part number 595-LM311P in the Part # / Keyword box will produce several search results. Click on the Datasheet link for the part number to access the manufacturer’s PDF datasheet. (Again, you are advised to download this document and save it on your computer or flashdrive.)

The LM311 is a widely used and highly versatile semiconductor device. As shown in the Device Information table on page 1 of the datasheet, Texas Instruments offers the product in a variety of semiconductor packages. The P suffix (as with LM311P) indicates a PDIP, or plastic dual in-line package. The pin-out for the PDIP version of the LM311P is shown in the upper LH corner of page 3 of the datasheet. The function for each pin of the device is identified and briefly described in the Pin Functions table below the pin-out diagrams. Keep this page of the datasheet visible on your computer screen while referring to Figure 5 of this document.

The operation of the LM311P comparator within the Reflective Photosensor Circuit Module is very basic. Neither the Strobe nor Balance function of the device is used in this application. For this reason, as shown for U2 in Figure 5, pins 5 and 6 are shorted together. (As is explained at the top of page 15 of the datasheet, this is an acceptable method of disabling the STRB/BAL pins.) The LM311P can operate from a dual power supply, such as the typical +/-12.0VDC. However, as seen in Figure 5 of this document, U2 is operating from a single +5.0VDC source. For this reason, the negative supply terminal (VCC- at pin 4) and the emitter terminal of the output transistor (EMIT OUT at pin1) are both connected to the circuit module’s ground plane. Because the LM311P has an open-collector output, it requires a pull-up resistor. As shown in Figure 5, the 1KΩ pull up resistor R8 is connected between the output terminal of U2 (COL OUT at pin 7) and the +5.0VDC supply. R5 and R6, both equaling 1KΩ, serve as input resistors to U2, while 511KΩ resistor R7 provides a path for negative feedback, stabilizing the comparator operation.

Referring to page 3 of the datasheet, we see that pin 2 of the LM311P serves as the non-inverting comparator input (symbolized as IN+). Pin 3 of the LM311P serves as the inverting comparator input (symbolized as IN-). As shown in Figure 5 of this document, the Sensitivity_Adjust signal connects to the IN+ input of U2 via R5, while the /Proximity_Sense signal connects to the IN- input of U2 via R6. The development of the /Proximity_Sense signal, as the output of the TCRT5000 has already been discussed in detail. This signal can be described as analog, because the voltage varies gradually in response to changes in the IR energy entering the detector section of the TCRT5000. The output voltage of comparator U2, Proximity_Sense, can be described as discrete, because it pulses rapidly between a low level of nearly ground potential and a high level of about +4.5VDC.

The basic operation of comparator U2 is as follows. We assume that 10Kohm potentiometer R3 has been adjusted to provide a desired level of threshold voltage (Sensitivity_Adjust) at the non-inverting input to comparator U2. As an example, assume Sensitivity_Adjust has been adjusted to +1.75VDC. Also assume there is no reflective object near the sensing area of the TCRT5000 and that /Proximity_Sense signal equals nearly 3.5VDC. With the IN- voltage level higher than the +1.75VDC threshold level at IN+, the comparator output signal, Proximity_Sense, will be near ground potential. Proximity_Sense, will remain at this low level as long as the /Proximity_Sense level exceeds the Sensitivity_Adjust threshold. However, as a reflective object approaches the sensing area of the TCRT5000, the /Proximity_Sense signal gradually decreases in amplitude. Eventually, /Proximity_Sense falls below Sensitivity_Adjust. With the IN- voltage level now lower than the +1.75VDC threshold level at IN+, the Proximity_Sense output rapidly toggles to a logic high level approaching +4.5VDC.

The Proximity_Sense signal functions as the TTL compatible discrete switching output for the Reflective Photosensor Circuit Module and also serves as the input signal to the common-emitter LED driver, containing transistor Q1, LED1, base resistor R9, and LED ballast resistor R10. For this circuit, the voltage of base resistor R9 is determined as follows using Kirchhoff’s law:

\[VR9 = {Proximity Sense – VBE }\]
\[VR9 = {4.5V – 0.7V} = {3.8V}\]

With base resistor R9 equaling 27KΩ, base current is determined using Ohm’s law:

\[IR9 = {IB} = {VR9 \over R9} = {3.8V \over 27K\Omega} = {141\mu A}\]

We will now return to the Mouser website (www.mouser.com) to find important information about the 512-2N3904TFR, which is used as switching transistor Q1. Entering the part number 512-2N3904TFR in the Part # / Keyword box should produce just one search result. Click on the 2N3904TFR Datasheet link to access the manufacturer’s PDF datasheet. The 2N2304 is a widely used general purpose, small signal npn bipolar junction transistor (BJT). The part is manufactured in the industry standard TO-92 transistor package, typically with straight leads. The 2N3904TFR version of the product, manufactured by Fairchild Semiconductor, has kinked leads with a 0.1″ spacing, which makes the part ideal for use in student breadboarding. (Again, you are advised to download this document and saving it on your computer or flash drive.)

An important parameter to consider in the design of a transistor switch is the DC Current Gain. Several values of this parameter are given in the ON CHARACTERISTICS found on page 3 of the 2N3904 datasheet. DC Current Gain, symbolized as hFE, is the ratio of collector current to base current: (IC/IB). As seen in the ON CHARACTERISTICS, hFE can vary widely, depending on the value of collector current. Also, as shown for a collector current value of 10mA, current gain could vary greatly, between 100 and 300!

While keeping the 2N3904 datasheet open, we will momentarily open to the datasheet for LED1, which has Mouser part number 604-WP132XID. In designing LED control circuitry, we must know the minimum and maximum values of forward voltage (VF) for the device. In the Electrical/Optical Characteristics table on page 2 of the WP132XID datasheet, we see that, with a 10mA test current, VF could vary between 1.9V and 2.3V.

In designing the LED drive circuitry, we need to ensure that transistor Q1 switches on in full saturation. With this condition we can estimate transistor collector-to-emitter voltage (VCE) to be as low as 0.2V. We will now determine if Q1 saturation exists for the LED drive circuitry in Figure 12. Using Kirchhoff’s law, we can estimate the voltage that should develop over ballast resistor R10 with transistor Q1 in saturation:

\[VR10 = {+5.0VDC – VF – VCEsat}\]

Using the minimum value of VF specified in the WP132XID datasheet:

\[VR10 = {+5.0VDC – 1.9V – 0.2V} = {2.9V}\]

Using Ohm’s law, we can now estimate the value of collector current IC:

\[IR9 = {VR10 \over R10} = {2.9V \over 187\Omega} = {15.5mA}\]

We will now determine the actual ratio of collector current to base current using the calculated values of collector current and base current:

\[HFE (actual) = {IC \over IB} = {15.5 mA \over 141\mu A} = {110}\]

Note this calculated current gain is near the minimum value specified in the 2N3904 datasheet, given a collector current value of 10mA. Thus, we can safely assume the actual current gain for transistor Q1 will be higher than the minimum value of 100 and the transistor switch will enter full saturation when the Proximity_sense output signal toggles to its high state of around 4.5V.

Using the PRESSON as a Proximity Sensors for Education in a Project: #

When using the PRESSON Reflective Photosensor Circuit Module in a project you stimulate the use of Proximity Sensors for Education, and a major design factor to consider is power distribution. The module is designed for optimal operation with an input voltage of +5.0VDC (taken at pin 1 of connector J1). If the primary power source for the user’s project has a higher voltage level, such as +9.0VDC or +12.0VDC, then to maintain TTL compatibility of the Reflective Photosensor Circuit Module and protect it from excessive power dissipation, the use of a regulated point of load (POL) voltage source to safely power the module is strongly recommended. Figure 6 below illustrates a simple POL power solution for the Reflective Photosensor Circuit Module.

Figure 6: Connecting the Reflective Proximity Sensor to a Voltage Source

The +5.0VDC POL regulator, outlined in blue in Figure 6, consists of only three components and is easily fabricated on the user’s breadboard. U1 is a small STMicroelectronics low dropout (LDO) +5.0VDC regulator in a TO-92 package (Mouser part number 511-L4931CZ50-AP). Input filter capacitor C1 is a 0.47μF, 50V MLCC (multi-layer ceramic capacitor), Mouser part number 80-C322C474M5U). Stabilizing capacitor C2 is a 2.2uF, 25V MLCC (Mouser part number 810-FG28X5R1E225KRT6). With the circuitry shown in Figure 6, the input voltage to the POL regulator could be as high as +20VDC, so it could easily handle standard working voltages such a +9.0VDC, +12.0VDC, +15VDC, or even +18VDC.

Using the 511-L4931CZ50-AP as the regulating device for the POL circuitry ensures that the Proximity_Sense output signal of the Reflective Photosensor Circuit Module is TTL compatible (toggling between around +4.5V and nearly 0V), allowing it to be sent to any digital circuitry operating from a +5VDC source. The Proximity_Sense signal could also be sent directly to a port pin of a microcontoller operating from a lower-level voltage source, such as +3.3VDC, providing the technical data for that device clearly specifies its port pins are “5 volt tolerant.” An example of a microcontroller featuring 5-volt tolerant port pins is the C8051F330-GM MCU (microcontroller unit), manufactured by Silicon Labs. This product is featured in another PRESSON product, the free-standing C51 Microcontroller Project Launcher.

In design applications where the output of the Proximity_Sense signal is being sent to a device that is not 5 volt tolerant, it is necessary to fabricate amplitude limiting switching circuitry to serve as a buffer between the output of the Reflective Proximity Sensor Module and the input to the lower-voltage device. Figure 7 below illustrates a simple transistor switching solution which allows the Proximity_Sense output signal from the Reflective Photosensor Circuit Module to be compatible with the input to a device operating from a +3.3VDC power source.

Figure 7: Application of a Level-Shifting Transistor Switch

The amplitude limiting switching circuitry, outlined in blue in Figure 7, consists of only four components and is easily fabricated on the user’s breadboard. Q1 is a Central Semiconductor general purpose transistor in a TO-92 package (Mouser part number 610-MPSA20). Q2 is a Microchip Technology p-channel enhancement mode MOSFET, also in a TO-92 package (Mouser part number 689-VP0104N3-G). As indicated in Figure 7, the base resistor for Q1 (RB) could range in value from 27KΩ to as high as 30KΩ and the collector resistor (RC) could be a standard 1KΩ. These resistor values allow Q1 to switch on in full saturation when the Proximity_Sense output signal from the Reflective Proximity Sensor toggles to its 4.5V level. With this condition for Q1, the nearly 0V level present at the gate of p-channel MOSFET Q2 brings that device into full conduction. With this condition the RDS(on) of Q2 drops to 8Ω or less, allowing the input signal to the lower voltage circuitry to nearly reach the supply level of +3.3VDC.

Anatomy of a PRESSON PCB Stock Number  #

Anatomy of a PRESSON PCB Stock Number 

What are your feelings
Updated on January 17, 2025