Cov txheej txheem:

Dej Toj thiab Huab Cua Moos: 9 Kauj Ruam (nrog Duab)
Dej Toj thiab Huab Cua Moos: 9 Kauj Ruam (nrog Duab)

Video: Dej Toj thiab Huab Cua Moos: 9 Kauj Ruam (nrog Duab)

Video: Dej Toj thiab Huab Cua Moos: 9 Kauj Ruam (nrog Duab)
Video: Lub Zog Nruab Nrog (Hmong Dubbed) 2024, Hlis ntuj nqeg
Anonim
Dej Toj thiab Huab Cua Clock
Dej Toj thiab Huab Cua Clock

Txawm hais tias koj tuaj yeem tuaj yeem yuav cov dej ntws zoo sib xws uas muaj ib txhais tes qhia tias dej yuav siab lossis qis lossis nyob qhov twg nyob nruab nrab, qhov kuv xav tau yog qee yam uas yuav qhia rau kuv tias lub sijhawm qis dej yuav yog thaum twg. Kuv xav tau qee yam uas kuv tuaj yeem nrawm nrawm yam tsis tas yuav tig nws, lossis thawb ib lub pob, lossis tos. Thiab kuv xav tau qee yam nrog lub roj teeb ntev. Yog li kuv tau siv TTGO T5 board, uas yog ESP32-based board nrog 2.13 e-paper display, txuas nrog rau TTL5110 nti. NOAA thiab cov ntaub ntawv huab cua los ntawm OpenWeatherMap, qhia cov ntaub ntawv ntawm e-ntawv, tom qab ntawd qhia TPL5110 kom T5 tua.

Hloov kho tshiab (Lub Ob Hlis 25, 2020) Lub Sijhawm Tide tau ua haujlwm tau ib xyoos tam sim no, thiab lub roj teeb tau nyob ntawm 4.00 volts, yog li lub moos tuaj yeem ua haujlwm tau ntau xyoo.

Kauj Ruam 1: Sau Cov Khoom Kho Vajtse

TTGO T5 board $ 17

Adafruit TPL5110 board $ 5

Adafruit Perma-Proto Quarter-pawg thawj coj saib xyuas (xaiv tau) $ 0.71 (yam tsawg kawg xaj $ 8.50)

Li-Poly roj teeb 1200 mAh $ 10 (lossis lwm lub zog tsim nyog)

JST PH 2-Pin Cable-Txiv neej Header $ 0.75

220 uF tus capacitor

Kauj Ruam 2: Cov Cuab Yeej

Soldering hlau

Cov hlua hlau

Li-Po roj teeb them, xws li qhov no.

Kauj Ruam 3: Sib dhos Kho Vajtse

Sib dhos kho vajtse
Sib dhos kho vajtse
Sib dhos kho vajtse
Sib dhos kho vajtse
Sib dhos kho vajtse
Sib dhos kho vajtse

Sib dhos cov cuab yeej yog yooj yim zoo nkauj raws li cov qauv qhia. Kuv tau siv Adafruit Perma-proto board uas zoo ib yam li tus qauv tiv thaiv tshwj tsis yog nws tau muab tso tawm zoo li lub khob cij, nrog tib qho hluav taws xob sib txuas ua ib lub khob cij, uas yog qhov zoo. Txij li thaum kuv tsuas xav tau ob peb qhov kev sib txuas, thiab xav kom haum tag nrho lub rooj sib txoos rau hauv lub thawv me me, Kuv txiav ib qho ntawm cov laug cam mus rau plaub nrog Dremel txiav lub log.

220 uF capacitor yog qhov tseem ceeb heev. Yog tsis muaj nws, TPL5110 yuav tsis tig rau T5. Nws tsis meej me me vim li cas, tab sis lwm tus neeg siv TPL5110 tau muaj teeb meem tib yam. Tej zaum ESP32 kos ntau tam sim no thaum pib dua li TTL5110 tuaj yeem muab tau?

Tsis txhob hardwire lub roj teeb. Siv JST-PH cable kom koj tuaj yeem txuas lub roj teeb kom them nws. Tej zaum yuav muaj txoj hauv kev los them lub roj teeb los ntawm T5 rov qab los ntawm TPL5110 yog tias TPL5110 yog "ntawm", tab sis kuv tsis tuaj yeem lav rau cov txheej txheem ntawd.

Kuv tau ua lub thawv ntoo raws li lub thawv ntawv, tab sis txhua yam nrog qhov tsawg kawg nkaus sab hauv qhov ntev ntawm 1.5 "x 2.75" x 1 "yuav ua haujlwm.

Kauj ruam 4: Tune Timing

Lub Rooj Tswjhwm Saib TPL5110 muaj lub zog txiav lub zog uas teev lub sijhawm luv uas TPL5110 sawv los. Siv tus ntsia hlau me me tig qhov no txhua txoj kev rov qab. Ntawm kuv lub rooj tsavxwm, qhov no teeb tsa lub sijhawm luv rau 145 feeb, uas yog qhov tseeb ntau dua qhov tshwj xeeb tshaj plaws ntawm 120 feeb, tab sis nws ua haujlwm thiab zoo ib yam thiab yuav txuag lub zog ntau dua li sawv txhua 120 feeb, yog li kuv siv nws. Koj tsis tas yuav tsum paub lub sijhawm luv luv, vim tias lub hom phiaj tsuas yog rub tawm cov ntaub ntawv ntxhib ib hnub ib hnub kwv yees li 4 teev sawv ntxov. Koj tuaj yeem hais qhia lub sijhawm luv (piv txwv li, 145 feeb) thiab lub sijhawm sawv los (piv txwv li, 4 teev sawv ntxov) hauv env_config.h.

(Yog tias koj xav tau kev tswj hwm lub sijhawm kom zoo dua rau qee qhov haujlwm, TPL5110 pawg thawj coj muaj kab ib sab nraub qaum koj tuaj yeem txiav kom tsis txhob siv lub tshuab raj. daim duab no.)

Kauj ruam 5: Software

Koj yuav xav tau Arduino IDE nrog ESP32 pob. Hauv IDE, teeb tsa koj lub rooj tsav xwm rau "ESP32 Dev Module".

Cov duab kos muaj nyob ntawm https://github.com/jasonful/Tides thiab xav tau 3 lub tsev qiv ntawv:

  1. "ESP8266 Weather Station", muaj los ntawm Arduino Library Manager (lossis ntawm no). Koj tsuas xav tau 6 cov ntaub ntawv no: ESPHTTPClient.h, ESPWiFi.h, OpenWeatherMapCurrent.cpp, OpenWeatherMapCurrent.h, OpenWeatherMapForecast.cpp, OpenWeatherMapForecast.h thiab tuaj yeem tshem tawm qhov seem.
  2. "Json Streaming Parser" muaj los ntawm Arduino Library Manager (lossis ntawm no)
  3. https://github.com/LilyGO/TTGO-Epape-T5-V1.8/tree/master/epa2in13-demo Txawm hais tias cov cai tsis tau ntim ua lub tsev qiv ntawv tseeb, koj tuaj yeem luam nws hauv koj phau ntawv teev npe thiab suav nrog nws.

Kauj ruam 6: Kho lub Software

Muaj ntau ntau qhov koj yuav tau teeb tsa (thiab qee qhov koj yuav xav teeb tsa) hauv env_config.h cov ntaub ntawv, suav nrog:

  • WiFi SSID thiab tus password
  • NOAA chaw nres tsheb id (hauv lwm lo lus, koj nyob qhov twg)
  • OpenWeatherMap AppID, uas koj yuav tsum tau sau npe rau (nws yooj yim thiab pub dawb)
  • OpenWeatherMap LocationID (dua, koj nyob qhov twg)
  • CONFIG_USE_TPL5110, uas tso cai rau koj siv T5 yam tsis muaj TPL5110. Hloov chaw, software yuav nkag mus rau hom pw tsaug zog. T5 pawg thawj coj kos txog 8 ma pw tsaug zog, yog li kuv tsuas yog cia siab tias lub roj teeb yuav nyob ntev li ob peb hnub.

Kauj Ruam 7: Software Ua Haujlwm Li Cas

(Koj tuaj yeem hla ntu no yog tias koj tsis quav ntsej.)

Lub hom phiaj yog kom sawv ib zaug ib hnub, tab sis txij li lub sijhawm ntau tshaj ntawm TPL5110 tsuas yog 2 teev lossis yog li ntawd, T5 yuav tsum sawv ntau dua. Yog li tom qab nws rub cov nthwv dej thiab cov ntaub ntawv huab cua, nws suav pes tsawg tus ntawm 2 teev ua ntu zus muaj tam sim no thiab 4:00 teev sawv ntxov tag kis sawv ntxov. Qhov no nyuaj me ntsis los ntawm qhov tseeb tias TPL5110 tag nrho txiav lub zog rau T5, uas yog qhov zoo rau roj teeb, tab sis nws txhais tau tias peb poob RAM thiab lub sijhawm tiag tiag. Nws zoo li sawv thaum sawv ntxov nrog amnesia. Yog li txhawm rau txheeb xyuas lub sijhawm tam sim no, nws rho nws los ntawm NOAA's HTTP header. Thiab kom nco qab ntau npaum li cas 2-teev ua ntu zus tseem tshuav, nws sau ntawv uas tawm tsam rau qhov tsis hloov pauv cia (nyem). Txhua lub sijhawm nws sawv, nws tshawb xyuas lub txee, txo nws, khaws nws, thiab yog tias nws ntau dua xoom, nws tam sim ntawd xa lub teeb liab mus rau TPL51110 ("Ua tiav") qhia nws kom nws pw. Thaum lub txee tsoo xoom, tus lej rub tawm cov ntaub ntawv tshiab, thiab rov suav dua thiab rov kho lub txee.

Kauj ruam 8: Khiav Nws

Khiav Nws
Khiav Nws

Xyuas kom tseeb tias qhov hloov pauv ntawm sab laug ntawm T5 nyob hauv qhov chaw (ntawm) txoj haujlwm, xa cov duab kos mus rau T5, thiab hauv ob peb vib nas this lub vijtsam yuav tsum hloov kho nrog nthwv cua thiab cov ntaub ntawv huab cua.

Yog tias koj xav tau debug lub software, hloov "#define DEBUG 0" nyob rau sab saum toj ntawm Tides.ino rau "#define DEBUG 1". Qhov no yuav tig rau qhov ua kom debug cov txiaj ntsig, thiab tseem tso saib hauv qab ntawm e-ntawv tus lej ntawm kev rov pib dua ua ntej nws rub tawm cov ntaub ntawv tshiab, thiab lub sijhawm nws rub tawm cov ntaub ntawv kawg.

Kauj Ruam 9: Cov Lus Qhia Yav Tom Ntej

  1. Kev siv TPL5110 ua ke nrog e-ntawv zaub yog txoj hauv kev zoo los tso saib txhua cov ntaub ntawv uas tsis hloov pauv ntau zaus, nrog lub roj teeb zoo.
  2. Thaum kuv tau tsim qhov no, Kuv txiav txim siab siv TrigBoard, uas yog ESP8266 pawg thawj coj nrog TPL5111 ntawm lub nkoj. Nws yuav xav tau kom tau txais cov ntawv e-ntawv cais thiab e-ntawv tsav tsheb pawg thawj coj zoo li qhov no lossis qhov no. Los yog tus tsav tsheb+board combo zoo li qhov no lossis qhov no. Txhawm rau xa tus lej mus rau ESP8266, Kuv xav tias SSL tus lej yuav tsum siv cov ntiv tes hloov pauv ntawm daim ntawv pov thawj, thiab cov cai tsis hloov pauv yuav tsum siv EEPROM lossis RTC nco.
  3. Kuv tsis ntev los no tau hnov tias Lolin32 pawg thawj coj saib zoo nkauj heev nyob rau hauv hom pw tsaug zog: txog 100uA. Tsis zoo li TPL51110 pawg thawj coj (20uA raws li Adafruit) tab sis zoo txaus.
  4. OpenWeatherMap rov qab ntau cov ntaub ntawv huab cua ntau tshaj qhov kuv tab tom tso tawm. Nrog rau cov cim cim, uas yuav xav kom nrhiav cov cim ib leeg nyob ib qhov twg.

Pom zoo: