Cov txheej txheem:

GroupONE Lub Tsev Ntse: 27 Kauj Ruam
GroupONE Lub Tsev Ntse: 27 Kauj Ruam

Video: GroupONE Lub Tsev Ntse: 27 Kauj Ruam

Video: GroupONE Lub Tsev Ntse: 27 Kauj Ruam
Video: Tseg Ncua Kuv Txiv Lub Tsev Kuv Tsis Mus. 12/31/22 2024, Kaum ib hlis
Anonim
GroupONE Ntse Tsev
GroupONE Ntse Tsev
GroupONE Ntse Tsev
GroupONE Ntse Tsev
GroupONE Ntse Tsev
GroupONE Ntse Tsev
GroupONE Ntse Tsev
GroupONE Ntse Tsev

Txais tos! Qhov haujlwm Raspberry Pi no yog "lub tsev ntse" kev tswj hwm, uas tuaj yeem ntsuas ntau yam ntaub ntawv xws li ntsuas kub, av noo thiab teeb pom kev zoo ntawm ntau qhov chaw hauv tsev. Cov lus qhia no yuav npog kev teeb tsa nkag mus thiab chav nyob nrog rau 1 chav pw.

Cov ntaub ntawv raug xa tawm thiab ua tiav los ntawm IBM Bluemix ua ntej yuav raug xa rov qab mus rau Node-Red, thaum qhov ntawd ua tiav cov haujlwm tsim nyog xws li tig lub teeb thaum tsaus ntuj thiab pom cov lus tsa suab.

Cov neeg siv tuaj yeem saib cov ntaub ntawv sau los ntawm Dashboard hauv Node-Liab uas qhia txog qhov ntsuas tam sim no ntxiv rau cov duab sawv cev ntawm qhov ntsuas thiab daim duab keeb kwm. Lub Dashboard tseem suav nrog cov yam ntxwv ntxiv xws li lub moos uas qhia txog cov ntaub ntawv tam sim no thiab sijhawm thiab hloov mus rau kev tswj hwm ntau yam khoom siv hluav taws xob, uas tau sawv cev ua LEDs thiab lub suab nrov.

Thaum kawg, muaj lub tswb nrov hauv tsev suav nrog MFRC 522 RFID daim npav nyeem ntawv, lub suab nrov, lub suab ntsuas thiab 16x2 LCD zaub. Qhov xwm txheej ntawm RFID lub tsev tswb ceeb toom kuj tseem tshwm ntawm lub dashboard. Dab tsi ua rau lub tswb ceeb toom hauv tsev tshwj xeeb yog tias nws tuaj yeem nyeem cov lus muab rau nws xws li "Zoo Siab Txais Tos Tsev" los qhia tias tau txais kev nkag mus lossis "Access Denied" los qhia tias kev nkag mus tsis raug. Thaum muaj qhov ntsuas pom thaum lub teeb raug kaw, lub suab nrov yuav nrov nrov thiab email yuav xa mus rau tus neeg siv. Thaum lub tswb raug tso tawm lwm tus email yuav raug xa mus.

Kauj Ruam 1: Npaj Cov Khoos Phis Tawj Uas Tsim Nyog

Npaj Cov Khoom Uas Tsim Nyog
Npaj Cov Khoom Uas Tsim Nyog
Npaj Cov Khoom Uas Tsim Nyog
Npaj Cov Khoom Uas Tsim Nyog
Npaj Cov Khoom Uas Tsim Nyog
Npaj Cov Khoom Uas Tsim Nyog

Ua kom ntseeg tau tias koj muaj tag nrho cov hauv qab no ua ntej yuav mus. Qhov ntau ntawm txhua yam khoom xav tau yog muab tso rau hauv kab zauv.

  1. Raspberry Pi 3 Qauv B (3 chav nyob)
  2. Breadboard (3 chav nyob)
  3. Ib nrab khob cij (1 chav tsev)
  4. T-Cobbler cov khoom siv (3 chav nyob)
  5. DHT11 Kub thiab Vaum Sensor (3 chav nyob)
  6. LED (5 chav nyob)
  7. 220 ohms Resistor (5 chav nyob)
  8. 10K ohms Resistor (7 chav nyob)
  9. HC-SR501 PIR Motion Sensor (2 chav nyob)
  10. Buzzer (1 chav nyob)
  11. I2C LCD Screen (1 chav)
  12. RFID / NFC MFRC522 Card Reader Module (1 chav nyob)
  13. Daim npav RFID (2 chav nyob)
  14. Lub Teeb Ntsuas Tus Kheej (LDR) (2 chav nyob)
  15. Analog-rau-Digital Converter (3 chav nyob)
  16. Txiv neej rau txiv neej jumper cables (Yam tsawg kawg 80 units)
  17. Txiv neej rau poj niam jumper cables (Yam tsawg kawg 10 units)
  18. Hwj chim Adapter / USB rau micro USB cable (3 chav nyob)
  19. RJ45 LAN cable (3 chav nyob)

Kauj Ruam 2: Nkag Mus Kho Vajtse #1

Nkag Mus Kho Vajtse #1
Nkag Mus Kho Vajtse #1

Tam sim no peb tau sau cov khoom tseem ceeb, nws yog lub sijhawm los pib teeb tsa kho vajtse rau thawj feem ntawm peb txoj haujlwm - nkag mus. Txuas DHT11 sensor, 10k ohm resistor thiab jumper cables raws li qhia.

Kauj Ruam 3: Nkag Mus Kho Vajtse #2

Nkag Mus Kho Vajtse #2
Nkag Mus Kho Vajtse #2

Tom ntej no, teeb tsa lub teeb LED, 2 txuas txuas txuas ntxiv thiab 220 ohms resistor.

Kauj Ruam 4: Nkag Mus Kho Vajtse #3

Nkag Mus Kho Vajtse #3
Nkag Mus Kho Vajtse #3

Txuas lub buzzer thiab nws 2 jumper cables raws li qhia.

Kauj Ruam 5: Nkag Mus Kho Vajtse #4

Nkag Mus Kho Vajtse #4
Nkag Mus Kho Vajtse #4

Siv 7 tus txiv neej-rau-poj niam jumper cables, teeb tsa RFID / NFC MFRC522 daim npav nyeem ntawv tus qauv.

Kauj Ruam 6: Nkag Mus Kho Vajtse #5

Nkag Mus Kho Vajtse #5
Nkag Mus Kho Vajtse #5

Ntxiv I2C LCD npo thiab nws 4 tus txiv neej-rau-poj niam jumper cables. Qhov no xaus qhov teeb tsa ntawm kho vajtse rau kev nkag.

Kauj Ruam 7: Kho Vajtse Chav Nyob #1

Chav Nyob Khoos Phis Tawj #1
Chav Nyob Khoos Phis Tawj #1

Pib ntawm lwm tus Raspberry Pi, lub khob cij thiab T-Cobbler cov khoom siv rau cov kauj ruam no. Cov kab xev txiv kab ntxwv yog rau 3v3 mov thaum cov hlau grey yog rau GND muab. Siv 330Ω tus tiv thaiv rau LEDS, txuas cov xov hlau ntsuab ntawm daj LED mus rau GPIO23 thiab LED liab rau GPIO24. Txuas cov xaim xim av ntawm ob qho tib si LEDs rau tib kab uas yog xim hlau (GND).

Kauj Ruam 8: Kho Vajtse Chav Nyob #2

Chav Nyob Khoos Phis Tawj #2
Chav Nyob Khoos Phis Tawj #2

Txuas lub DHT11 sensor raws li qhia hauv daim duab saum toj no. Siv 10k Ω resistor lub sijhawm no rau DHT11 sensor, txuas cov xaim xaim rau GPIO4. Txuas cov xaim liab mus rau tib kab ua kab xev txiv kab ntxwv (3v3) thiab xaim dub mus rau tib kab zoo li xaim xaim (GND).

Kauj Ruam 9: Kho Vajtse Chav Nyob #3

Chav Nyob Khoos Phis Tawj #3
Chav Nyob Khoos Phis Tawj #3

Txuas lub DHT11 sensor. Siv 10k Ω resistor lub sijhawm no rau DHT11 sensor, txuas cov xaim xaim rau GPIO4. Txuas cov xaim liab mus rau tib kab ua kab xev txiv kab ntxwv (3v3) thiab xaim dub mus rau tib kab zoo li xaim xaim (GND).

Kauj Ruam 10: Kho Vajtse Chav Nyob #4

Cov Khoom Siv Hauv Chav Nyob #4
Cov Khoom Siv Hauv Chav Nyob #4

Tam sim no, teeb tsa Lub Teeb Pom Kev Tiv Thaiv, nws 10k ohms resistor nrog rau cov hlua txuas uas tsim nyog.

