Trying to get m5 ir module to work with m5 atom and esphome - is it dodgy?

I’ve been trying to get the internal IR TX working on various M5 Atoms (Lite, Echo, S3, S3-Lite, Matrix).

To collect codes I purchased some Everlight IRM-3638T receivers and wired them as per the schematic on m5-docs using one of the underside GPIO pins on a breadboard.

As discussed, the receiver has to be inverted in the YAML.

However, while I can do raw dumps from the receiver and then see them again when used with the transmitter at close range, I’ve not yet got any of my TV/hifi equipment to respond which is annoying.

Note that according to the Atom Lite schematic at m5-docs, the IR LED is driven directly by the GPIO pin through a 22Ω resistor whereas with the Grove-connected IR module, the LED is driven via a 150Ω resistor from the 5V VCC, switched by an NPN transistor.

All things being equal, this means the module puts about 5V/150Ω = 33mA through the LED and the Atom Lite would be able to put 3.3V/22Ω = 150mA through. However, the drive capability of the ESP32 GPIOs is much lower than this and defaults to 20mA.

If you have managed to get it working at short range, you could try upping the drive strength to see if that improves the range above 50cm.

remote_transmitter:
  carrier_duty_percent: 50%
  pin:
    number: 12
    ignore_strapping_warning: true
    drive_strength: 40mA
    mode:
      output: true

(This won’t make any difference if using the Grove-attached module of course as all you’re doing is switching the transistor on and off with the GPIO and the current is determined by the 150Ω resistor alone.)