Author Topic: What's going on in this IR "Obstacle sensor"?  (Read 1475 times)

0 Members and 1 Guest are viewing this topic.

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 287
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
What's going on in this IR "Obstacle sensor"?
« on: May 06, 2016, 11:38:15 pm »
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 is another IR 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 Vcc
Vin -> nothing, floating

I tried to probe the circuit with my scope (very inconvenient), and the only "signal" I could find was a 200KHz wave 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 accessible  ;)

Thanks 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.
« Last Edit: May 07, 2016, 08:54:52 am by igendel »
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15087
  • Country: za
Re: What's going on in this IR "Obstacle sensor"?
« Reply #1 on: May 08, 2016, 03:28:12 pm »
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.
 

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 287
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: What's going on in this IR "Obstacle sensor"?
« Reply #2 on: May 08, 2016, 03:41:33 pm »
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.

That would make a lot of sense. There was a purple-ish plastic at the front of the module that was probably the "IR Filter".

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.

See 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...
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1750
  • Country: ch
Re: What's going on in this IR "Obstacle sensor"?
« Reply #3 on: May 08, 2016, 03:50:29 pm »
Careful, one tends to forget about it but "black" goo might actually be transparent to IR...
 

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 287
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: What's going on in this IR "Obstacle sensor"?
« Reply #4 on: May 08, 2016, 05:17:16 pm »
Careful, one tends to forget about it but "black" goo might actually be transparent to IR...

Perhaps, I should have kept it for testing  :)
You can see it on the left side in the attached image here, before I scraped it off.
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 15087
  • Country: za
Re: What's going on in this IR "Obstacle sensor"?
« Reply #5 on: May 08, 2016, 08:06:42 pm »
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.
 

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 287
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: What's going on in this IR "Obstacle sensor"?
« Reply #6 on: May 08, 2016, 10:30:59 pm »
The other side of the package, with the little silicon chip inside and the 2 fine wires bonding to the package leads.

Very tricky shot, with my limited equipment... attached

The black is only on the recieve side, and not on the transmit led, so it might still be using the scattered light.

No, you can't really see it in the photo but it definitely covered the bottom of the LED as well.
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 287
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: What's going on in this IR "Obstacle sensor"?
« Reply #7 on: May 10, 2016, 06:25:57 am »
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  :)
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf