Cov txheej txheem:

Cov Ntawv Qhia Ntaus Ntaus (ESP8266-01): 8 Kauj Ruam (nrog Duab)
Cov Ntawv Qhia Ntaus Ntaus (ESP8266-01): 8 Kauj Ruam (nrog Duab)

Video: Cov Ntawv Qhia Ntaus Ntaus (ESP8266-01): 8 Kauj Ruam (nrog Duab)

Video: Cov Ntawv Qhia Ntaus Ntaus (ESP8266-01): 8 Kauj Ruam (nrog Duab)
Video: Nraug txuj kev hlub 2024, Kaum ib hlis
Anonim
Cov Ntawv Qhia Ntaus Ntaus (ESP8266-01)
Cov Ntawv Qhia Ntaus Ntaus (ESP8266-01)
Cov Ntawv Qhia Ntaus Ntaus (ESP8266-01)
Cov Ntawv Qhia Ntaus Ntaus (ESP8266-01)

23-01-2018 Firmware Updated

Qee lub sij hawm dhau los, Kuv tau sim ua "Instructables Hit Counter" siv Instructables API, thiab Arduino Uno nrog cov ntaub thaiv npog network. Txawm li cas los xij, nrog qhov txwv RAM ntawm Arduino Uno, kuv tsis muaj peev xwm ua kom lub kaw lus ua haujlwm.

Ib pliag dhau los, Kuv pom ib txoj haujlwm zoo sib xws ua los ntawm diytronics siv NodeMCU. Qhov no tsuas yog lub ntsiab lus ncaws tawm kom rov ua kuv qhov haujlwm.

Siv ESP8266-01 WiFi module, Kuv tau kawm ntau yam kev xaiv muaj, thiab rov tsim kho qhov system.

Thawj qhov teeb meem thaum siv ESP8266 cov qauv, tab tom teeb tsa chav nyob txhawm rau txuas mus rau qhov chaw nkag WiFi uas twb muaj lawm. Kuv tsis xav ua qhov no siv tus lej, vim qhov no xav kom hloov tus lej thiab rov sau dua tshiab rau hauv ESP8266. Kuv pom WiFiManager lub tsev qiv ntawv muaj txiaj ntsig zoo, thiab siv cov piv txwv kom tau txais txoj hauv kev yooj yim tshaj plaws los txuas EP8266 mus rau WiFi network.

Tom ntej no, Kuv tsis xav hloov pauv cov cai txhua lub sijhawm kuv xav hloov Cov Lus Qhia kom raug saib xyuas. Txog qhov no, Kuv teeb tsa ESP8266 nrog lub vev xaib tsim-hauv kom tso cai rau hloov pauv yooj yim ntawm qhov ntsuas.

Kauj Ruam 1: Tus Tsim

Tsim
Tsim
Tsim
Tsim

Koj yuav xav tau cov khoom siv hauv qab no:

  • 1 x ESP8266-01 Module
  • 1 x max7219 8-tus lej 7 ntu zaub
  • 1 x 7805 Tus tswj hwm qhov hluav taws xob
  • 1 x ASM1117 3.3V qhov ntsuas hluav taws xob

Hwj chim Mov

Lub zog rau chav tsev yog tau los ntawm 12V DC lub zog siv. Peb yuav xav tau ob yam khoom siv:

  • 5V rau qhov siab tshaj 7219 zaub
  • 3.3V rau ESP8266-01

Xa mus rau daim duab schematic.

Ib qho diode tau siv los tiv thaiv chav tsev los ntawm kev sib txuas tsis raug, ua raws los ntawm ON/OFF hloov hluav taws xob. Cov tswv yim hluav taws xob tau tswj hwm rau 5V los ntawm 7805 tus tswj hluav taws xob. Qhov 5V no yog siv los ua lub zog siab tshaj 7219 zaub.

5V kuj tseem siv tau kom tau 3.3V xav tau los ntawm ESP8266-01. ASM1117 3.3 tus tswj hwm txuas nrog 5V tus tswj hwm, thiab tsis yog rau DC cov tswv yim. Qhov no yog txhawm rau txo cov cua sov uas yuav tsim los ntawm ASM1117 thaum txuas nrog 12V khoom siv. ASM1117 3.3 siv yog cov cuab yeej siv saum npoo av, thiab tuaj yeem yooj yim muab pov rau ntawm ib qho ntawm vero board.

Raws li ESP8266 tus qauv tuaj yeem siv txog 300mA thaum xa tawm, txhua txoj kev tsheb nqaj hlau tau teeb nrog qhov tsim nyog me me ua kom lub tshuab ua kom zoo. Txhawm rau tshem tawm HF suab nrov, 0.1uf capacitors kuj tseem haum rau txhua txoj kev tsheb nqaj hlau.

ESP8266-01

Muaj qhov txwv I/O pins muaj, kev saib xyuas yuav tsum tau ua kom tso cai rau ESP8266 kom khau raj kom raug. Txhawm rau kom tau txais ESP8266-01 tus qauv rau khau raj hauv hom raug, cov hauv qab no yuav tsum ua tiav:

  • CH_PD yuav tsum yog HIGH
  • RST yuav tsum yog HIGH
  • GPIO yuav tsum rub siab
  • GPIO2 yuav tsum rub siab

Qhov no yog ua tiav siv 10K rub-up resistors. Qhov no yuav ua kom raug kho kom raug ntawm ESP8266 tus qauv.

I/O Pin

Kuv tus qauv xav tau 5 I/O tus pin rau cov hauv qab no:

  • 3 tus pin rau qhov siab tshaj plaws 7219 zaub
  • 1 tus pin rau MODE/SETUP khawm
  • 1 Pin rau lub buzzer

Raws li ESP8266 tsuas muaj plaub tus I/O tus pin muaj, muaj ib qho I/O tus pin luv. Yog li ntawd lub suab nrov thiab QAUV/teeb tsa khawm txuas nrog ib tus pin I/O nkaus xwb. Software yuav raug siv los tswj INPUT/OUTPUT hom ntawm tus pin no.

max7219 Zaub

Cov zaub xav tau peb tus pin I/O, tab sis nrog ESP8266 tsuas yog muaj 2 lub hom phiaj dav dav I/O pins, Rx thiab TX pins kuj tseem yuav siv tau. Qhov no txhais tau tias tsis muaj Serial Monitor muaj thaum tsim kho. Txhawm rau tswj cov zaub, GPIO1, Rx thiab TX pins tau siv.

Buzzer/Khawm

Nrog tsuas yog ib tus I/O tus pin sab laug (GPIO0), lub suab nrov thiab MODE/SETUP txuas nrog tus pin no, thiab los ntawm kev siv ntau tus lej, tus pin tau siv los nyeem cov xwm txheej khawm ntxiv rau lub suab nrov nrov.

Kauj ruam 2: Tsim Circuit Court

Tsim lub Circuit
Tsim lub Circuit
Tsim lub Circuit
Tsim lub Circuit

Nrog tsuas yog ob peb yam xav tau, kev tsim hluav taws xob tau tsim los ntawm ib qho me me ntawm vero board. SMD ASM1117 tus tswj hwm tau muab muag rau sab ntawm lub rooj tsavxwm.

Txhawm rau txuas ESP8266-01, kuv siv 2 x 4-pin headers. Qhov no tso cai rau tshem tawm yooj yim ntawm ESP8266 tus qauv rau kev ua haujlwm. Ib rab riam hobby ntse tau siv los cais cov vero board lem ntawm ESP8266 tus pin.

Cov xov rau cov zaub, buzzer thiab khawm tau muab ncaj qha ncaj qha mus rau vero board.

Kauj Ruam 3: Mounting Cov Zaub rau Qhov Ruaj Ntseg

Mounting Cov Zaub rau Cov Ntaub Ntawv
Mounting Cov Zaub rau Cov Ntaub Ntawv
Mounting Cov Zaub rau Cov Ntaub Ntawv
Mounting Cov Zaub rau Cov Ntaub Ntawv
Mounting Cov Zaub rau Cov Ntaub Ntawv
Mounting Cov Zaub rau Cov Ntaub Ntawv

Kuv muaj lub hnab yas me me muaj. Txhawm rau kom haum cov zaub, Kuv xub txiav tawm cov zaub. Kev txiav tawm tau ua me dua li cov zaub, thiab tom qab ntawd, ua kom ntseeg tau tias cov zaub haum haum rau hauv kev txiav tawm.

Siv tus cim xim dub tas mus li, dawb ntawm cov zaub tau ua dub, thiab cov khoom tso rau hauv qhov chaw siv epoxy.

Kauj Ruam 4: Txhim Kho Lwm Yam Khoom

Mounting Lwm Yam
Mounting Lwm Yam
Mounting Lwm Yam
Mounting Lwm Yam
Mounting Lwm Yam
Mounting Lwm Yam

Lub zog fais fab, On/Off hloov, khawm thiab buzzer tau teeb tsa rau sab nraub qaum.

Txog lub buzzer, Kuv tau hlais 3mm qhov hauv qhov thaiv, thiab kaw lub buzzer hla lub qhov no. Qhov no ua kom ntseeg tau tias lub buzzer yuav thauj khoom txaus.

Nrog rau tag nrho cov khoom haum, kev thaiv ntawm cov khoom siv tau ua los ntawm cov xaim nyias.

Kauj ruam 5: Programming ESP8266-01

Ua lub ESP8266-01
Ua lub ESP8266-01
Ua lub ESP8266-01
Ua lub ESP8266-01

