Meet Alphabot Robot
AlphaBot was one of my weekend robotic projects. This robot was created with the purpose of exploring:Three Laws of Robotics:
- A robot may not injure a human being or, through inaction, allow a human being to come to harm.
- A robot must obey orders given to it by human beings, except where such orders would conflict with the First Law.
- A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.
- Robotic hardware technologies and mechanical components
- Schematics and circuit solutions
- Microcontrollers, sensors and other electronic components
- Embedded software programming
- Real-time intelligent processing algorithms
- Simplicity of mechanical hardware components - easy to find parts and build
- Simplicity of schematic solution - minimize number of electronic circuit components
- Place most of the complexity in the robot software - it is easier to enhance and expand then hardware and circuitry.
- Low cost of parts
Robot Functional Diagram
Robot Design Highlights
Under The Hood: Main Board View |
Main Processor:Philips P89C51RD2 Microcontroller
|
Robot Sensory System
- Proximity sensors
- Passive - front left and right, rear contact bumpers
- Active - Infra-Red (IR) emitter/receiver sensors,
use modulated triangulation algorithm: - Sharp GP2D15 short range sensor (front, at the base)
- Sharp GP2Y0A0YK long range IR sensor - detects obstacles up to 10 feet. Mounted on rotating head and positioned by the bi-polar Clifton Precision Stepper motor, allowing 360 degree sweep
- Locomotion speed sensors - wheel independent, reflective optical encoding
- Head home sensor
- Light sensor
- Tilt sensor
- Low supply voltage sensor
Robot Propulsion:
- Independent control of the left and right gearboxes and drive wheels
- Toshiba TA7267BP Full-Bridge (H-Switch) motor driver
- Precise power load control using Pulse Width Modulation (PWM)
- Continuous adjustment of the robot speed using IR sensor feedback with optical encoders, automatically compensating for surface characteristics, angle/slope, battery charge level, etc.
Communication with Robot
- Heartbeat LED indicator
- LED Signal Tower (3 LEDs/7 colors)
- Sound effects using audio beeper
- Audible Morse code system to communicate error codes and status messages
- Robot Mode switches
- Modified RS232 UART interface for robot firmware upload and maintenance
- 27MHz 4-channel radio control/command input interface
Robot Schematics
Main Board | Chassis Board |
Motor Driver Board | Head Board |
Robot Software Architecture
Concept Overview:- The first step after robot powering up is a thorough system self-diagnostic, including testing hardware and electronic circuitry.
- The Robot's main routine consists of an infinite loop, within which various logic sub-routines are called in sequence.
Routines examples include:- Processing sensory interrupts (bumber activation, object detection within IR proximity, unexpected change in speed...)
- behavior decisions (deciding on driving directions, setting goals, etc.)
- processing communication commands
- minor self-diagnostic
- etc.
- The routines are designed not to take much time and exit almost immediately: They do not actually wait to complete their task (f.e. turning robot 180 degrees) - instead they set required entries in the Robot's task message queue and exit.
- The robot task queue is constantly monitored and its tasks are processed by the separate timer and sensory interrupt driven routines. Tasks in the message queue have various types and priority levels.
- C programming language
- Message Task Queue
- Real-time pre-emptive multitasking algorithm
- Stalled wheel detection routines and PWM load balancing
Robot Firmware Source Code
- AlphaBot.h - Include file containing definitions
- AlphaBot.c - Robot initialization, self-diagnostic and main loop
- Drive.c - Robot driveing routines, including processing speed sensors and calculating appropriate PWM loads
- Behavior.c - Robot behavior routines.
- Diagnostic.c - Robot self-test and diagnostic routines
- Scan.c - 360 degrees surroundings scan using long range IR sensor on rotating head
- Task.c - Implementation of the Robot's tasks queue management
- Utils.c - Auxiliary Robot functions - beep frequencies, LED signalling sequences, etc.
- Artistic.c - Robot dance routine
Robot Self-Diagnostic Routines:
- Periodic sensory, motors and battery charge level checks
Robot Behavior and Artificial Intelligence:
- Obstacle detection and avoidance
- Nocturnalism, and photo-tropism (light seeking).
- Rule-based self-learning patterns
- Elements of Fuzzy Logic
- Robot activities when active:
- Wall following (left or right) using dual IR proximity circuits,
- light seeking (happy) and light avoidance (sad) using photo sensor,
- Play with LEDs
- Play sounds
- Dance/spin
- Observe its surroundings and respond to sudden changes
- Wander around
- Do nothing/rest/battery charge (at night)
Future Robot Building Plans
- Location awareness (scanning and mapping of the surrounding environment)
- IR heat sensors, sense and react to human motion
- Ability "outsource" the Artificial Intelligence / AI logic and heavy computation to a networked PC via radio link.
- Enhance behavior by implementing various AI algorithms, access to the knowledge base on PC and network, etc.