Design and Implementation of Smart Home Using ZigBee and Bluetooth
Subject Areas : Majlesi Journal of Telecommunication DevicesMaryam Hoseini Behbahani 1 , Hossein Shamsi 2
1 -
2 -
Keywords: ZigBee, CC2530, Bluetooth, Smart home, Smartphone, Android,
Abstract :
In this paper, a smart home system is designed and implemented by using both ZigBee and Bluetooth technologies at 2.4 GHz frequency. It includes two hardware implementations and an android based application. The first hardware, which is called end device, employs the low power ZigBee standard and is installed on appliances, lightening system, cooling system, and etc to control them. The second hardware, called coordinator, employs both ZigBee and Bluetooth. There is only one coordinator in each home, which acts as an interface between the user and end devices. It communicates with end devices through ZigBee and with users cellphone through Bluetooth. In this smart home, the Zigbee and Bluetooth protocols are implemented by using CC2530 chip and HC05module, respectively. The smart home utilizes the star network topology. Once the user wants to control something, by using the user interface on his/her smart phone, the Bluetooth of the cellphone is enabled and a radio signal is sent to HC05 Bluetooth module. This module converts the wireless Bluetooth signal to the wired TTL signal and sends it through a cable to the coordinator. Corresponding to the received signal, the coordinator broadcasts ZigBee wireless signal in an 80 square meters house. All end devices receive coordinator’s signal and consequently the relevant end device responds to the coordinator by sending an acknowledge and changing the lightening or cooling system status. In other words, each authorized cellphone can act like a remote control hardware. Furthermore, in this work, MAC address of the authorized cellphones is used for increasing the security.
[1] A. Harrouz, M. Abbes, I. Colak and K. Kayisli, "Smart grid and renewable energy in Algeria," 2017 IEEE 6th International Conference on Renewable Energy Research and Applications (ICRERA), San Diego, CA, 2017, pp. 1166-1171.
[2] B. K. Barman, S. N. Yadav, S. Kumar and S. Gope, "IOT Based Smart Energy Meter for Efficient Energy Utilization in Smart Grid," 2018 2nd International Conference on Power, Energy and Environment: Towards Smart Technology (ICEPE), Shillong, India, 2018, pp. 1-5.
[3] H. L. M. do Amaral, J. A. G. Maginador, R. M. J. Ayres, A. N. de Souza and D. S. Gastaldello, "Integration of consumption forecasting in smart meters and smart home management systems," 2018 Simposio Brasileiro de Sistemas Eletricos (SBSE), Niteroi, 2018, pp. 1-6.
[4] A. Anbarasi and M. Ishwarya, "Design and implementation of smart home using sensor network," 2013 International Conference on Optical Imaging Sensor and Security (ICOSS), Coimbatore, 2013, pp. 1-6.
[5] J. Byun, B. Jeon, J. Noh, Y. Kim and S. Park, "An intelligent self-adjusting sensor for smart home services based on ZigBee communications," in IEEE Transactions on Consumer Electronics, vol. 58, no. 3, pp. 794-802, August 2012.
[6] Sathesh, Yasir Babiker Hamdan, “Smart Home Environment Future Challenges and Issues - A Survey” Journal of Electronics and Informatics, vol.3, no.1, 2021.
[7] Eva-Maria Schomakers, Hannah Biermann, and Martina Ziefle. 2021. Users’ Preferences for Smart Home Automation – Investigating Aspects of Privacy and Trust. Telemat. Inf. 64, C, Nov 2021.
[8] Jo’rayev Vohid Tojimamatovich and Xalilova Muhabbat Alimdjanovna, “CLIMATE CONTROL AND LIGHT CONTROL IN A SMART HOME”, Euro. Jour. of Inte. Res. and Dev., vol. 8, pp. 149–155, Oct. 2022.
[9] Ma, C., Guerra-Santin, O. & Mohammadi, M. Smart home modification design strategies for ageing in place: a systematic review. J Hous and the Built Environ 37, 625–651 (2022).
[10] Donghang Liu, Chensi Wu, Lulin Yang, Xiaoying Zhao, Qifeng Sun, "The Development of Privacy Protection Standards for Smart Home", Wireless Communications and Mobile Computing, vol. 2022, Article ID 9641143, 10 pages, 2022.
[11] Olutosin Taiwo, Absalom E. Ezugwu, "Internet of Things-Based Intelligent Smart Home Control System", Security and Communication Networks, vol. 2021, Article ID 9928254, 17 pages, 2021.
[12] Ching-Han Chen, Ming-Yi Lin and Wen-Hung Lin, “Designing and Implementing a Lightweight WSN MAC Protocol for Smart Home Networking Applications”, Journal of Circuits, Systems and Computers, vol.26, no. 3, 2017.
[13] Rebecca Jamwal, Hannah K. Jarman, Eve Roseingrave, Jacinta Douglas & Dianne Winkler, “Smart home and communication technology for people with disability: a scoping review”, Disability and Rehabilitation: Assistive Technology, 17:6, 624-644, 2022.
[14] R. Panna, R. Thesrumluk, and C. Chantrapornchai, “Development of Energy Saving Smart Home Prototype,” International Journal of Smart Home, vol. 7, pp. 47-65, Jan 2013.
[15] S. J. Danbatta and A. Varol, "Comparison of Zigbee, Z-Wave, Wi-Fi, and Bluetooth Wireless Technologies Used in Home Automation," 2019 7th International Symposium on Digital Forensics and Security (ISDFS), Barcelos, Portugal, 2019, pp. 1-5
[16] D. M. Han, J. H. Lim, “Smart home energy management system usingIEEE 802.15.4 and zigbee,” IEEE Transactions on ConsumerElectronics, vol. 56, pp. 1403-1410, Aug. 2010.
[17] S. Marksteiner, V. J. Exposito Jimenez, H. Valiant and H. Zeiner, "An overview of wireless IoT protocol security in the smart home domain," 2017 Internet of Things Business Models, Users, and Networks, Copenhagen, 2017, pp. 1-8.
[18] P. Li, Y. Yan, P. Yang, X. Li and Q. Lin, "Coexist WiFi for ZigBee Networks With Fine-Grained Frequency Approach," in IEEE Access, vol. 7, pp. 135363-135376, 2019.
[19] M. Clarke, J. de Folter, V. Verma and H. Gokalp, "Interoperable End-to-End Remote Patient Monitoring Platform Based on IEEE 11073 PHD and ZigBee Health Care Profile," in IEEE Transactions on Biomedical Engineering, vol. 65, no. 5, pp. 1014-1025, May 2018.
[20] Texas Instruments Inc., “CC2530 Datasheet,”SWRS081B, 2011.
[21] Xin Li, “Design of ZigBee Network Node Based on CC2530”, PLC&FA, pp.97-99, Mar.2011.
[22] C. Boyer and S. Roy, “Backscatter Communication and RFID: Coding, Energy, and MIMO Analysis,” IEEE Transactions on communications, Vol. 62, No. 03, pp. 770–785, 2014.
[23] H. Landaluce, A. Perallos, E. Onieva, A. Laura and L. Bengtsson, “An Energy and Identification Time Decreasing Procedure for Memoryless RFID Tag Anti-Collision Protocols,” IEEE Transactions on Wireless Communications, Vol. 15, No. 06, pp. 4234-4247, 2016.
[24] A. Alma'aitah, H. S. Hassanein and M. Ibnkahla, “Tag Modulation Silencing: Design and Application in RFID Anti-Collision Protocols,” IEEE Transactions on Communications, Vol. 62, No. 11, pp. 4068–4079, 2014.
[25] F. Nafar and H. Shamsi, "Design and Implementation of an RFID-GSM-Based Vehicle Identification System on Highways," in IEEE Sensors Journal, vol. 18, no. 17, pp. 7281-7293, 1 Sept.1, 2018.
[26] Jian-Ming Liao, Xue-Qin He, Guo-Ming Lu1, Si-Yu Zzhan, “The research and design of ZigBee wireless networking based on CC2530” 2013 10th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP)
[27] Francesca Cuomo, Anna Abbagnale and Emanuele Cipollone,”Cross-layer network formation for energy-efficient IEEE 802.15.4/ZigBee Wireless Sensor Networks”,Ad Hoc Networks,Vol 11, No. 2, pp.672-686,Mar.2013.
[28] Texas Instruments Inc., “CC2530 User’s Guide,”SWRU191D, 2013.
[29] IEEE Std. 802.15.4-2006: Wireless Medium Access Control (MAC) and Physical Layer (PHY) specifications for Low Rate Wireless Personal Area Networks (LR-WPANs)
[30] Adam Gschwender and Ata Elahi, “Zigbee Wireless Sensor and Control Network” Prentice Hall, 2009.
[31] Boris Mihajlov1, Mitko Bogdanoski,“overview and analysis of the performances of ZigBee-based wireless sensor networks in International Journal of Computer Applications 29(12):28-35 · September 2011.
[32] T. Nimi and P. Samundiswary, "Comparative Performance evaluation on Priority based ZigBee Network with tree and mesh routing," 2018 4th International Conference on Electrical Energy Systems (ICEES), Chennai, 2018, pp. 691-695
[33] S. G. Varghese, C. P. Kurian, V. I. George, A. John, V. Nayak and A. Upadhyay, "Comparative study of zigBee topologies for IoT-based lighting automation," in IET Wireless Sensor Systems, vol. 9, no. 4, pp. 201-207, 8 2019.
[34] HC05-Bluetooth to Serial Port Module datasheet.
[35] Panjaitan, S.D., Hartoyo, A.: ‘A lighting control system in buildings based on fuzzy logic’, Telkomnika, 2011, 9, (3), p. 423.
Majlesi Journal of Telecommunication Devices Vol. 14, No. 1, March 2025
Design and Implementation of Smart Home Using ZigBee and Bluetooth
Maryam Hoseini Behbahani1, Hossein Shamsi2
1- Department of Electrical Engineering, K. N. Toosi University of Technology, Tehran, Iran.
2- Department of Electrical Engineering, K. N. Toosi University of Technology, Tehran, Iran.
Email: shamsi@eetd.kntu.ac.ir (Corresponding author)
ABSTRACT: — In this paper, we present the design and implementation of a smart home system that utilizes ZigBee and Bluetooth technologies, both operating at a frequency of 2.4 GHz. The smart home system consists of end devices, a coordinator (router), and an Android-based application. The end devices are installed on various appliances, including lighting and cooling systems. The coordinator is equipped with a Bluetooth module that facilitates communication with smartphones, serving as the interface between users and the end devices. This interface communicates with the end devices via ZigBee and interacts with the user’s smartphones through Bluetooth. For this smart home system, the ZigBee and Bluetooth protocols are implemented using the CC2530 chip and HC05 module, respectively. The system employs a star network topology. When a user wants to control a device, they initiate the process using the user interface on their smartphone. After activating Bluetooth on their smartphone, a radio signal is sent to the HC05 Bluetooth module. This module converts the wireless Bluetooth signal into a wired TTL signal for the CC2530 chip. The ZigBee wireless signal is then broadcast throughout the 80-square-meter home. All end devices receive the signal, and the target end device responds to the coordinator by sending back an acknowledgment and changing the status of lighting or cooling system as requested. Essentially, each authorized smartphone functions like a remote control. Additionally, to enhance security, the MAC address of authorized smartphones is utilized in the system.
KEYWORDS: ZigBee, CC2530, Bluetooth, Smart home, Smartphone, Android.
|
1. INTRODUCTION
Advancements in ad-hoc wireless networks, single-chip embedded systems, and the increased access to the Internet in households have enabled the remote monitoring of external data sources and home appliances through the use of small, autonomous wireless devices [1]. Currently, organizations utilize IEEE802.15.4 and ZigBee to successfully implement solutions across various domains, such as controlling consumer electronic devices, managing energy, enhancing efficiency in both residential and commercial buildings, and overseeing industrial plant operations. The Smart home energy network has gained widespread attentions due to its flexible integration into everyday life. This innovative green home system integrates home appliances, smart sensors, and wireless communication technologies. Over time, the green home energy network evolves into a complex system capable of managing a variety of tasks [2].
Low-cost sensors and ubiquitous wireless networking is facilitating innovative methods for homeowners to engage with their smart home systems. A variety of complementary techniques are being developed, including the utilization of voice commands, tactile interactions through touch or weight, and the incorporation of body gestures [3,4]. The smart home can be monitored either on mobile platforms or on web-based platforms [5]. A few novel researches on smart home are reported as follows [6-13].
In [6], a system is proposed to implement control boards for IoT applications utilizing microcontrollers from the Espressif series, capable of operating within any IoT network for home automation. In [7], a lighting monitoring and control system based on IoT is presented, which utilizes a ZigBee wireless network tailored for smart homes. This system features capacitive touch switches, smartphones, and a comprehensive integrated management platform. Through the app, users can observe the status of household devices, enhancing the limitations of conventional remote-control designs and contributing to energy conservation.
The emergence of IoT and cloud computing technologies has facilitated the development of smart homes. Nevertheless, the comprehensive system utilized by IoT, along with remote cloud access, presents challenges in terms of cost and time efficiency when it comes to managing and overseeing numerous smart devices. In [8], a framework for IoT-based smart home control and monitoring is proposed to address these issues. Specifically, it employs a naming mechanism that allows for the management of multiple devices through a single command delivery process. Additionally, it utilizes edge cloud technology to implement both the host tracking and naming mechanisms, enabling local monitoring of various appliances through a unified data delivery approach. The advantages of smart homes have made them a necessary part of modern human life. Nevertheless, it is vital to prioritize the security of these smart environments to safeguard personal data, avert unauthorized access, enhance physical safety, and mitigate the risks of cyber-attacks. A fundamental measure in securing smart homes involves the establishment of robust authentication protocols. Reference [9] discusses a standard architecture for smart homes utilizing IoT and introduces several recent authentication protocols applicable to this context.
The recognition of individuals entering a room or building is advantageous for delivering tailored smart home services. Traditional identification methods that rely on image analysis necessitate extra actions from individuals for successful identification, and they may also raise privacy issues due to the potential inclusion of unintended individuals in the captured images. In [10], a new scheme is proposed to identify an individual from door opening and closing motions.
A critical concern in the realm of wireless networking is energy consumption. As technology continues to evolve, manufacturers struggle with the challenge of battery longevity—specifically, how long a battery will last before requiring a recharge. Enhancing battery technology is both complex and costly, making low power consumption a pressing challenge for every system. In light of Wi-Fi's reputation for being power-intensive, researchers have shifted their focus toward ZigBee networks, which offer an affordable, energy-efficient, and highly reliable alternative. ZigBee technology is perfectly suited for public spaces like schools and libraries, making it a versatile choice [14-16]. Based on the IEEE 802.15.4 standard, ZigBee is explicitly designed for small-scale projects that require low-rate wireless connectivity. It operates within the ISM bands of 913 MHz, 868 MHz, and 2.4 GHz, typically covering a range of 10-100 meters. ZigBee supports three network topologies—star, tree, and mesh—and can accommodate up to 65,000 nodes, making it a robust choice for various applications [17]. However, the extensive adoption of ZigBee networks has been hindered by coexistence issues with Wi-Fi. While earlier attempts at time-domain contention resolution led to underutilization of frequency resources, recent innovations like COFFEE (Coexist Wi-Fi for ZigBee networks) are paving the way for effective coexistence, optimizing usage for both technologies [18]. Moreover, ZigBee excels at bridging home automation with other areas, such as those governed by the IEEE 11073 standard, which encompasses Telehealth and Telecare [19]. This unique capability significantly enhances the functionality of in-home gateways, positioning ZigBee as a revolutionary solution for interconnected living.
Fig. 1. Proposed smart home architecture.
Conventional smart homes often rely on remote-control hardware to manage various devices, which leads to increased costs due to the need for additional equipment. This paper proposes an android-based user interface application that utilizes smartphones as the remote-control hardware. This approach not only reduces costs but also enhances user convenience. Figure 1 illustrates the overall concept. Smartphones can connect to the coordinator to control household appliances. As shown in the figure, end devices should be considered for different appliances, including lighting, cooling, and heating systems.
However, a challenge arises because most modern smartphones do not support the ZigBee protocol. To address this issue, we incorporate the users' smartphone Bluetooth along with the HC05 Bluetooth module, which acts as part of the coordinator (router) within the home network.
In this setup, each resident can communicate with the HC05 Bluetooth module using their personal mobile devices. They can send commands to turn specific devices on or off. Upon receiving a command, the HC05 Bluetooth module forwards it via a cable to the coordinator's ZigBee component, which then broadcasts the command throughout the home. All connected end devices receive this broadcast, but only the targeted device acknowledges the command and responds by turning on or off as instructed.
The end devices utilize the low-power ZigBee protocol and are installed on appliances, lighting systems, cooling systems, and other household equipment for effective control.
The rest of this paper is organized as follows: section II reviews the ZigBee protocol and the ZigBee network topologies briefly. Section III describes the system implementation including the user interface software, home coordinator hardware and the end device hardware. The firmware is described in section IV. Test results are given in section V and finally the paper is concluded in section VI.
II. ZIGBEE PROTOCOL AND NETWORK TOPOLOGY
ZigBee protocol consists of four layers as follows [26]: application layer, network layer, MAC layer, PHY layer. The MAC and PHY layers are defined by IEEE802.15.4, while network and application layers are defined by ZigBee Alliance [27].
The PHY layer is responsible for physical channel data transmission and management. Figure 2 shows the frame structure of the PHY and MAC layers. PHY layer frame consists of the synchronization header, the PHY header and the PHY service data unit. The synchronization header (SHR) consists of the preamble sequence followed by the start-of-frame delimiter (SFD).
Fig. 2. Frame structure in IEEE 802.15.4 standard [28].
In the IEEE 802.15.4 specification [21], the preamble sequence is defined to be 4 bytes of 0x00. The SFD is one byte with value 0xA7. The PHY header consists only of the frame-length field. The frame-length field defines the number of bytes in the MAC protocol data unit (MPDU). The value of the frame-length field does not include the frame-length field itself. It, however, includes the frame-check sequence (FCS), even if this is inserted automatically by the hardware. The PHY service data unit (PSDU) contains MPDU. The function of the MAC layer is to generate or interpret the MPDU, and the radio has built-in support for processing of some of the MPDU subfields [20]. The network layer is responsible for establishment of topology and maintenance of network connections, as well as route discovery and route forwarding for equipment. Application layer is composed by the application support sub-layer (APS), ZigBee device configuration and user application layer. APS mainly provides ZigBee endpoint interface. ZigBee device configuration layer provides standard ZigBee configuration services. The user application is developed based on user’s needs [18].
ZigBee uses the IEEE 802.15.4 2003 specification for its physical and MAC layers. IEEE 802.15.4 offers star, tree, cluster tree, and mesh topologies; however, ZigBee supports only star, tree, and mesh topologies [22]. Each topology is explained in details below.
Fig. 3. Star topology [30].
Star topology: The star topology, as depicted in Figure 3, consists of a coordinator and several end devices (or nodes). In this setup, end devices cannot communicate directly with one another. Instead, they must first send their messages to the coordinator. As a result, all network traffic passes through the coordinator, which can create a potential bottleneck. If the coordinator becomes inoperable at any point, the performance of the entire network will be affected. Despite this drawback, the advantage of star topology lies in its simplicity and ease of use.
Fig. 4. Tree topology [30].
Tree topology: In this network topology, there is a central node known as the root tree, which serves as a coordinator. The network also includes several routers and end devices, as illustrated in Figure 4. Routers extend the network's coverage, while the end devices connected to either the coordinator or the routers are referred to as children. Only routers and the coordinator can have children; therefore, they are the only devices that can act as parents. End devices cannot have children, meaning they cannot be parents themselves. Each end device can only communicate with its parent, which may be a router or the coordinator. In this setup, the coordinator is positioned at the highest level. For any message to reach its destination, it must first pass through the parents of the destination node. Consequently, there is only one route for each message, which makes the communication less reliable [31].
Fig. 5. Mesh topology [30].
Mesh topology: This topology offers greater flexibility by providing multiple routes for each message transmitted within the network. The primary advantage is that if one path becomes unavailable or encounters an issue that prevents the message from passing through, there are alternative paths available to ensure successful delivery. This redundancy enhances the reliability of the system, as it minimizes the impact of potential disruptions.
However, it is important to note that while this topology improves message routing and reliability, it may also lead to increased costs. The existence of multiple routes can require more resources, such as additional cabling or advanced routing equipment, which can contribute to higher operational expenses. Therefore, while the flexibility offered by this topology is beneficial, network designers must carefully consider the trade-offs between reliability and cost-effectiveness. Balancing these factors is crucial for optimizing network performance while managing expenditures.
The star topology is commonly used in smart homes, PC peripherals, and similar applications. The tree topology is effective for medium-sized networks in terms of coverage. On the other hand, the mesh topology is suitable for industrial control, logistics systems, and so forth [32]. Research indicates that the star network provides the best performance in terms of end-to-end delay, jitter, and throughput [33]. In this paper, we choose to use star topology because, in a home environment, the distances are short and there are only a few end devices, making the complexity of tree or mesh networks unnecessary.
2. SYSTEM IMPLEMENTATION
The implementation of the smart home system consists of three main subsystems. The first is the user interface software, which is an application developed using the Android programming language. This application must be installed on the smartphone of each user. It utilizes Bluetooth to connect to the HC05 Bluetooth module, which is part of the coordinator system.
The coordinator also includes a ZigBee module, and these two components are connected via TTL serial communication. It is important to position the coordinator properly to ensure it covers the entire house and can communicate with all end devices. The coordinator communicates with the end devices, which make up the third subsystem, using ZigBee. For each device that the user wishes to control, one end device is required.
In this project, we designed, implemented, and tested cost-effective hardware for both the coordinator and the end devices. We utilized the CC2530F256, which integrates an 8051-microcontroller unit (MCU) and a 2.4GHz ZigBee-compliant RF transceiver into a single system-on-chip (SoC). This integration eliminates the need for additional hardware, thereby reducing costs, circuit complexity, and high-frequency noise.
User interface software: By using this application, users can control various aspects of their home, such as lighting and the cooling system, directly from their smartphones. Additionally, they can monitor the status of different devices in their house, including the conditions of the lighting system. Figures 6 and 7 display the user interface of the software provided. When users access each section for the first time, they can view the current status of each device and make changes if desired. Figure 7 illustrates the window related to the cooling system.
Fig. 6. The main window of the provided user interface software.
Fig. 7. The window relevant to the cooling system.
Coordinator: The main job of the coordinator is to receive the user’s command from Bluetooth module and send it in the range
of 80m for the end devices. Moreover, the coordinator should do the reverse; receives the response from end device and send it to Bluetooth module. The hardware of the coordinator (Figure 9) includes a microprocessor and a 2.4GHz IEEE802.15.4 compliant RF transceiver integrated in a low-power single chip CC2530F256, a monopole 2.4GHz antenna, a voltage regulator, an oscillator and HC05 module.
Fig. 8. Implemented coordinator hardware.
HC-05 module is a Bluetooth SPP (Serial Port Protocol) module. It can connect to the serial port of a microcontroller, which allows the microcontroller to communicate with other devices over a Bluetooth connection. It uses CSR Bluecore 04-External single chip Bluetooth system with CMOS technology and with AFH (Adaptive Frequency Hopping Feature) [34]. AFH helps to minimize the effects of interference with other devices. In Frequency Hopping technique when a link is formed, the devices are synchronized to change channels together many times a second. The pattern of channels used is called the hop sequence and is unique for each link. Since the devices spend only small amounts of time on a particular channel and because the hop sequence is different for each link the possibility of interference is minimized. HC05 can run in both master and slave modes. In this project it is used in slave mode, and its duty is to transfer data between the coordinator and cell phone. HC05 is connected through the UART to the CC2530F256 (coordinator). In other words, each user by enabling the Bluetooth of his/her own smart phone can connect to HC05, and consequently can indirectly transfer his/her own command to coordinator to control end devices. The printed circuit board (PCB) of the HC05 module is shown in Fig.8, where a microstrip antenna is utilized.
Figure 9. HC05 Bluetooth module.
End device: An active end device (Figure 10) is implemented for the proposed smart home. Hardware of the end device corresponds to that of coordinator. The only difference is that it has relay to provide enough current to control the devices. End device works at 2.4GHz and can sense different channels. It saves a lot of space in the hardware because of using SOC instead of separate MCU and RF transceiver. Each end device is attached to a device to control it. End device is waiting until it receives an input command. In this time, the end device switches to the sleep-mode by using the CC2530F256 ultra-low power sleep timer. This is an energy-efficient solution to decrease the end device power consumption while waiting for an incoming signal. At the sleep-mode, the digital voltage regulator is disabled. Neither the 32-MHz XOSC nor the 16-MHz RCOSC is running. SRAM and internal registers save their contents and 32.768 kHz XOSC and sleep timer are active. The system goes to the active mode on reset, an external interrupt, or when the Sleep Timer expires. The measurements show that the designed active end device only consumes 2.64μW in the sleep-mode, meanwhile 68mWpower consumption is achieved in the active mode [20, 25].
Fig. 10. Implemented end device hardware.
3. FIRMWARES
The complete flowchart of the firmware programmed into the coordinator is shown in Figure 11. The coordinator continuously waits for user commands, during which the RF transceiver remains in an idle state to minimize energy consumption. Each end device is assigned a unique identification number, allowing the user to search for them using these IDs.
When the user presses a button on their smartphone, the coordinator receives this command and responds by sending a message containing the unique ID of the targeted device. At this point, every end device receives the message and compares its own ID to the one included in the message. If the IDs match, the end device will control the corresponding instrument, such as a lamp.
Figure 11. Flow chart of the firmware programmed in the coordinator.
The flowchart of the firmware programmed in end devices is shown in Figure 12.
Fig. 12. Flow chart of the firmware programmed in the end device.
The pseudo code of the android application is as follows. This code is repeated for each section such as lighting, cooling and heating system.
If Bluetooth connection is established.
{
Buttons will be activated. (there is one button for each end device.)
Timer will be activated.
Command for checking current status will be sent and according to the received response, background image of buttons will be set.
}
Else {
Buttons will be deactivated.
}
If user click each of the buttons
{
Command for changing status will be sent. (Also, MAC Address will be sent for security reason.)
According to the received response, background image of button will be set.
}
If timer overflow occurs
{
Command for checking current status will be sent and according to the received response, background image of buttons will be set.
}
If error occurs in Bluetooth connection the user is notified to reestablish the connection.
Network security: Security must be a priority in the communication links between the coordinator and end devices, as well as between the smartphone and the coordinator. Each coordinator and end device is assigned a unique address. When communication is initiated, the transmitter sends a message that includes both its own address and the receiver's address. The receiver checks these addresses, and if both are correct, a secure communication channel is established. Therefore, the link is only vulnerable if both addresses are compromised.
To enhance the security of the connection between the smartphone and the coordinator, as well as to authenticate the user, the MAC address (Media Access Control address) is utilized. A MAC address is a hardware identification number that uniquely identifies each device on a network. Each smartphone has its own MAC address, which can be used for network communications.
When a smartphone attempts to connect to the network, it sends its MAC address to the coordinator. The coordinator then checks this address to determine if the smartphone is authorized to join the network; if it is not, access is denied.
4. TEST RESULTS
A key factor in determining the coverage area is the Received Signal Strength Indicator (RSSI), which measures the strength of the received input signal. The RSSI must exceed the receiver sensitivity threshold, which for the CC2530 chip is -97 dBm [23]. The RSSI is influenced by the distance between the coordinator and end devices, as well as the output signal strength of the transmitter. It’s important to understand that higher output strength leads to increased overall power consumption. As a result, there is a trade-off between power consumption and RSSI. To minimize power use, the output signal strength will be adjusted based on the required coverage distance. Figure 13 illustrates the relationship between RSSI and distance for two different output signal strengths.
The proposed system was tested in an 80-square-meter house, where it operated correctly. In homes larger than 80 square meters, blind spots may arise, potentially disrupting the system's operation. In these cases, using a router can help extend the coverage area.
Fig. 13. Received signal strength (RSSI) versus distance.
Another crucial parameter is the Packet Error Rate (PER), which is expressed as a percentage. The PER increases significantly with distance. Consequently, the need to retransmit packets rises, which can lead to congestion if there are too many end devices. The experiment was carried out with two different output power levels, as shown in Figure 14. As expected, higher power levels result in a lower PER, though the difference is not substantial.
Moreover, the reduction in energy consumption is considerable. Since lighting accounts for 25-50% of electricity usage [35], implementing the proposed system in the lighting sector alone can lead to significant energy savings.
Fig. 14. Packet error rate versus distance.
5. CONCLUSION
In this project, we designed the necessary hardware and software for a smart home. The hardware is built using the CC2530 chip, which is a low-power, multifunctional chip that combines both a microcontroller unit (MCU) and radio frequency (RF) components. This integration results in compact dimensions for both the coordinator and the end devices.
Power consumption is a crucial consideration, and we address this by utilizing the CC2530 chip and adjusting the RF output power for the coordinator and end devices based on the area that needs coverage. The combination of ZigBee and Bluetooth technologies allows users to benefit from the low power consumption of ZigBee while leveraging the widespread availability of Bluetooth in their smartphones.
As a result, residents can control their homes using their smartphones, eliminating the need for a separate remote control. This approach not only reduces costs but also enhances comfort for the inhabitants. The system has been tested successfully in an 80-square-meter house, verifying its effective operation.
REFERENCES
[1] I. A. Zualkernan, A. R. Al-ali, M. A. Jabbar, I. Zabalawi and A. Wasfy, "InfoPods: Zigbee-based remote information monitoring devices for smart-homes," in IEEE Transactions on Consumer Electronics, vol. 55, no. 3, pp. 1221-1226, August 2009.
[2] D. -M. Han and J. -H. Lim, "Design and implementation of smart home energy management systems based on zigbee," in IEEE Transactions on Consumer Electronics, vol. 56, no. 3, pp. 1417-1425, Aug. 2010.
[3] W. M. Khan and I. A. Zualkernan, "SensePods: A ZigBee-Based Tangible Smart Home Interface," in IEEE Transactions on Consumer Electronics, vol. 64, no. 2, pp. 145-152, May 2018.
[4] A. Anbarasi and M. Ishwarya, "Design and implementation of smart home using sensor network," 2013 International Conference on Optical Imaging Sensor and Security (ICOSS), Coimbatore, 2013, pp. 1-6.
[5] J. Byun, B. Jeon, J. Noh, Y. Kim and S. Park, "An intelligent self-adjusting sensor for smart home services based on ZigBee communications," in IEEE Transactions on Consumer Electronics, vol. 58, no. 3, pp. 794-802, August 2012.
[6] A. Gozuoglu, O. Ozgonenel and C. Gezegin, "Design and Implementation of Controller Boards to Monitor and Control Home Appliances for Future Smart Homes," in IEEE Transactions on Industrial Informatics, vol. 20, no. 9, pp. 11458-11465, Sept. 2024.
[7] X. -R. Huang, C. -H. Chen and L. -B. Chen, "An Intelligent Lighting Monitoring and Controlling System Based on ZigBee Low-Power Wireless Technology for Smart Homes," 2023 IEEE International Conference on Consumer Electronics (ICCE), Las Vegas, NV, USA, 2023, pp. 1-2, doi:10.1109/ICCE56470.2023.10043566.
[8] X. Wang and X. Qian, "Information-Centric IoT-Based Smart Home Control and Monitoring System," in IEEE Sensors Journal, vol. 24, no. 21, pp. 35722-35729, 1 Nov.1, 2024.
[9] G. Sarbishaei, A. Masoud Aminian Modarres, F. Jowshan, F. Zahra Khakzad and H. Mokhtari, "Smart Home Security: An Efficient Multi-Factor Authentication Protocol," in IEEE Access, vol. 12, pp. 106253-106272, 2024.
[10] K. Iwase and H. Morino, "Person identification using Wi-Fi CSI focusing on door opening and closing motions based on per-channel similarity estimation," 2024 IEEE International Conference on Consumer Electronics (ICCE), Las Vegas, NV, USA, 2024, pp. 1-4, doi: 10.1109/ICCE59016.2024.10444203.
[11] Jo’rayev Vohid Tojimamatovich and Xalilova Muhabbat Alimdjanovna, “CLIMATE CONTROL AND LIGHT CONTROL IN A SMART HOME”, Euro. Jour. of Inte. Res. and Dev., vol. 8, pp. 149–155, Oct. 2022.
[12] Donghang Liu, Chensi Wu, Lulin Yang, Xiaoying Zhao, Qifeng Sun, "The Development of Privacy Protection Standards for Smart Home", Wireless Communications and Mobile Computing, vol. 2022, Article ID 9641143, 10 pages, 2022.
[13] Rebecca Jamwal, Hannah K. Jarman, Eve Roseingrave, Jacinta Douglas & Dianne Winkler, “Smart home and communication technology for people with disability: a scoping review”, Disability and Rehabilitation: Assistive Technology, 17:6, 624-644, 2022.
[14] R. Panna, R. Thesrumluk, and C. Chantrapornchai, “Development of Energy Saving Smart Home Prototype,” International Journal of Smart Home, vol. 7, pp. 47-65, Jan 2013.
[15] S. J. Danbatta and A. Varol, "Comparison of Zigbee, Z-Wave, Wi-Fi, and Bluetooth Wireless Technologies Used in Home Automation," 2019 7th International Symposium on Digital Forensics and Security (ISDFS), Barcelos, Portugal, 2019, pp. 1-5
[16] D. M. Han, J. H. Lim, “Smart home energy management system usingIEEE 802.15.4 and zigbee,” IEEE Transactions on ConsumerElectronics, vol. 56, pp. 1403-1410, Aug. 2010.
[17] S. Marksteiner, V. J. Exposito Jimenez, H. Valiant and H. Zeiner, "An overview of wireless IoT protocol security in the smart home domain," 2017 Internet of Things Business Models, Users, and Networks, Copenhagen, 2017, pp. 1-8.
[18] P. Li, Y. Yan, P. Yang, X. Li and Q. Lin, "Coexist WiFi for ZigBee Networks With Fine-Grained Frequency Approach," in IEEE Access, vol. 7, pp. 135363-135376, 2019.
[19] M. Clarke, J. de Folter, V. Verma and H. Gokalp, "Interoperable End-to-End Remote Patient Monitoring Platform Based on IEEE 11073 PHD and ZigBee Health Care Profile," in IEEE Transactions on Biomedical Engineering, vol. 65, no. 5, pp. 1014-1025, May 2018.
[20] Texas Instruments Inc., “CC2530 Datasheet,”SWRS081B, 2011.
[21] Xin Li, “Design of ZigBee Network Node Based on CC2530”, PLC&FA, pp.97-99, Mar.2011.
[22] C. Boyer and S. Roy, “Backscatter Communication and RFID: Coding, Energy, and MIMO Analysis,” IEEE Transactions on communications, Vol. 62, No. 03, pp. 770–785, 2014.
[23] H. Landaluce, A. Perallos, E. Onieva, A. Laura and L. Bengtsson, “An Energy and Identification Time Decreasing Procedure for Memoryless RFID Tag Anti-Collision Protocols,” IEEE Transactions on Wireless Communications, Vol. 15, No. 06, pp. 4234-4247, 2016.
[24] A. Alma'aitah, H. S. Hassanein and M. Ibnkahla, “Tag Modulation Silencing: Design and Application in RFID Anti-Collision Protocols,” IEEE Transactions on Communications, Vol. 62, No. 11, pp. 4068–4079, 2014.
[25] F. Nafar and H. Shamsi, "Design and Implementation of an RFID-GSM-Based Vehicle Identification System on Highways," in IEEE Sensors Journal, vol. 18, no. 17, pp. 7281-7293, 1 Sept.1, 2018.
[26] Jian-Ming Liao, Xue-Qin He, Guo-Ming Lu1, Si-Yu Zzhan, “The research and design of ZigBee wireless networking based on CC2530” 2013 10th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP)
[27] Francesca Cuomo, Anna Abbagnale and Emanuele Cipollone,”Cross-layer network formation for energy-efficient IEEE 802.15.4/ZigBee Wireless Sensor Networks”,Ad Hoc Networks,Vol 11, No. 2, pp.672-686,Mar.2013.
[28] Texas Instruments Inc., “CC2530 User’s Guide,”SWRU191D, 2013.
[29] IEEE Std. 802.15.4-2006: Wireless Medium Access Control (MAC) and Physical Layer (PHY) specifications for Low Rate Wireless Personal Area Networks (LR-WPANs)
[30] Adam Gschwender and Ata Elahi, “Zigbee Wireless Sensor and Control Network” Prentice Hall, 2009.
[31] Boris Mihajlov1, Mitko Bogdanoski,“overview and analysis of the performances of ZigBee-based wireless sensor networks in International Journal of Computer Applications 29(12):28-35 · September 2011.
[32] T. Nimi and P. Samundiswary, "Comparative Performance evaluation on Priority based ZigBee Network with tree and mesh routing," 2018 4th International Conference on Electrical Energy Systems (ICEES), Chennai, 2018, pp. 691-695
[33] S. G. Varghese, C. P. Kurian, V. I. George, A. John, V. Nayak and A. Upadhyay, "Comparative study of zigBee topologies for IoT-based lighting automation," in IET Wireless Sensor Systems, vol. 9, no. 4, pp. 201-207, 8 2019.
[34] HC05-Bluetooth to Serial Port Module datasheet.
[35] Panjaitan, S.D., Hartoyo, A.: ‘A lighting control system in buildings based on fuzzy logic’, Telkomnika, 2011, 9, (3), p. 423.
Paper type: Research paper
https://10.71822/mjtd.2025.1092379
Received: 16 February 2024; Revised: 23 May 2024; Accepted: 16 July 2024; Published: 1 March 2025
How to cite this paper: M. H. Behbahani, H. Shamsi, “Design and Implementation of Smart Home Using ZigBee and Bluetooth”, Majlesi Journal of Telecommunication Devices, Vol. 14, No. 1, pp.19-30, 2025.
19