RF comms - missing a fundamental step?

I'm listening in on the (wired) communication between two devices that I own. They operate in Master/Slave mode, exchanging two frames of 32 bits every second, at a bitrate of 1 kHz. The signal is Manchester encoded.

I want to transmit this signal wirelessly from one part of the house to another, and so I bought a 433 MHz RF transmitter and receiver from Sparkfun.

In the product information it says: "What the transmitter 'sees' on its data pin is what the receiver outputs on its data pin.". I took that literally and just connected the data signal to the transmitter's data pin.

data -> transmitter -> ... -> receiver -> Arduino digital input

The receiver's data pin I connected to a digital input from Arduino. The signal I then read is very bad though, almost impossible to decipher.

Should I process the signal first before feeding it into the transmitter, that is, use (for example) UART and then send it to the transmitter via Arduino's serial Tx pin?

Then I guess I'd use another Arduino and pipe the output of the receiver to that one's Rx pin.

data -> arduino / Tx -> transmitter -> ... -> receiver -> Rx/arduino

So in stead of sending a 'raw' stream of Manchester encoded bits, I'd be sending 4 encoded bytes (plus I'd have to take care of parity/checksum stuff). Is that right?

Yeah, it is as "simple" as firing off bits to the data pin but the problem is a lot of that data can get corrupted.

Sounds like you're on the ball. You'll need to include plenty of redundancy (parity, checksum yada yada) so you can decode the message on the other side.

Don't do what I did and leave the TX powered on whilst waiting on RX :wink:

Sounds like you're on the ball.

With my current method, or with this one:

data -> arduino / Tx -> transmitter -> ... -> receiver -> Rx/arduino

I'm sorry, I didn't quite understand what you said first time around.

No you shouldn't need to use a dedicated UART pin. You can use what ever you like.

If you choose to try and process that way you need to consider all kinds of complications (timing etc). You may already be aware but have you tried VirtualWire? That provides a very good interface for doing what you're asking.

That's OK. And thanks for the reassuring answer.

I was hoping to get a good result by connect the 'raw' bitstream directly to the receiver, but I'm not sure anymore if that'll work given the quality of the result. More tinkering is required :slight_smile:

If I do need an Arduino for 'postprocessing' I may very well go with the VirtualWire library. As a matter of fact, I printed out the manual just minutes before I read your post :wink:

You'll definetly need some sort of preprocessing if you're transmitting data accross RF. Simply connecting, for example a switch, to a TX may give strange results.

Though saying that, RC cars work in a similar manar. They work on the assumption that enough commands will reach the RX that it'll still perform the action regardless of data dropping. You could argue that it sends a lot of redudant data though (you hold your finger down continiously on the controller).

Anywho, keep us updated :wink:

;D about the RC cars. I get only one master/slave command per second so I don't want to miss the slave's reply.

So little time and so much to do, but I'll keep the forum posted about significant progress :wink:

I tried the 433 MHz RF transmitter/receiver pair from Sparkfun. While they do transmit and receive, the frequency they use is very susceptible to noise.

I switched to using xbees, and there is no noise. What is sent is what is received. Nothing more and nothing less. No pre- or post- processing required.

On the other hand, they are more expensive.

I thought about using Xbee, but they are way more expensive, and they each need an Arduino. OTOH, if that's what it would take to get a reliable connection, I just might splurge on a pair :wink:

A reliable connection you will get. Plus, they are fun to play with. Toys are always a good investment.

nods

And give me something to offset my wife's investment in bags :sunglasses:

And shoes.