When monocrystalline silicon material suffers force, it makes an infinitesimal change and an electronic level change of internal atom structure, which will also lead to a great change in resistivity (Factor H Mutation), so as the Resistance. This physical effect is piezoresistive effect.
Based on the piezoresistive effect, a strain gauge is also a work of IC (integrated circuit) engineering technology. Its production process contains doping, diffusion and a crystal orientation of the substrate. A strain gauge makes a Wheatstone Bridge. Of special silicon material and heterosexual micro-machining the same silicon material in different directions, then a diffused silicon sensor comes into being. The sensor is force-sensitive and mechanical-electrical detective.
Equipped with an amplify circuit and other parts in need, enable the circuit to output a standard signal, the diffused silicon sensor makes a pressure transmitter.
/************************************************************
Water pressure sensor demo(Computer serial port)
- Obtain the water pressure through the output voltage
of the sensor.
**************************************************************/
/************************************************************
Water Sensor Key Parameter
- Parts No.:KY-3-5
- Sensing range: 0 - 1.6 MPa
- Input Voltage: 5VDC
- Output Voltage: 0.5 - 4.5 VDC
(Linearly corresponding to 0 - 1.6 MPa)
- Accuary: 0.5% - 1% FS
**************************************************************/
/************************************************************
Water Sensor Calibration
The output voltage offset of the sensor is 0.5V (norminal).
However, due to the zero-drifting of the internal circuit, the
no-load output voltage is not exactly 0.5V. Calibration needs to
be carried out as follow.
Calibration: connect the 3 pin wire to the Arduio UNO (VCC, GND and Signal)
without connecting the sensor to the water pipe and run the program
for once. Mark down the LOWEST voltage value through the serial
monitor and revise the "OffSet" value to complete the calibration.
After the calibration the sensor is ready for measuring!
**************************************************************/
const float OffSet = 0.483 ;
float V, P;
void setup()
{
Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
Serial.println("/** Water pressure sensor demo **/");
}
void loop()
{
//Connect sensor to Analog 0
V = analogRead(0) * 5.00 / 1024; //Sensor output voltage
P = (V - OffSet) * 400; //Calculate water pressure
Serial.print("Voltage:");
Serial.print(V, 3);
Serial.println("V");
Serial.print(" Pressure:");
Serial.print(P, 1);
Serial.println(" KPa");
Serial.println();
delay(500);
}
Immersible Water Pressure Sensor (Throw In Type Liquid Level Sensor)
SHIPPING LIST
Throw-in Type Liquid Level Transmitter x1
Analog Current to Voltage Converter(for 4~20mA Application) x1
The level transmitter receives different pressures at different depths of liquid, which can be converted into corresponding current signals and output through the sensor In this way, the depth of liquid can be measured.
The shell of the transmitter is made of stainless steel, anti-corrosion and easy to clean. It can be directly placed in the liquid like water, oil or even mash with large viscosity. This product can provide a steady performance in all sorts of measurement Conditions such as river, reservoir, city water supply, groundwater in urban, and basin.
We sold this product together with our Analog Current to Voltage Converter (4~20mA) . The converter can convert current into voltage signal which can be read by your Arduino controllers or other controllers. The throw-in type liquid level transmitter can be Used in waterworks, refinery, sewage disposal work, construction, light industry, mechanical and so on.
Specification
Cable Length: 5m
Measuring Range: 0-5m
Overall Accuracy: 0.5%
Output Signal: 4-20mA
Operating Voltage: 12-36V
Operating Temperature: -20°C-70°C
Overload Capacity: 300%
Service Life: 1*10^8 Pressure Circulation (25°C)
Material: 316L stainless steel
Protection Class: IP68
Num Label Description
1 (red) VCC Positive pole
2 (red, thick) AIR PIPE Air guiding tube
3 (black) GND Negative pole
1 GND Power Ground
2 VCC Power Positive (3.3~5.5V)
3 Signal Voltage Signal Output
4 I+ Current Input
5 I- Current Output
Tutorial
The tutorial introduces the usage of level transmitter with current-to-voltage module, which converts the current signal output by the sensor into a analog voltage signal. The Arduino UNO reads this analog voltage signal and converts it to corresponding depth.
Measurement Principle
When the liquid level transmitter is put into a certain depth of some liquid, the pressure at the end of the sensor is
![desc3](https://i.ibb.co/d6pRwjV/desc3.png)
The atmospheric pressure P0 on the liquid surface is introduced into the back chamber of the sensor through the air guiding tube to offset the atmospheric pressure P0 at the end of the sensor, so that the measured pressure of the sensor is P'=P-P0 =ρgh ., if the liquid density ρ and the acceleration of gravity g are known, the liquid level depth h can be calculated by measuring the pressure P' .
The pressure measured by the liquid level sensor is then amplified and compensated by the circuit and output with a standard 4-20 mA current signal. The relationship of output current of the liquid level transmitter, output voltage of the current to voltage module and depth are Shown below:
Attention
The depth ranges, voltages and currents shown in the figure are for pure water. If other liquid is to be measured, the density of the liquid needs to be considered. The specific conversion relationship is shown in the sample code.
![desc5](https://i.ibb.co/3CdprBQ/desc5.png)
/***********************************************************
GNU Lesser General Public License.
All above must be included in any redistribution
****************************************************/
#define ANALOG_PIN A1
#define RANGE 5000 // Depth measuring range 5000mm (for water)
#define CURRENT_INIT 4.00 // Current @ 0mm (uint: mA)
#define DENSITY_WATER 1 // Pure water density normalized to 1
#define DENSITY_GASOLINE 0.74 // Gasoline density
#define PRINT_INTERVAL 1000
int16_t dataVoltage;
float dataCurrent, depth; //unit:mA
unsigned long timepoint_measure;
void setup()
{
Serial.begin(9600);
pinMode(ANALOG_PIN, INPUT);
timepoint_measure = millis();
}
void loop()
{
if (millis() - timepoint_measure > PRINT_INTERVAL) {
timepoint_measure = millis();
dataVoltage = analogRead(ANALOG_PIN);
dataCurrent = dataVoltage / 120.0; //Sense Resistor:120ohm
depth = (dataCurrent - CURRENT_INIT) * (RANGE/ DENSITY_WATER / 16.0); //Calculate depth from current readings
if (depth < 0) depth = 0.0;
//Serial print results
Serial.print("depth:");
Serial.print(depth);
Serial.println("mm");
}
}
Result
The depth of liquid the sensor detected will be constantly displayed on the Arduino IDE serial monitor. (Unit: mm)