Pulse counter - paid project

Hi,
Anyone interested in putting together this system for me - I have the board but haven't yet learned to use it... and I need the application written - I'd be interested if anyone wants to quote...

I need to count electronic pulses from an in-line flow sensor (it outputs 4600 pulses per litre of flow). I want to use my Arduino Mega to count the pulses, take a time average (say over 1 second) and output a voltage (0 to 5V) proportional to the time average (and hence to the average flow rate). I have a device that will accept this output voltage from the Mega and do all the data logging etc - so I only need the board to provide a raw voltage out.

The flow sensor is this one: http://docs-asia.electrocomponents.com/webdocs/001b/0900766b8001bb47.pdf. (Its output voltage range etc is given in the specification document.)

I could simply plug the flow meter output into my existing logging device (a PICO TC-08 with an adapter to accept 0 to 5V) but it is also measuring various other parameters and I only want to measure these every one second or so - I don't want to have to log millions of data readings just to get my flow rate - I just want to have a voltage available for me to log at any instant that is proportional to flow rate.

As an example
Step 1: The arduino board counts 95 pulses in 1 second (Ps=95).
Step 2: It outputs a voltage proportional to the flow rate per second. This is a simple linear relationship: Vout=(5*Ps)/(498.3333)
Step 3: It countinues to output this voltage (in this case 953 mV) for one second while counting pulses for the next second
Step 4: Return to Step 1

So any time I sample a reading from the Arduino board it is reporting a voltage proportional to the flow rate for the previous one-second.

Any queries let me know.
Thanks
Robert

You have a cable that plugs into that 5 pin connector?
I could see terminating that on a mega shield, couple of resisters and a capacitor for PWM smoothing.
How much load will you out on the DC level? Do you need a buffered output?

Hi - thanks for the response. At this stage I have the mega board, an ardumoto shield and some wires... no cables, but I could probably get hold of something. I saw it as just reading every rising edge directly into the board - i.e. I don't care about the pulse width. But maybe the PWM smoothing is necessary anyway?

My output is going to one of these (TC-08 Thermocouple data logger | Pico Technology) with the Single Channel Terminal Board (listed at the botom of that page). It has a 2MOhm input impedance - the link will give you all the specs.

Regarding the output - ideally it would just be a continuous analogue output on a pair of wires updating once per second - maintaining the caculated voltage for a full second. - that way it connects directly to my Pico. The Pico is designed to read thermocouples so it doesn't poll or anything - just sees the voltage difference between two wires. I can choose how frequently to read this, but if the Arduino can deliver the same type of output, then I can just pretend it's another thermocouple (the Single Channel Terminal Board allows me to put 0-5v into the Pico, which is usually limited to a 140 mV range to accept thermocouple inputs).

Not sure if this covers your queries - let me know.
Thanks - Robert

Mostly.
Is the Arduino 8-bit output resolution enough?
Output level from 1/255 of 5V to 255/255 of 5V?
Or you need 12, or 16, or higher resolution? Such as:

The ardumoto I don't see as useful. Would you like it used to hold 7-8 screw terminals? (5 from the flow meter, 2 to your sensor).
And low pass filter to smooth the PWM output if 256 levels is enough. Would prefer to start with uncluttered shield if go with external DAC.

How often it needs to adapt the output voltage?
1/second
10/second
100/second

What is the minimum time between two pulses of the in-line flow sensor (it outputs 4600 pulses per litre of flow)?
Or formulated otherwise: what is the maximum flow in litres per minute.?

How long should this application run unattended?

Thanks for the replies... update is about 1 per second. Flow rate is about 0.5 L/min (tiny).

However I'm going to put this on hold for now as my engineering school has come to the party and offered to buy me a data acqusition card that I think will do the job - not that it wouldn't be fun to use the Mega, but this is the same brand as my thermocouple rig and shares the software ... so I can I can get all my data in one file, date stamped together.
I'll be back here if the DAQ doesn't work out!

Please let us also know if the DAQ works out.
I am interested in the difference of pricetag, how much does that data acqusition card costs (approx)?

sensor is identical
Arduino + Wallward + LadyAda datalogcard (SD + DTC) = $60

0.5L minute = 2300 pulse per minute = less than 50 per second piece of cake for Arduino.

You could also attach whichever line is coming from the pulses to an interrupt pin and just count there. It'll be much faster than polling it if that's what you're talking about.

No need for a Mega for that either, a regular Arduino could do it just fine too.

robtillaart:
Please let us also know if the DAQ works out.
I am interested in the difference of pricetag, how much does that data acqusition card costs (approx)?

sensor is identical
Arduino + Wallward + LadyAda datalogcard (SD + DTC) = $60

0.5L minute = 2300 pulse per minute = less than 50 per second piece of cake for Arduino.

Hi Robtillart,
The DAQ worked out really well. It's a Pico DrDAQ and does exactly what I need... essentially I connect the flow meter to it (DAQ gives 5V out and receives 5V digital in) and the bundled software logs the pulse per second rate. Couple of resistors soldered in to manage the voltage requirements of the sensor, but very straightforward connection. (Slight prolem with one of the digital ports not recognising pulse counts - I think maybe a fault in my DAQ unit - still testing).

The DrDAQ cost about $180 in Australia (about the same in USD) - which is expensive although the price comparison is not really valid as it was purchased because it does a whole lot of other things built in ... on-board temperature sensor, optical sensor, sound sensor, signal generation, a range of external sensors available (not included in the price), plus digital and analogue ports for easy hook up of external or home-made sensors. So it wasn't really bought just to perform the pulse counts.

Thanks everyone for the help and comments...