水位传感器 Water Sensor for Arduino

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

HighHighHighHighSensitivitySensitivitySensitivitySensitivityWaterWaterWaterWaterSensorSensorSensorSensorDescription:Description:Description:Description:Watersensorbrickisdesignedforwaterdetection,whichcanbewidelyusedinsensingtherainfall,waterlevel,eventheliquateleakage.Thebrickismainlycomprisedofthreeparts:AnElectronicbrickconnector,a1MΩresistor,andseverallinesofbareconductingwires.Thissensorworksbyhavingaseriesofexposedtracesconnectedtogroundandinterlacedbetweenthegroundedtracesarethesenstraces.Thesensortraceshaveaweakpull-upresistorof1MΩ.Theresistorwillpullthesensortracevaluehighuntiladropofwatershortsthesensortracetothegroundedtrace.BelieveitornotthiscircuitwillworkwiththedigitalI/OpinsofyourArduinooryoucanuseitwiththeanalogpinstodetecttheamountofwaterinducedcontactbetweenthegroundedandsensortraces.Thisitemcanjudgethewaterlevelthroughwithaseriesofexposedparallelwiresstitchtomeasurethewaterdroplet/watersize.Thisitemcaneasilychangethewatersizetoanalogsignal,andoutputanalogvaluecandirectlybeusedintheprogramfunction,thentoachievethefunctionofwaterlevelalarm.Thisitemhavelowpowerconsumption,andhighsensitivity,whicharethebiggestcharacteristicsofthismdoule.ThisitemcanbecompatiblewithArduinoUNO、Arduinomega2560、ArduinoADKetc.Features:Features:Features:Features:1、Workingvoltage:5V2、WorkingCurrent:20ma3、Interface:Analog4、Widthofdetection:40mm×16mm5、WorkingTemperature:10℃~30℃6、Weight:3g7、Size:65mm×20mm×8mm8、Arduinocompatibleinterface9、Lowpowerconsumption10、Highsensitivity11、Outputvoltagesignal:0~4.2VPinPinPinPindefinition:definition:definition:definition:Sstandforsignalinput+standforpowersupply-standforGNDApplications:Applications:Applications:Applications:1、Rainfalldetecting2、Liquidleakage3、TankoverflowdetectorConnectingConnectingConnectingConnectingDiagram:Diagram:Diagram:Diagram:Thissensormodulecomewith3PinDual-femaleJumperWirelength300mmasbelow:Example:Example:Example:Example:PleaseusethecabletoconnecttheWatersensorwithA1interfaceofArduinoSensorshied.PleaseusethecabletoconnecttheLEDmodulewithD8interfaceofArduinoSensorshied.Afterhardwareconnection,pleasedownloadthetestcodetoArduinoafterbeingcompiledcode,andtheArduinotestcodesuchasbelow:IntanalogPin=1;//watersensorconnectedtotheanalogport1Intled=12;//LEdconnectedtothedigitalmouth12Intval=0;//definitionvariablevalinitialvalueas0Intdata=0;//definitionvariabledatainitialvalueas0Voidsetup(){PinMode(led,OUTPUT);//definitionledasoutputpinSerial.Begin(9600);//setthebaudrateas9600}Voidloop(){Val=analogRead(analogPin);//readthesimulationvalueandsendtovariablevalIf(val700){//judgmentvariablevaliswhethermorethan700ornotDigitalWrite(LED,HIGH);//variablevalgreaterthan700,LEDon}Else{DigitalWrite(led,LOW);//variablevallessthan700,LEDoff}Data=val;//variablevalassignmenttovariabledataSerial.Println(data);//serialprintvariabledataDelay(100);}Thecomeouttheresultasbelow:Waterlevelhasnotreachedalarmingvalue,thesystemwillnotalarm,LEDwillnotlightup.Waterlevelbeyondwarningvalue,thesystemwillalarm,LEDwilllightsup.

1 / 7
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功