RFM12 FS20

From Ethersex_Wiki
Jump to: navigation, search
RFM12 FS20
menuconfig I/O->Radio->RFM12 ASK->868MHz
Pinning yes
Ecmd yes
Control6 no
Uses Timer Timer 2 (RX)
Depends on ECMD RFM12 ASK
Requires -
Code https://github.com/ethersex/ethersex/tree/master/hardware/radio/rfm12

The FS20 / FHT system by ELV is currently the most successful wireless home control system in the low cost sector. This arises from the large number of components and the continuous expansion of the system. But the relatively low price, the comprehensive home control systems far below the price of such EIB systems permits, plays a crucial role.

This modul is based on CULFW by Rudolf Koenig and supports a wide range of protocols:

  • FS20: send/receive
    There are numerous FS20 devices, all of them are fully supported.
  • FHT: send/receive
    Communication to the FHT80b is supported.
  • S300: receive
    Examples of such devices: S300TH, KS300-2
  • EM1000: receive
    Devices: EM1000FM, EM1000GZ, EM1000WZ
  • HMS: receive
    Devices: There are numerous HMS devices, all of them are fully supported.
  • ESA2000: receive
  • Lacrosse TX2/TX3: receive


The RFM12 is connected to the AVR like in FSK Mode with a small difference. The output FSK/DATA/nFSS signal (Pin 3) is connected to one of the INT pins of the AVR. This modul does not work in interrupt mode, so the output nRQ signal (Pin 2) can be left unconnected.

The software uses the digital filter of the RFM12. To improve sensitivity on short and long distances the C_arssi capacitor needs to be replaced with a value of 150 pF.

The SPI connection is pretty fixed and does not need special pinnings. For the chip select (CS) of the modul and the optional LEDs the pinning must be defined.

 /* port the rfm12 module CS is attached to */
 pin(SPI_CS_RFM12_0, PB0, OUTPUT)
 /* port the LEDS for rfm12 tx/rx attached to */

If more than one RFM12 are used with Ethersex, the number in SPI_CS_RFM12_0 defines the number of the module. Each needs its own pinning. The RFM12_FS20_USE_INT defines whether FSK/DATA/nFSS is connected to INT0, INT1 or INT2 of the AVR.


The FS20 system sends on 868,35 MHz, so the 868MHz option is the right one.

 | |   I/O  --->                                                 | |
 | |     Radio  --->                                             | |
 | |       [*] RFM12 ASK  --->                                   | |
 | |         [*] 868MHz                                          | |
 | |         (0)   RFM12 select                                  | |
 | |   Protocols  --->                                           | |
 | |     Radio  --->                                             | |
 | |       [*] FS20 (868MHz)  --->                               | |
 | |         (RFM12) Transmitter/receiver hardware               | |
 | |         [*] FS20 Send                                       | |
 | |         [*] FS20 Receive                                    | |
 | |         [*] FHT                                             | |
 | |         [ ] ESA                                             | |
 | |         [ ] TX3                                             | |
 | |         [ ] Send received data via syslog                   | |
 | |         --- Debugging Flags                                 | |
 | |         [ ] FS20                                            | |

The modul uses Timer 2 of the AVR exclusively. Currently there is no option to use Timer 1, but this will change in the future.


RFM12 FS20 implements an ECMD interface for send and receive FS20/FHT commands. The received data is formatted as described in the CULFW reference. See ECMD reference for a command list.


It may happen that not all of the RFM12 FS20 sensors are received. Here are some points that may help to improve reception:

  • Location:
    • Avoid RF transmitter near the RFM12
    • Choose a position in the center of the sensors
  • Antenna:
    • It is recommended to choose an antenna with a length not shorter than Lamda/2 (17,3cm)
  • Bandwidth: Default 400kHz
    • Can be changed via ECMD from 400kHz to 67kHz (rfm12 setbandwidth <modulnumber> 1-6)
  • Gain: Default -14dB
    • Can be changed via ECMD from 0dB to -20dB (rfm12 setgain <modulnumber> 0-3)
  • DRSSI: Default -97dB
    • Can be changed via ECMD from -103dB to -61dB (rfm12 setdrssi <modulnumber> 0-7)

Checkout the RFM12 datasheet for details on bandwidth, gain and DRSSI.

Decoding received data

The received data is formatted as described in the CULFW reference. One could use the perl scripts from CULFW to decode the data.