Can't establish connection on my 433 MHz kit

Hello I am trying to attempt a classic starting tutorial for 433 Mhz transmitter receiver kit, but i cant establish connection, at least nothing happens at the monitor.
I tried more than one pair of kits ( transmitter - receiver ) , I checked the pins and the connection , still can’t find what the problem is, hope someone can help me.

Transmitter: Arduino Duemilanove
Receiver: Arduino Nano(Old Bootloader)
433 MHz kit Datasheet :http://www.mantech.co.za/Datasheets/Products/433Mhz_RF-TX&RX.pdf

Schematics:
Transmitter:

Receiver:

Transmitter

#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile

#define GND 3
#define VCC 5

RH_ASK driver(2000,8,2);// Receive on 8 (Don't use) Transmit on 2 (Transmitting Data)

void setup()
{
  pinMode(VCC,OUTPUT);
  pinMode(GND,OUTPUT);
  digitalWrite(VCC,HIGH);
  digitalWrite(GND,LOW);

#ifdef RH_HAVE_SERIAL

    Serial.begin(9600);    // Debugging only
#endif
    if (!driver.init())
#ifdef RH_HAVE_SERIAL
         Serial.println("init failed");
#else
  ;
#endif
}

void loop()
{
   const char *msg = "hello";
   driver.send((uint8_t *)msg, sizeof(msg));
   driver.waitPacketSent();
   delay(200);
}

Receiver

#include <RH_ASK.h>
#include <SPI.h> // Not actualy used but needed to compile
#define VCC 5
#define GND 2

RH_ASK driver(2000,3,8); //Transmit on 8 (Don't use) Receive on 3

void setup()
{
  pinMode(VCC,OUTPUT);
  pinMode(GND,OUTPUT);
  digitalWrite(VCC,HIGH);
  digitalWrite(GND,LOW);

#ifdef RH_HAVE_SERIAL
    Serial.begin(9600);    // Debugging only
#endif
    if (!driver.init())
#ifdef RH_HAVE_SERIAL
         Serial.println("init failed");
#else
  ;
#endif
}

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

    if (driver.recv(buf, &buflen)) // Non-blocking
    {
  int i;

  // Message with a good checksum received, dump it.
  driver.printBuffer("Got:", buf, buflen);
    }
}

The "How to use this forum" post gives tips on how to successfully request help.

Please read and follow the instructions to revise your original post accordingly.

You appear to have transmitter and receiver very close to each other - that will probably overload the receiver and make it appear to be completely deaf. Try testing such modules at least 1m apart to ensure this doesn't happen.

Please read and follow the instructions to revise your original post accordingly.

i.e. post the code you are using (remember to enclose in code tabs)

The problem is always in one of two places(or both); the hardware or the software.
You need to post both for people to help you.

You need to attach antennas to the radios. :wink: But yes, when you do, they will need to be further apart.

Hello and thanks a lot for the answers, at the time it's difficult for me to have the components at distance because i have only one breadboard, at all my cables are male-male type. I tried a decoding tutorial with only my receiver and it received some signals ( don't know from whom, probably from common devices using 433 MHz signals) so it's working properly.

aarg:
You need to attach antennas to the radios. :wink: But yes, when you do, they will need to be further apart.

Is using antennas necessary on both components or it depends from module to module, so i have to manually test it.

Separate them as much as you can and don't add antennas at close range, that will increase any overload. These frequencies can transmit serious distance line of sight with antennas, but they aren't very sophisticated.

An RF sniffer is useful for checking the transmit side is working, worth getting that sorted before playing with
the receiver. Something like this Lab3 - Laboratory for Experimental Computer Science
or a simple diode detector circuit.

Yes, both transmitter and receiver should have an antenna. I sometimes solder a pin to the antenna pad, then I can push on a female Dupont jumper wire as my antenna. It makes it easily removable and not liable to break off with handling.

If you give them both antennas and they are in the same breadboard, nothing will work, you may even reset the Arduino too from RF interference. No radio module can stand having another one shouting directly into its ear like this, unless it has a programmable front-end attenuator.

I attached antennas ( the most simple one, cable without any spiral part) on both components, also found a way to have them at a proper distance , and finally there is life on my Serial Monitor.

Thanks a lot for your help , I have one more question though. There is some latency that is fatal for my final project and also it has a variety of values ( ~ 600 ms - 3 secs ).

To be more specific I want to send a signal from a sound sensor to some led lamps and force them to react on that sound, so 3 seconds might be a problem.

How can I minimize the latency , from both hardware / software point of view ?
e.g. better antenna techniques , another library etc

Thanks again for all your help

3 second latency? You have a software flaw. It can’t be in the library, I’ve used it successfully. Latency should be in milliseconds. Are you still using the same code as in your first post?

aarg:
3 second latency? You have a software flaw. It can’t be in the library, I’ve used it successfully. Latency should be in milliseconds. Are you still using the same code as in your first post?

Yes I am using the same code, I noticed that it depends on the distance of the components but I captured that latency at approx. 80-90 cm, not that far at all.

I attached a photo of the components and their antennas.

How can you measure latency with that code? It just transmits the same "hello" over and over. You wouldn't know the latest message from the previous. What test are you doing to measure latency, specifically? Aren't you just missing packets, instead?

Your image:

aarg:
How can you measure latency with that code? It just transmits the same "hello" over and over. You wouldn't know the latest message from the previous. What test are you doing to measure latency, specifically? Aren't you just missing packets, instead?

Your image:

Well I thought of that by noticing the monitor, but now that you pointed missing packets, yeah I think I came to the conclusion too fast. My apologies.

If you want help with improving the range and/or reliability of the system, you have to give us much more information - distances, obstacles, what board(s) you're connected to (because they can generate interference that can desensitize the receiver), photos of things connected up, not just unplugged and lying on the table.

dm1998:
How can I minimize the latency , from both hardware / software point of view ?
e.g. better antenna techniques , another library etc

Thanks again for all your help

The latency is likely entirely down to the low baud rate and the value of RH_ASK_MAX_MESSAGE_LEN

No, the value of RH_ASK_MAX_MESSAGE_LEN is only an upper limit. It does not determine message size. It is true that you can use up to 4000 bps, but that is on the edge of reliability. If you are having reception trouble, increasing the baud rate is only going to make things worse.

Transmitter's board is Arduino Nano /w old bootloader
Receiver's board is Arduino Duemilanove ATmega328p

There are no obstacles between them , also I had to change the antennas and now that they are shorter the problem is really worse, if that can help.

At the moment they work fine at 10 cm distance and both antennas also have approx. the same size of 10 cm .

Also i updated the codes just to set up the VCC and GND

aarg:
No, the value of RH_ASK_MAX_MESSAGE_LEN is only an upper limit. It does not determine message size. It is true that you can use up to 4000 bps, but that is on the edge of reliability. If you are having reception trouble, increasing the baud rate is only going to make things worse.

That's what's used explicitly for the recv call, so I am pretty sure it will wait till the buffer is full before returning,
should a corrupt packet be detected with a rogue length. And then fail the checksum and then retry....

If the buffer length passed to recv is shorter it may filter out bad-length packets more effectively?

dm1998:
There are no obstacles between them , also I had to change the antennas and now that they are shorter the problem is really worse, if that can help.

The transmit antenna needs to be matched, ie 1/4 wavelength.

Try removing the receiver antenna, its probably overloading as I've repeatedly said.

At the moment they work fine at 10 cm distance and both antennas also have approx. the same size .

Also i updated the codes just to set up the VCC and GND