Very Inexpensive RF Module Tutorial

Let’s say you need a way to make a project wireless, but don’t have the scratch for a ZigBee or its ilk. You could use IR, but that has a limited range and can only work within a line of sight of the receiver. [Camilo] sent in a project (Spanish, translation) to connect two devices via a wireless serial connection. As a small bonus, his wireless setup is cheap enough to create a wireless network of dozens of sensors.

[Camilo] used the TLP434A transmitter/receiver combination to get his wireless project off the ground. These small devices only cost about $5, but being so inexpensive means the hardware designer needs to whip up their own communications protocol.

For a microcontroller, [Camilo] chose a Freescale MC9S08QC, a pleasant refrain from the AVR or PIC we normally see. After making a small board for his transmitter, [Camilo] had a very small remote control, able to send button presses or other data to a remote receiver.

After the break, you can see a short demo video [Camilo] posted of his wireless transmitter turning on an LED attached to his receiver. Unfortunately, this video was filmed with a potato, but all the schematics and code is on his web site for your perusal.

[youtube=http://www.youtube.com/watch?v=kuhHdqkhlys&w=470]

39 thoughts on “Very Inexpensive RF Module Tutorial

  1. Now if you only need to transmit button presses there are ready made receiver/decoders and transmitter/encoders for this purpose that can be ordered for about $5 per pair, 4 buttons in, 4 logic signals out.

      1. HT12D/E (decoder/encoder)

        Seems to be common in electric garage doors.

        I wrote a small article (in spanish) here: http://gzaloprgm.com.ar/rfht12/

        The IC only needs a resistors as a timebase, it doesn’t need to be that accurate.

        The only problem is that it doesn’t work as well for fast changing data, I tried to control motors (for an RC car) and it felt “laggy”, maybe it was the motor back EMF adding noise to it, don’t know.

        Still, the encoder/decoder pair is cheaper than two micros.

    1. I am slightly outraged by your slight outragousness of your comment and the lack of contribution to the topic at hand.

      In other news:

      I was experimenting with seeed studio’s version … wih an attiny an encoder/encoder or encoder/decoder protocol you can have wireless servos!

  2. You should keep in mind that because of the way the receiver works (Super-regenerate) if the input signal remains in a steady state, the receiver output oscillates. Because of that, it isn’t advised to do direct serial uart transmission. Something like manchester encoding should work better (at the cost of halving the max speed).
    Anyway, in any case you should be using checksumming and lots of redundant info.

  3. If you want to do this in easy mode, the newest generation of Picaxe has a command to do encoding with these modules for you. It works pretty decent if you don’t forget the filter caps.

  4. I like the RFM70 Modules. They are cheap too (~3.5€). But you don’t have to do the protocol, CRC etc. in Software. It is all integrated.
    They use 2.4 GHz in with the PCB Antenna you get a range of 100m free field, with 1-2 Mbit/s.
    So why chose the TLP434, if you can get a faster and easy to use RFM70 for almost the same costs

    1. I worked with the RF12 for MONTHS! It was one of the most stubborn chips I have ever used. It requires sequential reading and writing of the spi bus which most common libraries don’t implement. I ended up getting one working with AVR using the JeeNode Library. I also worked on a propeller version which due to the interpreted language makes it a pain in the ass to do proper SPI timing.

      http://apexlogic.net/code-bank/spins/rf12-driver/

  5. i didnt like these things. i got 2 sets of them. and while there good for some light radio control applications. they are incredibly tedious to work with. you have to piss away half your baud rate to encoding and you still got to define a frame that throws even more overhead into the mix. i did manage to control an rc car across the room though.

    so instead i got a pair of slightly more expensive nordic transceivers, which i havent got a chance to use yet.

  6. I think the nRF24L01+ 2.4Ghz transceivers would be a better option.
    You can pick them up from less then $2 each so they are cheaper and have more features like auto transmit. It does use more IO (SPI) but has more smarts. If using with Arduino there are some radio stacks that support meshing. And powering it you don’t need to have 12v for the transmitter just 3.3v with a power consumption of about 13mAh

  7. You might be mistaking HaD for a research journal. The idea to to present content which appeals to a spread of the DIY electronics crowd; novelty is good but hasn’t ever really been a strict requirement.

  8. i tried these w/ arduino&virtual wire. it didnt work for me ended up trashing them and buying a wixel kit from pololu on black friday. love my wixel. sometimes technology can be too limited to be worth the cheap price tag.

  9. 1) i have a TV remote IR extender using something like this, its useless for the TV protocol i purchased it for, its fine for every OTHER remote, ugh Murphy at it again!

    PS: i know the IRsensor is correct carrier feq… it picks up signal just fine with scope, its the radio thats unreliable.

    2) everyone (understandably) is pre-occupied with LOW and HIGH speed RF links… why is there no love for medium??? :(

    try using AFSK! medium speed and high reliability… @300 baud or higher, it was used commercially to link (dumb,=noCPU) terminals with mainframes and was the standard for several years. Also its SO easy to generate with AVR, wether interupt-based or polling-based :)

  10. I played with similar module bought from Sparkfun about 8 years ago. I hooked them to 2 basic Stamps. I tried to send some texts over the air. Too many errors in the transmission when I was standing across a room. I think they are fine for car door opener or light switch which you just keep sending until it reacts. But for some reliable communication, it’s tough. Anyone knows of some methods (one way) that’s capable of recovering good data out of the stream? maybe sending redundant data for auto recovery?

Leave a Reply to kiu112Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.