X10 RF & IR Remote Using Arduino - Lookout
Maybe your like
Wednesday, June 30, 2010
X10 RF & IR remote using Arduino
Goals:
- Create a platform independent solution that makes it easy to interface with X10 hardware and that supports sending and receiving both standard and extended X10 messages.
- Make a cheap alternative to the Marmitek CM15PRO Computer Interface with better functionality, performance and RF-range.
- Incorporate X10 IR into the solution to make products like the Marmitek IRRF7243 or the XanuraHome IRIX35 interfaces redundant.
- Base it on the Arduino platform using a single Arduino Duemilanove controller.
- Writing interrupt triggered non-blocking PLC1, RF and IR libraries that can be run in parallel on one ATmega168 chip without using too much resources or getting in the way of each other.
- Making RF and IR performance good enough to be able to receive BRIGHT and DIM commands and forward them to the PLC1 interface without getting choppy dimming.
- Using one of the ATmega168 pin change interrupts. Separate interrupts are needed for PLC1, RF and IR. The Arduino Duemilanove only has two external interrupts, but it's possible to use three additional pin change interrupts. Check out chapter 11 in the ATmega168 datasheet for more information.
- RF library (X10rf) only tested with 434MHz KR22 remotes. Timing min and max values (defined in X10rf.h) may need changes to make library work with other remotes.
- IR library (X10ir) only tested with Logitech Harmony remotes. Timings defined in X10ir.h can be changed to make it work with other remotes using the same protocol.
- Support for the WiShield 2.0 by AsyncLabs.
- Android and iPhone apps.
- Bluetooth Support.
- X10ex library – X10 message transmission and reception using a PLC interface.
- X10rf library – X10 message reception using a standard 434 or 315MHz RF receiver.
- X10ir library – X10 message reception using a standard, low cost IR receiver.
- X10 test sketch – Example code using above libraries, including X10 serial protocol that works with the X10.Net library and code for the Ethernet shield.
- X10.Net library – X10.Net serial communication library with test application. Written in C#.
- Arduino Duemilanove board (ATmega328). Price: SparkFun ~$30, eBay ~$20
- Marmitek XM10 Two-way PLC Interface2 or equivalent US version. Price: IntelliHome.be ~$50 (I live in Europe, X10 stuff is expensive)
- 434MHz receiver module (I'm using one based on the Infineon TDA 5200 chip). Price: Similar product from SparkFun ~$5
- IR Receiver (I'm using the Everlight IRM 3638N3). Price: Elfa.se ~$2, Similar product from SparkFun ~$2
- Marmitek CM15PRO Computer Interface. Price: ~$115
- Marmitek IRRF7243 IR Mini Controller3 or XanuraHome IRIX35 Infrared Interface4. Price: ~$58 or ~$150 for the IRIX35
- X10 extended code capable two-way dimmers, appliance modules, etc.
- Two Marmitek KR22 RF remotes (~$25 a piece).
- Logitech Harmony 785 (using device Marmitek IR7243 to send X10 IR).
- So far the library has been tested with the 50Hz European XM10 and the 60Hz North American PSCO5 PLC interfaces. Other models should work fine too. Thanks to the guy at http://brohogan.blogspot.com/ for testing the PSC05 :)
- Arduino Reference
- ATmega168 datasheet
- Marmitek XM10
- X10 PLC protocol
- X10 RF protocol
- X10 IR protocol
- X10 Standard and Extended Code Protocol
31 comments :
Anonymous20/7/10 20:32The US X10 RF frequency is 310MHz but sparkfun only has 315MHz RF receivers. Any idea where to find one?
ReplyDeleteReplies
Anonymous26/5/18 07:10The cheapest mobile subscription differs from the more expensive deals with hundreds of dollars, this despite the fact that the amount of data included is the same. Looking at Forbrukeretaten will also find that within the same price range you can find offers where you get up to 20GB extra compared to your current subscription forbrukeretaten.no …..
DeleteReplies- Reply
Reply
Thomas M25/8/10 17:58Sorry, wish I could help you. I wasn't even aware that the X10 frequency in the US was 310MHz. I found a receiver module that looks suitable on www.wenshing.com.tw, but I don't know how to order one.
ReplyDeleteReplies- Reply
Unknown4/10/10 00:48Hi! very good job. I write you because I'm know a little of iphone/android programming and I'm working to make some app for interacting with arduino and your libs. I have searched for your email but i don't find it. If you want, we can't talk about all of this.
ReplyDeleteReplies- Reply
Unknown13/12/10 15:09Hi, At first, I thank you for sharing that good work. It is really inspired me to control my existing X10 devices independently as you did.But, I want to mbed instead of Arduino MCU. It has everything but much more. There are plenty of interrupts and built in PHY (LAN) for accessing over internet.Do you have any knowledge how to attach a transmitter module along to Receiver then we can control X10 devices by using X10 TM13 transciever module instead of XM10 (PLC)?Thanks, Sener
ReplyDeleteReplies- Reply
Mirko Ugolini19/12/10 08:56Hi Thoam,Great job!I was searching on internet for a while a project like yours.I would like to develope a Android app for control and for receive trigger from my x10 devices.In the beginning i though to control them by internet implementing one app that send comand to a rest webservice arduino.In your article you make reference to a arduino web server that implement the rest/jason protocol but from the photos that you post it seems that you use a rf module.I do not understend!I miss something.I would like to use arduino 2009 plus one ethrnet shield.What do you think about?Did you make a solution like this or you planned to do like this in the near future.Compliments again for your great job and for sharing jour efforts.Mirko Ugolini
ReplyDeleteReplies
Ben Tesser23/4/13 07:51Your best bet is to use a raspberry pi (~$25 linux computer @ newark.com) as the server with a usb->serial connection ($5 on t-mart.com) you can connect a cm11a into that (~$15 on ebay) and a cm19a (~$15 on ebay) for rf signals. You could easily also hook up a usb ir reader/blaster (~$10 tmart.com) if you need ir too. Then you could use software like domogik, or domus.link with heyu, or mochad for controlling x10 security systems
DeleteReplies- Reply
Reply
Thomas M7/1/11 12:29@Mirko UgoliniI'm using the RF module to receive X10 commands from standard X10 remotes like the KR22. The web server code is written for the Arduino Ethernet shield, so using the hardware you are suggesting should work perfectly.I'm currently working on an Android app that uses my web server code and the Ethernet shield. I've been testing the app for quite a while now and will publish it soon.If you want to e-mail me directly, look for my e-mail address in the source code.-Thomas
ReplyDeleteReplies- Reply
Thomas M7/1/11 12:37@SenerAlthough it's possible to send X10 RF commands from the Arduino and repeating them using a device like the TM13 I wouldn't recommend it because the X10 signaling is quite slow. Putting another link in the chain will make it even slower. Dim/bright commands will suffer from this performance loss. Also, be aware that the X10 RF protocol doesn't support extended code, so preset dim commands, e.g., would not work.I don't think it should be very hard to rewrite my X10 libraries to work with the mbed. If you want to give it a try I'll assist you as much as I can.-Thomas
ReplyDeleteReplies- Reply
dave21/5/11 06:07Your libraries are compelling, but is there some documentation on their usage? I tried to follow the code in the example but kept getting lost. Something regarding how to send an ON command vs an OFF command, receiving and displaying commands, that kind of thing.
ReplyDeleteReplies- Reply
Unknown23/5/11 13:55Thomas,I'm having trouble compiling your code. I'm getting the following error;"X10_Ethernet.cpp: In function 'void processEthernetRequest()':X10_Ethernet:407: error: 'class X10ex' has no member named 'setModuleName'"I'm using an ATmega168. Can you help.Thanks.
ReplyDeleteReplies
Thomas M25/6/12 20:27I know this is a bit late. But, to anyone else who has the same question: Unfortunately there is not enough memory on the ATmega168 to run the Ethernet sample code.If you're OK with serial only it will work fine with the ATmega168.
DeleteReplies- Reply
Reply
Johnnygal1/1/12 23:15Hello,Great blog post. I hope to make one of these.I cannot find a receiver based on the Infineon TDA 5200. Will one of these do the job:http://www.sparkfun.com/products/10532Thanks,John
ReplyDeleteReplies
Thomas M25/6/12 20:35Any receiver on the frequency used for the Marmitek remotes in your country should work fine.
DeleteReplies- Reply
Reply
Negadeth25/1/12 09:05You connect directly the pl zero crossing, pl receive, and pl transmit to digital pins on arduino?I'm trying to do this but I have some problems. I have the Marmitek XM10 and arduino uno.If you have a fritzing scheme... thanks a lot!
ReplyDeleteReplies
Thomas M25/6/12 20:45I hope you got it working. Yes, I have everything connected directly to the Arduino digital pins. Not sure a Fritzing would be much clearer than the image on the top of the blog post.I recommend that people start with a simple setup, start with just the XM10 (no Ethernet Shield, RF or IR). And start with the X10 Serial sample sketch. Once that works, connect the next "device".
DeleteReplies- Reply
Reply
eddie3D16/3/12 12:17Hi I'm an newcomer to Arduino and am trying to interface an Arduino Uno with a Marmitek XM10 controller. I've spent days trying to get an X10 library that is compatible with 60HZ and I found everyone recommending this lib. I've noticed that the "#include WProgram.h" line won't compile on the 1.0 IDE, changing the line to "Arduino.h" seems to work but I'm not sure if that change is appropriate or if anything else needs to change. Initially I just want to switch a few appliances on and off so don't need any of the remote code Is there a simple sketch of using the x10ex lib just to switch lights on off etc.Many ThanksEddie
ReplyDeleteReplies
Thomas M25/6/12 22:19Hi Eddie.First, try to download the new versions of the library (published June 23.), that should fix the "WProgram.h" error and some other issues.Next, try experimenting with the phases and Hz settings in the X10ex library "constructor". By default these are set to 1 (no phase coupling/repeat) and 50Hz respectively.I'll make a "Simple" sketch without the RF and IR stuff soon, but I'm afraid it wont make much difference.
DeleteReplies- Reply
Thomas M26/6/12 00:20Simple sketch available here.
DeleteReplies- Reply
Reply
Edy24/4/12 09:41Thomas, why your library doesn't work with arduino mega 2560?The XM10 doesn't respond but with Arduio Uno works fine.
ReplyDeleteReplies
Thomas M25/6/12 21:59I think you have to use other pins and interrupts with the Mega, have you tried that? And make sure to use the new libraries and samples I published June 23.If you can't figure it out, send me an e-mail. You can find my e-mail address in the license text of every source file.
DeleteReplies- Reply
Reply
Thomas M25/6/12 20:31It doesn't work with either. You need the XM10 or equivalent. The good news is that the XM10 is cheap compared to the CM11 and CM15 computer interfaces.
ReplyDeleteReplies- Reply
Thomas M25/6/12 21:00My libraries and sample sketches have not been working well after the Arduino 1.0 upgrade, and not at all after the Arduino 1.01. I'm sorry to anyone who've had problems, but I just noticed these issues myself.As of revision 68 (23. June) everything should be working again.
ReplyDeleteReplies- Reply
Jon Caira11/8/12 19:56Hi Thanks for the library and sketches. I am using the XM10U and am unsure about how to wire it up to the Arduino. Your diagram seems to be wired up differently to the arduino X10 documentation although there seems to be discussion on whether that is correct or not. Do you still have the 5k Ohm pull up resistor in place? Would it be possible for you to provide a simple wiring diagram without the RF and IR components?Thanks
ReplyDeleteReplies- Reply
JPingouix27/1/13 18:38Hi everybody,I am new comer in Arduino land, and very interested about this project. My goal is to allow a disable person to switch on/off lights and others from a PC, using the LAN.I have buyed an Arduino Mega260 and an ethernet shield. I get some trouble for cabling the Marmitek XM10 module to the Arduino: I have 4 wires (black, red, green, yellow) and don't fint how to plug them on the board.Any help would be very welcome.Thanks in advance.
ReplyDeleteReplies- Reply
Ciupanezul11/5/13 02:09This comment has been removed by the author.
ReplyDeleteReplies- Reply
Philip19/9/13 22:16Hello ,I made an Android App to use with this library X10Domuino on google play.Check Androidmodbus.com for more infoPhilip
ReplyDeleteReplies- Reply
Ana María25/1/16 20:08This comment has been removed by the author.
ReplyDeleteReplies- Reply
Woodstock656/3/16 14:45Meanwhile, thank you so much, I'm rehearsing ...I saw that the library is not compatible with the 1.67 version ...
ReplyDeleteReplies- Reply
Unknown11/7/16 22:28sadly the library doesnt seems to compile anymore
ReplyDeleteReplies- Reply
GusD19/8/19 09:01first, thanks for publishing your effortand have a question, if you find the time to answerHave compile your library with help from some others sitesCannot send X10 but receive for now, no mattermy project is and question is,Have installed at home, HAI Omni Pro from 1999and try to remove all together X10 modules and PLC XM10Want to read X10 directly from Omni RJ11 (and go from there with PWM and Relays no matter that)Any guidance on how to simulate Zero crossing and receive X10 from control panel. thanks is advance. Costas
ReplyDeleteReplies- Reply
Recent Posts
Downloads
- SonosUPnP library
- MicroXPath library
- X10 libraries
Other Blogs
- Ben Krasnow
- EEVBlog
- Mike's Electric Stuff
- Veritasium
- Weatherstation +
About Me
Thomas M View my complete profileFollowers
Tag » Arduino X10rf.h
-
Arduino-libraries/x10rf.h At Master - GitHub
-
Arduino Library For Sending X10 Messages By RF - GitHub
-
Building A Door Switch Using Domoticz, X10RF And Arduino
-
Arduino Powered X10+RFID Controlled Curtain Opener - #21 By ...
-
Arduino Powered X10+RFID Controlled Curtain Opener - Exhibition
-
Trying To Understand X10 DIM - Arduino Forum
-
Communication Entre Mon Robot Arduino Et Jeedom Via Rfxcom
-
Protocole X10 RFXMeter - Communauté Jeedom
-
Receiving X10 RF Transmissions (Updated 11/21/10)
-
Code Arduino - Forum Domoticz En Français
-
RRFXMeter | B4X Programming Forum
-
Capteur Niveau Cuve Sans Fil Pour 5€ | Domotic And Stupid Geek Stuff
Anonymous
Thomas M
Woodstock65