This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Flipper Zero + DS18B20 as a phyphox BLE temperature sensor
#1
Hi everyone,

  I built a small Flipper Zero app that turns the Flipper into a phyphox BLE sensor. It reads a DS18B20 1-Wire thermometer on GPIO pin 17 and streams the temperature to phyphox. No WiFi devboard or custom phone build is needed.

What it does
   
  •  
  • Ports the phyphox BLE 2.0 library core (experiment builder, config transfer, data notifications) to the Flipper's built-in STM32WB BLE.
     
  • Exposes the phyphox experiment service cddf0001 and data service cddf1001, so phyphox sees it like an Arduino BLE sensor.
     
  • Samples the DS18B20 at about 1 Hz and shows the live temperature on the Flipper screen.
     
  • Uses the Flipper's 1-Wire/iButton pin (GPIO 17), which has a built-in pull-up.
     

Wiring
   
  •  
  • DS18B20 VDD -> Flipper GPIO 9 (3V3)
     
  • DS18B20 GND -> GPIO 18 (or 8/11)
     
  • DS18B20 DQ -> GPIO 17 (1-Wire)
     
  Pin 17 already has a pull-up; no external 4.7k resistor is needed.

Install and use
  1. Download f0phyphox.fap and copy it to SD:/apps/Bluetooth/.
  2. Open "Phyphox DS18B20" on the Flipper; it advertises as FLIP.
  3. In phyphox: + -> Bluetooth device -> FLIP.
  4. The DS18B20 Temperature experiment opens with a live graph and value.
  5. Back exits the app and restores the normal Flipper BLE profile.

Notes
     
  •  
  • Flipper BLE only; the Flipper has no WiFi.
     
  • The advertised name is FLIP. The 128-bit phyphox service UUID plus the stack-added flags and TX-power AD elements leave only five characters in the 31-byte legacy advertising packet. A longer name is silently rejected by the ST stack, so FLIP is used with a margin.
     
  • Built against the official dev SDK (API 88.3); tested end-to-end with the phyphox app on a phone, on a Flipper running Unleashed (API 88.19).
     
  • The app uses SKIP ROM, so it expects one DS18B20 on the bus.
     
  • Not affiliated with phyphox or Flipper Devices.
     

Links
   
  Thanks to the phyphox team for the BLE protocol and the phyphox-arduino library. The DS18B20 read code follows the Flipper example_thermo.

  Roadmap summary

  The full plan is in ROADMAP.md. The short version:

  - v1.1 — sensor abstraction; multiple DS18B20s via ROM search/Match ROM, up to 5 graphs/values.
  - v1.2 — I2C framework + BME280/BMP280 and SHT3x/SHT4x; prebuilt experiment templates; then SCD4x and light sensors.
  - v1.3 — sensor scan/select UI, SD config (bus/pins/sample rate/channel map), experiment rebuild.
  - v1.4 — SPI (MAX6675/MAX31855, MCP3008), UART (PMS5003, MH-Z19, GPS), ADC/GPIO sensors.
  - v2.0 — multi-sensor and the five-value limit of the phyphox BLE data characteristic: select which five values stream, or switch experiment profiles. No promise of >5 simultaneous channels without a phyphox-side experiment.
  - v2.x — CI against official/Unleashed APIs, SD CSV logging, MTU/throughput tuning, per-sensor wiring docs, firmware compatibility matrix.

  Hard constraints baked into the plan: five float32 per BLE notification, one BLE connection, 31-byte advertising packet (hence FLIP), and 3.3 V GPIO.
Reply
#2
Oh, that's cool. Loving this although I do not have a Flipper Zero to test. Maybe it's an excuse to get one Smile

About the constraints that are mentioned at the end of your post: This is only a limitation of our library if MTU is not increased. Not sure what you told Claude to do, but it looks like it literally tried to reproduce our Arduino library's behavior including the limitations that come from the library being design to be a general purpose tool for Arduino code. For example, it only sends float32 data, so we have a simple structure for write() commands and (more importantly) the configuration that needs to be transmitted to phyphox.

Since you are not using the library, there is no need to limit yourself to this. The Flipper can just transmit whatever the DS18B20 spits out (some 16bit integer I would guess?) and phyphox can do the conversion and phyphox supports negotiating a higher MTU. You can easily transfer a 100 values in a single packet.

Point Claude to our docs at https://phyphox.org/docs/ and in particular https://phyphox.org/docs/file-format/blu...ow-energy/ and you should get plenty of new options of how data can be sent to phyphox and how it can be presented in the app.
Reply


Forum Jump: