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?
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.
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?
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.
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