Cov txheej txheem:

IOT Coffeemaker (UFEE): 7 Kauj Ruam (nrog Duab)
IOT Coffeemaker (UFEE): 7 Kauj Ruam (nrog Duab)

Video: IOT Coffeemaker (UFEE): 7 Kauj Ruam (nrog Duab)

Video: IOT Coffeemaker (UFEE): 7 Kauj Ruam (nrog Duab)
Video: В ШОКЕ ОТ ПЕРВОГО РАЗА! Круиз Все Включено По Красному Морю 2023 MSC Splendida / Тревел 24 2024, Kaum ib hlis
Anonim
IOT Cov Coffeemaker (UFEE)
IOT Cov Coffeemaker (UFEE)

Raws li pov thawj ntawm kev paub, peb yuav tsum tsim IOT lub cuab yeej uas tuaj yeem tswj tau los ntawm tus kheej lub vev xaib sib tham. Txij li thaum kuv nyiam kas fes, thiab haus ntau ntawm nws txhua hnub, Kuv txiav txim siab ua kuv tus kheej IOT kas fes.

UFEE tus kws ua kas fes: "tus coffeemaker nrog koj nyob hauv siab"

Txhawm rau ua kom lub cuab yeej siv tsis siv neeg kiag li, Kuv tab tom siv kas fes sai.

Kauj ruam 1: Yam Koj Yuav Tsum Tau

- Raspberry Pi Qauv 3

- servo tsav (ARD-T010051)

RTC DS3231

CJMCU-832 PAM8302 2.5W D-Class mono amplifier

- Reed sensor

- 5V RELAY (10A)

Cov khoom siv hauv xeev (5V)

- Aux kab

- Shrinking lub cev

- 2x Copper nozzle

- Bicone daim

- Silicon lub cev

Senseo rhaub 1400W

- Senseo twj 22W

- Lub taub dej Senseo

- Reed hloov (ib txwm qhib)

- coper hlau

PIB 3008

- 2 x LDR

- 4ohm hais lus (lossis lwm hom)

2x 10KΩ resistor

-5KΩ resistor

Diode 1N4007

Txog qhov xwm txheej kuv tau xaiv rau qhov saib zoo nkauj, tab sis muaj ntau txoj hauv kev kom haum rau cov khoom siv uas yuav saib zoo dua thaum koj xav tso nws hauv koj lub tsev.

Kauj ruam 2: Pib

Pib Pib
Pib Pib
Pib Pib
Pib Pib

Kuv pib nrog qhib Senseo coffeemaker thiab tshawb xyuas cov khoom sab hauv. Txhawm rau qhib nws, koj tshem 2 cov ntsia hlau los ntawm sab nraub qaum siv lub hau ntswj ntsia hlau, thiab dua li koj tuaj yeem khawm nws qhib ntawm cov tuav tuav.

Thaum nws qhib, txhua yam koj xav tau yog lub twj tso kua mis, lub rhaub dej, thiab cov xov hlau thiab raj tuav txhua yam ua ke.

Cov kauj ruam tom ntej yog txhawm rau txhim kho lub rhaub dej thiab tso rau hauv lub qhov xav tau, txij li lub rhaub dej thiab lub dab dej yuav tsum zaum kom raug kom thiaj li siv tau. Nco ntsoov tias qhov haum rau lub dab dej tau zaum ntawm sab xis, nruj thiab nkag tau yooj yim.

Thaum qhov ntawd ua tiav, koj tuaj yeem pib txuas cov khoom siv raws li cov phiaj xwm.

Kauj Ruam 3: Lub Nozzle (Saib Zoo)

Lub Nozzle (Saib Zoo)
Lub Nozzle (Saib Zoo)
Lub Nozzle (Saib Zoo)
Lub Nozzle (Saib Zoo)
Lub Nozzle (Saib Zoo)
Lub Nozzle (Saib Zoo)
Lub Nozzle (Saib Zoo)
Lub Nozzle (Saib Zoo)

Rau lub taub hau, Kuv tau siv lub thawv hlau me me uas kuv tau khawb lub qhov kom loj txaus kom haum rau cov khoom bicone. Haum lub raj rau ib qho ntawm lub taub hau thiab ua kom nruj lub qhov taub mus rau daim bicone. Tom qab ntawd laum qhov sib txuam hauv lub thawv hlau thiab lub casing, thiab siv qee qhov ntsia liaj qhov rooj thiab cov txiv ntseej kom nruj nws mus rau lub casing.

Kauj Ruam 4: Lub Kas Fes Dispenser (Saib Zoo)

Lub Kas Fes Dispenser (Saib Zoo)
Lub Kas Fes Dispenser (Saib Zoo)
Lub Kas Fes Dispenser (Saib Zoo)
Lub Kas Fes Dispenser (Saib Zoo)
Lub Kas Fes Dispenser (Saib Zoo)
Lub Kas Fes Dispenser (Saib Zoo)
Lub Kas Fes Dispenser (Saib Zoo)
Lub Kas Fes Dispenser (Saib Zoo)

Txhawm rau tuav cov kas fes, koj yuav xav tau lub khob ntim nrog lub hau pob tshab uas koj tuaj yeem txhim kho rau lub cev.

Laum 2 qhov ntawm mm5mm hauv qab:- Ib qho nyob hauv nruab nrab ntawm lub ntim- ib qho nyob nruab nrab ntawm thawj lub qhov thiab sab

muab lub iav ntawm servo hla lub qhov ze rau sab, thiab ntsia hlau rau ntawm daim (nrog rau servo) nrog 6 ceg. (saib daim duab 1)

Tom qab ntawd nqa daim hlau thiab khoov nws kom zoo li txoj kab nqaim me me, thiab khoov cov ces kaum thiab qhov kawg ntawm ib thooj, yog li koj tuaj yeem rub nws mus rau hauv qab ntawm lub raj mis hla lub qhov nyob hauv nruab nrab. (saib daim duab 2)

Siv lub qhov txuas txuas kom haum cov servo kom ruaj khov rau lub cev ntawm lub khob. (saib daim duab 3)

Thaum kawg laum qhov Ø5mm nyob rau sab nraub qaum ntawm lub ntim kom haum rau LDR thiab ob peb ntxiv txhawm rau txhawm rau ntim lub thawv rau lub cev ntawm lub tshuab. (saib daim duab 4)

Kauj Ruam 5: Npaj thiab teeb tsa lub Sensors

Npaj thiab Mounting Sensors
Npaj thiab Mounting Sensors
Npaj thiab Mounting Sensors
Npaj thiab Mounting Sensors
Npaj thiab Mounting Sensors
Npaj thiab Mounting Sensors

Muaj NTC ua rau hauv lub rhaub dej, uas koj tuaj yeem txuas rau MCP los ntawm kev ua qhov faib hluav taws xob nrog rub tawm ntawm 5KΩ.

LDRs rau kas fes thiab khob kos yuav tsum tau npaj ua ntej. Txij li thaum kuv siv hlau casing, nws yog qhov tsim nyog kom cais nws zoo yog li kuv tsis luv nws nrog rooj plaub. Yog tias koj tseem siv cov hlua hlau, ua cov hauv qab no:- muab qee daim kab xev cais nyob ib puag ncig ntawm ob txhais ceg thiab npog nws nrog lub raj nqaim. (saib daim duab 1)

- tom ntej no, txuas cov xov hlau rau txhua tus ntawm ob txhais ceg thiab tseem npog qhov sib txuas nrog cov raj nqaim, yog li txhua qhov kev sib txuas tau npog tag. (saib daim duab 2 & 3)

- rov ua cov kauj ruam no rau LDR thib ob

- muab lub taub hau ntawm ib qho ntawm LDR's dhau los ntawm lub qhov uas koj nqus rau nws hauv de kas fes ntim thiab khoov ob txhais ceg. (saib daim duab 4)

- npog nrog daim kab xev cais kom tsis muaj lub teeb kis tau los ntawm nraub qaum.

- mount lwm LDR mus rau hauv qab ntawm lub thawv nrog ib daim raj uas tau npog thaum lub khob raug tso, lossis ncaj qha rau hauv paus uas koj tso lub khob. (Thaum xaiv rau qhov kev xaiv thib 2, xyuas kom tseeb tias lub sensor tau npog zoo nrog cov khoom siv pob tshab uas tsis muaj dej!)

Txhawm rau txhawm rau ntsuas lub ntsuas dej mus rau lub tank, sau nws nrog dej kom cov hlau nplaum nyob ntawm nws qhov chaw siab tshaj (dej yuav tsum yog kab tsawg kawg nkaus). Tom qab ntawd koj tuaj yeem mloog thaum lub ntsiab lus hloov pauv, lossis koj tuaj yeem txuas nws mus rau rpi lossis arduino thiab luam tawm tsis tu ncua.

Thaum koj paub tseeb tias koj paub qhov chaw tseeb rau lub ntsuas cua, teeb nws ruaj khov rau hauv lub dab dej thiab ntxiv ntau qhov kub kub kom paub tseeb tias lub raj iav tsis tawg (qhov no rhiab heev). (saib daim duab 5)

Kauj Ruam 6: Kev Teeb thiab Kev Ntsuas

Teeb thiab Calibration
Teeb thiab Calibration
Teeb thiab Calibration
Teeb thiab Calibration

Mount Raspberry pi thiab cov khoom loj dua sab hauv ntawm lub thawv ntoo nrog lub plank tau teeb tsa rau saum (hauv paus qhov chaw uas lub tshuab thiab khob sawv). Kuv tau siv velcro txhawm rau txhawm rau pi thiab cov khoom siv sab hauv lub thawv. Tshaj li koj tuaj yeem txhim kho txhua yam ncaj qha rau ge GPIO pins, lossis siv lub khob cij los yog lub rooj sib tham yog tias koj xav tau.

Txog kev ntsuas ntsuas lub ntsuas, txheeb xyuas qhov muaj txiaj ntsig koj tau txais hauv ob lub xeev thiab hauv cov teeb pom kev sib txawv, thiab kho lawv hauv cov cai. (kuv yuav lossis tsis ua haujlwm). Tib yam mus nrog NTC.

CEEB TOOM: Txoj hauv kev hloov pauv qhov tseem ceeb nyob ntawm qhov chaw koj tso tus neeg tso khoom pov tseg lossis LDR/NTC ua ntej. Thaum koj xub ntxiv tus tiv thaiv nrog LDR, koj yuav tau txais tus nqi siab dua rau lub teeb pom kev qis dua. (1023 yog qhov tsaus ntuj kiag li).

Thaum koj xav siv lub tswb ceeb toom los ntawm txoj haujlwm, koj yuav tsum tau txuas lub xov tooj cua txuas mus rau + - thiab GND ntawm lub tshuab hluav taws xob, thiab tus hais lus rau lub pins ntawm lub tshuab raj. Tom qab ntawd tseem ntxiv 5V rau pawg thawj coj saib. (Qhov no yog siv raws li qhov ntsuas hluav taws xob txhawm rau ua kom nrov nrov). Koj tuaj yeem tseem tuaj yeem kho qhov ntim nrog lub hwj chim ntawm lub rooj tsavxwm.

Kauj Ruam 7: Kev Txhim Kho Qhov System

Nco ntsoov tias koj muaj Raspberry Pi tus qauv 3 nrog Raspbian teeb tsa thiab zeroconf tau teeb tsa yog li koj tuaj yeem teeb tsa nws lub taub hau hla SSH raj.

Yog tias koj tsis paub yuav ua li cas, ua raws phau ntawv qhia no kom nyem Raspbian rau koj daim npav SD. Txhawm rau teeb tsa zeroconf, qhib daim npav SD ntawm koj lub khoos phis tawj thiab kho cov ntaub ntawv cmdline thiab ntxiv cov hauv qab no mus rau qhov kawg ntawm cov ntawv (yuav tsum yog ib kab)

ip = 169.254.10.1

Txhawm rau kom muaj peev xwm txuas rau koj tus pi siv ssh, koj yuav tsum pab nws. Koj tuaj yeem ua qhov no los ntawm kev ntxiv cov ntaub ntawv npe SSH hauv cov npe khau raj yam tsis muaj txuas ntxiv (tsis muaj. Txt).

thaum qhov no tau teeb tsa, koj tuaj yeem ua SSH yeeb nkab rau koj Raspberry Pi siv ssh hais kom ua hauv UNIX davhlau ya nyob twg, lossis siv Putty ntawm lub qhov rais pc.

Thawj zaug koj nkag mus rau pi, daim ntawv pov thawj yog cov hauv qab no:

username: pipassword: raspberry

Txhawm rau kom paub tseeb tias koj cov raspberry pi yog qhov ua tiav, tshaj tawm cov lus txib hauv qab no hauv lub davhlau ya nyob twg:

sudo apt hloov tshiab && sudo apt hloov tshiab

Tam sim no koj tuaj yeem teeb tsa cov pob khoom xav tau los ntawm kev tshaj tawm cov lus txib hauv qab no:

sudo apt install -y python3-venv python3-pip python3-mysqldb mariadb-server uwsgi nginx uwsgi-plugin-python3

Tom ntej no, ntxiv cov npe tshiab hauv koj cov npe hauv tsev nrog lub npe haum (piv txwv li ufee) thiab nkag mus hauv nws:

mkdir project1 && cd project1

Tom ntej no koj xav teeb tsa ib puag ncig virtual uas daim ntawv thov yuav khiav. Koj tuaj yeem ua qhov no nrog cov lus txib hauv qab no:

python3 -m venv-system-site-packages env

qhov chaw env/bin/qhib

nab hab sej -m pip nruab mysql-connector-python argon2-cffi Flask Flask-HTTPAuth Flask-MySQL mysql-connector-python passlib

Tam sim no koj ib puag ncig virtual tau nce thiab khiav. Tam sim no koj tuaj yeem luam qhov chaws los ntawm kuv github nyob ntawd. Koj tuaj yeem pom nws ntawm no. Koj tseem tuaj yeem clone nws tam sim nrog cov lus txib hauv qab no:

git clone

tom ntej no, peb yuav teeb tsa lub database:

sudo mariadb <ufee/sql/init_db.sql && sudo mariadb <ufee/sql/ufeedump.sql

Kev teeb tsa ntawm NGINX thiab UWSGI:

Hloov 'Joshy' hauv cov ntaub ntawv teeb tsa nrog koj tus kheej lub npe siv nrog cov lus txib hauv qab no:

sed -i s/joshy/$ USER/g conf/*

ntxiv thiab qhib cov kev pabcuam:

sudo cp conf/project1-flask.service/thiab/systemd/system/

sudo systemctl daemon-reload

sudo systemctl pib project1-flask.service

Thiab thaum kawg teeb tsa NGINX:

sudo cp conf/nginx/etc/nginx/sites-available/ufee

sudo rm/etc/nginx/sites-enabled/default

sudo ln -s/etc/nginx/sites-available/ufee/etc/nginx/sites-enabled/ufee

sudo systemctl rov pib dua nginx.service

sudo systemctl pab kom project1-flask.service

Tam sim no lub kaw lus yuav tsum tau nce thiab khiav! Txaus siab rau koj kas fes;)

Pom zoo: