Home:ALL Converter>RFID reader connected to NodeMCU via RS485 - Not Working

RFID reader connected to NodeMCU via RS485 - Not Working

Ask Time:2016-12-22T01:13:58         Author:DroidGamer

Json Formatter

I want to connect a long range RFID card reader unit to NodeMCU (12E) board and read the card number. The RFID reader board has a RS485 output port and when I connect this board to my laptop using a RS485 to USB converter, I get the card number using a RealTerm/CoolTerm program.

I was just wondering how I can directly connect the RFID reader board to NodeMCU and read the card number.

I did the following so far, any help in this regard will be much appreciated -

  1. Connected RFID board with a RS485 to USB converter
  2. Used a female to female USB connector and connected (1) with NodeMCU at the other end(via micro usb port on NodeMCU)
  3. Written a very simple arduino sketch to read the serial data as -

    #define BUZZER 4
    
    void setup() {
    
      Serial.begin(9600);      // Init Serial
    }
    
    void loop(){
    
    if (Serial.available())
      { 
          tone(BUZZER, 5000);
          delay(1000);
          noTone(BUZZER);
      }
    }
    

However, the buzzer gives no sound.

My questions are -

  1. Is this the right way of reading data from the card reader via RS485 port ?

  2. Why the data is not received in NodeMCU while I can see it on the terminal program on my laptop

  3. Is there any arduino sketch that I can refer to to read the card number in NodeMCU ?

Author:DroidGamer,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/41268337/rfid-reader-connected-to-nodemcu-via-rs485-not-working
yy