Monitoring Print Engine Output Using Arduino and Raspberry Pi

— In the printing industry process, monitoring is necessary for quality control of the product. The making of the tool on this project serves to monitor the output of the production machine. This monitoring is done by detecting the product output from the production machine using Sensor E18 D80NK. When the sensor detects the output, the sensor sends a signal to the Arduino UNO R3 which will calculate the amount of output from the product. Arduino will send information of the number of outputs via a USB connection to a central computer that is a Raspberry Pi 3 model B. The Python program on Raspberry Pi will read input from each Arduino address and display the data in realtime. At the same time, the data will be stored as a text file. This text file contains the number of product output and the time of the output. The prototype of this tool has been successfully created and there is still much development to do.


I. INTRODUCTION
In a printing production process, monitoring needs to be done in all aspects, from the pre-printing process, the printing process, the finishing, to the distribution process. On a printing machine, there is a screen to see how much input and output the process is working on. This reading is carried out by a sensor on the machine, and is displayed using a seven segment screen or an LCD display. The displayed figure will be manually checked by engine maintenance personnel. If there is a problem with the machine, this officer will handle the machine so that the production process is not interrupted.
There are so many printing machines operating simultaneously in a printing machine group that it is quite difficult to monitor the performance of all machines simultaneously. It takes a tool that can show the performance of each machine operating on a computer screen.

A. How the Production Machine Output Monitoring Tool
Works PT. Tiga Serangkai Inti Corpora uses a variety of production machines. The working concept of the sensor output on each machine is similar. The sensor commonly used in production machines is the E18D80NK infrared sensor. The sensor reads the pause when the item passes through the sensor.
The Sensor E18 D80NK will read the engine output. This sensor is active LOW. When an item passes, the sensor will provide a LOW input which will be read by the Arduino UNO R3. The program in the Arduino UNO R3 will calculate the amount of output from the production machine.
The results of the calculations carried out by the program on the Arduino UNO R3 will be displayed on the TM1637 LED display and also sent via a USB connection to the Raspberry Pi for further processing.
Raspberry Pi requires a program to read input from the Arduino UNO R3 which has been sent via USB. The program on the Raspberry Pi is made using the Python programming language. This program will read the input from Arduino and then display it in realtime GUI. The program will also save the displayed data in a text file. This text data will store information about the engine output and the time entered from the machine's output.

B. Sensor E18 D80NK
The Sensor E18 D80NK is an infrared sensor that has a far enough detection distance and little visible light interference. The implementation of the modulated IR signal makes this sensor immune to interference caused by normal light from a light bulb or from sunlight. This sensor has a detection distance that can be adjusted using a screwdriver. This sensor produces a digital output when it detects something within its detection distance. This sensor does not measure distance from objects. This sensor can be used to avoid collisions on robots and automated machines. This sensor provides non-contact detection. [1]

C. Arduino UNO Rev 3
Arduino Uno is a microcontroller board based on the ATmega328P. The Arduino has 14 digital input / output pins (6 of these pins can be used as PWM outputs), 6 analog inputs, 16 MHz quartz crystals, a USB connection, a power jack, an ICSP header and a reset button. The Arduino has everything you need to support a microcontroller; Connect the Arduino with a USB cable, AC-DC adapter, or battery to run Arduino. "Uno" is taken from Italian which means "first". The word "Uno" was chosen to commemorate the release of arduino software (IDE) 1.0. Arduino Uno and version 1.0 arduino software (IDE) are the version numbers of Arduino, currently a newer version has been developed. The Uno board is the first in the series of USB Arduino boards, and the reference mode for the Arduino platform. [2]

E. Raspberry Pi 3 Model B
The Raspberry Pi is a single-board computer made by the Raspberry Pi Foundation that is used to teach basic computer science in schools and in developing countries. [4] The Raspberry Pi used for this study was the Raspberry Pi 3 Model B.  Micro SD port for loading your operating system and storing data

F. Design of Production Machine Output Monitoring Tool
The design of production machine output monitoring equipment is divided into two parts; a tool for reading engine output and software for monitoring on the Raspberry Pi 3 Model B. The following is a picture that shows a production machine output flowchart.

A. Engine Output Reader
This production machine output reader will be placed in the output section of the production machine to calculate the amount of output from the machine. The Ardunino pins used are pins 8, 9, and 10. Pins 8 and 9 are connected to the DIO and CLK of the TM1637 LED Display. Pin 10 is used to receive digital input from the sensor E18 D80NK. Each Vcc TM1637 LED Display and Sensor E18 D80NK are connected to a 5V voltage source that can be taken from the Arduino. The GND TM1637 LED Display and the Sensor E18 D80NK are also connected to the GND on the Arduino.
The image below shows the schematic of the engine output reader.

Figure 8. Schematic of Engine Output Reader
After the tools are assembled, a program for Arduino is created using the Arduino software (IDE). This program functions to calculate the number of outputs from the production machine. The Sensor E18 D80NK is active LOW so that when the sensor detects an object, the sensor will provide LOW input. When the Sensor E18 D80NK provides LOW input via pin 10, the program will add a counter value of 1. The result of adding this value will be displayed on the TM1637 LED screen and also sent to the Raspberry Pi via a USB connection. This program will be LOOP so that the counter will continue to count until the appliance is reset.

B. Monitoring on the Raspberry Pi
There are many production machines used at PT. Tiga Serangkai Inti Corpora. These machines will be monitored in real time via a central computer. This central computer is the Raspberry Pi. To monitor these production machines, a program that can be run on the operating system of the Raspberry Pi is needed. The Python programming language is suitable for use in making this monitoring program.
PySerial needs to be added to Python 2.7 to read addresses and communicate with Arduino. The address of the Arduino can be seen from the Arduino Software (IDE). After knowing the address of Arduino, this address needs to be included in the program to be created. The program has a Graphical User Interface (GUI), which will read the input from two Arduinos. This is done to show that this Monitoring can be applied to a larger scale.
The Python program will read data from two Arduino series connected to the Raspberry Pi. When an input is entered, it will be displayed in the GUI and also saved into a text file. This text file contains the engine output data and the time when that output occurred. This program will be LOOP until the program is closed.
The Python program that is made is as follows: import Tkinter as tk from serial import * from datetime import datetime import io #ensure non-blocking ser = Serial ('COM3', 115200,  Furthermore, the image below is the GUI display of the production machine monitoring program that will be operated on the Raspberry Pi.
And the results of monitoring data storage from the engine output are stored in the form of a txt file, as shown in the following figure: Figure 10. The results of the production machine output monitoring data storage

IV. CONCLUSION
The production engine output monitoring tool consists of a central computer which is the Raspberry Pi 3 model B and a program in the Python programming language. This program will display the input from Arduino UNO R3 which is communicated via USB on the GUI and also saves this input data into a text file. Arduino devices must be defined and addressed manually in the coding of the Python program. This GUI program is still in hard code form, this program does not have its own database, there is no plug and play feature for machine output readers. In storing the data into a text file, there is a repetition of the stored data which is most likely the result of two LOOPING programs. The first LOOP occurs in the Arduino and the second LOOP occurs in a Python program.