Is it possible to connect a Hall Effect Flow Sensor output to a PLC?

In summary: Connect sensor IN to the DC power supply (+) terminal, sensor GND to the power supply return, and sensor OUT to the desired PLC card input terminal.
  • #1
kunalvanjare
80
2
Hello guys,

I am building a small prototype for a Coolant Dispensing System and need to measure the flow rate of water & chemical in the pipe in order to control the opening of valves downstream.

Since I am building a small pilot system, I can't really spend too much money and hence I intend to use those cheap Hall Effect Flow Sensors available online. Accuracy isn't important right now, but repeatability is!

So my question, how do I connect the Pulse Output of the Flow Sensor to the PLC?
 
Engineering news on Phys.org
  • #2
It depends on the output signal from the sensor and the compatibility of that signal with inputs available on the PLC.
 
  • #3
Negativ3 said:
It depends on the output signal from the sensor and the compatibility of that signal with inputs available on the PLC.

Thanks for the response. I have attached Technical Parameters of the Flow Sensors. Could you please tell me if these can be connected to a PLC? And if so, are there any particular cards you need to get along with your PLC for such connections? I have worked with a few popular PLCs such as Siemens S7 series, Mitsubishi FX series etc.
 

Attachments

  • 250Q1442301.pdf
    353.6 KB · Views: 577
  • Misuratore_di_flusso_per_liquidi_YF-G1_DN25.pdf
    241.7 KB · Views: 700
  • #4
So sensor output is pwm?
 
  • #5
Yes it is a pulsed output
 
  • #6
I would apply the PWM signal to analog input, via primitive RC filter.
 
  • #7
Negativ3 said:
I would apply the PWM signal to analog input, via primitive RC filter.

How about a relay with 5vdc coil? And an SMPS with output voltage of 5vdc?
 
  • #8
Draw a schematic for us?
 
  • #9
kunalvanjare said:
Hello guys,

I am building a small prototype for a Coolant Dispensing System and need to measure the flow rate of water & chemical in the pipe in order to control the opening of valves downstream.

Since I am building a small pilot system, I can't really spend too much money and hence I intend to use those cheap Hall Effect Flow Sensors available online. Accuracy isn't important right now, but repeatability is!

So my question, how do I connect the Pulse Output of the Flow Sensor to the PLC?

First, output isn't PWM, but is instead a nominal 50% duty cycle pulse with a rather wide tolerance range.

1. Select a PLC input card capable of reading the flow sensor.
Voltage:
Data sheet specifications are stated rather oddly, but 5V to 18V appears to be the nominal operating voltage range.

Frequency:
Again, the specs don't quite add up, but it seems pulse output frequency is 98 times the flow rate in LPM.
If true, at 6 LPM pulse frequency will be 588 Hz. The card must be able to read frequencies at least this high.

It has been a while, but I recall PLC input card specs are expressed in terms of minimum on time.

Pulse duty cycle is specified as 50%, +/-10%, but the drawing gives it as a range of 40% to 60%.

You'll want to make a spreadsheet for calculating expected pulse frequencies, and worst case pulse on times for the flow rate range. Cycle time is the reciprocal of frequency. If output frequency is indeed 588 Hz at maximum flow rate, then the total period is 1.70 milliseconds, and pulse on times may range from 0.68 ms (at 40% duty cycle), 0.85 ms (at nominal 50% duty cycle), to 1.02 ms (at 60% duty cycle).

1569891062890.png


basic parameters 1, the lowest rated working voltage DC3.5V-24V 2, the maximum operating current of 15 mA (DC 5V) 3, the working voltage range DC 5 ~ 18 V 4, load capacity =10 mA (DC 5V) skills requirement 1, the output pulse high> DC 4.5 V (input voltage DC 5 V) 2, the output pulse is low <DC 0.5 V (input voltage DC 5 V) 3, precision (Flow rate - pulse output) 0.3 ~ 6L / min ± 3% 4, the output pulse duty cycle of 50 ± 10% 5, the output rise time 0.04µS 6, the output fall time 0.18µS 7, flow - pulse characteristics proficiency test pulse frequency (Hz) = [98 * Q] ± 3% (proficiency testing) (Q is flow rate L / min)

A monkey in the wrench is the supplied flow to pulse reference table.
1569892196529.png


It doesn't show values at either the low or high end of the rated flow range (from 0.3 LPM to 2.0 LPM, and 5 LPM to 6 LPM), which makes me wonder whether the sensor has usable linearity in these ranges.

Stranger still, if pulse frequency is 98 * LPM, it holds true at 2 LPM, but pulse impact (frequency?) is shown going down from 2.1 to 2.7 LPM, and the value of 365 at 5 LPM is far lower than 98*5 (490).

