analog front end for adc - Page 1
Forum section: electronics / projects

author: Jacky_88
author_rank: Contributor
timestamp: August 06, 2017, 05:56:09 pm
content: Hello,I'm currently working on an analog front end for an ADC. The front end is designed for use in strain gauge application. From my experience I know, that noise is crucial with this topic and I would like to get some advice from you.The bridge is driven unipolar (DC) with 5V on V+ and GND on V- The first IC is a INA122 (U15) followed by a 3rd order acrive lowpass filter. For the active filter a LM6482 is used. The second half of the opamp is used for a lowpass filter on a 2.5V reference. The idea for this setup was to filter both the signal and the reference voltage before going to the ADCs inputs. The PCB is designed as a 4-layer PCB with the stacking Signal/GND/VCC/Signal.I would be very happy to get some feedback on this design

author: David Hess
author_rank: Super Contributor
timestamp: August 06, 2017, 06:08:02 pm
content: Noise is not such a big deal with strain gauges; you will run out of linearity and hysteresis before noise becomes a problem. Drift is more important than noise.Being a micropower part, the INA122 is marginal for both drift and noise however except in low precision applications.

author: Jacky_88
author_rank: Contributor
timestamp: August 06, 2017, 06:31:13 pm
content: ok, so you suggest replacing the INA122?

author: David Hess
author_rank: Super Contributor
timestamp: August 06, 2017, 06:41:09 pm
content: Quote from: Jacky_88 on August 06, 2017, 06:31:13 pmIt depends on the application. If you are making a bathroom scale, then low power is more important and the INA122 is a good choice.Gain error drift with instrumentation amplifiers that use an external gain setting resistor can also be a problem. With that in mind, an INA131 which has a fixed gain of 100 would be a better choice.

author: Jacky_88
author_rank: Contributor
timestamp: August 06, 2017, 06:47:35 pm
content: Low power is definetly not a point, the circuit is powered from a power supply. Ok, I will try to get and use the INA131. Do you think the rest of the design is ok? I'm thinking of using additional guard traces etc.

author: David Hess
author_rank: Super Contributor
timestamp: August 06, 2017, 07:59:36 pm
content: I did not take that close a look.Instead of powering the strain gauge from Vcc, use 2 x Vref or use 1/2 Vcc as your reference. By applying the same reference to the strain gauge and ADC, reference drift cancels out. This is called ratiometric conversion. If you do it right, reference noise cancels out as well.In load cells we just used the output from a 7815 to power the load cell and as a reference for the ADC. Ratiometric operation cancelled out the high drift of the 7815.The LMC6482 has pretty horrible common mode rejection which may limit linearity.

author: gamalot
author_rank: Super Contributor
timestamp: August 06, 2017, 09:23:04 pm
content: There are many ADCs designed for bridge sensors, most of them have build-in PGA in front end.

author: danadak
author_rank: Super Contributor
timestamp: August 06, 2017, 11:22:28 pm
content: CDS another approach -http://www.cypress.com/documentation/application-notes/an66444-psoc-3-and-psoc-5lp-correlated-double-sampling-reduce-offsethttps://www.bioee.ee.columbia.edu/courses/upload/Bibliography/enz_procieee_1996.pdfRegards, Dana.

author: floobydust
author_rank: Super Contributor
timestamp: August 06, 2017, 11:48:39 pm
content: I would have some RF filtering on the input (ferrite beads etc.) particularly if the strain gage is far away, and a GND pin for shielded cable or chassis connection.INA Pin 5 REF I don't think you leave floating verses to GND.Depending on the quality of the strain gages, you might need span/offset pots or provisions for resistors.I had bad luck with the LMC6482, I find it noisy 37nV/?Hz and offset all over the place after reflow and any PC board flex.Not sure how many bit ADC or your budget.

author: splin
author_rank: Frequent Contributor
timestamp: August 07, 2017, 01:06:48 am
content: Quote from: Jacky_88 on August 06, 2017, 06:47:35 pmThe INA131 is horribly expensive though at $6 to $7 in 1000 off quantities, plus another $1 for the LMC6482. For less than half the price you could get a 24bit ADC with a x128 PGA with input referred noise of 65nV rms or less - eg. AD7797. The 16-bit version, AD7796 is even cheaper.Using a sigma delta ADC means you can dispense with an anti-alias filter, or at least get away with a simple low pass RC filter. As David Hess pointed out, by using the ADC reference to excite the bridge, most of the gain and noise errors go away. A 2-layer PCB should be perfectly OK and save a bit more money. The main error sources beyond the strain guage itself will be the gain drift with temperature and integral non-linearity of the ADC (INL), and thermal EMFs.Only you know your requirements though - if you're trying to develop an instrument to use to replace the standard kg or need high speed measurements then a cheap sigma-delta won't cut the mustard.If you want really cheap then look at the < 40 cents 24 bit Chinese HX711 and 80 cents Nuvoton Technology NAU7802 or the 18 bit MCP3142 (< 60 cents in small quantities from China, but 8x max PGA gain).Alternatively, consider a microcontroller with a sigma-delta ADC and PGA which should still cost a lot less than the INA131. Eg. the $2.3 STM32F373 has a 16bit convertor with 32x PGA (but the linearity isn't good at +/-200 to +/- 400ppm depending on reference voltage and PGA gain (ie. equivalent to 11 to 12 bits). Noise performance won't match dedicated ADC chips, but as they are quite fast at 50KSPS for a single channel, you can improve that considerably by averaging. TI, Freescale (now NXP), Silicon Labs amongst others have similar devices.The Cypress PSOC 5 microcontrollers have a 20 bit sigma delta ADC with similar noise performance to the '373 but rather better maximum linearity error of +/- 32ppm (equiv. to 15 bits, but that is without the PGA - linearity with the PGA is unspecified). They are a lot more expensive though at approx $10. Corrected AD7989 to AD7797 (AD7789 doesn't have a PGA). Added ADC/PGA gain drift with temperature as one of the major error sources.One other advantage of the dedicated ADCs, such as the AD7797 is they typically include switches to allow the internal offsets of the ADC and PGA to be calibrated out when required. Using the instrumentation amplifier you would have to provide an analog switches or relays to short the amplifier inputs to provide the same functionality.Many low cost ADCs have input multiplexors which would also allow you to calibrate out the gain errors/drift of the ADC and PGA by switching the input to a known reference voltage using voltage divider resistors connected to the same bridge excitation voltage. The resistors would obviously have to have appropriate precision and stability specifications. Doing the same with an external amp would require additional switches (and control signals), but that would allow a cheaper amp to be used as offset and gain drift would no longer be important.

author: David Hess
author_rank: Super Contributor
timestamp: August 07, 2017, 03:46:07 am
content: Linear Technology application note 43 has an excellent discussion of the various bridge measurement topologies:http://www.linear.com/docs/4134In practice, all of them can provide more accuracy than a strain gauge bridge will support. The first one shown on page 3 is the most common but I think the last one on page 4 has the best accuracy at a given cost.Delta-sigma converters which can directly digitize the low output signal levels from a strain gauge bridge are newer than that application note and work great.

author: Jacky_88
author_rank: Contributor
timestamp: August 07, 2017, 06:47:37 am
content: Quote from: splin on August 07, 2017, 01:06:48 amOk. I'm using the the ADS1248Quote from: splin on August 07, 2017, 01:06:48 amThat is interesting. Buty why?Quote from: splin on August 07, 2017, 01:06:48 amMy first version of this board is a 2-layer PCB. I switched to 4 layers because I thought, that all the trace for the different supply voltages (VCC, VDD, 2.5V REF, 5V REF) lying next to the signal traces have an negative influence on accuracy. And since I'm not an electronics engineer, routing the pcb is a complicated job. Especially the earlier mentioned ADS1248 drives me crazy. I might switch to the ADS131A02 anyway - or an ADC with a similar package because the ADS131A02 lacks the PGA.Quote from: splin on August 07, 2017, 01:06:48 amI want to replace the standard scale with a liitle extra of resolution (eg. 10th of a g and 5kg max).EDIT: changed milligramms to gramms.Quote from: splin on August 07, 2017, 01:06:48 amMost sellers in germany don't even have the "normal stuff"Quote from: splin on August 07, 2017, 01:06:48 amI tried to switch to STM's microcontrollers. Would you please give me some hints for a good IDE? That would be really niceQuote from: splin on August 07, 2017, 01:06:48 amQuote from: splin on August 07, 2017, 01:06:48 amOk, I get the point.That was a lot of input, but that's why I set the project for discussionThis is a hobby project and ordering PCBs in quantities < 5 isn't cheap anyway, it don't really care on one 1€ more or less spent on parts. My aim is to get a more or less stable bit value to convert.The attachment shows the distrubition of bit values I read from the ADC using the front end I showed earlier. In my eyes, this measurement is unuseable.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 07, 2017, 06:52:48 am
content: No RFI filtering or ESD protection on the input? Gonna trust that INA122 to handle the nasty outside world by itself?Tim

author: David Hess
author_rank: Super Contributor
timestamp: August 07, 2017, 01:58:57 pm
content: Quote from: Jacky_88 on August 07, 2017, 06:47:37 amDelta-sigma converters sample the input at high frequency and process the bit stream to produce a result. The high input sampling rate relaxes anti-aliasing requirements considerably.QuoteThat is about 1 or 2 orders of magnitude more accuracy that a strain gauge will produce under typical ideal conditions. The extra resolution is still useful but do not count on improved accuracy.QuoteUsually, and this applies to a delta-sigma converter as well, an integration period which is some multiple of the power line frequency is used to cancel out interference. 0.1 seconds will cancel both 50 and 60 Hz interference and if you check the datasheets for instrumentation type delta-sigma converters, their frequency response has nulls resulting from this which land on 50 and 60 Hz and their harmonics.Digital multimeters do the same thing which is how they get such high normal mode rejection.

author: Jacky_88
author_rank: Contributor
timestamp: August 07, 2017, 04:20:41 pm
content: Quote from: T3sl4co1l on August 07, 2017, 06:52:48 amUnfortunately yesMight that help? (exact values will be determined)

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 07, 2017, 04:44:08 pm
content: Yes, that's good.C2 isn't really needed, you get CM and diff filtering from C1 and C3 already. Remember to use junction diodes, not schottky diodes: the leakage current would introduce error here! BAV99 is a common choice.Tim

author: Jacky_88
author_rank: Contributor
timestamp: August 07, 2017, 05:43:07 pm
content: Quote from: David Hess on August 06, 2017, 07:59:36 pmSo a dedicated voltage reference like a REFXX is not necessary. 7805 or a similiar IC connected to REFP of the ADC and the bridge will do the job?

author: gamalot
author_rank: Super Contributor
timestamp: August 07, 2017, 06:11:16 pm
content: Quote from: Jacky_88 on August 07, 2017, 05:43:07 pmIt is not necessary to use any voltage reference, make sure the load cell's excitation voltage and ADC's reference voltage are connected together or proportional.

author: David Hess
author_rank: Super Contributor
timestamp: August 07, 2017, 06:17:26 pm
content: Quote from: Jacky_88 on August 07, 2017, 05:43:07 pmThat is correct. In the highest performance applications, there may be some advantage to using a low noise reference to provide *both* the excitation to the strain gauge and the reference for the ADC allowing ratiometric operation however a standard regulated supply is enough if ratiometric operation is used. If the ADC has a built in reference, using it to supply the excitation works well.Ratiometric operation cancels out drift and noise from the excitation source which would otherwise create gain error and lower resolution.There are other tricks which may be used as well. Load cells are often remotely mounted from the weighmeter and connected using a long shielded cable which contributes a gain error because of the temperature coefficient of the long excitation wires. The load cell might be compensated to account for this, or a 6 wire cable could be used with separate force and sense wires for the excitation, or an excitation current could be used instead of an excitation voltage. None of this is required if the load cell is embedded; the wiring is too short to matter then.

author: texaspyro
author_rank: Super Contributor
timestamp: August 08, 2017, 01:11:06 am
content: 0.1 mg resolution of a 5 kg weight... with a strain gauge...Sorry to burst your bubble, but lets do some math...5 kg -> 5,000,000 mg. 0.1 mg is 50,000,000 parts. That's 1 part in 50 million... call it a 26 bit ADC. With most strain gauges you are lucky to get 1 part per thousand in the real world.And of course you are ignoring basic things like air buoyancy, environmental, leveling, etc effects.To get better than 1 part per thousand of meaningful data out of a scale requires a LOT of ultra-precision mechanical voodoo. Check out what is involved in laboratory analytical balances.My best balance can read 20 grams with microgram resolution... call it 24 bits. The weigh chamber has three layers of IR blocking glass... even your body heat from across the room can cause air currents large enough to affect readings. It has to be mounted on a concrete pillar to bedrock for optimum performance... even then keeping it level is an exercise in frustration. It can detect the change in gravity between two floors of a building.I did some design work on the electronics for a scale that could read 1g to nanogram resolution (30 bit mass to digital converters, anyone?). It operated in a vacuum, thermally controlled to < 1 millidegree, diamond film flexures, piezo nanostepper leveling, laser interferometers... just begin to scratch the surface of the juju that went into that beast.

author: Jacky_88
author_rank: Contributor
timestamp: August 08, 2017, 05:40:10 am
content: Quote from: texaspyro on August 08, 2017, 01:11:06 amBig ups. My fault. My 5€ hausehold scale has a minimum resolution of 1g within a range of 5kg. I just want to boost that to a minimum of 0.1g. So 5,000g. Not 1 part in 50M but 1 in 50,000. Your right, a resolution down to mg would be extreme.I try to ccorrect that in my earlier post.Ok, that was my initial request for this project. As I've seen I don't even get the basics right

author: Jacky_88
author_rank: Contributor
timestamp: August 08, 2017, 02:03:32 pm
content: Quote from: David Hess on August 07, 2017, 03:46:07 amThe amp showed in figure 11 is extreme intereseting. I came across LTC1043 before and I'm familiar with this IC. Since I'm interested in weighing liveless objects, this circuit might be usefull.

author: branadic
author_rank: Super Contributor
timestamp: August 08, 2017, 03:28:39 pm
content: Intersting to notice, that so many people still use the classic ADC approach. Even though you can measure in ratiometric mode, your are still limited in vertical resolution of the ADC.Have you checked the PicoStrain approach (PS081, PS09)? If not, you might want to risk to check this onhttp://www.acam.de/products/picostrain/together with the additional white papers, application notes and datasheets. Once understood how to handle them they give you amazing results, resolution and accuracy.EDIT: You can ask for evalkits and single parts at the german distributorhttps://www.is-line.de.-branadic-

author: wraper
author_rank: Unknown
timestamp: August 08, 2017, 03:40:32 pm
content: This is what I use, the downside is fixed gain of 160. The upside, less than $1 in parts, low offset and drift, very high impedance of REF input.

author: David Hess
author_rank: Super Contributor
timestamp: August 08, 2017, 03:54:29 pm
content: Quote from: Jacky_88 on August 08, 2017, 02:03:32 pmThe LTC1043 based bridge amplifier is not strictly necessary and could be replaced with one of the other high performance bridge amplifiers. The delta-sigmal converters discussed which have differential inputs effectively implement the function of the LTC1043 and chopper stabilized LTC1150 internally.The fast settling dual time constant output filter is interesting. Weigh scale settling time has always been a problem for both mechanical and electronic reasons.The scale is not going to have 1 part in 30,000 accuracy but that has nothing to do with distinguishing small changes as shown when it is being used as a ballistocardiograph.Quote from: branadic on August 08, 2017, 03:28:39 pmThis is because you run out of strain gauge accuracy before you run out of ADC accuracy and resolution. This was the case even in the 1980s when integrated dual slope integrating converters (1) with up to 40,000 counts were used. Better ADCs are not needed and development has instead focused on more integration for lower cost with delta-sigma converters.Even before the 1980s, resolution and accuracy of the ADCs was not a limitation. Assuming you avoided the problems with dielectric absorption in integrating capacitors, the big issues were offset voltage drift and resistor stability. Precision operational amplifiers like the OP-07 and integrated chopper stabilized amplifiers really made things easier.(1) In the 1980s, Texas Instruments and Intersil sold a lot of dual-slope integrating converters for applications like these. In some cases these were the same parts going into handheld digital multimeters and you can still buy their descendants.

author: branadic
author_rank: Super Contributor
timestamp: August 08, 2017, 05:07:16 pm
content: I read WP004 and found the performance very promissing. This was the trigger for me to evaluate and later use this devices in some applications.http://www.acam.de/fileadmin/Download/pdf/PICOSTRAIN/English/WP004_en.pdf- 200.000 stable divisions (almost 1Mio. effective divisions) for an OIML3000 load cell with PS081- only half bridge necessary- temperature compensation integrated (PS09)- fully digital, no analog frontend- up to 10kHz measuring rate- integrated µC- single chip solution with low power consumption-branadic-

author: splin
author_rank: Frequent Contributor
timestamp: August 08, 2017, 07:58:53 pm
content: Quote from: Jacky_88 on August 07, 2017, 06:47:37 amHmm... It would have been helpful if you'd told us this in the first place and that you'd already built it! But never mind...QuoteSince its only a one-off then a 4 - layer PCB is probably a good idea especially as you are looking for low nano-volts resolution. I see that the ADS1248 datasheet shows an example layout.QuoteYou really should take a look at the microcontroller forum as this has come up a few times. My favourite is Embitz (www.embitz.org) as it is very quick (unlike the Ecllipse based tools) and has a good debugger with live watchpoints and memory views. And unlike some of the other free tools it's really easy to get started - just install and go. No need to spend hours trying to set up Openocd or the like.Unfortunately Windows 10 has currently broken the STLink/V2.1 debug interface which is built into the cheap STM Nucleo boards and Discovery boards - it's related to the STLink driver(s). Some development tools still work including ST's own ST Visual Developer but Embitz usually doesn't. However you can buy very cheap clones of the older STLink V2 on Ebay which still work.More importantly the main problem with Embitz is that you are beholden to the author for bug fixes and further development - especially support for new procssors - and the documentation is not very comprehensive. However, the author and others are generally very responsive to questions on his forums and there are some good tutorials. Bug fixes and new development seems to be quite slow now which is not surprising as the author has to make a living - he's mostly doing it for free, so for the price it's quite outstanding. Things would, no doubt, improve if more people would sign up for the annual $49 subscription which gets you a few extras.QuoteThat's a lot of noise! What value of R29 did you use to set the INA229 gain?What was the ADS1248 PGA gain setting?What is the load cell output in mV with 5kg load?Are you using the 2.5V reference output (filtered by U10-B) for the bridge excitation and what generates it?What reference is the ADS1248 using?

author: Jacky_88
author_rank: Contributor
timestamp: August 09, 2017, 06:11:21 am
content: Quote from: splin on August 08, 2017, 07:58:53 pmQuote from: splin on August 08, 2017, 07:58:53 pmyes. Switching back to a 2 layer pc with a working circuit is always possible.Quote from: splin on August 08, 2017, 07:58:53 pmI already downloaded it and grabbed my Nucleo. It feels like visual studio.In my eyes STmicro did a fundamental mistake by not publishing an IDE for their microcontrollers. For professionals there are solutions from ARM and co. They even offer afreeversion for the F0 series - Very clever when advertising nucleo boards with F10X controllers as the easiest way to get started with their products. As hobbyist or someone who starts designing products based on STmicro's chips you are completly left (exposed) to the open source software.For me, Atmel did a much better job by using visual studio as IDE. One IDE for all products. Less confusion by the users and thus less effort on support and it's free. I can't even download the STLink driver without registering my E Mail adress. That is a huge plus for Atmel. The downside for me cleary is the ASF used with their AVR32.For now, I will try EmBitz. I didn't see it in their list of IDEshttp://www.st.com/en/development-tools/stm32-ides.html?querycriteria=productId=LN1200Quote from: splin on August 08, 2017, 07:58:53 pmQuote from: splin on August 08, 2017, 07:58:53 pm200Ohms resulting in a gain of ~1000 (way to much, I know now)Quote from: splin on August 08, 2017, 07:58:53 pm1Quote from: splin on August 08, 2017, 07:58:53 pmAbout 50mV measured between IN+ and IN-. But I think, that isn't correct. 50mV times 1000 would give 50V output by the amplifier neither is the maximum reached, because changes in load were still shown.Quote from: splin on August 08, 2017, 07:58:53 pmNo. It is used for the INA122 REF-Pin and the AINN of the ADCQuote from: splin on August 08, 2017, 07:58:53 pmREFP0 is a 5V reference (which makes no sense)REFP1 is VDD.

author: Jacky_88
author_rank: Contributor
timestamp: August 09, 2017, 06:36:38 am
content: Quote from: wraper on August 08, 2017, 03:40:32 pmThat looks impressivly simple. Is that all you do on input filtering? And why do you use 47nF decoupling capacitors? I usually see the 100nF used.

author: wraper
author_rank: Unknown
timestamp: August 09, 2017, 11:24:07 am
content: Quote from: Jacky_88 on August 09, 2017, 06:36:38 amSimply because it is used on the output of U1 too, just to keep the BOM shorter. EMI filtering on input also includes 2 resistors in series with inputs which are not present on the picture. C1 is X2Y capacitor, instead of it you can also use two of 1nF caps connected from each input to GND, and one 10nF cap between inputs. This circuit includes 2 pole low pass filter determined by C2 and C5. If the load cell itself is connected to GND of the rest of the circuit and wires are short, input EMI filtering is not needed.

author: splin
author_rank: Frequent Contributor
timestamp: August 09, 2017, 04:17:48 pm
content: QuoteI thought the debugging in AVR Visual studio 7 was significantly worse than in 4 (but I haven't used either very much). Embitz is not officially supported by ST, but generally seems to work very well - apart from the current Windows 10 problem (which isn't exclusive to Embitz). This is best discussed on the microcontroller forum though..QuoteNot necessarily, but there obviously is a limit to how much gain is beneficial.QuoteHmm. That doesn't look right. What is the output with no load applied? 45mV?QuoteOk. So what is used to generate the 2.5V reference?What is the filtered 2.5V out of U10B used for?What are you exciting the bridge with?QuoteWell its not ideal, but it it probably isn't a signifcant source of noise in your circuit. Still it's worth asking the question as to what are you using to create the 5V reference?

author: Jacky_88
author_rank: Contributor
timestamp: August 09, 2017, 07:56:52 pm
content: Quote from: splin on August 09, 2017, 04:17:48 pmI startet using 8 bit Atmels with the AVR dragon and Atmel Studio 6 (or was it already 7?) two years ago. Since I'm not a professional I don't know what professional developers require. For me, it is just magical seeing the bits changing in the registers while running my program on the chip.It is a little bit off topic, but Embitz says that my GDL server is not running.Quote from: splin on August 08, 2017, 07:58:53 pmQuote from: splin on August 08, 2017, 07:58:53 pmAh, I get the point. With no load appliead I read 0.4mV and with full load 2mV. I use hacked houshold scales.Quote from: splin on August 08, 2017, 07:58:53 pmIt's the negative input of one chanel. The 2.5V at the INA122's REF pin give me 2.5V at the positive input when no load is applyed (ideally). This allows me to measure "both ways" forces pushing and pulling on the scales .Quote from: splin on August 08, 2017, 07:58:53 pmThe excitation comes from a LM1117-5.0Quote from: splin on August 08, 2017, 07:58:53 pmThe 5V reference voltage is created using a REF195http://www.analog.com/media/en/technical-documentation/data-sheets/REF19xSeries.pdf, same with the 2.5V reference. Both references are filtered with a circuit smilar shown in the schematics of the 1248 EVM boardhttps://media.digikey.com/pdf/Data%20Sheets/Texas%20Instruments%20PDFs/ADS1148,1248EVM(-PDK)_Gde.pdf(D1-D2). The op amp in the filter is a LMC6482.-----------------------------------------------------back on topic-----------------------------------------------------I appreciate your comments and it seems, that I really messed things up. But I want to go on with this project. What about that front end? It is derived from the OPA388 datasheethttp://www.ti.com/lit/ds/symlink/opa388.pdf. My thoughts on the circuit:-TI uses it as an example for strain gauge measurement - it might work (besides it is a discrete INA122 )-I added the suggested input filtering (using X2Y caps saves space and improves performance).-I added a 1st order RC filter for the ADC-OPA388 is a zero drift amp (chopper?) giving me probably more stable results-I could use the OPA2388 minimizing the needed space.-Instead using the 5025 I could use a voltage divider (VCC to Gnd) feeding the negative input of the ADC too, making the measurement truly ratiometric-I could connect sense+ directly to REFP of the ADCOr just using the INA133