Flow meter PWM input measurement @ 237Hz

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have an input device that measures flow rate using PWM output and I would like to use a GPIO line with "interrupt on change" together with a fast time to measure the input rate. Or perhaps use a fast timer and poll the status of the input line. The maximum frequency is 237 Hz (sample at 2ms) with duty cycle 50%+/- 10%.From reading other posts, this seems feasible, but I would like some assurances that I am on the right track. It seems like the timer may be a little slow at the max flow rate. Is there anything else I need to be aware of?

carney

0 Likes
1 Solution
Anonymous
Not applicable

Hello Henry,

One could set up both edge interrupts and then handle them, but that would mean all RF activity (advertising, scan, connection) and timers, and other interrupts have to be disabled completely or we will miss samples.

The developers would not recommend doing this – the chip is not intended for these kind of use cases

Thanks

JT

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

Hello Henry,

One could set up both edge interrupts and then handle them, but that would mean all RF activity (advertising, scan, connection) and timers, and other interrupts have to be disabled completely or we will miss samples.

The developers would not recommend doing this – the chip is not intended for these kind of use cases

Thanks

JT

0 Likes