Senior Project Proposal
Home Projects Papers Opensource Infolets Seniorproject

X-10 Based Remote Temperature Monitoring System

Abstract

The need to monitor temperature from a remote location has existed for many years.  Now, with the ubiquity of the Internet this is becoming a possibility.  This project was designed with simplicity in mind.

This product is made up of two separate components, the temperature sensing transmitter (TST) and the central receiver.  The TST can be plugged into any standard 110V AC outlet.  Once plugged in, the TST broadcasts out the current temperature of the room  (over the power line) every few minutes.

The central receiver which is plugged into a web server receives the current temperature and displays it on a web page.


1. Introduction
A remote temperature monitoring system.  Why you need it?

1.1 Problem

Scenario #1
You are 2000 miles away from home, you hear that the temperature is below zero in your hometown, and you don't remember if you left the heat  on in your home.  Will your pipes freeze and crack?  Will your fish tank become one big ice cube?  Will your neighbor appreciate being woken up again at 2:00 in the morning because you have nothing better to do than worry about whether your left the heat on in your house or not?

Scenario #2
You are responsible for mice in a medical experiment.  You know that the temperature range of the animal room must be kept between 76 and 78 degrees Fahrenheit.  There are millions of dollars on the line. Your choices are either to take residence in the animal room or to come up with a way to monitor the temperature from home. 

1.2 Solution
It would be great if you wouldn't have to wake your neighbor at 2:00 in the morning.  You definitely don't want to take up residence with the mice.  You need a simple solution. 

With simplicity as my guide, this is the solution I came up with.  Construct a temperature sensor, which, when plugged into a standard of 110 volt AC outlet will broadcast over the power line the current temperature of the room to a receiver.  This receiver is plugged into a web server.  Each time the receiver, receives a new temperature reading the web page is updated to display the current temperature.

1.3 Reason for Choosing this Project
I recently ran into problems similar to those given as examples in section 1.1 and this is the best solution I could come up with.
 

1.4 Simplicity and Ubiquity
With just 3 wires and one piece of software to be installed on a computer, I believe I have reached my design goal of simplicity.  In making use of the ability to send data over the electric power lines, the Temperature Sensing Transmitter (TST) can be plugged into any standard AC outlet within 2,000 ft. of the central receiver.

Placing the current temperature on a web page makes the information easily accessible from anywhere in the world.

1.5 Background
As a large part of this project centers around the mode of communication  between the TST and the central receiver, I would like to introduce you to the X-10™  protocol.  

What is X-10™?

X-10™ is a communications protocol for remote control of electrical devices.  It is designed for communications between X-10™ transmitters and X-10™ receivers which communicate over standard household wiring. Transmitters and receivers generally plug into standard electrical outlets although some must be hardwired into electrical boxes. Transmitters send commands such as "turn on", "turn off" or "dim" preceded by the identification of the receiver unit to be controlled. This broadcast goes out over the electrical wiring in a building. Each receiver is set to a certain unit ID, and reacts only to commands addressed to it. Receivers ignore commands not addressed to them.  X-10™ specifies a total of 256 different addresses:  16 unit codes (1-16) for each of 16 house codes (A-P).

The X-10™ protocol sends signals at the zero crossing of the AC line voltage and then at 60 degrees and at 120 degrees after that (in other words, three times every half cycle corresponding to the zero crossing of the other two phases). This is designed to make X-10™ compatible with three phase power situations. See Figure 1. 


 

A ONE(1) bit in a legitimate X-10™ transmission is a 1 millisecond (mS) pulse code modulated burst of 120KHz on the AC line, and a ZERO(0) is the absence of that burst. The exact length of the burst may not be critical in most applications. The burst is sent three times for each bit, once at each AC zero-crossing (accounting for zero-crossing in 3-phase). That means once each 2.778 mS. The next bit is sent on the following zero-crossing. This is done to get the quietest time on the AC line for the receiver, whatever phase of the AC it's on. The zero crossing gives the best signal-to-noise ratio for data transmission because everything should be shut down then (i.e. the voltage is low).

In addition, each bit is sent both true and complemented, and each code sequence is sent twice. That's a lot of bit redundancy, and just barely enough to make it past the noise on the line, depending on actual conditions. 

A single normal command takes eleven cycles of the AC line to finish. All legal commands must first start with the header 1110, a unique code as described below. The header bits take two cycles at one bit per half cycle. The next four cycles are the four-bit House Code, but it takes eight bits total because each bit is sent true then complemented. This is similar to biphase encoding, as the bit value changes state half-way through the transmission, and improves transmission reliability. The last five AC cycles are the Unit / Function Code, a five bit code that takes ten bits (again, true then complemented). For any codes except the DIM, BRIGHT and the data following the EXTENDED DATA function, there's a mandatory three cycle pause before sending another command.  DIM and BRIGHT don't necessarily need a pause but the data after the EXTENDED DATA command absolutely MUST follow immediately until all bytes have been sent. The EXTENDED DATA code is handy, as any number of eight-bit bytes may follow. The data bytes must follow the true/complement rule, so will take eight cycles per byte, with no pause between bytes until complete. The only legal sequence that doesn't conform to the true/complement rule are the start bits 1110 that lead the whole thing off because the modules need some way to tell when it's OK to start listening again.

A full transmission looks like this (ex. /H8 is the complement of H8):   

1 1 1 0

H8 /H8 H4 /H4 H2 /H2 H1 /H1

D8 /D8 D4 /D4 D2 /D2 D1 /D1 F /F

Start

House code

Unit/Function code

So, to activate Unit 12 of House code A, send the following:  

1 1 1 0

0 1 1 0 1 0 0 1

1 0 0 1 1 0 1 0 0 1

Start

House code

Unit/Function code

This sequence would be sent 2 times and at 3 different phases so as to insure that the transmission reaches its destination. 

Well that is enough of an introduction to X-10™.  In section 2, I will explain a little more about the Function code EXTENDED DATA because that is what I intend to use in my project. 

2. Plan of Attack
It is my intention to use the X-10™ to communicate between my Temperature Sensing Transmitter (TST) and the central receiver. 

X-10™ was never intended to be used to transmit data and for the most part it has not been used for that purpose. X-10™  is used primarily in home automation products to turn on, off and dim lights. 

In 1978 the designers of this protocol did put in the ability to transmit data. Although it has gone mostly unused, it is my intention to make use of it in this project. 

The ability to send data using the X-10™ protocol is made available through the use of the EXTENDED DATA function code.   Usually after you send a command to activate house code A, unit 12 you would send a function code such as 00101 which would turn on that light.  When the function code for EXTENDED DATA(11001) is used, immediately followed by a sequence of 8 bits, that 8 bits can be any data that you might want to send which in my case is the temperature.  The key is that there must not be any delay between the EXTENDED DATA code and the actual data.  

As part of my project I will have to design an encoding method that will allow me to encode my temperature information in those 8–bits. In addition I would like to be able to have more than one TST in my system.  This mean that I will have to have the ability to identify the different units.  In addition my system is to be completely compliant with the X-10™ protocol as to be compatible with other X-10™ devices operating on the same system. 

2.1  Temperature Sensing Transmitter (TST)
Part of this project is the design and construction of the TST module.  The TST will sample the air temperature and transmit it over the power lines to the central receiver.  As I indicated above it is my intention to be able to have several TST modules in this system, therefore, it is in my interest to minimize the noise I place on the power lines.  The less noise there is, the less likely it is that my data will get corrupted.  Therefore, as part of this system I will compare the current temperature with the temperature transmitted and only transmit a new temperature when it is different then the old. 

I have decided to separate the design of the TST into 3 independent modules. The first module will be the PL513 which is the power line interface module.  The PL513 acts as a transmitter for the X-10™ code. 

The second module will consist of the Basic Stamp II microcontroller along with the DS-1620 digital thermometer. 

The third module will be the power interface module.  It will serve the function of converting standard AC power to 5 volts DC while not placing too much feedback noise onto the power line so as not to disturb the X-10™ transmission. 

A rough sketch of the TST can be found below.

Temperature Sensing Transmitter 

2.2 Central Receiver

For a receiver I plan to use a CM11A X-10™ receiver.  This receiver can be purchased for about $50.  The CM11A is a small cube that plugs into a standard outlet.  From this outlet it can now monitor the X-10™ data on the power line. The CM11A has a RS-232 cable that will be plugged into my web server.  The computer with read in my data and post it to the web server. 

It is not nearly as simple as this much more detail will supplied in Report #2. 

2.3 Cost Estimate

CM11A – X-10 receiver    $50.00
Transformer  $15.00
Rectifier $3.00
Voltage Regulator $3.00
Basic Stamp II Microcontroller  $50.00
DS1620 –Digital Thermometer  $8.00
PL-513  $25.00
Assorted Resisters, Capacitors and Transistors $5.00
Total Cost Approximately  $160.00

2.4 Software Flow Charts 


2.5 Milestones and Completion Dates
Prelab 5 Weeks –Do Research – Acquire parts- Decide on encoding method

Week 1,2- Design and Layout TST

Week 3-5 Build TST

Week 6- Test And Debug

Week 7- Write Software for Microcontroller on TST

Week 8,9- Debug and Refine Microcontroller Software – Timing Critical

Week 10,11- Write Webserver Software

Week 12- Test and Debug Whole System

Week 13- Buffer Week – Murphy's Law

Week 14- Demonstrate a Working Product

3. Demonstration
At the demonstration of this project I hope to show a fully functional TST.  The TST should transmit the current temperature to the central receiver.  From there I will show the current temperature on the computer screen. 

If the computer network at NJIT will allow me to run a webserver on one of the machines I will show that the temperature of the room can be seen from any web browser.  

As a side note -  To keep noise off of NJIT's power grid I will isolate my signals to a single power strip that contains a high frequency filter.

4. Bibliography 

ftp://ftp.scruz.net/users/cichlid/public/X-10faq.txt

http://www.x10.org

http://www.x10.com

 

[ Home ] [ Projects ] [ Papers ] [ Open Source ] [ Infolets ] [ Senior Project ]