EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Similar documents
EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

8 Channel 5V Optical Isolated Relay Module

TB6612FNG Hookup Guide

The Fleming s Left Hand Rule shows what happens when electrons in a current enter a magnetic field.

ENGR1202 Computer Engineering Assignment Robotics and Control Fall Assignment 2 Motor Control/Power Lab Exercise

FireBeetle Covers-DC Motor & Stepper Driver SKU:DFR0508

Permanent Magnet DC Motor Operating as a Generator

The Easy Driver gives you the capability to drive bipolar stepper motors between 150mA to 700mA per phase.

Permanent Magnet DC Motor

PARTS LIST. Beams: 72x. 16x. 64x. 16x. 12x. 2x Breadboards CYB x TotemDuino 1x LabBoard 1x 30cm 34way Flat Cable 1x Power Supply 12v 1,5A

Driver Board User Manual

(for example A0) on the Arduino you can expect to read a value of 0 (0V) when in its upright position and 1023 (5V) when it is tilted.

Lab 4.4 Arduino Microcontroller, Resistors, and Simple Circuits

SPH3U UNIVERSITY PHYSICS

Product Manual L293D BREAKOUT Updated on 24 June 2017

DC motor theory. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

Lesson 1 - Make The Car Move Points of this section

Kelly HPM High Power Full Bridge Permanent Magnet DC Motor Controller User s Manual

Week 11. Module 5: EE100 Course Project Making your first robot

Memorial University of Newfoundland Faculty of Engineering and Applied Science

Please Handle Carefully!

Load Cell Amplifier HX711 Breakout Hookup Guide

Mens et Manus. Controlling a Brushless Motor

Getting Started with the Digilent Electronics Explorer Board

Lab 6: Wind Turbine Generators

Full Bridge Permanent Magnet DC Motor Controller User's Manual

A Practical Exercise Name: Section:

Unit 8 ~ Learning Guide Name:

MANTECH ELECTRONICS. Stepper Motors. Basics on Stepper Motors I. STEPPER MOTOR SYSTEMS OVERVIEW 2. STEPPING MOTORS

Kelly HSR Series Motor Controller with Regen User s Manual V 3.3. Kelly HSR Opto-Isolated Series Motor Controller with Regen.

1.0 Features and Description

Kelly KDHA High Voltage Series/PM Motor Controller User s Manual

Lab 1: DC Motors Tuesday, Feb 8 / Wednesday, Feb 9

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT 1020 HIGH EFFICIENCY USB POWER MANAGER + TRIPLE STEP-DOWN DC/DC LTC3555

Lesson Plan: Electricity and Magnetism (~100 minutes)

Chapter 8 Magnetism and Its Uses. Section 1: Magnetism Section 2: Electricity and Magnetism Section 3: Producing Electric Current

COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK SUBJECT CODE & NAME : EE 1001 SPECIAL ELECTRICAL MACHINES

CENTROIDTM. AC Brushless Drive. Product Spec Sheet

DR8010 tm. Hardware Reference Manual. Document Revision B4 May 15, 2018

CS/ECE 5780/6780: Embedded System Design

Armature Reaction and Saturation Effect

Science 30 Unit C Electromagnetic Energy

SPH3U1 Lesson 10 Magnetism. If the wire through a magnetic field is bent into a loop, the loop can be made to turn up to 90 0.

Installation Instructions

Electromagnets & Induction Vocabulary

Small Full Bridge Permanent Magnet Motor DC Controller User Manual

Brushed. Brushed. Brushed Motor

QUESTION BANK SPECIAL ELECTRICAL MACHINES

Lab 9 AC & Stepper Motors

IT 318 SUPPLEMENTARY MATERIAL CHAPTER 4

MODEL MAS BAR TO BAR TESTER INSTRUCTIONS

SERIES PR90H PROGRAMMABLE INCREMENTAL HOLLOW SHAFT ENCODER FOR INDUSTRIAL APPLICATIONS REFERENCE PR90H - C C - C. External diameter 58 mm

Selected excerpts from the book: Lab Scopes: Introductory & Advanced. Steven McAfee

Installation Instructions

Instructor Guide. 215: Elevator: Mechanical Drive Systems Module 3: Gearless Drive Systems

Attitude Control. Actuators and Attitude Control

L, LTC, LTM, LT, Burst Mode, are registered trademarks of Linear Technology Corporation.

STR3. Step Motor Drive. User Manual

Basic Electronics Course Part 1

Session #18 Motors. R w+ - T, ω. Dan Frey. Figure by MIT OCW.

User s Manual. For DM860T. Fully Digital Stepper Drive. Version 1.0 Designed by StepperOnline All Rights Reserved

Exercise 2: Series-Opposing DC Sources

ECE 271 Microcomputer Architecture and Applications University of Maine. Lab 3: Stepper Motor Control Instructor: Prof. Yifeng Zhu Spring 2017

User's Manual O

About the moto:bit Board

Hello and welcome to training on general purpose motor drivers in the 3 to 15 volt range. I m Paul Dieffenderfer & I will be your host for this

The Starter motor. Student booklet

GE Sensing & Inspection Technologies

Filtered PWM Speed Control for Permanent Magnet DC Motors

Exercise 3-3. Basic Operations of GTO Thyristors EXERCISE OBJECTIVES

Series and Parallel Networks

715B CONTROL SERIES. Instruction Manual Line Voltage DC Brushless Motor Control CONTROLS. Phone (317) Fax (317)

Historical Development

Exercise 2-1. The Separately-Excited DC Motor N S EXERCISE OBJECTIVE DISCUSSION OUTLINE DISCUSSION. Simplified equivalent circuit of a dc motor

Weatherproof Tubular Slip Ring Assembly

Freescale Semiconductor, I

Note 8. Electric Actuators

Fall 1997 EE361: MIDTERM EXAM 2. This exam is open book and closed notes. Be sure to show all work clearly.

Autonomously Controlled Front Loader Senior Project Proposal

Chapter 3. ECE Tools and Concepts

Blancett Flow Meters A Division of Racine Federated Inc. 100 East Felix Street South, Suite 190 Fort Worth, Texas FAX:

Application Information

Experiment 6: Induction

BLDC SPEED CONTROL INSTRUCTION MANUAL Line voltage Brushless DC control

MondoStep 7.8. High Performance Microstepping Driver. User s Manual. Version PROBOTIX All Rights Reserved

Temperature Sensor. Positive + (to 5 volts.) Ground. To A0 To GND Signal. To 5v

Kelly KDC Series/PM Motor Controller User s Manual

Glow Plug for E Series Only

ENGG1015: lab 5. A Taste of the Project

