1. Project Description
Makerfabs LoRa moisture sensor has been popularly sold& used in open hardware community, but sometimes we get customers’ questions: How I can use your sensor with TTN/ Helium? Whenever we get these questions, we can only feedback: Er, there some difficulty…
The LoRa & LoRaWAN actually suits for absolutely different applications:
- LoRa, mostly stands for local simple point-to-point communication, there sender and receiver are needed, it acts most like Physical layer in OSI, that the sender sends out the signal while the receiver gets it. LoRa suits for applications that need low-rate local point-to-point communication, ranging to a few kilometers.
- LoRaWAN acts like the Network layer in OSI. It mostly is used in network that need to access to the internet. LoRaWAN acts like a local WIFI network, that deal with all the coordination/ addressing/ exception dealing, etc… Same as WIFI, a Router is needed in the network, that deal with these tasks and accession to internet. The difference is that, benefits from the longer range of LoRaWAN, there are some public LoRaWAN routers, that you may not need to install your router by yourself. Just think it you using the WIFI router in your neighborhood, or a phone registering on a station.
Makerfabs the LoRa moisture sensor is a LoRa module, the controller Atmega328P controls the LoRa module SX127X, with SPI, to broadcast the soil moisture and air temperature& humidity every 1 hour, any LoRa receiver in the range can get the info, and thus to decide whether or not to deal with it. It has no connection to the internet. Of course, some users program the controller Atmega328P to run the LoRaWAN protocol, with a LoRaWAN router, to connect to TTN or Helium and get succeed, such as these following projects:
But this needs the user to have high coding skilling, and there sometimes some exceptions as the Atmega328 limits resources.
With more customers interest in LoRaWAN, I decide to make a LoRaWAN soil moisture sensor.
2. Current LoraWAN Solutions
There are mainly 2 structures for LoRaWAN projects:
● STM32 Controller+ SX126X
In this structure, the STM32 run the LoRaWAN protocol and also deal with filed application, such as the Seeed LoraE5.
It is cheap and efficient. Users can run filed applications in the STM32(that also run LoRaWAN protocol), But the disadvantage is, users will need to remake all the codes, field applications codes such as sensor interaction, and the LoRaWAN protocol codes, whenever updates the filed application. Besides, it is hard to translate to other platforms, can be only stuck to the STM32 platform;
● Separate Controller+ LoRaWAN Modules
In this structure, a separate LoRaWAN module was used to run/deal with the LoRaWAN protocol, so the end-users do not need to consider any LoRaWAN-related coding, just control the LoRaWAN module by AT commands, the separated controller can be used to run customers’ filed applications only.
|STM32 controller+ SX126X||Cost-effective||Filed application codes and LoRaWAN codes run simultaneously. Hard for coding& transplanting|
|Separate Controller+ LoRaWAN Module||1.Filed codes& LoRaWAN protocol codes be separated;|
2. Easy to transplant in multiple controllers
|Extra controller needed|
Finally, I decided to use 2nd structure.
*The Seeed Lora E5 also has built-in firmware with AT commands, that can also be used as a LoRaWAN module in the 2nd structure.
3. LoraWAN Soil Moisture Sensor
As the LoRaWAN module, I select the AiThink RA08H, As the LoRaWAN modules connect to main controller via UART and AT commands, actually it’s easy to update to some other modules from other suppliers.
As for the main controller selecting, i considered the following candidates:...