Reader small image

You're reading from  Arduino Data Communications

Product typeBook
Published inNov 2023
PublisherPackt
ISBN-139781837632619
Edition1st Edition
Right arrow
Author (1)
Robert Thas John
Robert Thas John
author image
Robert Thas John

Robert Thas John is a data engineer with a career that spans two decades. He manages a team of data engineers, analysts, and machine learning engineers – roles that he has held in the past. He leads a number of efforts aimed at increasing the adoption of machine learning on embedded devices through various programs from Google Developers and ARM Ltd, which licenses the chips found in Arduinos and other microcontrollers. He started his career as a software engineer with work that has spanned various industries. His first experience with embedded systems was in programming payment terminals.
Read more about Robert Thas John

Right arrow

Managing Communication with RS-485

In the previous chapters, we learned how to communicate using various wireless technologies and hardware. However, there are times when communicating over wireless isn’t suitable because it would cause interference with critical hardware in the vicinity. In this chapter, we will learn about a communication technology that isn’t wireless and is popular in industrial settings.

In this chapter, we’re going to cover the following main topics:

  • Introducing RS-485
  • Introducing Modbus
  • Communicating using RS-485 hardware

Let’s consider what we will need to complete the projects in this chapter.

Technical requirements

You will need the following items to complete the exercises in this chapter:

  • MKR WiFi 1010
  • MKR 485 Shield
  • MKR ENV Shield
  • Jumper wires

The code snippets for this chapter are available in this book’s GitHub repository: https://github.com/PacktPublishing/Arduino-Data-Communications/tree/main/chapter-11.

Introducing RS-485

RS-485 is a standard for serial communication that allows multiple devices to communicate on the same bus. It is a differential voltage signaling standard, which means that it uses two wires to transmit data. This makes it less susceptible to noise than other serial communication standards, such as RS-232.

RS-485 is a half-duplex communication method, so, as such, only one device can transmit at a time. You can still use it to create a multi-drop network where multiple devices can share the same bus. You can utilize it in the following settings:

  • Industrial automation: RS-485 is used in industrial automation and control systems to communicate between devices such as Programmable Logic Controllers (PLCs), sensors, and actuators
  • Building automation: RS-485 is used to control Humidity Ventilation and Air Conditioning (HVAC) systems, as well as lights, security, and access control
  • Medical equipment: RS-485 is used to communicate between devices such...

Introducing Modbus

Modbus was designed for use with PLCs by Schneider Electric, at that time the PLCs were manufactured by a company called Modicon. Modbus is commonly used for communications between industrial electronic devices, often transmitting data sensors, instrumentation, and control devices back to a main controller. It is royalty-free and published openly. Compared to other standards for industrial communication, Modbus is easy to deploy and maintain. It also places a few restrictions on the format of the data to be transmitted.

Modbus uses character serial communications, Ethernet, or Internet Protocol (IP) as a transport layer. It supports communication to and from multiple devices on the same cable or Ethernet network. Modbus is used in Supervisory Control and Data Acquisition (SCADA) to connect supervisory computers to Remote Terminal Units (RTUs). SCADA is a system of software and hardware that collects and monitors data from remote or field devices and uses that...

Summary

In this chapter, you learned about the RS-485 serial communication standard and Modbus.

In the next chapter, you will learn about some of the security risks that the data you transmit is exposed to and some approaches to mitigating those risks.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Arduino Data Communications
Published in: Nov 2023Publisher: PacktISBN-13: 9781837632619
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Robert Thas John

Robert Thas John is a data engineer with a career that spans two decades. He manages a team of data engineers, analysts, and machine learning engineers – roles that he has held in the past. He leads a number of efforts aimed at increasing the adoption of machine learning on embedded devices through various programs from Google Developers and ARM Ltd, which licenses the chips found in Arduinos and other microcontrollers. He started his career as a software engineer with work that has spanned various industries. His first experience with embedded systems was in programming payment terminals.
Read more about Robert Thas John