Go Down

Topic: RF Communication (Read 5308 times) previous topic - next topic

000

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.  :)

Leon Heller

Data sheet for those modules?
Leon Heller
G1HSM

P18F4550

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

000

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

@P18F4550
I only have the tws-434/rws434 Modules.
:)

PaulS

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.

000

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

Leon Heller

#6
Aug 25, 2010, 04:58 pm Last Edit: Aug 25, 2010, 05:00 pm by leon_heller Reason: 1
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.
Leon Heller
G1HSM

000

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.

Leon Heller

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

UltraMagnus

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

P18F4550

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

CaptainObvious

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.


000

@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. :)
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.  ;)

UltraMagnus

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.

000

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?

Go Up