techknowtone contents: servo features servo connections coding library sample sketch questions...

6
TechKnowTone Contents: Servo Features Servo Connections Coding Library Sample Sketch • Questions …Applications… rduino Coding – Servo Motors

Upload: cecilia-williams

Post on 24-Dec-2015

248 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TechKnowTone Contents: Servo Features Servo Connections Coding Library Sample Sketch Questions …Applications… Arduino Coding – Servo Motors

TechKnowTone

Contents:• Servo Features• Servo Connections• Coding Library• Sample Sketch• Questions

…Applications…

Arduino Coding – Servo Motors

Page 2: TechKnowTone Contents: Servo Features Servo Connections Coding Library Sample Sketch Questions …Applications… Arduino Coding – Servo Motors

TechKnowTone…Servo Features…

Applications:

Page 3: TechKnowTone Contents: Servo Features Servo Connections Coding Library Sample Sketch Questions …Applications… Arduino Coding – Servo Motors

TechKnowTone…Servo Connections…

Servo Features

3 wires:• GND• +5v• Control

Mounting

ControlArm

• Half-turn or Continuous• 3-wire connection (4.8 – 6.2v)• Control arm on drive shaft• PWM proportional control signal• Easy to use?

• PWM must to be continuous• 90° centre point & gain not guaranteed• Trimming normally required• Load dependant drive current• USB power may not be sufficient

Page 4: TechKnowTone Contents: Servo Features Servo Connections Coding Library Sample Sketch Questions …Applications… Arduino Coding – Servo Motors

TechKnowTone…Servo Library…

Servo Connections

• Remove power before wiring• Pot wiper connected to analogue A0• Servo control on digital pin 2

If servo draws too much current:• Connect a separate 5v supply• Make common GND connections

Potentiometer10KΩ

B

W

WYHP 5V USBDC 7V-24V to 5V 3A

DC 5V 2A

Page 5: TechKnowTone Contents: Servo Features Servo Connections Coding Library Sample Sketch Questions …Applications… Arduino Coding – Servo Motors

TechKnowTone…Sample Sketch…

Servo Library

Page 6: TechKnowTone Contents: Servo Features Servo Connections Coding Library Sample Sketch Questions …Applications… Arduino Coding – Servo Motors

TechKnowTone…End…

Sample Sketch

Note:• servo.writeMicroseconds(value)• Gives finer control.• 1500 µs for centre position• Range 1000 – 2000 nominal