PHY 235 Robotics Workshop Day 3 IR Distance Sensing.

Slides:



Advertisements
Similar presentations
Sensing and Control.
Advertisements

LECTURE 4 DIODE LED ZENER DIODE DIODE LOGIC
Using the Board of Education Breadboard and Your Multimeter ENGR 120 Work in teams of two!
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
1 Chapter 7: Navigating with Infrared Headlights Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation developed.
Lecture 9: D/A and A/D Converters
Automatic Holiday Light Display. Goal of Experiment Design an automatic light display in which a set of blinking lights (LEDs) turns on as the amount.
Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics.
Environmental Challenges in Specific Infrared Communication Andy Graham 2002 Electrical Engineering Senior Project Presentations.
Part A: Controlling Oscillation Frequency with Capacitors and Resistors Part B: Diodes and Light Experiment Timer.
NSF ITEST SPIRIT December Workshop 2006 WELCOME Building an IR Controller for Your TekBot.
IR Receiver Board. Global Variables Main() for GOTO_Beacon Program Call three functions Note: you need to change freq for the beacon you want to find!
September 2005Allegro Confidential FIRST PresentationJanuary 2007 Allegro’s ATS642 Hall Effect Sensor “A great way to measure the speed and position of.
The Beacon Finding Robot The robot that searches out beacons in a hallway By: Brian Merchant & Richard Acuna.
Sensors And Micro-Controllers
Programming Concepts C: GOTO_Beacon ENGR 10 Introduction to Engineering 1.
George Washington University DC Circuits Lab Professor Ahmadi ECE 002.
© 2012 Pearson Education. Upper Saddle River, NJ, All rights reserved. Electronic Devices, 9th edition Thomas L. Floyd Electronic Devices Ninth.
You will need the following parts from your kit: 1.Breadboard ohm resistor (brown, black, brown, gold) 3.1 LED (light emitting diode) 4.1 Potentiometer.
Basics of Sensors. A sensor is a device which is used to sense the surroundings of it & gives some useful information about it. This information is used.
(You may use the book and/or notes) 1.Find C T 2. Using V C = V S (1 - e -t/  ), what is the voltage across a capacitor at 10 seconds if R = 5Ω, C=2F,
ELG4135-Electronics III Professor: Dr. Riadh Habash Presentation date: Nov 28 th, 2006 Group Members: Yichen Fan Gefei Zhou Zhanglei Song Infrared Entrance.
Project Goals And Objectives ____________________________________________________ Create a “smart”, customizable, all in one system Little to no learning.
Sensors Material taken from Robotics with the Boe-Bot.
Kashif Bashir1 Basic Electronics Kashif Bashir Web:
The next slide shows a simplified diagram of the pulser. A capacitor is charged up to perhaps 10V. Switches T1 and T2 close. Some of the capacitor current.
09/16/2010© 2010 NTUST Today Course overview and information.
Project: Pulse meter Idea: Use noninvasive infrared light to probe blood pressure and pulse rate in a finger tip. Uses: A variant of this device is used.
Data Communications Introduction and Review. Transmission Media Copper Wires Copper Wires Low resistance. Electrical signal produces miniature radio station.
TA: Chris Reilly Group 5: Benjamin, Ramie, Zachary, Dinal.
ANALOG CIRCUIT AND DEVICES 10/7/ Semester I 2013/2014 Course Code: EEE 3123.
Electronic Components. Battery A portable power source that has a positive and negative. Electronics works on Direct Current (DC) where electrons flow.
Lab 10 Experiment 21 Design a Traffic Arrow. Just so it is clear This is it. – Last official experiment for the semester. It is your option as to whether.
+ Using Ohm’s Law to Build a Voltage Divider 1. + Learning Objectives Understand and demonstrate the engineering design process Use Ohm's Law as a tool.
Experiment 21 Design a Traffic Arrow.
Name: ________________ Class: _________________ Index: ________________ D.C. Circuit.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Which of the signals below is a digital signal?
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
Electronic. Analog Vs. Digital Analog –Continuous –Can take on any values in a given range –Very susceptible to noise Digital –Discrete –Can only take.
PHY 235 Robotics Workshop Day 4 Robotic Behaviors, Light Sensing, Voltage Dividers, LCD-MOD.
PHY 235 Robotics Workshop Day 5 Distance Sensing Using The Ultrasonic Ping Sensor.
Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.
The Control of Electricity in Circuits
PHY 235 Robotics Workshop Day 8 IO, Multi-tasking Sample Start Program Team Projects.
Review (Only leave this in if it makes sense) Get white boards out for all this lecture) How long does it take a 5uF capacitor in a series RC circuit to.
Data Acquisition Device (DAQ) A DAQ is a cool little device that allows you to interface hardware to a computer. Here is what we will do:  Create a square.
Project: Pulse meter Idea: Use noninvasive infrared light to probe blood pressure and pulse rate in a finger tip. Uses: A variant of this device is used.
Voltage Divider Circuits Input transducers Input transducers are devices that convert a change in physical conditions (for example, temperature) into a.
An introduction to PIC’s for KS3 and KS4. Mr Rooks Hetton School.
IR Object Detection living with the lab IR light from LED IR light reflected off object IR LED IR receiver Infrared (IR) light leaving an LED reflects.
IR OBSTACLE DETECTION TO
SUBMITTED BY EDGEFX TEAM
Half-wave Rectifier.
Download the GOTO BEACON program from the E10 website, Robot lab section,
Electronic Devices Ninth Edition Floyd Chapter 17.
UNIT-IV Application of Special I.C’s.
ABSTRACT The microcontroller receives the Infrared Signal from the TV remote, the code of which is identified by the IR receiver depending on which it.
Video Transmitting Robot
IR OBSTACLE DETECTION TO
Pulse Width Modulation (PWM) Motor Feedback - Shaft Encoder
Saving Lighting Energy with the BBC micro:bit
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
CENG2400 Revision Q1a A system has an ARM processor with a 32-bit General Purpose Input Output (GPIO) module. Two on/off switches are connected to bit-3.
Saving Lighting Energy with the BBC micro:bit
COMPONENTS.
UNIT 7: INFRARED SENSORS
2019 Investing Now Summer Program
Presentation transcript:

PHY 235 Robotics Workshop Day 3 IR Distance Sensing

IR = Infrared Light

Infrared Headlights IR LED emits IR light Light is reflected off object Reflected light is detected by IR Detector IR LED IR Detector

IR Sensor Issues Ambient IR: Our environment is flooded with IR radiation from: sun, lights, bodies, heat sources. Impact on IR Detection: This IR “pollution” makes it difficult to isolate a specific IR signal. Much like trying to hear one voice in a room full of noisy people! Solution: Send out a modulated IR signal. That is, a signal at a precise frequency which is not prevalent naturally.

IR Modulation The Boe-Bot IR detectors are tuned to detect IR at a modulated frequency of 38.5 khz. Khz = 1000 Herz = 1000 cycles per second Thus, the Boe-Bot IR detectors will respond only to an IR signal that flashes on/off about 38,500 times a second. This will filter out: sunlight and bodies (0 khz) and electric lights (100 or 120 hz). RF systems and FM and AM radio work the same way – they ignore frequencies they don't care about.

Boe-Bot IR Circuit IR Detector

Parts and Assembly ( Clear )

LED= Light-Emitting Diode A Diode is a one-way current device -- current can flow in only one direction. An LED is a diode that emits light as current is passed through it. Note the connections on the LED: Anode: Connected to + side of voltage. Typically has a longer lead. Cathode: Connected to – side of voltage. Typically has a shorter lead AND a flat portion on the lens.

LED– Current Limiting Problem LEDs have minimal resistance to current flow. A 5 volt source can destroy an LED if current is not restricted. From Ohm's Law, if an LED has R of 1 , how much current will try to flow? An LED drops approximately 1.4V, leaving 3.6V. I = (5V-1.4V)/1  = 3.6 A The maximum current a typical LED can handle is around 30mA, or.030 A. 3.6 A will fry an LED in seconds!!

LED– Current Limiting Problem So, to use an LED, we must also use a resistor to limit the current passing through. In our circuit, we use a 1K  resistor. Then, the current I will be I = (5V-1.4V)/1000  =.0036 A This is well below the LED limit of 0.30 A. IMPORTANT NOTE: Always use a current limiting resistor with LED’s.

Boe-Bot IR Circuit Build the circuit as shown in the previous slides (or on pp in the text) Make sure all of the connections are correct before moving on.

Programming To use the sensor: – We need to send a square wave (on/off) signal to the IR LED at 38.5KHz – One cycle takes 1/38500 = s = 26 microsec – This requires a 13 microsec pulse of 5V Followed by a 13 microsec pulse of 0V. 5v 13 26microsec

OutputCaptureEx To create a waveform we use the ZBasic subroutine OutputCaptureEx. Call OutputCaptureEX( pin, intervals, count, flags, repeatCount ) Note: Each entry in the intervals array specifies a time interval, in units of the I/O Timer clock period (by default, about 67.8ns for devices running at 14.7MHz), for each segment of the waveform.

OutputCaptureEx Our waveform has two parts – an up and down. To calculate the two entries in the intervals array, we can use (CPUfreq/freq)/2) * CPUclockTicTime Why? (CPUfreq/freq)/2) * CPUclockTicTime = (CPUfreq/freq)/2) * (1/CPUFreq) = ((1/freq)/2) = length of one-half cycle The CPU’s clock frequency (as an integer) is stored in a special constant named register.cpufrequency

OutputCaptureEx Thus, if we want to output a signal of frequency freq we use CUint(csng(register.cpufrequency) / (freq * 2.0) + 0.5) Here, csng makes register.cpugrequency into a single value and Cuint converts the answer to an integer. Also, we add 0.5 to round up to the nearest integer.

Programming Here is the code for a subroutine to output a signal of frequency = freq on pin = pin: dim pulseState as Byte = 1 ' Output pulses at state 1 (5 Volts) dim cycles as integer = 20 ' Number of cycles to be emitted sub sendSignalOnPin(byVal freq as single, byVal pin as byte) dim pd(1 to 2) as unsignedinteger ' Array to store waveform call putpin(pin, startstate) pd(1) = CUint(csng(register.cpufrequency) / (freq * 2.0) + 0.5) pd(2) = pd(1) call outputcaptureex(pin, pd, 2, pulsestate, cycles) end sub

IR Object Avoidance Our IR detectors have outputs that are just like the whiskers. When no object is detected, the output is high; when an object is detected, the output is low. We can use this to avoid objects, just as we did when we used whiskers.

Today’s Assignment Download the sample code named “IRHeadlight” from the code page of the website. We will discuss the code and then you should load the code into your Boe-bot and try it out. Then, try out at least one of the projects on the next two slides. Each team should be ready to demo their results at the beginning of class on Thursday!

Today’s Assignment Project 1: Catch Me if you Can! – Design a Boe-Bot program that has your robot slowly rotate in place until it detects a nearby object. As soon as it detects the object, it locks onto and chases the object.

Today’s Assignment Project 2: Mama Dog and Puppy – Find another group to team up with. Have one robot move randomly, sending out an infrared signal using the IR LED (like a beacon). (Mama dog) – The other robot should roam around, using its IR detectors to look for the first robot. Once it finds the robot, it should follow it without losing it. (Like a puppy dog!)