The Original Handy Board

Download Report

Transcript The Original Handy Board

The World Leader in High Performance Signal Processing Solutions
Robotics on the Blackfin Processor
Dr. Fred Martin
Assistant Professor, Computer Science
University of Massachusetts Lowell
Presentation Overview
•
•
•
•
•
History/Motivations for Educational Robot Controllers
The Blackfin Handy Board: Hardware Design
The Blackfin Handy Board: Software Environments
Classroom Support Materials
Demonstration
The Original Handy Board
• Developed for MIT LEGO Robot
Competition, starting in 1991
• Goal: Give students everything they
need to start building robots
•
•
•
•
•
•
Uses 2 MHz Motorola HC11
32K bytes of RAM
4 motor outputs
7 analog, 9 digital sensor inputs
Built-in battery pack & LCD screen
“Interactive C” language
• Open-source design
• Over 10,000 in use
Helped shape a new product category:
Educational/classroom mobile robot controllers
Degree of Robotics Support -->
• Many options, with
various levels of
integration
• Original Handy
Board, LEGO RCX,
and XBC/Gameboy
provide sensor/motor
I/O
• Blackfin HB has
powerful processor
and significant
robotics support
integrated into one
design
Degree of Robotics Support -->
Design Category: Robot Controllers & CPUs
Blackfin HB
8-bit MCU
Original HB
LEGO RCX
XBC/Gameboy
Pentium 4
PC/104
Blackfin HB
CPU Power -->
Design Goals for Blackfin Handy Board
• Highlight power and capabilities of the Blackfin DSP
• Vision
• Advanced software development
• Keep integrated, hand-held design of original HB
• Support wide range of sensor/motor I/O
The Blackfin Handy Board
Blackfin Handy Board: CPU and Memory
• 600 MHz ADI BF ’537
• 64 MB SDRAM
• 256 MB NAND flash
• 1 MB boot flash
Blackfin Handy Board: Robot Sub-System FPGA
• Xilinx Spartan 3E
series FPGA
• “Board Support
Package” includes
• motor PWM,
sensor sampling
• CMOS camera PPI
pass-thru
• LCD driver
• end-user
programmable
Blackfin Handy Board: Motor Output
DC motor output
• 4 channels bi-directional control
• 1A, 12v per motor
• locked antiphase & sign-magnitude PWM
• back-EMF velocity sensing
• motor status LEDs
Servo motor control
• 8 outputs
• 5A, +5v motor power supply
Blackfin Handy Board: Sensor Input
• three ADI 12-bit A/Ds with 8-1 mux,
continuously sampling at 48 kHz
• 12 external analog inputs
• 10 digital inputs
• 8 digital outputs
• two i2c connectors
• integral 2-axis accelerometer
Blackfin Handy Board: PPI Camera Port
• Blackfin PPI port for CMOS
cameras (e.g. Omnivision)
• FPGA pass-thru (or image
processing)
Blackfin Handy Board: Integrated Power Sub-System
Battery/Charge
• Built-in 12v (10 AA cell) 2000 mAh
battery pack
• Smart-charge circuit (rapid, trickle,
thermal cut-off)
• Charge and run simultaneously
• Battery level sensor to Blackfin
Power Regulation
• 5A, +5v supply for servo motors &
external devices
• 3.3v, 1.8v supplies for Blackfin & FPGA
• high-efficient switching regulators
Blackfin Handy Board: Communications
Debug Agent
• Built-in USB 1.1 emulator
• JTAG connector for
external emulator
RS232 Serial
10/100 BT Ethernet
Blackfin Handy Board: Human I/O
16x4 LCD screen
DAC w/amp &
speaker
User knob
2 buttons & 4 LEDs
Blackfin Handy Board: Software Environments
• ADI Visual DSP++
• C/C++ IDDE
• High-performance C compiler
• VDK Kernel for threads
• LWIP TCP/IP stack
• gcc & uClinux
• Compile standalone apps with gcc
• Run uClinux kernel and compile apps that use kernel services
• uBoot monitor
• LabVIEW Embedded for ADI Blackfin
Academic Support Materials
• Freely available courseware
based on use of LabVIEW
Embedded being developed;
expected January 2007
• Robotic Explorations text (2001)
will be updated based on new
Blackfin Handy Board design
Recap: Stuff You Can Plug Directly into the Blackfin HB
• Sensors:
• Resistive devices (photocell, switch, thermistor)
• Voltage sources (IR transistors, IR distance sensors, any 0-5v source)
• Ultrasonic ranging sensors
• Modulated sensors (e.g., 40 kHz IR)
• i2c devices
• Audio sources
• Motors
• 4 smallish DC motors (12v, 1A)
• 8 servo motors
• Big DC motors using ESCs in servo outputs (Electronic Speed
Controllers)
• Vision
• Omnivision camera modules
Demonstration
• Wall-following using
infrared distance
sensors
• Multithreaded control
program with
separate priorities for
side-mounted and
front-mounted
sensors
• Using VDSP++ and
the VDK kernel
Wall-Following Robot VDK Code
void
sideSensorThread_RunFunction(void **inPtr)
{
int side_et = 0;
priority = 2;
Void frontSensorThread_RunFunction(void **inPtr) {
int FL_et = 0; // Front Left ET
int FR_et = 0; // Front Right ET
unsigned int loopCount = 0;
priority = 3;
while (1)
{
side_et = analog(ETSIDE); // Get distance on LEFT
while (1) {
FL_et = analog(ETFL); FR_et = analog(ETFR);
// Detect Front Obstacle
while ( (FL_et > 350) || (FR_et > 350) )
{
set_led(4);
if (side_et > 400) // Too Close to wall
{
clear_led(1); clear_led(2); clear_led(3); set_led(1);
// Turn Away
pivot_right(75, priority);
}
// Left Obstacle
if ( FL_et > FR_et + 50 ) {pivot_right(75, priority);}
else if (side_et < 350)
{
clear_led(1); clear_led(2); clear_led(3); set_led(3);
// Turn Toward
pivot_left(75, priority);
}
// Right Obstacle
else if ( FR_et > FL_et + 50 ) { pivot_left(75, priority); }
// Forward Obstacle
else {
motor(1, 0, priority);
motor(2, 0, priority);
}
else // On Line
{
clear_led(1); clear_led(2); clear_led(3); set_led(2);
// Go Straight
motor(2, 100, priority);
motor(1, 100, priority);
FL_et = analog(ETFL);
FR_et = analog(ETFR);
}
clear_led(4);
}
}
}
}
}
More Information
• Schematic design, PCB art, FPGA code, and Blackfin software libraries to
be distributed with open-source license
• Blackfin Handy Boards publicly available Q4 2006
• See http://www.cs.uml.edu/blackfin/ for latest and to sign up for mailing list
• See LabVIEW Embedded Vision Tracking demo here in the booth