It is time to be back on ZinnBee path at Element14 community after a while. I am new for LoRa WAN technology, so I planned to finish the LoRa WAN framework before I jump into ML for Nicla Vision subsystem. Elment14 Community did great jobs on LoRa WAN projects. I read a lot of them before I kicked off ZinnBee LoRa WAN communication framework.
I have been using two MKR1300s for initial LoRa WAN mock-up testing since last month because MKR1300 and MKR1310 are almost identical on LoRa WAN interface for the testing. MKR1310 will be used until Nicla Vision subsystem is installed. I do not want to burn MKR1310 out by accident. Lessons were learned from my own history.
Part 01: LoRa WAN transmitter
I accidentally acquired a MKR IoT Carrier module last month from our local MicroCenter shop. It is a very beautiful carrier module, which is used for LoRa WAN transmitter base board in ZinnBee project. MKR1300 mounted on IoT carrier.
Fig 1. Arduino IoT Carrier Pin Map
MKR IoT carrier has a HTS221 sensor to measure humidity & temperature as Ref[1] described. HTS221 sensor will monitor the temperature around BEE environment.
Here is the bench setup of LoRa WAN transmitter:
Fig 2: LoRa WAN IoT Carrier Transmitter
Part 02: LoRa WAN receiver
The initial mock-up receiver is another MKR 1300 for the LoRa WAN framework. The receiver has a SD card logger, an OLED display and a RTC to track the real time. I selected official Arduino X000016 antenna for this project since I might not have enough time to test other 3rd party antennas on MKR1300/1310 platform (original deadline for ZinnBee project was March 17th, 2023). Arduino X000016 is a beautiful piece of part for bench testing, but the structure of the antenna might need extra work for the mounting project on my 3D design later.
Here is the LoRa WAN receiver schematics:
Fig 3: ZinnBee LoRa WAN Receiver Schematics
The breadboard circuit of ZinnBee LoRa WAN receiver is presented at Fig 4.
Fig 4: ZinnBee LoRa WAN Receiver
Part 03: Bench Testing Report
The software code of LoRa WAN IoT transmitter was integrated from Arduino_MKRIoTCarrier example source codes and LoRa example code as Fig 5 and Fig 6:
Fig 5: Arduino_MKRIoTCarrier Examples
Fig 6: Arduino LoRa Examples
The final source code of the transmitter side code can be found from the link as below:
https://github.com/EE4fun/ZinnBee/blob/master/LoRa_WAN_Mockup/ZinnBee_LoRa_WAN_Sender_IoTCarrier.ino
The LoRa receiver side software source codes include 4 sections:
- LoRa receiver
- DS3231 (from eBay)
- SSD 1306 OLED display (0.96 inch OLED, White, from eBay)
- MicroSD adaptor card(3rd party part)
The baseline software codes for each building block can be found from links as below:
- LoRa receiver: LoRa example(Arduino LoRa library) à LoRaReiver
- DS3231 : https://mytectutor.com/ds3231-rtc-with-arduino-including-digital-clock-using-oled-display/
- SSD 1306 OLED : https://miliohm.com/how-to-draw-or-print-bitmap-to-oled-display-arduino/
- SD logger: Arduino SD library
The UART debugging messages from transmitter & receiver side are presented as Fig7.
IoT Carrier LoRa Transmitter LoRa Receiver
Fig 7: ZinnBee LoRa WAN Framework Communication Messages
Where the temperature from IoT carrier board was measured at 71.92 F. The LoRa receiver side read the temperature from LoRa package as 71.92156 F. The RSSI was -25, which means the LoRa WAN signal was pretty good on the bench testing. I will continue to check RSSI reading while I move the mock-up testing from indoor environment to outside next week. There are too much winter/spring storms in MN, US, now.
Here is the snapshot from OLED at the same moment as UART debugging messages shown in Fig 8.
Fig 8: OLED Display Messages
Here is the snapshot of SD card logger:
Fig 9: SD Card Logs
Where most of the information were accurate enough, however, I did get one error character before °F. I need to debug it in the future blogs.
The source codes of the mock-up testing are published at Github repo: https://github.com/EE4fun/ZinnBee/tree/master
In order to promote the theme of the design challenge: Save The Bees, I made a logo with a Bee for OLED display splash:
Fig 10: ZinnBee Project Logo
I will start to work on ML/Edge Impulse tasks on Arduino Nicla on my next blog.
References:
Ref [1] https://docs.arduino.cc/tutorials/mkr-iot-carrier/mkr-iot-carrier-01-technical-reference#humidity--temperature-sensor
ZinnBee Blogs as below: