circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 113 December 1999
Being Cool is Easy
A Temperature-Sensing Control Device


PUTTING IT ALL TOGETHER

I now had to decide what to do with an X-10 interface. I certainly could make use of some sort of motion-sensing device. After some thought, I decided that a temperature sensing device would be a logical extension to my first project.

I also had a real need for such a device. My daughter’s bedroom on the second floor tends to get hot during sunny summer days. I had been using the Homebase controller to turn on a fan on summer afternoons.

Most of the time this solution was adequate. On occasion, however, when we had a cool, rainy day (not uncommon in central New York), the bedroom would get too cool.

The obvious solution was to turn the fan on in the afternoon only if the temperature was above a certain level. However, I’d also like to be able to manually override the fan control when I’m at home.

The more I thought about the requirements for this fan controller, it became obvious that an autonomous device didn’t make sense. What I needed was a "dumb" sensor device, which provided input to the Homebase controller.

My first thought was to implement a remote temperature-sensing device that would send an X-10 command to the Homebase controller whenever the temperature transitioned through a predefined threshold.

There were two problems with this approach. First, the threshold would have to be set in the remote device. Second, I already had enough X-10 transmission devices and adding one (or more) additional device(s) that transmitted on their own would only increase the probability of a collision.

What I finally decided on was a device that would speak only when spoken to. The Homebase controller sends a query to the remote temperature sensor. This query specifies the temperature threshold. The remote temperature sensor then, and only then, responds (transmits) to indicate if the current temperature is below, at, or above the specified threshold.

The sensor is programmed for a single house code and responds to queries from the Homebase controller. These queries consist of two consecutive X-10 unit On commands.

The sensor decodes these On commands to determine the temperature threshold value to use for the comparison.

The decoded value is compared to the actual sensed temperature. The sensor responds with a unit On command if the temperature is greater than or equal to the queried temperature value, or with an Off if not. The homebase controller then takes the appropriate action based on the response received from the sensor.

An example of the protocol is illustrated in Table 1. The controller sends a 75°F query and the temperature sensor responds with a unit On command to indicate that the current temperature is equal to or greater than 75°F.

Controller

Transmit 75°F query:
Unit A, Key Code 7
Unit A, ON Command
Unit A, Key Code 5
Unit A, ON Command

Temperature sensor

Compare current temperature to 75°F
Transmit response:
Unit A, Key Code 16
Unit A, ON Command

Controller

Take appropriate action for temperature at or above 75°F.

Table 1— In this command protocol example, the X-10 controller sends a 75° query to the temperature sensor. The sensor responds to indicate that the temperature is at or above this value.

Note that an On command consists of two X-10 transmissions. Each transmission contains a House Code and a Key or Function Code. The Key Code of the first transmission identifies the unit (1 through 16) and the Function Code of the second transmission identifies the Command Code (On in this case).