The Internet of Things (IoT) is transforming every aspect of daily life and business. The first challenge during the development of the Internet of Things (IoT) is how to connect devices to the cloud.
IoT Development Practices: How to Migrate Devices to the Cloud
This article considers an intelligent washing machine as an example to demonstrate the implementation of key functions, including data collection, preprocessing, encryption, and transmission to the cloud. Let’s take a quick look at the core components involved in implementing these functions.
A sensor is a detecting device that senses the measured information and converts the information into electrical signals or other required forms based on certain rules, meeting the requirements for information transmission, processing, storage, display, recording, and control. This article mentions the sensors such a temperature and water level sensors.
2) Wireless Communication Module
The wireless communication module is widely used in various fields such as vehicle surveillance, remote control, telemetry, small radio networks, wireless meter reading, access control, cell paging, industrial data acquisition, wireless tagging, identification, contactless RF smart cards, small wireless data terminals, fireproofing, wireless remote control, biosignal acquisition, hydrometeorological monitoring, robot control, RS-232 communication, RS-485/422 communication, digital audio, and digital image transmission.
3) Microcontroller Unit (MCU)
The MCU scales down the frequency and specifications of the CPU, and integrates peripheral interfaces such as the memory, counter, USB, A/D conversion, UART, PLC, and DMA interfaces and even the LCD driver circuits on a single chip, building a chip-level computer to provide control in different applications.
Now, let’s understand the different ways to connect the intelligent washing machine to the cloud.
- Method 1
Currently, most communication modules on the market only reveal AT commands of the TCP/IP protocol stack. Therefore, after processing the data from sensors, terminal applications additionally need to implement application protocols such as MQTT, CoAP, LwM2M, and HTTPS as well as IoT platform access logic.
- Method 2
In recent years, IoT-oriented communication module vendors have implemented application protocols such as MQTT, CoAP, LwM2M, and HTTPS as well as the capability of accessing the IoT platform through TCP/IP, which is exposed to the MCU by using AT commands. This method is more friendly to terminal application development. For migrating data to the cloud, the MCU only sends the data from sensors to the communication module.
- Method 3
For hardware devices running on operating systems such as FreeROTS, AliOS Things, Android, Android Things, and LiteOS, the operating systems screen the commands interacting with the communication module as well as the application protocols. To migrate data to the cloud, application programs only need to implement IoT platform access logic.
- Method 4
If a device supports only local area network communication through the protocols such as Wi-Fi, BLE, ZigBee, and LoRa, the device must be connected to a local gateway and then access the cloud through the agent. In this case, the gateway must be able to implement application protocols and IoT platform access logic.
The IoT platform plays a critical role in transmitting data to the cloud and this article gives a walkthrough of the Internet of Things (IoT) development practices. Using an example of an intelligent washing machine, the article explains the core modules and methods to implement key functions such as data collection, preprocessing, encryption, and transmission to the cloud.