Reducing Noise for 24 bit ADC Weight Sensor - Page 1
Forum section: electronics / projects

author: benwis
author_rank: Contributor
timestamp: January 05, 2017, 02:41:07 am
content: I helped design a board for a big robot, and I'm having trouble getting a stable voltage for the ADC.I'm hoping someone on here can point out what I did wrong, or what I should fix, as I'm currently at a loss.I didn't draw the schematic, apologies for the awkwardness of it.So I've got an ATMEGA2560(Arduino Mega) hooked up to a 36V to 5V DCDC module on the PCB. The DCDC module is a Delphi Series V36SE, which calims a voltage ripple of 60mVpk-pk. That's connected to an ACDC 36V isolated switching power supply.The ADC is connected to a MAX6167AESA+ voltage reference, which says it outputs 4.5V with an initial accuracy of +/-2mV. It's fed from the 5V output of the 36V DCDC converterI've programmed the ATMEGA2560 to get a weight reading by taking two data points, calculating the slope and intercept, and then assuming the actual readings were 0g and a reference weight. When I tried to get a reading from the weight sensor, I get wildly varying numbers. So I hooked up the oscilloscope to the analog voltage input of the ADS1231(after the voltage reference) and I got a Vpp reading of 250-300mV.Here's the output from the 36V to 5V DCDC converter:So I decided I'd try and see if it worked if I bypassed the 36V and 5V power supplies with my trusty isolated DC bench supply. Readings became normal, and the weight sensor code performed as expected. Ripple was also about 2mVpp measured on the oscilloscope.I experienced the same problem before, and then the group decided to add the MAX voltage reference to try to reduce the noise, but it seems to have had no effect at all.Can anyone tell me what I can do to reduce the voltage ripple coming out of the reference, why the reference doesn't seem to be working, what could be creating so much noise, or provide an alternative explanation for why the code works under a bench DC power supply and not under the acdc switching block connected to the dcdc power supply. My best guess is that if I can get a cleaner voltage source for the ADC, whether by filtering or some other method, my problems would go away. But the voltage reference doesn't seem to be working at all. Did I use it wrong? And why are the voltage ripples I'm measuring so widely out of spec? Any suggestions?

author: David Hess
author_rank: Super Contributor
timestamp: January 05, 2017, 03:25:06 am
content: What is the strain gauge resistance? The MAX6167 despite being a "high current reference" is not suitable for a common 350 ohm load cell which will draw up to 13 milliamps from 4.5 volts and probably force the MAX6167 into dropout. The actual load cell excitation resistance will likely be higher because of its modulus compensation resistor in series with one excitation input but not enough to help.See what kind of result you get with the MAX6167 bypassed and the digital 5 volt supply applied directly to the load cell and ADC reference input.While the excitation and output signals should be filtered, the ADS1231 operating ratiometrically will reject a lot of noise.

author: janekm
author_rank: Unknown
timestamp: January 05, 2017, 04:41:58 am
content: Voltage references are not very good at cleaning up that kind of noise from a power supply in my experience, despite optimistic claims for ripple rejection ("80dB at 120Hz", though your ripple is much higher frequency anyway).You'll want to filter the supply, perhaps both at the input and the output. If you add footprints for 2-stage filter networks at the input and output of the voltage reference (and a buffer at the output, since it can only tolerate very little output capacitance, perhaps following this suggestions from the ADS1231 page:https://webench.ti.com/webench5/pf/images/BlockDiag_GeneralSARa.png). Some good hints in this thread too:https://www.eevblog.com/forum/projects/ferrites-in-power-supply-good-or-bad-how-to-reduce-noise-on-vcc/Since the ADS1231 only consumes 900uA max from the analog supply, you should be fine with an RC filter network, which is the easiest option for filtering that kind of power supply noise (but I just noticed the point raised by David Hess, so this may not work in this case, and you should probably consider something like the buffered solution suggested by TI, or perhaps the capacitance multiplier suggested by evb149).

author: mmagin
author_rank: Frequent Contributor
timestamp: January 05, 2017, 05:07:39 am
content: Looking at the output of that DC/DC converter, a lot of the ripple is around 1 MHz. The MAX6167 datasheet suggests the PSRR at that frequency is only about 5 dB, so it's certainly not helping much to reduce the ripple. Most linear regulators / series voltage reference ICs just don't have the kind of bandwidth to do much about that kind of ripple. I would certainly try an RC low pass filter in front of it, for a start. The other suggestions are good too (especially giving the regulator some more headroom and considering whether it will dropout from the strain gauge excitation load!)

author: DaJMasta
author_rank: Super Contributor
timestamp: January 05, 2017, 06:18:00 am
content: So the noise is a little faster than 1MHz, do you know what frequency stuff on the board is running? Is your data clock somewhere around 1.1 or 1.2MHz? Are your data pin traces running alongside the voltage reference trace for a little bit on the board?Layout could be a concern, and there could be a lot of noise built into any off board power supplies in particular, if it's in a robot you're probably powering a bunch of actuators, and that can mean a lot of power supply noise. Bundling control signals along power lines can mean crosstalk and pulsed power hungry actuators can mean pretty significant ripple, though not typically at that frequency.That all said, I'm having some trouble reading your schematic. Are all the CLEAN-5V marked traces electrically attached? Is your 5V reference actually going off the board? Is your 5V reference actually the power source for your ADC? That reference is only going to be accurate for up to a few mA of current output (it lists a spec for < 5mA), it's not designed for being a standard voltage regulator, it's designed to be a reference point sinking very low current but with much more accurate voltage regulation. It's also worth mentioning that the output of a 6167 is 4.5V, not 5V (so CLEAN_5V is a bit misleading of a marker).

author: benwis
author_rank: Contributor
timestamp: January 05, 2017, 04:34:37 pm
content: Quote from: DaJMasta on January 05, 2017, 06:18:00 amThey're all connected. The guy I'm taking over for wasn't the cleanest in regards to schematics. CLEAN-5V is 4.5V, I don't know why he chose that label. They are all attached together. The 4.5V reference appears to be the only power source for the ADC. There are probably data lines a bit too close to the references. I think that's ok, since the load cells have a resistance of 1000 ohms and the ADC draws very little current. But I should probably add a buffer in the next board revision. There are three stepper motors, 2 NEMA23 and a NEMA31, attached to the board, and they produce a bit of noise. Suprisingly, turning off the stepper drivers doesnt seem to effect the noise much. The ATMEGA2560 is running at 16MHz, and there's a couple USB chips at 12MHz. The USB chips are about 4 inches away, and don't have a return path near the analog components. The ATMEGA doesn't really, although its much closer. I'll have to look at that. THanks for the tipQuote from: David Hess on January 05, 2017, 03:25:06 amI think its a Tal220 load cell, with an input and output resistance of 1000 ohms. I'll check on that tomorrow morning. The first version bypassed the MAX6167, it didn't have one.Same result as having the MAX6167. The ripple seems to continue on through. That would be about 0.5mA at 4.5V, so I don't think I've got that issue.Quote from: mmagin on January 05, 2017, 05:07:39 amIt seems like a lot of the noise is in the range of 1-20MHz, depending on when I look at the oscilloscope. I think they're right that I'm going to have to filter it somehow. I'm hoping to come up with a simple kludge just for the ADC. I wasn't involved in the board design, and they've bought and assembled about 10 of these things. I wonder if a one stage low pass filter before the voltage reference with a cutoff frequency of 0.5 Mhz might do it. What do you guys think?Quote from: janekm on January 05, 2017, 04:41:58 amYou're right, most of the noise seems to be from 1MHz to 20MHz. Since the resistance of the load cell is 1k, I think I'll be okay with the simple RC. A two stage filter or a capacitance multiplier might be a good choice.Quote from: evb149 on January 05, 2017, 03:18:50 amLots of good information there. I hadn't head of capacitance multipliers before, do you know a good page describing their use? All I've found is that they can be used to simulate a large capacitance with smaller components. I think you're 100% right with regards to the noise sources. There are a lot of issues related to decoupling caps and component placement already. I'll have to redesign the board eventually with your suggestions in mind. In the shorter term, I guess I'm still looking for a kludge for existing inventory.Are they any guidelines for when you would use a Common mode choking (CMCs), capacitance multiplier, differential mode LC filters or ferrite beads? Is it based on the expected input noise, space considerations, price, etc?There's a BLM21PG600SN1D ferrite bead on the input to the ADS, but it looks like it isnt doing much in the low Megahertz ranges.What's the best way to measure the frequency characteristics of the noise? Would a different ferrite bead with a higher resistance at 1MHz be enough to solve this issue? I read somewhere that there's also supposed to be a decoupling cap after the ferrite bead, to provide for high speed current increases. Is that still true.Thanks for all the help, I'm learning alot about noise sources lately. Do you have any book recommendations on noise suppression, filters, or electromagnetic compatability engineering? I've got Henry Ott's book, and it seems pretty thorough on the subjectEDIT: Going to get the parts for a two stage RC Lowpass filter, and feed the voltage input to the reference through it. I'm hoping this should remove enough of the noise to get an OK reading on the existing board. Simulation of the filter in LTSpice seems to have a -11dB drop at 1MHz. Anything I'm missing?

author: eeFearless
author_rank: Contributor
timestamp: January 05, 2017, 06:53:07 pm
content: The noise going into the voltage ref chip has characteristics at ~1.1MHz with ringing at ~13MHz. Neither a Vref chip or LDO will be much use at filtering that out, and looking at the PSRR curve on the Vref datasheet confirms that. So, adding more LDOs (although a great best practice) won't help in this instance. You'll need to cut that HF noise down before it gets to the Vref.Filtering may help. But, it may also be ineffective if those HF currents are spewing all over the ground and power planes.I would first look at where the source of those frequencies are originating from, and get good bypassing encircling that that chip, plus decoupling it from the rest of the supply distribution and grounds. Then, look into filtering (of whatever type).

author: eeFearless
author_rank: Contributor
timestamp: January 05, 2017, 06:58:23 pm
content: The TI app note SCAA082 on High-Speed Layout Guidelines has good tips ...

author: DaJMasta
author_rank: Super Contributor
timestamp: January 05, 2017, 09:39:45 pm
content: Quote from: benwis on January 05, 2017, 04:34:37 pmIt's worth mentioning that the core clock of the chips isn't the same as the clock that's communicating with the ADC or the frequency that the I/O pins actually switch at - SPI, I2C, and general IO switching on a micro like that could all be around 1MHz, though they may be from a couple hundred kHz to maybe 2MHz depending on configuration.And just as a demo of the basic math, if you actually have the "CLEAN_5V" line going directly into the load cells.... at 1k ohms, that's 4.5mA for just a single cell unless you've got additional resistance in a divider... which is almost out of regulation spec for the voltage reference. Even if the ADC is pretty power efficient, it will probably put it over into out-of-spec territory. My point of mentioning it is that a voltage reference is designed to be very stable into a high impedance source or other low current operation (it can also sink a little current), not for supplying current like a standard regulator. If you're going to be powering stuff, you'll see better results using a standard regulator instead of a reference.

author: eeFearless
author_rank: Contributor
timestamp: January 05, 2017, 09:42:44 pm
content: [If you're going to be powering stuff, you'll see better results using a standard regulator instead of a reference.]- This is also true.Is FB3 an actual ferrite bead component placed on the board? What does the signal look like on the scope, probing at AVDD (need to use the wire-wound spring ground on the probe to get a good ground).

author: benwis
author_rank: Contributor
timestamp: January 05, 2017, 10:53:47 pm
content: Quote from: eeFearless on January 05, 2017, 09:42:44 pmUnfortunately, the owner of this oscilloscope lost the spring probe a good while back. I jury rigged one with some stranded wire, hopefully that's ok. FB3 is included on the board. I hooked up the probe as you requested on the AVDD and an adjacent cap ground. The reference has been removed, and the 5V jumpered in as the main source.

author: benwis
author_rank: Contributor
timestamp: January 05, 2017, 11:07:27 pm
content: Quote from: DaJMasta on January 05, 2017, 09:39:45 pmYou're 100% right. The clock I/O line for the ADC is 5MHz. I'm not reading any other devices in that area, so other than some stable 5V signals, I can't think of anything else that would switch fast enough.Looking at the reading I got from after the ferrite bead, the ripple is fairly substantially reduced to ~28mVpp, and seems to be around 20-100kHz with a big spike at 40kHz.

author: DaJMasta
author_rank: Super Contributor
timestamp: January 05, 2017, 11:17:55 pm
content: May have to zoom out to see it, but mains hum inductively coupled through your breadboard jumper wires or your probe (60 or 50Hz, whatever your local standard)?Could be that it may not actually exist when the thing is properly built up.

author: benwis
author_rank: Contributor
timestamp: January 05, 2017, 11:33:28 pm
content: Quote from: DaJMasta on January 05, 2017, 11:17:55 pmThanks for responding, but It turns out I need coffe and was disconnecting the ground clip on the oscilloscope. I guess now I just need to get rid of the 1kHz-100kHz noise. It's too low frequency for a ferrite bead, should I just create a lowpass rc for it? What even produces noise that slow anyway?

author: eeFearless
author_rank: Contributor
timestamp: January 05, 2017, 11:34:36 pm
content: If I were designing the board, I would have put something like a 100nF bypass cap after the FB really close to the AVDD and Aref pins. That would be the first thing I would try.

author: eeFearless
author_rank: Contributor
timestamp: January 05, 2017, 11:37:45 pm
content: What's the part number of the FB?

author: benwis
author_rank: Contributor
timestamp: January 05, 2017, 11:48:18 pm
content: Quote from: eeFearless on January 05, 2017, 11:37:45 pmBLM21PG600SN1D

author: eeFearless
author_rank: Contributor
timestamp: January 05, 2017, 11:49:33 pm
content: And, put the Vref chip back in, and have that drive only the FB that goes to ADC AVDD/Aref (with that bypass cap I mentioned). Here, the Vref chip will help a lot with its PSRR.Then, have the dirty 5V just drive the digital. I would measure the dirty 5V again with the scope and the ground-spring probe, to see if the ripple is actually as big as you observed before (was that previous measurement actually valid). If it truly is that dirty, then you may want to sprinkle in a FB in for DVDD as well.

author: eeFearless
author_rank: Contributor
timestamp: January 05, 2017, 11:52:10 pm
content: [If it truly is that dirty, then you may want to sprinkle in a FB in for DVDD as well.]- Or maybe, at the output of the SMPS, to decouple it from the rest of the power plane ... ?

author: benwis
author_rank: Contributor
timestamp: January 05, 2017, 11:56:53 pm
content: Turns out I really need coffeeActual reading from ferrite bead is below. I had looked at the wrong picture, from when the DUT was powered from the bench supply. This is what it actually looks like under normal conditions. Regulator removed, device powered from various power supplies:Much worse than the last one.

author: eeFearless
author_rank: Contributor
timestamp: January 06, 2017, 12:00:12 am
content: Well, I don't know. Since it's easy, I would still first try adding the 100nF bypass right at AVDD/Aref.Otherwise, you've unwittingly implemented an advanced dithering ADC architecture ...

author: benwis
author_rank: Contributor
timestamp: January 06, 2017, 12:20:48 am
content: Quote from: eeFearless on January 06, 2017, 12:00:12 amAdded capacitor as requested. I also hooked up the 2 stage RC filter I described in an earlier post to the voltage after the ferrite bead. Seems to have reduced noise by 2-3x. Channel 1 is filtered, Channel 2 is not.Seems like it's all about that 1MHz noise signal. Here is the same data zoomed in:I wonder what would happen if I lower the corner frequency of the 2 stage RC from 500kHz to 1kHzish...

author: eeFearless
author_rank: Contributor
timestamp: January 06, 2017, 01:32:17 am
content: I'm more accustomed to audio codecs for ADC/DAC, which have a separate AGND and DGND which I connect to my separate AGND and DGND layers.So, I wanted to look at what you're doing for VREFN. I'm looking at your schematic again, and I can't figure out what is going on with VREFN. I was concerned that if connected directly to ground (that is both analog and digital), that it could be quite noisy.I'm running out of ideas. But, I would take a look at any TI reference design material (when I design, I always try to copy as much of ref designs as possible). Check out TI User Guide SBAU175A. They deferentially decouple VREFP/VREFN from PWR/GND with 100 ohm resistors and pass-thru caps.Any single-ended filtering you do will not be effective if VREFN is connected to a noisy ground.If I think of anything else, then I'll let you know. May the lab fairies whisper their guidance in your ear ...

author: janekm
author_rank: Unknown
timestamp: January 06, 2017, 01:35:59 am
content: Quote from: benwis on January 06, 2017, 12:20:48 amThat's the first thing I would try. Though you'll need a pretty large cap (or too high a drop over the R). But also you need to make sure to decouple the AVdd of the ADC, or you'll just introduce more noise from there anyway.When you redesign the PCB, I would put the footprints for filter networks before and after the LDO for the AVdd.Also... really... It might be worth biting the bullet and telling whoever ordered the 10 PCBs that this current design is just not designed competently, and they'd be better off ordering a new batch that's been designed more sensibly. It's a good thing the person who did the previous layout seems to have left already, if I understood you rightAnd if they've got any kind of budget just ask a good analog design engineer to re-design it.

author: benwis
author_rank: Contributor
timestamp: January 06, 2017, 04:26:17 am
content: Quote from: eeFearless on January 06, 2017, 01:32:17 amYou're definitely right. I fought for more passives in an effort to reduce noise and be closer to the reference design, but I lost. Why would anyone use pass through caps? Space saving? I don't see how they're different. VREFN is connected to SW, which is directly connected to ground when the ADS1231 is on. The ADS1231 datasheet Fig 24. appears to be the reference used. I'll have to try decoupling VREFP and VREFN if I can get a stable enough voltage. Thanks for the tip.Quote from: janekm on January 06, 2017, 01:35:59 amI know, I'm just not relishing the idea. Unfortunately he's not gone, and he's my boss. If the filter can't get the noise low enough, I'll have to see if I can find the noise source and tell him I'll have to redesign it with the appropriate filtering and decoupling. Are there any good AC -> linear DC power supplies that don't cost an arm and a leg?