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.
39 thoughts on “Very Inexpensive RF Module Tutorial”
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.
Do you have a link?
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.
this video was filmed with a potato
I found this inexplicable funny… i loled so hard xD
Same! Technology has really come far!
“filmed with a potato”
I’m slightly outraged about this comment, it’s okay on a youtube comment but this is HaD for Christ’s sake!
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!
Wehoo.. Big deal… Really worth leaving a comment… Get a live, man….
I like it. Too much dry read of datasheet and codes everyday. Need some laugh
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.
I did the same thing with the Arduino + Virtual Wire library, works perfectly.
These look like the SparkFun receiver and transmitter pairs. I recently purchased some cheapo chineese ones here Can’t get them for 20 days. But getting 10 pairs for 12 bucks is a steal. Will see if they’re slugs.
There’s no link in your post.
There are some very cheap .. I think about $2.99 shipped .. clones of some more expensive ISM band transceivers floating around on ebay under the label “RF-2400″…
“Filmed with a potato”
I almost choked on my beer :’)
Bear in mind that transmitting data at 415 or 433 MHz is illegal in the US, except at VERY low power.
Funny, i just completed a similar project based on the RFM12…
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.
And another command to decode, of course. >_> Sorry. ( rfin and rfout respectively ).
I’ve done a similar thing with the AM-RT4 and the AM-HRR (http://www.bitsbox.co.uk/sensors.html). Wrote a small python script to handle error correction using repetition.
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
What a coincidence, i just completed a similar project using a RFM12. See http://www.schoar.de/tinkering/rfm12trx/
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.
Yeah, these modules are quite…umm…picky. Wasted a lot of time to get them running :(
Nice! I’ve been seeing these on dealextreme and been really keen to try them. into the world of wireless I go…
Do loads of RF link stuff.
the site laipac.com is not working thank!!!!
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.
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
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.
Don’t these things cost like 2$ on ebay assembled?
If you have never worked with transmitters a good read is the talking electronics site where they show how to build transmitters for remote control from just basic parts like transistors.
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.
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 :)
Wow, that appears to have more than 5 times the resolution of the potatoes I’ve been growing. Time to upgrade my veggies…
I bought a few of these, planning to use it for a doorbell, and the range on them was awful, they quoted upto 100m, but i struggled to get 2m out of them.
Anyone experienced the same or have any tips?
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?
Read this article, it can give you hints to make it more reliable:
Stan Swan has done a bit of work with these modules and the Picaxe – http://www.picaxe.orconhosting.net.nz/dorjiask.pdf
Please be kind and respectful to help make the comments section excellent. (Comment Policy)