need help integrating Phidgets 1135 sensor in project

Hello,

I need some help with a project i have been working on. Here are the parts that i am using in this project

The project is about me measuring a voltage put out by another device that ranges from -10VDC to + 10VDC

I have the Phidgets sensor hooked up to the MKR via the grove connectors on the carrier board. The carrier board has built in voltage dividers to convert the Phidgets sensors 5v input to 3.3v

By reading the documentation i saw this formula Vdiff = (Vsens - 2.5) / 0.0681 Whn i use this formula i am not getting accurate values especially at 0 or if the voltage being measured is in the millivolts range

i am aware that the sensor outputs 2.5 volts at 0 volts at the sensor inout.

I need high level of precision to make this project work. Here is part of my code that does the calculations

  ADCValue = analogRead(analogInPin); 
  // print the results to the serial monitor:
  Serial.print("Volts Sensor Reading: ");
  Serial.println(ADCValue);      

  Voltage =  ADCValue * (5.000 / 1023.000);
    
  float Vd = (Voltage - 2.541)/0.0681; // formula from phidgets documentation
  Serial.print("Phidgets measured Voltage Reading: ");
  Serial.println(Vd);

Right now i am assuming i am doing the wrong calculations because of which the values are in accurate. If anyone can help me understand how to incorporate this sensor in to my project i would greatly appreciate it

Anyone ?

The code you posted is for 5v devices. Modify the formulas for the 3.3v operation of your MKR.

saif76:
I need high level of precision to make this project work.

Switch the MKR to 12-bit resolution, or use an external ADC if that's not good enough.

Use an accurate voltage reference.

Calibrate.