Arden’s Status Report for 12/10/22

This past week I focused on reliable transmission between nodes, like last week. Unfortunately,  due to spikes in current from powering the nodes from a laptop’s USB, I kept running into different issues with acknowledgments causing packets to timeout, and the nodes getting stuck in loops where each one waits on the other to transmit…indefinitely. Switching to batteries imparted some robustness in the protocol. Another major change was changing STM to RYLR896 (LoRa module) communications to UART interrupts. By changing the priority of the UART interrupt to be less than the priority of the tick interrupt, the nodes could still maintain a common notion of time while sending commands to the transciever. However changing the code to using interrupts to communicate with the LoRa module required a non-trivial shift of several functions. I also added a reset line on each individual node to reset the LoRa transciever module itself whenever a general reset is performed, and read in the resulting “LoRa ready” command on restart. I also tested the final topology of 8 nodes several times to detect networking bugs.

Team Status Report for 12/10

This week has been primarily centered around debugging for everyone. There were some flaws in the network, mostly caused by using the usb port of a laptop to power the nodes. Current spikes from the power supply caused unexpected behavior from the transceivers, and we had a lot less transmission issues when we started using batteries instead. We are thankful that Adnan suggested that we test our network with batteries. Furthermore, some acknowledgement schemes had timing flaws, which stemmed from timer-interrupts getting blocked in each STM, leading to variable timing, and unproducible bugs. It turned out that the JSON file was not writing from the network correctly so that was adjusted as well. The graph needed to be parsed in an alternate way. We have been working on getting a bunch of tests running as well as getting a video for the demo. We have decided to delay testing power consumption until after the demo for convenience and grappling with any final exams or projects people might be preparing for.

Arden’s Report for 12/3

These past two weeks, I focused on getting the sensor network to run through the entire protocol stack with all eight nodes. I also implemented ACKs, timeouts, and re-transmissions, and debugged some problems I encountered with communicating with the LoRa modules via UART, when implementing re-transmissions. Going forward, we will be working on testing the topology with eight nodes in a MESH network, and will focus next week on testing power consumption, and robustness to node failures (i.e. if a node drops offline, can STP re-configure the tree to route around the offline node).

Karen’s Status Report for 12/03

Arden integrated my schedule code into the main code for the nodes, and I’ve made some adjustments since the integration. One of  the changes I made was improving the temperature sensing for fire detection. I used a hairdryer to test how much the ADC measurement changed after being heated up for a few seconds. I used these  tests  to find a good  threshold for how much of a temperature difference over a short period of time should indicate a “fire”. I noticed  that the reading on the ADC consistently dropped a bit from the first reading to the last reading, so I also took some unused measurements before taking the “start” temperature measurement in order to warm up the sensor. I found that there was less change between readings after that. I also took the average of a few measurements to get the “start” and “end” temperatures, just to make  the sensing a bit more consistent. I also added code  to put the nodes in standby once the schedule is done executing. Previously the nodes would just print that they should go into standby, now they actually do it. During testing, when the nodes successfully reached the end of the data phase the nodes would come out of standby within 1 second of each other. This makes sense given that they are using a 1Hz clock to determine when to wake up from standby. Finally, I wrote the code for parsing the graph of the tree and the information gained during the data phase into a json file for the web app. I found a library called json-c, and initially tested it on a fake tree and fake data. In tests with the nodes that reached the end of the data phase, the web app accurately displayed the tree. We have not yet been able to test with the fire detection to see if it accurately displays a node detecting a “fire”, or what happens when a node goes offline.

Team’s Status Report for 11/05

As a team we decided to try to finish as much as possible to show our working parts of the project in the interim demo. We met twice outside of class time to work on our respective parts of the project. We built five nodes and powered them with a 9V barrel jack and created a reset button that resets all the boards when pressed to make testing the networking with many nodes  easier. We also implemented Spanning Tree Protocol (STP), the first phase of our routing algorithm, as well as LSA (replicated on a node instead of on the RPi). In order to test the topology, we gathered logs over UART from 4 nodes, and checked that a line and fully-connected topology were reduced to a line and star topology, respectively. In a separate program, we got a node to use timer interrupts to time taking a measurement from the temperature sensor and go into standby mode. The web application was finished as an individual part of the project and is waiting until the remaining of the project is done to be fully integrated. The expectation is that the network will be the focus for all of us in the remaining weeks.

Arden’s Status Report for 10/29

This week I was able to get two nodes to poll for packets, receive incoming packets, extract the relevant data, and return this data. These functions are modular and use a polling form of UART. As a test, I sent 100 packets from node A to node B using a stop-and-wait protocol (A waited for an ACK from node B before sending the next packet). We are still slightly behind schedule, and the interim demo is quickly approaching. In order to compensate for this delay, I will be working on integrating timer interrupts with my current stop-and-wait implementation in order to port over a previous implementation of STP protocol, and convert it to a distributed TDM version. I plan to accomplish a functional STP by the middle of next week. I believe that with our stop-and-wait implementation, we will be able to easily effectuate the LSA phase of our protocol stack. I plan to get both working phases (STP, LSA) by the interim demo at the latest.

Karen’s Status Report for 10/22

This week I started working with the STM32s. After learning how to use the CubeIDE, I started by learning how to enter Standby and STOP mode and use the RTC to wake up from these low power modes. I also connected a temperature sensor to the nucleo board and got a reading from it using the ADC. I tested it using a hairdryer to see if it responded to temperature changes, and it did. Further testing will have to be done with a match/lighter to determine the best way to detect the temperature change caused by the flame. Arden also got two nodes to send messages using the LoRa transceivers, so the next step seems to be putting it all together so that the nodes wake up from a low power mode, take a sensor reading, send it to another node, then go back to a low power mode.