Let’s talk IoT
Open Source Hardware, Maker Movement in Asia and The Android Things
GDG DevFests are no ordinary events. They are large, community-run developer events happening around the globe focused on community building and learning about Google’s technologies. DevFest Nairobi is normally a festivity event celebrating Google technologies such as Android, Firebase, Google Cloud Platform, Google Assistant and recently hardware and making. I participated yet again as a speaker contributing to my best area, IoT and I have penned down the contents of my first talk in this post. It covers Open Source Hardware and Android Things (Google IoT).
I also recently went on a trip to Shenzhen and had an incredible experience meeting new people and a whole society of makers offering different expressions of creativity revolving around hardware, electronics, making and new forms of manufacturing and information sharing. I have also shared the experience in “the Maker Movement in Asia” section.
Open Source Hardware
I talked about Open Source Hardware and how it can be expanded to the rest of the Society to improve sharing and collaboration.
Naturally, from childhood, people hate sharing. As with our toys, when building projects, people apply for patents as they don’t want anyone to have any idea how they made them. In contrast, the same people share almost every single details about their personal life in social media.I guided them through the world of patents, how long it really takes copyrights products to appear in the marketplace, and how sharing can truly build profitable, growing companies.
I then took them through the following Copy Left Principles:
1. Providing the plans
2. Allowing modification
3. Being able to be sold
4. Propagating license
With or without a patent, the first three rules are going to happen. Engineers are going to reverse engineer ideas and sell it, projects both simple and complex. Open source hardware follows the first three principles with addition of the fourth. Any future idea of open source projects must be released under the same license.
Maker Movement in Asia
The maker culture is an intersection between DIY ideas with the hacker culture that concentrates on the creation of new devices and experimentation with already existing hardware.
Shenzhen: An ecosystem of living and sharing ideas
Shenzhen is the heart of China’s electronics industry. In this particular city, everything revolves around electronics, tech and building Hardware. It has a complete ecosystem that contains everything needed for all stages of electronics production all in one place. This has turned the city into a staging ground for large high-tech companies, rising startups, and independent innovators from all over the world looking to get their stuff made as efficiently as possible.
In this city, most Software & Hardware become Open source and Patents and Copyrights are not important. Despite this, they still make something new, and earn from it.
This is possible because the innovation speed is so fast that, before an idea can be copied, it was already surpassed by the developer. Innovation cycles in Shenzhen have reached such a fast pace that traditional protection of intellectual property becomes irrelevant. Most of the profit with an innovation is made before it can be copied. In some cases, an innovation developed is copied by another entrepreneur, improved, and then copied back by the original developer.
Faces behind the movement
David Li
David Li is the co-founder of several maker related organizations in China including XinCheJian, first makerspace in China, Hacked Matter, a research hub focusing on the global maker movement and its relationship to China, then Maker Collider, a makerspace accelerator sponsored by Intel and Shenzhen Open Innovation Lab, a hub to Shenzhen supported by Shenzhen government.
Eric Pan
Eric Pan is a former Intel employee who came to Shenzhen to start his own company, SEEED studio. It sells open-source hardware products to Makers and others, and also provides manufacturing services to companies. Pan also opened Shenzhen’s first MakerSpace.
Andrew “Bunnie” Huang
Andrew is a Maker and Hacker, who holds a Ph.D in electrical engineering from MIT.
He has shaped the fields of hacking and hardware, from his cult-classic book Hacking the Xbox to the open-source laptop Novena and his mentorship of various hardware startups and developers.
He also sued the US government over the anti-hacking provisions of the DMCA.
Time to Copy China?
Is it time to copy China? Can the same energy go to solving the world’s problems, in tech, biotech and beyond? It could — or at least it might, with the right incentives, the right supporting environment. The Maker Movement might help.
The Maker Movement has the potential to turn more and more people into makers instead of just consumers, and when you give makers the right tools and inspiration, they have the potential to change the world.
Shenzhen certainly teaches us a lesson on innovation and intellectual property: maybe the idea that a single person or company in the entire world holds exclusive rights to an idea — such as Apple holds right to the rectangle with curved edges phone — isn’t exactly the best and only way of fostering innovation. Opening up the opportunity to the sharing of ideas and knowledge — especially in developing countries without proper means of accessing knowledge and resources — and drifting away from notions of protection originated in the 19th century may be more successful in achieving a democratic and nonmercantilist dissemination of knowledge.
Android Things
Android Things is an extension of the Android platform for IoT and embedded devices. It joins the family of Mobile, Wear, TV, and Auto to bring Android to new form factors.It makes developing connected embedded devices easy by providing the same Android development tools, best-in-class Android framework, and Google APIs that make developers successful on mobile.
Target IoT Applications
Android Things is ideal for powerful devices with intelligence at the edge that need to securely connect to cloud services. Good examples are devices that locally aggregate data from multiple sensors or other edge devices for further processing or display.
Other ideal applications are those that require image or audio processing at the edge, and upload the collected or processed information to a cloud service for analytics or machine learning.
Democratize Hardware
Android Things is initiative to democratize Hardware development so that anyone who can build an app can build a device.
Hardware is Hard. In Electrical Engineering there are High Speed Electronics and Low speed Electronics. High Speed Electronics requires really skilled design people who knows how to design things at about 1Gig and there are a lot of design rules that will have to take place. Low Speed Electronics are the things we can solder at home. High-speed electronics are complicated to build as you have to ensure that dense packaging, impedance matching requirements and noise/interference considerations are met.
Android Things is using an approach where all the Hard stuff and high speed electronics are put in the small module called SoM. A SOM is basically a tiny board that has a CPU, Memory and Connectivity on a single board.
The SoM is attached to a larger breakout board during prototyping and development to connect I/O. You plug them into you board to test them but you can have your own customer board to test them.
When moving into production, the breakout board is replaced with a board customized for the application. This reduces costs and simplifies hardware development because the complex hardware design is encapsulated in the SoM. Carrier boards with low-speed I/O are much less expensive to produce in low volumes.
Apart from SoM, Google also provides a Board Support Package (BSP). The BSP creates a stable layer that developer apps can rely on. This layer of separation makes your code portable to other supported hardware platforms if the needs of your design change.
Easy and Secure Deployment
When you upload your images to the developer console, those images are signed by Google and verified on the device to ensure that those images haven’t been tampered with or corrupted in anyway so that we know for certain that the software that we push to those devices are authentic.
Rollback protection is also provided by the A/B update mechanism, which guarantees the system always boots into a known good state. It allows us to roll back updates when we have a problem. It happens in the secondary partitions that are not active. This means that when applying updates to the device, the device has no downtime during the process. It happens silently in the background. To apply the new update, the device has to reboot the device and select the new partition. If some reason the update has a bug in it and the system is not able to properly boot, it will automatically roll back to the working partition therefore the device is always booting into a known good state.
Devices also receive security updates to devices automatically, even if the device manufacturer doesn’t provide an updated image or abandons the device.
Android Things Console
One of the hardest problem to solve in IoT is not necessarily what platform do you chose and how do you build your application. It is that once these devices and products are shipped out to consumers and end users, how do you manage them, how do you ship updates and software to these devices after you lose control of the device physically.
Console ensures that you can maintain and manage the software in all of your devices both in the factory and once they get to the consumers. You can choose your hardware platform, configure services for your device, then upload your apps and drivers. The console generates Google-signed factory images for you to flash locally for development or push to connected devices over the air (OTA).
Connectivity Options
In the developer preview, Android Things Support Wifi, Bluetooth and they are going to bring NFC later this year.
Apart from that, Qualcomm announced that they are going to support Android Things in their snapdragon 210 processor that has modem capability.
Snapdragon 210 processors running Android Things OS will allow manufactures and developers to harness the power of the Google Cloud Platform and Google services over 4G LTE in their IoT solutions.
It will support Google Cast for Audio and Google Drive, letting developers create gadgets that stream audio from users’ cloud storage. This unlocks a variety of really exciting use cases.
Develop with the Power of Android
In Android Things, as a developer, you have full access to Android SDK and all of the rich APIs that are in mobile development today. These are things like Multimedia and Camera API.
You also get access to Android Studio and developer tools. Android Studio is Google developer IDE that is fully featured with system profilers and debuggers and they are bringing this to IoT Ecosystem as well.
Things Support Library
In many cases, Android Things applications can use Peripheral I/O interfaces directly. For enhanced system integration, developers can bind supported peripheral types to the framework using user space drivers. This allows applications to interface with these peripherals through the standard Android framework managers and callbacks.
The Peripheral I/O API
This is part of the Android things support Library. It provides new APIs that allow the applications that you build to interface directly with low level peripheral using industry standard protocols. It enable your application and code to be able to interact with a number of peripherals like GPIO, PWM, IC2 among others and with time they will be able to support Barcode readers, Printers and RFID Reads.
Google also provides drivers for many common peripherals through the Peripheral Driver Library. This library contains pre-written drivers for developers to include directly in their projects. The driver artifacts are hosted on JCenter and the source code is available on GitHub. Google accepts suggestions for new drivers through the IoT Developers Google+ Community.
Google Play Services
Android Things enable you to leverage a wide range of Google services, including Google Play services. Google Play Services gives you access to things like Mobile Vision API, to enable you to identify people in an Image, faces, and their expression, Nearby API — which allows you to when you have devices near each other allow them to interact with each other, Cast API- from your Android Things Device cast to a device somewhere else, Location Services that enable you to query things near you device, Google Fit — Which allows you to attach sensors and accelerometers to your device and then visualize this data in interesting ways.
Then we have Firebase which a great match for IoT as we have things like real-time data base and firebase Cloud Messaging. Firebase has an amazing applications and services that are useful for IoT such as Real time database which makes it easier to synchronize the state of various devices across mobile app and between IoT Devices.
Google Assistant
The Google Assistant enables users to get things done with the power of conversation. Google provides a simple conversation api to give you raw string from the user which you can use to generate replies.
Google Assistant supports both texts and voice based audio inputs and outputs. You can build Smart Home apps that let users control IoT devices through the Google Assistant. Building Smart Home apps lets you connect, query, and control devices through your existing cloud infrastructure.
Android Things + TensorFlow
Google is making deep investments in Android Things. They have added TensorFlow support for Android Things. This makes the platform extraordinary as it allow you to be able to use machine learning locally and offline which is incredibly useful. It will enable you to add intelligence on your product with on device processing.
TensorFlow is an open source software library for numerical computation using data flow graphs.
Why have TensorFlow on board?
Latency — You want a very quick response time
Bandwidth –
Intermediate Connection — You connectivity might be reliable
Real time Applications -
Android Things Examples
Google Partnered with Hackster to showcase you projects and get inspired by what others are doing. Here some of the projects:
- Edison Candle
The Edison Candle is an example of building a production device using a System-on-Module (SoM) running Android Things. It drives a couple of LEDs in a soothing flicker pattern using Pulse Width Modulation (PWM).
2. Electricity Monitor
Electricity Monitor uses a Raspberry Pi 3 running Android Things and Firebase Real time Database to monitor the electricity in the house.
3. Piano Hero
Piano Hero helps you learn how to play the piano with a MIDI keyboard and Android Things. It includes your favorite nursery rhymes and Disney songs.
3. AI Candy Dispenser
A candy dispenser is running Android Things and exchanges photos for candies. The device ask the user for a specific thing like a Bird, Dog or Cat and the user should show a photo of that thing in the predefined time to win candies. It uses computer vision to classify these image.
What’s Next?
Join the IoT developers’ community where thousands of people are already asking questions, sharing their ideas, sharing their prototypes and getting feedback! Below are the link to some of the communities:
a. Google’s IoT Developers Community: https://g.co/iotdev
b. Hackster.io Community: https://hackster.io/google
The huge advantage of Android Things is to have the diverse and vibrant Android community behind it. If someone has been able to build an app, they can be able to build a device.