phyphox
3 min read

Physics experiment app by RWTH Aachen University. Turns the phone into a lab instrument using its built-in sensors. Available on Android (F-Droid, Play Store) and iOS (App Store). Open source under GPLv3.

Sensors Used

SensorData
AccelerometerLinear acceleration (with/without g), vibration
GyroscopeRotation rate (rad/s)
MagnetometerMagnetic field strength, calibrated/uncalibrated
MicrophoneAudio waveform, frequency, amplitude
SpeakerTone generation, sonar output
BarometerAbsolute pressure (hPa)
GPSPosition, speed, altitude
Ambient lightIlluminance (lux)
ProximityNear/far state
CameraPhotometric data, depth (LiDAR/ToF where available)
BluetoothExternal sensors via BLE

Built-in Experiments

Mechanics

ExperimentSensorMeasures
Acceleration (without g)AccelerometerRaw linear acceleration
Acceleration with gAccelerometerRaw acceleration incl. gravity
Acceleration SpectrumAccelerometerFFT of acceleration, dominant frequency
Centrifugal accelerationGyroscope + AccelerometerRelationship between angular and centrifugal acceleration
InclinationAccelerometerAngle of inclined plane
PendulumGyroscopePendulum frequency → gravitational acceleration
SpringAccelerometerFrequency of spring pendulum
RollGyroscopeRotational speed inside rolling tube
Free fall (magnetic)MagnetometerDrop along magnet array → linear acceleration
Motion stopwatchAccelerometerStopwatch triggered by shocks
(In)elastic collisionAccelerometerEnergy loss of bouncing ball

Acoustics

ExperimentSensorMeasures
Audio ScopeMicrophone10ms oscilloscope view with edge trigger
Audio SpectrumMicrophoneFFT, dominant frequency
Audio AutocorrelationMicrophoneAutocorrelation, signal frequency
Audio AmplitudeMicrophoneSignal amplitude (calibratable)
Frequency historyMicrophoneFrequency over time
Acoustic StopwatchMicrophoneTime between sound events
Free fall (acoustic)MicrophoneFall duration via sound
Doppler effectMicrophoneDoppler shift from a base frequency
Speed of SoundMicrophone (2 phones)Sound velocity with measuring tape
SonarMicrophone + SpeakerDistance or speed of sound
Tone GeneratorSpeakerSine tone at configurable frequency

Magnetism

ExperimentSensorMeasures
Magnetic fieldMagnetometerRaw field data (calibrated/uncalibrated)
Magnetic SpectrumMagnetometerFFT of magnetic field
Magnetic rulerMagnetometerSpeed and distance via magnet markers
Linear acceleration on air trackMagnetometerAcceleration along magnetic track

Other

ExperimentSensorMeasures
ElevatorBarometerSpeed and height travelled in elevator
PressureBarometerRaw pressure data
Pressure in a bagBarometerPressure under applied weight
LightLight sensorRaw ambient light
Optical stopwatchLight sensorTime intervals via brightness threshold
Proximity stopwatchProximityTime intervals via near/far transitions
GyroscopeGyroscopeRaw rotation rate
Location (GPS)GPSRaw position data

Remote Access

Enable in-app via the menu. Phyphox starts a web server on port 8080 — open http://<phone-ip>:8080 from any browser on the same network to control the experiment and view live graphs.

REST API

All endpoints return JSON. The phone IP and port 8080 are the base URL.

GET /get?<buffer>[=threshold] — read sensor data

/get?time&acc_x&acc_y&acc_z # latest value from each buffer
/get?acc_x=full # entire buffer
/get?time=3 # values where time > 3
/get?acc_x=42|time # values where time buffer > 42

Response:

json
{
"buffer": {
"acc_x": { "size": 1000, "updateMode": "partial", "buffer": [0.12, ...] }
},
"status": {
"measuring": true,
"timedRun": false,
"session": "abc123"
}
}

GET /control?cmd=<command> — control experiment

CommandEffect
?cmd=startStart measurement
?cmd=stopPause measurement
?cmd=clearClear buffers and stop
?cmd=set&buffer=abc&value=42Write value into a buffer

GET /config — experiment structure (v1.1.6+)

Returns buffer names/sizes, input configuration, and recommended export groups.

GET /meta — device metadata (v1.1.8+)

Returns device and app version information.

GET /time — clock sync (v1.1.8+)

Maps experiment time to Unix time. Response is an array of {experimentTime, systemTime, event} objects (events: start, pause).

GET /export?format=<n> — bulk export

Formatn
Excel0
CSV2

Data Export

From the app: menu → Export. Formats: CSV, TSV, Excel. Can also be triggered over the network via /export.

Custom Experiments

Web Editor

Visual (Blockly-based) editor at phyphox.org/editor. Build experiments by wiring together input, analysis, and view blocks. Export as .phyphox XML file, then load onto device via QR code, URL, or file share.

File Format

Experiments are XML files with a .phyphox extension:

xml
<phyphox version="1.0">
<title>My Experiment</title>
<category>Mechanics</category>
<description>...</description>

<data-containers>
<container name="time" size="1000"/>
<container name="acc" size="1000"/>
</data-containers>

<input>
<sensor type="accelerometer" rate="100">
<output component="x">acc</output>
</sensor>
</input>

<analysis>
<!-- consecutive math operations on containers -->
</analysis>

<views>
<view label="Graph">
<graph label="Acceleration" unitX="s" unitY="m/s²">
<input axis="x">time</input>
<input axis="y">acc</input>
</graph>
</view>
</views>

<export>
<set name="Data">
<data name="Time">time</data>
<data name="Acceleration">acc</data>
</set>
</export>
</phyphox>

View elements: <graph>, <value>, <edit>, <button>, <slider>, <toggle>, <dropdown>

Input types: accelerometer, gyroscope, magnetometer, pressure, light, proximity, gps, microphone, camera, bluetooth

External Hardware

BLE sensors can be integrated via the Bluetooth input module. Arduino and MicroPython libraries are available for building custom sensor peripherals.

Experiment collection (all built-in .phyphox files): github.com/phyphox/phyphox-experiments