Module RF 433MHz

Hello, I bought 2 cheap module in order to send data between 2 arduino!
Arduino1 (TX) have temp sensor, Arduino2 (RX) have lcd display.
When I try to send simple number or letter form 1 to 2, they arrive great at 1, 2 meters, when I exceed this range the communication stopped!
Anyone know some methods to improve range to 10 meters without obstacle in the middle?
I already make the antenna but nothing change!
Thanks to all of you!

Use VirtualWire and 17 cm antennas on both TX and RX. You should easily get 50 meters.

I get 300 meters range with balanced dipole antennas (connected to ANT and GND):

|500x298

Hello Triko93, Should you show me the code that you are using with your RF 433MHz module? I have another problem with the same module and your code will maybe solve it.

Thank you to post ('share') your code to the forum.

I'm using these 915 Mhz and easily get 500 meters and around a large 3 story building.

http://www.getfpv.com/holybro-500mw-fpv-transceiver-telemetry-radio-set-v2-915mhz.html

Hello Triko,

I’m using a simple straight wire approx. 16.8cm as antennas on both 433MHz receiver and sender (see attached). I’ve stable communication using RCSwitch library (at least) over 8m and through 3 stone walls. Btw. operating power does have quite some impact. My receiver is running on 3.3V and my sender on 5V. But I tested supplying up to 10V to the sender which increased the range significantly.

Best!

jremington: Use VirtualWire and 17 cm antennas on both TX and RX. You should easily get 50 meters.

I get 300 meters range with balanced dipole antennas (connected to ANT and GND):

|500x298

Hey, Im using right now VirtualWire and 17cm antenna with 0,8mm diameter, but no way!

terraduino: Hello Triko,

I'm using a simple straight wire approx. 16.8cm as antennas on both 433MHz receiver and sender (see attached). I've stable communication using RCSwitch library (at least) over 8m and through 3 stone walls. Btw. operating power does have quite some impact. My receiver is running on 3.3V and my sender on 5V. But I tested supplying up to 10V to the sender which increased the range significantly.

Best!

Incredible, I will try this way and library too! Thank you

Leuvennhan:
Hello Triko93,
Should you show me the code that you are using with your RF 433MHz module? I have another problem with the same module and your code will maybe solve it.

Thank you to post (‘share’) your code to the forum.

Yeah sure, no problem

RX.txt (1.43 KB)

TX.txt (940 Bytes)

Although many users have successfully used those simple/cheap OOK modules for reasonable distances, some hardware simply does not work properly, specially the receiver which has very small sensibility.

The main problem IMO is that all look the same, so you might have success on the first batch but the next ones you get from eBay won't work the same.

If you're worried with reliability better get an OOK module, specially the receiver, from a good supplier (like RFM83) or stick with some more advanced FSK modules like the RFM69 for sub-GHz or nRf24l01 for 2.4GHz. Those are proper digital modules with advanced features.

Run the receiver off 5 V. They wont work properly off 3.3 V.

All,

I'm actually having the exact same issue, except that I was not even able to transmit a single letter or number at any distance.

I'm using a set of cheap 433MHz transmitter and receiver (OOK/ASK) so I'm not expecting much as this is only an experiment. I have made all my tests at 3.3V and also 5V to eliminate any possible glitch due to Vcc.

As a first troubleshooting step, in order to confirm that my wiring was ok and if the transmitter was at least transmitting and that the receiver was also at least receiving. I have been monitoring the receiver from an analog input and I can see that when the transmitter is working the analog input on the receiver end will show a raw value (around 450 at 3.3V or 750 at 5V) through a Serial.print.

As a second troubleshooting step, I did the same thing by removing my receiver code and simply monitor the status of the data pin on the receiver. Again, I can clearly see that I get data there (1 and 0 alternating according to what the transmitter is doing)

Now, from that point, I have been trying a lot of available communication libraries (Manchester, RadioHead, VirtualWire) with their smallest bare code example without any luck. I even tried Triko93 code as they were very simple basic VirtualWire programs and it is not working.

Also, just to remove any possible issue due to the ancillary hardware, I did all my test by using a Mega for the receiver and a Uno as the transmitter. I also used a Nano as the transmitter. Finally, I inverted the roles, having the Mega doing the transmitting and the Uno doing the receiving.

I also bought 3 sets of these cheap transmitter/receiver so I tried them all just to make sure that it was not a bad unit.

Anything else that I can try or I have to resign myself to move to something else? I don't want to achieve performance or greatness here but I would like to simply prove that it can work before I move to something else.

I can post some code here if you want but I essentially used the same thing as Triko93 used and also most of the simple examples posted in all the libraries that I used so that I'm not intertwining the basic communication code with the rest of my future code that is not essential for the moment.

Note: My final goal is to transfer a sensor value with a timestamp.

Best regards, Guy

I also bought 3 sets of these cheap transmitter/receiver so I tried them all just to make sure that it was not a bad unit.

Either they are all bad, or you are doing something else wrong.

  1. Do NOT use 3.3V, use 5V to power both the transmitter and receiver.

  2. Use 17 cm of straight wire as an antenna on TX and RX.

  3. Post your code, using code tags. I suggest the simplest VirtualWire example, unmodified and wired correctly.

  4. Post a clear picture of your wiring (hand drawn sketch, NOT Fritzing).

Here’s my hand drawn sketch… sorry it’s not very nice.

And here’s the transmitter code:

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);    // Debugging only
    Serial.println("setup");

    pinMode(4,OUTPUT);
    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);  // Bits per sec
    vw_set_tx_pin(4);
}

void loop()
{
    const char *msg = "hello";

    digitalWrite(13, true); // Flash a light to show transmitting
    vw_send((uint8_t *)msg, strlen(msg));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
    Serial.println("Message Sent");
    delay(1000);
}

And here’s the receiver code:

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);  // Debugging only
    Serial.println("setup");

    pinMode(5,INPUT);
    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);  // Bits per sec
    vw_set_rx_pin(5);
    vw_rx_start();       // Start the receiver PLL running
}

void loop()
{    
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
      int i;

      digitalWrite(13, true); // Flash a light to show received good message
      // Message with a good checksum received, dump it.
      Serial.print("Got: ");
  
      for (i = 0; i < buflen; i++)
      {
          Serial.print(buf[i], HEX);
          Serial.print(" ");
      }
      Serial.println("");
      delay(500);
      digitalWrite(13, false);
      delay(500);
    }
    else
    {
      Serial.println("No message received");
      digitalWrite(13, true);
      delay(1000);
      digitalWrite(13, false);  
      delay(1000);
    }
}

Thanks for your help!

There is essentially zero chance to receive anything when (1) a message is sent only once per second and (2) almost all of the receiver time is spent printing “No message received” and then delaying for two seconds.

Get rid of all the extra crap and try this:

#include <VirtualWire.h>

void setup()
{
  Serial.begin(9600);  // Debugging only
  Serial.println("setup");

  pinMode(5, INPUT);
  // Initialise the IO and ISR
  vw_setup(2000);  // Bits per sec
  vw_set_rx_pin(5);
  vw_rx_start();       // Start the receiver PLL running
}

void loop()
{
  uint8_t buf[VW_MAX_MESSAGE_LEN];
  uint8_t buflen = VW_MAX_MESSAGE_LEN;

  if (vw_get_message(buf, &buflen)) // Non-blocking
  {
    int i;
    // Message with a good checksum received, dump it.
    Serial.print("Got: ");

    for (i = 0; i < buflen; i++)
    {
      Serial.print(buf[i], HEX);
      Serial.print(" ");
    }
    }
}

Better yet, start with a WORKING EXAMPLE and follow the directions exactly: VirtualWire: VirtualWire library for Arduino and other boards

Test your connection with wires, then add the radios as directed.

Thanks jremington,

You are right, this is a testing step I should have done. I wired the two Arduino together and the code is working perfectly. I can receive the message from the transmitter Arduino to the receiver Arduino (through wired connection) proving that the code is working.

I will continue to work on the wireless aspect of it now.

I have tried to check the voltage on the data pin on the receiver and I don't see much more than 2mV while it's running. That seems very low. Maybe I'm not testing it properly (data pin to ground pin).

musskopf: Although many users have successfully used those simple/cheap OOK modules for reasonable distances, some hardware simply does not work properly, specially the receiver which has very small sensibility.

The main problem IMO is that all look the same, so you might have success on the first batch but the next ones you get from eBay won't work the same.

If you're worried with reliability better get an OOK module, specially the receiver, from a good supplier (like RFM83) or stick with some more advanced FSK modules like the RFM69 for sub-GHz or nRf24l01 for 2.4GHz. Those are proper digital modules with advanced features.

Hi, what is OOK? Yeah maybe, infact I already order a new pair different, I let you all notice! Meanwhile Im trying to work properly this 2 little evil!

OOK = On/Off Keying, which is what you are doing.

The data pin is high (5V) only when a "1" is being sent, which is for just a fraction of a millisecond during a transmission. You need an oscilloscope to see it.

If it works with wires, but no combination of radio modules, then some or all of the modules are nonfunctional.

Perhaps at some point you connected the power supply to the wrong pins, or backwards.

Can you show me the wires / schematic to have 2 Unos talk to each other with wires as mentioned above? Thank you.

SamBrownADK: Can you show me the wires / schematic to have 2 Unos talk to each other with wires as mentioned above? Thank you.

Just go back to my previous comment above and look at the hand sketch that I posted. Remove the transmitter and receiver from there and just wire the digital output pin (4) from Uno1 that was used from transmitting to the digital input pin (5) on Uno2 that was used for receiving. That's it. Just use the code that I posted also to test it and they will talk to each other.

Thank you!!! It works :-)