Piezoelectric sensor trigger for certain frequencies

Thread Starter

JBernard

Joined Aug 8, 2013
46
Hey all. Looking to get some input/ideas on how to pull this off.
I'm trying to figure out how one of these is made:

http://www.amazon.com/Hardline-Prod...85179046&sr=8-1&keywords=vibration+hour+meter

Its a simple stick on hour meter. Most are inductive (spark plug wire wrap) to act as an ammeter and pick up voltage to turn on/off.
This one however sensors vibration to turn on/off.

I've bought one to open up and see how its made and they are all epoxy encapsulated to make them waterproof, which makes it a huge pain to see the circuitry, and even when i got most of the epoxy off, the part IC numbers are hard to see.

But one thing i did find that surprised me was that they were using a simple piezoelectric buzzer style sensor for the input.

Here's the cons of using the cheap style piezo for vibration dectection...I've seen several reviews on people that use these for non-stationary devices, say a tractor. And when the tractor is being moved on a trailer, its triggering the device and logging time. This is obviously very bad and screws up the point of having an accurate hour meter.

Saying that....check this one out:
http://www.getdata.it/prodotti.php?idcategoria=36&idprodotto=236&idfamiglia=2&lang=eng
I have friends that have this unit and transport their bikes hours on trailers and it logs NONE of the transport time. As far as they can tell its only logging when the bike is running. So how are they doing this? Take note of this line:

"This device detects the engine by interpreting and identifying the wave frequencies that flow through the surface on
which it is mounted."

Obviously this is the way to capture only when the bike is running. Making it trigger on/off only under certain frequencies.
Also, surprisingly, I've taken apart one of these and its using another cheapie piezo buzzer for recognition. Which makes me believe that they are somehow reading the frequencies on the software side?
As far as I can make out on the PCB, the piezo buzzer is being fed into an Opamp, then into the PIC.

Here is the only vibration based circuit ive found so far:
http://discovercircuits.com/PDF-FILES/hourmtr.pdf

So here's where I'm at. To make a device thats more reliable than picking up any kind of vibration, I'll need to capture data on that device from the sensor i'll be using, analyze it, and find which frequency range the device operates at. Then in turn make this the trigger window in the software side?

Anyone have any ideas on how to capture this data? Something like this is all I've found so far, which is ridiculously expensive, but maybe its the only way?..


Let me know what you guys think!
Thanks as always
Taylor
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
i've also got an inductive version and it works just fine. just would like to try and make a wireless version. can put it anywhere and its just so much cleaner.
 

#12

Joined Nov 30, 2010
18,224
Just working from instinct here. A running engine has a lot more high frequency content than the random rumblings of a trailer. It also has regular repetitions. Try this. Install some good ear plugs, close your eyes, and push your lawn mower across the lawn. Then, start the engine and push it across the lawn.

With your best senses occluded you can feel the difference. What does a piezo sensor sense? The vibrations. A simple frequency filter is a good place to start, but a repetition detector in software would make it excellent.

For 1000>frequency>400
and amplitude > x millivolts
If 100>pulses per second>10,
engine is on.

Just guessing. Hope I'm in the ballpark.
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
exactly. I'm just trying to think about the easiest way to capture the data. so i can make a very exact filter range to increase the reliability.
Also. they all seem to be using cheap piezo buzzer disc. Obviously these are very durable, which is a plus, but i wonder if something like an accelerometer will give a better reading?

On the capture aspect, I guess i could increase or decrease the sensitivity (resistor?) value till i get an accurate reading. But if i'm going to this much effort, I'd rather do something like a spectrum analysis so i can get a clearer idea on what range to capture.

Wonder if this needs to be done via pc software, handheld device, or what?

Thanks
Taylor
 

#12

Joined Nov 30, 2010
18,224
You have described 2 goals. 1) understand the frequency range
2) determine what amplification, if any, is needed.

Your first sentence is hokum. The filter range is not going to be exact and it has nothing to do with reliability.

I don't know if an accelerometer will be an improvement.

My guess is, What you're going to do is build an active filter with an opamp to get the frequency range and amplitude right. Then you're going to use a microprocessor to look for repetition.
 

THE_RB

Joined Feb 11, 2008
5,438
The main engine "vibration" is because of the balance factor of the crankshaft, and single cylinder engines have a significant vibration which approximates a sinewave, and occurs at a freq (Hz) of engine RPM /60. So that gives you an idea of the Hz range you need to detect.

You need to low-pass filter the signal from the piezo sensor, then use some software algorithm to determine that a regular sine-like signal is happening and if so, log the running time. The hard part (if you are not a software guy) will be to devise a good algorithm.
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
^ awesome info guys. thank you!
the low pass filter and sine wave recognition seems to be the best bet to distinguish a solid signal from noise.
looks like my next step is to get some piezo's coming and test them on the engine to see what range of frequencies its producing.
what would you recommend i do this with on analyzing? pc software? handheld device?
 

THE_RB

Joined Feb 11, 2008
5,438
What processing platform are you most comfortable with?

It should not take too much processing power to see that a regular sine-like waveform is occuring, and start a timer.

If your device will need a display etc that requires probably more processing power than the signal analysis so you could pick a platform that has the display you want and one you have experience with (or can get good information on).
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
right now i've got some prototypes (not using this feature we are discussing, but a hardwired version) running with Arduino. But to my knowledge the max frequency it will interpret on an input comes out to be like 100hz (sorry just spouting off what i think i read). So that would be way to low for my application, so i would need an A/D chip before the arduino, or to use another platform i guess correct? if thats the case i dont have to much electronics knowlege, is there any simple way to do the analysis on a PC?
I definitely dont want to fiddle around learning/troubleshooting a new platform just to be able to test the sine wave out. Unless i have to that is.
 

#12

Joined Nov 30, 2010
18,224
Are you aware that 100 Hz is 6000 RPM? I must admit, some motorcycle engines go way faster than 6000 RPM.
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
didnt realize that.
if it helps any. our 2stroke engines are usually maxed out around 8000rpm. while the 4 strokes rev higher to around 13000
 

THE_RB

Joined Feb 11, 2008
5,438
I'm pretty sure an arduino can read its ADC input at much higher than 100Hz.

That will be one of the first things you need to sort out before working on the sine detection algorithm, ie; how fast you set up the arduino to sample the ADC input.

I don't want to seem mean, but it looks like you are a long way from being able to complete a project like this.

Other things you need to do are to get some 'scope screenshots of the waveform from the piezo when the engine is running, etc.
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
i agree, this sensor method is definitely making me step back and almost restart. but we do have a working prototype of all the logging features on the arduino and a working version of it using voltage detection to trigger on/off.
i'd just really like to see if the vibration method will work!

i've been working on this for months now, so having to step back and learn something else isnt a deal breaker for me.

i'm finding some good resources from your previous messages. one quick question i did have was on a piezo sensor that pics up any and all vibration going on....im curious on how you'd be able to pick out a clean sine wave out of a signal mixed with noise. if youre feeding the ADC directly with a signal generator then it would be easy, but unless im doing that wouldnt my signal look like this:


maybe a dumb question. but let me know what you think
thanks again
 

THE_RB

Joined Feb 11, 2008
5,438
If that signal was low pass filtered as discussed it would show quite an obvious low freq. I assume the regular higher amplitude section at the start was when the engine was revved, and the lower amplitude less regular signal later is engine idling?

Your algorithm does not need to pick a clean sine wave signal out, it just needs to detect that a regular excursion of the waveform is happening all the time, in the freq range 600-13000 RPM (10-220 Hz).

You're not trying to do something precise like make an accurate revcounter from the vibration signal, all you need to do is reliably determine that the engine is running or stopped. :)
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
RB,
the picture i found above was just of a random waveform, so no correlation to what an engine may produce i assume.

I've been looking around a bit and found a few resources that may can help me out.
First, here's a vibration based hr meter schematic:
http://discovercircuits.com/PDF-FILES/hourmtr.pdf
On the above, (pardon my newbie questions here), but i'm unsure where the voltage protection is. I know some piezos can produce up to 90v, and also i'm not understanding the hex inverters in two locations as well.

But maybe this circuit isn't the best design for me?

I took your advice on the low pass filter, which makes total sense to be able to knock out all of that unwanted bandwidth.
I came across this circuit, its a low pass with an active op-amp:


I'm thinking i need some voltage protection on the front or back side of that before going to logic level signal?
So a piezo like this:
https://www.sparkfun.com/products/9196
hooked into the above circuit should let me control the Hz of the low pass, and bump up the signal to give a nice waveform?
My next step would be to analyze the signal. Im trying to think of the easiest way to do this since I don't have a scope yet.
What about PC software that acts like a scope, and use an FFT Analysis program like this:
http://www.techmind.org/audio/specanaly.html

Am i more on the right track now?

Thanks for all the help so far, its greatly appreciated. i checked out some of the stuff in your sig and its insanely impressive!
 
Last edited:

THE_RB

Joined Feb 11, 2008
5,438
Ahh, my mistake, I asked about 'scope screenshots of your waveform and assumed it was your waveform. :)

Really, to design any amp or low pass filter it would be of great advantage to see your actual waveform that comes out of your piezo sensor when the engine is running.

If you wanted a general low pass filter and amp that circuit looks as good as any, and you can adjust the gain and filter freq.

Other things like if you need overvoltage protection are still unknown. I think the piezo signal will be quite low in amplitude, but it's possible you might need protection. Again, we are just guessing at this point, and some real 'scope shots are needed.

In the meantime you can add a "volume pot" between the piezo and the filter circuit, to give you some protection and adjustability when testing.

PS. Thanks for the nice words about my web page. :)
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
I see what you mean now. Looks like data acquisition straight from the piezo should be first step then build the circuitry around it.
I found this but its 250$ and only records 10sec of data at a time:
http://www.mide.com/products/slamstick/slamstick-vibration-data-logger.php

can you think of anything else i could use to capture data for an extended period? I could hook a laptop up to my bike whilst in the garage, but i'd prefer to test it while riding, in back of truck being transported, ect to simulate the real world environments i'll be dealing with to make sure its only turning on when running.

thanks!
 

Thread Starter

JBernard

Joined Aug 8, 2013
46
am i on the right track with this schematic i drew up? using .047uf and 15K in the RC which gives me around 225Hz Low Pass Filter

 

Thread Starter

JBernard

Joined Aug 8, 2013
46
The main engine "vibration" is because of the balance factor of the crankshaft, and single cylinder engines have a significant vibration which approximates a sinewave, and occurs at a freq (Hz) of engine RPM /60. So that gives you an idea of the Hz range you need to detect.

i just saw this while reading into the resonance Hz again...

"4600 revolutions-per-minute divided by 60 seconds-per-minute = 76.7 revolutions-per-second, multiplied by 4 pulses-per-revolution = 307 HZ. Using the same arithmetic, the excitation frequency of a 4th-order vibration at 800 RPM is 53 HZ"

looks like they are getting a higher frequency due to multiplying by 4 for pulses per rev. is this right? because if so then then i will need to raise my LPF up higher. 13000 rpm is 866Hz then
 
Top