Arduino Powered X10+RFID Controlled Curtain Opener

Been meaning to post this for a while and share what the help this board has allowed me to accomplish!

What do you guys think?

:slight_smile:

That's cool! I like the interlock logic on the door lock so it waits until the door has been closed then fires the servo.

Jon
SuperHouse: www.superhouse.tv

Thanks Jonathan! It's been a slow mashing of stuff together but it works really reliably now!

Later I'll post a video of my iPhone app where I can control and schedule X10 commands so now I can set my curtains to open every m-f @8am, etc. :slight_smile:

I'm working on a set of improved X10 libraries for the Arduino and I'm planning to create a RESTful JSON interface for it supporting both the Ethernet Shield and the WiShield. Check out my blog http://load-8-1.blogspot.com/ for more info :slight_smile:

Currently the library supports sending and receiving standard and extended code X10 with a power line interface, it also supports the X10 434MHz RF remotes and the X10 IR protocol. The libraries are fully interrupt driven, this means that sending and receiving simultaneously is no problem. I've also implemented at simple serial protocol that outputs anything received on the power line, RF and IR and lets you send X10 commands over the power line.

I'm starting work on the Ethernet and Wifi stuff soon, please let me know if this is useful to you or if you want to contribute.

@ThomasM, that's an interesting project and you've documented your progress well.

I'm particularly interested in the RF receiver part of the project. That Infineon part just looks like a regular ASK receiver / decoder, so I assume it would be directly equivalent to something like an RXB1 or RXB6 receiver module like the one used in the "Weather Station Receiver" project in Practical Arduino. If so, the hardware designed for that project should be a direct drop-in replacement and with your code could possibly be used with X-10 wireless transmitters. I designed a simple shield that incorporates that module:

Being able to use it with X-10 transmitters would be cool. I have a feeling my X-10 transmitters may be 315MHz though, not 433MHz. I'll have to check when I get home.

Jon
Practical Arduino: www.practicalarduino.com

Hi Jonathan.

I'm pretty sure that you're right about the receiver, almost any AM/ASK receiver at the right frequency should work as far as I know. I'm no expert though :slight_smile: You might be right about the frequency, I've heard that the US X10 remotes operate at 315MHz, not sure about the Australian ones. The library should work regardless of the frequency though, since the protocol is the same. The timings might be different, but that's easy to adjust.

Please keep me posted on your progress, and tell me if I can be of any assistance. If you want to e-mail me, you can find my address in the license text of the X10 library source files at Google Code Archive - Long-term storage for Google Code Project Hosting..

Just checked out your site, wow! You might get some orders from me soon :slight_smile: By the way: 315MHz receivers on breakout boards seem to be hard to find. If the US and Australian X10 is 315MHz, there has to be a lot of people searching for that. Maybe you could make a 315MHz receiver shield? :smiley:

Hi Thomas!

So your project is building a CM15a (at least that's what I use) with just an arduino+rf transceiver+x10 powerline adapter? I recently started having issues with my cm15a ignoring rf signals after about a day, and is only remedied by unplugging the usb, power outlet, and the batteries, and then reinstalling, so I'm curious if this would be a better solution.

Thanks for sharing your work!

Hi Phil.

Well I'm not building one, just replacing it :slight_smile: I've used the CM15PRO for a couple of years and was annoyed by the short RF range and lack of multi platform support. I've also used the IRRF7243 to make it possible to use my Logitech Harmony remote, same thing with this unit, poor IR range and choppy dimming. The stuff is expensive too. So I decided to build my own solution that replaced both these units.

I've used my own solution since June, and it has been working great! Response is faster, RF range is better, IR range is better and no more choppy dimming. Even the power line range is better, I think the power output of the XM10 is higher than that of the CM15PRO :slight_smile:

Currently my solution supports all that the CM15PRO and IRRF7243 have to offer, with a few limitations.

  • You have to write the scenarios in the Arduino Sketch. There is currently no API support, in my libraries, for uploading scenarios to the Arduino.
  • The project I've published doesn't contain any real time clock implementation. I've written a library for the DS1307 chip and I'm considering adding it to the X10 project, but haven't had the time yet. If you want, send me a message and I'll e-mail you the DS1307 library.
  • The .Net test app is not as user friendly and feature rich as the Marmitek Software. On the other hand I think my .Net library is a lot better than the Marmitek equivalent, and it's open source :slight_smile:
  • I've only tested the libraries with the European PLC adapter and RF remotes. But I'm pretty sure it will work with the American ones as well.

It would be really cool if you want to try this out! If you decide to, I'll try to help you out if you have any questions. And I'm curious about your iPhone app and your setup to make this work. I just ordered some Ethernet components, and I'm planning to have some sort of service interface running on the Arduino for iPhone/Android integration.

Your curtain opener/door lock is way cool, BTW.

-Thomas

Hey Thomas,

Now I'm really interested in building what you've got. I'm annoyed with my CM15a and it seems there's a lot to be learned from your project.
So I'm going to order my pieces and get started once they arrive :slight_smile:

Does it matter which speed?
2400bps

vs
4800bps

For the IR receiver, did you use something like

or

Also, could it be setup to send RF commands as well with RF Link Transmitter - 315MHz - WRL-08945 - SparkFun Electronics ?

Thanks so much! I'm excited to get started!

Here's a quick demo of the x10 part of my iphone app:

Being able to use it with X-10 transmitters would be cool. I have a feeling my X-10 transmitters may be 315MHz though, not 433MHz. I'll have to check when I get home.

My understanding is that North American X10 RF receivers are 310MHz. I don't know if a 315MHz receiver would work or could be de-tuned. ??

I've been using the playground libs to send and receive PLC with the TW523 (115VAC). For 310MHz transmit I use the playground lib for the CM17A.

It would be great to be able to receive X10 310MHz RF signals. Thomas, I assume that's what your doing in the 433MHz world, is that correct?

(Blog on my X10 projects here)

All about X10 protocol , IR, RF etc. you find here:
http://davehouston.org/

A list of supportet Transmitters/Receivers:
http://davehouston.org/modules.htm

For frequencies see the remarks at the bottom of the table

@ BroHogan and Phil.H.

BroHogan is probably right, I got it mixed up when i replied to Jonathan about the frequencies. I've heard that X10 in North America use 310MHz as well. And it's the 310MHz receivers that are hard to find, not the 315MHz ones :frowning: Does anybody know if changing the frequency of a receiver is as simple as replacing the crystal and the length of the antenna?

If you want to try receiving RF or IR BroHogan, you should use my libraries in stead of the other playground ones for the PLC as well. The playground libraries rely on using blocking code and delays. This works fine if you are only doing one time critical task a time (receive PLC f.ex.), but becomes very unreliable if you want to receive RF and send PLC at the same time (sending dim commands f.ex.). Or if you want to do what I'm doing, support receiving RF and IR at the same time, while both sending and receiving PLC and serial messages.
My PLC library also uses a buffer, so you don't have to wait until the PLC signaling has completed before issuing the next command (this is critical since sending a PLC command can take up to a second).

And yes, all my stuff operate at 433MHz. The protocols are the same though. I've used the American data sheets when doing research for my project.

BTW BroHogan, I know about your blog. Your Nex10 project was probably what inspired me to start my project :slight_smile:

Hi Phil.

I guess the answer to your question about the RF receiver is: neither will work because of the frequency. You could try replacing the crystal though, in that case I would buy the more expensive one, since the price difference is only 1$.

This is the IR Receiver Module I'm using: http://www.everlight.com/upload/product_pdf/IRM_3640N3.pdf.
You should buy one with some internal circuitry. I guess the closest you get to what I'm using at Sparkfun are:
IR Receiver - TSOP85 - SEN-08545 - SparkFun Electronics or SparkFun IR Receiver Breakout - TSOP85 - SEN-08554 - SparkFun Electronics.

My libraries don't support RF transmission. But it shouldn't be to hard to re-write the RF receiver library to support transmission as well. You would need a 310MHz transmitter though. Or you could use the playground lib for the CM17A that BroHogan mentioned.

Love your iPhone app, that's really cool! I have a Samsung Galaxy S and want to try to write something like that.

-Thomas

Ok. Found some info that suggests the 2400bps RF receiver from SparkFun can be re-tuned to 310. If you look closely at the images, you can see that the receiver has a tuning slug on the back of the board. Check out this article for more info: http://gobighometheatre.com/boblight/.
I guess you should use a scope to do this. But you could try tuning it manually, by using one of your remotes to signal while adjusting the tuning slug until you get a reliable input, using the Arduino as a monitor. When you get a input you would move the transmitter and receiver further apart and start over until you've got reliable input at the maximum range.

Thomas & wennjo - thanks much for all that info. Especially the BobLight link which shows that a 315MHZ receiver can be detuned! This was the only missing piece for me, and unfortunately for my wife, it will probably get me back to working with the Arduino again.

After the RF receiver, I'll see if a 315MHZ transmitter can be modified to replace the CM17A. I'll definitely check out your libs as a substitute for the current Playground set. (I know the stuff I wrote wasn't the best implementation.) I like that fact that it has a buffer too.

Phil, since the BobLight link that Thomas posted used the 2400bps receiver that has a tuning slug, I'd probably go with that rather than the crystal controlled 4800bps model - just my opinion.

Thanks a lot
John

Wow, thanks so much for your help!! :o
I've ordered a 315mhz receiver and will let you guys know how it works!
I wish I had a scope to use but they're just damn expensive, so I'll be doing the arduino guess and check method :slight_smile:

Do any of you know where I could get a 310mhz crystal in the same packaging? Digikey wasn't helpful for me.

@ThomasM thanks! I had a completely web-based version beforehand, but used this as an excuse to learn obj-c, poorly ha

Thanks!

The 2400bps receiver doesn't use a crystal. You should buy the 2400bps receiver (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=post;num=1282815280;title=PostReply) NOT the 4800bps since the 2400bps has a tuning slug on the back of the board.

And if you were to change the crystal of a receiver, remember that the crystal will not necessarily be 310MHz for a 310MHz receiver. A typical 433MHz receiver crystal is 13.2256MHz and a typical 315MHz receiver uses a 9.5094MHz crystal. So you would need to carefully select a crystal that would give you a 310MHz output. But I'm not sure it's this simple, and the right crystal might be hard or impossible to find.

Thanks Thomas. I did order the 2400bps one, I didn't specify that I was seeing if this could be done for the transmitter RF Link Transmitter - 315MHz - WRL-08945 - SparkFun Electronics
Since the crystal on that has 315 on the packaging I was hoping to get one just like it only @ 310mhz. I was hoping it'd be as easy as swapping them :slight_smile:

Thanks again!

Ok, just wanted to make sure.

Let me know if you guys have any success re-tuning these modules at all. I suspect it might a challenge :slight_smile: By the way, I have a feeling it's a bad idea to use a metal screwdriver when adjusting the tuning slug, so try to find something made of plastic or another material that doesn't work as an antenna.

-Thomas