Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

What counter method to use for measurements on combustion engine

Hello,

Here is my dilemma. I want to measure the rpm of crank/cam shaft and thus I need to determine which of the three methods to use to get accuracy +-5rpm and couple of readings during one revolution of the shaft.

The hardware: NI PCI 6120-two counters
IRC 360-3600 pulses

Lets say I want to measure the range of rpm of the crankshaft from 100rpm(1.7Hz) to 10000rpm(166.7Hz). If I use the IRC with 720pulses I get the frequency range I will be measuring 1200Hz-120kHz assuming the IRC is on the crankshaft.

So my question is which of the methods to use? I did some calculations to determine that
1) 1 counter - the calculated rpm if the real rpm was 6000 would be between 5973-6017 which is not good enough

2) 2 counters, high freq - I would have to be using the frequency of the gate around 1Hz to get desired accuracy at 100rpm which is not suitable since I also want to have more readings through one revolution - do I understand it right? That would mean for example at 6000rpm I would have to wait 100revolutions to get one rpm reading, right?

3) seems as the right choice but still the acuracy is not good enough. If I use the divider of 10 it gives me 72readings per one revolution if the IRC is set to 720 pulse. If I measure at 6000rpm the diversion is then +-3rpm. But with 10000rpm and 3600pulses per revolution of the irc the diversion is already +-40

What method is used for this kind of measurement? How to improve  accuracy?

Thanks
Message Edited by ceties on 07-09-2009 03:12 PM
LV 2011, Win7
0 Kudos
Message 1 of 5
(4,556 Views)

Hello Ceties,

 

Rewieving the document you've attached, I made the following calculations:

 

Method I:

 

  • PCI-6120 Base Clockfor counters = 20 Mhz, signaled by 'fk'
  • Your maximum frequency to measure = 120 kHz dedicated to 'fx'  (In Method I the higher the frequency to measure the bigger the failure, that's why I'm calculating with max freq.)


Based on the equations: http://zone.ni.com/devzone/cda/tut/p/id/3619

 

The card will measure 166,67 ticks between two rising/falling edges. We won't know whether it will decide 166 or 167 as a result.

 

In case of 166 the result will be  20000000/166 = 120481,92 Hz which is 0,4% failure

In case of 167 the result will be  20000000/167 = 119760,48 Hz which is 0,2% failure

 

If you don't consider it accurate enough, I would rather choose Method III, if I were you, beacuse Method II is for thoose who measure around 5 MHz with the same base clock.

 

I hope it answers your question!

 

Best Regards,

Matyas

Message 2 of 5
(4,541 Views)
Hi Matyas, 

And thanks a lot. I got same results. The 0.4% is difference 40rpm at 10.0000rpm. 
But if I switch to 3600 pulses I get the error at 600kHz
582524.27     3%
618556.70     4%

With the third method and 3600 pulses
598802.4      0.2%
602409.6      0.4%

The other thing is the amount of the readings during one revolution. With the first method I will get as many readings as I have pulses. With the third method the amount of pulses/devider - do I understand it right?

Thanks a lot again that you spent some time over it!!!
LV 2011, Win7
0 Kudos
Message 3 of 5
(4,535 Views)

Hi Ceties,

 

:))

 

Yes, if you want to measure 600 kHz signal, the error will increase. I thought you were intend to measure upto 120 kHz.

 

In Method III, we do the following:

We have a known time period (1 ms), we have a frequency to measure (100 kHz), we will know how many pulses are going to be in that period ([100*e3]*[1*e-3]=100). First, we would like to divide this frequency with the first counter: we generate another known pulse train for 1 ms period with i.e. 500 pulses. In this case the rate will be 100/500 = 1/5.

Know, we are able to measure a lower frequency signal (100 kHz*1/5 = 20 kHz) with Method I. Which results a much more accurate measurement. That is the theory behind Method III.

Pulses per revolution to read will remain the same in each case: (frequency to measur)/(basis clock); in different methods we are trying to increase accuracy with measuring either a longer period (Method II) or diveded frequency (Method III).

 

I hope it will help moving forward with your project!

 

Regards,

Matyas

0 Kudos
Message 4 of 5
(4,512 Views)
Hi Matyas and thanks again

I am not sure if I made myself clear in the previous post. I decided to stick with the method 1 (M1)although the accuracy is still an issue with the high rpm. The reason for that is that I also need some decent amount of samples per revolution to see how the rpm fluctuates during one rev. With the method 3 (M3) if I have 720ppr (pulse per revolution) and I use the devisor of 10 to improve the acuracy I will get only 72 samples per one revolution since only every 10th TTL pulse will be used for the freq calculation (verified by measurement today).

And trhanks for asking I am moving forward with my project. But as usual the more time I spend over it the more obstacles I find 🙂
LV 2011, Win7
0 Kudos
Message 5 of 5
(4,499 Views)