{"id":21900933,"url":"https://github.com/mosnfar/raspi-temp-manager","last_synced_at":"2025-10-11T19:40:08.253Z","repository":{"id":264494049,"uuid":"893526380","full_name":"mosnfar/raspi-temp-manager","owner":"mosnfar","description":"A comparative tool and hardware setup for Raspberry Pi (RasPi) to manage temperature and monitor essential information.","archived":false,"fork":false,"pushed_at":"2024-12-17T19:01:25.000Z","size":25923,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T00:03:10.665Z","etag":null,"topics":["3d-printing","home-lab","python","raspberry-pi","raspberry-pi-4"],"latest_commit_sha":null,"homepage":"https://forge.mosn.me/keeping-your-raspberry-pi-cool-a-temperature-manager-tool","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mosnfar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T17:08:52.000Z","updated_at":"2024-12-30T22:31:02.000Z","dependencies_parsed_at":"2025-01-27T06:51:44.972Z","dependency_job_id":null,"html_url":"https://github.com/mosnfar/raspi-temp-manager","commit_stats":null,"previous_names":["mosnfar/raspi-temp-manager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mosnfar/raspi-temp-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosnfar%2Fraspi-temp-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosnfar%2Fraspi-temp-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosnfar%2Fraspi-temp-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosnfar%2Fraspi-temp-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mosnfar","download_url":"https://codeload.github.com/mosnfar/raspi-temp-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosnfar%2Fraspi-temp-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008430,"owners_count":26084460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-printing","home-lab","python","raspberry-pi","raspberry-pi-4"],"created_at":"2024-11-28T15:11:37.371Z","updated_at":"2025-10-11T19:40:08.236Z","avatar_url":"https://github.com/mosnfar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RasPi Temp Manager\n\nA comparative tool and hardware setup for Raspberry Pi (RasPi) to manage temperature and monitor essential information.\n\nThis repository outlines a project designed to enhance the thermal management and monitoring capabilities of a Raspberry Pi 4 housed in an Argon NEO case. The project combines hardware modifications and custom software to provide effective cooling and real-time system monitoring through a small OLED display.\n\n\u003e [!NOTE]\n\u003e You can read the complete instructions on [The Forge blog](https://forge.mosn.me/keeping-your-raspberry-pi-cool-a-temperature-manager-tool).\n\n\u003ctable style=\"width: 100%;\"\u003e\n  \u003ctr\u003e\n    \u003cth style=\"text-align: left;\"\u003e Final Product \u003c/th\u003e\n    \u003cth style=\"text-align: left;\"\u003e Demo Video \u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"50%\"\u003e\u003cimg src=\"./assets/images/device_final_preview.jpg\" alt=\"Image of final product\"\u003e\u003c/td\u003e\n    \u003ctd width=\"50%\"\u003e\u003ca href=\"https://www.youtube.com/watch?v=cTe1wpACoGw\"\u003e\u003cimg src=\"./assets/images/youtube_thumbnail.png\" alt=\"Yotube thumbnail of demo video\"\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\nTable of contents:\n\n\u003c!-- TOC depthfrom:2 depthto:3 --\u003e\n\n- [:sparkles: Features](#sparkles-features)\n- [:nut_and_bolt: Hardware](#nut_and_bolt-hardware)\n    - [Hardware Components](#hardware-components)\n    - [Schematic](#schematic)\n- [:package: 3D Case](#package-3d-case)\n- [:computer: Software](#computer-software)\n- [:information_desk_person: More Information](#information_desk_person-more-information)\n    - [Image Gallery](#image-gallery)\n    - [Complete Instruction](#complete-instruction)\n    - [Contribution](#contribution)\n\n\u003c!-- /TOC --\u003e\n\n---\n\n## :sparkles: Features\n- **Dynamic Cooling**: Automatically adjusts the fan speed according to system temperature thresholds.\n- **Real-Time Monitoring**: Displays key metrics like:\n  - CPU \u0026 GPU temperature\n  - Network status\n  - System overview\n- **Compact Design**: Retains the Argon NEO case's form factor with minimal modifications.\n\n## :nut_and_bolt: Hardware\n\n### Hardware Components\n\n1. **128×64 px OLED Display (SSD1306):** Uses I2C protocol to display system metrics, including temperature, system, and network status.\n2. **Miniature 5V Fan:** Provides active cooling to maintain optimal system temperature.\n3. **DRV8833 Dual Motor Driver:** Controls the 5V fan with PWM for precise speed adjustments.\n4. **Raspberry Pi 4:** Serves as the mainboard.\n\n### Schematic\n\nHere is the schematic for connecting all components to the Raspberry Pi GPIO.\n\n![Schematic Diagram](/assets/images/diagram.png)\n\n#### DRV8833 Driver ←→ Rasberry Pi\n| *DRV8833* | *Raspberry Pi 4 GPIO* |\n| --- | --- |\n| AIN1 | GPIO13 |\n| AIN2 | GPIO12 |\n| VM | 5V (Pin #4) |\n| GND | GND (Pin #6) |\n| STBY | GPIO27 |\n\n#### 5V Fan ←→ DRV8833 Driver\n| *5V Fan* | *DRV8833 Driver* |\n| --- | --- |\n| 5V (RED) | AIO1 |\n| GND (BLACK) | AIO2 |\n\n#### OLED (SSD1306) ←→ Raspberry Pi\n| *OLED - SSD1306* | *Raspberry Pi 4 GPIO* |\n| --- | --- |\n| VCC | 3v3 (Pin #1) |\n| SDA | GPIO2 |\n| SCL | GPIO3 |\n| GND | GND (Pin #9) |\n\n\n\n## :package: 3D Case\n\n![Image of 3D printed part](/assets/images/image_of_3d_print.jpg)\n\nI used the [Argon NEO Case](https://argon40.com/products/argon-neo-case-for-raspberry-pi-4) for my raspberry pi 4 and I modified this case to place the components. You can find the 3D design file in the [`./3d-files` directory](/3d-files/) or through this [link](https://www.printables.com/model/1085113-rascase-raspberry-pi-argon-neo-case-add-on). You can also 3D print any other case of your choice to house the components. \n\n## :computer: Software\n\n#### 01. Clone Repository\n\nClone the repository into your raspberry pi:\n\n```bash\ngit clone https://github.com/mosnfar/raspi-temp-manager\n```\n\n#### 02. Install Requirements\n\nTo run this script you need these libraries gpiozero, Pillow(PIL), and adafruit_ssd1306 that are not in raspberry pi, install requirements libraries:\n\n```bash\npip install -r requirements.txt\n```\n\n\u003e [!TIP]\n\u003e If you are using a newer version of Python, install the libraries globally rather than in a virtual environment.\n\n#### 03. Copy essential files\n\nYou should copy essential files \"font and boot lofo\" to `/usr/local/share`, use the following command:\n\n```bash\nmkdir -p /usr/local/share/temp_manager\ncp ./fonts/lucan.ttf /usr/local/share/temp_manager\ncp ./images/raspberrypi_logo_inverted.bmp /usr/local/share/temp_manager\n```\n\n#### 04. Test Configs\n\nYou can test everything to make sure configs are working correctly by running `test_config.py` to check \"Required libraries installation\", \"I2C connection\", \"Fan connection\", and \"Essential files\". You can run test by this:\n\n```bash\npython test_config.py\n```\n\n#### 05. Configure Boot Script\n\nAfter successful testing, configure a service to add that into system boot and the script will be running at startup. First copy `temp_manager.py` script into `/usr/local/bin`:\n\n```bash\nsudo cp ./source/temp_manager.py /usr/local/bin/\n```\n\nNow add new service for temperature manager:\n\n```bash\nsudo nano /etc/systemd/system/temp_manager.service\n```\n\nAnd add content below to service file:\n\n```\n[Unit]\nDescription=Temperature Manager\nAfter=network.target\n\n[Service]\nExecStart=/usr/bin/python3 /usr/local/bin/temp_manager.py\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\nFinally enable and start the service to run at startup:\n\n```bash\nsudo systemctl enable temp_manager.service\nsudo systemctl start temp_manager.service\n```\n\n**:smiley: Awesome, everything is set up perfectly and should work great!**\n\n\n## :information_desk_person: More Information\n\n### Image Gallery\nHere are some images that highlight the project:\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cimg src=\"/assets/images/measuring_case.jpeg\" style=\"width: 100%;\" alt=\"Image\"\u003e\n                \u003cfigcaption\u003eMeasuring Case\u003c/figcaption\u003e\n            \u003c/figure\u003e\n        \u003c/td\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cimg src=\"/assets/images/soldering_components.jpeg\" style=\"width: 100%;\" alt=\"Image\"\u003e\n                \u003cfigcaption\u003eSoldering Components\u003c/figcaption\u003e\n            \u003c/figure\u003e\n        \u003c/td\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cimg src=\"/assets/images/component_preview.jpeg\" style=\"width: 100%;\" alt=\"Image\"\u003e\n                \u003cfigcaption\u003eComponent Preview\u003c/figcaption\u003e\n            \u003c/figure\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cimg src=\"/assets/images/glue_magnets.jpeg\" style=\"width: 100%;\" alt=\"Image\"\u003e\n                \u003cfigcaption\u003eGlue Magnets\u003c/figcaption\u003e\n            \u003c/figure\u003e\n        \u003c/td\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cimg src=\"/assets/images/connection.jpeg\" style=\"width: 100%;\" alt=\"Image\"\u003e\n                \u003cfigcaption\u003eConnection Preview\u003c/figcaption\u003e\n            \u003c/figure\u003e\n        \u003c/td\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003cfigure\u003e\n                \u003cimg src=\"/assets/images/assembled.jpeg\" style=\"width: 100%;\" alt=\"Image\"\u003e\n                \u003cfigcaption\u003eAssembled Product\u003c/figcaption\u003e\n            \u003c/figure\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n### Complete Instruction\nI wrote a complete guide and instructions on my blog \"The Forge\" you can read it through [this link](https://forge.mosn.me/keeping-your-raspberry-pi-cool-a-temperature-manager-tool).\n\n### Contribution\nFeel free to customize and improve the project however you'd like! Your contributions are always welcome, and together we can make it even better. Don't hesitate to jump in and help out! 😊\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosnfar%2Fraspi-temp-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmosnfar%2Fraspi-temp-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosnfar%2Fraspi-temp-manager/lists"}