Inspiration

While spending time in San Francisco, we noticed how many people rely on shelters, food programs, and emergency services every day. Seeing so many people without stable housing was heartbreaking and made us want to find a way to help using our technical skills. We began thinking about how difficult it can be to access those resources when information is constantly changing. Many existing solutions assume users have a smartphone, internet connection, and cellular service, but those assumptions do not always hold true. We wondered how someone could find an available shelter bed or request help if they had no reliable connectivity. At the same time, we were learning about mesh networks and how devices can communicate directly without relying on traditional infrastructure. That inspired us to explore whether a low-cost wearable could provide resource information and emergency assistance completely offline. During Milpitas Hacks, we built a mesh-networked watch that receives shelter updates, detects falls, and sends SOS requests through nearby devices. Our goal was to create a solution that keeps critical information and support accessible even when conventional communication networks are unavailable.

What it does

Hardware

We have multiple components inside our Haven watch, including a gyro sensor, a OLED screen, 2.4GhHz wifi support, Bluetooth support, and button to navigate the screen, and a battery management system using custom software in order to maximize our battery life to up to 8 days. Using these sensors we can check who needs help and help direct them to help using our screen for visual output. We can also use the wifi support in order to give data to homeless shelters and soup kitchens in order to maximize their ability to help the unhoused in the area.

Software

Haven's software allows resources to be accessed and emergency response to be made without the need for internet, cell phone or traditional networking infrastructure. ESP-NOW creates a self-healing mesh network where shelter availability, food resources and emergency alerts are distributed directly between nearby nodes. Every transmission is secured with HMAC-SHA256 authentication, which helps to prevent spoofed messages and ensures that the information is trustworthy. The watch also has fall detection, step tracking, and orientation-based power management capabilities, all based on raw MPU6500 sensor data and custom signal-processing algorithms. The system is an NFC credential-based one that enables users to use digital aid services if they are available, and a multilingual AI assistant that can identify the resources available nearby. The software works with the aggressive deep-sleep power management and sensor-enabled wake cycles to provide up to eight days of battery life without sacrificing critical functions for vulnerable populations.

How we built it

Hardware

We used Onshape to 3d model our CAD design for our product, we used measurements and made sure to make our product as small as possible within our electrical restrictions, since we don't have access to professional industrial PCB manufacturing which would be able to make our product 80% smaller. We 3d printed the case, which used eco friendly plastic which costed about 10ยข cents to produce. We then started our wiring which includes the components such as a mpu65o gyro sensor, a SSD1306 OLED 0.96 inch screen, a pushbutton, and finally our esp-32 super mini to power it all. We made the wiring as small as possible in order to minimize the size of our wearable, while still being able to provide power to all the components necessary.

Software

The Haven software stack is written in C++ on PlatformIO and Arduino-ESP32 ecosystem. Compile-time configuration of the device role enables a single codebase to support three device roles: watch, beacon, and repeater. The communication protocol chosen was ESP-NOW, which is a protocol that enables direct communication between devices without the need for routers or internet connectivity. Custom protocols were designed to conform to the limited payload size of the platform, while also providing security via hardware accelerated HMAC authentication. The algorithms for fall detection, pedometry and motion control of the display were developed from scratch, and the algorithms for the motion control of the display were designed to use raw data from the MPU6500. The AI assistant is implemented using a Flask backend and NFC credentials are validated using a Python-based management tool, which also delivers telemetry and configuration assistance. The backend and optional local AI model were packaged using Docker to enable quick deployment and reproducible system setup.

Challenges we ran into

Hardware

Making the wiring as small as possible was a challenge that required lots of trial and error since it lead to us breaking lots of wires and since working within such a small workspace and with such small components was difficult. The case was also difficult to make since it required very precise measurements in order to make sure that everything fit without making it too lose and having parts move around. Since we need our gyro to stay completely fixed in order to have accurate readings, it took us multiple rebuilds in order to finally perfect the design. On top of that the enclosed design made it difficult to repair anything, which usually resulted in a full rebuild if any connections got unplugged. On top of that the limited materials made it more difficult to build our watch with the necessary functions

Software

Numerous software problems at Haven were directly related to hardware restrictions. The key challenge with ESP-NOW was optimizing the packet size, security protocols, and routing logic. The implementation of reliable fall detection and step counting was especially challenging, as the MPU6500 does not contain any classification of activities. To minimize false positive and maximize accuracy, extensive testing and threshold tuning was necessary. The ESP32-C3 platform added further complexities such as different deep-sleep behavior, different pin mapping, and limitations on USB debugging. Radio coexistence also became an issue as ESP-NOW and WiFi cannot coexist without compromises. Last but not least, it was important to design and implement a secure way to manage authentication keys across the firmware, NFC credentials and backend services so that the secrets were never exposed and the user experience was seamless throughout the system.

Accomplishments that we're proud of

Hardware

Were proud of our size factor of our watch without having industry or professional equipment. Our size is relatively small, by disregarding breadboards and minimizing connectors and wires we made our watch a reasonable size. We also calculated that if we had a professional PCB it would be able to reduce the physical size by up to 80%. We also have 8 days of battery life on our current design with power management technology which automatically turns off battery dependent functions when they are not necessary using custom made software

Software

We are proud that Haven can share resource information and emergency notifications without the need for Internet, routers or cell phone networks. No user configuration is needed, the self-healing mesh network expands automatically with repeater nodes. With strict packet-size limitations, we were able to successfully integrate cryptographic authentication into the system, providing security for messages and digital credentials from being spoofed or tampered with. Our unique algorithms for fall detection, step tracking and power management made a simple IMU into a sophisticated safety monitoring system and helped us achieve an eight-day battery life. We also built a multilingual AI assistant that is able to be deployed on free local AI models without recurring expenses. Last but not least, having multiple device roles from a single codebase and packaging deployment via Docker resulted in a scalable and maintainable architecture.

What we learned

Hardware

We originally didn't know how to solder and make connections in size constraints, originally using breadboards and long jumper cables. We learnt how to use electrical components in a small size constraint and in a professional setting. On top of that our esp-32 supermini had multiple configuration and connection problems, we figured out how to fix this by learning how to deal with different esp versions and models since they don't all work the same, and we also learnt how to edit the configuration of esp-32 modules.

Software

Building Haven was a learning experience that introduced us to the basics of building a wireless communication system, such as message routing, authentication, deduplication, and secure data transmission. We acquired practical experience in the implementation of cryptographic concepts in practical embedded systems and how to meet security requirements while keeping hardware constraints in mind. We found that activity recognition is not only based on theory, but needs a lot of empirical data collection and tuning. We also learned the intricacies of embedded development on the ESP32 platform, such as power management, sleep modes, radio restrictions, and ESP32-specific APIs. On the back end, we were able to learn about creating flexible systems that can support both local and cloud AI models, multilingual interfaces, and scalable deployment practices. The most important thing we learned was that hardware and software must be designed as a whole system to be a successful embedded system.

How does this benefit the community

Haven can serve our community by providing access to critical resources for people who are homeless. Housing insecure individuals are often unable to access a cell phone, cell service, or internet, making access to shelters, food programs, and emergency assistance difficult. To meet this challenge Haven offers resource information and SOS capabilities via an offline mesh network, so support can be provided even if traditional communication systems are not available. The watch's fall detection can also aid in the identification of persons who might require immediate help, enabling the shelters and support organizations to reach them in a timely manner. Moreover, information gathered using the network can be used to better inform community organizations about the areas where resources are most needed and help them reach out more effectively. Haven can have a positive impact on the quality of life for some of the most vulnerable in our community by making the services more accessible, safe and connected.

What's next for Haven

Hardware

As mentioned above, using professional PCB design we would be able to reduce the size by 80%, plus the cost will go down to 4-5$ per unit. This would make the product much more desirable in real life use cases and scenarios for homeless people. We can give the data collected by the gps and the gyro to unhoused shelters and the government, this will allow them to better direct in their efforts in order to help the unhoused. Overall we can reduce the footprint and the cost of the product in order to make it more feasible. We also plan on adding a solar panel in the future to reduce charging requirements to eliminate it fully.

Software

The next step in Haven is to enhance security, intelligence and scalability. We plan to strengthen the mesh protocol by adding replay protection and more advanced key-management systems to further secure emergency communications. Future versions will also include fall detection using TinyML, a method that will use machine learning algorithms to learn the unique movement patterns of each individual and detect falls without relying on fixed thresholds, while keeping power consumption low. We also want to be able to use the AI assistant completely offline, using local language models, and still function in case of total connectivity loss. In addition to the device, we want to develop a city-wide analytics platform that will combine anonymous shelter use, SOS activity and resource demand trends to support organisations in better allocating resources. Future hardware enhancements like custom PCBs and solar charging can make Haven scalable, infrastructure-free safety network.

Built With

Share this project:

Updates