the Board of Education

Similar documents
In this activity, you will program the BASIC Stamp to control the rotation of each of the Parallax pre-modified servos on the Boe-Bot.

Thinking Robotics: Teaching Robots to Make Decisions. Jeffrey R. Peters and Rushabh Patel

Chapter #4: Controlling Motion

Controlling Your Robot

Chapter 3: Assemble and Test Your Boe-Bot

WEEK 5 Remembering Long Lists Using EEPROM

ME 2110 Controller Box Manual. Version 2.3

Chapter #5: Measuring Rotation

Directions for Wiring and Using The GEARS II (2) Channel Combination Controllers

Feed-back loop. open-loop. closed-loop

Chapter 2: Your Boe-Bot's Servo Motors

Infrared Remote AppKit (#29122)

Use and Copyright Microcontroller Motion Activity #1: Connecting and Testing the Servo Servo on Board of Education Rev. C Servo on Board of Education

Programming PIC Microchips

Programmable Control Introduction

A servo is an electric motor that takes in a pulse width modulated signal that controls direction and speed. A servo has three leads:

Web Site: Forums: forums.parallax.com Sales: Technical:

Compass Module AppMod (#29113) Electro-Mechanical Compass

In order to achieve the aims of this thesis the following work was done:

Mech 296: Vision for Robotic Applications. Logistics

HB-25 Motor Controller (#29144)

Learning Objectives. References 10/26/11. Using servos with an Arduino. EAS 199A Fall 2011

The light sensor, rotation sensor, and motors may all be monitored using the view function on the RCX.

Intro to Engineering II for ECE: Lab 3 Controlling Servo Motors Erin Webster and Dr. Jay Weitzen, c 2012 All rights reserved

Using Servos with an Arduino

Contents. Part list 2 Preparartion 4 izebot. izebot Collision detection via Switch. izebot Serial Communication. izebot Remote Control

Two Hour Robot. Lets build a Robot.

Experiment #3: Micro-controlled Movement

The Mechatronics Sorter Team Members John Valdez Hugo Ramirez Peter Verbiest Quyen Chu

Programming 2 Servos. Learn to connect and write code to control two servos.

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

Introduction to the ME2110 Kit. Controller Box Electro Mechanical Actuators & Sensors Pneumatics

Experiment 4.B. Position Control. ECEN 2270 Electronics Design Laboratory 1

Coding with Arduino to operate the prosthetic arm

2010 UNT CSE University of North Texas Computer Science & Engineering

Automobile Prototype Servo Control

Hitachi HM55B Compass Module (#29123)

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School

THE NAVIGATION CONTROL OF A ROBOTIC STRUCTURE

Parts List. Robotic Arm segments ¼ inch screws Cable XBEE module or Wifi module

B RoboClaw 2 Channel 30A Motor Controller Data Sheet

B Robo Claw 2 Channel 25A Motor Controller Data Sheet

PROGRAMMABLE CFE PULLER

RC Servo Interface. Figure Bipolar amplifier connected to a large DC motor

TETRIX PULSE Workshop Guide

Robotics using Lego Mindstorms EV3 (Intermediate)

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

SMART Funded by The National Science Foundation

CNC Router Parts CNC Router Parts 2.2 kw Plug and Play Spindle / VFD System CRP800 Set Up Guide

StenBOT Robot Kit. Stensat Group LLC, Copyright 2018

Lab book. Exploring Robotics (CORC3303)

InnobotTM User s Manual

Hare and Snail Challenges READY, GO!

Blue Point Engineering

' Turn off A/D converters (thereby allowing use of pins for I/O) ANSEL = 0

DPC-10. DPC-10 Software Operating Manual. Table of Contents. Section 1. Section 2. Section 3. Section 4. Section 5

Integrated Easy Servo

Project Proposal. Underwater Fish 02/16/2007 Nathan Smith,

understanding sensors

PING))) Ultrasonic Distance Sensor (#28015)

Introduction to the VEX Robotics Platform and ROBOTC Software

V-MOTION LITE USER GUIDE. Rat Rig All rights reserved.

Objectives: Learn what an Arduino is and what it can do Learn what an LED is and how to use it Be able to wire and program an LED to blink

Integrated Servo Motor UCS57

Built-in soft-start feature. Up-Slope and Down-Slope. Power-Up safe start feature. Motor will only start if pulse of 1.5ms is detected.

Chapter 6: Microcontrollers

DXXX Series Servo Programming...9 Introduction...9 Connections HSB-9XXX Series Servo Programming...19 Introduction...19 Connections...

Report and Documentation. Date Submitted: ME3483 Mechatronics

Robot Programming Manual

Tarocco Closed Loop Motor Controller

ES86 Series Closed-loop Stepper Drive + Motor System (ES-D808 Drive+ Motor/Encoder)

6.01 Fall to provide feedback and steer the motor in the head towards a light.

FLL Programming Workshop Series

LEGO Mindstorms Class: Lesson 1

Servo Indexer Reference Guide

815-BR SERVO AMPLIFIER FOR BRUSH SERVOMOTORS

Budget Robotics Octabot Assembly Instructions

Robotics! Student Guide. Version 1.4

Studuino Icon Programming Environment Guide

Get Your Motor Runnin

Datasheet of the MEZ Stepper Servo Drive MEZ 2D VDC, 8.2A Peak, Closed-loop, No Tuning. Version

Microcontroller interfacing

Electronic Project Interdisciplinary Creation by Amy Barone and Cindy Bronen

ies-2309 Integrated Easy Servo

Servo Sweep. Learn to make a regular Servo move in a sweeping motion.

Programming a Servo. Servo. Red Wire. Black Wire. White Wire

Motors and Servos Part 2: DC Motors

ES86 Series Closed-loop Stepper Drive + Motor System (Drive+ Motor/Encoder)

TWEAK THE ARDUINO LOGO

Exercise 3-3. Manual Reversing Starters EXERCISE OBJECTIVE DISCUSSION. Build manual reversing starters and understand how they work.

Robotic Navigation Distance Control Platform

I.1 Smart Machines. Unit Overview:

Wireless Technology in Robotics

LC-10 Chipless TagReader v 2.0 August 2006

1. ASSEMBLING THE PCB 2. FLASH THE ZIP LEDs 3. BUILDING THE WHEELS

EE 314 Spring 2003 Microprocessor Systems

CL86T. 24~80VDC, 8.2A Peak, Closed-loop, No Tuning. Descriptions. Closed-loop. Stepper. Applications. Datasheet of the Closed-loop Stepper CL86T

Devantech SRF04 Ultra-Sonic Ranger Finder Cornerstone Electronics Technology and Robotics II

SumoBot Mini-Sumo Robotics Assembly Documentation and Programming

AppKit: Using the LTC bit Analog-to-Digital Converter

Transcription:

the Board of Education Voltage regulator electrical power (V dd, V in, V ss ) breadboard (for building circuits) power jack digital input / output pins 0 to 15 reset button Three-position switch 0 = OFF 1 = ON / wheels OFF 2 = ON / wheels ON connection to computer BASIC stamp module (the brain) image credit: www.turbosquid.com/3d-models/parallax-board-education-3d-model/705602 1

hooking up servo motors servo ports red & black color labels image credit: www.turbosquid.com/3d-models/parallax-board-education-3d-model/705602 2

install software to program car https://www.parallax.com/downloads/basic-stamp-editor-software once installed, an icon like this should be available on your computer click here Just copy 18MB file off the thumb drive to speed things up. 3

write a simple program 2. click here 4. click here 1. click here 3. type this 4

Hello World program output The debug (or print) window will automatically open 5

David Hall the motors are called servos

STEM Discovery wires to power & control servo white = signal red = 5V black = Gnd output shaft 7

types of servos continuous rotation can rotate all the way around in either direction standard can only rotate 180 degrees white wire tells servo which way to spin & how fast to spin white wire tells servo which position to hold 8

servo components 1. small DC motor 2. gearbox with small plastic gears to reduce the RPM and increase output torque 3. special electronics to interpret a pulse signal and deliver power to the motor 9

making a wheel rotate continuously ' {$STAMP BS2} ' {$PBASIC 2.5} DO PULSOUT 13, 650 PAUSE 20 LOOP ' {$STAMP BS2} ' {$PBASIC 2.5} DO PULSOUT 13, 750 PAUSE 20 LOOP ' {$STAMP BS2} ' {$PBASIC 2.5} DO PULSOUT 13, 850 PAUSE 20 LOOP 10

Tuning a servo (also known as centering a servo) ' {$STAMP BS2} ' {$PBASIC 2.5} DO PULSOUT 13, 750 PAUSE 20 LOOP If you have the code shown running, the servo connected to port 13 should not be turning. If the servo is turning, then adjust the potentiometer inside the servo as shown until it stops. ONLY TINY MOVEMENTS OF THIS POTENTIOMETER ARE TYPICALLY NEEDED!

voltage (V) how the control works ' {$STAMP BS2} ' {$PBASIC 2.5} pulse = 650 2μs = 1300μs = 1.3ms pulse = 750 2μs = 1500μs = 1.5ms DO PULSOUT 12, 650 PAUSE 20 LOOP pulse = 850 2μs = 1700μs = 1.7ms 5V - 20ms full speed clockwise pulse width varies between 1.3ms and 1.7ms full speed counter clockwise PULSOUT argument pulse width (μs) servo action 650 1300 full speed CW 700 1400 ~½ speed CW 750 1500 stopped 800 1600 ~½ speed CCW 0V - time (milliseconds) 850 1700 full speed CCW speed not linear with pulse duration! 12

subroutines (GOSUB) GOSUB forward causes the program to look ahead to find and run a subroutine named forward You must type END at the end of the main part of your code so that the space afterward can be used to define subroutines subroutines are named by typing a colon after the name RETURN causes the program to go back to the line after the instruction that called the subroutine FOR loops a FOR loop allows a programmer to execute a piece of code several times in a row, and stop after a specified number of times in this example, the variable counter starts at 1 and increases by 1 each time the included code is executed, until counter reaches 100 subroutines allow a programmer to reuse the same code multiple times as a program is executed the word NEXT is used to denote the end of the code included in the loop 13

dead reckoning navigation ' {$STAMP BS2} ' {$PBASIC 2.5} counter VAR Word loops VAR Word main part of program loops = 20 GOSUB forward loops = 13 GOSUB turnleft END by setting the number of loops to complete on each type of motion, the amount of time spent for each leg of the journey can be controlled easily (it will take about 20ms per loop) subroutines for defining different kinds of motion many more could be defined to fully customize how you want to be able to control your bot forward: FOR counter = 1 TO loops PULSOUT 12, 650 PULSOUT 13, 850 PAUSE 20 NEXT RETURN turnleft: FOR counter = 1 TO loops PULSOUT 12, 650 PULSOUT 13, 650 PAUSE 20 NEXT RETURN turning wheels in the opposite direction (i.e. one clockwise, one counter-clockwise) on each side actually makes both sides of the bot go forward in roughly a straight line. this happens because the servo axles face opposite directions. turning wheels in the same direction (i.e. both clockwise) on each side actually makes one side of the bot go forward and one side go backward. this results in a turn. this happens because the servo axles face opposite directions. 14

play around with car to make it drive around an object object

accepting keyboard input (DEBUGIN command) your program will wait until a key is pressed, then store the keystroke into the variable key Your bot will generate the you just pressed text, then show the value stored in key CR stands for carriage return it makes the debug output start a new line if this box is not checked, then each keystroke entered will automatically be repeated in the output of the Debug Terminal (i.e. the dark blue area) type here text generated by the bot is shown here 16

keyboard control ' {$STAMP BS2} ' {$PBASIC 2.5} variable for storing a keystroke variable for counting loops main loop for continually accepting keyboard input and choosing motion subroutines for defining different kinds of motion many more could be defined to fully customize how you want to be able to control your bot key VAR Word counter VAR Word loops VAR Word loops = 10 DO DEBUGIN key IF key = w THEN GOSUB forward ELSEIF key = a OR key = A THEN GOSUB turnleft ENDIF LOOP END forward: FOR counter = 1 TO loops PULSOUT 12, 650 PULSOUT 13, 850 PAUSE 20 NEXT RETURN turnleft: FOR counter = 1 TO loops PULSOUT 12, 650 PULSOUT 13, 650 PAUSE 20 NEXT RETURN variable for setting the number of loops to count (the number 10 can be changed to tune performance) this command takes a keystroke from the Debug Terminal and stores it into variable key this line checks the character stored in key to determine if it is a w. if it is, the forward subroutine is run this line checks for either a lower or uppercase a. this might be useful to handle accidental caps lock keystrokes the ELSEIF command is used to check another condition if none of the earlier conditions were met the ENDIF command is used to end a set of conditions being checked. many more ELSEIF lines may be used before ENDIF Each time one of these subroutines is run, a set of 10 pulses (the value stored in loops) is sent to the servos 17

keyboard tuning (key repeat rate and delay) navigate to control panel, type keyboard in the search bar, and select Keyboard set the Repeat delay all the way to Short this will minimize the stumble when the bot first begins set the Repeat rate more to the Slow end of the scale this will make computer lock-ups less likely try it at several different settings on the slow end of the scale to find best performance what is going on? using slower setting prevents keyboard buffer overruns timing between keystroke events and your bot s brain is better at some repeat rates than others 18

play with various types of bot motion. try to find better mapping from keystrokes to bot activity. ideas: define several types of turns gentle sweeping turn basketball pivot zero-turn lawnmower use caps-lock and/or shift as a mode toggle slow speed mode for detailed movements, fast speed mode for traveling sharp turn mode/sweeping turn mode movement control mode/attachment control mode etc object this is an opportunity to practice using conditional structures in PBASIC. note that conditional statements can be nested, i.e. one can be placed inside another. try having a race between a bot controlled by a person via keyboard control and one set up for dead reckoning