Giter VIP home page Giter VIP logo

raspi-cooler's Introduction

Raspi-Cooler

Raspi-Cooler is a small, automated system designed to keep an old Raspberry Pi board cool using a few basic electronic components.

Files

Name Purpose Location
trigger_fan.c Reads input temperature and sends fan state signal out, HIGH if cooling is necessary, LOW otherwise. Pi
trigger-fan.sh Runs each minute via a cron job, it gets the approximate cpu temperature and strips the output, then passes it along to the trigger_fan executable as an argument. Pi
fan_listener.py* Listens for fan state signal changes and opens/closes relay accordingly, cutting/providing power to the cooling fan. Pico

* This file should be re-named main.py when loaded onto the Pico so that it runs at boot.

Hardware

Name Purpose
Raspberry Pi Device to be cooled. It sends the cooling signal.
Raspberry Pi Pico Listens for the cooling signal and controls the relay used to turn the cooling fan ON/OFF.
120mm Cooling Fan Cools the Pi by blowing air over it.
5v Relay Allows/Prohibits the flow of current to the fan based on input received from the Pico.
9v Power Supply* Provides power to the cooling fan.
Jumper Wires Connects the components to one another.

* This is not a requirement as cooling fans like the one used can run on 5v power, they are just better at cooling when run at higher voltages. Stay within the safe range of the fan, though, as you obviously shouldn't plug a fan like this into a 120v outlet directly.

Running

A great way to automate the running of commands or executables is via a Cron job. The trigger-fan.sh script was setup using the following.

* * * * * cd /home/[USER]/utilities/cooling-scripts && ./trigger-fan.sh

Another setup that would work is below.

* * * * * cd ~/utilities/cooling-scripts && ./trigger-fan.sh

You may also elect to manually run the executable doing the following, which was done heavily during testing. Any float value can be passed in as the TEST_TEMPERATURE value. The executable won't run unless called using sudo.

sudo ~/utilities/cooling-scripts/trigger_fan [TEST_TEMPERATURE]

raspi-cooler's People

Contributors

milkeza avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.