Cov txheej txheem:

Nyeem Koj Lub Hwj Chim Hluav Taws Xob Loj (ESP8266, WiFi, MQTT thiab Qhib): 6 Kauj Ruam (nrog Duab)
Nyeem Koj Lub Hwj Chim Hluav Taws Xob Loj (ESP8266, WiFi, MQTT thiab Qhib): 6 Kauj Ruam (nrog Duab)

Video: Nyeem Koj Lub Hwj Chim Hluav Taws Xob Loj (ESP8266, WiFi, MQTT thiab Qhib): 6 Kauj Ruam (nrog Duab)

Video: Nyeem Koj Lub Hwj Chim Hluav Taws Xob Loj (ESP8266, WiFi, MQTT thiab Qhib): 6 Kauj Ruam (nrog Duab)
Video: Tswv Yexus lub neej thaum pib txug thaum xaus 2024, Hlis ntuj nqeg
Anonim
Image
Image

Hauv Cov Lus Qhia no koj pom tias kuv nyeem Kuv Li Kev Siv Hluav Taws Xob Loj li cas siv kuv lub tsev thiab tshaj tawm nws ntawm ESP8266, Wifi, MQTT hauv kuv Openhab Tsev Automation.

Kuv muaj 'ntse ntsuas' ISKRA Hom MT372, txawm li cas los xij nws tsis muaj peev xwm yooj yim rau xa cov ntaub ntawv. Yog li kuv tau siv cov roj teeb LED los nyeem Lub Hwj Chim tam sim no, LED pulses 1000 zaug rau 1 kW/h.

Kauj Ruam 1: Txheej Txheem Txheej Txheem

Txoj Cai Ntsiab Cai
Txoj Cai Ntsiab Cai
Txoj Cai Txheej Txheem
Txoj Cai Txheej Txheem

Cov mem tes tau pom los ntawm ESP8266. Txawm li cas los xij, koj xav tau qhov zoo thiab meej '0' thiab '1'. Cov mem tes tsis muaj zog heev yog li kuv xav tau qee cov khoom siv hluav taws xob tsim nyog.

Phototransistor

Tus photoresistor tsis nrawm txaus los tshuaj xyuas qhov luv thiab tsis muaj zog ntawm lub teeb liab. Raws li qhov vis dis aus Youtube no kuv xaiv tus kws yees duab. Los ntawm kev ntxiv 2M Ohm resistor Kuv tuaj yeem ncav txog 2V.

Sib piv

Txawm li cas los xij, kom ntseeg tau meej '0' thiab '1' Kuv xaiv los ntxiv LM293 tus sib piv. Los ntawm kev txuas 0.6 V rau Vin thiab tus kws kho qhov muag Vref, Kuv tau txais lub teeb liab zoo hauv qhov tsaus ntuj, thiab teeb liab tsis zoo ntawm lub plawv dhia. Qhov pom zoo qhov hluav taws xob tau pom los ntawm kev siv lub zog potentiometers rau Vin thiab Vref voltage. Nrog tus sib piv, Kuv siv 300K resistor.

Los ntawm kev siv rub tawm tus tiv thaiv ntawm cov zis, Kuv tuaj yeem tau txais qhov sib txawv ntawm yuav luag 3.3V.

Cov zis tau pom ntawm lub vijtsam oscillope.

ESP8266

ESP8266 kuaj pom qhov hluav taws xob qis thaum muaj mem tes. Nws xa cov ntaub ntawv tawm mus rau kuv tus broker MQTT. Cov ntaub ntawv tau txais los ntawm:- Openhab2- Node-red ntawm qhov uas cov ntaub ntawv raug xa mus rau Thingspeak

Kauj ruam 2: Cheebtsam

Cov khoom tseem ceeb kuv siv:

- 3DU5C Phototransistor (saib video rau kev piav qhia)

- LM293 Sib Piv

NPE-01

- ob peb resistors

- tsab PCB

- Hloov pauv. Kuv siv kuv lub router fais fab mov ntawm 12V thiab pom tias LM1117 tsis ua haujlwm tau zoo thiab tau kub heev.

- ABS lub thawv

Kauj ruam 3: Programming

Programming
Programming
Programming
Programming
Programming
Programming
Programming
Programming

Qhov haujlwm tau tshaj tawm ntawm kuv Github:

Saib cov txheej txheem rau tus txheej txheem ntawm qhov kev zov me nyuam thiab cov txheej txheem lub zog tau suav.

Kuv ua haujlwm rau kuv ESP-01 ntawm kev hloov kho USB-programmer. Kuv tau siv lub khawm hloov ntawm RST thiab GND rau qhov hloov pauv tau yooj yim thiab hloov pauv ntawm GPIO0 thiab GND kom khau raj hauv hom nyem.

Kauj ruam 4: Sib dhos

Sib dhos
Sib dhos
Sib dhos
Sib dhos
Sib dhos
Sib dhos

Ib feem ntawm qhov muag tau muab coj los ua qauv PCB.

Saib cov duab thiab cov phiaj xwm rau kev piav qhia.

Xiav LED: xiav LED txuas nrog lub teeb liab tso tawm ntawm LM293 tus piv txwv teeb pom kev ywj pheej los ntawm ESP8266. Yog tias tsis muaj mem tes (tsaus ntuj), qhov hluav taws xob tso tawm los ntawm phototransistor Circuit tsawg, yog li Vref <Vin (qhov hluav taws xob ruaj khov ntawm 0, 6V) thiab qhov tso tawm ntawm LM293 yog siab, tsis muaj dej ntws mus rau VCC thiab LED xiav yog OFF.

Yog tias muaj mem tes (teeb), cov zis los ntawm cov kab hluav taws xob phototransistor siab dua (ca. 1.5V) yog li Vref? Vin (qhov hluav taws xob ruaj khov ntawm 0.6V) thiab qhov tso tawm ntawm LM293 qis, yog li tam sim no ntws los ntawm VCC thiab xiav LED yog ON.

Ntsuab LED: ntsuab LED txuas rau GPIO0 ntawm ESP8266 thiab mem tes yog tias ESP8266 tau kuaj pom tus mem tes zoo.

Kauj Ruam 5: Rhais mus rau Qhov ntsuas hluav taws xob

Mounting mus rau lub ntsuas hluav taws xob
Mounting mus rau lub ntsuas hluav taws xob
Mounting mus rau lub ntsuas hluav taws xob
Mounting mus rau lub ntsuas hluav taws xob
Mounting mus rau lub ntsuas hluav taws xob
Mounting mus rau lub ntsuas hluav taws xob
Mounting mus rau lub ntsuas hluav taws xob
Mounting mus rau lub ntsuas hluav taws xob

Kuv siv qee cov nplaum nplaum rau daim ntawv tshaj tawm los txhawm rau txhawm rau PCB hauv lub thawv thiab lub thawv rau lub ntsuas, tsis ua kom lub ntsuas puas. Nws yog ib qho tseem ceeb uas yuav tsum tau siv lub qhov nyob ntawm qhov chaw tseeb ntawm LED. Khoov tus phototransistor taw tes rau LED.

Kauj Ruam 6: Ua kom muaj zog

Image
Image
Hwj chim Up
Hwj chim Up
Hwj chim Up
Hwj chim Up

Kuv siv qee cov nplaum ntau ntxiv los tiv thaiv lub teeb ib puag ncig ci rau hauv tus kws yees duab thaum kuv qhib rooj plaub thaum nruab hnub. Laum lub qhov me me hauv lub hau kom pom cov LED ntsais ntsais (tsis nyob ntawm daim duab).

Nyeem qhov tseem ceeb hauv Openhab kom tau txais cov duab txias no!

Pom zoo: