scieee AI-readable full text Open interactive document viewer

LED-Based Wake-Up circuit for microcontrollers

Ripoll Vercellone, Edgar,Reverter Cubarsí, Ferran,Gasulla Forner, Manuel

Abstract

This article proposes, analyzes, and tests a wake-up circuit for a microcontroller (MCU) that uses a light-emitting diode (LED), operating as a photodetector, illuminated by a smartphone flashlight. The wake-up circuit consists of a high-pass filter and a voltage-level translator that interfaces the LED, with a suitable resistor in parallel, to the MCU. When illuminated by a switching flashlight, the LED generates a square voltage that is conveniently converted in logic levels at the output of the wake-up circuit. A firmware embedded into the MCU additionally checks that a predetermined sequence of logic pulses at a given rate is accomplished to activate the MCU. This article includes a theoretical analysis and experimental results that validate the proposed circuit.

Full text

Abstract—This paper proposes, analyzes, and tests a wake-up circuit for a microcontroller (MCU) that uses a LED, operating as a photodetector, illuminated by a smartphone flashlight. The wake-up circuit consists of a high-pass filter and a voltage level translator that interfaces the LED, with a suitable resistor in parallel, to the MCU. When illuminated by a switching flashlight, the LED generates a square voltage that is conveniently converted in logic levels at the output of the wake-up circuit. A firmware embedded into the MCU additionally checks that a predetermined sequence of logic pulses at a given rate is accomplished to activate the MCU. The paper includes a theoretical analysis and experimental results that validate the proposed circuit. Index Terms—Optical wake-up circuit, microcontroller, lowpower mode, LED, photodiode. I. INTRODUCTION Wireless sensor nodes usually are autonomously powered and have a microcontroller unit (MCU) that controls the electronic modules and processes the information coming from sensors and/or transceivers [1]. To save power, the sensor node is set most of the time in a low-power mode (LPM), which is controlled by the MCU, and only wakes-up occasionally for sensing and transmitting data. MCUs are awaken by internally and/or externally generated interruption signals. Internal interruption signals come from embedded timers and are used by the MCU to carry out periodic tasks [1], [2]. External interruption signals come from, among others, the same sensors in charge of the measurement [3], secondary low-power sensors [4], alarm events [5], or remote radiofrequency (RF) signals that trigger a wake-up receiver of the sensor node [6]. Optical wake-up has been proposed using detectors such as LDRs [4] and photodiodes [7], [8]. In [7], a commercial infrared photodiode was used with a transimpedance amplifier, active and passive filters, a comparator, and some additional circuitry. Undesired effects of artificial and ambient lights were prevented at the cost of circuit complexity. In [8], a custom CMOS receiver is proposed, where a parasitic photodiode is again surrounded of a complex circuitry. Contrariwise, in [4] a simple voltage divider was used. There, ambient light was the wake-up source and, hence, no circuitry was added to filter it out. However, a current of 3.3 µA was continuously drained and, because no high-pass filter was used, generated voltages lying between a logic ‘0’ and ‘1’ could lead to an increase of the MCU power consumption [9]. LEDs can also be employed as optical detectors, as demonstrated in [10], and hence for low-cost optical wake-up circuits, as initially proven in [11]. There, a LED was directly connected to the MCU and a smartphone flashlight was used as the wake-up source. Besides, the LED was used for light signaling, thus having a dual This paragraph of the first footnote will contain the date on which you submitted your brief for review. This work was supported by the Secretariat of University and Research of the Ministry of Business and Knowledge of the Government of Catalonia, by the Spanish State Research Agency (AEI) and by the European Regional Development Fund under Project TEC2016-76991-P. function. However, interfering lights, even of low intensity, could also wake-up the MCU and increase its power consumption, as in [4]. In addition, no detailed analysis is provided. Here, a LED-based wake-up circuit activated by a smartphone flashlight and with immunity to interfering lights is proposed, analyzed, and tested. The proposed circuit is much simpler than those suggested in [7], [8], and solves the limitations of interference sensitivity and current consumption found in [4], [11]. II. WAKE-UP CIRCUIT The circuit of Fig. 1 is proposed for interfacing a LED to the MCU, which includes several stages as described throughout this section. Similarly to a photodiode [10], a voltage across the LED (vD) is generated in presence of light, e.g. that coming from a smartphone flashlight. The value of vD needs to be high enough to become a logic ‘1’ and wake-up the MCU. However, artificial and ambient interfering lights could also wake-up the MCU. To palliate this, a resistor (RD) is added in parallel with the LED [12]. In this way, vD is proportional to the generated LED current (iD), thus allowing a better discrimination between different light intensities. Even so, DC and low frequency signals coming from interfering lights either indoors (e.g. office) or outdoors (e.g. sun) can generate values of vD corresponding to a (false) ‘1’ or to an intermediate level between a logic ‘0’ and ‘1’ that leads to an increase of the MCU power consumption [9]. For this reason, a high-pass filter (HPF), consisting of CH and RH, is added to suppress these signals. Consequently, a switching wake-up flashlight has to be used to surpass the HPF. When the flashlight turns on, iD and thus vD undergo a step increase from an initial value (corresponding to the interfering light) and the voltage step (∆vD) instantaneously appears in the HPF output (vH). Since ∆vD may not directly lead to a ‘1’, an inverter voltage level translator (VLT) stage is also added at the output of the HPF. This stage, based on a NMOS transistor and a pull-up resistor (RM), converts ∆vD at its input to 0 V (a ‘0’) at its output (vM) and a zero voltage to Vcc (a ‘1’). Finally, the VLT output is connected to an interruption pin of the MCU. Fig. 1. Circuit for waking up a microcontroller using a LED. E. Ripoll-Vercellone is with Idneo Technologies, 08100 Mollet del Vallès, Catalonia, Spain (e-mail: [email protected]). F. Reverter and M. Gasulla are with the Department of Electronic Engineering, Universitat Politècnica de Catalunya, 08860 Castelldefels, Catalonia, Spain (e-mails: [email protected], [email protected]). C D R D C H R H C M R M MCU Int Pin V cc LE D NMOS v D v H v M i D LED-based Wake-up Circuit for Microcontrollers E. Ripoll-Vercellone, F. Reverter, and M. Gasulla, Senior Member, IEEE This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication. The final version of record is available at http://dx.doi.org/10.1109/TIM.2020.3009340 Copyright (c) 2020 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected]. In order to evaluate the response of the circuit of Fig. 1 in the frequency and time domains, the parasitic capacitances of the LED (CD) and of the NMOS input (CM) are considered and represented in dashed lines. In addition, the LED itself is considered for the analysis as a current source (iD). To avoid loading effects on RD and CH, the conditions RH >> RD and CD, CM << CH are imposed. Thus, the Laplace transfer function of the circuit is given by 𝐻𝐻 (𝑠𝑠)= 𝑉𝑉 H 𝐼𝐼 D ≈ −𝑅𝑅𝐷𝐷 𝑠𝑠𝜔𝜔 2 (𝑠𝑠+𝜔𝜔 1 )(𝑠𝑠+𝜔𝜔 2 ) (1) which corresponds to a band-pass filter (BPF) with the following cutoff frequencies 𝑓𝑓 1= 𝜔𝜔 1 2𝜋𝜋= 1 2𝜋𝜋𝜋𝜋 1 (2) 𝑓𝑓 2= 𝜔𝜔 2 2𝜋𝜋= 1 2𝜋𝜋𝜋𝜋 2 (3) with τ 1 = RHCH and τ 2 = RD(CD+CM), where τ 1 >> τ 2 and thus f1 << f2. A wake-up flashlight of frequency fs will generate a square-wave signal of the same frequency for iD and thus, assuming fs << f2, for vD. At a rising edge of vD, vH sharply increases from zero to ∆vD and vM toggles from ‘1’ to ‘0’. Then, vH exponentially decreases to zero. When vH crosses the threshold voltage of the NMOS (VT), vM toggles again to ‘1’. This process repeats at each rising edge of vD. For this behavior, vH is assumed nearly zero before the rising edges of vD, which can be achieved, assuming a square-wave flashlight of period Ts (=1/fs) and a duty cycle of 50 %, with 0.5Ts > 5 τ 1, leading to 𝑓𝑓 1> 5 𝜋𝜋 𝑓𝑓 s (4) A Firmware Activation Check (FAC) is embedded into the MCU to reject unwanted wake-up signals coming from interfering lights or even from hacking lights. On the first rising edge of vM, the MCU is awaken and the FAC is executed. If the result of the FAC is correct, the MCU is kept active; on the contrary, the MCU returns to LPM. Changes in the parameter values of the components due to their tolerance or temperature drift should not affect the circuit performance thanks to its digital activation mechanism. A lower flashlight intensity or a change in RD lowers ∆vD but only a value higher than VT is required, which can also slightly change, altering the duty cycle of vM but not its frequency. Changes on RH and CH alter f1 but it is easy to accomplish (4) in the worst-case scenario. Finally, the two logic levels of vM are not affected by voltage drifts on Vcc since it powers both the VLT and the MCU. III. EXPERIMENTAL RESULTS As a proof-of-concept, a prototype of the circuit in Fig. 1 was designed with the following devices: 1) a low-cost flat-top red LED (150060RS75000, Wurth Electronics) that provides high enough values of ∆vD at indoor and outdoor conditions without requiring very high values of RD [12]; 2) a small-signal NMOS (RE1C002UN, RHOM) that offers low values of both CM and VT ; and 3) an STM32L072 MCU with an interruption pin (PA0) that is activated at the rising edge of vM. For illuminating the LED, we used, depending on the performed tests, either the flashlight of a Motorola Moto X Style (XT1572) smartphone placed at a distance of 1 cm or a high-power white LED that emulated it [12]. A. Static Characterization Fig. 2 shows the static current/voltage (I/V) characterization of the LED with different types of lights. The Flash curve is the signal of interest, generated here with the emulated flashlight. The rest are interfering lights: Office curve corresponds to compact fluorescent lights placed on the ceiling (∼700 lux), Shadow curve to sunlight blocked by an object (∼60 W/m2), Sun curve to direct sunlight (∼1000 W/m2). Office and Shadow curves offer the lowest current levels, and Flash curve a higher current level than Sun curve. The Sun+Flash curve is a combination of direct sunlight and flashlight and presents highest current level. Three lines corresponding to the I/V curves of three different values of RD are also shown (RD0, RD1, and RD2). Operating values of vD arise from the intersection of the LED curves with the resistor lines. RD1 of 500 kΩ is selected for intersecting with the knee of the Flash curve, resulting in the values of vD shown in Table I. This selection maximizes ∆vD, also shown in Table I, which refers to the difference between the value of vD corresponding to the Flash curve and any of the interfering lights. Obviously, the worst case (minimum ∆vD) is for the Sun case, but the resulting value of 0.62 V is still good enough to toggle the VLT output. Smaller (e.g. RD2) or higher values of RD (e.g. RD0) lead to smaller values of ∆vD. In particular, for RD0 (infinite value, equivalent to using no RD) much smaller values of ∆vD are achieved (e.g. 60 mV), which are not high enough to toggle the VLT output. Hence, this demonstrates the need of using RD, as pointed out in Section II. Actually, the flashlight will add to the interfering light, so the Flash curve should add the corresponding interfering curve. Adding Office or Shadow curves to Flash curve does not significantly change it and RD1 is still a good choice. However, a significant change appears when adding the Sun curve resulting in the Sun+Flash curve. In this case, RD2 of 340 kΩ, which intersects with the knee of the Sun+Flash curve, could seem more optimum, since it leads to ∆vD = 0.85 V (shown in Table I at the row of Sun+Flash) when changing from Sun to Sun+Flash. However, ∆vD decreases for the other interfering lights with respect to using RD1. Furthermore, the smartphone, when placed near the MCU for activating it, will block any direct interfering light and thus the actual interfering light will be of low intensity, e.g. like in Shadow or Office (see Section III.C). Thus, RD1 is still the best option. Fig. 2. I/V curves of the LED under test. TABLE I VALUES OF VD AND ∆VD Light RD0 RD1 RD2 vD ∆ vD vD ∆ vD vD ∆ vD Office 1.17 0.35 0.002 1.38 0.001 1.00 Shadow 1.37 0.15 0.045 1.34 0.035 0.96 Sun 1.46 0.06 0.76 0.62 0.52 0.48 Flash 1.52 − 1.38 − 1.00 − Sun+Flash 1.52 0.06 1.45 0.69 1.37 0.85 -4.5 -3.0 -1.5 0.0 -0.5 0.0 0.5 1.0 1.5 Current, ID [µA] Voltage, VD [V] Flash Office Sun +Flash Shadow Sun RD2 RD1 RD0 0.76 1.38 ∆vD=0.62 V This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication. The final version of record is available at http://dx.doi.org/10.1109/TIM.2020.3009340 Copyright (c) 2020 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected]. B. Dynamic Response A flashlight with fs = 25 Hz, which is around the upper limit that can be achieved with the smartphone flashlight, and a duty cycle of 50 % was generated with the emulated flashlight. Table II shows the value of the remaining circuit parameters in Fig. 1 as well as the calculated cut-off frequencies of the BPF. Frequency f2 is calculated from (3). Values of the HPF (RH and CH) are chosen to accomplish (4) and also RH >> RD and CD, CM << CH. Then, f1 is calculated using (2). TABLE II PARAMETERS OF THE WAKE-UP CIRCUIT AND THE CORRESPONDING CUT-OFF FREQUENCIES R D (kΩ) C D a (pF) C M (pF) f 2 (kHz) R H (MΩ) C H (pF) f 1 (Hz) R M (kΩ) V CC (V) 510 16 25 7.61 5.6 680 41.8 560 3 aMeasured with an impedance analyzer (E4990A, Keysight). Tests were performed outdoors with direct sunlight hitting laterally the LED, apart from the emulated flashlight. Fig. 3 shows the results acquired with an oscilloscope. As can be seen, vD is a square wave switching from around 500-600 mV when only the sunlight was present to 1.4-1.5 V when the flashlight also illuminated the LED, which is coherent with the values of vD shown in Table I for RD1 (change from Sun to Sun+Flash). A lower voltage with sunlight was now achieved, probably due to a lower intensity of the sunlight than with the case of the static characterization. The effect of the HPF is observed in vH, where peak voltages (∆vD) around 800-900 mV were generated, enough to activate the NMOS of the VLT stage and make toggle vM from 3 V (‘1’) to 0 V (‘0’). Once vH decreases down VT, around 400 mV, vM toggles again to a ‘1’ until the next rising edge of vD. This emulated situation is a worst-case scenario since the intensity of the interfering light, sunlight, is high. Even so, the system still works as pretended. DC current consumption of the circuit when not switching was around 0.5 nA. Fig. 3. Dynamic response waveforms of vD, vH, and vM. C. Smartphone Test A test was performed outdoors in a sunny day with the smartphone flashlight and the MCU executing the FAC. Fig. 4 shows the resulting waveforms. Pulses are not perfectly periodic but they slightly vary from pulse to pulse; this is a limitation of the Android Operating System since it is not possible to keep accurate track on short times [13]. The waveforms are still similar to those in Fig. 3 with a main difference: the voltage of vD corresponding to the interfering light is now much lower, around 100-200 mV (top voltage is still 1.4 V-1.5 V), because the smartphone, placed above the LED at a distance around 1 cm, blocks the sunlight, reducing the interfering light to much lower levels, e.g. comparable to Office or Shadow lights. This will be the preferred situation since moving away the smartphone reduces the effect of the flashlight and can increase the interfering light. Again, the HPF blocks the effect of the interfering light and the characteristic waveform can be seen in vH, with a higher peak voltage than before, around 1.3-1.4 V, which is coherent with the values of ∆vD shown in Table I for RD1 and Office and Shadow cases. The VLT stage also generates a digital signal for vM. As a proof of concept, the FAC of the MCU was set to activate a digital output (vP) when just three rising edges of vM were detected within a 300 ms time interval. Obviously, a more advanced FAC could be used to increase the system security. Fig. 4. Waveforms of vD, vH, and vM with the smartphone test. REFERENCES [1] R. Yan, H. Sun, and Y. Qian, “Energy-Aware Sensor Node Design With Its Application in Wireless Sensor Networks,” IEEE Trans. Instrum. Meas., vol. 62, no. 5, pp. 1183–1191, May 2013. [2] C. Alippi, G. Anastasi, M. Di Francesco, and M. Roveri, “An Adaptive Sampling Algorithm for Effective Energy Management in Wireless Sensor Networks With Energy-Hungry Sensors,” IEEE Trans. Instrum. Meas., vol. 59, no. 2, pp. 335–344, Feb. 2010. [3] E. Sifuentes, R. Gonzalez-Landaeta, J. Cota-Ruiz, and F. Reverter, “Seat Occupancy Detection Based on a Low-Power Microcontroller and a Single FSR,” Sensors, vol. 19, no. 3, p. 699, Feb. 2019. [4] E. Sifuentes, O. Casas, and R. Pallas-Areny, “Wireless Magnetic Sensor Node for Vehicle Detection With Optical Wake-Up,” IEEE Sens. J., vol. 11, no. 8, pp. 1669–1676, Aug. 2011. [5] E. Ripoll-Vercellone, V. Ferrandiz, and M. Gasulla, “An Add-On Electronic Device to Upgrade Mechanical Gas Meters into Electronic Ones,” Proceedings, vol. 2, no. 13, p. 1094, Dec. 2018. [6] V. Jelicic, M. Magno, D. Brunelli, V. Bilas, and L. Benini, “Benefits of Wake-Up Radio in Energy-Efficient Multimodal Surveillance Wireless Sensor Network,” IEEE Sens. J., vol. 14, no. 9, pp. 3210–3220, Sep. 2014. [7] T. Hakkinen and J. Vanhala, “Ultra-low power wake-up circuit for shortrange wireless communication,” in Proc. IET IE, Seattle, WA, USA 2008, pp. 1-4. [8] W. Lim, T. Jang, I. Lee, H.S. Kim, D. Sylvester, and D. Blaauw, “A 380pW dual mode optical wake-up receiver with ambient noise cancellation,” in Proc. IEEE VLSI-Circuits, Honolulu, HI, USA, 2016, pp. 1–2. [9] R. Shreyas, “Solving CMOS Transition Rate Issues Using Schmitt Triggers,” Texas Instruments, Dallas, TX, USA, White paper SLLA364A, 2017. [10] M. Kowalczyk and J. Siuzdak, “Photo-reception properties of common LEDs,” Opto-Electronics Rev., vol. 25, no. 3, pp. 222–228, Sep. 2017. [11] E. Ripoll-Vercellone, V. Ferrandiz, J. Aubert, and M. Gasulla, “Using LEDs for Visible Light Communication and as a Wake-up Mechanism in the Internet of Things,” in Proc. SenSys, Delft, The Netherlands, 2017, art. no. 49, pp. 1–2. [12] E. Ripoll-Vercellone, F. Reverter, V. Ferrandiz, and M. Gasulla, “Experimental characterization of off-the-shelf LEDs as photodetectors for waking up microcontrollers,” in Proc. IEEE I2MTC, Auckland, New Zealand, 2019, pp. 1–6. [13] A. Duquel, R. Stanica, H. Rivano, and A. Desportes, “Decoding methods in LED-to-smartphone bidirectional communication for the IoT,” in Proc. GLC, Paris, France, 2018, pp. 1–6. This is the author's version of an article that has been published in this journal. Changes were made to this version by the publisher prior to publication. The final version of record is available at http://dx.doi.org/10.1109/TIM.2020.3009340 Copyright (c) 2020 IEEE. Personal use is permitted. For any other purposes, permission must be obtained from the IEEE by emailing [email protected].