Scoutbotics Robot Testing

Slides:



Advertisements
Similar presentations
Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Advertisements

Getting started with LEGO NXT Mindstorms software This is intended to be a short introduction to the LEGO Mindstorms software and programming the LEGO.
JED Microprocessors Pty Ltd Presenting the JED T430 low-cost Projector Controllers Nov 22nd, 2009.
SAM 2007 v3.0 The Student Experience Including SAM Projects and Course Assess assignments.
Lab7: Introduction to Arduino
Getting your Arduino to Work: Microsoft Windows 1.Install Arduino programming environment 2.Install Arduino Uno driver 3.Make sure you can download a program.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2007 Class 3 March
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.
Intel Do-It-Yourself Challenge Lab 1: Intel Galileo’s Arduino side Nicolas Vailliet
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
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.
Available at: – Operate the Tumbler using a Jumper Pin Operate the Tumbler using the jumper pin.
Bluetooth Controller Setting up the BT controller and Arduino with Processing.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Slide 1 Intel ® Confidential Intel Design and Discovery Robotics Module Padraig O Murchu Education and Research Manager Corporate Affairs Group Intel Ireland.
Jim Ng 15/1/2014 CENG4480 TUTORIAL 1. ABOUT ME Current MPhil Student supervised by Prof. Mak You can find me at Rm116 in SHB
Programming the Geiger Counter Board 1. Arduino Files Go to and download the latest Arduino.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Having fun with code, using Arduino in a middle school CS classroom
Arduino - Introduction
Arduino.
After Construction Name: Per #:.
Making a 24hr Timer.
Embedded Systems Intro to the Arduino
Getting Started: Building & Programming
Arduino Uno – controlling LED strips
European Robotic LABoratory
By Rick Darby Sponsors: Geekspace Gwinnett The WorkSpot
Overview What is Arduino? What is it used for? How to get started
Development Environment
Downloading Arduino FOR WINDOWS.
WORKSHOP 2 VALVETRAIN MECHANISM
WORKSHOP 2 VALVETRAIN MECHANISM
An Arduino Workshop A Microcontroller.
Overview What is Arduino? What is it used for? How to get started
Welcome to Arduino A Microcontroller.
Arduino Development for Beginners
“RedBoard” / Arduino Uno Ardumoto Motor Driver Shield
iSERIES PROGRAMMING/LOGGING TRAINING
SCOUTBOTICS Engineering Notebook
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
Programming Part 2 Mod Kit
fischertechnik® RoboPro Software for Gateway To Technology® RoboPro
Basics for Robotics Programming
Arduino and Design of Embedded Applications
Arduino and Grove LET’S START.
Roller Coaster Design Project
Automation and Robotics
MicroEconomix 1500 RSLogix 500 LAB#1
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
Banyule Coding Club: Learn Arduino Richard Counsel Malcolm Macleod Watsonia Library - June 2018 Reference materials here ->
Programming Micro Controllers
Revision of Simple troubleshooting
Dave Mawdsley, DACS Member, Linux SIG January 16, 2013
Automation with RobotC
Introduction Level Gobbit Assembly and Programming
SCOUTBOTICS Engineering Notebook
Aeroponic Engineering and Vertical Farming
Automation with RobotC
Arduino Leonardo Setup
Lab #1: Getting Started.
Getting started with LEGO EV3 Mindstorms software
Introduction to arduino
Introduction to Arduino IDE and Software
Downloading to the NXT requires the correct hardware setup
Presentation transcript:

Scoutbotics Robot Testing Complete each step in order before you go on to the next. If you have questions, first discuss with your buddy, then ask a STEM Guide or Instructor. Created by Zagros Robotics on November 3, 2016 Revised October 27, 2017

Before Programing: Check your Robot Let’s look over your Robot before we start programming: Look at the drawing you made of your robot in your Engineering Notebook. Where is the front of your robot? Which is your Left and Right Motor? Tip: The QTR sensor is in the front of the robot, and the ball caster is at the back. The most common error is incorrect or poorly seated wiring. Check your Robot with the proper wiring diagram that matches your motor shield to make sure your Robot is wired correctly.

Arduino IDE Setup What is Arduino? Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and other open-source software. This software can be used with any Arduino board. The Arduino Software (IDE) allows you to write programs and upload them to your board.

Why Arduino? Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well. Open source and extensible software - The Arduino software is published as open source tools, available for extension by experienced programmers. Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it.

Knowing your Files Watch the installation Video: Installing Arduino IDE, Redboard, and Gobbit Line Command library (also found with other videos and files at http://primalengineering.com/robots/ ) 1. Make sure your computer is loaded with the Arduino IDE.   Download the Arduino Software from: https://www.arduino.cc/en/Main/Software 3. Connect the USB Cable between your RedBoard Arduino and the computer. The FTDI VCP drivers (Virtual COM Port) for the RedBoard should automatically install when the Redboard is plugged into your computer. If not, the FTDI will need to be downloaded to your PC. http://www.ftdichip.com/Drivers/VCP.htm Run the FTDI driver setup executable file.  

Test the Installation 4. Run the Arduino IDE from your new desktop icon. Check your Board: Open a basic Arduino program. From the menu bar, select File>Examples>Basics>Blink  

Test the Installation cont… 5. Set your board type. From the menu bar, select Tools>Board>Arduino Uno

Test the Installation cont… 6. Set your Serial Port. From the Menu bar, select Tools>Serial Port>COM(some number) Usually, if there is more than one listed, the correct COM port number will be the highest numbered port. However, a simple test is to unplug your RedBoard while watching the list of ports, and note which one disappears. Make sure to plug the board back in and select its port. If you are unable to select a Port then the FTDI VCP drivers are not installed

Test the Installation cont… 7. Click on the “Upload” icon Near the bottom of the window, the status bar will say “Compiling Sketch,” then “Uploading…,” then “Done uploading” if it was a success. While it is uploading, there should be some LED’s flickering on the RedBoard. When it is done uploading, the LED near digital pin 13 should be blinking slowly if it was successfully programmed. Look at the code in the sketch. Can you see how the blink speed is set? Change the code to make it blink twice as fast. Upload and try it out. Unplug your Arduino from the computer. Use the power button to turn your robot off and on. Does the LED start blinking again when the power comes back on? You should now have a functioning Arduino IDE with RedBoard communication.

Troubleshooting: Redboard Attempt these before asking for help Don’t see the Arduino Uno Board or any Board Verify that the board is installed Check connection of your Mini B Cable to the RedBoard: disconnect and reconnect to make sure it cable is pushed in completely into the Board. Verify the correct Com Port is selected. Don’t see a COM Port or Unable to select. Check connection of your Mini B Cable to the RedBoard: disconnect and reconnect to make sure it cable is pushed in completely into the Board. Verify the correct Com Port is selected. FTDI VCP Drivers are not installed #13 Light does not blink Check connection of your Mini B Cable to the RedBoard: disconnect and reconnect to make sure it cable is pushed in completely into the Board. Verify the correct Com Port is selected.

Installing the Libraries 8. Check to make sure the following Libraries are installed: GobbitLineCommand QTR Sensors Adafruit Motor Shield V2 Library 9. Go To Sketch > Included Library > Manage Libraries

Installing Libraries Cont. Under Library Manager, search for the libraries needed. If the library is already installed, it should display and say next to the name and version. If it is not installed, click on the description of the library, then click on the right. If it already says make sure you have the current version by clicking on the description of the library, and then click the button if it is present on the right. Search for the QTR Sensors. If it is installed, the QTRSensor Library should display and show

Installing Libraries Cont. 11. Repeat for GobbitLineCommand, and Adafruit Motor Shield V2 Library.

Open the Library Examples Once all three Libraries are installed: Go to the File Menu> Examples > GobbitLineCommand. Here you will find all of the example sketches you will need to test your Gobbit Motors, QTR Sensor, install the Basic Line following program, and other examples of additional functions that can be used to program your robot. NOTE: Some of the examples included under the GobbitLineCommand library are for use with the Gobbit Gripper feature or other modifications. Read the comments in the beginning of the sketch that explain how it is intended.

Test Motors and Wiring with Serial Monitor Review your drawing in your Engineering Notebook of your robot’s right/left and front/back sides and what should be the proper forward and backward rotation of the wheels. TIP : The ball caster is in the back of the robot and the sensor is in the front. Set your robot on end or prop it with the wheels just off the ground 13. From within the Arduino IDE examples, use the File menu> Examples> GobbitLineCommand> MotorDirTest 14. Read the beginning section of the sketch and uncomment the proper Motor Driver for your Robot Kit. 15. Make sure your robot and computer are plugged into the USB cable, your COM port is correct, then Upload the sketch. 16. Open the Serial Monitor from the menu Tools>Serial Monitor, or use Control+Shift+M to open. The baud rate (in the bottom right corner) should still be at 115200.

Test Motors and Wiring with Serial Monitor cont… 17. Set your robot on end or prop it with the wheels just off the ground. You will need the USB cable to stay connected for this step, so you don’t want your robot to roll away or fall off the table. Within the serial monitor, follow the menus to test the motors individually first (l or r). Enter the command letter in the prompt at the top of the monitor window and hit either enter or the send button on the right. a. If the wrong motor moves, swap the Ardumoto A1-A2 terminal wires with the B3-B4. b. If the correct motor moves, but the wrong direction, swap the black and red motor wires at the Ardumoto terminals for just that motor. c. Re-test individual motors after any wiring changes and make any additional needed wiring changes. After the individual motors appear to run correctly, run the test for both motors to confirm individual setup is correct. TIP : If you are having trouble, there is a link to a video of this test noted in the beginning comments of the example sketch.

Troubleshooting the Motors Wrong Motor moves or moves in opposite direction: Check motor connections to the Ardumoto or Motor Shield Did you set the proper motor driver in the test program? Check your Robot with the proper wiring diagram that matches your motor shield to make sure your Robot is wired correctly. Motors do not move: Open robot and check wiring: verify wires are not loose or pinched during assembly

Test the QTR line sensor and Wiring with Serial Monitor Inspect the sensor on the bottom front of the robot. Notice there are eight small infrared LED emitter and receiver components along the sensor to measure the reflected light (they are the small black rectangles). Can you see light from the LEDs? Look at the array with a cell phone or digital camera. Now can you see the lights? Note: The reflectance array works with infrared (IR) light which is not in the visible spectrum of your eyes. 18. From within the Arduino IDE examples, use the File menu> Examples> GobbitLineCommand> QTRTest 19. Read the beginning section of the sketch and uncomment the proper Motor Driver for your Robot Kit. 20. Make sure your robot and computer are plugged into the USB cable, your COM port is correct, then Upload the sketch. 21. Open the Serial Monitor from the menu Tools > Serial Monitor or Control+Shift+M. The baud rate should still be at 115200.

Test the QTR line sensor and Wiring with Serial Monitor cont… 22. Stand the robot up on end, with the sensor facing away from you so the left and right perspective of the robot are the same as your left and right, and pass your finger or a large pencil/pen/marker near the sensors. If it is wired correctly, the readout should show “XX” at a sensor that is seeing little reflection, such as a dark line or open space, and “___” where it sees a bright reflection, such as your finger or white paper. It will also display “—” where it is seeing somewhere between no reflection and a lot of reflection. a. The display should match left/right with the left/right of the sensors you are covering. If they are opposite, you will need to change your wiring. In this example, my finger was covering the 3rd and 4th sensor from the left. b. If some of the sensors do not change, and only show “XX” they may be either unplugged or non functional. Check your wiring for loose connections and your solder joints on the sensor. TIP : If you are having trouble, there is a link to a video of this test noted in the beginning comments of the example sketch.

Troubleshooting the Sensor Nothing happens when performing the Sensor Test or the reading wrong pin Check sensor connections: make sure all jumper wires are pushed in completely and no wires were pinched during assembly Did you set the proper motor driver in the test program? Look for simple first. Does your Robot have power? Is your sensor correctly wired? Check your Robot with the proper wiring diagram that matches your motor shield to make sure your Robot is wired correctly.

Upload and Run the Line Follower Sketch 23. From within the Arduino IDE examples, use the File menu> Example> GobbitLineCommand> GLC_BasicLine. 24. Read the beginning section of the sketch and uncomment the proper Motor Driver for your Robot Kit. 25. Make sure your robot and computer are plugged in to the USB cable, your COM port is correct, then Upload the sketch. 26. Set your robot on your lined course and turn it on. You should see the robot turn back and forth over the line as it calibrates its sensors, then begin following. TIP : If the robot is following very slowly or roughly, you should try turning it off, make sure to place it back on the line all the way, and turn it on again to get a better calibration. The line sensor is using light and its reflection from the environment to make readings. Sometimes varying lighting in the room, direct sunlight, or even your own shadow can affect the calibration enough that the robot does not get good sensor readings. Moving your course to a location with more even lighting, or sometimes just recalibrating, can make a big difference in performance. You should make note of any observations of this kind in your notebook.

Troubleshooting the Line Follower Error Uploading the Line Follower sketch Make sure you have the correct COM Port Selected Check connection of your Mini B Cable to the RedBoard: disconnect and reconnect. Make sure it cable is pushed in completely into the Board. Verify the correct Com Port is selected Verify that all the example files are installed. Robot Does nothing when turned on: Check connection from our battery to switch to board. Red to positive, and Black to Negative. Check your batteries – are they new? Are they installed correctly into the battery box? Robot just spins in a circles or does not find the line: Check over your robot. Are the pins from the Ardumoto and Redboard seated correctly? Is your robot wired correctly – QTRsensor to Ardumoto, motors to Ardumoto, Battery to Switch to Arudumoto? Did you set the proper motor driver in the program? Verify no wires are pinched or became loose during assembly.