Should I Use an Opamp for Low Frequencies - Page 1
Forum section: electronics / projects

author: aw_rw1
author_rank: Contributor
timestamp: February 17, 2022, 09:31:56 pm
content: I have a signal that goes from 0V to 2V. The signal is coming from the washer of a POT. The signal can have three frequencies 4, 12, and 22 Hz.Also I have an Arduino that has a 10bit ADC. I tested the ADC with a function generator set to 0.1-1.0V sinusoidal signal at those frequencies. I am getting 0.01V and -0.01V error when I look at the pk-pk of the signal. Is there a better way to to measure the signal? I would like error to be 0.001V and -0.001V.I was considering amplifying the signal by 2x. But after looking at opamps, I don't think opamps is the way to go. There is a 1/f noise at low frequencies. Should I be worried about this noise? What kind of op amp do you recommend to go this route? Or should I use a different amplifier topology? Maybe a basic transistor amp would do? Or is there anything other way that could improve accuracy?

author: TimFox
author_rank: Super Contributor
timestamp: February 17, 2022, 09:47:05 pm
content: All active devices have “pink” noise (approximately 1/fspectral power density) that is important at low-enough frequencies. The “corner” frequency is that below which the extra noise is visible above the “white” noise. As an over-generalization, BJTs have the lowest corners, JFETs are above that, and MOSFETs’ corner is above JFETs’. In an op amp, you can buy ICs with any of these devices at the input. There are more exotic op amps with chopper inputs that may be useful, depending on frequency and impedance.For low frequency amplification, you want a low corner frequency, which depends on the device and it’s operating conditions. Having chosen a transistor or IC, you will get the best noise figure (q.v.) at a specific source impedance; a good low-loss transformer may be needed to transform your actual source impedance to that value. Adding resistance in series or parallel with the source will always make the signal/noise ratio worse, as will loss in the transformer.A “function generator”, as opposed to a low-distortion oscillator, could easily have an error of 1% in its sinusoidal waveform: what is the spec on yours?

author: magic
author_rank: Super Contributor
timestamp: February 17, 2022, 10:03:20 pm
content: That's the theory, but in practice OP cares about some millivolts while noise in opamps is a matter of microvolts. Even thermal drift of crappy opamps may be tolerable - LM358 datasheet specifies 7µV/°C typical (with no guaranteed limit) so it should be less than 1mV over any reasonable temperature span for most specimens.That being said, I'm not sure what the problem with this measurement is and whether any amplification or buffering would help.Are you sure that the test signal has exactly the amplitude you expect?Is there any variation of ADC output amplitude with frequency?Does the ADC output the expected values with 0.1V DC and 1V DC input?

author: aw_rw1
author_rank: Contributor
timestamp: February 17, 2022, 10:08:58 pm
content: The function generator that I am using is a Keysight 33210A. This generator should be super accurate.Here is the data sheet for it:https://www.keysight.com/us/en/assets/7018-01868/data-sheets/5989-8926.pdfOn page 3, the key characterizes are given.

author: aw_rw1
author_rank: Contributor
timestamp: February 17, 2022, 10:23:29 pm
content: Quote from: magic on February 17, 2022, 10:03:20 pm1. Are you sure that the test signal has exactly the amplitude you expect?I assume the generator is exact.2. Is there any variation of ADC output amplitude with frequency?I tried different frequencies and amplitudes. I was always getting a pk-pk larger by .01V on the top end and -.01V on the low end.3. Does the ADC output the expected values with 0.1V DC and 1V DC input?The ADC sees noise with a DC voltage. I could get the noise out with an averaging filter with several samples."LM358 datasheet specifies 7µV/°C typical (with no guaranteed limit) so it should be less than 1mV over any reasonable temperature span for most specimens" That is right, just 7uV/c. So this amp should be fine to use.

author: uer166
author_rank: Super Contributor
timestamp: February 17, 2022, 10:43:25 pm
content: 0 to 2V with a 1mV accuracy is a 1:2000 dynamic range with <0.5 LSB error. I highly doubt you'd be able to coerce that kind of accuracy out of the ATMega 10 bit ADC (or any/most MCU ADCs). For this you'd use an external Sigma-Delta, or a higher resolution SAR ADC.

author: Someone
author_rank: Super Contributor
timestamp: February 17, 2022, 10:48:34 pm
content: Quote from: aw_rw1 on February 17, 2022, 10:08:58 pmDid you read those accuracy specifications?The un-calibrated measurements you obtained are well within the tolerances of the source. So which end of the chain is wrong and by how much?

author: aw_rw1
author_rank: Contributor
timestamp: February 17, 2022, 10:58:08 pm
content: QuoteYah, I was considering this. Thanks for the confirming.There is a breakout for ADS1115 with 16 bits that I am interested in. I will try this first before implementing an amp.

author: jmelson
author_rank: Super Contributor
timestamp: February 18, 2022, 01:57:40 am
content: The best low-frequency op-amp I know of is the AD706. It is individually TESTED for 1/f noise at 1 mHz (that's 1 milli-Hertz!) It is not a high-bandwidth device, but great for low frequency work.Jon

author: Someone
author_rank: Super Contributor
timestamp: February 18, 2022, 02:10:15 am
content: Quote from: jmelson on February 18, 2022, 01:57:40 amBlimey, that testing would be expensive. But I dont see it mentioned anywhere in the datasheet (rev G). Modern zero drift chopper stabilized parts (say OPA2180) are usually cheaper as they can achieve the performance without as extensive trimming/testing/binning.

author: fourfathom
author_rank: Super Contributor
timestamp: February 18, 2022, 03:29:29 am
content: Quote from: uer166 on February 17, 2022, 10:43:25 pmOr just consider the 10-bit A/D. 210= 1024. Divide 0-2V by 1024 and you get 1.96 mV per step (more or less). Even with a perfect, noise-free A/D you're not going to get 1mV resolution, you will be lucky to get 2mV. And this of course depends on what A/D reference voltage you are using. Is it something like 2.048V? That gives you 2mV resolution.With a 12-bit A/D you've at least got a fighting chance.By the way, how fast are you running that A/D? You generally need to sample at least 2X the highest frequency component (in your case 44 Hz). Faster is better.

author: aw_rw1
author_rank: Contributor
timestamp: February 18, 2022, 06:14:11 pm
content: QuoteI am using the default reference voltage and the input voltage is from a USB. So the ref voltage is 5VDC. I didn't know I could change the ref. Interesting..QuoteI am sampling the A/D as fast as Arduino can analogRead(). Other than reading, it outputs the min and max every 0.1s to an LCD breakout board through I2C. I am sure 22Hz is not a problem for it.

author: ejeffrey
author_rank: Super Contributor
timestamp: February 18, 2022, 07:18:33 pm
content: Quote from: aw_rw1 on February 18, 2022, 06:14:11 pmThe USB voltage is not particularly accurate or stable. For this level of accuracy you would definitely want a dedicated reference.

author: fourfathom
author_rank: Super Contributor
timestamp: February 18, 2022, 07:48:59 pm
content: Arduino A/D reference voltage:https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/With a 5V reference and a 10-bit A/D the resolution will be 5V/1024 = 4.883 mV.

author: RoGeorge
author_rank: Super Contributor
timestamp: February 18, 2022, 08:07:26 pm
content: What arduino board do you use?IIRC there are at least two internal reference voltages available to select, one option is to have 5V as full scale for the ADC, and the other one is 1.1V full scale:https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/To increase the resolution without any opamp, you can use a divider by 2 for the max 2V you want to measure (by adding a series resistor the same value as the potentiometer), then measure the resulting 0...1V range with the Arduino ADC set for 1.1V full scale.Apart from that, you can add a few more bits of resolution by oversampling (do many measurements at the fastest speed, then average them to get a result with more than 10 bits of resolution).

author: fourfathom
author_rank: Super Contributor
timestamp: February 18, 2022, 08:44:11 pm
content: Quote from: RoGeorge on February 18, 2022, 08:07:26 pmRoGeorge, I'm sure you know this, but oversampling only increases resolution in the presence of noise or other dithering, and this noise/dither has to be in excess of 1 LSB and preferably not synchronized to the sampling rate (I will admit such noise is fairly common).For example, I've got a digital temperature probe that has about 1/2 degree resolution. For each measurement I sample it about 100 times with an integrate/dump filter and while I do see increased resolution around the discrete sensor steps, the intrinsic noise isn't enough to completely smooth between the steps -- the transfer function is a stairstep with fuzzy sloping risers. I've actually considered attaching a small heater resistor to the sensor, which I could rapidly power on and off to give me about 1-degree of temperature dither. I would have to calibrate-out the temperature increase caused by the unidirectional dither.

author: RoGeorge
author_rank: Super Contributor
timestamp: February 18, 2022, 09:17:44 pm
content: Good point about the level of noise.It's curious your ADC was that clean of noise, in the few Arduino I've used, the ADC was jumping around at least 3-5 counts or so even when measuring very clean voltage sources, like a battery. I bet your ADC for the thermal probe was not from an Arduino, is it? My Arduino UNO and Nano I've tried used to be very noisy as ADCs.

author: fourfathom
author_rank: Super Contributor
timestamp: February 18, 2022, 09:51:55 pm
content: Quote from: RoGeorge on February 18, 2022, 09:17:44 pmThis probe was one of the DS18B20 "1-wire" digital thermometers so the A/D was internal to the chip. I've also used the SAMD internal ADC for thermistor and diode junction-voltage measurements, but I don't recall the amount of noise. There was definitely some though.

author: jmelson
author_rank: Super Contributor
timestamp: February 18, 2022, 11:25:34 pm
content: Quote from: Someone on February 18, 2022, 02:10:15 amI selected this part to replace a conventional op-amp in the power regulation for a very sensitive ASIC we made for nuclear research. The data sheet at the time showed 1/f curves down to .001 Hz and the device, when we tried it, worked vastly better than what we used before. We had been getting "steps" in the performance of the ASIC every 5 minutes or so. After putting the AD706 in the same circuit, the steps were totally gone, to the best of our ability to measure. We were able to see steps in the supply voltage with a 6-digit Keithley meter that correlated with the ASIC response. But, we had to leave the Keithley meter on overnight to stabilize before making the measurement.Jon

author: jmelson
author_rank: Super Contributor
timestamp: February 18, 2022, 11:29:32 pm
content: Quote from: aw_rw1 on February 18, 2022, 06:14:11 pmYou gotta be KIDDING! That is not stable at all! We use an LM4140-2.5 running from a 4 V filtered source through an AD706 op-amp to generate the various voltage references we need for some of our research equipment. That has proven to be amazingly stable and free of drift.Jon

author: fourfathom
author_rank: Super Contributor
timestamp: February 19, 2022, 12:25:14 am
content: Remember, the OP wants 1mV resolution, so something less than perfect will probably be sufficient. "How much less" is the question now. Also, if he is reading the wiper of a potentiometer that is itself tied to the 5V reference, then the ref noise cancels out. 5V / 212= 1.22 mV per bit with a 12-bit A/D. Add some oversampling and with the internal noise as dither and it might be good enough.But "1mV" isn't really a useful metric -- instead we probably should be talking about "degrees of rotation". Until then, I guess we're stuck with 1mV.

author: aw_rw1
author_rank: Contributor
timestamp: February 22, 2022, 06:56:35 pm
content: Sorry for the late response.QuoteI am using Arduino Uno Rev 3. This one has an ATmega328QuoteYes, the 5V is that bad. It ranges from 5.1011V-5.1035V. The 3.3V ref is not soo bad. It ranges 3.2978V-3.2979V. At the moment, the 3.3V ref is fine until I get a proper voltage ref.

author: Kleinstein
author_rank: Super Contributor
timestamp: February 22, 2022, 07:13:51 pm
content: With a 10 or 12 bits ADC and a 2-3 V FS range there is no need to worry about the amplifier. The AVRs ADC can be relatively low noise (that is to little noise to make the oversampling wirking well), but the resolution is still very limited. You need to worry about the amplier when looking for a few µV or less.With amplification one could still get µV resolution at the input. 4 to 22 Hz are not jet really low in frequency - one could still get away with normal non AZ OPs. An important point is how much gain and what souce impedance.

author: fourfathom
author_rank: Super Contributor
timestamp: February 22, 2022, 07:27:45 pm
content: Quote from: aw_rw1 on February 22, 2022, 06:56:35 pmThe voltage that you want to measure comes from the wiper of a potentiometer. What is the source of the voltage that is connected to the top of the pot? If this is unsteady then it may not help to use a precision Vref for the ADC. You may want to look at a ratiometric design.But more important, figure out what is good enough. Design for that.

author: TimFox
author_rank: Super Contributor
timestamp: February 22, 2022, 07:40:29 pm
content: Applying the same voltage to the "top" of the potentiometer and the "ref" of the ADC is a common way to make a ratiometric measurement, which does not rely (much) on the stability of the reference voltage.

author: fourfathom
author_rank: Super Contributor
timestamp: February 22, 2022, 08:07:34 pm
content: Quote from: TimFox on February 22, 2022, 07:40:29 pmAgree, and I did mention this technique up-thread. I'm curious to learn what the actual circuit looks like.

author: Bassman59
author_rank: Super Contributor
timestamp: February 22, 2022, 08:14:02 pm
content: Quote from: TimFox on February 22, 2022, 07:40:29 pmFunny, I just designed a thing that reads a bunch of pots and that's exactly what I did.

author: aw_rw1
author_rank: Contributor
timestamp: February 23, 2022, 04:36:20 pm
content: QuoteI was thinking this too.QuoteI used a Sorensen lab power supply. Then I started using batteries. The battery's voltages were clean when I read voltages from the stack. Though the voltages off a POT were noisy. So what could I do about this? I am seeing numbers between 670-685 out of 1023. Average of ten of these numbers is 676.92.QuoteInteresting, I may do this.

author: aw_rw1
author_rank: Contributor
timestamp: February 23, 2022, 04:40:58 pm
content: QuoteI looked at some voltages around the system with the ADC. Then I put back the wiper on the ADC. The noise went away. So the noise most had been a contact issue.

author: aw_rw1
author_rank: Contributor
timestamp: February 23, 2022, 04:43:32 pm
content: QuoteActually, the noise was coming from my laptop's charger. I plugged my charger. Then the noise came back.