7
Zambrut.com. Publication date: August, 2019. Aung, W. P., Zaw, K. K. T. & Win, H. K. 2019. Labview Interfacing Arduino for Servo Motor ................ 1 International Journal of Engineering & Industry ISSN: 2191-3315, Volume 4, Issue 1, page 1 - 7 Zambrut Labview Interfacing Arduino for Servo Motor Control in Mini Vending Machine Wai Phyo Aung 1 , Khun Kyaw Thet Zaw 2 & Htut Ko Win 3 1 Wai Phyo Aung, 2 Khun Kyaw Thet Zaw & 3 Htut Ko Win 1 Ph.D (Electronics), EcE Department, TU (Loikaw), Myanmar 2 Demostrator, EcE Department, TU (Loikaw), Myanmar 3 B.E (EC)-2018, TU (Loikaw), Myanmar 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 windows 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). 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

Labview Interfacing Arduino for Servo Motor Control in ... · AC 220V String light 14 5V 12V 0V Servo 2 Servo 3 Servo 4 ... LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR

  • Upload
    others

  • View
    55

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Labview Interfacing Arduino for Servo Motor Control in ... · AC 220V String light 14 5V 12V 0V Servo 2 Servo 3 Servo 4 ... LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR

Zambrut.com. Publication date: August, 2019.

Aung, W. P., Zaw, K. K. T. & Win, H. K. 2019. Labview Interfacing Arduino for Servo Motor ................ 1

International Journal of Engineering & Industry ISSN: 2191-3315, Volume 4, Issue 1, page 1 - 7

Zambrut

Labview Interfacing Arduino

for Servo Motor Control in

Mini Vending Machine

Wai Phyo Aung1, Khun Kyaw Thet Zaw

2 & Htut Ko Win

3

1Wai Phyo Aung,

2Khun Kyaw Thet Zaw &

3Htut Ko Win

1Ph.D (Electronics), EcE Department, TU (Loikaw), Myanmar

2Demostrator, EcE Department, TU (Loikaw), Myanmar

3B.E (EC)-2018, TU (Loikaw), Myanmar

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).

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

Page 2: Labview Interfacing Arduino for Servo Motor Control in ... · AC 220V String light 14 5V 12V 0V Servo 2 Servo 3 Servo 4 ... LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR

Zambrut.com. Publication date: August, 2019.

Aung, W. P., Zaw, K. K. T. & Win, H. K. 2019. Labview Interfacing Arduino for Servo Motor ................ 2

International Journal of Engineering & Industry ISSN: 2191-3315, Volume 4, Issue 1, page 1 - 7

Zambrut

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)

Page 3: Labview Interfacing Arduino for Servo Motor Control in ... · AC 220V String light 14 5V 12V 0V Servo 2 Servo 3 Servo 4 ... LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR

Zambrut.com. Publication date: August, 2019.

Aung, W. P., Zaw, K. K. T. & Win, H. K. 2019. Labview Interfacing Arduino for Servo Motor ................ 3

International Journal of Engineering & Industry ISSN: 2191-3315, Volume 4, Issue 1, page 1 - 7

Zambrut

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.

LCD 5110

8 7 6 5 4 3 2 1

3.3V

5v

GND

A0

A!

A2

A3

A4

A5

Arduino UNO

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Servo 1

GROUND

Coin insert

AC 220V

String light

14

5V

12V

0V

Servo 2

Servo 3

Servo 4

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

Page 4: Labview Interfacing Arduino for Servo Motor Control in ... · AC 220V String light 14 5V 12V 0V Servo 2 Servo 3 Servo 4 ... LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR

Zambrut.com. Publication date: August, 2019.

Aung, W. P., Zaw, K. K. T. & Win, H. K. 2019. Labview Interfacing Arduino for Servo Motor ................ 4

International Journal of Engineering & Industry ISSN: 2191-3315, Volume 4, Issue 1, page 1 - 7

Zambrut

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

Page 5: Labview Interfacing Arduino for Servo Motor Control in ... · AC 220V String light 14 5V 12V 0V Servo 2 Servo 3 Servo 4 ... LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR

Zambrut.com. Publication date: August, 2019.

Aung, W. P., Zaw, K. K. T. & Win, H. K. 2019. Labview Interfacing Arduino for Servo Motor ................ 5

International Journal of Engineering & Industry ISSN: 2191-3315, Volume 4, Issue 1, page 1 - 7

Zambrut

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.

Page 6: Labview Interfacing Arduino for Servo Motor Control in ... · AC 220V String light 14 5V 12V 0V Servo 2 Servo 3 Servo 4 ... LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR

Zambrut.com. Publication date: August, 2019.

Aung, W. P., Zaw, K. K. T. & Win, H. K. 2019. Labview Interfacing Arduino for Servo Motor ................ 6

International Journal of Engineering & Industry ISSN: 2191-3315, Volume 4, Issue 1, page 1 - 7

Zambrut

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

Page 7: Labview Interfacing Arduino for Servo Motor Control in ... · AC 220V String light 14 5V 12V 0V Servo 2 Servo 3 Servo 4 ... LABVIEW INTERFACING ARDUINO TO CONTROL SERVO MOTOR

Zambrut.com. Publication date: August, 2019.

Aung, W. P., Zaw, K. K. T. & Win, H. K. 2019. Labview Interfacing Arduino for Servo Motor ................ 7

International Journal of Engineering & Industry ISSN: 2191-3315, Volume 4, Issue 1, page 1 - 7

Zambrut

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.

5. REFERENCES 1. John Harold A., Jullan Victor S., Clint Vincent A., Gildred Roberto Jr. L.: Design and Fabrication of an Instant

Noodle Vending Machine, Mapua Institute of Technology, 2015.

2. Kamalanathan P., Irshath Ahmed R., Kalaiselvan P.: Automatic Paper Vending Machine, International Journal of

Science, Engineering and Technology Research, Volume 4, Issue 4, 2015.

3. Prof.S.S.Desai, SayaliMarutiJadhav, PriyaShivajiPatil, Giri Neeta Sambhaji: Automatic Chocolate Vending

Machine By Using ArduinoUNO, International Journal of Innovative Research in Computer Science &

Technology, ISSN: 2347-5552, Volume 5, Issue 2, 2017.

4. Sandip Parmar , Kalpesh Chudasama, Jayesh Vankar, Apurva Gohil, “Monitoring and Control of Speed of DC

Motor using LabVIEW Environment”, International Journal for Research in Engineering Application &

Management (IJREAM),ISSN : 2454-9150 Vol-03, Issue-12, March 2018.

5. Naveen Kumar and Dr. Prasad Krishna, "Low cost data acquition and control using Arduino Prototyping platform

and LabVIEW",IJSR,Volume 2, Issue-2, February 2013. 6. Olden. P, “Open Loop motor speed control with LabVIEW”, SoutheastCon, Proceedings IEEE,

pp. 259-262, 2001, (Conference Publications).

Zambrut Journal, Link Access;

https://zambrut.com

https://zambrut.com/interfacing-arduino/

© Copyright International Journal of Zambrut | Zambrut, Inc.