In this project, we will demonstrate the use of the Avnet Azure Sphere module for I2C communication, GPIO analog input, OLED Custom Graphic Image Displays, Soft PWM, and cloud based API data retrieval to acquire weather data. We also show how to host the data gathered in the cloud and display it through a custom .Net web app. These exciting capabilities of the Azure Sphere Module will shape the future of industrial optimization. We hope you share our insights as we outline our prediction of the future in our Coke Drum Health Monitoring project below.
We consider this project as an Industry, Innovation and Infrastructure project for the United Nations Sustainable Development Goals initiative. It presents a secure means to utilize AI in the cloud that traditionally is done under single case studies. By enabling Big Data Deep Learning techniques for industry vessel and pipe health monitoring, less integrity failures will occur improving worker safety and lessening the environmental impact of chemical and petroleum plants.
INTRODUCTION: PREDICTING THE FUTUREYears ago, after I felt the world was outgrowing the C programming language and Apple was on the way out, I started teaching myself Java3D to build a chemical plant operator Simulator. I remember the forward in the book talking about the vision of Java being in every appliance. It would unite the world of microwaves, TVs, and cell phones with its bytecode.
Having entered industry a few years before, I was fortunate to see the Chemical, Materials, and Petroleum industries go through three phases of Information Technology: the main frame dumb terminals, the Win95/XP Phase, and now, mobile tech. In the processing plants, I watched the instrumentation and controls go from air (pneumatics), to wires, and now to wireless.
Almost two decades later, we’ve now evolved full circle back to Apple. Due to the concept of a pinchable screen and Bluetooth peripherals, they are winning the PC war - taking computing off the desktop. However, they are still doing so on the back of Microsoft 365, OneDrive Storage, the .Net platform, and Windows Virtualization. Seeing how Microsoft consistently stayed in the game throughout every iteration of tech - and now experiencing the Microsoft Azure Services platform, I can predict the future:
10 Years from Now Microsoft will Run the World
How? Microsoft will infiltrate process control transmitters with the Microsoft Azure chip. And what will run it – ironically, the programming language of C! Talk about full circle! Read on to see how this future will unfold and see a demo project from the year 2030.
THE IMPETUS FOR CHANGESo what drives change in technology for industry? Growth – which is made of these two things:
- The prospect of increased revenue generation
- The prospect of increased margins
Many of the greatest companies drive for core values such as strong safety performance, strong business ethics, and stellar environmental stewardship. However, failing these inhibit growth, but do not drive it. That’s because those values concern how humans behave and improvements of those behaviors are driven by people who work successfully in paper or 90’s IT tech.
However, no Shareholder driven company, or private company for that matter, would ignore revenue growth opportunities to attract investors. If a company isn’t growing, it’s dying – so there is truly one mission - to grow. To do that without asset expansion and additional capital investment takes these two things:
- Optimization
- Reliability
For example, a crude unit going down for just one day would mean at least a 1/2 million dollars in revenue loss. Being able to optimize your operation to get extended days and months between major outages provides several million of growth. In turn, optimization and reliability are the primary keys to growth. In turn, they are the impetus for technology change.
THE TECH THAT WILL DRIVE THE GROWTHWhat first comes to mind is WiFi and Broadband tech. They are changing the Instrumentation and Controls Industry as fast as the pinch screen did (negatively) for the desktop market. I recently demo’d these technologies in my blog Big Petro Maker Magic that can Save you Millions. That was just a few months ago where I showed the cutting edge 2.4GHz WiFi tech that is entering the industry. This tech will grow over the next 10 years for sure based on the low cost of implementation alone.
With it, more and more asset owners are trusting the industrial wireless tech even for their safety interlock systems. This is a necessary step to the future, but again, all WiFi tech is doing, is mirroring the control strategies from the days of pneumatic controllers. Sure, it is easier to install and maintain for those hard working people trying to keep the plant running, but it won’t drive growth. As stated before, growth is found through leaps and bounds in reliability and optimization.
With it, more and more asset owners are trusting the industrial wireless tech even for their safety interlock systems. This is a necessary step to the future, but again, all WiFi tech is doing, is mirroring the control strategies from the days of pneumatic controllers. Sure, it is easier to install and maintain for those hard working people trying to keep the plant running, but it won’t drive growth. As stated before, growth is found through leaps and bounds in reliability and optimization.
So, what technologies will increase revenue and margins and ultimately a company’s growth? It’s the technology that will remove the limitation on automation today. That limitation is – brace yourself - the hard working, local minds you have focused on keeping the plant running. I’m not saying they will be replaced – they just will no longer be the limitation to growth through reliability and optimization improvements.
The technologies that will allow those hard working people to do what they do while reducing Fixed Cost for maintenance and exponentially improving reliability and optimization are these two things:
- Secure Network Communication
- Cloud AI Services
That’s because these technologies deliver optimization and improved reliability that would otherwise take centuries to evolve under the traditional proprietary research model. This is why Microsoft will run the world in 10 years. Industry will target these services above all other strategies. The Microsoft Azure Chip will eliminate all security concerns to do so.
A USE CASE FROM THE YEAR 2030Now that we are in 2030 (from the perspective of this prediction), we now have Microsoft with AI agreements with the other big data and service companies that have the vision to do so. In this example, SAP’s PM module has been feeding Microsoft’s data warehouse for ten years where AI algorithms categorize asset failure codes across of the world and tie them to data acquired by Microsoft Azure Sphere that is embedded within field instrumentation.
In 2030, Big Oil is still a player, of course. Organic Chemistry provides all kinds of great polymers that are going into recyclable materials as well as fueling our LiPo tech that is powering all our cars, lawn mowers, and hedge trimmers. LiPo batteries are using diamond coke from the residual compound on the bottom of the distilling towers for synthetic graphic.
In the Delayed Coker Units, one such asset that is under constant machine learning and predictive AI in the year 2030 are the Coke Drums themselves which produce all that diamond coke. These vessels are based on WWII technology designed to chemically crack the residual heavy hydrocarbons into smaller carbon chains used in more valued products. It proverbially squeezes the blood out of the turnip at 800F, which makes volume – which is what refineries do – increase volume by separating molecular carbon compounds and cracking them into higher volume molecules that give higher profits.
The Delayed Coking process is nearly century old, but is still around because of it runs on a simplistic approach. Fill the drum full of heated material. Sparge it. Collect the goods. Optimization and reliability are the game for growth, so let’s dive in to how we are going to do it on these drums with Microsoft Azure.
The Delayed Coking process is nearly century old, but is still around because of it runs on a simplistic approach. Fill the drum full of heated material. Sparge it. Collect the goods. Optimization and reliability are the game for growth, so let’s dive in to how we are going to do it on these drums with Microsoft Azure.
First, we need to stay running for as long as possible. Each cycle to fill and collect needs to be as fast as possible. The down side is, these vessels are made of 4 inch thick plate. Taking it up and down 800F in a matter of minutes is tough on metal. It can lead to delaminating the inside corrosion inhibiting liner and/or hairline cracks occurring. To monitor how hard we are running it, we look at the age old mechanical engineering interests: stress and strain.
First, we need to stay running for as long as possible. Each cycle to fill and collect needs to be as fast as possible. The down side is, these vessels are made of 4 inch thick plate. Taking it up and down 800F in a matter of minutes is tough on metal. It can lead to delaminating the inside corrosion inhibiting liner and/or hairline cracks occurring. To monitor how hard we are running it, we look at the age old mechanical engineering interests: stress and strain.
Fortunately, in the 1980’s, computer software started taking on Finite Element Analysis (FEA). These are heavy calculations typically by PHDs to predict the stress imposed by temperature changes and variations on materials. FEA uses some pretty cool math to calculate stresses. Even in 2020, computations take days to render results at local engineering firms and cost of $90K a pop. Only a few leaders across the globe consider these one hit studies as a viable approach to optimization.
But now, in 2030, such calculations are possible in near real time by engineering firms that have partnered with Microsoft Machine Learning services. The firms that build Delayed Coking Units provide the services as an optional maintenance agreement.
Process data such as temperature, pressure, and cycle times is recorded at the same time to the cloud. With the data partnerships of the work order system and asset repair history, correlations are made against the strain data and local weather conditions. In turn, maximum optimization of run conditions are derived that will prevent Coke Drum wall cracks, corrosion liner delamination, and disrupted operation. In turn, we have maximum possible reliability and annual product yields.
Process data such as temperature, pressure, and cycle times is recorded at the same time to the cloud. With the data partnerships of the work order system and asset repair history, correlations are made against the strain data and local weather conditions. In turn, maximum optimization of run conditions are derived that will prevent Coke Drum wall cracks, corrosion liner delamination, and disrupted operation. In turn, we have maximum possible reliability and annual product yields.
To prototype this prediction of Coke Drum Health Monitoring IoT AI for the year 2030, we’ll use the cloud services of Microsoft Azure. The portal to the cloud services will be the Avnet Microsoft Azure Sphere Starter Kit. We’ll monitor drum cycle time, drum longitudinal strain, drum circumferential strain, and the drum's vertical growth (it can grow over a foot taller during its cycle). To determine cycle time, we’ll simply measure the ambient air change. Since the drum is operating at 800F, a significant increase in ambient temperature is readily measured using the Avnet Azure Sphere Starter Kit. We’ll also record local weather conditions since cold temperatures are when metal can see the most induced stress from thermal shock.
Now, of course, this is a lab experiment, so our simulated coke drum will be a kettle operating up to 100C. But, the cloud will be the actual Microsoft Azure IoT Hub services.
Bill of MaterialsHere is the Bill of Materials for the prototype:
- Avnet Azure Sphere Starter Kit (1)
- LM2596 DC to DC Buck Converter 3.0-40V to 1.5-35V Power Supply Step Down Module
- 128X64 Pixel OLED (1)
- TFMini LiDar (1)
- Strain Gage, Foil 120 ohm (2)
- Resistance Amplifier (1)
- 3D Printed Case, Custom (1)
- GitHub Design Files and Code Repository: https://github.com/RaisingAwesome/CokeDrumAI
For the prototype, we made a 3D case with Autodesk Fusion 360. Since our 3D printed case isn’t Class I Div II, we must put it inside a NEMA enclosure to prevent any issues with combustible gases that could leak to the ambient air.
For the prototype, we made a 3D case with Autodesk Fusion 360. Since our 3D printed case isn’t Class I Div II, we must put it inside a NEMA enclosure to prevent any issues with combustible gases that could leak to the ambient air.
To make the most of the Avnet Microsoft Azure Sphere's capabilities with our custom design, we made a small protoboard to connect to the MikroE Click circuits. This allowed us to use some pins for GPIO and also tap into the I2C Bus.
To make the most of the Avnet Microsoft Azure Sphere's capabilities with our custom design, we made a small protoboard to connect to the MikroE Click circuits. This allowed us to use some pins for GPIO and also tap into the I2C Bus.
The TFMini, shown below on the right, is used to measure growth of the drum. It simply points to a handrail near the location where we mount our enclosure. As the drum heats up, it will grow upwards and we’ll be able to record that throughout the drum cycle.
The power available is 24V, the industry standard for field transmitters. So, we use a Buck Converter (above on the left) to step the voltage down to 5Vs to power the card. The card has 3.3V rail to power the other components.
With this setup, we now have the hardware base of our IoT strategy for Coke Drum Health Monitoring.can now program the Avnet Microsoft Azure Sphere using Microsoft Visual Studio.
IoT STRATEGYThe IoT strategy is very straight forward. The Avnet Azure Sphere Module takes the data and securely delivers it to a Microsoft Azure IoT hub. From there a custom web application (see Programming) provides a user interface to the data. In addition, alerts and predictive displays are provided based on Finite Element Analysis calculated from the data and derived from work order data correlations.
The code for this project is based on the Avnet Azure Sphere Module Out-of-the-Box Demo (12). Rather than paste it all here, I'll just hit on the added code to support this project and provide a link to my GitHub (13) repository for the full working package.
First, I had to update the app-manifest.json to add to the AllowedConnections so that I could it the weather API. In addition, I added the GPIO pins I would use. You can see this code in the attachments.
Customizing the LogoTo customize the logo, I found an application LCD Assistant that takes a 128x64 image and converts it to the bytes needed to display it on the OLED.
It easily generated by code for the display.
//------------------------------------------------------------------------------ // File generated by LCD Assistant // http://en.radzio.dxp.pl/bitmap_converter/ //------------------------------------------------------------------------------ const unsigned char avnet [] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0xF8, 0x7C, 0x1F, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x20, 0x70, 0x70, 0x70, 0x70, 0x70, 0xF0, 0xF0, 0xF0, 0x70, 0x00, 0x00, 0xE0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xE0, 0x00, 0x00, 0xF0, 0xF0, 0xF0, 0xE0, 0xF0, 0x70, 0xF0, 0xF0, 0xE0, 0x00, 0xC0, 0xE0, 0xE0, 0x70, 0x70, 0x70, 0x70, 0xF0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 0xFE, 0x3F, 0x07, 0x07, 0x07, 0x07, 0x07, 0x1F, 0x7F, 0xFE, 0xE0, 0x00, 0xC0, 0xE0, 0xF0, 0xFC, 0xFE, 0xEF, 0xE7, 0xE1, 0xE0, 0x40, 0x00, 0x00, 0x3F, 0x7F, 0xFF, 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x7F, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x1F, 0x3F, 0x7F, 0xFD, 0xEE, 0xEE, 0xE7, 0xE7, 0xF3, 0x73, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF8, 0x7C, 0xFC, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0xFC, 0xFC, 0xFC, 0x1C, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0xF8, 0xFE, 0xFF, 0xDF, 0xC7, 0xC1, 0xE0, 0xEF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 0x7F, 0x1F, 0x0F, 0x03, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x03, 0x3F, 0x7F, 0xFE, 0xE0, 0x00, 0x00, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x3F, 0x39, 0x38, 0x38, 0x38, 0x38, 0x78, 0xF0, 0xF0, 0xC0, 0x00, 0xF8, 0xFC, 0xFC, 0x38, 0x1C, 0x1C, 0x1C, 0xFC, 0xF8, 0xE0, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x78, 0x3C, 0x1C, 0x1C, 0xFC, 0xFC, 0xF8, 0x00, 0xC0, 0xF0, 0xF8, 0x78, 0x9C, 0x9C, 0xDC, 0xDC, 0xFC, 0xF8, 0x70, 0x00, 0x00, 0xFC, 0xFC, 0xFC, 0x38, 0x3C, 0x1C, 0x7C, 0x7C, 0x78, 0xC0, 0xF0, 0xF8, 0x78, 0x9C, 0x9C, 0xDC, 0xDC, 0xFC, 0xF8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x1E, 0x3E, 0x3C, 0x38, 0x38, 0x38, 0x38, 0x3C, 0x1E, 0x1F, 0x0F, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0x38, 0x38, 0x38, 0x3C, 0x1F, 0x1F, 0x07, 0x00, 0x00, 0x1F, 0x3F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x1F, 0x00, 0x07, 0x0F, 0x1F, 0x3F, 0x3B, 0x3B, 0x39, 0x39, 0x3C, 0x1C, 0x0C, 0x00, 0x00, 0x1F, 0x3F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x1F, 0x3F, 0x3B, 0x3B, 0x39, 0x39, 0x3C, 0x1C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
TFMini LIDAR CommunicationI2C is a great protocol in that it lets you have multiple devices sharing the same two pins. The Avnet Azure Sphere Module has multiple I2C Buses, but I just needed one for the two I2C devices used: the OLED screen, and the TFMini Lidar detector.
To add it into the Out-of-the-box Demo code, we simply inserted the lines into the initI2c routine. Below is the condensed code for initializing the TFMini and reading the distance detected.
See the attachment for the TFMini code modifications to the i2CInit function.
Accessing a Weather APITo get the current weather, I use the cloud based service DarkSky API (15). I ported code to the Out-of-the-box Demo that takes the API URL string to hit my local weather and collect its JSON response. The basic function to handle communication with IoT Cloud APIs is in the Code attachments.
The integration of all this code is available for download from our GitHub repository at https://github.com/RaisingAwesome/CokeDrumAI
USER WEB INTERFACEAs shown in the section IoT strategy, we desire a web page that will allow the employees at the refinery to see the health assessment provided by the AI. To establish such a web page, its core can be developed in under 5 minutes. Note: this one costs a couple dollars a day regardless of use. So, be sure you are within your free trial if you are experimenting with it. One can also establish a SQL Database to warehouse data to support the drum health assessment calculations.
In the code attachments, you'll find a sample end user Web Page. The CokeAI class is the "money maker" in this example. It would be designed to provide the deep learning calcs and report out the current health assessment.
The resulting page, viewable on any device, appears as this:
The above page is a demo page only as it's not yet 2030 ;-). We don't have our SAP data warehoused with Deep Learning on 10 years of coke drum strain trends correlated to work orders. However, the Azure service strategy is the same today - ready for a company to adopt it to build their future!
By clicking the View Health Trends icon, we can jump over to the Azure Analytics to see the realtime data trending:
In the field, we would install this module in a Class I Div II enclousre on a beam and power from a local 24V source. Two strain gauges would be installed on the drum at a point of interest.
For classroom demonstration, we will simply use a steel pot and boil water while recording the strain and environmental data to the cloud. Let's take a look at the components ready for assembly:
Our Coke Drum Health Monitoring Edge Components
1. Custom 3D Printed Case
2. OLED Display with Custom Graphics
3. Avnet Azure Sphere Module
4. TFMini LIDAR Distance Sensor
5. Resistance Amplifier & Strain Gauge
6. Custom Mikrobus Adapter
The Avnet Azure Sphere Starter Kit card comes with two Mikrobus headers. Since we are doing a unique project with the strain gauges, there was not an off-the-shelf component to simply snap in and start using. So, we made component 6, the custom Mikrobus Adapter. This allowed us to connect the TFMini (4) and Resistance Amplifier (5) with a custom cable. We powered it up to see our custom graphic:
Before we began running our code, we first inspected the hardware. We put our very tiny strain gage under a microscope to ensure it didn't have any damage from handling it.
Since the Azure Sphere ADC accepts 2.5V by default, we rigged up a way to tune our output from the resistance amplifier within 2.5 Volts. We applied 5V to the resistance amplifier and then turned its potentiometer until we were near 2.0 to be on the safe side.
Now calibrated and ready to go, we attached our strain gauge.
And finally, we fired up the lab experiment:
The project was a great success in teaching us the Avnet Azure Sphere Module. It also taught us the future of cloud based services for growth companies. We were able to log data through analog GPIO input and I2C communication. We showed how to use sockets to communicate with other Cloud based APIs such as to acquire weather conditions. We also showed how one can make custom graphics and display them on an attached OLED screen. We then demonstrated how to transfer the data logged securely to the cloud where Microsoft hosted our data. Last, we were able to present the data to the end user through an Azure web app. Most importantly, we demonstrated how companies could build custom classes to perform complex calculations and AI on mass amounts of data.
We hope this project demonstrated our prediction that Microsoft will run the world. Their corporate mission statement isn't to run the world, actually, but rather help companies that will:
“to empower every person and every organization on the planet to achieve more."
-Microsoft Corporate Mission Statement
With Big Data meeting Big Oil, optimization can be achieved that would have taken centuries to learn using traditional proprietary means. The ability to perform deep learning on the condition of assets across the globe and providing real time health monitoring will attract companies pursuing growth.
Thanks,
Sean and Connor Miller
[1]Tesla Annual Sales to hit 500000 in 2020: https://insideevs.com/news/323114/tesla-annual-sales-to-hit-500000-in-2020/
[2] In Plant Smart Wireless Solutions: https://www.plantautomation.com/doc/in-plant-smart-wireless-solutions-0001
[3] Wikipedia-Delayed Coker: https://en.wikipedia.org/wiki/Delayed_coker
[4] Fabrication Welding of Coke Drums: Adobe PDF
[5] Hazards of Delayed Coker Unit Operations: https://www.osha.gov/dts/shib/shib082903c_fig1.gif
[6] What you need to know about Strain Gage Measurement Errors: https://willrich.com/need-know-strain-measurement-errors/
[7] Comprehensive Life Assessment of Coke Drum: https://refiningcommunity.com/presentation/comprehensive-life-assessment-of-a-coke-drum/
[8] Weld Overlay for Coker Drum Done Right: https://www.sulzer.com/en/shared/news/2019/06/17/11/36/190618-weld-overlay-for-coker-drum-done-right
[9] Element14.com Azure Sphere Starter Kit Page: https://www.element14.com/community/community/designcenter/azure-sphere-starter-kits?ICID=azure-sphereCH-topbanner
[10] Cloud Image from Sage on Azure: https://www.dynamicsafrica.biz/sage-on-azure/
[11] Tablet clipart from PNGFANs: https://www.pngfans.com/middle-892f1326cfe57c94-ipad-svg.html
[12] Azure Sphere Out of the Box Demo: https://www.element14.com/community/groups/azuresphere/blog/2019/04/24/avnets-azure-sphere-starter-kit-out-of-box-demo-part-1-of-3
[13] Sean J. Miller's Coke Drum AI GitHub Repository: https://github.com/RaisingAwesome/CokeDrumAI
[14] LCD Assistant Software Download Page: http://en.radzio.dxp.pl/bitmap_converter/
[15] Darksky Weather API: https://darksky.net/forecast/38.7681,-90.1125/us12/en
Comments