ALL TERRAIN ROBOT 1 Wilmer Arellano. The Client’s Need  Verbally presented at class time.  Modify the All Terrain Manual Robot into an autonomous Gripper.

Slides:



Advertisements
Similar presentations
Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
Advertisements

Servos The material presented is taken from a variety of sources including:
V EX C OACHES ' T RAINING October 12, Agenda for Today 9 – 10 AM : Tina Reeves and the Engineering Notebook 10 – Noon : Finish Building, Basic Robot.
Autonomy using Encoders Intro to Robotics. Goal Our new task is to navigate a labyrinth. But this time we will NOT use motor commands in conjunction with.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
ALL TERRAIN ROBOT 1 Wilmer Arellano © The Client’s Need Lecture is licensed under a Creative Commons Attribution 2.0 License.
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
Embedded Programming and Robotics Lesson 8 Light Sensors and Temperature/Humidity Light Sensors1.
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Microprocessors Tutorial 2: Arduino Robotics
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Testbed: Exercises.
Loops and Switches. 1. What kind of blocks are these? 2. Name two kinds of controls that can be specified to determine how long a loop repeats. 3. Give.
VEX Robotics Platform and ROBOTC Software
LEGO NXT Robot Programming Introduction to Programming a Lego NXT robot in Java.
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Weston Schreiber & Joshua Gabrielse Robotics Summer Training Programming #1: EasyC Basics.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
The George Washington University Department of ECE ECE 1010 Intro: Electrical & Computer Engineering –Introducing KIPR Link/Interface and Set-up –Continuation.
Programming Design ROBOTC Software Principles of Engineering
Vex Robotics Programming Options. To start you off and give you a safe "home base" to return to while you explore, a few key programs are already included.
Barclays Robot Challenge Learn how to Program Robots.
Servos The material presented is taken from a variety of sources including:
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
ROBOTIC ARM 2 Wilmer Arellano © Hardware  Next slide shows sensor connection to analog pin 0 and Motor 1 connection. Lecture is licensed under.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4/Lab3.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
Arxterra Telemetry Code Example is the Temperature Sensor from ATechTop Here is the setup subroutine of the original code from Sparkfun: #define TRUE 1.
Automated Mechanisms Help. Potentiometers Potentiometer Check –Analog Port 2 How they work –Analog sensor –Measures rotation of a shaft between 0 and.
Microcontrollers, Microcomputers, and Microprocessors
Programming - Motion Intro to Robotics. Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose.
Robot Project by Ahmad Shtaiyat Supervised by Dr. Salem Al-Agtash.
Vex Robotics Program Two: Using two motors. Program two: using the motors In the last section, you learned how to turn on one motor. Now, you will take.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
Vex Robotics program three: using motors and sensors together.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Mechanical Components and Programming Ken Youssefi Introduction to Engineering – E10 1.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
ME 120: Arduino Programming Arduino Programming Part II ME 120 Mechanical and Materials Engineering Portland State University
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Introduction to Arduino A very basic intro to Arduino, the IDE and the Servos class.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions?
Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw.
Robotics Grant Agreement No LLP UK-LEONARDO-LMP Project acronym: CLEM Project title: Cloud services for E-Learning in Mechatronics Technology.
Introduction to Programming in RobotC
INTRODUCTION TO ROBOTICS Part 5: Programming
Getting started with the Arxterra software and 3DoT Firmware
Dr. Kyung Eun Park Summer 2017
Program the robotic arm
ROBOTC for VEX Online Professional Development
Introduction to Programming
ROBOTC for VEX On-Site Professional Development
ROBOTC for VEX Online Professional Development
Arduino Uno and sensors
SArduino Training 2018 cho THPT Saigon Institute of Technology
Programming Design ROBOTC Software Computer Integrated Manufacturing
Basics for Robotics Programming
Programming - Motion Intro to Robotics.
Roller Coaster Design Project
Getting Started in RobotC
Automation and Robotics
Sasha Popov November 16, 2018 iRobot Create.
Download and Installation of code::blocks
UNIT 11: RC-SERVOMOTOR CONTROL
Programming Design ROBOTC Software Principles of Engineering
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

ALL TERRAIN ROBOT 1 Wilmer Arellano

The Client’s Need  Verbally presented at class time.  Modify the All Terrain Manual Robot into an autonomous Gripper Robot. When place in the starting point will spin until it finds one object in the court. The robot will move towards the object and grip it. The robot will spin 180 degrees and then move forward. The robot will stop and release the object at an unspecified distance

Background  This project is based on a library previously developed to control the motors of a robotic arm.  For this reason you will see programming references to object “arm” like: #include // Create an instance of Arm Arm arm(0);  And: arm.moveMotor(1, LEFT, 5, 10);

Hardware  Next slides shows sensor connection to analog pin 0 and Motor 1 connection.

Wire connections Image by Beder Bourahmah

Top half bridge connection Image by Beder Bourahmah

Bottom half bridge connection Image by Beder Bourahmah

Sensor Connection

H-Bridge

H-Bridge.r obotroom.com/HBridge.html This is just an example, we prefer to use the TC4422 in the T0-220 package which has higher Current capability but is single channel. You can order free samples from microchip

Precautions  The All Terrain Robot is a delicate device that may be damaged if operated beyond the mechanic limits  If while you program the All Terrain Robot operation you observe a motion behavior that may compromise the robot integrity disconnect power immediately. Center the All Terrain Robot with the manual remote and make any corrections necessary to your program

Installation  Download Library from:   Unzip library and drop it in:  The libraries folder of your arduino installation. In my case:  C:\arduino windows\arduino-1.0.1\libraries

 Include in your final report:  An explanation of a gear box operation. Particularize for the gear boxes you are using  How to measure power in a DC motor. Include several power measurements on the All Terrain Robot’s motors under different operating conditions

#include // Create an instance of Arm Arm arm(0); // Backward direction, Left and Down int LEFT = 0, DOWN = 0; // Forward direction, Right and Up int RIGHT = 1, UP = 1; int control = 1, temp; void setup() { Serial.begin(9600); Serial.println("Hello"); } void loop() { arm.checkData(); while(control > 0){ arm.moveMotor(1, LEFT, 5, 10); arm.moveMotor(1, RIGHT, 5, 10); control = control - 1; temp = arm.distance(); Serial.print("Distance: "); Serial.println(temp); }

Constructor  Include the library:  #include  Create an instance of the class:  Arm arm(int);  “int” tells the library where the distance sensor is connected.  #include  // Create an instance of Arm  Arm arm(0);

Create Mnemonics  // Backward direction, Left and Down  int LEFT = 0, DOWN = 0;  // Forward direction, Right and Up  int RIGHT = 1, UP = 1;

Initialize  int control = 1, temp;  void setup() {  Serial.begin(9600);  Serial.println("Hello");  }

Execute  void loop() {  arm.checkData();  while(control > 0){  arm.moveMotor(1, LEFT, 5, 10);  arm.moveMotor(1, RIGHT, 5, 10);  control = control - 1;  temp = arm.distance();  Serial.print("Distance: ");  Serial.println(temp);  }

Motor Control 1  arm.moveMotor (int motorID, int Direction, int Speed, int time)  Motor ID = 1, 2, 3, 4, 5  Direction = RIGHT, LLEFT  0 < Speed < 11  0 < time < 40  You may need to invert your motor connection for proper operation

Motor Control 2  arm.checkData()  This function with no arguments checks for serial data from the computer  Use the serial monitor of the Arduino IDE to control the arm  Type one or more commands and hit enter

Motor Control 2  Commands  Selection  a or A moves motor towards left  Motion  s or S moves motor towards right  w or W moves motor up  z or Z moves motor down  a, z and s, w are interchangeable  A single motion command will produce a small movement a sequence of several motion commands of the same type will produce an ampler motion

Distance measurement  temp = arm.distance();  When this function is called an integer is returned with approximate distance between the sensor and an object  Limitations  Max distance 80 cm  Object with a distance less than 10 cm will appear to be farther away

Functions  Functions are segments of code that are placed in a different location other than locations void setup() { } or void loop() { }  For example: void spin(){ // Your code }  Void indicates that the function does not return a calculated value

Functions  For example: void spin(){ // Your code }  When you want to execute function spin() you do a call to the function: spin();

Functions  Next we will modify the original code to:  Include functions  Add some delay to manually position the griper  Lines highlighted in red have change please read the comments.

#include Arm arm(0); // Creates an instance of Arm int LEFT = 0, DOWN = 0; // Backward direction, Left and Down int RIGHT = 1, UP = 1; // Forward direction, Right and Up int control = 1, temp; unsigned long start, finish; // variables to measure time void setup() { // We use this loop only as we want a single execution of the program Serial.begin(9600); Serial.println("Hello"); start = millis()/1000; // "millis()" returns current time in milliseconds finish = millis()/1000;// "start" and "finish" measure time in seconds. Why? while((finish - start) < 20){ // Wait for 20 seconds Serial.println(finish-start); arm.checkData(); // Use this time to position your grip manually finish = millis()/1000; // finish will increase in each iteration } spin(); // "spin()" is a function call it will execute the code between the braces of "void spin()" // Program will return here after executing the code of spin() } void loop() { } void spin(){ temp = arm.distance(); while(temp > 50){ // Replace the next comment lines with appropriated code // Move left motor forward // Move right motor backwards temp = arm.distance(); Serial.print("Distance: "); // This line is optional if you want to monitor distance in the computer Serial.println(temp); // This line is optional if you want to monitor distance in the computer }

void setup() { // We use this loop only as we want a single execution of the program Serial.begin(9600); Serial.println("Hello"); start = millis()/1000; // "millis()" returns current time in milliseconds finish = millis()/1000;// "start" and "finish" measure time in seconds. Why? while((finish - start) < 20){ // Wait for 20 seconds Serial.println(finish-start); arm.checkData(); // Use this time to position your grip manually finish = millis()/1000; // finish will increase in each iteration } spin(); // "spin()" is a function call it will execute the code between the braces of "void spin()" // Program will return here after executing the code of spin() // add more functions, like forward(); } void loop() { } void spin(){ temp = arm.distance(); while(temp > 50){ // Replace the next comment lines with appropriated code // Move left motor forward // Move right motor backwards temp = arm.distance(); Serial.print("Distance: "); // This line is optional if you want to monitor distance in the computer Serial.println(temp); // This line is optional if you want to monitor distance in the computer } void forward(){ temp = arm.distance(); while(temp > 17){ // Replace the next comment lines with appropriated code // Move left motor forward // Move right motor forward temp = arm.distance(); Serial.print("Distance: "); // This line is optional if you want to monitor distance in the computer Serial.println(temp); // This line is optional if you want to monitor distance in the computer }