Xa cov cai mus rau ESP8266-01 nrog koj li txheej txheem. Kom yooj yim ntawm kev siv, Kuv tau suav nrog cov tsev qiv ntawv siv.

Thov nco ntsoov tias kuv tau hloov kho LedControl lub tsev qiv ntawv, yog li koj yuav tsum siv kuv lub tsev qiv ntawv LedControlESP8266.

Kauj Ruam 6: Txuas rau Koj Lub WiFi

Txuas rau koj li WiFi
Txuas rau koj li WiFi
Txuas rau koj li WiFi
Txuas rau koj li WiFi
Txuas rau koj li WiFi
Txuas rau koj li WiFi
Txuas rau koj li WiFi
Txuas rau koj li WiFi

Txhawm rau Hit Counter ua haujlwm raug, peb xub xav tau txuas lub chav rau WiFi nkag mus. Ua raws cov theem no:

  • Hwj chim rau chav tsev
  • Thaum "Teeb Net" raug tso tawm, nias lub MODE/SETUP khawm txog 2 vib nas this
  • Cov zaub yuav tam sim no qhia "tsis muaj"
  • Mus rau koj lub PC lossis lub xov tooj ntawm tes, thiab xaiv WiFi txuas
  • Xaiv "Instructables Hit Counter"
  • Qhib koj tus browser. Yog tias nplooj ntawv teeb tsa tsis qhib, ntaus tus IP chaw nyob hauv qab no: 192.168.4.1
  • Nyem rau Configure WiFi
  • Xaiv qhov xav tau nkag mus rau WiFi, thiab nkag mus rau tus lej nkag mus rau qhov chaw nkag no
  • Tom ntej no, nkag mus rau tus IP chaw nyob, Rooj vag thiab Npog raws li qhov koj xav tau
  • Thaum ua tiav, nyem rau ntawm Txuag khawm
  • Thaum ua tiav, koj yuav tau txais cov lus lees paub tias cov ntaub ntawv tau raug khaws tseg.
  • Thaum txuas nrog, Hit Counter yuav tso saib cov teeb tsa tam sim no

Kauj Ruam 7: Teeb tsa Lub Hit Counter

Teeb ntawm Hit Counter
Teeb ntawm Hit Counter
Teeb ntawm Hit Counter
Teeb ntawm Hit Counter
Teeb ntawm Hit Counter
Teeb ntawm Hit Counter
Teeb ntawm Hit Counter
Teeb ntawm Hit Counter

Thaum txuas nrog, cov chaw ntawm Hit Counter tuaj yeem hloov pauv siv chav tsev lub vev xaib.

Qhib koj lub vev xaib, thiab nkag mus rau tus IP chaw nyob ntawm Hit Counter.

Ntaus Counters

Chav tsev tuaj yeem teeb tsa rau ob hom Hit Counters. Txhua lub txee yuav tsum tau teeb tsa tus kheej.

  • Tus Sau Lub Npe Lub Npe- Qhia tag nrho cov naj npawb ntawm kev ntaus rau tus sau tshwj xeeb.
  • Cov Ntawv Qhia ID - Qhia tag nrho cov naj npawb ntawm cov hits rau qhov tshwj xeeb Qhia paub. Xa mus rau hauv qab ntawm nplooj ntawv lub vev xaib kom paub ntau ntxiv txog kev tau txais daim npav ID

Zaub

Chav tsev tuaj yeem teeb tsa los tso saib Tus Sau lossis Qhia Ntaus:

  • Xaiv Tus Sau Tag Nrho Hits los tso saib tag nrho cov hits rau Tus Sau
  • Xaiv Instructbles ID Hits kom pom tag nrho cov naj npawb ntawm cov hits rau Cov Lus Qhia

Suab

Xaiv qhov kev xaiv no yog tias koj xav kom chav ua haujlwm beep ntawm kev hloov pauv mus rau lub txee tso tawm.

Zaub Brightness

Cov duab ci tuaj yeem hloov pauv ntawm lub vev xaib. Nkag mus rau qib ci ci nruab nrab ntawm 0.. 15 raws li qhov xav tau.

Kauj Ruam 8: Siv Instructabes Hit Counter

Siv Instructabes Hit Counter
Siv Instructabes Hit Counter

Thaum txuas nrog, chav tsev tsis muaj ntau lub luag haujlwm. Sib nrug los ntawm MODE khawm, tsis muaj lwm qhov cuam tshuam ntawm chav tsev thiab tus neeg siv.

Nias lub MODE khawm yuav hloov kho cov duab ntawm Tus Sau Tag Nrho Hits thiab Qhia Hits.

Kuv vam tias koj nyiam qhov Qhia Ntawv no.

Hais txog

Eric

Pom zoo: