About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Search
Register or Sign In
Forum

Scaling

314 Views - Created 11/09/2018

11/09/2018

Posted by:
phoneman

Users Avatar

Using this line of code to read a value......adc = ADCPi(0x68, 0x69, 12)

I don't see 12 bit referenced in the docs, but this is how the example is written so I am making that assumption.

The sensor I am using has output of 0.5 at 0 PSI and 4.5V at 2,500 PSI.

Looking for direction on how to figure the scaling factor to apply against the reading.

Thanks

 

 

 

11/09/2018

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

Without a datasheet for the sensor it is difficult to be certain but assuming the output is linear and the pressure doesn't go below 0 PSI then it looks like there is a 0.5V offset for the output voltage so taking away that 0.5V you have 4V for 2500 PSI.  Divide the 2500 by 4 and it should be 625 PSI per volt. 

So you should be able to use the formula:

Pressure = (Voltage - 0.5) * 625

AB Electronics UK Tech Support

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.