{'fraction_non_alphanumeric': 0.02355056179775281, 'fraction_numerical': 0.005842696629213483, 'mean_word_length': 4.585341365461847, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Implementation of Li-Fi based home automation system

This paper presents an Implementation of Li-Fi based home automation system prototype. This system was develop to verify the effect of LED types on VLC transmission. LED is used to transmit the input data information to the receiver LDR through visible light communication (VLC). Arduino microcontroller was used to retrieve information from the temperature sensor, light sensor, PIR sensor and MQ2 gas sensor. The output data of sensors were sent to LDR by LED. The result demonstrates that the colour types of LED has an effect on transmission distance and the voltage of LED is proportional to the distance. Red LED has better performance compared to others.


Introduction
Communication through light has been exist since ancient time. As time passed, the research on technology of communication has discovered new method to improve human communication. In 2011 during TED Global talk, Harald Haas has introduce a new optical wireless communication (OWC) to emerging wireless communication. The OWC is called Light Fidelity (Li-Fi), a coined term created by Harald Haas [1]. Li-Fi is the technology which will replaces the Wi-Fi technology.
Li-Fi is a new wireless communication technology which enables data transmission through LED light. The disadvantages of Wi-Fi will be overcome by Li-Fi such as the speed of data transfer of Li-Fi. The main differences between Li-Fi and Wi-Fi was Li-Fi using light spectrum and Wi-Fi using radio spectrum. Li-Fi visible light spectrum is 10,000 times broad compared to radio frequency (RF) spectrums. This light spectrum is illustrated in figure 1.  Li-Fi almost similar to Wi-Fi in term of bidirectional and fully networked wireless communication technology. It could be replacement of RF in data broadcasting. It is measured that some Wi-Fi is about 100 times slower than Li-Fi implementations [2]. Due to continuation of the trend to move to higher frequencies in the electromagnetic spectrum, Li-Fi could be classified as nm wave communication. Li-Fi technology uses white light emitting diodes (LED) for high speed wireless communication, and can achieve speeds of over 3 Gigahertz from a single micro LED [3]. This prove that Li-Fi technology is much faster compared to Wi-Fi.
Li-Fi based home automation system has the ability to control home using light intensity from one place or one device as it save time and save energy. Besides of increasing energy efficiency, the users able to monitor their home. Multiple of smart home devices has been created by integrated with different wireless medium such as Zigbee, Bluetooth and Wi-Fi. The advance of technology nowadays enhances the development of this smart devices [4]. However, this wireless medium has lacked in term of communication range, speed and security. The prominent problem of this wireless medium is the security. The security is not satisfying due to a lot of cyber hacking case on home security system. By using Li-Fi technology, the system is much secured because the light frequency cannot be hack.
Li-Fi technology ideas as the optical version of Wi-Fi based on VLC which use the visible light as the optical carrier for illumination and data transmission [5]. In this technology, the LED plays an important role. LEDs have evolved as lighting source and have potential for data transmission that justifies the high eligibility of LED lights. In Li-Fi based home system, LED is used at transmitter of VLC and photo diode at the receiver capture the light. Li-Fi relies on transmission of light that can be deployed by LED to cover entire home. In advanced LED technology, IEEE 802.15.7 can support high data rate of VLC [6]. VLC had wavelength in the range of 380 -7 80 nm and for unregulated bandwidth more than 350 Terahertz.

Li-Fi transmitter and receiver
Most of the Li-Fi technology comprises the LED [7]. LED device is used to emit visible light when an electric current passes through it. The data send in term of the optical spectrum wireless medium for signal propagation through the light spectrum. Data are easily encoded by adjusting the flickering on and off of the LED lighting. This action leading to the generation of different string of binary codes in the form ones and zeros. In addition, LED must in the line of sight (LOS) with the receiver for data transmission between LED and detector to ensure the receiver LOS can detect the light signals.
XLamp MX-6 LED is used as the LED transmitter in this Li-Fi communication. It has the standard lighting class for indoor LED lighting design that have reliability and color consistency. Besides of high flux and high voltage option characteristic, it can deliver high lumen output maximum to 339 lumens depends on the color of LED [8].
Phototransistor is used as detector devices that have light sensitive base region and this devices can be used for switching application or implementation. It has luminous sensitivity and spectral response that decide the longest wavelength as the sensitivity of phototransistor. However the speed of response the gain of phototransistor are inversely proportional. The output of phototransistor depends on wavelength of incident light, area of light exposed and the direct current (DC) gain of transistor.
Illumination is the spread of the light that making the LEDs can be as a media in data communication. The challenge is how the illumination of LEDs enable the data sending while the illumination is low. Therefore, it is related to distance between sender and receiver, which proportional to LEDs brightness while the Li-Fi can fulfil the user satisfaction in order the illumination of LED can stay safe for the user.

Implementation of Li-Fi home automation system
The implementation of Li-Fi home automation system prototype is shown in figure 2. It consist of combination Li-Fi transmitter and Li-Fi receiver. The temperature sensor, light sensor, smoke sensor The signal from sensors will sent to controller. The controller will process the signal and sent to Li-Fi transmitter (LED). This LED will emits the light signal through free space and detect by photo detector (LDR) at the Li-Fi receiver. The light signal will be process by controller and sent to relay circuit to switch on the electrical devices respective to the sensors.
Arduino Uno board microcontroller with embedded universal asynchronous receiver-transmitter (UART) as controller is use connect to Li-Fi LED transmitter to process the output in terms of flickering LED which represent data '0' and '1'. Li-Fi receiver, LDR that will capture the light and sent it to receiver microcontroller. PWM will be used to replace Pulse Position Modulation (PPM) in this microcontroller to reduce the delay and increase the data rates. PPM requires that both transmitter and receiver devices to be synchronized. PPM also have high sensitivity to multi-pathway interference, which can disrupt a transmission because it will altering the difference in arrival times of each signal.
The prototype of Li-Fi based home automation system is operated by using 9V power supply. Figure  3 shows the flow of functionality sensors of the system. It will by initiates input signal of sensors with two Arduino microcontroller. The input are LM35 temperature sensor, LDR light sensor, PIR motion sensor and MQ-2 gas sensor. If LM35 is detected high temperature, the voltage will increase. If the value of sensor higher than voltage of room temperature, that sensor will activate microcontroller. The Li-Fi transmitter will receive the output signal from microcontroller and transmit the light signal to Li-Fi receiver and will on the fan. Same goes to MQ-2 gas sensor, if it detect high smoke, the voltage will be increase, so it will sent information to microcontroller to turn on the buzzer on the receiver side. Meanwhile, for LDR light sensor, when the sensor in the dark surrounding, the voltage will be drop, so it will sent information to microcontroller and turn on the bulb on the receiver. PIR motion sensor work based on temperature. If the changing of temperature is detected, the LED will turn on at the receiver. LED transmitter will transmit signal in term of flash LED and that light signal will be received by the LDR photo detector. The signal will be process by controller. The output will sent to relay circuit to switch on the electrical devices respective to the sensors.  Figure 3. Signal flow of Li Fi home automation system. Meanwhile, for LDR light sensor, when the sensor in the dark surrounding, the voltage will be drop, so it will sent information to microcontroller and turn on the bulb on the receiver. PIR motion sensor work based on temperature. If the changing of temperature is detected, the LED will turn ON at the receiver.
LED transmitter will transmit signal in term of flash LED and that light signal will be received by the LDR photo detector. The signal will be process by controller. The output will sent to relay circuit to switch on the electrical devices respective to the sensors. In this prototype, Li-Fi LED transmission is tested by using three different colour of LED which were super bright red LED, Cree X-TE warm white LED, and super bright blue LED. The wavelength of super bright red LED was 660 nm, 580 nm for Cree X-TE warm white LED and 525 nm for super bright blue LED. Cree X-TE warm white LED is a mixed of yellow and red phosphors that allow it have more wavelength compare to cool white LED.

Result and discussion
The Li-Fi LED receiver received the light intensity in term of analogue input that detected by LDR as Li-Fi receiver. The result was obtained by tested the Li-Fi based home system prototype in the room with normal light intensity. Table 1 show the maximum distance between Li-Fi transmitter and Li-Fi receiver can achieved by exchanging the colour of LED with the different voltage input data to the LED.  Figure 4 show the comparison result between difference colours of LED for Li-Fi transceiver transmission. The Red LED can transmit long distance compare to Blue LED and Warm white LED for the same level of voltage. This result has proven the effect of light wavelength. The light colour of LED can give high light intensity to be received by the receiver. Its show that the wavelength of LED colour effect the transmission distance between transmitter and receiver.

Conclusion
Through implementation of Li-Fi based home automation system, the trend and the relationships effect of types of LED with the distance between Li-Fi transmitter and Li-Fi receiver is shown. Therefore, the wavelength of LED colour on transmitter and the photo detector sensitivity has significant contribution for VLC communication. VLC through Li-Fi able to transmit the efficient information even though low power supply for the LED beam generation that could transmitted to larger transmission distance. By using Li-Fi based home automation system, the user able to control home automatically without wasting the energy. The Li-Fi based home automation system can provide higher data security as light spectrum cannot be tapped.