help with wireless serial between 2 arduinos

hi
i recently purchased a RS232 data radio modem wireless transceiver module by dorji its the DRF4432D20I-043L1
http://www.dorji.com/docs/data/DRF4432D20.pdf
what i tried to do is a basic communication between 2 arduinos via serial
first i connected both arduinos together
tx>rx
rx>tx
and a common ground used a very basic sketch that one arduino prints a a number via serial and the other one receives it and prints it to the serial monitor everything worked just fine
then i disconnected ground cable between them and everything became gibberish as i suspected so wondered if it will somehow still work wirelessly
but all that i managed to get was gibberish
i have check both transceivers settings they are both the same
and both are on 9600 baud
so the question is how do i manage to send valid serial data wirelessly?

then i disconnected ground cable between them and everything became gibberish as i suspected so wondered if it will somehow still work wirelessly

Between what? The two wireless modules? Why would you do so?

On you picture you don't have a power and ground connection between the Arduino and the module? I guess for your tests you did connect them, didn't you?

Please provide a wiring diagram of your current setup and the sketch you're doing your tests with.

sender:

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);

}

void loop()
{
Serial.print(“test”);
delay(2000);

}

reciving arduino:

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);

}

void loop()
{
if (Serial.available())
Serial.write(Serial.read());

}

when i said i disconnected ground i meant from the two arduinos in the test stage when i didn’t use the wireless modules and connected them directly to each other and tested the simple sketch used above
i then wanted to advance to the wireless stage so i connected everything like in this picture below:

when i said i disconnected ground i meant from the two arduinos in the test stage when i didn't use the wireless modules and connected them directly to each other and tested the simple sketch used above

If you connect two devices (being an Arduino or any other device) serially, you always have to connect at least the ground in addition to the RX/TX signals.

i then wanted to advance to the wireless stage so i connected everything like in this picture below:

In this picture there is also no ground connection and I also cannot see a power connection. A ground connection between the Arduino and the module is necessary (to have a common level basis) and you also need power for the modules from anywhere, the Arduino might be the power source, if you take some other source, don't forget to also connect the ground from that source to the common ground of all devices.

Note that both arduinos are conected to different pcs and that gnd and power are connected from arduino to the rf board The problem is that i intend to use both arduinos a far distance away from each other so they cant have a common ground So how is it possible on xbee for instance or other eireless addons?

so they cant have a common ground

That's OK - there just needs to be common ground between Arduino, RF module and (if there is one) the separate power supply to the module. And the same (but separate) for the other set of components.

That is exactly the case this is not my first arduino project And i will have to assume this might be a problem with the rf board i am using and it may not be compatible for some reason Can anyone suggest a different one that has long range capabilities?

Hi Ariel

How have you connected the /EN pin on the modules? Looking at the datasheet, it needs to be connected to GND to put the module in working mode.

Regards

Ray

No en pin used only tx rx gnd and vcc

Hi Ariel

From your photo, the module looks like it is the DRF4432D20I-L1/L2. See attached datasheet.

Looks like in operate mode, CS and SET need to be connected to (or pulled up to) +5V. There might well be pullup resistors on the board, but you could try connecting the pins to +5V just in case.

DRF4432D20I.pdf (240 KB)

Tried it connected both pins on both of rf boards to 5v didnt help

Are there TTL and rs232 versions of the wireless modules? If so you need the TTL version for direct connection to the arduino. Do you have the arduino and the wireless module set to the same baud rate?

Both are set to 9600 baud an i mean arduinos an rf modules And from my understanding i have the rs232 version Is there a differnt rf board that has long range capabilities i should try?

I looked at the data sheet for your RF module and it is TTL output, so it can be directly connected to your arduino. Below is some serial to serial test code you can try just using tx/rx/gnd wires between to arduinos before trying the RF modules. If you can get communication using wires, then try substituting the modules for the wires.

//zoomkat 3-5-12 simple delimited ',' string tx/rx 
//from serial port input (via serial monitor)
//and print result out serial port
//Connect the sending arduino rx pin to the receiving arduino rx pin. 
//Connect the arduino grounds together. 
//What is sent to the tx arduino is received on the rx arduino.
//Open serial monitor on both arduinos to test

String readString;

void setup() {
  Serial.begin(9600);
  Serial.println("serial delimit test 1.0"); // so I can keep track of what is loaded
}

void loop() {

  //expect a string like wer,qwe rty,123 456,hyre kjhg,
  //or like hello world,who are you?,bye!,

  if (Serial.available())  {
    char c = Serial.read();  //gets one byte from serial buffer
    if (c == ',') {
      if (readString.length() >1) {
        Serial.print(readString); //prints string to serial port out
        Serial.println(','); //prints delimiting ","
        //do stuff with the captured readString 
        readString=""; //clears variable for new input
      }
    }  
    else {     
      readString += c; //makes the string readString
    }
  }
}