Assembly Instructions: Conventional Motor (Beakman's Motor Kit)

Issue 2.0 December EPAS Midi User Manual EPAS35

Automated Circuit Breaker Calibration

DC Motor and Generator Theory By

Question Bank ( ODD)

Operating Manual For Stepper Driver

Laboratory 2 Electronics Engineering 1270

Lab 6: Electrical Motors

Synchronous Motor Drives

ATOTH-G Series BLDC Motor Controller. User s Manual

Exploring the Energy Grid Grades 6-8. Name:

Transcription:

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE LABORATORY 8: DC MOTOR CONTROL DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS GOAL: This section will introduce DC motors and motor drivers to control the speed and direction of DC motors. OBJECTIVES: Learn the basics of Arduino Programming o Commands: setup() loop() Funtions Interface with the TB6612FNG motor driver Operate a DC motor Control various aspects of DC motor operation OVERVIEW AND REQUIREMENTS: Brushed DC Motors A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors can operate directly from rechargeable batteries, providing the motive power for the first electric vehicles. Today DC motors are still found in applications as small as toys and disk drives, or in large sizes to operate steel rolling mills and paper machines. The brushed DC electric motor generates torque directly from DC power supplied to the motor by using internal commutation, stationary magnets (permanent or electromagnets), and rotating electrical magnets. DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 1

The inside of a DC Motor When the coil pictured above is powered, a magnetic field is generated around the armature. The left side of the armature is pushed away from the left magnet and drawn toward the right, causing rotation. The armature will then continue to rotate and when the armature becomes horizontally aligned, the commutator reverses the direction of current through the coil, reversing the magnetic field. This process then repeats, causing the motor rotation. Advantages of a brushed DC motor include low initial cost, high reliability, and simple control of motor speed. Disadvantages are high maintenance and low life-span for high intensity uses. Maintenance involves regularly replacing the brushes and springs which carry the electric current, as well as cleaning or replacing the commutator. These components are necessary for transferring electrical power from outside the motor to the spinning wire windings of the rotor inside the motor. The DC motor used for this lab is a 130-size DC motor and has a recommended operation voltage of 3 to 12V. Its approximate specifications at 6V are a free-run speed of 11,500 RPM, free-run current of 70 ma, and stall current of 800 ma. H Bridge An H bridge is an electronic circuit that enables a voltage to be applied across a load in either direction. These circuits are often used in robotics and other applications to allow DC motors to run forwards and backwards. DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 2

An H bridge is built with four switches. When the switches S1 and S4 (in the diagram pictured above) are closed, and S2 and S3 are open, a positive voltage will be applied across the motor. By opening S1 and S4 switches and closing S2 and S3 switches, this voltage is reversed, allowing reverse operation of the motor. The switches S1 and S2 should never be closed at the same time, as this would cause a short circuit on the input voltage source. The same applies to the switches S3 and S4. TB6612FNG Dual Motor Driver Carrier The TB6612FNG motor driver is a dual H Bridge based driver that can control up to two DC motors at a constant current of 1.2A (3.2A peak). Two input signals (IN1 and IN2) can be used to control the motor in one of four function modes - CW, CCW, short-brake, and stop. The two motor outputs (A and B) can be separately controlled, the speed of each motor is controlled via a PWM input signal with a frequency up to 100kHz. The STBY pin should be pulled high to take the motor out of standby mode. Logic supply voltage (VCC) can be in the range of 2.7-5.5VDC, while the motor supply (VM) is limited to a maximum voltage of 15VDC. The output current is rated up to 1.2A per channel (or up to 3.2A for a short, single pulse). COMPONENTS: Arduino Uno USB A-B Cable TB6612FNG Dual Motor Driver Carrier 6V DC Motor Breadboard Shield Jumper Wire Host PC Installed Arduino Uno drivers and IDE DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 3

OPERATION: This is the layout for the breakout board of the TB6612FNG. Here is a short guide on how to connect the motor driver. The connection guide is given from the left side down, then the right side down. GND - Connect to the ground terminal on the Arduino board VCC - Connect to the 5V VCC on the Arduino board. AO1 - Connect to the negative lead of motor A. AO2 - Connect to the positive lead of motor A. BO2 - Connect to the positive lead of motor B. BO1 - Connect to the negative lead of motor B. VMOT - Connect to the positive side of the power source you are using to power the motors. GND - Connect to the negative side of the power source you are using to power the motors. PWMA - Connect to PWM pin on the Arduino. [Pins 3, 5, 6, 9, 10, 11] AIN2 - Connect to a digital pin on the Arduino. DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 4

AIN1 - Connect to a digital pin on the Arduino. STBY - Connect to a digital pin on the Arduino. BIN1 - Connect to a digital pin on the Arduino. BIN2 - Connect to a digital pin on the Arduino. PWMB - Connect to a PWM pin on the Arduino. [Pins 3, 5, 6, 9, 10, 11] GND - Connect to the ground of the Arduino. For this exercise the following wiring was used for the Arduino: #define PWMA 3 #define AIN1 2 #define AIN2 1 #define BIN1 4 #define BIN2 5 #define PWMB 6 #define STBY 0 Assembling the circuit: 1. Attach the Breadboard Shield to the Arduino, making sure to properly align the pins. If you are using an R3 revision of the Arduino UNO, there will be 2 pins on each side that will have no corresponding pins on the shield. 2. Wire the circuit as shown in the wiring guide. Your final result should be something similar to the following snapshots. DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 5

3. Attach the Arduino UNO to the host PC with the use of the USB cable. 4. Connect the VMOT pin and subsequent GND pin to the power source provided for the lab. This is typically a battery pack of 4x AA batteries in series, but if it is not provided then a laboratory power supply can be used to power the motors. Please refer to the power supply tutorial provided in the lab. 5. Use the power supply to provide 6 volts (4x AA = 1.5V x 4 = 6V) in this situation. DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 6

6. Open the Arduino IDE and create a new sketch titled DCMotor. Verify that the correct COM port is in use. 7. Upload the following sketch to your Arduino UNO: #define PWMA 3 #define AIN1 2 #define AIN2 1 #define BIN1 4 #define BIN2 5 #define PWMB 6 #define STBY 0 #define motor_a 0 #define motor_b 1 #define FORWARD 1 #define REVERSE 0 #define RIGHT 1 #define LEFT 0 void setup() pinmode(pwma,output); pinmode(ain1,output); pinmode(ain2,output); pinmode(pwmb,output); pinmode(bin1,output); pinmode(bin2,output); pinmode(stby,output); motor_standby(false); move //Must set STBY pin to HIGH in order to void loop() motor_drive(forward, 255); delay(1000); motor_stop(); delay(1000); motor_drive(reverse, 255); delay(1000); motor_stop(); delay(1000); //Turns off the outputs of the Motor Driver when true void motor_standby(char standby) if (standby == true) digitalwrite(stby,low); else digitalwrite(stby,high); DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 7

//============================================= //FUNCTIONS //============================================= //Stops the motors from spinning and locks the wheels void motor_stop() digitalwrite(ain1,1); digitalwrite(ain2,1); digitalwrite(pwma,low); //Controls the direction the motors turn, speed from 0(off) to 255(full speed) void motor_drive(char direction, unsigned char speed) if (direction == FORWARD) motor_control(motor_a, FORWARD, speed); //Control motor B Forward here else motor_control(motor_a, REVERSE, speed); //Control motor B Reverse here void motor_control(char motor, char direction, unsigned char speed) if (motor == motor_a) if (direction == FORWARD) digitalwrite(ain1,high); digitalwrite(ain2,low); else digitalwrite(ain1,low); digitalwrite(ain2,high); analogwrite(pwma,speed); //Write Motor B code here. 8. Verify your results by checking to see that the motor rotates in one direction, then in reverse. When facing the motor, it should rotate counter clockwise, then clockwise. DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 8

DEMO AND SCREENSHOTS: DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 9

PRELAB: 1. What is an H Bridge and why is it used? 2. Why do we have to use an external power supply to power the motors? EXPERIMENTS: Experiment 1 1. Wire the circuit and motor as mentioned in Operation section 2. Verify the operation of the motor 3. Demonstrate the results to the TA Experiment 2 1. Extend the circuit: a. Modify the code so that the motor operates based on PWMB and rotates clockwise at the full speed, and then counter clockwise at half the speed. 2. Demonstrate the results to the TA Experiment 3 3. Extend the circuit: a. Modify the design so that the DC motors is connected to BO1 and BO2. b. Make motors to spin in different directions at the same time 4. Demonstrate the results to the TA POSTLAB REPORT DELIVERIES Include the following elements in your postlab report: 1. Theory of operation a. List 3 types of electrical motors, with few sentences of explanation how each one works b. Provide a circuit that allows to change the direction of DC motor operation without rewiring and changing the direction of source current. 2. Results of the experiments For each experiment, include: a. The code that you developed for the experiment. Each line that was added must be highlighted and commented with the explanation of what is its meaning. b. Brief explanation how the goal of the experiment was reached c. Screenshots of the serial monitor with the values, presenting the operation of your code 3. Answer the questions: a. What are some advantages and disadvantages of brushed DC motors? b. Why DC motor cannot be connected directly to the analog pin of the Arduino? c. This lab uses functions in order to interface with the driver and DC motors. Research and write a short explanation what are the functions in programming. 4. Conclusions DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 10

a. Write down your conclusions, things learned, problems encountered during the lab and how they were solved, etc. DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING 11