1
\$\begingroup\$

I am trying to control a LED using a high-power 433MHz transmitter receiver pair, with transmitter connected to my Arduino Nano.

Here is the transmitter (XLPCF20): http://www.colorapples.com/rf-wireless-transmitter-module-315-or-43392mhz-xlpcf20-p-38493.html

Here is the receiver (CDR 5 B): http://www.amazon.co.uk/433MHZ-115dbm-Wireless-Receiver-CDR-5-B/dp/B00COD96UG

I can send HIGH to a data channel at the transmitter (it has 4 channels) and receive the HIGH input at the same channel at the receiver, successfully lighting up a LED. This is my current test sketch:

void setup(){
  pinMode(8, OUTPUT);
}

void loop(){
  digitalWrite(8, HIGH);
  delay(122); //this is the important line
  digitalWrite(8, LOW);
  delay(100);
}

This works well, however, if I change the 122ms delay at the falling edge to 121ms (or anything below that) I have no output at the receiver. The LED doesn't light at all. It's the same for all channels, there's a sharp change at that very border between 121ms and 122ms (found the exact value by trial and error). At the transmitter/Arduino, the output signal is clear so it's an error with the transmitter or receiver. I've used other, much simpler/cheaper 433MHz transmitter/receiver pairs in the past with no such issue. At the rising edge (second delay call, the one with 100ms), there's another issue when I drop below 13ms. At exactly 12ms, the LED is unstable, it sometimes blinks as expected, but sometimes just lights up. Anything below 12ms, the LED is constantly high, not a single blink.

UPDATE: If I use _delay_ms instead of regular delay, I get about 1ms more room for both edges, but below that, it's still the same.

UPDATE 2: I've tried changing to different output pins on my Nano, both PWM and non-PWM ones. Nothing changes.

What would be the problem?

\$\endgroup\$
  • \$\begingroup\$ Does it exhibit this if you use _delay_ms() instead? \$\endgroup\$ – Ignacio Vazquez-Abrams Aug 21 '14 at 20:58
  • \$\begingroup\$ @IgnacioVazquez-Abrams I get about 1ms more room. Like it's almost stable at 121ms falling and stable at 11ms falling. Go just below that (120ms rising or 10ms falling), the same problem persists again. \$\endgroup\$ – Can Poyrazoğlu Aug 21 '14 at 21:02
  • \$\begingroup\$ It's a bit hard to know for sure without proper datasheets but if the encoder is set for a fairly low rate it might take that long for the tx/rx to lock and for it to the complete sequence of bits so it can be decoded. There's a bit more going on that a simple tx/rx module and many are designed for use as remote controls where that sort of delay is acceptable. \$\endgroup\$ – PeterJ Aug 22 '14 at 3:35
2
\$\begingroup\$

You need a bare transmitter and receiver pair with one channel. Photo is super regenerative receiver. You can use superhetrodyne type for better anti interference. Generally, these works up to a few kHz switching, put Hi in tx and Hi come out at Rx.

enter image description here

The one you got has additional encoder MCU. It read 4 key lines, wait 120ms for key debounce, so shorter input are ignored. It then send a coded message to the receiver where another MCU decode the message and send out hi /lo on 4 channels.

Your module is generally used inside these 4 key remote control (car door opener, etc.) Note more pin, as out1 to out4. The bare is out1 only.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ yes, I've used the simpler tx/rx pairs above without an issue, but their range is much shorter. I've got this one for high range (advertised as 3km range, I know it won't be 3km, but still much higher than a regular pair). is there any way to cancel that 120ms button debounce wait behavior as I won't be using it with buttons anyway? \$\endgroup\$ – Can Poyrazoğlu Aug 22 '14 at 9:58
  • 1
    \$\begingroup\$ Your unit has MCU portion and the bare tx/rx portion on one PCBA. If you can trace the pcb and circuit, you can by passed the MCU part and feed the signal directly into the bare tx/rx on the circuit. OR, you can buy a new high power version of the bare tx and superhet rx. Check local legal restriction on use of high power unit (over 100 to 200 meters are likley restricted in some ways, places and countries) \$\endgroup\$ – EEd Aug 22 '14 at 11:48
  • \$\begingroup\$ thanks, I'll try bypassing the MCU and if I can't, I'll look for a new pair. \$\endgroup\$ – Can Poyrazoğlu Aug 22 '14 at 14:54
  • 1
    \$\begingroup\$ Good you got it working. Just kindly be reminded if you have connect a 173mm wire as antenna for both tx and rx? With 173mm antenna, even the simple module, that you reported as not enough range, should go a few hundred meters, under good environment, open, flat land and direct line of sight. Use low power, low range helps reduce interference to other users who may use the same device. \$\endgroup\$ – EEd Aug 23 '14 at 11:00
  • 1
    \$\begingroup\$ The simple one, with 173mm antenna, solid wire vertical standing up, should give 50 to 200 meters inside typical building on the same floor through typical walls. \$\endgroup\$ – EEd Aug 23 '14 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.