Summary of Work Done
- Data Acquisition and Smoothing
- Raw linear acceleration data along the X-axis was acquired from the BNO055 IMU in NDOF mode.
- Initial analysis showed significant noise in the raw data even when the sensor was stationary. To address this, we applied exponential smoothing to reduce high-frequency noise and stabilize the signal for further processing. This step was essential to obtain a more accurate representation of linear acceleration.
- Bias Correction
- A bias correction technique was implemented by recording a stationary baseline and calculating the mean of the initial readings to account for any offset. This average offset was then subtracted from all subsequent readings, ensuring that the data approached zero when the IMU was stationary.
- Velocity and Displacement Calculation
- First Integration: The smoothed and bias-corrected acceleration data was integrated over time to estimate velocity.
- Second Integration: The calculated velocity was further integrated over time to estimate displacement along the X-axis.
- A fixed time interval (
dt
), based on the IMU’s sampling rate, was used to ensure consistent and accurate integration at each step.
- ESP32 Data Transmission to Mobile App
- We used an ESP32 microcontroller to transmit the processed IMU data to a mobile app. Here’s how we set up this data transmission:
- BLE Communication: The ESP32 was configured to create a BLE server, allowing it to communicate wirelessly with the mobile app.
- Data Formatting: The processed data (smoothed acceleration, velocity, and displacement) was formatted into strings to ensure compatibility with the app’s data parsing requirements.
- Challenges Encountered in Transmission
- Power Management on ESP32: To prevent overheating and optimize power usage, we implemented a delay between data transmissions. Additionally, we configured the ESP32’s Wi-Fi settings to minimize power consumption during idle periods.
Results
The processed data was successfully transmitted from the ESP32 to the mobile app, allowing users to monitor acceleration, velocity, and displacement values. Key outputs included:
- Velocity (X-axis): An estimated velocity value over time.
- Displacement (X-axis): An estimated displacement value based on double integration of acceleration data.
Challenges and Recommendations
- Noise and Drift in Displacement Calculation
- Despite smoothing, residual noise in acceleration data caused drift in velocity and displacement estimates. For future improvements, advanced filters like the Kalman filter should be explored to address this drift.
- Temperature and Environmental Sensitivity
- Observations showed minor variations in IMU data under different temperature conditions. Future work could involve temperature-based calibration to further improve accuracy.
Next Steps
- Implement Advanced Filtering (Kalman Filter): Integrating a Kalman filter could help reduce drift by combining the current estimate with previous estimates and error measurements, leading to more reliable displacement values.
- App Enhancement for Data Visualization: Adding a graphing feature in the app to display trends over time could provide users with better insights into changes in acceleration, velocity, and displacement.
Conclusion
This project successfully calculated and transmitted displacement data from an IMU via an ESP32 to a mobile app. While preliminary results are promising, further improvements in filtering and alternative communication methods could enhance both the accuracy of displacement estimation and the reliability of data transmission. Integrating advanced filtering and refining the app’s user interface for better visualization are recommended next steps.