RFM12 FS20

From Ethersex_Wiki
Revision as of 17:54, 28 March 2013 by GooPie4o (talk | contribs)
Jump to: navigation, search
RFM12 FS20
Status
In Development
menuconfig I/O->RFM12 ASK->868MHz
Pinning yes
Ecmd yes
Control6 yes
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

Connection

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 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 */
 pin(STATUSLED_RFM12_TX, PB3, OUTPUT)
 pin(STATUSLED_RFM12_RX, PB1, OUTPUT)
  
 RFM12_FS20_USE_INT(1)

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.

Configuration

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

 | |     I/O  --->                                               | |
 ...
 | |       [*] RFM12 ASK  --->                                   | |
 ...
 | |         [ ] 433MHz                                          | |
 | |         [-] Pollin/Kangtai Powerswitch (IC 2272)            | |
 | |         [-] Pollin Powerswitch buried (IC 1527)             | |
 | |         [-] Tevion Powerswitch                              | |
 | |         [-] Intertechno ITS-150                             | |
 | |         [-] External filter                                 | |
 | |         [-] Sensing                                         | |
 | |         ---                                                 | |
 | |         [*] 868MHz                                          | |
 | |         (0)   RFM12 select                                  | |
 | |         [*] FS20                                            | |
 | |         [*] FHT                                             | |
 | |         [*] ESA                                             | |
 | |         [ ] TX3                                             | |
 | |         [ ] Send received data via syslog                   | |
 | |         --- Debugging Flags                                 | |
 | |         [-] Sensing                                         | |
 | |         [ ] FS20                                            | |

ECMD

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.

Control6

work in progress

Troubleshooting

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 of 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

work in progress