Project Files of Raspberry Pi 5 Tilt Alarm with MPU9250 and ST7735 (Proteus Simulation)
b6683df6faf9486996f2551853f6d0e6.zip

Raspberry Pi 5 Tilt Alarm with MPU9250 and ST7735 in Proteus Simulation V1.0
Raspberry Pi 5 Tilt Alarm with MPU9250 and ST7735 in Proteus Simulation V1.0 comes as a ZIP archive of 141 files (14.0 MB, 27.3 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-Tilt-Alarm-MPU9250-ST7735-Proteus-Simulation-v1.0.zip: the complete Proteus simulation project (Raspberry Pi 5, the GY-9250 MPU9250, the 1.8" ST7735 TFT, the DRV8833, the coin vibration motor, the Laptop and Mobile WiFi Monitors), the Python program tilt_alarm.py, every LIB and DLL the simulation needs, the TEPPi Python runtime and a README.
File Structure
13.2 KB16 KB39.5 KB13.1 KB81.1 KB60.5 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 KB278 KB312.5 KB373.5 KB2.9 MB310.5 KB34.4 KB278 KB312.5 KB373.5 KB2.9 MB310.5 KB19.8 KB19.8 KB10.3 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in Raspberry Pi 5 Tilt Alarm with MPU9250 and ST7735 (Proteus Simulation). Open an image for its full size.












README
===============================================================================================================
Raspberry Pi 5 Tilt Alarm with MPU9250 and ST7735 (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/raspberry-pi-5-tilt-alarm-mpu9250-st7735-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
MPU9250 IMU (GY-9250):
https://www.theengineeringprojects.com/2026/10/mpu9250-library-for-proteus-v1-0.html
TFT 1.8" ST7735:
https://www.theengineeringprojects.com/2026/10/tft-st7735-library-for-proteus-v1-0.html
DRV8833 motor driver:
https://www.theengineeringprojects.com/2026/11/drv8833-motor-driver-library-for-proteus.html
Coin vibration motor:
https://www.theengineeringprojects.com/2026/10/coin-vibration-motor-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-Tilt-Alarm-TEP-v1.0/
|-- Proteus Library Files/
| |-- TEPCOINVIB.LIB 13.2 KB a part of the project -> LIBRARY folder
| |-- TEPDRV8833.LIB 16.0 KB a part of the project -> LIBRARY folder
| |-- TEPLAPTOP.LIB 39.5 KB a part of the project -> LIBRARY folder
| |-- TEPMOBILE.LIB 13.1 KB a part of the project -> LIBRARY folder
| |-- TEPMPU9250.LIB 81.1 KB a part of the project -> LIBRARY folder
| |-- TEPRPI5.LIB 60.5 KB a part of the project -> LIBRARY folder
| |-- TEPTFT.LIB 58.4 KB a part of the project -> LIBRARY folder
|-- Proteus Model Files/
| |-- TEPCOINVIB.DLL 278.0 KB a model -> MODELS folder
| |-- TEPDRV8833.DLL 312.5 KB a model -> MODELS folder
| |-- TEPMPU9250.DLL 373.5 KB a model -> MODELS folder
| |-- TEPNET.DLL 2.89 MB 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-Tilt-Alarm.pdsprj 34.4 KB the project simulation
| |-- TEPCOINVIB.DLL 278.0 KB copy of the model
| |-- TEPDRV8833.DLL 312.5 KB copy of the model
| |-- TEPMPU9250.DLL 373.5 KB copy of the model
| |-- TEPNET.DLL 2.89 MB copy of the model
| |-- TEPTFT.DLL 310.5 KB copy of the model
| |-- tilt_alarm.py 19.8 KB the program PI1 runs
|-- Python Code/
| |-- tilt_alarm.py 19.8 KB the program (the same file)
|-- README.txt ~10.3 KB this file
Total: 27.29 MB (unzipped). The C++ source code of the models is not included.
WHAT IS IT?
A digital spirit level and tilt alarm you can run in Proteus, the kind fitted to cranes, aerial platforms, tractors
and caravans: a Raspberry Pi 5 reads an MPU-9250's accelerometer and gyro, shows a bubble level on a 1.8" TFT,
buzzes a coin vibration motor when the tilt goes too far, and serves a web dashboard.
* GY-9250 (MPU9250ADVTEP, U1) on I2C1 at 0x68: SDA GPIO2 (pin 3), SCL GPIO3 (pin 5); VCC from the Pi's 5 V pin
(pin 2) - the module's regulator gives the chip 3.3 V; AD0 open.
* TFT 1.8" ST7735 128 x 160 (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 and LED on 3V3 (pin 1).
* DRV8833 (DRV8833TEP, U2) on the Pi's 5 V: IN1 = GPIO18 (pin 12, PWM), IN2 = GPIO23 (pin 16), EEP (sleep) =
GPIO22 (pin 15); IN3 / IN4 to GND (bridge B unused); OUT1 / OUT2 to the coin motor.
* A 3 V coin vibration motor (COINVIBTEP, M1) on bridge A.
* RASPBERRY PI 5 (PI1) runs tilt_alarm.py on Ethernet at 192.168.1.51 (port 8000).
* Laptop WiFi Monitor (PC1) and Mobile WiFi Monitor (MOB1) open http://192.168.1.51:8000/.
The rules (at the top of the program):
* the pitch and the roll from the accelerometer, blended with the gyro (a complementary filter with a 1 s time
constant: 98 % gyro, 2 % accelerometer at 50 readings a second); the tilt = the angle between the board's Z
axis and the vertical, cos(tilt) = cos(pitch) x cos(roll);
* ZERO: the present attitude becomes level (the reference is stored);
* LEVEL under 1 deg, OK, WARNING from 10 deg (a 0.2 s buzz every second at 50 % of 5 V), DANGER from 20 deg (a
steady buzz at 60 %), each left 1 deg inside its threshold; MUTE silences the buzz until the alarm clears;
* the motor is braked at the end of each buzz (both DRV8833 inputs high) and the driver put to sleep.
Its pages:
/ the dashboard: the state, the tilt, the pitch and the roll, the buzz, the reference, the events
/zero the present attitude becomes level /mute silence the buzz /data everything as JSON
No extra Python library: lgpio and spidev (in the TEPPi runtime and on Raspberry Pi OS), threading, http.server.
TEST STATUS
Tested in Proteus 8 Professional on Windows 11, the run that made the tutorial's screenshots (the program's times):
- Start: WHO_AM_I 0x71; the gyro's bias 1.39, -0.89, 0.59 deg/s; the board flat, but the chip's own offset reads
pitch +1.0, roll -0.7: "OK 1.2" on the TFT (SPI at 8 MHz). The loop reads the sensor 50 times a second.
- 12.9 s ZERO from the laptop: "this attitude is level now - the reference pitch +1.0, roll -0.7 deg": LEVEL 0.0.
- 14.6 s PITCH +5 (the gyro saw +49.6 deg/s): OK 4.9. 17.9 s PITCH +5 again: "WARNING: tilt 10.1 deg"; it settles
at 9.8 and stays WARNING (left only under 9.0); 0.2 s pulses at 50 %, the motor near 9,000 RPM in each.
- 24.2 s ROLL +15 (+90 deg/s): tilt 17.8. 26.3 s PITCH +5: "DANGER: tilt 20.1 deg", then 20.6 at pitch +14.6, roll
+14.6; a steady buzz at 60 %: 2.95 V average, 11,709 RPM = 195 Hz, 0.77 G on 100 g, 69 mA.
- 29.3 s MUTE from the phone: the motor stopped, the TFT still DANGER with MUTE. 32.0 s FLAT: WARNING, 32.1 s OK -
"the alarm cleared - MUTE off", 32.2 s LEVEL 0.3 (the gyro saw -89 deg/s on both axes).
- 36.6 s of simulation in 510 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, MPU9250ADVTEP or COINVIBTEP to check
that the parts are there.
RUN THE SIMULATION
1. Open "Proteus Simulation\Pi-5-Tilt-Alarm.pdsprj". Keep tilt_alarm.py and the DLL files beside it.
2. Press Play. The TFT shows the bubble; the Pi's terminal prints the angles every second.
3. Open the Laptop WiFi Monitor (PC1) or the Mobile WiFi Monitor (MOB1), press Go, and press ZERO.
4. Tilt the board from the GY-9250's pop-up (PITCH / ROLL +5, +15): WARNING at 10 deg, DANGER at 20 deg, and
the coin motor buzzes. MUTE silences it; FLAT clears the alarm.
Your own program: edit tilt_alarm.py.
PROPERTIES USED IN THIS PROJECT
PI1 RASPBERRY PI 5 PROGRAM=tilt_alarm.py, ETHERNET=IN (192.168.1.51)
U1 MPU9250ADVTEP CHIP=MPU9250, PITCH=0, ROLL=0 (the board turned from the pop-up), NOISE=1
TFT1 TFT18ST7735ADVTEP (the defaults: a black-tab glass)
U2 DRV8833TEP (the defaults); M1 COINVIBTEP (the defaults: mounted on 100 g)
PC1, MOB1 HOMEPAGE=http://192.168.1.51:8000/
TROUBLESHOOTING
* The TFT stays white: check A0 (GPIO25), RESET (GPIO24) and CS (CE0); its pop-up says what it is waiting for.
* The bubble moves the wrong way: the bubble floats to the HIGH side, as in a real level - nose up moves it up.
* The angles drift slowly: the gyro's bias is measured in the first second - keep the board still at the start.
* The motor never buzzes: EEP (GPIO22) must be high; no 5 V on the DRV8833's VCC; or MUTE is on.
* The terminal cannot start Python: the TEPPi folder is not in MODELS.
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 or by the makers of the MPU-9250, the ST7735 and the DRV8833.
VERSION
V1.0 - the first release of the project.
===============================================================================================================Development1 release
-
V1.0Raspberry Pi 5 Tilt Alarm with MPU9250 and ST7735 in 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 b6683df6faf9486996f2551853f6d0e6.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-Tilt-Alarm-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move TEPCOINVIB.LIB, TEPDRV8833.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 TEPCOINVIB.DLL, TEPDRV8833.DLL and TEPMPU9250.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 tilt_alarm.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-Tilt-Alarm.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 Tilt Alarm with MPU9250 and ST7735 (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 Tilt Alarm with MPU9250 and ST7735 in 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 Tilt Alarm with MPU9250 and ST7735 in Proteus Simulation V1.0 comes as a ZIP archive of 141 files (14.0 MB, 27.3 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, 4de81cdb1cdba08c42fae97195f012f69983c5e62b277148a1b9d6dc13bf8541. In PowerShell run Get-FileHash "b6683df6faf9486996f2551853f6d0e6.zip"; on macOS or Linux run shasum -a 256 "b6683df6faf9486996f2551853f6d0e6.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
- 18 Nov 2026Uploaded at
4de81cdb1cdba08c42fae97195f012f69983c5e62b277148a1b9d6dc13bf8541






















Comments
0