Microcontrollers Module 4: Motion Control. Module Objectives Upon successful completion of this module, students will be able to: Give examples of microcontroller.

Slides:



Advertisements
Similar presentations
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Advertisements

IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
1 Lecture 1: Your Boe-Bot's Servo Motors Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation developed by: Martin.
Hardware Meets Software CPSC 120 Principles of Computer Science February 15, 2012.
Servos The material presented is taken from a variety of sources including:
EET 2261 Unit 13 Controlling Stepper Motors and Servos  Read Almy, Chapter 21.  Lab #13 due next week.  Final Exam next week.
1 Chapter 4: Controlling Motion Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A.
Components of a servomotor are: - a DC electric motor, - gears with an output shaft; - position-sensing mechanism; - control circuitry. Robotics and Automation.
L.
Living with the Lab Using servos with an Arduino EAS 199A Fall 2011.
SERVO MOTORS Tech Topic By Ryan Bidlack. Background A servo motor is composed of a DC, AC, or an AC induction motor and a feedback control. A servo motor.
ENGR 101: Robotics Lecture 2 – Text Programming Outline  Introduction to PBASIC  Variables, I/O, Arithmetic  Controlling the LEDs References 
SENIOR DESIGN 10/16.
1 Motors & Motor Controllers ECE AC or DC Motors AC –Few robots use AC except in factories –Most of those that use AC first convert to DC DC –Dominates.
Servo Motors # A servo is a motor that you can position at any angle very accurately. # Servos have a limited servo range; most servos have a range of.
1 Servo Motor. 2 Overview A servo motor is a motor that is only capable of rotating 180 degrees A servo motor is controlled by giving it an angle to proceed.
L.C. Technology Servo Motor Control / Genie Software
Applied Control Systems Robotics & Robotic Control
Manufacturing Advanced Design Applications Manufacturing © 2014 International Technology and Engineering Educators Association, STEM  Center for Teaching.
Controlling the Outside World
ELECTRIC MOTORS An Introduction to DC and Stepper Motors.
Working with Arduino: Lesson #4: Servos EGN1007. Learning Goals Learning Goals: The student will be able to: 1.Build a complete circuit using the Arduino.
10/10/ Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi. Objectives 1. Control the rotation of standard servo motor  A standard servo motor is limited in its rotation.
University of Tehran 1 Microprocessor System Design IO Applications Omid Fatemi
Last week’s project demos RC circuit with creative use of 7- segment display Demo in class tonight – don’t start on the next project until I’ve seen this.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
1 Lecture 1: Your Boe-Bot's Servo Motors Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation developed by: Martin.
IR Communication October 27, Sources  Lindsay, Andy. IR Remote for the Boe- Bot. v
Microcontrollers Module 3: Digital Display. 7 – Segment Display A seven-segment display (SSD), or seven- segment indicator, is a form of electronic display.
Servos The material presented is taken from a variety of sources including:
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Slide Menlo Drive Suite 100 Rocklin, CA Presentation based on: “What’s a Microcontroller?" by Andy Lindsay Presented by Andy.
ENGR 101: Robotics Lecture 3 – Robot Motion Outline  Robot Motion  FOR Loops  Making Music References 
Slide Menlo Drive Suite 100 Rocklin, CA
Digital Electronics The Boe-Bot and Servo Motors.
PROMGRAMING YOUR ROBOT How Servos Work: How to control your robot.
IN 1900 ICT Project Final Presentation. Group name : Code Squad.
PIC18F4431. PIC18F1330 Infrared Encoder/Decoder.
Analog Output Materials: animatronic head Processing Quiz HW: code links.
1 BOE-BOT Lecture #2 DE - Digital Electronics Servos and the BOE-BOT.
INTRODUCTION TO ROBOTICS Part 3: Propulsion System Robotics and Automation Copyright © Texas Education Agency, All rights reserved. 1.
Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw.
Project Description The Square D occupancy sensors use both ultrasonic and passive infrared technology (PIR) to detect occupancy in a room. This project.
Sitarambhai Naranjibhai Patel Institute Of Technology & R.C.
Limited rotation servo basics David Hall output shaft servo horn red wire = 5V + black wire = Gnd - white wire = control signal standard servo.
The “Board of Education” 1 Three-position switch 0 = OFF 1 = ON / wheels OFF 2 = ON / wheels ON breadboard (for building circuits) electrical power (V.
ARDUINO UNO The Arduino uno is a microcontroller board based on the ATmega328. It has 14 digital Input / Output pins (of which 6 can be used as PWM outputs),
Motors & Motor Controllers
Introduction to Motors, servos and steppers
Application Case Study Security Camera Controller
Group members MUHAMAAD DANISH 2015MC05 USMAN ALI JAT 2015MC14 MUREED SULTAN 2015MC18 AZAN ASHRAF 2015MC19 AYMEN.
Introduction to Servos
Servo Motor.
Using servos.
Automatic human detector garbage can.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Servos The material presented is taken from a variety of sources including:
Servos The material presented is taken from a variety of sources including:
IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Pulse Width Modulation (PWM) Motor Feedback - Shaft Encoder
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Servos The material presented is taken from a variety of sources including:
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi.
Controlling YOUR ROBOT
EET 2261 Unit 12 Controlling Stepper Motors and Servos
Karl Jean-Francois-James Madison H.S. & Eldiquen Mangubat-IS 232
UNIT 11: RC-SERVOMOTOR CONTROL
Servo Motor.
Presentation transcript:

Microcontrollers Module 4: Motion Control

Module Objectives Upon successful completion of this module, students will be able to: Give examples of microcontroller motion control applications. Explain the basics of servo motors and control. Program the BASIC Stamp Microcontroller to control the angle and speed of the Servo Motor.

Introduction to Motion Control Microcontrollers control the motion of many things in our daily lives; a few examples are given below: Printer head movement DVD and VCR mechanisms automatic doors Robotic movement

Microcontroller Motion Control Applications

The examples of motion devices/motors are as follows: DC Motors AC Motors Stepper Motors Servo Motors Instead of simple ON/OFF signals, most of these motion devices require very fast pulses of signals for position control or movement

Servo Motor The hobby servo or the Servo motor is the simplest and most directly useful of all DC motors could be controlled from the BASIC Stamp. A servo motor can be found in many devices that we use every day. Movement of the print head in an inkjet printer Automatic eject feature in VCR and DVD players. Opening and closing of automatic doors in shopping malls, hospitals and so on.

Unlike other motors, a servo motor does not have a continuous shaft Rotation can only rotate between two defined angles.

Servo Motor Control Since the control signal of the servo motor is separate from the power signal. all three wires should be connected as shown in Figure

Servo Motor Connection WireConnected toPurpose WhiteP14 or any other microcontroller output pin The control signal from the microcontroller will control the rotation of the motor towards a targeted angle RedVdd or +5VTo supply power to the motor BlackVssGround connection

A servo motor is controlled by very short high signalsor pulses spaced 20ms apart as illustrated in figure below. The duration of a pulse is between 1ms and 2ms.

The duration of the high signal determines the targeted angle the servo motor should be positioned at. For example, 1ms high signal duration causes the servo motor (red marked corner) to be positioned at angle zero degree, 1.5ms sets it at 45 degrees and 2ms sets the angle at 90 degrees as shown in figures

Motor rotationSignal durationTargeted angle I ms0 degrees 1.5 ms45 degrees 2ms90 degrees

Programming the BASIC Stamp for Servo Control PULSOUT Command: The PULSOUT command is used to send the signal to control the movement of the servomotor. The command syntax is as follows: PULSOUT pin, duration Pin: defines which I/O pin to use Duration: defines the duration of a single pulse in microseconds.

Note : The PULSOUT duration is in 2microsecond increments. 1  s = seconds  s = 1ms  s - Microsecond

Example The command PULSOUT 14, 750 would be sending a pulse that lasts 750 x 2  s = 1500  s or 1.5ms on pin 14

To calculate the duration if the time period is in ms, the following formula could be used: Duration = Time (ms) X 500 Time (ms)Duration 1 ms ms750 2 ms1000

The following program code could be used to generate 150 pulses, each of duration 1000 (or 2ms) with 20ms pauses.

Timing diagram

Exercise 1. Write the BASIC Stamp program code to generate 200 pulses, each of duration 1.5ms. 2. Write the BASIC Stamp program code to generate 150 pulses, each of duration 500

Solution - 1

DEBUGIN Command The DEBUGIN command is used to send a value from the debug terminal to the microcontroller, And the value is stored in the declared variable. Command Syntax: DEBUGIN DEC Variable

EXAMPLE In the command DEBUGIN DEC Pulses a decimal value will be sent from the debug terminal to be stored in the variable Pulses. DEC indicates that the value stored is a decimal number.

COMPARE DEBUG COMMAND AND DEBUGIN COMMAND DEBUG COMMAND DEBUGIN COMMAND