- Raspberry Pi Computer Vision Programming
- Ashwin Pajankar
- 458字
- 2021-04-09 23:22:58
Heatsinks and overclocking RPi 4B
Overclocking means running the processors at higher speeds than those that are intended. When we overclock the processors, their temperature tends to rise and they radiate more heat. Raspberry Pi board models do not come with any built-in coolers. You can buy passive heatsinks from many online shops such as Amazon. The following is an example of a heatsink with a fan:
The heatsink fan can be powered by connecting it to a 5V or 3.3V power supply. The speed of the fan depends on the voltage, and we can connect it to the RPi power pins. We will learn more about the GPIO and the power pins of RPi in the next chapter. The best and the most effective heatsink that I found was the ICE Tower fan for the RPi 4B (https://www.seeedstudio.com/ICE-Tower-CPU-Cooling-Fan-for-Raspberry-pi-Support-Pi-4-p-4097.html).
The following is my own Pi with the ICE Tower mounted on it:
It comes with a booklet with easy installation instructions.
NOTE:
It is necessary to install an actively cooled heatsink and fan on the RPi's processor to overclock it. Overclocking any processor without adequate cooling may damage it.
We can overclock the CPU, GPU, and RAM of an RPi board. In this section, we will discuss how to overclock an RPi 4B board.
Make sure that you update the firmware with the following command:
sudo rpi-update
It is necessary to update the firmware before overclocking the Pi. Once you've done that, run the following command:
sudo nano /boot/config.txt
This will open /boot/config.txt using the nano text editor. At the end of the file, add the following lines:
over_voltage=6
arm_freq=2147
In the first line, we are setting the overvoltage as overclocking requires additional power. In the next line, we are overriding the default clock frequencies of the CPU. Save the changes and reboot the RPi.
Often, the RPi may not boot back up. In that case, you might want to change the /boot/config.txt settings for overclocking (using a Windows PC) to over_voltage=2 and arm_freq=1750, respectively,
In the case that these setting too fail to boot the RPi, then comment both the lines and the RPi will boot up. Overclocking does not work stably with every processor.
When we run a computationally heavy process on the RPi board, all these additional megahertz will manifest themselves. We can monitor the clock in real time using the following command:
watch -n1 vcgencmd measure_clock arm
The output will cross the speed range of 2 billion (2 GHz) once we launch any heavy program on the RPi.
All this additional processing power we obtained by overclocking the RPi board will help us with our computer vision experiments.