I am designing an application for an embedded computer (PC/104) and I need to attach a FLOW switch w/ Pulse. It basical generates pulse output proportional to the rate of flow. One example is
formatting link
..
I have a Digital I/O board connected to my computer via RS232 and I can read other types of inputs such as Start/stop switches, etc..
My question is, since the flow switch generates pulses so quick, is there any type of circuit that I can use to read this pulses other than my I/O board? The reason I am asking is because I am afraid that becase these pulses can happen so quick that I will miss some reading them with this I/O board.
Thanks in advance,
Miguel
Didn't find your answer? Ask the community — no account required.
M
martin griffith
Try posting to comp.arch.embedded, include make and model etc,pretty good bunch of people, but look for "external interrupt" in your documents. Dont really know much about PC104
martin
S
Sjouke Burry
Try to find a quadrature counter board,it gives you a running total for the flow. Most of those come with 4 counters,and can read most incremental up/down (digital) potmeters.
F
Frank Bemelman
"TechGladiator" schreef in bericht news: snipped-for-privacy@g10g2000cwb.googlegroups.com...
225 Hz max, according to that page. That is not high.
Is that I/O board connected directly to your PC/104 computer, and do you have a PC connected to that? The program running on the PC/104 should be able to poll the inputs fast enough for an accurate count of
225 Hz.
OTH, if your (dumb) I/O board is connected via RS232 and the program runs on the other side of the RS232 link, 225 Hz is indeed a bit too much.
In that case you can use an 8 or 16 bit counter. The counter is clocked by the flow meter. Then you can read the counter, at a slower pace. You will suffer a delay between the measured and actual result; if that is a problem you have to get rid of that RS232 connection.
Thanks, Frank.
(remove \'q\' and \'.invalid\' when replying by email)
T
TechGladiator
The I/O board is connected to RS232 port in my PC/104 which is really a full blown computer running my application). Excuse me if I sound dumb but I can read the serial port ever 20-25ms, how do I relate that to Hz?
I think this is possibly the best way because just in case there is a delay for some reason within the OS (since it's not a RTOS) then I still will be able to read the counter. Now my question is, do you know where I could find these counters?
Thanks Miguel
P
petrus bitbyter
"TechGladiator" schreef in bericht news: snipped-for-privacy@g10g2000cwb.googlegroups.com...
Miguel,
Don't know the properties of your I/O board, but if it is meant to read the status of a binary input you can't do accurate time measurements with it. That is, not using a normal I/O pin. A possibillity to circumvent the restrictions for the normal I/O is using an input pin of the serial interface directly. So CTS, DCD or DSR. You'll need a MAX232 or similar to convert the voltage levels, but the rest is done in software. You need to set up the UART to generate an interrupt on an edge of the input pin you use and measure the time between to interrupts. Alternatively you can count the pulses in a certain amount of time.
Of course you can use hardware as wel. In the old days you'd build a counter/timer using TTL logic circuits and a UART to transfer the measured value to the PC. These days, a microcontroller is the way to go. If you want a serial interface, you'll still need a MAX232, but if you have a free parallel printerport you can do easier in EPP-mode.
petrus bitbyter
T
TechGladiator
Petrus,
Thank you for your advice. I think that I am going to have my designer guy(EE or whatever he is) build the counter into the Input board as this seems to be the best approach. Currently we are in the process of having this board designed for us but since I am a software guy and not hardware I want to make sure that I got different opinions and try to figure out which one will work out the best.
Thank again Miguel
C
Chris
Hi, Miguel. If you use a toggle flip-flop to get a divide-by-2 counter, each pulse will result in a change of logic state, which will be much easier to capture than a brief pulse.
If your latency is such that you're sure you won't miss noting the change during the time between pulses, this should work. Any faster, and you'll need a counter as described.
Remember that you're interested in rate, rather than exact positioning. If you were to use a divide-by-16 counter and just monitor the MSB, you'll still get a good idea of how fast the flowmeter is spinning.
Make sure you also use some signal conditioning to prevent multiple toggles or counts in the presence of electrical noise, for either this toggle FF or a counter.
Good luck Chris
F
Frank Bemelman
"TechGladiator" schreef in bericht news: snipped-for-privacy@j33g2000cwa.googlegroups.com...
can
With 25mS interval, you can capture upto 20Hz. Fmax = (1/(0.025+0.025)).
Missing a pulse from a flow meter is not desireable, but it is often not a big deal either, if it doesn't happen too often of course. These kind of flow meters are pretty inaccurate, 10% error is quite usual.
The binary outputs of the counter are connected to the binary inputs. Depending on how your board reads the inputs, there are some things you should be aware of.
Suppose you use an 8 bit counter, connected to 8 digital inputs. You need to read all the inputs at once, at a moment the outputs are all stable. It requires a counter and a latch and... You also need a filter to remove possible glitches from the flow meter signal.
My advice is to buy a dedicated counter board, one that sits directly on top of your PC104, for example:
formatting link
In fact, if you use a board that connects to the PC104 directly, you can use a normal I/O board to count your flow meter pulses, because in that case you can poll it much faster than
20ms.
I could shout some partnumbers to build your own counter, but since you need to ask for partnumbers there is very little chance you would be able make a reliable circuit.
Thanks, Frank.
(remove \'q\' and \'.invalid\' when replying by email)
F
Fred Bloggs
They have the analog output version- then he could just use a stock A/D on the I/O board; or if he's stuck with the pulse output, there are such things as F->V converters ;_)- input F range is only 1:15, he can signal condition with that and then go into stock A/D. This avoids all that synchronization and latching nonsense. What I want to know about is that
20oF water.
F
Frank Bemelman
"Fred Bloggs" schreef in bericht news: snipped-for-privacy@nospam.com...
you
I don't know if he wants to measure flow and/or needs a totalizer. Totalizing by counting pulses is easy, but deriving a total from a converted F/V will cost him another 5-10% accuracy if not more. It seems he may have problems ready an A/D converter at steady and predictable intervals, with his RS232, his OS not being realtime, and whatever other problems he may have to deal with.
Typically comes in ice cubes ;) But you could pump 20oF oil through it also, slowly.
Thanks, Frank.
(remove \'q\' and \'.invalid\' when replying by email)
F
Fred Bloggs
Not what Joerg says- claims 0.1% accuracy with cheap parts:-)
"That's what I'm saying." The F->V provides precise and continuous control of the integration interval, whereas the totalizer does not.
T
TechGladiator
Actually what I am trying to do is measure the speed of a conveyor powered by a hydrailic motor. Since conveyors have variable speed which is controlled by the flow of oil throught the lines I need the pulses from the switch in my program as a reference so I can perform certain functions with the output board. For me it's more important that i read every pulse even tho it may be like 20-100ms delayed than I miss a pulse. On average probably only about 4-8 pulses per second will be generated by this flow switch so for the most part I will have no problem reading from the program with a counter circuit, but I always run the possibility of missing pulses without a counter.
--Miguel
M
Michael A. Terrell
PC104 is an industrial version of the old EISA buss but the boards stack instead of using slots on a motherboard.
formatting link
made the boards that I worked with.
Service to my country? Been there, Done that, and I\'ve got my DD214 to
prove it.
Member of DAV #85.
Michael A. Terrell
Central Florida
S
Stanislaw Flatto
Now you are talking! You have the shaft of the motor which IS the reading directly related to speed of conveyor. Any toothed wheel and magnetic sensor will give you the needed result. Flowmeters have a nasty habit of beying influenced by the piping configuration(s) and can give errors from here to eternity depending on the hydraulic expertise (read learning from mistakes) of the constructor.
HTH
Stanislaw Slack user from Ulladulla.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.