You are visitor to this page since July 1st, 2001
This is the first Robotic Project I have made (1996) I am currently working on a new version as of 09/19/98.
About The Robot's CPU
Pictures and Information on a new object detection/tracking system I'm working on
Pictures of my New Lego Robot
A list of parts I used to construct my first lego robot
What can the Robot Do?
Sample of the Robots Program
Pictures of my Lego Robot
For More Information
|2048 Bytes of EEPROM program/Data storage (600 instructions)|
|32 Bytes of Variable Storage|
|16 general-purpose I/O Lines supporting 0-5v|
|Each I/O Line can send or Receive 300-38,400 Baud|
|24-pin DIP style package|
|Programmed from a PC or Mac, Using a Basic "Like" Language!|
The BS2 has 2K bytes of EEPROM which holds the executable BASIC program and any data. Memory not used by the BASIC program can be read and written at run-time as a data bank, or initialized with data at download time. This memory is only affected by downloading or run-time modification.
There are 32 bytes of RAM which serve as variable space and I/O pin interface for the BASIC program. This memory can be accessed as words, bytes, nibbles, or bits. Each time the BASIC program is run anew, this memory is cleared to all zeroes.
So, the 2K byte EEPROM is for program and data, and only affected by initial downloading or run-time modification. It survives power-down. The 32 bytes of RAM are for run-time variables and I/O pin access. This memory is cleared each time the BS2 is powered up, reset, or downloaded to.
The new object detection system I am working on currently pans a arc 180 arc and measures the distance to all objects within it's detection distance. Once it determins the closest object moves back to it (points to it) and waits for the object to move, then repeats the scan.
A List of Parts I Have Used to Construct It:
Code Sample of the Object Detection System
T Var Byte DISTANCE Var Byte SERVO1 Con 3 SERVOL var Word LOCATION var Word CLOSE var Byte OBJECTAT var Word DEBUG "Ready.",cr LOW SERVO1 PAUSE 500 TEST: DEBUG "Starting Scan",CR pulsout SERVO1,100 pause 200 CLOSE=0 for SERVOL=100 to 1150 STEP 50 pulsout SERVO1,SERVOL GOSUB GET_DISTANCE pulsout SERVO1,SERVOL+25 IF DISTANCE < CLOSE THEN SKIPIT CLOSE=DISTANCE LOCATION=SERVOL SKIPIT: NEXT DEBUG "Pointing At Object At=",DEC LOCATION,CR FOR T=1 to 15 pulsout SERVO1,LOCATION pause 40 NEXT KEEPSTARING: GOSUB GET_DISTANCE OBJECTAT=DISTANCE DEBUG "ObjectAt=",DEC OBJECTAT,cr GOSUB GET_DISTANCE IF DISTANCE>OBJECTAT+1 THEN EXIT IF DISTANCE<OBJECTAT-1 THEN EXIT GOTO KEEPSTARING EXIT: GOTO TEST GET_DISTANCE: HIGH 0 PAUSE 3 LOW 0 FOR T=1 TO 70 PAUSE 1 IF IN1=1 THEN FINISHED NEXT FINISHED: SHIFTIN 1,0,2,[DISTANCE\8] 'DEBUG "Dir=",Dec SERVOL,cr DEBUG "Distance=",dec DISTANCE,cr PAUSE 200 RETURN
Currently I have not started to add sensors. I have just debugged the drive system. Aprox 200 speed settings for each wheel set and forward/rev control for turning in place.
I added a Infrared Proximity Detector (not seen in the above pictures, purchased from Lynxmotion) to detect objects in the path of the robot (left, center, or right) and added code to avoid objects.
Currently the robot can only navigate to the brightest light source in a room. It's current operation mode has four major steps:
- Scan a 180 Degree Field of "Vision" taking light level readings, and determining the brightest direction of light.
- Decide if it needs to turn left, right, or continue moving forward.
- Check for Collision with an object while moving, if a collision occurs, display the total travel distance on the display
- Move forward for 1.5 Seconds and then repeat the process.
I am currently going to add a Ultrasonic range finder to the sensor platform, and rebuild the robot from the ground up to include two motors for steering, and 360 deg turning.
MOTOR1 con 0 MOTOR2 con 1 EYE con 2 SERVO1 con 3 SERVO2 con 4 HIT1 var in5 DISPLAY con 7 HEADLIGHT con 8 LED con 15 DIST VAR WORD TRAVELED VAR WORD I var word LIGHT var word LDIR var word LLEV var word SERVOL var word SCENTER con 600 SLEFT con 150 SRIGHT con 1050 CLR con 1 DI con 254
'Initialize all motors/servos HIGH LED LOW SERVO1 LOW SERVO2 LOW MOTOR1 LOW MOTOR2 PAUSE 50
'LOOP: 'HIGH EYE 'RCTIME EYE,9,LIGHT 'pause 40 'SEROUT DISPLAY,396+$4000,[DI,CLR,DI,Dec LIGHT] 'PAUSE 40 'goto LOOP
FOR I=1 To 10 PAUSE 250 SEROUT DISPLAY,396+$4000,[DI,CLR,DI,Dec 11-I," WAITING."] NEXT
SCAN: FOR I=1 to 35 pulsout SERVO2,150 pause 20 NEXT
LDIR=150 LLEV=30000 for SERVOL=150 to 1150 STEP 50 pulsout SERVO2,SERVOL pause 20 pulsout SERVO2,SERVOL pause 20 HIGH EYE RCTIME EYE,9,LIGHT SEROUT DISPLAY,396+$4000,[DI,CLR,DI,Dec LIGHT] 'debug "LOCATION=",dec SERVOL," LIGHT=",dec LIGHT,"/",dec LLEV,cr IF LIGHT >LLEV then CSCAN1 LLEV=LIGHT LDIR=SERVOL CSCAN1: TOGGLE LED next SERVOL=LDIR for i=1 to 25 pulsout SERVO2,SERVOL pause 20 next HIGH LED IF LDIR>SCENTER+150 then MOVELFT IF LDIR<SCENTER-150 then MOVERGT SEROUT DISPLAY,396+$4000,[DI,CLR,DI,"L=",Dec LLEV," CENTER"] SERVOL=SCENTER GOSUB TURN DIST=1500 GOSUB FORWARD goto scan
MOVERGT: SEROUT DISPLAY,396+$4000,[DI,CLR,DI,"L=",Dec LLEV," TURN RGHT"] SERVOL=SRIGHT GOSUB TURN DIST=1500 GOSUB FORWARD GOTO SCAN
MOVELFT: SEROUT DISPLAY,396+$4000,[DI,CLR,DI,"L=",Dec LLEV," TURN LEFT"] SERVOL=SLEFT GOSUB TURN DIST=1500 GOSUB FORWARD goto SCAN
TURN: debug "MOVE SERVO TO ",dec Servol,cr for I=1 to 20 pulsout SERVO1,SERVOL pause 20 next return
FORWARD: HIGH MOTOR1 for I=1 to DIST TRAVELED=TRAVELED+1 if hit1 then crash next LOW MOTOR1 return
Crash: LOW MOTOR1 SEROUT DISPLAY,396+$4000,[DI,CLR,DI,"CRASH! ",DEC TRAVELED] end
Information on The Basic Stamp II From Parallax INC
Scott Edwards Electronics, Inc. produces BASIC Stamp compatible LCD displays, servo controllers (That I used to construct my robot) and other peripherals.
Solutions Cubed produces add-on products for use with BASIC Stamps.
Lynxmotion has large selection of PBASIC programmable mobile robots, manipulators and accessories.
Mondo-tronics' Robot Store features over 100 actual robot kits, books, and software, as well as Muscle Wires® shape memory alloys, and lots of other great robot related hardware, electronics, video tapes and more.
|COVER||INFO||DESCRIPTION / MY NOTES / CLICK TO ORDER|
Paperback - 300 pages Bk&Cd Rom edition (November 15, 1999)
|Dave Baum's Definitive Guide to LEGO Mindstorms (Technology In Action); Dave Baum, Rodd Zurcher (Illustrator)|
Paperback - 247 pages 1 Ed edition (November 1999)
|The Unofficial Guide to LEGO MINDSTORMS Robots; Jonathan B. Knudsen|
Paperback - 416 pages (March 1997)
|Basic Stamp; Claus Kuhnel, Klaus Zahnert (Contributor)|
Paperback - 300 pages Bk&Cd Rom edition (October 1999)
|Microcontroller Projects With Basic Stamps; Al Williams|
Sorry No Picture of the Cover
Spiral-bound - 170 pages 1 edition (February 1998)
|The Basic Stamp 2 - Tutorial and Applications; Peter H. Anderson|
Paperback - 350 pages Bk&Cd-Rom edition (March 1998)
|Programming and Customizing the Basic Stamp Computer; Scott Edwards|
Paperback - 248 pages (October 9, 2000)
The Microcontroller Application Cookbook; Matt Gilliland, Ken Gracey
Paperback - 336 pages 2 edition (January 2000)
|Basic Stamp: An Introduction to Microcontrollers; Claus Kuhnel, Klaus Zahnert|
E-Mail: Andrew: firstname.lastname@example.org
By Mail: The Software Artist Limited, 195 Ellis Street, Chatham, Ontario, Canada, N7L 2L9