Path: EDN Asia >> Design Ideas >> IC/Board/Systems Design >> Reflective object sensor functions in bright areas
IC/Board/Systems Design Share print

Reflective object sensor functions in bright areas

12 May 2015  | Vladimir Rentyuk

Share this page with your friends

When using a reflective object sensor, counting and identifying objects is sometimes difficult in the presence of electrical noise or bright ambient light. The circuit in figure 1 shows an inexpensive solution to this problem using three independent and simultaneously working reflective object sensors. The circuit is suitable for many types of objects, but it targets use with objects such as cards.


Figure 1: Infrared sensors and logic circuits detect the presence of an object.


The circuit uses three OPB704 reflective optical sensors with Schmitt-trigger NAND comparators IC1A, IC1B, and IC1C on each output. IC1D functions as a clock generator, and counter IC6B functions as a divide-by-eight counter that divides the clock frequency. That signal drives IC4D, which acts as a buffer to drive transistor Q1.

To understand how the circuit works, consider Sensor 2. IC1B's output will be low if the sensor's phototransistor doesn't detect IR rays reflected from an object. Both of IC1B's inputs are high; therefore, the D1 input of IC2 is low. In any case, if the sensor's phototransistor detects IR rays reflected from an object, the D1 input of IC2 is high. The level corresponding to the current situation transfers through IC2's Q1 output (Pin 7) by a write signal on the C input (Pin 9). The write signal is a leading edge of pulses from the clock generator. The signal from divider IC6B becomes the D3 input of IC2. A level of the divided clock signal transfers to IC2's Q3 output (Pin 15) upon receiving a write signal from the C input (Pin 9). The signals on the Q1 and Q3 outputs have equal duration except when the sensor's phototransistor detects IR rays reflected from an object. Figure 2a shows the process of this normalization. Exclusive-OR gate IC3B compares the Q1 and Q3 outputs from IC2. If they have the same logic level and duration, then IC3B's Pin 6 is low, and IC3B generates pulse signals. If signals from outputs Q1 and Q3 on IC2 are unequal, you must reset counter IC5B's reset signal, and its output 2Q2 at OUT2 is low. The Q2 outputs of counters IC5A, IC5B, and IC6A are low whenever the input signals of comparator circuits IC3A, IC3B, and IC3C are unequal. This situation occurs if Sensor 2 doesn't detect an object or receive any external signals—for example, IR noise from fluorescent lamps or interfering ambient light, alternating light, or flashes.

The outputs of IC3A, IC3B, and IC3C are equal only when all phototransistors detect a signal from their respective IR emitting diodes—that is, when a card is presented in front of Sensor 2 (figure 2b). You must choose a clock frequency with regard to a delay time of the system. A leading edge triggers IC2, a 74HC175, and a falling edge triggers IC6B, a 74HC393. Because of the counters, this system automatically adjusts itself after any changes of frequency in its clock generator. Thus, if counter IC5B does not have a reset signal during a period equal to four periods of a reference signal, its output (Pin 9) is high, and the counter latches through R8. The logic-high level appears on OUT2 until you remove the card. In this case, the detected inequality signal from the sensor with the reference signal and the counter, IC5B, causes a reset signal. Figures 2b, 2c, and 2d show three cases of using the presented device.


Figure 2: Traces show the process of normalization (a) and three cases of using the presented device (b, c, and d).


Figure 2b shows a case of normal operation. You can see the results of comparing a reference signal (Trace C) and a signal of IC1B's output (Trace D). The signal of IC1B's output (Trace B) is low when no card appears. When the card enters the zone of vision of a sensor (Trace B), it is a sequence of normalized pulses. The output of the device at Pin 9 of IC5B (Trace D) changes its level from low to high after four cycles of both signals, but it will immediately change to low if you remove the card.

Figure 2c shows operation of the device under strong IR noise. The signal of IC1B's output (Trace B) contains some high-frequency signals if a card isn't present and is a sequence of normalized pulses when a card is present. The output of the device at Pin 9 of IC5B (Trace D) indicates the presence of a card by changing its level from low to high after four cycles of these signals. It immediately changes to low if you remove the card from the zone.

Figure 2d shows operation of the device under ambient direct lighting. You can see the results of comparing signals. In this case, the signal at IC1B's output (Trace B) is constant high when a card isn't present. When the card enters a sensor's zone of vision (Trace B), the signal is a sequence of normalized pulses. The output of the device at Pin 9 of IC5B (Trace D) indicates this condition by changing its level from low to high after four cycles of both signals. It immediately changes from high to low when you remove the card from the zone.

Capacitors C1, C2, and C3 are optional. They protect input circuits from electromagnetic noise when, for example, long wires connect the sensors and the device. Capacitors C9, C10, and C11 provide performance reliability by protecting the counters from short pulses.


About the author
Vladimir Rentyuk is with Modul-98 Ltd in Zaporozhye, Ukraine.


This article is a Design Idea selected for re-publication by the editors. It was first published on July 29, 2010 in EDN.com.




Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.


Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming


News | Products | Design Features | Regional Roundup | Tech Impact