Jump to content
Sign in to follow this  
chuckwsh

Measuring Long Time Periods Up To One Hour

Recommended Posts

I am looking at a fluid flow meter issue, which can pulse in input from 0(stopped) to 30khz(full tilt). I put together a routine with tmr1 that will measure >3hz to 30khz pretty accurately...

 

under that frequency I am a bit lost. I am using RC0 on ( i know its an older pic) 16f877a. I'm reading the tmr1l and tmr1h registers and displaying on lcd the frequency, my Oscope says it works.

 

Essentially this is a metering pump controller. When the liquid is stopped thats fine

I dont run a pump. BUT If it pumps about one gallon in an hour, the meter very slowly transitions over the period of 60 minutes from low to high then back again so a 30 minute transition cycle. H to L or L to H.

 

I look at the the final value of the tmr1 and if its under 3hz go into a sub routine called just that. there I Want to monitor this long duration transition...

I got a little convoluted in that, but if I detect OVER 3hz then I am back to normal run mode..

 

thoughts? questions? (can I use tmr0 counter from the input of RC0? and count and total transitions ?)

 

Happy Holidays!

 

thanks, Chuck

Share this post


Link to post
Share on other sites

can I use tmr1 counter from the input of RC0? and count and total transitions ?
don't see why not , then display transitions / sec/pulses-per gallon (its tmr1)

or feed pulses into and interrupt pin (rb0/ int would be easy) and determine count per/sec . the pic will have no trouble with 30KHZ pulse rate

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...