RF Communication Between Microcontrollers – Part I

In many situations a communication link between to devices becomes essential. This communication can be wired or wireless. If two devices are close to each other (like a MCU and a Memory) a wired link is preferred. How ever in many situations two devices are reasonably far apart. In that case a wireless link is preferred. Two popular wireless communication technologies are

  1. IR Communications
    • Used in IrDA, and Remote controls
    • Short Range
    • Requires two devices to be in line of sight.
    • There should be no Opaque Obstacle in between the devices.
    • Easy and low cost to implement
  2. RF Communication
    • Widely used, including Bluetooth,Radios,Cell phones, Satellite etc
    • Wide range, from few meters to millions of kilometers (Can be Used to control Robots in Mars)
    • Does not requires two devices to be in line of sight.
    • Can cross many obstacles
    • Circuits can be complicated and costly.

In this tutorial we will learn how to practically implement a wireless link between two MCUs. This link will be used to send and receive digital data. We will create a Radio Frequency link. How ever as I said the RF circuits are little complicated so we will use ready made RF Modules. These are easily available and low cost.

What is a RF Module ?

A RF Module is a small circuit pre built and tested. They comes in Pair. One is RX or the receiver and other is a TX or Transmitter. The one we will be using is a low cost module of about Rs. 300 (US$ 6.00) per pair in India. They have reasonable range and works very good. Typical data rate is 1000 bits per seconds. You can buy them from the following links

RF Modules interfacing with microcontrollers

RF Modules

 

ASK RF Modules

RF Modules

 

As you can see they have very low pin count. This is because they are highly modular in design. The PINs are

  • TX
    1. Antenna
    2. Vcc (Positive Supply)
    3. DATA (Data Input)
    4. GND
  • RX
    1. Antenna
    2. GND
    3. GND
    4. Vcc (Positive Supply)
    5. Vcc (Positive Supply)
    6. DATA
    7. DATA
    8. GND

So you just need to apply power and fit an antenna and its ready to work. But the real "TRICK" is in sending and receiving data. And due to this many beginner fail to use them the first time (same thing happened with me too !). So I will revel the "TRICK" and give you a working example so that you can use these modules for many projects in the future.

Go to Part II

By

Avinash Gupta

Facing problem with your embedded, electronics or robotics project? We are here to help!
Post a help request.

Avinash

Avinash Gupta is solely focused on free and high quality tutorial to make learning embedded system fun !

More Posts - Website

Follow Me:
FacebookLinkedInGoogle Plus

29 thoughts on “RF Communication Between Microcontrollers – Part I

  • By Anthony - Reply

    Good work

  • By shashank - Reply

    hey bring out part II
    your tuts are addictive…
    great job…

    • By Avinash - Reply

      @Shashank

      Part II comming up soon !!! 🙂

  • By Akshat Tewari - Reply

    Sir please mail me the circuit of rf transmitter and receiver

    • By Avinash - Reply

      @Akshat

      You need to buy the Rx Tx from Aplus India.

  • By Anthony - Reply

    Does the modules work with Manchester coded signals?

    • By Avinash - Reply

      @Anthony

      Yes.

  • By Varun - Reply

    @Avinash

    gr8 wrk……looking forward to part 2…..when r u planing to put it up on the site…will really help me in my project…thnx

  • By raghu - Reply

    whn can we expect ur part 2 we ar waitng for it pls do it fast …………

  • By nomi - Reply

    gud …bt plz gve detail of each n evry thing n also gve an example how it works?…..

  • By nomi - Reply

    plz its next paert ….hurry

  • Pingback: RF Communication Between Microcontrollers - Part II | eXtreme Electronics

  • By MAhesh - Reply

    hey….great work..
    relly an awesome tutorial for a beginer…

  • By Sanjay - Reply

    hi Avinash ,
    i have ask rf module @ 315 Mhz ,to check them can we use directly as an on off signsl for one bit ???? I mean does the tx and rx pin behave such that they are virtually connected with each other ??? When i check the data pin of receiever with multimeter it show 5 volts and suddenly goes down to zero ?? Does it require buffering ???

  • By Tiago - Reply

    Hi Avinash ,

    This part of the tutorial don´t appear in the tutorial list. Just Part II.

    Regards.

  • By vipul - Reply

    good introduction….keep up the good work

  • Pingback: RF Communication Between Microcontrollers – Part III | eXtreme Electronics

  • By Anshul Thakur - Reply

    Dear Avinash,

    I am making a project on RF remote controlled car with the following tentative features as a part of my minor project, and would like to extend it up to my major.

    1) Make a RF remote controlled car, with PC interfacing via USB. Using the keyboard of the computer as the control for the car.

    2) Implement speed control and servo steering mechanism through microcontroller.

    3) Live video streaming implementation throughout the range of RF control.

    I am looking for learning resources and after going through your pages, I feel you can help me. Could you please guide me through this. I am new to microcontrollers and have elementary(comparable to nothing)knowledge of the subject.

    Please suggest books and good websites for the same. I would be looking forward for a positive reply as soon as possible.

    Anshul
    anshulthakurjourneyendless@gmail.com

  • By Vinod - Reply

    Hello Avinash

    Can you pl. send me link to RF comm tutorial Part1 & 2. I tried hard to see the tutorial but could not find it.

    Thanks Vinod

  • By HYNIX - Reply

    @Vinod

    Can’t you use “searc” or click the RF link on the Navigation ???

  • By raj - Reply

    hey what antenna’s are required for this project.please suggest
    .I don’t know any thing about antenna.do they have some specifications please answer me anyone .I’m doing RF project please urgent.

  • By George - Reply

    Hello,

    can anyone tell me what RF spread spectrum transceivers (DSSS) can I use for ATMega16?

    10x

  • By maxmiaggi - Reply

    a good one! keep it up! 🙂

  • By mayank dubey - Reply

    sir isse ssta nahi mail sakta k

    • By Avinash - Reply

      @Mayank,

      ???? ???? ??? ? ???? ????? ????? ??? ?

  • By Varun Sanduja - Reply

    great job…

  • By Jasmin - Reply

    sei ? Enable Interrupts ???????? avr/interrupt.h ???? include ?? ????????? ????? V-USB ?? V-USB ? Arduino ? ISR ????? ???? sei ?? V-USB ?????? ?? USB Shield ??????? ???? ???????

  • By SHIVKHUMAR - Reply

    1. send me best price for RF TX + RX PAIR 433MHZ
    2. CAN YOU GIVE CODE FOR PIC IC TO BE USED IB 5KW UPS SINGLE PHASE IN & SINGLE PHASE OUT.
    3. PLEASE LET ME KNOW ISIT POSSIBLE FOR TECHNICAL TRANSFER FOR ELEVATOR LIGHT CURTAIN — Refer to details in google search enging for more specs

  • By Sunny Sahu - Reply

    Thank you for the Project , very nicely described for beggineers. i have a question instead of using power generation circuit , can i give direct 5v supply to the rest of the circuit will it work. Will be pleased for your response, urgent nessecary asap. thank you sir

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 5 = ten

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>