I’ve been working my way through Build a Home Automation System for $100. I was excited when I got to Module 11 – Connecting the Arduino, Unit 1 – Decoding RF Signals to Control Outlets (page 238). I have a remote control outlet set (3 double outlets) that has been gathering dust for a year and some 433MHz RF transmitters and receivers in my parts cabinet.
Unfortunately, looking up the FCC ID: QJXTXTNRC that was printed on the remote indicated that the outlets operate at 315MHz. A pack of 6 315Mhz RF Transmitter and Receivers was available on Amazon.ca so I ordered it up and it arrived just in time for the weekend.
Everything went smooth until the final moment of truth on page 254. No response from the outlet. I checked and double checked everything again. No success.
Setting up a second Arduino with the IR receiver on it I could see that what I was transmitting was not the same as what I told it to do (or what the remote does). The PulseLength read from the remote was 275 microseconds but from the Arduino RF transmitter it was reading 354 microseconds!!!
Decimal: 15040737 (24Bit) Binary: 111001011000000011100001 Tri-State: not applicable PulseLength: 275 microseconds Protocol: 1
Raw data: 8544,816,288,812,288,812,292,256,840,260,840,812,288,264,836,812,288,812,284,264,836,268,832,268,836,264,836,264,836,264,836,268,836,812,288,812,292,812,288,264,836,268,832,268,832,272,828,820,284,
Decimal: 15040742 (24Bit) Binary: 111001011000000011100110 Tri-State: not applicable PulseLength: 354 microseconds Protocol: 1
Raw data: 10996,1012,436,984,448,20,448,280,20,1020,24,132,928,40,952,36,544,336,1128,1016,3000,68,216,688,536,492,1248,1112,1336,48,24,128,116,172,56,244,220,16,56,28,188,216,112,36,32,148,788,1720,76,
I checked the code and there was one and only one line in there with the correct PulseWidth value.
I experimented by subtracting the difference with this change:
The PulseLength read by the receiver was still 354 microsecond. I even tried a setting the PulseLength = 1 and it read as 354.
I used the library rc-switch by sui77 Version 2.6.2. Maybe I’ll try a different version tomorrow.