DCC Topics


RF modules (Radio frecuency communications)

This page is dedicated to my research on the RF modules from Microchip (MRF49XA). As I told in one of my blog messages it was a dream for me to send and receive data wirelessly but my knowledge in analog electronics is not that good. The only project I had done was in the university in an "electronics 3" course. We had to design and build an analog transmitter and receiver for voice, and it has to reach at least 500 MHz. We get there using the 4th armonic because we couldnt make a good oscilator and we couldnt build the receiver so we used a spectrum analyzer to receive the signal. In conclusion, it was a thought project that buried my hope to transmit data until 12 years latter.

I found the MRF49XA and I also learned how to build my own PCB in house so a new world oppened to me in 2010.

I began working with a simple project that send a 3 byte packet and other module received those bytes and it was hard making it work because I had many variables I haven't dealt with before as the surface mount soldering, antenna design and RF transmition. Also I didn't have an spectrum analyzer on hand because I'm not in the university anymore, and I didn't get the support I spected from them.

The next schematic is from the RF module I built for prototyping using a "baloon" circuit for the RF antenna. I got samples from Coilcraft.com for the SMD inductors and I bought a kit of capacitors from Ebay. After I built those modules I used a dsPIC30F4012 microcontroller to host the transmitter and receiver programs.

You can download this PDF containing the schematics and PCB for this module clicking this link.

Here is a picture of the module

This other schematics is the dsPIC30F4012 application circuit. I made two exact circuits and with switches they can work as a receiver or transmiter.

You can download the PDF with more details here

In this circuit you have two switches to control wether it transmits or receives data.

If the TX-RX switch is on (closed) the the module is ready for transmitting but it only transmits when the SW-PB is pressed.

If the TX-RX switch is on (oppened) the module is ready to receive data.

There are four LEDs to indicate some states of the program. The first one is on when transmitting a packet.

The other is turned on when a valid single byte has been received.

The other is turned on when a valid packet (group of bytes) has been received. The packet consist of 3 bytes like this

Byte 1 : Lenght of packet including checksum byte

Byte 2 .. n : Data to be transmited / received

Byte n + 1 : Checksum of the packet

For simplicity I'm sending a 3 byte packet with only one data to be transmited / received.

The last of the four leds in the application is turned on if the checksum of the packet received matchs the calculated checksum in the receiver unit.

I've achived a 50 mt (aprox 150 ft) sending this packet with the baloon circuit in the antena and a 1/4 wave length antenna.


You can download the firmware for this application here

RF Switch Application using PCB antenna

After I had working this RF modules, my next goal was to control a switch remotely. It was a simple application that would let me test the distance and reliability of the wireless transmition.

For this application I desided to use a PIC16F628A because I have many of them in stock.

The application consists of one transmitier unit that has 3 push buttons to toggle the switch state and a receiver unit that can be configured in one of the 3 IDs usign hardware jumpers.

Te receiver reads every packet and compares the unit ID with the received. The second byte in the data is the switch state (0 = off, 1= on).

As I told you before, I wanted to exclude the RF inductors and capacitors so I used the BIFA PCB antenna posted in the document 442X schematics layout for BIFA in the design tools link of Siliconlabs.

Here is the schematics for the transmiter unit

You may notice the loop antena that is connected to the VCC (3.3V). This is required for the transmition because the MRF49XA output is open collector and needs the VCC bias to transmit. Download the PDF with the PCB and schematics here.

The receiver schematics is as follows

Click in the image to download the PDF


You can download the firmware for this application here