Pages: [1]   Go Down
Author Topic: how to establish rf communication btw two arduino boards\  (Read 1949 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

am doing a project on swarm robotics...and i have to establish rf communication btw two robots...board used is arduino uno and communication module is HR-1001.......can anyone tell me how to do it...am tired of experimenting......
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25731
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
.......can anyone tell me how to do it...am tired of experimenting
Now the cynic in me hears "I can't be bothered / my deadline is near, can someone else do my assignment?"

Show us what you've done, and what went wrong.

Quote
and communication module is HR-1001.
You'll have to do better than that:
http://www.google.co.uk/search?sourceid=navclient&hl=en-GB&ie=UTF-8&rlz=1T4ADFA_enGB391GB391&q=HR-1001
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh it's pretty easy. Here's how:
http://tinyurl.com/68u6ull
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i tried wat u hav told....i downloaded virtual wire...added it to library....connected tx and rx of hr-1001 to digital i/o pins 11 and 12 of arduinoand gnd and 5v supply was also connected.......and loaded an example code...still itz not wrking.......wat may b the problem....can anyone help me wid this.....
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not trying to troll or anything but P L E A S E write in proper English, or if you can't (which totally understandable, it's not like you are required to learn English) spell-check what you write before you post...
Things like "wat" "hav" "itz" "wrking" "wid" would have been marked as incorrect.

Anyway back to your problem.
You need to elaborate a bit more on the "It's still not working" part.

Which part is not working? The receiver? The transmitter?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

we connected transmitter and receiver pins at digital output pins 12 and 11..also connected ground and vcc pins...virtual wire library is downloaded..recevier and transmitter codes are loaded....data what is transmitted is not received..is it because hr-1001 is not compatible for this???
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

we connected transmitter and receiver pins at digital output pins 12 and 11..also connected ground and vcc pins...virtual wire library is downloaded..recevier and transmitter codes are loaded....data what is transmitted is not received..is it because hr-1001 is not compatible for this???
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26378
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the part you are using?
http://www.ohglrf.com/upload/2010330191534162_0.pdf

Post a schematic of what you have hooked up, jumpers on the modules, antennas, etc. and your code listing.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks...but i have this manual......it is told that we can use hr-1001 without shorting any pins at a baudrate of 1200 and a frequency of 430mhz...isn't it????so i didnt short any pins of hr-1001 and i directly connected like receiver to transmitter and transmitter to receiver and also vcc and gnd...
this was not working..so i downloaded virtual wire and receiver and transmitter wire to digital pins of arduino..and loaded example codes of transmitter and receiver and i transmitted a word 'hello'..but the other arduino was not receiving....

am just a beginner...please help me....





for receiver



// receiver.pde
//
// Simple example of how to use VirtualWire to receive messages
// Implements a simplex (one-way) receiver with an Rx-B1 module
//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@open.com.au)
// Copyright (C) 2008 Mike McCauley
// $Id: receiver.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $

#include <VirtualWire.h>

void setup()
{
    Serial.begin(1200);   // Debugging only
    Serial.println("setup");

    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);    // Bits per sec

    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, HEX);
       Serial.print(" ");
   }
   Serial.println("");
        digitalWrite(13, false);
    }
}





for transmitter




// transmitter.pde
//
// Simple example of how to use VirtualWire to transmit messages
// Implements a simplex (one-way) transmitter with an TX-C1 module
//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@open.com.au)
// Copyright (C) 2008 Mike McCauley
// $Id: transmitter.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $

#include <VirtualWire.h>

void setup()
{
    Serial.begin(1200);     // Debugging only
    Serial.println("setup");

    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);    // Bits per sec
}

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
    digitalWrite(13, false);
    delay(200);
}



Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26378
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's the problem then:

"use hr-1001 without shorting any pins at a baudrate of 1200"

yet you have VirtualWire set up for a different speed:

vw_setup(2000);    // Bits per sec

They need to be set to agree.

This line
Serial.begin(1200);   // Debugging only
only sets the comms via the USB port to your PC (which uses the serial D0/D1 lines).
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i changed the speed to 1200bits per sec........it is not even transmitting the data.....these are the connections i have done...transmitter of hr-1001 to digital i/o pin 12 of arduino....reciever to pin 11 of arduino...gnd and vcc......the code is same as above.....except that it is 1200bits/sec....an led was connected such that it'll glow when transmission is done....when we loaded the program and arduino was switched on...led was not glowing....
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sir....we done the transmission part...but it is not get receiving by the second robot...??what may be the problem???
we consulted the shop where we boought the components...he done the communication part...and when we tried it with our boards it was not working....
arduino boards are working....
Logged

Pages: [1]   Go Up
Jump to: