While working on the raspberry live video with tkinter I printed a case for the camera
• Raspberry pi Video stream image manipulati...
The case files can be found here
https://www.thingiverse.com/thing:274...
Full details
• Raspberry pi config built in GPIO controll...
I had to adjust it a bit, but it turned out great.
Now the more important thing I wanted to do was to add a fan to the rpi 4 that tend to run hot.
but I did not want it to run all the time, so I did 2 things.
I create a PCB that move the control of the fan to a GPIO using a NPN transistor as a switch.
And I wrote a little python script that takes the core temperature using this command : vcgencmd measure_temp. Once I get the temperature, I check if it’s over the threshold, if so I turn on the fan. If not turn it off. Pretty simple.
I added the script to the rc.local file and it works on boot now.
I had a great time also creating the box and mount using fusion360.
Hope you will find it useful.
On this page of the site you can watch the video online Raspberry pi 4 GPIO controlled cooling fan – python script with a duration of hours minute second in good quality, which was uploaded by the user talofer99 03 August 2020, share the link with friends and acquaintances, this video has already been watched 8,816 times on youtube and it was liked by 64 viewers. Enjoy your viewing!