Experiment · EN/DE
Arduino and phyphox
Flash one sketch onto an original Arduino Nano 33 BLE Sense and read its sensors live in phyphox on your smartphone — seven ready-to-import sensor experiments for the classroom.
Overview
Most astro-lab.app experiments run directly on a smartphone. But smartphone sensors vary widely in accuracy and sampling rate, and phyphox cannot access the iPhone's light sensor. The original Arduino Nano 33 BLE Sense offers a standardised set of onboard sensors that connect to the phyphox app via Bluetooth.
This guide walks through the setup: flashing the firmware onto the Arduino, adding the sensor experiments to your smartphone, and pairing the two devices. The firmware and experiments come from the curious-signals-phyphox repository; a live preview that works without hardware is at sebastianspicker.github.io/curious-signals-phyphox. The astro-lab experiments on this site do not use the Arduino kit; they run on phone sensors, TI SensorTags, a Bluetooth mouse or an Owon multimeter.
Developed in collaboration with Frédéric Bouquet, Université Paris-Saclay / Physics Reimagined.
| Grades | 7–10 (teacher preparation) |
| Subject | Physics, Natural Sciences |
| Method | Setup guide |
| Duration | ~30–60 min first-time setup; instantaneous thereafter |
| Language | German, English |
What You Need
| Item | Link |
|---|---|
| Original Arduino Nano 33 BLE Sense (Rev2 is not supported) | docs.arduino.cc/hardware/nano-33-ble-sense |
Arduino IDE (or arduino-cli with make) |
arduino.cc/en/software |
Firmware arduino/phyphox_ble_sense/phyphox_ble_sense.ino |
github.com/sebastianspicker/curious-signals-phyphox |
Sensor experiments experiments/*_plot_v1-2.phyphox |
same repository |
| Micro-USB cable + computer | — |
Sensors on the Arduino Nano 33 BLE Sense
| Sensor | Chip | Measures |
|---|---|---|
| IMU | ST LSM9DS1 | Acceleration, gyroscope, magnetometer |
| Light / colour | Avago APDS-9960 | Light and RGB colour as relative counts (not lux); proximity is not used |
| Barometer | ST LPS22HB | Pressure |
| Temperature + humidity | ST HTS221 | Temperature, relative humidity |
Step 1 — Prepare the Arduino
1.1 Install the Arduino IDE
Download and install the Arduino IDE from arduino.cc. Follow the installation guide for your operating system.
1.2 Get the firmware
Download the repository from GitHub and open arduino/phyphox_ble_sense/phyphox_ble_sense.ino in the Arduino IDE. The sketch uses the ArduinoBLE library.
The board advertises under the fixed name
phyphox-sense. Because all boards share this name and the same UUIDs, only one board per room works.
1.3 Install the board package and libraries
The versions are pinned in arduino/toolchain.json. In the Arduino IDE, go to Tools → Board → Board Manager and install:
- Arduino Mbed OS Nano Boards (
arduino:mbed_nano)
Then go to Tools → Manage Libraries and install:
ArduinoBLEArduino_LSM9DS1Arduino_HTS221Arduino_LPS22HBArduino_APDS9960
Alternatively, make provision installs the pinned core and libraries with arduino-cli, and make compile verifies the installed versions and compiles the sketch.
1.4 Connect the board and select the port
Connect the Arduino to your computer via Micro-USB. In the IDE, select Tools → Board → Arduino Mbed OS Nano Boards → Arduino Nano 33 BLE. Then select the correct port under Tools → Port.
1.5 Upload the sketch
Click the upload arrow (top-left) to compile and flash the sketch. Wait for "Upload complete" in the IDE status bar. Close the Arduino IDE.
There is no status LED or serial message: if Bluetooth initialisation fails, the sketch simply stops.
Step 2 — Prepare the Smartphone
2.1 Install phyphox
Download phyphox free from the Google Play Store (Android) or Apple App Store (iOS).
2.2 Add the experiments to phyphox
Copy one of the experiments/*_plot_v1-2.phyphox files to your phone or tablet and open it in phyphox.
Step 3 — Connect and Measure
3.1 Power the Arduino
The board runs from USB or from the VIN pin. As a suggestion, a battery pack can be used for mobile experiments, provided it matches the VIN voltage range in the Arduino documentation.
3.2 Pair with phyphox
Enable Bluetooth on the smartphone. Open an experiment — phyphox searches for nearby Bluetooth devices automatically. Select phyphox-sense.
3.3 Start measuring
Tap the play button in phyphox to start. Each experiment selects one sensor mode and shows the corresponding channels.
The Seven Sensor Experiments
| Experiment file | Measurement |
|---|---|
accelerometer_plot_v1-2.phyphox |
Acceleration x, y, z, magnitude |
gyroscope_plot_v1-2.phyphox |
Angular velocity x, y, z, magnitude |
magnetometer_plot_v1-2.phyphox |
Magnetic field x, y, z, magnitude |
pressure_plot_v1-2.phyphox |
Pressure (kPa) |
temperature_plot_v1-2.phyphox |
Temperature and humidity |
light_plot_v1-2.phyphox |
Light and RGB as relative counts (clear, red, green, blue) |
analog_input_plot_v1-2.phyphox |
Analog inputs A0, A1, A2 |
How the Communication Works
The firmware advertises as phyphox-sense and sends five float32 values per Bluetooth notification: the device time and four mode-dependent channels. Each experiment writes the mode it needs to a config characteristic, and the board reads only the sensors for that mode. Channels a mode cannot produce are sent as NaN. Notifications are sent at most every 50 ms.
Related Resource
English and French step-by-step guide: hebergement.universite-paris-saclay.fr/supraconductivite/projet/arduino_nano/