Cov txheej txheem:

Smart Fridge: 11 Kauj Ruam
Smart Fridge: 11 Kauj Ruam

Video: Smart Fridge: 11 Kauj Ruam

Video: Smart Fridge: 11 Kauj Ruam
Video: Видео-обзор инверторных холодильников HIBERG 2024, Hlis ntuj nqeg
Anonim
Ntse Txias
Ntse Txias
Ntse Txias
Ntse Txias
Ntse Txias
Ntse Txias

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

Txuas rau Raspberry Pi 3
Txuas rau Raspberry Pi 3

Txhawm rau txuas rau peb RPi peb yuav siv Putty.

  1. Download tau Putty
  2. Tsim kev sib txuas SSH (saib duab)
  3. 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

Hluav Taws Xob Hluav Taws Xob
Hluav Taws Xob Hluav Taws Xob
Hluav Taws Xob Hluav Taws Xob
Hluav Taws Xob Hluav Taws Xob
Hluav Taws Xob Hluav Taws Xob
Hluav Taws Xob Hluav Taws Xob
Hluav Taws Xob Hluav Taws Xob
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

Tsim Lub Txias
Tsim Lub Txias
Tsim Lub Txias
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

Txuas Sensors mus rau lub tub yees
Txuas Sensors mus rau lub tub yees
Txuas Sensors mus rau lub tub yees
Txuas Sensors mus rau lub tub yees
Txuas Sensors mus rau lub tub yees
Txuas Sensors mus rau lub tub yees

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

Coding Hardware
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

Coding Lub Vev Xaib
Coding Lub Vev Xaib
Coding Lub Vev Xaib
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: