Cov txheej txheem:

Arduino AC 220V/110V Voltage Detector: 3 Kauj Ruam
Arduino AC 220V/110V Voltage Detector: 3 Kauj Ruam

Video: Arduino AC 220V/110V Voltage Detector: 3 Kauj Ruam

Video: Arduino AC 220V/110V Voltage Detector: 3 Kauj Ruam
Video: ТОЛЬКО НЕСКОЛЬКО ЛЮДЕЙ ЗНАЮТ!! Сделать ПРОДВИНУТЫЙ тестер из диодного моста 2024, Lub Xya hli ntuj
Anonim
Arduino AC 220V/110V Voltage Detector
Arduino AC 220V/110V Voltage Detector

Qee zaum thaum peb muaj lub phiaj xwm ntse hauv tsev, peb tseem xav tau lub kaw lus los tshuaj xyuas lub tshuab hluav taws xob tiag tiag los yog peb tseem yuav xav ua kom lub kaw lus tsuas yog txhawm rau txheeb xyuas thiab sau cav seb lub tshuab lossis cov khoom siv tau qhib. Qhov teeb meem no tuaj yeem daws tau los ntawm kev siv tus qauv uas tuaj yeem txheeb xyuas seb puas muaj AC voltage ntawm 110V/220V. Tom qab tshawb hauv online Kuv tau dawm ntawm qhov qauv no thiab xav tias nws yuav yog lub tswv yim zoo los ua cov lus qhia txog yuav siv tus qauv no li cas.

Hauv cov lus qhia no peb yuav ua lub kaw lus uas pom tias muaj hluav taws xob AC ntawm 220V lossis tsis siv Arduino digitalRead.

Yog tias koj xav yuav qhov qauv no ntawm no yog qhov txuas mus rau lub khw:

Voltage Detector Module

Khoom siv

1. Arduino Uno + USB cable

2. Txiv neej-Poj niam jumper (3 pcs)

3. Voltage Detector Module

Kauj ruam 1: Kev thaiv kab

Thaiv
Thaiv

Qhov no yog cov kab hluav taws xob yooj yim uas yuav muab qhov laj thawj HIGH rau Arduino tus pin 2 yog tias cov hluav taws xob txuas nrog lub qhov hluav taws xob nquag.

Kauj ruam 2: Programming

Programming
Programming

Ua ntej, peb txhais tias tus lej digital 2 hu ua voltagePin txij tam sim no mus, thiab tus lej lej 13 raws li ledPin.

Qhov thib ob, peb teeb tsa voltagePin ua tus lej nkag thiab tus pin coj los ua tus lej pin los ntawm kev sau tus pinMode (voltagePin, INPUT); thiab pinMode (ledPin, OUTPUT);, feem.

Hauv cov kab ke no peb xav kom LED ntawm lub teeb pom kev thaum twg lub ntsaws txuas nrog lub qhov hluav taws xob. Yog li txhua lub sijhawm peb tau txais tus nqi siab los ntawm digitalRead (voltagePin) LED yuav qhib.

Koj tuaj yeem rub tawm qhov program txuas hauv qab no, yog tias koj xav sim qhov no.

Kauj Ruam 3: Xeem

Nov yog daim vis dis aus uas kuv tau sim txuas lub ntsaws rau lub qhov (socket). Koj tuaj yeem pom yuav ua li cas LED qhib thiab tua raws li qhov xwm txheej ntsaws.

Pom zoo: