The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Lab 1.

Slides:



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

Photos and Sensor Instructions
EducateNXT NXT... an introduction The Kit and the Software.
The NXT is the brain of a MINDSTORMS® robot. It’s an intelligent, computer-controlled LEGO® brick that lets a MINDSTORMS robot come alive and perform.
Challenge #1 – Relay Race Robot #1 will be randomly placed on starting line #1, #2 or #3. Robot #1 will drive until it detects the “Dark Line” - Robot.
ECE 1020 FINAL PRESENTATION TA: Allen Guan and Sibel Ahmed Shehzad Mufti.
Sensors for use in this class. Sensors 2 Robotics: Bridgewater state college.
Program ultrasonic range sensor in autonomous mode
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 1.
Programming Concepts Part B Ping Hsu. Functions A function is a way to organize the program so that: – frequently used sets of instructions or – a set.
TA: Chris Reilly Group 5: Benjamin, Ramie, Zachary, Dinal.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Stephen Joo and Daniel Kattan April 16, 2010 ECE 002, Group 8.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Introduction to the VEX ® Robotics Platform and ROBOTC Software © 2012 Project Lead The Way, Inc.Principles of Engineering.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 3.
Today’s Agenda 1.Scribbler Program Assignment 1.Project idea due next class 2.Program demonstration due Wednesday, June 3 2.Attendance & lab pair groupings.
Robotics Light sensor. Calibration. Reverse engineering challenge. Lab work: Create and show your program. Add light sensor (different orientations). Robot.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering –Intro to the Robotics –Introducing the IC –Discuss.
The George Washington University Department of ECE ECE 1010 Intro: Electrical & Computer Engineering –Introducing KIPR Link/Interface and Set-up –Continuation.
Sensing Today: Using Sensors Monday: Quiz on Controls and Sensing Rat Robots Scientists Develop Remote-Controlled Rats "The animal is not only doing something.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Erin Halseth, Will Gottschalk, Briana Warschun, and Michaella Gaines
Engineering H193 - Team Project Gateway Engineering Education Coalition Lab 1P. 1Spring Quarter Introduction to Sensors Lab 1.
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
Photos and Sensor Instructions
WELCOME TO ARDUINO E-DAY CAR PROJECT MEETING – ITALY MARCH.
ECE 002 Final Project By Brandon Minor, Adam McCormack, Benjamin Miller, Damon McCullough.
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.
ECE 002 Robots and Sensors Group 14. Objectives Research sensors and their usefulness to analyze data Research sensors and their usefulness to analyze.
Oregon Robotics Tournament and Outreach Program RCX Basics.
The George Washington University Electrical & Computer Engineering Department Dr. S. Ahmadi Class 3.
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
1 The George Washington University Electrical & Computer Engineering Department ECE 1010 Intro To Electrical and Computer Engineering Dr. S. Ahmadi Class.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions?
ECE Group Members Samantha Starr BME Arduino Arianna Weinshel BME Sensors, Circuits Eden Woldemichael CE AM Radio Taylor Brooke EE Instrumentation,
Introduction to VEX® components
Basic Programming: Until Commands. The Problem with Wait States Motor Speed is affected by battery power. –If the battery is fully charged, the motors.
Robotics Programming Wall Follow Line tracking for a set amount of time Line tracking for a distance.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
NXT Mindstorms Kit Programming
VEX IQ Curriculum Smart Machines Lesson 09 Lesson Materials:
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Intro to the Robotics Introducing the IC Discuss.
ROBOTC for VEX Online Professional Development
ROBOTC for VEX On-Site Professional Development
Programming – Using a Range Finder
ROBOTC for VEX Online Professional Development
Introducing KIPR Link/Interface and Set-up
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
RobotC Sensors.
Product Evaluation & Quality Improvement
Programming – Using a Range Finder
Sensors Training.
Introductory Presentation
Introductory Presentation
Introductory Presentation
Product Evaluation & Quality Improvement
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
The George Washington University Electrical & Computer Engineering Department ECE 1020 Dr. S. Ahmadi Lab 1.
Photos and Sensor Instructions
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Group 4: Final Presentation
Introductory Presentation
Obstacle Detection.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Oregon Robotics Tournament and Outreach Program
Presentation transcript:

The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Lab 1

Class Agenda Digital Sensors Analog Sensors –Light Sensors. –Optical Rangefinder Sensors. –Ultrasonic Sensors (Sonar). Analog Sensor Characterization

Two Distinct Categories of Sensors Digital and Analog Digital sensors have two states: 0 or 1 Analog sensors have a range of states depending on their input Example: –A door can be open or closed What type of representation of the condition of the door is this? –How far the door is open (0 to 180 degrees!) What type of representation of the condition of the door is this?

Hook up DIGITAL Sensors To these ports: 7-15 Hook up ANALOG sensors To these ports: (2-6) Hook up additional Analog sensors To these ports (20-23) Hooking up Sensors to the Handyboard

Digital Sensor: The Bumper Sensor Digital sensor: –Returns either a 0 or 1. Connect to DIGITAL ports 7-15 Access with function digital(port#); ‘0’ indicates switch is open (nothing has happened). Normally, switch will be ‘0’. ‘1’ indicates switch is closed (Switch has been hit).

For more information on different digital sensors available to you, refer to the Botball Kit Documentation, slides 42, 43, 51.

Bumper Sensor Procedure and Test Code /* Program to beep if a bumper on port 13 has been hit. */ void main() { while(start_button()==0){ } // Waits for user to press start button. while(stop_button()==0) // Keep program running until press stop button { printf(“Switch on port 13 is open!\n”); // Bumper connected to port // 13. If it is hit, sends if (digital(13)= =1) // 1 to handyboard. { printf(“Switch on port 13 has been closed!\n”); beep(); }

Analog Sensors Output a range of values, depending on the input read. The main analog ports are ports 2 – 6, and ports 20 – 23. Actual ports that should be used will depend on the sensor being used. The three main analog sensors that we will be using are the Light Sensor, the Optical Rangefinder Sensor and the Ultrasonic Sensor, also known as the Sonar.

Light Sensors Access with function analog(port#) Connected to ports 2-6 or Analog values range from A low value indicates bright light, and vice versa.

Optical Rangefinder Sensors Access with function analog(port#) Connected to ports Analog values range from Low values indicate far distance from an obstacle High values indicate close proximity to an obstacle ~4 inches

Ultrasonic Sensors (Sonar) Connect red to upper deck board - port #0 Connect gray to Digital #7 Access with function sonar() Returned value is distance in mm to closest object in field of view Range is approximately mm When objects are too close or too far, gives value of 32767

Sonar Sample Code /% Program that measures the sonar reading at different input values. %/ void main() { int range=0; printf(“\n Sensor Sample Program"); while(!start_button()); // Press Start Button while(1) // Continue infinitely { sleep(0.5); range = sonar(); printf(“\nOutput is %d”, range); }

Analog Sensor Characterization The purpose of this exercise is to tabulate the readings from the three different analog sensors mentioned, when different inputs are sensed: –Light Sensor: Using the attached color scale, move the light sensor along the sheet, and record the values read at different intervals. –Optical Rangefinder: Using the provided boards, at different distances record the outputs read from the sensor. –Ultrasonic Sensor: Similar to the Optical Rangefinder, record the output from the sensor at different input distances.

Light Sensor Color Scale 50% 0%100% ½”

Lab Requirements Collect Data for at least one sensor. (Data to be handed in at end of lab, and you’ll need it for your HW.) FOR LIGHT SENSOR: Take 10 equally spaced readings. FOR SONAR SENSOR: Take enough readings to characterize sensor (more when measurements are non- linear, less when data is predictable) Insert the data into an Excel spreadsheet Plot the data (X-axis for distance, Y-axis for sensor readings). the spreadsheet to all group members to complete HW

Sensor Range Sensors have an established operating range. Determine what this is for your sensor. Choose your ten points so that they span the complete operating range of the sensor.

Example Plot of Sensor Characterization – RANGE FINDER SENSOR

Due in Lab Today After tabulating the results, plot the graph for each sensor type, to see if the relationship turns out linear or not. Draw the curve to fit the graph. Note: To simplify your work, write a short program that can continually print out the reading of the sensor on the Handyboards display. Take a look at HW#1(Comprehensive Report on the Characterization of Robot’s Sensors), save your data/graphs for HW#1.