Project Files of Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation
00fb64741167443fb5f090e6cc025ac6.zip

Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation V1.0
Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation V1.0 comes as a ZIP archive of 138 files (13.7 MB, 26.8 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, source code and a nested archive.
- LIBProteus library
- DLLProteus model
- DSNProteus simulation
- SRCSource code
- ZIPNested archive
Description
Soil-NPK-Fertilizer-Advisor-Raspberry-Pi-5-Proteus-Simulation-v1.0.zip: the complete Proteus simulation project (a Raspberry Pi 5, a MAX485 RS-485 module, a soil NPK probe, a 1.8 inch ST7735 TFT, the Laptop and Mobile WiFi Monitors), the Python program soil_advisor.py, every LIB and DLL, the TEP Pi runtime and a README.
File Structure
39.5 KB59.2 KB13.1 KB60.5 KB17.1 KB58.4 KB3.3 MB34.3 KB620.8 KB36 KB169.8 KB628.1 KB99.3 KB65.3 KB4.8 MB4.1 MB80 B97.8 KB26.8 KB1.2 MB1.1 MB88.9 KB27.3 KB55.8 KB79.8 KB105.8 KB193.8 KB113.8 KB48.8 KB145.8 KB36.8 KB29.3 KB42.3 KB28.8 KB67.3 KB89.3 KB153.8 KB22.8 KB38.8 KB2.1 KB9.9 KB4.1 KB1.3 KB4.7 KB431 B2.5 KB17.5 KB283 B6.5 KB37.9 KB11.1 KB5.5 KB885 B13.6 KB9 KB878 B1.5 KB4 KB1004 B10 B110 B2.6 KB1.1 KB8.9 KB58.5 KB12.4 KB6.6 KB18.5 KB20.7 KB27.8 KB21.1 KB7.1 KB7.7 KB2.7 KB51.2 KB100.9 KB1.2 KB24.3 KB7.4 KB53.6 KB26.1 KB20.5 KB60.5 KB19.6 KB1.6 KB8.4 KB20.9 KB2.6 KB539 B1.4 KB9.7 KB2.8 KB21 B92 B7.9 KB264 B3.4 KB3.8 KB17.5 KB55.2 KB3.3 KB10.8 KB1.5 KB4.2 KB7.3 KB2.5 KB32.6 KB14.5 KB283 B17.4 KB257 B691 B14.5 KB12.8 KB3.6 KB1.7 KB37 KB418 B6.2 KB7 KB37.3 KB10.6 KB23.7 KB28.7 KB8.8 KB16.9 KB281.5 KB3.0 MB319.5 KB310.5 KB32.4 KB20.4 KB281.5 KB3.0 MB319.5 KB310.5 KB20.4 KB10.3 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation. Open an image for its full size.












README
===============================================================================================================
Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation - Project V1.0
The Engineering Projects - www.TheEngineeringProjects.com
===============================================================================================================
IMPORTANT LINKS
The project tutorial (circuit, code, simulation results):
https://www.theengineeringprojects.com/2026/11/soil-npk-fertilizer-advisor-raspberry-pi-5-proteus-simulation.html
The libraries this project is built from (each post has its own full download and tutorial):
Raspberry Pi 5 board:
https://www.theengineeringprojects.com/2026/10/raspberry-pi-5-library-for-proteus.html
Soil NPK sensor (RS485):
https://www.theengineeringprojects.com/2026/11/soil-npk-sensor-library-for-proteus.html
MAX485 RS-485 module:
https://www.theengineeringprojects.com/2026/10/max485-rs485-module-library-for-proteus-v1-0.html
TFT ST7735:
https://www.theengineeringprojects.com/2026/10/tft-st7735-library-for-proteus-v1-0.html
Laptop WiFi Monitor:
https://www.theengineeringprojects.com/2026/10/laptop-wifi-monitor-library-for-proteus.html
Mobile WiFi Monitor:
https://www.theengineeringprojects.com/2026/10/mobile-wifi-monitor-library-for-proteus.html
Support our free work: https://www.theengineeringprojects.com/donate
FILE STRUCTURE
Pi-5-Soil-NPK-TEP-v1.0/
|-- Proteus Library Files/
| |-- TEPLAPTOP.LIB 39.5 KB a part of the project -> LIBRARY folder
| |-- TEPMAX485.LIB 59.2 KB a part of the project -> LIBRARY folder
| |-- TEPMOBILE.LIB 13.1 KB a part of the project -> LIBRARY folder
| |-- TEPRPI5.LIB 60.5 KB a part of the project -> LIBRARY folder
| |-- TEPSOILNPK.LIB 17.1 KB a part of the project -> LIBRARY folder
| |-- TEPTFT.LIB 58.4 KB a part of the project -> LIBRARY folder
|-- Proteus Model Files/
| |-- TEPMAX485.DLL 281.5 KB a model -> MODELS folder
| |-- TEPNET.DLL 3.01 MB a model -> MODELS folder
| |-- TEPSOILNPK.DLL 319.5 KB a model -> MODELS folder
| |-- TEPTFT.DLL 310.5 KB a model -> MODELS folder
| |-- TEPPi/python/ 17.54 MB Python 3.11 embeddable -> MODELS\TEPPi (33 files)
| |-- TEPPi/runtime/ 1.11 MB TEP Pi runtime, gpiozero -> MODELS\TEPPi (87 files)
|-- Proteus Simulation/
| |-- Pi-5-Soil-NPK.pdsprj 32.4 KB the project simulation
| |-- soil_advisor.py 20.4 KB the program PI1 runs
| |-- TEPMAX485.DLL 281.5 KB copy of the model
| |-- TEPNET.DLL 3.01 MB copy of the model
| |-- TEPSOILNPK.DLL 319.5 KB copy of the model
| |-- TEPTFT.DLL 310.5 KB copy of the model
|-- Python Code/
| |-- soil_advisor.py 20.4 KB the program (the same file)
|-- README.txt ~10.6 KB this file
Total: 26.78 MB (unzipped). The C++ source code of the models is not included.
WHAT IS IT?
A gardener pushes an NPK probe into a vegetable bed. A Raspberry Pi 5 reads the nitrogen, phosphorus and potassium
over RS485, compares them with what the chosen crop needs and works out how many grams of which fertilizer the bed
needs.
* PI1 RASPBERRY PI 5 runs soil_advisor.py on Ethernet at 192.168.1.51 (port 8000).
* U1 a MAX485 RS-485 module (MAX485ADVTEP) on the Pi's UART (/dev/serial0): DI = TXD GPIO14 (pin 8), RO = RXD
GPIO15 (pin 10), DE and RE together = GPIO18 (pin 12); VCC on the VCC rail; A / B to the probe.
* U2 the soil NPK probe (SOILNPKTEP, Modbus address 1, PROFILE STEADY, N 30, P 12, K 95 mg/kg - a poor bed; the
pop-up's chips: Sandy, Garden, Compost, Potting, Fertilise, Rain): VCC on +12V, A / B from the MAX485.
* TFT1 a TFT 1.8" ST7735 (TFT18ST7735ADVTEP) on SPI0: SDA = MOSI GPIO10 (pin 19), SCK = SCLK GPIO11 (pin 23),
CS = CE0 GPIO8 (pin 24), A0 = GPIO25 (pin 22), RESET = GPIO24 (pin 18), VCC / LED on 3.3 V.
* Laptop WiFi Monitor (PC1) and Mobile WiFi Monitor (MOB1) open http://192.168.1.51:8000/.
What the program does:
Modbus RTU 9600 8N1; function 0x03 from register 0x001E, 3 registers: 01 03 00 1E 00 03 65 CD; the 11-byte
answer carries N, P, K in mg/kg and its CRC-16 (0xA001, the low byte first); DE / RE HIGH while the
request goes out, LOW 9.3 ms later (8 bytes x 10 bits at 9600 baud) - the probe answers 20 ms after
settled a reading every 2 s; three in a row within 3 mg/kg = a steady soil, their average is used
the advice the root zone (15 cm, 1,300 kg/m3) holds 195 kg of soil a square metre: 1 mg/kg in the 10 m2 bed =
1.95 g of the nutrient; the shortfall to the crop's lower limit is met with DAP (18-46-0) for the
phosphorus first (its nitrogen counted), urea (46-0-0) for the rest of the nitrogen and MOP (0-0-60)
for the potassium; P = P2O5 x 0.4364, K = K2O x 0.8301
the crops mg/kg (low - high) for N / P / K: TOMATO 120-200 / 50-90 / 180-300, LETTUCE 100-160 / 40-80 /
150-250, MAIZE 130-200 / 40-70 / 150-250, POTATO 110-180 / 55-100 / 200-320
the verdict FERTILIZE (a nutrient under the low limit), TOO MUCH (over the high limit) or ALL GOOD
LEACHING a steady soil whose nitrogen fell by a third or more while the phosphorus held = nitrate washed
out: split the urea into smaller doses
the TFT the crop, N / P / K bars against the crop's range, the verdict and the grams (only the parts that
changed are sent)
Its pages:
/ the dashboard with the links Refresh, TOMATO, LETTUCE, MAIZE and POTATO (/crop/<name>)
/data JSON: the crop, the readings, the advice, the Modbus counters, the events
Python libraries: lgpio, spidev and pyserial (all in the TEPPi runtime; on Raspberry Pi OS: python3-lgpio,
python3-spidev and python3-serial); threading, http.server.
TEST STATUS
Tested in Proteus 8 Professional on Windows 11, the run that made the tutorial's screenshots (the program's clock):
- Modbus RTU through the MAX485: 43 requests, 43 answers, 0 CRC errors, DE never dropped early (its own count).
- 4.0 s, the poor bed under TOMATO: N 30, P 12, K 94 mg/kg - FERTILIZE N P K; for the 10 m2 bed 175.5 g N, 74.1 g P,
167.7 g K short - DAP 369 g, urea 237 g, MOP 337 g.
- Fertilise: 28.0 s "N, P and K all rose: +110, +50, +116" - N 140, P 62, K 210: ALL GOOD, no fertilizer needed.
- Rain: 44.0 s "LEACHING: nitrogen -94 mg/kg (-67 %) while the phosphorus held" - N 46: FERTILIZE N, urea 314 g.
- The dashboard: POTATO (50.1 s) - FERTILIZE N K, urea 271 g, MOP 59 g; LETTUCE (55.8 s) - FERTILIZE N, urea 233 g.
- Compost: 74.0 s, N 260, P 119, K 418 - TOO MUCH N P K for lettuce, no fertilizer needed.
- 87.1 s of simulation in 328 s.
INSTALLATION
1. Close Proteus. Extract the WHOLE zip file, for example to your Desktop.
2. Copy the files from "Proteus Library Files" into the LIBRARY folder of Proteus, for example
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY
3. Copy everything in "Proteus Model Files" - the DLL files and the TEPPi folder - into the MODELS folder (next
to LIBRARY).
4. Start Proteus. Press P in the schematic and search for RASPBERRY PI 5 or SOILNPKTEP to check that the parts are
there.
RUN THE SIMULATION
1. Open "Proteus Simulation\Pi-5-Soil-NPK.pdsprj". Keep soil_advisor.py and the DLL files beside it.
2. Press Play. After about 4 s the TFT shows the poor bed and the grams for a tomato bed.
3. Click U2 for the probe's pop-up and change the soil: Fertilise, Rain, Compost. Open the Laptop or the Mobile
WiFi Monitor (Go) for the dashboard and pick another crop.
PROPERTIES USED IN THIS PROJECT
PI1 RASPBERRY PI 5 PROGRAM=soil_advisor.py, ETHERNET=IN (192.168.1.51)
U1 MAX485ADVTEP (defaults)
U2 SOILNPKTEP PROFILE=STEADY, N=30, P=12, K=95, ADDRESS=1
TFT1 TFT18ST7735ADVTEP; PC1, MOB1 HOMEPAGE=http://192.168.1.51:8000/
TROUBLESHOOTING
* "no answer from the probe": A to A and B to B, the probe on 12 V, DE / RE low in time for the answer, the
address 1; the MAX485 needs VCC.
* CRC errors: the baud rate or the frame (8N1) differ - some probes are set to 4800 baud.
* The readings jump: the probe follows the soil with a lag; the advice waits for three steady readings.
* The TFT stays black: CS / RESET / A0 / SDA / SCK on pins 24 / 18 / 22 / 19 / 23, VCC and LED on 3.3 V.
* On a real Pi: the MAX485 runs on 5 V and its RO gives 5 V - use a 3.3 V transceiver (MAX3485) or a level
shifter on RXD.
LICENCES
* The project, the program, the parts (LIB files) and the models (DLL files) are made by The Engineering Projects
and are free for learning and for your own projects. The models use only standard Windows libraries.
The C++ source code of the models is not included; the source code is not included for any model.
* TEPPi\python is the Python 3.11 Windows embeddable package (Python Software Foundation License); TEPPi\runtime
holds our TEP Pi runtime with gpiozero and colorzero (BSD licences) - their licence files are inside the folders.
* The crop ranges and the soil figures are typical values for learning; follow a local soil laboratory's advice
for a real field.
* Proteus is a product of Labcenter Electronics and is not included. Raspberry Pi is a trademark of Raspberry Pi
Ltd; MAX485 is a product of Analog Devices (Maxim Integrated). This project is not made or endorsed by them.
VERSION
V1.0 - the first release of the project.
===============================================================================================================Development1 release
-
V1.0Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation V1.0this page
V1.0 is the only release in the Download Center so far. When a newer version is published, it appears above with its own download page.
Installation7 steps
From the download to a working project, in order. The steps follow what the package contains.
You will need
- Proteus Design SuiteProteus 8 or newer (Labcenter), on Windows
- Pythonto build the source files into firmware
- Any archive toolWindows, macOS and Linux extract ZIP files on their own
Steps
- 1
Extract the archive
Right-click 00fb64741167443fb5f090e6cc025ac6.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (Pi-5-Soil-NPK-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move TEPLAPTOP.LIB, TEPMAX485.LIB and TEPMOBILE.LIB and 3 more and the files into the LIBRARY folder of your Proteus installation: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY for Proteus 8, or the matching Proteus 7 folder. Older versions keep it under ProgramData\Labcenter Electronics. If Proteus is open, close it first.
- 3
Add the simulation model
Copy TEPMAX485.DLL, TEPNET.DLL and TEPSOILNPK.DLL and 8 more into the MODELS folder next to LIBRARY, so the component can run, not only be drawn.
- 4
Restart Proteus and place the component
Start Proteus, open a schematic, press P (Pick Devices) and search for the component by the name used in the tutorial. It appears with its pins ready to wire.
- 5
Build the source code
Open soil_advisor.py, attr.py and color.py and 28 more in the compiler named in the tutorial (MikroC, Keil, MPLAB, Code Composer or the Arduino IDE) and build it to get the firmware.
- 6
Open the example simulation
Open Pi-5-Soil-NPK.pdsprj in Proteus to see the wiring exactly as in the tutorial. Check the controller's Program File path, then press Play.
- 7
Follow the tutorial
Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation explains every connection and setting in order; keep it open beside the files while you build.
FAQs8 questionsContact TEP
How do I download Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation V1.0?
Wait for the 30-second guest countdown on this page, then press the download button; the file comes straight from our storage. Members who are logged in skip the wait. If the browser opens the file instead of saving it, use its Save as option. The download link is made for you when the countdown ends and works for 15 minutes; a saved or shared link stops working, so share this page instead.
What is inside the archive?
Soil NPK Fertilizer Advisor on Raspberry Pi 5 - Proteus Simulation V1.0 comes as a ZIP archive of 138 files (13.7 MB, 26.8 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, source code and a nested archive. Open the File Structure tab for the full list of 138 files.
What should I do if the download does not start?
Check the browser's download list first; an ad blocker or a company firewall can also hold it back, so try another browser or network. If the file arrives incomplete, download it again. For an installation problem, read the Install tab or tell us in the comments with your software version and the exact error message.
Is this file free?
Yes. Every file in the TEP Download Center is free for learning, personal and student projects. If you share it, link back to this page or the tutorial so others find the latest version.
How do I check that the file arrived complete?
Compare its SHA-256 with the one on this page, c4bb4285d9e7f6103b6b3fb68413b50bff114beb90b432d5dc4a9f536ecca321. In PowerShell run Get-FileHash "00fb64741167443fb5f090e6cc025ac6.zip"; on macOS or Linux run shasum -a 256 "00fb64741167443fb5f090e6cc025ac6.zip". The same value means the file is exactly the one in our storage; a different one means the download broke off, so download it again.
Do I need WinRAR to open the ZIP file?
No. Windows, macOS and Linux open ZIP archives on their own (Extract All, or double-click). WinRAR and 7-Zip work too. Extract the whole archive before using the files.
Where do I put the LIB and IDX files?
Both files go into the LIBRARY folder of your Proteus installation (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY; Proteus 7 has the same folder under its own name). Restart Proteus afterwards and search for the component with P.
Which Proteus version does the library need?
The tutorial names the Proteus version the library was made and tested with. Most TEP libraries work in Proteus 7 and Proteus 8; if the component does not appear after a restart, check that both the LIB and the IDX file were copied and that Proteus was fully closed while copying.
Members skip the wait. Log in or join TEP.
- 0Total downloads
- 4%Popularity
- Raspberry PiCategory
- 0Comments
- ssyedzainnasirUploaded by
- 30 Nov 2026Uploaded at
c4bb4285d9e7f6103b6b3fb68413b50bff114beb90b432d5dc4a9f536ecca321






















Comments
0