Arduino and Servo Motor

Similar documents
Introduction: Components used:

Robotic Arm Assembly Instructions

Marine Debris Cleaner Phase 1 Navigation

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

Lesson4 Obstacle avoidance car

Arduino: Sensors for Fun and Non Profit

About Arduino: About keyestudio:

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

LED + Servo 2 devices, 1 Arduino

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

Using Servos with an Arduino

Lab 06: Ohm s Law and Servo Motor Control

1. Introduction to Analog I/O

Sensor and. Motor Control Lab. Abhishek Bhatia. Individual Lab Report #1

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

PROJECT BAT-EYE. Developing an Economic System that can give a Blind Person Basic Spatial Awareness and Object Identification.

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

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

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

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

Arduino Advanced Projects

NAMASKAR ROBOT-WHICH PROVIDES SERVICE

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

keyestudio keyestudio Mini Tank Robot

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

Sten BOT Robot Kit 1 Stensat Group LLC, Copyright 2016

Two Hour Robot. Lets build a Robot.

Coding with Arduino to operate the prosthetic arm

Operating Mode: Serial; (PWM) passive control mode; Autonomous Mode; On/OFF Mode

Analog Feedback Servos

Solid Modelling Interaction with Sensors for Virtual Reality Welding

Keywords - Arduino Uno, Ultrasonic Sensor, DC-DC Boost Convertor, Wireless Charging Pad, Piezo Buzzer

CONSTRUCTION GUIDE Light Robot. Robobox. Level VI

FABO ACADEMY X ELECTRONIC DESIGN

Lecture 6. Interfacing Digital and Analog Devices to Arduino. Intro to Arduino

Figure 1. Digilent DC Motor

C++ PROGRAM FOR DRIVING OF AN AGRICOL ROBOT

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

URM37 V3.2 Ultrasonic Sensor (SKU:SEN0001)

Servo Sweep. Learn to make a regular Servo move in a sweeping motion.

Assignments from last week

Arduino Sensor Beginners Guide

Safe Landing of Autonomous Amphibious Unmanned Aerial Vehicle on Water

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

Arduino as a tool for physics experiments

4WD Mobile Platform SKU:ROB0022

SCHOOL OF TECHNOLOGY AND PUBLIC MANAGEMENT ENGINEERING TECHNOLOGY DEPARTMENT

Lesson 13. The Big Idea: Lesson 13: Infrared Transmitters

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

Application Note AN 157: Arduino UART Interface to TelAire T6613 CO2 Sensor

URM37 Ultrasonik Mesafe Sensörü - Arduino - Raspberry Pi - LattePanda Uyumlu - DFRobot

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

Let's Code Blacksburg's Arduino Cookbook

Design with Microprocessors Year III Computer Science 1-st Semester

Rodni What will yours be?

The Robot Builder's Shield for Arduino

Control Robotics Arm with EduCake

1. Controlling the DC Motors

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

Project 27 Joystick Servo Control

Arduino Digital Out_QUICK RECAP

Servomotor Control with Arduino Integrated Development Environment. Application Notes. Bingyang Wu Mar 27, Introduction

Disclaimer. Arduino Hands-On 2 CS5968 / ART4455 9/1/10. ! Many of these slides are mine. ! But, some are stolen from various places on the web

Community College of Allegheny County Unit 7 Page #1. Analog to Digital

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

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

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

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

The µbotino Microcontroller Board

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

PHYSICS 124 PROJECT REPORT Kayleigh Brook and Zulfar Ghulam-Jelani

Grove - Infrared Receiver

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

Arduino. AS220 Workshop. Part II Interactive Design with advanced Transducers Lutz Hamel

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

INA169 Breakout Board Hookup Guide

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

Basics before Migtrating to Arduino

EGG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Grove - I2C Color Sensor User Manual

Nature Methods: doi: /nmeth Supplementary Figure 1. Comparison of static and awake mobile fus

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

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

B RoboClaw 2 Channel 30A Motor Controller Data Sheet

TWEAK THE ARDUINO LOGO

Adafruit 16-Channel Servo Driver with Arduino

Motors and Servos Part 2: DC Motors

Sunday, November 4, The LadyUno Sound Unit

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

Arduino Application: Speed control of small DC Motors

DATASHEET. Amicrosystems AMI-AD1224 HIGH PRECISION CURRENT-TO-DIGITAL CONVERSION MODULE PRODUCT DESCRIPTION FEATURES

Lecture 4: Basic Electronics. Lecture 4 Brief Introduction to Electronics and the Arduino

Application Note. Communication between arduino and IMU Software capturing the data

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

Feed-back loop. open-loop. closed-loop

DESIGN AND FABRICATION OF BLIND SHOE USING ATMEGA328 MICRO CONTROLLER AND VIBRATION MOTOR

APDS-9960 RGB and Gesture Sensor Hookup Guide

Community College of Allegheny County Unit 4 Page #1. Timers and PWM Motor Control

USER MANUAL SERIAL IR SENSOR ARRAY5

Available online Journal of Scientific and Engineering Research, 2018, 5(4): Research Article

Transcription:

Arduino and Servo Motor 1. Basics of the Arduino Board and Arduino a. Arduino is a mini computer that can input and output data using the digital and analog pins

b. Arduino Shield: mounts on top of Arduino Uno board lining up the pins. The use of the shield is to expand the flexibility of the Arduino Uno board. 2. Link the Arduino Shield on top of the Arduino Board linking the proper pins to each port

3. Motor Movement: Servo motor movements are rated 0 to 180 degrees a. 0 = Clockwise b. 90 = Neutral position (NOT Turned OFF; Idle) to turn a motor off servo.detach (); needs to be used c. 180 = Counter Clockwise 180 90 0 One can adjust speed and turning based upon delay commands and by attaching and detaching the motor from the Arduino board Command Attached: Electricity flow to the motor Detach: Electricity flow is cut off to the motor 4. Servo Wires Wires: Use Servo Motor Wire to Female End to connect to the board Wire the Motor to the Arduino Shield in Pin Row 4 Colors Brown or Black= Ground (G) Red or Red= Voltage (V) Orange or White= Signal (S) 5. Ultrasonic Sensor Wires: Use Four (4) Female to Female wire connectors Wire the Following Follow the proper color set Ultrasonic Sensor Arduino Board Pin Row Ground (GND) G 9 Volt (VCC) V 9 Echo S 9 Trig S 10 Show Mr. Jourden to make sure all wires are connected properly before suppling power to the unit

Program: Servo Motor Sweeping Angles #include <Servo.h> int servopin = 4; //Links Pin 4 on Aruindo board. So the pin# only has to be changed in //one location Servo myservo; int angle = 0; // servo position in degrees void setup() myservo.attach(servopin); void loop() // scan from 0 to 180 degrees for(int angle = 0; angle < 180; angle++) myservo.write(angle); delay(15); // now scan back from 180 to 0 degrees for(int angle = 180; angle > 0; angle--) myservo.write(angle); delay(15); Explore: Goal: Attempt to slow down the motor speed. Experiment with the program by modifying the delays and angle measures to see how the motor reacts. (I.E servo.write (45); or for statement angle <45); To turn motor off use servo.detach (); (Where servo is the variable name of the servo motor )

Program: Motor with Ultrasonic #include <Servo.h> Servo myservo; //ultrasonic sensor attach to pins. trigpin sends single out, echopin receives single in const int trigpin = 8; const int echopin = 9; int servopin = 4; void setup() myservo.attach(servopin); //attaches servo motor to the Arduino board Serial.begin(9600); // connects serial monitor to board to output data void loop() long duration, inches; // variables that will be used to calculate //Sends out signal for ultrasonic sensor by pulsating sound waves pinmode(trigpin, OUTPUT); digitalwrite(trigpin, LOW); delaymicroseconds(2); digitalwrite(trigpin, HIGH); delaymicroseconds(10); digitalwrite(trigpin, LOW); //calculates the duration the sound wave takes to come back to sensor duration = pulsein(echopin, HIGH); // converts duration (Sound) to inches // sends data to a function (subroutine) to calculate distance inches = microsecondstoinches(duration); Serial.print ("Inches="); Serial.println (inches); //Turning the motor on/off // Writing to motor 0 = Full Speed Forward; 180 = Full Speed Reverse; 90 = Mid Point of motor (idle) if (inches >2) myservo.attach(servopin); myservo.write(0); delay(1000); else // Detach disconnects the motor from the Arduino Board; Allowing the motor to turn off myservo.detach(); delay(1000); long microsecondstoinches(long microseconds) // Function is a sub program that can be utilized in many parts of the program without rewriting the code. // The Return Function returns a value of microseconds to the main program body return microseconds / 74 / 2;