[SOLVED]Questions about RF modules (Interfacing and coding)

Hello,
I have been surfing the internet for some questions I had about 433/315 Mhz RF transmitter/reciever modules but about all of them were about sending encoded messages with the RCswitch library and all of their modules worked with I2C

Some of them :

http://tinkerman.eldiariblau.net/decoding-433mhz-rf-data-from-wireless-switches/

And I have to say : I am not THAT noob with the whole arduino world but I AM a noob with wireless stuff.

Now my questions:
First, How do we know that the interface is I2C and not for example UART (Serial)? Because AFAIK I2C must have a Clock pin but there are no clock pins on the modules up there whatsoever. (The module I want to use is a Chinese one and the datasheet is totally written in it , However I found this from another source but the only thing about interface in it is that it has two data outputs which is also confusing)
So PLEASE enlighten me about how this works.

This and this are my sources for the module. There are some variations of this module in international shops.

And second, What is the necessity for the RCswitch library?

All I want to do is send a command to the reciever that is connected to an arduino that has 5 LEDs attached to and make it turn one of those on and off ,So the command can be a number from 1 to 5 ,a one-byte data.
And this problem is bound to the other one because if I can interface the module with arduino using Serial (UART) then life’s easy, But if it’s I2C ,I have no idea how to do what I want (talking about the coding)

And No, I haven’t written even one line of code for this project because of mentioned problems

I think I asked the questions as clear as I could…
Thanks in advance.

There are many transceiver modules. They have a chip that takes care of the communication: selecting channels, the protocol, receive and transmit, and so on. For example this one : http://shop.aftabrayaneh.com/Communications/Radio_wireless/NRF24L01P_Smd.html The chip takes care of everything, and the Arduino communicates with the chip. The communication is sometimes Serial/UART, but almost never I2C. I don't know where the I2C did come from ;) just forget it.

Those cheap ASK transmitters and receivers are not like those transceiver modules. The ASK transmitter has a pin to turn on and off the transmitter. That's all. It means that the Arduino must make a protocol in software to be able to use them. RCSwitch or fuzzillogic can be used for the 2262 / 2272 protocol. It is used in many remote key fobs.

To communicate between two Arduino boards, there is a library that is far better than anything else. It is the VirtualWire/RadioHead library : http://www.airspayce.com/mikem/arduino/RadioHead/ For RadioHead, you need the RH_ASK option. It comes with examples for ASK modules. The transmitter uses a digital pin of the Arduino, and the RadioHead library toggles that pin to make a protocol. The receiver connects to a digital input pin. It receives noise and data, and the RadioHead library tries to read the protocol out of the noise.

Thanks for the quick response :) So you mean that these cheap transmitter/reciever pairs are like a piece of wire that is dumb (obviously :D) and cannot do anything by themselves but the transcievers are like wires that have some hardware to proccess data at the start and the ending point ( Is that correct?)

And the I2C came from the fact that some tutorials used the 2-wire library but anyway, your answer just clarified everything.

Thanks for the advice about RadioHead. Quick question : Does the Manchester library do the same job?

Yes, the cheap ASK modules are on/off and can't do anything by themselves.

I think the RadioHead use Manchester coding as well. But RadioHead is much more. It has a checksum, it has start pulses, it is a little fault tolerant. It is by far better than anything else.

The nRF24L01+ modules are cheap and easy to work with. I got mine to work with this Tutorial. I also suggest you use TMRh20's RF24 library.

...R

Robin2: The nRF24L01+ modules are cheap and easy to work with. I got mine to work with this Tutorial. I also suggest you use TMRh20's RF24 library.

...R

Thank you I was first thinking of these but as I read somewhere that the higher frequency gets the lower the range and power to get through obstacles will be , so I just left that option . But you have experience with it , I mean you know how good it performs in real life .So how is the range and overall performance? Thanks again

RasaKh: But you have experience with it , I mean you know how good it performs in real life .So how is the range and overall performance?

I have only wanted to use it within a room. It worked without the slightest difficulty at about 10 metres range which is more than I require.

What range do you need and what obstacles are in the path of the signal. AFAIK lower frequencies are better for range. But the usual 433MHz devices are not nearly as sophisticated as nRF24s so I don't know if it would be comparing like with like. And I think for frequencies below that you need a licence.

...R

Robin2: What range do you need and what obstacles are in the path of the signal. AFAIK lower frequencies are better for range. But the usual 433MHz devices are not nearly as sophisticated as nRF24s so I don't know if it would be comparing like with like. And I think for frequencies below that you need a licence.

...R

Well the the range of the modules I want are rated 300 meters but that's just in theory and it would be lower when in use of course . I want to use it inside a building (so the obstacles mentioned are walls) and I thought they could have a range of about 50 meters, maybe? That's more than I need. And about the frequencies : We (in Iran) only need licences for VHF and lower frequencies for such low ranges and the modules work with 433/315 MHz so that wouldn't be a problem.

50 meters range inside a building with these modules is possible, but not guaranteed.

The three things you can do to maximize your chance for success is

1) use VirtualWire or RadioHead to for send and receive protocol

2) use a straight wire soldered antenna. 17cm for 433 mhz.

3) run the transmitter at 12v. The tx data from the arduino is normal 5v but the module itself is powered with 12v.