Kauj Ruam 11: Kho Vajtse Chav Nyob #5

Cov Khoom Siv Hauv Chav Nyob #5
Cov Khoom Siv Hauv Chav Nyob #5

Txuas lub PIR Motion Sensor raws li pom hauv daim duab saum toj no. Txuas cov xaim daj mus rau GPIO26. Txuas cov xaim liab mus rau tib kab ua kab xev txiv kab ntxwv (3v3) thiab xaim dub mus rau tib kab zoo li xaim xaim (GND). Tam sim no koj tau ua tiav nrog teeb tsa chav kho vajtse chav nyob. Ib qho ntxiv mus!

Kauj Ruam 12: Chav Khoos Phib Tawj #1

Khoos phib tawj chav pw #1
Khoos phib tawj chav pw #1

Ib zaug ntxiv, pib ntawm lwm Pi, daim ntawv qhia zaub mov thiab cov khoom siv T-Cobbler. Tsiv mus rau chav pw: pib nrog ntxiv cov txiv neej-rau-txiv neej jumper cables, 10k ohms resistor thiab DHT11 sensor raws li daim duab saum toj no.

Kauj Ruam 13: Chav Khoos Phib Tawj #2

Khoos phib tawj chav pw #2
Khoos phib tawj chav pw #2

Tam sim no ntxiv cov teeb pom kev zoo LED, 2 kab txuas txuas ntxiv thiab 220 ohms resistor.

Kauj Ruam 14: Chav Khoos Phib Tawj #3

Khoos phib tawj chav pw #3
Khoos phib tawj chav pw #3

Txuas MCP3008 Analog-rau-Digital hloov pauv thiab nws cov kab hluav taws xob sib txuas. Ntxiv Lub Teeb Ntsuas Tus Kheej thiab nws 10k ohms resistor ib yam.

Kauj Ruam 15: Chav Khoos Phib Tawj #4

Khoos phis tawj chav pw #4
Khoos phis tawj chav pw #4

Txuas lub suab ntsuas siv 3 tus txiv neej rau poj niam jumper cables thiab koj tau ua tiav nrog kho vajtse teeb rau chav pw!

Kauj Ruam 16: Nruab IBM Watson Node-RED Nodes ntawm RPi

Qhib Terminal qhov rai thiab

nruab Node-RED nodes hauv qab no ntawm koj li RPi:

sudo npm i -g node-red-contrib-ibm-watson-iot

Thaum kev teeb tsa ua tiav, rov pib dua koj li RPi

sudo reboot tam sim no

Kauj Ruam 17: Hloov Kho Node-RED ntawm RPi

Qhib Terminal qhov rai thiab hloov kho Node-RED ntawm koj RPi

sudo npm nruab -g-tsis muaj kev nyab xeeb-perm node-liab

Kauj Ruam 18: Txhim Kho Ntxiv Node-RED Modules ntawm RPi

Txhawm rau kom cov dej ntws nkag mus rau theem tom ntej los ua haujlwm, cov qauv hauv qab no yuav tsum tau teeb tsa ib yam.

node-red-contrib-moment (rau format lub sijhawm)

node-red-dashboard (rau dashboard)

node-red-contrib-telegrambot (rau telegram bot)

node-red-node-daemon (rau RFID, ua raws qhov txuas hauv qab no rau cov lus qhia)

developer.ibm.com/recipes/tutorials/reading-rfid-mifare-cards-into-watson-iot-platform-using-your-raspberry-pi-3/

node-red-contrib-i2clcd (rau LCD, ua raws qhov txuas hauv qab no rau cov lus qhia)

github.com/johnty/node-red-contrib-i2clcd

Kauj Ruam 19: Pib Node-Liab thiab Mosquitto

Qhib Terminal qhov rai thiab pib Node-RED ntawm koj RPi

mos txwv

Qhib lwm Terminal qhov rai thiab pib Node-RED ntawm koj RPi

pib-liab pib

Kauj ruam 20: Ntshuam ntws rau nkag RPi

Ntshuam ntws rau nkag RPi
Ntshuam ntws rau nkag RPi
Ntshuam ntws rau nkag RPi
Ntshuam ntws rau nkag RPi
Ntshuam ntws rau nkag RPi
Ntshuam ntws rau nkag RPi

Nyem rau ntawm daim ntawv qhia zaub mov hamburger thiab mus rau Ntshuam> Clipboard

