Troubleshooting RF 433Mhz Receiver / Transmitter

Hi all,

I got a pair of 433Mhz transmitter and receiver but could not get it to work using any of the following library or test methods…

I use an Arduino/Processing serial Oscilloscope and saw the data from the graphs (high and low square digital graphs) from the data pins is quite similar to the output on the antenna.

On the receiver antenna or data pins, I only get graphs with lot of noise with or without the RF transmitter turn on or off…

When I plug the analog pins from the oscilloscope to the receiver data pin, the graph signal dropped to zero…

The Transmitter is on a breadboard with ATMEL328 and the Receiver is an Arduino duemilanove…

Hope someone can give me some RF guidance/advise to troubleshoot or get it working…

Thank you

RF 433Mhz specs and details as below :-

Transmitter :
http://nice-tech.en.alibaba.com/product/298268955-209969137/NT_T02B_RF_transmitter.html

Specifications for the rf transmitter:
Working voltage: 5V[ch8764]12V
Working current: 40mA (at 12V), 9mA(at 5V)
Resonance mode: sound wave resonance (SAW)
Modulation mode: ASK /OOK
Working frequency: 315MHz-433.92MHz, customized frequency is available.
Transmission power: 25mW (315MHz at 12V)
Frequency bandwidth: +150kHz (max)
Velocity: [ch8804]10Kbps
Aerial Length: 24cm (315MHz), 18cm(433.92MHz)

Receiver :
http://nice-tech.en.alibaba.com/product/296907836-209954371/NT_R03C_RF_receiver.html

Specifications for the RF receiver:
Working voltage: 5.0V +0.5V
Working current:[ch8804]4.5mA (5.0VDC)
Working principle: super-regeneration
Modulation method: OOK/ASK
Frequency range: 250MHz-450MHz
Frequency bandwidth: 1MHz (315MHz, having result from testing at lowing the sensitivity 3dBm)
Sensitivity: excel 105dBm (50[ch937])
Velocity: <5Kbps (at 315MHz and -95dBm)
Output signal: TTL electric level signal entire transmission;
Aerial length: 24cm (315MHz, 18cm (433.92MHz)

from the data pins is quite similar to the output on the antenna.

So are you saying that you measured the output from the antenna on an oscilloscope and saw a square wave? You must have a good scope.

If you are not recieving anything on the RX then check it is receiving at the same frequency, there are two frequencies you can get this at. If they are close together (less than 1ft) the antenna should not matter much.
It is a super-regeneration receiver and they are not the most stable of things. They use positive feedback to improve the gain and so are inherently unstable. Therefore depending on the amount of feedback they can be extremely deaf or they can howl and act like a transmitter.
If you still receive nothing then I would suspect the receiver is faulty.

super-regeneration receiver and they are not the most stable of things. They use positive feedback to improve the gain and so are inherently unstable

Care to explain more or how to resolve this ??

I've a 18cm antenna on the TX but nothing at the RX side..

Since the RX receiving frequencies is quite wide ( 250-450Mhz ) , how do I set what frequencies I should receive or tune to ? Is it using another 18cm antenna or some other suggestions ?

I testing with another similar receiver, same results... I do not believe the receiver is faulty...

I tried another method using softwareserial lib from the URL below...

http://dma.ucla.edu/senselab/node/389

When I output to the serial in binary format, I just see a lot of random patterns... with or without pressing the button...

I think the codes assume that it will flood the RX with value 98 ( I have no idea why as it was not explained ) and will print out 99 if the button is pressed...

Any other suggestions or ideas ?

Just to add my thought. And to quote from your linked website:

that the trasmitter needs to be sending data CONSTANTLY or else the receiver will be left hanging and will start reading random junk floating in RF space -- by sending data all the time, just imagine that you're overpowering all the junk. So you'll probably need to decide on a byte of information that actually means "nothing" or "no data now" or "off"

I think this is like old modem ... you need to always send data otherwise it will sleep or disconnect. Not the best analogy, but that is the first thing come to my mind.

So IMHO, you might need to catch this "98" and read useful data. Maybe fixed length or you can send the data length after 98. So some kind of a protocol header.

Hmm... but from your initial post. It does sound like the receiver don't receive any signal at all. Is this the case. On the other hand if you keep receiving 98 on your receiver. This should be good news, i.e. your receiver is working!

I am not expert in RF. I am curious too about how the frequency is set. Hope that bumping this thread will attract more people with RF experience!

:sunglasses:

I notice that the modulation method of the receiver is ASK, that is audio shift keying. That means on the transmit side you need to modulate the data with an audio tone, you seem to be just turning the carrier on and off that is AM (amplitude modulation).
Try setting up a simple oscillator (or use a signal generator) and feeding that into the transmitter and see if you get the audio on the reciever.

ASK, that is audio shift keying

I thought ASK is amplitude shift keying … I m not sure so I look up wikipedia ( hope they are correct )…

Amplitude-shift keying (ASK) is a form of modulation that represents digital data as variations in the amplitude of a carrier wave.

Since the RX receiving frequencies is quite wide ( 250-450Mhz )

This doesn't make sense. Reciever typically operates within a narrow band and both transmitter and reciever are tuned to either 315Mhz or 433MHz. I would focus on finding out if you have a receiver/transmitter pair tuned for the same frequency (check labeling) - if not you need to replace one or both.

I thought ASK is amplitude shift keying

"Amplitude shift" in English is meaningless, only frequencies can shift. Amplitude modulation is called AM - look on any medium wave radio.

Sorry Grumpy_Mike, but Stanley is right.
ASK means amplitude shift keying, not audio shift keying. If latter, it would be limited to the audio range up to 20kHz. There is also frequency shift keying:

And phase shift keying:

That means on the transmit side you need to modulate the data with an audio tone

I don't see anything in the specification to support that modulation in any shape or form is the reponsibility of the micro controller. This is an assumption at best (unless I missed something) and so it's better to keep it simple at first.

  • Check frequencies (Rx/Tx pair must match)
  • Test with a low speed binary signal continuesly (2400 baud is a good start and hex values 0x55 or 0xaa are excellent canditates for testing). After a few bytes (needed for Rx auto tuning), you should see a steady stream of received bytes.

Took back the shop, tested and confirm that the TX/RX pair is correct freq and working fine..

Let me try yr method of sending 0x55 or 0xaa in a loop ...

I tot these RF modules are very simple to operate!!

Yes, these modules does not do any encoding/decoding and leaves it to the micro controller to handle these functions...

I tested the suggested sending 0xAA over softSerial code as below, works fine on direct wire ( can see AA on the LCD screen) but still NOT working over RF module.

I found there a lot of noise (random characters) when connected to the RF 433Mhz Receiver module data pin. Serial output at the bottom…

An unconnected cable from the RX pin at times show some noise of random characters …

Receive pin is Arduino digital pin 2 (pin 4 on atmega328 chip)

Hardware :-

  • Transmitter is Arduino Duemilanove
  • Receiver is Arduino on a breadboard with LCD module

Any other ideas or suggestions to troubleshoot or resolve this RF issue ?

Thanks for reading…

RF TX code :-

#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3

SoftwareSerial rfSerial = SoftwareSerial(rxPin, txPin);
byte outgoingByte = 0xAA;

void setup() {
 pinMode(rxPin, INPUT);
 pinMode(txPin, OUTPUT);
 rfSerial.begin(2400);

}

void loop() {

 rfSerial.print(outgoingByte);
 delay(100);
 
}

RF RX code with LCD display :-

#include <SoftwareSerial.h>
#include <LiquidCrystal.h>

// My wiring for LCD on breadboard
LiquidCrystal lcd(12, 11, 5, 6, 7, 8);

#define rxPin 2
#define txPin 3

byte incomingByte = 0;

SoftwareSerial rfSerial = SoftwareSerial(rxPin, txPin);

void setup() {
  
 // LCD format is Col,Row
 lcd.begin(16,2);
 lcd.clear();
 lcd.setCursor(0,0);
  
 pinMode(rxPin, INPUT);
 pinMode(txPin, OUTPUT);
 rfSerial.begin(2400);
 Serial.begin(2400);
}

void loop() {
 
 incomingByte = rfSerial.read();
 
 lcd.print(incomingByte,HEX);
 lcd.print(" ");
 Serial.println(incomingByte,HEX);
 
}

Serial output :-

FC
8
0
F
0
0
C0
0
0
7E
0
F8
D
F0
F
80
1F
72
80
D
1
F8
1
E0
F
80
F
0
F8
1
E0
F
80
D
0
F8
1
C0
F
80
D
0
F8
1
C0
F
80
D
1
F8
1
C0
F
80
F
1
F8
D
E0
F
80
F
0
F8
9
E0
D
80
D
1
F8
D
E0
D

You said you tried the code here?

Can you post links to the Rx/Tx modules you are using?

The specs are on my first post...

Yes, I tried VirtualWire sample code to send a "Hello" ... direct wire connection it works fine... but not over the RF modules..

I tried with all speed, 300,1200,2400,4800,9600...

I notice even if I OFF the Transmitter, I'm still receiving random characters on the Receiver...

If I assume the pinout is wrong, how to I find out the pinout with a multimeter ??

Here is the picture of the RF module :-

Can you post the code you had when using virtual wire? I have a set of Tx/Rx modules, Virtual wire was very easy to set up.
Virtualwire sends some additional data to get the Tx/Rx synched up, am not sure sending out solo messages.

Could be that 2400 is too fast for these modules also. Virtual wire shows the speed being set at bits per second. If rfserial.begin is attempting 2400 baud, that's like [edit - 11!] times faster.

Another option might be the newsoftserial library

http://arduiniana.org/libraries/newsoftserial/

Check this thread also regarding serial ports & RF.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208374199

Here is the code for VirtualWire using 1200 baud.

Receiver work fine on a “direct connection” when I plug the receiver pin 2 directly to the transmitter pin 3… Got the “hello” text…

Still not working using the RF Module…

Does the delay() in the transmitter loop have anything to so with the speed ?

VirtualWire TX code :-

#include <VirtualWire.h>

void setup()
{
    vw_setup(1200);               // Bits per sec

    vw_set_ptt_inverted(false); // Required for DR3100
    vw_set_tx_pin(3);           // Uses the same pin as SoftSerial
}

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

    delay(100);
    digitalWrite(13, false);
}

VirtualWire RX code :-

#include <VirtualWire.h>

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

    vw_setup(1200);       // Bits per sec

    vw_set_rx_pin(2);   // RX pin is 2
    vw_set_tx_pin(3);   // RX pin is 3, no used
    vw_set_ptt_inverted(false); // Required for DR3100, not used
    vw_set_ptt_pin(4);  // Move the ptt pins to 4, not used
    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]);
          Serial.print(" ");
      }
      Serial.println("");
        digitalWrite(13, false);
    }
}

Read the virtual wire document a little closer

vw_setup(1200); // Bits per sec

You do not have this in the correct place. Sequence is important apparently.

http://www.open.com.au/mikem/arduino/VirtualWire.pdf, section 4.5

Comment out the Not used lines also regarding DR1300 & PTT if you are not using those features.

I don't think the delay has anything to do with speed, just prevents the next message from starting too soon. I use delay(50) in mine.

Thanks for yr suggestions and pointing that out... corrected the error...but still could not get it working.. :-/

When using the SoftSerial lib, I notice I'm receiving lots of noise at the Receiver even when the Transmitter is not powered up... Tried on other location but still the same results..

Can't see anything with the VirtualWire or do any debugging...

Found the problem.. I did not have a 18cm antenna at both the TX & RX.. after I installed the 18cm antenna at both sides.. I can get the message over RF but the range was very very near... like less than 10cm...

Any idea how to increase the range or use a bigger/stronger antenna ?