![]() ![]() ![]() Serial.print(".") // Print the decimal point Serial.print(int(flowRate)) // Print the integer part of the variable Print the flow rate for this second in litres / minute Add the millilitres passed in this second to the cumulative total passed through the sensor in this 1 second interval, then multiply by 1000 toįlowMilliLitres = (flowRate / 60) * 1000 Divide the flow rate in litres/minute by 60 to determine how many litres have at this point, but it will still return the value it was set to just before disabled interrupts the millis() function won't actually be incrementing right Note the time this processing pass was executed. based on the number of pulses per second per units of measure (litres/minute inįlowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor We also apply the calibrationFactor to scale the output the number of milliseconds that have passed since the last execution and use Because this loop may not complete in exactly 1 second intervals we calculate Disable the interrupt while calculating flow rate and sending the value to If((millis() - oldTime) > 1000) // Only process counters once per second Configured to trigger on a FALLING state change (transition from HIGHĪttachInterrupt(sensorInterrupt, pulseCounter, FALLING) The Hall-effect sensor is connected to pin 2 which uses interrupt 0. ![]() Set up the status LED line as an outputĭigitalWrite(statusLed, HIGH) // We have an active-low LED attached Initialize a serial connection for reporting values to the host The hall-effect flow sensor outputs approximately 4.5 pulses per second per Measure the liquid/water flow rate using this code.Ĭonnect Vcc and Gnd of sensor to arduino, and theīyte sensorInterrupt = 0 // 0 = digital pin 2 Still not able to read anything from sensor. I've the picture of the flowmeter attached with this. so i can get some info of how much of air i'm wasting at my tools at work. Does anyone have any idea? I need to use this flowmeter to measure the amount of air i consume daily. the sender and receiver should measure against the flow as that increases time.Need some advise on reading flow from SMC Pneumatic's airflow meter.īeen trying to figure out how do get the flow from this sensor out to be read by my Arduino Uno.To maximize the effect use a U-tube and put the sensor in the bottom part, it will remove the sin() / cos() from the math. measuring water levels) - Project Guidance - Arduino Forum See also discussion and links her - ultrasonic rangefinders, humidity and temperature, (e.g. The speed of sound is temperature and humidity dependant The lengths of the tubes should match perfectly => 1mm = 3.3 uSec. There might be interference between the signals so they should be used alternately. However: the arduino due board has a clock speed of 84MHz witch would give a resolution of 12 nanoseconds, what comes very close to what I would actually need.ĭo you think the arduino due board could do the job? So when looking at the arduinoboard I found that most of them have a clock speed of 16 MHz so they can give a accuracy of 62,5 ns, this would not give desired data. > The measurement needs a accuracy of minimal 10ns (nanosecons) (flow die we minimaal willen kunnen registreren) > I probably have to widen the diameter of the tube as the signal is to close to the minimal range of the sensors.ī. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |