ALL TERRAIN ROBOT 1 Wilmer Arellano © 2013. The Client’s Need Lecture is licensed under a Creative Commons Attribution 2.0 License.

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

Using the servo library living with the lab Libraries are computer programs written to add functionality to Arduino programs. A library to control hobby.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
Efficient Path Determining Robot RIT Computer Engineering Senior Design Project Jamie Greenberg Jason Torre October 26, 2004 A motorized robot will navigate.
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
Embedded Programming and Robotics Lesson 8 Light Sensors and Temperature/Humidity Light Sensors1.
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.
VEX Robotics Platform and ROBOTC Software
Digital Logic and State Machine Design Installing Xilinx WebPACK 12.4 CS 2204 Digital Hardware.
LEGO NXT Robot Programming Introduction to Programming a Lego NXT robot in Java.
How to Download and Install a Sharp Print Driver on a Mac.
Github & Arduino How To: Post On Github How To: Download from Github How To: Upload Code Downloaded from Github to Arduino Tommy Sanchez EE400D Spring.
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.
High Speed Data Converter University
GEN IV IP NVR Setup And Instructions. Playback Recordings 1)Click and select your device 2)Select Camera in next box a) To select more then one camera.
Bluetooth Controller Setting up the BT controller and Arduino with Processing.
Otasuke GP-EX! Chapter 11 GP-Viewer EX
7.2 V battery pack and charger Put the battery in the charger station at the end of the lab. period. Red light indicates charging. Ken Youssefi Introduction.
The George Washington University Department of ECE ECE 1010 Intro: Electrical & Computer Engineering –Introducing KIPR Link/Interface and Set-up –Continuation.
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.
How to link the robot and the computer (Bluetooth) How to turn on and off How to connect the adaptor Fluke card connection Sec Getting Started How.
Barclays Robot Challenge Learn how to Program Robots.
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.
SAFARI ODBC INSTALLATION Go to the TRECA home WEB page.
Digital Storytelling Photostory 3 from Microsoft.
How to:-. “MATERIALS” tab is the default selection when you login to this product ADD Materials into a Manifest Store / Folder ** From MATERIALS Tab **
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.
THE 3M CLOUD LIBRARY AND YOUR KINDLE FIRE How to download 3M books to your Kindle Fire/HD Made possible by a grant from the Samuel P. Hunt foundation.
Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.
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 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.
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.
“MATERIALS” tab is the default selection when you login to this product ADD Materials Into a Manifest Store / Folder ** From MATERIALS Tab **
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.
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
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?
1 of 20 How to use the Compass A. Compass. 2 Compass: - Provides heading relative to Magnetic North, not true North HMC5883L V input - I2C (not.
Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw.
What is Arduino? It's an open source electronics prototyping platform: Open source: resources that can be used, redistributed or rewritten free of charge,
Basic Steps in Programming
Getting started with the Arxterra software and 3DoT Firmware
Dr. Kyung Eun Park Summer 2017
ROBOTC for VEX Online Professional Development
Introduction to Programming
Arduino Uno and sensors
Programming Design ROBOTC Software Computer Integrated Manufacturing
Basics for Robotics Programming
Programming - Motion Intro to Robotics.
Roller Coaster Design Project
Introduction to EV3Dev: Setup with Python
Automation and Robotics
Download and Installation of code::blocks
UNIT 11: RC-SERVOMOTOR CONTROL
Programming Design ROBOTC Software Principles of Engineering
NGT-503 : 2-in-1 Remote Bot Obstacle Avoiding Bot
Downloading to the NXT requires the correct hardware setup
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

ALL TERRAIN ROBOT 1 Wilmer Arellano © 2013

The Client’s Need Lecture is licensed under a Creative Commons Attribution 2.0 License.

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

Hardware  Next slides shows sensor connection to analog pin 0 and Motor 1 connection. Lecture is licensed under a Creative Commons Attribution 2.0 License.

Hardware Lecture is licensed under a Creative Commons Attribution 2.0 License. Motor 1 Motor 2 Motor 3

Wire connections Image by Beder Bourahmah Lecture is licensed under a Creative Commons Attribution 2.0 License. Motor 3 Motor 1

Top half bridge connection Image by Beder Bourahmah Lecture is licensed under a Creative Commons Attribution 2.0 License.

Bottom half bridge connection Image by Beder Bourahmah Lecture is licensed under a Creative Commons Attribution 2.0 License.

Sensor Connection Lecture is licensed under a Creative Commons Attribution 2.0 License.

H-Bridge Lecture is licensed under a Creative Commons Attribution 2.0 License.

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 Lecture is licensed under a Creative Commons Attribution 2.0 License.

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 Lecture is licensed under a Creative Commons Attribution 2.0 License.

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 Lecture is licensed under a Creative Commons Attribution 2.0 License.

Under Windows Right click the file, extract all, remove Atv from destination Lecture is licensed under a Creative Commons Attribution 2.0 License.

 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 Lecture is licensed under a Creative Commons Attribution 2.0 License.

#include // Create an instance of Atv Atv atv(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() { atv.checkData(); while(control > 0){ atv.moveMotor(1, LEFT, 5, 10); atv.moveMotor(1, RIGHT, 5, 10); control = control - 1; temp = atv.distance(); Serial.print("Distance: "); Serial.println(temp); } Lecture is licensed under a Creative Commons Attribution 2.0 License.

Constructor  Include the library:  #include  Create an instance of the class:  Atv atv(int);  “int” tells the library where the distance sensor is connected.  #include  // Create an instance of Atv  Atv atv(0); Lecture is licensed under a Creative Commons Attribution 2.0 License.

Create Mnemonics  // Backward direction, Left and Down  int LEFT = 0, DOWN = 0;  // Forward direction, Right and Up  int RIGHT = 1, UP = 1; Lecture is licensed under a Creative Commons Attribution 2.0 License.

Initialize  int control = 1, temp;  void setup() {  Serial.begin(9600);  Serial.println("Hello");  } Lecture is licensed under a Creative Commons Attribution 2.0 License.

Execute  void loop() {  atv.checkData();  while(control > 0){  atv.moveMotor(1, LEFT, 5, 10);  atv.moveMotor(1, RIGHT, 5, 10);  control = control - 1;  temp = atv.distance();  Serial.print("Distance: ");  Serial.println(temp);  } Lecture is licensed under a Creative Commons Attribution 2.0 License.

Motor Control 1  atv.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  Time = 40 will produce continuous motor motion regardless of the value of Speed  time = 0 will stop a motor in continuous motion  You may need to invert your motor connection for proper operation Lecture is licensed under a Creative Commons Attribution 2.0 License.

Motor Control 2  atv.checkData()  This function with no arguments checks for serial data from the computer  Use the serial monitor of the Arduino IDE to control the atv  Type one or more commands and hit enter Lecture is licensed under a Creative Commons Attribution 2.0 License.

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  After first execution only atv.checkData() will be executed continuously Lecture is licensed under a Creative Commons Attribution 2.0 License. void loop() { atv.checkData(); while(control > 0){ atv.moveMotor(1, LEFT, 5, 10); atv.moveMotor(1, RIGHT, 5, 10); control = control - 1; temp = atv.distance(); Serial.print("Distance: "); Serial.println(temp); }

Distance measurement 1  temp = atv.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 Lecture is licensed under a Creative Commons Attribution 2.0 License.

Distance measurement 2  atv.checkData()  This function can also be used to read distance  Command  d or D Returns Distance Lecture is licensed under a Creative Commons Attribution 2.0 License. void loop() { atv.checkData(); while(control > 0){ atv.moveMotor(1, LEFT, 5, 10); atv.moveMotor(1, RIGHT, 5, 10); control = control - 1; temp = atv.distance(); Serial.print("Distance: "); Serial.println(temp); }

Additional Experiments 1. Make robot move forward 2. Make robot move backward 3. Make robot spin 4. Mound distance sensor and test it 1. You may need to use for or while loops Lecture is licensed under a Creative Commons Attribution 2.0 License.

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 Lecture is licensed under a Creative Commons Attribution 2.0 License.

Functions  For example: void spin(){ // Your code }  When you want to execute function spin() you do a call to the function: spin(); Lecture is licensed under a Creative Commons Attribution 2.0 License.

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. Lecture is licensed under a Creative Commons Attribution 2.0 License.

#include Atv atv(0); // Creates an instance of Atv int LEFT = 0, DOWN = 0; // Backward direction, Left and Down int RIGHT = 1, UP = 1; // Forward direction, Right and Up int temp; void setup() { // We use this loop only as we want a single execution of the program Serial.begin(9600); Serial.println("Hello"); atv.initialize(20); // The argument Determines how many second you have to manually position the ATV 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 = atv.distance(); while(temp > 50){ // Replace the next comment lines with appropriated code // Move left motor forward // Move right motor backwards temp = atv.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 } Lecture is licensed under a Creative Commons Attribution 2.0 License.

#include Atv atv(0); // Creates an instance of Atv int LEFT = 0, DOWN = 0; // Backward direction, Left and Down int RIGHT = 1, UP = 1; // Forward direction, Right and Up int temp; void setup() { // We use this loop only as we want a single execution of the program Serial.begin(9600); Serial.println("Hello"); atv.initialize(20); // The argument Determines how many second you have to manually position the ATV 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 = atv.distance(); while(temp > 50){ // Replace the next comment lines with appropriated code // Move left motor forward // Move right motor backwards temp = atv.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 = atv.distance(); while(temp > 17){ // Replace the next comment lines with appropriated code // Move left motor forward // Move right motor forward temp = atv.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 } Lecture is licensed under a Creative Commons Attribution 2.0 License.