433mhz noise?

Hello,

Is this 433Mhz noise?
LINK: Full Size IMG

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

RH_ASK driver;
int integer;
char Sensor1CharMsg[4];

void setup()
{
    Serial.begin(9600);    // Debugging only
    if (!driver.init())
         Serial.println("init failed");
}

void loop()
{ 
    for(integer = 0; integer < 1000; integer++){
    sprintf(Sensor1CharMsg, "%d", integer);
    driver.send((byte*)Sensor1CharMsg, strlen(Sensor1CharMsg));
    driver.waitPacketSent();
    delay(1000);
    }
}

I have wire - antenna for trasmitter and reciever. No matter 10mm or 100cm, signal is the same.

Thanks!

char Sensor1CharMsg[4];

and later you say

    sprintf(Sensor1CharMsg, "%d", integer);

Are you sure it will fit? You can fit a maximum of 3 characters in that.

Not actually used but needed to compile

Rubbish comment. If is is not used then you don't need it. If you do need it is used, maybe not specifically by your code but a library.

Why have you only shown the code for one end of the link?

Is this 433Mhz noise?

For troubleshooting, you can separate radio issues from code issues by connecting the TX pin of the sender to the RX pin of the receiver with a jumper, rather than taking them to/from the RF modules.

I would have thought radio head would be smart enough to deal with random noise... I'm not familiar with it's protocol though.

A 433mhz RF ASK/OOK receiver's output pin will typically transition randomly in the absence of a signal, because of the automatic gain control - if there's no signal, it will crank the gain up until there is one ;-) If you are using a SYN470-based receiver, you can connect a 5-10 meg resistor between VDDRF and CTH pins per datasheet, which will squelch this noise - but usually the receiving software is smart enough to ignore it and you wouldn't have to do that.

Thanks for help!!!

I have cheap 433mhz (http://www.ebay.co.uk/itm/Cheapdeal-RF-433mhz-transmitter-reciever-set-for-arduino-/201412846738?hash=item2ee5242492).

Reciever code:

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

RH_ASK driver;

void setup()
{
    Serial.begin(9600);  // Debugging only
    if (!driver.init())
         Serial.println("init failed");
}

void loop()
{
    uint8_t buf[12];
    uint8_t buflen = sizeof(buf);
    if (driver.recv(buf, &buflen)) // Non-blocking
    {
      int i;
      // Message with a good checksum received, dump it.
      Serial.print("Message: ");
      Serial.println((char*)buf);         
    }
}

Correct if my code isn’t correct!

You sure this is right?

if (driver.recv(buf, &buflen))

Should it not be simply

if (driver.recv(buf, buflen))

Can you post a link to that RH_ASK.h file please.

void loop()
{
    uint8_t buf[12];
    uint8_t buflen = sizeof(buf);
    if (driver.recv(buf, &buflen)) // Non-blocking
    {
      int i;
      // Message with a good checksum received, dump it.
      Serial.print("Message: ");
      Serial.println((char*)buf);         
    }
}

With buf[12] in loop() it needs to be explicitly initialized. By default, regular arrays of local scope (for example, those declared within a function) are left uninitialized. This means that none of its elements are set to any particular value; their contents are undetermined at the point the array is declared. I'm not certain if the memory location is the same each pass through the loop.

uint8_t buf[12] ={0};