Last Change
25 Jan 2008

CM17A Protocol

Home

About Me

Electronics
HAT
CM17A
DMX-512
Light Dimming
Rotary Encoders
TI Calculators
Power Supply
LCD Projects

PIC uC

Computers

Search

Email Me


 

I have always been very interested in home automation.  Lately I've started using the X-10 modules from X-10.com.  I started off by getting one of their 'free' starter kits, which included a simple computer interface, a receiver, a lamp dimmer, and a small remote control.  I hooked the receiver up to my old (pre-remote control) TV, and the lamp dimmer to the lamp behind the TV.  Well, I was hooked.  I consoled myself with the fact that I would really be spending more time and money creating my own system than I would by buying parts from them, and adapting it to my own needs.  So X-10 will probably be one of the physical layers of my system.

At any rate, I bought the real computer interface, since the one that comes with the firecracker is quite limited.  I've decided to use the CM17A firecracker interface in another project.  This required me to find out the protocol, which is easily obtained via the internet:

http://eagle.cc.ukans.edu/~mturvey/firecracker.html(now dead - Archive.org copy) Contains some great links about the CM17A, and links to the protocol spec on X-10's web site, ftp://ftp.x10.com/pub/manuals/cm17a_protocol.txt.   I had run across the radio transmission spec awhile ago, but have since misplaced the link.  From what I remember, it transmitted at about 300MHz...

At any rate, I stared at the data table in the protocol spec, and found out what each bit means:

|    Byte 1     |    Byte 2     |
|X|X|X|X|0|X|0|0|X|X|X|X|X|0|0|0|
|1 2 3 4 5 6 7 8|1 2 3 4 5 6 7 8|
Byte 1
1: One for house codes E-L
2: One for house codes A-D & I-L
3: One for house codes A,B,G,H,I,J,O,P
4: One for house codes B,D,F,H,J,L,N,P
5: Always zero
6: One for units 9-16
7: Always zero
8: Always zero
Byte 2
1: One for BRIGHT or DIM
2: One for unit codes 5-8 & 13-16
3: One for OFF (Zero for ON or BRIGHT/DIM)
4: One for unit codes 2,4,6,8,10,12,14,16 & DIM command
5: One for unit codes 3,4,7,8,11,12,15,16 & BRIGHT & DIM commands
6: Always zero
7: Always zero
8: Always zero

Obviously the house and unit codes are a form of binary code, but bit 1 of byte one showing a 1 for E-L is strange.  It appears very similar to a binary gray code, which makes sense in that code wheels for the selector switches are easy to make (and easier to read without transistion problems) in gray code than binary.  Note that Bright and Dim commands do NOT have a unit code - They apply to the last unit that received an x-10 signal.

Adam Briggs sent a WIN32 command line utility for controlling the Firecracker (check the above links for Linux and other OS utilities).  He also includes the C source code.

The usage is:
cm17a [comport] [command] <command> <command> <command> ...
To turn lights 1 & 2 on in house code A:
cm17a 2 a1on a2on
To turn the lights off:
cm17a 2 a1off a2off
The dim and bright commands are also supported:
cm17a 2 a2on adim adim adim
cm17a 2 abright abright

CM17A.ZIP [17KB]

Walter Knopf started tinkering with the firecracker in early 2008, you may be able to find some interesting/useful code at his website.

Everything on/in this site is copyright Adam Davis, 1999, 2000, 2008, except where otherwise noted
[an error occurred while processing this directive]