A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads:

Similar documents
Experiment 4.B. Position Control. ECEN 2270 Electronics Design Laboratory 1

Programming 2 Servos. Learn to connect and write code to control two servos.

Two Hour Robot. Lets build a Robot.

LED + Servo 2 devices, 1 Arduino

Introduction. 1 of 44

Lab 2: Blinkie Lab. Objectives. Materials. Theory

Programming a Servo. Servo. Red Wire. Black Wire. White Wire

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

Experiment 1: Robot Moves in 3ft squared makes sound and

FABO ACADEMY X ELECTRONIC DESIGN

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link).

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

ezsystem elab16m Light Sensing Robot

J. La Favre Using Arduino with Raspberry Pi February 7, 2018

The Motor sketch. One Direction ON-OFF DC Motor

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

Lab 06: Ohm s Law and Servo Motor Control

1. Controlling the DC Motors

Roborodentia Robot: Tektronix. Sean Yap Advisor: John Seng California Polytechnic State University, San Luis Obispo June 8th, 2016

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

The USELESS BOX. Procedure:

In this activity, you will program the BASIC Stamp to control the rotation of each of the Parallax pre-modified servos on the Boe-Bot.

RC Servo Interface. Figure Bipolar amplifier connected to a large DC motor

Controlling Your Robot

Objective of the lesson

Coding with Arduino to operate the prosthetic arm

Module: Arduino as Signal Generator

Rodni What will yours be?

Advanced Mechatronics 1 st Mini Project. Remote Control Car. Jose Antonio De Gracia Gómez, Amartya Barua March, 25 th 2014

Internet of Things Student STEM Project Jackson High School. Lesson 3: Arduino Solar Tracker

the Board of Education

Chapter 2: Your Boe-Bot's Servo Motors

MAE106 Laboratory Exercises Lab # 3 Open-loop control of a DC motor

100UF CAPACITOR POTENTIOMETER SERVO MOTOR MOTOR ARM. MALE HEADER PIN (3 pins) INGREDIENTS

Quantizer step: volts Input Voltage [V]

1. ASSEMBLING THE PCB 2. FLASH THE ZIP LEDs 3. BUILDING THE WHEELS

Pulse Width Modulation and

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

Students will design, program, and build a robot vehicle to traverse a maze in 30 seconds without touching any sidewalls or going out of bounds.

Parts List. Robotic Arm segments ¼ inch screws Cable XBEE module or Wifi module

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

Electronic Components

Adafruit 16-Channel Servo Driver with Arduino

Using Servos with an Arduino

Attribution Thank you to Arduino and SparkFun for open source access to reference materials.

PLAN DE FORMACIÓN EN LENGUAS EXTRANJERAS IN-57 Technology for ESO: Contents and Strategies

CURIE Academy, Summer 2014 Lab 2: Computer Engineering Software Perspective Sign-Off Sheet

Controlling motors with Arduino and Processing

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. S4A - Scratch for Arduino Workbook

Exam Practice Problems (3 Point Questions)

Figure 1. Digilent DC Motor

CONSTRUCTION GUIDE Capacitor, Transistor & Motorbike. Robobox. Level VII

TETRIX PULSE Workshop Guide

LESSONS Lesson 1. Microcontrollers and SBCs. The Big Idea: Lesson 1: Microcontrollers and SBCs. Background: What, precisely, is computer science?

Thinking Robotics: Teaching Robots to Make Decisions. Jeffrey R. Peters and Rushabh Patel

Breadboard Primer. Experience. Objective. No previous electronics experience is required.

INA169 Breakout Board Hookup Guide

Lesson 3: Arduino. Goals

Lab 2.4 Arduinos, Resistors, and Circuits

Demon Pumpkin APPROXIMATE TIME (EXCLUDING PREPARATION WORK): 1 HOUR PREREQUISITES: PART LIST:

Getting started with the SparkFun Inventor's Kit for Google's Science Journal App

How to Build the Robotics++ V2 Robot. Last Edited Nov

Electronics Merit Badge Kit Theory of Operation

You'll create a lamp that turns a light on and off when you touch a piece of conductive material

Intelligent Systems Design in a Non Engineering Curriculum. Embedded Systems Without Major Hardware Engineering

o What happens if S1 and S2 or S3 and S4 are closed simultaneously? o Perform Motor Control, H-Bridges LAB 2 H-Bridges with SPST Switches

CONSTRUCTION GUIDE Light Robot. Robobox. Level VI

introduction to Digital Electronics Install the Arduino IDE on your laptop if you haven t already!

Learning Objectives. References 10/26/11. Using servos with an Arduino. EAS 199A Fall 2011

Arduino Lesson 1. Blink. Created by Simon Monk

Part of: Inquiry Science with Dartmouth

Ultimatum. Robotics Unit Lesson 5. Overview

Experiment #3: Micro-controlled Movement

CPSC 226 Lab Four Spring 2018

Internet of Things Student STEM Project Jackson High School. Lesson 2: Arduino and LED

Arduino Workshop 01. AD32600 Physical Computing Prof. Fabian Winkler Fall 2014

.:Twisting:..:Potentiometers:.

The Fundamentals of Circuits

Unit 4: Robot Chassis Construction

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman

Lab 4: Analysis of the Stereo Amplifier

TV Remote. Discover Engineering. Youth Handouts

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Peek-a-BOO Kit JAMECO PART NO / / Experience Level: Beginner Time Required: 1+ hour

Lab 5: Inverted Pendulum PID Control

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

Assembly Manual for VFO Board 2 August 2018

The Robot Builder's Shield for Arduino

Saturday Academy Program

UNIT 4 VOCABULARY SKILLS WORK FUNCTIONS QUIZ. A detailed explanation about Arduino. What is Arduino? Listening

Arduino Setup & Flexing the ExBow

Workshops Elisava Introduction to programming and electronics (Scratch & Arduino)

The µbotino Microcontroller Board

Name & SID 1 : Name & SID 2:

Boe-Bot robot manual

For Experimenters and Educators

Transcription:

Project 4: Arduino Servos Part 1 Description: A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads: a. Red: Current b. Black: Ground c. White (Or Yellow): Signal White(Yellow): Signal Red: Current Black: Ground The Signal in an Arduino servo takes a range of values from 0 to 180: Note that the value of 90 will stop the Servo. During the lab, if the Servo does not stop at the value 90, use a small screwdriver and adjust the calibration (small dial on Servo) to have the Servo stop when at 90. In this lesson we will connect 1 Servo to the Arduino board and write code to turn the servo Clockwise and Counterclockwise. In Project 5 we will build a wheeled vehicle robot using two servos.

Process: 1. Remove the LED lights and Piezo Speakers from Projects 1,2, and 3. Make sure these are stored safely in the kit. 2. Remove the 330 Ohm resistors and store them in the required package. 3. Configure the Breadboard and Arduino to the following form:

4. We will now set up for Servo 1. Wire Pin 9 on Arduino to J12

5. We can now connect the Servo. a. Servo Black to Ground (Blue Rail) b. Servo Red to Current (Red Rail) c. Servo White to F12 (Signal)

6. Wire the 2 nd Servo: a. Run a white wire (Signal) from Arduino 10 to Breadboard J20. b. Servo White to Breadboard F20 (To carry signal to Pin 10). c. Servo Current to Red Rail. d. Servo Ground to Blue Rail.

7. Alternate wiring schematics: If you need to use the external batteries to power the servos, set up the circuit as follows: (Note that the External Battery will plug into the rails on the left side of the breadboard. Then the ground from the left side will connect to the ground of the Arduino. This provides a common ground between the batteries and the Arduino, allowing the signal to work.

Sketch Code: We will now program the Servos to move in the following manner: -forward for 2 seconds. Process: 1. Start your Arduino Sketch Program by clicking on the Sketch Icon. 2. Save the code by selecting File-Save and naming the program lastnameservos.

3. We want to set up the code by writing comments and defining the two required functions (void setup() and void loop()). 4. Now we need to include an #include statement to bring in the library for the Servo functions.

5. We will now declare the Servo objects (servoleft and servoright)

6. Next, we want to write a function that will spin both the wheels in the same direction. We will call this function forward. Note that servoleft is written to 180 and servoright is written to 0. This opposite writing calls will have the motors spin in opposite directions. When the motors are mounted onto a vehicle, this will have the vehicle move forward (or backward depending on the build).

7. We will now move to the setup() function and call the code to connect the servo objects to PINS 9 and 10.

8. We will now call the function forward() in the setup() function to have the servoleft and servoright spin.

9. Save the program and plug in your Arduino and Servo setup. Click the upload button to upload the code to the Arduino and run the program. The wheels should start spinning (and will keep spinning while the Arduino has power.)

10. We do not want the servos to spin without stopping. Write another function that will set the values of the servoleft and servoright to 90. This should stop the Servos.

11. We now will combine a delay() function call with the stopmotors() function to have the servos spin for 2 seconds and then stop.

12. Save and upload the code to the Arduino. The servos should spin and then stop. 13. Write the following functions for your Servos and test them with your Arduino. -backward() -turnright() -turnleft()

Other Ideas: -Add the other Servo to the system. The wiring should look something like this: - Write a procedure to control both motors at the same time. (Hint, use the Servo Write block) Vocabulary: Servo: An electric motor and encoder that work together to use a pulse width modulated signal to control direction and speed of motor. External Battery Pack: Provides additional power for motors or other devices in electronic device. Wired in separately from Arduino power.