Archive for category Raspberry Pi

Raspberry Pi :: heatsink installation

heatsink installed

I was worried about running Raspberry Pi in summer, hot weather is not really friendly with electronics. Worried not enough to put it in 24/7 air-conditioned room, but somewhere around spending $5-8 on heatsink installation, using heatsink kit from

The kit comes as three separate radiators, one for the main CPU/memory unit, one for the periferals chip responsible for ethernet and usb, and one really small one — for the power converter, that also gets quite hot.

Installation was a breeze: just attach sticky heat-transfer tape to the bottom of the heatsink, cut to the size and stick the heatsink on the top of the chip. And maybe move around a little, to ensure the perfect fit and there are no air pockets trapped between the tape and chip surface.

The results. I could not notice a very sharp decline in the temperature graph, but still cutting a few degrees off the CPU temperature might prolong the life of the Raspberry Pi for a few more month, if not years. The active cooling system with large fans and radiators might give a somewhat better results, but the price and the noise will definitely be much higher.
temperature graph


No Comments

Raspberry Pi :: Monitoring CPU temperature with RRDTOOL

Recently I’ve got wondering about how hot is the processor in my Raspberry Pi, and how this temperature changes throughout the day/night. There’s a beautiful and simple tool for that purpose, called rrdtool, that stores the data (any kind of data) in the round-robin database and creates nice looking graphs.

The installation of rrdtool is pretty straight forward:

sudo apt-get install rrdtool

And here’s the bash script, that runs every five minutes by cron and saves temperature and creates the picture:

# update .rrd database with CPU temperature
# $Id: update_cputemp 275 2013-05-16 05:20:56Z lenik $

cd /home/lenik

# create database if not exists
[ -f cputemp.rrd ] || {
/usr/bin/rrdtool create cputemp.rrd –step 300 \
DS:cputemp:GAUGE:1200:U:U \
RRA:AVERAGE:0.5:1:3200 \
RRA:AVERAGE:0.5:6:3200 \
RRA:AVERAGE:0.5:36:3200 \
RRA:AVERAGE:0.5:144:3200 \
RRA:AVERAGE:0.5:1008:3200 \
RRA:AVERAGE:0.5:4320:3200 \
RRA:AVERAGE:0.5:52560:3200 \

# read the temperature and convert “59234″ into “59.234″ (degrees celsius)
TEMPERATURE=`cat /sys/class/thermal/thermal_zone0/temp`
TEMPERATURE=`echo -n ${TEMPERATURE:0:2}; echo -n .; echo -n ${TEMPERATURE:2}`

/usr/bin/rrdtool update cputemp.rrd `date +”%s”`:$TEMPERATURE

/usr/bin/rrdtool graph cputemp.png DEF:temp=cputemp.rrd:cputemp:AVERAGE LINE2:temp#00FF00 –width 800


No Comments

Raspberry Pi :: PeerGuardian / Moblock setup

While thinking about connecting the new Raspberry Pi board to the internet, I could not even imagine to do that without any firewalls or filters for incoming traffic. Having a little bit of experience with MoBlock before, I have decided to try the same approach with Raspberry Pi.

Unfortunately, the “moblock” package is not in the official repositories, so I had to build one from the sources. The process is quite easy, but requires a few not very obvious steps.

First, add the repository and get the sources. The following goes into the /etc/apt/sources.list:

deb-src wheezy main

then install the GPG keys:

gpg –keyserver –recv-keys C0145138
gpg –export –armor C0145138 | sudo apt-key add -

and finally get the sources:

sudo apt-get update
sudo apt-get install fakeroot
sudo apt-get build-dep -y pgl
mkdir ~/peerguardian
cd ~/peerguardian
apt-get source pgl

The build dependecies in the previous step include some X11 and qt4 stuff, which might be required if you run a desktop environment or not, if you run a headless installation, in which case you may free about 65MB (WARNING: you’ll lose your desktop doing this!) using:

sudo apt-get remove x11-common
sudo apt-get autoremove

The build step is very simple:

sudo make install

or you may want to replace “./configure” with “./configure –without-qt4 –disable-dbus” in case of headless installation.

Finally, start the PeerGuardian daemon (the first run might take a while, since it’s downloading and unpacking all block lists):

sudo pglcmd start &
tail -f /usr/local/var/log/pgl/pglcmd.log

One last word of warning, the default block list is so strict, it might even disable the blocklist updates and downloads. Don’t be surprised, if you need to issue “sudo pglcmd stop” before being able to download new block lists.

And if everything works fine, you may enable automatic daemon startup using:

update-rc.d pgl defaults


No Comments

Raspberry Pi :: got one from RS Components

Raspberry Pi

The Raspberry Pi project has matured enough in the end of the last year to release a new model, with improved schematics and extra memory. I have decided that 512MB is ample enough for my applications and it’s time to try one. Ordered from RS Components, they had about a week or two of back orders, so it took a little while before the nice white package has shown on my doorstep.

The package contents was the board, the transparent plastic enclosure and the power supply. Previous overseas orders taught me to expect a lot of problems with the power supply (the absolute record was the Samsung tablet, that required 3 converter plugs to be able to use it), but this time I was pleasantly surprised to find out several different connectors that accomodate most of the possible power outlets — US, GB and Europe all in one simple package.

Raspbian installation was a breeze — download the image, copy to SD card and off we go. First boot was fast, and though the preinstalled software was a bit limited, I could get almost anything I wanted from the Debian repositories.

Another nice touch — when connected over a HDMI, the board automatically turns on the TV set and changes the input, so I don’t have to search for a remote to see what’s going on. And yeah, it turns TV off during shutdown, that is also very welcome.

No Comments