I'm either misunderstanding something, or these specs don't make sense.

2. Power the flow sensor with an appropriate DC supply, which depends on sensor spec (5 to 18 V), and what the PLC input card you've selected.

3. Connect sensor IN to the DC power supply (+) terminal, sensor GND to the power supply return, and sensor OUT to the desired PLC card input terminal. If the DC supply is external to the PLC, then the supply DC common must be connected to the PLC input card DC common.

1569893426625.png


4. PLC programming
Carefully read the manuals for the PLC you intend to use. The basic idea is easy - count the number of pulses for a given time (per second, for instance), and scale it in engineering units (LPM, GPM; whatever is needed).

Keep in mind PLC scan time. If it takes the PLC 1 ms to read inputs, work the logic, and update the output table, and sensor pulse width is also on the order of 1 ms, then using a general purpose DC input module isn't going to work very well (or at all).

Some PLCs have a programming feature to refresh I/O tables whenever a particular input change state from lo to hi, but a better approach is to use a DC input card designed for high speed devices (encoders, etc). Details vary, but the gist of it is they do most of the heavy lifting (counting the pulse train, etc) so the PLC itself doesn't have to, and populate the output table with the count value (or perhaps a value scaled in engineering units).
 
  • #10
Asymptotic said:
First, output isn't PWM, but is instead a nominal 50% duty cycle pulse with a rather wide tolerance range.

1. Select a PLC input card capable of reading the flow sensor.
Voltage:
Data sheet specifications are stated rather oddly, but 5V to 18V appears to be the nominal operating voltage range.

Frequency:
Again, the specs don't quite add up, but it seems pulse output frequency is 98 times the flow rate in LPM.
If true, at 6 LPM pulse frequency will be 588 Hz. The card must be able to read frequencies at least this high.

It has been a while, but I recall PLC input card specs are expressed in terms of minimum on time.

Pulse duty cycle is specified as 50%, +/-10%, but the drawing gives it as a range of 40% to 60%.

You'll want to make a spreadsheet for calculating expected pulse frequencies, and worst case pulse on times for the flow rate range. Cycle time is the reciprocal of frequency. If output frequency is indeed 588 Hz at maximum flow rate, then the total period is 1.70 milliseconds, and pulse on times may range from 0.68 ms (at 40% duty cycle), 0.85 ms (at nominal 50% duty cycle), to 1.02 ms (at 60% duty cycle).

View attachment 250458

basic parameters 1, the lowest rated working voltage DC3.5V-24V 2, the maximum operating current of 15 mA (DC 5V) 3, the working voltage range DC 5 ~ 18 V 4, load capacity =10 mA (DC 5V) skills requirement 1, the output pulse high> DC 4.5 V (input voltage DC 5 V) 2, the output pulse is low <DC 0.5 V (input voltage DC 5 V) 3, precision (Flow rate - pulse output) 0.3 ~ 6L / min ± 3% 4, the output pulse duty cycle of 50 ± 10% 5, the output rise time 0.04µS 6, the output fall time 0.18µS 7, flow - pulse characteristics proficiency test pulse frequency (Hz) = [98 * Q] ± 3% (proficiency testing) (Q is flow rate L / min)

A monkey in the wrench is the supplied flow to pulse reference table.
View attachment 250462

It doesn't show values at either the low or high end of the rated flow range (from 0.3 LPM to 2.0 LPM, and 5 LPM to 6 LPM), which makes me wonder whether the sensor has usable linearity in these ranges.

Stranger still, if pulse frequency is 98 * LPM, it holds true at 2 LPM, but pulse impact (frequency?) is shown going down from 2.1 to 2.7 LPM, and the value of 365 at 5 LPM is far lower than 98*5 (490).

I'm either misunderstanding something, or these specs don't make sense.

2. Power the flow sensor with an appropriate DC supply, which depends on sensor spec (5 to 18 V), and what the PLC input card you've selected.

3. Connect sensor IN to the DC power supply (+) terminal, sensor GND to the power supply return, and sensor OUT to the desired PLC card input terminal. If the DC supply is external to the PLC, then the supply DC common must be connected to the PLC input card DC common.

View attachment 250463

4. PLC programming
Carefully read the manuals for the PLC you intend to use. The basic idea is easy - count the number of pulses for a given time (per second, for instance), and scale it in engineering units (LPM, GPM; whatever is needed).

Keep in mind PLC scan time. If it takes the PLC 1 ms to read inputs, work the logic, and update the output table, and sensor pulse width is also on the order of 1 ms, then using a general purpose DC input module isn't going to work very well (or at all).

