M5Stack UHF RFID sensor not reading with esp8266

I got this UHF RFID by M5Stack and tried to connect it to my ESP8266 (NodeMCU) board. I tried to make a simple program with my limited Arduino knowledge in order to test if it can read the UHF tags that I got with the sensor. I have wired everything correctly to my knowledge and have made super simply code that makes sense in my mind. However, when I bring the tag(s) in proximity nothing is read. I can print to the serial monitor just fine, but the if statement is never satisfied.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(12, 13); // RX, TX (corresponding to D6, D7 on NodeMCU)

void setup() {
  Serial.begin(9600);   // Initialize hardware serial for debugging
  mySerial.begin(115200);   // Initialize software serial for UHF-RFID communication

  Serial.println("Setup complete. Waiting for data...");
}

void loop() {
  // Check if data is available to read from the UHF-RFID sensor
  if (mySerial.available() > 0) {
    char inChar = (char)mySerial.read();
    Serial.println(inChar);
  } else {
    Serial.println("Waiting for tag...");
  }
  delay(1000);
}



Note: I understood that the sensor needed 5v and the esp8266 only supplies 3.3v(I could be wrong) so I connect the 5v(purple/white cable) to the 5v connection on my Arduino Uno.

The code and pictures are all attached, but if any other information is needed let me know.

Coming from doing strictly software I am very new to the Arduino and IoT world any help or guidance is much appreciated, thanks!

Not very likely to work at that speed! Use a different Arduino with hardware UART for your RFID device.

Sorry for my ignorance, but which boards exactly would be viable? What speed is it that is needed for the sensor, is that the 115200 bps which I would be looking at?

Interesting but I have a problem with your question. After reading it I have no clue as to what you have. Post an annotated schematic showing how it was wired showing all connections, power, and ground. Be sure to show the 3V3 to 5V interface and what voltage you measured on the 5V pin. I do not work with frizzes or pictures. A readable picture of a hand drawn schematic is OK. Also post links to the hardware items that give the technical details. The reason there are many different devices and incompatible devices I can find with your description. After all "all i want to do is to make them works together correctly" and all we want to do is help you make it do that.

Any board with two or more UARTs, so one can be used for your RFID reader and the other to communicate your messages to the connected PC. The UNO has only one hardware UART that is dedicated to talking to the PC.

Thank you, I will keep that in mind. Let me get a new board and try this again, and if there are still issues I will provide all needed documentation and everything.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.