Navigation

Sunday 30 November 2014

TBPDANS001PGUCV Pressure Sensor

The TBPDANS Pressure Sensor is a range of pressure sensor that comes in different pressure range, i.e. from 0 - 1psi; 0 - 5psi; 0 - 100psi, etc. The sensor contains a Wheatstone bridge  and the voltage between the Vout- and Vout+ pins has to measured.

If an Arduino microcontroller is to be used with this sensor, two analog input pins has to be used to measure Vout_ and Vout+ and the difference between these readings will give the voltage as a function of the pressure. But this result of subtracting Vout-  from Vout+ is in the order of 0.1millivolts and therefore the reading will not be evident when using the Arduino because the Arduino uses 10-bit ADC and so the sensitivity for 5v reference is:
This clearly is insufficient as we need a sensitivity less than 0.1mV. If the reference voltage is changed to 3.3v by connecting the AREF pin to 3.3v and writing the code below in the void setup() function:

void setup () {
analogRefence(EXTERNAL); // use AREF for reference voltage
}
This is also inadequate for our use
Also using the 1.1v internal reference of the Arduino by adding the code:
void setup () {
analogRefence(INTERNAL);    // use 1.1v internal reference voltage
}
This resolution is quite good but it should be noted that the using a full scale voltage of 1.1v will result in the maximum voltage that can be measured to be 1.1v. This implies that careful selection as to be made to the supply voltage given to the pressure sensor. The typical supply voltage according to the datasheet is 5v; minimum is 1.5v; maximum is 12v. If a voltage of 5v is applied to the Vcc pin of the pressure sensor, the voltage on the Vout- pin will be the supply voltage divided by 2, i.e. 2.5v while the voltage on the Vout+ pin will be 2.5v plus millivolt changes as the pressure changes.
Therefore using a 1.1v full scale reference will be inadequate, because although we have a higher sensitivity, we cannot measure voltages above 2.5v. 

The solution might be to lower the supply voltage to the pressure sensor. A better solution is to use an op-amp to amplify the voltage to the range the Arduino can measure. INA125 op amp can be used for this. Another better solution is to use a higher ADC bit IC such as a 12-bit ADC or 16-bit ADC or 24-bit ADC.

An example code to read the voltage from the TBPDANS005PGUCV sensor is:

int sensorValue1 = 0;
int sensorValue2 = 0;
float Voutminus;
float Voutplus;
float Vout;
void setup() {
     analogReference(EXTERNAL); // connect AREF pin to the reference voltage being used
                                      // analogReference(INTERNAL) can be used for 1.1v reference on Arduino Uno
     Serial.begin(9600);  
}
void loop() {
 
    sensorValue1 = analogRead(A0);
    sensorValue2 = analogRead(A1);
   
    Voutminus  = (analogRead(A0) * 5000.00) / 1023;   // Voltage in mV
    Voutplus = (analogRead(A1) * 5000.00) / 1023;         // Voltage in mV
    Vout = Voutplus – Voutminus;
    Serial.println(sensorValue1);
    Serial.println(sensorValue2);
    Serial.println(“Vout: ”, Vout, “mV”);
    Serial.println();
   
    delay(2000);          
}


No comments:

Post a Comment