Author Topic: Peak detector for frequency measurement in a noisy environment  (Read 2160 times)

0 Members and 1 Guest are viewing this topic.

Offline WarhawkTopic starter

  • Frequent Contributor
  • **
  • Posts: 819
  • Country: 00
    • Personal resume
Guys, I am experimenting with a noisy signal and trying to gather a frequency of specific peaks.
Yes, it comes from my 12V car plug and I want to use it for a simple RPM meter. I do it for fun and experience, nothing else. The car is old Corolla e11 with a four stroke engine. I used my ds1074 scope to take a sample (5 MSPS, 1,2Mpts) of the AC coupled signal on 12V voltage rail in a car.
You can see the results below. It can be seen that ignition peaks are significant but simple voltage level triggering would not be sufficient. There are additional random (spurious?) peaks. The difference between the peak of my interest and the other unwanted noise is in the duration. The real ignition peak has about 50us duration. The false one is much shorter.

I think it should be enough to measure revolutions between 500 to 6000rpm so frequency corresponds to 33,3 to 400 Hz (RPM/60 * 4strokes).

I have few ideas but before I post them I would appreciate your first.  ::)

Thanks in advance
« Last Edit: May 20, 2015, 06:22:27 pm by Warhawk »
 

Offline WarhawkTopic starter

  • Frequent Contributor
  • **
  • Posts: 819
  • Country: 00
    • Personal resume
Re: Peak detector for frequency measurement in a noisy environment
« Reply #1 on: May 21, 2015, 10:43:18 am »
Nobody ?  ::)

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Peak detector for frequency measurement in a noisy environment
« Reply #2 on: May 21, 2015, 11:14:32 am »
I would start by adding a low pass filter to remove anything above a few kHz.
Then do a FFT using a more useful range (0-10kHz instead of 0-2.5MHz). Then you probably can see the peaks in the spectrum.
 

Offline Tom45

  • Frequent Contributor
  • **
  • Posts: 555
  • Country: us
Re: Peak detector for frequency measurement in a noisy environment
« Reply #3 on: May 21, 2015, 11:37:01 am »
Rather than look at the 12 volts how about wrapping a turn or two around one of the spark plug wires to inductively couple to the spark itself? That should give a more distinctive signal.

 

Offline WarhawkTopic starter

  • Frequent Contributor
  • **
  • Posts: 819
  • Country: 00
    • Personal resume
Re: Peak detector for frequency measurement in a noisy environment
« Reply #4 on: May 21, 2015, 11:46:06 am »
Rather than look at the 12 volts how about wrapping a turn or two around one of the spark plug wires to inductively couple to the spark itself? That should give a more distinctive signal.

That is a sure thing but strong temptation forces me to try this maybe "no-go" solution.  I thing it is a good place where to get more experience in signal conditioning and processing.

Online Marco

  • Super Contributor
  • ***
  • Posts: 6693
  • Country: nl
Re: Peak detector for frequency measurement in a noisy environment
« Reply #5 on: May 21, 2015, 12:29:55 pm »
Bandpass filtering, center frequency around 30 kHz I think but needs experimentation, should get rid of the spurious spikes and the low frequency stuff. Then threshold it, then calculate time between pulses independently for each pair of signals above threshold for the last X signals and median filter the result (or use some more sophisticated outlier rejecting filter, I can't offhand remember one at the moment).

Autocorrelation would be more precise, but that's going to take a fair bit of processing power.
 

Offline WarhawkTopic starter

  • Frequent Contributor
  • **
  • Posts: 819
  • Country: 00
    • Personal resume
Re: Peak detector for frequency measurement in a noisy environment
« Reply #6 on: July 07, 2015, 08:00:05 am »
Update:
So, the idea works, somehow :-)
I am probably the first guy in the world with Fluke 83-V in his car turned into RPM meter  :-DD
But it still needs some modifications. At the moment it goes only from 500-3100rpm.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf