Pages: [1] 2 3   Go Down
Author Topic: RF Communication  (Read 4097 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I have two Arduino Boards with me. I need to do some kind of wireless communication between them. I have a TWS-434/RWS-434 RF module. I need to transmit a  matrix (containing values 0 , 1 , 2). I have heard abt SoftwareSerial.h and Virtualwire.h libraries(but has never really worked with either of them  :-[ ). I need to correctly transmit this matrix only once. So speed isnt a criteria. Can someone please guide me in which path I must choose to go about? ie) SoftwareSerial.h or Virtualwire.h. which will be better? Or is there a better option? Btw wat is the difference between the two?  :-/  I would like to keep program size as low as possible.

Hoping for a fast reply.
Thanx in advance.  smiley
Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Data sheet for those modules?
Logged

Leon Heller
G1HSM

0
Offline Offline
Sr. Member
****
Karma: 5
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Personaly i prefer the range of nrf24l01 radios, for ease of use, how does your radio communicate, rs232 or spi?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Datasheets.
http://www.mediafire.com/file/kh2nxyel07lxrdf/rf.pdf

@P18F4550
I only have the tws-434/rws434 Modules.
 smiley
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, they transmit and receive serial data. So, transmitting the matrix is a matter of sending the bytes in the matrix to the serial port, in whatever order you like (row major or column major or random).

Re-assembling the matrix is a matter of reading in the bytes, hoping none got lost, and putting them in the 2D array on the receiver in the correct place.

Whether to use SoftwareSerial, NewSoftSerial, or VirtualWire depends on how you have the RF modules attached to the Arduinos. Each method results in one byte at a time being broadcast or received.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So no clear winner regarding which to use? ease of programming wise?
Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

They appear to use AM, so I'd start by simply turning the input to the Tx on, and checking the output of the Rx to see if the signal is received. If that works, try sending some data. A scope would be useful.
« Last Edit: August 25, 2010, 10:00:08 am by leon_heller » Logged

Leon Heller
G1HSM

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

its ASK modulated. My problem is what sort off progrmmin like SoftwareSerial.h or Virtualwire.h to use to send out the data through Arduino.
Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just pick one of them and try it! Try that test of mine first, it might save you some time.
Logged

Leon Heller
G1HSM

England
Offline Offline
Full Member
***
Karma: 0
Posts: 211
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

why are you doing it in software?  the hardware serial port is far more efficient.
Logged

0
Offline Offline
Sr. Member
****
Karma: 5
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The reason i dont like the 433mhz and such AM modules is that most dont have auto mute, so the RX is always recieveing and you have to either send a header or decide from the output what is valid data and what is random static, this is why i like the 2.4gig modules their not too expencive
Logged

Spokane, Washington
Offline Offline
God Member
*****
Karma: 0
Posts: 686
My name is Bob, and I'm an addict.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://letsmakerobots.com/node/12336

Just a basic tutorial on how to use the RF kits with VirtualWire.

They're cheap.. so, well you get what you pay for. Slow speed, lots of coding, not a very good distance...  but I've used it for simple projects without any complaints, but just purchased some a few XBees with shields.

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Ultramagnus
I didnt get u...
@CaptainObvious
Yup i have seen that tutorial befre. That got me thinking about VirtualWire. bit of googling made me find out abt SoftwareSerial. Still undecided. Thanx anyways.
@ Leon Heller
I guess I will folloe ur technique. Randmly pick one and see how it goes.

Thanx for all the replies guys. smiley
It would be gr if someone can tell me the difference between the two. Else its kinda ok. I will get to know it in a couple of days time after trying it out.  smiley-wink
Logged

England
Offline Offline
Full Member
***
Karma: 0
Posts: 211
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
@Ultramagnus
I didnt get u...

the arduino has a serial port used by the normal serial library http://arduino.cc/en/Reference/Serial .  unless you have a reason not to use it you should use it.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 235
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you saying I can transmit data via digital pin 1 using Serial function? I thought serial was just used for communication between PC(Arduino IDE) and the board.
If its possible to transmit serially via digital pin 1 can plz tell me how i do it? for example say if i want to transmit a number say 6 via digitalpin 1. how do I write it?
Logged

Pages: [1] 2 3   Go Up
Jump to: