Project Files of Raspberry Pi 5 Colour Sorter with TCS34725 in Proteus Simulation
d1131e55b21944f899706f918bdeb8a9.zip

Raspberry Pi 5 Colour Sorter with TCS34725 in Proteus Simulation V1.0
Raspberry Pi 5 Colour Sorter with TCS34725 in Proteus Simulation V1.0 comes as a ZIP archive of 144 files (14.6 MB, 28.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
Raspberry-Pi-5-Colour-Sorter-TCS34725-Proteus-Simulation-v1.0.zip: the complete Proteus simulation project (Raspberry Pi 5, a TCS34725 colour sensor, a JGA25-370 encoder gear motor and two push-pull solenoids on a TB6612FNG, an I2C LCD, the Laptop and Mobile WiFi Monitors), the Python program colour_sorter.py, every LIB and DLL, the TEPPi Python runtime and a README.
File Structure
181.4 KB16.9 KB39.5 KB13.1 KB60.5 KB28 KB71.1 KB156.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 KB282.5 KB409 KB3.0 MB299.5 KB296 KB537 KB13.1 KB42.4 KB282.5 KB409 KB3.0 MB299.5 KB296 KB537 KB13.1 KB11.2 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in Raspberry Pi 5 Colour Sorter with TCS34725 in Proteus Simulation. Open an image for its full size.












README
===============================================================================================================
Raspberry Pi 5 Colour Sorter with TCS34725 in 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-colour-sorter-tcs34725-proteus-simulation.html
The libraries this project is built from (each post has its own full download and tutorial):
Raspberry Pi 5 board (and the TEPPi runtime that runs Python in Proteus):
https://www.theengineeringprojects.com/2026/10/raspberry-pi-5-library-for-proteus.html
TCS34725 colour sensor:
https://www.theengineeringprojects.com/2026/09/tcs34725-proteus-library.html
JGA25-370 encoder gear motor:
https://www.theengineeringprojects.com/2026/10/jga25-370-encoder-gear-motor-library-for-proteus-v1-0.html
TB6612FNG motor driver:
https://www.theengineeringprojects.com/2026/10/tb6612fng-motor-driver-library-for-proteus-v1-0.html
12V push-pull solenoid:
https://www.theengineeringprojects.com/2026/11/12v-push-pull-solenoid-library-for-proteus-v1-0.html
I2C LCD 16x2:
https://www.theengineeringprojects.com/2026/10/i2c-lcd-16x2-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-Colour-Sorter-TEP-v1.0/
|-- Proteus Library Files/
| |-- TEPI2CLCD16X2.LIB 181.4 KB a part of the project -> LIBRARY folder
| |-- TEPJGA25.LIB 16.9 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
| |-- TEPRPI5.LIB 60.5 KB a part of the project -> LIBRARY folder
| |-- TEPSOLENOID.LIB 28.0 KB a part of the project -> LIBRARY folder
| |-- TEPTB6612.LIB 71.1 KB a part of the project -> LIBRARY folder
| |-- TEPTCS34725.LIB 156.4 KB a part of the project -> LIBRARY folder
|-- Proteus Model Files/
| |-- TEPJGA25.DLL 282.5 KB a model -> MODELS folder
| |-- TEPLCD.DLL 409.0 KB a model -> MODELS folder
| |-- TEPNET.DLL 2.98 MB a model -> MODELS folder
| |-- TEPSOLENOID.DLL 299.5 KB a model -> MODELS folder
| |-- TEPTB6612.DLL 296.0 KB a model -> MODELS folder
| |-- TEPTCS34725.DLL 537.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/
| |-- colour_sorter.py 13.1 KB the program PI1 runs
| |-- Pi-5-Colour-Sorter.pdsprj 42.4 KB the project simulation
| |-- TEPJGA25.DLL 282.5 KB copy of the model
| |-- TEPLCD.DLL 409.0 KB copy of the model
| |-- TEPNET.DLL 2.98 MB copy of the model
| |-- TEPSOLENOID.DLL 299.5 KB copy of the model
| |-- TEPTB6612.DLL 296.0 KB copy of the model
| |-- TEPTCS34725.DLL 537.0 KB copy of the model
|-- Python Code/
| |-- colour_sorter.py 13.1 KB the program (the same file)
|-- README.txt ~10.9 KB this file
Total: 28.80 MB (unzipped). The C++ source code of the models is not included.
WHAT IS IT?
A small colour-sorting conveyor run by a Raspberry Pi 5: items ride a black belt past a colour sensor; red items
are pushed off into bin 1, green items into bin 2, everything else rides to bin 3 at the end of the belt.
* PI1 RASPBERRY PI 5 runs colour_sorter.py (Python, lgpio) on Ethernet at 192.168.1.51, port 8000.
* U1 a TCS34725 colour sensor (TCS34725ADVTEP, the pop-up panel) looks down at the belt: I2C1, SDA GPIO2 (pin 3),
SCL GPIO3 (pin 5), address 0x29. Its properties RED / GREEN / BLUE = 0: the black belt.
* LCD1 an I2C LCD 16x2 (I2CLCD16X2BLUEADVTEP, PCF8574 backpack at 0x27) on the same bus: the bins and the belt.
* DRV1 a TB6612FNG (TB6612ADVTEP), VM +12V, VCC 3V3, STBY GPIO25 (pin 22):
channel A = the belt: PWMA GPIO18 (pin 12), AIN1 GPIO23 (pin 16), AIN2 GPIO24 (pin 18); AO1 / AO2 to M1;
channel B = the pushers: BIN1 GPIO5 (pin 29), BIN2 GPIO6 (pin 31), PWMB GPIO12 (pin 32); BO1 to L1, BO2 to L2.
* M1 a JGA25-370 encoder gear motor (JGA25MOTORTEP, 12 V, 1:34) drives the belt: a 20 mm drum, 62.8 mm of belt a
turn; its encoder's C1 on GPIO17 (pin 11) - 374 pulses a turn = 5.95 pulses a millimetre of belt.
* L1 / L2 two 12 V push-pull solenoids (SOLENOID12VTEP), the pushers, from BO1 / BO2 to GND: pusher 1 sits 120 mm
after the sensor, pusher 2 240 mm after it; bin 3 is at 360 mm.
* Laptop WiFi Monitor (PC1) and Mobile WiFi Monitor (MOB1) open http://192.168.1.51:8000/.
In Proteus the TCS34725's VIN and the encoder's VCC are on the default power rail: their models read the supply as a
logic level. On real boards power them from 3.3 V.
The rules (at the top of colour_sorter.py):
* the belt runs at 70 % of 12 V (PWM 500 Hz, about 119 mm/s); the encoder measures it every 0.5 s;
* the TCS34725 integrates 24 ms at gain 4x; the black belt's counts are taken off every reading; clear counts more
than 60 above the belt = an item under the sensor;
* each item's colour is its hue on the colour wheel (WHITE when no channel stands out): RED, ORANGE, YELLOW, GREEN,
BLUE, PURPLE; red items go to pusher 1, green to pusher 2, every other colour to bin 3;
* each item is remembered by the belt position of its middle (encoder pulses), and its pusher fires for 120 ms when
the belt has carried it that far - items can follow each other closely;
* a belt that is driven but does not move for 1 s = a JAM: the motor is switched off.
The pages:
/ the dashboard: the belt, its speed, the three bins, the items on the belt, the last item, the events
/start /stop the belt /data JSON
The program uses lgpio (part of Raspberry Pi OS); the TEPPi runtime provides it in Proteus.
TEST STATUS
Tested in Proteus 8 Professional on Windows 11, the run that made the tutorial's screenshots (the program's times):
- The belt: 70 % PWM at 500 Hz, 8.32 V average, 113 RPM, 0.12 A; 119 mm/s from the encoder (706 Hz on C1). The black
belt reads C 0 R 0 G 0 B 0. The TCS34725: ID 0x44, 24 ms, 4x, 36 readings a second.
- 7.2 s item #1 RED (R 2381 G 0 B 0) - pusher 1; 8.2 s pushed into bin 1 (the solenoid's pull-in: 44.9 ms).
- 10.5 s item #2 GREEN (R 0 G 2381 B 0) - pusher 2; 12.5 s pushed into bin 2.
- 15.9 s item #3 ORANGE (R 2381 G 1195 B 0, hue 30 degrees - not red) - 18.3 s fell into bin 3 at the end.
- Two items close together: 19.8 s #4 RED and 20.6 s #5 BLUE on the belt at once; 20.8 s #4 pushed into bin 1,
23.5 s #5 fell into bin 3.
- The items were 22 - 143 mm long: as long as each colour stayed on the pop-up.
- 5 kg.cm on the motor's shaft: the belt stalled; 26.9 s "JAM: the belt is driven but does not move - the motor is
switched off" (the LCD: JAMMED). The load off, START from the phone at 30.9 s: 114 RPM, 119 mm/s again.
- Bins: 2 red, 1 green, 2 other. 35 s of simulation in about 6 minutes.
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 the files AND the TEPPi folder from "Proteus Model Files" into the MODELS folder (next to LIBRARY).
4. Start Proteus. Press P in the schematic and search for RASPBERRY PI 5, TCS34725 or JGA25 to check that the parts
are there.
RUN THE SIMULATION
1. Open "Proteus Simulation\Pi-5-Colour-Sorter.pdsprj". Keep colour_sorter.py and the DLL files beside it.
2. Press Play. The Pi starts the belt; the LCD shows the bins and the belt's speed.
3. On the TCS34725's pop-up (U1) press a colour - RED, GREEN, ORANGE ... - for a moment, then BLACK: an item has
passed the sensor. Watch the pusher kick it off, or the item ride to bin 3.
4. On the motor's pop-up (M1) press 5 kg.cm: the belt jams and the Pi stops it; None, then START on the dashboard.
5. Open the Laptop WiFi Monitor (PC1) or the Mobile WiFi Monitor (MOB1) and press Go: START, STOP.
Your own program: edit colour_sorter.py beside the project; PI1's PROGRAM property names the file it runs.
PROPERTIES USED IN THIS PROJECT
PI1 RASPBERRY PI 5 PROGRAM=colour_sorter.py, ETHERNET=IN (192.168.1.51)
U1 TCS34725ADVTEP RED=0, GREEN=0, BLUE=0 (the black belt); BRIGHTNESS 50 %, the white LED on
M1 JGA25MOTORTEP no load; DRV1 TB6612ADVTEP on +12V; L1 / L2 SOLENOID12VTEP; LCD1 at 0x27
PC1, MOB1 HOMEPAGE=http://192.168.1.51:8000/
TROUBLESHOOTING
* "TCS34725 not found" / an I2C error: SDA / SCL must be on GPIO2 / GPIO3; the sensor needs VIN and GND.
* The belt does not move: STBY must be high (GPIO25), VM needs +12V, AO1 / AO2 to the motor.
* Items are not seen: the belt must read black (U1's RED / GREEN / BLUE 0); ITEM_C sets how bright an item must be.
* An item lands in the wrong bin: PULSES_MM must match your drum (374 / (pi x drum diameter)).
* The pushers never fire: PWMB (GPIO12) must be high and STBY high; L1 / L2 from BO1 / BO2 to GND.
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.
* Proteus is a product of Labcenter Electronics and is not included. Raspberry Pi is a trademark of Raspberry Pi Ltd,
the TCS34725 a sensor of ams-OSRAM, the TB6612FNG a driver of Toshiba. This project is not made or endorsed by them.
VERSION
V1.0 - the first release of the project.
===============================================================================================================Development1 release
-
V1.0Raspberry Pi 5 Colour Sorter with TCS34725 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 d1131e55b21944f899706f918bdeb8a9.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-Colour-Sorter-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move TEPI2CLCD16X2.LIB, TEPJGA25.LIB and TEPLAPTOP.LIB and 5 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 TEPJGA25.DLL, TEPLCD.DLL and TEPNET.DLL and 10 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 colour_sorter.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-Colour-Sorter.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 Colour Sorter with TCS34725 in 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 Colour Sorter with TCS34725 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 Colour Sorter with TCS34725 in Proteus Simulation V1.0 comes as a ZIP archive of 144 files (14.6 MB, 28.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 144 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, c6c4f37f7d0cf86e3c852fb8f8c4e22579bb4a4a825d615e5beb540f27e4f001. In PowerShell run Get-FileHash "d1131e55b21944f899706f918bdeb8a9.zip"; on macOS or Linux run shasum -a 256 "d1131e55b21944f899706f918bdeb8a9.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
- 22 Nov 2026Uploaded at
c6c4f37f7d0cf86e3c852fb8f8c4e22579bb4a4a825d615e5beb540f27e4f001






















Comments
0