Shop OBEX P1 Docs P2 Docs Learn Events
Vibration Analyzer — Parallax Forums

Vibration Analyzer

James LongJames Long Posts: 1,181
edited 2009-11-04 22:27 in Propeller 1
I have a friend that would like to have a vibration analyzer.

I have some questions......

I'm not sure where to start with this item...so I thought I would ask here.

I will spell out how the item should work.

The unit would need to output data either to a sd card or to a visual screen.

The unit would output rhythmatic peaks. Like if there is a constant vibration of 1 hz and another at 230hz . The spectrum should be as large as is possible with the Propeller, which I have no idea how wide a frequency range that would be. Three axis output would be nice as well.

I would like to converse with anyone who has ideas of where to start, and the best way to be successful in this endeavor.

James L

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services

Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!

Post Edited (James Long) : 11/4/2009 4:13:33 AM GMT

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-11-04 03:56
    James Long said...
    I have a friend that would like to have a vibration analyzer.
    ....

    Any idea what the amplitudes will be? What sort of material or object is being tested? Are you talking about sonic vibration, seismic-like vibration or...??? If the objects are small, then you have to consider that the mass of the sensor might affect the vibration, etc. As usual, the devils will be the details.
  • James LongJames Long Posts: 1,181
    edited 2009-11-04 03:59
    ElectricAye said...
    James Long said...
    I have a friend that would like to have a vibration analyzer.
    ....

    Any idea what the amplitudes will be? What sort of material or object is being tested? Are you talking about sonic vibration, seismic-like vibration or...??? If the objects are small, then you have to consider that the mass of the sensor might affect the vibration, etc. As usual, the devils will be the details.

    Elec,

    I can't say what the item is, but the mass of the sensor is not going to be a problem. This will be a real vibration like a Harley would experience when sitting still at an idle. Because I have no experience in this application, I can't even guess at the amplitude.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • kwinnkwinn Posts: 8,697
    edited 2009-11-04 04:02
    Are you planning to acquire and process the data with the prop, and does the display of the data need to be immediate?

    My suggestion would be to acquire the data with the prop and analyze it on a pc. Multiple channels could be acquired and a program like Audacity could be used to analyze the data.
  • James LongJames Long Posts: 1,181
    edited 2009-11-04 04:08
    kwinn said...
    Are you planning to acquire and process the data with the prop, and does the display of the data need to be immediate?

    My suggestion would be to acquire the data with the prop and analyze it on a pc. Multiple channels could be acquired and a program like Audacity could be used to analyze the data.

    The data acquisition will be with the propeller, and would be nice to have an immediate display, but like I said, this is more of a noise or wave form analysis, which is not a common item I deal with.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-11-04 04:14
    James Long said...
    ...
    The unit would output rhythmatic peaks. Like if there is a constant vibration of 1 hz and another at 230hz . ....

    It sounds like what you're asking for is a spectrum analyzer. So across one edge of a screen you would see the frequencies, say 1 Hz to 20KHz. And across the other edge of the screen would be the relative amplitudes of the vibration. You would see peaks for frequencies at which the bike will be resonating, etc. Is this what you're after?

    It seems to me that Beau Schwabe posted an acoustic spectrum analyzer about a year ago, but so far I haven't been able to find it.
  • James LongJames Long Posts: 1,181
    edited 2009-11-04 04:17
    ElectricAye said...
    James Long said...
    ...
    The unit would output rhythmatic peaks. Like if there is a constant vibration of 1 hz and another at 230hz . ....

    It sounds like what you're asking for is a spectrum analyzer. So across one edge of a screen you would see the frequencies, say 1 Hz to 20KHz. And across the other edge of the screen would be the relative amplitudes of the vibration. You would see peaks for frequencies at which the bike will be resonating, etc. Is this what you're after?

    It seems to me that Beau Schwabe posted an acoustic spectrum analyzer about a year ago, but so far I haven't been able to find it.

    Yep, that sounds like what I'm looking for.

    For some reason I associate a spectrum analyzer to audio, which is not it's only use.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-11-04 04:23
    James,

    I can't get to my Windoze right away, but this is a DOC that describes it, I think. I can't open it because I'm on my Mac.

    http://forums.parallax.com/attachment.php?attachmentid=48409
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-11-04 04:35
    Okay,



    I'm on my piece of Smile Windork computer.· I've attached the files that went with Beau's audio spectrum analyzer.· I'm not sure how good they are.· I've never used them.·
  • James LongJames Long Posts: 1,181
    edited 2009-11-04 04:35
    Yea,

    I found a post with the spectrum analyzer (used Yahoo search.....ewwww)


    http://forums.parallax.com/showthread.php?p=663985

    Now all I have to do, is figure out how to mate that with an accelerometer, or some other vibration sensor which is faster than an accelerometer.

    Wow......looks like a daunting task.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • BradCBradC Posts: 2,601
    edited 2009-11-04 04:37
    ElectricAye said...
    James,

    I can't get to my Windoze right away, but this is a DOC that describes it, I think. I can't open it because I'm on my Mac.

    http://forums.parallax.com/attachment.php?attachmentid=48409

    Install OpenOffice.Org on your Mac and experience the wonderful world of proprietary Microsoft document formats. As a bonus you can very often repair documents that Word has trashed and that cause it to crash on open by simply opening them in OpenOffice, and them saving them back again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you always do what you always did, you always get what you always got.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2009-11-04 04:43
    BradC said...
    ElectricAye said...
    James,

    I can't get to my Windoze right away, but this is a DOC that describes it, I think. I can't open it because I'm on my Mac.

    http://forums.parallax.com/attachment.php?attachmentid=48409

    Install OpenOffice.Org on your Mac and experience the wonderful world of proprietary Microsoft document formats. As a bonus you can very often repair documents that Word has trashed and that cause it to crash on open by simply opening them in OpenOffice, and them saving them back again.

    Brad,

    thanks for the tip. I actually have Office on my Mac - I just keep forgetting about it. But what I was really on the hunt for was Beau's SPIN code, which I found on my Windork after the 'dork finally punched its way out of a paper bag. lol.gif
  • HughHugh Posts: 362
    edited 2009-11-04 07:42
    James Long said...
    Yea,

    I found a post with the spectrum analyzer (used Yahoo search.....ewwww)


    http://forums.parallax.com/showthread.php?p=663985

    Now all I have to do, is figure out how to mate that with an accelerometer, or some other vibration sensor which is faster than an accelerometer.

    Wow......looks like a daunting task.

    James L

    I have a 3-axis solid-state accelerometer (a DE-ACCM3D). It outputs voltages proportional to acceleration and these voltages are connected to an MCP3208 ADC (the object for which is in the Obex). These and a prop·are fitted to my car. The data from the accelerometer/ADC·is read by the prop and written to an SD card via the FSRW object. However, I suspect that·writing to the SD card puts an upper limit on the frequencies that can be detected due to it throttling the sample rate. I'll have to check some of the data but I think its about 30 3-axis samples a second. (It might be better to buffer the writing somehow if you want to record it).

    [noparse][[/noparse]I can, however detect road studs, joints in the road and potholes, in addition to measuring cornering and braking performance. smile.gif ]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
  • Nick MuellerNick Mueller Posts: 815
    edited 2009-11-04 11:05
    Vibration-analizers are often used to monitor the quality of bearings. Yes, they are spectrum analizers. Normaly, 1 axis is enough, because it's only the sound the bearing makes that is of interest.
    Special vibration-analizers are knock-sensors in combustion-engines. The frequency of interest is around 4kHz IIRC.
    Other applications do not analize the sound, but the acceleration (anyhow, that's more or less the same -SRUG-). One-axis acceleration-sensors are OK. Their problem often is the limited frequency-range.
    A DIY-sensor is a piezo-element that is glued to the mass to analize and at the other end some mass as "support".

    An other special application is for balancing shafts of turbos (high! rmp) or wheel balancing. Here, you need to know the phase angle and the amplitude, so you know where to add/remove weight and how much. The spectrum is of no interest, only the peak and its location. This application could be more easily solved without an Prop, except you do have/want/need a graphics display.

    Hope that helped somehow.

    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • kwinnkwinn Posts: 8,697
    edited 2009-11-04 15:37
    James, unless you are designing this for some esoteric equipment I think the prop can handle the data acquisition and storage of the data. Most mechanical systems systems are relatively slow (0 - 10,000rpm) and produce vibration in the low end of the audio spectrum. The prop has already been used to acquire audio signals, and the signal from a vibration transducer is very similar to an audio signal.

    It should be possible to have one cog acquiring data and a second to store the data to an sd card at a rate high enough to be acceptable for most purposes. When it comes to analyzing the data I am not so sure the prop is up to the job. I am no expert in that area and could be mistaken, but doing a real time FFT seems to be a bit much to expect of it. Displaying the data on the other hand could be done.

    If I were to tackle this task my approach would be to use one or more cogs to acquire the data from an adc, buffer the data in hub ram until enough data has been stored to do a block write to the sd card, then use another cog to write the data. Depending on the data rate and number of channels to acquire the channel data could be interleaved within each block, or separate sd cards could be used for each channel.
  • James LongJames Long Posts: 1,181
    edited 2009-11-04 17:46
    Thanks for all the information.

    I've been doing some calculations....and the most the system would actually be looking for is around 250 Hz. Which is actually pretty slow.

    Now to find out if there are any relatively priced sensors which could record the vibration from 0-300 Hz.

    I think the Spectrum object Beau wrote, would do the trick, but the visual output would be to a different type of screen.

    I appreciate all the opinions.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • yarisboyyarisboy Posts: 245
    edited 2009-11-04 18:45
    The commercial vibration equipment we use has a magnet in the pickup that is encased in stainless steel. The hand held recorder records the raw data to RAM. After all the readings are done the data is up loaded into a desktop where the data is post processed and logged. The hand held unit can display data in real time in what ever units you specify. Its a tremendously expensive system but its the same equipment used in nuke plants for maintenance. A cheap light weight accelerometer should get you started. The signal will be too small so you will need a gain matching amp and an A/D converter chip to get the serial data stream into your propeller. Check OBEX for A/D objects for the A/D chips Parallax stocks. You may also find FFT objects that will help with the display. Good Luck, have fun. The Obex also has objects for VGA display that will help you produce a graphical display representation of the data. Hano's View Port is also a natural for a display of the type you may desire.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MOORE'S LAW: The capabilities of electronics shall double every 18 months.
    cloyd's corollary: Hardware is easy, software is hard.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-11-04 18:53
    James Long,

    One thing to keep in mind with that code, is that it will be most sensitive if you can match the input signal to the switching threshold of the I/O and not oversaturate the input signal so that the 1-Bit ADC can do it's function. One way to do this might be to use an Op-amp with the signal tied to the inverting input through a small cap (10nF) and a resistor (1K - 100K? <-depends on input signal level) to the I/O threshold voltage. With the non-inverting input, it should also go to the I/O threshold voltage. Typically the I/O threshold voltage is at Vdd/2 however you might save a few headaches if you make this something you can adjust.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • lonesocklonesock Posts: 917
    edited 2009-11-04 19:34
    I have a fast fake version of the DCT working in the code in the second post here:

    http://forums.parallax.com/showthread.php?p=848739

    It uses Bresenham's line algorithm and a 6-point approximation of a cosine curve to transform a block of time data into the frequency domain. I have it transforming 128-sample long blocks of data sampled at 8 kHz in real-time, so it might work for you. I did a (small) study of the transform's response to a chirp (frequency sweep) of a full cosine curve, the 6-point cosine approximation, and also the 2-point cosine approximation...if you're interested I could zip that up, but the data is pretty raw [noparse][[/noparse]8^)

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • James LongJames Long Posts: 1,181
    edited 2009-11-04 21:15
    lonesock said...
    I have a fast fake version of the DCT working in the code in the second post here:

    http://forums.parallax.com/showthread.php?p=848739

    It uses Bresenham's line algorithm and a 6-point approximation of a cosine curve to transform a block of time data into the frequency domain. I have it transforming 128-sample long blocks of data sampled at 8 kHz in real-time, so it might work for you. I did a (small) study of the transform's response to a chirp (frequency sweep) of a full cosine curve, the 6-point cosine approximation, and also the 2-point cosine approximation...if you're interested I could zip that up, but the data is pretty raw [noparse][[/noparse]8^)

    Jonathan

    Wow....I got to "It" before I was way over my head. You love math don't you?? smilewinkgrin.gif

    I'm wondering if I am actually going about this the right way. I have something envisioned, but I'm not sure it is even possible.

    Would it be possible to do this with a digital Accelerometer like the LIS3V02DQ? I see it has a bandwidth higher than what I'm trying to sample.

    Now I understand the period and time sweep would be critical (and repetition of such), but I figure there is a way to do it. I know it will differ greatly from the methods here.

    We all must understand this is way out of my realm of safe designing. I typically stay away from things I don't understand, but how am I to learn something new?

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • lonesocklonesock Posts: 917
    edited 2009-11-04 22:07
    James Long said...
    ...
    You love math don't you??
    ...
    I'm wondering if I am actually going about this the right way...
    Very much [noparse][[/noparse]8^).

    Maybe you could draw a couple of freehand curves of the waveform you're expecting to get, and highlight what kind of data you hope to extract from it. I'm betting from that we could get a better idea of how to help without needing to know more about the application itself.

    Just a note, I think looking at the data at ~ 1Hz is going to be harder than it looks. For example, if you're sampling at ~ 1kHz (to resolve 250Hz decently), to look at 1/2 Hz with a FFT or DCT type transform, you would need a block-size of 1024, which is pretty large for the prop (the _fast_ version of those algorithms are O(n log n), and they are usually implemented with floating point numbers). Using the faux-version in the code I posted, you would be limited to a block size of about 256 (I use cog RAM for the accumulation). However, something as simple as counting zero-crossings may work for the low frequency part of your application.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • James LongJames Long Posts: 1,181
    edited 2009-11-04 22:27
    lonesock said...
    James Long said...
    ...
    You love math don't you??
    ...
    I'm wondering if I am actually going about this the right way...
    Very much [noparse][[/noparse]8^).

    Maybe you could draw a couple of freehand curves of the waveform you're expecting to get, and highlight what kind of data you hope to extract from it. I'm betting from that we could get a better idea of how to help without needing to know more about the application itself.

    Just a note, I think looking at the data at ~ 1Hz is going to be harder than it looks. For example, if you're sampling at ~ 1kHz (to resolve 250Hz decently), to look at 1/2 Hz with a FFT or DCT type transform, you would need a block-size of 1024, which is pretty large for the prop (the _fast_ version of those algorithms are O(n log n), and they are usually implemented with floating point numbers). Using the faux-version in the code I posted, you would be limited to a block size of about 256 (I use cog RAM for the accumulation). However, something as simple as counting zero-crossings may work for the low frequency part of your application.

    Jonathan

    What typically I'm looking for is spikes in the vibration spectrum. For example, a spike at 9 Hz, 41.6 Hz or possibly 100 Hz. All of these ranges are real and relative to what object I'm sampling. Some other frequencies exists within those ranges, but typically those are the most important. I would like some relative amplitude of the spike, but I'm not sure what numerical range that would be.

    All of those frequencies are very low, which makes me believe it could be done with a digital accelerometer.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Sign In or Register to comment.