Top Banner
05/13/22 1 Controlling YOUR ROBOT Controlling YOUR ROBOT
16

10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

Jan 20, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23 1

Controlling YOUR ROBOTControlling YOUR ROBOT

Page 2: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Basic StampBasic Stamp Basic StampBasic Stamp

Input - output pins

Interpreter Chip Power supply: 5 Volts voltage

Memory: EEPROM

Clock - 20 MHz Oscillator

Page 3: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Board of EducationBoard of Education

Intelligent programmable controller boardIntelligent programmable controller board accepts the Basic Stamp II controller chip accepts the Basic Stamp II controller chip

Page 4: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

ServosServos

MotorsMotors Connected to your micro controllerConnected to your micro controller Receives power from power source and signals Receives power from power source and signals

from controllerfrom controller Moves the wheels based on the signals receivedMoves the wheels based on the signals received

Page 5: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

How Servos WorkHow Servos Work

Power Source

Ground

Page 6: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Powering the ServoPowering the Servo Pulses Pulses Electric Power Electric Power Mechanical Mechanical

PowerPowerhigh

low

Low: 0 volts No power-pause

High: 5 volts Power Supplied

Page 7: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Width of High PulseWidth of High Pulse Pulse TimingsPulse Timings

Pulses are sent to the servos in terms of milliseconds

1 ms high times and 20 ms low time. The high time tells the servos what to do.

Page 8: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Width of High PulseWidth of High Pulse Direction of movementDirection of movement

Range: 1ms – 2ms.

Full Speed: 1ms: clockwise. Forward for right wheel and backwards for left

wheel.

2ms: anticlockwise. Backwards for right wheel and forward for left wheel.

Partial Speeds: 1.1ms – 1.4ms: clockwise. Forward for right wheel and backwards

for left wheel.

1.6ms – 1.9ms: anticlockwise. Backwards for right wheel and forward for left wheel.

Full Stop 1.5ms

Page 9: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Width of Low PulseWidth of Low Pulse

Pause DurationPause Duration

Right Wheel

High Pulse Width = 1.25ms

Low Pulse Width = 2seconds

Page 10: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

CommandsCommands

Reset (to low pulse)Reset (to low pulse) ‘low port#’ Example: ‘low 12’ sets p12 to output low Compulsory at the beginning of every program

Set high pulse widthSet high pulse width ‘pulsout port#, value’ Values range from 500 – 1000.

500 = 1ms, 1000 = 2ms Example: ‘pulsout 12, 500’ send 1ms pulses to p12

Page 11: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

CommandsCommands

PausePause ‘pause time (ms)’ Example: ‘pause 20’ waits for 20ms after each full

wheel spin

LoopsLoops ‘goto loop name ’ Starts from the command line after loop Example: ‘goto loop’ looks for the ‘loop:’ in the program

and repeats the commands from that point

Page 12: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Example ProgramExample Program

Page 13: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Running the ProgramRunning the Program Name the program descriptively and save itName the program descriptively and save it

Click the file menu Select save (or save as) Type in the file name and make sure the file type

is *.bs2

Run the ProgramRun the Program Click ‘Run’ Select Run’

Make sure the wheel is turning as Make sure the wheel is turning as commandedcommanded

Page 14: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Now Your TurnNow Your Turn Make the right wheel turn Make the right wheel turn

counterclockwisecounterclockwise Make the left wheel turn clockwiseMake the left wheel turn clockwise Make the left wheel turn Make the left wheel turn

counterclockwisecounterclockwise Make the robot move forward - both Make the robot move forward - both

wheels turn clockwisewheels turn clockwise

Page 15: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Moving ForwardMoving Forward

Page 16: 10/10/2015 1 Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.

04/21/23

Now Your TurnNow Your Turn

Make the robot move backwardsMake the robot move backwards

Make the robot stay stillMake the robot stay still

Make the robot spin left Make the robot spin left

Make the robot spin rightMake the robot spin right