Upload
kgoulas
View
215
Download
0
Embed Size (px)
Citation preview
8/13/2019 Arduino Rfid
1/4
ARDUINO RFID
20.10.2008 | Author: eb| Posted in Arduino
RFID (Radio Frequency Identification is a si!"#e and effecti$e %ay to trac& andidentify !u#ti"#e unique ob'ects in a s"ace. he !a'ority of sensor techno#o)ies do not
su""ort trac&in) !u#ti"#e tar)ets* as %ith InfraRed or +#trasonic sensors. In these
situations* the InfraRed or +#trasonic bea! %i## bounce off the nearest ob'ect and
disre)ard anythin) behind the!.
,ith RFID* the iso#ation and identification of unique ob'ects is achie$ed by assi)nin)
a distinct si)nature to each. RFID* a co!!on identification techno#o)y* can interface
quite easi#y %ith !icrocontro##ers and co!"uters. RFID net%or&s require that both a
RFID Reader and Passi$e or Acti$e RFID ta)s to function effecti$e#y. Passi$e ta)s
)et their "o%er fro! the ener)y of the radio %a$e itse#f* as a resu#t Passi$e RFIDs
on#y %or& o$er short distances. ,hereas* Acti$e ta)s are "o%ered $ia battery and can%or& o$er #ar)er distances.
he ID Inno$ations ID12 Reader is s#i)ht#y !ore co!"#e- than the Para##a- RFID*
and o"erates at a faster baud rate /00 b"s. A## the ID Inno$ations Readers use the
sa!e co!!unication "rotoco#* and one can choose fro! three data out"ut for!ats
AII* ,ei)and2 or 3a)netic rac&. he ta)s used in co##aboration %ith the ID12
are 435001 126 &7 ta)s* these ta)s encode the unique ID as AII he-adeci!a#
$a#ues. herefore* %e %i## o"t for the AII data out"ut for!at.
he Data 9utPut For!at AII
(AII 02 DAA (10 AII 74; +3 (2 AII R (AII 1
8/13/2019 Arduino Rfid
2/4
he co!!unication starts %ith a start>of>co!!unication ( byte (AII 02 and
ends %ith end>of>co!!unication (4 byte (AII 0byte ta) ID (unique si)nature* a chec&su!* a
carria)e return (AII 112
ID12 Pin etu"
1
2
3
/* RFID reader ID-12 for
8/13/2019 Arduino Rfid
3/4
4
5
6
7
8
9
1011
12
13
14
15
16
17
18
19
20
21
22
2324
25
26
27
28
29
30
31
32
33
34
35
3637
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
* 'a(ed on code #y add #yte to code: i*(b"tesread 1##1)
{
// a$e (oe (pace for thi( he-diit #y // (hiftin the pre)iou( he-diit with ? #it( to theleft: $ode%b"tesread ++1(val (tepb"te --4))
i*(b"tesread ++1#5)
8/13/2019 Arduino Rfid
4/4
65
66
6768
69
70
71
72
73
74
75
76
77
78
79
8081
82
83
84
85
86
87
88
89
90
91
92
9394
{
// If we@re at the chec$(u #yte> // !alculate the chec$(u... 540R8 - clu(i)e 0R $'e$su #$ode%b"tesread ++1&
!
!
else{
tepb"te #val
!
// ready to read net diit b"tesread
!
!
// rint i*(b"tesread ##12)
{
Serial.print(5b"te $ode: )
*or(i#0i-5i){
i*($ode%i&-16)Serial.print(0)
Serial.print($ode%i&;)
Serial.print( )
!
Serial.println()
Serial.print(?'e$su: )
Serial.print($ode%5&;)
Serial.println($ode%5#$'e$su @ passed.:
error.)
Serial.println()
!
b"tesread #0
!
!
!