Global Sources
EE Times-India
Stay in touch with EE Times India
EE Times-India > Embedded

The fundamentals of home automation system design

Posted: 07 Jul 2014     Print Version  Bookmark and Share

Keywords:Home automation  appliances  network  system-on-chip  remote control units 

Figure 7 shows a complete home automation system design. The various components used include:

ADC: The ADC is used to take the readings from the temperature and gas sensors, sample the sensors, and provide a digital value which the CPU can use to make intelligent control decisions.

Thermistor: This component provides an API to convert the digital reading of the temperature sensor into temperature.

SPI: The SPI component directly interfaces with the various peripherals like NFC, Ethernet, etc. This interface uses an additional de-multiplexer to address multiple communication modules using a single host.

I2C: The I2C component interfaces to an RTC and can be expanded to connect to any I2C slave device.

Hex keypad: This is a custom component implemented inside the design environment. This component reads a key press detected in a 4x4 keypad using a state machine designed with UDBs.

IrDA Decoder: This component takes the signal from an IrDA receiver, decodes the signal, and provides the decoded result to the CPU for evaluation and action (figure 8).

Figure 7: Architecture for home automation system as shown in PSoC Creator.

Figure 8: IrDA decoder circuit diagram.

Internal circuit of custom components: SoC design tools provide developers with the flexibility to design custom components using common system blocks as well as hide the complex of circuits behind a simple-to-use block. The above design uses two custom components:

IrDA Decoder (figure 8): This block decodes infrared signals encoded using the RC5 protocol. An RC5 data packet normally has 14 bits, which are sent in the Manchester encoded format (figure 9).

Figure 9: Manchester encoded remote output.

The Bit Extractor block shown in figure 8 recovers the bit and the clock from the incoming signal from the TSOP IrDA receiver in the following manner: The first XOR gate recovers the buried clock from the signal. This signal triggers the PWM component with a period that is ¾ of the serial clock. When the PWM reaches the terminal count it triggers the second DFF to sample the inverted signal. This inverted DFF output signal is inverted once again before being transferred to the shift register. A Lookup Table (LUT) is used to count the number of bits received, and once the 14th bit is received, an interrupt is triggered. In this interrupt, the CPU reads the received data stored in the shift register.

Hex keypad: A Hex Keypad (figure 10) is a 16-button input divided into four columns and four rows to give (4 x 4 =) 16 unique keys. In the given component, one of the column pins is driven low and the rows are read.

Figure 10: Hex keypad decoder circuit diagram.

If a key press is not detected, then the next column pin is driven low and the previous pin is driven high. A key press is detected when a row pin goes low when the corresponding column pin is pulled low. Key press detection makes the 'valid' line go high. This valid terminal is used to generate an interrupt. Inside this interrupt, the CPU will read the 'Key Reg' register to get information about the pressed key.

About the author
Rahul Raj Sharma is an Applications Engineer at Cypress Semiconductors on USB devices. He has worked on PSoC applications and loves doing analogue and mixed signal designs.

Tushar Rastogi is an Applications Engineer at Cypress Semiconductors and has worked on PSoC based applications since 2012. His responsibilities include PSoC firmware programming, application development, technical support to customers with programming, boundary scan related issues, and technical writing.

To download the PDF version of this article, click here.

 First Page Previous Page 1 • 2 • 3 • 4 • 5

Comment on "The fundamentals of home automation ..."
*  You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.


Go to top             Connect on Facebook      Follow us on Twitter      Follow us on Orkut

Back to Top