Figuring out Ir Controller Sensor infrared sensor 4x 940nm Emitter 1X38Khz receiver for ESP32 ESP8266

I bought myself a IR transmitter / receiver thinking I could hook it up on an ESP32.
It’s advertised as “Ir Controller Sensor infrared sensor 4x 940nm Emitter 1X38Khz receiver for ESP32 ESP8266” but it’s got no documentation whatsoever.
On the board it says “IRM-H638T”, which is the receiver I presume.
On the image advertising the device, it’s shown with a (not included) breakout board mentioning i2c,
The 4 wire could indeed be i2c, but how would I know?
There is no indication which wire is which (GND, etc)

I’ve tried all sorts of combinations and esphome configurations, both based on i2c (on the corresponding pins) and on remote_transmitter / remote_receiver (using the documentation on that) and tried reading/receiving, but nothing seems to work.

Is there a way to combine i2c with the remote_receiver / remote_transmitter? How would I configure this in esphome?
Does anyone have a hint on what to try next?

Posting pictures and/or links to the product may be useful.

I reckon there will be a power, ground and signal.

And you use it with remote_transmitter.

Somewhat guessing though…

Like this maybe?

This one: https://www.amazon.nl/ICQUANZX-controller-infrarood-sensoren-ontvanger/dp/B07VMG14SV
The specs you shared indeed seem to be the receiver. I’ve already studied that, but it’s not easy to figure out which cable is connected to which pin. I’ve tried what I think was the correct was of connecting.

And also, the same 4 wires are connected to the transmitter.
And there is the question of the i2c.
image

Are there 2 black wires?

That would then align to data sheet which would suggest 2 gnd wires, a power wire and a signal wire?

Based on that I would then try connecting both gnds to a ground on your esp, red wire to 3.3 or 5v on esp (try both?) and yellow signal wire to a gpio. I don’t think you need I2C. Just remote_transmitter. But not sure.

I always use these gpios first.

1 Like

No, unfortunately not 2 black. It’s black, purple, yellow, red.
Good to know that i2c is optional.
Wouldn’t you think the remote_receiver will need a signal wire as well?

I think it just needs one (transmit) signal wire and it’s probably the yellow one.

Not too sure though.

Can you trace the wires and relate it to the datasheet?

Maybe like this.

Oh sorry I somehow totally missed that it is a transmitter and receiver. Thought it was just a transmitter. So yeah two signal wires.

So yeah my revised guess is that yellow is transmit and purple is receive

But I’m taking guesses no real clue so best of luck.

Thanks! I’ll give this a shot. Good job tracing the wires. On the actual device it’s not much easier to see, but I’ll give it another go. At least this gives me confidence this is the right track.

1 Like

I’m not sure what I’ve done or am suggesting is quite right but it might give you some ideas to try.

Using your drawing technique and a multi meter, I was able to reverse engineer it. The colors are quite unexpected, but it actually works!

With config:

remote_receiver:
  # black wire
  pin: 16
  dump: all

remote_transmitter:
  # purple wire
  pin: 5
  carrier_duty_percent: 50%

Next step is to try and decode use the signals, but I’m happy with this result.

Nice! You got it!

Thanks!!, it worked like a charm.

I had to double check on my PCB because it’s surprising that they use the black wire for the receiver instead of ground. But yes, the wiring on mine was the same.

One note, in my case I had to invert the input signal to make it decode properly (I saw a warning on the logs recommending me to do it, that’s a great developer experience):

# Example configuration entry
remote_transmitter:
  pin: GPIO25
  carrier_duty_percent: 50%

remote_receiver:
  pin: 
    number: GPIO32
    inverted: true
  dump: all