Author Topic: Please Could Someone Check My Math?  (Read 1187 times)

0 Members and 1 Guest are viewing this topic.

Offline German_EETopic starter

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Please Could Someone Check My Math?
« on: April 20, 2019, 08:37:24 am »
Yeah, I know I'm not a beginner, but beginners might appreciate the problem and the solution.

I want to measure a +/- 2V DC voltage with an 18-bit ADC. 18 bits is 0 - 3FFFF hex but as I am measuring positive and negative voltages 0V is 20000 hex and 2V will give an output of 3FFFF.

1FFFF is 131071 decimal so a change of one bit in the output is equal to 2/131071 or 0.0152589 millivolts.

Is my math correct because these numbers seem awful small?
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2418
  • Country: us
Re: Please Could Someone Check My Math?
« Reply #1 on: April 20, 2019, 09:09:13 am »
4V range / (2**18) gets the same answer. However, that leaves you no room for calibrating the center point without chopping off one side or the other, so you may want to widen the range a bit to allow for that.

Also, you'll want to calibrate the resolution from real-world measurements once you've made your hardware, not perfect-case math. All your components have limited precision.
« Last Edit: April 20, 2019, 09:22:08 am by Nusa »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13216
Re: Please Could Someone Check My Math?
« Reply #2 on: April 20, 2019, 09:59:25 am »
That looks about right if you have a 2.00000V reference for the ADC.  15.26uV is mighty small - expect the lower bits to be mostly noise.  Trying to get clean LSBs from anything more than a 12 bit ADC is *DIFFICULT*
 
The following users thanked this post: mycroft

Online radiolistener

  • Super Contributor
  • ***
  • Posts: 4135
  • Country: 00
Re: Please Could Someone Check My Math?
« Reply #3 on: April 20, 2019, 12:22:07 pm »
1FFFF is 131071 decimal so a change of one bit in the output is equal to 2/131071 or 0.0152589 millivolts.

±2 Vpk = 4 Vpp,

4 / 2^18 = 0.000015259 V = 0.015259 mV = 15.259 uV

But in real world it's not so easy, because ADC has some aperture uncertainty, non-linearity and missing codes.
So, in real ADC some bits may have a little different weight than expected.
The result also will depends on ADC clock purity (jitter) and input signal frequency/spectrum.
« Last Edit: April 20, 2019, 12:24:21 pm by radiolistener »
 

Online radiolistener

  • Super Contributor
  • ***
  • Posts: 4135
  • Country: 00
Re: Please Could Someone Check My Math?
« Reply #4 on: April 20, 2019, 12:36:08 pm »
Trying to get clean LSBs from anything more than a 12 bit ADC is *DIFFICULT*

it's not difficult, it just requires more narrow bandwidth. You can apply low pass filter with desired bandwidth and get more clean LSB. Of course it will require more time for measurement, because low frequency signal measurement requires longer measurement time.

In order to measure real DC (0 Hz) with maximum precision, you will need infinite time for measurement :)
But there is no real DC in real world, any DC is actually AC with very low frequency :)

Regarding to the noise, our real world full of noise, for example Brownian motion is a noise. Electron motion also noisy (electrons behavior very similar to gas molecules), so you will not be able to get clean LSB for wide bandwidth ADC, because there is no clean DC in real world.

« Last Edit: April 20, 2019, 12:57:37 pm by radiolistener »
 

Offline German_EETopic starter

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Re: Please Could Someone Check My Math?
« Reply #5 on: April 21, 2019, 07:24:01 am »
Thank you for all of the replies, I will now have some fun over the Easter weekend experimenting with low noise DVM front ends and guard bands. Chocolate may be involved.
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf