3-11-2015 1 Microprocessoren lesson 6. PWM /motor control/servo.

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

EMS1EP Lecture 8 Pulse Width Modulation (PWM)
More fun with Timer/Counters
Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,
ECT 357 Ch 16 Output Control. Today’s Quote: The measure of a man is not how great his faith is bt how great his love is. The measure of a man is not.
 Problem/Need Statement  Concepts & Renderings  Requirements  User Interface  Market Survey  Risks  Schedule  Work Breakdown  Deliverables.
Done by : Mohammad Al-awad Fathe Hindi Supervisors : Dr. Raed Al-qadi Dr. Luai Malhis Graduation Project 2014.
Servos The material presented is taken from a variety of sources including:
Steering Servo How to control the car heading via a steering servo Team: //noComment Leader : Christian Software Specialist : Matt Hardware Specialist.
Servos The material presented is taken from a variety of sources including:
L.
Active Suspension System Test Platform Bradley University Department of Electrical & Computer Engineering By: Craig Chan & Olusegun Michael Abidoye Advisor:
5-1 Timer/Counters In many microprocessor systems we need to:  count logic pulses  measure the frequency of signals  measure the period of pulses 
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Secret Door Knock Detector
Servo motor angle rotation control by adjusting PWM ratio.
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.
L.C. Technology Servo Motor Control / Genie Software
 Problem/Need Statement  System Requirements  System Analysis  Functional Decomposition  Concept Renderings  Market Survey  Risks.
Power Bot Group 2 Luke Cremerius Jerald Slatko Marcel Michael Tarik Ait El Fkih Sponsored By: Aeronix Inc.
V 0.21 Timers A timer on a  C is simply a counter The input clock frequency to a timer can be prescaled so that it is some fraction of the system clock.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
PWM ECE 4437-EMBEDDED SYSTEMS DR. GLOVER CHRISTOPHER AHN & KHOA VAN.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
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.
Pulse Width Modulation (PWM). 100% Pulse Width Modulation (PWM) 0% On the chipKIT there are 490 periods per second. Use analogWrite(pin, value) to control.
Time Measurement Capture Mode of the Capture/Compare/PWM module is used for time measurement. TMR1 or TMR3 16-bit value transferred to 16-bit capture.
CCP MODULES  The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.  Capture Mode provides.
Xtreme Robot Olympiad Programming Basics Dr. Peter Laz Associate Professor Department of Engineering University of Denver.
1 68HC11 Timer Chapter HC11 Timer Subsystem Several timing functions: Basic timing Basic timing Real time interrupts Real time interrupts Output.
Servos The material presented is taken from a variety of sources including:
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Chapter 4 Standard Single Purpose Processors: Peripherals.
Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
S4525A Peripherals & Enhanced FLASH 1 © 1999 Microchip Technology Incorporated. All Rights Reserved. S4525A Peripherals & Enhanced FLASH 1 Peripherals.
PIC18F4431. PIC18F1330 Infrared Encoder/Decoder.
PULSE WIDITH MODULATION EE 587 Presented by Viswanadha Kakarlapudi.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
PWM: Pulse Width Modulation © 2014 Project Lead The Way, Inc.Digital Electronics.
Seth Schwiethale James Crosetto James Ellison.  square pulse of ms, repeats every 20 ms  It is the same for both steering and acceleration 
Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw.
Istituto Tecnico Industriale A.Monaco EURLAB Control a Servo Motor If you want to swing an robot arm or … steer a robot you need a special motor (Servo).
INTERNET OF EVERYTHING SDU 2016 Week 9. Physical Output  Make things move by controlling motors with Arduino  Servo-motors  Rotary actuator that allows.
Microcontroller basics Embedded systems for mortals.
TIMERS.
Team 7 Chaofan Chen Dhruvmin Gandhi Larry Gerhardt Pulse-width Modulation with the TIVA C.
Microcontroller basics
Introduction to Motors, servos and steppers
DC Motors DC Motors are widely used in robotics because of their small size and high energy output. Key characteristics of DC motors include: 1. High Speed.
Why are Timer Functions Important?
Servos Elementary Robotics with Servos
Application Case Study Security Camera Controller
Microcontroller basics
Timers and Event Counters
PWM and DC Motor Control
Servos The material presented is taken from a variety of sources including:
Arduino - Introduction
AVR Addressing Modes Subject: Microcontoller & Interfacing
Servos The material presented is taken from a variety of sources including:
Pulse Width Modulation (PWM) Motor Feedback - Shaft Encoder
Servos The material presented is taken from a variety of sources including:
PWM and DC Motor Control
ECE 354 Computer Systems Lab II
PIC18 Timer Programming “Explain the assembly language programming for the timer and counter module”
Figure CCP1 Control Register
Hitec HS 303: Robotic Servo Motor
UNIT 11: RC-SERVOMOTOR CONTROL
Timers Chapter 2.
Presentation transcript:

Microprocessoren lesson 6. PWM /motor control/servo

PWM Power control: Motor control Light Dimmer Servo control Example applications PWM

PWM 2

PWM 3

PWM 4 Equations

Summary registers pwm

PWM 5 setup 1. Configure the PWM pins P1A and P1B (and P1C and P1D, if used) as inputs by setting the corresponding TRISC bits. 2. Set the PWM period by loading the PR2 register. 3. Configure the ECCP module for the desired PWM mode and configuration by loading the CCP1CON register with the appropriate values: Select one of the available output configurations and direction with the P1M bits. Select the polarities of the PWM output signals with the CCP1M bits. 4. Set the PWM duty cycle by loading the CCPR1L register and CCP1CON bits. 5. For Half-bridge Output mode, set the dead band delay by loading PWM1CON with the appropriate value. 6. If auto-shutdown operation is required, load the ECCPAS register: Select the auto-shutdown sources using the ECCPAS bits. Select the shutdown states of the PWM output pins using PSSAC and PSSBD bits. Set the ECCPASE bit (ECCPAS ). Configure the comparators using the CMCON0 register (Register 8-1). Configure the comparator inputs as analog inputs. 7. If auto-restart operation is required, set the PRSEN bit (PWM1CON ). 8. Configure and start TMR2: Clear the TMR2 interrupt flag bit by clearing the TMR2IF bit (PIR1 ). Set the TMR2 prescale value by loading the T2CKPS bits (T2CON ). Enable Timer2 by setting the TMR2ON bit (T2CON ). 9. Enable PWM outputs after a new PWM cycle has started: Wait until TMR2 overflows (TMR2IF bit is set). Enable the CCP1/P1A, P1B, P1C and/or P1Dpin outputs by clearing the respective TRISCBits Clear the ECCPASE bit (ECCPAS ).

Servo

Servo 2 Controlled by sending a pulse of variable width Maximum and minimum pulse width to give the angle (1.5 ms neutral position) Repetition rate (20ms) The pulse must repeated till angle is reached, after that to stay in that position it has to repeated too < 1.5ms counterclockwise > 1.5 ms clockwise Pulse is generally between 1 and 2 ms Turn rate: time it takes from one position to another. This can take seconds.

Servo 3

Servo 4

Servo specifications Control System: +Pulse Width Control 1500usec Neutral Required Pulse: 3-5 Volt Peak to Peak Square Wave Operating Voltage: Volts Operating Temperature Range: -20 to +60 Degree C Operating Speed (4.8V): 0.16sec/60 degrees at no load Operating Speed (6.0V): 0.13sec/60 degrees at no load Stall Torque (4.8V): oz/in. (5.5kg.cm) Stall Torque (6.0V): oz/in. (6.8kg.cm) Operating Angle: 45 Deg. one side pulse traveling 400usec 360 Modifiable: Yes Direction: Clockwise/Pulse Traveling 1500 to 1900usec Current Drain (4.8V): 8.8mA/idle and 400mA no load operating Current Drain (6.0V): 9.1mA/idle and 500mA no load operating Dead Band Width: 8usec Motor Type: 3 Pole Ferrite Potentiometer Drive: Indirect Drive Bearing Type: Dual Ball Bearing Gear Type: 3 Metal Gears and 1 Resin Metal Gear Connector Wire Length: 11.81" (300mm) Dimensions: 1.59" x 0.77"x 1.48" (40.6 x 19.8 x 37.8mm) Weight: 1.94oz. (55.2g)

Practical lesson 7 Choice 1 or 2 1.Write a program which turns over the analogue value of a pot meter into the speed of an engine using PWM. 2. Write a program which turns over the analogue value of a pot meter into the position of a servo- engine using PWM.. Assignment 6