Page 1 of 1

433MHz and RMT, again...

Posted: Tue Mar 05, 2019 4:42 pm
by u063096
Well, it's me again, I am afraid. The below is a bit lengthy, but I found it necessary. Please bear with me ;)

I am still struggling to get the 433MHz reception stable on the ESP32. While everything seemed to work with a cheap FS1000A sender and the accompanying (equally cheap) green receiver module in a short distance, increasing the range has shown several oddities.

The basic receiver is well known for being bad, so I got me some reportedly better modules: a RXB6, a RXB12 and a SRX882. I even switched the sender to a STX882, that worked slightly better with the cheesy green receiver module.

The results are disappointing, though:
  • The SRX882 seems to receive plainly nothing. I connected the CS pin to Vcc to get it out of sleep mode of course, but still there is only silence on the data pin.
  • The RXB6 and RXB12 modules are behaving similarly: they seem to pick up a lot of noise. I can see the transmitted data coming in (just from the fact that the receiver starts spitting out data), but it is not recognizable any more. This is spiced with occasional "E (805682) rmt: RMT RX BUFFER FULL" messages.
The RMT items I can see from both RXB receivers have in common that very short phase changes seem to be detected. Format is "level0:duration0 level1:duration1" as are received from the RMT:

Code: Select all

1:369 0:13
1:296 0:20
1:296 0:37
1:276 0:15
1:239 0:3
1:62 0:9
1:241 0:11
1:297 0:21
1:41 0:27
1:930 0:38
1:197 0:21
1:33 0:37
whereas the expected pulse lengths are around 250 (one bit) and 500 (two bits) ticks. The cheap receiver clearly shows these:

Code: Select all

1:485 0:505
1:482 0:258
1:237 0:504
1:235 0:261
1:235 0:258
1:238 0:258
1:485 0:256
1:240 0:501
1:486 0:505
1:234 0:262
1:482 0:261
So I thought the filter threshold in the rx_config could be wrong - it is set to 100, assuming the regular bit will have at least double that ticks. The documentation is a bit unclear to me here:
In receive mode, channel 0-7 will ignore input pulse when the pulse width is smaller than threshold. Counted in source clock, not divided counter clock.
What is "source clock", then? The 80MHz? Then the maximum value of 255 for thresh would mean a mere 3ns. But if the clock is that after the clock divider is applied, the 100 should easily suppress the shorter periods as are shown in the example.

What can I do?

Thanks for reading the whole mess :D

Re: 433MHz and RMT, again...

Posted: Tue Mar 05, 2019 5:11 pm
by Deouss
I had very similar oddities. This is all caused by improper switching of the transmitter. RMT sending signal as it should but the transmitter had delays or inaccurate time periods. I figured out this must be related to different transmission voltages.
Most likely transmitter despite specs will only accept full 12V DC as input and it must be very clear low noise power source.
However I didn't manage to test it more with RMT but manually.
Another possibility could be that RMT gets interfered by a transmitter itself and simply malfunctions.

Re: 433MHz and RMT, again...

Posted: Tue Mar 05, 2019 5:15 pm
by u063096
Small addendum: I got the SRX882 to work similarly to the RXB's - not correctly, but at least it is doing something. The clue was to deactivate the internal pullup/pulldown mechanism of the ESP32, as suggested here: https://www.esp32.com/viewtopic.php?t=6346#p27372.

Adding the

Code: Select all

gpio_set_pull_mode(gpio_pin, GPIO_FLOATING);
line solved that.

But still... :?

Re: 433MHz and RMT, again...

Posted: Tue Mar 05, 2019 5:21 pm
by u063096
Thank you for your suggestions.
Deouss wrote:
Tue Mar 05, 2019 5:11 pm
I figured out this must be related to different transmission voltages.
Most likely transmitter despite specs will only accept full 12V DC as input and it must be very clear low noise power source.
...
Another possibility could be that RMT gets interfered by a transmitter itself and simply malfunctions.
The transmitter's voltage is supplied by a step-up converter that generates a steady 3.3V from a battery pack. I verified with a logic analyzer that the sent signal is clear and clean. It does get caught correctly by the cheap receiver anyway, so the problem must lie on the receiver's side.
The second option (another transmitter disturbing the signal) could be possible, since the RXB modules are said to have a better reception. But the signal is transmitted every ~60s, so I would expect a potentially interfering sender to show up in between my expected packets as well. It does not.

Re: 433MHz and RMT, again...

Posted: Tue Mar 05, 2019 5:46 pm
by Deouss
This is a simple transmitter schematic:
Image

So I guess just shorting DATA with VCC will transmit signal.
And it all looks to me like a pulldown control but maybe I am wrong.

Re: 433MHz and RMT, again...

Posted: Tue Mar 05, 2019 8:26 pm
by u063096
Update. Wrote my own item filter now to discard items not valid for my application, based on phase duration. It got a little better, so I will try to refine the filter gradually.

Even if that may work, the RMT filter seems to be pointless g but why?