Introduction: Measuring Quantities of Water Using Pressure Sensor

A pressure sensor was used to measure quantity of water in a tank.


24PC sensor

A breadboard




Step 1: 24PC Pressure Sensor

The 24PC Series Miniature Pressure Sensors are small, cost-effective devices intended for use with wet or dry media.

These sensors feature proven sensing technology that uses a specialized piezoresistive micromachined sensing element to offer high performance, reliability, and accuracy. Each sensor contains four active piezoresistors that form a Wheatstone bridge. When pressure is applied, the resistance changes and the sensor provides a milliVolt output signal that is proportional to the input pressure.

Step 2: Building the Circuit

The 24PC sensor is connected to a Wheatstone Bridge circuit in the Tank.

A Differential Amplifier was connected with input resistors of 270 K ohms and output resistors of 1 M ohms, to give a gain of 3.7.

A Non-inverting amplifier was connected to the output of the differential amplifier with an input resistance of 1 k ohms and an output resistor of 165 K ohms. Didn't find a resistor with that value to so a 220 K ohms resistor was used to give a gain of 166.

The total gain from the amplifiers is 610.

Instead of the differential and non-inverting amplifier, a single supply instrumentation amplifier was built with a single resistor with a value of 330 ohms to give a gain of 610.

Step 3: Measuring the Output Voltage From the Tank

The output voltage is measured from the Tank by taking the voltage reading at every level of the water until the top. The maximum voltage is 8.2 mV when the Tank is full.

The second graph shows the relationship between the output from the tank and the output from the amplifier at different levels of water. The slope shows the gain.

Step 4: Trouble Shooting

The circuit was connected in the right way but the output voltage from the amplifier didn't change when adding water to the tank.

The differential and non-inverting amplifiers were replaced by a single supply instrumentation amplifier but the output voltage from the amplifier still didn't change.

The resistors and amplifiers were replaced with new ones in case they are damaged but the result is the same.

Step 5: Arduino Code

This code reads the output value from the amplifier in digital units.

{void setup()

{Serial.begin(9600); //start the serial connection with the computer
pinMode (A0, INPUT); //output from the amplifier will be connected to this pin


void loop() {

int AnalogValue = analogRead(A0); //Read the input on A0

Serial.print("Analog Value: ");

Serial.println(AnalogValue); //print the input value