LoRa (long-range) technology ensures reliable long-range communication between a node and gateway, making it well-suited for a range of Internet-of-Things (IoT) applications. The purpose of building a LoRa node is to reduce costs while ensuring long-term, low-power use for devices. LoRa’s low power is affected by several features, covered below.
Features
Smart programming. The written code must be “smart,” ensuring deep sleep when not in use. For example, the networking part of forest fire detection sensors remains in sleep mode if no fire is detected at the sensor level. This is to optimize power when needed. This approach ensures that the power-intensive networking functionality is activated only when necessary, conserving energy when the sensors detect no fire.
Battery selection. The battery is critical, especially if the node is to be deployed for years. If so, the battery’s self-discharge current must remain very low. An ideal battery will have a low self-discharge rate, particularly for devices that consume low power. Otherwise, the battery will lose its charge over time, regardless of its calculated capacity, and stop working. Batteries like LiSoCl2 are often favorable.
Components selections. Even though LoRa is of low power, it does not mean all of the components are also of low power. For example, an ultrasonic distance measurement sensor requires a lot of power, so this must be a part of the component consideration.
When choosing sensors, it’s crucial to prioritize long battery life by selecting components that operate on low power, even when in use. The role of a sensor is to notify or trigger a device by transmitting data over the network. Therefore, all of the components used with a sensor should have very low power ratings. This ensures the sensor does not consume excessive power, allowing for extended battery life and efficient device operation.
In this article, we’ll explore the basics of LoRa nodes, as well as their programming and ideal hardware selections.
Classes of nodes
In LoRaWAN — the Low Power Wide Area Network (LPWAN) protocol that works with LoRa-based modulation — there are three classes of nodes with different capabilities in terms of their ability to receive and transmit data:
- Class A
- Class B
- Class C
Class A nodes
Class A’s are the simplest and most common type of LoRaWAN node. They’re designed for applications that require infrequent uplink communication, such as sending sensor data, tracking assets, or monitoring environmental conditions. Class A nodes are characterized by their low power consumption and asymmetric communication mode, where they can receive data at any time but can only transmit data immediately after receiving it or at specific scheduled times.
The Class A node communication protocol is based on the “listen-before-talk” principle, which ensures transmission does not interfere with any other ongoing network transmission. Once a Class A node transmits data, it enters a low-power sleep mode until the next uplink slot.
Additionally, Class A nodes:
- Are the most power-efficient and simplest type of LoRaWAN node.
- Help conserve battery life, allowing the node to operate for long periods without requiring frequent maintenance or replacement.
- Have limited downlink capabilities and can only receive data in response to their uplink transmissions.
- Can only receive a limited amount of downlink data of a single packet of data — transmitted by the gateway immediately after the uplink transmission.
- Are designed for applications that require infrequent uplink communication and have limited downlink capabilities.
- Are suitable for applications where battery life is critical and data transmissions are infrequent — making them ideal for use in environments where frequent maintenance or replacement is not feasible.
Class A examples
Class A nodes are ideal for applications where battery life is critical, and data transmissions are infrequent. In smart agriculture, Class A nodes can be used to monitor soil moisture levels and send data to a central server periodically. In asset tracking applications, Class A nodes can be attached to high-value assets and transmit location data periodically, allowing an asset’s location to be monitored over time.
Class B nodes
Class Bs are another type of LoRaWAN node that offers more capabilities than Class A nodes. Class Bs are designed for applications that require two-way communication with guaranteed latency. These nodes have periodic receive windows synchronized with a network’s beacon, allowing for scheduled downlink transmissions from the gateway to the node. This means that Class B nodes can receive data from the network even when they’re not actively transmitting.
Class B nodes have additional receive windows that allow downlink communication with guaranteed latency, making them ideal for applications requiring two-way communication.
For example, in smart home applications, Class B nodes can control home appliances remotely, where a user sends a command to the IoT device through the network, and the device responds in acknowledgment. These nodes can also be used in building automation systems to control and monitor HVAC systems, lighting, and security systems.
Additionally, Class B nodes:
- Have higher power consumption than Class A nodes, requiring more frequent radio communication to maintain their synchronized receive windows.
- Have lower power consumption than Class C nodes.
- Have periodic receive windows synchronized with the network’s beacon, allowing for guaranteed latency in downlink communication.
Examples
Class B nodes are ideal for applications requiring two-way communication, such as smart homes and building automation systems. Examples include:
- Smart metering: Remote reading of utility meters, such as for electricity, gas, and water.
- Industrial monitoring: Monitoring equipment and machinery in industrial settings for preventive maintenance.
- Building automation: Controlling and monitoring lighting, HVAC, and building security systems.
Class C nodes
Class Cs are the most advanced type of LoRaWAN node, designed for applications requiring real-time, continuous communication. They have the highest power consumption of all LoRaWAN nodes and provide the highest level of functionality. Class C nodes are characterized by their continuous receive window, so they’re always “listening” for incoming data from the network. As a result, they have the lowest latency compared to Class A and Class B nodes.
Class C nodes are ideal for real-time monitoring and control applications, such as security systems, traffic management, and industrial automation. Class Cs provide real-time status updates in these applications, allowing for quick decision-making and response to changing conditions.
For example, in traffic management systems, Class C nodes can monitor traffic flow and signal control devices for real-time adjustments based on the data received from the nodes.
Additionally, Class C nodes:
- Have a higher power consumption than Class A and Class B nodes, as they’re always listening for incoming data from the network.
- Can be powered using a mains power supply, making them suitable for applications where battery life is not critical.
- Are designed for applications that require real-time, continuous communication.
- Have the lowest latency of all LoRaWAN nodes and are ideal for security systems, traffic management, and industrial automation applications.
Examples
Class C nodes have a higher power consumption, making them reliable and always “on.” This means they can be used for critical services, such as:
- Emergency services: Real-time tracking and communication systems for emergency responders and personnel.
- Security systems: Intrusion detection and surveillance systems for homes, offices, and public areas.
Wildlife tracking: Monitoring the behavior and movements of wildlife in conservation efforts.
Flood monitoring: Early detection and monitoring of water levels in rivers, lakes, and flood-prone areas.
The custom node
Although the classes are defined within LoRa, this doesn’t mean you’re restricted to using only one class at a time — with the right hardware. It’s possible to write code so that a node works in C mode for some time, then shifts to Class A or B at another point, depending on the application.
Example: Pet tracking
Imagine developing a pet tracker for your beloved companion. Typically, you walk your pet between 4 to 5 p.m. To optimize the device’s functionality, you can program it with the following characteristics:
During non-walking periods (outside of 4-5 p.m.):
-
- Configure the tracker to operate in LoRa Class A.
- Data transmission occurs every 10 minutes without requiring confirmation ACK.
This approach conserves power during regular intervals.
During the walking time:
-
- Switch the tracker to LoRa Class C.
- Since time is critical and your pet could run away, real-time tracking is essential.
- Stream data at a rapid rate of 500 milliseconds to ensure accurate and immediate tracking.
By adopting this approach, the pet tracker’s power efficiency is optimized during non-walking hours but responsive between 4-5 p.m. when walking with your pet. Essentially, the device operates in a power-saving mode most of the time but transitions to a high-frequency tracking mode during the critical walking period.
Programming for low-power
Programming in low-power mode means optimizing the use of peripherals and minimizing unnecessary processing. For example, the use of interrupts instead of continuous polling can reduce power consumption. However, it’s important to consider the power supply and ensure it’s fully optimized for the specific low-power mode being used. This may involve selecting a power supply with a low quiescent current or using a voltage regulator with a low dropout voltage.
Data serialization is another essential consideration. LoRaWAN uses a specific format for data transmission, so it’s important to understand how to serialize data into this format for transmission.
In future articles, we’ll learn how to code LoRa nodes and make a working application.
You may also like:
Filed Under: IoT tutorials, Tutorials
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.