Cov txheej txheem:

Txawb Them Nyiaj Txiag Autooff: 20 Kauj Ruam
Txawb Them Nyiaj Txiag Autooff: 20 Kauj Ruam

Video: Txawb Them Nyiaj Txiag Autooff: 20 Kauj Ruam

Video: Txawb Them Nyiaj Txiag Autooff: 20 Kauj Ruam
Video: Hi So - Koj haib 2 (Official MV nkauj tawm tshiab 2019-2020) 2024, Kaum ib hlis
Anonim
Txawb Them Nyiaj Txiag Autooff
Txawb Them Nyiaj Txiag Autooff

Txawb xov tooj them nyiaj txiav txiav thaum them tag. Need tsis txhawj txog lub roj teeb lub neej txawm hais tias koj tau tso nws tseg hmo ntuj. Muaj xov tooj ntawm tes tau siv roj teeb. Txawm hais tias cov roj teeb tau siv los siv, lawv siv xav tau qee qhov kev ceev faj ib yam. Ib qho teeb meem loj nrog kev siv roj teeb yog lawv tshaj tawm thiab them nyiaj ntau dua. Ob qho ntawm cov teeb meem no cuam tshuam rau lub roj teeb lub neej thiab raug nqi rau cov neeg siv tas li. Cov teeb meem no feem ntau tsis quav ntsej los ntawm cov neeg siv ib yam nkaus. Kev tuav lub roj teeb tsis zoo ua rau lawv lub neej luv. Hauv txoj haujlwm no, thawj qhov kuv xav kom siv yog "ntse them" kuv lub xov tooj smartphone kom txuas ntxiv nws lub neej: thaum lub roj teeb txawb tau them tag (txhais tau tias 100%) nws cia li nres S them thiab txiav lub zog los ntawm USB. Feem pua ntawm kev them nqi tuaj yeem teeb tsa raws li peb qhov yooj yim. Qib roj teeb kuj tuaj yeem teeb tsa kom them rau.

Hauv qhov kev qhia no kuv tau siv ESP 8266 WiFi module nrog android automation cuab yeej Macrodroid app. Thaum twg cov roj teeb feem pua nce mus txog 100%, Macrodroid ua rau muaj lus txib rau lub vev xaib uas tawm lus txib rau esp8266. Tom qab ntawd cov lej o/p tus lej ntawm ESP 8266 yuav txiav tawm cov khoom siv them los ntawm lub charger uas txuas nrog los ntawm RELAY.

Kauj Ruam 1: Yam Koj Xav Tau

Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau

1. Node MCU-ESP8266 MODULE2. RELAY 5 volts3. NPN TRANSISTOR 4. USB MALE THIAB CONNECTOR5. RESISTORS: 1K ohm thiab 2.2K ohm

6. Txhua tus poj niam jumper xov hlau rau wifi module

7. PCB me me

Kauj Ruam 2: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court

Tom qab rub tawm cov duab kos rau hauv esp module txuas 5V los ntawm tus txiv neej usb (+Ve Liab hlau) mus rau ib kis ntawm Relay coil, Cov ntsiab lus sib txuas ntawm relay thiab Vin ntawm node MCU. Txuas (N/O) ntawm Relay rau +ve ntawm Poj niam USB (Liab hlau). Txuas ob lub ntsiab lus ntawm kev xa xov mus rau T1 (ib qho NPN transistor). Connect lub hauv paus ntawm T1 rau D2 ntawm node mcu los ntawm 2.2k resistor. Txuas Cov Hluav Taws Xob Dub ntawm Txiv neej USB (-Ve) rau Poj Niam USB (Dub xaim), tus xa tawm ntawm T1 thiab Gnd ntawm Node Mcu. Txuas LED +ve rau N/O ntawm kev xa tawm thiab -ve rau -ve dhau 1k resistor raws li qhia hauv daim duab qhia kab.

NCO TSEG: USB Txiv neej rau poj niam kev txuas xov tooj yuav tsum luv dua vim qhov poob qis yuav tshwm sim hauv cov xov hlau ntev.

Kauj Ruam 3: Nws Ua Haujlwm Li Cas

Thaum pib D2 ntawm Node mcu yuav siab dua thiab T1 tab tom ua lub xeev thiab rov ua kom muaj zog. Tam sim no Voltage yuav dhau los ntawm kev sib txuas lus sib txuas thiab Txawb yuav pib them. Node mcu Digital tso tawm yog 3.3v nkaus xwb uas tsis txaus los tsav Relay yog li T1 tau siv hauv qhov kev sib tw no. Macrodroid APP yog Android lub tshuab siv tshuab uas txuas ntxiv saib xyuas lub xov tooj them feem pua. Sai li them nqi nce mus txog tus nqi piv txwv li. 100% Macrodroid ua tiav qhov URL hais kom ua hauv web browser ntawm Node mcu. Tom qab ntawd D2 yuav mus qis, T1 tig tawm thiab Relay deenergize, Hauv qhov xwm txheej no, cov khoom siv yuav txiav tawm rau txawb thiab them nyiaj nres.

Kauj ruam 4: Code rau Esp8266

Code rau Esp8266
Code rau Esp8266

Kuv siv ESP8266 NodeMCU rau kev tswj Relay.

Thaum Node Mcu lub zog qhib, nws txuas nrog kuv lub network wifi hauv tsev thiab nws muab IP chaw nyob - 192.168.0.115, thiab los ntawm qhov ntawd kuv tuaj yeem tswj hwm kuv qhov kev xa mus los ntawm Localhost. Kuv tab tom siv qhov txuas hauv qab no/url los tswj kuv daim ntawv thov - 192.168.0.115/status 4 = 1 (rau kev xa mus) & 192.168.0.115/status4=0 (rau kev xa tawm).

Nco tseg 1.# koj tuaj yeem hloov pauv tus lej pin.

Nco tseg 2:# D2 ntawm Node MCU yog D4 ntawm arduino hauv qhov program.

Clink txuas hauv qab no txhawm rau txhim kho Arduino cov software tseem ceeb hauv PC

Nruab Arduino lub ntsiab software rau hauv PC

Clink hauv qab no txuas rau Txhim Kho ESP8266 Pawg Thawj Coj hauv Arduino IDE (Windows, Mac OS X, Linux)

Txhim kho ESP8266 pawg thawj coj hauv Arduino IDE

Txoj cai no ua haujlwm zoo heev.

Rub tawm kuv tus lej los ntawm qhov txuas no:

Txuas:- Txawb them tag nrho

Cov kauj ruam.

1. Connect esp8266 rau PC los ntawm USB cable

2. nruab txhua lub tsev qiv ntawv uas muaj nyob hauv daim duab los ntawm github

Xaiv> cuab yeej> Boards

Xaiv> cuab yeej chaw nres nkoj

Qhib qhov txuas saum toj no thiab

hloov koj lub tsev wifi SSID thiab Lo lus zais hauv daim duab, kab zauv 6, 7

hloov koj li wifi IP, Rooj vag txoj kev, subnet.

Txhawm rau kom tau IP, Rooj vag thiab subnet qhib tswj vaj huam sib luag:

nyem rau ntawm saib cov xwm txheej network thiab cov haujlwm

nyem rau ntawm qhov chaw sib txuas hauv cheeb tsam

nyem rau ntawm cov ntsiab lus

IPv4 chaw nyob yog koj tus IP chaw nyob 192.168.0. XXX (xxx tuaj yeem yog tus lej koj tuaj yeem muab rau koj tus kheej rau URL hauv kab kos kab lej 99). Kuv khaws 115 [piv txwv: IPAddress ip (192, 168, 0, 115)];

ces upload daim duab.

Kev Xeem:-

Txuas LED nrog 1k resistor, +ve rau Collector ntawm T1 thiab -ve rau GND

thaum xub thawj LED yuav ON.

Nco tseg: Koj yuav tsum muab tib tus lej URL hauv lub vev xaib uas koj tau muab hauv Arduino kos duab IP chaw nyob Kab naj npawb 99.

qhib lub tab tshiab hauv Web browser thiab sau url

coj yuav OFF, rov sau url https://192.168.0.115/status4=1 relay yuav energized andled yuav ON.

Koj tuaj yeem nkag mus rau qhov url no ntawm koj lub xov tooj uas txuas nrog tib lub network wifi

yog tias qhov no ua haujlwm, ces txhua yam zoo.

Tam sim no tshem ESP8266 los ntawm lub computer thiab

Solder relay, coj, resistors, transistors ntawm PCB me me.

Kuv khaws txhua yam hauv lub hwj chim qub lub tsev chassis.

USB txiv neej rau poj niam cov xov hlau yuav tsum luv luv kom txo qhov hluav taws xob poob.

Kauj ruam 5: Mus rau Android Play Store thiab Tshawb nrhiav Macrodroid App thiab Nruab Nws

Mus rau Android Play Store thiab Tshawb Nrhiav Macrodroid App thiab Nruab Nws
Mus rau Android Play Store thiab Tshawb Nrhiav Macrodroid App thiab Nruab Nws

Kauj Ruam 6: Qhib App thiab Nias Ntxiv Macro

Qhib App thiab Nias Ntxiv Macro
Qhib App thiab Nias Ntxiv Macro

Kauj ruam 7:

Kauj Ruam 8: Nias + ntawm Triggers

Nias + ntawm Triggers
Nias + ntawm Triggers

Kauj Ruam 9: Nias lub roj teeb/Lub Hwj Chim

Nias lub roj teeb/Lub Hwj Chim
Nias lub roj teeb/Lub Hwj Chim

Kauj Ruam 10: Nyem rau Qib Roj Teeb

Nyem rau ntawm Qib Roj Teeb
Nyem rau ntawm Qib Roj Teeb

Kauj Ruam 11: Xaiv Option nce/Txo, Nias Ok

Xaiv Option nce/Txo, Nias Ok
Xaiv Option nce/Txo, Nias Ok

Kauj Ruam 12: Xaiv nce mus thiab swb Bar rau 100%, Nyem Ok

Xaiv nce mus thiab swb Bar rau 100%, Nyem Ok
Xaiv nce mus thiab swb Bar rau 100%, Nyem Ok

Kauj ruam 13: Xaiv + Icon ntawm Kev Ua

Xaiv + Icon ntawm Kev Ua
Xaiv + Icon ntawm Kev Ua

Kauj Ruam 14: Xaiv Cov Ntawv Thov

Xaiv Cov Ntawv Thov
Xaiv Cov Ntawv Thov

Kauj Ruam 15: Xaiv Qhib Lub Vev Xaib/HTTP Tau Txais

Xaiv Qhib Lub Vev Xaib/HTTP Tau Txais
Xaiv Qhib Lub Vev Xaib/HTTP Tau Txais

Kauj Ruam 16: Sau Url Http: /192.168.0.115/status4=0

Nkag mus rau URL Http: /192.168.0.115/status4=0
Nkag mus rau URL Http: /192.168.0.115/status4=0

Kauj Ruam 17: Zuam Url Encode Parameters, HTTP Tau Txais (Tsis Muaj Lub Vev Xaib), Txuag Hu Ua Ntej Lub Xeev thiab Nias Ok

Zuam Url Encode Parameters, HTTP Tau Txais (Tsis Muaj Lub Vev Xaib), Txuag Hu Lub Xeem Kev Ua Tau Zoo thiab Nias Ok
Zuam Url Encode Parameters, HTTP Tau Txais (Tsis Muaj Lub Vev Xaib), Txuag Hu Lub Xeem Kev Ua Tau Zoo thiab Nias Ok

Kauj Ruam 18: Nkag Mus Them Tag Nrho Rau Saum Toj thiab Txuag

Nkag Mus Them Tag Nrho Rau Saum Toj thiab Txuag
Nkag Mus Them Tag Nrho Rau Saum Toj thiab Txuag

Kauj Ruam 19: Thaum kawg Pab Xaub Bar mus rau Sab xis

Thaum kawg Pab Xaub Bar mus rau Sab xis
Thaum kawg Pab Xaub Bar mus rau Sab xis

Kauj Ruam 20: Xeem Nrog Txawb

Xeem Nrog Txawb
Xeem Nrog Txawb

Connet USB txiv neej rau lub qhov (socket), them xov tooj ntawm koj lub xov tooj rau usb poj niam. lub hwj chim ON them nyiaj, coj yuav ON thiab tua tawm tom qab them tas thiab muab txiav tawm rau Txawb..

Nco tseg: Txhua lub sijhawm khaws lub xov tooj ntawm tes tsis txhob hnov qab qhib Macrodroid app thiab hloov WIFi ntawm lub xov tooj.

Pom zoo: