3
EXPERIMENT 5 OBJECTIVE: To control the dc motor speed using PWM from LabVIEW. APPARATUS USED: Arduino board, DC motor, LABVIEW setup. THEORY: Introduction to LABVIEW: LabVIEW is an integrated development environment designed specifically for engineers and scientists. Native to LabVIEW is a graphical programming language (G) that uses a dataflow model instead of sequential lines of text code, empowering you to write functional code using a visual layout that resembles your thought process. This means you spend less time worrying about semicolons and syntax and more time solving the problems that matter. DC Motor: A DC motor is any of a class of rotary electrical machines that converts direct current electrical power into mechanical power. The most common types rely on the forces produced by magnetic fields. Nearly all types of DC motors have some internal mechanism, either electromechanical or electronic, to periodically change the direction of current flow in part of the motor. Interfacing DC motor with Arduino:

To control the dc motor speed using PWM from LabVIEW

Embed Size (px)

Citation preview

Page 1: To control the dc motor speed using PWM from LabVIEW

EXPERIMENT – 5

OBJECTIVE: To control the dc motor speed using PWM from LabVIEW.

APPARATUS USED: Arduino board, DC motor, LABVIEW setup.

THEORY:

Introduction to LABVIEW: LabVIEW is an integrated development environment designed

specifically for engineers and scientists. Native to LabVIEW is a graphical programming language

(G) that uses a dataflow model instead of sequential lines of text code, empowering you to write

functional code using a visual layout that resembles your thought process. This means you spend

less time worrying about semicolons and syntax and more time solving the problems that matter.

DC Motor: A DC motor is any of a class of rotary electrical machines that converts direct current

electrical power into mechanical power. The most common types rely on the forces produced by

magnetic fields. Nearly all types of DC motors have some internal mechanism, either

electromechanical or electronic, to periodically change the direction of current flow in part of the

motor.

Interfacing DC motor with Arduino:

Page 2: To control the dc motor speed using PWM from LabVIEW

Connect 5V and ground of the IC to 5V and ground of Arduino.

Connect the motor to pins 2 and 3 of the IC.

Connect IN1 of the IC to pin 8 of Arduino.

Connect IN2 of the IC to pin 9 of Arduino.

Connect EN1 of IC to pin 2 of Arduino.

Connect SENS A pin of IC to the ground.

Connect the Arduino using Arduino USB cable and upload the program to the Arduino

using Arduino IDE software.

Provide power to the Arduino board using power supply, battery or USB cable.

Interface Arduino through LabVIEW:

Checks if LabVIEW sent a new value. If there is a new value, it converts it into integer byte with

the same value. This integer byte represents the delay interval used in sequence. That, the greater

Page 3: To control the dc motor speed using PWM from LabVIEW

the delay the lower the speed and vice versa. Else, Arduino continue running the motor at current

speed. This prevents the processor from overloading the serial port and pushes it to avoid

Arduino Serial port hanging.

RESULT: Study the operation of DC motor with LabVIEW and controlling of speed.