Cov txheej txheem:

[Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk: 4 Kauj Ruam
[Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk: 4 Kauj Ruam

Video: [Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk: 4 Kauj Ruam

Video: [Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk: 4 Kauj Ruam
Video: Dab Neeg Tub Xob (Part102) Nuj Sis Loob Thiab Nuj Zag 30/07/2021 2024, Hlis ntuj nqeg
Anonim
[Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk
[Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk
[Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk
[Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk
[Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk
[Tsev Automation] Tswj Kev Tshaj Tawm Los Ntawm Txhua Qhov Chaw Siv ESP8266 + Blynk

Muaj ntau txoj hauv kev los ua lub tsev siv tshuab hauv tsev, Qee qhov nyuaj, qee qhov yooj yim, Cov lus qhia no Kuv yuav qhia yuav ua li cas thiaj tswj tau yooj yim kev tswj hwm siv ESP-12E nrog Blynk. Kom yooj yim tsim yog ib sab PCB Yog li koj tuaj yeem ua los ntawm koj tus kheej hauv tsev lossis txawm xa cov ntaub ntawv gerber rau PCB chaw tsim khoom los ua rau koj.

Kauj Ruam 1: PCB Tsim

PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim

Cov txheej txheem PCB tsim yog kauj ruam tseem ceeb tshaj plaws vim tias yog peb ua yuam kev qee yam hauv theem no txoj haujlwm yuav tsis ua haujlwm zoo.

Raws li lub ncauj lus ntawm cov lus qhia no, Peb yuav siv tus qauv ESP8266 (ESP-12E) los tsav ON/OFF. Yog li peb yuav tsum nkag siab qhov tshwj xeeb ESP8266. Yog tias peb saib hauv Ntu Tus Qauv Hluav Taws Xob hauv daim ntawv ESP8266 peb pom qhov ntawd

- Cov khoom siv hluav taws xob yog 3.3V

- Qhov siab tshaj GPIOs qhov siab yog 3.3V

Qhov siab tshaj GPIOs tam sim no yog 12mA

Peb yuav siv 5V xa tawm, Cov khoom siv yuav yog 5V tab sis ESP8266 xav tau tsuas yog 3.3V Yog li peb xav tau qee tus tswj hwm los ntawm 5V txog 3.3V. Rau tsav 5V txuas siv 3.3V peb xav tau qee lub transistor kom tau txais tam sim no thiab qhov hluav taws xob, rau cov lej tsawg kawg ntawm ntu kuv pom zoo kom siv transistor array ULN2803. Nrog ULN2803 peb tuaj yeem tsav mus txog 8 qhov xa tawm thiab nws muaj sab hauv sab hauv rov qab los tiv thaiv qhov ntsuas hluav taws xob loj thaum hloov OFF qhov ntsuas hluav taws xob.

Thaum kawg kuv xaiv 1117-3.3 rau tus tswj qhov hluav taws xob, ULN2803A rau kev tsav tsheb rov qab

Tom ntej no, ESP8266 Hom khau raj thiab hom Flash

Los ntawm nplooj ntawv nplooj ntawv 8 kom ESP8266 khau raj ib txwm koj yuav tsum siv cov laj thawj ntawm tus pin raws li hauv qab no

- HIGH ntawm CHIP_EN, GPIO0, GPIO2

LOW ntawm GPIO15

Txhawm rau teeb tsa firmware rau ESP8266 koj yuav tsum siv cov laj thawj ntawm tus pin raws li hauv qab no

- HIGH ntawm CHIP_EN, GPIO2

LOW ntawm GPIO15, GPIO0

Yog li, kuv siv 10k tus tiv thaiv kom rub thiab rub qis ntawm txhua tus pin raws li tau piav qhia thiab siv lub laub khawm li RESET thiab FLASH tso cai rau koj nkag mus rau txhua hom yooj yim.

Kauj Ruam 2: Ua PCB

Ua tus PCB
Ua tus PCB
Ua tus PCB
Ua tus PCB
Ua tus PCB
Ua tus PCB
Ua ib qho PCB
Ua ib qho PCB

Yog tias ua tau koj tuaj yeem xa cov ntaub ntawv gerber rau PCB chaw tsim khoom, tab sis Yog tias tsis yog peb yuav ua nws los ntawm peb tus kheej.

Kuv siv cov cua sov hloov mus ua PCB cov kauj ruam yog:

- Luam txheej hauv qab ntawm daim duab duab.

- Txiav PCB yooj yim nrog qhov loj me nrog peb tsim.

- Siv hlau los hloov tus number case los ntawm ntawv mus rau PCB.

- Tom qab tshem daim ntawv poob rau PCB rau hauv PCB kua qaub.

- Ntxuav PCB nrog Thinner kom tshem tus number case.

- Drilling PCB

- Etching PCB

Kauj Ruam 3: PCB Los Ua Ke

PCB los ua ke
PCB los ua ke
PCB los ua ke
PCB los ua ke
PCB los ua ke
PCB los ua ke
PCB los ua ke
PCB los ua ke

Hauv PCB Cov Rooj Sib Tham kauj ruam, Thov ua tib zoo hais txog Soldering hlau.

Hauv theem no kuv pom zoo kom siv cov cuab yeej me me ua ntej. Yog tias koj ua PCB los ntawm koj tus kheej siv lub ntsuas ntsuas los txheeb xyuas qee qhov chaw nqaim kom tiv thaiv hluav taws xob luv.

Kauj ruam 4: Coding thiab Flashing

Image
Image
Coding thiab Flashing
Coding thiab Flashing
Coding thiab Flashing
Coding thiab Flashing
Coding thiab Flashing
Coding thiab Flashing

Ua ntej, Ntawm koj lub xov tooj ntawm tes teeb tsa "Blynk" daim ntawv thov, sau npe thiab nkag mus rau hauv daim ntawv thov.

Tom qab nkag mus rau hauv daim ntawv thov coj mus rhaub "Txoj Haujlwm Tshiab".

Nkag mus rau lub npe project, xaiv ESP8266 ua lub cuab yeej ces coj mus rhaub "Tsim Project".

Daim ntawv thov yuav qhia cov lus "Auth Token tau xa mus rau:".

Tab nyob txhua qhov chaw ntawm qhov tsim qauv, lub thawv widget yuav tshwm.

Xaiv lub pob nyem tom qab nkag mus rau LED1 raws li lub npe khawm, Xaiv "GP16" raws li kev tso tawm los ntawm ESP8266 (Saib cov duab), Tus nqi tsawg "0", Tus nqi siab tshaj "1", Hom "Hloov", Sau ON/OFF cov ntawv raws li koj xav tau thiab tab "OK" khawm nyob rau sab xis saum toj ntawm lub vijtsam kom ua tiav kev teeb tsa rau lub pob.

Ua tib yam li hais los saum toj no rau LED2, LED3 thiab LED4

Luag lub pob mus rau txhua qhov chaw koj xav tau.

Coj mus rhaub "Daim duab peb sab" lossis "Ua Si" khawm nyob rau sab xis saum toj ntawm lub vijtsam kom ua haujlwm.

Koj yuav pom tias koj lub rooj tsavxwm tsis nyob.

Tam sim no cia peb mus rau txoj haujlwm ntawm ESP8266 sab.

Txuas USB rau RS-232 rau ESP8266 PCB, Ceev faj txog qib TTL ntawm USB rau RS-232 tus qauv, qib TTL yuav tsum tsis pub dhau 3.6 volts.

Txhawm rau nkag mus rau hom nyem, Nias lub pob pib dua thiab nyem nyem tom qab lub khawm rov pib dua thiab tom qab ntawd tso lub khawm nyem ua ntu zus. Yog tias lub rooj tsavxwm nyob hauv hom nyem, LED1 yuav "ON".

Mus rau Blynk lub vev xaib, Rub tawm Blynk lub tsev qiv ntawv thiab teeb tsa hauv koj lub PC.

Ntawm Arduino IDE goto File-> Piv txwv-> Blynk-> Boards_Wifi-> ESP8266_Standalone.

Hloov txoj hlua "YourAuthToken" rau koj tau txais token los ntawm email.

Hloov koj lub tsev ssid thiab tus password.

Xaiv "NodeMCU 1.0" ua pawg thawj coj.

Xaiv USB rau RS-232 module chaw nres nkoj.

Tshaj tawm cov cai rau board tos kom txog thaum upload tiav (LED1 yuav tig OFF).

Tam sim no tau npaj los tswj kev xa xov los ntawm koj lub xov tooj ntawm tes.

Rov qab mus rau lub xov tooj qhov xwm txheej ntawm pawg thawj coj ua "ONLINE".

Coj mus rhaub ntawm txhua lub pob tom qab ntawd cov hloov pauv yuav hloov ON/OFF raws li tso saib ntawm koj lub xov tooj.

Hmoov zoo.

Pom zoo: