Cov txheej txheem:

Tau Txais Email Ceeb Toom Los Ntawm Koj Lub Tsev Ruaj Ntseg Hauv Tsev Siv Arduino: 3 Cov Kauj Ruam
Tau Txais Email Ceeb Toom Los Ntawm Koj Lub Tsev Ruaj Ntseg Hauv Tsev Siv Arduino: 3 Cov Kauj Ruam

Video: Tau Txais Email Ceeb Toom Los Ntawm Koj Lub Tsev Ruaj Ntseg Hauv Tsev Siv Arduino: 3 Cov Kauj Ruam

Video: Tau Txais Email Ceeb Toom Los Ntawm Koj Lub Tsev Ruaj Ntseg Hauv Tsev Siv Arduino: 3 Cov Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim
Tau Txais Email Ceeb Toom Los Ntawm Koj Lub Tsev Ruaj Ntseg Hauv Tsev Siv Arduino
Tau Txais Email Ceeb Toom Los Ntawm Koj Lub Tsev Ruaj Ntseg Hauv Tsev Siv Arduino

Siv Arduino, peb tau yooj yim rov txhim kho email yooj yim ua haujlwm zoo rau txhua qhov kev teeb tsa kev nyab xeeb uas twb muaj lawm. Qhov no yog qhov tsim nyog tshwj xeeb rau cov txheej txheem qub uas feem ntau yuav tau txuas ntev los ntawm kev saib xyuas cov kev pabcuam thiab lwm yam yuav muaj kev txwv tsis pub siv. Qhov no TSIS YOG hloov pauv rau kev saib xyuas kev pabcuam.

Muaj cov khoom lag luam muaj muag, zoo li tus envisalink, uas ntxiv kev sib txuas lus ntxiv thiab tswj kev ua haujlwm, tab sis lawv tsis kim.

Txoj haujlwm no tuaj yeem ua tiav rau qis dua $ 10.

Koj xav tau dab tsi:

  • Arduino - nyiam dua Uno lossis Mega
  • W5100 Ethernet ntaub thaiv npog
  • Kev ruaj ntseg system - Ib qho siv ntawm no yog DSC Power 832 PC5010 tab sis zoo nkauj npaum li cov qauv nrog tus lej programmable (lossis tus pin uas muaj lub xeev ntsuas tau hloov pauv) tuaj yeem siv tau.
  • Kev teeb tsa phau ntawv thiab cov phiaj xwm ua haujlwm - koj tseem yuav xav tau tus lej teeb tsa los hloov qhov tsim nyog.
  • Qhov ntev ntawm cov tub ntxhais hlau xaim tsim nyog txuas rau Arduino header pins.
  • 10k resistor los rub tus pin nkag mus rau hauv av.
  • 1.5k resistor kom txwv tam sim no mus rau sab LED ntawm optocoupler. Tus nqi yog ua raws qhov ntsuas hluav taws xob thiab qhov siab tshaj tam sim no ntawm optocoupler.
  • Optocoupler - Kuv siv FOD817 tab sis qhov no yog ib qho yooj yim Circuit Court nrog dav xav tau, yog li muaj ntau pua ntawm lwm tus uas yuav ua haujlwm nrog cov lus qhia zoo sib xws.
  • Ethernet cable.

Kauj Ruam 1: Qhov Txheej Txheem Kev Ruaj Ntseg

Program Qhov System Ruaj Ntseg
Program Qhov System Ruaj Ntseg

Lo lus ceeb toom:

  • Nkag mus rau lub vaj huam sib luag ruaj ntseg lossis hloov pauv rau kev teeb tsa teeb tsa tuaj yeem teeb tsa kev ceeb toom tamper yog tias koj tam sim no tau cuv npe rau qhov kev pabcuam saib xyuas.
  • Tsis tas li nco ntsoov khaws txhua qhov kev hloov pauv koj ua kom koj tuaj yeem rov qab los tom qab yog tias xav tau.

Dab tsi peb tab tom sim ua kom tiav yog nyeem lub xeev hloov pauv los ntawm cov kab ke thaum lub tswb nrov nrov. Feem ntau cov kab ke muaj tus lej programmable tus pin uas peb tuaj yeem siv los teeb liab Arduino. Nws kuj tseem tuaj yeem siv lub teeb liab los ntawm lub suab (tsis tas yuav hloov pauv mus rau lub kaw lus) tab sis yuav tsum muaj kev hloov pauv thiab hloov kho ntawm Arduino code - Kuv tsis tau mus rau txoj kev no vim kuv lub hom phiaj tseem ceeb yog los daws teeb meem yog li kuv yuav hloov kho qhov teeb tsa ib qho ntxiv.

Raws nraim li cas rau qhov program nws txawv ntawm cov qauv, tab sis lub hauv paus ntsiab lus zoo ib yam - xa mus rau koj li kab ke kev teeb tsa phau ntawv qhia tshwj xeeb. Hauv DSC system kuv siv:

  • Kuv teeb PGM1 tus pin kom qhib thaum lub tswb nrov tau tshwm sim. Ntu [009], Kev Xaiv [01].
  • Hauv cov kab ke no koj tseem teeb tsa tus yam ntxwv thiab yuav ua li cas tus lej tus lej ua haujlwm - Tshooj [141]:

    • Teeb tus Cwj Pwm 3 rau ON kom tus pin nquag qhib thiab hloov mus rau hauv av thaum lub tswb tau qhib. Nco ntsoov ceev faj tias Arduino cov lej nkag tsis tau ntau dua 5v (qee qhov tsuas yog 3.3v ua siab ntev).
    • Tag nrho lwm tus cwj pwm tau teeb rau OFF.

Cov kev ruaj ntseg feem ntau muaj cov qauv teeb tsa uas tau tsim los rau kev sib txuas lus nrog lub chaw saib xyuas hauv nruab nrab hla cov xov tooj. Yog tias lawv tsis tas yuav tau txais kev lees paub tias cov ntaub ntawv raug xa mus tau txais, cov teeb meem yuav raug nthuav tawm. Qee tus tuaj yeem teeb tsa xa xov pager lossis hu xov tooj tus kheej yam tsis muaj kab ke nrhiav kab lus teb (yog li tsis pom teeb meem teeb meem) yog li yog koj li, thiab koj muaj xov tooj hauv tsev, koj tuaj yeem program nws kom hu koj lub xov tooj (s)) ntxiv rau xa email hauv qhov xwm txheej.

Yog tias koj tsis siv qhov kev pabcuam saib xyuas thiab/lossis koj lub kaw lus tsis tuaj yeem ua haujlwm los hu xov tooj ib txwm tsis cuam tshuam cov teeb meem, txwv tsis pub tus neeg sib txuas lus thiab xov tooj kab saib (tlm) hauv kev teeb tsa.

Kauj ruam 2: Program Arduino

Qhov program Arduino
Qhov program Arduino

Ua ntej peb yuav tsum sau npe rau qhov kev pabcuam kom xa peb email los ntawm.

Cov kev pabcuam kuv siv yog smtp2go uas yog pub dawb thiab ua haujlwm nrog Arduino - cov cai siv los ntawm no yog ua raws cov teeb tsa los ntawm lawv lub xaib.

www.smtp2go.com/

Tom qab koj sau npe, koj yuav tsum tau base64 encode tus username thiab password (pom hauv "Chaw"> "Cov Neeg Siv") txhawm rau kom nws siv tau hauv daim duab.

www.base64encode.org/

Qhov chaws:

github.com/hzmeister/arduino_alarm_email

Kho cov ntu nrog // cov lus rau koj qhov xav tau.

Upload rau Arduino.

Hloov tshiab:

smtp2go email kawg mus rau hauv daim nplaub tshev spam tom qab ib ntus (txawm tias koj teeb tsa lawv tsis). Kuv sim temboo uas ntseeg tau ntau dua (txij li nws siv gmail), tab sis cov ntaub ntawv tas sij hawm tom qab ib hlis yog li ntawd tsis yog qhov kev xaiv siv tau ib yam. Kuv suav nrog cov cai xa los ntawm gmail nrog temboo siv daim ntaub thaiv w5100 yog tias leej twg xav tau (lawv cov cai xav kom koj siv qhov txiav txuas ntxiv thiab kim yun).

Cov ntawv no siv temboo gmailv2 uas lees paub qhov siv OAuth txhim khu kev qha nrog token tshiab uas tsis zoo li app tus password siv hauv gmailv1.

Tau qhov twg los:

github.com/hzmeister/temboo-gmailv2

Thaum kawg kuv tau txiav txim siab siv kuv isp muab email uas muaj chaw nres nkoj 25 qhib. Koj tuaj yeem siv ib qho smtp email server/chaw nres nkoj tsuav nws tsis xav tau kev txuas mus rau encrypted (txij li w5100 tsis txhawb nws). Cov txiaj ntsig ntawm kev siv isp muab ib qho yog tias google tsis chij nws li spam. Arduino code yuav luag zoo ib yam li nrog smtp2go, tab sis nrog qee qhov kev hloov pauv/hloov kho me me.

Tau qhov twg los:

github.com/hzmeister/arduino_alarm_emailV2

Kauj Ruam 3: Nruab Kho Vajtse thiab Kuaj

Nruab Hardware thiab Test
Nruab Hardware thiab Test
Nruab Hardware thiab Test
Nruab Hardware thiab Test

Nruab ib lub w5100 ntaub thaiv npog mus rau Arduino thiab teeb nws hauv qhov thaiv. Velcro daim kab xev ua haujlwm tau zoo vim tias tsis muaj kev coj ua thiab tshem tau.

Kuv siv lub photocoupler cais qhov 13.7v pgm1 teeb liab los ntawm 5v arduino cov tswv yim thiab hauv av. Nws yog "tsis hloov pauv optocoupler" Circuit Court.

Thaum lub tswb tau qhib, pgm1 hloov los ntawm qhib rau hauv av ua tiav qhov Circuit Court.

Kuaj qhov system.

Siv lub ntsuas saib hauv Arduino IDE kom pom cov xwm txheej tso tawm.

Txheeb xyuas daim nplaub tshev spam yog tias lub koos pij tawj pom tias email tau xa mus tiav tab sis koj tsis tau txais nws hauv koj lub inbox.

Pom zoo: