1 A Modification of Chapters 5 & 7 Slides Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by:

Slides:



Advertisements
Similar presentations
Chapter 6: Digital Display
Advertisements

Chapter 3: Digital Inputs - Pushbuttons
1 Chapter 8: Frequency and Sound Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A.
1 Chapter 9: Electronic Building Blocks Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin.
4/22/ MAKING YOUR ROBOTS SEE Building and Testing Photosensitive eyes.
1 Chapter 2: Light on- Lights off Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A.
1 Chapter 7: Measuring Light Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A. Hebel.
Boe-bots and STEM Boe-bots and STEM – This sectional will introduce participants to a programmable robot that is useful for engaging students in building.
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
1 Lecture 1: Your Boe-Bot's Servo Motors Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation developed by: Martin.
1 Chapter 7: Navigating with Infrared Headlights Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation developed.
1 Chapter 4: Controlling Motion Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A.
Capacitors1 THE NATURE OF CAPACITANCE All passive components have three electrical properties Resistance, capacitance and inductance Capacitance is a measure.
Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics.
Chapter 23 Circuits Topics: Sample question:
Capacitors in a Basic Circuit
IEEE’s Hands on Practical Electronics (HOPE)
1 Chapter 5: Measuring Rotation Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A.
CAPACITORS & RESISTORS. RESISTORS A resistor, like batteries and lights, can also be present in an electrical circuit. A resistor limits the flow of electricity.
Lec. (4) Chapter (2) AC- circuits Capacitors and transient current 1.
Chapter 20: Circuits Current and EMF Ohm’s Law and Resistance
Sensors Material taken from Robotics with the Boe-Bot.
Chapter 12.
Slide Menlo Drive Suite 100 Rocklin, CA Presentation based on: “What’s a Microcontroller?" by Andy Lindsay Presented by Andy.
Engineering Science EAB_S_127 Electricity Chapter 4.
1 Chapter 4: Hitachi HM55B Compass Module Smart Sensors and Applications Chapter 4: Hitachi HM55B Compass Module Presented by: Andy Lindsay Parallax, Inc.
© Shannon W. Helzer. All Rights Reserved. Unit 13/Chapter 18 Electric Currents 0.0.
1 Chapter 8: Frequency and Sound Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A.
Foundations of Physics
Slide Menlo Drive Suite 100 Rocklin, CA Presentation based on: “What’s a Microcontroller?" by Andy Lindsay Presented by Jessica.
Chapter 20 Circuit Elements (capacitor, resistor, and Ohm’s law)
1 Chapter 3: Tilt with the Memsic Dual-Axis Accelerometer Smart Sensors and Applications Chapter 3: Tilt with the Memsic Dual-Axis Accelerometer Presented.
1 Chapter 1: Parallax Serial LCD Display Smart Sensors and Applications Chapter 1: Parallax Serial LCD Display Presented by: Andy Lindsay Parallax, Inc.
Slide 1 Presentation based on: “Robotics: with the Boe-Bot" by Andy Lindsay Menlo Drive Suite 100 Rocklin, CA
1 Chapter 6: More Accelerometer Projects Chapter 7: LCD Bar Graphs for Distance and Tilt Smart Sensors and Applications Chapter 6: More Accelerometer Projects.
1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc.
Engineering Science EAB_S_127 Electricity Chapter 3 & 4.
1 Parallax BASIC Stamp ® Tutorial Developed by: Electronic Systems Technologies College of Applied Sciences and Arts Southern Illinois University Carbondale.
1 Chapter 6: Light Sensitive Navigation With Photoresistors Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation.
1 Chapter 1: Getting Started Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A. Hebel.
Slide 1 IR Remote for the Boe-Bot IR Remote for the Boe-Bot.
Slide 1 IR Remote for the Boe-Bot IR Remote for the Boe-Bot.
Sensors Material taken from Robotics with the Boe-Bot.
1 Chapters 2 And 3 Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A. Hebel Southern.
1 “Something to put it in perspective…” Slide Show Name “Something to put it in perspective…” Presented by: Andy Lindsay Parallax, Inc.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
1 Lecture 1: Your Boe-Bot's Servo Motors Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation developed by: Martin.
1 Chapter 1: Getting Started Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A. Hebel.
IR Communication October 27, Sources  Lindsay, Andy. IR Remote for the Boe- Bot. v
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Slide Menlo Drive Suite 100 Rocklin, CA Presentation based on: “What’s a Microcontroller?" by Andy Lindsay Presented by Andy.
1 Parallax BASIC Stamp ® Tutorial Developed by: Electronic Systems Technologies College of Applied Sciences and Arts Southern Illinois University Carbondale.
Slide Menlo Drive Suite 100 Rocklin, CA
Slide 1 Chapter #7: Measuring Light Light Sensor Circuit Parts (1) (1)Resistor – 220 Ω (red-red-brown) (1) Capacitor – 0.1  F (1) Capacitor – 0.01  F.
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.
Capacitors The capacitor is an element that continuously stores charge (energy), for later use over a period of time! In its simplest form, a capacitor.
ENGR 101: Robotics Lecture 6 – Follow That Light! Outline  The Scribbler's Light Sensors  Using EEPROM Memory References 
1 Chapter 5: Accelerometer Gaming Basics Smart Sensors and Applications Chapter 5: Accelerometer Gaming Basics Presented by: Andy Lindsay Parallax, Inc.
Capacitance. Device that stores electric charge. Construction: A capacitor is two conducting plates separated by a finite distance Typically separated.
Slide Menlo Drive Suite 100 Rocklin, CA
Chapter 1: Getting Started
GOVT WOMEN ENGINEERING COLLEGE AJMER
Material taken from Robotics with the Boe-Bot
Chapter 8: Frequency and Sound
Chapter 1: Getting Started
Chapter 7: Measuring Light
Chapter 5: Measuring Rotation
Presentation transcript:

1 A Modification of Chapters 5 & 7 Slides Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A. Hebel Southern Illinois University Carbondale College of Applied Sciences and Arts Electronic Systems Technologies Electronic Systems Technologies 9/10/03

2 Use and Copyright This presentation supplements "What's a Microcontroller" by Andy Lindsay. (Link to text at Parallax)Link to text This presentation is not a replacement for the text. Important concepts of the text are highlighted. gold In some cases, additional material has been added to augment the text. Denoted by titles colored gold. Full program listings are generally not provided in the presentation. Distribution: This presentation may be freely distributed without modifications. Modifications are permitted by schools and organizations for internal use only. Credits, use and copyright slides must remain.

3 COPYRIGHTS AND TRADEMARKS This documentation is Copyright 2003 by Parallax, Inc. By downloading or obtaining a printed copy of this documentation or software you agree that it is to be used exclusively with Parallax products. Any other uses are not permitted and may represent a violation of Parallax copyrights, legally punishable according to Federal copyright or intellectual property laws. Any duplication of this documentation for commercial uses is expressly prohibited by Parallax, Inc. Check with Parallax for approval prior to duplicating any of our documentation in part or whole for any use. BASIC Stamp is a registered trademark of Parallax, Inc. If you decide to use the name BASIC Stamp on your web page or in printed material, you must state that "BASIC Stamp is a registered trademark of Parallax, Inc." Other brand and product names are trademarks or registered trademarks of their respective holders. DISCLAIMER OF LIABILITY Parallax, Inc. and Southern Illinois University are not responsible for special, incidental, or consequential damages resulting from any breach of warranty, or under any legal theory, including lost profits, downtime, goodwill, damage to or replacement of equipment or property, or any costs of recovering, reprogramming, or reproducing any data stored in or used with Parallax products. Parallax is also not responsible for any personal damage, including that to life and health, resulting from use of any of our products. You take full responsibility for your BASIC Stamp application, no matter how life threatening it may be.

4 Devices that Contain Light Sensors The boebot uses sensors to interact with its environment. There are a variety of sensors used for a variety of purposes: Pressure, rotation, temperature, smoke, tilt, vibration, light and so on. Light sensors are also used in a variety of applications: Automatic street lights TV remotes using Infrared (non-visible light). Camera flash and exposure controls Security alarms

5 Introducing the Photoresistor While there are a variety of light sensors, a very popular one is the photoresistor in that it is easy to use and inexpensive. As the name implies, it is a resistor that reacts to light. The active ingredient Cadmium Sulfide (CdS) allows electrons to flow more easily when light energy hits it, thus lowering it resistance (opposition to current flow). The brighter the light the lower the resistance.

6Why? A photoresistor is made of a high resistance semiconductor. The photons of high frequency light are absorbed by the semiconductor giving bound electrons enough energy to jump into the conduction band. The resulting free electrons (and their hole partners) conduct electricity thereby lowering resistance.

7 Basic Circuit As the photoresistor’s resistance changes with light exposure, so does the voltage at Vo. As R gets larger, Vo gets smaller, and as R gets smaller, Vo gets larger. Vo is what the BASIC Stamp I/O pin is detecting when it is functioning as an input. If this circuit is connected to IN6, when the voltage at Vo is above 1.4 V, IN6 will store a 1. If Vo falls below 1.4 V, IN6 will store a 0. V0V0 R

8 A Better Idea: Measuring Using Time The photoresistor can also be used with the BASIC Stamp in an RC circuit (Resistor- Capacitor circuit) to obtain a value in relation to the amount of resistance, or, in this case, the amount of light hitting the sensor. In a RC-network, the capacitor is charged and discharged at different rates determined by the resistor and the capacitor sizes.

9 Introducing the Capacitor The capacitor is a device which can store an electron charge. Its size is expressed typically in microfarads (  F) or millionths of Farads. Certain types of capacitors are polarity sensitive, that is, they can only be connected in one direction. Connecting a polarity sensitive capacitor backwards can cause the device to explode. Wear safety glasses. Ensure proper polarity when connecting.

10

11 Polled RC Time In the Polled RC Time circuit the following occurs: Button is pressed charging the capacitor. 5V The button is released, the BASIC Stamp begins timing and the capacitor begins to discharge.

12 3.The BASIC Stamp continues timing until input P7 changes to a low (drops below 1.4V). LOOP UNTIL IN7=0 4.Time is displayed in tenths of seconds. V => 1.4V Logic 1 V < 1.4V Logic 0

13 The time to discharge the capacitor is in proportion to the size of the resistor and capacitor network (RC). The larger the capacitance (C), the greater the charge it can hold, increasing time. The larger the resistance (R), the slower the capacitor will discharge, increasing time.

14 Activity #3: Reading with BASIC Stamp The BASIC Stamp has an instruction to perform much of the timing operation automatically: RCTIME Pin, State, Variable Where: Pin is the pin the RC network is connected. State is the initial state when timing begins. Variable is the memory location to store the results. Just like PULSOUT the time is the number of 2uS increments.

15 Activity #1: Build & Test Light Meter The RC Time circuits is configured so that the capacitor is charged by the output (P2 in this case) and the time to discharge though the resistor is measured. In this case, as light level changes, discharge time will change.

16 What happens to the value of time as the light level changes? When is it lowest? Highest?

17 Using Stamp Plot Lite This image shows a plot of the light level. Note how the value increases from left to right then drops again suddenly?

18 FLASHLIGHT BEAM FOLLOWING BOE-BOT Activity: Test and calibrate your Boe-Bot’s light sensors to recognize the difference between ambient light and a directed flashlight beam. Program the Boe-Bot to follow the flashlight beam that is pointed at the surface in front of the Boe-Bot.

19 Adjust Sensors to Search for Flashlight Beam Position the photoresistors’ light-collecting surfaces are pointing ahead at separate points on the ground about 2 in (5.1 cm) in front of the Boe-Bot.

20 Difference in light Know the difference between light readings with and without the flashlight beam shining in the Boe-Bot’s path. ' {$STAMP BS2} ' {$PBASIC 2.5} timeLeft VAR Word timeRight VAR Word DEBUG "PHOTORESISTOR VALUES", CR, "timeLeft timeRight", CR, " " DO HIGH 6 ' Left RC time measurement. PAUSE 3 RCTIME 6, 1, timeLeft HIGH 3 ' Right RC time measurement. PAUSE 3 RCTIME 3, 1, timeRight DEBUG CRSRXY, 0, 3, DEC5 timeLeft, " ", DEC5 timeRight PAUSE 100 LOOP

21 Use Constants Use constants (from your table): LeftAmbient CON 108 RightAmbient CON 114 LeftBright CON 20 RightBright CON 22 Calculate other constants ' Average Scale factor LeftThreshold CON LeftBright + LeftAmbient /2 * 5 / 8 RightThreshold CON RightBright + RightAmbient /2 * 5 / 8

22 The Program

23 The Program

24 The Program