Wireless Thermostat

Back to projects

There was no thermostat at my last address when I moved in. For three years, I regulated the temperature by switching the boiler on and off manually. Whenever I thought about fitting a thermostat, I always got stuck on how to route the wires. The thought of re-plastering walls put paid to the idea. Then I realised you don't need wires.

The wireless thermostat is an idea whose time has come. I read that somewhere. I think they were talking about truly wire-less devices using 418 MHz radio control, however. This project uses much older technology: over-the-mains carrier current. The thermostat transmits a 100 KHz carrier over the mains wiring when it's too cold. The receiver detects the 100 KHz carrier and fires the boiler. This is not even X10 technology!

Photos

 Transmitter Receiver 
 Transmitter  Receiver

Aren't they pretty!

Safety

This project requires a direct connection to the mains. An electric shock from the mains can be fatal. Avoid exposed wiring. Think carefully if you have children in the house. All circuitry must be fused. Use a small fuse (100mA or less). An electrical fire could burn down your house. Be sure to use high voltage capacitors where this is indicated on the schematics. Under-rated capacitors may explode.

Temperature Sensor

The LM35 is an easy-to-use, low-cost 3-pin temperature sensor in a plastic TO92 package. To respond rapidly to changes in room temperature, the sensor needs to be in good thermal contact with the air. Mounted in a 3-way turned-pin strip underneath the circuit board, it protrudes through a ventilation slot in the back of the case. I tried mounting it inside but the response was too slow. The pins are connected using fine gauge (29 SWG) wire to minimise thermal inertia.

The LM35 produces an output of 10mV per degree Celsius. This is compared to the roomstat setting by a 741 op-amp comparator. The roomstat forms a potential divider between voltages of approximately 50 and 400mV corresponding to a temperature range of 5 to 40 degrees C. The comparator functions as a Schmitt Trigger with positive feedback via resistor R3 providing hysteresis.

The amount of hysteresis depends on the Thevenin equivalent source resistance of the potential divider. Unfortunately, it's not constant. Series resistor R2 helps to mask the spread. Hysteresis can be increased by increasing R2 or reducing R3. With the values shown, it's about 0.7 degrees at the roomstat midpoint. It varies from 0.5 to 0.9 over the full range.

A simple improvement would be to buffer the roomstat potentiometer output using half of a DIP 8 packaged dual op-amp such as the LF353N as a voltage follower - the other half being the comparator. This would yield a constant and easily programmable amount of hysteresis.

Transmitter

JFET Q2 is a Hartley oscillator producing a sine wave of high purity. There's enough noise and interference on the mains as it is! The oscillator frequency is controlled by tuned circuit C14, L1.

Q1 and Q3 form a buffer amplifier of modest gain. The ratio R13/R9 sets the AC gain whilst R13/R12 sets the DC operating point. Basically, ignoring Q3 base current, select values to give one VBE drop across R12. R14 then sets Q1 emitter current and hence the output impedance. R12 does not affect gain because Q3 base is a virtual earth. R9 sets the input impedance.

The amplifier and oscillator are only powered up (via D2) when required. Q1 collector conveniently provides a constant current sink of around 12mA for the LED. Capacitor C10 is more than twice the value found necessary to cure a high-frequency (5 MHz) spurious oscillation.

The output is coupled to the mains via 1:1 isolating transformer T2. This was salvaged from the switched mode power supply of an old video monitor. It looked to be wound with heavy gauge wire and proved to have adequate frequency response. Coupling capacitors C4 and C5 have a high reactance (318k) at 50 Hz falling to only 159 ohms at 100 KHz. It's essential to use high voltage capacitors because they must withstand the peak mains voltage. Transient suppressor TS1 protects Q1 from spikes of more than 10V.

Receiver

The receiver utilises an NE567 tone decoder preceded by an amplifier and double-tuned pre-selector. It can pick out a weak 100 KHz carrier in the presence of strong adjacent channel interference and noise. A TLP598G "photo relay" provides galvanic isolation from the boiler remote control loop. The TLP598G is rated to 400V in the off state. My boiler actually uses a 24V DC system for which a simpler opto-isolator would suffice.

A three position (centre-off) toggle switch provides test and override facilities. The piezo sounder signals carrier detection in the test position. It's loud enough to be heard throughout the house. Manual override enables the boiler to be fired in the event of a fault. Note: When the test switch is closed, the photo-diode is subjected to its maximum rated reverse bias of 5V because the unregulated DC supply is about 10V.

As a minimum, the NE567 requires three external capacitors and one resistor. The centre frequency is programmed by capacitor C1 and the 10-turn preset. C1 should be a high quality 1% part. C2 controls the detection bandwidth and C3 is the output filter. Design equations can be found on the manufacturer's datasheet.

Increasing C2 reduces detection bandwidth. This improves adjacent channel rejection but reduces tolerance to drift. It's about 4 KHz with the value shown. The pre-selector helps by attenuating adjacent frequencies. Bandwidth also depends on amplitude. The system copes easily with strong signals on 92 KHz in my locality. Note: X10 uses 120 KHz.

The output filter C3 prevents false triggering and drop-outs on transients but output chatter worsens as it's increased. Chatter can be eliminated by applying positive feedback between pins 8 and 1. See the datasheet for details. Fortunately, boilers are designed to cope with contact bounce from mechanical thermostats and a little chatter can be tolerated.

The best way to align the NE567 is to connect a frequency counter to pin 5 and adjust the free-running centre frequency with no input signal. The pre-selector is peaked by connecting an oscilloscope to the collector of Q1. The received signal is amplitude modulated because insertion loss over the mains varies at twice line frequency.