Joy-it RFID module User manual

Type
User manual

Joy-it RFID module is a versatile and easy-to-use device that allows you to read and write data to RFID tags. With its compact size and simple interface, it's perfect for a wide range of applications, including access control, inventory management, and asset tracking.

The Joy-it RFID module operates at a frequency of 13.56 MHz and supports ISO 14443A/B, Mifare, and Ultralight tags. It can read and write data to tags with a maximum capacity of 16 sectors, each of which can store up to 4 blocks of data.

The module comes with a built-in antenna that provides a read range of up to 10 cm. It also has a built-in LED that indicates the status of the module and the tag being read or written.

Joy-it RFID module is a versatile and easy-to-use device that allows you to read and write data to RFID tags. With its compact size and simple interface, it's perfect for a wide range of applications, including access control, inventory management, and asset tracking.

The Joy-it RFID module operates at a frequency of 13.56 MHz and supports ISO 14443A/B, Mifare, and Ultralight tags. It can read and write data to tags with a maximum capacity of 16 sectors, each of which can store up to 4 blocks of data.

The module comes with a built-in antenna that provides a read range of up to 10 cm. It also has a built-in LED that indicates the status of the module and the tag being read or written.

www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
Frequency
Communicaon
RFID Protocol
Supply voltage
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
Since the module works with a 3 V logic level and most Arduinos work with
5V, we use an Arduino Pro Mini 3.3 V in this example.
If you want to use an Arduino with a 5 V logic level, such as an Arduino
Uno, you need to downgrade all data lines leading from the Arduino to the
module from 5 V to 3.3 V with a voltage translator.
Connect the RFID module as shown in the following picture to the pins of
your Arduino.
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
To use the module with your Arduino, you must rst install the MFRC522
library from the Arduino library manager.
In the window that opens, enter the term "MFRC522" in the search eld
and install the library.
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN 9
#define SS_PIN 10
MFRC522 mfrc522(SS_PIN, RST_PIN);
void setup() {
//Initialization of the RFID module
Serial.begin(9600);
while (!Serial);
SPI.begin();
mfrc522.PCD_Init();
mfrc522.PCD_DumpVersionToSerial(); //Output details of the reader
Serial.println(F("Scan PICC to see UID, type, and data blocks..."));
}
void loop() {
//Search for new cards
if ( ! mfrc522.PICC_IsNewCardPresent()) {
return;
}
if ( ! mfrc522.PICC_ReadCardSerial()) {
return;
}
//Information retrieval of the RFID device
mfrc522.PICC_DumpToSerial(&(mfrc522.uid));
}
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
sudo raspi-config
sudo reboot
sudo apt-get install python3-dev python3-pip
sudo pip3 install spidev
sudo pip3 install mfrc522
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
sudo nano Write.py
mkdir /home/pi/rc522
cd /home/pi/rc522
#!/usr/bin/env python
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
try:
text = input('Enter a value:')
print("Hold the card / clip against the sensor:")
reader.write(text)
print("Successfully written.")
finally:
GPIO.cleanup()
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
Now type the following command to create the script to read:
Enter the following script into this le:
Save the le with the key combinaon CTRL+O, conrm with Enter and
leave the editor with the combinaon CTRL+X.
sudo nano Read.py
#!/usr/bin/env python
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
try:
id, text = reader.read()
print(id)
print(text)
finally:
GPIO.cleanup()
4.3 EXAMPLE APPLICATIONS
To run our sample codes, run the le to describe a clip or card with the
following command:
You can start the applicaon for reading with the following command:
sudo python3 Write.py
sudo python3 Read.py
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
5.2 EXAMPLE APPLICATIONS
To test the module on your micro:bit you rst need a suitable library. To do
this, click on the "Add extension" buon in your MakeCode project and
search here for the term "RFID". Install here the "rd-mfrc522" library
from Joy-IT. Now you can transfer the following blocks into your project:
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
6.2 EXAMPLE APPLICATIONS
To use the RFID module you need the micropython-mfrc522 library. Please note that this
must be present on your Raspberry Pi in order to run the sample code. Now transfer the
following sample code to your Raspberry Pi Pico:
from mfrc522 import MFRC522
import utime
# initialize RFID object
reader = MFRC522(spi_id=0,sck=18,miso=16,mosi=19,cs=17,rst=0)
print("Hold a tag near the reader")
# define parameters for acessing tag
key = [0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]
PreviousCard = [0]
writeBlock = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0xff,
0x0b, 0x0c, 0x0d, 0x0e, 0x0f]
blockToWrite = 9
while True:
# start commuication with RFID reader
reader.init()
(stat, tag_type) = reader.request(reader.REQIDL)
# check if a tag can be read
if stat == reader.OK:
# read tag
(stat, uid) = reader.SelectTagSN()
# check if tag is the same as before
if uid == PreviousCard:
continue
# check if reading went well
if stat == reader.OK:
# print base information about tag
print("Card detected {} uid={}".format(hex(int.from_bytes(bytes
(uid),"little",False)).upper(),reader.tohexstring(uid)))
print()
# print all blocks of the tag
print("Read from tag:")
reader.MFRC522_DumpClassic1K(uid, Start=0, End=64, keyA=key)
print()
# check if tag can be written on
status = reader.auth(reader.AUTHENT1A, blockToWrite, key, uid)
if status == reader.OK:
# write on tag
status = reader.write(blockToWrite,writeBlock)
# check if writing was succesful
if status == reader.OK:
# print newly written block
print("Newly written block:")
reader.MFRC522_DumpClassic1K(uid,Start=9, End=10, keyA=key)
print()
else:
print("Unable to write")
else:
print("Authentication error for writing")
PreviousCard = uid
else:
# reset already read tag
PreviousCard=[0]
ume.sleep_ms(50)
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
Our informaon and take-back obligaons according to the Electri-
cal and Electronic Equipment Act (ElektroG)
Symbol on electrical and electronic equipment:
This crossed-out dustbin means that electrical and electronic appliances do
not belong in the household waste. You must return the old appliances to a
collecon point.
Before handing over waste baeries and accumulators that are not enclosed
by waste equipment must be separated from it.
Return opons:
As an end user, you can return your old device (which essenally fulls the
same funcon as the new device purchased from us) free of charge for dis-
posal when you purchase a new device.
Small appliances with no external dimensions greater than 25 cm can be dis-
posed of in normal household quanes independently of the purchase of a
new appliance.
Possibility of return at our company locaon during opening hours:
SIMAC Electronics GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn, Germany
Possibility of return in your area:
We will send you a parcel stamp with which you can return the device to us
free of charge. Please contact us by e-mail at Service@joy-it.net or by tele-
phone.
Informaon on packaging:
If you do not have suitable packaging material or do not wish to use your
own, please contact us and we will send you suitable packaging.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14

Joy-it RFID module User manual

Type
User manual

Joy-it RFID module is a versatile and easy-to-use device that allows you to read and write data to RFID tags. With its compact size and simple interface, it's perfect for a wide range of applications, including access control, inventory management, and asset tracking.

The Joy-it RFID module operates at a frequency of 13.56 MHz and supports ISO 14443A/B, Mifare, and Ultralight tags. It can read and write data to tags with a maximum capacity of 16 sectors, each of which can store up to 4 blocks of data.

The module comes with a built-in antenna that provides a read range of up to 10 cm. It also has a built-in LED that indicates the status of the module and the tag being read or written.

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI