Frequency Measurement / Signal Measurement

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

cross mob
Akhileswar_B
Level 1
Level 1
First question asked Welcome!

Issue :: Precision of the frequency measured is affected at higher rates of input(example: 2KHz)

I am using a input tick frequency of 62500 in my ICU config. I can use higher rate of tick freq. but in that case I will not be able to measure lower frequency, below are more details with tick frequency info.

62500 - I can measure from 1Hz 

12500 - I can only measure from 2Hz

250000 - I can only measure from 4Hz.

I want to improve my accuracy at higher frequency rates with optimal tick frequency where I will be able to measure 1Hz as well.

Please suggest regarding the same.

Thankyou

0 Likes
1 Solution
JJack
Level 5
Level 5
Associated Partner - Distributor Rutronik
5 questions asked 25 likes received 100 sign-ins

Hi Akhileswar_B,

from what you write I am making an educated guess:

  • You are actually measuring the period duration of a signal and calculating the frequency from that
  • You are using a counter/timer with 16 bit. This fits to ~65536 ticks are 1s (1 Hz) and so on

My proposal for you is to switch to a 32-bit timer so you can measure longer periods without timer overrun and have a higher tick freq.

Traveo2 has both 16 and 32 bit TCPWM. To find out the timers with 32-bit resolution please check the datasheet, chapter Peripheral I/O-map. Here is an example:

Ralf_0-1641369187920.png

Best regards

Ralf

View solution in original post

2 Replies