Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
jsp)
Login(/account/login/) | SignUp(/account/gopro)
HowtoUseWaterFlowSensorArduinoTutorial by
codebender_cc(/member/codebender_cc/)inarduino(/tag/typeid/categorytechnology/channelarduino/)
AboutThisInstructable
License:
8 37.707 views
395 favorites
codebender_cc
(/member/codebender_cc/)
(http://www.codebender.cc)
(/file/FLOZFUQION6O08H/)
Follow 633
(/member/codebender_cc/)
InthistutorialyouwilllearnhowtouseonewaterflowsensorwithanArduino Bio:ArduinoTutorialsbyCodebender.cc
board. Team
Thewaterflowsensorconsistsofaplasticvalvebody,awaterrotorandahall
Morebycodebender_cc:
effectsensor.Whenthewaterflowsthroughtherotor,rotorrollsandthespeed
ofitchangeswithadifferentrateofflow.Thehalleffectsensoroutputsthe
correspondingpulsesignal.
(/id/HowtoUsea
Thistypeofsensorcanbefoundondifferentdiameters,waterpressure(MPa)
andflowrate(L/m)ranges.Makesuretoselectonethatwillcoveryourneeds.
ThesensorthatIhaveithas20mmdiameter,<1.75Mpawaterpressureand~30
MagneticDoorSwitchSensorWithArdu/)
L/mflowraterange.
Inthistutorialwewillusetheserialmonitorforprintingthewaterflowratein
litersperhourandthetotaloflitersflowedsincestarting. (/id/Howto
Solet'sgetstarted!
MeasureLUXWithArduino/)
Ad
DownloadThisToPDF
It'sFreetoDownloadandConvert.GetItIn
Seconds,DownloadNow. (/id/HowtoControl
pdfconverttools.com
anRGBLEDStripArduinoTutorial/)
Step1:Whatyouwillneed
(/file/FPGQ132ION6O0F7/)
Forthistutorialyouwillneed:
Arduinouno
Waterflowsensor
3breadboardcables
Step2:Thecircuit
(/file/F2S7PK4ION6O0G9/)
Theconnectionsareprettyeasy,seetheaboveimagewiththebreadboard
circuitschematic.
Step3:Thecode
Here'sthecode,embeddedusingCodebender(https://codebender.cc/?
referrer=mi.vasilakis)!
TrydownloadingtheCodebenderplugin
(https://codebender.cc/static/walkthrough/page/1)andclickingonthe"Runon
Arduino"buttontoprogramyourArduinoboardwiththissketch.Andthat'sit,
you'veprogrammedyourArduinowiththissketch!
[arduinotutorial]WaterFlowSensor(https://codebender.cc/sketch:304865?
Edit Clone&Edit Download
referrer=mi.vasilakis)bymi.vasilakis(https://codebender.cc/user/mi.vasilakis?
1 /*
2 LiquidflowratesensorDIYhacking.comArvindSanjeev(/?
referrer=mi.vasilakis) (https://codebender.cc/utilities/download/304865?
3
4 Measuretheliquid/waterflowrateusingthiscode.
referrer=mi.vasilakis)
referrer=mi.vasilakis)
5 ConnectVccandGndofsensortoarduino,andthe
6 signallinetoarduinodigitalpin2.
7
8
9
*/
Checkoutournewclasses!>>(/classes/?utm_medium=cta&utm_source=banner)
10 bytestatusLed=13;
11
12 bytesensorInterrupt=0;//0=digitalpin2
13 bytesensorPin=2;
14
15 //Thehalleffectflowsensoroutputsapproximately4.5pulsespersecondper
16 //litre/minuteofflow.
17 floatcalibrationFactor=4.5;
18
19 volatilebytepulseCount;
20
21 floatflowRate;
22 unsignedintflowMilliLitres;
23 unsignedlongtotalMilliLitres;
24
25 unsignedlongoldTime;
26
27 voidsetup()
28 {
29
30 Searchingforapp...
//Initializeaserialconnectionforreportingvaluestothehost
31
Pleaseselectaboard RunonArduino
Youcankeepplayingwiththatbyclickingthe"Edit"buttonandstartmaking
yourownmodificationstothecode.Forexampleyoucanchangeintheline58
the"1000"msdelaytime.
Step4:SerialMonitor
(/file/F54F2KGION6O0RR/)
Presstheconnectbuttonbelowtostarttheserialcommunication.
Connectyoursensorwithyourwatertap,orjustblowonit.
Note:Thebacksideofthesensorshowwithonearrowthecorrectflowside.
SerialMonitor:
Searchingforapp...
Checkoutournewclasses!>>(/classes/?utm_medium=cta&utm_source=banner)
Step5:Welldone!
YouhavesuccessfullycompletedonemoreArduino"Howto"tutorialandyou
learnedhowtousethewaterflowsensor.
Ihopeyoulikedthis,letmeknowinthecomments.
Therewillbemoreofthem,somakesuretoclickFollowbutton!
FindmoreusefulArduinoTutorialshere
(http://www.instructables.com/member/codebender_cc?
show=INSTRUCTABLES)
Ad
GaNReliableForRADAR
RADARSystemsBasedonGaNSemiconductors
AreMoreReliable.GetPDFfromAnalogDevices.
AnalogDevices
Wehaveabenicecommentpolicy.
Pleasebepositiveandconstructive. wIMadeit! AddImages PostComment
I'mlookingforsomethingsimilarthatcandeterminethewatereithergoinginto
oroutofthehotwaterheater.Doesthissensorhavetheproperdiameterand
willitimpedethepressureofthewater?Alsocanitworkonthehotsideofthe
waterline?
Whatdoesthe`frac`variableonline85supposedtodo?IthinkIambeinga
derpandnotfollowingthecodecorrectly..Anyhelp?
Also,nicelittletutorial,IwilltryandfindonethatcaneasilyfitaUKgarden
hoseattachmentto.Idon'tactuallyNEEDitformyproject,butIcanuseitasa
confirmationthatwhenIturnthevalveon,itactuallyISgoingon.Mayflashup
someredLED'sifthingsarenotflowingasexpected..Thankyoufortheidea.
Checkoutournewclasses!>>(/classes/?utm_medium=cta&utm_source=banner)
RFcontrolledSwitch(/member/RFcontrolledSwitch) . WORMSS
(/member/WORMSS) 3monthsago Reply
fracdoesn'tappearanywhereinthesketchotherthanthedeclarationas
anunsignedintsoitmustbesomeleftovercodefromtestingetc.
WORMSS(/member/WORMSS) . RFcontrolledSwitch(/member/RFcontrolledSwitch)
3monthsago Reply
Thankyou,Ithoughtitwasmenotunderstandingit..
niceprojectbutwiththatplugintoshowthecodethereisanadvertisementat
thebottomblockingthatlastbitofcodefromview.Maybeaddadozenorso
CRlinestothebottomofthesketchsowecanreaditasposted.
InsterruptServiceRoutine
*/
voidpulseCounter()
{
//Incrementthepulsecounter
pulseCount++
}
ClickontheEditbuttonthenscrolldowntothebottomofthecode,highlight
"117"andpressenter.Theeditoraddslinestotheinstructable
canIuseittodeterminegasflow?
Thanks.Ihavebeenthinkingofautomatingthewatermeasuringand
temperaturecontrolinmashing/spargingprocessinmybeermaking.
Isn'tthereaseriouspressurelimitationontheseflowsensor?Somethinglike1
or1.5barmaxwhilethe"city"pressureis3bar.Hencelimitingthisflowsensor
tospecificclosedcircuitwithoutpressurechanges.Idontknowofacheapflow
sensorthatsupportshigherpressure.
Anyway,thanksforthistutorial
No,Thelimitationisonthepressuredifferencefromonesidetotheother
notthetotalpressureavailable.Workingfineongardenhoseat60PSI.
Thankyousomuchforthis!ThisiswhatIwaslookingfor,thankyousomuch
Checkoutournewclasses!>>(/classes/?utm_medium=cta&utm_source=banner)
forpostingthisinstructable!
https://www.adafruit.com/product/828
FEATURED CHANNELS
TermsofService(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |
PrivacyStatement(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
LegalNotices&Trademarks(http://usa.autodesk.com/legalnoticestrademarks/) | MobileSite(http://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
2016Autodesk,Inc.
Checkoutournewclasses!>>(/classes/?utm_medium=cta&utm_source=banner)