Go to file
Sébastien Millet 08b947ffeb Updates the LICENSE file to match LESSER glp v3
- I had left the LICENSE file of the GPL v3 instead of the Lesser GPL v3
  (as is more logical, speaking of a library...)
2021-06-04 17:08:45 +02:00
examples Adds one example and normalizes names 2021-06-04 15:55:01 +02:00
extras/testplan Adds one example and normalizes names 2021-06-04 15:55:01 +02:00
.gitignore Initial Upload 2021-06-04 11:57:28 +02:00
Debug.cpp Initial Upload 2021-06-04 11:57:28 +02:00
Debug.h Initial Upload 2021-06-04 11:57:28 +02:00
LICENSE Updates the LICENSE file to match LESSER glp v3 2021-06-04 17:08:45 +02:00
Makefile Initial Upload 2021-06-04 11:57:28 +02:00
README.md Updates README.md 2021-06-04 16:01:05 +02:00
RF433any.cpp Adds one example and normalizes names 2021-06-04 15:55:01 +02:00
RF433any.h Adds one example and normalizes names 2021-06-04 15:55:01 +02:00
Serial.cpp Initial Upload 2021-06-04 11:57:28 +02:00
Serial.h Initial Upload 2021-06-04 11:57:28 +02:00
library.properties Updates the LICENSE file to match LESSER glp v3 2021-06-04 17:08:45 +02:00
schema.fzz Initial Upload 2021-06-04 11:57:28 +02:00
schema.png Initial Upload 2021-06-04 11:57:28 +02:00

README.md

RF433any

Uses a RF433Mhz component plugged on an Arduino to listen to signals and decode it.

Installation

Download a zip of this repository, then include it from the Arduino IDE.

Schematic

  1. Arduino board. Tested with NANO and UNO.

  2. Radio Frequence 433Mhz RECEIVER like MX-RM-5V.

RF433 RECEIVER data pin must be plugged on a board' digital PIN that can trigger interrupts, that is, D2 or D3.

This RECEIVER PIN is defined at the time a 'Track' object is created. This library does not set it at compile time.

See file schema.fzz (Fritzing format) or schema.png, for a circuit example with receiver plugged on D2.

Usage

See examples/01_output-received-code/01_output-received-code.ino for an example.

See examples/02_output-signal-timings/02_output-signal-timings.ino for another example.

More details

The library assumes one of the following auto-synchronization protocols (tiret for high signal, underscore for low radio signal):

Tri-bit            __-   versus   _--

Tri-bit inverted   -__   versus   --_

Manchester         _-    versus   -_

The decoder tries to be as flexible as possible to decode any protocols, without pre-knowledge about signal timings. To be generic enough, only the relationships between timings is analyzed, to deduct the 'short' and 'long' duration on 'low' and 'high' radio frequence signal value. No pre-defined timing is used.

Most often, 'long' is twice as long as 'short', and the durations on the low signal are the same as on the high signal, but this library doesn't assume it. 'long' are not necessarily twice as long as 'short', and the high signal timings can be totally different from the low signal timings.

The signal can also contain the below:

  • A 'prefix' made of a first succession of 'low, high' durations that don't match short and long durations encountered later. Such a prefix has been seen on FLO/R telecommands, likely, to distinguish between FLO (fixed code) and FLO/R (rolling code).

  • A 'sync' prefix made of a succession of low and high of the same duration. Note such a prefix could be regarded as Manchester encoding of as many '0' bits (when using RF433ANY_CONV0, see below). The library assumes that such a sequence, if seen at the beginning ('short' and 'long' durations are not yet known), corresponds to a synchronization prefix, not to a Manchester encoding of '0' bits.

The signal decoding can be done using two conventions. Switching from one convention to another for the same signal will simply invert bit values.

Bit value depending on convention

Signal shape RF433ANY_CONV0 RF433ANY_CONV1
Tri-bit low short, high long 0 1
Tri-bit low long, high short 1 0
Tri-bit Inverted high short, low long 0 1
Tri-bit Inverted high long, low short 1 0
Manchester low short, high short 0 1
Manchester high short, low short 1 0