Some PLCs have a programming feature to refresh I/O tables whenever a particular input change state from lo to hi, but a better approach is to use a DC input card designed for high speed devices (encoders, etc). Details vary, but the gist of it is they do most of the heavy lifting (counting the pulse train, etc) so the PLC itself doesn't have to, and populate the output table with the count value (or perhaps a value scaled in engineering units).

That's the problem, you know, since these are commercially available low-cost sensors (probably made in China), there is no authentic technical literature available other than what you find online.

I have been advised to use an Optocoupler with the sensor so as to scale the output from 5V to 24VDC and use a PLC with a high-speed counter card. Can someone verify this please?
 
  • #11
kunalvanjare said:
That's the problem, you know, since these are commercially available low-cost sensors (probably made in China), there is no authentic technical literature available other than what you find online.

I have been advised to use an Optocoupler with the sensor so as to scale the output from 5V to 24VDC and use a PLC with a high-speed counter card. Can someone verify this please?
Yes, it is possible to shift level from 5V to 24V with an optocoupler, but why bother if you don't need to?

It comes back to carefully reading the manuals of the PLC you intend to use. Don't know about the Siemens S7 line, but it appears even the low end Mitsubishi FX (model FX3S) has built-in high speed counters capable of 4 input points at 10 KHz each.
https://www.mitsubishielectric.com/fa/products/cnt/plc_fx/pmerit/contents/hc/index.html

Additionally, they offer a selection of high speed counter modules with built-in 5V signal power supplies.
https://us.mitsubishielectric.com/f...eries/high-speed-counting/high-speed-counting
 
  • Like
Likes kunalvanjare
  • #12
Asymptotic said:
Yes, it is possible to shift level from 5V to 24V with an optocoupler, but why bother if you don't need to?

It comes back to carefully reading the manuals of the PLC you intend to use. Don't know about the Siemens S7 line, but it appears even the low end Mitsubishi FX (model FX3S) has built-in high speed counters capable of 4 input points at 10 KHz each.
https://www.mitsubishielectric.com/fa/products/cnt/plc_fx/pmerit/contents/hc/index.html

Additionally, they offer a selection of high speed counter modules with built-in 5V signal power supplies.
https://us.mitsubishielectric.com/f...eries/high-speed-counting/high-speed-counting

Wonderful. Thanks for that.

Although, I'd like to point out that I am building an ultra-low cost pilot system to check whether the system works. if you remember, this is in continuation of my other thread about a coolant top-up system. So a low cost PLC would be preferable right now.

Once I get the mixing parameters nailed on, I will decide how to better automate the system.
 
  • #13
Check out Velocio PLC's. They have counter inputs that can be used to count the pulse outputs on this type of sensor. They are also super cheap.

I'm not hugely impressed with the programming software but it gets the job done.

BoB
 
  • Informative
Likes Asymptotic
  • #14
Just pick the PLC that you are most comfortable with and if the available inputs on the PLC are not fast enough to handle the frequency of the sensor output, then run the signal through a frequency divider. It looks like at least one of those sensors is using a TTL output so you could configure a 7490 as a divide-by-6 without any other components. The loss in resolution shouldn't be an issue in your system since you're getting feedback from the refractometers anyway.

(Note: I assume you are designing this for an in-house system and not as a product for mass sale, as the latter might require additional considerations re design/component costs.)
 

FAQ: Is it possible to connect a Hall Effect Flow Sensor output to a PLC?

1. Can a Hall Effect Flow Sensor be connected to a PLC?

Yes, it is possible to connect a Hall Effect Flow Sensor output to a PLC. In fact, many industrial applications use this type of connection for monitoring and controlling flow rates.

2. What is a Hall Effect Flow Sensor?

A Hall Effect Flow Sensor is a type of sensor that uses the Hall Effect principle to measure fluid flow. It works by detecting changes in magnetic fields caused by the movement of a fluid through a pipe or channel.

3. What is a PLC?

A PLC, or Programmable Logic Controller, is a type of industrial computer that is used to control and automate machinery and processes. It is commonly used in manufacturing, energy, and other industries.

4. How does a Hall Effect Flow Sensor output connect to a PLC?

The Hall Effect Flow Sensor output can be connected to a PLC through various methods, such as analog or digital inputs. The specific method will depend on the type of sensor and PLC being used, and may require additional components such as signal conditioners.

5. What are the benefits of connecting a Hall Effect Flow Sensor to a PLC?

Connecting a Hall Effect Flow Sensor to a PLC allows for real-time monitoring and control of fluid flow, which can improve efficiency and accuracy in industrial processes. It also allows for data collection and analysis, which can help with troubleshooting and optimization of systems.

Back
Top