Today I will talk about you how the Internet of Things can be used in manufacturing, and I will show you how the current state of a connected production plant can be efficiently communicated to managers, workers, and even executives.
One of the opportunities with the Internet of Things in manufacturing is to increase the factory visibility, i.e. what is happening on the factory floor. With the machines and other inventory being connected and equipped with sensors, anything out of the ordinary can be instantly detected. Any problem in the production line can affect a large part of the factory, and therefore action needs to be immediate.
I will show you how a connected display device can be used to show the current number of problems in the factory, and to build the device, I will use an Arduino Yun with a 7-segment LED display, and to connect everything, you need a breadboard, 8 resistors of 220 ohm, and nine jumper cables.
To setup the hardware, you start by disconnecting everything from its power source, and then connect the GND on the Arduino to the LED display’s GND (which is the center pin, both up and down). The rest of the connections are all over a 220 ohm resistor each. Connect Arduino pin 2 to LED pin A (top second right), Arduino pin 3 to LED B (top right), Arduino pin 4 to LED decimal point (bottom right), Arduino pin 5 to LED C (bottom second right), Arduino pin 6 to LED D (bottom second left), Arduino pin 7 to LED E (bottom left), Arduino pin 8 to LED F (top second left), and Arduino pin 9 to LED G (top left).
The Arduino code (sketch) can be found on http://cforsberg.com/?p=244, and it reads a problem value from an MQTT broker, and show the number on the LED display. After the initial includes (on lines 1-2), the bitmasks for each of the digits (0-9) is defined (on line 4). Then I set up an array with the pins corresponding to each segment (on line 5), and the MQTT client object is defined and created (on lines 6-7). In the setup, I set the pins for output (on lines 11-14), and initialize the bridge (on line 16, which allows communication between the microcontroller and the microprocessor). While the bridge is initialized, I turn on the decimal point (on line 15), and then off (on line 17). Then I connect the MQTT client to the server (on line 18), and subscribe to the topic (on line 19, I’m using the Eclipse sandbox, but you can use any MQTT broker). The eternal loop simply runs the MQTT library loop (on line 24) that checks for publications on the server. When a callback is received, it converts the payload (a numeric character) to an integer (on line 29), and then turn on the corresponding segments according to the define masks (on lines 30-33).
With that in place, a server application can publish a problem indicator on the MQTT topic, and to simulate that, you can open a terminal and give the command at the bottom curl -X PUT –data-binary “0” and see how our problem indicator changes accordingly. Imagine this device put on a factory wall (e.g. a 20″ like www.display-leds.com/20-Inch-LED-7-Segment-Display-p52254927.html) to be instantly visible to both facility managers and workers. The point is that when there’s a problem, it concerns everyone. A similar device could also be put in the executive office to make a live connection to the factory.
That’s an example of how the Internet of Things can be used in manufacturing.