Smartphone Sensors Unlocked: Turn Your Phone Into A Physics Lab

phyphox

These days, most of us have a smartphone. They are so commonplace that we rarely stop to consider how amazing they truly are. The open-source project Phyphox has provided easy access to your phone’s sensors for over a decade. We featured it years ago, and the Phyphox team continues to update this versatile application.

Phyphox is designed to use your phone as a sensor for physics experiments, offering a list of prebuilt experiments created by others that you can try yourself. But that’s not all—this app provides access to the many sensors built into your phone. Unlike many applications that access these sensors, Phyphox is open-source, with all its code available on its GitHub page.

The available sensors depend on your smartphone, but you can typically access readings from accelerometers, GPS, gyroscopes, magnetometers, barometers, microphones, cameras, and more. The app includes clever prebuilt experiments, like measuring an elevator’s speed using your phone’s barometer or determining a color’s HSV value with the camera. Beyond phone sensors, the Phyphox team has added support for Arduino BLE devices, enabling you to collect and graph telemetry from your Arduino projects in a centralized hub.

Thanks [Alfius] for sharing this versatile application that unlocks a myriad of uses for your phone’s sensors. You can use a phone for so many things. Really.

18 thoughts on “Smartphone Sensors Unlocked: Turn Your Phone Into A Physics Lab

  1. That’s clever, fun and useful at the same time! I’d love to see how a reconstructed path of the rollercoaster would look like, using just the IMU data. Another useful thing might be to track the real time with the measurements, not just the elapsed microseconds. That way the data would be easier to match the measurements with the video data, as cameras often use the timestamp as file name. But maybe they’re doing this already?

      1. Don’t forget airplanes. There are already a few rpi projects for pilots that use sensor data from both the phone and rpi to generate complex visualizations for flying. Search stratux and EFB.

  2. I’ve been having fun with the various “physics lab” apps for Android for many years, and even bought phones specifically for their sensors. It’s nice to see an open-source one featured here.

  3. OG here. Back in the Nexus days there was an app called Tricorder that incorporated various phone sensors in a Star Trek style UI complete with Trek sounds. Included things like magnetic fields, which are run to watch on subways. Apparently Paramount got it taken down. I probably have the file somewhere.

    1. The Washington DC Metro had some really odd magnetic field effects I saw when I was last there. Weird stuff like a vibrating paper clip standing upright on the floor. Must have just been stray field from a motor underneath, but spooky to see.

  4. I have had a number of apps do this over the years. Androsensor was my favorite, but they didn’t keep up with maintenance, sadly. I think there’s another one called sensor multi tool.

    I used to measure the forces during take off and landing when I’d fly anywhere, save the measurements as CSV, and tell myself I’d do something with the days besides look at the graphs on my phone.

    Good times.

  5. I found a massive lump of magnetite in a museum and got my phone out to test it, I was pleasantly surprised to see the mag sensor had a millitesla display. And I could check the field given off by the exhibit!

  6. I hate that it needs 80s to calibrate the magnetometer and can’t set the zoom while keeping the autoscroll in most experiments and does not autostart when you choose an experiment.
    And probably lot of others things I forgot because I didn’t run it for one year

  7. This guy posted a short on YouTube about Phyphox. He’s hilarious. That’s how found out about this nifty little turn your phone into tricorder.

    https://youtube.com/shorts/X-_bGD3bKKU?si=zeTBd-NuR1dhliYh

    I use the magnetometer function to find out that one of my Corsair ML 120 PRO’s started to give out. There is an unusual sound that I never heard before. Which led to the magnetometer idea. Because they’re magnetic bearings. The fan’s ran for 8 years straight. I think projected lifetime is 100,000 hours. Some people have gotten more. One of nine in 8 years. Four ML 140 PRO’s, five 120s. They are work horses.

    All the fans had a study wave pattern for a 4 pin fan. The one that was dying was very rigid and all over the map. Compared to the other 120s. I replaced rigid fan, the noise was gone. The noise did match up with the wave pattern for the bad one. In hindsight I wish I recorded everything.

    Thought I’d share my experience with app👍

  8. This would have made the experimental setup for my thesis SO much easier…

    I had to use some really jank apps to capture raw accelerometer data, then manually exfiltrate the SVG files..uugh.
    Oh, and Google was kind enough to delist the jank app and blacklist it halfway through the experiment, which meant I had to scramble to get a dev phone set up andan even more jank app running to finish it…

    Note: that project was to see if I could extrapolate keyboard input, using only accelerometer data from a compromised phone sitting on the same desk as the keyboard/laptop.
    Basically, can accelerometer data from a phone capture passwords.
    I had ~65% accuracy, which isn’t great. But that was in 2013, and phones have WAY better/more sensors now. Fortunately they also have better security models…usually.

    Note2: at the time we already knew that you could get better than 90% accuracy by using the microphone. That is one of the reasons that Google/Apple panicked and locked out microphone access to any random 3rd party app. They ignored the privacy aspect for a LONG time and didn’t act until it was a big security problem.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.