Cov txheej txheem:

Yuav Ua Li Cas Tswj Kev Txuas Nrog Arduino: 7 Kauj Ruam
Yuav Ua Li Cas Tswj Kev Txuas Nrog Arduino: 7 Kauj Ruam

Video: Yuav Ua Li Cas Tswj Kev Txuas Nrog Arduino: 7 Kauj Ruam

Video: Yuav Ua Li Cas Tswj Kev Txuas Nrog Arduino: 7 Kauj Ruam
Video: Computer Vision with Python! Resizing Images 2024, Hlis ntuj nqeg
Anonim
Yuav Ua Li Cas Tswj Kev Sib Txuas Nrog Arduino
Yuav Ua Li Cas Tswj Kev Sib Txuas Nrog Arduino

Kev xa tawm yog txoj hauv kev zoo tshaj plaws los tswj koj cov cuab yeej siv vim lawv muaj kev tiv thaiv tsawg dua ntawm lawv cov neeg sib cuag thiab tuaj yeem siv tau ntau qhov zoo li tig ON thiab OFF AC (Hloov Hloov Tam Sim No) cov khoom siv xws li Teeb, TV, Teeb thiab ntau lwm yam khoom siv. Nws kuj tseem yooj yim heev los tswj cov kev xa tawm no nrog microcontrollers. Txhawm rau ua kom yooj yim Kuv yuav siv Arduino ua tus tswj hwm microcontroller. Yog li, yam tsis nkim sijhawm ntxiv lawm cia pib.

Kauj ruam 1: Saib Video

Image
Image

saib kuv cov video.

Kauj Ruam 2: Xaiv Koj Cov Qauv Hloov Chaw rau Koj Cov Khoom Siv

Xaiv Koj Arduino
Xaiv Koj Arduino

Xaiv koj tus qauv Relay yog qhov tseem ceeb heev. Nws nyob ntawm seb yam khoom siv twg koj tab tom npaj yuav tswj hwm. Cov Relay Kuv tab tom siv no yog REES52 ib tus channel relay module uas tuaj yeem ua tau txog 10 Amps ntawm 250 volts. Feem ntau 10 Amps relay yog qhov tsim nyog los qhib thiab kaw cov khoom siv feem ntau. Tab sis, yog tias koj xav tig thiab tua cov cuab yeej zoo li lub tshuab ntxhua khaub ncaws lossis lub tshuab rhaub dej kub, xaiv Relay nrog qhov ntsuas siab dua tam sim no zoo li 20 amps.

Kauj Ruam 3: Xaiv Koj Arduino

Koj tuaj yeem siv Arduino Nano, PRO mini lossis txawm tias Mega. Tab sis kuv yuav siv Arduino UNO rau txoj haujlwm no.

Kauj Ruam 4: Siv Tus Txiv Neej Rau Poj Niam Jumper Cov Hluav Taws Xob rau Kev Sib Txuas (Xaiv tau)

Siv Txiv neej rau Poj Niam Jumper Hluav Taws Xob rau Kev Sib Txuas (Xaiv tau)
Siv Txiv neej rau Poj Niam Jumper Hluav Taws Xob rau Kev Sib Txuas (Xaiv tau)

Siv Txiv neej rau Poj Niam jumper xov hlau rau kev sib txuas ntawm Relay thiab Arduino. (Xaiv tau)

Kauj Ruam 5: Kev Sib Txuas Ntawm Relay Module thiab Arduino thiab Koj Cov Khoom

Kev Sib Txuas ntawm Relay Module thiab Arduino thiab Koj Cov Khoom
Kev Sib Txuas ntawm Relay Module thiab Arduino thiab Koj Cov Khoom
Kev Sib Txuas ntawm Relay Module thiab Arduino thiab Koj Cov Khoom
Kev Sib Txuas ntawm Relay Module thiab Arduino thiab Koj Cov Khoom

Txuas IN tus pin ntawm kev xa mus rau tus lej digital 6 ntawm Arduino, VCC mus rau 5 volts, thiab hauv av rau tus pin hauv av ntawm Arduino.

Ib sab laug yog qhov dav dav qhib dav dav; lub davhlau ya nyob twg nruab nrab yog cov davhlau ya nyob twg thiab sab xis yog qhov dav dav kaw. Txhawm rau ON thiab OFF lub thauj khoom txuas cov xov hlau zoo ntawm Load mus rau qhov nquag qhib lub davhlau ya nyob twg ntawm kev xa tawm thiab cov xaim hluav taws xob zoo mus rau lub davhlau ya nyob twg.

Kauj Ruam 6: Software Tshooj. Code

Software Tshooj Code
Software Tshooj Code
Software Tshooj Code
Software Tshooj Code

Kev piav qhia ntawm txoj cai

Hauv ntu teeb tsa, peb tshaj tawm tus pin tso zis li 6.

Hauv ntu ntu, peb qhia rau Arduino kom qhib lub relay. Tab sis digital pin 6 tsawg. Qhov no yog vim tias qhov kev xa tawm tus qauv no yog qhov ua haujlwm qis qis uas txhais tau hais tias qhov kev xa tawm no tau rub mus rau hauv av kom tig rau qhov txuas thiab lwm txoj hauv kev.

Tom qab ntawd peb ncua sijhawm 4 vib nas this. Yog tias koj xav kom nce ON thiab OFF sijhawm ntawm koj cov cuab yeej siv nce lub sijhawm hauv milliseconds hauv kab zauv.

Tom qab ntawd qhov kev xa tawm tawm thiab peb ncua sijhawm 2 vib nas this.

Cov txheej txheem no txuas ntxiv mus kom txog thaum lub hwj chim tawm mus.

Upload cov cai no rau Arduino.

Kauj Ruam 7: RESULT: Qhib thiab Tawm ntawm Cov Khoom Siv Nrog Arduino

RESULT: Qhib thiab Tawm ntawm Cov Khoom Siv Nrog Arduino
RESULT: Qhib thiab Tawm ntawm Cov Khoom Siv Nrog Arduino

Peb tuaj yeem pom tias cov cuab yeej raug tswj los ntawm Arduino.

Zoo siab txais tos kuv cov channel rau ntau cov haujlwm txaus.

www.youtube.com/channel/UCGnZFzWv-a-xBXPcCzoG5NA

Pom zoo: