RF Radio Frequency for Smart home Automation

Introduction

As the rapidly development of science and technology, smart home are changing life style of 21st century’s human beings. With the advancement in technology, the concept of wireless smart home is being investigated in recent years, which the wireless network technology is widely used. Compared to  traditional  wire  network  that  the  wireless  network  have  a  lager  number  of  advantages,  it  can provide  both  significant  cost  savings  in  a  smart  home  environment,  as  well  as  a  great  level  of flexibility and control for the building administrators, and great convenient and comfort for occupants [1], and it is suitable for converting the old ordinary home into modern smart home by avoiding the expensive  and  disruption  of  wiring.  Moreover,  it  is  easy  for  update  and  maintenance.  Wireless network technology used in smart home has become a mainstream. There are many commonly used wireless communication technology, such as infrared data transmission (IrDA), Bluetooth, Wifi, gprs, and ZigBee[2], They all have their own characteristics, each suitable for different data communication occasion.   the  key   parameters   comparison   between  each   form   of  commonly   used   wireless communication [3]is as shown in table 1[2], and the wireless LAN in smart home has the following characteristics:

* A small mount of transfer data needn’t high speed.
* It should be inexpensive and easy for popularize.
* Strong ability to across obstacles in home.
* Due  to  have  a  variety  of  appliances  in  smart  home,  it  should  have  the  capacity  of  large
network.

According to the comparison between different wireless communication technology, the 433Mhz
communication  is  fully  meet  the  requirement  of  wireless  network  in  smart  home.  This  paper  is
concerned with constructing a wireless network in smart home based on 433MHZ communication,
which the wireless module is based on the Si4421. The device has a simple structure, small size, low
power consumption, low cost and across obstacles  [4], it is ideal for home networking. The network
system architecture, wireless module hardware design and software design are introduced as follows.

Table 1.  The key parameters comparison between different short-range wireless communications



2. System Architecture
Smart home is highly-efficient, comfortablesafe and convenient living environment which uses a
home as a platform and puts the buildings, automation and intelligence in one     [1].  Fig.1 shows the
system  architecture  of  the  wireless  LAN  in  smart  home,  it  mainly  consists  of  three  parts:  smart
gateway,  433MHZ  wireless  communicate  module  and   smart  appliance.  Due  to  the  household
appliances uncertainty replacement properties, the wireless networks often need to add or reduce
some smart household appliances, the wireless LAN adopts star network structure, the smart gateway
can communicate with smart appliances through wireless network, which the wireless network is
depended  on  433Mhz  wireless  communication module, the  smart gateway equipped with   master
wireless module and the smart appliances equipped with slave wireless module, in this way, the smart
appliances can centrally manage and control by smart gateway through the wireless LAN[1].


Fig.1 The system architecture of the wireless LAN

3. Hardware Design
The wireless network is mainly based on the wireless module, and it has a direct impaction on the
performance of the smart home system. The wireless module    mainly consists of two components:
Si4421 Universal SISM Band FSK Transceiver and the Microcontroller STM8S103F3, the structure
of wireless module is shown in Fig.2. the internal of wireless module using SPI communication, and
the external of wireless module supply SPI interface for the smart gateway or other smart appliances,
the smart appliances are electrical equipment or products that having their own CPU and the slave
wireless   module[3].   ST  Microelectronics   is   a   leading   manufacturer  of   semiconductors,   the
STM8S103F3 have 16MHz advanced STM8 core with Harvard architecture and 3-stage pipeline, it
has 8Kbytes flash and rich peripheral interface, such as SPI, USART and I2C interface, Embedded
Single Wire Interface Module (SWIM) for fast on-chip programming and non intrusive debugging, it
is highly suited for systems where ultra low power consumption is required [4]. Si4421 is a single chip,
low power, multi-channel FSK transceiver designed for use in applications requiring FCC or ETSI
conformance for unlicensed use in the 433, 868 and 915 MHZ bands[5], its all required RF functions are integrated, Only an external crystal and bypass filtering are needed for operation. The schematic
diagram of the wireless module is shown in Fig.4. The advantages of the designed wireless module
are as follows:
* Low power consumption, 2.2 to 3.8V supply voltage, Low standby current (0.3 µA).
* Adopt SPI communication, High bit rate up to 115.2 kbps 
* Strong penetration ability, Indoor transmission distance up to 50 m.
* Simple construction and low cost, the frequency band of 433MHZ is license free frequency bands
* Strong anti-jamming capability and low error rate

            
Fig 3. The structure of wireless module         Fig .4 Wireless communication module schematic diagram


4. Software Design
The software design is the importance and difficulty of the system, it related to the performance of
the  wireless  network[6],  the  custom  wireless  communication  protocol  and  the  framework  of  the
program are introduced as follows. 
4.1 The custom wireless communication protocol
In  radio  frequency  communications,  it  often  exist  a  lot  of  interference  signals,  the  wireless
communicate module may randomly send some invalid data that the processor even without sending
data or instructions[7], in order to ensure the reliability of the appliances data transmission in the entire
wireless network in smart home, it is necessary to design a wireless communication protocol to avoid
data  collisions  and  standardize  the  transmission  of  wireless  data  .  the  wireless  communication
protocol can improve the anti-jamming performance of the system. the structure of custom appliances
wireless communication protocol was shown in Fig. 5 , it includes the direct section ,length section,
control section, data section, CRC section and the affirm section . 



The custom wireless communication protocol mainly used to regulate the communication between
the master device and sub device, which the master device contain the master wireless module and the
sub device contain the slave wireless module. The data and control instructions of appliances transmit
in the custom packet form via the wireless module [6].The first byte of the data interaction was sent by
the master wireless module, it determine the direction of data transmission, in which data 0x0f0f
means the data transmit from master device to sub device, and data 0xf0f0 means the data transmit
from  slave device to  master device. If the data transmission is from master device to slave device
(direct section is 0xf0f0), then the length section, control section, data section and the CRC section
were sent by the master device, the affirm section was sent by the sub device. Similarly if the data transmission is from sub device to master device (direct section is 0x0f0f), then the length section,
control section, data section and the CRC section were sent by the sub device, the affirm section was
sent by the master device. The control section mainly used to manage the data transmission of the
wireless network, it has several types, includes data frame, affirm frame, module busy frame, sub
address frame, main address frame, network frame and so on. The structure of data section was shown
in  Fig.6.  It  contain  the  detail  information  of   the  smart  appliances,  such  as  the  product  type,
manufacture company, product ID and the various status of the product functions. The CRC section
was used for verification and the affirm section was used to judge whether the data is correct, which
the code 0X12 means the receive data was the same to the send data and the code 0X21 means the data
has transmission error. All in all, the protocol provides a more flexible and more convenient control
for the wireless data transmission in smart home system[7].



4.2 The framework of program
The program flowchart of master device is shown in Fig .7. The master wireless module send the
main address to slave wireless module, when the slave wireless module receive the main address it
would feedback an affirm frame, if the master module did not receive the affirm frame it would send
the master address again. The wireless network would be established after it receive the affirm frame,
then the status of the master wireless module was checked, if it is the network frame, it means the
slave  device  was  already  join  the  wireless  network,   then  the  master  should  record  the  smart
appliances’ ID (Each smart appliance has a unique ID code) and update its status, and if it is the data
frame, it means the smart appliances send its status to gateway. if it is the address frame , it means had
smart appliances apply to join the wireless network, the gateway should assign new address for the
appliances. The status of the gateway was checked after the enquiry of the master wireless module, it
would send the instructions to smart appliances if it had constructions, and  it would return to check
the wireless module. Similarly, it program flowchart of the slave device is shown in Fig .8.