People are spending more and more time in cities, and it is becoming increasingly hard to find time to go outside. Short walks in the afternoon or sports adventures with friends are becoming increasingly valued, and we wanted to design a product to help fuel that passion. We also understand that many people don't have the time or money to plan multi-day or even daylong trips to larger parks, so we wanted to find a way to make the outdoors more enjoyable, interactive, and accessible for people in their everyday lives. We wanted a product someone could take with them to the park or even their own front yard, and let technology non-intrusively augment their time outside.

What it does

Metaballic pairs intelligent sensing capabilities with Wifi connectivity and a simple web interface to turn basketball into an interactive, connected experience. It pairs accelerometer and infrared sensing to track your basketball performance in real-time, giving you live feedback and statistics as you play. There is plenty of UI built-in, with two OLED displays, an RGB LED, and a buzzer providing an abundance of sensory feedback. If that isn't enough, Wifi connectivity uploads the data to a remote database in real-time, allowing you or other people to view your statistics in real-time. And, the small form factor makes this extremely portable, allowing you to bring the Metaboard with you wherever you go and easily attach it to a basketball hoop you find while you are out.

This device is also designed to be highly social. The web app allows you to connect with your friends and compete against them both live or asynchronously. Since the devices upload data in real-time, you have the capability to compete with a friend who is playing at the exact same moment. The web app provides live score updates, and the onboard OLED displays can display a live score count. If your friends are unavailable while you are playing you have the option to compete against a previous basketball session recorded by your friends or even yourself.

How we built it

We built a range of hardware and software technologies into this project. From the hardware side, we combine an MPU-6050 accelerometer/gyroscope module with an infrared distance sensor to detect the basketball when it hits the backboard and/or passes through the hoop. The accelerometer and gyroscope detect collisions with the basketball hoop and rim, which the system interprets as a shot being attempted. The infrared distance sensor can see a basketball successfully passing through the hoop, tracking how many shots have been successful.

To enhance user interactivity, two OLED displays can provide live numerical data on your session. This could either be your attempted and successful shots or your score side-by-side with a friend's score. There is an RGB LED and a buzzer so you can have both visible and audible feedback for making a basket. The Wifi connectivity integrated in the ESP32 module uploads statistics in real-time to the database, allowing you to track your progress in real-time from any device with an internet connection.

From a software standpoint, we use a real-time Firebase database to store the data and React to build the web application. Firebase allowed for real-time updates, and its simple React API made it easy to integrate with the web app.

The Team

Our team has a long history of working together. We are a mix of roommates, teammates, and close friends that have forged bonds throughout years of work. We first participated in IDEA Hacks two years ago in 2020, where we create the RetroSwitch and placed 3rd overall (as college freshmen). Here is a brief overview of the team:

  • Tyler Price is a third-year electrical engineering student. Currently the project lead for the Wireless and RF Analog Project (WRAP) for IEEE's Student Branch at UCLA, he has a significant amount of hands-on project experience through clubs and many personal projects.
  • James Tseng is a third-year aerospace engineering student with very impressive extracurricular qualifications. He is teaching a class on drones at UCLA and is a project co-lead for Unmanned Aerial Systems (UAS) at UCLA.
  • Aditya Mishra is a third-year computer science and engineering student. He works hard to serve the people around him, working as a technician for UCLA's reputable makerspace and being an RA in UCLA's Dykstra Hall.
  • Bradley Schulz is a third-year computer engineering student from the Bay Area. Like Tyler, he has been involved with IEEE's Student Branch at UCLA his entire time at UCLA, serving as co-lead (with Tyler) of the Micromouse project and currently as project and lab manager.

Challenges we ran into

There were many challenges we faced in this project, starting with architectural decisions and continuing all the way into the finer details of implementation. When we began this project, we had to determine the best way to make the data collected by Metaballic accessible by the user. The ESP32 has both Wifi and Bluetooth capabilities, we had the option of communicating either directly with the online database or with a user's mobile device through Bluetooth. Both approaches had their pros and cons: Communicating over Wifi was faster and simpler but limited the mobility of the system to be in the range of a Wifi network, while going with Bluetooth helped with mobility and simplified user access since most people almost always have their phones with them, but learning how to implement Bluetooth Low Energy was too big of a task for the time we had.

We also had many grand ideas for this project, and determining which ones to pursue was a challenge in itself. We wanted to utilize the non-volatile storage of the ESP32 so it could collect data in the absence of a network and automatically upload its data when it connected, but we did not have the time for this. We decided to prioritize the live interactions made possible through a Wifi connection, as this contributed more to the user experience and there are realistically few places where Wifi is completely inaccessible. We also would have ideally built out a whole social network in the web app to help people connect with friends, but this was a very ambitious goal.

On the electrical side, we faced a lot of issues with optimizing the responsivity of the ESP32. Since it is a small IoT device with power constraints, its processing power must be rationed. Between collecting data; driving displays, the LED, and buzzer; uploading data in real-time; and getting updates from the database when a user connects to the web app, writing the firmware was definitely a juggling act.

On the software side, building an entire web app from scratch was a rather large endeavor. Even with a template to start from, none of us were extremely comfortable with web development and had to do a lot of trial and error (made especially difficult by low amounts of sleep) in order to get the final product working.

Accomplishments that we're proud of

We are proud of the large amount of design work we were able to accomplish in a short period of time with only 4 people. We developed a compact electrical system with several sensors and user interface components built-in, a custom 3D printed case, and an entire web app to interface with the system. And, we even were able to create a logo for our project.

What we learned

We learned a lot about time management, goal prioritization, web development, database hosting, microcontroller programming beyond the Arduino IDE, and much more. It was a challenge to determine what tasks were most urgent because it is very easy to get sucked into the things you are doing.

What's next for Metaballic

There were a few features were did not have the time to implement. It would be very cool to get the non-volatile storage in the ESP32 working so the Metaballic can collect data even when not connected to Wifi. The intention with this is that it would upload the data to the database as soon as its connection to wifi is reestablished.

We would also like to build out the web app more. The major features—mainly live updates from the database, control of the board through the web interface, and viewing the history of all your activities—were implemented. However, there are a few social features and organizational tasks that would further improve the user experience. Additionally, adding more game modes (such as around the world) would make the system even more enjoyable.

Built With

Share this project: