Giter VIP home page Giter VIP logo

cooler-trigger's Introduction

Cooler Trigger

A little demonstration

When temperature > deactivation threshold

When temperature < activation threshold

How did I get here?

If you don't want to know the evolution, you can go to Getting Started

I bought my Raspberry Pi and was concerned about heating it. So, I bought a USB cooler to cool the board. However, I would not like to leave it on forever. So, I would need a strategy to turn the cooler on and off

My first strategy

The first idea that came to mind was the use of cron jobs. I would turn the cooler on and off periodically via USB power on and off.

Some like this:

$ crontab -e
0,10,20,30,40,50 * * * * sudo uhubctl -a 1 -p 2 -l 1-1 -R
5,15,25,35,45,55 * * * * sudo uhubctl -a 0 -p 2 -l 1-1 -R

In my case, every 5 minutes, I turned the USB power on or off.

My current strategy

Currently, the strategy used by me is this application here. The Cooler Trigger monitors the processor temperature (SoC on the raspberry pi) and performs two side effects: activating the usb power when the temperature exceeds the deactivation threshold and deactivating the usb power when the temperature falls below the activation threshold.

According to that article, 85 degrees Celsius should be the limit.

Officially, the Raspberry Pi Foundation recommends that the temperature of your Raspberry Pi device should be below 85 degrees Celsius for it to work properly.

But, I decided to set 65 degrees celsius as the cooler deactivation threshold to increase the card’s lifetime.


Getting started

Requirements

  • Raspberry Pi 3 B
  • USB Cooler
  • uhubctl
  • Node.js / npm
  • Git
  • Internet :)

Cloning repo and install dependencies

$ git clone https://github.com/gabrielrufino/cooler-trigger
$ cd cooler-trigger
$ npm install

Start Cooler Trigger in background

$ nohup npm start &

cooler-trigger's People

Contributors

gabrielrufino avatar

Watchers

 avatar  avatar  avatar  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.