scieee AI-readable full text Open interactive document viewer

Wake-up communication system using solar panel and visible light communication

Carrascal Reyes, Carolina Andrea

Abstract

[ANGLÈS] One of the most promising energy-efficient communication methods is the use of wake-up receivers. In this work we propose and develop a wake-up communication system that uses Visible Light Communication (VLC) and an indoor solar panel with two functions: act as the receiver of the wake-up signal and harvest power from the light. After the reception of the wake-up signal an interrupt generated by the wake-up receiver wakes up the wireless device attached. Two configuration options are presented: an addressable and a broadcast-based wake-up configuration. In addressable configuration, after the reception of the wake-up signal a comparison is made with the identification code configured in the device; as consequence only the device with the match code is woken up. In broadcast-based wake-up configuration the wireless node attached wakes up after the detection of the carrier burst frequency, allowing use this system for wake up several nodes at once. Two options of configuration for the receiver are presented, and also the design of a transmitter who copes with flickering mitigation. Through experiments the feasibility of the system is shown and its performances is characterized in terms of wake-up probabilities for different distances. The effect of light interferences is evaluated, which shows that the achieved wake-up distances are reasonable for indoor scenarios.

Full text

WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION Master's Thesis Submitted to the Faculty of the Escola Tècnica d'Enginyeria de Telecomunicació de Barcelona Universitat Politècnica de Catalunya by Carolina Andrea Carrascal Reyes In partial fulfilment of the requirements for the degree of Master in Telematics Engineering Director: Ilker Demirkol, Ph.D Co-Director: Josep Paradells, Ph.D Barcelona, July 2014 WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 2 Resum Un dels mètodes més prometedors per a la comunicació amb una major eficiència energètica en les Xarxes de Sensors Sense fil (Wireless Sensor Networks - WSN) és l'ús de wake-up receivers en el node receptor. Els wake-up receivers són dispositius d'ultra-baix consum de potència connectats al node sense fil que li permeten romandre en estat inactiu mentre esperen un senyal d'activació. En aquest treball es proposa i desenvolupa un sistema d’activació que usa les comunicacions per llum visible (Visible Light Communication - VLC) i un panell solar d’ús interior amb dues funcions: actuar com a receptor del senyal d’activació i recollir energia de la llum ambient. Després de la recepció del senyal de l’emissor, el wake-up receiver genera una interrupció activant el node sense fil adjunt. Es descriuen dues alternatives per a la generació de la interrupció: una basada en identificador i una altra basada en la transmissió de la freqüència portadora. En la configuració basada en identificador, després de la recepció del senyal de wake-up es fa una comparació amb el codi d'identificació al dispositiu i, com a conseqüència, només el dispositiu amb el codi correcte és activat. En la configuració basada en la transmissió de la freqüència portadora, el node sense fil adjunt s'activa amb la detecció d'aquesta freqüència, la qual cosa permet utilitzar el sistema per activar diversos nodes alhora. També se detallen dues opcions de configuració per al receptor així com el disseny d'un transmissor per mitigar el parpelleig del LED. Mitjançant experiments es mostra la factibilitat del sistema i s’avalua el seu funcionament en termes de la probabilitat de generar la interrupció d'activació a diferents distàncies entre la font de llum i el receptor. S'avalua l'efecte de les interferències del senyal i es mostra que les distàncies assolides són raonables per escenaris en interiors. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 3 Resumen Uno de los más prometedores métodos para la comunicación con mayor eficiencia energética en las Redes de Sensores Inalámbricos (Wireless Sensor Networks - WSN) es el uso de wake-up receivers. Es este trabajo se propone y desarrolla un sistema de comunicación de wake-up que usa las comunicaciones por luz visible (Visible Light Communication - VLC) y un panel solar de interiores con dos funciones: actuar como receptor de la señal de wake-up y recoger energía de la luz. Después de la recepción de la señal el wake-up receiver genera una interrupción activando el nodo inalámbrico adjunto. Se presentan dos configuraciones para la generación de la interrupción: una basada en dirección y otra basada en la transmisión de la frecuencia portadora. En la configuración basada en dirección, después de la recepción de la señal de wake-up se hace una comparación con el código de identificación configurado en el dispositivo; como consecuencia sólo el dispositivo con el código correcto es activado. En la configuración basada en la transmisión de la frecuencia portadora, el nodo inalámbrico adjunto se activa con la detección de dicha frecuencia, lo cual permite usar el sistema para activar varios nodos a la vez. Se describen dos opciones de configuración para el receptor, así como el diseño de un transmisor diseñado para mitigar el parpadeo del LED. A través de experimentos se muestra la factibilidad del sistema y se caracteriza su desempeño en términos de la probabilidad de generar la interrupción de activación a diferentes distancias entre la fuente de luz y el receptor. Se evalúa el efecto de las interferencias de luz y se muestra que las distancias alcanzadas son razonables para escenarios intramuros. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 4 Abstract One of the most promising energy-efficient communication methods is the use of wakeup receivers. In this work we propose and develop a wake-up communication system that uses Visible Light Communication (VLC) and an indoor solar panel with two functions: act as the receiver of the wake-up signal and harvest power from the light. After the reception of the wake-up signal an interrupt generated by the wake-up receiver wakes up the wireless device attached. Two configuration options are presented: an addressable and a broadcastbased wake-up configuration. In addressable configuration, after the reception of the wakeup signal a comparison is made with the identification code configured in the device; as consequence only the device with the match code is woken up. In broadcast-based wakeup configuration the wireless node attached wakes up after the detection of the carrier burst frequency, allowing use this system for wake up several nodes at once. Two options of configuration for the receiver are presented, and also the design of a transmitter who copes with flickering mitigation. Through experiments the feasibility of the system is shown and its performances is characterized in terms of wake-up probabilities for different distances. The effect of light interferences is evaluated, which shows that the achieved wake-up distances are reasonable for indoor scenarios. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 5 To my Parents. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 6 Acknowledgements I would like to thank my advisors, Prof. Ilker Demirkol and Prof. Josep Paradells, for being a constant support during the development of this project. Their patience, encouragement and useful remarks took me to the successful culmination of this work. I would also like to thank to Joaquim Oller for his collaboration since the beginning of this project, for the many suggestions and cooperation in the laboratory. I want also express my gratitude to Laura Herrera for her invaluable support and assistance in the project. I would like to thank to my family for their constant love and inspiration; and to my friends, from here and there, for the good moments shared and the support given to me. Finally, I would like to thank to Fundación para el Futuro de Colombia (Colfuturo) for providing the funding which allowed me to undertake this Master’s program. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 7 Table of contents Resum .......................................................................................................................................2 Resumen ...................................................................................................................................3 Abstract ....................................................................................................................................4 Acknowledgements ..................................................................................................................6 Table of contents ......................................................................................................................7 Glossary ....................................................................................................................................9 List of Figures ..........................................................................................................................11 List of Tables ...........................................................................................................................13 1. Introduction.....................................................................................................................14 2. Background and The State of Art ....................................................................................17 2.1 Wireless Sensor Networks (WSN) ............................................................................17 2.1.1 Wireless Sensor Nodes (Motes) .......................................................................20 2.1.2 Energy Management in WSN ...........................................................................21 2.2 Wake-up receivers ...................................................................................................23 2.2.1 Energy harvesting in wake-up receivers ...........................................................26 2.3 Visible Light Communication (VLC) ..........................................................................26 2.3.1 Modulation schemes for VLC............................................................................27 2.3.1.1 Pulse Position Modulation (PPM) .................................................................27 2.3.1.2 Frequency Shift Keying (FSK) Modulation ....................................................28 2.3.1.3 On-Off Keying (OOK) Modulation .................................................................29 2.3.2 Flickering Mitigation .........................................................................................30 3. Implementation of Solar-panel-based Wake-up System ................................................32 3.1 System Design ..........................................................................................................34 3.1.1 Wake-up Receiver .............................................................................................34 3.1.1.1 Indoor Solar Panel .........................................................................................34 WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 8 3.1.2 AS3933 Austriamicrosystems chip ...................................................................43 3.1.3 Wake-up Receiver Configuration .....................................................................53 3.1.3.1 Wake-up receiver configuration option 1 ....................................................53 3.1.3.2 Wake-up receiver configuration option 2 ....................................................54 3.2 Wake-up Transmitter ...............................................................................................55 3.2.1 Wireless Sensor Node: Zolertia Z1 ...................................................................56 3.2.1.1 Transmitted Signal Format............................................................................58 3.2.2 Transmitter Drive Module ................................................................................61 4. Performance Evaluations ................................................................................................64 4.1 Proof-of-concepts results ........................................................................................64 4.2 Flickering characterization .......................................................................................66 4.3 Format of the Signal .................................................................................................74 4.4 Wake-up Range Evaluations ....................................................................................76 5. Conclusions and Future Work .........................................................................................80 References ..............................................................................................................................83 Appendixes .............................................................................................................................88 Appendix A. Code for the generation of the signal using several ports. ...........................88 Appendix B. Configuration of AS3933 chip. .......................................................................93 Appendix C. Code for wake-up triggers counting .............................................................96 Appendix D. Code for the generation of a carrier burst signal of 21 KHz .........................97 Appendix E. Code for the generation of the signal using only Port 4.0 ......................... 100 WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 9 Glossary ADC Analog-to-Digital AMS Austriamicrosystems ASK Amplitude Shift-Keying CCD Charge-Coupled Device CMOS Complementary Metal-Oxide-Semiconductor DPPM Differential Pulse Position Modulation FSK Frequency Shift Keying FSO Free Space Optical GPIO General Purpose Input/Output GSM Global System for Mobile Communication I2C Inter-Integrated Circuit LED Led-Emitting Diode LTE Long Term Evolution MFTP Maximum Flickering Time Period MIT Massachusetts Institute of Technology OOK On-Off Keying PPM Pulse Position Modulation RF Radio Frequency RSSI Receiver Signal Strength Indicator SPI Serial Peripheral Interface WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 16 purposes, v) to enable novel applications such as light-driven localization, asset control, etc. The proposed system can be widely used in several indoor applications. The receptor is completely autonomous due to the harvesting from light energy. In this document, we present the detailed design of the proposed system that achieves wakeup communication through the use of visible light and solar panel, achieving autonomy through the harvesting of energy from light. The different components of the system and their configuration are described, and also evaluated in different scenarios. With the configuration proposed, a 7 meters wake-up distance with no interference is achieved. Also, using a longer bit duration a 14 meters wake-up distance with no interference is achieved, with a more notorious flickering in the LED. The rest of this document is organized as follows: In chapter 2 we describe the fundamentals of WSN, VLC (Visible Light Communications), as well as the state of art in Free Space Optical (FSO) wake-up receivers and receivers harvesting power from environment. A general overview of the system is described in chapter 3 as well as the details of the design of the wake-up receiver and transmitter and the deployment issues. In chapter 4 the obtained results are presented. Finally the conclusions and future work are presented in chapter 5. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 17 2. BACKGROUND AND THE STATE OF ART 2.1 Wireless Sensor Networks (WSN) A Wireless Sensor Network (WSN) is composed by several small and autonomous wireless nodes physically distributed and deployed near or into the environment to monitor [13]. These small size nodes (also known as motes) are low cost and low power consumption devices. The motes are equipped with sensors and sometime actuators, and they are able to monitor and collect information from their environment, process it locally and work in a collaborative way in order to transfer the information, using their wireless interface. Sensor networks have no central entity such as wireless networks like GSM (Global System for Mobile Communication), UMTS (Universal Mobile Telecommunication System) or LTE (Long Term Evolution), where the communication is controlled by the base stations. Instead of using a centralized infrastructure, in WSN the nodes must construct a network by themselves using their wireless interface, and in case of failure of the nodes or the paths, a new path has to be calculated (restoration capability), guaranteeing that the network will persist even if one or several nodes are lost [15]. Unlike other networks, Wireless Sensor Network focus in interacting with the environment instead of interacting with humans. In order to accomplish this, the wireless nodes are equipped with sensors and actuators allowing it to interact with the environment where the network is placed. The sensors -also known as transducersequipped in the nodes are components that convert a physical magnitude to an electrical equivalent signal. The transducers include temperature, acceleration, pressure, humidity, light, sound, proximity, presence, gas pressure, magnet field, distance, electrical current and others. The WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 18 actuators are devices that convert an electrical control signal to a physical action, performing specific actions interacting with the environment. In Figure 1 the model for a Sensor Network Architecture is shown consisting of one gateway node (or sink node) and a large number of sensors deployed in the field. The data is transferred from sensor nodes to the gateway using a multi-hop communication. Figure 1. Wireless Sensor Network Architecture The main challenges of WSN are:  The nonexistence of a central entity. The lack of a base station makes more difficult the tasks like the organization of the nodes (it has to become in a selforganization), the assignation of transmission resources to the participants (it has to be decided in a distributed way), or the finding of paths between nodes.  Limited range of the wireless communication. The communication in the WSN is limited by the distance, the obstacles, or the characteristics of the wireless WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 19 interface. Then it is necessary to have multi-hop communication, and the construction of the paths between nodes.  Mobility of the nodes. The mobility of the nodes changes the neighbors of the participants and the global configuration of the network. As a result, the paths on the network have to be changed or restored in a feasible way.  Nodes operated by battery. The lifetime of the wireless nodes, and consequently the network, is limited by the capacity of their batteries. In many cases the replacement of batteries becomes a problem due to the amount of nodes in the network or the characteristics of the environment where the motes are deployed. Many application areas exist for the wireless sensor networks; some of the application areas are smart cities, home, health, environment, civil areas, agriculture, and military, among many others. For example, WSN can help with the control and organization in the cities, enabling the smart cities. The sensor nodes can be useful in lighting control, adapting the street lights to the weather or amount of traffic; green zone irrigation, irrigating only the dry zones to reduce water consumption; garbage collection, detecting the full containers optimizing the trash collection routes; parking, monitoring the available parking spots in the city; monitoring the air quality, monitoring the amount of CO emissions in the city; monitoring of acoustic pollution in real time; and others [14]. Another example is home automation, with applications in the security area like intrusion detection systems, with the monitoring of windows and doors; monitoring of energy and water consumption; light, air conditioning and heater control as well as the control of the electronic devices at home like TV, music equipment, etc. In personal healthcare monitoring for example, the WSN can help to measure the vital signs in the patients in a hospital or monitor the corporal signs in athletes. Also they can be used to control of the conditions inside freezers where vaccines, medicines or organic elements are stored [14]. In the area of environmental and habitat monitoring for example, in a disaster relief operation the sensor nodes can be dropped from WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 20 an aircraft over a wildfire, and from the measures from every node construct a temperature map of the zone; also it is possible to use the sensor nodes to observe wildlife [16] or for monitoring the activity of a volcano. Another example is the monitoring of the structure of buildings in order to predict and implement maintenance, taking measurements about room occupancy, temperature and air flow; or monitor mechanical stress of the buildings. In the area of precision agriculture, through sensor nodes it is possible to supervise variables that will improve the agriculture like using fertilizer, pesticides or irrigation only when it is needed. [16]. Finally, in military applications WSN is used for command, control, communications, computing, targeting systems [13], or tracking the position of soldiers in a battlefield between many others. 2.1.1 Wireless Sensor Nodes (Motes) WSN allow the creation of a large amount of ubiquitous services, where the network can act in unattended manner monitoring and controlling the environment variables, taken intelligent decisions in an autonomous way. For these reasons, in 2003 Massachusetts Institute of Technology (MIT) identified Wireless Sensor Networks as one of the 10 emerging technologies that will change the world [1]. In order to accomplish with all these functionalities, the nodes in the WSN have to accomplish with the next characteristics: (i) Low power. In many cases, because of the amount of nodes or the difficulty to reach the nodes in the deployment place, the replacement of the battery can be difficult or expensive. Ideally, the nodes should be operative for years. (ii) Small size. The small size of the nodes reduces the power consumption of the mote, and also permit to the nodes be deployed in a field with few interference or obstruction in the environment. And (iii) low cost. In order to create ubiquitous networks, a large number of nodes have to be deployed. Then, to make the implementation economically feasible the nodes must be low cost. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 21 Every wireless sensor node in the network has limited hardware and limited resources. The nodes are mainly composed by a processing part (typically a microcontroller and memory), a transmission part (transceiver), a sensing part (one or several sensors or transducers) and a power unit (usually one battery or harvested power). Figure 2 shows the architecture of a typical node. It consist of four main components: Sensing subsystem including one or more sensors and their Analog-to-Digital (ADC) converters; the processing subsystem composed by a microcontroller and memory; the communication subsystem for wireless communication and the power supply unit, usually a battery. Despite of the hardware limitations, the wireless sensor nodes have the capability of gathering the information from the environment and communicate it to other peers. Figure 2. Architecture of a typical Sensor Node 2.1.2 Energy Management in WSN One of the main challenges of the WSN is to achieve energy-efficient operation of the nodes. The motes are equipped with a power unit, usually a battery, which limits the lifetime of the node. As it was mentioned before, the replacement of the battery becomes difficult because wireless nodes are usually deployed in unattended areas or because the amount of nodes in the network is so high for a battery replacement. This problem has led to several studies in the green communications and networking areas, becoming an important research issue. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 22 Since the creation of WSN there has been an interest to increase the operating time of the nodes in order to reach several months and years of autonomous operation. In order to achieve this goal, several approaches have been proposed. In [17] a taxonomy of energyefficient mechanisms is presented, which are divided in five components:  Radio optimization. Since the radio module is the component that has the higher energy consumption in a node, the optimization of the communication parameters like coding and modulation schemes, power transmission and antenna direction has been studied in order to reduce the power consumption. For example, in [19] the author studied three modulation schemes and from this study they propose the optimal modulation and parameters to achieve minimal energy consumption. Other studies like [20] propose control the transmission power of the antenna, increasing it when the node has high remaining energy and then allowing other nodes to decrease their transmission power, saving energy.  Data reduction. Other option for the reduction of the energy consumption is reducing the amount of data transmitted, avoiding the transmission of unneeded samples or limiting the amount of sensing task. In this way, energy can be saved because data transmission and acquisition are costly activities in terms of power consumption. For example, with data aggregation [21] the nodes along the path perform fusion of data -such as averaging the valuesreducing traffic and hence reducing energy consumption; however aggregation reduces the accuracy of the data. Another approach is reducing or adjusting the acquisition frequency of the samples decreasing in this way the energy consumption on the nodes.  Sleep/wakeup schemes. Since reception and idle states are major energy consumption activities, the sleep/wakeup schemes help to put the radio in sleep mode saving energy in the node. For example, duty-cycling schemes define the WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 23 wireless devices to turn their radios on periodically to listen the channel for potential incoming communication [22]. Even though this approach has been shown to reduce the energy wastes, unnecessary battery consumption happens when the device wakes up and there is no information to transmit or receive. An alternative and promising approach is the wake-up radios, where low power devices are used to wake up the wireless nodes only when it is necessary, saving power from unnecessary wake-ups and also reducing the time of waiting for incoming signals at the node.  Energy-efficient routing. In multi-hop schemes the nodes closer to the gateway have to route more packets than the nodes in the periphery of the network, then, the battery in these nodes are depleted in a faster way. Therefore, energy-saving routing protocols have been proposed in the literature. For example, a proposal for the organization of the network in clusters is made in [24, 25], dividing the network in small areas and activating in each area only one node in order to let the other nodes remain deactivated. Another method is considering energy as a metric in the setup of the paths [26].  Energy harvesting. Energy harvesting for wireless nodes has been studied as an option for recharging the batteries in the wireless nodes without human intervention. Energy harvesting from the environment (such a solar, wind and others) is a promising area because this will permit to networks continuous work for an unlimited time; however, power harvesting has many limitations due to the few amount of power capable to recover from the environment. 2.2 Wake-up receivers Among the sleep/wakeup schemes for aforementioned energy conservation methods, the wake-up receivers present a promising option. As it was indicated, a wake-up receiver is WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 24 an external device in charge of activates the node in case that a call occurs. A wakeup receiver device is a small piece of hardware with ultralow power consumption which usually is composed by an internal correlator and an address coding for a selective wake-up, between other components. Upon the reception of the external call, the wake-up triggers a pulse oriented to alert the node about an incoming communication. Figure 3 illustrates the wake-up receiver (WuRx) operation. First the transmitter sends a signal intended to the wireless node (step 1). The wake-up receiver is constantly sensing the channel (step 2) and identifies the call for the wireless node attached. Then, the WuRx triggers a pulse (step 3) in order to wake up the wireless node. Finally, the wireless node wakes up (step 4) and is ready to continue the communication. Figure 3. Wake-up Receiver Operation Most hardware platforms allow multiple power saving states. In the case of the wireless sensor nodes, each component of the node (for example the microprocessor, the radio, the sensors, etc.) can be activated accordingly with a particular situation. In the wireless sensor nodes, the lowest power state is the sleep mode. The mote is able to stay in this state as long as it has not any task to develop. The use of a wake-up device permits the node to remain in a sleep mode for a longer time, avoiding wake-ups for sensing the medium in search of possible incoming signals. In [3] it has been shown that wakeup radios enable a more energy-efficient approach eliminating the energy wastes prevailing in duty-cycling significantly. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 25 There are a variety of proposals on wake-up systems in the literature. Most of these proposals are built on radio triggered approaches. Other proposals that use a different channel than RF for the wake-up signal exist, however they are few. Wake-up receivers can be classified as active or passive, according to their source of power [4]. Active devices get their power from a battery or share the battery of the attached node. On the other hand, passive wake-up receivers take their power from other sources, for example, by harvesting energy from the environment, such as from the transmitted signal or light. An active FSO (Free-Space Optical) wake-up receiver is proposed in [5]. The wake-up receiver uses a signal that is transmitted using free space optical communication. The wakeup receiver is equipped with photo diodes, which are used as signal receivers. This approach is designed for use in indoor networks, and require line of sight with a highly directional communication. The transceiver in a receive mode has a power consumption of 317μW. Also, this implementation reaches a communication range of 15 meters with a transmitter that has a power consumption of 16.5mW. The device has been built using Texas Instruments MSP43F2410 MCU and a Texas Instruments CC2420 radio. Although this proposal uses FSO for wake-up signal, our device includes two important aspects that set us apart: i) the use of an indoor solar panel as receptor of the signal, which we show to perform better than photodiodes for wake-up purposes, and ii) the potential for harvesting of light energy for feeding purposes. In [6], an active wake-up receiver sensitive to infrared signals is presented. The device has a consumption of 4μA while waiting for a signal. This device is in a constantly listen state, using a very low power amplifier and a microcontroller which is woken up when the proper signal arrives. Depending on the transmitter signal intensity, the operational range of wake-up signal reaches up to 30 meters. The device has been built for use in indoor positioning, identification purposes, and for waking up external hardware like sensor nodes. The advantage of our system is that it enables the use of lighting infrastructure for lighting, communication and energy harvesting purposes. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 32 3. IMPLEMENTATION OF SOLAR-PANEL-BASED WAKE-UP SYSTEM A general view of the system and its components are shown in Figure 8. At the transmitter side, the system consists in a Wireless Sensor Node in charge of controlling the modulation of a LED, a LED driver module in charge of regulating the electrical flow crossing through the LED, and a LED light. The receiver side is comprised of an indoor solar panel which works as receptor device and a set of modules in charge of the recuperation and decoding of the signal and their comparison with the local address of the receiver. Figure 8. Global system view of the solar-panel-based wake-up system WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 33 On the receiver side, after detecting the signal by the indoor solar panel, an envelope detector module is in charge of identifying de high and low states of the signal. Then the Demodulator extracts the original information and delivers it to the pattern correlator. Each wake-up receiver has assigned an address, which is used to identify the receiver in a deployment site. The Correlator then compares the demodulated signal delivered by the Demodulator module and the address of the receiver; if the two addresses match a wake-up interruption is generated. This wake-up interruption can be used for waking up the node from their sleep state. After this process, all the communication between transmitter and receiver can be performed using the traditional radio interface of the mote. In the transmitter side, a WSN node is used for the control of the LED light. The use of WSN node enables a simple, low-cost, small footprint LED controller device, and allows quick deployment of this system for different application environments. The WSN node generates the signal with the address of the device to be contacted by varying the current feeding the LED through the LED drive module. This system design can be varied to adapt to different application needs, easily. For example, by adding a switch and a secondary reception path after the solar panel, the receiver can support downlink data communication (from LED to the receiver device), after the receiver device is woken up. As we want to feed the wake-up receiver using only the energy collected by the indoor solar panel, it is necessary to use components that can work with the small amount of energy harvested by the panel. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 34 3.1 System Design 3.1.1 Wake-up Receiver For the design of the receiver it was necessary to take into account the amount of energy that it was expected to collect through the scavenging of light using the indoor solar panel. Then the first step consists in the characterization of the chosen indoor solar panel. After that, it was necessary to search for the different components of the receiver. These components have to be ultra-low power consumption due to the power consumption of all of them working together could not exceed the amount of power collected by the solar panel. Below, the chosen components are described. 3.1.1.1 Indoor Solar Panel The indoor solar panel chosen as receptor of the light signal is the SC3726I-8-1, an offthe-shelf amorphous silicon solar cell with a rectangular shape of size 3.6cm x 2.6cm and of thickness 0.1cm manufactured by Blue Solar Company. The open circuit voltage of the solar panel is around 5.6V and its short circuit current is 34.6μA. When a variation occurs in the intensity of the light received by the panel, this variation is reflected in the voltage provided by the panel. This phenomenon is used to modulate visible light signals with Amplitude Shift-Keying (ASK). An image of the panel is shown in Figure 9. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 35 Figure 9. Indoor Solar Panel SC3726I-8-1 In order to identify the characteristics and limit of the indoor solar panel chosen, four tests were conducted: (1) identification of the response curves of the solar panel: current, voltage and power curves, (2) a test in order to identify the response of the indoor solar panel to different frequencies, (3) a comparison between indoor solar panel and photodiode responses and (4) a comparison between two indoor solar panels of different sizes, test made with the frame in the format required in this system. First test For the first test the configuration shown in Figure 10(a) was used. In this case the light falling on the panel comes from the laboratory lighting mainly composed by halogen bulbs located in the ceiling. For different values of load resistances (RL) the current and voltage were measured. The results are shown in Figure 10(b). As it was expected, the voltage increases as the load increases. Conversely, the current decreases as the load increases. Finally, it is possible observe that the maximum power is reached when a load of 150 KΩ is used. Figure 10(b) show the curves for Voltage (blue), Current (red) and Power (green), and also their corresponding data table. In the X-axis are the values of the load RL and in the Y- axis are the magnitudes in Voltage (V), micro-Amperes (μA) or micro-Watts (μW). WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 36 (a) Configuration for test 1 over indoor solar panel RL (KΩ) VOLTAGE (V) CURRENT (μA) POWER (μW) 10 0,362 33,7 12,1994 12 0,436 33,5 14,606 15 0,539 33,2 17,8948 22 0,772 33 25,476 27 0,917 32,3 29,6191 33 1,092 32,3 35,2716 56 1,81 31 56,11 68 2,16 30,5 65,88 82 2,49 29,4 73,206 100 2,81 28,2 79,242 120 3,27 26,3 86,001 130 3,499 26,8 93,7732 132 3,54 26,6 94,164 135 3,577 26,4 94,4328 142 3,674 25,8 94,7892 147 3,736 25,6 95,6416 RL (KΩ) VOLTAGE (V) CURRENT (μA) POWER (μW) 150 3,786 25,6 96,9216 153 3,795 25 94,875 176 4,048 22,9 92,6992 180 4,006 21,9 87,7314 220 4,312 19,4 83,6528 270 4,576 16,9 77,3344 330 4,777 14,5 69,2665 390 4,915 12,4 60,946 470 5,044 10,5 52,962 560 5,105 9,2 46,966 680 5,21 7,4 38,554 1000 5,347 5,2 27,8044 1200 5,385 4,5 24,2325 1800 5,459 3,1 16,9229 8200 5,57 0,6 3,342 10000 5,59 0,5 2,795 (b) Curves of current, voltage and power for the indoor solar panel SC3726I-8-1 Figure 10. Test 1 configuration and results for Indoor Solar Panel 10 15 27 56 82 120 132 142 150 176 220 330 470 680 1200 8200 0 20 40 60 80 100 120 Load (RL) V / μA / μW VOLTAGE (V) CURRENT (uA) POWER (uW) WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 37 Second test In the second test the goal was to identify the response of the indoor solar panel to different frequencies. The configuration used in the test is the one shown in Figure 11(a). In the test, light modulated with different frequencies were projected to the panel. In Figure 11(b) the amplitude of the AC component, i.e., Vpp (peak-to-peak voltage) of the signal that the solar panel provides is shown for different frequencies. The LED used in the test has 10W and a luminous dimension of 34mm x 34mm; the distance between LED and the indoor solar panel was 1 m and in this test there were no interference from other light sources. As also was observed by the authors in [9], the response of the indoor solar panel to the lower frequencies is better than the response to the higher ones. Figure 11(c) presents illustrative captures of the waveforms received for two different frequencies, which show the decrease in the amplitude of the waveform and therefore the distortion between the sent and received signals clearly. In the first capture in Figure 11(c) the top signal (in blue) corresponds to a frequency of 1 KHz and the bottom signal (in yellow) corresponds to the signal received in the indoor solar panel. In this capture the signal detected by the solar panel is clear and has an AC component with large amplitude. In the second capture in Figure 11(c) the top signal (in blue) corresponds to the send signal with frequency 38.83 KHz and again the bottom signal (in yellow) corresponds to the signal detected in the indoor solar panel. In this case the Vpp in the detected signal is very flat and difficult to distinguish. Additional tests with a different size solar panel have resulted in similar behavior, again, as expected. These results clearly shown the limitation in the use of higher frequencies in the system and also influences the selection of the receiver components. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 38 (a) Configuration for test 2 on indoor solar panel (b) Indoor solar panel frequency response (c)Indoor solar panel response to a frequency of 1 KHz and to a frequency of 38.83 KHz. Top signal (blue): Transmitted signal. Bottom signal (yellow): Signal after the solar panel. Figure 11. Indoor solar panel response to different frequencies WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 39 Third test In the third test the response of the indoor solar panel was compared to the response of an off-the-shelf high speed and high sensitive PIN photodiode to different frequencies. The chosen device was the photocell BPW34 [30] from Vishay Semiconductors, of 3 mm x 3 mm. In this test, 30 cm of separation between a LED and the photodiode / indoor solar panel was used. The Figure 12 shows an illustrative capture for the frequency of 13.6 KHz. As seen in the figure, the AC component of the signal at the output of the photocell is much flatter than that of the indoor solar panel. Even though photodiode has a faster response, the Vpp is not high enough for the AS3933 to detect the modulated signal and the wake-up interruption cannot be generated. Using an indoor solar panel also eliminates the need to use any amplifier stage after the reception of the signal. This can be observed in the level of the DC component, where in the case of photocell is around 400 mV while in the indoor solar panel is 3V. (a) Capture after BPW34 Photocell. Top signal: Transmitted signal. Bottom signal: Signal after the photocell. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 40 (b) Capture after SC3726I-8-1 Indoor Solar Panel. Top signal: Transmitted signal. Bottom signal: Signal after the solar panel. Figure 12. Photocell and Indoor Solar Panel responses for a frequency of 13.6 KHz Based on the measured frequency response and the operational frequencies supported by the AS3933 component, it was chosen to work at 21 KHz. As shown later, this choice enables the system to work with decent wake-up ranges. Fourth test Finally, in the fourth test the objective was to compare the indoor solar panel SC3726I-8- 1 with another from the same manufacturer but with a larger size, in order to understand if a panel with a larger size will have same, better or worse response to the different frequencies. Apart from the aforementioned solar panel size, a larger amorphous silicon solar cell manufactured by Blue Solar Company with dimensions 7.5cm x 5.3cm x 0.1cm is also tested. In Figure 13 the two indoor solar panels used in this test are shown. For this test, the signal sent has the format used in the system, which is explained in detail in the following. Also, no form of flickering mitigation is used. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 41 Figure 13. Large and Small Indoor Solar Panels The achieved wake-up probability results are shown in Figure 14 for indoor environment with interference from fluorescent lights. The maximum distance reached with fluorescent light interference is found to be 3m. Note that the wake-up probabilities fall down sharply once the distance limit is reached. Figure 14. Probability of wake-up vs. distance for small and large indoor solar panels, under interference from fluorescent light WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 48 disabled. R0<2> EN_A3 0 With this configuration the channel or antenna 3 is disabled. R0<1> EN_A1 1 With this configuration the channel or antenna 1 is enabled. If only one channel is going to be enabled it has to be the channel number 1. As we are not using a radio communication, we do not need to work with the three channels activated. We enable only one channel from the AS3933. This configuration let us minimize the total current consumption which is reduced to 2.7μA. This is crucial for the goal of supplying the energy of the wakeup receiver with the indoor solar panel. R1<3> EN_MANCH 1 Manchester decoder disabled. In order to get a shorter frame and therefore decrease flickering, the Manchester decoder is disabled. R1<2> EN_PAT2 0 Double wakeup pattern correlation is disabled. When it is enabled, the pattern has to be repeated twice. Although the use of a double pattern helps to the AS3933 chip with the identification of the pattern, this also produces a longer frame generating higher flickering. R1<1> EN_WPAT 1 Correlator enable (ON). WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 49 Depending on the choice to enable the internal correlator, the AS3933 permits two wake-up configurations for the incoming signal. First is to generate the wake-up signal upon the detection of a carrier frequency in the working frequency band, as configured previously. This means that if the AS3933 detects a signal in the range of 15 KHz to 23 KHz, a wake-up interrupt will be generated. In this first case the internal correlator is disable (OFF). The code that generates the carrier burst used for testing purposes can be found in Appendix D. The second configuration is the more interesting one and the one that enables more user applications, since it enables configuring a pattern or address for every wake-up receiver device in the network. This allows to wake up any device or a class of devices without triggering any other device in the neighborhood, saving power in other nodes of the network. In this second case the internal correlator is enable (ON). R1<0> EN_XTAL 0 Crystal oscillator disable. In the project we are going to work with the internal RC oscillator, this means that this parameter has to be set to 0 (disable). R3<5:3> FS_SCL 000 Data slices/Demodulator time constant. This value defines a minimum preamble length in milliseconds. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 50 The value can be defined between 0.8ms and 3.5ms. In this case, 000 stands for 0.8ms. It is important to note that this time is the minimum required, but it is recommended use a longer preamble in the transmitted frame. R3<2:0> FS_ENV 110 Envelope detector for different bit rates. With 110 the symbol rate is set to 655 Manchester symbols by second. This parameter together with the above (FS_SCL) helps to optimize the performance of the demodulator. R5<7:0> TS2 10101010 Second byte of the wakeup pattern. In this parameter is configured the second byte of the receiver address or wakeup pattern. R6<7:0> TS1 10101001 First byte of the wakeup pattern. In this parameter is configured the first byte of the receiver address or wakeup pattern. In order to mitigate flickering, the wakeup pattern send from transmitter is Manchester encoding, then in TS1 and TS2 is stored the Manchester code representation of the receiver address. As it was mentioned early, in Manchester code each symbol is represented by a transition: the transition from high to low for 1, and the transition from low to high for 0. This means that each symbol is represented WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 51 by 2 bits. We are using visible light for the transmission of the signal, then using Manchester encode ensures that the bit stream does not have three consecutive zeroes or ones, avoiding longer times in the same state of the lights (e.g., zero or one, turn off or turn on), which can be realized as the flickering of the light by the human eye. R7<7:5> T_OUT 001 Automatic time out. After a wakeup occurs, the AS3933 can automatically return to Listening Mode using the time out option (Figure 17). In this case, the duration of the time out is set to 50 ms. R7<4:0> T_HBIT 01101 Another important configuration is the bit duration. This set of bits let us define the duration of a single bit. The wake-up signal is only triggered if two conditions are accomplished: the pattern received is the correct one and the bit duration is the expected one. The bit duration is a critical parameter because if a small value is chosen, the solar indoor panel does not detect the signal properly, on the other hand, if a long value is chosen, the transmission rate decreases and flickering effect might appear. Bit duration is defined as a function of clock generator periods (As we mention above, the frequency of the Clock Generator is 36.72 KHz). With the minimum bit duration setting (108.932μs), no flickering problem WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 52 appears, however, the maximum distance that we can achieve from sender to receiver is found to be very short: around 30cm. On the other hand, when the maximum bit duration (871.46μs) is used, the flickering of light is clearly perceived by eye but instead we can reach distances more than 6 m with no interferences. In this case the Bit duration in Clock Generator periods is set to 14 (This value can be chosen from 4 to 32). For the bit duration chosen of 14: (3) Then, (4) Later, it is provide the detailed range evaluations for the chosen bit duration of 381.264μs. The bit duration chosen offers a balance between the distance we want to achieve and less pronounced flickering effects. R8<7:5> BAND_SEL 111 With this parameter we set the operating frequency band to 15 KHz – 23 KHz. Table 1. Registers configuration in AS3933 WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 53 3.1.3 Wake-up Receiver Configuration After the selection of the components, the receiver is composed mainly by an indoor solar panel and the AS3933 chip, enabling small footprint, very low cost receiver system. The configuration of receiver can be shaped in two forms, which are detailed next. 3.1.3.1 Wake-up receiver configuration option 1 Figure 18 shows the configuration of the receiver. A capacitor C is used as storage of the power and is connected directly to the VCC and GND pins of AS3933 chip. A diode D is used to prevent the capacitor from discharging through the solar cell and a resistor R where falls a portion of the voltage and the variation of the signal is detected. The signal that falls in R is used as incoming signal and it is fed to the AS3933 through LF1P and LFN pins. LFP1 is the input of antenna channel 1 and LFN is the ground for the antenna in AS3933 chip. The pin distribution of AS3933 can be observed in Figure 16. Figure 18. Wake-up receiver configuration – option 1 The diode used is the 1N4148, a high speed switching diode of general purpose. The value of resistor R is 220KΩ and the capacitor C has a value of 470 μF. The distance reached WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 54 for wakeup was 6.6m. It is important to note that in this test, there were no interference from other light sources. The LED used is a 10W device. At the distance of 6.6m the indoor solar panel was not able to produce the amount of power necessary to feed the AS3933. In this case the capacitor was able to deliver enough power to the AS3933 in order to continue working. It is important to notice that, even if the panel was producing low power, the signal detection continues successfully. Another aspect to having into account is that LED used produce low luminescence (because it is only one LED and the room is large), then, in a possible implementation scenario the amount of light produced by the LED (or set of LEDs) should be higher and longer distances could be reached. 3.1.3.2 Wake-up receiver configuration option 2 If an analysis is made of the circuits presented in Figure 16 and Figure 18, the equivalent circuit is the shown in Figure 19: Figure 19. Equivalent circuit for wake-up receiver From Figure 19 it is easy to observe how the indoor solar panel is feeding the AS3933 through the LF1P pin, which is the entrance on the antenna 1. In the datasheet of AS3933 there is no information about the internal configuration of the chip that explains why it is WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 55 possible to feed the AS3933 though the LFP1 pin. According to a block diagram in the datasheet, the ‘I/V Bias’ module, as it is called, is completely separated from the other module components in the chip. From the configuration shown in Figure 19 the Wake-up receiver configuration option 2 shown in Figure 20 is derived. Note that in AS3933 in Figure 20 the pin names were interchanged in order to facilitate the schematic draw. Figure 20. Wake-up receiver configuration – option 2 If enough illumination is available in the deployment place, this configuration will work as well as the option 1 presented before. In this case no additional components are required, even the CBAT capacitor can be removed. In this case this circuit is a prototype and already has been tested in indoor scenarios. However, as there is no capacitor to regulate the voltage input to the chip, exposing to the direct light from the sun might cause damage to the AS3933 chip. This solar panel has an open voltage of 6.07 V and a short circuit current of 0.737 mA when it is exposed to the light of day. 3.2 Wake-up Transmitter For the design of the transmitter, there are no power restrictions on the contrary to the case of the receiver; however, a wireless sensor node was desirable for controlling the modulation of the LED due to its small footprint and low cost. The transmitter is composed WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 56 of a Zolertia Z1 low power wireless module, a high power LED driver circuit module and a 10W LED. 3.2.1 Wireless Sensor Node: Zolertia Z1 Wireless Sensor Node Zolertia Z1 is chosen as generator of the signal due to its low cost, small footprint and support for low power wireless communication protocols such as IEEE 802.15.4 and ZigBee [8]. In this way, the developed system’s integration into existing environments will be fast and inexpensive. Z1 supports several widely employed open source operating systems used in WSN, among them Contiki, which was the one chosen for the implementation. The high power LED driver circuit permits controlling the LED light through Z1 digital output signal. According to the signal received from Z1, the brightness of the LED is varied to modulate the light in the shape needed. Figure 21 show the ports of Zolertia Z1. Figure 21. Zolertia Z1 Expansion capabilities. Taken from Zolertia Z1 Datasheet WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 57 In Zolertia Z1 the ports are grouped in 3 set of pins and the RF port. These groups of ports are:  North port (JP1A): Intended for Analog I/O (Input/Output)  East port (JP1B): Intended for digital buses connectivity and some GPIOs (General Purpose Input/Output).  South port (JP1C): Intended for GPIOs and other configurable functions.  West port: Intended for wireless communications. For this implementation, some pins from the East port have been chosen. A detailed view of East port pins is shown next: Figure 22. Zolertia Z1 - East Port Pins WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 64 4. PERFORMANCE EVALUATIONS 4.1 Proof-of-concepts results In Figure 27 illustrative screenshots of the signal at different stages of the system are depicted. More precisely, the signal delivered by the transmitter, the signal after the indoor solar panel, and the wake-up signal, i.e., the signal at the wake-up interrupt pin at the end of receiver are included. In Figure 27(a) the top line shows the transmitted signal, which matches with the signal format shown in Figure 23. In the bottom line we can see the signal after the indoor solar panel. In Figure 27(b) a more detailed screenshot of the signals is shown. In the top signal the carrier burst, the separation bit and part of the preamble (the bits 1010) are shown. In the bottom line a detailed waveform of the signal detected by the indoor solar panel is shown. In Figure 27(c), the top line shows the full transmitted signal, and the bottom line verifies that the wake-up signal is indeed generated at the end of receiver after the reception of the whole transmitted signal and the address matching. These proof-of-concept evaluations are done in the presence of fluorescent light with a measured intensity of 200 lux, which creates interference on the transmission of the modulated light. The interference from the fluorescent light is observable from the shapes of the bottom line signals in both Figure 27(a) and Figure 27(b). Note the 100 Hz frequency from this interference source of artificial light, which is the common frequency used for fluorescent light in Europe. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 65 (a) Top line: Transmitted signal. Bottom line: Indoor solar panel received signal (b) Zoomed view. Top line: Transmitted signal. Bottom line: Indoor solar panel received signal (c) Top line: Transmitted signal. Bottom line: Wake-up signal generated Figure 27. Transmitted signal, the signal after the solar panel, and the wake-up signal generated with interference from fluorescent light WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 66 4.2 Flickering characterization One of the challenges in Visible Light Communications is the flickering which may appear when the source of light is modulated. In order to characterize the flickering some tests were performed. The first test was evaluating the kind of signal generated by the Zolertia Z1 and how it induces flickering. A second test was made in order to understand how dimming affects the range of the system. A third test helps us to measure the amount of light generated by every part of the frame. Finally a fourth test was made in order to control inter-frame flickering. First test In the system proposed, flickering appears due to the lower frequencies (i.e., higher bit durations) used in the transmission of the signal and also due to the use of Zolertia Z1 for the generation of the signal. The frequencies used have been chosen having into account the characteristics in the response of the indoor solar panel. In the case of Zolertia Z1, this device is producing flickering because sometimes the Zolertia Z1 introduces some “gaps” into the signal as can be observed in Figure 28. The gaps introduced are due to that Contiki kernel does not really provide multi-threading, instead of that an event-driven programming is implemented and the process run in cooperative context, whereas the interrupts and real-time timers run in the preemptive context. In cooperative context the kernel wait for the finalization of the task but in preemptive context the kernel temporarily interrupt the task being carried out in order to execute another task of higher priority level. The interrupted task is resumed at a later time [33, 34, 35, 36]. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 67 Figure 28. Gap in signal of 21 KHz generated by Zolertia Z1 A test was carried out using the Zolertia Z1 for the generation of a constant signal of 21 KHz of frequency. The signal was fed to the LED diver module of Texas Instruments. A flickering appears in the LED, even accomplishing the rule of the use of a frequency with a period lower than 5ms like was mentioned above (for a signal of 21 KHz of frequency, the period is 0.0047ms). The test was repeated generating the signal with a Function Generator, and using again a frequency of 21 KHz. In this second case no flickering appears in the LED. As conclusion of this first test it is possible to infer that in order to avoid flickering, maybe Zolertia Z1 is not the best device for the generation of the signal, because it introduces gaps in the frame that are perceived by human eye as flickering. Second test One of the methods for flickering mitigation is dimming the light of the LED. With the aim to observe the effect of the dimming, a signal was generated using different levels of dimming. Three signals were used, each one with the format of the signal required by the WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 68 AS3933 but with three different levels of dimming. The signals tested are shown in Figure 29. (a) Signal with Vpp of 2V (b) Signal with Vpp of 1V (a) Signal with Vpp of 0.6V Figure 29. Signal with different levels of dimming WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 69 This test was made in the presence of interference from the fluorescent light in the laboratory, using the configuration in Figure 18. In the case of Figure 29(a) the Vpp has amplitude of 4V and not dimming is applied to the signal. The distance of a successful wake-up reached was of 60 cm. In the second case, Figure 29(b) the signal is dimmed with a Vpp of 2V. In this case the flickering decreases slightly and the distance reached is 38 cm. Finally, with the signal shown in Figure 29(c), which has a Vpp of only 0.6V, few flickering is perceived in the LED; however no wakeups are trigger at any distance. From this second test it is possible conclude that even if the flickering is considerably reduced, in order to reach longer distances it is necessary avoid dimming the signal in a high proportion. Third test Using the light sensor from a mobile device a measure of the amount of light generated for every part of the frame was taken. The results are shown in the Table 2. In this case independent signals were tested and the intensity of light generated for each one was measured. The signals tested used a frequency of 21 KHz, a signal with OOK modulating format using the bit duration defined for this project and a frequency of 2.625 KHz which corresponds to the bit rate. As point of reference also the intensity of light was measured when any signal is transmitted, this is when the light is feed by a constant DC signal; and the intensity of light when no source of light is on (into the darkness). The measure was taken from a distance of 1 m and with no interference from other sources of light. The device used is the GP2A Light Sensor manufactured by Sharp. The sensor has 0.75 mA of operating current, the maximum range of the light sensor is 646239.5 and the application used is Lux Light Meter. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 70 No Signal Description Lux 1 Signal of 21 KHz. This signal corresponds to the frequency of the carrier signal. The frequency is modulated with OOK. 51.51 2 Carrier of 21 KHz modulated using OOK. The bit duration of this signal is 8 times the period of the carrier frequency. 65.89 3 The bit rate frequency was also tested, corresponding to a frequency of 2.625 KHz. Each bit corresponds to 8 times the frequency carrier. 44.75 4 For comparison purposes the light intensity was also measured when LED is always on, this is without transmitting any signal. This is the maximum intensity of light value achieved with the LED to 1m. 84.29 . WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 71 5 With the LED off (into the darkness), the minimum amount of light in the test room. 4 Table 2. Signals measured with the Lux Light Meter From this test it is possible to observe that the signal number 2 from Table 2, the OOK modulated signal is the one with the highest illuminance level, even higher than the carrier frequency of 21 KHz (signal number 1). This can be explained by the fact that in the OOK modulated signal the half of the time the light remains in the higher level of intensity (the moments corresponding to the logical zero). Also, measuring the artificial light of the laboratory (fluorescent lights), this have a value around 200 lux. The measure was taken from a distance near to 2m from the fluorescents lights in the laboratory´s ceiling. If we compare the 200 lux (at 2m) produced by the fluorescent lights in the laboratory with the 84.29 lux (at 1m) produced by the LED, we can also understand why in the experiments developed the interference produced by the artificial light is so high. Fourth test As it was mentioned earlier, flickering is the variation of the brightness in the source of light, which is detected by human eye and can cause annoying effects. Flickering may appear in two moments in the transmission: intra-frame flickering or inter-frame flickering. Accordingly with [29] for intra-frame flickering is recommended to split the frame in subframes and add some “compensation bits” between them, this is between sub-frames. The compensation bits will help to maintain the same brightness in the source of light during the transmission of the frame. In the case of this implementation, it is not possible to add WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 72 compensation bits inside the frame, because it is required to accomplish the requirements in the frame format for wakeup the AS3933. Also the use of Manchester encoded is proposed for intra-frame flickering mitigation. In this implementation, instead of adding compensation bits inside the frame, it is proposed to dim the signal in some points, helping to maintain the level of brightness in the LED. In Figure 30 the signal using the two formats is shown: Figure 30(a) shows the signal without dimming and Figure 30(b) presents the proposed signal applying compensation in the logic zero bits. It is important also to note that Manchester encoded is already implemented in the frame. (a) Signal without dimming (b) Signal with dimming applied to the logic zero bits Figure 30. Intra-frame flickering compensation For interframe flickering compensation, it is necessary to introduce an idle pattern between frames. The idle pattern chosen has the same format of the frame in order to conserve the same level of brightness, this is, the idle pattern is also conform by a carrier burst + separation bit + preamble bits + pattern bits (or wakeup code) and using a different WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 73 code in the pattern. Then a data stream is built following the format shown in Figure 31, where the wakeup frames are included between a data stream of idle patterns. Figure 31. Data stream format A measurement of the amount of lux generated by this data stream was taken. In these cases, the signal generated by Zolertia Z1 has the 3 levels mentioned earlier, and has the shape shown in Figure 30(a) and (b). For the generation of the frame we used: (i) the data stream using frames without dimming and (ii) the data stream using frames with dimming in the logic zero bits, as it was explained above. The results are shown in Table 3. Again a distance of 1 m between the LED and the light meter was established. No. Description Lux Case (i) Data stream (Figure 31) using frames without dimming (Figure 30 (a)) 47.5 – 65.5 Case (ii) Data stream (Figure 31) using frames with dimming in the logic zero bits (Figure 30 (b)) 45.5 – 53.5 Table 3. Illumination level of the data stream using different levels of dimming in the frame As can be observed in the results presented in Table 3, in the case (ii) the variation in illuminance is less than in case (i). Also, in case (i) the illuminance range varies between the values reached by a signal of 21 KHz (Table 2 – signal No. 1) and a signal modulated using OOK (Table 2- signal 2). In case (ii) the lux levels are closer to the ones reached by a signal of 21 KHz accomplish a more stable signal. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 80 5. CONCLUSIONS AND FUTURE WORK A wake-up receiver system using VLC has been presented. The use of VLC for communication avoids the problem of radio interferences with other communication signals and preventing the congestion in the radio channels. Also, the wakeup receiver offers an immediate response to a call and avoids the unnecessary wakeups of the wireless node waiting for a possible incoming transmission. In the test performed a distance of 7m is reached, which is the standard longitude for VLC communications, however using longer bit durations it is possible to reach longer distances of around 14m which exceed the range of distance. This ranges were accomplished through the use of an indoor solar panel for harvesting the energy for the wake-up device operation as well as the reception of the signal. The system also includes the important characteristic of the use of an indoor solar panel as device receptor of the signal, allowing the use of the indoor solar panel for a different purpose than the one it was built for. Additionally, the wakeup receiver uses the indoor solar panel for harvesting energy from the light, becoming the first wake up receiver with this characteristic. Also, the use of an indoor solar panel permits harvest from the light the necessary power for the independent operation of the device. This allows the wake-up receiver to be in constant and independent activity without affecting the amount of battery of the wireless node, saving in this way significant power and consequently extending the lifetime of the device connected to wake-up receiver and the network. However, using an indoor solar panel in the system also brings a set of new issues and challenges, for example, the restriction in the use of low frequencies for the transmission and consequently lower bit rates; and the use ultra-low power components for the receptor. In addition, the test made over a small and a large indoor solar panel shows a WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 81 better response for the small one. This will permit the use of the system in applications where the small size of the devices is a desirable characteristic. Also the successful use of the device is shown to generate a wake-up signal using a pattern or address for the receiver. This makes this system useful in deployments where this is a desirable characteristic. Nevertheless, it was show that the wake-up receiver can also generate a wake-up signal using the carrier burst, which can be useful in environments where it is desirable to wake up several devices at once. Flickering mitigation is still a challenge that should be continued to be investigated. In this project the flickering was minimized through several actions. First, for intra-frame flickering mitigation the use of Manchester encoding permits balance the intensity of light in each Manchester symbol transmitted. Second, for interframe flickering mitigation an idle pattern with the same format of the frame is transmitted, helping to preserve the intensity level of light. Third, for intra-frame and interframe flickering mitigation, the zero logic bits in the frames were dimming or set to a lower level of intensity, also with the objective of preserve the brightness in the LED along the transmission of the stream. Fourth, another action taken in order to reduce flickering is the use of a shorter bit duration time although the reached distance is affected. Finally, a fifth modification was the change to the length of the signal sent: we change the 16 Manchester symbols in the pattern, i.e., 32 bits, to a pattern of 8 Manchester symbols or 16 bits. Two options of configuration were developed for the wake-up receiver. Tests were conducted and showed that the two configurations have similar results and can be used accordingly with the application and the place of deployment. The use of this device inside a building permits to be applied without many modifications over the existent electrical system, since the Zolertia Z1 can be easily attached to any LED and through the use of the LED drive module it is able to generate a signal with the address WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 82 or code for any node in the network, facilitating the deployment of this solution. Also notice that the LED drive module can be used also with any other digital device apart of the aforementioned Zolertia Z1. It is important to mention that upon the triggering of the wake up signal, it is possible to transmit data using as downlink the VLC channel, and this would be an interesting topic for future work. Also, the study of flickering mitigation in VLC communications can be furthered, along with the developing of a transmitter with more levels of dimming, and the possibility of inserting compensation bits inside the frame. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 83 References [1] 10 Breakthrough Technologies. 10 Emerging Technologies that will Change the World. Massachusetts Institute of Technology. February 2013. http://www2.technologyreview.com/featured-story/401775/10-emerging-technologies- that-will-change-the/2/ [2] S. Roundy, D. Steingart, L. Frechette, P. Wright, J. RabaeyPower. Power Sources for Wireless Sensor Networks. First EuropeanWorkshop, EWSN 2004, Berlin, Germany, January 19-21, 2004. Proceedings. Lecture Notes in Computer Science Volume 2920, 2004, pp 1-17. [3] J. Oller, I. Demirkol, J. Casademont, J. Paradells, U. Gamm and L. Reindl, Wake-up radio as an energy-efficient alternative to conventional wireless sensor network MAC protocols, ACM MSWIM'13, Barcelona, Spain, 3-8 Nov. 2013. [4] I. Demirkol, C. Ersoy and E. Onur, Wake-up receivers for wireless sensor networks: benefits and challenges, IEEE Wireless Communications, August 2009 [5] J. Mathews, M. Barnes, A. Young and D. K. Arvind, Low power wakeup in wireless sensor networks using free space optical communications, 4th Int. Conf. on Sensor Technologies and Applications, 2010. [6] T. Häkkinen, J. Vanhala, Ultra-low power wake-up circuit for shortrange wireless communication, IET 4th International Conference on Intelligent Environments, 2008, Seattle, WA, United States. [7] M. Magno, N. Jackson, A. Mathewson, L. Benini and E. Popovici. Combination of hybrid energy harvesters with MEMS piezoelectric and nano-Watt radio wake up to extend lifetime of system for wireless sensor nodes, ARCS 2013. [8] Zolertia datasheet, v1.1, March 11, 2010. [9] K. Sung-Man and W. Ji-San, Simultaneous reception of visible light communication and optical energy using a solar cell receiver, International Conference on ICT Convergence (ICTC, 2013, pp.896, 897, 14-16 Oct. 2013 [10] AS3933 - 3D Low frequency wakeup receiver. Datasheet. Austriamicrosystems. Revision 1.0. 2010 WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 84 [11] S. Rajagopal, R.D. Roberts and S. Lim. IEEE 802.15.7 Visible Light Communication: modulation schemes and dimming support. IEEE Communication Magazine, Topics in Standars, March 2012. [12] D. Miorandi, S. Sicari, F. De Pellegrini and I. Chlamtac. Internet of things: Vision, applications and research challenges. Ad Hoc Networks 10. 2012. 1497–1516 [13] I. Akyildiz, W. Su, Y. Sankarasubramaniam and E.Cayirci. A Survey on Sensor Networks. IEEE Communications Magazine, August 2002. [14] http://images.libelium.es/content/applications/libelium_smart_world_infographic_big.png [15] H. Karl, A. Willig . Protocols and Architectures for Wireless Sensor Networks. April 2005. ISBN: 978-0-470-09510-2. [16] H. Karl. Ad hoc and Sensor Networks Chapter 1: Motivation & Applications. Computer Networks Group, Universität Paderborn. http://www.cs.uni-paderborn.de/en/researchgroup/research-group-computer-networks/teaching/protocols-and-architecture-for- wireless-sensor-networks.html [17] T. Rault, A. Bouabdallah and Y. Challal. Energy efficiency in wireless sensor networks: A top-down survey. Computer Networks 67. 2014. Pages 104-122. Journal homepage: www.elsevier.com/locate/comnet [18] G. Anastasi, M. Conti, M. Di Francesco and A. Passarella. Energy conservation in wireless sensor networks: A survey. Ad Hoc Networks 7. 2009. Pages 537–568. Journal homepage: www.elsevier.com/locate/adhoc [19] F.M. Costa, H. Ochiai, A comparison of modulations for energy optimization, in: Wireless Sensor Network Links, IEEE Global Telecommunications Conference, 2010, pp. 1–5 [20] X. Chu, H. Sethu, Cooperative topology control with adaptation for improved lifetime in wireless ad hoc networks, in: IEEE INFOCOM, Orlando, FL, USA, 2012, pp. 262–270. [21] R. Rajagopalan, P.K. Varshney, Data-aggregation techniques in sensor networks: a survey, Electrical Engineering and Computer Science, 2006, Paper 22. [22] R. Carrano, D. Passos, L. Magalhaes, C. Albuquerque. Survey and taxonomy of duty cycling mechanisms in wireless sensor networks. IEEE Communications. 2014. [23] H. Ba, I. Demirkol, W. Heinzelman. Passive wake-up radios: from devices to applications, Ad Hoc Networks 11. 2013. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 85 [24] D. Kumar, T.C. Aseri, R. Patel. EEHC: energy efficient heterogeneous clustered scheme for wireless sensor networks. Computer Communications. 2009. [25] H. Li, Y. Liu, W. Chen, W. Jia, B. Li, J. Xiong. COCA: constructing optimal clustering architecture to maximize sensor network lifetime. Computer Communications. 2013. [26] A. Liu, J. Ren, X. Li, Z. Chen, X.S. Shen, Design principles and improvement of cost function based energy aware routing algorithms for wireless sensor networks, Computer Networks. 2012. [27] L. Chen, S. Cool, H. Ba, W. Heinzelman, I. Demirkol, U. Muncuk, K. Chowdhury and S. Basagni. Range Extension of Passive Wake-up Radio Systems through Energy Harvesting. IEEE ICC 2013 - Ad-hoc and Sensor Networking Symposium. 2013. [28] C. Pohlmann. Visible Light Communication. Seminar Kommunikationsstandards in der Medizintechnik. Institut für Telematik ,Universität zu Lübeck. June 2010 [29] IEEE 802.15.7 Working Group. IEEE Standard for Local and metropolitan area networks. Part 15.7: Short-Range Wireless Optical Communication Using Visible Light. IEEE. 2001. [30] BPW34 Silicon PIN Photodiode Datasheet. Vishay Semiconductors. [31] V. Jelicic_, M. Magno, D. Brunellix, V. Bilas and L. Benini. Analytic Comparison of Wakeup Receivers for WSNs and Benefits over the Wake-on Radio Scheme. Proceedings of the 7th ACM workshop on Performance monitoring and measurement of heterogeneous wireless and wired networks. Pages 99-106. ACM New York, NY, USA. 2012. [32] S. M. Berman, D. S. Greenhouse, I. L. Bailey, R. Clear and T. W. Raasch. Human electroretinogram responses to video displays, fluorescent lighting and other high frequency sources. Optometry and Vision Science 68:645–662, 1991. [33] Kernel Preemption and Critical Sectionshttp://www.freebsd.org/doc/en/books/archhandbook/smp-design.html [34] Contiki system. Multi-threading library. http://dak664.github.io/contikidoxygen/a01625.html [35] Processes. https://github.com/contiki-os/contiki/wiki/Processes [36] A. Dunkels, O. Schmidt, T. Voigt and M. Ali. Protothreads: Simplifying Event-Driven Programming of Memory-Constrained Embedded Systems. SenSys ‘06. Proceedings of the WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 86 4th international conference on Embedded networked sensor systems. ACM New York. 2006. http://muneebali.com/pubs/dunkels06protothreads.pdf [37] Contiki OS. http://jeremyudit.blogspot.com.es/2012/08/contiki-os.html [38] M. Lont, D. Milosevic and G. Dolmans. Analytical Models for the Wake-up Receiver Power Budget for Wireless Sensor Networks. Global Telecommunications Conference, 2009. GLOBECOM 2009. [39] Richard Su, Thomas Watteyne, Kristofer S. J. Pister. Comparison between Preamble Sampling and Wake-Up Receivers in Wireless Sensor Networks. Global Telecommunications Conference, 2010. GLOBECOM 2010. [40] J. Oller, I. Demirkol, J. Casademont and J. Paradells. Design, Development, and Performance Evaluation of a Low-Cost, Low-Power Wake-Up Radio System for Wireless Sensor Networks. ACM Transactions on Sensor Networks, Vol. 10, No. 1, Article 11. November 2013. [41] V. Kumar and R. Kumar. Low Power Wake up Receiver for Wireless Sensor Network. International Journal of Computer Science and Technology. IJCST Vol. 1, Issue 1. September 2010. [42] G.U. Gamm, M. Sippel, M. Kostic and L.M. Reindl. Low Power Wake-up Receiver for Wireless Sensor Nodes. Sixth International Conference on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP). 2010. [43] J. Mathews, M. Barnes and D. K. Arvind. Low Power Free Space Optical Communication in Wireless Sensor Networks. 12th Euromicro Conference on Digital System Design / Architectures, Methods and Tools. 2009 [44] P. Le-Huy and S. Roy. Low-Power Wake-Up Radio for Wireless Sensor Networks. Mobile Networks Applications. 2010. [45] E. Popovici, M. Magno and S. Marinkovic. Power Management Techniques for Wireless Sensor Networks: a Review. 5th IEEE International Workshop on Advances in Sensors and Interfaces (IWASI). 2013. [46] L. Atzori, A. Lera and G. Morabito. The Internet of Things: A survey. Computer Networks 54. 2010. [47] M. Vodel, M. Caspar and W. Hardt. Wake-Up-Receiver Concepts - Capabilities and Limitations. Journal of Networks, Vol. 7, No. 1. January 2012. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 87 [48] Takakuni Douseki. A batteryless optical-wireless system with white-led illumination. 15th IEEE International Symposium on Personal, Indoor and Mobile Radio Communications, 2004. [49] J. M. Gilbert and F. Balouchi. Comparison of Energy Harvesting Systems for Wireless Sensor Networks. International Journal of Automation and Computing 05. October 2008. [50] J. Gubbia, R. Buyyab, S. Marusic and M. Palaniswami. Internet of Things (IoT): A vision, architectural elements, and future directions. Future Generation Computer Systems 29. 2013. [51] J. Yick, B. Mukherjee, D. Ghosal. Wireless sensor network survey. Computer Networks 52. 2008. [52] S. Bdiri, F. Derbel and O. Kanoun. Wireless Sensor Nodes Using Energy Harvesting and B-Mac Protocol. 10th International Multi-Conference on Systems, Signals & Devices (SSD). Hammamet, Tunisia, March 2013. [53] P. Clark and A. Sengers. Wireless optical networking challenges and solutions. MILCOM 2004 IEEE Military Communications Conference. 2004. WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 88 Appendixes Appendix A. Code for the generation of the signal using several ports. /* protocol_SP.c This program generates the protocol required for AS3933 using Several Ports. In this program each one of Ports 4.0 4.2 y 4.7 generates a signal, which are added externally with the use of an adder circuit, generating the wakeup signal. Program developed by: Carolina Carrascal R. Thesis proyect: Wakeup receiver system using Solar Panel and Visible Light Communications Year: 2014 */ #include "contiki.h" #include "dev/leds.h" #include <stdio.h> //Configuration for Port 4.0 #define P40_OUT() P4DIR |= BV(0) #define P40_IN() P4DIR &= ~BV(0) #define P40_SEL() P4SEL &= ~BV(0) #define P40_IS_1 (P4OUT & BV(0)) #define P40_WAIT_FOR_1() do{}while (!P40_IS_1) #define P40_IS_0 (P4OUT & ~BV(0)) #define P40_WAIT_FOR_0() do{}while (!P40_IS_0) #define P40_1() P4OUT |= BV(0) #define P40_0() P4OUT &= ~BV(0) //Configuration for Port 4.2 #define P42_OUT() P4DIR |= BV(2) #define P42_IN() P4DIR &= ~BV(2) #define P42_SEL() P4SEL &= ~BV(2) #define P42_IS_1 (P4OUT & BV(2)) #define P42_WAIT_FOR_1() do{}while (!P42_IS_1) #define P42_IS_0 (P4OUT & ~BV(2)) #define P42_WAIT_FOR_0() do{}while (!P42_IS_0) #define P42_1() P4OUT |= BV(2) #define P42_0() P4OUT &= ~BV(2) //Configuration for Port 4.7 #define P47_OUT() P4DIR |= BV(7) #define P47_IN() P4DIR &= ~BV(7) #define P47_SEL() P4SEL &= ~BV(7) #define P47_IS_1 (P4OUT & BV(7)) #define P47_WAIT_FOR_1() do{}while (!P47_IS_1) #define P47_IS_0 (P4OUT & ~BV(7)) #define P47_WAIT_FOR_0() do{}while (!P47_IS_0) #define P47_1() P4OUT |= BV(7) WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 89 #define P47_0() P4OUT &= ~BV(7) #define LENGTH_BURST 100 // Length of the carrier burst #define BIT_DURATION 8 // Bit duration in carrier burst times. Number of // times that the carrier frequency // cross in time defined by AS3933 datasheet static uint16_t usec; static int n; void frequency_off(); void frequency_on(int duration); /*---------------------------------------------------------------------*/ /* We declare the processes */ PROCESS(protocol_process, "Protocol Several ports process"); /* We require the processes to be started automatically */ AUTOSTART_PROCESSES(&protocol_process); /*---------------------------------------------------------------------*/ PROCESS_THREAD(protocol_process, ev, data) { PROCESS_BEGIN(); P40_OUT();// pin 40 is defined as output P40_SEL();// P42_OUT();// pin 40 is defined as output P42_SEL();// P47_OUT();// pin 40 is defined as output P47_SEL();// static struct etimer timer; static int codeID[8] = {1,1,1,0,1,1,1,1}; static int frame2[8] = {0,0,0,1,0,0,0,0}; static int i = 0; static int cont = 0; static int m = 0; // If the correlator is activated in the AS3933, then: // (a) Send Carrier Burst // (b) Send a Separation Bit // (c) Send Preamble // (d) send Pattern while(1){ // while(cont<50){ //For sending 50 frames for probability //calculation // cont++; // (a) Send Carrier Burst // Send a carrier burst of 21Khz for LENGTH_BURST times frequency_on(LENGTH_BURST); WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 96 Appendix C. Code for wake-up triggers counting Code used in a MSP430 microcontroller of Texas Instruments, for wake-up triggers counting. /*Wake-ups counter. Port 2.0 in MSP430 as data entrance*/ #include <msp430g2452.h> #include <stdint.h> volatile int count = 0; //wake-up counter /* * main.c */ int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer // Configure P2.0 P2DIR &= ~(BIT0); //P2.0 en 0=input P2SEL &= ~(BIT0); //P2.0 as GPIO 0=GPIO 1=Peripheral P2REN |= BIT0; // P2.0 Enable Pullup/Pulldown P2IES &= ~(BIT0); // P2.0 Low-to-High trigger P2IE |= BIT0; // P2.0 interrupt enabled P2IFG &= ~BIT0; // P2.0 IFG cleared just in case _EINT(); while(1){ // Execute some other code } return 0; } // Port 2 interrupt service routine #pragma vector=PORT2_VECTOR __interrupt void Port_2(void) { if(P2IFG & BIT0) { count++; // counter increased in 1 P2IFG &= ~BIT0; // P2.0 IFG cleared } } WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 97 Appendix D. Code for the generation of a carrier burst signal of 21 KHz Code for the generation of a carrier burst signal of 21 KHz using Port 4.0 of Zoleria Z1. #include "contiki.h" #include "dev/leds.h" #include <stdio.h> /* For printf() */ #define P40_OUT() P4DIR |= BV(0) #define P40_IN() P4DIR &= ~BV(0) #define P40_SEL() P4SEL &= ~BV(0) #define P40_IS_1 (P4OUT & BV(0)) #define P40_WAIT_FOR_1() do{}while (!P40_IS_1) #define P40_IS_0 (P4OUT & ~BV(0)) #define P40_WAIT_FOR_0() do{}while (!P40_IS_0) #define P40_1() P4OUT |= BV(0) #define P40_0() P4OUT &= ~BV(0) #define SET_FREQ 23 //400 = 1.16 KHz //300 = 1.55 KHz //250 = 1.86 Khz //235 = 1.99 Khz //210 = 2.21 KHz //195 = 2.24 Khz //155 = 3.02 Khz //135 = 3.47 Khz //115 = 4.08 Khz //105 = 4.47 KHz //95 = 4.95 KHz //85 = 5.53 KHz //75 = 6.28 KHz //65 = 7.26 KHz //55 = 8.61 KHz //50 = 9.30 Khz //45 = 10.57 KHz //40 = 11.63 Khz //35 = 14.25Khz //30 = 16.1Khz-16.26Khz 100=4.x Khz //26 = 18.88Khz //25 = 20Khz //24 = 20.45Khz //23 = 21.17Khz - 9 nop() //23 = 22.3Khz - 8 nop() //23 = 23.55Khz - 7 nop() //20 = 24Khz //19 = 25.89 Khz //18 = 25.89 //17 = 29.14 KHz //16 = 29.14 WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 98 //15 = 33.27Khz //10=46.82 Khz //5=117.81Khz /*----------------------------------------------------------------------*/ /* We declare the processes */ PROCESS(burst_frequency_process, "Burst frequency process"); /* We require the processes to be started automatically */ AUTOSTART_PROCESSES(&burst_frequency_process); /*----------------------------------------------------------------------*/ /* Implementation of the second process */ PROCESS_THREAD(burst_frequency_process, ev, data) { PROCESS_BEGIN(); P40_OUT();// pin 40 is defined as output P40_SEL();// static struct etimer timer; static uint16_t usec; static int n; while (1) { // we set the timer from here every time // for(n=0; n<25; n++){ P40_0();// pin 4.0 outputs to 0 usec = SET_FREQ; while(usec > 3) /* 2 cycles for compare */ { /* 2 cycles for jump */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ usec -= 2; /* 1 cycles for optimized decrement */ } P40_1(); // pin 4.0 outputs a 1 usec = SET_FREQ; while(usec > 3) /* 2 cycles for compare */ { /* 2 cycles for jump */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ nop(); /* 1 cycles for nop */ WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 99 nop(); /* 1 cycles for nop */ usec -= 2; /* 1 cycles for optimized decrement */ } //} // etimer_set(&timer, CLOCK_CONF_SECOND*2); // and wait until the event we receive is the one // we're waiting for // PROCESS_WAIT_EVENT_UNTIL(ev == PROCESS_EVENT_TIMER); } PROCESS_END(); } /*----------------------------------------------------------------------*/ WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 100 Appendix E. Code for the generation of the signal using only Port 4.0 Code for the generation of the signal by Zolertia Z1, using only one port (Port 4.0). This program send the Frame 50 times, waiting 500 ms between frames. In this case no dimming or flickering mitigation techniques are applied between frames. #include "contiki.h" #include "dev/leds.h" #include <stdio.h> #define P40_OUT() P4DIR |= BV(0) #define P40_IN() P4DIR &= ~BV(0) #define P40_SEL() P4SEL &= ~BV(0) #define P40_IS_1 (P4OUT & BV(0)) #define P40_WAIT_FOR_1() do{}while (!P40_IS_1) #define P40_IS_0 (P4OUT & ~BV(0)) #define P40_WAIT_FOR_0() do{}while (!P40_IS_0) #define P40_1() P4OUT |= BV(0) #define P40_0() P4OUT &= ~BV(0) #define LENGTH_BURST 20 // 20 - Length of the burst for 21KHz #define BIT_DURATION 8 // In number of times of the carrier frequency static uint16_t usec; static int n; void frequency_off(); void frequency_on(int duration); /*----------------------------------------------------------------------*/ /* We declare the processes */ PROCESS(protocol_process, "Protocol Manchester process"); /* We require the processes to be started automatically */ AUTOSTART_PROCESSES(&protocol_process); /*----------------------------------------------------------------------*/ PROCESS_THREAD(protocol_process, ev, data) { PROCESS_BEGIN(); P40_OUT();// pin 40 is defined as output P40_SEL();// static int veces=0; static struct etimer timer; static int codeID[8] = {1,1,1,0,1,1,1,1}; static int i = 0; WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 101 // If it is necessary to send data then: (a) Send carrier burst // (b) send a bit separation // (c) send preamble // (d) send Manchester code while(veces<50){ // (a) Send the carrier burst of 21KHz frequency_on(LENGTH_BURST); // (b) send a bit separation. // Always ON - ZERO equivalent frequency_off(); // (c) send preamble - 6 bits (101010) 3-veces for (i = 0; i < 3; i++){ frequency_on(BIT_DURATION); //ONE frequency_off(); //ZERO } // (d) Send pattern Manchester coded for balance the frame for (i = 0; i < 8; i++){ if (codeID[i] == 0){ // For 0, Manchester code is 0-1 frequency_off(); //ZERO frequency_on(BIT_DURATION); //ONE }else{ //For 1, Manchester code is 1-0 frequency_on(BIT_DURATION); //ONE frequency_off(); //ZERO } } // We wait for 500 mseg before send a frame again P40_1(); // pin 40 outputs to 0 etimer_set(&timer, CLOCK_CONF_SECOND*0.5); PROCESS_WAIT_EVENT_UNTIL(ev == PROCESS_EVENT_TIMER); etimer_reset(&timer); veces++; } PROCESS_END(); } /************************************************************************/ /*In OOK modulation, frequency:off is the ausence of carrier signal*/ void frequency_off(){ for(n=0; n < BIT_DURATION; n++){ P40_1(); // pin 40 outputs a 1 usec = 46; //46=double of time (23) while(usec > 3) // 2 cycles for compare { // 2 cycles for jump nop(); // 1 cycles for nop WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 102 nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop usec -= 2; // 1 cycles for optimized decrement } } } /************************************************************************/ /*In OOK modulation, frequency_on is the presence of carrier signal*/ void frequency_on(int duration){ for(n = 0; n < duration; n++){ P40_0(); // pin 4.0 outputs to 0 usec = 23; // 23 = 21 KHz while(usec > 3) // 2 cycles for compare { // 2 cycles for jump nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop usec -= 2; // 1 cycles for optimized decrement } P40_1(); // pin 40 outputs a 1 usec = 23; while(usec > 3) // 2 cycles for compare { // 2 cycles for jump nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop nop(); // 1 cycles for nop usec -= 2; // 1 cycles for optimized decrement } } } WAKE-UP COMMUNICATION SYSTEM USING SOLAR PANEL AND VISIBLE LIGHT COMMUNICATION 103