A Low Cost - Heavy Duty - Remote Control - 220VAC Contactor

Ever see old technology that just won't go away?

I've got an old X10 household controller, the CP290, that was purchased from Radio Shack back in the early 90s. And while the system periodically showed reliability problems when controlling the X10 dim-able light switches, it did work remarkably well with the three pronged appliance modules. I eventually replaced the lighting controls with the smarter and more reliable Intermatic Z-Wave system that uses RF instead of the power lines for the communications medium. But even today you can still purchase the X10 AM466 Appliance Modules at about $8.00 in small quantities. Of course the CP290 controller has not been made in some time and is normally programmed via serial port using an old Windows GUI that was written for Windows 95. With Linux and the virtues of the open source community, there is source code available for talking to and programming the CP290 controller. The advantage is that you can use the various Linux tools to address the shortcomings of the original implementation. The main reason I retired the X10 controller was because it did not contain the smarts to deal with sunrise and sunset. The provided software utility simply calculated those times prior to up-loading the scheduled events to the controller. So, those timed events were really static. With Linux and a spare serial port, assuming you still have one, you can schedule periodic updates that adjust for the sunrise and sunset events on a regular basis. Any Linux user knows exactly what I'm talking about but my point is that X10 still seems to be a very viable low cost solution for many home automation projects and a good tool for fast prototyping of various automation projects.

Having a surplus of X10 modules and experience with the One Wire File System that I've talked about in the OWFS section, I came up with a clean solution to being able to control an air compressor remotely as well as locally. For years I've wanted such a device but was missing the costly relay/contactor and only had two spare wires of a buried 7 conductor signal cable available. Here were the basic requirements for the project:

  • Local actuation of a 20A 220 VAC load without disconnecting any cables
  • Remote actuation of the 220VAC load
  • Remote indication of power status: ON/OFF
  • Use only 2 conductors of a signal cable
  • Automatic turn off of load on a nightly basis

    The missing piece of the puzzle was the contactor. Previous searches ended in disgust due to the cost. Most recently I located a 3 pole 120VAC coil contactor on Ebay for less than half the price of other suitable candidates so I decided to commit to the project.

    Contactor Diagram

    General hardware concept

    Why not integrate the X10 Module into the Assembly? Well, you could but since the 220 line does not contain a Neutral line, the 120V line is still needed. That is, unless you add an auto transformer and work out the X10 modulation coupling issue. Besides, why not allow the X10 module to be able to be reused and who doesn't have a spare PC power cord laying around?

    Front View

    220 volt receptacle and sealed stainless steel push button face

    Rear View

    220VAC Input Power Cable, 120VAC Actuate Input Connector, Actuate Indicator and RJ45 One Wire Network Connector

    Inside View

    DS2406 DIO Module was previously purchased from Embedded Data Systems for evaluation. Seemed like an obvious application to re-purpose the little module for.

    Note: Mounting method for the module utilizes a modified clothespin since somebody neglected to address that little detail.

    The third pole of the contactor is used for the status indication read by the DS2406 module.

    Okay so I've got a good looking piece of hardware, but what makes it all work?

  • Of course, the OWFS has to be up and running. A new daemon was created to bring that up automatically.
  • A second daemon monitors the state of the local push button and based on the current state, toggles the state via an X10 command. I took advantage of the input latching feature of the DS2406 inputs so the user would not have to hold the push-button until it is read by the daemon script.
  • To control the load remotely, there are two methods. The simple way is to simple set the X10 Appliance Module to an ID which is assigned to one of the manual CP290 controller switches. The other way is via a shell script written for the application allowing for control anywhere via ssh. I can see 'an App for that' in my future. Can't you? Smart phone users rejoice.
  • Automatic shut off is handled by simply uploading a scheduled event to the CP290 and let it handle that task, stand alone. No need for cron here. As a side note though, the CP290 RTC is not all that accurate so a cron task does set the clock periodically.

    BASH Script

    Resulting output of a status request.

    Credit for the original X10 CP290 controller software goes to:
  • Larry Campbell
  • John Chmielewski for porting to Linux
  • Paul Fox for additional features like sunrise and sunset plus additional bash scripts

    This is where I found the CP290 software: http://home.comcast.net/~ncherry/
    The direct link to the source is: http://home.comcast.net/~ncherry/common/cp290.tgz

    Lessons Learned?

    The following are a few of the issues that had to be debugged during the writing of the initial 'compressor' shell script needed to make the whole thing work as a cohesive system:

  • File system availability issues necessitated the need for adding retries
  • Address erroneous initial power-up state of the DS2406 input latches
  • Address temporary loss of device on OWFS to insure clean seamless and safe system recovery