Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
livebox:universalrfrx [2013/06/17 07:01] – [The receiver] brett | livebox:universalrfrx [2014/01/18 10:45] – [Universal RF Rx] minerva9 | ||
---|---|---|---|
Line 5: | Line 5: | ||
{{: | {{: | ||
+ | With the virtual serial port mode this makes it possible to combine the HAHCentral sketch with the RFRX receiver code module. | ||
+ | |||
+ | It would also allow you to combine say the RFGateway sketch using the Nanode hardware with the RF hardware and have the xap-serial message being dumped directly onto the Ethernet. | ||
===== The receiver ===== | ===== The receiver ===== | ||
The hardware to slurp and detect what looks like a valid RF signal from all the background noise. | The hardware to slurp and detect what looks like a valid RF signal from all the background noise. | ||
- | The beautiful part of this design is the separation of the signal gatherer from the decoder. | + | The source: http:// |
- | Here is a pulse train that meet this condition. | + | < |
- | {{: | + | The beautiful part of this design is the separation of the signal gatherer from the decoder. |
- | This serial output | + | Here is a pulse train that meets this condition. |
- | Output from the receiver hardware that represents the repeating | + | {{: |
+ | |||
+ | The first block would be stored and when the 2nd block is encountered it's compared to the 1st, as they match it would then be emitted as a sequence of pulse durations, -ve for LO and +ve for HI, down the serial port to a decoder. | ||
+ | |||
+ | Sample output. | ||
< | < | ||
-11248, | -11248, | ||
-1072, | -1072, | ||
- | -1088, | + | -1088, |
-1072, | -1072, | ||
</ | </ | ||
+ | |||
+ | This pulse sequence can be visualized using a helper: | ||
+ | * http:// | ||
+ | and if all has gone well it should look like the picture we captured using our Logic Analyzer directly attached to the RF receiver pin. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | We then take this pulse sequence and use some magic to convert it into a URF string using this web page | ||
+ | * http:// | ||
+ | |||
+ | If you are going to use this to transmit you'll need to adjust the **burstcount** which using the HTML form above will always default to 1. The signal analyzer won't detect how many times this pattern repeats. | ||
+ | |||
+ | This gives us the following packed URF hex string: | ||
+ | < | ||
+ | 0101017E0434046001600A01271018401014 | ||
+ | </ | ||
+ | |||
+ | This is used by the Decoder explained in the next section. | ||
+ | |||
===== The decoder ===== | ===== The decoder ===== | ||
The signal processor to match a signal against a list of pre-configured patterns. | The signal processor to match a signal against a list of pre-configured patterns. | ||
+ | Using the web page we enter the ON and OFF signal we want to watch for. If there is only a single RF pattern, i.e. it's a toggle for ON followed by OFF, only supply a single RF pattern, don't repeat it in the ON and OFF fields. Just ON will do. | ||
+ | {{: | ||
+ | |||
+ | The / | ||
+ | |||
+ | < | ||
+ | [urfrx] | ||
+ | devices=1 | ||
+ | rf1.label=RF 1 | ||
+ | rf1.off=0101017E0434046001600A01271018401014 | ||
+ | rf1.on=010201820436046A015601700436045001700101271018100001820339 | ||
+ | enable=1 | ||
+ | serialport=/ | ||
+ | vserial=1 | ||
+ | </ | ||
+ | |||
+ | * vserial - Virtual Serial port (1) or Directly connected hardware (0) | ||
+ | * enable - Start this service automatically | ||
+ | |||
+ | Each RF< | ||
+ | |||
+ | A sample event when a signal comes in that matches the rf1.on pattern. | ||
+ | < | ||
+ | xap-header | ||
+ | { | ||
+ | v=12 | ||
+ | hop=1 | ||
+ | uid=FF00EE02 | ||
+ | class=xAPBSC.event | ||
+ | source=dbzoo.livebox.urfrx: | ||
+ | } | ||
+ | input.state | ||
+ | { | ||
+ | state=on | ||
+ | } | ||
+ | </ |