ENGR 101: Robotics Lecture 6 – Follow That Light! Outline  The Scribbler's Light Sensors  Using EEPROM Memory References 

Slides:



Advertisements
Similar presentations
4/22/ MAKING YOUR ROBOTS SEE Building and Testing Photosensitive eyes.
Advertisements

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.
What is included in a circuit diagram?
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
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.
Using the NXT Light Sensor. 2 Connect One Light Sensor – 1 From My Files use Left / Right NXT buttons and get to View menu and push Orange button. From.
Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics.
ENGR 101: Robotics Lecture 2 – Text Programming Outline  Introduction to PBASIC  Variables, I/O, Arithmetic  Controlling the LEDs References 
ENGR 101: Robotics Lecture 5 – Subprograms Outline  Subprograms  The Infrared Sensor System References 
ENGR 101: Robotics Lecture 1 – Introduction Outline  The Scribbler's Sensors  Demo Modes  Graphical Programming References 
Solar Energy Labs – Part 1 ENGR Today's Learning Objectives  After today's class, students will be able to: Describe and build both a calibration.
Introduction to Sensors
10-1 Programming Remember: –programming language –how to program (conceptually) –intro to programming the “ROBOT” computer In this lecture: –programming.
LEGO Mindstorms NXT Programming We will be using the Common Palette for our Robots This is how you download your program onto the brick Drag and drop a.
Embedded Programming and Robotics
LSU 06/04/2007BASIC Stamp Editor1 The BASIC Stamp Editor Programming Unit, Lecture 3.
Sensors Material taken from Robotics with the Boe-Bot.
MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
SNAP CIRCUITS INSTRUCTIONS 1.Make sure ALL parts are in place before beginning 2.Follow the Projects in order, starting with #1 3.The BLACK numbers show.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
BEGINNER PROGRAMMING Lesson
Last week’s project demos Servo control with potentiometer and enable/disable buttons Demo in class tonight – don’t start on the next project until I’ve.
Boe-Bot Review.
1 A Modification of Chapters 5 & 7 Slides Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by:
Available at: Lesson 3.6 – Program Line Follower in Autonomous Mode Program Line Follower in Autonomous Mode.
Programming the CheapBot-14. Start the Editor Set the Mode.
10/10/ Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.
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.
Software and documentation Download and install: “Setup-Stamp-Editor-Lrg-v2.2.6.exe”  Downloads  BASIC Stamp software BASIC Stamp Syntax.
1 Chapter 6: Light Sensitive Navigation With Photoresistors Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation.
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi. Objectives 1. Control the rotation of standard servo motor  A standard servo motor is limited in its rotation.
Basic Stamp OEM module By Wilmer Arellano. 2  The BASIC Stamp 2 OEM is a discreet component version of the BS2 which may be purchased in kit form. 
Sensors Material taken from Robotics with the Boe-Bot.
Microcontroller I Seth Price Department of Chemical Engineering New Mexico Tech Rev. 9/22/14.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Microcontrollers Module 3: Digital Display. 7 – Segment Display A seven-segment display (SSD), or seven- segment indicator, is a form of electronic display.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
ENGR 101: Robotics Lecture 3 – Robot Motion Outline  Robot Motion  FOR Loops  Making Music References 
ENGR 101: Robotics Lecture 4 – Making Decisions Outline  The Stall Sensor  Making Decisions  Random Number Generation References 
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
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.
PHY 235 Robotics Workshop Day 4 Robotic Behaviors, Light Sensing, Voltage Dividers, LCD-MOD.
Programming 101 The Common Palette Content provided by Connor Statham (9 th Grade Student) Formatting by Shannon Sieber.
SNAP CIRCUITS INSTRUCTIONS 1.Make sure ALL parts are in place before beginning 2.Follow the Projects in order, starting with #1 3.The BLACK numbers show.
ROBOTC Software EV3 Robot Workshop
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
ROBOTC Software EV3 Robot Workshop Lawrence Technological University.
1 BOE-BOT Lecture #2 DE - Digital Electronics Servos and the BOE-BOT.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
Ohm’s Law Electronic Training Course Slide# 1. Slide# 2 Ohm’s Law Review of Current, Voltage and Resistance An electric current is the flow of electrons.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
By Sanjay and Arvind Seshan
ARDUINO LINE FOLLOWER ROBOT
Potential Divider Aims What is a potential divider
Programming Boe-Bots (Part 1)
Beginner Programming Lesson
BEGINNER PROGRAMMING Lesson
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi.
Controlling YOUR ROBOT
Beginner Programming Lesson
BEGINNER PROGRAMMING Lesson
SNAP CIRCUITS INSTRUCTIONS
Programming the BASIC Stamp
Let’s use a PUSH-Button!
Working with Photorestistors
Presentation transcript:

ENGR 101: Robotics Lecture 6 – Follow That Light! Outline  The Scribbler's Light Sensors  Using EEPROM Memory References  Hacker's Hints for the Scribbler Robot PBASIC Programming Guide: Writing Programs BASIC Stamp Syntax and Reference Manual 1

Lecture 6 – Follow That Light! Light Sensors The Scribbler contains three forward looking light sensors. The particular light sensors used on the Scribbler are known as Cadmium Sulfide (CDS) photoresistors. The resistance of a photoresistor decreases with increasing light intensity. (The brighter the light the smaller the resistance.)‏ The light sensors are deeply set in the Scribbler to narrow their focus. The side sensors look 30 degrees off of center. 2

Lecture 6 – Follow That Light! Light Sensors A portion of the Scribbler schematic diagram is shown on the following slide. Pins 0, 1 and 2 are connected to the right, middle and left light sensors respectively. To determine the light level first take a pin HIGH. This raises the voltage at the sensor to almost 5 V. We then change the pin to an input pin and measure how long it takes the voltage to fall to 1.4 V using RCTIME. 3

Lecture 6 – Follow That Light! Light Sensors 4

The syntax for RCTIME is RCTIME Pin, State, Variable RCTIME changes the direction of Pin to input and measures how long it takes the Pin to change from the initial State to the opposite state (High to Low or Low to High). The time (in units of 2 us) is stored in Variable (usually a Word variable). 5

Lecture 6 – Follow That Light! Light Sensors The voltage at the light sensor decreases with time according to the following formula: where V 0 is the initial voltage (5 V), R sensor is the resistance of the sensor and C is the value of capacitance. Solving for t we have: 6

Lecture 6 – Follow That Light! Light Sensors The state threshold voltage is 1.4 V, using V 0 = 5 V and solving for the threshold time gives: The sensor resistance decreases with increased light intensity, so smaller threshold times correspond to brighter light. 7

Lecture 6 – Follow That Light! Light Sensors The program (01_Light_Sensor.bs2) displays the RCTIME value for each of the sensors. Download and run the program. What happens if you cover a sensor with a finger? RT_LS PIN 0 CT_LS PIN 1 LT_LS PIN 2 dark VAR Word 8

Lecture 6 – Follow That Light! Light Sensors DO HIGH LT_LS HIGH CT_LS HIGH RT_LS PAUSE 3'Let V rise to 5 RCTIME LT_LS, 1, dark DEBUG CLS, HOME, DEC dark, ", " RCTIME CT_LS, 1, dark DEBUG DEC dark, ", " RCTIME RT_LS, 1, dark DEBUG DEC dark PAUSE 500 LOOP 9

Lecture 6 – Follow That Light! Light Sensors You may have noticed that the light sensors are not identical. To follow a light we need to track changes in the RCTIME value instead of comparing absolute levels. When your program first starts you will need to record the initial ambient light levels for all three sensors. We will explore playing with the light sensors in our final project. 10

Lecture 6 – Follow That Light! Using EEPROM Memory You can store, read and write values in the 2 kB EEPROM using the PBASIC DATA, READ, and WRITE commands. Your program is stored at the high end of the EEPROM so you will normally use low addresses for storing your own data. Selecting “Memory Map” from the Run menu will display the current memory layout of your program. (NOT of the actual EEPROM contents.)‏ 11

Lecture 6 – Follow That Light! Using EEPROM Memory DATA stores values when the program is downloaded. READ and WRITE are used to access data when the program is running. Here is a snippet that prevents your program from running until RESET is pressed: 0'0 when downloaded reset VAR Byte READ 16, reset IF (reset = 1) THEN Main: WRITE 16, 1 'Write 1 on 1 st run STOP 12