working with flow sensors: 2-wire reed and 3-wire Hall

I'm getting good signal and flow data with the Hall effect flow sensors attached to my outdoor irrigation valves, the sensors are the 3-wire (standard 5v powered / one signal wire to digital I/O pin) on Arduino, so all's fine in that world.

Flow sensors on the commercial and consumer irrigation market are 2-wire output, don't know the economics of using 2-wire instead of cheaper 3-wire Hall flow senors, you're running 2-wires from sensor to an adjacent controller. Outdoor satellite controllers have 120vac pulled into the (metal or plastic) outdoor pedestal, stepping down transformer to supply 24VAC for solenoids, so other than running 2 wires (instead of 3) directly to pulse decoders and on to pulse transmitter for relay into CCUs (cluster control units -- Rainbird hardware) and then onto central PC server, I don't know how that would be any cheaper or more efficient than putting an equivalent Hall sensor on the pipe.

So the only thing I've found on 2-wire reed flow sensors, based on my assumption that is standard for 2-wire flow meters/sensors, you would use a 1K or 10K pull down resistor between black wire (typical), then continue the line into the Arduino I/O signal input pin( 2-13 with Uno). The other (red) wire from pulse sensor would have the 5v line. But pull down resistors can be used on red wire depending on normal-open or normal-close types. Could I use it this way to get a signal into the Arduino board?

2nd question: my pulse-counter/tester works well with seeing output on 2-wire flow sensors and I haven't used it with Hall effect signal wires, so how would you wire up this tester to count raw pulses from the Hall sensors?

Arduino is just counting pulses and I don’t think there is a fundamental difference between the two.

Could I use it this way to get a signal into the Arduino board?

If you have a two wire reed switch sensor that is correct. The reed switches have contact bounce which the hall sensors do not, and some sort of debounce might be required. The hall sensors are definitely easier to work with.

2nd question: my pulse-counter/tester works well with seeing output on 2-wire flow sensors and I haven’t used it with Hall effect signal wires, so how would you wire up this tester to count raw pulses from the Hall sensors?

Can you provide more information about the “pulse-counter/tester”. It does not sound like this is the Arduino used with the hall sensor flow meters.

Not all two wire flow sensors are reed switches.

Actually I just bought two different pulse counters - an Omron H7EC-BLM unit with internal lithium battery. The other is some kind of generic digital counter/panel meter which needs 5v-28v power. I’m using 9vdc on that one. Product model is GDD7939CT-P24V-BU. They both work great for verify operation of 2-wire pulse-output on the flow meters I’ve installed.

I’m scared to hook the counter up to hall-effect flow sensors right now since I recently toasted a brand new Arduino Uno with one of those notorious DF Robot lcd shields, didn’t read the caveats on that display until too late.

I used Aliexpress to buy the counters, you won’t pay much but have to be patient for deliver into US.

Here are front shots of the testers, and a recent water submeter I use for installs:

http://tinyurl.com/psjtn6p
http://tinyurl.com/nmh742g
http://tinyurl.com/oaxkeym

You can download this link to view: flow sensor, counter and Arduino Uno wired together to produce pulse output:

http://tinyurl.com/flow-sensor-and-counter

If I read this correctly, you are powering the Arduino off 4.5v at the barrel jack. This cannot possibly be a good idea. I assume the purpose of the Arduino is to convert pulses to litres, but it is apparently redundant at the moment. I think you should provide some decent power before you go further.

Thanks for the tip. I'm planning to run a 9vdc transistor battery for power supply as Arduino Uno is built to run on 5vdc.

The main purpose of the Arduino is to be able to use my Omron pulse counter as a simple tester in the field to verify pulse output on 3-wire hall effect flow sensors once flow sensor is installed on water pipe mainline. A little easier than toting in a laptop and running software for a serial output in the Arduino IDE.

You can't hook up the Omron directly to a 3-wire flow sensor, or at least no one has clued me in on just how exactly to do it without using the Arduino board. The differences in transducer operation of 2-wire vrs 3-wire is way over my head, that's for electrical engineers to explain on a level I can understand. So I'm still waiting on that one.

Really the next stage for me is more software code to work with existing hardware, ultimately to move the pulse output into a cloud or remote server. For me, converting pulses to liters or gallons per minute is not a big deal and can take place anywhere in software. The main thing is to get the pulses to show up in realtime on the cloud.

I want to get away from using the more-expensive Monnit pulse counter/transmitters with their gateway device, that's plug 'n play but even that can be problematic, too. For example, I suspect on one occasion my wireless device connected to a pulse-output water meter, but it was too close to some large AC units installed by a building such that the air conditioning's electrical noise was possibly blocking or interfering with signal transmissions to the gateway and onto cloud. Really couldn't be sure, just an educated guess. Software or hardware issue? Most likely the latter.

Tart Sensors (a Monnit spinoff) is offering same quality and lower cost devices from same company, targeting the IoT maker community, but so far to my dismay no low cost pulse counters are going to be on their product list at this time. Just the usual voltage sensors, temp sensors, ect.

I'll keep documenting any progress so that might help anyone going down this road.

You can't hook up the Omron directly to a 3-wire flow sensor, or at least no one has clued me in on just how exactly to do it without using the Arduino board.

I am looking at this data sheet for the Omron 7EC-BLM
http://pdf1.alldatasheet.com/datasheet-pdf/view/172828/OMRON/H7EC-BLM.html

Figure2 on page 5 ("No Voltage Input Type") shows how to hook it to the open collector output of the hall sensor. It looks to me that the yellow wire in your image which is running from the signal output of the flowmeter through the totalizer and to the arduino just needs to be connected back to the ground wire off the hall sensor flow meter and not to the arduino for direct reading.

Thanks for the link to Omron H7EC wiring data sheet.

Yes, the signal from hall sensor is going into digital I/O of Arduino via the two terminals 1 & 2 on back of Omron.

Omron input #1 is on top in photo.

Note: all four screw terminals are clearly stamped with the "1,2,3,4" numbers on the black plastic on back of Omron counter) so there is no way to get that wrong.

Again, photo shows (top) terminal #1 of Omron is going directly to flow sensor signal wire. Input #2 on Omron (the bottom terminal in photo) is going directly to digital I/O of Arduino board.

As I need to keep DC power to the hall-effect flow sensor, does this mean there will be a second wire piggy-backed to the neg/ground of flow sensor? That would require that I remove wire currently going to Arduino I/O connection and connect it to 5v ground with the black wire that's plugged into Arduino 5vdc connections as it is powering hall effect flow sensor.

I can easily try this but I just want to make sure it's exactly what you're suggesting here.

ngant17:
Thanks for the tip. I'm planning to run a 9vdc transistor battery for power supply as Arduino Uno is built to run on 5vdc.

Don't even think about it. Arduino is built to run at with a certain amount of power, which is delivered at 5v. You have given no consideration to the power, and a 9v transistor battery is more or less devoid of it. Even if you have Arduino switched off most of the time, you are sending a boy on a man's job and will surely regret it. If you must use 9v battery, make it 6xAA, but there is a whole black art out there for portable Arduino, and it doesn't start with a Uno

You can't hook up the Omron directly to a 3-wire flow sensor, or at least no one has clued me in on just how exactly to do it without using the Arduino board. The differences in transducer operation of 2-wire vrs 3-wire is way over my head, that's for electrical engineers to explain on a level I can understand. So I'm still waiting on that one.

You surprise me. A short conversation with the abovementioned electrical engineers might be in order sooner rather than later. From what I see, all Arduino is doing is provide power to the hall effect.

Again, photo shows (top) terminal #1 of Omron is going directly to flow sensor signal wire. Input #2 on Omron (the bottom terminal in photo) is going directly to digital I/O of Arduino board.

As I need to keep DC power to the hall-effect flow sensor, does this mean there will be a second wire piggy-backed to the neg/ground of flow sensor? That would require that I remove wire currently going to Arduino I/O connection and connect it to 5v ground with the black wire that's plugged into Arduino 5vdc connections as it is powering hall effect flow sensor.

That sounds correct. The wire going from terminal 2 to the digital I/O of the Arduino needs to go to the common ground, and not the I/O.

From what I see, all Arduino is doing is provide power to the hall effect.

Is this correct? With the hall type flow sensors, is there any code running on the Arduino to count pulses, or is it just providing power to the hall sensor?

Technically the 5vdc from Arduino board is a convenience for powering the flow sensor, I could just use pos/neg wires from flow sensor into a separate dc battery.

As for the signal wire circuit, it's an unknown to me, not sure what the function of Arduino digital I/O connection does in the circuit, other from trial and error which worked to get the pulse output on Omron counter's little LCD display. I guess it's counting pulses based on electron or current flow going into Arduino I/O pin, i.e., like you hook up a VOM to read amps or current in electrical circuit. Digital pulses are hi/low voltages with active current going thru the wire. Does that sound correct from electronics theory?

For the pulse output on Omron counter, there is NO code, Arduino is getting power to the board and that's it. Omron counter has its own internal Lithium battery.

Nick_Pyner:
Don't even think about it. Arduino is built to run at with a certain amount of power, which is delivered at 5v. You have given no consideration to the power, and a 9v transistor battery is more or less devoid of it. Even if you have Arduino switched off most of the time, you are sending a boy on a man's job and will surely regret it. If you must use 9v battery, make it 6xAA, but there is a whole black art out there for portable Arduino, and it doesn't start with a Uno You surprise me. A short conversation with the abovementioned electrical engineers might be in order sooner rather than later. From what I see, all Arduino is doing is provide power to the hall effect.

B-Scada engineers and their IoT specialists clued me in a little about the technical aspects of flow meters/flow sensors.

From what I've learned:

a. Signals from flow sensors can be passive or active.

b. A pulse counter/transmitter such as sold by Monnit and associates like B-Scada, it is designed to accept passive signals because it supplies the needed signal voltage itself (with a standard 3vdc 2032-type coin-cell battery inside the pulse counter/transmitting unit). In this case this means, according to B-Scada, that you would only want open/close switching coming from the flow sensor.

c. OTOH some flow sensors produce the signal and signal voltage and those units might actually damage the electronics if used with a standard 2-wire Monnit wireless pulse counter/transmitter. If that is the case, they recommend an NPN open collector switch between sensor and flow meter. Some industrial models of flow meters have dual outputs to address that issue.

d. The Hz is important because this determines the flow rate. 40Hz may be sufficient in many cases. Monnit software will let you turn off Hz filter if necessary. They offer single channel and four channel types of wireless pulse counter/transmitters.

Now that being said, in the circuit I'm using with the hall-effect flow sensor, does it look like soldering in an NPN transistor will be the key to future success?

Now that being said, in the circuit I'm using with the hall-effect flow sensor, does it look like soldering in an NPN transistor will be the key to future success?

No the open collector npn output is part of the internal output circuitry of the hall sensor.

If you have no code on the Arduino, but it is powered, the default state of the digital I/O pins is as INPUT with an input impedance of approx 100 MegaOhms. I guess the omron doesn't really care what the ground path looks like.

If things are working as want, you don't need to make changes, but I would recommend trying

  1. don't use the Arduino at all, but take the lead going to the I/O and connect it to the hall sensor power ground
  2. If you use the Arduino, write some code, and and set the pin mode of the Arduino pin to OUTPUT and then digitalWrite the pin to LOW. This will make it a better sink to ground.

Thanks for the advice, it's working like a charm with the Arduino out of the loop. See pulse output below:

Pulse output with generic counter

I'm using the 9vdc powered counter in this demo. You should be able to see my piggy-backed ground wires that are connected as you mention in previous.

I can now plan to start coding with Arduino IDE with my aforementioned objective of putting the pulses into a cloud for an IoT project, especially keeping in mind your tip on digitalWrite an I/O pin to LOW. Thanks again!