Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Reading The Flow Rate of your water cooling loop with an Arduino.

  1. #1
    If you can't hack it, you don't own it! Oneslowz28's Avatar
    Join Date
    Mar 2007
    Location
    Aiken, Sc
    Posts
    5,084

    Default Reading The Flow Rate of your water cooling loop with an Arduino.

    This is part of a project I have been working on and I thought I would share it here. The flow meter I am using is the Water Flow Sensor found in the Seeed Studio Depo. It uses a simple rotating wheel that pulses a hall effect sensor. By reading these pulses and implementing a little math, we can read the liquids flow rate accurate to within 3%. The threads are simple G1/2 so finding barbed ends will not be that hard. I found some at lows for $1.89 each.


    You will need
    • Seeeduino / Arduino
      Water Flow Sensor
      10K resistor


    Wiring up the Water Flow Sensor is pretty simple. There are 3 wires: Black, Red, and Yellow.
    • Black to the Seeeduino's ground pin
      Red to Seeeduino's 5v pin
      The yellow wire will need to be connected to a 10k pull up resistor.and then to pin 2 on the Seeeduino.


    Here is a fritzing diagram I made to show you how to wire it all up.

    Once you have it wired up you will need to upload the following code to your Seeeduino. Once it is uploaded and you have some fluid flowing through the Water Flow Sensor, you can open the serial monitor and it will display the flow rate, refreshing every second.

    Code:
    // reading liquid flow rate using Seeeduino and Water Flow Sensor from Seeedstudio.com
    // Code adapted by Charles Gantt from PC Fan RPM code written by Crenn @thebestcasescenario.com
    // http:/themakersworkbench.com http://thebestcasescenario.com http://seeedstudio.com
    
    volatile int NbTopsFan; //measuring the rising edges of the signal
    int Calc;                               
    int hallsensor = 2;    //The pin location of the sensor
    
    void rpm ()     //This is the function that the interupt calls 
    { 
      NbTopsFan++;  //This function measures the rising and falling edge of the 
    
    hall effect sensors signal
    } 
    // The setup() method runs once, when the sketch starts
    void setup() //
    { 
      pinMode(hallsensor, INPUT); //initializes digital pin 2 as an input
      Serial.begin(9600); //This is the setup function where the serial port is 
    
    initialised,
      attachInterrupt(0, rpm, RISING); //and the interrupt is attached
    } 
    // the loop() method runs over and over again,
    // as long as the Arduino has power
    void loop ()    
    {
      NbTopsFan = 0;	//Set NbTops to 0 ready for calculations
      sei();		//Enables interrupts
      delay (1000);	//Wait 1 second
      cli();		//Disable interrupts
      Calc = (NbTopsFan * 60 / 7.5); //(Pulse frequency x 60) / 7.5Q, = flow rate 
    
    in L/hour 
      Serial.print (Calc, DEC); //Prints the number calculated above
      Serial.print (" L/hour\r\n"); //Prints "L/hour" and returns a  new line
    }

    I hope this helps someone out! Thank's to Seeed Studio for hooking me up with a sensor so I could develop this tutorial.
    Last edited by Oneslowz28; 08-29-2010 at 02:59 AM.

  2. #2
    Like a Lightning Bolt in Your Cheerios! Drum Thumper's Avatar
    Join Date
    Jan 2007
    Location
    Montana
    Posts
    4,522

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    Find me a flow meter that can withstand at least 100C and you will have my curiosity seriously piqued...
    Quote Originally Posted by artoodeeto View Post
    aw heck guys. We're modders. Let's just build our own, shall we?

    DrumThumper.net || The Brewing Art ||
    My Flickr Stream

  3. #3
    Will YOU be ready when the zombies rise? x88x's Avatar
    Join Date
    Oct 2008
    Location
    MD, USA
    Posts
    6,334

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    Quote Originally Posted by Drum Thumper View Post
    Find me a flow meter that can withstand at least 100C and you will have my curiosity seriously piqued...
    100C?!

    Also, they're expensive, but I bet one of these would handle those temps:
    http://www.surplussales.com/Switches/Flow.html
    That we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously.
    --Benjamin Franklin
    TBCS 5TB Club :: coilgun :: bench PSU :: mightyMite :: Zeus :: E15 Magna EV

  4. #4
    If you can't hack it, you don't own it! Oneslowz28's Avatar
    Join Date
    Mar 2007
    Location
    Aiken, Sc
    Posts
    5,084

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    The one I am using is good to 80c but I have seen some during my searches that can withstand 120c, they are a bit pricey though.

  5. #5
    Anodized. Again. Konrad's Avatar
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    1,060

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    How can an efficient watercooling loop possibly reach 80C, let alone 100C?
    My mind says Technic, but my body says Duplo.

  6. #6
    If you can't hack it, you don't own it! Oneslowz28's Avatar
    Join Date
    Mar 2007
    Location
    Aiken, Sc
    Posts
    5,084

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    I think Drum Thumper is wanting to use this on his Automated Home Brewing system. I have been pestering him for months to use an arduino in the system when he finally builds it.

  7. #7
    Anodized. Again. Konrad's Avatar
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    1,060

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    Automated Home Brewing System (AHBS 1.0).

    That's awesome! Boggles the mind. Helluva lot more practical than uC logic light organs and weather stations.
    My mind says Technic, but my body says Duplo.

  8. #8
    Fresh Paint
    Join Date
    Dec 2010
    Posts
    4

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    I've been trying to modify/adapt this code to use with 2 of these flowmeters for use on a water storage tank, however I can't seem to figure out the syntax (or really anything at all) while trying to use 2 flowmeters (instead of just 1, as in the sample code above--which works great for one flowmeter btw).
    My overall goal is to calculate the volume of water in a storage tank with a separate inlet and outlet. I have one flowmeter attached to the inlet, and one to the outlet. My (best?) plan now is to calculate each inlet or outlet volume by measuring each inlet and outlet flow rate (as in the sample code above) and then multiply each of these by the timestep between measurements to get each volume that has gone through the inlet and the outlet in that timestep, and then subtract the outflow volume from the inflow volume to get a net volume (in that timestep) that the tank is storing, and continuously adding up these net volumes (for each timestep) to get a continuous output of the total volume of water stored in the tank.
    I feel like there might be a more straightforward way of doing this by bypassing the flowrates entirely and just using a counter to calculate each volume, but I'm really stuck either way on how to do this.
    Any help (or even a sample code!!) is very appreciated. Thanks

  9. #9
    Anodized. Again. Konrad's Avatar
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    1,060

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    Your logic seems right. The only way to simplify (that I can think of) would be to ensure that your flow pumps are equally matched; then you could simply subtract flows directly without any intermediate math.

    You might be able to simplify by working in non-uniform units; each component might require some different measure, there is sometimes no need to do extra math/logic operations across the board.
    My mind says Technic, but my body says Duplo.

  10. #10
    Resident 100HP water-cannon operator SXRguyinMA's Avatar
    Join Date
    Jun 2008
    Location
    MA
    Posts
    5,865

    Default Re: Reading The Flow Rate of your water cooling loop with an Arduino.

    or you could use/make a float type device that's hooked to a potentiometer to read the physical level in the tank, then make the Arduino do some basic math for the tank's size and have it display the current stored volume on an LCD display, and update it every second or as needed

    I'm currently working on a project to do just this, but with my oil tank for my heat. The tank already has a float gauge, but it requires me to go to the basement every time I want to check my oil level. I plan to attach a lever to the float gauge, then to a potentiometer, and calibrate it so the arduino will wirelessly (or wired, not sure yet) transmit the data to either a webpage or some kind of LCD panel mounted somewhere in my apartment

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •