Cov txheej txheem:

Tswb Keypad MQTT ESP8266: 4 Cov Kauj Ruam (nrog Duab)
Tswb Keypad MQTT ESP8266: 4 Cov Kauj Ruam (nrog Duab)

Video: Tswb Keypad MQTT ESP8266: 4 Cov Kauj Ruam (nrog Duab)

Video: Tswb Keypad MQTT ESP8266: 4 Cov Kauj Ruam (nrog Duab)
Video: Manage your device via the Internet from anywhere in the world. MQTT Protocol 2024, Hlis ntuj nqeg
Anonim
Tswb Keypad MQTT ESP8266
Tswb Keypad MQTT ESP8266
Tswb Keypad MQTT ESP8266
Tswb Keypad MQTT ESP8266
Tswb Keypad MQTT ESP8266
Tswb Keypad MQTT ESP8266

Hauv Cov Lus Qhia no kuv qhia koj yuav ua li cas kuv ua lub roj teeb siv lub keyboard kom pab tau thiab lov tes taw kuv lub tswb hauv tsev. Yav tom ntej kuv npaj yuav txhim kho ib qho uas muaj RFID nyeem ntawv suav nrog thiab uas tsis siv roj teeb. Tsis tas li kuv npaj yuav nyeem cov keyboard ntawm I2C nti, txij li kuv teeb tsa tam sim no siv feem ntau ntawm qhov pom GPIO pins ntawm kuv ESP8266 module (ESP12F).

Lub thawv ntawv yog luam tawm 3D. Nws muaj qhov qhib/tua lub zog hloov pauv thiab WS2812b qhov taw qhia LED. Nws sib txuas lus ntawm MQTT thiab muaj lub webinterface rau saib cov xwm txheej thiab hloov kho lub firmware

Khoom siv

Kuv yuav kuv cov khoom ntawm Aliexpress

16 tus lej keypad: txuas

ESP12F module: txuas

LiPo roj teeb: txuas

Pogo pins rau uploading: txuas

breakout board rau uploading: txuas

Kauj Ruam 1: Yuav Ua Li Cas Lub Tswb Keypad Nws Ua Haujlwm - Software

Yuav Ua Li Cas Lub Tswb Keypad Nws Ua Haujlwm - Software
Yuav Ua Li Cas Lub Tswb Keypad Nws Ua Haujlwm - Software
Yuav Ua Li Cas Lub Tswb Keypad Nws Ua Haujlwm - Software
Yuav Ua Li Cas Lub Tswb Keypad Nws Ua Haujlwm - Software

Cov cai tau tshaj tawm ntawm kuv Github.

Hauv qhov txuas txuas qhov program tau piav qhia.

Kev kaw cia ntawm qhov tseem ceeb ua ntu zus los ntawm nias lub '*' qhov tseem ceeb thiab xaus los ntawm nias '#' qhov tseem ceeb. Yog tias qhov raug teeb tsa ua ntej yuam sij tau nkag, lub tswb raug qhib lossis xiam oob khab.

Lub tswb ntsuas hluav taws xob sib txuas lus ntawm MQTT nrog kuv lub tsev siv tshuab hauv tsev ua haujlwm Openhab. Lub tswb keypad tau sau npe mus rau 'lub xeev ceeb toom' MQTT lub ncauj lus thiab tshaj tawm ntawm 'lub ntsiab lus ceeb toom ceeb toom'.

Yog tias kuv lub tsev siv lub tshuab tau txais ON hais kom ua ntawm lub tswb ceeb toom lub ntsiab lus 'zoo, nws hloov ON lub tswb thiab lees paub qhov no ntawm' lub xeev ceeb toom lub ncauj lus '. Txoj hauv kev no kuv paub tseeb tias lub tswb ceeb toom tau txais thiab ua haujlwm tau zoo.

Cov lus ntawm 'lub xeev ceeb toom lub ncauj lus' raug khaws tseg. Yog li yog tias koj hloov lub roj teeb uas siv lub tswb tswb, thiab rov ua dua, koj yuav pom lub tswb ceeb toom ntawm qhov ntsuas LED thaum nws txuas nrog dua rau MQTT broker.

Kauj Ruam 2: Tshaj Tawm Txoj Cai

Xa cov Code
Xa cov Code
Xa cov Code
Xa cov Code
Xa cov Code
Xa cov Code

Txoj cai tau teeb tsa thiab tso tawm ntawm Arduino IDE.

Kuv tau npaj ESP breakout board nrog pogo pins, yog li kuv tuaj yeem tso cov cai yooj yim mus rau qhov liab qab ESP-12F module, saib cov duab txuas nrog. Tsuas yog siv FTDI programmer teeb tsa rau 3.3V txuas nrog rau:

  • FTDI to ESP module
  • 3.3V rau VCC thiab EN
  • GND rau GND, GPIO15 thiab GPIO0 (teeb ESP8266 hauv hom nyem)
  • RX to TXC
  • TXX to RX

Thaum lub cuab yeej txuas thiab txuas rau koj lub network WiFi, koj tuaj yeem txuas rau nws tus IP chaw nyob thiab pom lub tswb thiab roj teeb xwm txheej ntawm lub vev xaib sib tham thiab hloov kho tus lej OTA los ntawm kev xa cov ntaub ntawv.bin ntawm

Kauj ruam 3: Kho vajtse

Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse

Kho vajtse yog qhov ncaj heev. Saib cov lus ntawm cov duab txuas. Kuv nyiam siv poj niam lub taub hau kom yooj yim sib dhos thiab tshem tawm cov cuab yeej rau kev debugging thiab kho kom zoo dua qub.

  • Cov cuab yeej siv los ntawm roj teeb LiPo (them sab nraud).
  • Ntawm qhov swb hloov lub zog tau coj mus rau qhov ntsuas hluav taws xob kom tau 3.3V ntawm VCC ntawm ESP8266, siv lub kaus mom.
  • Qhov hluav taws xob ntawm lub roj teeb tseem tau pub rau hauv ADC ntawm ESP8266 ntawm qhov faib hluav taws xob (20k thiab 68k).
  • 8 tus pin ntawm cov keyboard tau txuas nrog 8 tus pin ntawm ESP8266
  • WS2812b qhov taw qhia LED txuas nrog lub roj teeb, GND thiab GPIO15 ntawm ESP8266.

Yog tias koj xav tau cov phiaj xwm hluav taws xob hluav taws xob, thov qhia rau kuv paub hauv cov lus.

Kauj ruam 4: Sib dhos

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

STL cov ntaub ntawv ntawm rooj plaub tau tshaj tawm ntawm kuv Thingiverse.

Cov ntaub ntawv tuaj yeem qhib tau yooj yim kom them lub roj teeb.

Lub roj teeb tau lo rau sab nraum qab ntawm cov keyboard. Cov swb swb thiab LED tau lo rau hauv rooj plaub.

Ntawm lub header pins cov khoom siv txuas nrog.

Pom zoo: