Cov txheej txheem:

Ntse Kiv Cua Tswj: 9 Cov Kauj Ruam
Ntse Kiv Cua Tswj: 9 Cov Kauj Ruam

Video: Ntse Kiv Cua Tswj: 9 Cov Kauj Ruam

Video: Ntse Kiv Cua Tswj: 9 Cov Kauj Ruam
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Hlis ntuj nqeg
Anonim
Ntse Ntxuam Tswj
Ntse Ntxuam Tswj

Txoj haujlwm no tau tsim los kom puv qhov xav tau ntawm kev tswj tus kiv cua hauv ib lub thawv los ntawm kev txhais cov ntaub ntawv tam sim no. Nws muaj lub hom phiaj tsav tus kiv cua ob qho tib si 2 tus pin lossis 3 tus pin los ntawm kev ntsuas dav dav ntawm qhov peev nyiaj me me thiab yuav tsum tswj tau los ntawm wifi.

Raws li lub hom phiaj thib ob nws yuav tsum siv tau yooj yim hauv lub tsev ntse.

Kuv txiav txim siab siv tus qauv ESP8266 nrog Temprature Sensor Shield thiab pawg thawj coj tawg rau Mosfet.

PWM yog tswj los ntawm ESP uas hloov pauv mosfet hauv qhov nrawm.

Khoom siv

- Mosfet Breakout

de.aliexpress.com/item/32789499779.html

- Wemos D1 MiniV3 (Nco ntsoov tias koj xaiv V3, vim tias nws muaj qhov ntsaws.)

- DHT22 Shield

de.aliexpress.com/item/32648082692.html

- Poj Niam Dupont Cov Xov

de.aliexpress.com/item/33039596089.html

- 3D Cov Ntawv Luam (saib STLs txuas nrog)

- ESP Easy Firmware

github.com/letscontrolit/ESPEasy/releases

- 3x8mm ntsia hlau (nyiam rau ntsia hlau hauv yas)

- Kub Kua nplaum

- Soldering hlau

Kauj Ruam 1: Luam Ntawv

Luam tawm rooj plaub nrog Lub Tshuab Luam Ntawv 3D lossis siv Kev Pabcuam Luam Ntawv.

Nov yog kuv qhov chaw luam tawm rau rooj plaub:

  • Txheej siab: 0.2
  • Khoom siv: PLA (thaj chaw qis), PETG/ABS (thaj chaw kub)

Luam nrog kev txhawb nqa rau qhov loj xws li USB. Koj tsis xav tau kev txhawb nqa rau qhov qhib qhov cua.

Kauj Ruam 2: Soldering Boards

Soldering cov laug cam
Soldering cov laug cam
Soldering cov laug cam
Soldering cov laug cam

Solder cov pins uas tau xa nrog lub wemos v3 pob rau lub rooj tsavxwm.

Sab ntev nrog cov yas yuav tsum nyob saum lub rooj tsavxwm. (Daim duab 1.) Cov koob me me qhia tawm ntawm lub rooj tsavxwm hauv qab.

Hint: Siv lub lauj kaub tais diav los txhuam cov pins, koj yuav xav tau cov lus qhia me me.

Tom qab ntawd muab lub lauj kaub txuas nrog tus pin ntev rau qhov ntsuas kub. (Pic. 2)

Rau tam sim no tawm cov pins ntev.

Kauj Ruam 3: Siv Cov Hluav Taws Xob

Soldering Cov Hlau
Soldering Cov Hlau
  • Siv peb txoj hlua txuas nrog tus poj niam txuas dupont.
  • Txiav ib kawg ntawm txhua kab, kho qhov ntev uas koj xav tau.
  • Tshem tawm ib ntu luv ntawm rwb thaiv tsev thiab muab tshuaj txhuam rau txhua qhov kawg xaim.
  • Muab cov cua sov ntswj tubing twb hla lub cable thiab thawb nws mus rau qhov txuas txuas dupont.
  • Txiav ib nrab ntawm cov pins ntev ntawm cov hauv qab no:

    • 5 V
    • GND

    One PWM PIN -> e.g. D5

Ua tibzoo saib koj Daim Ntawv Tiv Thaiv Kub Kub los txiav txim seb tus lej PIN twg yog siv rau cov ntaub ntawv.

Ntawm DHT22 Shield, D4 tau siv. Tsis txhob siv tus lej PIN tib yam

Koj tseem tuaj yeem siv 3.3V Pin ua lwm txoj hauv kev rau 5V

  • Muab me ntsis ntawm cov kab laug sab twb nyob ntawm 3 tus pin.
  • Tom qab ntawd muab cov pins thiab cov hlua txuas ua ke, ib qho rau txhua tus.
  • Muab lub raj tso rau saum nws thiab siv rab phom cua sov los ua kom nws nqig.

Ceev faj tsis txhob tso cua sov ncaj qha mus rau qhov kub. sensor nws yuav raug puas ntsoog lwm yam

Kauj Ruam 4: Muab Cov Khoom Hauv Qhov Case

Muab Cov Khoom Hauv Qhov Case
Muab Cov Khoom Hauv Qhov Case
Muab Cov Khoom Hauv Qhov Case
Muab Cov Khoom Hauv Qhov Case
  • Maj mam nias lub mosfet board thiab wemos nyob rau sab rooj plaub. Raws li pom hauv daim duab. Lawv yuav tsum tau tuav hauv qhov chaw lawm.
  • Muab qee cov kua nplaum kub tso rau ntawm tus pin tuav ob lub laug cam, kom lub rooj tsavxwm tsis tuaj yeem xoob.
  • Tom qab ntawd muab daim npog ntsej muag tso rau saum lub wemos.

Ua tib zoo saib kom raug raws li txoj cai ntawm daim thaiv xws li 5V ntais ntawv ntawm ob lub laug cam tib tus pin.

DHT22 qhov kawg sensor yuav tsum taw tes rau rooj plaub ciam teb ua piv txwv.

Koj tuaj yeem txiav tawm ua tib zoo tom qab cov pins ntawm daim ntaub thaiv. (tej zaum tom qab kuaj)

Kauj Ruam 5: Txuas Tag Nrho

Kev sib txuas tag nrho
Kev sib txuas tag nrho
Kev sib txuas tag nrho
Kev sib txuas tag nrho

Shield rau Mosfet:

5V -> VCC

GND -> GND

PWM PIN -> SIG

Mosfet:

Hwj chim Source + -> VCC IN

Hwj chim Source - -> GND

FAN + -> V +

FAN - -> V -

FAN (xaiv tau 3 PIN) -> Tsis txhob txuas nws. Txiav nws thiab muab lub raj tso rau saum nws.

Siv tas li xaim ferules rau cov ntsia hlau

Kauj ruam 6: Firmware

Firmware
Firmware

Kuv txiav txim siab siv ESPEasy rau kev tswj hwm ESP. Qhov zoo dua yog koj tsis tas yuav paub sau C Code kom mus txog koj lub hom phiaj.

  • Tau txais ib qho ntawm ESP Easy Release
  • Tshem nws thiab siv ESP. Easy. Flasher.exe

    • Ua ntej xaiv qhov chaw nres nkoj com
    • Tshaj li qhov firmware xaus nrog normal_ESP8266_4M1M.bin
    • Sau nws rau wemos
    • Rov pib dua lub cuab yeej (tshem lub usb rau lub sijhawm luv)
    • WiFi AP "ESP_Easy_0" yuav tshwm, lo lus zais: teeb tsa (ua ntej 2.0 AP tau hu ua ESP_0) Yog tias koj tsis tau coj mus rau nplooj ntawv nkag-hauv, xauj mus rau 192.168.4.1
    • Kho ESP kom siv koj li wifi.

4M siv vim yog 4MB Flash.

Kauj Ruam 7: Txuas rau SmartHome

Txuas rau SmartHome
Txuas rau SmartHome
Txuas rau SmartHome
Txuas rau SmartHome
  • Txuas mus rau UI ntawm koj li ESPEasy.

    • Siv koj lub router los txiav txim qhov IP-Chaw Nyob ESPEasy muaj. Feem ntau nws tau teev ua espeasy-0.
    • Tshaj li mus rau lub webinterface los ntawm kev nkag https:// yourip
  • Ntawm ntu ntaus ntawv ntxiv cov cuab yeej ntsuas tshiab. Yog tias koj muaj DHT22 nws feem ntau yog D4 GPIO Pin.
  • Tom qab ua tiav qhov ua tiav ntxiv cov cuab yeej koj tuaj yeem pom qhov tseem ceeb hauv kev saib ua ntej (Pic.2)
  • Mus rau ntawm Cov Tswj Tab thiab xaiv koj li HomeAutomation System. Yog tias koj tseem tsis tau muaj koj tseem tuaj yeem siv MQTT lossis HTTP zoo ib yam

Tshaj li koj tuaj yeem mus ntxiv los sau cov cai lossis kev siv tshuab nyob ntawm koj lub tshuab siv tshuab.

Koj tuaj yeem sim PWM nrog cov lus txib hauv qab no:

yourip/control? cmd = PWM, 14, 2300

Tus kiv cua yuav tsum khiav ntawm yuav luag tag nrho.

Kauj Ruam 8: Rooj Sib Tham Kawg

Yog tias txhua yam ua haujlwm thaum kawg tso lub hau rau saum thiab ntsia hlau 4 zaug, 3x8mm ntsia hlau hauv nws.

Kuv feem ntau nyiam cov ntsia hlau ua rau ntswj rau hauv yas. M3 screws tsis tu ncua kuj tseem yuav ua haujlwm.

Kauj Ruam 9: Cov Txuas Txuas

Kuv siv homeassistant raws li kuv qhov kev daws teeb meem smarthome, ntawm no yog qee qhov txuas txuas uas muaj txiaj ntsig zoo los ua ke nws.

www.home-assistant.io/integrations/mqtt/

www.home-assistant.io/integrations/fan.mqt…

www.home-assistant.io/integrations/sensor….

Pom zoo: