# Oscope & Piezo Electric to capture Airgun Barrel Vibration ?

#### jayTechStuff

Joined May 29, 2022
7
30 years ago, I had electronic Eng classes, I have a question since I am so rusty.

I want to measure the vibration from a rifle that is fired. My thoughts are to get an OScope and a Piezzo that captures vibration.
I want to attach the Piezo to the barrle and then capture the vibration wave once the airgun is fired ?
Is this possible ?
I want to look at the tuning of an airgun from a standpoint of tracking barrel vibration.
1. Curious if an Oscope can capture the 1us or 2ms vibration that a Shot would create ?
2. What portable gear would you suggest ?
3. I want to create profiles of the vibration so I can start looking at differences of accuracy as it compares agains un accracy per vibration.

Any help would be great.
Jay

#### Ya’akov

Joined Jan 27, 2019
6,046
Welcome to AAC.

How would you mount the piezo on the barrel?

#### jayTechStuff

Joined May 29, 2022
7
Hello thanks for asking. I was thinking rubber band , rubber cement, tape or anything that would give me a solid contact to the bottom end of the barrel. Your thoughts on if this is even possible ?

#### Alec_t

Joined Sep 17, 2013
12,904
anything that would give me a solid contact to the bottom end of the barrel.
Won't that rule out your rubber cement option? I would expect that to absorb a lot of the barrel vibration energy. Epoxy resin would be preferable IMO.

#### Ya’akov

Joined Jan 27, 2019
6,046
Hello thanks for asking. I was thinking rubber band , rubber cement, tape or anything that would give me a solid contact to the bottom end of the barrel. Your thoughts on if this is even possible ?
Well, piezo sensors produce a signal when compressed. Because of this piezo vibration sensors are made of a piezo film with in a flexible plastic lamination. The flexing of the package causes the compression, but for it to work you ether have to flex it over a relatively long span or use a mass at one end which can more freely.

The feasibility of the first option depends on the wavelength of the vibration. If it is too long or too short you may not be able to get a useful signal. The second option has its own problems. The plastic package and mass attached to the end will have a resonant frequency which could cause a lot of trouble in a different way. Both of them depend on not being substantially in a node, where there is effectively no movement of the barrel.

The oscilloscope is a prettily good instrument to measure the output of a variable voltage sensor in those time frames. so it's not an issue, but I think you might want to explore using an accelerometer attached near the muzzle and collecting the data on a microcontroller (eg,: one of the many Arduino compatible options) or single board computer (e.g.: Raspberry Pi).

You'll need to learn more but you will get much better data without wondering about the various issues with the piezo method.

I suggest the muzzle end because if it isn't moving then you don't have any reason to worry about the vibrations! Also, if you get this method worked out, an array of sensors along the barrel would help you characterize the actual motion, not just it's frequency and amplitude at a single point.

#### Irving

Joined Jan 30, 2016
2,797
I'd concur with Ya'akov. A piezosensor may get overloaded by the audio shockwave - it is after all the basis of a microphone. Measuring the relative acceleration of the muzzle, the barrel nearer the breech and, maybe, the stock, would seem to be the better approach.

However, the frequency response off the shelf miniature accelerometers (looking at the extensive range from Analog Devices) would appear to be around 30KHz maximum which I'm not sure would be sufficient.

You might find more information on the Analog Devices Engineering Zone forum where AD's product specialists may be able to suggest other approaches.

#### Ya’akov

Joined Jan 27, 2019
6,046
I'd concur with Ya'akov. A piezosensor may get overloaded by the audio shockwave - it is after all the basis of a microphone. Measuring the relative acceleration of the muzzle, the barrel nearer the breech and, maybe, the stock, would seem to be the better approach.

However, the frequency response off the shelf miniature accelerometers (looking at the extensive range from Analog Devices) would appear to be around 30KHz maximum which I'm not sure would be sufficient.

You might find more information on the Analog Devices Engineering Zone forum where AD's product specialists may be able to suggest other approaches.
I agree it could be a challenge. I suspect it might be necessary to count on the barrel ringing after the shot.

#### strantor

Joined Oct 3, 2010
5,974
My own attempts to measure vibration with piezo+ oscilloscope gave suboptimal (absolute crap) results. I don't know if you're trying to measure an actual value or just compare one shot to the next, as you to "tune" your airgun (not sure what's involved) - looking for smaller and smaller waves. In either case I think you will be disappointed. Based on my experience, my prediction is that you could put a piezo on your gun and fire 50 shots with no adjustments whatsoever, and you'll see 50 different waveforms with amplitudes all over the spectrum. It will be impossible to quantify any change from it as you make adjustments. They are good to determine whether a shot happened or not (if you can tolerate false positives from nearby farts and sneezes) - and that's about it.

I recommend that you use an accelerometer instead. That worked much better for me. The other thing that worked for me (way better than piezo but not as well as accelerometer) was a voice coil. You could mechanically couple the butt of the gun to a speaker cone and read the output of the speaker. There is an example of how I did that in reply #17 in the thread that I linked above.

Last edited:

#### jayTechStuff

Joined May 29, 2022
7
WOW lots of good information. Stantor you comprehended exactly what I am trying to to do. Basically a nice PCP air rilfe is pretty quite but it does have some bit to it. Just not like a 308 round. You made the correct assumption on the research. I wanted to take 10 shots and get a blueprint of the signature of noise/voltage to see if there is ANY corelation between a finely tuned rifle and one that just totally sucks. Thanks Guys I will look into a the acceleramators. We are talking about the pellet moving through the barrel at about 800 to 1200 fps. That equates to about 2 ms going down the barrel which is 24 inches. Hope this all makes sense. I am not sure anything can be deteremined.

#### strantor

Joined Oct 3, 2010
5,974
Sorry, kinda blazed past the actual questions you asked.
1. Curious if an Oscope can capture the 1us or 2ms vibration that a Shot would create ?
Yes, an oscilloscope would catch a 1us pulse, but not just any would. 1/1us = 1MHz. So I think you'll want at least 10x that for bandwidth, 10MHz.

2. What portable gear would you suggest ?
There are pocket oscilloscopes but for the most part they are probably not going to be 10+MHz.
Example 1: 200kHz, $48 Example 2: 100kHz,$120
Example 3: 1MHz, $139 Examole 4: 50MHz,$150

By the numbers that last one looks like it might work (fair warning I only looked at the bandwidth, nothing else) but it's also not a "pocket" oscilloscope. Portable, not pocket. Maybe you can find a pocket scope good for 10+MHz, and maybe I could too if I looked harder. But this is just to give an Idea.

That is from 5 minutes of searching and I have no experience with any of these products, I can recommend none of them.

Also bear in mind that any accelerometer you might choose (if you were at all swayed by my previous post) will need to be able to detect vibrations just as fast as whatever scope you choose.

#### jayTechStuff

Joined May 29, 2022
7
Sorry, kinda blazed past the actual questions you asked.

Yes, an oscilloscope would catch a 1us pulse, but not just any would. 1/1us = 1MHz. So I think you'll want at least 10x that for bandwidth, 10MHz.

There are pocket oscilloscopes but for the most part they are probably not going to be 10+MHz.
Example 1: 200kHz, $48 Example 2: 100kHz,$120
Example 3: 1MHz, $139 Examole 4: 50MHz,$150

By the numbers that last one looks like it might work (fair warning I only looked at the bandwidth, nothing else) but it's also not a "pocket" oscilloscope. Portable, not pocket. Maybe you can find a pocket scope good for 10+MHz, and maybe I could too if I looked harder. But this is just to give an Idea.

That is from 5 minutes of searching and I have no experience with any of these products, I can recommend none of them.

Also bear in mind that any accelerometer you might choose (if you were at all swayed by my previous post) will need to be able to detect vibrations just as fast as whatever scope you choose.
ahh yea man, thanks for the accelerometer advice. dam I have forgot so much from school.... Thanks again

#### strantor

Joined Oct 3, 2010
5,974
WOW lots of good information. Stantor you comprehended exactly what I am trying to to do. Basically a nice PCP air rilfe is pretty quite but it does have some bit to it. Just not like a 308 round. You made the correct assumption on the research. I wanted to take 10 shots and get a blueprint of the signature of noise/voltage to see if there is ANY corelation between a finely tuned rifle and one that just totally sucks. Thanks Guys I will look into a the acceleramators. We are talking about the pellet moving through the barrel at about 800 to 1200 fps. That equates to about 2 ms going down the barrel which is 24 inches. Hope this all makes sense. I am not sure anything can be deteremined.
It's my understanding that the kick of an air rifle can be harder on optics than the kick of a firearm. Something to do with kick in both directions rather than just backwards; maybe only on some styles of air rifle. I started down this rabbit hole a while back when I came across these "zero recoil scope mounts" and they seemed to be used exclusively with airguns. I was curious why; it seemed to me they would be needed on large caliber hunting rifles long before finding use on air guns, but I learned otherwise. I never found any data on it but it sounds like you're going to collect some, so please do share. I am curious. Do you intend to do any comparison between airguns and firearms?

#### KeithWalker

Joined Jul 10, 2017
2,409
This is an application note from B & K that contains a wealth of material on mechanical vibration and shock, including methods of measuring it. You may find it useful:

https://www.bksv.com/media/doc/bn1330.pdf

#### strantor

Joined Oct 3, 2010
5,974
This is an application note from B & K that contains a wealth of material on mechanical vibration and shock, including methods of measuring it. You may find it useful:

https://www.bksv.com/media/doc/bn1330.pdf
That book is pretty dated but I don't know of a more comprehensive reference that's free. I lookd through it just now to see what accelerometer technology they used in '84; the book just talks about Piezo accelerometers.

I should supplement my previous bashing of piezo sensors with the disclaimer that what I was using were not piezo accelerometers. They were just flexy piezo toys from sparkfun. If I had been using legit accelerometers based on piezo technology I probably would have a better review.

Here is the accelerometer I used. It is not based on piezo technology. The operational description in the data sheet makes me picture a brick suspended by a spring dangling over a wafer of silicon. It has a stated bandwidth of 1,600Hz. It worked for me and detected fast "taps" on metal during testing, close enough to simulate recoil I think. Which makes me less confident about what I said earlier:
Also bear in mind that any accelerometer you might choose[...]will need to be able to detect vibrations just as fast as whatever scope you choose.
I am probably wrong. You could probably use that accelerometer for this application, since an actual measurement is not required. Just looking for change/mprovement. I think you could detect that with this. And if you can, then you probably don't need a 10MHz scope either.

I think you would only need an ultra-fast accelerometer and oscilloscope if you were trying to obtain an actual value of 'G's.

I am not confident in this. I would prefer to be shot down and have facts presented than to be unsure of what I said, so anyone please feel free to openly contradict me.

#### jayTechStuff

Joined May 29, 2022
7
It's my understanding that the kick of an air rifle can be harder on optics than the kick of a firearm. Something to do with kick in both directions rather than just backwards; maybe only on some styles of air rifle. I started down this rabbit hole a while back when I came across these "zero recoil scope mounts" and they seemed to be used exclusively with airguns. I was curious why; it seemed to me they would be needed on large caliber hunting rifles long before finding use on air guns, but I learned otherwise. I never found any data on it but it sounds like you're going to collect some, so please do share. I am curious. Do you intend to do any comparison between airguns and firearms?
Ahh so you are referring to Piston / Spring airguns that have a reverse recoil that pretty much will break just about any regular scope. I will not be testing that type of airgun but you are 100% correct the zero recoil scopes are needed and even those break. I gave up the spring cocked airguns long time ago because of such issues. What I am researching is PCP high pressure airguns. The industry has grown with ballistice very much. What I want to know is there a noticable difference between a tuned gun vibration and that of an Untuned gun. So say you have a rifle shooting 1/2 groups at 100 yards can I look for patterns within the vibration on an OScop and determine something simliar versus and untuned gun shooting 3 or 6 inch groups at 100 yards. hmmm very curious this is all just me thinking. They talk alot about barrel harmonics and velocities a entire subject on itself. So my questions will be related to can we somehow measure capture a certain barrel harmic that conicides with accuracy ???
My first problem is can I even capture anything at all, second whatever I capture will it be something we can use as varies samples to somehow project performance ??

Hope this all makes sense.
Thanks again,

#### strantor

Joined Oct 3, 2010
5,974
Ahh so you are referring to Piston / Spring airguns that have a reverse recoil that pretty much will break just about any regular scope. I will not be testing that type of airgun but you are 100% correct the zero recoil scopes are needed and even those break. I gave up the spring cocked airguns long time ago because of such issues. What I am researching is PCP high pressure airguns. The industry has grown with ballistice very much. What I want to know is there a noticable difference between a tuned gun vibration and that of an Untuned gun. So say you have a rifle shooting 1/2 groups at 100 yards can I look for patterns within the vibration on an OScop and determine something simliar versus and untuned gun shooting 3 or 6 inch groups at 100 yards. hmmm very curious this is all just me thinking. They talk alot about barrel harmonics and velocities a entire subject on itself. So my questions will be related to can we somehow measure capture a certain barrel harmic that conicides with accuracy ???
My first problem is can I even capture anything at all, second whatever I capture will it be something we can use as varies samples to somehow project performance ??

Hope this all makes sense.
Thanks again,
How deep do you want to go? If the answer is "all the way" there are some exciting things you could do with Machine Learning. Rig up a camera (to record your groups, as well as every shot) and tie your vibration analysis into it with any number of other parameters you think might be relevant (windspeed, humidity, barometric pressure, tank pressure, trigger pull time, credit card balance, lunar phase, sperm count etc.) Your system could record every relevant aspect of every shot, build a database, and rank the impact of everything. You might find that resonant frequency of the barrel has less effect than dew point (for example, not to imply that it actually does).

But you seem like a more reasonable guy than to jump headlong into that sort of thing. To get your toes wet I will tentatively suggest a cheap (<$100) pocket scope and that accelerometer (or a faster one if you can find one). But wait for someone to come along and call me stupid (or accidentally not stupid) first before you go spending money. What I've recommended so far would work for the situations I've been in, but I don't think yours is quite the same. Thread Starter #### jayTechStuff Joined May 29, 2022 7 How deep do you want to go? If the answer is "all the way" there are some exciting things you could do with Machine Learning. Rig up a camera (to record your groups, as well as every shot) and tie your vibration analysis into it with any number of other parameters you think might be relevant (windspeed, humidity, barometric pressure, tank pressure, trigger pull time, credit card balance, lunar phase, sperm count etc.) Your system could record every relevant aspect of every shot, build a database, and rank the impact of everything. You might find that resonant frequency of the barrel has less effect than dew point (for example, not to imply that it actually does). But you seem like a more reasonable guy than to jump headlong into that sort of thing. To get your toes wet I will tentatively suggest a cheap (<$100) pocket scope and that accelerometer (or a faster one if you can find one). But wait for someone to come along and call me stupid (or accidentally not stupid) first before you go spending money. What I've recommended so far would work for the situations I've been in, but I don't think yours is quite the same.
Stantor, yep do have a few questions for you. I am thinking these items.
https://www.amazon.com/gp/product/B00NAY2TUC/ref=ox_sc_act_title_1?smid=AM0JQO74J587C&psc=1
https://www.amazon.com/gp/product/B08VRDG94N/ref=ox_sc_act_title_4?smid=AU70VODQ3S17V&th=1
https://www.amazon.com/gp/product/B00R5CT0K2/ref=ox_sc_act_title_2?smid=A30QSGOJR8LMXA&psc=1

Now just thinking about the hookup .. 1.8 to 3v battery power in dc. Still thinking about where the leads would hook up to measure each x,y,z value.

#### strantor

Joined Oct 3, 2010
5,974
Stantor, yep do have a few questions for you. I am thinking these items.
https://www.amazon.com/gp/product/B00NAY2TUC/ref=ox_sc_act_title_1?smid=AM0JQO74J587C&psc=1
https://www.amazon.com/gp/product/B08VRDG94N/ref=ox_sc_act_title_4?smid=AU70VODQ3S17V&th=1
https://www.amazon.com/gp/product/B00R5CT0K2/ref=ox_sc_act_title_2?smid=A30QSGOJR8LMXA&psc=1

Now just thinking about the hookup .. 1.8 to 3v battery power in dc. Still thinking about where the leads would hook up to measure each x,y,z value.
I think those would work.
The ADXL board takes 5V power, +5V to Vin pin and gnd to GND pin.
Scope probes will go ground clip to GND pin and probe tip onto whatever axis pin you want to measure (x/y/z). You'll only be able to measure 2 axes at once.

#### Jon Chandler

Joined Jun 12, 2008
261
You'll want an analog output from the accelerometer for sure ( as opposed to digital like I2C to be read by a microcontroller). I would look for the greatest acceleration (g) range possible, as I expect the g level could be fairly high.

An o'scope will give you a time waveform – I'm not sure how much you'll learn from that. An FFT ( which better scopes can do) will shown you the frequencies that make up that waveform.... which may also not tell you much. It would tell you the harmonic frequencies of the barrel, but I suspect this won't tell you much. The natural frequencies (i.e., harmonics) of the barrel are controlled by the geometry and materials of the barrel, but there may be slight shifts in frequency related to pressure in the barrel.

Keep in mind that something long in one domain is sharp in the other. For example, a sine wave continues forever (is broad) in the time domain, but sharp – a single peak –:in the frequency domain. We use this fact to excite natural frequencies of an object. A bump or impact generates broad band vibration that will excite the natural frequencies of the object. An extreme example of this is an anchor drop test on a ship. The anchor and chain are paid out quickly as possible, then snubbed before it reaches the bottom. The resulting impulse will excite the natural frequencies of the hull.

The impulse when the gun is fired will do the same to the barrel, but you'll need to see the frequency domain to make sense of it.

#### Irving

Joined Jan 30, 2016
2,797
The ADXL335 chip is limited to 1600Hz in x/y, 560Hz in Z with no filter capacitors so may not have the bandwidth you need... the board as supplied has filter capacitors for 50Hz on all axes, so they'll need to be removed to be remotely useful I think. A 50MHz scope is massive overkill at those bandwidths.

If you look at the range of parts from AD below (other manufacturers are similar) you have hi-bandwidth single axis and low/medium bandwidth multi-axis. Be warned - hi-bandwidth chips are expensive - $35+ v$3 for the low-end ADXL335.

My suggestion is to try the ADXL335... but don't splash out on a hi-bandwidth scope (get a 1MHz one from Amazon and return within 30 days if no use). Also most HH scopes are 2ch so consider whether you need X, Y and Z as you can only capture 2 of them - so maybe don't use the Z on ADXL335 and orient it to measure horizontal (X) and vertical (Y) and ignore Z (along barrel) for now?