Description
G1/4 Hydraulic Pressure Sensor – 5 V – 0.5 MPa or 3 MPa
This pressure sensor converts pressure in a hydraulic circuit into an analog signal that can be read by an Arduino, PLC, or data-acquisition system. Its robust metal body and G1/4 threaded fitting make it suitable for installation on pumps, reservoirs, pipes, and test benches.
It operates at 5 V DC and provides a linear analog output, typically between 0.5 and 4.5 V. This output range can make wiring faults easier to detect than a 0–5 V output. This type of output is documented for similar G1/4 5 V sensors.
Available Variants
| Variant | Range in bar | Approximate range in PSI |
|---|---|---|
| 0 to 0.5 MPa | 0 to 5 bar | 0 to 72.5 PSI |
| 0 to 3 MPa | 0 to 30 bar | 0 to 435 PSI |
Choose a range slightly above the maximum pressure expected in your installation. A lower range generally offers better measurement resolution, but must never be exceeded.
Specifications
- Power supply: 5 V DC
- Output: linear analog signal, 0.5 to 4.5 V
- Male hydraulic fitting: G1/4
- Three connections: power, ground, and signal
- Two available ranges: 0–0.5 MPa and 0–3 MPa
- Durable metal body
- Can be read by Arduino and other 5 V microcontrollers
- Suitable for hydraulic systems, pumps, and measurement benches
- Continuous measurement and easy integration
Applications
- Monitoring hydraulic circuits
- Measuring pump pressure
- Monitoring tanks and pipes
- Industrial machinery
- Irrigation systems
- Test benches
- Pressure alarms
- Data logging with Arduino
Arduino Mini Tutorial
Wiring
The sensor has three wires or terminals. Identify their functions from the markings or supplied documentation.
| Sensor | Arduino Uno/Nano |
|---|---|
| VCC / +5V | 5V |
| GND / 0V | GND |
| OUT / Signal | A0 |
Common wire colors are red for power, black for ground, and yellow, green, or blue for signal. Do not rely on wire colors alone, as they may vary between production batches.
Arduino Code for Both Variants
const byte sensorPin = A0;
// Choisir la plage correspondant au capteur :
// 0.5 pour la version 0-0,5 MPa
// 3.0 pour la version 0-3 MPa
const float maxPressureMPa = 0.5;
void setup() {
Serial.begin(9600);
}
void loop() {
long total = 0;
// Moyenne de 20 mesures pour stabiliser l'affichage
for (byte i = 0; i < 20; i++) {
total += analogRead(sensorPin);
delay(5);
}
float adcValue = total / 20.0;
float voltage = adcValue * 5.0 / 1023.0;
// Sortie 0,5 à 4,5 V :
// 0,5 V = 0 pression
// 4,5 V = pression maximale
float pressureMPa =
(voltage - 0.5) * maxPressureMPa / 4.0;
// Limitation de l'affichage à la plage du capteur
if (pressureMPa < 0) {
pressureMPa = 0;
}
if (pressureMPa > maxPressureMPa) {
pressureMPa = maxPressureMPa;
}
float pressureBar = pressureMPa * 10.0;
Serial.print("Tension : ");
Serial.print(voltage, 3);
Serial.print(" V | Pression : ");
Serial.print(pressureMPa, 3);
Serial.print(" MPa | ");
Serial.print(pressureBar, 2);
Serial.println(" bar");
delay(500);
}
For the 0–3 MPa variant, simply replace:
const float maxPressureMPa = 0.5;
with:
const float maxPressureMPa = 3.0;
Then open the Arduino IDE Serial Monitor at 9600 baud to display voltage, pressure in MPa, and pressure in bar.
Hydraulic Installation
- Fully depressurize the circuit.
- Check that the installation fitting is compatible with a G1/4 thread.
- Use a seal or sealing compound compatible with the fluid and pressure.
- Tighten the sensor using its hexagonal section; never twist the cable.
- Check for leaks at low pressure before increasing pressure gradually.
Important Precautions
- Never exceed the maximum range of the selected variant.
- Use only fittings and pipes rated for the circuit pressure.
- Never remove the sensor while the circuit is pressurized.
- Check the chemical compatibility of the sensor and seal with the fluid used.
- The output may reach about 4.5 V. For an ESP32 or a microcontroller limited to 3.3 V, add a voltage divider or level-shifting circuit.
- For better accuracy, calibrate the minimum and maximum readings against a reference pressure gauge.
- This product is not intended for medical applications or safety-critical systems.









