Cov txheej txheem:

Tsab ntawv tsa suab Sensor Dej Kais Siv Arduino thiab Solenoid Valve - DIY: 6 Kauj Ruam
Tsab ntawv tsa suab Sensor Dej Kais Siv Arduino thiab Solenoid Valve - DIY: 6 Kauj Ruam

Video: Tsab ntawv tsa suab Sensor Dej Kais Siv Arduino thiab Solenoid Valve - DIY: 6 Kauj Ruam

Video: Tsab ntawv tsa suab Sensor Dej Kais Siv Arduino thiab Solenoid Valve - DIY: 6 Kauj Ruam
Video: Aroma Diffuser Chav av noo, Suab Sensor Teeb, Hauv Tsev Khoom Siv Hluav Taws Xob Chaw Tsim Tshuaj 2024, Kaum ib hlis
Anonim
Tsab ntawv tsa suab Sensor Dej Kais Siv Arduino thiab Solenoid Valve - DIY
Tsab ntawv tsa suab Sensor Dej Kais Siv Arduino thiab Solenoid Valve - DIY
Tsab ntawv tsa suab Sensor Dej Kais Siv Arduino thiab Solenoid Valve - DIY
Tsab ntawv tsa suab Sensor Dej Kais Siv Arduino thiab Solenoid Valve - DIY

Hauv txoj haujlwm no, Kuv yuav qhia koj yuav tsim lub Motion Sensor Water Tap siv Solenoid Valve li cas. Txoj haujlwm no tuaj yeem pab koj hloov koj li ntawv siv dej tam sim no mus rau hauv lub kais uas tuaj yeem tswj tau raws li kev tshawb nrhiav pom. Siv IR lub ntsej muag cuam tshuam nrog Arduino, Kais yuav cia li qhib rau txhua lub sijhawm uas txhais tes tau pom nyob ze ntawm IR sensor. Tus kais yuav nyob twj ywm ON rau lub sijhawm ruaj khov raws li tau hais tseg los ntawm tus neeg siv thiab tom qab ntawd txiav tawm ncaj qha.

Txoj haujlwm siv cov khoom siv yooj yim uas nkag tau yooj yim thiab tseem ua tau rau txhua tus.

Khoom siv

  • Arduino Ib.
  • Solenoid Valve 12V.
  • IR sensor - tuaj yeem hloov pauv los ntawm Ultrasonic Sensor raws li koj xaiv.
  • Diode - 1N4007.
  • 12V Fais Fab Khoom.
  • 5 V Relay.
  • Mini Breadboard Cov.
  • Txuas xov hlau.

Kauj Ruam 1: Nkag Siab Solenoid Valve

Nkag siab txog Solenoid Valve
Nkag siab txog Solenoid Valve
Nkag siab txog Solenoid Valve
Nkag siab txog Solenoid Valve

Lub solenoid valve ua haujlwm electromagnetically. Lub zog ntawm lub kauj ua rau lub valve qhib thiab tso cai rau cov dej ntws. Lub tswv yim no pab hloov phau ntawv li qub thiab ua rau nws yog ib feem tseem ceeb rau txoj haujlwm no.

Ntsuam xyuas kev ua haujlwm ntawm solenoid valve los ntawm kev txuas ncaj qha 12V Lub zog xa mus rau Solenoid Valve. Hauv qab no koj yuav hnov lub suab "Nyem". Lub suab no qhia txog kev qhib thiab kaw lub valve.

Txhawm rau tswj hwm Solenoid valve, peb yuav tsum txuas nws mus rau Arduino Microcontroller. Txhawm rau ua qhov no, yuav siv 5V Relay. Lub solenoid valve induces rov EMF uas tuaj yeem ua rau puas tsuaj yog tias txuas ncaj qha. Li no Diode yuav tsum txuas nrog raws li qhia hauv daim duab hauv cov kauj ruam no. Qhov no pab ua kom muaj kev nyab xeeb tswj hwm lub solenoid valve.

Nco tseg - Solenoid Valve tsis muaj lub davhlau ya nyob twg zoo lossis tsis zoo, txhua lub davhlau ya nyob twg tuaj yeem suav tias yog +ve lossis -ve.

Kauj Ruam 2: Txuas Solenoid Valve rau 5V Relay

Txuas Solenoid Valve rau 5V Relay
Txuas Solenoid Valve rau 5V Relay
Txuas Solenoid Valve rau 5V Relay
Txuas Solenoid Valve rau 5V Relay

