Thursday, May 21, 2009

The X10 Book

The X10 Book is the must useful project I've made with the Arduino. Again, I've already posted a lot of details on this elsewhere, so here I'll write about it from a different perspective (I hope).

The project is based on the Arduino interface to the PSC05/TW523 (see below) and an experiment on encasing electronic gizmos in a book.

It provides me with all the X10 functionality I had with with ActiveHome and a lot more. (I now use my CM15A only as a whole house transceiver.)

At the risk of repeating myself, for those who haven't read the links, here is a partial list of what it does:
  • Displays each X10 command that comes across the power line on a scrolling display. If it's a "known" house / unit code, it displays a friendly name like "Basement Light - On".
  • Stores a list of timed events like "turn on this light at 8PM, off at 10PM, on again at 11PM, etc.".
  • Checks X10 commands on the line, and trigger a "macro" if required - i.e "if garage Door open more than 10 min. display a warning, and trigger the sounder".
  • For defined X10 commands, light an LED and/or open or close a (10A) relay.
  • For selected commands, log the command and the time to an SD memory card that can be pulled and read by a PC.
  • Accept "special" X10 commands that provide variable data, such as temperature, from another X10 project I created (see next post). Note, these are not X10 "extended" commands.
So your saying "that's cool, good for you, but what about me?". Here is where I hope to be able to help by explaining the build process and offering a few tips. Since it's likely I don't know you, I'll imagine someone who is interested in X10, but has little or no experience with Arduino, some electronics, and an interest in programming. You are also patient, and motivated to help yourself. (Yuck, this is going to be long!)

The key things to remember, are that you don't have build all this functionality, you don't have to build it all at once, and you can build other functionality. You also don't have to build it the same way. For example you can use an LCD display instead of a scrolling LED matrix - much easier. If you use an LED matrix, there are several ways to drive it (i.e. MAX7221 vs "595's").

Another suggestion is to make the project in steps. Learn about and complete and test each step before going on to the next. This is where I think I can help the most. Below is the sequence of steps that I suggest you take to create an X10 controller with the Arduino.
  •  Get comfortable with the Arduino. Read the tutorials, join the forum, ask questions there, do some basic projects that interest you. (Get an Arduino with an ATmega328, you will need the room.)
  • Make a simple clock. I suggest a real time clock (RTC) based on the DS1307 chip. (IMO it's the simplest.)
  • For the clock, you will need a display. If you want a display on your controller, consider what you want there when considering your options. You have lots of options, but consider not biting off more that you can chew, you can always beef it up later. (i.e. A single color LED matrix is much simpler than a 2 color matrix.)
  • If you want a TV remote, figure out how to build that. I suggest a Sony protocol with a universal remote. For mine, I picked an interface that was interrupt driven rather than "blocking".
  • If you are going to display a lot of text, and to hold timed events, etc. get familiar with the I2C EEPROM.
  • This can be done earlier, but add the X10 stuff from here and here.
  • Recently, others have created some nice libraries that let you write to an SD card if you want a log.
  • Along the way, you have learned a great deal about electronics. Here is the schematic / wiring diagram for the X10 Book.
I'll add more to this list in future edits.


3 comments:

  1. Would it be possible to put together a kit and try to sell it, just for the fun of it? (You don't need to include a case). The atmega328 can be pre-programmed, so the buyer should be able to solder it and use it right away. The kit would be similar to the kits sold on adafruit.com, with nice step-by-step instructions (and photos).

    ReplyDelete
  2. Interesting idea. And I can't say I haven't thought about it. It would be fun to design a PCB dedicated to this and to make the changes necessary for commercialization.

    However, I don't think I'd be able to quit my day job! The X10 Book has been posted on the X10.com forum for a while now with no serious comments. Maybe I'm wrong about the lack of interest. What do all you other people think?
    Hello?

    ReplyDelete
  3. On the same note, once you have the PCBs, you can write an instructables.com article (step-by-step instructions for contsructing an X10 book, eventually including the case). That will give you more exposure (and fame :)

    ReplyDelete