Mini tickets printing machine based on IOT with mobile information using a smartphone

Queue is an event that we often encountered in various places or in public services such as hospitals, banks, restaurants and many more. The restriction of the queuing process is usually due to a long queue thus the process is not enough effective and efficient to the public process. The rapid development of technology that is growing, need the integration between the engine and the mobile information system. So that, we can do a job quickly, and accurately. ESP8266 as a microcontroller and a thermal printer as a ticket printer, both of them can be made a mini machine ticket printer that is small and connected with the smart phone through the Internet connected to the database, so that the user can see directly through the queue number in the smartphone applications. In this paper conducted a mini-making ticket printing machine using ESP8266 based IOT by using a smartphone.


Preliminary
Along with the times, a lot of things that can be solved by technology. Information system has been developed which aims to provide convenience to users. Information system created in order to improve the performance of a company or individual. In the development of the necessary link between the machine with the mobile information system so that we can do a job more effectively and efficiently [1]. With the overall relationship between the system allows users to have easy.
Queuing process is an event that we often encounter in society or public services such as banks, hospitals etc. Queuing process is often time consuming and not effective, especially if there are many people taking queue. Queue system is still manual, it makes long waiting time until there is a long queue. In the development of making the application of queuing systems sometimes still find obstacles if the server suddenly died. IOT or the internet of things is already widely used in the development of the industrial world [2]. Advances technology make people want to be able to access or control of an object from far away without the need to come in. The IOT allows users to access the mobile information anytime and anywhere.
From several studies and projects that have been carried out previously, these studies mostly use a microcontroller that has a large power supply. Many studies and projects that have been made regarding the ticket printing machine, but no one has to use a microcontroller ESP8266 as controller. In this study a small ESP 8266 is used as a microcontroller and a data communications using Wi-Fi. Based on the background outlined above shows that the need for a ticket printing machine that has a feature such as small and easy to monitor through a smartphone. Thus, in this study made the ticket printing machine

Research methods
After conducting a review of research and the identification of the problem, the method used in this research is experiment. In order to make a ticket printer engine is able to be integrated with a smartphone, we need the other components. Figure 1 depict the design of a whole system. Power supply serves as the power supply to all components except smartphones. The power supply required is 8V DC to activate a thermal printer, then the power supply is also needed to give ESP8266 that can be lit without the need to connect with the laptop. Pushbutton as input to command the printer to issue a paper ticket.

Installation schematic
Having made the block diagram in Figure 1. then made the circuit design using Fritzing application in order to facilitate the author in assembling the circuit. Thermal printers work with 5-9 V DC but the greater the voltage applied, the result will be better. Because ESP8266 works at 3.3 V then VCC Power supply input at Vin pin on pin VCC ESP8266 not because Vin has a tolerance of up to 10V. Thermal printers have a 5 pin is GND, VCC, RX, TX, DTR yet in use only pin GND, VCC, RX.
ESP8266 as microcontroller received input power supply voltage of 8V DC, there are 3 pushbuttons. 1foot pushbutton connected to the ground pin ESP8266 and the other leg is connected to pin Digital ESP8266, the pin D1, D2 and D5. RX pin on the thermal printer is connected to pin D3 at ESP8266. Then VCC and GND is connected to a power supply. VCC and GND on the power supply is connected to VCC and GND in thermal printer and ESP8266.

Flowchart software and hardware
There are 2 flowcharts or flow diagram in this study. Figure 3 (A) Shows hardware and Figure 3 (B) Represents software.

Hardware.
A diagram showing the process from start to enter the Wi-Fi SSID and password on Arduino IDE program. Furthermore, if the Wi-Fi is already connected it will automatically connect to Firebase or Database. Once connected, the user can press the pushbutton to give the orders to the printer to print the ticket. After that Firebase will send data to the smartphone to be displayed in Realtime.

2.2.2.
Software. B Diagram shows the process on Android in the Smartphone. This application must be connected to Wi-Fi in advance to retrieve the data on Firebase. After getting data on Firebase then the data will be displayed on the smartphone screen and will continue to change in accordance with the existing data on Firebase.

Programming
The programming tool uses the Arduino IDE (Integrated Development Environment) is software developed by the Arduino is used to design various processes associated with the Arduino programming [3], Arduino IDE can be used as a programmer at ESP8266.    Figure 4 is an input or input on the Arduino IDE program, input or the input of libraries required to run commands on a program that will be included. Figure 5 is a program for controlling the display the writing on the paper to be printed, such as adjust the font size and input the word you want to create on paper. Figure 6 is a program to execute commands pushbutton, where there are three pushbuttons which serves as the ups, downs and reset button. For the manufacture of android apps using Android Studio. Android Studio is an application to make the application on android. In Figure 7 there is some input in order to run the program on android studio. In addition, to make the machine can print a paper based on input from the pushbutton required a database to store and provide data to be displayed on the smartphone screen. Database using the platform  [4]. Once the tool is programmed using the Arduino IDE, then the tool associated with the smartphone with the aid of ESP8266 already connected with Wi-Fi connected with Firebase.

Results and discussion
Once all components are assembled, then performed a test by connecting the appliance to the power supply with a voltage of 8V. when the pushbutton is pressed then the ticket will be automatically logged out of a thermal printer. After that firebase will receive the data and sends it back to the application on the smartphone. Firebase using realtime of the data retrieval system. There is no delay on delivery of data, depending on the speed of the Wi-Fi connection. If during the use of the Wi-Fi connection is not stable then when the pushbutton is pressed, the printer will eject the paper and on the smartphone screen will not display data from firebase. Firebase also take time in real time on the Internet to be displayed on the print paper. In addition, to display the time, Firebase also take a date accurately based on the time and date that exist in the internet. Can be seen in Figure 8. Once the push button is pressed it will be out of paper, the number listed corresponds to the number that we press the push button.  The initial view of the application in the home menu android smartphone before the application is pressed. Figure 9 (B) Display applications after it opened. The initial view displays the data before the application is connected to the firebase. The application will connect to firebase using internet data connection. After receiving data from firebase application, the application will display the data that has been stored on the firebase.  Figure 9 (C) The appearance after application gets the data from firebase in accordance with the pushbutton which has been pressed. In view Figure 9 (C) a queue number will change according to the pushbutton is pressed, it may be increased or reduced in accordance with the last condition.