Hello friends, I hope you all are doing great. Today, I am going to share the new 12V Peristaltic Pump Library for Proteus V1.0. A peristaltic pump is the small pump with a round clear head and three rollers that you find in aquarium dosers, hydroponic nutrient systems, coffee and cocktail machines and lab equipment. It does one thing better than any other small pump: it moves an exact volume, drop by drop, without the liquid ever touching the pump itself.
12V Peristaltic Pump Library for Proteus
Latest version: V1.0 (November 2026, this tutorial)
Other motors: SG90 Servo · TT Gear Motor · 28BYJ-48 Stepper · NEMA 17 Stepper · MG996R Servo · N20 Encoder Motor · JGA25-370 Encoder Motor · FS90R 360 Servo · 130 DC Motor · A2212 Brushless · X27.168 Gauge · Analog Panel Meter · DC Tachogenerator · LM393 Speed Sensor · MG90S Servo · DS3218 Servo · L12 Linear Servo · JGB37-520 Motor · RS-775 Motor · JGY-370 Worm Motor · 12V Linear Actuator · Coin Vibration Motor · Mini Submersible Water Pump · 4-Pin PC Fan · 12V Push-Pull Solenoid · NEMA 23 Stepper Motor · Micro Linear Stepper · TYJ50 Synchronous Motor · Quartz Clock Movement · Air-Core Gauge · Electromechanical Counter · Split-Flap Display · Electric Bell · Wind Turbine · 8520 Coreless Motor · Car Wiper Motor · Car Door Lock Actuator · 12V Solenoid Water Valve · 12V Holding Electromagnet
Motor drivers: L298 · L9110S · TB6612FNG · BTS7960 · A4988 / DRV8825 · 28BYJ-48 + ULN2003 · PCA9685 Servo · Relay Module · 30A Brushless ESC · TB6600 Stepper Driver
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
That makes it the natural choice for an Arduino dosing project, and this library lets you design one in Proteus first. The rotor turns on the schematic at the simulated speed, the water climbs from a bottle through the tubes, drips into a beaker and fills it with exactly the volume pumped. The demo runs on our Arduino UNO V4.0 and drives the pump from 12 V through our separate L9110S library, with commands that prime the tubes, dose 5 mL and suck the last drop back.
NOTICE: the whole point of a dosing pump is the volume, so our team put a lot of effort into getting the volume right - the tubes that fill before the first drop, the rollers that hold them full, the suck-back that keeps the tip dry - and into a head that really turns on the sheet. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the Motor Driver board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the 12V Peristaltic Pump Library for Proteus V1.0:
What is a Peristaltic Pump?
Inside the round head of a peristaltic pump, a soft silicone tube lies against a curved track. A rotor with three rollers turns over it, driven by a small DC gear motor. Each roller pinches the tube shut and rolls along it, pushing the liquid in front of it and drawing new liquid in behind it - the same way your throat moves food, which is where the name comes from. The liquid only ever touches the inside of the tube, so the pump works for water, nutrients, acids and food alike.
| 12 V peristaltic pump, 2 x 4 mm tube (the model) | |
|---|---|
| Voltage | 12 V DC (it starts at about 3.1 V) |
| Flow at 12 V | 85 mL/min at 106 RPM of the head |
| Volume | 0.8 mL every turn of the head, forward or backward |
| Current | 253 mA at 12 V, 0.86 A when stalled |
| Tubes | 2 mm bore: 3.14 mL from the bottle to the outlet (30 cm lift) |
| Special | self-priming, reversible, the tubes stay full when it stops |
A Fixed Volume Every Turn
A peristaltic pump is a positive-displacement pump: every turn of the head moves the same 0.8 mL, whatever happens downstream. Compare it with the centrifugal pump of our Mini Submersible Water Pump Library for Proteus, whose flow collapses as soon as the outlet goes higher. Here, a 3 m lift costs less than 1 % of the flow - 84.4 mL/min instead of 85.0. That is why the flow is simply the head's speed times 0.8 mL, and why a dose by time is so accurate.
Self-Priming, Holding and the Suck-Back
Three more properties make it a dosing pump. It is self-priming: it pulls the liquid up the empty inlet by itself, and the first drop falls once the tubes are full. When it stops, a roller always pinches the tube, so the tubes stay full and the next start delivers at once. And it is reversible: a short turn backward after a dose - a suck-back - pulls the liquid back from the outlet's tip so the last drop never hangs there.
What's New in 12V Peristaltic Pump Library for Proteus V1.0
- A real dosing pump: the gear motor, the tube squeezed by the rollers and the lift's pressure, from any driver - PWM or DC, forward or backward.
- Exact volume: 0.8 mL a turn, counted into the water delivered and into every run ("a run: 4.98 mL delivered").
- Self-priming and holding: the tubes fill before the first drop and stay full when the pump stops.
- Suck-back: turning backward empties the outlet first, then returns the liquid to the bottle.
- A turning head: the rotor and its rollers turn at the simulated speed, the water runs round the head, the drops fall, the beaker fills and the bottle empties.
- Properties and buttons: HEAD and PRIMED, and lift, Empty and Fill buttons on the pop-up.
- A pop-up window with four pages - Pump, Graphs, Event log and Check.
- A demo on our Arduino UNO V4.0 and our L9110S driver: the pot for the speed, priming, timed doses with a suck-back, and reverse.
The Peristaltic Pump in Proteus
Search peristaltic in Pick Devices; the device PERIPUMPTEP is in TEPPERIPUMP.LIB (category Electromechanical, Pumps) and its model is TEPPERIPUMP.DLL. The symbol shows the pump from the front: the black housing with its two mounting ears, the round clear cover, the amber silicone tube along the lower half of the track and the grey rotor with three white rollers. The red and black leads go into the housing; the clear inlet runs down into a bottle of water, the outlet over to a beaker.
While the simulation runs, the rotor turns at the head's real speed, the water climbs the inlet and runs round the head, drops fall from the outlet, the beaker fills with the water delivered (a 100 mL beaker, emptied when full) and the bottle slowly empties. The strip under the plate gives the flow in mL/min, the speed and the current next to the OPEN PANEL button. The plate, the bottle, the beaker and the LEDs are TEP additions; the LEDs show FWD (green) and REV (amber).
| Pin | Wire | What the model does with it |
|---|---|---|
| + | red | the gear motor, analog: positive on + turns the head forward |
| - | black | the motor's other terminal; reversed, the pump runs backward |
Two properties set the scene: HEAD is the lift in cm (default 30) - it sets the outlet tube's length and adds a little pressure - and PRIMED = 1 starts with the tubes full. The pop-up's buttons change the lift and empty or fill the tubes while the simulation runs.
Download 12V Peristaltic Pump Library for Proteus
Click the button below to download 12V-Peristaltic-Pump-Library-for-Proteus-v1.0.zip (about 1.2 MB, without the source code of the models):
12V Peristaltic Pump Library for Proteus V1.0- README.txt: installation, the demo, the wiring, real hardware, troubleshooting and the limits.
- Proteus Library Files:
TEPPERIPUMP.LIBandArduinoV4TEP.LIBfrom our Arduino Library for Proteus V4.0. - Proteus Model Files:
TEPPERIPUMP.DLLandTEPARDUINO.DLL. - Proteus Simulation:
12V-Peristaltic-Pump-L9110S-ArduinoUnoV4.pdsprj,PeristalticPump_Demo.hexand copies of the two DLLs. - Arduino Code:
PeristalticPump_Demo.ino(no library needed).
The driver is a separate library: this package holds only the pump and the UNO. The demo drives it through our L9110S motor driver, which has its own download - get it from our L9110S Motor Driver Library for Proteus and install it first, or the demo opens without its driver.
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 12V Peristaltic Pump Library for Proteus
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy
TEPPERIPUMP.LIBandArduinoV4TEP.LIBfrom Proteus Library Files into the LIBRARY folder of Proteus (usuallyC:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY). - Copy
TEPPERIPUMP.DLLandTEPARDUINO.DLLfrom Proteus Model Files into the MODELS folder. The two Arduino files are the ones of our Arduino Library V4.0; if you have it, they are the same. - Install our L9110S Motor Driver library the same way from its own zip:
TEPL9110S.LIBinto LIBRARY andTEPL9110S.DLLinto MODELS. - Delete
TEPPERIPUMP.IDXfrom the LIBRARY folder if it is there. - Start Proteus, press P and search for peristaltic.
Tip: keep the Proteus Simulation folder together, because the project needs its .hex file and the DLLs beside it. The library is tested in Proteus 8.5; Proteus 7 is not supported.
The Demo Circuit
Open 12V-Peristaltic-Pump-L9110S-ArduinoUnoV4.pdsprj. ARD1 is an Arduino UNO V4.0 from our Arduino UNO Library for Proteus V4.0, running PeristalticPump_Demo.hex with its serial monitor built in. DRV1 is the L9110S driver in its pop-up version, its VCC on a +12V power terminal. M1 is the pump on MOTOR A, with a 30 cm lift and the tubes empty at the start. RV1 is a 10k potentiometer on A0 for the forward speed.
The L9110S works up to 12 V and 0.8 A, enough for the pump's 0.25 A, and as an H-bridge it can turn the head both ways - which the suck-back needs. Its switches leave 11.49 V of the 12 V at full speed, so the measured flow is 80.1 mL/min rather than 85.
| From | To | Note |
|---|---|---|
| L9110S A-IA | D5 | PWM 980 Hz: forward |
| L9110S A-IB | D6 | PWM 980 Hz: backward |
| L9110S VCC / GND | +12V / GND | the pump supply, GND common with the UNO |
| L9110S A-OA / A-OB | pump + / - | the pump |
| RV1 wiper | A0 | the forward speed |
The Arduino Code
The demo needs no library. New to Arduino? Start with Arduino Tutorial for Beginners and Introduction to Arduino UNO. Three numbers drive the dosing: the flow at full speed, the time that fills the empty tubes, and the length of the suck-back:
const int IA = 5, IB = 6, POT = A0;
const float FLOW_ML_S = 1.34; // mL a second at full speed (80.1 mL/min measured) - measure yours
const int PRIME_MS = 2600; // fills the empty tubes (about 3.1 mL) at full speed
const int SUCK_MS = 150; // the suck-back after a dose: about 0.2 mL back from the tip
In setup() both pins become outputs and the pump starts stopped:
pinMode(IA, OUTPUT); pinMode(IB, OUTPUT);
drive(0);
One function drives the pump either way: a positive percentage puts PWM on A-IA (forward), a negative one on A-IB (backward), and zero pulls both LOW. The pin that must be LOW is always written first:
void drive(int pct) { // + forward (A-IA PWM), - backward (A-IB PWM), 0 both LOW
pct = constrain(pct, -100, 100);
int pwm = (int)(abs(pct) * 255L / 100);
if (pct > 0) { digitalWrite(IB, LOW); analogWrite(IA, pwm); }
else if (pct < 0) { digitalWrite(IA, LOW); analogWrite(IB, pwm); }
else { digitalWrite(IA, LOW); digitalWrite(IB, LOW); }
speedPct = pct;
}
Priming simply runs the pump at full speed long enough to fill the empty tubes. It also clears the flag that remembers a suck-back:
drive(100); delay(PRIME_MS); drive(0);
sucked = false;
A dose turns the volume into milliseconds with the measured flow. If the previous dose ended with a suck-back, the outlet is missing about 0.2 mL, so the sketch adds the suck-back's time to refill it first:
void dose(float ml) { // by time: the volume / the measured flow (+ the suck-back's refill), then a suck-back
unsigned long ms = (unsigned long)(ml * 1000.0 / FLOW_ML_S) + (sucked ? SUCK_MS : 0);
Then it pumps forward, turns backward for 150 ms and stops - the drop that would hang at the tip is pulled back into the tube:
drive(100); delay(ms);
drive(-100); delay(SUCK_MS); // the suck-back: the tip stays dry
drive(0);
sucked = true;
rev runs it backward at a percentage, and the pot drives it forward in the loop, its left end a clear "off":
if (!strncmp(s, "rev", 3)) { mode = FIXED; drive(-constrain(atoi(s + 3), 0, 100)); report(); sucked = false; return; }
int pct = raw < 40 ? 0 : map(raw, 40, 1023, 1, 100); // the left end: off
drive(pct);
The basics of PWM speed control are in our older DC Motor Speed Control using Arduino tutorial. The HEX file is in the package; to change the sketch, open it in the Arduino IDE and export the compiled binary, as in How to get the HEX file from Arduino. It needs 8,496 bytes of flash (26 % of the UNO) and 277 bytes of RAM.
Running the Demo
Press Run. The UNO's serial monitor and the pop-ups of the pump and the L9110S open over the schematic; move them aside. RV1 starts at 90 %: the rotor turns, the water climbs the empty inlet, runs round the head and, after about 2.8 seconds at this speed, the first drop falls into the beaker. This is the whole session of our test run, with the commands typed in the monitor:
12V Peristaltic Pump demo - The Engineering Projects
L9110S on 12 V: A-IA on D5 (forward), A-IB on D6 (backward). The pot on A0 sets the forward speed.
Commands: s 80 | rev 50 | prime | dose 5 | stop | knob | help
Pot 922: forward 89 % (PWM 226/255 = 10.64 V average)
s 100
forward 100 % (PWM 255/255 = 12.00 V average)
stop
stop: IA LOW, IB LOW (the rollers hold the tubes full)
dose 5
dose 5.0 mL: 3731 ms forward + 150 ms back
dose done
dose 5
dose 5.0 mL: 3881 ms forward (with the suck-back's refill) + 150 ms back
dose done
rev 50
backward 50 % (PWM 127/255 = 5.98 V average)
stop
stop: IA LOW, IB LOW (the rollers hold the tubes full)
prime
prime: 2600 ms at full speed - the tubes fill
primed
dose 5
dose 5.0 mL: 3731 ms forward + 150 ms back
dose done
knob
Following the pot on A0
Pot 922: forward 89 % (PWM 226/255 = 10.64 V average)
| Type | What it does | What the run showed |
|---|---|---|
| s 80 | forward at 80 % (the pot is ignored until knob) | s 100: 80.1 mL/min, 252 mA |
| dose 5 | pump 5 mL by time, then a 150 ms suck-back | 4.98 mL each time, 0.19 mL sucked back |
| prime | fill the empty tubes | the first drop after 2,358 ms |
| rev 50 | backward at 50 % | 23.0 mL/min back into the bottle |
| stop / knob | both inputs LOW / follow the pot again | the rollers hold the tubes full |
The Pop-Up Window
At Run the pump opens TEP 12V Peristaltic Pump, a window in the look of our TEP Serial Monitor Advance for Proteus. Its four tabs are Pump, Graphs, Event log and Check, with Settings and Help behind the gear and question mark icons. If you close it, OPEN PANEL on the strip brings it back.
The banner gives the state in one line - here "PUMPING 67.2 ML/MIN" with the head's speed and the drive. The gauge shows the flow from 100 mL/min backward on the left to 100 mL/min forward on the right, with the 12 V flow marked in amber. The live values are the flow, the head's speed, the current, the voltage, the drive, the water delivered, the tubes and the last run. At the bottom, the drive across the pump over the last 5 ms: the UNO's PWM passed on by the L9110S at 10.15 V average.
Type s 100: "steady 80.1 mL/min forward, 100 RPM, 11.49 V average, 252 mA". The arithmetic is visible right under the gauge - 100 RPM at the head times 0.8 mL a turn - and that number is the one the sketch's FLOW_ML_S uses: 80.1 mL/min is 1.34 mL a second.
Doses and the Suck-Back
Type stop, then dose 5. The sketch pumps for 3,731 ms and turns back for 150 ms. The Event log records "a run: 4.98 mL delivered in 3.73 s" and then "back: 0.19 mL drawn back from the outlet (a suck-back: its tip will not drip)". The second dose 5 pumps for 3,881 ms - the extra 150 ms refill the outlet first - and delivers 4.98 mL again. Within 0.4 % of the target, twice in a row, because the rollers never let the tubes empty.
The Check page sums it up in rows with a verdict each: the drive, the current, the speed, the flow with its arithmetic, the tubes - here 2.95 of 3.14 mL, because the suck-back left the tip empty - the priming time, the last run, the suck-back and the water delivered. The peak current of 1.2 A is the moment the head reverses at full speed: short, but worth knowing when you choose a driver.
Turning Backward
Type rev 50. The head turns backward at 29 RPM - "steady 23.0 mL/min BACK, 29 RPM, -5.56 V average, -234 mA" - and on the sheet the water retreats from the outlet's tip towards the head. Run it long enough and the outlet is empty, then the inlet, and every drop goes back into the bottle.
Priming from Empty
Click Empty the tubes on the toolbar, then type prime. The pump runs at full speed for 2.6 s, and the water climbs the inlet and runs round the head. The banner turns teal while it fills: "PRIMING - THE TUBES 1.85 OF 3.14 ML". The Event log then reports "first drop at the outlet after 2358 ms: the tubes hold 3.14 mL (self-priming)", and the following dose 5 delivers 4.98 mL like the others.
Graphs
The Graphs page shows the end of a dose in three lines: the flow at 80 mL/min, a short dip to the other side for the suck-back, and the current doing the same - a negative peak as the head reverses. The water delivered rises in a straight line during the dose and stays perfectly flat afterwards: nothing drips.
How the Model Works
The pump is solved by Proteus's analog engine: the head's speed is an internal node computed together with the driver from the gear motor's resistance of 14 ohm and its back-EMF, the friction of the tube squeezed by the rollers - which is why it needs about 3.1 V to start - the inertia and the small pressure of the lift. The flow is 0.8 mL a turn either way. The tubes are stepped after every analog step: they fill from the bottle, stay full when the head stops, and empty from the outlet's tip when it turns backward.
The analog steps are 0.1 ms or less, so the L9110S's PWM pulses are resolved. The demo runs at about a fifth of real time on a desktop PC: 40 seconds of simulation took about 3 minutes.
We checked the model on a PC with 23 automatic tests: 106.2 RPM, 253 mA and 85.0 mL/min at 12 V, the first drop after 2,224 ms with 3.14 mL of tube, the tubes still full after a stop and water at once on a restart, a 5 mL dose by time delivering 5.00 mL, a 150 ms suck-back of 0.21 mL, 3.14 mL back into the bottle after a long reverse, 34.3 RPM at 6 V, no turning at 2.5 V, 84.4 mL/min with a 3 m lift, PWM at 980 Hz found with its duty, a full beaker and the over-voltage warning at 14.5 V.
Troubleshooting
- The rotor never turns and the pop-up says NO DRIVE: the driver's inputs (both LOW means stop), its 12 V supply, or the leads on the wrong outputs.
- NOT TURNING: less than about 3.1 V across it - the tube needs that much force; raise the PWM.
- It turns but nothing comes out: the tubes are still filling (about 2.5 s from empty at full speed), or it turns backward.
- A dose is too small or too big: measure
FLOW_ML_Sfor your pump, tube and driver, and prime before the first dose. - No driver in the project: install our L9110S library (
TEPL9110S.LIB/TEPL9110S.DLL) - it is not in this package. - Nothing moves on the sheet, no UNO or no monitor:
TEPPERIPUMP.DLLorTEPARDUINO.DLLis missing from MODELS and the project folder; a closed monitor opens again with a click on the UNO's USB port.
Things to Know Before Using a Real Peristaltic Pump
- A driver, never a pin: 0.25 A running and up to 0.86 A at a start at 12 V. An H-bridge (L9110S, L298N, TB6612FNG) runs it both ways; a logic-level MOSFET with a diode runs it one way.
- Supply: a 12 V supply for the driver, with GND common with the Arduino.
- Calibrate: prime it, then run it for 30 s into a measuring cylinder and put the result in
FLOW_ML_S; doses by time are then exact. - Suck-back: a short reverse after each dose stops dripping; remember that the next dose refills it first.
- The tube wears: silicone tubes flatten with use - re-measure the flow from time to time, and release the tube when the pump is stored for long.
- Liquids: only the tube touches the liquid, so choose a tube material that suits it (silicone for water and food, others for solvents).
Limitations of the Simulation
- Not modelled: the winding inductance, the small pulse in the flow at each roller, the tube's wear and its springing back, air bubbles, thick liquids, a bottle running empty, and the differences between real pumps and tubes.
- The pump is the common 12 V head with a 2 x 4 mm tube; other heads and tubes are not selectable.
- The plate, the bottle, the beaker, the LEDs and the strip are TEP additions.
- The model is our own, written from the typical data of 12 V peristaltic pumps with a 2 x 4 mm tube; this library is not made or endorsed by Arduino or Labcenter.
- Licences: the demo needs no Arduino library; the HEX file contains the Arduino AVR core 1.8.6 with LGPL-licensed code, and the sketch is included. The potentiometer is Proteus's own POT-HG. The L9110S driver is our separate library.
- Tested in Proteus 8.5 in October 2026 with the demo as shipped: the pot, full speed, three doses with their suck-backs, reverse, emptying and priming the tubes, and the pop-ups. Proteus 7 is not supported.
So, that was all about the 12V Peristaltic Pump Library for Proteus V1.0. I hope it helps you build your doser - the driver, the calibration, the priming and the suck-back - before the first drop of nutrient goes into the tank. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!