Design News is part of the Informa Markets Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

The Steps in Creating a Digital Twin

Digital Twin, PTC, Raspberry Pi, Arduina Blink, note-Red
You can use an open IoT platform to build a digital twin on a Raspberry Pi.

Data visualization is a key element to creating a digital twin. (Image source: PTC-Thingworx)

Artificial intelligence (AI) and machine learning (ML) are making major impacts in the healthcare, advanced manufacturing, agriculture, and consumer electronics vertical markets. The ability to predict behaviors and trends or classify objects based on physical traits is accomplished through AI and ML technologies. With the aid of an Internet of Things (IoT) infrastructure, a digital twin can be created. Developing a digital twin requires the meshing of physical properties with an information communication technology (ICT) framework and software for data visualization. This data visualization represents real world events and characteristics of physical objects and processes. 

A replica of a pump using a digital twin simulation output. (Image source: ANSYS)

The Digital Twin
in the Industrial Process

In an industrial control process, the ability to monitor physical stimuli, such as temperature, pressure, vibration, and force, is important to the product manufacturer. Such physical stimuli affect the feel, function, and look of the manufactured product. To ensure the quality of the product meets the requirements of the customer, a specification is developed. The traditional method of using specifications was based on building a physical prototype for testing and data collection. Continuous building of the target physical prototype to adjust the function of the product is costly and time consuming.

However, the digital twin can address functional concerns through a visual representation of the physical prototype. A digital twin is a virtual replica of the physical prototype. Physical assets are paired with the digital twin based on real time data attainment from a functional unit. The data collection and monitoring of the physical prototype is done by use of electronic sensors. The strategic placement of electronic sensors on the physical prototype is the first step in attaining functional data. This sensor placement will allow the digital twin to monitor and adjust its virtual behavior in real time. The connective interface between the physical prototype and the digital twin is by use of an IoT software platform. 

This Arduino Blink function node was created in JSON. (Image source:

The Role of Node-RED in Visualization

Node-RED is a flow-based visualization programming tool that allows a variety of IoT networking architectures to be developed. The method of developing IoT networks is based on nodes exchanging data through message payloads. These payloads can be configured for digital, analog, and string data types. The nodes are connected using wires that pass data within the IoT’s application network.

If mathematical or conditional operations are required, function nodes can be created within Node-RED as well. Each node has detail information, which explains its feature and function set. Also, debug nodes can be added for validating correct message payloads shared throughout the IoT application network. Scripting languages like Javascript and node.js allow function nodes to be created easily and effectively. Javascript object notation (JSON) is a subset of the Javascript programming language that is a simplistic data-interchange format. JSON can be used to create special functions for enhancing the IoT flow-based application. 

Node-RED Flows allow the building of IoT connected devices to create an Arduino Digital Twin. (Image source: Don Wilcher)

Flows and nodes can be added to the existing Node-RED palette based on community developed libraries. Flows are shared within the community using JSON files. This JSON-based application library allows the rapid development and deployment of the specific IoT application being built for the digital twin.

Using Raspberry Pi with the Digital Twin

Once the specific IoT application has been built, the flow diagrams are ready to be deployed. In constructing the specific IoT application, a digital twin can be created using a variety of dashboard nodes. These nodes can display received real-time data from the physical prototype. Electronic sensors assist in providing the real-time data from the node of the physical prototype. These electronic sensors are wired to an Arduino.

The Raspberry Pi provides the hardwired infrastructure for the physical prototype communicating analog or digital data back to the digital twin. The Arduino communicates data from an attached sensor through a USB based serial connection to the Raspberry Pi. The Node RED application is one of the installed software programming packages on the Raspberry Pi. The deployment of the IoT dashboard nodes can be displayed on a user interface (UI) webpage. The UI-based dashboard can be viewed on any desktop system or mobile device hardwired or wirelessly connected to the Internet.

Additional details on Node-RED can be found at their website. The PTC website provides information on the digital twin platform.

This Arduino digital twin was created on a Raspberry Pi using Node RED. (Image source: Don Wilcher)

Don Wilcher is a passionate teacher of electronics technology and an electrical engineer with 26 years of industrial experience. He’s worked on industrial robotics systems, automotive electronic modules/systems, and embedded wireless controls for small consumer appliances. He’s also a book author, writing DIY project books on electronics and robotics technologies.

Pacific Design and ManufacturingSAVE THE DATE FOR PACIFIC DESIGN & MANUFACTURING 2019!    
Pacific Design & Manufacturing, North America’s premier conference that connects you with thousands of professionals across the advanced design & manufacturing spectrum, will be back at the Anaheim Convention Center February 5-7, 2019! Don’t miss your chance to connect and share your expertise with industry peers during this can't-miss event. Click here to pre-register for the event today!
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.