I am currently working on a project involving an RFID Animal reader, and I would appreciate some assistance with a challenge I am facing. The RFID module I am using is illustrated in the image below:
Regrettably, I could not locate comprehensive information about this module. However, I have identified that pin 1 corresponds to GND, pin 2 to VCC (5V), and pin 4 to TXd.
I have ensured that the connections were made accurately, and the Arduino Nano successfully uploads the code without any errors. The code I am employing to read data from the serial pin is as follows:
#include <SoftwareSerial.h>
SoftwareSerial RFID(2, 3); // RX and TX
int i;
void setup() {
RFID.begin(9600); // start serial to RFID reader
Serial.begin(9600); // start serial to PC
}
void loop() {
if (RFID.available() > 0) {
i = RFID.read();
Serial.print(i, HEX);
Serial.print(" ");
}
}
Upon approaching the animal tag to the antenna, I am receiving some information in the terminal, as shown below:
Initially, I suspected a malfunction in the RFID module, so I replaced it, but the issue persisted. Subsequently, I considered the possibility of a malfunctioning animal tag; however, it tested successfully with another Animal reader.
I would greatly appreciate any insights or suggestions you may have regarding the potential cause of this issue.
Pin definition:
1.GND
2.VCC
3.NC:No function, no use
4.TXD:Send data
5.NC:No function, no use
6.NC:No function, no use
7.L1:Connect to antenna
8.L2:Connect to antenna
It does seem that your wiring is correct.
Parameters:
1>.Input voltage: DC 5V
2>.Work current: 50mA
3>.Working frequency: 134.2KHz
4>.Suitable type:ISO 11784/85 or compatible card
5>.Format:FDX-B
It also seems likely that your module is fit for purpose.
Definitely one to investigate.
It doesn't seem likely to be the issue, but just a reminder that "animal tags" are far from standardized. Maybe good to confirm that the tag you're testing is "ISO 11784/85 or compatible, FDX-B".
Hi all.
I identified the issue – powering the module externally while the Arduino was connected via USB. Once I established a common ground between them, I successfully extracted the tag information. Grateful for all the assistance provided!
Hi, I don't have much experience with Arduino, but I am also working on a similar project and I have the same problem with the RFID sensor. Can you explain better how you resolved the problem? Thanks
If you are using a battery, the battery's negative terminal will also be connected to one of these ground pins.
You should either connect USB, or a battery, but not both at the same time.
(Unless you take particular care that the battery's positive wire isn't connected to Nano's 5V or VIN)
Any more questions and I imagine people will start calling for you to start a new post, with images of your setup. Best of luck.
I have one last question for you, after which if I still have doubts, I'll open an issue. But the 9V battery supply is also meant to power the Arduino itself, right? So, the Arduino should not be powered through USB if I'm powering the sensor, correct? This means I can't read the data on the Arduino's serial terminal, and instead, I should use, for example, an external LCD?
Battery negative to the sensor's GND pin and to the Arduino's power supply Battery positive to the sensor's 9V pin and to the Arduino's power supply Sensor's TX to Arduino's RX.
This is a different module than the one in the original post. I do think you should start a new topic, and make sure to post any information about where your RFID module came from (links, datasheet).
It is slightly concerning to hear this. Are you sure that the module does accept 9V? We need more information (Edit: appears that 9V is okay for this module)
In the photo it looks you may have connected the 9V battery to your Arduino's 5V pin.. this would be very bad. (Edit: No I see that it is actually the ground connection.. my mistake)
You can power the Arduino by applying 9V to the VIN pin, or the barrel jack. If you have the USB connected, you will not need to power the Arduino with 9V, because it will run happily on the 5V from USB.
I used an external power source to supply power to the module. To ensure the correct data transmission to the Arduino, both the module and Arduino should share the ground connection. Therefore, I connected the GND of the power source to both the module and the Arduino.