Cov txheej txheem:

Timer Nrog Arduino thiab Rotary Encoder: 5 Kauj Ruam
Timer Nrog Arduino thiab Rotary Encoder: 5 Kauj Ruam

Video: Timer Nrog Arduino thiab Rotary Encoder: 5 Kauj Ruam

Video: Timer Nrog Arduino thiab Rotary Encoder: 5 Kauj Ruam
Video: Cov Timer Relay | timer-switch.com 2024, Kaum ib hlis
Anonim
Timer Nrog Arduino thiab Rotary Encoder
Timer Nrog Arduino thiab Rotary Encoder

Lub sij hawm yog ib qho cuab yeej siv feem ntau hauv kev lag luam thiab tsev neeg.

Kev sib dhos no yog pheej yig thiab yooj yim ua.

Nws kuj tseem muaj ntau yam, muaj peev xwm thauj cov program xaiv raws li xav tau. Muaj ntau txoj haujlwm sau los ntawm kuv, rau Arduino Nano.

Lub sijhawm ntawm lub sijhawm tuaj yeem nkag mus rau ntawm cov zaub (1602) los ntawm tus lej nkag teb. Los ntawm kev nias lub pob ntawm lub teb encoder teb lub timer tau tshwm sim. Qhov load yuav siv zog thaum lub sijhawm ncua ntawm kev sib cuag ntawm kev sib txuas.

Kuv tus kheej siv lub sijhawm teem rau UV raug nyob rau hauv txheej txheem ntawm PCB, tab sis kuj nyob hauv tsev qhov chaw uas neeg hlau chav ua noj ua haujlwm txhawm rau knead mov paj.

Khoom siv:

Txhua qhov khoom tuaj yeem pom ntawm AliExpress ntawm tus nqi qis.

PCB tau tsim thiab tsim los ntawm kuv (KiCad project). Txoj hauv kev ntawm PCB kev tsim khoom yuav yog lub luag haujlwm ntawm Cov Lus Qhia yav tom ntej.

Kauj Ruam 1: Daim duab qhia chaw

Schematic Daim duab
Schematic Daim duab

Lub Circuit Court tau tsim nyob ib puag ncig Arduino Nano. Cov zaub uas teev sijhawm thiab nyeem lub sijhawm ntxiv yog hom 1602.

Los ntawm Q1, BZ1 tau qhib, uas tawm suab nrov tom kawg ntawm lub sijhawm ncua.

Kev teeb tsa lub sijhawm ncua yog tsim los ntawm Rotary Encoder (yam khoom siv kho tshuab).

Tsis tas li los ntawm no yog ua "Lub sijhawm pib".

Kev xa tawm K1 (12V) tau qhib los ntawm Q2. Kev sib txuas lus sib txuas K1 muaj nyob ntawm txuas J1.

Cov phiaj xwm tau muab (+12V) rau J2 txuas.

Kauj Ruam 2: Sau Cov Cheeb Tsam thiab Cov Cuab Yeej

Cov npe ntawm Cheebtsam thiab Cov Cuab Yeej
Cov npe ntawm Cheebtsam thiab Cov Cuab Yeej

Nov yog cov npe ntawm cov khoom siv muab los ntawm KiCad program:

A1 Arduino_Nano Module: Arduino_Nano_WithMountingHoles

BZ1 Buzzer 5V Buzzer_Beeper: Buzzer_12x9.5RM7.6

C1 470nF Capacitor_THT: C_Rect_L7.0mm_W2.0mm_P5.00mm

C2, C3 100nF Capacitor_THT: C_Rect_L7.0mm_W2.0mm_P5.00mm

D1 LED Liab LED_THT: LED_D5.0mm

D2 1N4001 Diode_THT: D_DO-41_SOD81_P10.16mm_Horizontal

DS1 WC1602A Zaub: WC1602A

J1 Conn_01x05 Connector_PinHeader_2.54mm: PinHeader_1x05_P2.54mm_Horizontal

J2 +12V Connector_BarrelJack: BarrelJack_Horizontal

K1 Rel 12V Relay_THT: Rel 12V

Q1, Q2 BC547 Pob_TO_SOT_THT: TO-92_Inline

R1, R3 15K Resistor_THT: R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal

R2 1K/0, 5W Resistor_THT: R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_Horizontal

R4 220 Resistor_THT: R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal

RV1 5K Potentiometer_THT: Potentiometer_Piher_PT-10-V10_Vertical

SW1 Teb_Encoder Teb_Encoder: RotaryEncoder_Alps_EC11E-Hloov_Vertical_H20mm

SW2 Memory Button_Switch_THT: SW_CuK_JS202011CQN_DPDT_Straight

Ntxiv rau qhov no ntxiv:

-PCB tsim hauv KiCad.

-Digital multimeter (txhua yam).

-Fludor thiab soldering cuab yeej.

-Screws M3 l = 25mm, txiv ntseej thiab spacers rau LCD1602 mounting.

-Knob rau teb encoder.

-Lub siab xav ua nws.

Kauj Ruam 3: PCB

PCB txoj haujlwm tau ua hauv KiCad program thiab tuaj yeem pom ntawm:

github.com/StoicaT/Timer-with-Arduino-and-…

Ntawm no koj yuav pom txhua cov ntsiab lus tsim nyog rau kev txiav txim los ntawm lub Hoobkas (Gerber cov ntaub ntawv, thiab lwm yam).

Pib los ntawm cov ntaub ntawv no, koj tseem tuaj yeem ua koj tus kheej PCBs ntawm cov khoom siv ob txheej, tuab 1.6 hli. Tsis muaj lub qhov hlau, nrog cov kab hla ib sab nrog cov uas tsis muaj qhov txuas txuas.

Npog tag nrho cov kev nrog tin.

Peb tshuaj xyuas nrog cov ntsuas hluav taws xob digital PCB txoj hauv kev txhawm rau txhawm rau txheeb xyuas qhov cuam tshuam lossis luv luv ntawm txoj kev (thawj daim duab hauv Kauj Ruam 4).

Kauj ruam 4: Module los ua ke

Module los ua ke
Module los ua ke
Module los ua ke
Module los ua ke
Module los ua ke
Module los ua ke

Cov duab hauv qab no luv luv qhia yuav ua li cas cog cov khoom siv hluav taws xob.

3 daim duab kawg qhia txog kev ua tiav pem hauv ntej nraub qaum (zaum kawg).

Pib qhov module:

-Txhua qhov kev tshuaj xyuas qhov tseeb ntawm cov khoom sib xyaw thiab cov khoom siv sib xyaw ua ke (cov khoom sib xyaw tau cog rau hauv txoj hauv kev uas cov khoom sib dhos tuaj yeem teeb tsa ntawm lub vaj huam sib luag pem hauv ntej ntawm lub cuab yeej).

-Power lub mounting ntawm J2 nrog 12V.

-Measure (raws li daim duab schematic) qhov hluav taws xob ntawm lub rooj tsavxwm (digital multimeter).

-Kho qhov kev pom zoo sib xws ntawm LCD1602 los ntawm RV1.

-Upload qhov program ntawm Arduino Nano board raws li qhia hauv qab no.

-Txheeb xyuas qhov ua haujlwm tau zoo los ntawm kev muab lub sijhawm thiab pom tias nws tau ua tiav raug.

Kauj ruam 5: Software

Qhov kev zov me nyuam tuaj yeem pom ntawm:

github.com/StoicaT/Timer-with-Arduino-and-…

github.com/StoicaT/Timer-with-Arduino-and-…

Muaj 2 qhov kev pab cuam sib txawv. Github chaw cia khoom piav qhia txhua tus neeg ua dab tsi thiab lub sijhawm teem sijhawm tau npaj li cas hauv txhua kis.

Peb yuav rub tawm qhov kev xav tau thiab rub nws mus rau Arduino Nano board.

Thiab qhov ntawd yog nws!

Pom zoo: