Labview Interfacing Arduino for Servo Motor Control in Mini Vending Machine

Reader Impact Factor Score
[Total: 1 Average: 5]

Published on International Journal of Engineering & Industry
Publication Date: August, 2019

Wai Phyo Aung, Khun Kyaw Thet Zaw & Htut Ko Win
Ph.D (Electronics), EcE Department, TU (Loikaw), Myanmar
Demostrator, EcE Department, TU (Loikaw), Myanmar
B.E (EC)-2018, TU (Loikaw), Myanmar

Journal Full Text PDF: Labview Interfacing Arduino for Servo Motor Control in Mini Vending Machine.

Abstract
Controlling the servo motors is very important as any small change can lead to instability of the closed loop system. The aim of this paper is to show how servo motor can be controlled by using LabVIEW. Servo Motor will be interfaced with LabVIEW using an Arduino Uno. The speed of the Servomotor will be set by creating a Graphic User Interface (GUI) in LabVIEW. LabVIEW will send serial command to the Servo motor using the PWM pins on theMicrocontroller board. The main project that constructing Arduino based vending machine is sucessfully done as a graduation project using open source. In this research paper, the effective application of LabVIEW interfacing Arduino Firmware was used to test servo speed control and then supports to real world vending machine process.

Keywords: Servo Motor, LabVIEW, Arduino, Open-Loop, Closed-Loop, vending machine

1. INTRODUCTION
1.1 Introduction to Labview
Labview which is virtual instrumentation software by which we can monitor different sensors using only signal computer. To run Labview software, system must have high performance processor such as laptop, that supports an idea of Interfacing LabVIEW with Arduino which was cheaper. As this project is helpful in different applications like industries, agriculture, home and many more. Labview is abbreviation of Laboratory virtual instrument engineering workbench which is created by national instruments. It is a graphical programming language which uses icons instead of text create applications. Labview codes are also known as virtual instruments or VI’S for short. Labview is extensively used for data acquisition signal analysis and also for hardware control. Labview consist of: 1) Front panel window and 2) block diagram window. Front panel window’s function is to control and show indicators of the system. Block diagram window’s function is to make programs and coding of the system (Sandip Parmar, 2018).

Picture 1. LabView Window

1.2 Introduction to Arduino Uno
Before we can understand the UNO’s hardware, we must have a general overview of the system. After code is compiled using Arduino IDE, it should be uploaded to the main microcontroller of the Arduino UNO using a USB connection.

Picture 2. Pin Specification of Arduino UNO Board

Because the main microcontroller doesn’t have a USB transceiver, it need a bridge to convert signals between the serial interface (UART interface) of the microcontroller and the host USB signals.
The bridge in the latest revision is the ATmega 16U2, which has a USB transceiver and also a serial interface ( UART interface). To power Arduino board, use the USB as a power source. Another option is to use a DC jack. To reset board, should use a push button in the board. Another source of reset should be every time, open the serial monitor from Arduino IDE.( John Harold A,2015)

2. MINI VENDING MACHINE SYSTEM
As a servo motor control vending machine , Arduino UNO board, Nokia LCD 5110, four servo motor and four push-buttons are used. Rectifier circuit is used for LED string light. Uno is used to program for the vending machine while LCD is for showing the information such as inserting coil and making a selection. User can choose the product by touching the related button. For the servo motor, it is used for the dropping of the product.

Picture 3. Overall Circuit Diagram of Vending Machine
As Arduino based project, it is convenience and easy to build and no many components are needed. This can run automatically as long as it is supplied by the required amount of power. So, no employee is needed to cash and to give service to the customer for showing them where the products are. It can use everywhere that the required power supplied can get.
Therefore, it can be put at the public places like garden, train station and others. So, people can buy easily whenever they needed even when they relaxing. The main disadvantage of this project is the detection of the correct coin. As this is the general process of the vending machine so user doesn’t add the sensor to detect the coin.
As testing result of a vending machine design, result photos are mentioned in Picture 4 to Picture 5.

Picture 4. Combining Arduino, LCD and Servos

Picture 5. Testing servo motor with coil

3. LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR
3.1 Step by Step Procedure
Interfacing of LabVIEW and Arduino combines both the simplicity of Aduino hardware board and the graphical language of LabVIEW. Now we do not need to write lines of code and also we do not need the other complex hardware boards. The list of software we are required to install for interfacing of Arduino and LabVIEW are as follows.
• Arduino IDE
• LabVIEW
• Visual Package Manger
• LabVIEW Interface for Arduino
• NI-VISA Package
After installation, we can test installation using sample program at the “finish” dialogue box.
Picture 6 to Picture 8 show how to make a program Arduino with LabVIEW.

Picture 6. Searching Ardiono in LabVIEW

Picture 7. Arduino Block in Block Diagram of LabVIEW

Picture 8. Showing how Arduino Upload LIFA Firmware to be interfaced with LabVIEW

3.2 Servo Motor Control in LabVIEW Interfacing Arduino
The following main processes are done as Servo Motor Control in LabVIEW Interfacing Arduino. The Block Daigram and Front Panel of this process .vi file was shown in Picture 9 and Picture 10.
• Initailize the connection to the Arduino. If nothing is connected to the VISA Resource input the Init vi will attempt to auto connect to the Arduino.
• Set the number of Servos to use, starting with 0.
• Configure the two servos by assigning them digital I/O pins.
• Write an angle to Servo 0 based on the loop iteration. Servo 0 will sweep from 0 degrees to the user specified angle and repeat. This angle is also read from the servo and displayed on the front panel.

Picture 9. Front Panel in LabVIEW
• Manually set the angle of servo 2. This angle is also read from the servo and displayed on the front panel.
• Close the connection to the Arduino.

Picture 10. Block Diagram in LabVIEW

Picture 11. Connetion of Arduino to Servo Motors

4. DISCUSSION AND CONCLUSION
The servo motor control vending machine is mainly controlled by using Arduino UNO board which can program for the entire project to run automatically. Using a microcontroller is more convenience instead of PIC with the other requirements. For the changing of technology, automatic machines are mostly used all over the world. Although all automatic machines are not the same, the working system may be the same. It all can run as long as it has enough power. Without needing any human to give service for selling a product is the advantage of this project.
The method adopted in this paper is low cost technique of controlling the speed of the Servo motor. Arduino Uno board plays the role of Data Acquisition System. This technique helps in maintaining the stability of the system. Servo motor is interfaced with Indicator or Knob in LabVIEW via Arduino Uno board. The method implemented can be used for various industrial applications. In this paper, the approch concepts of LabVIEW.