Solving the IoT Landing Dilemma - Alibaba Cloud Hardware Access Best Practices
[Copy link]
Ku Wei, general manager of Alibaba Cloud IoT Division, once mentioned the difficulties in the implementation of IoT. For example, at the device manufacturer level: the connection of smart devices is unstable and the network security is poor; at the ISV level: the standards are not unified, the integration of smart devices from different manufacturers is costly and time-consuming, and data is difficult to connect; at the user level: the products are tightly bound, and the services provided are fragmented, resulting in poor user experience.
Mr. Ku always looks at the implementation difficulties of the Internet of Things from the perspective of the entire Internet of Things network link, while I only focus on one link, that is, the hardware access layer. Because it involves the combination of software and hardware, it is a difficult point for many people. In addition, based on the device access layer, we also summarize the following three difficulties in the implementation of the Internet of Things:
(1) There are many types of sensors and smart meters that need to be connected, with various physical communication links and different communication protocols.
(2) Construction site conditions vary greatly, wired and wireless deployments differ greatly, and equipment installation and debugging are difficult
(3) The equipment installation volume is large, and there is a lack of a dedicated maintenance team, so long-term stability and reliability are difficult to guarantee.
Here I will first talk about some sensors, devices, communication links and communication protocols that need to be connected to the hardware layer of the Internet of Things, to clarify the knowledge of netizens who don’t know much about hardware, and then introduce how our solution achieves "one-minute device quick access to the gateway, one-minute gateway quick access to the cloud".
1 Common smart hardware in the field of IoT
1.1 Sensor
The sensors listed in the figure are just a few of them. And the interfaces of the same temperature and humidity sensor can be varied, such as I2C interface, single bus, RS232 or RS485. Different interfaces have different protocols.
1.2 Smart devices
Just like sensors, the smart devices listed in the figure above are just a drop in the bucket among many smart devices. And for example, smart water meters also have various interfaces, such as Mbus or RS485 interfaces, and the protocols may be Modbus or 118 protocols.
1.3 Control device/intelligent gateway
Although control devices and smart gateways are not as numerous as sensors and smart meters, they are still very numerous, and their communication interfaces, programming languages, operating systems, etc. are different.
2 Common communication types in the IoT field
2.1 Wired Communication
l RS485: two-wire system, differential signal transmission, half-duplex communication, maximum communication distance over 1,000 meters.
l RS232: three-wire system, full-duplex communication, generally the communication distance is less than 10 meters.
l Ethernet: 4-wire or 8-wire, multi-master communication, high performance. Ordinary network cable communication distance within 100 meters.
l CAN: two-wire system, multi-master communication, high performance, high reliability, up to 8 bytes of data transmitted each time, communication distance of more than 1,000 meters.
l M-Bus: Two-wire, half-duplex, bus designed specifically for remote meter reading systems, with a transmission speed of 300 to 9600 Baud.
Single bus: single-wire system, the master device port can directly drive the slave device within a range of 200 meters, the transmission rate is generally 16.3 Kbit/s, and the maximum can reach 142 Kbit/s.
l Power line carrier: A technology that uses existing power lines to transmit analog or digital signals at high speed via carrier waves.
2.2 Wireless Communication
l Wifi: 2.4G/5G radio frequency band, the most commonly used wireless communication method for civilian use, with a communication distance of within 100 meters.
l Bluetooth: 2.4G short-range wireless communication, the common communication distance is about 10 meters.
l Zigbee: Low-power wireless communication protocol, low-power generally has a transmission distance of less than 100 meters, and high-power has a transmission distance of about 1000 meters.
LoRa: Ultra-long-distance wireless transmission solution based on spread spectrum technology. Low power consumption, multi-node. Communication distance 1 km to 8 km.
l GPRS: General Packet Radio Service technology, wide area network communication.
l NB-IoT: An emerging technology in the IoT field that supports cellular data connections for low-power devices over wide area networks, also known as Low Power Wide Area Networks (LPWA).
l 433M/470M wireless communication: low-power economical wireless data transmission communication, the communication distance is generally about 1000 meters.
l Digital radio station: A high-performance professional data transmission radio station realized by DSP technology and radio technology. The application-free frequency band is 2.4G, and the communication baud rate is 9600~19200Bps. Depending on the power, the general communication distance is 1km~15km
2.3 Chip-level communication
lTTL serial port: three-wire system, same as RS232 or RS485, all belong to serial communication, but at TTL level, most of them are chip-to-chip, short-distance communication.
l SPI: Four-wire, high-speed full-duplex, synchronous communication bus.
l I2C: Two-wire, a simple, bidirectional synchronous serial bus developed by Philips.
l SDIO: It is a peripheral interface mainly defined for SD card modules. Some wifi modules also use SDIO interface to communicate with MCU.
2.4 Other communication methods
lAnalog signal input: 0~20mA/0~5V/0~20V
l Switch signal input: 0~24V
l Relay signal output: On/off, dry contact
|