Cov txheej txheem:

LabInv: 9 Kauj ruam
LabInv: 9 Kauj ruam

Video: LabInv: 9 Kauj ruam

Video: LabInv: 9 Kauj ruam
Video: 9. 10 los koj yuav nrauj 8/7/2019 2024, Kaum ib hlis
Anonim
LabInv
LabInv

Nrog kev loj hlob ntawm cov thev naus laus zis thiab cov ntaub ntawv, kev thawb rau pem hauv ntej mus rau digitalisation thiab kev yooj yim ntawm txoj haujlwm loj hlob nrog nws. Hauv kuv qhov haujlwm, kuv xav saib yuav ua li cas yooj yim dua thiab siv digitalize qhov hnyav ntawm cov tshuaj hauv ib puag ncig lab. Hauv qhov kev sim ua haujlwm niaj hnub zoo li qub, cov ntaub ntawv raug sau rau ntawm daim ntawv, thiab tau ua ntev npaum li kev tshawb fawb tau muaj. Qhov no txawm li cas los xij muaj teeb meem, xws li siv sijhawm ntev thaum ib tus xav tau digitalize hais cov ntaub ntawv, kev nyeem tau yog nyob ntawm tus kws sau ntawv, tsis xav-ua rau ua tsis raug cai sau cov ntaub ntawv, thiab lwm yam.

Kuv txoj haujlwm nrhiav kom yooj yim dua lwm yam cuam tshuam nrog kev sau cov ntaub ntawv hauv ib puag ncig lab: kev tswj hwm lab.

Qee cov tshuaj khaws cia tuaj yeem nrawm dua li lwm tus, thiab nws yog nyob ntawm tus neeg uas hnyav tshaj qhov khoom tau tshaj tawm rau lub taub hau ntawm chav haujlwm lossis cov neeg saib xyuas, kom xaj thiab rov ntim khoom. Qhov no tuaj yeem yooj yim mus tsis tau, vim yog qhov tseeb uas peb zoo li tsis nco qab yam thaum peb muaj lwm yam khoom nrawm ntawm peb lub siab.

Yog li kev daws teeb meem yog saib xyuas cov tshuaj thiab cov xwm txheej uas lawv tau hnyav. Ntawm no kuv tsuas yog ua haujlwm qee qhov hauv paus: taug qab seb cov tshuaj ntau npaum li cas raug tshem tawm thiab leej twg nkag mus rau lub txee dai khaub ncaws vaj tsev.

Khoom siv

Rau qhov haujlwm no kuv tau siv qee yam:

  • Raspberry Pi 3B+
  • RFID tshuab luam ntawv
  • OLED zaub
  • Barcode scanner module (2D)
  • Electromagnetic ntsuas phoo
  • Load cell, suav nrog HX711 board
  • Siv xov tooj txuas (0RZ-SH-205L)
  • Cov roj teeb txaus los ua lub hauv paus 12V
  • Kev hloov pauv (BC337)
  • Ib lub pob
  • Ob peb resistors
  • Ib pawg ntawm cov kab

Kauj Ruam 1: BOM: Cov Nqi Khoom Siv

Kauj Ruam 2: Teeb Koj Raspberry Pi 3B+

Teeb Koj Raspberry Pi 3B+
Teeb Koj Raspberry Pi 3B+

Nco ntsoov kom tau txais cov haujlwm xws li muab tso rau kom nkag tau yooj yim rau Pi ntawm qhov deb deb. Mount ib daim duab ntawm Pi uas muaj Raspbarian thiab muaj APIPA hnav zoo ib yam.

Nco ntsoov teeb tsa ntau txoj haujlwm ntawm Pi, xws li MySQL, Python thiab pip.

Kauj Ruam 3: Txuas Koj Cov Cheeb Tsam

Txuas Koj Cov Cheeb Tsam
Txuas Koj Cov Cheeb Tsam
Txuas Koj Cov Cheeb Tsam
Txuas Koj Cov Cheeb Tsam

Tag nrho cov khoom sib txuas ua ke raws li sawv cev hauv cov duab.

Cov interface hauv qab no tau siv:

  • Kev sib txuas lus txuas rau tus lej barcode
  • I2C rau OLED zaub thiab RFID
  • Digital kab rau HX711

Kauj Ruam 4: Tsim kom muaj Cov Ntaub Ntawv Haum

Tsim kom muaj Kev Tsim Kho Database
Tsim kom muaj Kev Tsim Kho Database

Kuv qhov haujlwm tuaj yeem pom ua 2 yam sib cais: lub txee dai khaub ncaws thiab qhov sib npaug. Xws li kuv cov ntaub ntawv khaws tseg tau ua los ntawm 2 lub koom haum ib yam nkaus: tus qauv database rau qhov sib npaug thiab lub txee dai khaub ncaws.

Cov no tsis muaj dab tsi zoo nkauj, tab sis lawv ob leeg muaj nyob ntawm 2 lub rooj. Ob leeg muaj lub rooj rau keeb kwm, ib qho muaj lub rooj rau cov ntaub ntawv qhia txog khoom thiab lwm qhov muaj lub rooj rau cov neeg ua haujlwm.

Kauj Ruam 5: Ua Tus Ua Haujlwm Rov Qab

Ua kom muaj nuj nqi Backend
Ua kom muaj nuj nqi Backend

Txhua qhov kev sau npe tau ua tiav hauv Python 3.5

Nws muaj cov hauv qab no kev vam khom:

  • hwj txwv, hwj txwv_cors thiab hwj txwv_socketio
  • gevent thiab geventwebsocket
  • RPi
  • Ua hauv:

    • xov
    • sij hawm
  • Hauv zos:

    • SimpleMFRC522
    • HX711
    • Barcode_Scanner
    • OLED
    • Database
    • Khawm

Cov cai tuaj yeem pom ntawm no.

Kauj Ruam 6: Tsim Tus Qauv Xaus

Tsim Sab Pem Hauv Ntej
Tsim Sab Pem Hauv Ntej
Tsim Sab Pem Hauv Ntej
Tsim Sab Pem Hauv Ntej
Tsim Sab Pem Hauv Ntej
Tsim Sab Pem Hauv Ntej

Lub vev xaib yooj yim yuav tsum txaus kom tsis tsuas yog tso saib cov ntaub ntawv sau los ntawm lub txee dai khaub ncaws thiab hnyav. Tab sis kuj yuav tsum muaj nplooj ntawv nthuav qhia peb nrog cov ntaub ntawv ntawm lub sijhawm tiag tiag los ntawm ob lub tshuab luam ntawv thiab qhov nyiaj tshuav.

Qhov no txhua tus tsim los ua mobile ua ntej, ua kom yooj yim, ua kom huv.

Hais code kuj tseem tuaj yeem pom ntawm no.

Kauj Ruam 7: Tsim Tsev Kawm Ntawv

Tsim Tsev Kawm Ntawv
Tsim Tsev Kawm Ntawv

Lub vev xaib tau cim hauv HTML thiab CSS, khaws (rau feem ntau) kev coj ua zoo, xws li BEM cov cim, nco ntsoov. Tus kws siv tau yog VS Code, kom sai thiab yooj yim pib ntawm cov servers (ua tsaug rau plug-ins), ntxuav thiab txheeb cov cai thiab tawm tswv yim sai sai dab tsi koj yuav raug ntaus nrog cov ntawv qhia zaub mov. Qhov chaw (chaws pom ntawm no) yog qhov yooj yim thiab tsis muaj dab tsi zoo nkauj, tab sis nws yuav ua, tshwj xeeb tshaj yog rau qib tom ntej.

Kauj Ruam 8: Ua Raws Li Kev Ua Haujlwm

Ua raws li Kev Ua Haujlwm
Ua raws li Kev Ua Haujlwm

Nrog lub hauv paus (lub xaib) tam sim no nyob rau hauv qhov chaw, peb tuaj yeem pib siv cov haujlwm uas xav tau los sawv cev rau cov ntaub ntawv ntawm lub xaib.

Qhov no ua tiav nrog Javascript, yooj yim kawm cov lus uas mus ua tes nrog HTML thiab CSS. Tus kws kho mob nug yog ib zaug ntxiv VS Code. Txoj cai kuj tseem tau teeb tsa hauv txoj hauv kev uas ua rau nws nyeem tau yooj yim thiab siv tus phooj ywg, txhua tus ua tsaug rau cov cheeb tsam.

Nrog rau qhov chaw no tuaj yeem sib tham nrog cov ntaub ntawv khaws tseg ntawm raspberry pi thiab pom cov ntaub ntawv rau tus neeg siv.

Ib zaug ntxiv qhov txuas txuas tuaj yeem siv los nrhiav JS code.

Kauj Ruam 9: Ua tiav Casing

Ua kom tiav Casing
Ua kom tiav Casing
Ua kom tiav Casing
Ua kom tiav Casing
Ua kom tiav Casing
Ua kom tiav Casing

Lub hauv siab ntoo me me tau siv los ua raws lub txee dai khaub ncaws, tso lub tshuab hluav taws xob xauv sab hauv. Nws yog cov khoom nyoos, tab sis ib tus tuaj yeem siv daim kab xev los khi ob qho khoom ua ke. Ntxiv mus, lub qhov yog drilled rau cov cables.

Cov ntaub ntawv rau tus pi, qhov twg qhov nyiaj tshuav yuav mus, yog lwm qhov teeb meem sib txawv. Muab tso rau hauv lub thawv yas ntev, siv rau kev khaws cia, pi thiab nws cov xov hlau muaj kev nyab xeeb los ntawm kev siv lub cev feem ntau. Lub qhov tau ua kom thauj cov ntaub ntawv los ntawm cov xov hlau.

Qhov sib npaug nws tus kheej yog qhov nyuaj, kuv pom zoo yuav lub load cell prebuilt, vim tias kuv muaj teeb meem sib sau ua ke cov txiaj ntsig xav kom hais tsawg tshaj plaws. Kuv, kuv tus kheej, tau siv cov ntoo sib dhos ua ke, nrog kev ntsuas raug, siv cov ntsia liaj qhov rooj, uas yog ntsuas tib yam li lub taub hau laum, thiab daim kab xev os, muaj zog tshaj plaws ntawm cov kab xev. Qhov tshwm sim no yog qhov sib npaug uas muaj zog txaus kom hnyav hauv qab 500g (pom tias tawm ntawm txoj kev nyuaj).

Nrog txhua yam txuas nrog, cov khoom kawg yuav tsum npaj kom txhij.

Pom zoo: