Projects / Portfolio

STM32L476RG Integrated Outdoor Safety System

2024 · Course grade 94/100

A wearable device that continuously monitors health and location outdoors and can send a distress signal in an emergency. Data is uploaded to a cloud server over 4G for real-time monitoring.

Assembled wearable device with an OLED screen, controller board and battery inside a 3D-printed enclosure
Sensors
5
GPS deviation
<50m
PCB layers
2
Location history
24h
Course grade
94/100

Why I built it

Outdoor activities are increasingly popular, but traditional equipment has limitations: radios depend on signal range, and reading maps takes experience. In an emergency, two things matter: alerting others and identifying the person’s location.

System overview

The device obtains its location via GPS and uploads collected data to a cloud server over 4G. The dashboard can be accessed from a computer or phone.

Signal flow: GPS positioning, 4G upload to a cloud server, and access from computers and phones

Monitoring dashboard

The backend runs on an Alibaba Cloud server with Nginx and PHP. Leaflet.js displays the current position and location history. Four panels show GPS coordinates, heart rate and blood oxygen, steps and calories, and temperature and humidity, refreshing once per second. Location records are retained for 24 hours before automatic removal.

Monitoring dashboard showing GPS, heart rate and blood oxygen, steps and calories, temperature and humidity, and a location map
Normal monitoring state
Monitoring dashboard in a red SOS alert state with a cancel-alert button
SOS alert state

Hardware

Five modules are used: MAX30102 for heart rate and blood oxygen, AHT20 for temperature and humidity, MPU6050 for steps and motion, ATGM336H for positioning, and e27v for 4G transmission. Sensors communicate over I²C; GPS and 4G use serial ports. Two stacked PCBs organise the assembly, and all data is output in a common JSON format.

Labelled module layout showing AHT20, MPU6050, ATGM336H, e27v 4G and the OLED screen
Module layout and wiring
PCB layout showing pin headers and signal traces
PCB trace layout
Back of the assembled PCB showing MAX30102 and 3.3V and 5V power interfaces
PCB back: MAX30102 and dual-voltage interfaces

Enclosure design

The enclosure was modelled in SolidWorks with rounded edges and a battery compartment, then 3D-printed and assembled.

SolidWorks wireframe of the enclosure’s internal structure
Internal structure wireframe
SolidWorks enclosure model with rounded edges and a screen opening
Enclosure model
Slicing preview showing the enclosure model positioned on a print bed
3D-print slicing preview

Future improvements

Data cannot be uploaded without coverage, so SOS functionality is unavailable in those areas; satellite communication is a possible future addition. The device is relatively large and lacks water and dust protection.

Further improvements include local buffering during outages, a unified I²C sensor interface, and a smaller STM32 minimum-system board.

← Explore other projects