Solved: adding noise to a bank of ADC channels with a cap and biased NPN? - Page 1
Forum section: electronics / projects

author: incf
author_rank: Frequent Contributor
timestamp: March 19, 2025, 02:33:15 pm
content: I would like to know if it is feasible to improve the DC resolution (and possibly the DC accuracy?) of a set of 8 channels on a low performance 12-bit ADC by introducing a common noise source and coupling all of them with capacitors.This is for measurement of heavily filtered DC signals.Reversed biased NPN -> 8 capacitors in parallel going to 8 different ADC channels.The goal would be to couple high frequency noise into the heavily filtered channels to introduce a degree of dithering between values.A microcontroller samples the channels a couple thousand times and averages them roughly once per second.Is this a reasonable idea?How does one go about modeling noise sources in this case? (If the amplitude is too high or too small, it probably will not work. If spectrum of noise is wrong if probably will not work)I don't think commodity parts like the MMBT3904 have published ratings for their noise generation ability when in breakdown.I know the proper thing almost always is to use a better ADC or amplify/condition the signals more prior to measurement [eg. multiple measurement ranges], but I'm interested in learning about this route. This domain is a gap in my knowledge.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 19, 2025, 02:39:08 pm
content: Why noise? Why not a known signal? Same but without having to rely on the statistical nature of noise (meaning, you never get full guarantee of accuracy, justvery high likelihoodthe longer you average - which also means pretty long averaging periods if you want decent level of confidence). In other words, just create known patterns of ½ LSB and tada'h, you have introduced an extra bit. Or one quarter of LSB and get another bit.... which is basically very close to what SAR ADC does anyway. So probably much simpler to just pick an external SAR ADC with higher resolution (and better specs otherwise, too).

author: incf
author_rank: Frequent Contributor
timestamp: March 19, 2025, 02:41:33 pm
content: Mostly because I'm interested in learning about drawbacks and benefits (if any!) of this particular route.Noise sources seem "simpler" (maybe too simple?)They are mostly DC signals that can take hours to change, although some can change in a few seconds

author: Simmed
author_rank: Frequent Contributor
timestamp: March 19, 2025, 02:44:26 pm
content: triangular dithering ?https://thecavepearlproject.org/2017/02/27/enhancing-arduinos-adc-resolution-by-dithering-oversampling/

author: RoGeorge
author_rank: Super Contributor
timestamp: March 19, 2025, 04:22:17 pm
content: Quote from: incf on March 19, 2025, 02:33:15 pmSearch for the termADC oversampling, or foroversampling application notes. Read the application notes pdf you may find, they should answer most of the questions.The noise must be at least 1 LSB or higher, for this to work.Oversamplingcan improve resolution, but it does not affect accuracy. If you have many ADC channels, might be easier to add noise only once, at the reference voltage, than to add noise at each ADC input (most ADC and microcontrollers have an external Vref pin).

author: incf
author_rank: Frequent Contributor
timestamp: March 19, 2025, 04:52:49 pm
content: I'm modestly familiar with the very basics of oversampling practice (allegedly 4^N samples per extra bit of resolution -if and only if the signal is sufficiently noisy!And presumably if and only if the noise is meets certain other conditions).Sounds like the noise source must produce greater than 1LSB of noise (at the frequency the pin is sampled at). It could produce 100LSB of noise and still work so long as it didn't clip (and it was averaged over a long enough period of time, etc.). That seems reasonable.That just leaves the question about the design/modeling process of using BJT's as a noise source. (And getting consistent noise performance from commodity parts like the mmbt3904)I could easily imagine small variations in voltage, current, temperature, device-to-device characteristics mattering

author: gf
author_rank: Super Contributor
timestamp: March 19, 2025, 05:04:54 pm
content: If you add a large dithering signal, you will also need to consider how to remove it again (either by subtraction or filtering) in the digital domain. And white random noise cannot be removed. It can only attenuated by reducing the bandwidth. If you add 100 LSB of white noise, then you need to average 10000 samples in order to get the noise level down to 1LSB again. So if you want to add a large dithering signal, then choose something which can be easily separated from the useful signal in the digital domain.

author: jonpaul
author_rank: Super Contributor
timestamp: March 19, 2025, 06:45:32 pm
content: See the classic 1970s, 1980s papers on ADC dither, by Steve Harris and Julian Dunn, at AES and APj

author: incf
author_rank: Frequent Contributor
timestamp: March 19, 2025, 06:56:37 pm
content: Quote from: gf on March 19, 2025, 05:04:54 pmThat gets into the design question about modeling BJT's as noise sources.My intuition (which could be wrong) is that digital averaging works better on high frequency noise than low frequency noise. And maybe the design process might allow for the spectrum of a BJT noise source to be chosen to minimize the amount of averaging required.It seems like it would be fairly straightforward to high pass filter an "ideal white noise source" since the noise signal(s) will likely be coupled to the ADC channels using a small value capacitor.

author: mawyatt
author_rank: Super Contributor
timestamp: March 19, 2025, 07:10:38 pm
content: Agree with gf, if the added "dither noise" is somewhat random wrt to the input signal (in this case DC, so easy) but created with known characteristics, then it becomes much more effective in removal after digitation by DSP.This was famously done with the 1st Ring Laser Gyros way back to remove the "dead zone" in the transfer function. The dithered "noise" allowed transition across the "dead zone". Sperry attempted this with an Electro-Optic mirror solution while Honeywell chose the simpler mechanical mirror dither. History shows which worked better and why Honeywell became the IMU navigation leaders (along with their ESGs) until the Fiber-Gyro came out of the research labs.If the OP has access to a micro controller or processor, the "dither signal" could be simply generated by the micro.Best

author: incf
author_rank: Frequent Contributor
timestamp: March 19, 2025, 08:59:00 pm
content: This looks too easy.A 10mV noise signal high pass filtered with Fc=~200Hz sampled at 2kHz seems like it would work. (high frequency could likely be limited by gain bandwidth product of an op-amp buffer)https://www.edn.com/white-noise-source-flat-from-1hz-to-100khz/https://www.analog.com/en/resources/design-notes/building-a-lowcost-whitenoise-generator.html

author: gf
author_rank: Super Contributor
timestamp: March 19, 2025, 09:02:09 pm
content: Yet another question is: Do you need to add noise at all, or is a sufficient amount of noise perhaps already present anyway?For mere resolution enhancement you don't need more than about 0.5 LSB standard deviation.Often the ADC noise alone is more than that.

author: incf
author_rank: Frequent Contributor
timestamp: March 19, 2025, 09:40:09 pm
content: Quote from: gf on March 19, 2025, 09:02:09 pmI accidentally designed my system to be have too little noise! (An odd problem for a high-power SMPS)I may also be experiencing other problems. Notably, it seems my ADC's characteristics may change quite drastically for the worse at high temperatures (I've got a concurrent thread in the microcontrollers board about rerunning the STM32 ADC internal self calibration).The effect being that the dithering from the ADC's internal noise stops working after the system warms up. At 70C it's output resembles that of an 7-bit ADC rather than a 12-bit.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 20, 2025, 01:31:08 am
content: Quote from: incf on March 19, 2025, 09:40:09 pmIs there a high temperature skew across the die?The MCU ADC itself is always likely to be your weak link, with aging and thermal effects also messing with things.If you have an ideal ADC. adding noise/dither can certainly help intrapolate values, and it does not need to be random.If you have a linear sweep over 4 LSBs over 200 readings, you should be able to resolve to < 0.1LSB, but that is only resolution, drift and changes would dictate a calibrate step to a good quality external reference be done if you need absolute precision.

author: incf
author_rank: Frequent Contributor
timestamp: March 20, 2025, 02:02:10 am
content: Quote from: PCB.Wiz on March 20, 2025, 01:31:08 amI had not considered the possibility. That is an excellent question. What is a "high" temperature skew? I think there may be as much as a 10C skew in my application. But unfortunately, it is impossible to get a thermal camera where the MCU is. (Maybe I could expoxy small thermistors if I really needed to know)Quote from: PCB.Wiz on March 20, 2025, 01:31:08 amI agree. I was gauging the complexity of doing it externally in hardware since my MCU ran out of pins.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 20, 2025, 02:27:52 am
content: Quote from: incf on March 20, 2025, 02:02:10 amMaybe you could heat a MCU only board in an oven, so it has a known even temperature (no power hot spots) and compare your ADC degrade?ADC's have many elements that are supposed to track to work properly, I can imagine they go off the rails somewhat, if there is a die-skew.

author: mtwieg
author_rank: Frequent Contributor
timestamp: March 20, 2025, 11:52:29 am
content: Quote from: gf on March 19, 2025, 09:02:09 pmI have never seen an ADC which did not have at least 1 LSB RMS of internal noise. Adding in additional noise should never, ever, be necessary.I mean I could probably dig up an old 8 bit FLASH ADC which lower noise but for a 12 bit ADC in a MCU, at least two of those bits are going to be noise.Quote from: incf on March 19, 2025, 09:40:09 pmI highly doubt it.QuoteI replied to that thread. Odds are the ADC is being used improperly, or maybe the ADC is just trash by design.

author: Kleinstein
author_rank: Super Contributor
timestamp: March 20, 2025, 12:44:17 pm
content: There are some µC internal ADCs with noise levels low enough so that dithering may want a little extra signal or noise. I have seen this with the 10 Bit ADC in the AVRs regularly.The question is still if one wants noise or a defined signal (like a low pass filtered square wave). The advantage of a non noise signal is that one can filter it out by averaging over full periods.

author: incf
author_rank: Frequent Contributor
timestamp: March 20, 2025, 01:26:55 pm
content: Quote from: mtwieg on March 20, 2025, 11:52:29 amI agree, it's probably something about my design.I find the thermal gradient theory very plausible - my application runs hot and the heat source is concentrated on one side of the MCU.I also am running at the max rated DC input impedance which seems unwise at high temperatures (leaky structures in MCU and ADC can affect things)I hope to address both and maybe it might fix it. If those don't fix it, the device would apparently "need" 32LSBs of noise for it to keep a portion of it's resolution at high temperatures. (it probably would not be a good idea for me to actually rely on that amount of dithering in practice)

author: mawyatt
author_rank: Super Contributor
timestamp: March 20, 2025, 03:05:25 pm
content: Another consideration wrt the dither level. You want to dither a couple bits as many ADCs have a preferred side approaching the bit decision (hysteresis) on the LSBs and without enough dither level the result when averaged (or other post ADC extraction) will show a preferred "offset" result.Best

author: MarkT
author_rank: Frequent Contributor
timestamp: March 23, 2025, 09:05:05 am
content: Quote from: mtwieg on March 20, 2025, 11:52:29 amATmega328's 10 bit ADC has a lot less than 1 LSB of internal noise - if run off battery power. This shows up as stair-step traces in a data logger I made. After all 5mV is a big step, good analog circuitry signal noise is measured in microvolts.Also dual-slope integrating ADCs in multimeters often display stair-step behaviour.

author: mtwieg
author_rank: Frequent Contributor
timestamp: March 23, 2025, 01:29:26 pm
content: Quote from: MarkT on March 23, 2025, 09:05:05 amI used a few AVRs (ATmega48p mostly) and never saw this. Though I never tried powering it directly from a battery though.QuoteThe processes used by MCUs typically are not suitable for "good analog circuitry". The ATmega328p datasheet doesn't say anything about ENOB or SNR, but it does say the the analog comparator's offset voltage is <10mV typical, <40mV max. Of course comparator offset and ADC noise are apples and oranges, but IMO one should be pessimistic when it comes to analog peripherals in MCUs.