Project Files of Raspberry Pi CM4 IO Board Library for Proteus: MAX485 Modbus HMI
raspberry-pi-cm4-io-board-tep-v1-0-f1195ffb068d419aae469b86f85dae2b.zip

Raspberry Pi CM4 IO Board Library for Proteus V1.0
Raspberry Pi CM4 IO Board Library for Proteus V1.0 comes as a ZIP archive of 129 files (14.4 MB, 28.5 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch, compiled HEX firmware, source code and a nested archive.
- LIBProteus library
- DLLProteus model
- DSNProteus simulation
- INOArduino sketch
- HEXHEX firmware
- SRCSource code
- ZIPNested archive
Description
Raspberry-Pi-CM4-IO-Board-Library-for-Proteus-v1.0.zip with the Raspberry Pi Compute Module 4 IO Board in Proteus (your Python program on the CM4 - RPi.GPIO, gpiozero, pyserial, sockets over Ethernet or Wi-Fi; TEPRPICM4.LIB, TEPNET.DLL and the TEPPi folder with Python 3.11), the MAX485, BMP280, Relay Module and Arduino UNO V4.0 libraries, the Laptop / Mobile WiFi Monitor symbols, the Modbus RTU HMI demo with its program, the slave node's sketch and a README.
File Structure
7.2 KB201.9 KB73.9 KB39.5 KB59.2 KB13.1 KB490.4 KB58.8 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 B17.4 KB257 B691 B14.5 KB12.8 KB3.6 KB1.7 KB37 KB418 B6.1 KB36.8 KB10.1 KB23.3 KB28.7 KB8.8 KB883.5 KB537 KB281.5 KB2.5 MB330 KB38.9 KB8.1 KB31.5 KB883.5 KB537 KB281.5 KB2.5 MB330 KB291 B8.1 KB24.2 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in Raspberry Pi CM4 IO Board Library for Proteus: MAX485 Modbus HMI. Open an image for its full size.












README
RASPBERRY PI CM4 IO BOARD LIBRARY FOR PROTEUS - V1.0 (COMPUTE MODULE 4: BCM2711 1.5 GHZ, 4 GB, 32 GB EMMC, IO BOARD)
YOUR PYTHON PROGRAM RUNS ON THE BOARD - DEMO: A MODBUS RTU MASTER + WEB HMI (MAX485 ON THE UART, AN ARDUINO SLAVE NODE)
Designed by The Engineering Projects www.TheEngineeringProjects.com
IMPORTANT LINKS
Article (read it first - pictures, step by step, every feature explained):
https://www.theengineeringprojects.com/2026/10/raspberry-pi-cm4-io-board-library-for-proteus.html
Report a bug or suggest a feature (our forum):
https://www.theengineeringprojects.com/forum/category/raspberry-pi-cm4-io-board-proteus-library
The demo's parts are our libraries (included) - their articles:
MAX485: https://www.theengineeringprojects.com/2026/10/max485-rs485-module-library-for-proteus-v1-0.html
BMP280: https://www.theengineeringprojects.com/2026/09/bmp280-proteus-library.html
Relay: https://www.theengineeringprojects.com/2026/10/relay-module-library-for-proteus-v1-0.html
UNO V4.0: https://www.theengineeringprojects.com/2026/10/arduino-uno-library-for-proteus-v40.html
Laptop: https://www.theengineeringprojects.com/2026/10/laptop-wifi-monitor-library-for-proteus.html
Phone: https://www.theengineeringprojects.com/2026/10/mobile-wifi-monitor-library-for-proteus.html
The earlier boards of this series:
https://www.theengineeringprojects.com/2026/10/raspberry-pi-model-b-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-1-model-b-plus-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-2-model-b-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-3-model-b-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-3-model-b-plus-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-3-model-a-plus-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-4-model-b-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-5-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-zero-w-library-for-proteus-v1-0.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-zero-2-w-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-400-library-for-proteus.html
https://www.theengineeringprojects.com/2026/10/raspberry-pi-500-library-for-proteus.html
Support us (the libraries are free):
https://www.theengineeringprojects.com/donate
FILE STRUCTURE
Raspberry-Pi-CM4-IO-Board-TEP-v1.0/
|-- Proteus Library Files/
| |-- ArduinoV4TEP.LIB 201.9 KB the Arduino UNO V4.0 (demo), to LIBRARY
| |-- TEPBMP280.LIB 73.9 KB the BMP280 sensor (demo), to LIBRARY
| |-- TEPLAPTOP.LIB 39.5 KB the laptop (demo), to LIBRARY
| |-- TEPMAX485.LIB 59.2 KB the MAX485 module (demo), to LIBRARY
| |-- TEPMOBILE.LIB 13.1 KB the phone (demo), to LIBRARY
| |-- TEPRELAY.LIB 490.4 KB the relay module (demo), to LIBRARY
| |-- TEPRPICM4.LIB 58.8 KB the CM4 IO Board, to LIBRARY
|-- Proteus Model Files/
| |-- TEPARDUINO.DLL 883.5 KB the Arduino UNO V4.0, to MODELS
| |-- TEPBMP280.DLL 537.0 KB the BMP280 sensor, to MODELS
| |-- TEPMAX485.DLL 281.5 KB the MAX485 module, to MODELS
| |-- TEPNET.DLL 2.51 MB the Pi + monitors + network, to MODELS
| |-- TEPRELAY.DLL 330.0 KB the relay module, to MODELS
| |-- TEPPi/python/ 17.54 MB Python 3.11.9 embeddable (33 files)
| |-- TEPPi/runtime/ 954.2 KB TEP Pi runtime, gpiozero (72 files)
|-- Python Code/
| |-- blink.py 0.3 KB an LED on GPIO17 (the default)
| |-- modbus_hmi.py 8.1 KB the demo
|-- Arduino Code/
| |-- Modbus_Slave_Node/Modbus_Slave_Node.ino 7.2 KB Modbus slave 1 (AltSoftSerial)
|-- Proteus Simulation/
| |-- CM4-Modbus-HMI.pdsprj 38.9 KB the demo: Modbus RTU master + HMI
| |-- modbus_hmi.py 8.1 KB the program of the demo
| |-- Modbus_Slave_Node.hex 31.5 KB ARD1, Modbus slave 1
| |-- TEPARDUINO.DLL 883.5 KB copy of the model
| |-- TEPBMP280.DLL 537.0 KB copy of the model
| |-- TEPMAX485.DLL 281.5 KB copy of the model
| |-- TEPNET.DLL 2.51 MB copy of the model
| |-- TEPRELAY.DLL 330.0 KB copy of the model
|-- README.txt ~22.0 KB this file
Total: 28.50 MB (unzipped). The source code of the models and of the TEP Pi runtime is not included.
WHAT IS IT?
The Raspberry Pi Compute Module 4 (2020) on its official IO Board as one Proteus part - and a way to run Raspberry Pi
programs in Proteus 8.5. The CM4 is the Pi 4 made for products: the same BCM2711 (four Cortex-A72 cores at 1.5 GHz)
on a small module with 4 GB of RAM, 32 GB of eMMC flash instead of a microSD card and dual-band Wi-Fi + Bluetooth 5.0;
the IO Board carries the connectors a product needs: the 40-pin HAT header, a PCIe Gen 2 x1 slot, Gigabit Ethernet
(with PoE), two full-size HDMI, two USB 2.0, the micro-USB port for flashing the eMMC, a 12 V barrel jack, two camera
and two display connectors, a real-time clock with its CR2032 battery and a fan connector.
Proteus cannot run Raspberry Pi OS, so this library does not emulate Linux. It does what matters for electronics: the
board runs YOUR PYTHON PROGRAM (a .py file, the PROGRAM property) against the circuit on the sheet, with the Python
libraries a Pi uses for its pins, its I2C / SPI / UART buses and its network.
* At Run the board starts Python 3.11 (included: the TEPPi folder) with our TEP Pi runtime, then your program.
The program and Proteus work in lockstep: while the program runs, Proteus waits; while the program sleeps, waits
for a pin, a bus or the network, Proteus runs. So time.sleep(0.5) is 0.5 s of simulation, a busy loop still moves
the clock (about 1.5 us per GPIO call, as Python on the CM4's 1.5 GHz Cortex-A72), and every edge is on time.
time.time(), time.monotonic(), time.strftime() and datetime.now() follow the simulation's clock too.
* The network: eth0 when the Ethernet cable is in at Run (ETHERNET IN, the default; a click on the RJ45 plugs or
unplugs it), wlan0 when it is out - wlan0 then joins the network in the WIFISSID / WIFIPASS properties (default: our
router "TEP-WiFi", password 12345678 - the network of our ESP32 / Arduino Wi-Fi parts and the Laptop / Mobile WiFi
Monitors). One network interface at a time; the CM4 is 192.168.1.51 (192.168.1.(50 + the part's number)), the
name raspberrypi.local. The wired CM4 and the Wi-Fi monitors meet on the same router.
* Threads work (gpiozero's threads, your own threading.Thread, Timer, Queue, Lock): every wait is in simulation time;
an error in a thread is printed as Python prints it ("Exception in thread ...").
* The Python libraries for the pins (the same names, numbers and messages as on a Pi 4):
RPi.GPIO setmode, setup and output with one pin or a list (and a list of values), input, cleanup,
add_event_detect / event_detected / wait_for_edge with callbacks and bouncetime, PWM (software PWM
made by the board, steady while the program sleeps)
gpiozero LED, PWMLED, Button, OutputDevice, Buzzer, Servo, AngularServo, MotionSensor, DistanceSensor,
CPUTemperature and the rest (gpiozero 2.0.1, unchanged, on RPi.GPIO)
spidev SPI0 on GPIO11 (SCLK), GPIO10 (MOSI), GPIO9 (MISO), CE0 = GPIO8, CE1 = GPIO7, modes 0 to 3, up to
8 MHz; xfer / xfer2 take up to 4096 bytes (spidev's bufsiz), writebytes2 any length
smbus2 / smbus I2C bus 1 on GPIO2 (SDA) / GPIO3 (SCL) at 100 kHz, the Pi's 1.8 k pull-ups: read_byte,
write_byte, the byte / block reads and writes, write_quick, i2c_rdwr with i2c_msg; a device that
does not answer gives OSError [Errno 121] Remote I/O error
serial pyserial on /dev/serial0 (TXD GPIO14, RXD GPIO15; /dev/ttyS0 and /dev/ttyAMA0 are accepted too):
any baud rate, timeouts, reset_input_buffer, back-to-back bytes; flush() returns when the last
stop bit is out (what an RS-485 driver's DE pin needs)
1-Wire the DS18B20's files under /sys/bus/w1/devices (w1-gpio on GPIO4), as the kernel makes them
Adafruit_DHT, adafruit_dht + board DHT11 / DHT22 on any GPIO
socket TCP and UDP on eth0 or wlan0, http.server / socketserver, urllib.request, select
* The board's own files: /proc/cpuinfo (Revision c03140, four ARMv8 processors), /proc/device-tree/model ("Raspberry
Pi Compute Module 4 Rev 1.0"), the CPU temperature in /sys/class/thermal (gpiozero's CPUTemperature),
/proc/loadavg, /proc/meminfo (4 GB). gpiozero's pi_info() names the board CM4.
* The Pi Terminal (our TEP window, no Windows title bar): the shell prompt (pi@raspberrypi:~ $ python3 ...), the
program's output (OUT) and errors (ERR, as Python prints them on a Pi), a line for input() (IN); its Board tab
shows the GPIOs (BCM numbers), the LEDs, the supply pins and RESTART PROGRAM. Click the HDMI0 socket or the
processor to open it.
* The LEDs: PWR (red) and ACT (green: it flickers while the board boots and when the program prints) at the left
edge of the IO Board, and the RJ45 jack's own LEDs - LNK (green) and 100 (yellow), lit with the cable in.
* The header's supply pins power the modules wired to them, as on the bench: 5V, 3V3 and GND as logic levels (an
analog VCC reading sees 5 V on either rail).
The IO Board (160 x 90 mm) is drawn our way from above at about 0.6 of its size, so that it stays a handy part on the
sheet - only the 40-pin header keeps the real 0.1 in pitch, so its comb matches every other Pi of the series: the
green board with its four mounting holes, the 40-pin header along the top edge, the Compute Module 4 in the middle on
its two connectors (the BCM2711 under its heat spreader, the 4 GB LPDDR4, the 32 GB eMMC, the Wi-Fi / Bluetooth can
and the U.FL antenna socket), the PCIe x1 slot, CAM0 / CAM1 and DISP0 / DISP1, the CR2032 holder, the fan connector
and the J2 jumpers (nRPIBOOT) on the right, the microSD slot (for a CM4 Lite) on the left edge, and along the bottom
edge from the left the 12 V jack, HDMI0, HDMI1, the Gigabit RJ45 with the BCM54210 PHY beside it, the two stacked USB
2.0 sockets and the micro-USB port; PWR / ACT by the 12 V jack. The 40 pins leave the top edge as one comb 50 thou
apart, each with a colour-coded tag: 5V red, 3V3 orange, GND black, GPIO green, I2C blue, SPI pink, UART purple,
ID_SD / ID_SC grey.
ONE DEVICE (search "RASPBERRY" or "CM4" in Pick Devices):
RASPBERRY PI CM4 IO BOARD "Raspberry Pi CM4 IO Board" V1.0 (category Microprocessor ICs > Raspberry Pi), prefix PI,
model TEPNET.DLL (with the TEPPi folder)
The same TEPNET.DLL also runs our Raspberry Pi Model B, 1 Model B+, 2 Model B, 3 Model B, 3 Model B+, 3 Model A+,
4 Model B, 5, Zero W, Zero 2 W, 400 and 500, our Ethernet and Wi-Fi shields, modules and boards and the Laptop / Mobile
WiFi Monitors; it replaces any older TEPNET.DLL (keep only this newest one in MODELS).
TEST STATUS
V1.0: verified in Proteus 8.5 on 27 Oct 2026 with the demo project as shipped. What the Proteus run showed:
* CM4-Modbus-HMI: PI1 printed "RS-485 on /dev/serial0 (GPIO14 / 15) at 9600 baud 8N1, DE / RE on GPIO17; slave 1",
eth0 came up and "HMI on http://192.168.1.51:8000/" followed; the first poll answered at once ("slave 1 answers:
31.2 C, 1008.6 hPa, fan off"), and as 31.2 C is above 30.0 C, AUTO wrote register 2 = 1: RLY1 switched on; then a
status line every 2 s ("31.2 C 1008.6 hPa fan ON mode AUTO polls 2 ok 2 errors 0"); PWR, ACT, LNK and 100 lit.
* The UNO's monitor: "BMP280 found at 0x76", then "request 03: read 5 from 0 - answered" per poll and "request 06:
write 2 = 1 - FAN ON". U2's pop-up decoded every frame (01 03 00 00 00 05 85 C9 = read 5 holding registers from 0;
the answers 312, 10086, ...): 20 frames, 0 CRC errors.
* The laptop (192.168.1.21) opened http://192.168.1.51:8000/json and the phone (192.168.1.41) the page (HTTP 200).
* FAN OFF on the phone: "the page: mode OFF", "fan off (OFF, 31.2 C) - register 2 = 0"; the slave printed "request
06: write 2 = 0 - FAN OFF" and RLY1 dropped. AUTO on the phone: "fan ON (AUTO, 31.2 C) - register 2 = 1", the relay
on again.
* 12 polls, 12 answered, 0 errors; about 26 s of simulation in 214 s on our PC with the four pop-ups, the UNO's
monitor, the two monitors and the Pi Terminal open.
INSTALLATION (about 3 minutes)
1. Close Proteus. Extract the WHOLE ZIP to a normal folder (e.g. Desktop).
2. Copy everything in "Proteus Library Files" to the LIBRARY folder of Proteus, for example:
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY
(on some PCs: C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\LIBRARY - use the folder that already holds
Proteus's own .LIB files). TEPRPICM4.LIB is the CM4 IO Board; TEPMAX485.LIB (the RS-485 modules), TEPBMP280.LIB
(the sensor), TEPRELAY.LIB (the fan relay), ArduinoV4TEP.LIB (the slave node's Arduino UNO V4.0), TEPLAPTOP.LIB and
TEPMOBILE.LIB are the demo's parts.
3. Copy everything in "Proteus Model Files" - the DLLs AND the TEPPi folder - to the MODELS folder:
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\MODELS
TEPPi holds Python 3.11 and the TEP Pi runtime; the board finds it next to TEPNET.DLL, in MODELS or next to your
project. Replace an older TEPNET.DLL and TEPPi folder (these are the newest).
4. Delete TEPRPICM4.IDX (and the .IDX of a part library you replaced) from the LIBRARY folder if it is there.
5. Start Proteus. In Pick Devices (P) search "RASPBERRY".
Nothing else to install: Python is in TEPPi (no Python on the PC needed, none is changed).
RUN THE DEMO
Keep the .py and .hex files and the DLLs beside the project in "Proteus Simulation" (the TEPPi folder in MODELS).
CM4-Modbus-HMI.pdsprj - PI1 runs modbus_hmi.py on Ethernet (the cable in): it is the Modbus RTU master of an RS-485
bus. U1 = a MAX485 module on the CM4's UART: DI on GPIO14 (TXD), RO on GPIO15 (RXD), DE and RE together on GPIO17,
VCC / GND on the sheet's VCC / GND labels (5 V; on a real board the header's 5V and GND). The other end of the
bus is ARD1 = an Arduino UNO V4.0 running Modbus_Slave_Node.hex (its
sketch is in Arduino Code), slave 1, with U2 = its own MAX485 (RO on D8, DI on D9 - AltSoftSerial - and DE / RE on
D2), U3 = a BMP280 on I2C (SDA A4, SCL A5, SDO to GND: address 0x76) and RLY1 = a relay module on D7 (the fan, LOW =
on). A / B of U1 and U2 are joined (the A_BUS / B_BUS labels). PC1 = the Laptop WiFi Monitor and MOB1 = the Mobile
WiFi Monitor on the same network. The modules are the Advance parts: their pop-up windows open at Run.
The slave keeps five holding registers: 0 the temperature in tenths of a degree C, 1 the pressure in tenths of a
hPa, 2 the fan relay (0 / 1, the only one that can be written), 3 its uptime in seconds, 4 the requests it
answered. Every 2 s the CM4 reads all five (function 03); in AUTO it switches the fan on at 30.0 C and off below
29.0 C by writing register 2 (function 06). Each frame is the slave address, the function, the data and a CRC-16
(polynomial A001, low byte first), built in the program; DE / RE is HIGH while the CM4 sends and LOW to listen
(serial's flush() waits for the last stop bit), and the master leaves at least 3.5 characters of silence between
frames (about 4 ms at 9600 baud) - Modbus RTU finds the end of a frame by that silence.
Press Run: the Pi Terminal shows "HMI on http://192.168.1.51:8000/" and a line per poll; the UNO's monitor shows
each request. On the laptop or the phone open http://192.168.1.51:8000/ (Browser, the address, Go): the
temperature, the pressure, the fan, the slave's counters and AUTO / FAN ON / FAN OFF; /json gives the same as JSON.
FAN OFF on the phone: the next poll writes register 2 = 0 and the relay drops (the page shows the new state after
REFRESH); AUTO switches it on again at 31.2 C. Change TEMPERATURE in U3's pop-up (below 29.0 C) to see AUTO switch
the fan off; U1's and U2's pop-ups list every frame on the bus, field by field.
Note for a real build: the CM4's GPIOs are 3.3 V. A MAX485 module on 5 V drives RO to 5 V - use a 3.3 V transceiver
(e.g. a MAX3485 module) or a divider on RO; the IO Board's 12 V jack powers the board and the HAT header's 5V.
YOUR OWN PROGRAMS
Write the program with any editor, put the .py next to your project and set the board's PROGRAM property to its name
(or a full path). Start from Python Code\blink.py (an LED on GPIO17). Python's standard library is there; other
pure-Python packages work when you copy them next to your program. Use BCM numbers (gpiozero's LED(17), RPi.GPIO's
GPIO.setmode(GPIO.BCM)).
A program that never sleeps and never touches a pin for 3 real seconds is left running on its own (the simulation
goes on); input() waits for a line typed in the Pi Terminal.
THE 40-PIN HEADER (BCM numbers - the tags on the board)
1 3V3 2 5V 3 GPIO2 SDA 4 5V 5 GPIO3 SCL 6 GND 7 GPIO4 (1-Wire)
8 GPIO14 TXD 9 GND 10 GPIO15 RXD 11 GPIO17 12 GPIO18 13 GPIO27 14 GND
15 GPIO22 16 GPIO23 17 3V3 18 GPIO24 19 GPIO10 MOSI 20 GND 21 GPIO9 MISO
22 GPIO25 23 GPIO11 SCLK 24 GPIO8 CE0 25 GND 26 GPIO7 CE1 27 ID_SD 28 ID_SC
29 GPIO5 30 GND 31 GPIO6 32 GPIO12 33 GPIO13 34 GND 35 GPIO19
36 GPIO16 37 GPIO26 38 GPIO20 39 GND 40 GPIO21
3.3 V logic: GPIO2 / GPIO3 have the Pi's 1.8 k pull-ups to 3.3 V.
ID_SD / ID_SC (27, 28, GPIO0 / GPIO1) are kept for a HAT's ID EEPROM; leave them free, as on a real Pi.
PROPERTIES (double-click the board > Edit Properties)
PROGRAM the Python program (default blink.py; a name next to the project or a full path)
AUTOOPEN the Pi Terminal at Run: YES (default) or NO
ETHERNET the cable to the router at Run: IN (default: eth0) or OUT (the network on wlan0)
WIFISSID the Wi-Fi network wlan0 joins (default TEP-WiFi)
WIFIPASS its password (default 12345678)
PYTHON a python.exe of your own (empty: TEPPi's)
RUNTIME the TEP Pi runtime folder (empty: TEPPi's)
TROUBLESHOOTING
* "TEP Pi: the TEPPi folder ... was not found": copy the TEPPi folder from "Proteus Model Files" into MODELS (or next
to the project).
* "python3: can't open file": the PROGRAM file is not next to the project - put it there or give a full path.
* "slave 1: no answer": DI on GPIO14, RO on GPIO15, DE and RE on GPIO17; A to A and B to B; the slave's hex next to
the project; both ends at 9600 baud. The MAX485 pop-ups show who drives the bus.
* "slave 1: bad CRC" or frames glued together on the pop-ups: two frames with no silence between them - wait at least
3.5 characters (4 ms at 9600 baud) before each request, as modbus_hmi.py does.
* The fan does not follow the page: the mode changes at once, the relay at the next poll (2 s); use REFRESH.
* The page does not open: the address is http://192.168.1.51:8000/ and the program must have printed "HMI on". A
monitor sometimes needs Go a second time.
* A paused simulation shows the SIMULATION LOG: click the Schematic Capture tab.
BUG REPORTS AND FEATURE REQUESTS
Please post them in our forum with a screenshot, the program, the Pi Terminal's text and the simulation log:
https://www.theengineeringprojects.com/forum/category/raspberry-pi-cm4-io-board-proteus-library
SUPPORT US
This library is free. If it saves you time, please support our work:
https://www.theengineeringprojects.com/donate
WEBSITE
https://www.theengineeringprojects.com/
LICENCES AND THIRD-PARTY NOTES
* The Raspberry Pi board model, the TEP Pi runtime, the Pi Terminal and the network (TEPNET.DLL, the compiled .pyc files
in TEPPi\runtime with the stand-ins lgpio, RPi, smbus2, smbus, spidev, serial, Adafruit_DHT, adafruit_dht, board), the
symbols and artwork (TEPRPICM4.LIB), the part models (TEPMAX485, TEPBMP280 and TEPRELAY .DLL / .LIB, the Arduino UNO
V4.0's ArduinoV4TEP.LIB / TEPARDUINO.DLL, the Laptop and Mobile WiFi Monitors' TEPLAPTOP.LIB / TEPMOBILE.LIB in
TEPNET.DLL), the demo program and the slave node's sketch are made by The Engineering Projects. Our stand-ins follow
the APIs of RPi.GPIO, lgpio, smbus2, py-spidev, pyserial, Adafruit_DHT and adafruit-circuitpython-dht; none of their
code is copied. The source code of the models is not included (nor the runtime's: it ships compiled for the included
Python 3.11).
* The slave node's sketch (Arduino Code\Modbus_Slave_Node) uses AltSoftSerial 1.4 (Copyright (c) 2014 PJRC.COM, LLC,
Paul Stoffregen, MIT License; https://github.com/PaulStoffregen/AltSoftSerial) - install it with the Arduino IDE's
Library Manager to compile it; Modbus_Slave_Node.hex is included. It reads the BMP280 with Wire and the compensation
formulas of Bosch's datasheet.
* TEPPi\python is the official embeddable Python 3.11.9 for Windows (32-bit) from python.org, unchanged, under the
Python Software Foundation License (TEPPi\python\LICENSE.txt).
* TEPPi\runtime\gpiozero is gpiozero 2.0.1.post3 and TEPPi\runtime\colorzero is colorzero 2.0, unchanged, under the BSD
3-Clause licence (their LICENSE files in the dist-info folders).
* Proteus is a product of Labcenter Electronics and is not included. Raspberry Pi is a trademark of Raspberry Pi Ltd.
MAX485 is an Analog Devices (Maxim) part, BMP280 a Bosch Sensortec part; Modbus is a trademark of Schneider Electric;
Arduino is a trademark of Arduino SA. This library is not made or endorsed by Raspberry Pi Ltd, Analog Devices, Bosch,
Schneider Electric, Arduino or Labcenter.
MODEL SCOPE AND LIMITS
Modelled: the 26 GPIOs of the 40-pin header (inputs, outputs, pull-ups / pull-downs, edges, software PWM), the I2C,
SPI, UART, 1-Wire and DHT buses as the Pi's drivers drive them, the supply pins, Ethernet (eth0, the cable) and Wi-Fi
(wlan0: the join, DHCP, TCP and UDP to every TEP network part), one interface at a time, the PWR / ACT LEDs and the
jack's LNK / 100 LEDs, a 0.5 s boot before the program starts, the board's /proc and /sys files above, the Pi Terminal.
Not modelled: Raspberry Pi OS (no desktop, no shell commands, no apt, no os.system), the kernel's drivers and
device-tree overlays (the extra UARTs, I2C and SPI buses of the BCM2711), the PCIe slot, the HDMI outputs, USB, the
cameras and displays, the eMMC's and the microSD card's files, flashing over micro-USB (nRPIBOOT), the real-time clock
and its battery, the fan connector's PWM and tacho, PoE, Bluetooth, the 5 GHz band and the Gigabit speed (the network
is the same TEP network at any band), wlan0 and eth0 at the same time, the four cores (one program, its threads take
turns), hardware PWM, a HAT's ID EEPROM, C programs and C extensions, the real CPU's speed (each GPIO call takes about
1.5 us; pure Python code takes no simulation time), real-time jitter. The model's own choices: the board's IP address
(192.168.1.51 for PI1), the boot time, the router; the board is drawn at about 0.6 of its size; the simulation runs
below real time.
VERSION
TEP Raspberry Pi CM4 IO Board library V1.0 (Oct 2026).
…Development1 release
-
V1.0Raspberry Pi CM4 IO Board Library for Proteus 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.
Installation9 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
- Arduino IDE1.8 or 2.x, with the board of the tutorial chosen under Tools → Board
- 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 raspberry-pi-cm4-io-board-tep-v1-0-f1195ffb068d419aae469b86f85dae2b.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (Raspberry-Pi-CM4-IO-Board-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move ArduinoV4TEP.LIB, TEPBMP280.LIB and TEPLAPTOP.LIB and 4 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 TEPARDUINO.DLL, TEPBMP280.DLL and TEPMAX485.DLL and 9 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
Open the sketch in the Arduino IDE
Open Modbus_Slave_Node.ino, select your board and port under Tools, then Verify. Sketch → Export Compiled Binary writes the HEX file a simulation needs.
- 6
Build the source code
Open modbus_hmi.py, blink.py and attr.py and 29 more in the compiler named in the tutorial (MikroC, Keil, MPLAB, Code Composer or the Arduino IDE) and build it to get the firmware.
- 7
Load the HEX file
In Proteus double-click the microcontroller, set Program File to Modbus_Slave_Node.hex and run the simulation. For real hardware, flash the same file with your programmer.
- 8
Open the example simulation
Open CM4-Modbus-HMI.pdsprj in Proteus to see the wiring exactly as in the tutorial. Check the controller's Program File path, then press Play.
- 9
Follow the tutorial
Raspberry Pi CM4 IO Board Library for Proteus: MAX485 Modbus HMI explains every connection and setting in order; keep it open beside the files while you build.
FAQs9 questionsContact TEP
How do I download Raspberry Pi CM4 IO Board Library for Proteus 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?
Raspberry Pi CM4 IO Board Library for Proteus V1.0 comes as a ZIP archive of 129 files (14.4 MB, 28.5 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch, compiled HEX firmware, source code and a nested archive. Open the File Structure tab for the full list of 129 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, f6a941dc0108990b5e79bb31902b709b57064531a8dc39b761c01a79fbb15560. In PowerShell run Get-FileHash "raspberry-pi-cm4-io-board-tep-v1-0-f1195ffb068d419aae469b86f85dae2b.zip"; on macOS or Linux run shasum -a 256 "raspberry-pi-cm4-io-board-tep-v1-0-f1195ffb068d419aae469b86f85dae2b.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.
How do I get the HEX file into the simulation?
Compile the sketch in the Arduino IDE (Sketch → Export Compiled Binary gives you the HEX next to the sketch), then in Proteus double-click the board, set Program File to that HEX and run.
Members skip the wait. Log in or join TEP.
- 0Total downloads
- 4%Popularity
- ProteusCategory
- 0Comments
- ssyedzainnasirUploaded by
- 28 Oct 2026Uploaded at
f6a941dc0108990b5e79bb31902b709b57064531a8dc39b761c01a79fbb15560























Comments
0