Skip to main content
Associate III
March 1, 2024
Solved

Pulse sensor and input voltage

  • March 1, 2024
  • 2 replies
  • 1470 views

Good morning,
I am building a system with stm32 wl55jc1 to count water flow with a pulse flow meter.
So I created two internal clocks in stm32 one to create a time window and the other that counts each pulse received from the sensor. At the trigger of the first clock I check how many pulses the second clock counted and get the instantaneous flow rate.
I put an LED in parallel with the signal to visually see the pulses.

The problem is that the count the clock makes and the pulses I see do not match.
I would like to ask for some documentation on the input voltage and so that I can design my RC circuit as best I can (as I am convinced that the problem is electrical).

thanks for your time,

greetings

Roberto

 

This topic has been closed for replies.
Best answer by IngSerio

Hello,
I solved it by inserting a clock filter, now it is very accurate.
Thanks anyway for the support.

Roberto

2 replies

TDK
March 3, 2024

> The problem is that the count the clock makes and the pulses I see do not match.

What pulses do you see? What do you expect?

> I would like to ask for some documentation on the input voltage and so that I can design my RC circuit as best I can (as I am convinced that the problem is electrical).

The digital voltage thresholds are listed in the reference manual. Generally, the thresholds are around 0.3 * VDD and 0.7 * VDD.

"If you feel a post has answered your question, please click ""Accept as Solution""."
IngSerioAuthorBest answer
Associate III
March 4, 2024

Hello,
I solved it by inserting a clock filter, now it is very accurate.
Thanks anyway for the support.

Roberto