Inspiration
Exercising can be difficult. Which is why we made Smart Bar, to give you a data driven workout. Our thought was that tech is already being applied successfully to improve one's fitness with devices like Fitbits. Where else could technology be applied to better inform you of your fitness?
This is why we made Smart Bar, to allow people to understand their weightlifting routine. Informed decisions are needed for optimal work outs, so Smart Bar lets you train efficiently.
What it does
Smart Bar records movement data from a barbell and transmits that data via Bluetooth to other devices. This data is used internally to track the state of the bar and determine how the bar is being used. This lets us log the raw data, but also lets us log more abstract data, such as how many reps you have completed.
We also created a means to view this data in real time on your PC. Giving a human readable way of consuming the data as it is produced.
How we built it
Smart bar is controlled using an ESP32 microcontroller and communicates with the built-in Bluetooth module. This had two major sensors that we used to make understand bar movement.
- MPU9250 9-axis accelerometer, gyroscope and magnetometer. This was used to get acceleration data and calculate orientation data. The magnetometer was crucial as it provided a second absolute reference (the earth's magnetic field) besides just the Earth's gravity. This gives enough information to determine the absolute orientation of the barbell.
- MS5611 barometric pressure sensor. This sensor was used to quickly calculate relative changes in elevation, which worked as a proxy for height and velocity readings.
To stabilize data we used an AHRS sensor fusion algorithm, which gave us absolute orientation of the bar and acceleration ignoring Earth's gravity. We also used Kalman filters to stabilize sensor readings.
The shell for the electronics was 3D printed and modeled using Fusion 360.
To visualize the data, we connected to the ESP32's built in Bluetooth module and transmitted the data to a PC. The PC then ran a Python script to create a real-time Matplotlib chart displaying the desired bar measurements.
All code on the microcontrollers were done using C/C++ and the visualization code was done with Python.
Challenges we ran into
We spent a long time finding a way to stabilize our readings from our sensors. The electronics we used are fairly cheap and are subject to drift and noise. Our initial task was calibrating our accelerometer. This involved measuring the bias in the accelerometer and gyroscope and correcting those. To calibrate the magnetometer we had to collect measurements from every angle. This data can be used to solve an equation that corrects for distortions in the magnetic field from errors on the chip and the nearby environment.
Another challenge was that our 3D model took 16 hours to print. After designing the model, this meant we had one shot at getting the design right. This required extra attention on our part, as a single design mistake would significantly hinder this project.
Smart Bar
Accomplishments that we're proud of
We made a portable, self-contained, wireless device in just under two days! There was a lot of challenges along the way, but we were able to create something that worked!
What we learned
We learned a lot about data stabilization techniques while working on this project. Not only did we have to learn some of the theory about why are sensors were not accurate, but we had the chance to apply that knowledge and correct the data.
What's next for smart-bar
There's so much more that we could do with the data that we are generating. If we had more time during this event, we wanted to create an app that could connect the data to cloud storage. This data could be linked to various fitness apps to automatically log your work outs in your favorite app. Also, more analysis on the data would be useful to create smarter metrics and interesting insights.
Built With
- accelerometer
- ahrs
- c
- c++
- esp32
- gyroscope
- kalman
- magnetometer
- mpu9250
- ms5611
- python
- sensors

Log in or sign up for Devpost to join the conversation.