Go Down

Topic: Swissflow SF 800 flow meter (Read 8133 times) previous topic - next topic

felipepac

Hello,

I'm in trouble trying to use a flow meter by Swissflow. I tried to follow the instructions, I already read other posts here on the forum, but I still couldn't understand what am I doing wrong. I would be very pleased if someone could help me. Thanks in advance.

I'm using 2 different codes to try to get the readings from the flowmeter. One is using Digital Read, which gives me only "1's" as a reply:

Code: [Select]

int pin = 5;

int val = 0;


void setup() {
  Serial.begin(9600);
}


void loop() {
  val = digitalRead(pin);

  Serial.print(val);
  Serial.println("");
}


The other is using Pulse In, which gives me just "0":

Code: [Select]

int pin = 5;
unsigned long duration;

void setup()
{
  Serial.begin(9600);
  pinMode(pin, INPUT);
}

void loop()
{
  duration = pulseIn(pin, HIGH);
  Serial.print(duration);                                  // End of Line
  Serial.println("");
  delay(100);
}


I'm attaching pictures of my connections and the connection diagram for the flow meter SF 800.

Thanks again!

Felipe



liuzengqiang

#1
Feb 12, 2011, 04:06 pm Last Edit: Feb 12, 2011, 04:10 pm by liudr Reason: 1
Are you sure the connections are correct? I can guess the red/grey wire on the gauge is plus but please check the other two wires.
Plus, the required resistance between 5V and Plus is small. I can't determine your two series resistor values, poor pic. How large are they?

BTW, how are you testing the gauge? Blow are? use water?
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

felipepac

Hello liudr,

Thanks for the reply!

In the hook up diagram, they ask for a resistance of 50ohm/V, as I have 5 volts, I am using 250ohms, which in here is made from a 100ohm + 150ohm in series as you correctly saw. It also required a 2200ohm resistor from the signal to the 5V, which I is there as well.

If i correctly understood the hook up diagram, the wiring is correct.

Thanks again!

Felipe

liuzengqiang

Alright then. How are you flowing water through it? If no water flows through it, the output stays at 1 or 0. Once water starts to flow, you will get alternating 1 and 0 and the faster the values alternate, the higher the flow.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

felipepac

The flow doesn't affect the readings. It's always 1 when I use Digital read, no matter how much water is passing by the flow meter, or even if it's sitting on my desk. If I use the Pulse in, the same thing happens, but the value is 0.

liuzengqiang

If you stick you finger or small screw driver in the meter, can you feel a moving part, possibly a rotation device? That should be the one that does the sensing. If you rotate it, it should give you 0 and 1 alternatively.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter

felipepac

Yes, everything seems to be there. I have 2 of the same flow meter, but both give me the same result, that's why I believe I'm doing something wrong. The values are never affected by the rotation of the turbine inside. I misunderstood the hook up diagram or my code is not correct, I believe.   

WillR

#7
Feb 12, 2011, 05:48 pm Last Edit: Feb 12, 2011, 05:56 pm by WillR Reason: 1
Felipe:

Your script works of course...

This one...
Code: [Select]
int pin = 5;
unsigned long duration;

void setup()
{
 Serial.begin(9600);
 pinMode(pin, INPUT);
}

void loop()
{
 duration = pulseIn(pin, HIGH);
 Serial.print(duration);                                  // End of Line
 Serial.println("");
 delay(200);
}


The other script does not make sense as you may get many thousands of outputs before you see a change.

I used a 4KHz Oscillator (see my posts in Other Software Development) on the DS1307 RTC (Clock). I just hooked the Output to Pin5 and read the duration --

The duration was about 120 to 121 that is in close agreement with the oscilloscope...
T= 1/f = 1/4096 = 0.000244140625 or 244.14 us -- so the pulse in works not too bad. (Half of that is what the arduino should read.) I am using a Mega 2560 -- so much like yours Uno

I also have a Steren MUL-600 Volt/Ohm/Frequency Meter (UT60E) which tells me the frequency is 4089 at 49% -- so again all in agreement -- more or less. Since all these items are not the greatest accuracy that is good enough...

All this just confirms that you should be getting what you believe.

That does not leave much to check except your circuit. Sooo.....

Maybe whatever is in that thing thinks your 5V is too low, or your 5V supply does not supply enough current -- which drags down the voltage and maybe whatever is in the Black Box (Gray?) is simply not getting enough juice.

So Like I said to someone else in another thread... What else have you got in the way of test equipment? Voltmeter could check your Supply (Vcc or Vs depending on jargon). An Oscilloscope is best for this of course.

I believe that anyone tackling this sort of stuff really needs a decent volt meter with a Frequency counter option -- or you can end up chasing your tail too many times.

I am not sure what else I could do to help. I am thinking of visiting Spain, but that's a few months away yet.  :smiley-roll:


(I did check the other script -- it goes pretty fast but you can see some ones and zeroes fly by -- I was pretty surprised... Still the Pulse script is the best one for this -- I think ...)

Probably though  -- if I were counting those pulses I would probably attach the routine to the Software Interrupts to do the count.
http://arduino.cc/en/Reference/AttachInterrupt

Then just build a counter to do what you want to do...

Just don't bother trying that till you can get your pulse routines working.


felipepac

WillR,

Thank you very much for your reply! Now I don't have access to all this equipment, but, tomorrow I'm going to a laboratory and I believe I can test it with an oscillator and get some further information.

I'll tell you what I got.

Thank you very much again!

Felipe

Go Up