
Water Pressure Transducer Library for Proteus Simulation

Hello friends, I hope you all are doing great. Today, I am going to share the new Water Pressure Transducer Library for Proteus Simulation. The stainless steel pressure transducer with a 0.5 - 4.5 V output is the most common way to measure water pressure with a microcontroller: it screws into a pipe or a tank, takes 5 V and gives a voltage that grows with the pressure. With this library you can run a full Proteus simulation of that sensor, read it with an Arduino, convert it to bar and psi and test a complete pump controller before you touch any plumbing.
Water Pressure Transducer Library for Proteus
Latest version: V1.0 (December 2026, this tutorial)
Helping Tools
- Serial Monitor Advance: a serial terminal window for the UART of your board
- Serial Monitor Expert: the serial monitor with extra debugging tools
- LCD Library for Proteus V3.0: 16x2, 20x4 and I2C LCDs to show your readings
The demo is a booster pump controller: an Arduino UNO V4.0 reads the transducer 50 times a second while a house water system fills, empties and refills. It switches the pump like a pressure switch, shows the pressure on a 16x2 LCD, warns about a water hammer and stops the pump when the well runs dry.
NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the water sensor board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the Water Pressure Transducer Library for Proteus Simulation:
What Is a Water Pressure Transducer?
A pressure transducer turns the pressure of a liquid or a gas into an electrical signal. The common type for water has a thin stainless steel diaphragm behind its thread. The pressure bends the diaphragm a tiny amount, strain gauges on the diaphragm change their resistance, and a small amplifier inside the body turns that change into a clean voltage. You find these sensors in booster pumps, irrigation systems, water tanks, compressors, coffee machines and car fuel systems.
The usual model has a G1/4 thread, a 20 mm stainless body with a 24 mm hex for the spanner and a cable with three wires: red for +5 V, black for ground and yellow for the signal. It is about 54 mm long. It is made for clean, non-corrosive water, air or oil.
The Output: 0.5 to 4.5 V
The output does not start at 0 V. With no pressure the sensor gives 0.5 V, and at its full scale it gives 4.5 V. That 0.5 V at the bottom is useful: a reading of 0 V means a broken wire or no supply, not "no pressure", so the sketch can tell the two apart. The datasheets write the output like this:
- OUT = VCC x (0.1 + 0.8 x P / full scale)
- On 5 V: 0.5 V at no pressure, 2.5 V at half scale, 4.5 V at full scale.
- For the 1.2 MPa model: OUT = VCC x (0.1 + 0.6667 x P in MPa).
The output is ratiometric: it is a fixed fraction of the supply. If the 5 V sags to 4.8 V, the output falls by the same 4 %. That sounds like a problem, but on an Arduino it is a gift - the analog input also measures against the 5 V supply, so the count stays the same. That is why the sketch works with counts / 1023, the fraction of the supply, and never needs to know the exact voltage.
Ranges and Units
The sensor comes in many ranges. The 1.2 MPa (12 bar, 174 psi) model is a good choice for house water, and 1.6 MPa or 100 psi models are common too. A useful rule is to pick a full scale of about twice the working pressure: a house system works at 2 to 4 bar, so 12 bar leaves room for spikes. The units are easy to mix up:
- 1 MPa = 10 bar = 1000 kPa = 145.04 psi.
- 1 bar = 100 kPa = 14.504 psi - about the pressure of 10 m of water.
- Accuracy: +-1.5 % of full scale, so +-0.18 bar on the 12 bar model. The response is under 2 ms, and the current is a few milliamps.
Reading It on an Arduino
Connect the yellow wire to an analog input. The pressure is then:
- P = full scale x (counts / 1023 - 0.1) / 0.8
- One count is about 0.015 bar on the 12 bar model: the 4 V span covers about 818 of the 1023 counts.
- Every sensor's zero is a little different, so measure the output with no pressure in the pipe and use that as the offset instead of exactly 0.1.
Features of the Water Pressure Transducer Library
- A real-looking sensor: the transducer from the side at its true size - the cable connector, the stainless body, the hex and the thread - with its three coloured wires. At Run a blue band on the body grows with the pressure.
- The output of the datasheets: 0.5 - 4.5 V, ratiometric to the VCC pin, with a small noise and clamping near the rails.
- Any range: RANGE sets the full scale in MPa - 1.2 by default, 1.6, 0.69 (100 psi) or any other.
- A pressure: the DEMO booster pump system, a recorded run with a pressure tank, a tap, a water hammer and a dry well; or a STEADY pressure. The pop-up switches to 0, 2, 4 or 8 bar.
- A pop-up: a pressure gauge, the signal with the formula and the ADC counts, the pressure in bar, psi and kPa; graphs, an event log and a check page.
- Warnings: a spike above 5 bar, a pressure above the full scale and a supply out of range.
- A complete package: about 2.7 MB with the library, our I2C LCD, resistors, LEDs and buzzer, our Arduino UNO V4.0 and the demo, without the source code of the model.
The Water Pressure Transducer in Proteus
The device is PRESSURETXTEP in TEPPRESSTX.LIB, under Modules > Sensors, with the model TEPPRESSTX.DLL. Search PRESSURE or transducer in Pick Devices. Its three pins are the three wires: VCC, GND and OUT. Three properties set it up: RANGE (the full scale in MPa), PROFILE (DEMO or STEADY) and PRESSURE (the pressure in bar for STEADY).
Download Water Pressure Transducer Library for Proteus Simulation
Click the button below to download Water-Pressure-Transducer-Library-for-Proteus-v1.0.zip (about 2.7 MB, without the source code of the models):
Water Pressure Transducer Library for Proteus V1.0- README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
- Proteus Library Files:
TEPPRESSTX.LIB,TEPI2CLCD16X2.LIB,TEPRESISTOR.LIB,TEPLED5MM.LIB,TEPBUZZER.LIBandArduinoV4TEP.LIB. - Proteus Model Files:
TEPPRESSTX.DLL,TEPLCD.DLL,TEPRESISTOR.DLL,TEPLED5MM.DLL,TEPBUZZER.DLLandTEPARDUINO.DLL. - Arduino Code: the demo sketch (Wire only).
- Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.
How to Install Water Pressure Transducer Library for Proteus Simulation
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
- Copy the files from Proteus Model Files into the MODELS folder.
- Delete
TEPPRESSTX.IDXfrom the LIBRARY folder if it is there. - Start Proteus, press P and search for PRESSURE.
Proteus Simulation of a Booster Pump Controller
A booster pump keeps the water pressure up in a house fed from a well or a low tank. A pressure tank beside the pump stores some water under pressure, so the pump does not start for every glass of water. The controller is a pressure switch: it starts the pump when the pressure falls to the cut-in and stops it at the cut-out. The demo uses 2.0 and 3.5 bar - close to the common 30 / 50 psi switch.
The demo uses an A4 sheet with our Arduino UNO Library for Proteus V4.0. The transducer (U1, 0 - 1.2 MPa) has its output on A0. A 16x2 LCD from our I2C LCD 16x2 Library for Proteus sits on the I2C bus at 0x27; a green LED on D5 is the pump and a red LED on D7 the alarm, each through 220 ohms; and BZ1 from our Active Buzzer Library for Proteus on D8 beeps on an alarm. The Arduino's monitor is built in, the same window as our TEP Serial Monitor Advance for Proteus. Open Pressure-Booster-Pump-ArduinoUnoV4.pdsprj.
One thing to know: the DEMO pressure is a recorded run of a real-world pump system, played in fast time - a minute of water use in six seconds. The green LED shows what the sketch decides, but it does not drive the simulated pressure; in a real build that pin would switch the pump through a relay, for example from our Relay Module Library for Proteus.
The Sketch
Each reading averages eight conversions and returns the fraction of the supply - the ratiometric way:
for (byte i = 0; i < 8; i++) sum += analogRead(SENSOR);
return sum / 8.0 / 1023.0;
At start-up, with no pressure in the pipe, the sketch measures the zero:
for (byte i = 0; i < 10; i++) { sum += readFraction(); delay(15); } // no pressure in the pipe yet
zero = sum / 10;
Then every 20 ms it turns the reading into bar, with the measured zero in place of the ideal 0.1:
const float bar = max(0.0, FULL_SCALE * (readFraction() - zero) / 0.8);
The pump logic is two comparisons with a gap between them - the hysteresis that keeps the pump from starting and stopping all the time. A reading above 5 bar starts a 600 ms alarm. The dry-run check needs the pump on and the pressure under 1.0 bar for half a second:
if (pumpOn && bar < DRY_BAR) {
if (!lowSince) lowSince = millis();
The LCD shows the pressure in bar and psi on the first line and the state on the second: PUMP ON, PUMP OFF, HIGH! with the peak, or DRY RUN - STOP!.
Water Pressure Transducer Simulation Results
Open the project and press Run. The demo runs 6 simulated seconds and took about 2 minutes 35 seconds on our PC with the pop-up open and the pictures being taken. Click U1 for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.
The Zero and the Filling
At power-on the pipe is empty and the transducer gives 0.500 V - 10 % of the 5 V supply. The sketch spends its first quarter of a second measuring that zero: ten averages of eight readings, about 102 counts. Then it acts like a pressure switch: the pressure is far below the 2.0 bar cut-in, so the first line after the zero is "pump ON at 0.00 bar" and the green LED lights. The pump fills the pressure tank. The pop-up at 1.0 s shows 2.07 bar - 30.0 psi, 207 kPa - and the signal card works out the output: 5.00 V x (0.1 + 0.8 x 2.07 / 12) = 1.190 V, which the UNO reads as 244 counts. A little later the pressure reaches 3.5 bar, the cut-out, and the sketch switches the pump off.
A Tap Open
From 1.6 s somebody opens a tap. The pump is off, so the tank pushes the water out and the pressure falls slowly. The pop-up at 2.3 s shows 2.41 bar, 35.0 psi, 1.302 V and 266 counts, and the peak tile keeps 3.55 bar from the filling. Just below 2.0 bar the sketch switches the pump on again.
The Pump Refilling
With the pump running the pressure climbs again even while the tap is open. At 3.0 s the pop-up reads 2.66 bar, 1.390 V and 284 counts; the LCD, updated every 200 ms, shows "2.44bar 35psi" and PUMP ON from its last update, with the green LED lit. The monitor follows it: 2.82 bar at 3.08 s, 3.19 bar at 3.29 s, and at 3.43 s "pump OFF at 3.51 bar" - the cut-out again.
A Water Hammer
At 3.60 s the tap is closed in one quick move. The moving water has nowhere to go, and its momentum turns into pressure: a water hammer. Within 50 ms the transducer climbs to 6.09 bar - 88.4 psi, 2.530 V, 518 counts - then the pressure wave swings back, dips to about 2.4 bar and settles. The sketch reads every 20 ms and the spike is only about 40 ms wide, but that is enough: the monitor prints "HIGH: 6.06 bar - water hammer" at 3.58 s. The red LED lights, the buzzer beeps and the LCD shows "HIGH! peak 6.1b" for 600 ms. The dip after the spike stays above the 2.0 bar cut-in - 2.45 bar at 3.71 s - so the pump stays off and does not chatter. The pop-up turns red: "HIGH - 6.09 bar (88.4 psi): a valve slammed: water hammer", and the spikes tile counts 1.
The Well Running Dry
At 3.85 s the tap opens again: 2.91 bar at 3.92 s, 2.62 at 4.13 s, 2.28 at 4.34 s, and at 4.50 s "pump ON at 1.97 bar". This time the well has run out of water. The pump is on, but the pressure keeps falling: 1.62 bar, 1.28 bar, 0.93 bar, 0.59 bar. The pop-up at 5.0 s shows 1.29 bar, 0.931 V and 191 counts with "the pump on, the well running dry". A pump running dry overheats in minutes, so the sketch watches for it: with the pump on, it starts a timer when the pressure falls below 1.0 bar, and after 500 ms it gives up. At 5.60 s the monitor prints "DRY RUN: the pump on, only 0.28 bar - stopped". The pump is switched off and locked out, the red LED stays on, the buzzer keeps beeping and the LCD shows "DRY RUN - STOP!".
The pop-up at 5.95 s shows the end: 0.30 bar, 4.4 psi, 0.596 V and 122 counts. Its banner is orange - LOW - because the pressure is below what a water system should have. The peak tile still holds 6.09 bar.
The Graphs, the Event Log and the Check Page
The Graphs page plots the pressure, the output voltage, the peak so far and the moments above 5 bar - the water hammer stands out as one sharp spike with its dip after it. The Event log lists each stage of the pump system and the warning at 5 bar. The Check page sums up the run: the supply at 5.00 V with the output ratiometric to it; the signal 0.596 V for 0.30 bar; the peak, 6.09 bar, well inside the 12 bar full scale (the datasheets allow twice the full scale and warn of damage from 2.5 times); one spike above 5 bar, with the advice that a pressure tank or a slow-closing valve damps it; and the accuracy, +-1.5 % of full scale = +-0.18 bar.
The Arduino's built-in serial monitor prints the zero at start-up, then a line every 200 ms - the time, the pressure and the pump - and a line of its own for each event: the pump on or off, a HIGH spike and the dry run. Its times come from millis(), which starts when the sketch starts, a few hundredths of a second after the simulation does.
Why Water Hammer Matters
Water in a pipe is heavy and it moves. When a valve closes suddenly, the water still moving towards it is stopped in an instant, and the pressure jumps. For water moving at 1 m/s and stopped at once, the Joukowsky equation gives a jump of more than 10 bar - far above a house system's working pressure. The pressure wave then runs back and forth along the pipe, which is the knocking you can hear. A pressure tank, a water hammer arrester or valves that close slowly soften it, and a sensor with twice the working pressure as its full scale survives it.
Pressure Transducer or Barometric Sensor?
A barometric sensor such as the one in our BMP280 Library for Proteus measures the air around it, about 1 bar, with great precision - for the weather and for altitude. A pressure transducer measures a pipe or a tank up to many bar and is built to be screwed into water. For the amount of water, rather than its pressure, our YF-S201 Water Flow Sensor Library for Proteus counts the litres.
Try It Yourself
- Click U1 while the simulation runs and use the chips: the LCD follows 2, 4 and 8 bar at once, 8 bar keeps the HIGH alarm on, and 0 bar starts the pump and trips the dry-run lock-out half a second later.
- Set PROFILE to STEADY and PRESSURE to 0.5: the pump comes on and the dry-run check stops it half a second later; with PRESSURE at 3 the pump stays off.
- Set RANGE to 1.6 without changing the sketch: every reading is 25 % too low - FULL_SCALE in the sketch must match the sensor.
- Change CUT_IN and CUT_OUT to 2.5 and 3.0: the pump switches more often - the hysteresis is smaller.
- Replace the zero calibration with zero = 0.1: the readings stay close, because the model's zero is exactly 0.5 V - a real sensor is rarely that exact.
Ideas to Extend the Demo
- Drive a real pump through a relay and add a minimum off time, so the pump never starts more than a few times a minute.
- Add a reset button for the dry-run lock-out, or retry automatically after a few minutes.
- Log the pressure and the pump starts to find leaks: a pump that starts with every tap closed is losing water somewhere.
- Use a second transducer before the pump to measure the suction side.
Your Own Sketches
The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.
Things to Know Before Using a Real Pressure Transducer
- Seal the thread: use PTFE tape on the G1/4 thread, and do not tighten it by the body - use the hex.
- Mount it well: keep air out of the port; on a vertical pipe, a side or bottom position is best.
- Clean media: clean water, air or oil only, unless the sensor says it is made for something else.
- The same 5 V: power the sensor from the Arduino's 5 V, so the reading stays ratiometric.
- Long cables: keep the signal wire away from the pump's power cable, and add a small capacitor at the analog input.
Troubleshooting
- It reads about 0.5 V and never moves: no pressure, or the port is blocked.
- It reads a few tenths of a bar with the pipe open: calibrate the zero.
- It reads 0 V: the signal wire is broken or the sensor has no supply.
- It reads 4.5 V or more: the pressure is above the full scale - choose a bigger range.
- The part is not simulated:
TEPPRESSTX.DLLis missing from MODELS and from the project folder.
Limitations of the Simulation
- The ratiometric 0.5 - 4.5 V output, the ranges and the over-range warnings follow the datasheets of this sensor; the drawing is our own.
- Our own figures: a 100 ohm output, +-0.1 % of full scale of noise, the clamps at 0.25 V and 97 % of VCC, 5 mA, and the DEMO's pressure curve in fast time.
- The DEMO is recorded: the pump output does not drive the simulated pressure.
- Not modelled: the temperature error, the 2 ms response, damage above 2.5 times the full scale.
- Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or any maker of this sensor.
- Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.
So, that was all about the Water Pressure Transducer Library for Proteus Simulation. I hope it helps you build a pump controller that keeps the pressure right and the pump safe. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!






















Comments
0