A lot of flowsensors

Hi all,

I'm a beginner with Arduino but i want to use it for a project at work.
I like to measure water flow with an arduino but i want to measure about 90 different flows.
So i will be measuring 90 different flows on the most simple way.
I've read about a piece of code that can activate internal pull up resistors of the arduino, i hope this would make it possible not to use separate resistor and make connecting them to the arduino more easy. My questions are:

  • is this right? about the pull-ups?
  • i'm thinking of using a arduino mega or multiple but how much????
  • also thinking of a shield to make connecting more easy, are there any????

Hope someone can help me,

greetz Bert (from Holland)

  • is this right? about the pull-ups?

Yes.

i'm thinking of using a arduino mega or multiple but how much????

Not sure what you mean, but for 90 sensors you are going to need a few port expander to accommodate them.
90 of anything is not something that a beginner should undertake.
Learn a bit first and only then attempt to do one sensor. These sensors will cost quite a lot especially as you want 90 of them.

i'm first trying one sensor, but eventually will be using up to 90 of them.
I'm thinking of 4 mega or so, because of cable managment at my works installation.

Most beginners think of using multiple processors but this is not the way to do it at all.
How do you want to store the results?
You need to use port expanders.

If the outputs on the flowsensor is a PWM signal (count pulses per second) AND you can do with measuring a single one at a time, make a network of CD4051 multiplexer chips, then you can read them all.

// Per.

i'm going to measure at 4 different locations so i tought of using 4 arduinos. The signal is then sent on Profibus to a Simatic PLC.
The arduino is only used for sending the data over the network. Due to cable managment i need 4 duinos.
The flowsensors are hall sensor based.

If I understand things correctly, there are grounds for doubt about all of the above, but you need to properly clarify your intentions.

I think the real problem is all to do with what the sensor is actually sensing, what sort of information is passed, and how the Arduino handles that.

IF all you are sensing is the presence of flowing water, i.e. the tap is on, your hall effect sensor is just a switch and you merely need to poll 90 of them in a loop to see which are on. That can't be too hard - just a lot of wiring.

BUT IF you are measuring the actual flow of the water, rather than its mere presence, AND Arduino is doing the counting, your hall effect devices will be be sending constant pulses to Arduino, and the standard way of doing this is by using interrupts. I believe the Mega has six interrupts and therefore can handle six hall effect turbines, I don't think the port expanders Grumpy is on about will fix the problem, and you will need fifteen Megas.

There may be some economic middle ground, determined by interrupts/dollar, wiring costs, and your geography.

the flow meters are kind of like this one except bigger:

so output is a pulsing signal and connected at digital pin 2. So i tought a Mega has 54 dig. pins. but since i will be using 4 megas i only need 90/4 = 23 digital input pins. Correct me if i'm wrong.

The point about port expanders it that they do handle interrupt on a pin change with an interrupt change registers and open collector interrupt outputs.

What sort of output pulse rate are you expecting? I am sure it is not very fast and there will be no need to use interrupts.

i think i'm going to order one mega and one flowsensor, and then do a little bit trial and error :smiley:
then thinking a bit further about going big. Thanks for the help.

delchrys:
the flow meters are kind of like this one except bigger:
Tutorial: Reading Water Flow rate with Water Flow Sensor - Grove - Seeed Forum

That's the sort I use. Mine are 3/4 BSP. They work the same way.
You might find this useful.

I find reading the rate is pretty useless but the flow quantity is very accurate.

so output is a pulsing signal and connected at digital pin 2. So i tought a Mega has 54 dig. pins. but since i will be using 4 megas i only need 90/4 = 23 digital input pins. Correct me if i'm wrong.

I believe only six pins can be used for interrupt on a Mega, hence my previous.

Grumpy_Mike:
The point about port expanders it that they do handle interrupt on a pin change with an interrupt change registers and open collector interrupt outputs.

What sort of output pulse rate are you expecting? I am sure it is not very fast and there will be no need to use interrupts.

But port expanders are pretty slow, aren't they? Don't most of them use I2C?

If the pulses are coming slowly enough, and the OP's planning on using 4 Megas, wouldn't digitalRead() and some edge detection be good enough?

I suppose it all depends on the expected pulse rate.

Also of interest is how all of the Megas are going to be hooked together. Is there going to be a 5th Arduino coordinating these devices, or are they all going to be read individually by a computer or something?

my first impression of installing 90 flow sensors with 4 mega:

  1. all the mega reports the results to a "Commander" such as a computer or another arduino. with the results and address itself and sensor address;
  2. as the you do not need to "monitor the flow", that't to say, you can check each flow sensor one-by-one, you do not need use interruput to monitor the PWM, the normal IO would be OK, that to say, check each port (connect the flow sensor) with some duration such as 30s, and calculate the frequency.

So I believe the projects is OK, without multiplexer. as my own experence on using the flow sensor:G1/2" Water Flow Sensor, it works perfectly.

But port expanders are pretty slow, aren't they? Don't most of them use I2C?

No and no.
Most of the ones I use are SPI.