Cov txheej txheem:

Arduino RFID 'Ntse Qhov Rooj' Qhia: 7 Kauj Ruam
Arduino RFID 'Ntse Qhov Rooj' Qhia: 7 Kauj Ruam

Video: Arduino RFID 'Ntse Qhov Rooj' Qhia: 7 Kauj Ruam

Video: Arduino RFID 'Ntse Qhov Rooj' Qhia: 7 Kauj Ruam
Video: How I Made this Electric Car that can go Anywhere 2024, Kaum ib hlis
Anonim
Arduino RFID 'Ntse Qhov Rooj' Tutorial
Arduino RFID 'Ntse Qhov Rooj' Tutorial

Los ntawm Peter Tran, 10ELT1

Hauv qhov kev qhia no, koj yuav ua haujlwm nrog tus nyeem ntawv RFID kom qhib lub qhov rooj micro-servo-powered! Nco ntsoov tias koj muaj daim npav nkag tau zoo kom nkag mus tau thiab tsis hnov lub tswb lossis tsis ua rau lub teeb nkag mus.

Koj yuav raug taw qhia ib qib zuj zus thiab pab nrog 'Kev Xeem thiab Troubleshooting' phau ntawv qhia thiab 'Daim Ntawv Thov Ntiaj Teb Tiag' ntu kawg.

Cov cai rau txoj haujlwm no muaj nyob ntawm

Thov tseem rub lub tsev qiv ntawv tsim nyog rau RFID Sensor los ntawm

Khoom siv:

  • Arduino UNO (lossis lwm yam microcontroller sib xws)
  • Prototyping Breadboard
  • RFID nyeem ntawv Module ((RFID-RC522) nrog RFID cim npe
  • Micro Servo (9g)
  • LEDs (Daj, Ntsuab thiab Liab)
  • Piezo Buzzers Cov

Kauj Ruam 1: Kev Tshawb Fawb RFID

RFID Theory
RFID Theory
RFID Theory
RFID Theory

Tus nyeem ntawv RFID yog dab tsi?

Kev Qhia Tus Kheej Hauv Xov Tooj Cua (RFID) yog tus lej ID uas siv cov cuab yeej siv xov tooj cua me me los txheeb xyuas thiab txheeb xyuas lub hom phiaj. Ib qho txheej txheem RFID suav nrog suav tag nws tus kheej, nyeem/sau ntawv, thiab tus tswv tsev siv daim ntawv thov rau kev khaws cov ntaub ntawv, ua tiav, thiab xa mus. Hauv cov lus yooj yim, RFID siv cov tshuab hluav taws xob los hloov cov ntaub ntawv hla luv luv.

RFID muaj txiaj ntsig los txheeb xyuas tib neeg, ua lag luam, thiab lwm yam. Koj tuaj yeem siv lub tshuab RFID los qhib lub qhov rooj. Piv txwv li, tsuas yog tus neeg uas muaj cov ntaub ntawv raug ntawm nws daim npav raug tso cai nkag mus. Hauv qhov kev qhia no, peb muaj ntau daim cim npe RFID, txhua tus nrog nws tus kheej Cim Cim (UID) tab sis tsuas yog ib daim npav yuav tso cai nkag mus.

RFID-RC522 Pin Layout

Tus Pin 1: VCC, lub zog zoo (3.3v) Tus Pin 2: RST, rov pib dua Pin 3: GroundPin 4: IRQ, cuam tshuam tus pin siv los sawv module thaum lub cuab yeej los rau hauv rangePin 5: MISO, kev sib txuas lus pib INPin 6: MOSI. kev sib txuas lus yooj yim OUTPin 7: SCK, siv ua lub moos/oscillatorPin 8: SS, siv los ua cov ntawv txuas

Kauj Ruam 2: Txuas RFID Module

Txuas RFID Module
Txuas RFID Module
  1. Rub tawm lub tsev qiv ntawv tsim nyog los ntawm ntu kev taw qhia.
  2. Tshem cov ntsiab lus los ntawm daim nplaub tshev zip "rfid-master" thiab ntxiv cov ntawv tais ceev tseg hauv qab cov tsev qiv ntawv uas twb muaj lawm ntawm Arduino.
  3. Rov pib dua Arduino IDE
  4. Arduino Code tau txuas rau thaum pib ntawm kev qhia. Sau cov cai thiab tshem tawm qhov ua yuam kev.
  5. Txuas Arduino UNO nrog tus nyeem ntawv RFID. Xa mus rau tus pin txuas hauv qab no, nrog rau daim duab qhia duab saum toj no kom yooj yim siv.

Pin Txuas ntawm RFID-RC522 rau Arduino Uno

SDA ------------------------ Digital 10 SCK ---------------------- -Digital 13 MOSI ---------------------- Digital 11 MISO -------------------- -Digital 12 IRQ ------------------------ tsis txuas GND ------------------- ---- GND RST ------------------------ Digital 9 3.3v ---------------- ------- 3.3v (Tsis txhob txuas rau 5v)

Kauj Ruam 3: Nyeem Cov Ntaub Ntawv Los Ntawm RFID Tag

Nyeem Cov Ntaub Ntawv Los Ntawm RFID Tag
Nyeem Cov Ntaub Ntawv Los Ntawm RFID Tag
Nyeem Cov Ntaub Ntawv Los Ntawm RFID Tag
Nyeem Cov Ntaub Ntawv Los Ntawm RFID Tag
  1. Mus rau Cov Ntaub Ntawv> Piv Txwv> MFRC522> DumpInfo thiab xa cov cai. Txoj cai no yuav muaj nyob hauv Arduino IDE (tom qab teeb tsa lub tsev qiv ntawv RFID).
  2. Qhib serial saib thiab koj yuav tsum pom qee yam zoo li daim duab sab laug saum toj no.
  3. Kwv yees kwv yees tus lej RFID rau tus nyeem ntawv.
  4. Cov ntaub ntawv uas tuaj yeem nyeem tau los ntawm daim ntawv teev npe muaj nyob hauv daim duab saum toj no. Cov ntawv tseem ceeb daj yog RFID cim cim Cim Cim (UID), cim nws rau tom qab.

Kauj Ruam 4: Kuaj RFID Reader

Kuaj RFID Reader
Kuaj RFID Reader
Kuaj RFID Reader
Kuaj RFID Reader
  1. Ntxig UID rau hauv Arduino code qhov uas xav tau (ze rau ntu 'Kev Tso Cai Tso Cai').
  2. Kwv yees kwv yees tag uas koj tau xaiv los muab nkag thiab koj yuav pom cov lus tso cai.
  3. Kwv yees lwm daim ntawv nrog UID sib txawv thiab koj yuav pom cov lus tsis lees paub.
  4. Xa mus rau ntu 'Kev Xeem thiab Teeb Meem' yog tias koj ntsib teeb meem.

Kauj Ruam 5: Micro Servo, LEDs thiab Buzzers

Micro Servo, LEDs thiab Buzzers
Micro Servo, LEDs thiab Buzzers

Micro Servo Tsav

  1. Txuas lub micro servo raws li cov lus qhia ntawm nplooj 49-52 ntawm SparkFun SIK Phau Ntawv Qhia (Version 3.2).
  2. PWM tus pin ntawm servo yuav tsum txuas rau tus pin6 ntawm Arduino.
  3. Xa mus rau tus lej siv txuas nrog hauv kev taw qhia hu ua "RFID_wITH_SERVO.ino" thiab cov txheej txheem saum toj no.
  4. Xa mus rau ntu 'Kev Xeem thiab Teeb Meem' yog tias koj ntsib teeb meem.

LEDs thiab Piezo Buzzers

  1. Nruab cov LEDs thiab Piezo Buzzers nrog siv rau daim duab saum toj no.
  2. Siv tus lej "RFID_WithServo_and_Lights.ino"
  3. Xa mus rau ntu 'Kev Xeem thiab Teeb Meem' yog tias koj ntsib teeb meem.

Kauj Ruam 6: Kev Xeem thiab Teeb Meem

Kev Xeem

  1. Cov daj LED yuav tsum tsuas yog zes thaum tsis muaj cov cim npe.
  2. Thaum siv daim ntawv tso cai RFID siv, lub teeb ntsuab yuav tsum nyem ob zaug nrog ob lub suab nrov
  3. Thaum tsis siv daim ntawv tso cai RFID siv, lub teeb liab yuav tsum nyem peb zaug nrog peb lub suab nrov

Teeb meem

  1. LED tsis teeb pom kev: thim rov qab polarity ntawm LED los ntawm kev tig nws ib puag ncig. LED kuj tseem tuaj yeem tshuab tau.
  2. Qhov program tsis tso tawm: Hloov chaw nres nkoj hauv cov cuab yeej> chaw nres nkoj txuas>
  3. Servo tsis ntswj: Txawm tias cov xaim xaim yog qhov txaus ntshai rau ntsaws tsis raug.
  4. Servo tseem tsis ua haujlwm: tsis txhob hnov qab txuas lub zog (xim liab thiab xim av) rau +5v thiab hauv av
  5. Servo tsuas yog twitches: siv lub zog hluav taws xob sab nraud,

Kauj Ruam 7: Daim Ntawv Thov Ntiaj Teb Tiag

Daim Ntawv Thov Ntiaj Teb Tiag
Daim Ntawv Thov Ntiaj Teb Tiag

RFID tuaj yeem ua ke tau yooj yim rau yuav luag txhua daim ntawv thov kev nyab xeeb, ua qhov qauv no muaj txiaj ntsig zoo thiab tsim nyog rau daim ntawv thov tam sim ntawd hauv ntiaj teb. Ib tus qauv zoo sib xws qhov twg daim ntawv tso cai RFID tuaj yeem qhib lub servo uas tsis muaj lub qhov rooj tuaj yeem siv hauv:

  • cov chaw ua haujlwm
  • chav tsev
  • tsev so
  • check-ins chav tsev qiv ntawv tham
  • xauj/xauj tsheb

Qee qhov zoo ntxiv ntawm RFID yog:

  • Nyuaj rau luam lossis hack. Lub xov tooj cua tsis tuaj yeem "theej tawm," thiab lub teeb liab nws tus kheej tuaj yeem muab encrypted yog li lwm yam khoom siv tsis tuaj yeem txiav txim siab cov ntaub ntawv.
  • Customizable thiab programmable. Ib daim npav RFID tuaj yeem ua haujlwm kom qhib tsuas yog lub qhov rooj tshwj xeeb (lossis tsuas yog ib qho) rau lub sijhawm tshwj xeeb. (Cov tsev so siv cov keycards tso cai rau lawv cov qhua tsuas yog nkag mus rau lawv chav tsev so thiab chaw noj qab nyob zoo, teeb tsa kom tsis txhob ua haujlwm thaum sawv ntxov ntawm kev them nyiaj.) Cov kab ke no tso cai rau kev tswj hwm txwv tsis pub cov neeg ua haujlwm nkag mus rau cov chaw tso cai tshwj xeeb ntawm cov chaw rau qee lub sijhawm..
  • Tsis qhia npe. Tsis muaj qhov cim qhia tus lej ntawm daim npav tseem ceeb, tsuas yog tus siv tau tso cai thiab lub khoos phis tawj tuaj yeem paub lub qhov rooj (s) daim npav yuav qhib.
  • Yooj yim deactivated. Yog tias daim npav tseem ceeb poob lossis raug nyiag, lub kaw lus tuaj yeem tso cai yooj yim tso cai nws lub cim cim cim - lossis daim npav tsuas yog tso cai tas sij hawm.
  • Kev nyab xeeb raug nqi ntau dua. Thaum cov yuam sij hauv lub cev ploj lossis cuam tshuam, lub xauv yuav tsum raug hloov pauv kom rov muaj kev nyab xeeb. Thaum daim npav tseem ceeb poob, nws tuaj yeem raug tso cai, ua rau nws pov tseg tau zoo. Tsis tas yuav hloov lub xauv

Qee qhov tsis zoo ntawm RFID yog:

  • Cov tshuab RFID feem ntau kim dua li cov lej barcode
  • Cov cim npe RFID feem ntau loj dua cov ntawv cim barcode
  • Cov cim npe yog daim ntawv thov tshwj xeeb, tsis muaj ib daim ntawv haum rau txhua tus
  • Muaj peev xwm nyeem tsis tau tso cai ntawm phau ntawv hla tebchaws thiab credit card
  • Ntau tshaj ib daim ntawv tuaj yeem teb tib lub sijhawm

Pom zoo: