UNIT 11: RC-SERVOMOTOR CONTROL

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

EMS1EP Lecture 8 Pulse Width Modulation (PWM)
Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,
Controlling Motors OBEY ME!. On-Off Control 1. Switch control.
Basic DC Motor Circuits
Servos The material presented is taken from a variety of sources including:
EML 2023 – Motor Control Lecture 4 – DAQ and Motor Controller.
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.
L.
Living with the Lab Using servos with an Arduino EAS 199A Fall 2011.
SENIOR DESIGN 10/16.
Servo Control Using Analog Signal Obtain “analog” input using analogRead().
Digital I/O Connecting to the Outside World
Introduction.
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
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.
Microcontrollers Module 4: Motion Control. Module Objectives Upon successful completion of this module, students will be able to: Give examples of microcontroller.
Applied Control Systems Robotics & Robotic Control
Manufacturing Advanced Design Applications Manufacturing © 2014 International Technology and Engineering Educators Association, STEM  Center for Teaching.
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
Overview What is Arduino? What is it used for? How to get started Demonstration Questions are welcome at any time.
STEPPER MOTORS Name: Mr.R.Anandaraj Designation: Associate. Professor Department: Electrical and Electronics Engineering Subject code :EC 6252 Year: II.
Servos The material presented is taken from a variety of sources including:
Microprocessors Tutorial 2: Arduino Robotics. Agenda 1. Robot Anatomy 2. Sensor Review 3. PWM 4. MAKE: Fade 5. Motors 6. H Bridge 7. Robot Control library.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
PWM: Pulse Width Modulation © 2014 Project Lead The Way, Inc.Digital Electronics.
SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. SERVOS Precise rotations.
Analog Output Materials: animatronic head Processing Quiz HW: code links.
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.
Istituto Tecnico Industriale A.Monaco EURLAB Moving a robot simple example program to control a DC-Motor Next - Press the button (left)
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.
DC motor principles Speed control Direction Stepper motor principles
Pulse-Width Modulation: Simulating variable DC output
Microcontroller basics Embedded systems for mortals.
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
Motors & Motor Controllers
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.
Servo’s and Motor’s with Arduino
simple example program to control a DC-Motor
Outline Introduction to digital-to-analog converter (DAC)
CU ATLAS Practical electronics Motion and Servos
Microcontroller basics
If you want to swing an robot arm or …
Introduction to Servos
Using servos.
Program the robotic arm
Servos The material presented is taken from a variety of sources including:
Arduino - Introduction
Control a motors angular position with a flex sensor
Electric Motors.
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:
Introduction to Arduinos
Secret Door Knock Detector
EET 2261 Unit 12 Controlling Stepper Motors and Servos
Arduino : Introduction & Programming
Assist. Prof. Rassim Suliyev - SDU 2018
Hitec HS 303: Robotic Servo Motor
UNIT 5 Analog signals.
Introduction to Arduinos
Pulse-Width Modulation: Simulating variable DC output
Servo Motor.
Presentation transcript:

UNIT 11: RC-SERVOMOTOR CONTROL

Aim and Agenda of unit 11 Give the basic ideas and simple examples for driving rc-servomotors with Arduino The aim of the presentation The agenda of the presentation Explain what is an rc-servomotor Analyze the anatomy of an rc-servomotor Give information about the several types of rc-servomotors Explain the idea of the Pulse Width Modulation (PWM) signal Give the basic control scheme of an RC-servo motor Utilize the “SERVO” Library to Control the rc-servomotor 2

The anatomy of an rc-servomotor SHAFT GEAR TRAIN DC MOTOR CONTROLS These mechanisms are similar to a conventional motor but they are able to make turns or controlled movements in any direction and in any position within their operational range. They are used in robotics and manufacturing: to move and turn a robot’s arm, to open and close a valve, to move an implement or tool, to position an object and many other applications. 3

Servo Components: Best vs Good Parts 4

Types of rc-servo wire codes We need only three leads to connect up our servo. We connect the black lead to the GND port or the 0 V power port and the red one to the +5 V power port. The PWM control signal goes through the white lead. Our Arduino will generate this signal of course. You’ll find lots of manufacturers, types and models of servos. There are different sizes, strengths or torques, speeds, supply voltages, types of shafts and travels. There are servos with shafts that can rotate freely and others with shafts that can only rotate a certain number of degrees. The one we’re going to use in these exercises can rotate 180º. The servo is controlled by sending a PWM signal through the Signal cable. 5

Explain the PWM signal (Pulse Width Modulation) Arduino lacks a true analog output PWM is a technique of rapidly pulsing the power on and off Use Pulse-width modulation (PWM) to simulate a variable DC supply voltage Arduino Uno has 6 PWM pins: 3, 5, 6, 9, 10, 11 Command: analogWrite(pin, value) value is duty cycle: between 0 and 255 Examples: analogWrite(9, 256*1/2) for a 50% duty cycle analogWrite(11, 256*1/4) for a 25% duty cycle PWM, or pulse width modulation is a technique which allows us to adjust the average value of the voltage that’s going to the electronic device by turning on and off the power at a fast rate. The average voltage depends on the duty cycle, or the amount of time the signal is ON versus the amount of time the signal is OFF in a single period of time.

Control the rc-servomotor with a PWM signal (Pulse Width Modulation) The servo is controlled by sending a PWM signal through an appropriate pin of arduino. The duty cycle of the signal determines the position the shaft moves to or its rotation. It’s essential to follow the guidelines supplied by each particular model’s manufacturer but here’s an example in the figure below that may be of use.

Control the rc-servomotor with the “SERVO” Library The library is called “Servo”. It’s a file called “Servo.h” provided by Arduino; it installed itself automatically with the IDE or Integrated Development Environment. In other words, it’s already in your computer. If you include this file in your programs, you’ve enriched the Arduino programming language by integrating new functions in it. Functions that are utilized by the “SERVO” library for Arduino #include <servo.h> servo my_servo_1 Assign a name to your servo my_servo_1.attach (pin, min, max) Assign the pin you are going to connect the servo with min and max duty cycle) my_servo_1.writeMicroseconds(uS) Generates a PWM signal with a duty cycle in microseconds (uS) that will set the angle of the servo’s shaft my_servo_1.write(value) Move servo in the angle value between 0º and 180º my_servo_1.read() This function reads the current angle of the servo’s shaft which is actually the value passed to the last call to write() my_servo_1.attached() This function checks whether or not the Servo variable is attached to a pin. It returns a “true” or “false”. my_servo_1.detach() This function detaches the Servo variable from its pin. To control the stepper, apply voltage to each of the coils in a specific sequence. The sequence would go like this: Change the polarity of the coils with a predefined way, bear in mind the basic idea we described at the beginning of the lecture BIPOLAR exert more torque for the same current, it is prefared, but more complicated circuit Same circuit Same programm