Cov txheej txheem:

Pib: Kawm IOT Nrog Txias Ntses Feeder: 9 Kauj Ruam (nrog Duab)
Pib: Kawm IOT Nrog Txias Ntses Feeder: 9 Kauj Ruam (nrog Duab)

Video: Pib: Kawm IOT Nrog Txias Ntses Feeder: 9 Kauj Ruam (nrog Duab)

Video: Pib: Kawm IOT Nrog Txias Ntses Feeder: 9 Kauj Ruam (nrog Duab)
Video: Hunter Education - Kong Pheng Yang 2-17-2020 2024, Kaum ib hlis
Anonim
Pib: Kawm IOT Nrog Kev Ntses Ntses Cooler
Pib: Kawm IOT Nrog Kev Ntses Ntses Cooler

Txoj haujlwm no yog ntau ntxiv txog kev qhia kom pib nrog cov cuab yeej siv nyiaj tsawg IOT thiab txhua yam koj tuaj yeem ua nrog nws.

  • IOT yog dab tsi?

    • Tau txais los ntawm Google: IoT luv rau Internet ntawm Yam. Internet ntawm Yam hais txog kev sib txuas zuj zus zuj zus ntawm cov khoom siv lub cev uas muaj IP chaw nyob rau kev sib txuas hauv is taws nem, thiab kev sib txuas lus uas tshwm sim ntawm cov khoom no thiab lwm yam khoom siv thiab siv Internet.
    • Tau tom qab ua haujlwm nrog nws: Ua cov khoom vwm vim tias koj tuaj yeem saib xyuas/tswj cov khoom hauv internet.
  • Cov cuab yeej IoT txuas li cas?

    • Tau txais los ntawm Google: Kev sib txuas rau koj ISP tuaj yeem los ntawm ADSL lossis Ethernet siv cov kev pabcuam fiber ntau piv txwv. Thaum lub tsev router txuas rau ISP nws yuav muab tus IP chaw nyob uas yog dab tsi siv los sib txuas lus nrog cov servers lossis lwm yam kev pabcuam hauv Is Taws Nem. Nov yog IP chaw nyob rau pej xeem thiab tuaj yeem hais tau hauv is taws nem.
    • Tau txais tom qab ua haujlwm nrog nws: tsuas yog txuas rau kuv WIFI thiab koj lub cuab yeej tau nce.
  • Yav tom ntej ntawm IOT?

    Internet ntawm Yam (IoT) yog kev siv cov ntsuas hluav taws xob hauv lub cev siv los tso cai rau kev saib xyuas thiab tswj chaw deb. Cov thev naus laus zis no tau txais kev txhawb nqa loj hauv ntau yam xws li kev noj qab haus huv, tuam txhab nyiaj txiag, khw muag khoom, kev tsim khoom, cov khoom siv khoom siv, thiab lwm yam

Yooj yim kawg.

Yog li cia pib.

Kauj Ruam 1: Vim Li Cas Ntses Feeder

Kuv pib kuv txoj kev sau ntawv Qhia 1 xyoo rov qab, vim tias xav tau ua tus pub ntses.

Kuv yuav tsum mus so thiab kuv yuav tsum paub tseeb tias kuv cov ntses yuav tsis tuag thaum kuv tsis tuaj.

Yog li nrog yam khoom pov tseg twg los xij, Kuv tau ua cov ntses pub yooj yim uas tso cov zaub mov tso rau ntawm ib lub sijhawm uas siv lub tshuab servo. Ntseeg kuv, kuv ntses muaj sia nyob (ib nrab hli) ntawm kuv lub caij so.

www.instructables.com/id/Fish-Feeder-Using…

Tab sis qhov kuv xav yog kuv poob qhov tib neeg kov ntawm pub mis rau kuv tus tsiaj. Kuv yeej pib ploj lawm. Yog li kuv tuaj nrog lub tswv yim no los pub lawv los ntawm kev tswj lub cuab yeej dhau qee qhov txhais tau tias qhov twg kuv xav tau tib neeg (kuv) kev cuam tshuam. Yog li IOT saib kev cia siab thiab ua dhau hauv internet koj tuaj yeem tuaj yeem tswj nws zoo li cham. Qhov ntawd yog txhua qhov hais txog qhov haujlwm no thiab vim li cas kuv thiaj ua nws.

Kauj ruam 2: Yam yuavtsum tau kawm uantej

  • Yooj yim ESP-01 cov cai tshaj tawm kev paub.
  • Kev paub pib Arduino IDE.
  • Yooj yim ntawm kev paub pin-out rau ESP-01 thiab Arduino mini pro.
  • Kev paub yooj yim ntawm kev siv thingspeak

Yog tias koj tsis muaj kev paub ua ntej, thov tshawb xyuas cov khoom no hauv Inscrutable koj yuav tau txais ntau txoj hauv kev txuas kom pib. yog li cas peb yuav kawm thiab ua tiav kev paub.

Kauj Ruam 3: Peb Yuav Kawm Dab Tsi

  • Peb yuav siv ESP-01 ua peb lub cuab yeej IOT
  • Nws muab peb ob tus pin IO.
  • Peb yuav ua 2 txoj haujlwm me me ntawm no

    • Ib txoj hauv kev uas koj tuaj yeem cuam tshuam nrog lwm cov khoom siv. (Zoo li Arduino)
    • Lwm qhov nrog tsuas yog ESP-01 ua qhov tseem ceeb.
  • ESP wifimanager yuav teeb tsa li cas.
  • Sib nrug ntawm qhov kev nkag siab ntxiv ntawm Servo Motor txoj haujlwm ua haujlwm.
  • PWM using ESP-01.

Kauj Ruam 4: Cov Khoom Xav Tau rau Txoj Haujlwm

  • ESP-01 thiab USB rau TTL hloov pauv
  • Arduino Pro Mini
  • SG-90 SERVO TSAV
  • 3.7 Lipo Roj Teeb
  • TP456 1A Li-ion roj teeb them nqi
  • Cov laug cam
  • Soldering Khoom
  • Ob peb txiv neej thiab poj niam headers.
  • 3d Tshuab Luam Ntawv. (Koj tuaj yeem xaj cov khoom 3d hauv online.)
  • Ob peb cov cuab yeej siv tes thiab ntawv txhuam
  • Tsim tus as khauj dawb ntawm

Kauj Ruam 5: Sib sau Ntses Pub

Sib sau Ntses Feeder
Sib sau Ntses Feeder
Sib sau Ntses Feeder
Sib sau Ntses Feeder
Sib sau Ntses Feeder
Sib sau Ntses Feeder
  • Kuv paub.. kuv paub 3d tshuab luam ntawv … yuav luam li cas tsis muaj 3d tshuab luam ntawv.. thiab bla..bla..bla..
  • Koj tuaj yeem xaj nws online. Muaj ntau lub khw hauv online.
  • Yog tias koj ua txoj haujlwm nrog 3d tshuab luam ntawv nws yuav nyob ntev thiab ruaj dua.
  • Ua raws cov kauj ruam thiab nws yuav sib sau ua ke hauv ib qho.
  • Txheeb xyuas qhov ntev ntawm cov khoom txav mus los, siv cov ntawv xuab zeb du tawm ntawm qhov chaw txhawm rau txo kev sib txhuam.
  • Thaum ua tiav - peb zoo heev rau cov khoom siv hauv Circuit tiag.

Kauj Ruam 6: Circuit 1: ESP-01 thiab Arduino Pro Mini

Circuit 1: ESP-01 thiab Arduino Pro Mini
Circuit 1: ESP-01 thiab Arduino Pro Mini
Circuit 1: ESP-01 thiab Arduino Pro Mini
Circuit 1: ESP-01 thiab Arduino Pro Mini
Circuit 1: ESP-01 thiab Arduino Pro Mini
Circuit 1: ESP-01 thiab Arduino Pro Mini
  • Rau Circuit ua raws cov duab nws yooj yim heev.
  • Tsiv koj nas mus nrhiav tus lej pin.
  • Tag nrho yog tagged.

Txoj haujlwm ua haujlwm:

  • ESP-01 tuaj yeem teeb tsa yuav koj li ISP siv qhov kev pabcuam espwifimanger. (Tshawb hauv instrutable rau tus tswj hwm wifi koj yuav pom ntau dua 10 qhov kev daws teeb meem)
  • Thaum ua tiav nws yuav txuas ntxiv saib xyuas koj tus lej API.
  • Yog tias nws nce siab nws yuav hloov kho GPIO-01 siab.
  • Tam sim no GPIO-00 yuav ua lub ntsuas pa nkag rau Arduino ntawm Pint D8.
  • D8 yog tias mus siab, nws yuav ua rau kev ua haujlwm servo.
  • Thaum Ua tiav nws yuav hloov kho D7 Siab uas yuav ua tus pin sensor rau ESP GPIO-02.
  • Thiab GPIO-02 mus siab nws yuav hloov kho qhov API kom qis.
  • Thiab ua rau GPIO-00 qis.
  • Thiab dua lub voj txuas ntxiv.

Kauj Ruam 7: Circuit 2: ESP-01 Xwb

Circuit 2: ESP-01 Xwb
Circuit 2: ESP-01 Xwb
Circuit 2: ESP-01 Xwb
Circuit 2: ESP-01 Xwb
Circuit 2: ESP-01 Xwb
Circuit 2: ESP-01 Xwb

Rau Circuit ua raws cov duab nws yooj yim heev

Txoj haujlwm ua haujlwm:

  • Yog li raws li koj paub los ntawm peb qhov kev sib tw dhau los peb tuaj yeem siv ob tus pin rau I/O.
  • Yog li ntawm no ib qho peb yuav siv rau qhov taw qhia thiab ib qho rau kev tswj hwm servo.
  • GPIO-00 rau servo tswj.
  • GPIO-02 rau qhov qhia.
  • Txhawm rau tswj servo peb yuav tsum tsim PWM teeb liab los ntawm GPIO-00 tus pin.

    • Yog li qhov kev pabcuam servo's PWM rau lub teeb liab ntawm 20ms voj voog.
    • Yog tias koj muab 1ms PWM ntawm Cycle 20ms nws yuav nyob ntawm 0 degree. (rau kuv nws ua haujlwm ntawm.7ms)
    • Yog tias koj muab 2ms PWM ntawm Cycle 20ms nws yuav nyob ntawm 180 degree.
    • Yog tias koj muab 1.5ms PWM ntawm Cycle 20ms nws yuav nyob ntawm 90 degree.
    • Pom tus lej ua haujlwm runServo code nws yuav muab tswv yim zoo rau koj.
  • Yog li hauv qab no yog cov laj thawj

    • Khaws saib API qhov kawg taw tes rau tus nqi.
    • Yog tias koj tau txais qhov ntawd, Xa PWM teeb liab hauv GPIO-00.
    • Tshaj li ua qhov API kawg taw tes hu kom rov pib tus nqi.
    • Ces voj tib yam.
  • Logic yooj yim heev.

Kauj Ruam 8: Txoj Cai Taug Kev

Txoj Cai Taug Kev
Txoj Cai Taug Kev

Yog li koj yuav paub me ntsis kev paub yog qhov txaus ntshai, zoo ib yam rau kev tso cai nkag mus. Tus lej yam tsis paub nws ua dab tsi zoo li qub.here peb yuav tham txog txhua txoj haujlwm thiab nws ua haujlwm li cas.

Txoj Haujlwm 2: Tsuas yog ESP8826

  • fastblink (int suav, String msg)

    • Nws ua rau inbuilt coj mus ntsais rau tus lej suav uas muab los ntawm int suav.
    • Nws yuav luam tawm cov lus ntawm tus lej.
  • tau txais ()

    • Cov haujlwm no rov ua tiav cov ntaub ntawv teev tseg kawg rau qhov chaw tshwj xeeb hauv url.
    • Siv ArduinoJson lub tsev qiv ntawv ntawm 5.1 peb tab tom ua haujlwm ntawm qhov tau txais json tus nqi.
  • updateStatus ()

    Peb tab tom hloov kho hu rau ntawm thaj chaw los teeb tus nqi rau 0

  • runServo (int servoPin, kawm tiav)

    • Nws yog PWM niaj hnub rau servo.
    • Nws pab cov servo kom ntsuas nrog qib kawm tshwj xeeb.
  • Teeb

    • Peb tab tom teeb tsa wifimanager.
    • Yog li nrog qhov ntawd peb yuav tuaj yeem txuas peb lub cuab yeej mus rau ISP tshwj xeeb siv wifi.
    • Thaum nws txuag nws yuav muaj rau txhua lub sijhawm, tsis tas yuav teeb tsa nws dua.
    • Thaum nws txuas nrog peb tab tom ntsais lub inbuilt coj rau 10 zaug.
    • Tom qab ntawd teeb tsa Tus Nqi Teb hauv cov khoom hais rau xoom siv hloov tshiabStatus ().
    • Tshaj li 5 feeb ncua kom cov API tom ntej hu ua haujlwm tau zoo.
  • Loop

    • Yog tias lub cuab yeej txuas nrog dua li peb tab tom hu rau API kom tau txais qhov txiaj ntsig kawg lossis qhov kawg.
    • Yog tias tus nqi teb hauv 1 dua li tsuas yog peb tab tom teeb tsa hauv LED Pin kom ci.
    • Hu rau servo kom txav mus rau 0 degree → 2sec qeeb → 180 degree → 2sec qeeb → 0 degree
    • Tshaj li ncua los ua api hu tom ntej.
    • Tshaj li peb tab tom teeb tsa tus nqi ntxiv 0.

Txoj Haujlwm 1: esp8826 Feeder thiab Feeder

  • Yuav ua li cas lwm txoj haujlwm ua haujlwm pom koj tus kheej
  • Yog tias koj ua koj tus kheej koj yuav ntsib teeb meem thiab nws yuav pab koj kom kawm tau.
  • Feem ntau txhua txoj haujlwm yog tib yam nkaus xwb nws muaj kev sib txuas lus hla tus pin los ntawm kev teeb tus pin siab lossis qis.
  • Nws twb tau piav qhia hauv kauj ruam kauj ruam.
  • Cov ntaub ntawv tsis zoo Kuv tseem nyob ntawm no los qhia koj thiab xa xov rau kuv yog tias koj xav tau kev pab.

Curl rau postman

Los hloov kho qhov tseem ceeb

Tau txais /hloov tshiab.json?api_key=8FC9LUB2AXVCZJ6L&field2=1 HTTP /1.1

Tus tswv tsev: api.thingspeak.com Cov ntsiab lus-Hom: thov/x-www-form-urlencoded Cache-Control: tsis-cache Postman-Token: 688a86e0-7798-d4e1-b266-b5c666fefba7

Kom tau txais qhov txiaj ntsig qhov txiaj ntsig zaum kawg:

Tau txais /channel/665683/fields/2.json?api_key=QOIEGTM7XT0EKI0V&results=1 HTTP/1.1Host: api.thingspeak.com Cache-Control: tsis muaj cache Postman-Token: b939c04d-7c72-4d82-aea9-b37e6685200

Hloov qhov.txt rau html, nplooj ntawv txuas nrog rau browser ua

Hloov kho qhov nyeem sau kom tsim nyog rau koj tus ntses pub ntses.

Kauj ruam 9: Demo

  • Thawj daim vis dis aus yog nrog tus xa ntawv.
  • Thib ob nrog nplooj ntawv HTML.
  • Peb qhov system video hauv kev nqis tes ua.
  • Forth video yuav ua li cas lub sijhawm kho tshuab tshwm sim.

Ob peb qhov kev hloov kho kuv tau ua:

  • Kuv 3d funnel tau puas thaum lub sijhawm kuv hloov nws nrog lub raj mis me me.
  • Tsim tus tuav me me thiab lo nws nrog tshuab rau clamp

Yog tias nrog kuv txog thaum kawg ua tsaug rau koj qhov kev txaus siab. Thiab yog tias koj ua tau zoo dua thov qhia koj cov kev cov nyom. Kuv paub tseeb tias kuv yuav tsis tuaj yeem npog txhua yam nrog kuv thawj qhov kev hloov kho, thov muab koj cov tswv yim muaj txiaj ntsig kom kuv tuaj yeem hloov kho nws nrog cov ntsiab lus uas ploj lawm.

Thaum kawg ua tsaug, thiab thov koj xav muab koj cov lus muaj txiaj ntsig, yog li kuv tuaj yeem kawm thiab muaj peev xwm wirte ntau cov lus qhia txaus.

Pom zoo: