Project information

  • Category: Hackathon
  • Competition: Hack Violet 2022
  • Project date: 06 February, 2022
  • Project URL: DEVPOST

Band Aid Together

Developed an utilizing Google Firebase to notify others if a person is having a seizure. The app was developed using Android Studio and an Arduino MKR 1010 Wi-Fi with an EMG sensor attached to provide live data to the app. The app was developed in Kotlin and the Arduino code was developed in C++. The app won Best Hardware Hack for its use of hardware components & UT Prosim Hack for its potential to help others.

Inspiration

Nearly a month ago, we had a close friend experience a panic attack in an isolated area. When we saw the unfortunate effects of this incident on him, we were inspired to find a way to link one to their loved ones and help them get through it. Upon further research, we found out that women and mothers are disproportionately more likely to suffer from routine panic attacks and anxiety, especially in the Pandemic Era. Panic attacks and anxiety have also been linked to an increase in seizures.

Challenges

Bluetooth Low Energy (BLE)

We initially chose the Arduino Nano 33 IoTs BLE module as our communication link to the mobile application. BLE appeared to be the ideal choice for our implementation due to its low latency and long-lasting performance. However, we encountered several challenges during the BLE implementation, both in terms of code and security. On the code side, we faced difficulties securing a GATT connection with the mobile phone because the phone's MAC address would change periodically. Additionally, there were issues with correctly reading UUID characteristics even when the connection was established. From a security perspective, the Nano device lacked robustness in a central-to-peripheral framework, as anyone could connect using the MAC address and access the BLE's characteristics. Initially, we considered encryption but eventually opted for a cloud-based solution, which successfully resolved all our problems. As part of this transition, we also switched to the Arduino MKR WiFi 1010 board, as it facilitated streamlined communication with the mobile app via the cloud. This switch not only reduced latency but also addressed our security concerns effectively.

Firebase

One of the primary hurdles we encountered revolved around the implementation of Google Firebase. We recognized that adopting a cloud-based solution had the potential to alleviate several of the challenges associated with BLE. However, we encountered difficulties, particularly concerning the compatibility of Firebase with the Nano device. This compelled us to transition to an alternative option, the Arduino MKR Wi-Fi 1010. By utilizing specific libraries, we successfully established a connection between Arduino and Firebase. A similar integration was achieved with Android Studio, enabling us to develop a system where the Arduino transmitted time and sensor data securely to the cloud, while the mobile app accessed and utilized this information accordingly.

Demo