16-bit ADC math help
TC
Posts: 1,019
I just came across some MAX1416 ADC, it is a dual channel 16-bit ADC. I know it is a little overkill (maybe more than a little) but I would like to use them for my project of turning an ATX power supply in to a bench top power supply. I am going to use one for each voltage out (3.3V, 5V, and 12V) and the current for each voltage.
My problem is I need to convert the 16-bits to a voltage reading. IE 5.5V/ 65535= .00008V per bit, so if the ADC outputs $E8B9 = 5.0000V
Now I dont care if it has a decimal point or not (I can add it). I would like it to be one formula that by changing one value could be used for 3.3V (3.5V max), 5V (5.5V max), and 12V (13V max).
Also could I use one voltage reference for all three ADCs or do I have to use one voltage reference for each ADC?
Thanks
TC
My problem is I need to convert the 16-bits to a voltage reading. IE 5.5V/ 65535= .00008V per bit, so if the ADC outputs $E8B9 = 5.0000V
Now I dont care if it has a decimal point or not (I can add it). I would like it to be one formula that by changing one value could be used for 3.3V (3.5V max), 5V (5.5V max), and 12V (13V max).
Also could I use one voltage reference for all three ADCs or do I have to use one voltage reference for each ADC?
Thanks
TC
Comments
But to get to the specific question, consider the nominally 3.3V supply into a single ended channel with a 5V reference. The ADC code goes from 0 to 65535 for the 0 to 5V span, and at 3.3V the code will be 43253 or thereabouts. On the Stamp it is convenient to work with milliVolts, and you can use the Stamp ** operator:
mV = code ** 5000
When the code is 43253, that will return mV=3300.
The multiplier for your 5V and 12V supplies might be something other than 5000, depending on the circuit, but the equation will have the same form.
If I understand what you are saying for each measurement I would:
3.3V = 3500
5V = 5500
12V = 1300
Where from your code mV=code**max measurement Please let me know if I am seeing this wrong.
Thanks
TC
TC
http://datasheets.maxim-ic.com/en/ds/MAX186-MAX188.pdf