Inspiration

We were thinking about what happens when a natural disaster hits and cell towers go down. People lose access to Google/Appe Maps and emergency alerts exactly when they need them most. We wanted to build something that could guide people to safety without relying on the internet at all, using only local hardware and whatever phone they have in their pocket.

What it does

SafeHouse is a network of low-power beacons that can be mounted on street poles or university infrastructure. When someone walks near a beacon, their phone automatically picks up the signal and shows them nearby safe places like shelters, aid stations, and evacuation points with directions through Apple Maps(Other apps in later versions). Each zone also shows how busy a shelter is so people can avoid overcrowded locations. The whole thing works offline with no cell service needed.

How we built it

We used ESP32 microcontrollers as BLE beacons, each one broadcasting a list of safe locations for its zone. We set up three separate zones covering different parts of Newark, each with its own set of shelter locations and a rotating busyness indicator. On the networking side we got painlessMesh running so that a coordinator could push updated locations to all the beacons from a single laptop using a Python CLI tool. The iOS app was built in Swift with SwiftUI and CoreBluetooth. It scans for nearby beacons, groups the safe places by zone, shows signal strength and busyness levels, and gives you one-tap directions. We also built out NFC integration using MFRC522 readers to write location data to cards that any phone can tap, though we ran into hardware limitations with iPhone compatibility during the event.

Challenges we ran into

The biggest challenge was discovering halfway through the night that iPhones straight up cannot read Mifare Classic NFC cards. We had built the whole card-writing pipeline on the ESP32 side and it worked perfectly, but Apple just does not support that card type. We tried everything including DeSFire cards and ISO 14443-4 communication through the MFRC522 before finally pivoting to BLE. Running BLE and WiFi mesh on the same ESP32 also caused kernel panics because they share the same 2.4GHz radio. The default ESP32 BLE library kept crashing on Arduino core 3.x so we had to switch to NimBLE. We also spent a lot of time fighting USB port assignments since the three ESP32 boards kept swapping port numbers every time we reconnected them.

Accomplishments that we're proud of

We got a working end-to-end system running in one night. Three ESP32 beacons each broadcasting different safe locations, an iPhone app that discovers all of them and shows the places with directions, and a coordinator tool that can push updates from a laptop. We pivoted three separate times when hardware limitations blocked us and still came out with something that actually works.

What we learned

Bring your own parts.

What's next for Safe House

PN532 instead of RC522. Custom pcb. Make it work without app and do not rely on Apple/Google Maps.

Built With

Share this project:

Updates