Getting ready for production with Android Things

Posted on Posted in Uncategorized

Since the first developer release in December 2016, Android Things has been moving forward rapidly with various improvements. While there are still people wondering why we should start building IoT project with Android Things, we believe that it’s time to get ready for production with this emerging platform. Because building an OS is hard, you shouldn’t reinvent the wheel and it’s definitely better to stand on the shoulders of giants and focus on your need.

This article recapitulates some important announcement on Android Things from this year’s I/O and tries to give you a more concrete idea of where we currently stand with this platform.

Android Things: state of the art

Let’s recall the challenges that Android Things aims to tackle:

  • Software: provide consistent developer experience such as provisioning, management console & advanced API
  • Hardware: reduce the device cost and building cycle, scale to mass production
  • Security: deliver good security solution to the large scale & diverse devices

As an IoT platform, Android Things leverages the power of Android ecosystem and other Google’s products, we are talking about products such as:

  • Google Play Services: Mobile Vision API, Location service, Firebase etc…
  • TensorFlow: especially TensorFlow Lite, which will add more intelligence to the device
  • Google Cloud platform: Cloud IoT Core (currently in private beta)
  • Google Assistant

(source: Android developer portail)

Any software developer who is familiar with the Android Framework can start building IoT solutions right away. As for hardware developers, they can focus on building the baseboard specific to their IoT product thanks to the SoM (System on Module) design of Android Things.

On top of all, security is included with Android Things from the ground up. OS hardening, updates, verified boot, hardware-backed keys and attestation are all built-in security features. At the same time, company such as Qualcomm announced their support for Android Things OS on 4G LTE processors which will fundamentally facilitate the connectivity issue on IoT devices.

What we learned from this year’s I/O?

During the I/O, we also learned the new features that are going to be released in the next previews.

As for the Developer Preview 5:

  • New version based on Android O
  • Support of GPIO Pin Muxing
  • Developer Console with OTA support

Later this year:

  • GMSCore for IoT
  • Smart setup
  • NFC support
  • Additional SoMs

When in doubt, try it out

The huge advantage of Android Things is to have the diverse and vibrant Android community behind it. Instead of hiring someone who possesses knowledges on microcontrollers & embedded software, an Android developer can take over the job and build the product’s software for you.

As you may know, Kotlin is now a first-class citizen in the Android development. What is better than coding and Android Things application with Kotlin? For example, to make the red LED blink when the A button is pushed (see GIF below, using a Raspberry Pi 3 and a Rainbow Hat), you can check out this gist.

From prototype to production device

The development kits of Android Things mostly (not including Raspberry Pi 3) contain 2 separable parts: the baseboard – the larger carrier board, and the SoM – the smaller module that contains all the capacity of a tiny computer (computing, connectivity, hardware storage…). Because building your own hardware from scratch is hard, the pre-certified Android Things modules make things easier. It spares you from large amount of safety testing, regulatory testing that you have to carry out to obtain the certification, thus drastically reduce the cost. Hardware builders only have to focus on the baseboard design in this case. These Android Things modules are also:

  • Interchangeable: the compatible pins on module allow developers to simply take one module off & install another one on (for example from Edison to NXP), in case there are supply chain or vendor based issue
  • Cost flexible: they are available in different quantities, which is adapted to prototyping cost or mass production cost
  • Supported: Android Things has long term vendors contract which makes sure it would always be supported in the long run

With the previous shared gist, you can see how easy it is to prototype and to validate your idea rapidly. Once you decide to move on to the production phrase, you will need to upgrade the game by designing your own PCB (Printed Circuit Board) with more compact structure. There are 2 types of design files to prepare in order to fabricate your PCB:

  • Schematic: indicating all the component you want to use, how they should be interconnected
  • Layout: showing how the device looks like physically

Tools such as EAGLEAltium, KiCad, fritzing can help you get the job done. Based on the schematic & layout, certain vendor / manufacturer can finish the rest of the job for you. Most of them try to reduce the cost by paneling different PCB design onto the same one to run over the machine. To get one step further, you might want to be familiar with certain type of file format when dealing with PCB vendors / manufacturers who require specific files. Consider design files as the source code of your hardware, generated files such as Gerber, BOM (Bill Of Materials), XYRS are like the compiled code and will be used directly to automate your production process.

(reference: From Prototype to Production Devices with Android Things)

Of course, soldering your own SoM is always an option… (smile)

Obtaining your PCB is only the start, commercialising an IoT product still requires things such as:

  • enclosure
  • packaging and instructions
  • power supply and cables
  • certifications

This part only aims to give you a brief idea on how to move from prototype to production.

Democratizing IoT

Bear in mind that a device built on top on Android Things would be relatively complex and complete, due to the fact that it probably needs to be powered, has various connectivity options and is capable of getting firmware updating regularly. As a result, such OS is not a platform for building all kinds of IoT solutions: in our opinion, it would better serve as a gateway object or a consumer product. Despite of what we just mentioned, Android Things is still a very exciting step forward in the democratization of IoT. Moving ahead, we are expecting to see more and more unified solutions, standardization and basic building blocks. While the tech giants are doing the heavy lifting of the industry, we need to keep innovating, creating new business models, enabling sharing economy and eventually providing power to ordinary citizens.

References: Google I/O ’17 Sessions on Android Things

Here are some videos from this year’s I/O if you want to know more about the platform and its current state.

Bringing Device Production to Everyone With Android Things (Google I/O ’17)

Developing for Android Things Using Android Studio (Google I/O ’17)

Security for IoT on Android Things (Google I/O ’17)

From Prototype to Production Devices with Android Things (Google I/O ’17)

Leave a Reply

Your email address will not be published. Required fields are marked *