As progress on the LoRa radios leads to integration into the Evaporometer Project, we take a closer look at some of the aspects of data transmission and providing portable power.
Sending and Printing Float Data:
The LoRa radios use packetized sending of 8 bit integers (corresponding to ACSII values) to relay integer and float data by first taking the integer value, changing each decimal value into the corresponding character (ASCII) value using iota(), and adding this info to the radio packet to be sent. On the receiving end, the data from the packet array is copied into a separate array, for our purposes its an array of 7 elements/bytes, and uses iota() to change it back into the correct integer value.
For float values to be sent, you need select a decimal value the suits your precision needs. For the Evaporometer we only decimal values to the ten thousandths place, and since our load cell will be taking measurements < 1000 grams I will need a maximum of 7 digits to store my data. The only difference I needed to make to send floats was to multiply the load cell's measurement by 10,000 before setting it to the packet, and dividing by 10,000 in the receiver end. In order to print a float value, I also needed to include the precision value when using Serial.print() like so:
Attaching the Battery Backpack:
For our field test, it will necessary to rewire the LoRa chip, load cell, and pro trinket onto a smaller breadboard that can fit onto the housing designed for the Evaporometer. The Pro trinket is now powered off a portable LiPo battery. The micro-usb connector on the Pro trinket powers the device as well, and plugging the device into a wall outlet through the usb also recharges the LiPo battery. To improve signal strength the soldered in wire antenna was replaced with uff connector so that a larger antenna could be attached to the LoRa chip. The change in RSSI signal strength measured in the serial monitor reflected the changes I made to the antenna as well as the changes to the operating frequency (after we ramped up our new frequency to 915mHz).
- Marissa Kwon URSA Program Undergraduate Student Researcher