The primary objective of this project is to move beyond simple sleep tracking by mapping the physical geometry of rest. By utilizing a grid of force sensors, my project aims to identify how the human body shifts, rotates and settles during sleep, providing a look at my nocturnal habits over extended periods of time.
Hardware Architecture
The system is built upon a Raspberry Pi 5, chosen for its processing power, GPIO pins, small form factor and ability to handle local data logging. The primary sensing hardware consists of eight force-sensitive resistor (FSR) pads. These are arranged to capture pressure across a bed.
Unlike motion sensors, FSRs allow the system to distinguish between a person simply moving and a change in body orientation. By analyzing the specific pressure map generated by these eight points, the software infers whether a sleeper is on their side, back or stomach and detects the frequency of shifts throughout the night.
The Development Journey
Initially, this project sought to use an AMG8833 IR thermal sensor to detect body heat signatures. This phase provided useful experience with interfacing infrared sensors with Raspberry Pi computers. However, this path presented significant challenges in hardware construction.
More specifically, I encountered several learning moments with soldering and component communication. These hurdles led to a strategic change; moving away from thermal imaging toward pressure sensing. This shift proved more robust for the specific goal of quantifying sleep positions, as FSR pads provide a measurement of physical weight distribution, less susceptible to inaccuracies than infrared sensors.
Software And Data Pipeline
The backend is designed for reliability and ease of analysis. For example:
- GPIO pins connected to the FSR pads are queried by a Python script at regular intervals
- Data ingestion is handled by a Flask server API
- Collected data is stored as a local JSON file
- D3.js is used to transform raw pressure readings into graphics
Future Goals
The ultimate goal here is to move from proof of concept to long-term study. By collecting data over a 90-day window, I expect to identify recurring patterns in my own physical behavior.
Bret Bernhoft

Andreas Lau
Florian Wilhelm Dirnberger
Ron Grimes