Difference between revisions of "RFM12 FS20"

From Ethersex_Wiki
Jump to: navigation, search
 
(33 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
{{Module
 
{{Module
 
|NAME=RFM12 FS20
 
|NAME=RFM12 FS20
|MENUCONFIG={{I/O}}->RFM12 ASK->868MHz
+
|MENUCONFIG={{I/O}}->Radio->RFM12 ASK->868MHz
|STATUS={{In_Development}}
+
|STATUS={{Stable}}
 
|PINNING=yes
 
|PINNING=yes
 
|ECMD={{has_ecmd}}
 
|ECMD={{has_ecmd}}
Line 9: Line 9:
 
|DEPENDS=[[ECMD]] [[RFM12 ASK]]
 
|DEPENDS=[[ECMD]] [[RFM12 ASK]]
 
|REQUIRES= -
 
|REQUIRES= -
 +
|TIMER={{occupies_timer|2}} (RX)
 
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/radio/rfm12 https://github.com/ethersex/ethersex/tree/master/hardware/radio/rfm12]
 
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/radio/rfm12 https://github.com/ethersex/ethersex/tree/master/hardware/radio/rfm12]
 
}}
 
}}
Line 17: Line 18:
 
of such EIB systems permits, plays a crucial role.
 
of such EIB systems permits, plays a crucial role.
  
This FS20 modul is based on [http://culfw.de CULFW by Rudolf Koenig] and supports a wide range of protocols:
+
This modul is based on [http://culfw.de CULFW by Rudolf Koenig] and supports a wide range of protocols:
  
* FS20: send/receive<br>There are numerous FS20 devices, AFAIK. all of them are fully supported.
+
* FS20: send/receive<br>There are numerous FS20 devices, all of them are fully supported.
* FHT: send/receivey<br>Communication to the FHT80b is supported.
+
* FHT: send/receive<br>Communication to the FHT80b is supported.
 
* S300: receive<br>Examples of such devices: S300TH, KS300-2
 
* S300: receive<br>Examples of such devices: S300TH, KS300-2
 
* EM1000: receive<br>Devices: EM1000FM, EM1000GZ, EM1000WZ
 
* EM1000: receive<br>Devices: EM1000FM, EM1000GZ, EM1000WZ
* HMS: receive<br>Devices: There are numerous HMS devices, AFAIK. all of them are fully supported.
+
* HMS: receive<br>Devices: There are numerous HMS devices, all of them are fully supported.
 
* ESA2000: receive
 
* ESA2000: receive
 
* Lacrosse TX2/TX3: receive
 
* Lacrosse TX2/TX3: receive
Line 29: Line 30:
 
== Connection ==
 
== Connection ==
  
The RFM12 is connected to the MCU like in [[RFM12_FSK#Connection|FSK Mode]] with a small difference.
+
The RFM12 is connected to the AVR like in [[RFM12_FSK#Connection|FSK Mode]] with a small difference.
The output FSK/DATA/nFSS signal (Pin 3) is connected to one of the INT pins of the MCU.
+
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. In order to receive near and far sender as well. To improve sensitivity on short and long distances
+
The software uses the digital filter of the RFM12. To improve sensitivity on short and long distances
 
the [http://jeelabs.net/projects/cafe/wiki/Receiving_OOKASK_with_a_modified_RFM12B C_arssi capacitor needs to be replaced]
 
the [http://jeelabs.net/projects/cafe/wiki/Receiving_OOKASK_with_a_modified_RFM12B C_arssi capacitor needs to be replaced]
with a value 150 pf.
+
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 */
 +
  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 ==
 
== Configuration ==
 +
 +
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.
 +
 +
== [[ECMD]] ==
 +
 +
RFM12 FS20 implements an [[ECMD]] interface for send and receive FS20/FHT commands. The received data is formatted as described in the [http://culfw.de/commandref.html#protocol2 CULFW reference]. See [[ECMD_Reference|ECMD reference]] for a command list.
 +
 +
== 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 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 [http://culfw.de/commandref.html#protocol2 CULFW reference]. One could use the perl scripts from [http://culfw.de/ CULFW] to decode the data.
  
  
 
[[Category:RFM12]]
 
[[Category:RFM12]]

Latest revision as of 16:54, 16 November 2017

RFM12 FS20
Status
Stable
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

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 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 */
 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  --->                                                 | |
 ...
 | |     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.

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.

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