The receiver is from Sparkfun, but any similar receiver should work. The key is to get one with a tuning slug as opposed to a crystal. The software that interfaces the receiver to the Arduino is from a suite of X10 libraries written by ThomasM. You can find the whole suite (PLC transmit & receive, RF receive, and IR receive) here. Having written an earlier version of PLC receive, I'd recommend his version for PLC receive and transmit as well.
So lets get started. Get a 315MHz receiver, wire it up per the data sheet, get Thomas's libraries and his example sketch, (or get the "test & calibrate" sketch I made here). Press a key on an X10 RF remote. It should work right away, but only at close range.
So the next step is to tune this receiver closer to 310MHz. You'll want to start by adding an antenna. This page gave me the following lengths (in inches) for a vertical wire antenna at 310MHz:
- 1/4 wave - 9 1/16"
- 1/2 wave - 18 1/8"
- full wave - 36 1/4"
Now it's time to tune the receiver to 310Mhz. I don't have a scope, and I found that a sound card scope was of little help, since the signal is clipped to soundcard inputs, so I came up with two alternate methods.
The first method I tried was to simply connect the output (data pin) of the receiver to the Aux-in on my PC. You will hear a lot of noise! (This is due to the AGC built into the receiver.) However you will clearly hear the RF signal when you push a button on an X10 RF remote - as long as it's close and pointing at the antenna. Pointing the remote away from the antenna gave a fainter signal, and moving it further away made it even fainter. So with the faint signal, I simply turned the tuning slug until I got a clearer sound in the speakers when I pushed a button on the remote. Not very scientific, but it seemed to do the job. (I started by turning the slug CCW - this post said ~160° CCW.)
Later I used a different method which seemed to be more "real word". I made the "test & calibrate sketch" linked above. It simply beeps a piezo and outputs to serial whenever the receiver has a good read. Then I clamped a button down on an X10 RF Remote (HR12A) so it would continuously transmit, and located it at varying distances from the receiver. While listening for the beeps, I adjusted the tuning slug for good reads at the furthest distance.
While using the second method, I also played around with antennas. The 1/4 wave whip antenna really didn't seem to do much, and I couldn't pick up signals if the transmitter was outside my house. Then I tried a 36 1/4" piece of twisted pair from a phone cable. One wire to the ANT pin on the receiver and the other to GND. This made a big difference, and the grounded lead contributed to the difference.
That's about where I am at this point. Interfaced to the example sketch I can receive RF signals from the motion sensors on my front and back doors. There's more about this in last half of this thread in the Arduino forum. [4-3-13] (There were changes to X10rf.h - here is the modified version I used.)
Not sure at this point where I want to go with this - perhaps a "whole house" X10 receiver with some other goodies, or some little dedicated device. We'll see.
Thanks for posting this!!
ReplyDeleteI have been wanting to interface x10 security devices (PDS01, KR10A and PMS01) with the arduino and this brings the cost way down because I won't need to purchase a W800RF32A receiver.
Then again the security devices are a bit more complicated so I might have some trouble getting it to work.
Great! Let me know how you make out with using X10 security devices.
ReplyDeleteUnfortunately it looks like sparkfun is no longer carrying this receiver. I guess their supplier stopped selling them. Any ideas for an alternative?
ReplyDeleteYou might try this one . . .
ReplyDeletehttp://www.robotshop.com/seeedstudio-315mhz-rf-low-cost-transmitter-receiver-pair-3.html
It has a tuning slug.
Can actually get a similar receiver from some Chinese websites (in English of course). Just Google 315MHz receiver. Works really well for me and pretty inexpensive. I get pretty good range with the suggestions here and on the tech notes for antennas on the supplier site. Maybe will try a transceiver next time.
ReplyDeleteI just ordered that Seeedstudio 315mhz receiver from robotshop, so I'll let you know how I get along. Thanks for this post.
ReplyDeleteIf you're having problems receiving some remote controls check out http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1282815280/15 and see Phil.H's suggestion below. Needless to say would probably be good to adjust your own numbers.
ReplyDeleteBrilliant idea - listening to the raw output of the Receiver while transmitting from the fringe in order to tune it. I'll use that. Thanks much!!
ReplyDeletethanks for your information, I built the egg beater antenna described at your link above, Its working really great with my V572A
ReplyDeleteIs there a library for the CM19A. It is the USB equivalent of the Firecracker...
ReplyDeleteInteresting, thanks. It's good to see they are still making new types of X10 modules. Given that it's USB I won't have much use for it with microprocessors, but it could come in handy for some.
DeleteThis comment has been removed by the author.
ReplyDeleteThe link to the eggbeater antenna brings up a Zeus virus warning in Microsoft Edge browser.
ReplyDeleteThanks! I'll take your word for it. I removed the link.
Delete