Progress Update
This week, the team made significant progress on multiple fronts:
- Bluetooth Connection:
- Successfully established a robust Bluetooth connection between the ESP32 device and the mobile application.
- Developed a protocol to send structured data (using structs) to the app, improving the efficiency and reliability of data transmission.
- Implemented a transfer status ID to indicate the end of data transmission, ensuring the app can detect when a complete data packet has been received.
- Data Acquisition and Processing:
- Acquired raw linear acceleration data along the X-axis from the BNO055 IMU in NDOF mode.
- Applied exponential smoothing to reduce high-frequency noise, stabilizing the acceleration signal for further analysis.
- Corrected sensor bias by recording a stationary baseline and subtracting the offset from subsequent readings.
- Calculated velocity (through first integration) and displacement (through second integration) based on the smoothed acceleration data, using a fixed time interval determined by the IMU’s sampling rate.
- Data Transmission:
- Configured the ESP32 as a BLE server for transmitting processed IMU data to the app.
- Formatted the data into strings for compatibility with the app’s parsing requirements.
- UI Improvements:
- Added a user interface section to input height and weight, which will be used in future analytics.
- Enhanced the visualization of data, focusing on graphs and trends to provide more intuitive insights for users.
Challenges Faced
- Data Transmission Timing Issues:
- The asynchronous nature of Bluetooth communication led to timing discrepancies, with data packets occasionally being received out of order.
- Noise and Drift in Displacement Calculation:
- Residual noise in acceleration data caused drift in velocity and displacement estimates, even after smoothing.
- Temperature and Environmental Sensitivity:
- Minor variations in IMU data were observed under different temperature conditions, highlighting the need for temperature-based calibration.
- ESP32 Power Management:
- To prevent overheating and optimize power usage, delays were implemented between transmissions. Additionally, Wi-Fi settings were optimized to minimize power consumption during idle periods.
Results
- Processed Data:
- Successfully transmitted smoothed acceleration, velocity, and displacement data from the ESP32 to the app.
- Users can now monitor these values through the mobile app.
- Key Outputs:
- Velocity (X-axis): Estimated velocity over time.
- Displacement (X-axis): Estimated displacement via double integration of acceleration data.
Next Steps
- Data Transmission Improvements:
- Investigate and resolve timing issues to ensure data packets are received in the correct order.
- Implement error-checking mechanisms to handle unordered data reception.
- Conduct extensive testing under different conditions to identify and mitigate bottlenecks.
- Advanced Filtering:
- Explore the use of a Kalman filter to reduce drift and improve accuracy in displacement and velocity calculations.
- App Enhancements:
- Add data visualization features, such as graphs and trendlines, to improve user insights into acceleration, velocity, and displacement trends.
- Temperature Calibration:
- Investigate temperature sensitivity of the IMU and incorporate calibration techniques to minimize its impact.
Conclusion
The team has made significant progress in both hardware communication and data processing. The establishment of Bluetooth communication and successful implementation of data acquisition and smoothing techniques lay the groundwork for further improvements. Challenges such as timing discrepancies, noise-induced drift, and environmental sensitivities have been identified and are being addressed. Upcoming efforts will focus on advanced filtering techniques, enhanced data visualization, and continued system optimization to ensure reliability and usability for end-users.