SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING SX1272/3/6/7/8: LoRa Modem Low Energy Consumption Design AN1200.17 TCo Revision 1 July 2013 © 2013 Semtech Corporation 1 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING Table of Contents 1 1.1 1.2 1.3 2 2.1 2.2 3 4 5 Energy Consumption .................................................................................................................................... 3 Introduction ...................................................................................................................................................... 3 The LoRa Calculator ....................................................................................................................................... 3 Star Network Connectivity ............................................................................................................................... 4 Duty Cycled Receiver Consumption ........................................................................................................... 5 Channel Activity Detection .............................................................................................................................. 6 Energy Consumption during CAD ................................................................................................................... 7 Duty Cycled Receiver plus ACK Consumption .......................................................................................... 8 Periodic Transmission Based Protocols .................................................................................................. 10 Conclusion ................................................................................................................................................... 10 Table of Figures Figure 1. The Opening view of the Calculator and Energy Profile Tools for LoRa performance Evaluation. ................ 3 Figure 2. Star Network Topology and Terminology. ...................................................................................................... 4 Figure 3. Basic Communication Exchanges between Source and Sink. ....................................................................... 4 Figure 4. A Long-Preamble Sampling MAC using Duty Cycled Receiver Operation .................................................... 5 Figure 5. LoRa CAD Timing ........................................................................................................................................... 6 Figure 6. Bidirectional Communication between Source and Sink in a Long-Preamble Sampling MAC. ..................... 8 Figure 7. Protocol Settings: Including the (Source Receiver) Duty Cycle, the Acknowledge Packet Length and Number of Interrogations (Source Transmissions) per Day. .................................................................................. 8 Figure 8. Graphical Output of the Calculator. ................................................................................................................ 9 Figure 9. Energy Consumption Output of the Calculator. .............................................................................................. 9 DISCLAIMER The performance figures are for indication only. For definitive product performance data please refer to the datasheet. Revision 1 July 2013 © 2013 Semtech Corporation 2 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING 1 Energy Consumption 1.1 Introduction The majority of ISM band radio deployments have both stringent link budget requirements and highly demanding energy consumption requirements. Determining the trade-off between choices made in the radio physical (PHY) and media access control (MAC) layers to meet these contradictory design requirements can be a time consuming process. This process is further complicated when a new PHY technology is at the disposal of the designer. The LoRa modem brings with it not only unique range capabilities, but also channel activity detection capabilities for signals above and below the noise floor, all designed for low power operation. In this guide we introduce the LoRa consumption calculator that allows a quick and simple evaluation of radio energy consumption for a given LoRa configuration. 1.2 The LoRa Calculator The LoRa calculator was introduced in the LoRa Designers Guide and can be downloaded from www.semtech.com. The first tab of the calculator can be used to evaluate the basic link budget and time on air performance of the selected modulation and packet parameters. The second tab introduces the Energy Profile of the selected modulation. Figure 1. The Opening view of the Calculator and Energy Profile Tools for LoRa performance Evaluation. The current consumption of the radio node is, of course, of substantial interest in cases where the node is to be battery powered. However, to meaningfully estimate the radio’s consumption the network connectivity and MAC technique employed in the network must be considered. Revision 1 July 2013 © 2013 Semtech Corporation 3 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING 1.3 Star Network Connectivity Due to the increase in link budget attainable with the LoRa modem the need for range extension by complicated mesh networking protocols is typically obviated (although nothing prevents it). Most applications can hence resort to the simpler star network topology. For clarity the diagram below shows a typical star network configuration. Here several information ‘Source’ nodes provide information back to a controller or information ‘Sink’ node. Here we consider that the Source nodes are energy constrained (i.e. battery powered). We therefore concentrate on the consumption of the Source node – although the techniques applied here are equally valid for either Sink or Source. Figure 2. Star Network Topology and Terminology. With the network connectivity under consideration determined, we define the four most basic exchanges of information between the Source and Sink in the diagram below. Figure 3. Basic Communication Exchange Possibilities between Source and Sink. Revision 1 July 2013 © 2013 Semtech Corporation 4 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING Cases a) and b) illustrate unidirectional communication between source and sink. The energy constrained Source node will typically spend the maximum amount of time possible in sleep mode to minimize consumption. The unidirectional communication illustrated in a) and b) hence entail use of a duty cycled (periodic) receive and transmit respectively. Cases c) and d) involve bidirectional communication between Source and Sink. The need for duty cycled reception and transmission is retained, but in each case the initial communication phase is followed by an acknowledgement – thus allowing the interrogation of, or acknowledgement of reception by, the Source. 2 Duty Cycled Receiver Consumption As mentioned above, to minimize consumption the Source is operated on a limited duty cycle. The figure below illustrates the case shown in Figure 6a). Here the receiver wakes periodically with a period defined by the length of the preamble transmitted by the Sink. This is an example of a long preamble sampling MAC mechanism. Upon finding, receiving and detecting the transmitted preamble, the Source ‘wakes’ into receive mode and processes the received information. In the hypothetical application we consider here, however, such events are infrequent. The device, instead, spends the majority of its time cycling from sleep to receiver mode and returning as quickly as possible to sleep to minimise energy consumption. Figure 4. A Long-Preamble Sampling MAC using Duty Cycled Receiver Operation The SX1272 provides two mechanisms for checking for channel activity in the case of LoRa operation: RSSI Detection where the channel power is read from the received signal strength indicator (RSSI) and evaluated following each wake-up. Channel Activity Detection (CAD) because LoRa can function below the noise floor the LoRa modem includes a method of detecting the presence of preamble at the same modulation settings as the receiver. This permits accurate evaluation of whether the Source should remain ‘awake’ and continue the demodulation process. Revision 1 July 2013 © 2013 Semtech Corporation 5 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING 2.1 Channel Activity Detection The channel activity detection process is designed to provide a quick and efficient means of identifying whether there is a valid LoRa preamble is present in the channel and also permits simultaneous evaluation of received signal strength. The diagram below illustrates the automated CAD process. Once launched by the companion MCU the radio passes directly into CAD mode. The chip rate of the LoRa packet is the same as the bandwidth in chips/sec/Hz. The timing of the CAD processing is easiest expressed in terms of chip periods, i.e. 1 period = 1/BW. Figure 5. LoRa CAD Timing The first chip 32 periods following wake-up into the receiver-on phase of the CAD operation are not available for use. This is followed by a reception phase of 2^SF periods, at this point the ModeReady interrupt is raised. Hereon in for the duration of the Rx phase, the RSSI can also be read. This permits the evaluation of the channel power before the CAD operation is complete – perhaps even based upon multiple RSSI reading events. Following the receive phase, there is a short processing time spent at a reduced consumption level. Once the channel activity detection process is complete the radio returns to standby mode and the CadDone interrupt is set. At this point the CadDetected interrupt can be checked – indicating the presence, or otherwise, of a valid preamble upon which to wake the receiver. Note that the radio returns to standby mode to allow the CadDetected and CadDone interrupts to be read, these are then cleared automatically upon returning to sleep mode. Revision 1 July 2013 © 2013 Semtech Corporation 6 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING 2.2 Energy Consumption during CAD With knowledge of the time spent in each interim mode of the CAD process, and the respective current consumption in each of these interim modes, it is possible to calculate the charge consumption of each wake-up and concomitantly, for a given battery voltage, the energy consumption and theoretical battery life. For simplicity, here we give details of the average current consumption of the duty cycled receiver using CAD mode, for application to a specific battery type please consult the LoRa calculator which is available for download from the Semtech website (www.semtech.com). The average current consumption of the SX1272 in CAD mode is determined by the modulation settings and the periodicity of the wake-up event. In this worked example we consider a MAC which requires that the receiver wakes up with periodicity, P = 4 seconds. The link runs with LoRa modem settings: BW = 250 kHz and SF = 9. Recalling that current is the flow of coulombs of electric charge per second, for this example the consumption and duration of each portion of the CAD is hence: CAD operation CAD Receiver CAD Processing Standby Sleep Duration 2.17 ms 2.63 ms 1.5 us 3.99 s IDD IDDR_L IDDC_L ISTY_L IDDSL IDD [mA] 10.5 6.5 1.5 0.0001 Charge [uC] 22.8 17.1 0.004 0.4 The instantaneous consumption of the radio as it preforms its duty cycled receive mode is shown in the figure below: Figure 6. Periodic Consumption Profile (Blue) and Average Consumption (Red). This yields a total charge consumption of approximately 40.4 uC which is equivalent to an average current of 10 uA (the red line of the figure above), this consumption can then be added to the charge or current consumption of the companion MCU to determine the total consumption of the sink unit. Revision 1 July 2013 © 2013 Semtech Corporation 7 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING 3 Duty Cycled Receiver plus ACK Consumption The next use case to be considered is that of Figure 6 c). Another common use case is where the Sink requires some data or acknowledgement of receipt from the source. To differentiate this process from the periodic reception case, we term this process interrogation. Here the same duty cycled CAD process is used but is followed by a data transmission from the source to the sink. This process is shown diagrammatically in the timing diagram below. The resulting additional consumption due to this process is straightforward to calculate but relies on the start-up time of the transmitter, the size of the response that must be sent and the frequency of interrogation. Figure 7. Bidirectional Communication between Source and Sink in a Long-Preamble Sampling MAC. The figure below shows where these protocol related parameters can be selected in the LoRa Energy Profile calculator. Figure 8. Protocol Settings: Including the (Source Receiver) Duty Cycle, the Acknowledge Packet Length and Number of Interrogations (Source Transmissions) per Day. Revision 1 July 2013 © 2013 Semtech Corporation 8 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING In this case, the output of the calculator is a curve indicating the instantaneous consumption curve of the periodic reception process. The red curve indicates the average current consumption with all interrogation processes included. Figure 9. Graphical Output of the Calculator. In addition to the graphical output, the numerical display give indications of the times spent in each mode, the total charge consumption in those modes and the ensuing energy and battery life calculations for a battery corresponding to the performances entered on the bottom left. Figure 10. Energy Consumption Output of the Calculator. Revision 1 July 2013 © 2013 Semtech Corporation 9 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING 4 Periodic Transmission Based Protocols Similar analyses in the case of periodic transmission in both uni and bi-directional roles are possible by extension of the same logic. However, a simpler proposition is the use of the LoRa calculator which can be downloaded from www.semtech.com. 5 Conclusion With the LoRa calculator and energy profile tool it is possible to predict the performance of MAC and PHY layer choices before even starting hardware of firmware based evaluation. Moreover, it gives a rapid means of comparing a LoRa based implementation with an existing legacy FSK solution without the need for detailed datasheet analysis. Revision 1 July 2013 © 2013 Semtech Corporation 10 SX1272/3/6/7/8 LoRa Modem Design Guide WIRELESS & SENSING © Semtech 2013 All rights reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner. The information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof does not convey nor imply any license under patent or other industrial or intellectual property rights. Semtech assumes no responsibility or liability whatsoever for any failure or unexpected operation resulting from misuse, neglect improper installation, repair or improper handling or unusual physical or electrical stress including, but not limited to, exposure to parameters beyond the specified maximum ratings or operation outside the specified range. SEMTECH PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. INCLUSION OF SEMTECH PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE UNDERTAKEN SOLELY AT THE CUSTOMER’S OWN RISK. Should a customer purchase or use Semtech products for any such unauthorized application, the customer shall indemnify and hold Semtech and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs damages and attorney fees which could arise. Contact Information Semtech Corporation Advanced Communications and Sensing Products Division 200 Flynn Road, Camarillo, CA 93012 Phone: (805) 498-2111 Fax: (805) 498-3804 Revision 1 July 2013 © 2013 Semtech Corporation 11