Digital Twinning

Digital Twin
Digital Twin

My favorite aspect of IoT work is the diverse skills, abilities, technologies and creativity it requires. A close second is that fact that it straddles the digital and analog worlds by design.

In this series I plan to share how I set up a digital twin platform using a collection of mostly free, open-source tools and assets. A Digital Twin is a concept that grew out of IoT which describes a unique quality that emerges when a smart device shares telemetry and other data with a remote application running on a computer/tablet/phone in near-real-time.

The platform consists of EdgeX Foundry, the MQTT protocol, UIFlow/Python, React, Docker and Blender 3D, and a few other tools. The key takeaway is that the result is that the result is much more than the sum of the parts used.

IoT device

I started out thinking Raspberry Pi but these are currently hard to come by. I briefly considered using an old Android phone, but I wanted to mine the rich maker community that comes with a purpose-built device. And I wanted a variety of sensors and protocols to play with.

M5Stack Core 2
M5Stack Core 2

The M5 Stack supports a variety of micro programming languages and common IoT protocols. It also comes with many sensors on board, a touchscreen, Wifi, Bluetooth, and USB and is rechargeable.

The included motion processor expansion board would be key to creating a very responsive demo. All I would need to do is pick up the device and wave it around to get some data to work with. The default app pre-installed on the unit already showed a 3D cube that reflected the orientation of the device in real time.

Another nice feature of the Stack is that it comes with multiple development environments. I was able to get to “Hello World” pretty quickly after I learned about loading (burning) a runtime environment onto the device in order to run my program. This allows the firmware to interact with the development IDE and interpret the code over Wifi or USB.

Not everything was perfect with the Stack, and I will get into some of the challenges I faced using the device.

Next: Use UIFlow / Python to program the Stack.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha loading...

This site uses Akismet to reduce spam. Learn how your comment data is processed.