Muab tshuaj txhuam rau hauv cov cai hauv kab ntawv txuas hauv qab no thiab nyem Ntshuam

pastebin.com/raw/a7UWaLBt

Nyem rau ntawm MQTT tawm ntawm qhov

Nyem rau ntawm tus cwj mem

Nkag mus rau IP chaw nyob ntawm Nkag RPi hauv Server teb

Nyem rau Hloov tshiab. Tag nrho lwm qhov MQTT ntawm ib qho kev ntws yuav raug hloov kho.

Kauj Ruam 21: Ntshuam ntws rau Chav RPi

Ntshuam ntws rau Chav RPi
Ntshuam ntws rau Chav RPi
Ntshuam ntws rau Chav RPi
Ntshuam ntws rau Chav RPi
Ntshuam ntws rau Chav RPi
Ntshuam ntws rau Chav RPi

Nyem rau ntawm daim ntawv qhia zaub mov hamburger thiab mus rau Ntshuam> ClipboardPaste hauv kab ntawv hauv kab ntawv txuas hauv qab no thiab nyem Ntshuam

pastebin.com/raw/vdRQP6aa

Nyem rau ntawm MQTT tawm ntawm qhov

Nyem rau ntawm tus cwj mem

Nkag mus rau IP chaw nyob ntawm Chav Nyob RPi hauv Server teb

Nyem rau Hloov tshiab. Tag nrho lwm qhov MQTT ntawm ib qho kev ntws yuav raug hloov kho.

Kauj Ruam 22: Ntshuam ntws rau chav pw RPi

Ntshuam ntws rau chav pw RPi
Ntshuam ntws rau chav pw RPi
Ntshuam ntws rau chav pw RPi
Ntshuam ntws rau chav pw RPi
Ntshuam ntws rau chav pw RPi
Ntshuam ntws rau chav pw RPi

Nyem rau ntawm daim ntawv qhia zaub mov hamburger thiab mus rau Ntshuam> Clipboard

Muab tshuaj txhuam rau hauv cov cai hauv kab ntawv txuas hauv qab no thiab nyem Ntshuam

pastebin.com/raw/x4wZJvFk

Nyem rau ntawm MQTT tawm ntawm qhov

Nyem rau ntawm tus cwj mem

Nkag mus rau tus IP chaw nyob ntawm chav pw RPi hauv Server teb

Nyem rau Hloov tshiab. Tag nrho lwm qhov MQTT ntawm ib qho kev ntws yuav raug hloov kho.

Kauj ruam 23: Ntshuam ntws rau Bluemix

Nyem rau ntawm daim ntawv qhia zaub mov hamburger thiab mus rau Ntshuam> Clipboard

Muab tshuaj txhuam rau hauv cov cai hauv kab ntawv txuas hauv qab no thiab nyem Ntshuam

pastebin.com/raw/CR3Fsbn2

Kauj Ruam 24: Tso App

Nyem rau Deploy khawm kom xa daim ntawv thov.

Yog tias MQTT tsis txuas tom qab xa mus, sau 2 nqe lus hauv qab no (ib qho zuj zus) kom nres thiab rov pib Mosquitto ces sim dua.

sudo /etc/init.d/mosquitto nres

mos txwv

Kauj ruam 25: Saib Dashboard

Saib Dashboard
Saib Dashboard

Mus rau: 1880/ui (piv txwv li 169.254.43.161:1880/ui)

Koj yuav tsum pom lub vijtsam saum toj no.

Kauj ruam 26: Saib Dashboard #2

Saib ntawm Dashboard #2
Saib ntawm Dashboard #2
Saib ntawm Dashboard #2
Saib ntawm Dashboard #2

Koj tuaj yeem nkag mus rau lub dashboard rau lwm 2 RPis (pom saum toj no) los ntawm txhaj rau lub hamburger zaub mov icon thiab xaiv RPi koj xav saib lub dashboard rau.

Kauj ruam 27: Siv Chatbot

Siv Chatbot
Siv Chatbot
Siv Chatbot
Siv Chatbot
Siv Chatbot
Siv Chatbot

Daim ntawv thov suav nrog Telegram bot ib yam. Lub npe ntawm tus bot yog groupONEbot. Cov npe ntawm cov lus txib tuaj yeem pom siv siv cov lus txib pab, raws li pom hauv qab no. Saum toj no yog qee qhov piv txwv ntawm qhov xwm txheej siv tau.

Pom zoo: