Cov txheej txheem:

Arduino Timer Nrog On/Off Teeb Taw Qhia: 6 Cov Kauj Ruam (nrog Duab)
Arduino Timer Nrog On/Off Teeb Taw Qhia: 6 Cov Kauj Ruam (nrog Duab)

Video: Arduino Timer Nrog On/Off Teeb Taw Qhia: 6 Cov Kauj Ruam (nrog Duab)

Video: Arduino Timer Nrog On/Off Teeb Taw Qhia: 6 Cov Kauj Ruam (nrog Duab)
Video: Understanding Arduino Interrupts | Hardware, Pin Change & Timer Interrupts 2024, Kaum ib hlis
Anonim
Image
Image
Khoom siv
Khoom siv

Hloov kho 05-02-2018 Timers tshiab! teev, feeb, vib nas this, eeprom. Thov mus ntsib:

www.instructables.com/id/Arduino-Ultra-Meg…

Nyob zoo, nrog txoj haujlwm no koj yuav tuaj yeem tswj tau lub thiab tawm ntawm koj li khoom nruab nrab ntawm lub sijhawm koj xav tau. Tej zaum lawv yuav yog lub teeb pom kev hmo ntuj, ywg dej rau lub vaj, tig lub tshuab, thiab lwm yam Peb yuav siv cov arduino, LCD thiab RTC 1307 los qhia thiab tswj lub sijhawm. Koj tuaj yeem teeb tsa "ON" teev thiab "OFF" teev, los ntawm 4 lub pob nyem uas tso cai rau koj nce lossis txo qhov "SET POINT". Tsis tas li, koj yuav kawm ua lub moos nrog arduino. Kuv suav nrog kev ua kom tsis sib haum thiab cov vis dis aus, yog li koj tuaj yeem ua qhov haujlwm no.

Ua ntej tshaj, saib cov vis dis aus kom paub tias txhua yam hais txog dab tsi. Siv nws zoo li phau ntawv qhia

Kauj ruam 1: Cov ntaub ntawv

Khoom siv
Khoom siv

-Arduino Ib

-RTC 1307 tus qauv

-LCD 16X2

-5V relay module

-10K trimpot

-1K tus tiv thaiv

-10K resistors x 4

-Xaub cov x 4

-Breadboard, dhia.

Kauj ruam 2: Mounting Moos

Mounting Moos
Mounting Moos

Ua raws Fritzing schematic.

Txuas 5v thiab gnd, los ntawm arduino mus rau lawv txoj kab (Liab 5V thiab Xiav GND)

LCD pins rau Arduino pins

1 TZS to GND

2 VDD rau 5V

3 VO rau lub lauj kaub nruab nrab

4 RS to pin 2

5 TZS to GND

6 EN lossis E rau tus pin 3

7d0 nco

8d1 nco

9d2 nco

10 D3 NC

11 D4 pin 4

12 D5 pin 5

13 D6 pin 6

14 D7 pin 7

15A rau 5V

16 K rau GND los ntawm 1K resistor

Qhov tsis txaus ntseeg ntawm trimpot rau 5V thiab GND

RTC rau Arduino

SDA to pin 4

SCL to pin 5

GND thiab 5V

Kauj Ruam 3: Teem Sijhawm

Tam sim no peb yuav tsum teev sijhawm. Khiav cov cai "Teem sijhawm RTC". Cov duab kos no siv Hnub thiab Sijhawm raws li lub khoos phis tawj koj siv (yog thaum koj sau cov cai) thiab siv qhov ntawd los ua haujlwm RTC. Yog tias koj lub khoos phis tawj lub sijhawm tsis raug teeb tsa koj yuav tsum kho qhov ntawd ua ntej. Tom qab ntawd koj yuav tsum nias lub pob Upload kom muab tso ua ke thiab tom qab ntawd rub tawm tam sim.

Lus ceeb toom!: Yog tias koj sau ua ke thiab tom qab ntawv tshaj tawm tom qab, lub moos yuav tawm los ntawm lub sijhawm ntawd.

Tom qab ntawd qhib qhov Serial monitor window kom pom tias lub sijhawm tau teeb tsa

Kauj ruam 4: Lub moos

Lub moos
Lub moos

Nrog lub sijhawm teeb tsa, qhib thiab rub daim duab "Clock with RTC LCD". 10K trimpot yog rau qhov sib piv lcd. Turn nws los kho qhov sib txawv thiab pom cov lej kom meej.

Yog tias txhua yam ua haujlwm tau zoo, koj yuav muaj lub moos khiav. Saib cov yees duab.

Kauj ruam 5: Mounting Timer

Mounting lub Timer
Mounting lub Timer

Tam sim no peb ntxiv cov laub khawm thiab cov relay. Ua raws li cov txheej txheem fritzing.

Yog li, koj muaj pins 8, 9, 10 thiab 11 txuas nrog gnd los ntawm 10K resistor (LOW). Thaum koj thawb, nws yuav txuas nrog 5V (HIGH).

Kev xa xov txuas nrog tus pin 12. Nrog tus xa koj tuaj yeem tswj hwm koj cov khoom siv. Ceev faj nrog qhov siab tshaj plaws ntawm kev xa tawm!

Kauj ruam 6: Timer

Lub Sijhawm
Lub Sijhawm

Qhib thiab upload cov cai "Timer nrog rau ntawm qhov teeb tsa teeb tsa". Koj yuav pom lub sijhawm tam sim no, "ON" teeb tsa taw tes thiab "OFF" teeb tsa taw tes. Lub sijhawm pib "ON" thiab "OFF" lub sijhawm yog 12.

Lub sijhawm ua haujlwm ntawm 0 txog 23 teev, thiab ntxiv rau. Laub cov nyees khawm kom hloov lub teeb taw tes nce thiab nqis. Lub timer yuav pib tam sim yog tias nws nyob nruab nrab ntawm qhov teeb tsa qhov chaw. Yog tsis yog, yuav tos rau "ON" teev.

Txoj cai no muaj cov haujlwm nthuav dav uas koj tuaj yeem siv hauv lwm txoj haujlwm. Kuv sim cais txhua txoj haujlwm kom ua kom pom tseeb.

- Ntxiv cov nyees khawm hloov chaw

-Tshem tawm cov nyees khawm

-Limit ntawm qhov teeb tsa taw tes lossis ib qho txiaj ntsig

- Ntxiv lub moos rau koj qhov haujlwm

Txhua tus lej yog tsim los ntawm kuv, exept:

Teem sijhawm RTC, Adafruit cov ntaub ntawv logger daim thaiv qhia

Kuv vam tias qhov kev qhia no muaj txiaj ntsig zoo rau koj!

Nicolás Jarpa: koj puas xav tau ntau tus thwjtim?

Pom zoo: