Project Files of Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 Proteus Simulation
d8deba95f0a8464c97603aa97bb3a142.zip

Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 - Proteus Simulation V1.0
Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 - Proteus Simulation V1.0 comes as a ZIP archive of 141 files (14.0 MB, 27.6 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
Raspberry-Pi-5-Machine-Monitor-SW-420-PCF8574-Proteus-Simulation-v1.0.zip: the complete Proteus simulation project (a Raspberry Pi 5, four SW-420 vibration sensors, a PCF8574 I/O expander, a resistor network, eight 5 mm LEDs, the Laptop and Mobile WiFi Monitors), the Python program machines.py, every LIB and DLL, the TEP Pi runtime and a README.
File Structure
39.5 KB21.8 KB13.1 KB19.3 KB296 KB60.5 KB15.3 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 KB289.5 KB3.0 MB302.5 KB307 KB312 KB9.2 KB35.7 KB289.5 KB3.0 MB302.5 KB307 KB312 KB9.2 KB10.7 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 Proteus Simulation. Open an image for its full size.












README
===============================================================================================================
Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 - 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/12/raspberry-pi-5-machine-monitor-sw-420-pcf8574-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
PCF8574 I/O expander:
https://www.theengineeringprojects.com/2026/12/pcf8574-io-expander-library-for-proteus.html
SW-420 vibration sensor:
https://www.theengineeringprojects.com/2026/11/sw-420-vibration-sensor-library-for-proteus.html
Resistor network:
https://www.theengineeringprojects.com/2026/11/resistor-network-library-for-proteus.html
5 mm LEDs:
https://www.theengineeringprojects.com/2026/11/5mm-led-library-for-proteus.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-Machine-Monitor-TEP-v1.0/
|-- Proteus Library Files/
| |-- TEPLAPTOP.LIB 39.5 KB a part of the project -> LIBRARY folder
| |-- TEPLED5MM.LIB 21.8 KB a part of the project -> LIBRARY folder
| |-- TEPMOBILE.LIB 13.1 KB a part of the project -> LIBRARY folder
| |-- TEPPCF8574.LIB 19.3 KB a part of the project -> LIBRARY folder
| |-- TEPRESNET.LIB 296.0 KB a part of the project -> LIBRARY folder
| |-- TEPRPI5.LIB 60.5 KB a part of the project -> LIBRARY folder
| |-- TEPSW420.LIB 15.3 KB a part of the project -> LIBRARY folder
|-- Proteus Model Files/
| |-- TEPLED5MM.DLL 289.5 KB a model -> MODELS folder
| |-- TEPNET.DLL 3.01 MB a model -> MODELS folder
| |-- TEPPCF8574.DLL 302.5 KB a model -> MODELS folder
| |-- TEPRESNET.DLL 307.0 KB a model -> MODELS folder
| |-- TEPSW420.DLL 312.0 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/
| |-- machines.py 9.2 KB the program PI1 runs
| |-- Pi-5-Machine-Monitor.pdsprj 35.7 KB the project simulation
| |-- TEPLED5MM.DLL 289.5 KB copy of the model
| |-- TEPNET.DLL 3.01 MB copy of the model
| |-- TEPPCF8574.DLL 302.5 KB copy of the model
| |-- TEPRESNET.DLL 307.0 KB copy of the model
| |-- TEPSW420.DLL 312.0 KB copy of the model
|-- Python Code/
| |-- machines.py 9.2 KB the program (the same file)
|-- README.txt ~10.7 KB this file
Total: 27.56 MB (unzipped). The C++ source code of the models is not included.
WHAT IS IT?
Which machines in a workshop are really working, and for how long? Old machines have no network port, but every
running machine shakes. An SW-420 vibration switch on each one turns the shaking into pulses, and a Raspberry
Pi 5 counts them: no pulses = idle, a steady stream = running, a flood = running rough (something loose, worn or
out of balance). The Pi logs each machine's running time, starts and utilisation, and a PCF8574 I/O expander
drives a green and a red LED for every machine.
* PI1 RASPBERRY PI 5 runs machines.py on Ethernet at 192.168.1.51 (port 8000); I2C1 = SDA GPIO2 (pin 3), SCL GPIO3
(pin 5); 3V3 from pin 1; the sensors on GPIO17, GPIO27, GPIO22, GPIO23 (pins 11, 13, 15, 16).
* U2 - U5 SW-420 modules (VIBRATIONSW420TEP, PROFILE STEADY, LEVEL 0, SENS 0.3 g): LATHE, MILL, DRILL and
COMPRESSOR - VCC 3V3, DO to the Pi; their pop-up chips shake them (Still, Machine 0.5 g, Strong 1 g, Shaking
2 g, Knock).
* U1 a PCF8574 board (IOEXPPCF8574TEP, address 0x20): VCC 3V3, SDA / SCL from the Pi; P0 - P7 the LEDs' cathodes.
* RN1 a 330 ohm SIP-9 resistor network (RESNETSIP9TEP): pin 1 (the common) on 3V3, pins 9 .. 2 to the anodes of
D1 - D4 (green: RUNNING) and D5 - D8 (red: ROUGH), one pair a machine.
* Laptop WiFi Monitor (PC1) and Mobile WiFi Monitor (MOB1) open http://192.168.1.51:8000/.
What the program does:
the pulses an lgpio callback counts the rising edges of each DO (the switch flicking open); every second the
count becomes pulses a second, divided by the real time that passed
the states under 5 pulses a second = IDLE, 5 - 70 = RUNNING, 70 or more = ROUGH; a new state counts only after
2 seconds in a row - a knock on the bench (one short burst) is reported and ignored
the log each machine's running time, starts, longest run, peak rate and utilisation (running time / the
time watched); RESET starts the counters again
the LEDs the PCF8574 has no registers: one byte written sets its eight pins; a 0 sinks an LED's current (on),
a 1 is a weak pull-up (off); the byte is written only when a state changes
Its pages:
/ the dashboard with the links Refresh and RESET; every machine's state, rate, running time and %
/data JSON: the machines, their states, rates, running times, starts and utilisation, the ignored bursts
Python libraries: lgpio (in the TEPPi runtime; on Raspberry Pi OS: python3-lgpio); 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;
each SW-420's pop-up gives the vibration and its openings, the PCF8574's the byte written and its pins):
- 0.0 s READY: 4 machines, SW-420 pulses on GPIO 17, 27, 22, 23; the PCF8574 written 0xFF - every LED off.
- The lathe at 0.5 g: 9.0 s LATHE RUNNING (23 pulses/s) - the PCF8574 written 0xFE: P0 low, D1 green on.
- A knock on the drill's bench: 20 openings in one burst; 13.0 s "DRILL: a short burst (20 pulses in 1 s) -
ignored, not a run" - the drill stayed IDLE, 0 s running.
- The mill at 1 g: 16.0 s MILL RUNNING (51 pulses/s). The compressor at 2 g: 20.0 s COMPRESSOR ROUGH (89 pulses/s) -
0x7C: D1, D2 green and D8 red; the dashboard "3 of 4 machines working".
- The lathe still: 26.0 s LATHE IDLE - that run 17.0 s. The compressor fixed (0.5 g): 32.0 s COMPRESSOR RUNNING
(21 pulses/s) - 0xF5: D2 and D4 green.
- At 35 s watched: the lathe 17.0 s running (49 %), the mill 18.0 s (52 %), the drill 0 s (0 %), the compressor
14.0 s (40 %). 36.6 s of simulation in 349 s.
- The counts the Pi made ran below the openings the SW-420 pop-ups counted (the compressor at 2 g: 78 - 89 pulses
a second on the Pi, about 100 openings a second in the model): a pulse rate is a rough measure, which is why the
bands (5 and 70) are wide.
- Our first run's caption on the sheet ran past the sheet's border; it is shorter now.
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 SW420 to check that the parts are
there.
RUN THE SIMULATION
1. Open "Proteus Simulation\Pi-5-Machine-Monitor.pdsprj". Keep machines.py and the DLL files beside it.
2. Press Play. Click a sensor (U2 - U5) and press Machine 0.5 g: the machine runs, its green LED lights; Shaking
2 g: ROUGH, the red LED; Knock: ignored. Click U1 for the expander's pop-up.
3. Open the Laptop or the Mobile WiFi Monitor (Go): every machine's state, running time and utilisation.
PROPERTIES USED IN THIS PROJECT
PI1 RASPBERRY PI 5 PROGRAM=machines.py, ETHERNET=IN (192.168.1.51)
U1 IOEXPPCF8574TEP ADDRESS=0 (0x20), VERSION=PCF8574
U2 - U5 VIBRATIONSW420TEP PROFILE=STEADY, LEVEL=0, SENS=0.3 (DEMO knocks, runs and shakes by itself)
RN1 RESNETSIP9TEP 330 ohm
PC1, MOB1 HOMEPAGE=http://192.168.1.51:8000/
TROUBLESHOOTING
* A machine never leaves IDLE: its DO must reach its GPIO; the vibration must pass the trimmer (SENS 0.3 g).
* A running machine reads ROUGH: a stiff or very fast machine pulses faster - move ROUGH_FROM, or turn the
sensor's trimmer down.
* The LEDs stay dark: the expander at 0x20, the network's common on 3V3; a written 0 turns an LED on.
* Real hardware: an SW-420 is a cheap spring switch - it tells running from idle, not how a bearing is wearing;
for real condition monitoring use an accelerometer. Mount the sensor on a rigid part of the machine.
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.
* Proteus is a product of Labcenter Electronics and is not included. Raspberry Pi is a trademark of Raspberry Pi
Ltd. This project is not made or endorsed by them.
VERSION
V1.0 - the first release of the project.
===============================================================================================================Development1 release
-
V1.0Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 - 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 d8deba95f0a8464c97603aa97bb3a142.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-Machine-Monitor-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move TEPLAPTOP.LIB, TEPLED5MM.LIB and TEPMOBILE.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 TEPLED5MM.DLL, TEPNET.DLL and TEPPCF8574.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
Build the source code
Open machines.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-Machine-Monitor.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
Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 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 Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 - 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?
Raspberry Pi 5 Machine Monitor: SW-420 and PCF8574 - Proteus Simulation V1.0 comes as a ZIP archive of 141 files (14.0 MB, 27.6 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 141 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, eb5c90d9f717df1aa0cb7f58190d9d31f1a6369f70ce898a1c8952d39204a372. In PowerShell run Get-FileHash "d8deba95f0a8464c97603aa97bb3a142.zip"; on macOS or Linux run shasum -a 256 "d8deba95f0a8464c97603aa97bb3a142.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
- 4 Dec 2026Uploaded at
eb5c90d9f717df1aa0cb7f58190d9d31f1a6369f70ce898a1c8952d39204a372






















Comments
0