Cov txheej txheem:

Electronic Piggy Bank: 4 Kauj Ruam
Electronic Piggy Bank: 4 Kauj Ruam

Video: Electronic Piggy Bank: 4 Kauj Ruam

Video: Electronic Piggy Bank: 4 Kauj Ruam
Video: LITTLE BIG - GIVE ME YOUR MONEY (feat. TOMMY CASH) 2024, Hlis ntuj nqeg
Anonim
Electronic Piggy Bank
Electronic Piggy Bank

Qhov haujlwm Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob no yuav coj koj mus dhau cov kauj ruam txhawm rau tsim kom muaj kev sib txuas lus tsim nyog/sib txuas xav tau. Koj yuav xav tau cov hauv qab no.

  • 5V Kev Tshaj Tawm
  • 2 LEDs (Liab thiab Ntsuab)
  • 2330 Ohm resistors
  • Txiv neej/Poj niam cov xov hlau
  • Cov xov hlau tsis tu ncua
  • Arduino Uno & Cov Ntaub Ntawv Cable
  • RFID qhov tseem ceeb thiab sensor
  • Passive Buzzer
  • Servo Tsav
  • Lub thawv
  • Cov qhob cij

Lub thawv yuav ua haujlwm raws li lub txhab nyiaj tiag tiag, rau ib qho hauv qhov piv txwv no kuv tau siv rab yaj phom los sib dhos ua tej daim duab los qhia.

Kauj Ruam 1: Kev Txuas Hluav Taws Xob

Kev Txuas Hluav Taws Xob
Kev Txuas Hluav Taws Xob

Hauv cov kauj ruam no koj yuav kawm qhov twg los ntsaws rau hauv txhua qhov ntawm txhua lub xaim ntawm lub khob cij thiab Arduino

RFID Sensor:

  • VCC = 3.3 V
  • RST = Pin 2
  • GND = GND
  • MISO = Pin 3
  • MOSI = Pin 4
  • SCK = Pin 5
  • NSS = Pin 6
  • IRQ = Pin 7

Tshaj tawm:

  • VCC = 5 V
  • GND = GND
  • SIG = Pin 8

Servo Tsav:

  • VCC = 5 V
  • GND = GND
  • SIG = Pin 9

Tsis siv neeg Buzzer:

  • VCC = 5 V
  • GND = GND
  • SIG = Pin 10

Ntsuab LED:*

  • VCC = Pin 11
  • GND = GND

Liab LED:*

  • VCC = Pin 12
  • GND = GND

*Rau LEDs kom ntseeg tau tias koj muaj lub zog tiv thaiv ntawm lub zog thiab LED txhawm rau tiv thaiv kom tawg LED

Kauj ruam 2: Code

Txoj cai rau txoj haujlwm no thaum zoo li nyuaj nws pib nqis los rau yog tias daim npav ID tau nyeem THIAB qhib/tua LEDs, Buzzer, thiab tig Servo.

Rub tawm cov tsev qiv ntawv xav tau rau txoj haujlwm no ntawm https://www.sunfounder.com/learn/category/rfid-kit… tsuas yog nyem lub pob rub tawm thiab muab cov ntawv ntawd tso rau hauv cov ntawv tais ceev tseg.

Tam sim no nco ntsoov tias koj muaj txoj cai COM chaw nres nkoj thiab pawg thawj coj xaiv hauv Arduino IDE thiab rub tawm. Yog tias koj ntsib teeb meem qhov teeb meem feem ntau yuav yog xaim xov tooj tsis raug yog li ua kom txhua yam nyob hauv qhov chaw raug thiab tsis muaj kev sib txuas.

Txhua qhov tseem ceeb ntawm RFID sib txawv yog li koj xav ua dab tsi yog xub los so koj daim npav thiab tshawb xyuas cov lej txhawm rau nyeem daim npav ID, tom qab ntawd koj yuav tsum hloov daim ntawv IF cov xwm txheej nrog tus lej hauv qhov no:

Piv txwv ID: 5AE4C955

Mob: id [0] == 0x5A && id [1] == 0xE4 && id [2] == 0xC9 && id [3] == 0x55

Muaj LCD cov cai yog tias koj xav ntxiv LCD rau txoj haujlwm, tsuas yog lub taub hau hais tias cov cai yuav tsis ua haujlwm tshwj tsis yog tias cov lej suav nrog txawm tias koj tsis siv LCD

Kauj ruam 3: Lub thawv

Lub thawv
Lub thawv

Raws li tau hais ua ntej, kuv lub thawv tau tsim los siv cov duab los qhia thiab kua nplaum kub, Kuv txiav tawm ib lub xwmfab hauv lub ru tsev ntawm lub npov rau lub hau thiab lub cav servo, Kuv muab lub servo tso rau hauv qhov chaw thawj zaug qhwv cov khoom hauv kab xev hockey (txhua daim kab xev yuav ua) thiab kub gluing daim kab xev los tsim qhov nyuaj ntawm lub plhaub kom kuv tsis ua kom puas qhov yog li kuv tuaj yeem tsuas yog tev daim kab xev tawm tom qab.

Lub npov tau ntim tag nrho tshwj tsis yog sab nraub qaum qhov kev sib txuas los ntawm, Kuv sab laug lub qhov rai 1/3 thaj tsam ntawm sab nraub qaum thiab sab me me ntawm cov duab los qhia hauv qab kom tau txais npib tawm tau yooj yim.

Pom zoo: