Haowen finished the main part of the tag data path. The firmware can now receive Jeffrey’s sensor packets over UART, check the CRC, and discard packets that are corrupted. Valid packets, up to 88 bytes, are then included in the Bluetooth advertisement. The 160-microsecond tone used for angle measurement continues running at the same time. I tested this using a frame generator and on the actual board.
Jeffrey and Matthew also collected pool data at the Cohon pool this week. They recorded all four stroke types and counted the laps by hand. The current algorithm counted almost twice as many strokes in the water as it should. The thresholds were originally tuned using movements on land, which are different from actual swimming movements. Jeffrey is now using the recorded pool data to adjust the algorithm.
On the Raspberry Pi side, the software can receive messages from the anchor and separate the IMU data from the angle data. It also converts the angles into positions and lane information, filters noisy readings, and uses an extended Kalman filter to fill in missing data. We tested this with recorded session data. The connection to the web portal is still being worked on.
For the hardware, we placed the PCB order. The assembled boards are expected to arrive in less than a week and a half. We also reinforced the connections on the base station after experiencing some connection dropouts.
Risks and How We Are Handling Them
One concern is that the PCB may arrive later than expected, since the delivery date is close to Thanksgiving. To avoid holding up the project, we have already prepared the firmware for the same chip on the development board, and the required build versions are ready. If the PCB does not arrive in time, we can continue the pool tests with the current working wearable and test the PCB later in the lab.
Waterproofing and battery safety are another concern. We found condensation inside the prototype, so we are adding a sealed casing and a silica gel packet. We also plan to test the casing with shocks and longer periods of water exposure. If the casing is not ready for the demo, we will use a double-sealed bag while keeping the battery protection circuit in place.
The stroke counting algorithm also needs more work. The thresholds that worked on land caused the system to count too many strokes in the pool. Jeffrey is adjusting the thresholds using the recorded swimming data. We will then test the updated version on a new session rather than using only the data used for tuning. If the accuracy is still below the target, we will report the results separately for each stroke type.
Wireless reliability is another issue. In the initial test, the anchor received about 92% of the tag’s transmissions, and it can track up to 25 tags at the full update rate. We plan to send each packet more than once and test shorter advertising intervals next week. We have also changed the tag capacity requirement from 50 to 25. If more tags are needed later, the system may have to use a second anchor or reduce the update rate.
There is also a limitation with the angle measurements. A single anchor can measure direction, but it cannot directly tell how far away the tag is. This means we need to make some assumptions about the tag’s position in the pool. We plan to test at several measured points along different lanes. For now, the main goal is to make sure the system can correctly identify the swimmer’s lane.
We have reinforced the connections to reduce the chance of losing the hardware, and we are keeping recorded data so that software development and testing can continue even without the physical devices.
Design Changes
We changed the CTE tone length from 128 to 160 microseconds after checking the anchor manual, which requires this setting along with a specific beacon format. This did not require any additional hardware, and we updated the design document before testing.
We also reduced the maximum number of supported tags from 50 to 25 because the anchor can only track 25 tags at the full update rate. This is a smaller capacity than originally planned, but it should still be enough for one lane group. If we can get another anchor, we can consider increasing the capacity.
Another change was adding a 2 ms delay between characters when sending commands to the anchor. We found that commands sent too quickly sometimes lost individual characters. In the test, 11 out of 200 commands failed without the delay, while all 200 worked after adding it. This makes the setup process slightly slower but does not affect normal data transmission.
We also added a sealed casing with silica gel to the wearable design to address the condensation found inside the prototype.
Updated Schedule
During week 12 (November 16–22), we plan to work with Matthew on checking the forwarded packets and running the timing tests. We will also test the UART connection between Jeffrey’s Pico and the development board. On the software side, we need to get the web app and firmware running on the Raspberry Pi and test the updated stroke detection algorithm using a new swimming session. We also plan to complete the first half of the angle accuracy test and build and test the sealed casing.
During week 13 (November 23–29), we will bring up the PCB once it arrives. Pool testing is planned for Monday through Wednesday, including angle accuracy out to 25 m, lane discrimination, packet loss, and latency. We will then focus on final integration and the report. Since Thanksgiving is on November 26, we are not planning project work from Thursday through Sunday.
Verification and Validation
Each subsystem is responsible for testing its own technical requirements, as described in the individual subsystem reports. In addition, we need to test the complete system to make sure it works for the actual swimming use case.
For stroke counting, we will test all four stroke types in the pool and compare the system’s results with laps counted by hand. We will calculate the accuracy for each lap and the average accuracy for each stroke type. The final test will use sessions that were not used to adjust the algorithm. The target is at least 85% accuracy.
For position accuracy and lane discrimination, we will place the tag at points measured with a tape along several lanes, with test distances up to 25 m. We will calculate the position error at each point, along with the mean and 95th percentile error, and check how often the system identifies the correct lane. The position error should stay below 1.07 m.
We will also check timing accuracy by recording wall touches and comparing the actual times from the video with the timestamps shown on the dashboard. We plan to test at least 20 touches and calculate the error for each one, including the average and worst-case error. The target is less than 110 ms. For end-to-end latency, we will record the tag event and dashboard update in the same video and repeat the test at least 20 times. We will calculate the median and 95th percentile latency, which should both stay below 1 second.
To test capacity, we will use real tags along with replayed traffic to simulate 25 tags sending data through the Raspberry Pi and web app. We will check packet loss and latency as the number of tags increases. The system should keep packet loss below 5% and latency below 1 second.
Battery life will be tested by running the wearable PCB from a full charge until shutdown. If needed, we will also measure the average current consumption and use it to estimate battery life. The target is at least 4 hours. Finally, we will check the device’s weight, strap pressure, and waterproofing. This includes weighing the complete device, calculating the pressure from the strap, and checking for water inside after shock and water exposure tests. The device should weigh no more than 55 g, the strap pressure should stay below 9.5 kPa, and there should be no water inside the casing.
For each test, we will record the actual results and the number of samples. If something does not meet the requirement, we will first try a simple change, such as adjusting the advertising interval, changing the stroke detection thresholds, or moving the anchor to a better position.