In this article, we’ll review an example of a complete IoT system based loosely on the system our team recently deployed. If you’re new to IoT, you may wish to first read my “How IoT Works” article here.

Image by Nilesh Soni

In the above image, you can see that our example system has multiple PLCs, which in our facility are Allen-Bradley ControlLogix controllers.

While our system uses PLCs, other devices can be integrated as well, including weighing machine, CNC’s, etc.

Each device is then connected to a Raspberry Pi 3b+ Microcomputer, and in our example the PLC’s are connected using standard Ethernet.

To facilitate the communications from the Raspberry Pi’s to our A-B PLCs, we’ve installed Node-Red server software with PCCC drivers which allow the Pi computers to read and write data to or from each of our A-B PLCs.

Note this is the same configuration I detailed in my previous two articles, “How To Connect IoT Devices To A-B PLCs With No Programming Knowledge” and “Getting A-B PLC Data Into A Raspberry Pi using Node-Red and PCCC.”

From there, data is fed into a MQTT publisher node, which then transfers data over the Internet to a MQTT receiver, which in our example is a Node-Red server installed on an “AWS EC2” instance.

AWS EC2 stands for “Amazon Web Services Elastic Compute Cloud,” and is basically a secure and scale-able web server.

The Node-Red server on the EC2 instance also provides graphical tools which we used to develop a user interface for the end users of our IoT application.

Image by Nilesh Soni

These tools include objects like gauges, graphs, buttons, forms, sliders, pie charts, and bar charts, and are designed to allow the development of the graphical interface without any prior programming knowledge.

From the AWS EC2 instance, the data is then sent to an AWS IoT cloud service where it can be stored and analyzed. This is also where events and triggers can be configured to perform different operations, including writing date back to the control system when user defined conditions are met.

AWS IoT cloud services can also communicate with other AWS services, including:

  • AWS RDS used to store data in a database
  • AWS SNS used to send an emergency notifications via SMS and or email.
  • AWS Lambda used to run lambda functions when incoming data meets defined conditions.


In this article, we laid the groundwork for future articles by reviewing a complete IoT system architecture.

Now in my upcoming articles, I going into details about the steps needed to setup MQTT to transfer data from a Raspberry Pi to AWS EC2 server instance, including:

  • AWS EC2 instance setup
  • Install node-red server on an EC2 instance
  • Registering a “Thing” on AWS IoT Core
  • Configuring MQTT nodes on Raspberry Pis and AWS EC2s Node-Red Servers.

Written by Nilesh Soni
Provider of custom ERP solutions and Freelance Writer
Edited by Shawn Tierney

Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at

Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.

Nilesh Soni


  1. Thanks for the article. I’m just wondering why you need the EC2 Node Red server as MQTT Broker, couldn’t you just use AWS IoT as the broker? Is it just an easy way to get a real-time UI?


Please enter your comment!
Please enter your name here