The story of how temperature and humidity sensors made it into the Samsung Galaxy S4

When we first heard that the Galaxy S4 would include both humidity and temperature sensors we were pleasantly surprised. We’d heard about a chip that could take temperature and humidity readings at the trade show Mobile World Congress, but had no idea that it was so close to being built into phones. Since we’re big fans of sensors at OpenSignal, we were rooting for someone – anyone – to put that chip in a phone, but would never have guessed that it would first appear in the S4 – Samsung’s flagship phone. The technology seemed too new & geeky to see first light in such a mainstream device.

Last week I got some of the backstory on how this came about from Sensirion, the Switzerland based company that produces the very same SHTC1 chip in the S4. It’s a fascinating tale that reveals a lot about the relationship between Google and device manufacturers. To me, it illustrates why Android is such a brilliant platform for encouraging innovation.

After we launched WeatherSignal, one of the first apps to make use of the S4′s hygrometer and thermometer, we were contacted by the folks at Sensirion. Not long after the first Twitter DM, I found myself on a skype call with Dominic Boeni getting the first hand account of the years of work which made WeatherSignal – and other thermometry apps – possible. Dominic is currently developer advocate at Sensirion, however he was previously mobile marketing manager and played an instrumental role in getting the SHTC1 into the Galaxy S4.

Sensirion had first put a temperature and humidity sensors into a phone in 2009, a niche device made by Lenovo. The first high end device to sport it was the F-01C on Docomo in Japan; water-resistant and with a 13.2 megapixel camera it was pretty advanced for 2010. This was Sensirion testing both the market and the technology: neither of these phones had a global release and both were feature phones – capabilities of the chip were not made available to developers. Getting the chip into Android represented the next big step.

It began with a chicken. Or was it an egg?

Dominic described Sensirion as having “a chicken and egg problem” with getting the chip into Android phones. If the manufacturers could be convinced to include the hardware then Google would create the APIs, but why would Google create the APIs when no Android phones had hardware that supported temperature readings?

The solution to this age-old problem turned out to be ‘produce the chicken from thin air’, instead of waiting for Google to write the APIs. Sensirion wrote the support for the sensors themselves and submitted the code to the Android Open Source Project.

Let’s go over that: Sensirion, not Google, first wrote the code to incorporate the temperature and humidity sensors into Android. When we think of Android as Open Source, we think of the branching of the codebase (a form of fragmentation) due to manufacturers creating custom flavours, having different skins or additional APIs. It’s easy to forget you can also submit code to become part of core, vanilla, Android.

Sensirion had written the code and submitted it, but before it could become a part of Android they needed an Android team member to merge it. This can happen organically but, to give it a kick, Dominic contacted Google through his contacts. This contact saw the utility of these sensors and championed their inclusion into ICS.

Since the Japanese market already had phones using these sensors, it was natural that it would be Japanese smartphones that would first include them. Not long after ICS rolled out, the Fujitsu Arrows Z ISW13F and T-02D were released using the chip. This was a step forward, the chip was in smartphones, but as a developer, I’m not going to build an app if it relies on technology only available in one market. For the technology to take off it needed global distribution.

The presence of the APIs was like a challenge to OEMs: to offer developers the fullest access to Android’s potential, they needed to add hardware. It was Samsung took up that challenge when in May 2013 they released the Galaxy S4, the first global smartphone having temperature and humidity sensors.

The SHTC1 chip and some ideas for how to use it.

The SHTC1 chip and some ideas for how to use it.

The role of Android

There are some simplifications in this story. Perhaps most notably, I’ve left out all of Sensirion’s thoughts on the wealth of technology that can be built on top of their sensors, which were key in persuading Google that the proposed APIs added real value, and in convincing Samsung to incorporate the requisite hardware into the S4. That is a huge topic, and I’m leaving it for a follow up post. What I hope this account does give is a glimpse into the reality of Android’s role as the ideal platform on which device manufacturers and component manufacturers can come together to offer the richest set of APIs.

Sensirion knew it was possible to make a chip that had the right profile (size, voltage, power consumption) that would allow it to support new features on mobile phones. Android’s Open Source project then offered a way to get that sensor into phones, which lead to manufacturers like Samsung putting that technology into our hands. While this must happen all the time, to me it’s industrialised magic.

This entry was posted in Sensors, WeatherSignal. Bookmark the permalink.

4 Responses to The story of how temperature and humidity sensors made it into the Samsung Galaxy S4

  1. Colibri says:

    The story is interesting.
    However there are in fact *several* devices on the market that can technically measure temperature — not only the S4.
    I’m talking of phones with a barometer: their pressure sensor chip is (always?) equipped with a internal temperature sensor (to improve accuracy).
    Checkout for instance the technical documentation of the Bosch BMP085 / BMP180 or MEAS MS5611 chip.
    It is only up to phone manufacturers and Google to expose the information from this temperature sensor.
    Like for the Sensirion’s case, maybe someone at Bosch should go and try convincing them to fully use the capabilities of their chips.

    • James says:

      Really interesting information Colibri, thanks for sharing – it would be great if this information got exposed, and even if it disagreed with the Sensirion readings (since they do a lot of work to correct the raw readings) it would certainly be useful. Also Google exposes the sensor vendor information through APIs, so readings taken on one type of thermometer could be distinguished from those taken on another.

  2. Pingback: The iPhone 5S just brought us closer to the internet of things and a world of constant surveillance – Quartz

  3. Pingback: The iPhone 5S just brought us closer to the internet of things and a world of … – Quartz | News Supply Daily

Leave a Reply