RF Tx/Rx units - any fault finding advice?

Hi,

Background - I've just a pair of low cost RF Transmitter & Receiver (http://www.sparkfun.com/commerce/product_info.php?products_id=8946, and http://www.sparkfun.com/commerce/product_info.php?products_id=8950

Issue - I've set them up for the test program (see code below), however I'm not seeing any response from the receiving Arduino. I note that when I put a multimeter on the transmitter the +ve voltage on VCC is OK, and when I look at teh DATA line I see it stays at around VCC voltage but the needle moves a little every second, so it seems as if it getting the transmit signal ok. I don't have antenna wires on them, but they are only a few centimeters apart so this should be ok no?

Question - Any advice on how to trouble shoot in this situation? I only order one of each of the units.

Transmitter Code

/* * Simple Transmitter Code 
* (TX out of Arduino is Digital Pin 1) 
* (RX into Arduino is Digital Pin 0) */

byte counter;

void setup(){ 
      //2400 baud for the 434 model 
        //Serial.println("setup");
      Serial.begin(4800); 
      counter = 0;
} 

void loop(){
      //send out to transmitter 
        digitalWrite(13, HIGH); // Flash a light to show transmitting
      Serial.print(counter); 
      counter++;
        delay(50);
        digitalWrite(13, LOW);
      delay(1000);
}

Receiver Code

/* * Simple Receiver Code 
* (TX out of Arduino is Digital Pin 1) 
* (RX into Arduino is Digital Pin 0) */

int incomingByte = 0;

void setup() { 
  //2400 baud for the 434 model
  Serial.begin(4800);
  //Serial.println("setup");
} 

void loop(){
      // read in values, debug to computer 
      if (Serial.available() > 0) {
                digitalWrite(13, HIGH); // Flash a light to show receiving
            incomingByte = Serial.read(); 
            Serial.println(incomingByte, DEC);
                digitalWrite(13, LOW);
      } 
      incomingByte = 0; 
}

thanks

I'd advise strongly against running the transmitter with no antenna! I dont know about the bits your using, but in general the antenna forms part of the transmission system, not just an amplifier on it. In fact, with larger units the transmitter can burn it's self out trying to resonate a non-existant ariel (Found this out the hard way). With such a small system this is unlikely, but worth noting.

Beyond that, go with Richard's advice.

thanks - I'll try this tonight hopefully.

by the way - there is a mention of "tuning" these devices in one of the links of the SparkFun site, but I'm assuming for normal usage this is not something I'd have to do? or could be cause of things not working?

Counters for Debugging
I found, when experiencing weird results with the pair, to implement a counter
in my transmitter code as shown in the above examples. The benefit of this, is it
gives you a pattern you can follow visually, whereas an analog input or a
combination of bits may be harder to troubleshoot. Especially when tuning the
lower quality devices with a small screwdriver, its nice to be able to see a
pattern of numbers scroll past in the serial window. Once you have successfully
tuned the units and examined the data flow and protocol you want to send
from device to device, remove the debugging serial-to-computer commands
and you're ready to build up the code from there. (note: In most occasions, I
don't recommend tuning the devices, as they are generally tuned when shipped, but
you may need to do so for one reason or another)

Then I tried the no-Arduino test. Just applied (based on a button push) either 0V or 5V to the transmitter input. However at the receiver I don't see any change when I push the transmitter button. The receiver data pin just shows a constant 2V (where VCC = 4V for the receive). Does this imply do you think one of the devices is faulty? I'm assuming on the receiver that where it's got multiple 5V, GND pins etc, that I only have to connect one correct? (i.e. I don't have to hook up 5V inputs to the two +5V pins of the receiver)

Just tried removing delays, sending the "U" constantly, and setting to 600 baud rate (Serial.begin(600);) - but still can't receive anything.

EDIT - Actually I just connected an LED on the receiver directly from GND to DATA. I also took the LED out and just measured voltage on the receiving DATA pin and it sits at VCC (=4V) and doesn't change when I push the button on transmitter to toggle input voltage on it's data line.

... measured voltage on the receiving DATA pin and it sits at VCC (=4V

The receiver is specified with a minimum operating voltage of 4.5 - so you may want to step it up a bit (from 4V) for your trials.

umm... I'm using the Arduino Pro 328 - 5V/16MHz http://www.littlebirdelectronics.com/products/Arduino-Pro-328-%252d-5V%7B47%7D16MHz.html

It says on the web site it's a 5V Arduino, however I'm only seeing 4V at the VCC terminal? However it is just plugged into the USB port on my Mac....perhaps I need to get the power adaptor before it will produce 5V?

it is just plugged into the USB port on my Mac...

Then power (Vcc) should come directly from your Mac USB port. Try to measure voltage output from the FTDI breakout board without the Arduino connected. If it's still reading 4V you have an issue either with the USB port or the FTDI board (that is if your meter is correct).

Update: I'm still not able to receive serial data on the receiver HOWEVER I have managed to prove to myself that the receiver is receiving something from the transmitter.

When I connect an LED to the DATA pin of the transmitter and the other end to earth, I see the LED flickering, fairly soft (never hard on). I can adjust the timing of the transmitter with the delay() (i.e. put it back in for a bit) and I can see that the flickering on this LED on the receiver matches the timing of when the transmitter is sending.

When I connect the DATA pin up to PIN 0 of the receiver Arduino board however I note that: (a) I still get no output in the Arduino serial monitor, i.e. when I click on "serial monitor", nor see the pin 13 on board LED flash (b) I also not that the LED in the chain (Rx_Data_Pin => LED & Arduino Rx Pin 0) that the LED go full on with no flickering when I connect the Rx_Data_Pin to the Arduino Rx Pin 0 too? Is this an issue? Should the LED effectively from the Arduino Rx Pin 0 to GND still not keep flickering just as it was?

Any other ideas? Should I try bringing the RF Rx receiver signal into a normal Arduino input pin and monitor for a change in this and flash a LED if it changes, just to prove the RF Rx is picking up true on/off signals? (as opposed to just letting the RF Rx output com into the Arduino pin 0 Rx)

thanks

PS Receiver code again is:

int incomingByte = 0;

void setup() { 
  Serial.begin(600);
} 

void loop(){
      if (Serial.available() > 0) {
                digitalWrite(13, HIGH); // Flash a light to show receiving
            incomingByte = Serial.read(); 
            Serial.println(incomingByte, DEC);
                digitalWrite(13, LOW);
      } 
      incomingByte = 0; 
}

Transmitter

byte counter;

void setup(){ 
      //2400 baud for the 434 model 
        //Serial.println("setup");
      Serial.begin(600); 
      counter = 0;
} 

void loop(){
      //send out to transmitter 
        digitalWrite(13, HIGH); // Flash a light to show transmitting
        Serial.print("U"); 
      counter++;
        digitalWrite(13, LOW);
      //delay(10);
}

PS I've been leaving my USB connections (two, one for each arduino) from my Macbook USB ports connected during testing. Is this ok? Doesn't pose any issues with my attempted use of the pin 1 and pin 0 serial communications?

Good call - I'll go through this process first

update:

  • Ardurino's alone - So when I connect the PIN1 TX output from board one to the PIN0 RX input of board two directly the serial communications works like a charm, no problems.

  • RF Units Alone - When I apply to the RF transmitter DATA pin: (a) 5V - the RF receiver data pin goes to 0V (b) 0V - receive output jumps around a bit in the range of around 0.5V ?? (doesn't seem good)

Any ideas why this would be? A faulty receiver?

thanks

(oh, I've realised too I've put this detail in another post - this post was the appropriate place for it I think)

Voltages are ok. I have some 20cm or sonof wire connected toneach as an antenna, but not sure what u mean exactly re specified antenna? Oh and for testing they are sitting about 10cm apart, Sonia this an issue potentially?

good points :)

  • So VCC voltages on my RF Tx and Rx are 5V which is in specs
  • I've trimmed the antenna's down to 17cm per the data sheet
  • I've got them just over 1 meter apart for testing => Still no difference however? It has me stumped.

Is the behaviour supposed to be that the RF Rx DATA pin matches that of the RF Tx DATA pin. So if input is 0V the output is supported to be 0V, and if input is 5V the output (i.e. RF Tx DATA pin) should be 5V?

PS. I have some more of these units too on order in fact so I can do a comparison :)

Good news - I got my extra transmitters and receivers. I substituted these in and now things are working. I'm sending "85" repeatedly and I'm picking this up at the receiver via RF.

One curious thing, I note that when I close then restart the serial monitor on the receive side the display jumps from getting incoming "858585858585..." to "58ª ªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂªÂ...".

Any ideas why this would be? One of of correcting it seems to be to set the serial monitor to another baud rate, then back to the correct one. This may not fix it the first time but within a few toggles the readout goes back to showing "85858585858585...".

thanks