Pages: [1]   Go Down
Author Topic: A lot of flowsensors  (Read 464 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
- is this right? about the pull-ups?
Yes.

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Denmark
Offline Offline
God Member
*****
Karma: 15
Posts: 754
Please don't send questions as PM!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2302
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the flow meters are kind of like this one except bigger:
http://www.seeedstudio.com/forum/viewtopic.php?f=10&t=989&sid=2b8201a9ec5a43b42ca6989e86b7cdde

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2302
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


That's the sort I use. Mine are 3/4 BSP. They work the same way.
You might find this useful.
http://www.freetronics.com/pages/jaycar-water-flow-gauge
I find reading the rate is pretty useless but the flow quantity is very accurate.

Quote
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.

Logged

Offline Offline
God Member
*****
Karma: 15
Posts: 508
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

China
Offline Offline
Jr. Member
**
Karma: 2
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:http://www.elecrow.com/g12-water-flow-sensor-p-790.html, it works perfectly.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Pages: [1]   Go Up
Jump to: