Industry 4.0 – Personalized Manufacturing Demo

This demo was built initially for Oracle Openworld 2018, I built 3 copies of the hardware that were shown in two locations on the demo floor and in the Hitachi IoT Keynote. They then went on to be shipped several times around the world and have so far been shown at over 30 conferences and other events. The idea of the demo was to build a miniature table top factory that can be used to demonstrate the complete suite of Oracle Supply Chain and IoT Applications, in an end to end scenario. In the end producing a quality designed product the attendee will be excited to take home and use, spreading brand awareness.

Article about the demo “Developer’s Workshop Delivers Mini Factory To Manufacture Personalized Souvenirs At Oracle Code One”

@ Forbes

Demo Story

Demo Video

Demonstration at Hitachi IoT Keynote, Oracle Openworld 2018

I showed the demo live on stage in the keynote. This was a nerve racking experience, but everything went exactly as expected.

Video of Keynote

Digital Twin 3D

One of the key new features we wanted to show in the IoT Asset Monitoring application, was 3D Digital Twin. This features allows a 3D model of an asset to be uploaded and wired up to sensor data to give a live virtual representaion of that asset.

Robot Arm

I started with an off the shelf robot arm (Dobot Magician) but I could not get the repeatable accuracy and it would need to be recalibrated several times a day. The use case of picking up a coaster in its holder and placing it on the conveyer belt over and over 100s of times a day without recalibration. Using magnets I managed to reduce the required repeatable accuracy to about +/- 1/8″(3mm), the Dobot would do this happily when first calibrated but after a while it could be 2-3 times that distance of.
So after OpenWorld 2018 I designed my own 3D printed SCARA style robot arm. It is based on the really cool servo motors from . The cool things they do is have a micro controller built in that handles all the low level movement and feed back. They have simple wiring able to be chained from the first motor to the next and so on ending in a USB interface and power module.

Video of Building Version 2 Arm

The robot was designed from scratch in Sketchup 3D. This was the most complicated mechanical thing I have ever designed in Sketchup. Since doing this I have moved to Fusion 360 for mechanical designs. All the metal parts and hardware are from which has an amazing range of mechanical parts for building your own robots and machines. Some of the more complex parts to model are the helical gears for the main joints. I experimented with several different gear ratios here, ending up with 3:1 so the motors 360º range is reduced to 120º but accuracy is 3x.

Laser Engraver

The laser engraver was custom designed hardware and software. The hardware consists of a few off the shelf components connected together with custom designed 3D printed parts. It was a non-standard design as it makes use of the conveyer belt as one axis.

Laser Engraver Software

The software starts with a SVG template file for the customers chosen design. It then does some code manipulation on that SVG file to replace the text with the customers name and current date and time. There is some special custom text layout here to measure the name length and shrink the font size as needed to fit it in the available space. The template has lines that are the base lines for each line of text, the text is fitted so that the length is equal or less than the length of that base line. Once the SVG file is correct for the customer we need to convert it into GCode that is processed by the TinyG CNC controller. I initially assumed there must be a good open-source library to do that conversion but after some investigation I found out that none of them handled text properly. So I ended up writing my own custom SVG to GCode converter that took each line of text and converted it into bezier curves for each character. Those bezier curves then had to be broken down into a series of short straight lines, this is the part that ended up needing to be quite clever. Those lines had to be just the right length and have consistent lengths, otherwise when there were tight curves the laser would slow down too much and they would be burnt in more giving a darker line on curves vs straight lines. Also we used a special font, so each letter is a single line rather than a complete outline of the filled letter shape. This halves the amount of time for the laser engraving and produces a cleaner engraved result.

SVG Template starting point

Video of Digital Twin showing Engraving

Control Box

The control box contains the electronics for controlling the complete mini-factory. There is a Raspberry Pi that connects everything to the cloud. It talks with:

  • TinyG CNC Controller, this controls the motors for the laser engraver and turntable. It takes the GCode from the server and moves the turntable, conveyer belt and laser head as needed.
  • GPIO Relay board, this controls the lights in the signal tower.
  • MegaPi Arduino compatible controller, this sits on the pi and controls the 1st generation robot arm and gripper servos.

There is also a power controller for the laser diode and a couple of voltage converters to take the 24V input down to 12V and 5V for various sub-systems.

Computer Vision Cameras

There were originally two computer vision cameras in the demo. The first was locating the inventory on the turntable. The second was doing quality check on the output after the laser. The first was removed after much testing as it was determined it was way to susceptible to changes in environmental lighting. This is a huge problem for creating computer vision systems for trade floor demos. You don’t want to have the vision system in a controlled lighting sealed box as this would be boring for the attendee to look at, but having it open means it can easily be effected by the different lighting as you move venue to venue. For the quality camera we managed to get it reliable and minimize the effect of ambient light by adding two powerful LED video lights and adding a natural density filter to the camera lens. This allowed us to reduce the amount of light getting into the camera, effectively making all the room lighting black to the camera, then replace that light with our own super bright controlled lights.

The computer vision system we used was based on custom python code, which ran through an image processing pipeline, it then applied edge detection and shape recognition.

Camera Hardware

For the camera hardware I used a Raspberry Pi, this did all the image processing locally on the edge and just sent the results to the cloud. For the camera rather than using the standard Raspberry Pi camera I used the Arducam camera, it uses the same Sony sensor and is 100% compatible but rather than a fixed focus lens it has a higher quality focusable lens. For powering the camera I used a Power Over Ethernet splitter, this allowed the camera to be completely self contained and need just a single cable for power and network.

Raspberry Pi 3B+

Arducam 8MP Sony IMX219 Camera Module

Micro USB Active PoE Splitter

3D Printed Case

The case was designed to resemble a much more expensive industrial camera used on real factories. It also had built in T-Slots in the sides for mounting the lights.

Coaster Design

This project started with deciding on what can be produced by the mini-factory. After bouncing around ideas we came up with the idea of drinks coasters. They are small enough yet allow enough space for freedom of graphics. Hopefully they are something fun and useful that an attendee will keep and use. Next I went on to graphics design and mockups on a few materials that I thought might work.

Mockup Designs

Final Coaster Designs

The final designs were designed so the outside shapes were unique so that they could be identified by machine vision and each had a way to force orientation to be correct. For that reason the circle had a notch cut in to allow it to be aligned so the name engraving would not be skew-whiff.

Final Material Choices

After lots of testing with materials like plywood, cork, felt, solid hardwood, MDF. The final choice was solid hardwood, this engraved really nicely on the industrial laser for making the coasters then could have the name and date engraved on at a good quality and without bad smells by the small 4W laser in the mini-factory. The final designs were laser cut from 4 different materials, 1/8″ (3mm) solid walnut, cherry, butternut and maple.

Making Coaster Blanks

The blanks were engraved and cut on Epilog industrial lasers, this turned out to be a massive effort as it took an hour for 18 coasters because of the complexity of design, oops. My wife, Fi was an amazing star and worked for weeks creating the 4000 coasters we gave out so far with the demo.

Final Coaster Blanks