Materials taken from IR Remote for the Boe-Bot by Andy Lindsay

Slides:



Advertisements
Similar presentations
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Advertisements

IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
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.
IR Control Materials taken from IR Remote for the Boe-Bot by Andy Lindsay.
Parallax, Inc. Presentation based on: “Robotics: with the Boe-Bot"
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.
Hardware Meets Software CPSC 120 Principles of Computer Science February 15, 2012.
Control Some Material taken from RobotSubsumption.pdf.
Final Presentation Andres Fausto Stewart Bewley Philip Dawsey Ki Baek Eom.
Basic Stamp II is kinda cool Bytes of EEPROM(non-volatile) - Clock speed of 20 MHz. - Holds 600 lines of code in EEPROM - executes an average of.
Simple Logic Elevator Group 10: Zhen Yu Wu Wai Seng Ho Tat Chi Chio.
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 
Sensors Material taken from Robotics with the Boe-Bot.
Slide Menlo Drive Suite 100 Rocklin, CA Presentation based on: “What’s a Microcontroller?" by Andy Lindsay Presented by Andy.
Basic Stamp Quick Start. Basic Stamp II Self contained computer –“Micro-controller” Specialized for “embedded” computing (sensing and controlling things)
Microcontrollers Module 4: Motion Control. Module Objectives Upon successful completion of this module, students will be able to: Give examples of microcontroller.
Control Some Material taken from RobotSubsumption.pdf.
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.
The Basic Stamp Instruction Set Architecture. The Microprocessor A microprocessor is a computer that typically has an architecture that is well suited.
Basic Stamp OEM module By Wilmer Arellano. OEM BASIC Stamp 2sx Wiring diagram Note: - is connection to negative pole of the battery 220 Ohm Push button.
Robotics Engineering Basic Maneuvers. Getting the Boe-Bot to Move One of the first tasks we need to do is to get our bots moving.One of the first tasks.
Programming the CheapBot-14. Start the Editor Set the Mode.
Software and documentation Download and install: “Setup-Stamp-Editor-Lrg-v2.2.6.exe”  Downloads  BASIC Stamp software BASIC Stamp Syntax.
Flowcharts and Schematics (Using Visio). Flowcharts  An Algorithm is just a detailed sequence of simple steps that are needed to solve a problem.  A.
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. 
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.
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.
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.
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.
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 
Control Material taken from RobotSubsumption.pdf and SumoBot : Mini-Sumo Robotics.
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.
Digital Electronics The Boe-Bot and Servo Motors.
Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class.
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. 
1 BOE-BOT Lecture #2 DE - Digital Electronics Servos and the BOE-BOT.
Limited rotation servo basics David Hall output shaft servo horn red wire = 5V + black wire = Gnd - white wire = control signal standard servo.
The “Board of Education” 1 Three-position switch 0 = OFF 1 = ON / wheels OFF 2 = ON / wheels ON breadboard (for building circuits) electrical power (V.
Slide Menlo Drive Suite 100 Rocklin, CA
Introduction to Servos
Servo Positioning Pulse Width Direction of Rotation PULSOUT Period
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
OEM BASIC Stamp 2sx 220 Ohm.
BASIC Stamp II Programming for Descartes Robots
Materials taken from IR Remote for the Boe-Bot by Andy Lindsay
Servos The material presented is taken from a variety of sources including:
Some Material taken from RobotSubsumption.pdf
IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Programming Boe-Bots (Part 1)
Servos The material presented is taken from a variety of sources including:
Describe how NASA remotely controls equipment in space.
PROMGRAMING YOUR ROBOT
Control Structures – Selection
Material taken from Robotics with the Boe-Bot
Chapter 5: Tactile Navigation With Whiskers
Some Material taken from RobotSubsumption.pdf
Pololu DC Motor Controller
Materials taken from IR Remote for the Boe-Bot by Andy Lindsay
Karl Jean-Francois-James Madison H.S. & Eldiquen Mangubat-IS 232
Intro to Programming CURIE 2011.
Fevzi Ozaydin & Violet Mwaffo
Programming the BASIC Stamp
Presentation transcript:

Materials taken from IR Remote for the Boe-Bot by Andy Lindsay IR Control Materials taken from IR Remote for the Boe-Bot by Andy Lindsay

The Plan: Use a TV Remote to Control the Boe-Bot IR Signal: 980 nm, 38.5 kHz Sony TV Remote Control. Basic Stamp Program to Guide the Boe-Bot Based on IR signals PWM: Inverted, 0.6ms PW-off 1.2ms PW-on

How It Works RCTIME is used because the IF…THEN statement does not finish until after the next data pulse has already begun. Since the start of the pulse (its negative edge) is missed while the IF…THEN statement is executing, PULSIN cannot properly detect the beginning of the pulse.

Last Week’s Program: Decoding the IR Signal time VAR Word ' SONY TV remote variables. remoteCode VAR Byte DEBUG "Binary Val Decimal Val", CR, "Bit 76543210 ", CR, "------------ -------------" DO ' Beginning of main loop. remoteCode = 0 ' Clear all bits in remoteCode. DO ' Wait for rest between messages. RCTIME 9, 1, time LOOP UNTIL time > 1000 PULSIN 9, 0, time ' Measure pulse. IF time > 500 THEN remoteCode.BIT0 = 1 RCTIME 9, 0, time ' Measure next pulse. IF time > 300 THEN remoteCode.BIT1 = 1 RCTIME 9, 0, time ' etc. IF time > 300 THEN remoteCode.BIT2 = 1 RCTIME 9, 0, time IF time > 300 THEN remoteCode.BIT3 = 1 IF time > 300 THEN remoteCode.BIT4 = 1 IF time > 300 THEN remoteCode.BIT5 = 1 IF time > 300 THEN remoteCode.BIT6 = 1 DEBUG CRSRXY, 4, 3, BIN8 remoteCode, CRSRXY, 14, 3, DEC2 remoteCode LOOP

Building an Application for Controlling the Boe-Bot New Features: Constants – keypad values will be assigned meaningful names using the CON directive. Subroutines – break the program into chunks of code that can be separately executed; each chunks is called a subrountine. SELECT…CASE statement – use the SELECT…CASE statement to recognizes all the different remote keys.

The CON Statement ' {$STAMP BS2} ' {$PBASIC 2.5} ' -----[ I/O Definitions ]------------------------------------------------- ' SONY TV IR remote declaration - input received from IR detector IrPin PIN 9 ' -----[ Constants ]------------------------------------------------------- ' SONY TV IR remote constants for non-keypad buttons Enter CON 11 ChUp CON 16 ChDn CON 17 VolUp CON 18 VolDn CON 19 Power CON 21 ' include VCR keys too ' -----[ Variables ]------------------------------------------------------- ' SONY TV IR remote variables irPulse VAR Word remoteCode VAR Byte

The SELECT…CASE Statement DEBUG CLS, "Remote code: " SELECT remoteCode CASE 0 TO 9 DEBUG DEC remoteCode CASE Enter DEBUG "ENTER" CASE ChUp DEBUG "CH+" CASE ChDn DEBUG "CH-" CASE VolUp DEBUG "VOL+" CASE VolDn DEBUG "VOL-" CASE Power DEBUG "POWER" CASE ELSE DEBUG DEC remoteCode, " (unrecognized)" ENDSELECT DEBUG CLREOL Can be any expression Case labels are compared To the expression value Statement(s) executed when case label matches expression

Subroutines DO GOSUB Get_Ir_Remote_Code DEBUG CLS, "Remote code: ", DEC remoteCode … LOOP Get_Ir_Remote_Code: remoteCode = 0 ' Clear all bits DO ' Rest between messages. RCTIME IrPin, 1, irPulse LOOP UNTIL irPulse > 1000 PULSIN IrPin, 0, irPulse ' Measure pulse. IF irPulse > 500 THEN remoteCode.BIT0 = 1 ' Set (or leave clear) bit-0. RCTIME IrPin, 0, irPulse ' Measure next pulse. IF irPulse > 300 THEN remoteCode.BIT1 = 1 ' Set (or leave clear) bit-1. RCTIME IrPin, 0, irPulse ' etc. IF irPulse > 300 THEN remoteCode.BIT2 = 1 RCTIME IrPin, 0, irPulse IF irPulse > 300 THEN remoteCode.BIT6 = 1 RETURN

Boe-Bot Control SELECT remoteCode CASE 2, ChUp ' Forward PULSOUT 13, 850 PULSOUT 12, 650 CASE 4, VolDn ' Rotate Left PULSOUT 13, 650 CASE 6, VolUp ' Rotate Right PULSOUT 12, 850 … CASE 7 ' Pivot Back-left PULSOUT 13, 750 CASE 9 ' Pivot Back-right PULSOUT 12, 750 CASE ELSE ' Hold Position ENDSELECT

Putting It All Together ' -----[ I/O Definitions ]------------------------------------------------- IrPin PIN 9 ' -----[ Constants ]------------------------------------------------------- ChUp CON 16 ChDn CON 17 … ' -----[ Variables ]------------------------------------------------------- remoteCode VAR Byte ' -----[ Main Routine ]---------------------------------------------------- DO GOSUB Get_Ir_Remote_Code DEBUG CLS, "Remote code: ", DEC remoteCode GOSUB Bot_Command LOOP ' -----[ Subroutines ]--------------------------------------------------------- Get_Ir_Remote_Code: remoteCode = 0 RETURN Bot_Command: SELECT remoteCode ENDSELECT

Other IR Remote Applications Applications Described in Chapter 3 of IR Remote for the Boe-Bot: Remote speed control Selecting among pre-programmed functions For Project 1, you will need to control both DC motors and servos.