Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

MODULE 9 – CONTROL SYSTEMS: MICROPROCESSOR CONTROL
Khaled A. Al-Utaibi Interfacing an LED The Light Emitting Diode (LED) Applications DC Characteristics & Operation Interfacing to.
EMS1EP Lecture 8 Pulse Width Modulation (PWM)
EMS1EP Lecture 9 Analog to Digital Conversion (ADC) Dr. Robert Ross.
Intermediate Electronics and Lilypad Where Electronics Meet Textiles Workshop with Lynne Bruning and Troy Robert Nachtigall Sponsored by Spark Fun and.
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
Embedded Sumo 1T4 – 1T5 UTRA.
Servos The material presented is taken from a variety of sources including:
Servos The material presented is taken from a variety of sources including:
Living with the Lab Using servos with an Arduino EAS 199A Fall 2011.
Secret Door Knock Detector
Introduction.
Microprocessors Tutorial 2: Arduino Robotics
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
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.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
Control Angle via Button Pushes One button increases angle. Other decreases angle. Both light LED.
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.
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:
Microprocessors Tutorial 1: Arduino Basics
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.
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
Servo Demonstration In MPIDE, select File > Examples > Servo > Sweep.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Robot Project by Ahmad Shtaiyat Supervised by Dr. Salem Al-Agtash.
Throttle Arduino RC Receiver Stock Golf Cart Motor Controller Motor 1 PWM signal: Voltage: 0 – 5V Period = 22ms Positive Pulse Width: 1ms – 2ms Digital.
Microcontroller basics Embedded systems for mortals.
:Blink Blink: Er. Sahil Khanna
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.
Electronic instrumentation Digitization of Analog Signal in TD
Pulse-Width Modulation: Simulating variable DC output
1 Microcontrollers. 2 Programmers work in the virtual world Machinery works in the physical world Microcontrollers connect the virtual and physical world.
Having fun with code, using Arduino in a middle school CS classroom
Application of Programming: Scratch & Arduino
Controlling Servos with the Arduino
Assist. Prof. Rassim Suliyev - SDU 2017
CU ATLAS Practical electronics Motion and Servos
Microcontroller basics
If you want to swing an robot arm or …
Introduction to Servos
Servo Motor.
Microprocessors Tutorial 1: Arduino Basics
Servos The material presented is taken from a variety of sources including:
Arduino.
Arduino - Introduction
Control a motors angular position with a flex sensor
Servos The material presented is taken from a variety of sources including:
Analog Input through POT
Servos The material presented is taken from a variety of sources including:
Introduction to Arduinos
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi.
Secret Door Knock Detector
Arduino : Introduction & Programming
Assist. Prof. Rassim Suliyev - SDU 2018
Sensors and actuators Sensors Resistive sensors
UNIT 11: RC-SERVOMOTOR CONTROL
Introduction to Arduinos
Pulse-Width Modulation: Simulating variable DC output
Servo Motor.
Presentation transcript:

Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons, throttle, landing gear…) Cars and trucks (steering) Boats (rudder, sail sheets) Servos are used with varying degrees of success on ROVs because they are not usually waterproof enough to withstand long periods at depth Nonetheless, they present some possibilities for ROV enthusiasts. Consider for example, camera tilt control in a sealed tube

How Servos Work Inside a servo case, the key components are: Control circuitry A motor driving reduction gears A potentiometer driven by the reduction gears that extends through the housing and drives the actuator An external control signal indicates the angle that the servo should move to and the motor responds by running until the potentiometer reaches the desired position A servo requires three wires, GND, power, and the control line

How Servos Work Motor Reduction gears Potentiometer Control circuit Actuator

Considerations in Selecting a Servo Hundreds of models of servo are available Selection parameters include Operating voltage (4.8-6V is typical but some run at 7.2V) Digital or analog (digital have better/faster positioning) Maximum torque Rotation speed Number of rotations (180° is typical but other ranges including multi-turn and continuous turn are available) Physical size Material gears are made of Material bearings are made of Waterproof???? Price

The R/C Servo Control Signal Communication of desired position is encoded as the width of a 0-5V digital pulse The pulse is repeated about 50 times each second The pulse varies between 1ms and 2ms 1ms is interpreted as fully one way and 2ms as fully in the other direction 1.5ms means position in the middle (or stop for continuous rotation)

The R/C Servo Control Signal 5V 0V 1ms2ms 20ms Pulse anywhere from 1-2msRepeat about every 20ms TIME (ms) VOLTAGE (V)

Controlling a Servo with an Arduino Arduino has functions available for controlling servos Servo functions are drawn from a Servo library Servos are positioned by setting a pin as a servo output and then sending a value from specifying the rotation required View Jeremy Blum’s Tutorial 5 for an example of how to program a servo using the ArduinoJeremy Blum’s Tutorial 5

Motor Control Using Servo Signals Many R/C hobby manufacturers have Electronic Speed Controllers (ESCs)that can control motor speed using servo signals Not all ESCs can drive a motor in reverse as is required for ROVs Ensure that the ESC is able to handle the voltage and current you require (note that references to cells should be interpreted as 1.2V/cell, i.e. NiCd battery cell voltages thus a 4 cell ESC is 4.8V) If you have an appropriate ESC, motor speed control is identical to servo control except that 1ms (value of 0 on Arduino) might be full reverse, 2ms (180 on Arduino) may be full forward while 1.5ms (90 on Arduino) is stopped. Of course there many other speeds are possible between these values

Test Your Knowledge Write an Arduino sketch to: Read an analog value from pin A0 Attach a potentiometer between 0 and 5V with the wiper connected to pin A0 (this could be another resistive sensor/resistor combination) Scale the analog value appropriately to control the brightness of an LED attached to pin 3 Scale the analog value appropriately to control the position of a servo attached to pin 9 (or equivalently the speed of a motor attached to an ESC controlled by the signal at this pin) Your sketch should be similar to the that on the following slide

//* AnalogReadSerialAnalogWriteServoOut Reads an analog input on pin 0, prints the result to the serial monitor. Analog input also sets servo position (orESC motor speed) and LED brightness Attach the center pin of a potentiometer (or other sensor/resistor combination) to pin A0, and the outside pins to +5V and ground. This example code is in the public domain. */ #include //tell C where to get the servo routines Servo demoServo; // define a variable of type Servo and call it demoServo int servoPin = 9; // we will use pin 9 for servo output (could also ESC) int led=3; //we will use pin 3 for analog write to change LED brightness // the setup routine runs once when you press reset: void setup() { Serial.begin(9600);// initialize serial communication at 9600 bits per second: demoServo.attach(servoPin); //initialize servo functions on pin named servoPin } // the loop routine runs over and over again forever: void loop() { int sensorValue = analogRead(A0);// read the input on analog pin 0: analogWrite(led,sensorValue/4); // scale to for analog write demoServo.write(sensorValue*180.0/1023.0); //scale to for servo Serial.println(sensorValue); // print out the value you read: delay(1); // delay in between reads for stability }