CMSC838. Tangible Interactive Assistant Professor Computer Science. Week 11 Lecture 20 April 9, 2015 Motors

Similar documents
Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

DC motor control using arduino

Schematics for Breakout Examples

Introduction to the Arduino Kit

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

combine regular DC-motors with a gear-box and an encoder/potentiometer to form a position control loop can only assume a limited range of angular

Adafruit 16-channel PWM/Servo Shield

Feed-back loop. open-loop. closed-loop

The Motor sketch. One Direction ON-OFF DC Motor

Adafruit 16-Channel PWM/Servo HAT & Bonnet for Raspberry Pi

Training Schedule. Robotic System Design using Arduino Platform

Adafruit 16-channel PWM/Servo Shield

CMSC838. Tangible Interactive Assistant Professor Computer Science

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

PWM CONTROL USING ARDUINO. Learn to Control DC Motor Speed and LED Brightness

Adafruit Motor Selection Guide

Adafruit Motor Selection Guide

Module: Arduino as Signal Generator

Lecture 6. Interfacing Digital and Analog Devices to Arduino. Intro to Arduino

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control

ARDUINO BASED DC MOTOR SPEED CONTROL

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

Bill of Materials: PWM Stepper Motor Driver PART NO

I 2 C RedBot & DC Motor Servo Motor Control

Adafruit 16-Channel Servo Driver with Arduino

LEDs and Sensors Part 2: Analog to Digital

LS7362 BRUSHLESS DC MOTOR COMMUTATOR / CONTROLLER

Lab Exercise 9: Stepper and Servo Motors

Arduino Application: Speed control of small DC Motors

o What happens if S1 and S2 or S3 and S4 are closed simultaneously? o Perform Motor Control, H-Bridges LAB 2 H-Bridges with SPST Switches

SMART Funded by The National Science Foundation

School of Engineering Mechatronics Engineering Department. Experim. ment no. 1

Hobby Servo Tutorial. Introduction. Sparkfun:

CMSC838. Tangible Interactive Assistant Professor Computer Science

Semiconductor 9/21/2015

Name & SID 1 : Name & SID 2:

Activity 4: Due before the lab during the week of Feb

Understanding RC Servos and DC Motors

FABO ACADEMY X ELECTRONIC DESIGN

Real Time Embedded Systems. Lecture 1 January 17, 2012

Electronics Design Laboratory Lecture #6. ECEN2270 Electronics Design Laboratory

Experiment (2) DC Motor Control (Direction and Speed)

Assembly Language. Topic 14 Motion Control. Stepper and Servo Motors

Adafruit 16-Channel PWM/Servo HAT for Raspberry Pi

Application Note #1216

Assignments from last week

Using Transistors and Driving Motors

L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

The Datasheet and Interfacing EE3376

Ametek, Inc. Rotron Technical Products Division. 100 East Erie St., Suite 200 Kent, Ohio User's Guide. Number Revision F

Micromouse Meeting #3 Lecture #2. Power Motors Encoders

가치창조기술. Motors need a lot of energy, especially cheap motors since they're less efficient.

Citrus Circuits Fall Workshop Series. Roborio and Sensors. Paul Ngo and Ellie Hass

Figure 1. Digilent DC Motor

of PWM is explained here. Consider a simple circuit as shown in figure below. DC Motor Speed Control using 555 Timer IC. The DC MOTOR SPEED.

1. Introduction to Analog I/O

Coding with Arduino to operate the prosthetic arm

Laboratory Exercise 1 Microcontroller Board with Driver Board

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

Adafruit 16-Channel Servo Driver with Arduino

Basics before Migtrating to Arduino

Pulse Width Modulation and

Pic-Convert Board Instructions

MICROCONTROLLER TUTORIAL II TIMERS

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

PiDi User Guide. Černyševského 26, Bratislava, SR. 04/2017 Rev. 0

Ocean Controls KT-5198 Dual Bidirectional DC Motor Speed Controller

Lecture 4: Basic Electronics. Lecture 4 Brief Introduction to Electronics and the Arduino

ABCs of Arduino. Kurt Turchan -

DeviceCraft Revision #1 11/29/2010

Attribution Thank you to Arduino and SparkFun for open source access to reference materials.

Electronics, Sensors, and Actuators

the Multifunctional DCC decoder for servo s and accessory s with Arduino for everybody (with a DCC central station)

Sensors and Motor Control Lab Individual lab report #1 October 16, 2015

1Getting Started SIK BINDER //3

PLC BASED RAILWAY LEVEL CROSSING GATE CONTROL

EE 314 Spring 2003 Microprocessor Systems

Analog Servo Drive BD15A8

PHASE BRUSHLESS DC MOTOR CONTROLLER/DRIVER FEATURES

LV8716QAGEVK Evaluation Kit User Guide

Community College of Allegheny County Unit 4 Page #1. Timers and PWM Motor Control

Advanced Mechatronics 1 st Mini Project. Remote Control Car. Jose Antonio De Gracia Gómez, Amartya Barua March, 25 th 2014

Feedback Devices. By John Mazurkiewicz. Baldor Electric

Exercise 2. The Buck Chopper EXERCISE OBJECTIVE DISCUSSION OUTLINE. The buck chopper DISCUSSION

MD03-50Volt 20Amp H Bridge Motor Drive

Index. n A. n B. n C. Base biasing transistor driver circuit, BCD-to-Decode IC, 44 46

DUAL STEPPER MOTOR DRIVER

Embedded Systems & Robotics (Winter Training Program) 6 Weeks/45 Days

3.5 hour Drawing Machines Workshop

PCB & Circuit Designing (Summer Training Program) 6 Weeks/ 45 Days PRESENTED BY

Npaq Series Drive Racks

DC-Motor Driver circuits

Sensors and Sensing Motors, Encoders and Motor Control

P15051: Robotic Eye for Eye Tracker

Command Set For EZController Model EZCTRL. Document Revision: A08 12/05/10

Installation Tech Note Dallas, Texas

DMC-8 (SKU#ROB )

Adafruit 16-Channel Servo Driver with Arduino

Page ENSC387 - Introduction to Electro-Mechanical Sensors and Actuators: Simon Fraser University Engineering Science

Administrative Notes. DC Motors; Torque and Gearing; Encoders; Motor Control. Today. Early DC Motors. Friday 1pm: Communications lecture

Transcription:

CMSC838 Tangible Interactive Computing Week 11 Lecture 20 April 9, 2015 Motors Human Computer Interaction Laboratory @jonfroehlich Assistant Professor Computer Science

TODAY S LEARNING GOALS 1. Learn about the three most common motor types: DC hobby motors, servo motors, and stepper motors 2. Learn how to interface with said motors using Arduino 3. Learn about common motor drivers like H-Bridges and the Arduino motor shields

One More Inspiration for MP4

ATMOSPHERE Created by CMSC838f Spring2014 Students Ruofei Du, Kent Wills, and Max Potasznik [source: https://youtu.be/w6fznohm72c]

MOTOR OVERVIEW

MEET THE MOTORS Created by Jeff Feddersen of NYU ITP [source: https://vimeo.com/84274150]

Pulse Width Modulation (PWM): A Quick Refresher

WHAT IS PULSE WIDTH MODULATION? Afrotechmods [source: https://youtu.be/ympzipfabyw]

ARDUINO: ANALOG OUT The Arduino UNO has 14 digital pins that can be used either as input or output (using the pinmode, digitalwrite, and digitalread functions). The pins operate at 5 volts. Each pin can provide or receive a maximum of 40mA and has an internal pull-up resistor, which is disconnected by default, of 20-50kOhms. 14 digital I/O pins: these pins can be used for either input or output (set the mode using the pinmode function). Some pins have special functions. For example, pins with the ~ symbol can be used to simulate analog output using pulse-width modulation (PWM). Other special functions are marked on this slide. Six of the Digital I/O pins can be configured for analog out (pins 3, 5, 6, 9, 10, & 11 on the Uno): Any pin with a ~ prefix can simulate analog output using 8-bit PWM with the analogwrite() function [sources: https://learn.sparkfun.com/tutorials/what-is-an-arduino; http://arduino.cc/en/main/arduinoboarduno; http://www.gammon.com.au/forum/?id=11473; https://learn.adafruit.com/arduino-tips-tricks-and-techniques/arduino-uno-faq]

ARDUINO ANALOGWRITE USES PULSE WIDTH MODULATION (PWM) The Arduino simulates analog output using PWM, which is very useful for controlling motors! Assume we are controlling analog pin 3. analogwrite(3, 13) 5% duty cycle Mean output: ~0.25V analogwrite(3, 128) 50% duty cycle Mean output: ~2.5V analogwrite(3, 225) 90% duty cycle Mean output: ~4.5V Approximately approximately every 1/490 of a second (490Hz), the Arduino generates a PWM pulse. The length of this pulse is controlled by the analogwrite function. So, analogwrite(0) will not produce a pulse, analogwrite(128) creates a pulse that lasts half of the cycle, and analogwrite(255) creates a pulse that lasts all the way until the next pulse (i.e., the output is on all the time) [sources: http://arduino.cc/en/reference/analogwrite; http://arduino.cc/en/tutorial/pwm; https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds/theory-pwm]

In-Class Exercises

IN-CLASS EXERCISES Today, we are going to walk through multiple motor exercises in class to familiarize ourselves with different types of motors and motor driver circuitry (e.g., H-Bridges and motor shields). Servo Motors Servo motors use PWM for precise control of angular position, velocity, and acceleration. Servo s also contain additional sensor circuity to sense position. http://goo.gl/anjekm DC Motors and H-Bridges Learn about the simplest type of motor the DC hobby motor and how to use an H- Bridge to control the motor s direction. http://goo.gl/dshdlj Stepper Motors Stepper motors divide a motor s full rotation into steps the motors position can be precisely controlled with these steps (assuming the maximum load is not exceeded). Unlike servor motors, typical steppers do not have built-in position feedback circuitry. http://goo.gl/tqxdsi [sources: https://learn.adafruit.com/adafruit-arduino-lesson-14-servo-motors; https://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing/parts; https://learn.adafruit.com/adafruit-arduino-lesson-16-stepper-motors]

Motor Drivers

ADAFRUIT EXERCISES USE A L293D H-BRIDGE, WHICH IS EQUIVALENT TO THE SN754410 [source: https://www.sparkfun.com/products/315]

SPARKFUN EASYDRIVER: STEPPER MOTOR DRIVER

ARDUINO MOTOR SHIELDS Because many motors have high current requirements (higher than individual ports can support on the arduino) and can cause problems with voltage spikes when a motor turns on and off, motor shields have become popular, easy-to-use boards for working with motors. Adafruit Motor Shield v2: $19.95 Drives up to 4 DC motors or 2 stepper motors using transistor-based drivers with 1.2A per channel and 3A peak current and a fully dedicated PWM driver chip http://www.adafruit.com/product/1438 Sparkfun Ardumoto Motor Shield: $24.95 Uses a L298 H-Bridge IC to control two DC motors up to 2A per channel https://www.sparkfun.com/products/9815

ADAFRUIT MOTOR SHIELD V2 TUTORIAL [source: https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/overview]

Slip Rings

FLASHGEAR Created by CMSC838f Students Jonggi Hong and Karthik Badam [source: http://cmsc838f-s15.wikispaces.com/flashgear]

At first glance, it may seem like the same long wires go from the Arduino to the LEDs

It s actually two sets of wires connected through a special device called a slip ring These wires rotate freely

HOW DO SLIP RINGS WORK? Output [source: http://www.bgbinnovation.com/engineeringanimation.html]

SLIP RING WITH FLANGE Sold by Adafruit: http://adafru.it/736 [source: https://vimeo.com/38377598]

ADAFRUIT SLIP RING EXAMPLES You can purchase slip rings in all sorts of varieties/configurations a few different examples are listed below. 6-Wire Slip Ring: $14.95 22mm diameter, 6 wires, max 240V @ 2A http://www.adafruit.com/products/736 12-Wire Slip Ring: $19.95 22mm diameter, 12 wires, max 240V @ 2A http://www.adafruit.com/products/1196 12-Wire Miniature Slip Ring: $24.95 12mm diameter, 12 wires, max 240V @ 2A http://www.adafruit.com/products/1195 [source: adafruit.com]

A BIT MORE ON SLIP RINGS The ITP Vimeo Channel has a quick 3 minute video on slip rings including using a barrel audio jacks or barrel power connectors for simple slip rings that only need a few connections [source: http://www.bgbinnovation.com/engineeringanimation.html]

More Great Resources

NYU ITP PHYSICAL COMPUTING VIDEO SERIES The NYU ITP Video series is now up to 74 videos (all short, ~5 min high-quality videos). The following are related to motors, which I encourage you to watch. The images/thumbnails are clickable. [source: https://vimeo.com/channels/pcomp/103165443]

NYU ITP VIDEO SERIES: BASIC CIRCUITS TO DRIVE MOTORS These videos cover basic ICs, like transistors and H-Bridges, that are commonly used to drive motors. The thumbnails are clickable. Intro to Using Transistors for Motors (3:53) Using a transistor and an external power supply to control a high load motor High Current Loads (5:12) How to use relays and transistors to control high loads like motors H-Bridges (4:27) An H-Bridge is an IC that enables you to reverse your supply voltage (and thus dynamically control a motor s direction).

NYU ITP VIDEO SERIES: SERVO MOTORS A servo motor allows for precise control of angular position, velocity, and acceleration. A servo consists of a motor coupled to a sensor for position feedback. Servo Motor (10:54) Basic introduction to servo motors

NYU ITP VIDEO SERIES: STEPPER MOTORS A stepper motor is a brushless DC electric motor that divides a rotation into equal steps. The motor s position can be commanded to move and hold at any of these steps without a feedback sensor. The thumbnails below are clickable. Stepper Motors: Types (3:01) Covers different types of stepper motors (5-wire stepper, 8-wire stepper, etc.) Stepper Motors: Unipolar Steppers (5:34) Covers different types of stepper motors (5-wire stepper, 8-wire stepper, etc.) Stepper Motors: Bipolar w/h-bridge (3:14) Using an H-Bridge with Bipolar (4-wire) stepper motors. Stepper Motors: Dedicated IC Drivers (6:54) To get the most out of a stepper motor, you will want to use a dedicated stepper motor IC. [source: https://vimeo.com/channels/pcomp/103165443; http://en.wikipedia.org/wiki/stepper_motor]