ADC and/or Programmable Gain Amplifier Help - Page 1
Forum section: electronics / projects

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 08:51:29 pm
content: I'm building a project that needs to measure voltages at or below 1mV. I'm looking for an ADC & programmable amp that will allow me to see these signals in a reliable way, with as little noise as possible. Does anyone have any suggestions? I was thinking about usinghttp://ww1.microchip.com/downloads/en/DeviceDoc/21805B.pdf, but I don't know what kind of programmable gain amp I should use, or if I should try and get a higher resolution ADC.

author: danadak
author_rank: Super Contributor
timestamp: May 20, 2016, 09:35:59 pm
content: PSOC has a 20 bit DelSig on it, with a .1% reference and ARM controller.Differential in as well. Also a DFB (Digital Filter Block) in case you need tofilter, and DMA to make the whole signal chain take care of itself.Go to Cypress.com, tons of videos on tools and families.http://www.cypress.com/products/32-bit-arm-cortex-m-psocSee attached list of modules you drag and drop onto design canvass and use.Regards, Dana.

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 09:38:16 pm
content: Thanks, but I was looking for something that could be addressed via I^2C or SPI.

author: Kleinstein
author_rank: Super Contributor
timestamp: May 20, 2016, 09:53:48 pm
content: If there is enough time for the measurement, I would use a higher resolution sigma delta ADC. Many of them have an internal programmable gain (actually only a different type of sampling, but the effect is similar).So an MCP3421 might be good enough.

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 10:05:15 pm
content: 2.048 v (voltage ref) / 18 bits = 0.113 microvolts per bit, I don't think that's good enough. You said there was an internal programmable amp, which, at max, is 8x, (+- 0.5 mv * 8 = 4mv ) but would that create signal degradation, or would it be fine?

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 10:07:24 pm
content: Also, the datasheet has v+ and v-, which is a differential input, correct? So if I have a signal that is between ground and 1mv, would I put v- to ground?

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 10:14:29 pm
content: Also, I would have 2 of these on the same I2C bus. Where are the address bits on the data sheet?

author: danadak
author_rank: Super Contributor
timestamp: May 20, 2016, 10:35:08 pm
content: The PSOC can be interfaced via -1) I2C2) SPI3) USB4) Byte, Nibble, Word interface5) One wire6) UART7) Proprietary linkAll the above in one chip.......Regards, Dana.

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 10:37:47 pm
content: Quote from: danadak on May 20, 2016, 10:35:08 pmThe other chip seems like a cheaper solution, and it takes up less board space. Considering I only have about 60mm by 30mm to work with, I'll take the smallest chip available that can do what I need.

author: rs20
author_rank: Super Contributor
timestamp: May 20, 2016, 10:40:53 pm
content: You haven't really specified the problem properly... please state these specs:-- Maximum signal amplitude-- Required accuracy-- Required resolution-- Required Sample rate / BandwidthDepending on your answers, the right solution could be a 24-bit Sigma Delta DAC, or it could be a bunch of analog gain (not necessarily programmable?) followed by a dead-standard 8-bit ADC.

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 10:43:23 pm
content: Quote from: rs20 on May 20, 2016, 10:40:53 pmThe amplitude of the input signal will range between 0v and 1mvThe device needs to be as accurate as possible (little noise)The resolution can be anything above 10 bitsThe sample rate is trivial, my device will only sample at 500hzThis looks like a good idea:Quote from: Kleinstein on May 20, 2016, 09:53:48 pm

author: rs20
author_rank: Super Contributor
timestamp: May 20, 2016, 10:52:22 pm
content: Quote from: tyguy2 on May 20, 2016, 10:43:23 pmThe MCP3421 is a wonderful part, I've used it with great success in the past, but the bit depth/sample rate tradeoff doesn't work for your specs. 12-bit mode only samples as 240 SPS, and the LSB at 8x gain and 12-bit mode is 125uV -- which means that with a maximum signal swing of 1mV, you'll only have three "actual" bits. The MCP3421 can't operated at 500 Hz under any circumstances.18-bit mode could give you ~2uV LSB, which corresponds to 9 actual bits in your usecase, but only gives 3.75 SPS (yes, less than four readings per second).To clarify, when you say the resolution must be about 10 bits, do you mean you want the LSB to be 1uV or finer? It's a little clearer if you state resolution as a minimum step size.For the record, I'd endorse an analog stage with a bandwidth of 1 kHz and a gain of 1000 or so (using some sort of chopper amp or similar). Fortunately it's not at all difficult to get a gain of 1000 at such a low bandwidth. At that stage you have a 1V signal that you want to sample with 1mV resolution, which is totally easy with all manner of different ADC technologies.

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 11:12:19 pm
content: Quote from: rs20 on May 20, 2016, 10:52:22 pmHmmmmm... How would I use a chopper amp? Would using an analog gain be easier?

author: rs20
author_rank: Super Contributor
timestamp: May 20, 2016, 11:30:22 pm
content: I don't know what an "analog gain" is...A chopper amp is just a particular way of making an op-amp with extremely low offset voltage (which is what you want). So you use a chopper amp just like any other op amp. (Look up the EEVBlog episode (#24) on chopper amps.)TheMAX4238/4239seems like a reasonable choice. (It's actually not a chopper amp, but something even fancier. Instead of saying "chopper amp", I should have just said "very low offset voltage op amp")Keep in mind that having a single-ended input at 0 to 1 mV is really annoying to deal with. If at all possible, you should connect the negative of whatever sensor you're using to a resistor divider, since it's much easier to measure the difference between 2.500001 V and 2.500000 V than it is to measure 0.000001 V. Having said that, if the input signal must be referenced to ground, there are other workarounds (e.g. power the opamp from +/- 2.5V, or use a more complex feedback arrangement that shifts and gains at the same time.)Edit: Looks like this particular op-amp's inputs work down to ground! So the only issue is the outputs, the op-amp will never quite be able to output 0V. So you might still want to shift the output for that reason.Do you need this thing to give absolute DC accuracy from the moment it switches on? Or, like a pair of electronic scales, is it OK for it to assume 0 input and do a little calibration on power-up?

author: tyguy2
author_rank: Unknown
timestamp: May 20, 2016, 11:51:25 pm
content: Sorry, I was making a distinction between a PGA and an Analog device.The output can be calibrated, as long as it mimics the microvolt signals. So does this op amp work just like a regular op amp? I can just set it to a gain of 1000 like I would a normal op amp?

author: rs20
author_rank: Super Contributor
timestamp: May 21, 2016, 12:10:12 am
content: Quote from: tyguy2 on May 20, 2016, 11:51:25 pmYep, it's a perfectly normal op-amp -- just with outstanding offset voltage specifications. You can use the perfectly standard non-inverting op-amp configuration. But I think it'd be good to add a feedback capacitor to make it a lowpass filter as well, to enforce your 500Hz/1kHz bandwidth (and kill a lot of noise in the process).http://www.electronics-tutorials.ws/filter/fil28.gif?81223b"Simplified non-inverting amplifier filter circuit" athttp://www.electronics-tutorials.ws/filter/filter_5.html

author: tyguy2
author_rank: Unknown
timestamp: May 21, 2016, 12:23:06 am
content: Awesome! Now, the other chip has a max update rate of 240. Do you know of any other diffierencial signal chip that can get to 500?This one but faster basically:Quote from: Kleinstein on May 20, 2016, 09:53:48 pm

author: rs20
author_rank: Super Contributor
timestamp: May 21, 2016, 12:29:18 am
content: Have a go searching around on Digikey -- I'll let you know if what you find is suitable.

author: tyguy2
author_rank: Unknown
timestamp: May 21, 2016, 12:41:57 am
content: I'm on mobile right now, I'll get back to you in a bit.

author: danadak
author_rank: Super Contributor
timestamp: May 21, 2016, 12:58:55 am
content: There is a technique called correlated double sampling that reduces offsets and noise ina dramatic way.http://www.cypress.com/documentation/application-notes/an66444-psoc-3-and-psoc-5lp-correlated-double-sampling-reduce-offsethttp://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.464.2858Regards, Dana.

author: tyguy2
author_rank: Unknown
timestamp: May 21, 2016, 02:16:44 am
content: Hmm.. I can't really find a fast ADC that uses SPI or I2C that runs at 500 SPS. Whenever I find something, it has way too many extraneous pins and is way to big to fit on the board. Any ideas?

author: tyguy2
author_rank: Unknown
timestamp: May 21, 2016, 02:24:03 am
content: Quote from: tyguy2 on May 21, 2016, 02:16:44 amhttp://www.farnell.com/datasheets/1852921.pdfPerhaps something like this? What kind of bus does this use? I looks like a SPI bus, but it it says Serial Data Bus. Also, (pictured below) would the resistors and caps mess with the op amp's gain? I need the differential inputs.

author: rs20
author_rank: Super Contributor
timestamp: May 21, 2016, 02:35:56 am
content: Nicely done, that's one of the two ADCs I came up with when doing my own search! (I love it when two people arrive at the same solution to the same problem).That diagram you showed is demonstrating the use of the ADC in a thermocouple application -- some of the components there are not relevant to you. Having said that, the RC filter at the input is recommended. An RC stage (as long as R is reasonably large) won't mess with the op-amp's gain, as the op-amp has a low-impedance output and so isn't perturbed by any loads you put on it (within reason, R should be sensible). The bus is SPI-compatible, it says so in the datasheet. But it is a little bit more than that, for example, when a conversion completes, the DOUT pin is pulled low (so that you know new data is available). This is probably why they hesistate to call it "SPI" without qualification.

author: tyguy2
author_rank: Unknown
timestamp: May 21, 2016, 02:46:44 am
content: That's pretty funny that we came up with the same chip.So how would I attach a SPI bus to this? I'm going to post a schematic soon, so you can check to make sure I did everything right, if that's ok with you.

author: tyguy2
author_rank: Unknown
timestamp: May 21, 2016, 03:04:05 am
content: Ok, so this is one input on the ADC. I added a cap on the input of the ADC. If I had differential signals, I would just do the same thing on each input, correct?

author: rs20
author_rank: Super Contributor
timestamp: May 21, 2016, 03:55:11 am
content: SPI is straightforward, you have the data lines to and from the chip, the clock, and the chip select pin. It should be self-evident how these line up between the ADC and the MCU.Your circuit looks good, except you must add a resistor between the op-amp output and the ADC input. A C by itself will do nothing but stress out the op-amp (and possibly make it go unstable). You want an RC filter.If you had differential inputs, you'd use a resistor on each line, and a capacitor bridging the two ADC pins (like the 1uF and 500 ohm resistors shown in the diagram you sent). Extra caps (like the 0.1uF caps shown in the diagram) may be useful to, but less so that the differential capacitor.

author: tyguy2
author_rank: Unknown
timestamp: May 21, 2016, 04:50:11 pm
content: So this is what a differential input would look like? (I'm using the 1uf cap (c7) for decoupling)

author: rs20
author_rank: Super Contributor
timestamp: May 21, 2016, 11:41:03 pm
content: You've got the 1uF cap on the wrong side of the 500 ohm resistors. It goes input, resistor, capacitor || output.

author: nctnico
author_rank: Super Contributor
timestamp: May 22, 2016, 12:54:13 am
content: I'd look for an ADC with an internal PGA. TI has several of these (but not cheap). Using external opamps will most likely cause all kinds of problems with offsets and noise.

author: tyguy2
author_rank: Unknown
timestamp: May 22, 2016, 12:59:58 am
content: Quote from: nctnico on May 22, 2016, 12:54:13 amQuote from: rs20 on May 20, 2016, 10:52:22 pmWe already went over this. The analog solution can give me a higher resolution for cheaper. If you can find something that has a high resolution at 1mv, please tell me, because it would be way easier.

author: tyguy2
author_rank: Unknown
timestamp: May 22, 2016, 01:08:16 am
content: Perhaps something like this, but smaller?http://www.ti.com/lit/ds/sbas661b/sbas661b.pdf

author: tyguy2
author_rank: Unknown
timestamp: May 22, 2016, 07:31:44 pm
content: Also, if I'm measuring negative voltages, would a simple DC offset work (ADC doesn't do negative voltage, and I don't want to create a negative voltage ref), or would that introduce too much noise?

author: danadak
author_rank: Super Contributor
timestamp: May 22, 2016, 11:26:53 pm
content: You are basically asking for 1 uV resolution or better, and I assume you have acommon mode environment to deal with.Here are some ap notes dealing with noise and basics of PCB issues -https://www.dropbox.com/s/2h96beh1fbvz4e2/noise_notes.zip?dl=0https://www.dropbox.com/s/ruaf9booe17jk8n/PCB%20Layout.zip?dl=0My first instincts to do this would be to examine low noise instrumentation amps.Noise tools -http://www.analog.com/en/design-center/interactive-design-tools/adi-diffampcalc.htmlRegards, Dana.

author: tyguy2
author_rank: Unknown
timestamp: May 22, 2016, 11:30:34 pm
content: So what about the DC offset? How would I measure these negative voltages.Edit:Nevermind, it looks like the chip has the integrated in it.

author: danadak
author_rank: Super Contributor
timestamp: May 22, 2016, 11:34:59 pm
content: What are you measuring ? A bridge type sensor, a ground referenced sensor ?Regards, Dana.

author: tyguy2
author_rank: Unknown
timestamp: May 22, 2016, 11:35:53 pm
content: I'm measuring the human heat beat/ muscle signals.

author: danadak
author_rank: Super Contributor
timestamp: May 22, 2016, 11:58:29 pm
content: Then for sure this is a differential measurement because of the high CM environment. This toolalso helps to pick an IA for the application in terms of input CM range and output saturation.http://www.analog.com/en/products/amplifiers/instrumentation-amplifiers.htmlUse the analog tool to evaluate the noise previously.Regards, Dana.

author: danadak
author_rank: Super Contributor
timestamp: May 23, 2016, 12:14:25 am
content: Also at analog.com look at the 24 bit DelSig A/Ds. Some of them have a cm range that includes50 mV below ground.Regards, Dana.

author: tyguy2
author_rank: Unknown
timestamp: May 23, 2016, 08:28:55 pm
content: So what would you recommend? Should I use the Instrumentation Amplifiers to amplify the signal going into the ADC? I don't see any ADC's on Analog.com that can detect 50 mV below ground. All of the products they offer are just modulators. Also, all of these chips use CMOS to communicate, not SPI or I2C. Maybe I'm missing something...

author: andy1
author_rank: Contributor
timestamp: May 24, 2016, 08:52:46 pm
content: You mentioned that the application is ECG/EMG so have you looked at TI ADS1298 (or even ADS1299 for lower noise) they are designed just for this application and it has 16/24b adcs , frontend PGA:s etc integrated. Samplerates go up to kiloherz range and default is actually 500. I am using the 8 channel ADS1298 for ECG capturing and it works really well, there are smaller models with less channels also but similar performance etc.

author: danadak
author_rank: Super Contributor
timestamp: May 24, 2016, 09:40:53 pm
content: Delta Sigma selection guide -http://www.analog.com/en/parametricsearch/10825?mtuid=bd62016050314188bdabc76d71314342#/p1746=1.25|10000000&p4364=Sigma-DeltaRegards, Dana.