0

Can a cheap RF(transmitter and receiver) module be used for two way communication, not at the same time of course but for example arduino A sends string to be printed on lcd the arduino B receives it and prints it on lcd, then after some time arduino B sends a temperature data back to arduino A, then arduino prints the temperature data on the serial monitor. All of this while arduino A is connected to a transmitter and arduino B is connected a receiver. these are the RF modules i'm using:

1
  • Yes you can, but you'd need both modules on both Arduinos. So two sending modules, and two receiving modules.
    – Gerben
    Apr 9, 2018 at 15:54

2 Answers 2

2

Each device that will ever transmit anything will need a transmitter. Each device that will ever receive anything, needs a receiver. The devices you show in your question are separate receivers and transmitters, so on Arduino A and Arduino B, you will need both a receiver and a transmitter in order to have real, two-way communication between them.

Some RF devices are "Transceivers" which have both a receiver and a transmitter in the same module. Some of these can operate "full-duplex", meaning they can receive at the same time they are transmitting other data (Typically each direction is on a different frequency, but not necessarily.) Most cheap ones are half-duplex, meaning the module can only receive or transmit at any one time.

ADDITIONAL INFORMATION ABOUT RADIOHEAD

Your comment mentioned the RadioHead library. I was able to find the documentation on the library and see that it supports a wide range of radio chipsets and modules. The cheap ones you note are simple ones that use OOK (on-off-keying) or ASK (amplitude-shift-keying) and don't actually have a protocol. The receiver simply provide a HIGH or LOW output if it detects a signal on it's designated receive frequency. The transmitter simply oscillates at the transmit frequency when it's input pin sees a HIGH value, and stops when it sees a LOW value.

The RadioHead RH_ASK class deals with these simple transmitters. The documentation is at http://www.airspayce.com/mikem/arduino/RadioHead/classRH__ASK.html#details

This page notes the way to connect both a transmitter and receiver thus:

Connecting to Arduino

Most transmitters can be connected to Arduino like this:

Arduino                         Transmitter
 GND------------------------------GND
 D12------------------------------Data
 5V-------------------------------VCC

Most receivers can be connected to Arduino like this:

Arduino                         Receiver
 GND------------------------------GND
 D11------------------------------Data
 5V-------------------------------VCC
                                  SHUT (not connected)
                                  WAKEB (not connected)
                                  GND |
                                  ANT |- connect to your antenna syetem
2
  • i have searched everywhere for a diagram of some sort of how to connect both transmitter and receiver to one arduino, i cant find any, do you have some advise? i am asking this because the "RadioHead" library expects data from pin 12, and i don't know if any other pin would work? thanks.
    – user45600
    Apr 10, 2018 at 10:13
  • This sounds different enough to become a new question itself. That is, the RadioHead library and dealing with separate transmitter and receiver modules. Apr 10, 2018 at 13:23
0

Sure it can. A transmitter is only a transmitter while it's actively transmitting. And you can have as many receivers as you like.

4
  • wait... so does this mean when a receiver is not receiving it can transmit? and when a transmitter is not transmitting it can receive?
    – user45600
    Apr 9, 2018 at 15:21
  • No, it means you can have two people in a room. Each has a mouth, and each has ears. Only one should talk at once, but both people's ears are working all the time. The person talking knows he's talking though so ignores whatever comes in through his ears.
    – Majenko
    Apr 9, 2018 at 15:22
  • not those ones, those look to be separate transmitter and receiver modules. But something like the nrf24 is a transceiver, meaning it can do both like this amazon.com/dp/B00O9O868G/ref=sspa_dk_detail_1?psc=1
    – Chad G
    Apr 9, 2018 at 15:25
  • I'll second Chad G's recommendation of the NRF24L01 unit, cheep/readily available(Ebay) and very effective. I am using these to remote control my projects, range depends on who you talk to but have seen statements ranging from 100 to 1000mts. This item is well supported in the Arduino community.
    – Doug
    Apr 10, 2018 at 22:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.