28 January & February 2021 http://www.elektormagazine.com
Hardware requirements
For your Raspberry Pi to be able to receive 433.92 MHz sensor
measurements, you need a receiver and an antenna.
Receiver
A popular type of receiver for 433.92 MHz projects is a Realtek
RTL2832 based DVB dongle. Yes, you read that right, DVB as in
Digital Video Broadcasting. As it turns out, the RTL2832 chip in
many of these dongles can do quite more than decoding digital
video signals: with the right software, you can create a true
software-defined radio (SDR) with it.
So if you have an old DVB dongle lying in your closet, chances are
that you can use it to receive signals from your weather sensors.
Otherwise, the RTL-SDR (https://www.rtl-sdr.com) is a good choice
(Figure 2). You can find variations of this stick for €25 and in a kit
with an antenna and other accessories for €40 to €45 [1]. You can
find something useful even cheaper: I have read about €7 DVB
dongles on AliExpress that are working perfectly for this purpose,
but I haven’t had any experience with them.
Antenna
The next item you need is a good antenna. There are whole books
written about antenna theory, and I’m not going to delve into this
vast topic because I’m no antenna specialist.
One thing you should know for the choice of your antenna is
its length. This depends on the wavelength of the signal. The
wavelength equals the speed (in m/s) divided by the frequency
(in Hz), and is measured in metres (m). Let’s do the maths for
433.92 MHz communication. In air, the speed of the wave is virtu-
ally the speed of light. So the wavelength becomes:
299,792,458 m/s / 433,920,000 Hz = 0.69 m.
So the full wavelength is 69 cm, the half-wavelength is 34.5 cm,
and the quarter-wavelength is 17.25 cm. These are the theoretical
optimal lengths for an antenna to receive 433.92 MHz transmis-
sions. In practice, various factors are influencing the antenna’s
characteristics, including positioning, and there’s a rule of thumb
to subtract 5% from this theoretical length.
Again, this is not an antenna theory book, so I’m not going to talk
about the different types of antennas. Moreover, for reading sensor
values in your house it doesn’t even matter that much what the
quality of your antenna is. You could try experimenting with it, but
chances are that it just works if you buy a ‘433 MHz antenna’ for a
few euros on AliExpress or Banggood. If you don’t want to take any
chances, use an antenna included in a kit with the RTL-SDR. The
official antenna kit (Figure 3) has telescopic dipole antennas you
can extend from 5 cm to 1 m, which covers the optimal wavelengths
for the 433.92 MHz frequency [2].
Receiving sensor values with rtl_433
On the software side, a popular choice to read 433.92 MHz signals
is ‘rtl_433’ (https://github.com/merbanan/rtl_433), which despite its
name is a generic data receiver, mainly for the 433.92 MHz, 868 MHz
(SRD), 315 MHz, 345 MHz, and 915 MHz ISM bands.
In this chapter, I’m focusing on the first types of devices: tempera-
ture and humidity sensors. You can find these for less than 10 euros
(Figure 1), even for a few euros on AliExpress or Banggood. Their
range is quite good: I can read sensors in my whole house, including
in my fridge and freezer, and even on my terrace outside.
Figure 2: The RTL-SDR decodes a lot of wireless signals, including weather
sensors transmitting on 433.92 MHz.
Figure 3: With the tripod mount, dipole base and telescopic antennas from
the RTL-SDR kit, you have all you need to receive measurements from all
your 433.92 MHz sensors.
Figure 1: For around €5 you
can find a temperature
and humidity sensor from
DANIU that transmits its
values over 433.92 MHz and
shows it on a clear display.