## External Vref for ADC

3373 Views - Created 12/06/2016

12/06/2016

Posted by:**sandeeptara@gmail.com**

At the moment none of our Expander Pi libraries supports differential mode on the Expander Pi ADC but if you let me know which language you are using I will update that library so you can use it in differential mode and hopefully read the RTD correctly.

14/06/2016

Posted by:**sandeeptara@gmail.com**

16/06/2016

Posted by:**sandeeptara@gmail.com**

**T**=((-(H3*H6)+SQRT(H6*H6*H3*H3-4*(H6*H4)*(H6-(D10))))/(2*H4*H6))*9/5+32or

**T**=((-H3)+SQRT(H3*H3-4*H4*(1- D10/100)))/(2*H4)*9/5+32where H3=a=3.9083*10^-3 H4=b=-5.775*10^-7 , H5=c=-5.775*10^-7, R0=H6=100, D10=Rrtd. I am using 270Ohms resistnce at divider ,

**Rrtd**=270/((D2/D3)-1) D2= VinD3=Voutany suggestions?

**#!/usr/bin/python**

**import math**

**D2 = 2.0D3 = 1.0DividerRes = 270t = 0.0H3 = 0.0039083H4 = -0.0000005775H5 = 0.0000005775H6 = 100**

**D10 = DividerRes/((D2/D3)-1)**

**a = H6*H6*H3*H3-4*(H6*H4)*(H6-(D10))b = math.sqrt(a)**

**t = ((-(H3*H6)+b)/(2*H4*H6))*9/5+32**

**print aprint bprint t**The above code gives a result of 873.011583507 in python and 873.0116 in excel. I split the equation up into several parts to make it easier to check that each stage was working correctly.

05/07/2016

Posted by:**sandeeptara@gmail.com**

**Note:** documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.

Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.