Whiskers

 

The Artificial Intelligence Robot

Technical Manual

 

Version 1.42

August 6,1997

 

 

Copyright 1991-2000

All Rights Reserved

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 Copyright Angelus Research Corp. 1992-2000

 

This software and manual cannot be sold or incorporated 

into another product without express written permission of    

 

Angelus Research Corp,

11801 Cardinal Circle #J              

Garden Grove, California  (714) 590-7877               

Last Revision: August 6, 1999                                             

 

All rights reserved

Table of Contents

 

 

 

Preface                                                                                                             4

 

Whiskers the Robot                                                                                          5

 

Overview                                                                                                         6

 

Chapter I - Technical Insights                                                                       7

 

Motor Drive                                                                                         7

 

Pulse Width Modulation                                                                        7

 

Sensors                                                                                                7

 

Optical Sensors(Light)                                                                          8

 

Optical sensor Pairs(Collision)                                                              8

 

Whiskers Detectors                                                                              9

 

The Battery                                                                                          9

 

Microphone                                                                                          9

 

Speaker Output                                                                                    10

 

Chapter II - Software Architecture                                                               11

 

Flow chart                                                                                            12

           

Instinct Level Modification                                                                    13

 

Instinct Response Mailboxes and Light Detector Values                        14

 

Collision Flags and Flag Mailboxes                                                       15

 

Miscellaneous Flags and Registers                                                         16

 

Task and Behavior Level Modification                                                  17

 

Sample Task Code                                                                               19

 

Sample Behavior Code                                                                         21

 

Chapter III - WCL Whiskers Control Language                                         26

 

System Level                                                                                        26

 

Useful Words                                                                                       27

 

Motor Control                                                                                      28

 

Analog to Digital Converter                                                                   32

 

Light Sensors                                                                                        33

 

Microphone                                                                                          33

 

Instinct Level                                                                                        34

 

Mail Boxes                                                                                           35

 

Obstacle Control                                                                                  35

 

Delaying Words                                                                                    35

 

Speaker Control                                                                                   35

 

Sound Effects                                                                                       36

 

Music                                                                                                   36

 

Sample Songs                                                                                       37

 

Chapter III - Experiments                                                                             39

 

Chapter IV - The Forth Language                                                                46

 

Chapter V - Hardware and Software Details                                               63

 

            Forth Memory Map                                                                           63

 

            System Memory Map                                                                       64

 

            Connector Pin Designations                                                              66

 

Chapter VI - High Level Source Code                                                         70

 

Chapter VII - History of Robots excerpts                                                    96

 

Appendix-A After the crash                                                                          100

 

Appendix-B Assembler for Whiskers (optional)                                          103

Preface

 

I must say, I had a lot of fun designing Whiskers.  I started this project in the fall of 1991.  As the Technical Vice President of the Robotics Society of California, I saw a need for an intelligent sophisticated robot that anyone could use.  From the Techie type (like myself) to persons with very little technical knowledge, Whiskers scratches the itch of those who love robots.  If you have no programming skills, or hardware experience; don't worry, Whiskers is designed to teach.  Use his interactive control to learn his High Level Language first.  You can do amazing things with it and also get an introduction to programming techniques.  On this level you can easily teach him new songs to sing, wander around the room avoiding things, search for sounds, and perform neat tricks to amuse yourself and your friends.  Kids really go crazy with him.  Pull his whiskers, and see how he reacts.  My two daughters, Amy and Sarah, have a ball chasing him around the house.

 

I would like to thank first my family for putting up with the long hours and endless ramblings on designing intelligence into a robot.  I also would like to thank my friends George Ronnquist and Bill Chessell for being sounding boards for my ideas.  Finally, this project would have remained a dream if Dr. Kenneth Butterfield, who bought one of my first robots, hadn’t caught the Whisker’s bug.  He was crucial in implementing the many ideas that I had as well as contributing ones of his own. 

 

For the more technically inclined, Whiskers is a very advanced robot.  You can use any combination of: the high level language, Forth, or even assembler to program him.  His software architecture is very state-of-the-art.  He simulates living creatures by having an instinct level process that runs in the background.  Just set up the instinctive responses to sensor hits, and control his behavior in a very biological way.  Using the behavior level, add your own rules (behaviors) to add to his intelligence.  Experiment with sound recognition, speech recognition, navigation, and in the future even neural networks.  His capabilities are almost endless.  Use your imagination to explore new ideas and share with other Whisker Owners what your have discovered.

 

 

 

 

                                                                                                                                                Don Golding

                                                                                                                                                Whisker's Creator

Whiskers the Robot

 

Angelus Research has developed a new and innovative tool for educators to use...Whiskers the Robot.  With educational funds being scarce in this current economy, he is very affordable as well.  With the current emphasis on giving students marketable job skills, Whiskers is an important tool to have.

 

Robotics will be the most important emerging technology of the nineteen nineties and beyond.  Industry has been rushing to install automation at a feverish pace.  While employment has been stagnant, capital expenditures by companies worldwide has been brisk.  Graduates who understand robotics and automation are in great demand.

 

Whiskers the robot was designed to introduce and teach students about this exciting technology.  Much like a personal computer, Whiskers is being used by middle schools through advanced mobile robotics research at Universities.  If you can speak English, you can program Whiskers.  English commands can be typed in interactively to control the robot or new commands can be created easily using a standard word processor and sent to Whiskers over his serial cable.  Whiskers is completely self contained.  No additional software is required on the personal computer (IBM or Macintosh) other than a terminal program.

 

Whiskers is very easy to program, anyone can add new commands in minutes.  Even people who never have programmed before, can program this personable robot.  Collision avoidance is handled automatically by his animal emulation software.  Just like a real animal, Whiskers has instincts, behaviors, and goals.  Instincts and behaviors are handled automatically in the background.  Users can very easily add their own behaviors using just the English like High level language.  More advanced users can also use a combination of the High Level Language, Forth, or even assembler.  Using other languages like C, Pascal, ands Basic are also possible using a wireless modem and any type of computer.


Overview

 

 

WHISKER'S is easy to use and fun to program.  You can learn a great deal about important issues in robotics.  WHISKERS is a three-wheeled, battery-powered, free roaming, obstacle-avoiding robot.  WHISKERS intelligence is derived from a single 68HC11micro controller.  His propulsion is provided by two 12 volt geared DC motors both driven by dual H Bridge integrated circuit driver chip.

 

Whiskers has a computer onboard which allows you to control and program him.  Using simple commands like FORWARD, STOP, FIND-SOUND, and many others, you can control him interactively (just typing them at the terminal) or program him by extending his language.  Add your own words to perform tasks that interest you.  He can avoid obstacles using his four light sensors, two on the side and two on the front, two whiskers; left and right, and the drag on each motor.  The motor drag allows you to detect when Whiskers has run into something that his other sensors don't detect.  It is a sensor of last resort.  If he runs into a table leg between his forward sensors, the motor stall will detect and avoid it. 

 

To program WHISKERS, you will need a personal computer running a terminal emulation program.  An IBM compatible, Apple, or any other computer that has a serial port and can run a terminal program.  Using the supplied serial cable connected to a serial port and communication software such as: Procomm, Crosstalk, Qmodem, etc. your can communicate with Whiskers.  Many of these programs are free ( shareware) and easy to get.  Set your parameters to 9600 baud, no parity, 1 stop bit and you are ready to go.  After connecting the cable supplied to whiskers and your serial port, turn Whiskers on and press any key.  This will put you into the interactive mode to give him commands.  If you don't hit a key, he will run the auto-start task.  When you first get him, this task is a word called WANDER.  It will demonstrate many of his features. 

 

WHISKERS, in its basic configuration, can be controlled simply by typing the commands at the keyboard that Whiskers understands.  Add to his capabilities by creating new words interactively or by editing a text file on your computer and downloading it to the robot.  You have enough on board memory to add thousands of new commands.

 

An onboard battery backup circuit insures your code will not be lost when turned off.  The battery circuit will keep your words safe for about ten days with a full charge.  A partial charge would be proportionally less.

 

Note: the battery charger should be plugged in when Whiskers is not in use. 
Chapter I

Technical Insights

 

Motor Drive

 

The drive motors used in "WHISKERS" are of a 12 volt DC gear motor design.  The wheels are directly mounted on the motor shafts through an adapter.  The robot is steered by either reversing the direction of one motor in regards to the other, or setting the motor speeds so they are different from one another.  This is called a differential direct drive system. 

 

Pulse Width Modulation

 

DC motors are the mainstay of robotics design.  Controlling the speed of a robot must be done in the most efficient design possible.  This is because of the finite amount of power stored in the battery.  Saving energy means our robots can run for longer periods of time.  

 

The most intelligent way to control a robots speed is called Pulse Width Modulation(PWM).  This technique operates the drive integrated circuit in a full on or a full off mode.  Semiconductor devices usually dissipate very minimal power when operated in this mode.

 

To begin to understand PWM, lets imagine a pulse train from the CPU that consists of on and off periods of equal time interval (50% duty cycle).  This pulse train from the computer is then used to drive the motor.  The pulses are applied to the motor so rapidly, that the mechanical inertia of the robot completely smoothes out these pulses to give an average speed proportionally to the duty cycle of the pulses.  i.e.; on time verses off time.  If the computer program wants additional speed, it increases the duty cycle by increasing the on period and reducing the off portion accordingly.  This raises the average electrical power applied to the motor.

 

In WHISKERS the PWM pulse trains are generated by the instinct level through output lines: (PA3, PA4, PA5, and PA6) and fed to X17(UDH2993B chip) to interface the motors to the CPU.  The WHISKERS design has implemented a simple feed back loop to the CPU.  A motor current circuit is incorporated to monitor each motor.  A series resistor (2 ohm) has been placed in each motor lead.   R41monitors motor #1and R40 monitors current of motor #2.  The circuit then filters or averages the voltage which represents current flow, before passing it to input ports PE5 and PE6.  The A/D function allows the program to read a representation of the motor current.  The current can then be used as an approximate motor load.  A very high current will represent a motor stall condition.

 

Sensors

 

WHISKERS can not know where it is in space with out some type of sensors.  Think about the problem that this little machine faces as it strolls about the premises.  Try blindfolding yourself, stuffing cotton in your ears, and putting boxing gloves on your hands then try walking around the room.  This is the task that WHISKERS tries every time the switch is turned on and he is allowed to roam.

 

Currently, we have provided WHISKERS with four fixed LED light transmitters and four optical sensors and one semi-directional (its located on the front) acoustical sensor and two discretely switched mechanical whisker detectors.  It is the intention of this section to discuss a different type of sensor and the pro's and con's of each.