Author Topic: FFT and 60 Notch filter software  (Read 3595 times)

0 Members and 1 Guest are viewing this topic.

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19517
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: FFT and 60 Notch filter software
« Reply #75 on: March 14, 2024, 11:48:40 pm »
It is always good to check and verify your understanding by experiment.

You can do this yourself...

Apply a since wave signal to the input, and monitor how that appears in your .wav file and audacity.

Tweak the amplitude until the magnitude is full scale peak to peak without clipping.

Measure the input signal, not forgetting the standard RMS to peak-peak conversion.R

Sanity check: reduce the input signal by a factor of 10, and verify the numbers seen in audacity match that.

Summary: do the bloody experiment yourself, and stop asking us to guess about your setup.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: FFT and 60 Notch filter software
« Reply #76 on: March 15, 2024, 12:57:07 am »
It is always good to check and verify your understanding by experiment.

You can do this yourself...

Apply a since wave signal to the input, and monitor how that appears in your .wav file and audacity.

Tweak the amplitude until the magnitude is full scale peak to peak without clipping.

Measure the input signal, not forgetting the standard RMS to peak-peak conversion.R

Sanity check: reduce the input signal by a factor of 10, and verify the numbers seen in audacity match that.

Summary: do the bloody experiment yourself, and stop asking us to guess about your setup.

Did it. The error is 0.001  or about 0.1%.. from   0.926 (5V)  to 0.0922 (0.5V).   

Why, does other ADC or typical sound card show more error? The E1DA was marketed to measure distortions (not for general playing music) so it is super accurate. And their technical team said it hasn't got any form of automatic gain control or clipping protection.

Super accurate $800 Netech 2.5mV output and BMA set to 2000 gain for 5V.

2072861-0

Super accurate $800 Netech 2.5mV output and BMA set to 200 gain for 0.5V.


2072867-1
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: FFT and 60 Notch filter software
« Reply #77 on: March 15, 2024, 02:07:11 am »
Assuming your equipment is portable and battery powered, how about going into the middle of a nature park reserve, which is a long distance away from any powerlines, TVs, power supplies, and any other electrical equipment.

You should be able to at least establish the noise floor performance of your equipment.  My suggestion is at least 1000m distance in all directions from any electrical device, but I don't know whether you have a location that size.

This is for testing your equipment only, I'm not suggesting you perform your actual experiments in the middle of nowhere!

Everytime there is interference, some frequencies can be determined, right? In the case of my 10uV input and 1000 bandwidth switched selected in the amp. Many here concluded it is wideband noise or already the noise floor. So it can't be interference. Well before I try to spend days going to the mountain in the middle of nowhere. I need first to figure out how a 5nV/sqrt (Hz) in the AMP01 becomes 1000nV/sqrt (Hz).   Because at 5nV/sqrt(Hz) and with bandwidth of 1000Hz, the noise is only 0.158uV and 10uV signal should look very good. How the AMP01 in the BMA-200 get noise of 2uV at 1000Hz (instead of 0.158uV) is a big mystery I'm trying to figure out. Any ideas guys? Have you encountered any amplifier with noise over 1000 worse than in datasheet? The broadband noise or even noise floor has no particular frequencies so many here concluded they are not interferences.
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: FFT and 60 Notch filter software
« Reply #78 on: March 15, 2024, 02:33:58 am »
Only the 60 Hz noise is powerline.

There is a mystery 78 Hz noise.

The main noise is broadband noise - which looks like noise floor, but by my calculations it is about 100-150 nV/sqrt Hz - much higher than specified noise of the AMP01. It could be noise from the waveform generator.

However, note that BMA-200 specifies 7uV noise - and your recording shows less noise than this.

You could try measuring the noise directly by using a 1 kohm resistor instead of the waveform generator. It would be interesting to have a series of recordings with different waveforms and 1 with just a resistor - all settings left exactly the same.

The BMA-200 has this noise spec "Wideband noise, RTI  <7µV P-P". I figured the wideband noise has full 50kHz selected so for the AMP01 5nV/sqrt(Hz) * sqrt (50000) = 1118nV rms or 7000nV P-P. I know Referred to input means the output is measured that includes all the components including the ADC noise. But still.. 1118nV is good estimate for noise at 50000Hz. But for noise at 1000Hz. It is only 0.158uV rms. So where do you think the 100-150nV/Sqrt (Hz) broadband noise came from in the 10uV signal? You asked me to use 1 k Ohm resistor. I did it and here is the result:

1k resistor, all same setting

2072987-0

10uV, 50Hz all same setting

2072993-1

So the broadband noises don't come from the Netech simulator because the resistor also made those noises. So what do you think is the origin of the broadband noise at your estimated 100-150nV/Sqrt (Hz)? I have 2 units BMA and it can't be both AMP01 were damaged. Or maybe they are? What is your other theory WatchfulEye?  I am clueless now. Thanks.
« Last Edit: March 15, 2024, 02:36:19 am by loop123 »
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: FFT and 60 Notch filter software
« Reply #79 on: March 15, 2024, 07:32:45 am »

I decide to initiate bypass operation to tap directly into the +IN and -IN of the AMP01. I will cut into some part of the pcb. I have 2 sets and one will be sacrifice. Each costs $1595 so don't want to destroy much. So to tap into the +IN and -IN, i'll directly connect the Netech output into them without using any other components? Because I think somewhere en route to it is the source of the broadband noise analyzed by some of you.

BMA front and back (xray mode)

2073203-0

2073209-1
 

Offline nali

  • Frequent Contributor
  • **
  • Posts: 657
  • Country: gb
Re: FFT and 60 Notch filter software
« Reply #80 on: March 15, 2024, 11:18:18 am »
Did it. The error is 0.001  or about 0.1%.. from   0.926 (5V)  to 0.0922 (0.5V).   

Why, does other ADC or typical sound card show more error? The E1DA was marketed to measure distortions (not for general playing music) so it is super accurate. And their technical team said it hasn't got any form of automatic gain control or clipping protection.

It might be super-high resoludion and linearity, but that's not the same as accuracy.

I can't see any refernce to it above, but have you tried terminating the ADC input to characterise its noise? If you don't know the characteristics of your measuring device then everything else is academic.

Out of interest are you making differential measurements all along the line, or are you feeding single-ended inputs into the diff amp somehow?
 

Offline WatchfulEye

  • Regular Contributor
  • *
  • Posts: 110
  • Country: gb
Re: FFT and 60 Notch filter software
« Reply #81 on: March 15, 2024, 11:55:31 am »
So the broadband noises don't come from the Netech simulator because the resistor also made those noises. So what do you think is the origin of the broadband noise at your estimated 100-150nV/Sqrt (Hz)? I have 2 units BMA and it can't be both AMP01 were damaged. Or maybe they are? What is your other theory WatchfulEye?  I am clueless now. Thanks.

Well it must be the measurement setup somewhere. The most likely point is the input the amplifier. I've looked at some of the photos again, and it looks like there is an additional amplifier or head stage before the BMA? What is that? If it is before the BMA, then it will be contributing to noise, potentially more than the BMA.

Isolated amplifiers may sacrifice noise and bandwidth performance in order to achieve isolation.
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: FFT and 60 Notch filter software
« Reply #82 on: March 15, 2024, 02:39:23 pm »
So the broadband noises don't come from the Netech simulator because the resistor also made those noises. So what do you think is the origin of the broadband noise at your estimated 100-150nV/Sqrt (Hz)? I have 2 units BMA and it can't be both AMP01 were damaged. Or maybe they are? What is your other theory WatchfulEye?  I am clueless now. Thanks.

Well it must be the measurement setup somewhere. The most likely point is the input the amplifier. I've looked at some of the photos again, and it looks like there is an additional amplifier or head stage before the BMA? What is that? If it is before the BMA, then it will be contributing to noise, potentially more than the BMA.

Isolated amplifiers may sacrifice noise and bandwidth performance in order to achieve isolation.

The small box is just empty (see below). It used to be the chassis of the ISO122 isolator but I found out at 1mV and 1000Hz and above, it has ripple noises and we traced it to the ISO122. So I removed the isolator pcb and just used the chassis as connector box for the 1.5mm touchproof sockets.

2073869-0

The Netech has differential outputs. I'm still asking the designer if his E1DA ADC could cause the noises and asking about the inputs shorted way of testing noises.

2073875-1

In the BMA. I traced the following and found out it has clamping protection, and the inputs didn't go directly to the AMP01. Instead it goes to the LF412CP CHIP (the left is 1In-, 1In+) and detours elsewhere before going to the AMP01. Can I just bypass the inputs directly to the AMP01? I plan to remove the chip, and put another empty socket with the +IN, -IN not connected to the pcb but instead directly to Netech, this would work?  I don't want to damage the board irreversibly because I plan to use the 2 pcs of BMA for 2 channels.

2073881-2
« Last Edit: March 15, 2024, 02:43:54 pm by loop123 »
 

Offline WatchfulEye

  • Regular Contributor
  • *
  • Posts: 110
  • Country: gb
Re: FFT and 60 Notch filter software
« Reply #83 on: March 15, 2024, 03:48:57 pm »
Can you provide wav files for the resistor and new measurements. The files I had have very low signal - looks like gain was set wrong, and this may cause errors in the noise calculation (the wrong gain setting may mean the ADC/quantisation noise is contributing excessively in the earlier files).

I've looked at the photos of the BMA-200. Looks like the input stage is the LF412C, which conditions the signal before going to the AMP01. The LF412C is quite a low noise op amp, but still a lot higher than the AMP01. There are also a lot of resistors in the signal path, which can also add noise. I can't read the values off the resistors near the LF412C, so don't know if these are contributing much. It might be interesting to know these, to calculate the noise contribution of teh individual components before any modifications are made.
 
The following users thanked this post: loop123

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: FFT and 60 Notch filter software
« Reply #84 on: March 15, 2024, 04:39:25 pm »
Can you provide wav files for the resistor and new measurements. The files I had have very low signal - looks like gain was set wrong, and this may cause errors in the noise calculation (the wrong gain setting may mean the ADC/quantisation noise is contributing excessively in the earlier files).

I've looked at the photos of the BMA-200. Looks like the input stage is the LF412C, which conditions the signal before going to the AMP01. The LF412C is quite a low noise op amp, but still a lot higher than the AMP01. There are also a lot of resistors in the signal path, which can also add noise. I can't read the values off the resistors near the LF412C, so don't know if these are contributing much. It might be interesting to know these, to calculate the noise contribution of teh individual components before any modifications are made.

The IN- for example is connected to the blue Bourn variable resistor and many resistors (didn't do complete trace of the portion before because I thought it was not necessary but now there seems no other choice but to do full trace to know the source of the dreaded noise at 10uv 1000Hz up). Here are the front photo without using Inkscape transparent mode.

2074184-0

2074190-1


 

Offline WatchfulEye

  • Regular Contributor
  • *
  • Posts: 110
  • Country: gb
Re: FFT and 60 Notch filter software
« Reply #85 on: March 15, 2024, 06:41:14 pm »
I've extracted the input conditioning circuit and done a noise simulation using some estimates from some datasheets for the LF412.

The sim shows approx 750 nV rms input referred noise over a 1 kHz bandwidth - but note that there is a separate buffer for both In- and In+ - so the sum is approx 1 uV rms. Using the typical estimate of Vnoise p-p as 6x Vnoise rms - this gives a broadband noise of approx 6 uV p-p - which looks approximately consistent with the supplied files (although I haven't reviewed one with the gains set correctly).

It might be possible to replace the LF412 with a more modern and lower noise op-amp. I haven't checked catalogs. You might be constrained by the DIP package, but you might be able to use an SMD adapter to convert a SOIC dual op amp to DIP.
« Last Edit: March 15, 2024, 06:44:02 pm by WatchfulEye »
 
The following users thanked this post: loop123

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: FFT and 60 Notch filter software
« Reply #86 on: March 15, 2024, 08:50:00 pm »
I've extracted the input conditioning circuit and done a noise simulation using some estimates from some datasheets for the LF412.

The sim shows approx 750 nV rms input referred noise over a 1 kHz bandwidth - but note that there is a separate buffer for both In- and In+ - so the sum is approx 1 uV rms. Using the typical estimate of Vnoise p-p as 6x Vnoise rms - this gives a broadband noise of approx 6 uV p-p - which looks approximately consistent with the supplied files (although I haven't reviewed one with the gains set correctly).

It might be possible to replace the LF412 with a more modern and lower noise op-amp. I haven't checked catalogs. You might be constrained by the DIP package, but you might be able to use an SMD adapter to convert a SOIC dual op amp to DIP.

Deja Vu. We have focused on the Iso-Z isolation head in the thread "Can changing amplifier in Sullen-Key filter affect the frequency response much?" last Feb 4. https://www.eevblog.com/forum/beginners/can-changing-amplifier-in-sullen-key-filter-affect-the-frequency-response-much/  my initial message was altering the values used in the LF411CP in the ISO-Z Isolation head box.  Is the LF412 in the BMA another Sallen-key filter?   Near the end of the thread. The solution there was to increase the gain to 100X before going to the ISO122. I tried it, it worked. But I didn't continue using the ISO-Z because I'm using pure batteries in the BMA and people convinced me no galvanic isolation needed. Also, I didn't use it because at microvolts. I'm afraid the dc converter may contribute some noises as well as retained noises even after 100x gain. At that time my target was 1mV. But lowered it to 10uV now. The message of RFDX was the first time he gave figures of the chip (there I learnt to compute noises) where he said.

"The noise spectral density of the ISO122 is 4uV/SQR(Hz) ("Noise" on p.5 of the datasheet). To get the noise voltage (RMS) multiply with SQR(bandwidth-in-Hz). With the bandwidth switched to the max. of 50kHz, the noise voltage at the output would be 0.894mV RMS. That is alot for an input signal of only 1mV (RMS?). With a bandwidth of only 100Hz, the noise voltage is only 40uV RMS. The main amplifier also contributes some noise to the output but it is probably very little in comparison to the ISO-amp and can be ignored.

Fig. 12 in the datasheet shows the unfiltered 20mVpp ripple from the 500kHz clock feedthrough plus the broadband noise from the ISO-amp. Fig. 13 shows only the broadband noise at the output after being filtered by the additional 50kHz Sallen-Key lowpass filter. The 500kHz ripple is gone (buried in noise). The broadband noise has at least 6...7mVpp. Divide this by 6.6 to get the RMS value."

My solution for it was to eliminate the ISO-Z entirely that was why in my 2nd to last message. I showed you picture of the inside of the ISO-Z without the pcb. Going now to the main BMA-200. What if I will just eliminate the LF412C stage. You said "LF412C, which conditions the signal before going to the AMP01". What is the purpose of conditioning it? Why happens if it is not conditioned and the input goes directly to the +IN and -IN of the AMP01? Thanks.
« Last Edit: March 15, 2024, 08:52:14 pm by loop123 »
 

Offline WatchfulEye

  • Regular Contributor
  • *
  • Posts: 110
  • Country: gb
Re: FFT and 60 Notch filter software
« Reply #87 on: March 15, 2024, 09:40:16 pm »
The BF412 in the BMA-200 acts as a pre-amplifier with gain of 2 and very high input impedance. It also provides trimming for CMRR and DC offset.  Due to its near infinite input impedance and very low bias current, it has near zero current noise, so is ideal for buffering very high impedance signal sources.

The AMP01 is bipolar input, rather than FET input like the BF412. As such it has higher bias currents and higher current noise, which means that if the impedance of your signal is more than about 200 kOhms, it will likely give more noise than the BF412.

I've downloaded your last wav file, and done some measurements with it. Unfortunately, the netech simulator does not appear to be properly specified, and none of the documentation states what "10 uV" means (rms, VPeak, or Vpeak-peak). In order to do calculations I've just had to assume that the netech is calibated, and by what is meant by amplitude. In my previous calculations I'd assumed rms, but after some consideration, I wonder if it is supposed to be Vp-p.

Anyhow, assuming that it is Vp-p, then I estimate around 60 nV/sqrtHz broadband noise in the 50-100 Hz range, rising below about 50 Hz - which is pretty close to what I simulated for the BF412 input stage.

Some physiological amplifiers specify noise over a band, which can make comparison difficult. For example, one amplifier specifies 0.4 uV rms between 1-30 Hz. This is a fairly average for FET amplifier, and basically equivalent to the BF412 amplifier in the BMA-200 (i.e. this amplifier would provide similar noise to your current system).
« Last Edit: March 15, 2024, 10:19:09 pm by WatchfulEye »
 
The following users thanked this post: loop123

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: FFT and 60 Notch filter software
« Reply #88 on: March 15, 2024, 11:26:55 pm »
The BF412 in the BMA-200 acts as a pre-amplifier with gain of 2 and very high input impedance. It also provides trimming for CMRR and DC offset.  Due to its near infinite input impedance and very low bias current, it has near zero current noise, so is ideal for buffering very high impedance signal sources.

The AMP01 is bipolar input, rather than FET input like the BF412. As such it has higher bias currents and higher current noise, which means that if the impedance of your signal is more than about 200 kOhms, it will likely give more noise than the BF412.

I've downloaded your last wav file, and done some measurements with it. Unfortunately, the netech simulator does not appear to be properly specified, and none of the documentation states what "10 uV" means (rms, VPeak, or Vpeak-peak). In order to do calculations I've just had to assume that the netech is calibated, and by what is meant by amplitude. In my previous calculations I'd assumed rms, but after some consideration, I wonder if it is supposed to be Vp-p.

Anyhow, assuming that it is Vp-p, then I estimate around 60 nV/sqrtHz broadband noise in the 50-100 Hz range, rising below about 50 Hz - which is pretty close to what I simulated for the BF412 input stage.

Some physiological amplifiers specify noise over a band, which can make comparison difficult. For example, one amplifier specifies 0.4 uV rms between 1-30 Hz. This is a fairly average for FET amplifier, and basically equivalent to the BF412 amplifier in the BMA-200 (i.e. this amplifier would provide similar noise to your current system).

https://www.eevblog.com/forum/projects/instrumentation-amplifier-modification-or-replacement/

If I can't do away without the BF412, then I may need to replace the AMP01 itself. In this above 4 page thread I asked people what is the best replacement. They said the AMP01 5nV/Sqrt(Hz) is difficult to beat. They didn't know it requires the BF412 which can add a lot of noise. Do you know what FET or other amplifiers that can be used that can replace both BF412, AMP01 and doesn't have that broadband noise at 10uV at 1000Hz and higher? It is ok if the pins are not the same as the AMP01.. I can rewire it in the socket. I have 2 pcs of BMA and one can be used as experimental board for the new amp replacement. You can reply in that thread so people who have thought about the replacement can comment on it too. Many thanks.
 

Offline WatchfulEye

  • Regular Contributor
  • *
  • Posts: 110
  • Country: gb
Re: FFT and 60 Notch filter software
« Reply #89 on: March 16, 2024, 12:15:57 am »
I've had a quickj look for some alternatives to the LF412.

You could try something like an OPA2132P, which should be a direct plug in replacement. It has a much lower noise of 8nV/sqrt Hz.

There are lower noise amplifiers but they are things like SOIC packages which will need adapters to be soldered in. You are also limited by the 4.99 kOhm resistors which each contribute 9 nV/sqrt Hz of noise - so once the OPA2132 is in, the resistors will be the biggest noise source.

If you really fancy getting some SOIC-8 to DIP-8 adaptors, then something like an OPA827 could be tried, but it is diminishing returns because of the resistors.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf