Removing DC offset from ADC Buffer

You still need a bunch of memory, because on each cycle you have to add the new sample and subtract the one from 5000 cycles ago. IIR avoids that problem.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC / Hobbs ElectroOptics 
Optics, Electro-optics, Photonics, Analog Electronics 
Briarcliff Manor NY 10510 

http://electrooptical.net 
http://hobbs-eo.com
Reply to
Phil Hobbs
Loading thread data ...

Subtracting the dither off again digitally?

Dithering is surprisingly subtle occasionally--for instance, you can't do a good job dithering a 1-bit delta-sigma because it has no linear range.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC / Hobbs ElectroOptics 
Optics, Electro-optics, Photonics, Analog Electronics 
Briarcliff Manor NY 10510 

http://electrooptical.net 
http://hobbs-eo.com
Reply to
Phil Hobbs

I think the DC is present to center the AC in the ADC range. If you remove the bias you get the positive half of the sine wave only.

Unless we know more about what he was measuring when he got the numbers he provided we won't know if he even needs to do any filtering or if he could just subtract 2048 from each sample.

--

  Rick C. 

  -- Get 1,000 miles of free Supercharging 
  -- Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

you could say delta-sigma is nothing but dither and that is what makes it work

Reply to
Lasse Langwadt Christensen

formatting link

Reply to
Lasse Langwadt Christensen

CICS is an IIR filter.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC / Hobbs ElectroOptics 
Optics, Electro-optics, Photonics, Analog Electronics 
Briarcliff Manor NY 10510 

http://electrooptical.net 
http://hobbs-eo.com
Reply to
Phil Hobbs

Sort of, assuming that your noise has good properties, which it often does not. Anyway, you can't usefully dither a 1-bit delta-sigma.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC / Hobbs ElectroOptics 
Optics, Electro-optics, Photonics, Analog Electronics 
Briarcliff Manor NY 10510 

http://electrooptical.net 
http://hobbs-eo.com
Reply to
Phil Hobbs

at 6kHz and storing 400 samples. The signal has a DC bias equal to Vcc/2 = 1.65V. In the digital domain this is 2048. In hardware this DC value is very precise, but when sampling it, it varies from 2044 to 2052 inside the buffer. Now if I want to do RMS in that set of data, I need to find a way to deal with this DC bias variation.

od as I said above this value may vary slightly. Also, if I want to read ze ro cross it may cause errors to choose exactly 2048 as reference.

alue when there's no input signal.

You didn't say how fast you want to converge on a solution. Or what is the bandwidth of your output? If your result is DC and has a long time to respo nd to a change, then just average. But if you need a quick response to a st ep change, then you will need to do more sophisticated digital filtering. A simple solution is an FIR highpass filter to get rid of the DC component. But you have to specify how fast and how accurately you need a result to de sign the filter.

Reply to
Flyguy

Right. You have to know the dither contribution to every sample, so generate it with a DAC. Some people dither a lot, many ADC bits.

I generally used an async triangle wave as the dither in my electric meters. I got utility-grade power metering, a huge dynamic range, with a dithered 7-bit single-slope ADC. In power/energy metering, you multiply the voltage and current samples and integrate that long-term, so all sorts of errors just go away.

--

John Larkin         Highland Technology, Inc 

Science teaches us to doubt. 

  Claude Bernard
Reply to
jlarkin

I'm remarking on his wordplay on "convoluted": he describes a boxcar filter implemneted as a convolution.

It struck me that John knows DSP better than that, but it took me a while to catch his meaning.

--
  Jasen.
Reply to
Jasen Betts

ents"?

Ok, wordplay. Got it.

Yes, the sort of joke that is only humorous to an engineer and the more... extreme ones at that.

I have a math joke that has to be explained to most mathematicians, not bec ause they don't understand the math aspects. They don't understand humor. It appears that when carried to an extreme "math joke" is a self contradic tion. Not so much different from "engineering joke".

--

  Rick C. 

  -+ Get 1,000 miles of free Supercharging 
  -+ Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

it is recursive but is it IIR? ;)

Reply to
Lasse Langwadt Christensen

add

s

The CIC filter is neither recursive or IIR. But it can be designed using a structure that is similar to an IIR for efficiency much in the same way th e FFT utilizes patterns in the sine function to calculate the discrete vers ion of the Fourier transform. The FFT is still calculating the same functi on as the DFT.

Not sure what the CICS filter is so I can't say anything about that.

--

  Rick C. 

  +- Get 1,000 miles of free Supercharging 
  +- Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

formatting link

Reply to
Lasse Langwadt Christensen

s:

e
r

lue

in

nd

ate

R

to

few

al

d

ap

t

ic.

what

to add

voids

lter

Not sure what your point is. The CIC is the sum of the last N samples, typ ically applied successively in small sections with decimation. That is not a recursive filter or an IIR. The fact that you can construct an equivale nt filter using a recursive structure does not say anything about the natur e of the filter.

If there is something someone wishes to say about recursive filters and the n try to apply that to a CIC filter, I'd like to hear it. Otherwise we are just counting angels dancing on the head of a pin.

--

  Rick C. 

  ++ Get 1,000 miles of free Supercharging 
  ++ Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

tirsdag den 22. september 2020 kl. 22.28.27 UTC+2 skrev Ricketty C:

bbs:

m
u
y

ple

her

value

e in

(and

riate

s

IIR

s'

s to

a few

ital

't

ted

-tap

ast

ogic.

e what

ve to add

avoids

filter

ypically applied successively in small sections with decimation. That is n ot a recursive filter or an IIR. The fact that you can construct an equiva lent filter using a recursive structure does not say anything about the nat ure of the filter.

hen try to apply that to a CIC filter, I'd like to hear it. Otherwise we a re just counting angels dancing on the head of a pin.

CIC is a recursive implementation of specific FIR filter

Reply to
Lasse Langwadt Christensen

Hmm. The Sonar folk used one-bit correlators twenty or thirty years ago, and were able to reach very deep into the background noise (the oceans are very noisy from biological sources). That noise acted as a dither source.

Joe Gwinn

Reply to
Joe Gwinn

tirsdag den 22. september 2020 kl. 23.16.36 UTC+2 skrev Joe Gwinn:

Here's a GPS receiver with a "1-bit ADC" (an LVDS receiver)

formatting link

Reply to
Lasse Langwadt Christensen

Motorola were making GPS receivers with 1-bit adcs at least 20 years ago, possibly considerably more.

John

Reply to
jrwalliker

s:

Hobbs:

rom

you

ce

a

lly

imple

ather

g value

ale in

p (and

opriate

cts

n IIR

ils'

ays to

ke a few

igital

on't

luted

00-tap

last

logic.

see what

have to add

IR avoids

b_filter

typically applied successively in small sections with decimation. That is not a recursive filter or an IIR. The fact that you can construct an equi valent filter using a recursive structure does not say anything about the n ature of the filter.

then try to apply that to a CIC filter, I'd like to hear it. Otherwise we are just counting angels dancing on the head of a pin.

It has been many years since I implemented one of these filters, but I do r ecall reading Hoganhour's paper. I guess I'm not recalling it correctly.

--

  Rick C. 

  --- Get 1,000 miles of free Supercharging 
  --- Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.