Hauv theem no, peb yuav tsum txuas lub solenoid valve mus rau qhov txuas. Xa mus rau daim duab qhia chaw muab rau kev sib txuas.

  1. Txuas qhov zoo (+ve) lub davhlau ya nyob twg ntawm 12V cov khoom siv rau lub davhlau ya nyob twg (nruab nrab ib qho) ntawm kev xa tawm.
  2. Txuas qhov Zoo kawg ntawm lub diode mus rau NO (Feem ntau Qhib) lub davhlau ya nyob twg ntawm kev xa tawm.
  3. Muab 5V muab rau Relay los ntawm arduino 5V tus pin.
  4. Txuas tus pin nkag (IN) ntawm Kev Txuas mus rau Pin 13 ntawm Arduino.

Nyob rau hauv rooj plaub ntawm kev xa tawm, sab muab khoom muaj 3 tus pin:

  • VCC
  • GND
  • IN lossis IN1, IN2 (raws li 1 channel lossis 2 channel relay)

Sab tso tawm ntawm qhov txuas:

  • Feem ntau Kaw Cov Qauv (NC): 1. HIGH teeb liab - tam sim no ntws. 2. LOW teeb liab - tam sim no tsis ntws
  • Feem ntau Qhib teeb tsa (TSIS MUAJ): 1. HIGH teeb liab - tam sim no tsis ntws. 2. LOW teeb liab - tam sim no ntws.
  • Common (CO)

Hauv Circuit no peb yuav siv tus pin "Qhib Ib Qho" raws li peb xav tau los muab tam sim no rau lub valve tsuas yog thaum pom tes.

Kauj Ruam 3: Txuas IR Sensor

Txuas IR Sensor
Txuas IR Sensor

Peb yuav tsum txuas IR sensor mus rau arduino siv Analog tus pin ntawm pawg thawj coj saib. Los ntawm kev siv AnalogRead () ua haujlwm ntawm arduino IDE, peb tuaj yeem nkag mus rau tus nqi sensor. Qhov no tuaj yeem pab txiav txim siab seb txhais tes nyob ze ntawm lub sensor lossis tsis.

  • Txuas IR sensor OUT tus pin rau Analog tus pin A0.
  • Muab 5V muab rau IR sensor los ntawm Arduino.
  • Txuas GND tus pin.

Nco tseg - Lub hwj chim ntawm IR sensor tuaj yeem hloov kho kom sib txawv ntawm qhov ntsuas pom ntawm lub ntsuas

Kauj Ruam 4: Upload Sketch/Code

Tom ntej no, koj yuav tsum xa daim duab kos rau koj Arduino siv Arduino IDE.

Rub tawm cov kab ntawv txuas thiab tom qab ntawd qhib nws hauv koj Arduino IDE.

Ntsaws rau hauv koj Arduino thiab xyuas kom tseeb tias koj tau txais qhov chaw nres nkoj com thiab pawg thawj coj xaiv raug, tom qab ntawd xa cov cai.

Kauj Ruam 5: Txuas lub Solenoid Valve mus rau Kais/Yeeb Nkab

Txuas lub Solenoid Valve mus rau Kais/Yeeb Nkab
Txuas lub Solenoid Valve mus rau Kais/Yeeb Nkab

Ua ntej muab cov khoom siv rau peb teeb tsa, txuas lub solenoid valve rau lub kais. Muaj ob txoj hauv kev mus txog cov txheej txheem ntawm txuas nws mus rau lub kais.

  1. Txuas rau Cov Yeeb Nkab: Txuas lub valve rau cov yeeb nkab uas muab dej rau koj lub kais dej uas twb muaj lawm.
  2. Txuas rau Kais: Txuas lub valve ncaj qha mus rau lub kais tsuas yog lub valve loj sib phim nrog koj cov kais dej uas twb muaj lawm, txwv tsis pub nws yuav ua rau xau. Ua raws li qhov uas tig rau phau ntawv coj mus rhaub. Txawm hais tias phau ntawv tuav tau tig rau, yuav tsis muaj dej ntws raws li lub solenoid valve kaw.

Daim duab qhia pom teeb tsa rau kev sib txuas 1.

Kauj Ruam 6: Siv Motion Sensor Water Tap

Ntawd yog nws, koj lub suab ntsuas dej ntsuas dej tau npaj siv. Txhua lub sijhawm koj xav siv lub kais, txav koj txhais tes nyob ze rau koj li IR sensor. Ua raws li qhov no, cov dej yuav ntws rau 7 vib nas this raws li tau hais tseg hauv txoj cai thiab yuav kaw tsis siv neeg. Hloov lub sijhawm raws li koj xav tau.

Qhia rau kuv paub tias koj yuav hloov lossis ua txawv hauv nqe lus.

Pom zoo: