What are possible ways to communicate between two microcontrollers?
Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems. In the context of the internet of things, microcontrollers are an economical and popular means of data collection, sensing and actuating the physical world as edge devices.
Communication between two micro controllers can be possible using wired and wireless protocols.they are given in below table
|Parallel port||Bluetooth SPP|
The Parallel port is another data interface that was very popular on computers, but is widely being replaced by USB. Parallel ports are often referred to as printer ports or centronics ports. Over the years there have been many different standards and revisions of the parallel type port. The standard that is most common at this point is the IEEE-1284 standard.
I²C (Inter-Integrated Circuit):
I²C (Inter-Integrated Circuit), pronounced I-squared-C, is a synchronous, multi-master, multi-slave, packet switched, single-ended, serialcomputer bus invented in 1982 by Philips Semiconductor (now NXP Semiconductors). It is widely used for attaching lower-speed peripheral ICs to processors and microcontrollers in short-distance, intra-board communication .
SPI (Serial Peripheral Interface):
SPI devices communicate in full duplex mode using a master-slave architecture with a single master. The master device originates the frame for reading and writing. Multiple slave-devices are supported through selection with individual slave select (SS) (sometimes called chip select (CS)) lines
A universal asynchronous receiver-transmitter is a computer hardware device for asynchronous serial communication in which the data format and transmission speeds are configurable. The electric signaling levels and methods are handled by a driver circuit external to the UART. A UART is usually an individual (or part of an) integrated circuit (IC) used for serial communications over a computer or peripheral device serial port. One or more UART peripherals are commonly integrated in microcontroller chips .
USB (Universal Serial Bus):
USB was designed to standardize the connection of peripherals like keyboards, pointing devices, digital still and video cameras, printers, portable media players, disk drives and network adapters to personal computers, both to communicate and to supply electric power. It has largely replaced interfaces such as serial ports and parallel ports, and has become commonplace on a wide range of devices.
A Controller Area Network (CAN bus) is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each other in applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but is also used in many other contexts.
LIN (replacement for CAN):
LIN (Local Interconnect Network) is a serialnetwork protocol used for communication between components in vehicles. The need for a cheap serial network arose as the technologies and the facilities implemented in the car grew, while the CAN bus was too expensive to implement for every component in the car.
Ethernet is a family of computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN).It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3, and has since retained a good deal of backward compatibility and been refined to support higher bit rates and longer link distances. Over time, Ethernet has largely replaced competing wired LAN technologies such as Token Ring, FDDI and ARCNET.
Of these , Ethernet(CSMA-CD) is the fastest, with USB 3.0 next. However most microcontrollers only support USB 2.0 .
Bluetooth SPP (Serial Port Profile), wireless version of UART
This profile is based on ETSI 07.10 and the RFCOMM protocol. It emulates a serial cable to provide a simple substitute for existing RS-232, including the familiar control signals. It is the basis for DUN, FAX, HSP and AVRCP. SPP maximum payload capacity is 128 bytes.
BLE (Bluetooth Low Energy):
Bluetooth Low Energy (Bluetooth LE, colloquially BLE, formerly marketed as Bluetooth Smart) is a wireless personal area network technology designed and marketed by the Bluetooth Special Interest Group (Bluetooth SIG) aimed at novel applications in the healthcare, fitness, beacons,security, and home entertainment industries. Compared to Classic Bluetooth, Bluetooth Low Energy is intended to provide considerably reduced power consumption and cost while maintaining a similar communication range.
Wi-Fi is a family of radio technologies that is commonly used for the wireless local area networking (WLAN) of devices which is based around the IEEE 802.11 family of standards. Wi‑Fi is a trademark of the Wi-Fi Alliance, which restricts the use of the term Wi-Fi Certified to products that successfully complete interoperability certification testing. Wi-Fi uses multiple parts of the IEEE 802protocol family and is designed to seamlessly interwork with its wired sister protocol Ethernet.
ISM (Industrial, Scientific and Medical band radio):
The ISM bands are defined by the ITU Radio Regulations (article 5) in footnotes 5.138, 5.150, and 5.280 of the Radio Regulations. Individual countries’ use of the bands designated in these sections may differ due to variations in national radio regulations. Because communication devices using the ISM bands must tolerate any interference from ISM equipment, unlicensed operations are typically permitted to use these bands, since unlicensed operation typically needs to be tolerant of interference from other devices anyway.
Zigbee is an IEEE 802.15.4-based specification for a suite of high-level communication protocols used to create personal area networks with small, low-power digital radios, such as for home automation, medical device data collection, and other low-power low-bandwidth needs, designed for small scale projects which need wireless connection. Hence, Zigbee is a low-power, low data rate, and close proximity (i.e., personal area) wireless ad hoc network.
ANT (Adaptive Network Topology) is a proprietary (but open access) multicastwireless sensor network technology designed and marketed by ANT Wireless (a division of Garmin Canada (formerly Dynastream Innovations), a wholly owned subsidiary of Garmin). It defines a wireless communications protocol stack that enables hardware operating in the 2.4 GHzISM band to communicate by establishing standard rules for co-existence, data representation, signalling, authentication, and error detection. It is conceptually similar to Bluetooth low energy, but is oriented towards usage with sensors.
Cellular Networks :
A cellular network or mobile network is a communication network where the last link is wireless. The network is distributed over land areas called cells, each served by at least one fixed-location transceiver, but more normally three cell sites or base transceiver stations. These base stations provide the cell with the network coverage which can be used for transmission of voice, data, and other types of content. A cell typically uses a different set of frequencies from neighbouring cells, to avoid interference and provide guaranteed service quality within each cell.
Of the wireless choices, Wi-Fi (CSMA-CA) provides highest speed.
Check our 100+ projects compilation with Raspberry Pi Here.