Github Devices Community Docs Blog

M5Stick ESP32 packaged with BLE, battery, small IR emitter and buttons

Here is a third ESP32 packaged board so as to enable easy presence detection and retrieve Xiaomi sensors data.

Added to that you get a small IR emitter, a buzzer, an integrated battery and several buttons:

  • 5V DC power supply
  • USB Type-C
  • ESP32-based
  • 4 MByte Flash + 520K RAM
  • 9-Axis IMU MPU9250(only gray type)
  • Red LED
  • Buzzer
  • IR transmitter
  • 1 Buttons, OLED(1.3 inch), 1 Reset
  • 2.4G Antenna: Proant 440
  • 80 mAh Lipo Battery
  • Extendable Socket
  • Grove Port
  • Wearable & Wall mounted

The board is available on platformio.ini file with BLE & IR gateway and Button reading.

Currently the buzzer and the OLED are not used in this implementation, if someone wants to play with that and submit a Pull Request, I think there is some fun to have with this new board!

I’ve got IR receiving working with a VS1838 module in the header on the top across gnd, 5v and G26. I’ve set #define IR_RECEIVER_PIN 26 and I’m getting
TLD/OpenMQTTGateway/IRtoMQTT {"value":573656013656052141,"protocol":60,"bits":152,"hex":"0xAD513CE51A09F607F800FF32CD26D900FF807F","protocol_name":"MITSUBISHI_HEAVY_152","raw":}
…over MQTT! Marvellous.

However I’ve set #define IR_EMITTER_PIN 9 and tried mosquitto_pub -u user-P password -t TLD/OpenMQTTGateway/command/MQTTtoIR -m '{"value":573656013656052141,"protocol_name":"MITSUBISHI_HEAVY_152"}' and that doesn’t work currently. The IR LED is stuck on 100%. I tried setting it to pin 10, which is the visible LED, and it shows the same problem. I suspect it might be a pull up/down issue. I’ll have a play with it.

I’ve tried IRsend irsend(IR_EMITTER_PIN, true); to invert the LED control pin. This stops the LED being on all the time, but I’m not getting any LED transmission either. I see

MQTTtoIR json
MQTTtoIR value || raw || datasring ok
MQTTtoIR OK
Pub json into:
TLD/OpenMQTTGateway/IRtoMQTT
{"value":573656013656052141,"protocol_name":"MITSUBISHI_HEAVY_152"}
Hey I got a callback 
Store str
Min ind: 
0
store code :
3845935533/147973
Col: val/timestamp
0:3845935533/147973
1:0/0
2:0/0
3:0/0
4:0/0
5:0/0
6:0/0
7:0/0
8:0/0
9:0/0
10:0/0
11:0/0
JSON str

in the serial console when sending the command over MQTT.

Mild success! If I pack hex and protocol_name, I.E. {"hex":"0xAD513CE51A09F607F800FF32CD26D900FF807F","protocol_name":"MITSUBISHI_HEAVY_152"} I get an infra-red LED blink! However my Mitsubishi heavy industries aircon is not responding to the signal. More investigation is required.

I tried to build exactly the same code in the arduino IDE on my laptop and the IRtoMQTT doesn’t work. I recompiled and flashed the code from my desktop and it works again. Something’s odd here… I loaded the same library bundle from the OpenMQTTGateway releases page for the M5stickC, I’m selecting the same board in the arduino IDE drop-down list.

I’ve switched to using an external IR LED on a GPIO pin, but I’m not getting any response from the aircon. The IR RX flashes when the IR TX transmits, and I can see the IR flash in a smartphone camera, but either the protocol is wrong or the IR LED isn’t powerful enough for the aircon to see. It’s much dimmer than the one built into the aircon remote. I might experiment with an amplified IR output.

Hello,

could you indicate the version of OMG used?

Sure: a99d5fb670981f96967dde0151b53b7ac2ab0d0c

By version I mean v0.9.3 for example or a previous one?

The version tag is 0.9.3, yes, but I’m building from the development branch as of 2020-01-24, so I’m a few commits ahead.

Sorry, I didn’t understood that it was an sha :frowning:

Did you try to put your emitter at less than one meter to your AC. The IR emitter power is quite weak.