ENGR 101: Robotics Lecture 3 – Robot Motion Outline  Robot Motion  FOR Loops  Making Music References 

Slides:



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

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.
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 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.
Navigating the BOE-BOT
Hardware Meets Software CPSC 120 Principles of Computer Science February 15, 2012.
Servos The material presented is taken from a variety of sources including:
Digital Tachometer ENGR 4803 Electromechanical Systems & Mechatronics.
CS 1 with Robots Robot Sensors & Actuators Institute for Personal Robots in Education (IPRE)‏
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.
ENGR 101: Robotics Lecture 2 – Text Programming Outline  Introduction to PBASIC  Variables, I/O, Arithmetic  Controlling the LEDs References 
ME 224 Final Presentation Fall 2005 Joni Stegeman Ingrid Lin Giovanni Wuisan Patrick Luckow Brent Willson.
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 
Microprocessors Tutorial 2: Arduino Robotics
LSU 06/04/2007BASIC Stamp Editor1 The BASIC Stamp Editor Programming Unit, Lecture 3.
Slide Menlo Drive Suite 100 Rocklin, CA Presentation based on: “What’s a Microcontroller?" by Andy Lindsay Presented by Andy.
Microcontrollers Module 4: Motion Control. Module Objectives Upon successful completion of this module, students will be able to: Give examples of microcontroller.
1 Chapter 8: Frequency and Sound Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A.
Control Some Material taken from RobotSubsumption.pdf.
The Basic Stamp Instruction Set Architecture. The Microprocessor A microprocessor is a computer that typically has an architecture that is well suited.
1 Basic Electronics Voltage (V or E): Potential difference between 2 points. Volts. (+) - A lack of electrons (-) – A surplus of electrons When a circuit.
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.
Controlling the Outside World
10/10/ Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.
Software and documentation Download and install: “Setup-Stamp-Editor-Lrg-v2.2.6.exe”  Downloads  BASIC Stamp software BASIC Stamp Syntax.
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. 
DC Motor Control The material presented is taken from a variety of sources including: ponents/inductor001.html#howworks,
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
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.
Slide Menlo Drive Suite 100 Rocklin, CA Presentation based on: “What’s a Microcontroller?" by Andy Lindsay Presented by Andy.
ENGR 101: Robotics Lecture 4 – Making Decisions Outline  The Stall Sensor  Making Decisions  Random Number Generation References 
July 7, 2003 Slide 1 of 6 Automation, Robotics and Mechatronics Lab, SUNY at Buffalo Introduction To Programming Chetan Jadhav Talib Bhabharawala Seung-Kook.
Microprocessors Tutorial 2: Arduino Robotics. Agenda 1. Robot Anatomy 2. Sensor Review 3. PWM 4. MAKE: Fade 5. Motors 6. H Bridge 7. Robot Control library.
Slide Menlo Drive Suite 100 Rocklin, CA
Digital Electronics The Boe-Bot and Servo Motors.
Autonomous Vehicles Derek Smith EKU Dept. of Technology Computer Electronic Networking.
PROMGRAMING YOUR ROBOT How Servos Work: How to control your robot.
Digital Electronics Board-of-Education : Output. Board of Education - Output This presentation will explain, both from a hardware and software perspective,
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. 
ENGR 101: Robotics Lecture 6 – Follow That Light! Outline  The Scribbler's Light Sensors  Using EEPROM Memory References 
1 BOE-BOT Lecture #2 DE - Digital Electronics Servos and the BOE-BOT.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
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
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.
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
Servos The material presented is taken from a variety of sources including:
Programming Boe-Bots (Part 1)
Servos The material presented is taken from a variety of sources including:
PROMGRAMING YOUR ROBOT
Controlling YOUR ROBOT
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
Materials taken from IR Remote for the Boe-Bot by Andy Lindsay
Fevzi Ozaydin & Violet Mwaffo
Programming the BASIC Stamp
Presentation transcript:

ENGR 101: Robotics Lecture 3 – Robot Motion Outline  Robot Motion  FOR Loops  Making Music References  PBASIC Programming Guide: Setting Up PBASIC Programming Guide: Writing Programs BASIC Stamp Syntax and Reference Manual 1

Lecture 3 – Robot Motion Motor Control The right and left motors are controlled by signals on pins 12 and 13. Instead of using just a HIGH or LOW signal to turn the motors on or off (like the LEDs), motor speed (and direction) are determined by the duration of a high voltage pulse on the motor control pin. 2

Lecture 3 – Robot Motion Motor Control The PBASIC PULSOUT can be used to create a pulse of a specific duration on a particular pin: PULSOUT PIN, DURATION A duration of 1000 (2 ms) is full reverse, 2000 (4 ms) stops the motor, and 3000 (6 ms) is full forward. (Duration is in units of 2 us). 3

Lecture 3 – Robot Motion Motor Control PULSOUT actually inverts the signal at a PIN so to be sure to send a HIGH pulse we must set the PIN LOW first. Here is code to turn the RIGHT motor on at full speed for 5 seconds and then stop the motor: LOW 12' REQUIRED PAUSE 100' INITIALIZATION!! PULSOUT 12, 3000' Full Speed PAUSE 5000' 5 seconds PULSOUT 12, 2000' Stop 4

Lecture 3 – Robot Motion Motor Control The PIN declaration can be used to assign a label to a particular PIN. The CON declaration can similarly be used to assign a label to a constant value: RtMotor PIN 12 LtMotor PIN 13 FwdFull CON 3000 RvrFull CON 1000 StpFull CON

Lecture 3 – Robot Motion Motor Control With these declarations the following program will send the robot forward at full speed for 5 sec, stop for 5 sec, full reverse for 5 sec, and then stop: LOW RtMotor' REQUIRED LOW LtMotor' INITIALIZATION!! PAUSE 100 PULSOUT RtMotor, FwdFull PULSOUT LtMotor, FwdFull ' Cont. on next slide... 6

Lecture 3 – Robot Motion Motor Control PAUSE 5000 PULSOUT RtMotor, StpFull PULSOUT LtMotor, StpFull PAUSE 5000 PULSOUT RtMotor, RvrFull PULSOUT LtMotor, RvrFull PAUSE 5000 PULSOUT RtMotor, StpFull PULSOUT LtMotor, StpFull END 7

Lecture 3 – Robot Motion Motor Control The motors are not identical. A PULSOUT duration of 3000 to BOTH motors may not cause the Scribbler to go straight ahead. If the Scribbler veers to the right, you will need to slow down the left motor by using a duration of less than You will need to follow the calibration procedure on pages 16 and 17 of the Writing Programs guide to find the duration values that cause your Scribbler to go straight. 8

Lecture 3 – Robot Motion Variables It is convenient to use a variable to label a memory location. You must declare a variable before using it: name VAR size size determines the range of values the variable can hold: BIT0-1(1 bit)‏ NIB0-15(4 bits)‏ BYTE0-255(8 bits)‏ WORD (16 bits)‏ Always use the smallest size necessary. 9

Lecture 3 – Robot Motion Motor Control This code snippet uses a variable and a FOR loop to smoothly accelerate the Scribbler: speed VAR Word FOR speed = StpFull TO FwdFull STEP 250 PULSOUT RtMotor, speed PULSOUT LtMotor, speed PAUSE 1000 NEXT 10

Lecture 3 – Robot Motion Making Music The PBASIC FREQOUT command is used to play a tone on the speaker: FREQOUT pin, duration, freq1, freq2 The speaker is connected to pin 11. The duration is in ms. freq1 is the frequency (in Hertz) of the tone you want to play. freq2 is an optional second frequency (you can play two tones at once). 11

Lecture 3 – Robot Motion Making Music The following code plays five tones, each is slightly longer and at a higher frequency than the one preceeding it: speaker PIN 11 FREQOUT speaker, 200, 500 FREQOUT speaker, 400, 1000 FREQOUT speaker, 600, 1500 FREQOUT speaker, 800, 2000 FREQOUT speaker, 1000,

Lecture 3 – Robot Motion Assignment Reproduce the effect of the program on the previous slide using a FOR loop and a single FREQOUT command. Page 14 of the “Writing Programs” book shows the mapping between musical notes and frequencies. Program the Scribbler to play the beginning of a song... Find the calibration values for your robot and record them. You will need them in the future. 13