Cov txheej txheem:
- Kauj Ruam 1: Cov Cuab Yeej thiab Cov Cheeb Tsam
- Kauj Ruam 2: Teeb Kho Raspberry Pi 3
- Kauj Ruam 3: Txuas rau Raspberry Pi 3
- Kauj Ruam 4: Hluav Taws Xob Hluav Taws Xob
- Kauj Ruam 5: Tsim Lub Txias
- Kauj Ruam 6: Txuas Cov Hluav Taws Xob rau Lub Txias
- Kauj Ruam 7: Coding Hardware
- Kauj ruam 8: Mysql
- Kauj Ruam 9: Coding Lub Vev Xaib
- Kauj ruam 10: Autostart Project
- Kauj ruam 11: Xaus
Video: Smart Fridge: 11 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Nyob zoo, hauv cov lus qhia rau tsev kawm ntawv Kuv yuav qhia koj yuav tsim koj tus kheej lub tub yees txias siv Raspberry Pi li cas. Lub tub yees txias suav cov dej qab zib uas koj tshem tawm los ntawm kev siv koj tus kheej daim ntawv lo.
Txhua cov ntaub ntawv yuav raug khaws tseg thiab khaws cia hauv Mysql database thiab muab tso rau hauv lub vev xaib.
Kauj Ruam 1: Cov Cuab Yeej thiab Cov Cheeb Tsam
Cov Cuab Yeej:
- Ib qho hlau txuas
- Solder
- Laum
- Jigsaw
- Pom
- Screwdriver lossis rauj (yog tias koj xav siv cov ntsia hlau lossis ntsia hlau)
- Ntawv xeb
- 2x Hardwood plywood (12mm 122 x 61 cm)
Cheebtsam:
- 1x Raspberry Pi 3
- 1 x 8GB micro SD
- 1x Led sawb (1m)
- 3x coj (ntsuab, xiav thiab liab)
- 1x Khawm
- 1 x 6V / 12V elektric lock
- 1x5v ua
- 6 x ldr
- 9x zog
- 1 x Breadboard
- 1 x MCP3008
- 1 x GPIO T-cobbler
- 1 x Ethernet cable
- 1x Sab nraud lub zog (ntsuas phoo)
- 1x Universal zog (pi)
- Cov xov hluav taws xob
Nov yog cov khoom uas kuv tau siv, tab sis koj tuaj yeem hloov qee qhov lossis ntxiv qee qhov.
Tus nqi siab tshaj plaws yam tsis muaj cov cuab yeej yog txog € 140
Kauj Ruam 2: Teeb Kho Raspberry Pi 3
Peb yuav pib txhim kho kev ua haujlwm ntawm peb Raspberry Pi.
Rub tawm cov duab "Raspbian Jessie nrog pixel" los ntawm Raspberry Pi lub vev xaib. Koj yuav pom tias qhov no yog ZIP-file. Extract ZIP-file no mus rau qhov chaw xav tau.
- Rub tawm lub cuab yeej Win32 Disk Imager, qhov no tuaj yeem rub tawm ntawm Sourceforge.
- Nyem rau ntawm daim nplaub tshev icon xaiv cov duab
- Tom qab ntawv xaiv ntawm "Ntaus" koj microSD
- Tom qab ntawv nyem rau "Sau"
Tom qab daim duab tau sau rau ntawm koj microSD, koj tuaj yeem qhib microSD hauv Windows Explorer.
- Qhib cov ntaub ntawv "cmdline.txt"
- Ntxiv kab hauv qab no ua ntej lo lus "rootwait": 169.254.10.0
- Tom qab ntawd khaws cov ntawv.
Ntxig microSD hauv RPi
Thov qhov hluav taws xob rau koj RPi nrog 5, 2V DC Adapter
Txuas lub network cable mus rau RPi thiab txuas nws mus rau qhov chaw nres nkoj network ntawm koj lub computer.
Koj Raspberry tau npaj siv tam sim no.
Kauj Ruam 3: Txuas rau Raspberry Pi 3
Txhawm rau txuas rau peb RPi peb yuav siv Putty.
- Download tau Putty
- Tsim kev sib txuas SSH (saib duab)
-
Kos npe rau hauv
- Username: pib
- Lo lus zais: raspberry
Teem WIFI UP
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Mus rau hauv qab ntawm cov ntawv thiab ntxiv cov hauv qab no:
network = {ssid = "lub npe ntawm lub wireless network"
psswrd = "tus password ntawm lub network psk =" password ntawm lub wireless network "}
Txhawm rau pom koj tus IP chaw nyob yam:
ifconfig wb 0
Tam sim no koj tuaj yeem txuas wirelessly rau koj Raspberry Pi Hostname hauv Putty = IP chaw nyob
Yog tias muaj teeb meem txuas rau wifi, koj tuaj yeem kho cov ntaub ntawv zoo li no:
"sudo nano /etc/wpa_supplicant/wpa_supplicant.config"
Kauj Ruam 4: Hluav Taws Xob Hluav Taws Xob
Hauv theem no peb yuav txuas txhua lub ntsuas hluav taws xob mus rau Raspberry pi.
Txuas T-cobbler mus rau GPIO pins ntawm raspberry pi thiab muab tso rau ntawm lub khob cij. Lossis koj tuaj yeem ua koj tus kheej PCB thiab ua kom nws ruaj khov dua.
YWB 3008:
- Txuas tus VDD tus pin rau 3v3Connect
- VREF tus pin rau 3v3Connect
- AGND tus pin rau GNDConnect
- CLK tus pin rau SCLKConnect
- Dout tus pin rau MISOConnect
- Din tus pin rau MOSIConnect
- CS tus pin rau CEOConnect
- tus pin DGND rau GND
LDR:
Txuas txhua LDR koj siv (max 8) rau ib tus pin ntawm MCP3008.
Txuas thawj tus pin ntawm LDR mus rau 3v3 thiab tus thib ob rau tus tiv thaiv thiab tus tiv thaiv rau GND, thiab txuas de LDR ntawm LDR thiab tus tiv thaiv rau tus pin ntawm MCP3008.
Tseem ceeb heev: Nco ntsoov tias txhua lub xov hlau mus rau pi tau txuas nrog txoj cai GPIO tus pin, txwv tsis pub koj txoj haujlwm yuav tsis ua haujlwm.
RFID
- Feem ntau tus pin sab laug (Voltage pin) mus rau 3v3 tus pin ntawm RPI
- Qhov thib ob (RST) rau GPIO25
- Av rau hauv av
- IRQ ne
- MISO rau MISO ntawm RPI
- MOSI rau MOSI ntawm RPI
- SCK rau SCLK ntawm RPI
- SDA rau Tus Thawj Coj ntawm RPI
Lub tub yees khawm:
- Ib tus pin rau 3v3 tus pin ntawm RPI
- Lwm qhov rau tus pin 13 ntawm RPI
Peb qhov LED:
- Ib tus pin rau 220 Ohm resistor thiab rau GROUND ntawm RPI
- Lwm tus pin rau 23 tus pin, 24 tus pin thiab 26 tus pin
LED teeb nyob rau hauv lub tub yees:
- Txuas tus pin (+) rau 5V
- Lwm tus pin rau GROUND
LOJ:
- Ib tus pin ntawm lub xauv (GROUND) koj txuas rau hauv av ntawm lub adapter sab nraud
- Lwm tus pin ntawm lub xauv (+) koj txuas rau Relais
- Qhov zoo ntawm sab nraud adapter koj kuj txuas rau Relais
Yog li tam sim no koj tsuas yog txuas rau Relais nws tus kheej.
- Tus lej tsis zoo ntawm Relais koj txuas rau GROUND ntawm RPI
- Tus pin nyob nruab nrab (+tus pin) koj txuas rau 5V tus pin ntawm RPI
- Lwm Tus pin (KY-1 tus pin) koj txuas rau 21 tus pin ntawm RPI
Kauj Ruam 5: Tsim Lub Txias
Hauv theem no peb tab tom tsim lub tub yees.
Ua ntej tshaj plaws koj yuav xav tau:
- Cov plywood
- Jigsaw
- Cim
Kos txhua qhov sib txawv ntawm cov plywood ua ntej koj pib pom.
2. Tom qab koj txheeb xyuas yog tias txhua qhov khoom lag luam koj tuaj yeem pib pom. (Nco ntsoov tias cov hniav muaj qee qhov dav)
3. Tom qab pom tag nrho cov ntu koj tuaj yeem pib tho qhov rau koj lub ntsuas cua.
- Hauv qab ntawm lub tub yees xav tau 6 lub qhov loj kom cov fwj tuaj yeem nyob twj ywm.
- Hauv pem teb ntawm lub tub yees xav tau 6 qhov me me rau lub LDR sensors.
- Lub ru tsev xav tau 3 lub qhov me me rau 3 leds (xiav, liab thiab ntsuab).
- Nco ntsoov tias rfid tuaj yeem nyeem cov ntoo, txwv tsis pub koj yuav tsum ua kom cov ntoo nyias nyias.
- Ua kom muaj qhov me me nyob sab hauv pem hauv ntej rau lub pob.
Rau lub qhov rooj koj yuav tsum ua 2 lub qhov los txuas lub qhov rooj mus rau sab hauv ntawm lub tub yees. Txhawm rau qhib thiab kaw lub qhov rooj kuv tau teeb tsa tus tes tuav.
Tom qab koj ua tiav txhua txoj haujlwm woordwork koj tuaj yeem tso cov khoom hluav taws xob tso rau hauv qhov chaw sau.
Kauj Ruam 6: Txuas Cov Hluav Taws Xob rau Lub Txias
Hauv cov kauj ruam no peb teeb tsa peb lub tub yees nrog txhua yam khoom uas peb yuav.
Koj tuaj yeem pib los ntawm lo rau ntawm lub khob cij thiab Raspberry pi rau tom qab ntawm lub tub yees, uas yog qhov chaw uas txhua qhov xov hlau tau xaus.
Muab RFID, LED's, LDR's thiab khawm kom raug thiab xyuas kom tseeb tias koj tuaj yeem txuas mus rau ntawm lub khob cij.
Nco ntsoov tias txhua lub xov hlau txuas nrog kom raug, koj tuaj yeem saib cov duab lossis lwm cov kauj ruam los ua nws sau.
Tom qab koj muab txhua yam khoom tso rau hauv qhov chaw raug koj tuaj yeem pib ntsaws qhov sib txawv ua ke zoo li koj pom hauv cov duab. Txhua lub xov hlau tuaj yeem muab zais rau hauv qab ob lossis ob sab saum toj.
Kauj Ruam 7: Coding Hardware
Kuv tau siv qhov program Pycharm yog li kuv tuaj yeem sim txhua yam thaum kuv tau coding. Txhua tus lej uas kuv tau sau, koj tuaj yeem pom ntawm kuv github
Kauj ruam 8: Mysql
Cov ntaub ntawv poob qis pab koj kom pib siv txoj haujlwm no.
Kev lees paub yooj yim ntawm MySql code yog qhov muaj txiaj ntsig zoo los hloov txoj haujlwm yog tias koj xav tau.
Kuv siv 4 lub rooj, Cov Neeg Siv, Dej Haus, Ua thiab Logging. Cov rooj no yog txoj hauv kev yooj yim tshaj plaws thiab raug kom ntseeg tau tias txoj haujlwm ua haujlwm.
Kauj Ruam 9: Coding Lub Vev Xaib
Koj tuaj yeem pom tag nrho cov cai hauv kab ntawv hauv qab no ntawm Github.
Kuv siv qhov program Pycharm los sau txhua yam. Nws yog txoj hauv kev yooj yim rau txoj cai thiab pom txhua yam koj ua thaum koj ua haujlwm.
Kauj ruam 10: Autostart Project
Hauv cov kauj ruam no kuv qhia koj yuav pib li cas pib koj qhov haujlwm ntawm raspberry pi.
Tam sim no peb tab tom tso peb cov cai pib pib thaum peb pib khau kom nws tuaj yeem khiav ntawm nws tus kheej. Muaj ntau txoj hauv kev los ua qhov no tab sis kuv xaiv rau txoj kev rc.local.
Qhib /etc/rc.local nrog koj cov ntawv nyeem uas koj nyiam tshaj thiab muab cov cai no sau rau saum kab "tawm 0"
"pw 15 python3 /home/pi/files/app/RUN.py & python3 /home/pi/files/website/website.py & Thaum kawg"
thaum peb xav pom peb lub vev xaib, koj tuaj yeem tshawb nrhiav tus IP chaw nyob uas tau teev tseg hauv qab ntawm lub vev xaib.py cov ntaub ntawv (lub neej ntawd yog 169.254.10.1:5000). Qhov no yog qhov kawg ntawm kuv thawj qhov kev qhia, yog tias qee yam tsis meej, koj tuaj yeem tawm tswv yim lossis xa xov rau kuv.
Kauj ruam 11: Xaus
Hauv theem no peb yuav tso peb lub smartfridge npaj rau siv.
Txuas lub hwj huam los ntawm Rasberry Pi hauv lub qhov ntsaws. Thaum tos kom txog thaum Raspberry Pi tau pib ua tiav.
Txuas lwm lub hwj chim rau lub qhov (rau lub xauv).
Koj tuaj yeem haus cawv los ntawm kev tshuaj xyuas koj daim paib, kaw lub qhov rooj kom cov dej haus token yuav mus ntawm koj tus lej nyiaj.
Txhawm rau pom koj lub vev xaib: tshawb nrhiav koj tus IP chaw nyob tom qab: 5000
Tam sim no koj Smartfridge tau npaj siv. Txaus siab rau koj cov dej txias uas tsis muaj kev ntxhov siab thiab ua qhov muag ntawm kev siv.
Pom zoo:
Wifi Fridge: 4 Kauj Ruam
Wifi Fridge: - Hav, koj lub chaw tsim khoom tsis muaj lub tub yees, ntawm no, coj qhov no! - Ua tsaug! Tab sis tus phooj ywg, nws tau tawg.- Qhov tseeb thiab qhov ntawd yog qhov kuv tau txais lub thawv kom muaj mis txias hauv kuv kas fes. Los yog kom me ntsis meej dua: mis popsicles.Qhov tub yees 101. Lub tub yees tuaj yeem tawg ntau txoj hauv kev
Sib Nqus Fridge RGB LED Ncej: 8 Kauj Ruam (nrog Duab)
Magnetic Fridge RGB LED Ncej: Nrog txoj haujlwm no koj cov duab, cov hlau nplaum txias lossis txhua yam uas koj xav tau tuaj yeem ci ntawm koj lub tub yees hauv qhov tsaus ntuj.Nws yog qhov yooj yim heev DIY thiab tsis yog txoj haujlwm kim nws nyiam heev rau kuv cov tub yog li kuv xav qhia rau koj.Kuv vam tias koj nyiam
Fridge Guard: Kaw Qhov Rooj Ceeb Toom Rau Koj Lub Txias: 6 Kauj Ruam
Fridge Guard: Kaw Qhov Rooj Ceeb Toom Rau Koj Lub Fridge: Qee zaum thaum kuv nqa ntau yam tawm ntawm lub tub yees, Kuv tsis muaj tes dawb los kaw lub qhov rooj thiab tom qab ntawd lub qhov rooj tsuas yog qhib qhib rau lub sijhawm ntev. Qee zaum thaum kuv siv lub zog ntau dhau los kaw lub qhov rooj txias, nws tsoo tawm tab sis kuv tsis tuaj yeem pom nws
Smart Fridge thiab Cov Npe Khw: 11 Kauj Ruam
Smart Fridge thiab Cov Ntawv Khw Muag Khoom: Nrog lub tub yees txias thiab cov npe khoom lag luam koj tuaj yeem saib xyuas koj li kev yuav khoom. Koj tuaj yeem ua koj daim ntawv yuav khoom yog li koj tsuas yog yuav tsum qhib koj lub xov tooj thaum koj nyob hauv khw muag khoom noj. Txoj haujlwm no tseem tuaj yeem siv rau ntawm lub txee lossis tub rau khoom
Nevera Smart Fridge: 6 Kauj Ruam
Nevera Smart Fridge: Kuv yog tub ntxhais kawm NMCT ntawm Howest Kortrijk (Belgium) thiab yog ib feem ntawm kev xeem peb yuav tsum ua qhov kawg. Kuv tau ua "Nevera", cov cuab yeej los pab koj nco txhua yam uas nyob hauv koj lub tub yees. Nrog kev pab los ntawm lub tshuab luam ntawv barcode, koj yuav muaj