What's going on in this IR "Obstacle sensor"? - Page 1
Forum section: electronics / beginners

author: igendel
author_rank: Frequent Contributor
timestamp: May 06, 2016, 11:38:15 pm
content: Hi all,I've discovered a crazy little circuit I don't understand inside an IR sensor module. Can you help me figure it out?Background: The E18-D80NK is a cheap Chinese "IR Obstacle Sensor", with a trim pot at the back to adjust the range (3-80 cm, advertised). I guessed that the trim pot is used as a variable resistor in series with the IR LED, to make the light weaker or stronger - and the reflection detection range shorter or longer, accordingly.I opened one up, and it seems that I was right about the trim pot. Also, next to the IR LED there was a 3-pin IR detector to detect the reflected light. I was able to fool the sensor using a TV remote, so the detector is probably a cheap generic 38KHz. But what generates the 38KHz square wave for the LED? Here comes the crazy part.The IR LED cathode is connected through an NPN transistor to ground. What drives the transistor's base isanotherIR detector, that looks exactly like the first: it's just stuck there on the pcb, near the trim pot, not exposed to anything! (light from the bottom of the IR LED was blocked by black goo).This strange IR detector's pins are connected as follows:GND -> Transistor base (through a resistor)Output -> Circuit VccVin -> nothing, floatingI tried to probe the circuit with my scope (very inconvenient), and the only "signal" I could find was a200KHzwave with a 20% duty cycle.So, what's going on in there? How is it working?I attach some images that may help. The scope reading is from the two IR LED leads; I know it's not the most logical place to test, but it was the most accessibleThanks in advance for any ideas!Edit: Here's another piece of information. I took a different 38KHz IR receiver, which responds to the same TV remote, and it doesn't respond to the Obstacle Sensor's light.

author: SeanB
author_rank: Super Contributor
timestamp: May 08, 2016, 03:28:12 pm
content: Bonens pot.........Don't think they are the same IC, one must be an oscillator, and the other is the simple IR receiver, which demodulates the 38kHz light and drives the output with the decoded data. The reason the other TV receiver does not respond is it has a bandpass filter in it, so it only responds to a narrow range of IR light frequency, so it rejects all that are not in the frequency of the carrier used for RC5 data transmission. The clear one on this board is wideband, so responds to anything over 10kHz or so to around 500kHz I would guess. Probably also responds to visible light as well as there is no IR filter on it.Would be nice to see a view through the packages of the dies on board. I guess the generating one is using the light bleeding back from the IR emitter to make it oscillate as the device detects light and turns on the output stage, making a current pulse that turns off the light source.

author: igendel
author_rank: Frequent Contributor
timestamp: May 08, 2016, 03:41:33 pm
content: Quote from: SeanB on May 08, 2016, 03:28:12 pmThat would make a lot of sense. There was a purple-ish plastic at the front of the module that was probably the "IR Filter".Quote from: SeanB on May 08, 2016, 03:28:12 pmSee attached image which shows its back side. Physically it looks exactly the same as the one near the LED.Behind the LED there was a big blob of black goo, so I don't think that light bleed is the mechanism at work here for the oscillator...

author: Kilrah
author_rank: Unknown
timestamp: May 08, 2016, 03:50:29 pm
content: Careful, one tends to forget about it but "black" goo might actually be transparent to IR...

author: igendel
author_rank: Frequent Contributor
timestamp: May 08, 2016, 05:17:16 pm
content: Quote from: Kilrah on May 08, 2016, 03:50:29 pmPerhaps, I should have kept it for testingYou can see it on the left side in the attached image here, before I scraped it off.

author: SeanB
author_rank: Super Contributor
timestamp: May 08, 2016, 08:06:42 pm
content: The other side of the package, with the little silicon chip inside and the 2 fine wires bonding to the package leads.The black is only on the recieve side, and not on the transmit led, so it might still be using the scattered light.

author: igendel
author_rank: Frequent Contributor
timestamp: May 08, 2016, 10:30:59 pm
content: Quote from: SeanB on May 08, 2016, 08:06:42 pmVery tricky shot, with my limited equipment... attachedQuote from: SeanB on May 08, 2016, 08:06:42 pmNo, you can't really see it in the photo but it definitely covered the bottom of the LED as well.

author: igendel
author_rank: Frequent Contributor
timestamp: May 10, 2016, 06:25:57 am
content: A little update - I took out the side-looking sensor, put it in a simple circuit of its own (under regular light), and it generates this stable 200KHz oscillation. I still don't understand what's going in it internally, but together with the wide-band receiver idea, at least we know how the module as a whole works