Wakambozvibvunza here kuti ungaona sei mvura ine YL-83 sensor uye Arduino? Ichi chinyorwa chinonakidza chinobatanidza zvemagetsi nemeteorology mumapurojekiti anoshanda aunogona kuita uchibva kumba. Iwe haufanire kuve nyanzvi mukuronga kana maseketi kuti utange; Nezvishandiso zvakakodzera, kushivirira zvishomanana, uye piniki yekugadzira, unogona kuisa pamwe chete inoshanda mvura detector iyo inopindirana nemadonhwe emvura.
Nhasi tichadzidza zvakadzama kuti sensor iyi inoshanda sei, kuti ungaibatanidza sei neArduino board, uye zvakanyanya kukosha, chii Anoshanda mafomu zvine muhupenyu hwezuva nezuva. Kubva pakumisikidza alarm kuenda ku automating yekudiridza, mikana yacho yakati wandei. Saka, pasina imwe ado, ngatiparadze ruzivo urwu rwese.
Chii chinonzi YL-83 sensor uye inoshanda sei?
Iyo YL-83 mvura sensor ndeye chikamu chakakurumbira zvikuru mumapurojekiti eArduino nekuda kwekureruka kwayo uye mutengo wakaderera. Ichi chishandiso chinonyanya kuve nezvikamu zviviri:
- A conductive plate inoona mvura kuburikidza nekugona kwayo kuitisa magetsi.
- A comparator module inoshandura masaini ebhodhi kuita analog kana digital values.
Kana madonhwe emvura achidonha pa sensor plate, anobatanidza masimbi esimbi pamusoro, zvichikonzera shanduko mukupikisa. Shanduko iyi inogadziriswa neiyo comparator module, iyo inogadzira analog kukosha pakati pe0 ne1023 kana yedhijitari inobuda (0 kana 1) zvichienderana nekuti unoda kuishandisa sei.
Basic maficha emvura sensor
Iyi sensor ndeye zvakasiyana-siyana zvakanyanya uye inogona kuchinjirwa kumapurojekiti akasiyana. Zvikuru zvayo zvinosanganisira:
- Simba kubva ku3.3 kusvika ku5V, enderana nemabhodhi akawanda eArduino.
- Zvigadzirwa zviviri: dijitari (DO) uye analogi (AO).
- Inogadziriswa senitivity uchishandisa yakavakirwa-mukati potentiometer.
- Compact dhizaini ine kuramba kune oxidation nekuda kweiyo nickel-plated pamusoro.
Nekuda kweaya maficha, unogona kushandisa iyi sensor zvese kuona kuvapo kwemvura pakuyera kusimba kwayo.
Maitiro ekubatanidza iyo YL-83 sensor kune Arduino
Gungano remagetsi riri nyore uye rinokurumidza. Unozoda kubatanidza tambo uye, hongu, inoenderana Arduino board yakadai seUNO, Mega kana Nano. Heino gwara rekutanga:
- Batanidza iyo VCC pini ye sensor kune 5V pini yeArduino.
- Iyo GND ye sensor inofanirwa kuve yakabatana neiyo GND yeArduino board.
- Iyo yedhijitari inobuda (DO) inogona kubatana kune chero dhijitari pini yeArduino, semuenzaniso, D2.
- Kana iwe uchida kuyera hunhu hweanalogi, batanidza iyo analog kubuda (AO) kune analogi pin, senge A0.
Kana zvese zvabatanidzwa, gadzirisa iyo potentiometer pane sensor module kuti calibrate senitivity pachikumbaridzo kune humidity.
Kodhi yekutanga: kuverenga kukosha
Iyo kodhi yakakosha kududzira iyo data yakasiyana inopiwa ne sensor. Heino muenzaniso wekutanga:
const int sensorPin = A0; void setup() {Serial.begin(9600); } void loop () {int value = analogRead(sensorPin); Serial.print("Analog Read: "); Serial.println(value); kunonoka (1000); }
Iyi kodhi inoverenga analog values kubva kune sensor uye inovaratidza pane serial yekutarisa. Iwe unogona kunyorovesa pamusoro pe sensor uye tarisa kuti hunhu hunosiyana sei.
Mimwe mienzaniso yekodhi
Iwe unoda kuita chimwe chinhu chinopindirana here? Edza iyi kodhi inoisa kunaya mukati kusimba kwakasiyana:
const int sensorPin = A0; void setup() {Serial.begin(9600); } void loop () {int value = analogRead(sensorPin); kana (kukosha > 950) { Serial.println("Hapana mvura"); } zvimwe kana (kukosha > 600) { Serial.println("Kuri kunaya"); } zvimwe kana (kukosha > 300) { Serial.println("Downpour"); } zvimwe {serial.println("Zvinogoneka mafashamo"); } kunonoka (1000); }
Ichi chirongwa chidiki chinokubvumira kuti utarise iyo Kunaya kwemvura munguva chaiyo
Inoshanda mvura sensor application
Iyo YL-83 ine huwandu hwekushandisa mudzimba otomatiki kana mapurojekiti ekudzidzisa. Heano mamwe mazano:
- Irrigation automation: Iwe unogona kubatanidza sensor kune pombi yemvura inoshanda kana yaona kusakwana humidity.
- Ma alarm Inomisa alarm inonzwika kana sensor ikaona mvura inonaya kana mafashama.
- Awning control: Wedzera otomatiki kana kudzoreredza awnings pamateru zvichienderana nemamiriro ekunze.
Nekuda kwekureruka kwayo uye mutengo wakaderera, sensor iyi chishandiso chakanakisa che Zvirongwa zve DIY.
Iyo YL-83 mvura inonaya yakawanda kupfuura yehungwaru yekuwedzera, iri gedhi renyika inonakidza yekuronga uye inoshandiswa zvemagetsi. Nekuseta kwakapfava uye hunyanzvi hudiki, unogona kugadzira anobatsira uye anoshanda masisitimu anopindura kumamiriro ekunze. Kana iwe wakambozvibvunza kuti woita sei otomatiki mabasa kana kungonakidzwa neyakasiyana chirongwa chedzidzo, iyi sensor isarudzo huru. Handei kubasa!