Rfid reader module - UART software serial

Screenshot 2024-01-10 193402
i have rfid reader module that send data over UART https://www.aliexpress.com/item/32868030909.html

i connected VCC to 3v
GND to GND
RX to D4

#include <SoftwareSerial.h>
const int RFID_rx = D4;
SoftwareSerial rfid_Serial(RFID_rx, -1);  // RX pin is D4, TX pin is not used (-1)

void setup() {
  Serial.begin(9600);
  rfid_Serial.begin(9600);   


void loop() {

  // RFID
  if (rfid_Serial.available()) {
    // Read the incoming data
    int incomingByte = rfid_Serial.read();

    // Print the received byte in hexadecimal format
    Serial.print("Received: 0x");
    Serial.printf("%02X", incomingByte);
    Serial.println();
  }
  // RFID
}

what i recieve when put a tag on module is:

Received: 0xF8
Received: 0xF8
Received: 0xF8
Received: 0xF8
Received: 0xF8
Received: 0xF8
Received: 0xF8
Received: 0xF8
Received: 0xF8
Received: 0xF8
Received: 0xF8

    Serial.print("Received: 0x%02X\r\n", incomingByte);

Ok. And what does the documentation say that means?

12V or 5V?

its 5v but in aliexpress page they writed:

the module can operate normally in the range of 3v-5v

there just some info in aliexpress page , link above.

it should work like this but idk maybe there is something wrong in my code

do aliexpress provide an example sketch to test delivered module that it is still working? or how do you know how to handle this module?

Yes, there is and it shows exactly what the UART message is. And it is multiple bytes long, but your program only reads and processes a SINGLE byte/character. Why do you not read the entire message before doing any processing of the data?

canu write code here coz i dont know how

Could, but won't. Spend a week or so studying how other programs read message, not single characters, and change your program and test it.

Can you measure the voltage on the "UART" pin when the device is idle?
I can't tell for sure, but it looks somewhat like there is an rs232 converter chip on that board, in which case it won't work directly with SoftwareSerial.

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