Dynamic signal analysis on the cheap.  How? - Page 1
Forum section: electronics / projects

author: mr ed
author_rank: Regular Contributor
timestamp: September 16, 2025, 12:35:08 pm
content: I want to get a real time frequency spectrum from a vibration sensor 0.1Hz to a few kHz. I was thinking maybe an audio card but sw is generally audio range. The low frequency end is the issue I think. Linux only. Budget a few hundred US. Some of the HP equipment is possible as I can repair them but $$ even broken, so there must be a simpler way. I have a low noise EG&G preamp. Maybe a National Instrument card but Windows only and well, its, National.

author: shabaz
author_rank: Frequent Contributor
timestamp: September 16, 2025, 01:23:29 pm
content: Hi,The Digilent MCC 172 is quite nice, and is fairly close to your ballpark price (and I believe yearly they have discounted prices on their website but i don't know the detail), and is intended for sensors. It requires a Raspberry Pi (Pi 4 is suitable).However, the lower -3dB point is specified at 0.78 Hz, so if the 0.1 Hz was a hard requirement then it will be unsuitable.In terms of software, the manufacturer provides open source programs that can log or generate a spectrum in real time, but for more in-depth analysis Matlab or anything else could be used (for near-real-time results perhaps with a latency of a few seconds, or from logged data). If you're familiar with Linux then this would be a very suitable option provided you were OK with using the Pi (note: in theory it is possible to unofficially use other SBCs, but there's an amount of coding effort (I tried that, got close, but my need went away).

author: 2N3055
author_rank: Super Contributor
timestamp: September 16, 2025, 02:09:44 pm
content: Picoscope has 16bit scope if you can bear the price..

author: David Hess
author_rank: Super Contributor
timestamp: September 16, 2025, 02:39:01 pm
content: There used to be some sound cards which could be used up to their Nyquist frequency, so 96 or even 192 kHz. It should not be too difficult to modify their low frequency cutoff by just changing their input coupling capacitors.The $600 Quantasylum QA403 will do exactly what you want, except that its low frequency cutoff is only below 1 Hz. Maybe they would make a custom version since it should only be a minor change?Cleverscope will do it but costs even more than the QA403.

author: jwet
author_rank: Frequent Contributor
timestamp: September 16, 2025, 04:47:42 pm
content: I'm +1 for the sound card solution. For best performance, use a high quality USB 24 bit 192Khz type and a USB power and data isolator to avoid PC power hash and ground loops. You get a lot of performance for not much money. There are lots of software options- Digilent's waveforms for the analog discovery products will work with just a soundcard- I think this was intended as a demo mode but it pretty useable with a good soundcard, Good luck.

author: SteveThackery
author_rank: Super Contributor
timestamp: September 16, 2025, 05:25:18 pm
content: Quote from: mr ed on September 16, 2025, 12:35:08 pmI can't wait to find out more about the actual application. What will you be using this to monitor? And what might vibrate with a period of 10 seconds or so? It sounds fascinating!

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: September 16, 2025, 09:47:16 pm
content: A few hundred bucks gets you very close to a lower end Siglent SDS800X HD scope that might do it.

author: moffy
author_rank: Super Contributor
timestamp: September 16, 2025, 10:30:17 pm
content: I built a board based on the PCM2906 just for this type of application, it has the basic PCM2906 with USB caps, xtal, pullup resistors and some 0.1" headers but no opamps. The intention is to plug it into an analogue board and it provides the ADC/DAC and USB connection. You can design whatever analogue front end or output you desire, it's pretty straight forward to do, and it's powered from the USB.

author: mr ed
author_rank: Regular Contributor
timestamp: September 17, 2025, 12:18:00 am
content: Much appreciated ideas. Audacity FFT seems to stop at 1 Hz and most audio cards are designed for dynamic depth but not slow signals. With these hints I will dig deeper.

author: KE5FX
author_rank: Super Contributor
timestamp: September 17, 2025, 02:26:03 am
content: One weird trick is to use an I/Q modulator to upconvert the LF signal to a higher frequency that the sound card can deal with. A lot of function generators have I/Q outputs these days, and the phase-shift network on the output side is trivial enough at audio frequencies.You can also use a stereo sound card to receive the I/Q outputs directly, deriving their magnitude and phase with the usual sqrt(I*I+Q*Q) and atan2(Q,I) functions (or just pass them straight to a complex FFT.) Phase and amplitude channel balance are obviously important if you go that route, and may need to be compensated in software.

author: radiolistener
author_rank: Super Contributor
timestamp: September 17, 2025, 02:50:17 am
content: You can use an ordinary sound card together with Octave to display fast and precise FFT of any desired size. It can be done in real time, or you can simply record the signal into a WAV/FLAC file and analyze it later.The main limitation is the input coupling of most sound cards: they usually have high-pass filter capacitors that block very low frequencies. To observe down to 0.1 Hz, you would need to bypass or modify these capacitors.

author: KE5FX
author_rank: Super Contributor
timestamp: September 17, 2025, 02:56:49 am
content: Another thing you can do is model the capacitors and take their LF amplitude and phase distortion out mathematically. There was a QEX article some years ago that talked about that.

author: mr ed
author_rank: Regular Contributor
timestamp: September 17, 2025, 09:15:06 am
content: Ok, my understanding as of now...I briefly thought about upconverting, I have a 2ch arb. This might turn into a mini project, flatness, dynamic range are some issues, maybe more lurking..A HP 3561a could work, only need 1 channel, good build quality and hopefully a pampered lab unit with low times can be found, not a production mule. They are old, likely need recapping etc. Would need manuals and extender cards adding 200$ or so. Maybe.Messing with sound cards to get around low cutoff adds more uncertainty and work.Messing with a/d and a raspberry boards implies more uncertainty and sw work. Not hard but for me, not fun either.Newish used scopes at least double my budget. Dynamic range is just barely adequate with 14 bits. My pre amp filter will stop aliasing. It appears they in general, should be able to compute a FFT for a 10 second trace to get 0.2Hz resolution. I think thats why the dedicated dynamic analizers went the way of the dodo.So, at this point for me its either a good but cheap working HP 3561a or with more certainty a modern digital scope as long as it does not have hidden limits on a slow time domain sweep effecting the FFT low end.

author: Berni
author_rank: Super Contributor
timestamp: September 17, 2025, 09:29:52 am
content: The lowpass limit on sound cards is purely a AC coupling problem that can be solved.Some say that audio ADCs don't work with DC input. This is not true, the majority of them can digitize DC just fine, the datasheet just doesn't specify any guaranteed performance for DC input signals (where it usually performs poorly in terms of precision). So if you want a sound card to go lower you can just give it way bigger AC coupling caps on the input, or even remove the coupling caps all together.Just get a cheap USB sound card so that you don't feel bad about tearing it apart to modify it. Tho it is a good idea to get one with a separate name brand audio ADC chip so that it is something of decent performance and you can find a datasheet on it. A decent modern 24bit audio ADC can have some amazing dynamic range and linearity.

author: mr ed
author_rank: Regular Contributor
timestamp: September 17, 2025, 09:46:52 am
content: Sound card input cap can be changed, what about fft software low freq end limit?

author: moffy
author_rank: Super Contributor
timestamp: September 17, 2025, 09:59:59 am
content: Quote from: mr ed on September 17, 2025, 09:46:52 amDFTs don't have a low frequency limit they do have a frequency resolution that is dependent on the number of samples in the DFT.

author: Le_Bassiste
author_rank: Frequent Contributor
timestamp: September 17, 2025, 10:05:57 am
content: you may want to check out REW for linux:https://www.roomeqwizard.com/

author: Berni
author_rank: Super Contributor
timestamp: September 17, 2025, 10:14:39 am
content: On the FFT processing side the problem is just that you need very long recordings to get decent resolution that low.When the thing you are sampling is real time and you want to go down to 0.1Hz means that you need at least 10 seconds worth of samples, but if you want to actually tell apart frequencies in that area you need more like 100 to 1000 seconds.Tho if you want a display that looks more "live" you could calculate a sliding window for the past 100 seconds every 1 second. Not sure if any existing sound card FFT software does that.

author: Kleinstein
author_rank: Super Contributor
timestamp: September 17, 2025, 10:47:06 am
content: The lower frequency limit of sound cards may be more than just a coupling capacitor or 2. Quite some of the audio codecs also have a DC suppression / high pass internal to the ADC. So one may have to find a sound card that does not have that feature. Not all sound cards canmeasure the low frequencies.One may also have to expect increasing noise at the low frequency end. This may still be OK.Chances are a lower end sound card would still be good enough. So no need to only look at higher end sound cards.

author: 2N3055
author_rank: Super Contributor
timestamp: September 17, 2025, 11:14:27 am
content: Quote from: Berni on September 17, 2025, 10:14:39 amThat is why I mentioned Pico. Pico can stream realtime at low sample rates. You can then even apply some kind of sliding, overlapping FFT, that will calculate FFT for data sets that are starting just 10 (or 1, whatever time resolution you need) samples from beginning of previous FFT and gets new 10 points.That way you get continuous overlapped FFT that has continuous spectra without gaps..Of course, a fast processing is needed, but you don't need lots of points, so many FFTs per second can be made on a reasonably powerful PC.

author: Simmed
author_rank: Frequent Contributor
timestamp: September 17, 2025, 12:20:20 pm
content: Quote from: Berni on September 17, 2025, 10:14:39 ami remember a crude experiment i havei played a 1Hz sine wave file but slowed downi cant remember the exact things i didbut the recorder/FFT is done on pythonjust some code mixed together from everywhere found on googleand i get the FFT outputiirc i used 477s of data

author: mr ed
author_rank: Regular Contributor
timestamp: September 17, 2025, 12:36:11 pm
content: Pico 4000 has deep memory for sliding fft but just barely adequate 14 bits. It all depends really on the sw supporting it.

author: radiolistener
author_rank: Super Contributor
timestamp: September 17, 2025, 12:36:48 pm
content: Quote from: mr ed on September 17, 2025, 09:46:52 amFFT software itself does not impose a low-frequency limit — for example, in Octave you can analyze down to any frequency you like.What you need to keep in mind is the fundamental trade-off: the lower the frequency you want to observe, the longer the time record must be. In practice, this means greater delay before the spectrum can be updated in "real time". This is not a limitation of Octave (or any other FFT tool), but simply physics: the period of a low-frequency signal is long T = 1/f, so you must capture enough of it to resolve that frequency. The same constraint applies to any hardware or software you use for spectral analysis.Even if you apply a sliding window to refresh the FFT more frequently, the low-frequency components will still emerge and decay only very slowly. Physics cannot be bypassed: a short observation interval simply does not contain enough information to reliably detect a low-frequency signal.

author: mawyatt
author_rank: Super Contributor
timestamp: September 17, 2025, 03:24:50 pm
content: Here's an example of the SDS800X HD FFT of a 0.5Hz 800mvpp (-10.969dBv) input. As2N3055alerted us, the SDS800 FFT can go below 1Hz in Linear Sweep Mode (not Decade (Log) yet).Here is shown a FFT sweep from 0.1Hz to 1Hz, please note the X axis label is missing a decimal point, those are in milli Hz!! This takes awhile as the X Axis is sweeping at 50s/div, so total is 500s. Also added the FFT of a signal at 0.15Hz at 800mvpp, 0.3Hz at 100mvpp (-29.03dBv), 0.6Hz and 0.9Hz at 200mvpp (23.01dBv), and a 800mpp Squarewave at 0.15Hz. This should produce (-8.871dBv, -18.413, -22.850, -25.773, -27.996, -29.699, and -31.150dBv) for fundamental and 3rd thru 13th harmonics. Another plot with sinewave 800mvpp (-10.969dBv) at 20mHz.Anyway, not too bad for a standalone (no computer needed) ~ $500 DSO, hopefully Siglent will incorporate Decade (Log) sweep FFTs below 1Hz soonBest

author: Kleinstein
author_rank: Super Contributor
timestamp: September 17, 2025, 04:49:41 pm
content: For realtime analysis the lower frequency end will limit on how real time the data are. If low delay is really critical one could use a separate shorter window FFT for the higher frequencies and a longer one for the low frequencies (like < 1 Hz) that really need more past data (e.g. >= 10 s back).

author: KE5FX
author_rank: Super Contributor
timestamp: September 17, 2025, 04:59:26 pm
content: Quote from: mr ed on September 17, 2025, 12:36:11 pmWhat sort of vibration sensor needs >= 14 bits?What are you actually trying to do?

author: 2N3055
author_rank: Super Contributor
timestamp: September 17, 2025, 05:43:35 pm
content: Quote from: mr ed on September 17, 2025, 12:36:11 pmWhat are you talking about?Picoscope 4262 is full 16 bit 5MHz BW , up to 20bit with averaging and less BW.They also have ADC-20/24 data loggers that sample with up to 16 Sps/s that is enough to monitor signals up to 5Hz with no problems.But 4262 is propper oscilloscope so you can easily change sensitivity etc.What Mike said, you probably could do it with SDS8000xHD and it's 12bit.Software ? What software? Software for vibration analysis you will have to make yourself.If you want to use some ready made software than all of this is backwards.Decide which software you are going to use and then use some acquistion hardware that is supported by software.

author: mr ed
author_rank: Regular Contributor
timestamp: September 17, 2025, 08:21:34 pm
content: Where did the 'm' go? Actually, that is a pretty decent spectrum from a little scope. Was that 1Meg samples? And 14 bits?but 500 secs is a long long time. Maybe 8 secs total, say 2048 samples per sec makes 16k points , that should work faster. DFFT have no direct sense of time or frequency, we assign the units.

author: mr ed
author_rank: Regular Contributor
timestamp: September 17, 2025, 08:37:11 pm
content: I now see its12 bits. Lots of smoothing going on.

author: mawyatt
author_rank: Super Contributor
timestamp: September 17, 2025, 08:50:03 pm
content: Quote from: mr ed on September 17, 2025, 08:37:11 pmIf you are referring to our post #23, no smoothing, averaging or other signal processing going on other than standard built-in FFT using 12bit ADC. Of course one can use the ERES to enhance the bit resolution to 15 bits (+3 bits), and/or employ a built-in FIR filters (LP, HP, BP, BR) for the FFT to work with.BTW just added a 20mHz FFT, takes awhile thoBest

author: gf
author_rank: Super Contributor
timestamp: September 18, 2025, 09:04:55 am
content: Quote from: mr ed on September 17, 2025, 08:21:34 pmIn order to prevent leakage from DC and negative frequencies to positive frequencies in the Fourier spectrum, you need to acquire at least N periods of the lowest frequency of interest (0.1 Hz), where N depends on the used window function. For example, with a common Blackman window, which I would consider quite decent (-58 dB side lobes), you need N=3, which implies a minimum record length of 3/0.1 = 30 seconds. If you need a window function with higher selectivity or a flattop window, the required N will be higher.Besides that, you also need some minimum sample rate to avoid aliasing, depending on the high-frequency contents of your signal.

author: mawyatt
author_rank: Super Contributor
timestamp: September 18, 2025, 01:06:58 pm
content: Quote from: gf on September 18, 2025, 09:04:55 amThe post bygfabove ^^ is an important point wrt to wide range FFTs (high F/low F).Longer sample records create moreaggregatesamples at the lower FFT frequency, similar to higher sample rates create more samples at the higher FFT frequency. If one is interested in high resolution FFTs that cover awide frequency range, then higher sample rates are required (aliasing) for upper range frequencies and longer sample records (total record capture time period) for the lower frequency range.All this requires a high number of FFT time samples and higher (deeper) memory requirements for the signal capture FFT instrument (ADC card or DSO).Best

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 19, 2025, 04:47:33 pm
content: For the sampling part, using an audio (microphone?) input probably can work, but you very likely have to modify the hardware and remove the 20Hz to 50Hz or so high pass filter to be able to capture those low frequencies.There are also many "credit card sized" SBC's that run linux, and adding some ADC to that would be quite easy. I2C maybe does not have enough bandwidth, but SPI should work just fine (I2S is also a good option). But there is an additional issue. Timing is important. You will roughly have to divide the sample interval by the amplitude resolution to get your timing budget. I.e: If you sample at 1ksps with a 14 bit ADC, then the timing must be accurate to: 1/1000 / pow(2, 14) = 61ns As a result, you can't tolerate any interruption of your ADC. If you Linux SBC has to service an ISR in between, your data is broken. With I2S, the sampling / data stream is handled by the hardware and is uninterrupted. Another option is to use a microcontroller to get accurate timing, and use SPI only for bulk transfer of the data.Recently I've been looking into the ADS131A02 This EUR 8 ADC has it's own crystal inputs, and does synchronous sampling of multiple channels, and buffers the data for reading. It's got plenty of bits (24 of them) but real resolution is a tradeoff with the sampling interval, which is common for delta sigma ADC's.Using a (modified) audio card (can even be USB) is probably the simplest / quickest option.