Cov txheej txheem:

ESP8266 Raws Li Multisensor: 3 Kauj Ruam
ESP8266 Raws Li Multisensor: 3 Kauj Ruam

Video: ESP8266 Raws Li Multisensor: 3 Kauj Ruam

Video: ESP8266 Raws Li Multisensor: 3 Kauj Ruam
Video: [아두이노#457] (HA#9) ESPHome으로 몇가지 센서 연동과 RS485 모드버스(modbus) 테스트 해보기!(녹칸다/포로리야공대가자) 2024, Kaum ib hlis
Anonim
ESP8266 Raws Li Multisensor
ESP8266 Raws Li Multisensor

ESP8266 yog lub cuab yeej me me uas tuaj yeem tsim kho tau thiab siv tau yooj yim, tab sis peb yuav tsum siv cov GPIO pins muaj tswv yim vim tias tsis muaj ntau ntawm lawv.

Hauv qhov kev qhia luv luv no kuv yuav qhia koj yuav ua li cas txuas ntau lub ntsuas sib txawv rau nws.

Kauj Ruam 1: Qhov Chaw

Qhov
Qhov
Qhov
Qhov

Qhov tseem ceeb tshaj plaws ntawm lub cuab yeej no yog lub casing, vim kuv tsis muaj lub tshuab luam ntawv 3D, Kuv tau siv lub teeb tsa lub teeb pom kev zoo uas twb muaj lawm. Luckily lub qhov ntawm nws yog qhov loj me ntawm SR501 lub suab ntsuas lub suab!

  • Donwei Tsab ntawv tsa suab Sensor (ebay) (aliexpress)
  • D1 Mini ESP8266 pawg thawj coj loj
  • Tsab Ntawv Ntawv PCB Rau DIY 5x7cm
  • USB Port 5V 1A Phab Ntsa Charger
  • HC-SR501 Infrared PIR Motion Sensor Module
  • RCWL-0516 Microwave Radar Sensor Module
  • 1 x 10V 100uF Electrolytic capacitor (yeem, tsuas yog txhawm rau txo qis lub tswb cuav)
  • 2 x 10K resistor (xaiv tau, tsuas yog txhawm rau txo qis lub tswb cuav)
  • MICRO USB Rau DIP Adapter 5pins
  • DHT22 Kub Vaum Sensor
  • 4.7K resistor BH1750 Digital Light Intensity Sensor Module
  • Piezo Buzzer 3V
  • 330 ohm tiv thaiv
  • WS2812 1-ntsis RGB Module

Seem lub vaj huam sib luag sab hauv los ntawm lub casing, tseem txiav tawm lub roj teeb, vim nws siv sijhawm ntau dua qhov chaw. Ua daim ntawv ua ntej kom txog thaum nws haum zoo rau hauv lub casing, thiab sim npaj cov khoom.

Kauj ruam 2: Kev thaiv kab

Thaiv
Thaiv
Thaiv
Thaiv

Hlau thiab muab cov khoom sib txuas raws li daim duab fritzing. DHT22 tej zaum tsis zoo li saib hauv qhov kev qhia ntawd, tab sis feem ntau tsis yog lub tswv yim zoo los tso lub ntsuas cua sov rau hauv lub casing vim tias cov khoom siv sab hauv cuam tshuam rau qhov ntsuas ntsuas. (thiab rau cov ntaub ntawv: tso lub ntsuas cua sov siab dua cov khoom siv ua haujlwm yog ib qho ntawm cov tswv yim tsis zoo) Yog li kuv tau muab nws tso rau sab xis ntawm lub casing, raws li lub zog xa khoom tuaj txog ntawm nqes mus rau microUSB-> DIP adapter. (nws yog qis dua RCWL)

Vim li cas kuv thiaj siv microwave RCWL thiab SR501 PIR lub suab ntsuas lub suab tib lub sijhawm? Yooj yim los lim tawm qhov tsis zoo: yog tias ob lub ntsuas pa hais tias muaj qee yam tshwm sim dua li nws yuav luag 100% tias tib neeg cov lus tsa suab ua rau nws. (qhov tsis tuaj yeem rub tawm cov neeg tawm tsam yuav tsis xav tau, lub capacitor yuav pab tau ntau dua tab sis kuj tseem xaiv tau)

BH1750 tau muab tso rau tom qab lub casing, tab sis nws yog ib nrab pob tshab, yog li yog muaj lub teeb sab nraum, nws yuav nkag siab nws. (altough nws yuav nkag siab tsawg dua, lub casing tuaj yeem siv rau qhov tso lub teeb ntau kom tuaj txog rau lub ntsuas) Rau tib lub laj thawj WS2812 tseem nyob sab hauv lub casing thiab nws lub teeb tso tawm yuav pom los ntawm cov yas tsis muaj qhov.

RCWL yog hauv qab (sab nraud qhov twg D1 Mini nyob) thiab qhov loj tshaj plaws tuaj yeem nyob deb ntawm ESP8266 tus kav hlau txais xov vim lawv cuam tshuam me ntsis yog tias lawv nyob ze ib leeg.

Kauj ruam 3: Firmware

Firmware
Firmware

Yog tias peb xav teeb tsa thiab siv ESP8266 raws tus lej sib luag hauv txoj hauv kev nrawm tshaj plaws, nws yog lub tswv yim zoo los siv ESPEasy! Yog tias koj tsis tau hnov dua txog nws, tej zaum koj yuav plam Smart Water Controller cov lus qhia. Xijpeem, ESPEasy yog swiss-army-riam firmware uas muaj ntau tus tswj hwm thiab cov cuab yeej txuas hauv nws, uas tuaj yeem teeb tsa tau yooj yim nrog ob peb nyem los ntawm ib tus neeg uas twb tau pom cov ntawv qhia zaub mov ntawm tus router. Lub khoos phis tawj tuaj yeem rub tawm tom qab ntsaws rau hauv USB chaw nres nkoj, kuv tus kheej txoj haujlwm nyiam tshaj rau rub tawm yog nodemcu-pyflasher (ntau yam) tab sis rub tau ESPEasy kuj suav nrog (Windows-only) ESPEasy Flasher application.

Tom qab thawj zaug rub tawm thiab rov pib dua, AP tshiab hu ua "ESP_Easy_0" yuav tshwm sim, tus lej zais pib yog teeb tsa. (Nyeem ntxiv txog nws ntawm no) Tom qab ntawd koj tuaj yeem teeb tsa koj tus kheej WiFi AP lub npe thiab tus password los ntawm qhov browser mus ntsib 192.168.4.1, thiab nrog ob peb nyem qhov tsim nyog Cov Tswj (Domoticz, Nodo, ThingSpeak, Tus Pabcuam Hauv Tsev, PiDome, Emoncms, FHEM, Blynk, Homie, Zabbix) thiab Cov Khoom Siv (ntau dua 70 qhov sib txawv, tab sis 12 tib lub sijhawm) tuaj yeem muab ntxiv.

Tsis txhob hnov qab kaw qhov chaw nres nkoj siv ntawm Cov Cuab Yeej-> Cov ntawv qhia ua zaub mov siab, thiab ua kom txoj cai siv.

Cov cai tau ua haujlwm hauv zos, cov ntsiab lus tsis nyuaj li. (Cov cai kuv tau siv hauv txoj haujlwm no yog nyob hauv cov cai 1.txt)

Muaj ntau qhov ua tau, WS2812 LED tuaj yeem tswj tau los ntawm NeoPixel, [coj nr], [liab 0-255], [ntsuab 0-255], [xiav 0-255] hais kom ua, thiab lub suab nrov tuaj yeem siv tau tog twg los nrog lub suab yooj yim lossis rtttl (Nokia Ringtone Player) cov lus txib.

Pom zoo: