#131 Pimp my Raspberry: Automatic fan, automatic shutdown, automatic Python

preview_player
Показать описание
Topics of this video:
We build a cooled Raspi without too much noise which automatically shuts down if battery is low.

A small fan is sufficient to keep the Raspi 3 cool
A simple hardware switches a fan on and off
A Python program reads the CPU temperature and switches the fan according the temperature
We are able to auto-launch applications during boot (including error logging)
We build a nice “battery fuel gauge” and
hack the gauge to provide a "battery low" signal
We learned how to use logic level N-channel FETs
A normal NPN transistor shuts our Raspi automatically down

Links:

Рекомендации по теме
Комментарии
Автор

I like your footnotes. They are like a bonus. Thanks for MOSFET info. It's also showing to beginners how to use datasheets.

eu
Автор

You continue to set yourself a higher and higher standard. More excellent information and great support on your new web site. Once again, thanks Andreas

garrypkeogh
Автор

Andreas, I may never attempt what you show in this video, but I am very impressed by it. Good stuff. And by the way, your presentation and pacing of the video is refreshingly efficient! No filler, just clear content and good visuals. It almost makes me think I could pull off a modification like this.

davelynch
Автор

This is the single most useful raspberry pi video on YouTube. Very well done, and thanks a million! These instructions are so good for a plethora of beginner projects without direction, just from what you go over in the video.

paxdriver
Автор

As a programmer and Linux admin, I never paid much attention to hardware. That was always "their" job. But now I am interested and you always seem to explain the intricacies of electronics to this newbie. I learn something new everytime I watch one of your videos. Thanks for all the great knowledge.

brianfrias
Автор

Andreas, I always look forward to hearing from the guy with the funny accent. I've learned a tremendous amount from your videos. They are always top-notch, clear and well-researched.

scanlan
Автор

If you connected the battery level display directly to the LiPo, it better have a built-in low voltage cutoff. The display doesn't shut off when the level reaches zero, the red rim will stay lit and if the LiPo doesn't have a built-in safety cutoff it will drain below 3V and can die. Other than that, it's a great project.

PunakiviAddikti
Автор

Advice - you do not need "sh ./launcher", if you have a shebang (first line with #!) you can just use "./launcher". This is not just for shell scripts, you can use e.g., "#!/usr/bin/env node" and "./myscript.js" even though Javascript uses C-style comments only.

..
Автор

Great hack for rainy easter!! Good idea: tricky extensions for the raspberry, low cost, easy to realize (if you have the parts on stock) and "easy to digest"
in contrast to your other high-minded and challenging videos. Awesome project.

martinsauerteig
Автор

Nice in-depth information, very complete, external links and everything.. very high quality Mr. Spiess.. you deserve more subscribers :)

hvanmegen
Автор

The voltage between Base and Emitter of a small transistor is usually around 0.7 Volts. If you see in the datasheet for the 2N3904 you will find 0.65 V(min) to 0.95V (max) for UBEsat (Base-Emitter Saturation Voltage). The datasheet for the 2N2222 tells 0.6 to 1.3 V (load Ic 0.15 A).

circuitslab
Автор

Another excellent video! 👏👏👏

Andreas, thank you again for all your wonderful YouTube work. I have been greatly inspired by your MQTT and Node Red hacking. As a result, I am now designing a BeagleBone Black based building automation system using these technologies for a company in California. I feel that I owe you a beer or some other fine beverage. 🍺

Peter_S_
Автор

Happy days for your raspberry 3. By the way Happy Easter Andreas.

chuxxsss
Автор

Great video, as usual.

Just some suggestions, as a Linux admin persons.

/var/log is the usual place for logs. You can use logrotate package to handle the log so it doesn't get to large. Configure in /etc directory.

/usr/local is the usual place for administrators script and programs. /usr/local/sbin for administrator scripts not used by ordinary users. Like your script.

Cron are great place to run things like this, but you can also run from systemd or initd, runned as a service/server.

AndersJackson
Автор

Studying micro electronics and robotics, your videos are helping me advance a lot in school :) I'm new to the channel, excited to see more :) Thanks! :)

robertkhosravi
Автор

The "unknown" IC on the battery meter is an LM324 Quad op amp used as 4 comparators. Also, a small detail to nitpick: when a battery is fully replenished it's "charged", not "loaded" :) - Keep up the good work!

zaprodk
Автор

Another way of doing thermally controlled fan:
Use NTC thermistor and thick heatsink compound. Construct -additional pylons- comparator circuit and connect the output to N-channel FET.
Using trimpots, you can adjust how often fan will spin.
(Or, you can use Arduino Nano to handle fan control duty, taking the job off the Pi)

PhilXavierSierraJones
Автор

Cool project and video! I really like the way you think: Why add circuit that will detect empty battery, when you already have it in the battery monitor module. Nice!

Hackvlog
Автор

Great explanation about the difference between IRF and IRL. Thank you very much! You are a great teacher. And if is possible and you have time for this, would be great if you can explain more about transistors and op-amp parameters and characteristics like Vgs and others.

pliniobass
Автор

Exactly what I was looking for since my first encounter to the RPi:
Just does a clean shutdown after power failure (
- Kodi settop box started from the TV's USB
- fully scalable car or boat onboard computer, maybe from Kodi CarPC surface with multimedia and navigation system
- Wife / Mom / Child safe OS for Small Home Office / Surfstation / Smart Home computer
- Monitoring station for 3D-Printers)

I am tired of the usual 'plug (off) and pray' after giving control over your Pi project to others. ;-)

andreasdittrich