Living with the Lab Using servos with an Arduino EAS 199A Fall 2011.

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

EMS1EP Lecture 8 Pulse Width Modulation (PWM)
Welcome to Workshop 88’s Arduino 301: Control the World! Please have your Arduino, IDE, and breadboard fired up and ready to go. ver 1.0 2/2/14.
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.
IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Basic DC Motor Circuits
Using the servo library living with the lab Libraries are computer programs written to add functionality to Arduino programs. A library to control hobby.
Servos The material presented is taken from a variety of sources including:
Servos The material presented is taken from a variety of sources including:
Tony Yi 5/2/2015 CENG4480 TUTORIAL 3. ABOUT ME I am “the other” tutor of CENG4480 You can find me at Rm116 in SHB
L.
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.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
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.
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
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.
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.
Using Hobby Servos with the Arduino living with the lab © 2012 David Hall.
Servos The material presented is taken from a variety of sources including:
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
Arduino Training New Mexico Mathematics, Engineering, and Science Achievement (NM MESA) Getting Started.
SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. SERVOS Precise rotations.
Throttle Arduino RC Receiver Stock Golf Cart Motor Controller Motor 1 PWM signal: Voltage: 0 – 5V Period = 22ms Positive Pulse Width: 1ms – 2ms Digital.
Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
Robotics Grant Agreement No LLP UK-LEONARDO-LMP Project acronym: CLEM Project title: Cloud services for E-Learning in Mechatronics Technology.
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).
Limited rotation servo basics David Hall output shaft servo horn red wire = 5V + black wire = Gnd - white wire = control signal standard 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
ME 120: Arduino Programming Arduino Programming Part 1 ME 120 Mechanical and Materials Engineering Portland State University
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.
Microcontroller basics Embedded systems for mortals.
Robotics Grant Agreement No LLP UK-LEONARDO-LMP Project acronym: CLEM Project title: Cloud services for E-Learning in Mechatronics Technology.
Microcontroller basics
Introduction to Motors, servos and steppers
Controlling Servos with the Arduino
CU ATLAS Practical electronics Motion and Servos
Microcontroller basics
If you want to swing an robot arm or …
Introduction to Servos
Servo Motor.
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
Servos The material presented is taken from a variety of sources including:
Servos The material presented is taken from a variety of sources including:
Introduction to Arduinos
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi.
Chapter 5 Servomotor.
Controlling YOUR ROBOT
Secret Door Knock Detector
Arduino : Introduction & Programming
Assist. Prof. Rassim Suliyev - SDU 2018
Sensors and actuators Sensors Resistive sensors
Introduction to Motors
UNIT 11: RC-SERVOMOTOR CONTROL
Introduction to Arduinos
Pulse-Width Modulation: Simulating variable DC output
Servo Motor.
Presentation transcript:

Living with the Lab Using servos with an Arduino EAS 199A Fall 2011

Living with the Lab Learning Objectives Be able to identify characteristics that distinguish a servo and a DC motor Be able to describe the difference a conventional servo and a continuous rotation servo Be able to use the Arduino Servo library to control servo position

Living with the Lab References Information on Arduino Servo library: Additional descriptions of servos

Living with the Lab What is a servo? A servo-motor is an actuator with a built-in feedback mechanism that responds to a control signal by moving to and holding a position, or by moving at a continuous speed.

Living with the Lab DC Motors and Servos DC Motor Motion is continuous Speed controlled by applied voltage Servo Capable of holding a position Speed controlled by delay between position updates Hybrid of motor, gears and controller.

Living with the Lab Conventional and Continuous Rotation Two types of servos continuous rotation pulse tells servo which way to spin & how fast to spin pulse tells servo which position to hold standard can only rotate 180 degrees can rotate all the way around in either direction

Living with the Lab Control signal is a pulse train Pulse frequency is fixed Typical: 20 ms Pulse width determines position Typical: 1ms to 2 ms

Living with the Lab Servo components 1.Small DC motor 2.Gearbox with small plastic gears to reduce the RPM and increase output torque 3.Special electronics to interpret a pulse signal and deliver power to the motor

Living with the Lab Servo from the Sparkfun kit The micro servo from the Sparkfun Inventor’s kit is a conventional servo, i.e. the control signal results in moving the shaft to an angular position.

Living with the Lab Arduino Servo library handles the details Must connect servos on pin 9 or pin 10 From the Aduino web site: “…use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins”

Living with the Lab Three components of the Servo Library –Create the servo object Servo my_servo_object; –Attach the object my_servo_object.attach(servo_pi); –Send control signal my_servo_object.write(pos); Arduino Servo library handles the details Name of the object is like a variable name. attach and write are pre- defined methods that act on the servo object.

Living with the Lab Modified version of the sweep function // File: sweep_variable_wait // // Modified version of Sweep by BARRAGAN // Use variable dtwait to make the speed of sweep aparent #include // Make code in Servo.h available to this sketch Servo myservo; // Create servo object called "myservo" int servo_pin=9; // The servo must be attached to pin 9 or pin 10 void setup() { myservo.attach(servo_pin); // attaches the servo pin to myservo object } void loop() { int pos = 0; // variable to store the servo position int dtwait=15; // duration of wait at the end of each step for(pos = 0; pos < 180; pos += 1) { myservo.write(pos); // Move to position in variable 'pos' delay(dtwait); // wait dtwait for the servo to reach the position } for(pos = 180; pos>=1; pos -= 1) { myservo.write(pos); // Move to position in variable 'pos' delay(dtwait); // wait dtwait for the servo to reach the position }

Living with the Lab Experiment What happens when you adjust dtwait? Can adjust the sweep angle? –Make new variable to define end angle of the loop Open the Knob demo from the Arduino IDE –Connect a potentiometer to an analog input –Use the potentiometer to control the servo position