Microchip Technology

user Occupation hasn't been added

Company Logo Microchip

  • X-10 Home Automation

  • Created: May 18, 2016

    • view1104
    • comment0
    • bookmark0
    • fork2


No description available.


The X-10 standard used for home automation is a communication protocol developed to send information over the 120VAC mains. It uses 120kHz bursts timed with the power line zero-crossings to represent digital information. There are many plug-in modules nowadays that can be used to set up home automation systems by using the existing AC wiring within the home. However, proper circuit isolation must be done in order to avoid damages to the devices or controllers being used.

In this reference design, the X-10 based home automation controller allows the user to program the on and off times of the devices being controlled. It can control up to 16 devices by means of a 16x2 LCD and five push buttons for menu navigation. The X-10 hardware functionality in this design is limited only to zero-crossing detector, 120kHz carrier detector, 120kHz signal generator, and transformerless power supply. However, functions like user interface, real-time clock, control data storage, light sensing, and switching are still part of the design but not directly associated with the X-10 interface. In X-10 protocol, the information is timed with the zero-crossings of the AC power. A zero-crossing detector is created by the external interrupt on the RB0 pin of the PIC16F887A microcontroller. To receive X-10 signals, it is necessary to detect the presence of the 120kHz signal on the AC power line. This is accomplished with a decoupling capacitor, a high-pass filter, a tuned amplifier, and an envelope detector. The first two stages of the hex inverter are tuned amplifiers with 120kHz peak response, while the next two stages provide additional amplification. The amplified 120kHz signal is passed through an envelope detector; formed with a diode, capacitor, and resistor. The envelope detector output is buffered through an inverter and presented to an input pin (RC3) of the PIC16F887. The X-10 protocol uses 120kHz modulation to transmit information over 60Hz power lines. The RC2/CCP1 pin of the PIC16F887A microcontroller is used to generate a 120kHz square-wave signal with a duty cycle of 50%. Since the X-10 protocol specifies a standard carrier frequency of 120kHz with +/-2kHz tolerance, a 7.680MHz external crystal oscillator is chosen so that with proper PWM setting calculation, the PIC16F887A microcontroller internal CCP module can generate an exact 120kHz carrier. To be compatible with other X-10 receivers, the maximum delay from the zero-crossing to the beginning of the X-10 envelope should be about 300us. Since the zero-crossing detector has a maximum delay of approximately 64us, the firmware must take less than 236us after detection of the zero-crossing to begin transmission of the 120kHz envelope.

The transformerless power supply provides power to the whole circuit and is composed of a VDR, X2 rated capacitors, rectifier diodes, a filtering capacitor, and a zener diode. The 130V VDR (voltage dependent resistor) connected between Line and Neutral protects the circuit from the AC power line spikes. The two 2.2uF 250V X2 rated capacitors connected in parallel with a 1.1M resistor permits the power supply to operate without a step down transformer. The two diodes rectify the voltage across the 1000uF filter capacitor and the 5.1V Zener diode regulates the voltage to approximately 5V. A load switch is included on the home controller so that it may act as a lamp module, with its own house and unit address. A Triac was selected as the load switch, because its medium power switching capacity and rapid switching capability make it well suited for lamp control and dimming.