Alexandre Bole

Connected mailbox

FlutterFirebaseIoTESP32-CAM
Connected mailbox

Working in a pair, we designed SBMail, a connected mailbox that sends a notification with a photo on every new delivery. The goal: a simple, secure and accessible solution to track your mail in real time, wherever you are.

System architecture

The system relies on an ESP32-CAM paired with an infrared sensor (IR). When motion is detected (mail insertion), the ESP32-CAM captures a photo, uploads it to Firebase Storage and updates a real-time database.

On the mobile side, a Flutter app lets users:

Linking mailboxes via QR code

Each mailbox has a unique QR code generated from its identifier. On first use, the user can scan this QR code with the mobile app to automatically link the mailbox to their account. This avoids any manual entry and ensures a fast, secure pairing between the user and their hardware.

Firebase integration

The project combines several Firebase services:

Electromagnetic lock

To open the mailbox, a 12V electromagnetic lock (model S0837DL-B) is triggered through a relay connected to the ESP32. The ESP watches a variable in the Realtime DB and triggers the opening accordingly.

Electromagnetic lock

Challenges faced

The project wasn't without difficulties:

Result

SBMail is now functional and reliable. Every delivery is documented and viewable from a simple interface, and the mailbox can be unlocked from anywhere. This project let us master the Firebase ecosystem, deepen our Flutter skills and experiment with IoT in real-world conditions.

The system in pictures

Here is a look at our setup: