How to make a $4 RFLink for 433MHz home automation!

This is how I made an poor man’s RFLink. It cost me only about $4, this is when I count in basic parts I already had, Arduino Uno, bradboard and some pin headers (but who doesn’t have this stuff in their hobby shelf?😉)..

What is RFLink?
It’s an 433MHz gateway designed to communicate with “standard” wireless -wallplugs, -switches, -weather stations and -temperature sensors. It’s built upon an Arduino (the full project uses an Arduino Mega) and is designed to be controlled by an home automation controller (eg Domoticz or Home Assistant). The  receiver and transmitter is within the ISM free license band, is based on ASK-modulation and the protocol is OOK.
Link to the RFlink project. I’m not a developer/creator of the RFLink project, this is just my contribution, a way to run the code on an smaller Arduino (UNO) than the full project uses (Arduino MEGA). Why use a more expensive microcontroller when you don’t need all the features and can meet all your goals with a smaller and cheaper microcontroller?

What I had to buy:

  • RXB-12 433MHz Receiver ~1USD
  • TX-5 433MHz Transmitter ~2USD
  • 2pcs 433MHz spring-antennas ~1USD

Hardware:

The hardware wiring was pretty straightforward. Just connected as follows:

RXB-12 Receiver:
Pin 1 (ANT) -> Spring antenna
Pin 2 (GND) -> Not connected (can be connected to Arduino GND)
Pin 3 (VCC) -> Arduino Digital (3)
Pin 4 (DATA) -> Not connected
Pin 5 (DATA) -> Arduino RX (0)
Pin 6 (GND) -> Arduino GND

TX-5 Transmitter:
Pin 1 (GND) -> Arduino GND
Pin 2 (DATA) -> Arduino TX (1)
Pin 3 (VCC) -> Arduino Digital (2)
Pin 4 (ANT) -> Spring antenna

Arduino Firmware:
The arduino firmware I used can be found on my Github: https://github.com/cwesystems/RFLink

Download the software either by using git or the “Download ZIP”-option. If you use the ZIP-option, remember to change the folder-name to “RFLink” after unzip).

$git clone https://github.com/cwesystems/RFLink

Open “RFLink.ino” with ArduinoIDE.

In the file “RFLink.ino” you have to specify which pins you use for RX, TX, TX-5 VCC and RXB-12 VCC. I used:

1
2
3
4
#define PIN_RF_TX_VCC  2
#define PIN_RF_TX_DATA 1 
#define PIN_RF_RX_VCC  3 
#define PIN_RF_RX_DATA 0

In the file “Config_01.c” you can specify which plugins to be loaded. The full project is designed to be used with an Arduino Mega and will not fit into memory of an Arduino UNO. Because of that I had to disable some plugins. To disable a plugin just comment them out with // or /* */.

Example of my Config_01.c

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
// ****************************************************************************************************************************************
// RFLink List of Plugins
// ****************************************************************************************************************************************
// Here are all plugins listed that are supported and used after compilation.
// When needed additional plugins can be added or selected plugins can be enabled/disabled.
//
// BEWARE OF THE PLUGIN_MAX setting!!       TX: 51      RX: 24
// ****************************************************************************************************************************************
// Translation Plugin for oversized packets due to their breaks/pause being too short between packets
// Used for Flamingo FA500R and various others, do NOT exclude this plugin.
#define PLUGIN_001              // DO NOT CHANGE OR EXCLUDE!!
// ------------------------------------------------------------------------
// -- Any of the following protocols can be excluded whenever not needed --
// ------------------------------------------------------------------------
//#define PLUGIN_002              // Lacrosse v2 2300/3600
#define PLUGIN_003              // Kaku : Klik-Aan-Klik-Uit (with code wheel) aka ARC
#define PLUGIN_004              // NewKAKU : Klik-Aan-Klik-Uit with automatic coding aka Intertechno.
//#define PLUGIN_005              // Eurodomest
//#define PLUGIN_006              // Blyss
#define PLUGIN_007              // Conrad RSL2
//#define PLUGIN_008              // Kambrook
//#define PLUGIN_009              // X10 RF
//#define PLUGIN_010              // TRC02 RGB Switch
#define PLUGIN_011              // Home Confort
#define PLUGIN_012              // Flamingo FA500R
#define PLUGIN_013              // Powerfix/Quigg
#define PLUGIN_014              // Ikea Koppla
#define PLUGIN_015              // Home Easy EU
// -------------------
// Weather sensors
// -------------------
//#define PLUGIN_030              // Alecto V1 (WS3500) 434 MHz.
//#define PLUGIN_031              // Alecto V3 (WS1100/WS1200/WSD-19) 433.9 MHz.
//#define PLUGIN_032              // Alecto V4
//#define PLUGIN_033              // Conrad Pool Thermometer
//#define PLUGIN_034              // Cresta
//#define PLUGIN_035              // Imagintronix
//#define PLUGIN_040              // Mebus
//#define PLUGIN_041              // LaCrosse v3 ws7000
//#define PLUGIN_042              // UPM/Esic
//#define PLUGIN_043              // LaCrosse v1
//#define PLUGIN_044              // Auriol v3
//#define PLUGIN_045              // Auriol
//#define PLUGIN_046              // Auriol v2 / Xiron
//#define PLUGIN_048              // Oregon V1/2/3
// -------------------
// Motion Sensors, include when needed
// -------------------
//#define PLUGIN_060              // Ajax Chubb Varel 433 MHz. motion sensors
//#define PLUGIN_061              // Chinese PIR motion door and window sensors
//#define PLUGIN_062              // Chuango Alarm Devices
//#define PLUGIN_063              // Oregon PIR/ALARM/LIGHT
// -------------------
// Doorbells
// -------------------
//#define PLUGIN_070              // Select Plus (Action - Quhwa)
//#define PLUGIN_071              // Plieger York
//#define PLUGIN_072              // Byron SX doorbell
//#define PLUGIN_073              // Deltronic doorbell
//#define PLUGIN_074              // RL02
//#define PLUGIN_075              // Silvercrest
// -------------------
// Smoke detectors / Fire Places
// -------------------
//#define PLUGIN_080              // Flamingo FA20 / KD101 smoke detector
//#define PLUGIN_082              // Mertik Maxitrol / Dru fireplace
//#define PLUGIN_083              // Alecto SA33
// -------------------
// 868 MHZ
// -------------------
//#define PLUGIN_100              // Alecto V2 (DKW2012/ACH2010) 868 MHz.  => PLANNED
// -------------------
// Housekeeping
// -------------------
//#define PLUGIN_090              // Nodo Slave conversion plugin
#define PLUGIN_254              // Debug to show unsupported packets
// ****************************************************************************************************************************************
// RFLink List of Plugins that have TRANSMIT functionality
// ****************************************************************************************************************************************
// Here are all plugins listed that are supported and used after compilation.
// When needed additional plugins can be added or selected plugins can be enabled/disabled.
// ****************************************************************************************************************************************
// ------------------------------------------------------------------------
// -- Any of the following protocols can be excluded whenever not needed --
// ------------------------------------------------------------------------
#define PLUGIN_TX_003           // Kaku : Klik-Aan-Klik-Uit (with code wheel) aka ARC
#define PLUGIN_TX_004           // NewKAKU : Klik-Aan-Klik-Uit with automatic coding aka Intertechno.
//#define PLUGIN_TX_005           // Eurodomest
//#define PLUGIN_TX_006           // Blyss
#define PLUGIN_TX_007           // Conrad RSL2
//#define PLUGIN_TX_008           // Kambrook
//#define PLUGIN_TX_009           // X10 RF
//#define PLUGIN_TX_010         // TRC02 RGB switch
#define PLUGIN_TX_011           // Home Confort
#define PLUGIN_TX_012           // Flamingo FA500R  (11)
#define PLUGIN_TX_013           // Powerfix/Quigg
#define PLUGIN_TX_015           // Home Easy EU     (14)
// -------------------
// Doorbells
// -------------------
//#define PLUGIN_TX_070           // Select Plus (Action - Quhwa)
//#define PLUGIN_TX_072           // Byron SX doorbell
//#define PLUGIN_TX_073           // Deltronic doorbell
//#define PLUGIN_TX_074           // RL02
// -------------------
// Smoke detectors
// -------------------
//#define PLUGIN_TX_080           // Flamingo FA20 / KD101 smoke detector
//#define PLUGIN_TX_082           // Mertik Maxitrol / Dru fireplace
// -------------------
//       -=#=-
// -------------------

Summary:

Even if this was a quick-n-dirty build, it worked really good for my needs and it was super cheap! I was just interested to control some NEXA wallplugs (230V On/Off).
The wireless transmission range was also good.

5 thoughts on “How to make a $4 RFLink for 433MHz home automation!

  1. Hi,
    I have been messing about with your example connected to Domoticz and I can get the recieve function to work but not transmit.I’m testing with Selflearning Nexa..
    Am I doing something wrong?

    As far as I understand the Arduino Uno is not capable to Tx/Rx on both USB and 433 at the same time. This makes it difficult to use with Domoticz.
    Regards Len

    1. Try these:

      // PIN Definition #define PIN_BSF_0 3 //Aurel = Enable(6) #define PIN_BSF_1 23 // Board Specific Function lijn-1 #define PIN_BSF_2 24 // Board Specific Function lijn-2 #define PIN_BSF_3 25 // Board Specific Function lijn-3 #define PIN_RF_TX_VCC 2 // +5 volt / Vcc power to the transmitter on this pin. Aurel = TX/RX(5) #define PIN_RF_TX_DATA 1 // Data to the 433Mhz transmitter on this pin. Aurel = Data In(4) #define PIN_RF_RX_VCC 3 // Power to the receiver on this pin #define PIN_RF_RX_DATA 0 // On this input, the 433Mhz-RF signal is received. LOW when no signal. Aurel = Data Out(9)

  2. I might be missing something basic, is completely new in the Arudion-world, but I get:
    “Invalid library found in /Users/NN/Documents/Arduino/libraries/RFLink: no headers files (.h) found in /Users/NN/Documents/Arduino/libraries/RFLink”

Leave a Reply to Derek Colley Cancel reply

Your email address will not be published. Required fields are marked *