Servo Magazine 05 2005

  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Servo Magazine 05 2005 as PDF for free.

More details

  • Words: 42,032
  • Pages: 84
Cover.qxd

4/7/2005

2:24 PM

Page 84

Vol. 3 No. 5 SERVO MAGAZINE ROBOTS TO THE RESCUE MAY 2005

Circle #40 on the Reader Service Card.

U.S.

CoverInside.qxd

4/5/2005

7:55 PM

Page 2

Remember when... ...electronics stores were stocked to the rafters with every component imaginable and there was

ALWAYS

a knowledgeable person there to help you?

Think those days are gone? Well they’re not! You just need Jameco!

Great Products. Awesome Prices.

1.800.831.4242

Call for a FREE 256-page catalog today. We have the electronic components and knowledgeable Technical Support people who can help bring back the fun in your electronics hobbies, inventions, and DIY projects. Circle #36 on the Reader Service Card.

Be sure to visit our new website at

www.Jameco.com/nvd

Jameco Electronics —where electronics is still fun! Circle #37 on the Reader Service Card.

Full Page.qxd

4/7/2005

Circle #35 on the Reader Service Card.

9:53 AM

Page 3

TOCMay05.qxd

4/7/2005

2:33 PM

Page 4

SERVO Features & Projects 28 Trust in Their ... Programming Five Robots That Can Save Your Life

36

Error-Proof Your Workbench

42

Reusable Software Components

48

Real Combat Robotics

51

A Hobby CNC Machine

56

Visions of Boe-Bots

Part 2: Common Errors in Building Robots Part 4: Behavior Control The SWORD Robot Part 2: Electronics, Interfacing, and Cutting Add an LCD to Your Boe-Bot

On The Cover

48

22

ROBONAUT — One of the five robots covered in this issue that is helping to keep humans out of harm’s way.

SERVO Magazine (ISSN 1546-0592/CDN Pub Agree#40702530) is published monthly for $24.95 per year by T & L Publications, Inc., 430 Princeland Court, Corona, CA 92879. APPLICATION TO MAIL AT PERIODICALS POSTAGE RATE IS PENDING AT CORONA, CA AND AT ADDITIONAL ENTRY MAILING OFFICES. POSTMASTER: Send address changes to SERVO Magazine, P.O. Box 16826, North Hollywood, CA 91615-9213 or Station A, P.O. Box 54,Windsor ON N9A 6J5; [email protected]

TOCMay05.qxd

4/7/2005

2:34 PM

Page 5

5.2005 VOL. 3 NO. 5

Departments 6

Mind/Iron

7

Bio-Feedback

8

New Products

Columns

The Philosophy behind Tetsujin 2005 Where You Have a Voice The Latest Development Software

55

Robotics Showcase

62

SERVO Bookstore

72

Brain Matrix

78

Events Calendar

80

Robo-Links

81

Advertiser’s Index

Get What You Need Quick Feed Your Brain Reversible Electronic Speed Controllers Find a Show Near You Your Link to Parts and Services

12

Robytes

14

GeerHead

18

Rubberbands

22

Twin Tweaks

64

Robotics Resources

74

Ask Mr. Roboto

79

Appetizer

82

Then and Now

News from the Robotics World The RoboX Tour Guide Charging Ni-Cd and NIMH Batteries Prepare For the (Robosapien) Swarm All About Gears Your Problems Solved Here It All Starts With a Bright Idea A Look Back at the Tomy Omnibot

A List of Supporting Advertisers

Coming 6.2005 Tune in next month for coverage of Japan’s new Palette mannequin robot. Beautiful and deceptive, Palette moves in response to consumers as it displays its fashionable adornments while collecting marketing data on you!

Mind-FeedbMay05.qxd

4/7/2005

3:28 PM

Page 6

Published Monthly By The TechTrax Group — A Division Of T & L Publications, Inc. 430 Princeland Court Corona, CA 92879-1300 (951) 371-8497 FAX (951) 371-3052 Product Order Line 1-800-783-4624 www.servomagazine.com

Mind / Iron by Dan Danknick Œ Engineers love a challenge. Whether it is calculating the best way to transmit motor torque in a machine, determine the response frequency of a control system, or effectively order drinks for a dinner party, each of these tasks ultimately become an exercise in optimization. Once a person leaves school to work in the “real world,” it doesn’t take long to discover there is never enough time, money, or manpower for most projects. For most of my colleagues, solving a particular problem isn’t as much fun as solving it well. In last month’s issue, the framework of SERVO Magazine’s second exoskeletal competition — Tetsujin 2005 — was announced on Page 76. Steve Judd and I worked quite a while on adding some new twists to this year’s event, with a couple of goals in mind. First, we wanted to offer some new and interesting challenges — namely, the Walking Race and Cylinder Stacking. And secondly, we wanted to craft new challenges that could embody existing exosuit work already underway in the world — augmented walking and augmented dexterity. Greek philosophers were fond to point out that amongst the gods, strength without control was useless. Thus, both of the new challenges focus more on controlling the enhanced strength framework than on the raw amount of strength. And for many engineers, this is a more approachable problem — software and electronics are easier than welding and machining. They

6

SERVO 05.2005

also lend themselves easily to 3D simulation. The reaction to last year’s Tetsujin event was incredible. It received great coverage in magazines, websites, and blogs around the world. If there is one overriding theme I sensed throughout, it was the excitement that people had for the competitors. How often do you get to witness the beginning of a technology leap from the pages of science fiction and into reality? (Not to mention, walk up and enjoy a technical discussion with the people causing the leap!) Are you looking for a fun project to turn your mind loose on this summer? If so, Tetsujin 2005 is where you want to be. Start getting your team together and put those “blue sky” ideas down on paper. If you’re a student, talk to an instructor in your engineering department to get some resources — both technical and monetary. Just like the DARPA Grand Challenge, Tetsujin is the kind of event you will only emerge from with a greater understanding of how to build things that work. As well, you’ll get the chance to demonstrate that you are a doer and not just an observer. This worked well for 2004 competitor Bryan Hood, a high school junior from Florida, that built his chromoly exosuit in his garage. After his first lift, he was met back in his pit area by iRobot cofounder Helen Greiner, who offered him a summer internship! So download and study those rules – and we’ll see you in October!

Subscriptions Toll-Free 1-877-525-2539 Local 1-818-487-4545 P.O. Box 16826 North Hollywood, CA 91615-9213 PUBLISHER Larry Lemieux [email protected] ASSOCIATE PUBLISHER/ VP OF SALES/MARKETING Robin Lemieux [email protected] CIRCULATION DIRECTOR Mary Descaro [email protected] WEB CONTENT/STORE Michael Kaudze [email protected] PRODUCTION/GRAPHICS Shannon Lemieux STAFF Dawn Saladino OUR PET ROBOTS Guido Mifune Copyright 2005 by T & L Publications, Inc. All Rights Reserved All advertising is subject to publisher's approval. We are not responsible for mistakes, misprints, or typographical errors. SERVO Magazine assumes no responsibility for the availability or condition of advertised items or for the honesty of the advertiser.The publisher makes no claims for the legality of any item advertised in SERVO. This is the sole responsibility of the advertiser. Advertisers and their agencies agree to indemnify and protect the publisher from any and all claims, action, or expense arising from advertising placed in SERVO. Please send all editorial correspondence, UPS, overnight mail, and artwork to: 430 Princeland Court, Corona, CA 92879.

Mind-FeedbMay05.qxd

4/7/2005

3:29 PM

Dear SERVO: I randomly came across your magazine at a surplus electronics store last summer and have looked forward to and enjoyed every issue since. It is great to see our field growing. Great article in your April 2005 issue, “Neural Networks 101.” Finally, I have read a reasonable description of how ANNs work. I admit that it lost me on the Sigmoid equations. However, it has compelled me to ask: Is it possible that some derivative of an MLP ANN be written in Basic and wedged into a Stamp or Atom? If so, could there be some sample code out there? If so, could you publish it? If not, then perhaps an article on a self- teaching program. Thanks for your good work! Norm — Satisfied Subscriber via Internet We now have updated URLs for the RoboCoaster G2 that was covered in the GeerHead column in the April 05 issue. Check out the ride at: www.kuka.com/en/products/systems /robocoaster/start.htm www.robocoaster.com/english /index2.html

Page 7

Dear SERVO: I love the magazine and would like to see articles on the First Lego League (FLL). I am actively involved with it and use the Robolab programming language. I would hope to see some articles on it. Kevin Wenger via Internet Dear SERVO: I would like to see less of commercial robotics and more of hobby robotics. If I want info on current commercial robotics, I can get it from other places. I prefer to see hobby robotics in this magazine. I like the variety of articles, although I feel more variety could be incorporated by not doing long string articles — better to have a greater variety than concentrating on one thing for multiple magazines. I enjoyed very much the general article on starting robotics written in the April 2005 magazine, but since it was not written on my level, I feel it wasn't much use to me. Such articles on higher levels I feel would be great. Nathaniel Barshay via Internet

Circle #71 on the Reader Service Card.

When he’s not helping out with crime prevention programs in Arizona, Ron Palmer’s creative creation keeps up-to-date with his SERVO magazines.

SERVO 05.2005

7

NewProductsMay05.qxd

4/6/2005

3:09 PM

Page 8

New Products

New Products DEVELOPMENT SOFTWARE Robot Control Software

E

nergid Technologies now has available version 1.0 of its Actin toolkit, C++ software for controlling and simulating complex robotic mechanisms. Based on software developed for NASA, Actin provides coordinated control for fixed or mobile robots with up to 100 independent moving parts. The Actin toolkit provides libraries for the Windows platform that robotics developers can use to quickly create complex, intelligent control systems. The developer specifies the robot kinematics and desired behavior, and Actin produces algorithms for setting joint positions and rates to achieve specified hand motion. Without Actin, a roboticist would need to first solve complex nonlinear differential equations and implement the solution for real-time operation. In the past, this has prevented the application of many valuable mechanical designs. For mechanisms with many moving parts, tasks can be accomplished in an unlimited number of ways. The human arm, for example, can position and orient the hand while retaining freedom of motion in the elbow. Actin takes advantage of this kinematic redundancy to produce intelligent robotic motion, including collision avoidance, joint limit avoidance, minimum motion, and strength optimization. Through a configurable object-oriented design, Actin applies to many robot types. It works with fixed-base manipulators, as would be typical for factory automation, and with mobile manipulators, as would be appropriate for home entertainment. Actin works with almost any joint type or hand type, with a virtually unlimited number of degrees of freedom and branching connections. Actin can also be used to control mechanisms with self-connecting loops. In addition, Actin includes the ability to dynamically simulate robots, visually render the robots, express control systems using the Extensible Markup Language (XML), create XML schemas describing the control-system language, communicate control systems over a network, incorporate machine vision, and implement force control. For further information, please contact:

Energid Technologies

124 Mount Auburn St. Suite 200 N. Cambridge, MA 02138 Tel: 888•547•4100 Website: www.energid.com

Circle #83 on the Reader Service Card.

8

SERVO 05.2005

PIC Programming Made Easy

R

4 Systems is now an authorized reseller of PICBASIC Proton Development Suite. The Development Suite represents a quantum leap forward in the development of Crownhill’s PICBASIC product. This Development Suite — incorporating not only a brand new IDE (Integrated Development Environment), but also a Virtual Simulation Environment — has been described as “the very best of breed” solution for working with the Microchip Technology PICmicro® microcontrollers. The Development Suite is suitable for all levels of users, from outright beginner to seasoned professionals, writing commercial applications. The IDE/Compiler will allow you to develop your code in a state-of-the-art development environment, compile your program code and view the resulting assembly language commented with your own program code. The output of the compiler is 100% Microchip MPASM compatible and the resulting Hex file, COD, ERR, and LST files can be used with Microchip™ compatible programming tools. Included with the Development Suite is a fully working, highly acclaimed, Proteus Virtual Simulation Environment. The Proteus Simulator provides near real time simulation of your code on Virtual Proton Development Boards. Proteus Virtual System Modeling (VSM) combines mixed mode SPICE circuit simulation, animated components, and microprocessor models to facilitate co-simulation of complete microcontroller based designs, with step-by-step code execution for source level debugging. This makes it possible to develop and test designs before a physical prototype is constructed. The Proton IDE is a professional and powerful visual IDE which has been designed specifically for the Proton Plus compiler. Proton IDE accelerates product development in a comfortable user environment without compromising performance, flexibility, or control. The compiler has enhanced support for I2C, SPI, Dallas 1-wire bus, RS232, X10, Compact Flash cards, Alphanumeric and Graphics LCDs, and USB interface. The Proton Development Suite is available at an introductory price of $255.00 (US). For further information, please contact:

R4 Systems Incorporated

1100 Gorham St. Suite 11B-332 Newmarket, Ont. Canada L3Y 8Y8 Tel: 905•898•0665 Fax: 905•898•0683 Email: [email protected] Website: www.r4systems.com

Circle #99 on the Reader Service Card.

Full Page.qxd

4/5/2005

3:09 PM

Page 9

Get a hot deal on ColdHeat

FREE ColdHeat™ Soldering Tool (a $19.99 value) With purchase of $20 or more of component parts, soldering equipment, test equipment or Kronus™ Tools.

Soldering Equipment

Kronus Tools

11-Piece Soldering Tool Set 64-2803

55-Piece Home Repair Tool Set 64-2910

Component Parts

Test Equipment 22-Range Fold-Up Pocket Multimeter 22-820

Must present coupon at time of purchase.

FREE ColdHeat™ Soldering Tool With purchase of $20 or more of component parts, soldering equipment, test equipment or Kronus™ Tools.

A $19.99 Value One coupon per customer. RSS Instructions: If the customer purchases $20 or more in Component Parts, Test Equipment, Soldering Equipment or Kronus Tools, use the Price Change key to reduce the price of the ColdHeat (640-2102) to free. Select Reason Code “7. Promo/Coupon” and scan the barcode on the coupon.

Valid at participating stores only. May not be used online or by phone. Excludes services and special orders. May not be combined with certain other discounts. No cash value. No photocopies. Void where prohibited. Offer expires May 31, 2005.

VISIT

RADIOSHACK.COM

OR

CALL

1-800-THE-SHACK

®

California residents: WARNING: These products contain, or when used for soldering and similar applications produce, chemicals known to the State of California to cause cancer and birth defects (or other reproductive harm).

A_05_00101_r2 1

4/4/05 3:02:49 PM

MenagerieMay05.qxd

4/6/2005

1:42 PM

Page 10

Send us a high-res picture of your robot with a few descriptive sentences and we'll make you famous. Well, mostly. [email protected]

ETIS Wins First in Robotics by Randy Weiler

Photo by J. Intintoli CHAMPS — From left, Aaron Dudley, senior and team captain; James Barker, senior; alumnus Travis Martin; and Amy Black, senior, from ETIS work with their remote-operated vehicle, the “Moon Raider” robot, outside the VIS building.

MTSU’s Department of Engineering Technology and Industrial Studies recently added a national championship in robotics to its mantle of achievements. Known for its Moonbuggies, concrete industry program, Formula 1 car, and solar bikes, ETIS had a student team capture first place in the 2004 International Conference on Earth and Space March 7-10 in Houston. MTSU defeated the other two finalists, the University of Illinois and Prairie View A&M, for the championship. “They perfected the robotics system to the extent that NASA may change the requirements next time,”said Dr. Ahad Nasab, professor, ETIS. “They have been waiting for a group to take it to a higher level. NASA will add something to the competition (requirements) next year and make it more challenging.” Five students — seniors Aaron Dudley and Amy Black and sophomore Seth Holland of Murfreesboro, senior James Barker of Elizabethton and alumnus Travis Martin of Murfreesboro — were recognized in the Voorhies Industrial Studies building for their roles in leading the team to the national crown.

Talon Robots by Spc. Jonathan Montgomery

Walking i-foot Robot This two-legged, mountable robot was developed for threedimensional mobility, with the ability to navigate staircases. The passenger climbs on and drives with a joystick. The egg-shaped design of the “ifoot” that wraps around the passenger is meant to express the dream of future three-dimensional mobility and the feelings of safety and reliability upon which that dream is built. (Someone should tell them about Tetsujin 2005!)

Tractor Cutter Graduate Students in Action ...

Photos by Carolyn Mitkowski

NC State University The Department of Biological and Agricultural Engineering

10

SERVO 05.2005

Whenever an Explosive Ordnance Disposal technician heads downrange, one thing is certain: the robot goes first. “The cost of losing a robot is not nearly as close as losing a trained EOD person,” said Sgt. 1st Class Gregory Carroll, noncommissioned officer in charge of the 184th Ordnance Battalion, an EOD robotics team from Fort Gillem, GA, deployed to Baghdad. “Time on target is our biggest danger, and these robots eliminate us from having to go downrange if we don’t have to,” he said. Since their EOD inception, robotic systems have saved numerous lives by helping to wipe away the threat of improvised explosive devices and vehicle-borne IEDs encountered daily throughout the Iraqi theater of operations. Not surprisingly, 95 percent of all EOD robots are used for reconnaissance missions and delivering explosives to the hazard for detonation, said Carroll. These “man-portable” robots, initially employed by infantry units for advance scouting purposes, dually serve as multi-versatile, lightweight machines supplementing EOD teams on the roads of Iraq.

Tetsujin2005Ad.qxd

4/7/2005

3:36 PM

Page 11

Y

es exo-fans,Tetsujin is back for a second action-packed year! Once again, we'll be part of the giant RoboNexus Conference — which will be twice as large as last year.To "suit" the quickly-evolving work in strength augmentation, we've expanded the challenges for Tetsujin 2005. Now you have three ways to showcase your work: challenge 1: Weightlifting. Ascend stairs in your suit to the lifting platform and lift a load of from 100 to 1,000 lbs* from a squatting position to a height of at least 24 inches*, return the load to the ground in a controlled manner, and descend the stairs. Stair-climbing may be unpowered. The winner is the competitor who lifts the most weight.

challenge 2: Dexterity. Stack nine concrete cylinders weighing about 70 pounds each in a 4-3-2 vertical arrangement, but don't knock them over as the pyramid grows! The winner is the competitor who arranges the cylinders in the shortest time.

challenge 3: Walking Race. Walk the 100 foot* long U-shaped challenge course, stepping over a small obstacle at the half-way point.The shortest time wins, with a time bonus being granted based on any auxillary load carried.Walking must be powered.

The current rule set is available online at

www.servomagazine.com/tetsujin and questions can be directed to [email protected] Start planning NOW so you can be a part of the largest "exo-games" event of the year — Tetsujin 2005! *Specifics of the competition are in a tentative state and may be subject to change.

Robytes.qxd

4/5/2005

8:57 AM

Page 12

Robytes re you an avid Internet surfer who came across something cool that we all need to see? Are you on an interesting R&D group and want to share what you’re developing? Then send me an email! To submit related press releases and news items, please visit www.jkeckert.com

A

— Jeff Eckert

Exploring Antarctica

The Nomad robot is slated to conduct survey traverses of the Atlantic ice sheet. Photo courtesy of Carnegie Mellon University Robotics Center.

In 1997, it covered 220 km through the Atacama Desert in Chile. In 2000, it discovered and classified five meteorites in Antarctica. Now, Carnegie Mellon University’s robotic rover, Nomad, is being upgraded and field tested in preparation for a return to the Antarctic as part of the Life on Ice: Robotic Antarctic Explorer (LORAX) project, which is designed to measure the distribution of microorganisms in the near-surface Antarctic ice plateau. Nomad is no miniaturized machine: the gasoline-powered device

12

SERVO 05.2005

weighs in at 1,944 pounds and measures eight feet square. It can travel up to 20 inches per second and deploy a variety of instruments. The current incarnation of Nomad includes a wind turbine, allowing researchers to weigh the merits of combined solar and wind energy to help power the device. Previously controlled via telecommunications, it has now been fitted with sensors and computing capabilities to expand its ability to navigate autonomously. At last report, Nomad was deployed on New Hampshire’s frozen Lake Mascoma, which adequately simulates the Antarctic plateau, where it successfully migrated across 10 km of ice and snow. For the actual expedition, researchers at the University of Oklahoma are developing an ice coring and sampling device, and others at the University of California, Berkeley, are working on a fluorescence spectrometer that Nomad will use to identify and quantify microorganisms in the ice. The project is supported by a $400,000.00 grant from NASA. For details, visit www.frc.ri.cmu.edu/ projects/lorax/

Robot Imitates Cockroach

Johns Hopkins student Owen Loh developed this advanced cockroachinspired robot antenna, equipped with six strain-gauge sensors that change resistance as they are bent. Photo courtesy of Will Kirk.

There’s nothing new about robots that look like bugs, but Owen Loh, a

by Jeff Eckert

Researchers have adapted a commercial robot for their experiments with cockroach-inspired technology. Here, the robot uses an early version of the antenna to “feel” its way along a wall. Photo courtesy of Will Kirk.

student at Johns Hopkins University (www.jhu.edu), decided a couple years ago to see if a robot can be taught to navigate like a cockroach. The work is important because most robotic vehicles that are sent into dangerous locations rely on vision or sonar to find a safe path. Since robotic eyes don’t operate well in low light, and sonar systems can be confused by polished surfaces, the solution was a flexible, sensorladen antenna. It is used to guide the robot on its journey along walls and around corners and obstacles. An early version showed promise, so Loh recently fabricated a more advanced version. The new one is made of cast urethane encased in a clear plastic sheath. Embedded in the urethane are six strain gauges that change resistance as they are bent. “We’ve calibrated the antenna so that certain voltages correspond to certain bending angles that occur as the antenna touches the wall or some other object,” Loh said. This data is fed to the robot’s controller, enabling it to sense its position in relation to the wall and to maneuver around obstacles. When the antenna signals to the robot that it is veering too close to the wall, the controller steers it away. It is believed that the cockroach-inspired anten-

Robytes.qxd

4/5/2005

8:58 AM

Page 13

Robytes nae could eventually provide a new generation of robots with enhanced ability to move safely through dark and hazardous locations, such as smoke-filled rooms strewn with debris. And, presumably, it could allow them to locate cookies in your pantry.

Universal Interface for Bots, AGVs

The MobileEyes interface provides a GUI for nearly any point-to-point automation application, including the company’s PatrolBot pictured above. Photo courtesy of MobileRobots.com.

Maybe you’ve settled into a cushy, minimum-wage job as a security guard or tour guide and think you have achieved a certain level of job security. In theory, you could be replaced by a robot. However, in practice, industrial robots aren’t cheap, and the hardware is just the beginning. Programming a bot is time-consuming and expensive, and your employer may not have the resources or resolve to undertake such a project. But the folks at MobileRobots.com have introduced a product that is aimed at changing things. In the past, robot users generally have needed to develop or buy custom software for each application, but MobileRobots.com (formerly known as ActivMedia Robotics) has introduced

MobileEyes, a standard interface for robots and automated guided vehicles (AGVs). According to the company, it is a single, modifiable graphical user interface (GUI) that is applicable to nearly any point-to-point automation application, including materials handling, remote sensing, security surveillance, visitor guidance, and asset tracking. The robot’s progress is displayed through a floor plan that it creates, and cameras, sensors, and other accessories can communicate through the MobileEyes interface. Users can also converse with people along the route, play audio files, and perform other various and sundry chores. The robots are controlled via PCs from anywhere in the enterprise, and communication is protected by encrypted passwords. The interface is compatible with any robot that employs the Automated Robot Control System (ARCS), which is designed for use by third-party robot and AGV developers as well as MobileRobots’ own platforms. Details are available at www.MobileRobots.com/Mobile Eyes.html

And Your Little Dog, Too

The Little Dog Locomotion Platform. Photo courtesy of DARPA.

If you have some solid expertise in robot locomotion and would like to

The Little Dog weighs less than seven pounds. Photo courtesy of DARPA.

pick up a cool $600,000.00 to $800,000.00 (and perhaps double that), you may be interested in a grant opportunity being offered by the Defense Advanced Research Projects Agency (DARPA). The project, dubbed “Learning Locomotion,” is aimed at developing a new generation of learning algorithms “that enable traversal of large, irregular obstacles by unmanned vehicles.” Apparently, current battlefield robots are insufficiently capable of moving over such obstacles, and a great deal more agility is needed. If you receive one of the grants, you will have 15 months in Phase I to get Little Dog to adeptly maneuver over a board with terrain features built into it. The mechanical canine (which has four legs, three actuators per leg, and a total weight of less than seven pounds) will have to travel 0.6 times its leg length per second and surmount an obstacle with a height of 0.9 times the leg length. If successful, you may be able to proceed to Phase II, which offers similar funding. Proposals must be received by March 1 of next year, so get moving. For details, visit www.fedgra nts.gov/Applicants/DOD/DARPA/ CMO/BAA05-25/listing.html click on “Learning Locomotion,” and download the Proposer Information Pamphlet (PIP). (Thanks to Alex McNair for the tip.) SV

SERVO 05.2005

13

Geerhead.qxd

4/5/2005

8:50 AM

Page 14

by David Geer

Contact the author at [email protected]

RoboX — Tour-Guide Robot “The Name’s X, RoboX, and I’ll be Your Guide for Today ... ” The robot’s friendly appearance, mimicked facial responses, and intuitive behavior set Expo visitors quickly at ease, but RoboX creators were uncertain how attendees might react to their jovial metallic ambassador. In addition to considering the safety of patrons, the robot’s durability against unwelcome responses also had to be weighed. ot your average bag of bolts, RoboX is yet another great example of robotics designed for intimate interaction with you and me. As a totally autonomous, magnificently mobile, and social robot, RoboX is well suited to its primary task, having first appeared as a tour guide for the Expo 02 robot exhibition held in Switzerland. The Autonomous Systems Lab of the Swiss Federal Institute of Technology, in conjunction with a spin-off company, BlueBotics SA, developed RoboX. BlueBotics is in charge of

N

The X displayed by the LED matrix in RoboX’s right eye, in combination with the positioning of his eyebrow, help communicate what his creators at BlueBotics refer to as an “angry yet nice” emotion.

full production. As with the RoboCoaster featured on these pages in the previous issue, RoboX’s safety and reliability had to be assured to receive approval for use with the public. At the Expo, the robot responded to crowds in the hundreds and in close proximity. For many attendees, this was their first encounter with any robot, let alone one so advanced and human-like. RoboX creators were uncertain how people would react to their jovial metallic ambassador, but the robot’s friendly appearance, mimicked facial responses, and intuitive behavior set By displaying a question mark in his LED matrix eye, RoboX creates an expression of surprise.

Expo visitors quickly at ease. In addition to considering the safety of patrons, the robot’s own safety and durability against unwelcome responses had to be weighed.

Standards Most mobile robots that work in close quarters with people only need to meet the standards set for a temporary, limited-demonstration robot. The RoboX project had to be proven to the industry and had to meet top standards so that it could work the 12-hour days the Expo would require of it. On top of that, it had to be functional every single day for a full five months!

Dimensions RoboX stands 1.65 meters in height, which equates to about fiveand-a-half-feet tall, and is 0.90 meters in diameter, or about three feet around. It weighs about 250 pounds.

A Song and Dance Man? Though RoboX is no song and dance bot, it can easily be programmed for complex movements, interaction, and tour sequences.

14

SERVO 05.2005

Geerhead.qxd

4/5/2005

8:53 AM

Page 15

GEERHEAD RoboX speaks English, German, French, and Italian, and it even plays music for its audiences. RoboX asks questions of his visitors, which can be answered with the press of one of his colored buttons. RoboX has eyes and eyebrows with which to demonstrate his broad range of emotions. An LED matrix in the robot’s right eye aids communications by presenting animations and icons, such as a question mark to show surprise, an “X” for an irritated blink, or a small dot to express loneliness. RoboX can see you, follow you, and avoid you with the help of his eye sensors. He can sense your presence and track you with his laser scanner. He knows where he is each step (wheel turn, actually) of the way through the tour, and where he needs to go next. Even while mingling in large crowds and in tight areas, RoboX won’t misstep or bump into you or objects in his path. His foam bumpers, tactile plates, and a redundant control system insure a smooth tour for RoboX and his guests.

How Does He Do That? What makes him function so well

Four onlookers examine RoboX from the front as we get a look at his “aft,” so to speak. Notice the robot’s large base, motor area, main shaft, and connections to its sensors.

in heavily crowded rooms? RoboX was programmed so that he is well able to move around in his intended environment. Using his laser sensor, he sees his surroundings and takes measurements of all that’s around him. With this information and a combination of

Here you have a good head-on shot of the robot’s facial expression technologies, speakers, push-button response pad, shaft, base, and tactile plates used in sensing.

several state-of-the-art algorithms, RoboX can find a collision-free trajectory even in very crowded environments. RoboX can be reprogrammed for different tasks or environments. How so? For new areas, he simply creates a

ROBOTS RECEIVE WARM RECEPTION Visitors to the Expo 02 responded to RoboX’s questions by selecting one of four colored buttons on the robot’s angled, diamond-shaped pad. This afforded BlueBotics a survey of the quality of the exposition and of several of RoboX’s modalities. Here are the questions that RoboX posed:

interact with the robot?

1. How do you rate the robot’s physical appearance?

8. Which exhibits did you visit?

2. How do you rate the robot’s character? 3. How good is the robot’s synthesized speech? 4. How did you understand how to

5. How do you rate the speech recognition (only on two robots)? 6. Which sensor is used by the robot in order to navigate? 7. How many exhibits did you visit?

9. How do you rate the quality of the overall presentation? 10. Would you prefer a normal information desk or an interactive robot? Independent of the question’s subject, the results were equally distrib-

uted. Responses demonstrated overall rankings of the bots and the event as either very good (20 percent of respondents), good (51 percent), acceptable (26 percent), and bad (only three percent) with no significant variation. Visitors perceived the robots and the entire exposition as a whole as one experience during their stay. Two hundred and seven attendees were queried. Remember, many of these folks had never encountered a robot before, let alone socialized with one or trusted it to be their guide. In contrast to normal visitors, the long-term staff members considered the robots an ensemble of different components, probably an effect of longer exposure to them. The visitors, however, seemed to have personified RoboX.

SERVO 05.2005

15

Geerhead.qxd

4/5/2005

8:55 AM

Page 16

GEERHEAD If You Get to See RoboX Someday ... Look for his intuitive nature. Listen to him, look at his eyes, answer his questions using the colored buttons on his diamond shaped pad, and follow him when he asks you to. BlueBotics had a contract to export a RoboX to China, and for the project, they were to extend and upgrade the speech capabilities of the robot to Chinese. However, they were unable to achieve these extended speech capabilities. No other upgrades have been made or are slated for RoboX at this time.

True Bot Tales Several RoboX wait in line until called on for duty. The side angle views afford a good look at the cabling and the four button interface on the robot tour guides’ diamond-shaped pads.

suitable map of the environment. Then he can make use of BlueBotics scenario program that allows the programming of dedicated sequences the robot will move through within the given environment.

Eleven RoboX were deployed in all at the Expo 02. The Swiss National Exhibition included a section for robotics and took place in Neuchatel, Switzerland — a lovely country setting with vineyards surrounding a narrow lake with the same name. The theme of the exhibition was, “the natural and the artificial,” and the intent was to demonstrate the increasing proximity between man and machine in the world in which we live. The RoboX tour-guide robots led

visitors through the exhibit from the industrial robots to the cyborgs. This event was the largest installation of autonomous mobile interacting robots that has ever been offered to the public. The project required thousands of hours of operation of the robots, which afforded the engineers the opportunity to examine and improve RoboX’s hardware and software in ways not possible in smaller projects. For example, during the Expo, some errors appeared after only a few days, while others didn’t appear for the first time until after a couple of months. The laser scanners failed during Week Five of the Expo, due to the temperature in the exhibit. Once the robot received its last available scan before failure, it ran into the next unscanned object rather than shutting down. This was an important safety and security issue.

Curious Roboticists Want to Know RoboX is a reference work in advanced mobile robotics. Roboticists who experience RoboX are fascinated with him and respect what this product design has achieved. He has even become a reference work for industrial applications.

RoboX Public Debuts Where can we see RoboX in operation in the US or around the world? Since the first big exhibition in 2002 (the Expo), RoboX has been rented out for much shorter events like trade fairs and other interactive events. A potential customer has appeared, which may order a fixed installation of RoboX for a museum in Dundee (UK). SV

RESOURCES RoboX Home Page www.bluebotics.com/entertainment/ RoboX Link to much more RoboX info http://robotics.epfl.ch

16

SERVO 05.2005

Circle #41 on the Reader Service Card.

Full Page.qxd

4/5/2005

8:02 PM

Page 17

USB Oscilloscope & Logic Analyzer The new generation Scope for the age of microelectronics. 8 Channel 40MS/s Logic Analyzer



Capture digital signals down to 25nS with arbitrary trigger patterns.

$295

3 Input 100MHz Analog DSO



Classic Analog Scope using a standard x1/x10 BNC probe. Additional inputs on the POD for dual channel operation.

8 + 1 Mixed Signal Scope



True MSO to capture an analog waveform time-synchronized with an 8 channel logic pattern triggered from any source.

Real-Time Spectrum Analyzer



See the spectrum and waveform of analog signals simultaneously and in real-time

Waveform Generator



Load up to 32K arbitrary waveform and replay via the onboard DAC (10MS/s) or a digital pattern from the POD (40MS/s)

Standard 1M/20pF BNC Input 200uV-20V/div with x10 probe S/W select AC/DC coupling S/W select 50ohm termination Arbitrary Waveform Generator

Turn your PC or NoteBook into a powerful Scope and Logic Analyzer! See inside your circuit in the analog and digital domains at the same time to make tracking down those elusive real-time bugs much easier. Pocket Analyzer combines a high speed sample-synchronized storage scope and logic analyzer with a programmable waveform and logic pattern generator. Also included is an integrated real-time spectrum analyzer and powered "Smart POD" expansion interface so you've got all bases covered! About the same size and weight as a Pocket PC, this USB powered BitScope needs no bulky accessories. It's the perfect low cost "go anywhere" test and debug solution.

BitScope "Smart POD" Connector 8 logic channels, 2 analog channels Dual channel capture from POD A/B Async serial I/O for external control Logic Pattern generator 32K 40MS/s

BUS Powered USB 2.0 Device Single USB cable to your PC Compressed data transmission Simple ASCII control protocol BitScope Scripting Language

External/Passthru Power Supply Auto senses an external supply removes power load from USB for use with unpowered hubs. Supplies up to 500mA via POD

BitScope and your PC provide an array of Virtual Instruments

• R&D • Education • Robotics • Lab Scope • Fast DAQ • Service • Debug BitScope Pocket Analyzer uses highly integrated Surface Mount technology to provide functionality you would expect from scopes many times the size and price. Its programmable Virtual Machine architecture means new functionality can be added via software. For custom Data Acquisition, export directly to your spreadsheet.

BitScope DSO 1.2 software for Windows and Linux

www.bitscope.com

Rubberbands.qxd

4/5/2005

8:41 AM

Page 18

by Jack Buffington

You’ll Get a Charge Out of This! How to Charge Ni-Cd and NIMH Batteries

you have been playing around with hobby robotics for a Ifwhile, you’ve probably noticed that you tend to go

through batteries fairly often. If that’s true, now might be the time to think about using rechargeable batteries in your projects. In the past, rechargeable batteries were poor substitutes for alkaline batteries. A reason for this was that rechargeable batteries had only a fraction of the capacity of alkaline batteries. These days, rechargeable batteries that are packaged in standard sizes, such as AA or C sizes, are still not up to the capacity of alkaline batteries, but they are pretty close. Rechargeable batteries used to have a “memory effect,” where they would lose capacity if they were not completely drained before recharging. Modern rechargeable batteries don’t have this problem, so you have a lot more flexibility to charge them when you want/need to. There are several types of rechargeable battery, such as lithium ion, lithium polymer, nickel cadmium (Ni-Cd), nickel metal hydride (NIMH), and lead acid. Lead acid technology has been around for decades and is a reliable and easy-to-use battery. Lithium ion is used in many cell phones and laptops Figure 1. Discharge graph of an alkaline battery.

18

SERVO 05.2005

because of its high-energy density. Lithium polymer is an exciting battery technology due to its high-energy density, its light weight, and its ability to supply high currents. This column will focus on Ni-Cd and NIMH batteries because they are readily available at local stores, and they charge in a similar manner. Please note that the other rechargeable battery types do not charge by the same methods, and you should not attempt to charge them using the method described here. While alkaline batteries supply roughly 1.5 volts when they are new, Ni-Cd and NIMH batteries will supply around 1.2 volts when they are freshly charged. Sometimes this prevents them from being a direct substitute for alkaline batteries, but in most cases, the voltage difference won’t matter. Another interesting thing about Ni-Cd and NIMH batteries is that, after an initial drop in their voltage when they are first used, they remain relatively stable until they finally have a steep drop in voltage at the end of their life. By comparison, alkaline batteries steadily drop in voltage as they are being used. Figure 1 and Figure 2 show discharge graphs for these batteries. Charging NIMH and Ni-Cd batteries is fairly easy. There are a few strategies that manufacturers take to charge them. The first way that is used is to simply connect the battery to a wall adapter and instruct the user to remove the battery after a certain length of time. This is probably the most common method used for low-end products, because it also happens to be the least expensive. There are a few problems with this method. The first is that it can reduce the battery life if the user leaves the battery connected too long. The second reason is that this charge method cannot be very fast. The manufacturer has to keep the charge current low so that if the user leaves the battery on the charger for a long time, it might go bad but it won’t leak fluids or overheat. To partially prevent these problems, some chargers incorporate a timer that will stop the charge cycle after a certain amount of time has elapsed. This is also a minimal cost solution but provides a safer method of charging batteries.

Rubberbands.qxd

4/5/2005

8:44 AM

Page 19

Rubberbands and Bailing Wire The final method of charging these batteries is called peak charging. This method of charging takes advantage of the fact that NIMH and Ni-Cd batteries will rise in voltage as they are being charged. When they have reached maximum charge, they will level off and then decrease in voltage. A peak charger detects this decrease in voltage and turns off the charger at that point. This column describes how you can build your own peak charger. The first thing that you need to realize is that the battery or battery pack will reach voltages higher than the voltage arrived at by multiplying the number of cells by 1.2 volts. Unless you are using a DC-to-DC converter to regulate the current going into your battery, it would be wise to pick a wall adapter that can output between 150 to 200 percent of the full battery voltage, otherwise your charge current won’t be sufficient for faster charge rates. Figure 2. Discharge graph of an NIMH battery. The recommended method of charging these batteries is to hold the current constant and let the charge voltWhen you sample the battery voltage, you will actually age vary. Fortunately, this is easy to do using a LM317 need to take several samples that you can average together adjustable-voltage regulator. Simply wire it up as shown in to get the actual voltage of the battery. Alternately, you Figure 3. could put an extremely low pass filter on the analog-toVarying the value of the resistor will vary the amount of digital input pin so that the ripple effect would be averaged current that you allow to pass. This resistor will need to be a out in the hardware. If you don’t do this sort of filtering, fairly hefty resistor, unless you are charging a pretty small what will happen is that your charger will prematurely stop battery or you want a low-charging current. This resistor will charging when it happens to sample a voltage peak and likely be something in the range of one to 20 ohms, dependthen later samples at a low point in the voltage ripple. If you ing on your application. make sure to average over the length of 1/60th of a second, To give this charger some smarts, you will need to add a or a multiple of that, then you will avoid this premature microcontroller; any microcontroller that has an analog-tocharge-cycle termination. digital converter will work. The basic structure of the program will be that it will start charging the battery and, at regIf you look at Figure 5, you will see a graph of what hapular intervals, will read the battery voltage using its analogpens if you just feed constant current to a Ni-Cd battery pack to-digital converter. It will track this voltage, and if it is highbut don’t cut off the charge cycle. You can see that at the er than any previous reading, it will store this value. If the curbeginning of the charge cycle, the battery’s voltage will rent reading is less than a certain value (below the highest slowly rise. As it nears completion of the charge cycle, it will previous reading), then the charger will stop charging the rise quicker until it peaks at its highest voltage. After the battery. This is a pretty easy process, but there is one TECH TIDBIT small issue that you need to be aware of. Any wall Prototyping on a breadboard can create some awfully messy adapter that you use, unless it is regulated, will have some voltage ripple in its output, which will wiring that can be quite fragile. Wires can come loose from where introduce ripple into your battery voltage readings. they are supposed to be fairly easily. Breadboards also are not a good permanent solution for keeping your circuit over the longterm. One way to prototype your designs in a much more durable Figure 3. Current limiting using an LM317. manner that only takes slightly longer is called point-to-point wiring. Simply take the same parts that you would use on a breadboard and solder them to a circuit board that has unconnected solder pads on the back. Then use wire-wrapping wire to connect the proper leads together. SERVO 05.2005

19

Rubberbands.qxd

4/5/2005

8:46 AM

Page 20

Rubberbands and Bailing Wire charging for some other reason. These are easy enough to implement, so it is worth taking the extra time to add them if you are going to go to the trouble to make your own peak charger. The first situation is if your battery, for some reason, never peaks. You can do a few charge cycles using completely dead batteries to see how long they take to charge. If you design your charger so that it will turn off the charge after the batteries have been charging for a little longer than is required for a full charge, then it would make your charger safer. Another way that you can make your charger safer is to make it shut off if the batteries become too hot. You can measure the battery temperature using a thermistor and a resistor connected together to form a voltage divider as shown in Figure 7. With this setup, if the thermistor goes down in resistance, the output voltage will go up, and if the thermistor goes up in resistance, the output voltage will Figure 4. Hefty five- and 10-watt resistors are used. go down. Figure 8 shows a complete charger circuit. In this case, an NPN transistor is used to stop the charge by sinking the peak, the battery’s voltage will start to decline. You wouldadjust pin of the LM317 low. There is a diode in series with n’t want to keep charging the battery as long as shown the battery to prevent the battery from discharging itself in Figure 5 under normal circumstances. Figure 5 does not through the circuit after the charge is complete. This diode use any averaging, so you can see the effect of the voltage will change the voltage read by the microprocessor, but that ripple. doesn’t matter, since what we really are looking for is the In Figure 6, there is a graph of a proper battery charge voltage peak. cycle. In this example, the blue line represents the battery You’ll also notice that there are two voltage dividers. voltage and the red line represents the peak voltage that was One is the temperature sensor that was discussed before, read. This example has multiple samples averaged over and the other allows the microcontroller to sense the battery approximately 1/30th of a second, which produces a much voltage. You would change the values of the resistors in the smoother graph. In this graph, the red line indicates the peak voltage sensor divider to limit the maximum voltage received measured voltage and the blue line represents the voltage by the microcontroller to +five volts. measured at the time when the data point was recorded. The You might be wondering at what current you should red line is sometimes above the level of the blue line. This is charge your batteries. There is no answer that is right for all because the peak-value variable was updated more often batteries. Some batteries are made so that they can charge than the battery voltage. quickly, while others can’t handle a high-current charge. The best way to figure out how much current to use when charging is to look at your battery’s data sheet to see what the manufacturer says is acceptable. Detecting the peak of the battery’s voltage is the proper Here are a few rules of thumb to go by if you don’t have way of detecting the completion of battery charging. Even a data sheet to look at. The first thing that you can do is to still, there are some situations where you may want to stop look at how many milliamp/hours the batFigure 5. Graph of what happens if Figure 6. A good charge cycle. constant current is applied to a battery. tery is rated at. Manufacturers specify charge rates in terms of “C.” If you have a 1,200-milliamp/hour battery and you charge it at one C, then you would be charging it with 1,200 milliamps of current. A charge rate of one C is considered to be a fast charge, and not

Playing It Safe

20

SERVO 05.2005

Rubberbands.qxd

4/5/2005

8:47 AM

Page 21

Rubberbands and Bailing Wire

Figure 7. A thermistor/resistor voltage divider.

all batteries can handle that. To play it safe, you might charge your batteries at 0.5 C. If you are designing something where you can’t control the type of battery being charged, then you might consider an even lower current. Figure 8. A complete charger circuit. Another thing to consider is that fastcharging your batteries decreases charge cycle went well. their lives a little bit more than if you were to charge them at On the plus side, you will be able to design projects that a slower rate. If you want the maximum lifetime from your have a battery embedded inside of them, and if you have a batteries, you will want to charge them at a rate that is less project where many batteries must be charged simultaneousthan their highest charge rate. ly, you won’t have to deplete your wallet buying a bunch of When your battery is done charging, you may want to chargers. SV ensure that it will be at its peak voltage the next time that you use it. Ni-Cd batteries lose about 10 percent of their capacity per month after they are charged. :$17(''($/(56$1',03257(56 To prevent this, you can do what is )RU(8523(¶V1R (GXFDWLRQDO 52 called a trickle charge. Different data /RZFRVW+REE\ sheets say different things about trick$6852URERWNLW 3&&RQWUROOHU le charges, but typically, a trickle $FRPSOHWHVRIWZDUHDQG 'HYHORSHGE\'/5 ZZZGOUGH charge will be between 1/50 C and KDUGZDUHVHWWRFRQWURO 3URJUDPPDEOHLQ&LQFOXGLQJ 1/100 C. At this current level, the WKH2:,029,7URERW /,18;DQG:LQGRZVŠVRIWZDUH batteries can be continually charged DUPWUDLQHU without damage. This sort of charge rate can be achieved by pulse width modulating the transistor in the charger circuit to give you an average charging current that is at the level that you require. Having the ability to charge your 52%%<53URERWNLW robot’s batteries without removing (XURSH¶VPRVWDGYDQFHGURERW them can be quite beneficial some0RUHLQIRUPDWLRQ#ZZZFURERWLFVGH times. Developing a charger’s software and electronics is a fairly simple task :::$5(;;&20 but can take a long time due to the 3OHDVHFRQWDFWXVE\HPDLOLQIR#DUH[[QO need to continually wait to see if the SERVO 05.2005

21

TwinTweaks.qxd

4/5/2005

9:03 AM

Page 22

THIS MONTH: The Robosapien Swarm Cometh

S

ERVO Magazine has seen some great Robosapien hacks, so when we decided to tweak a Robosapien, we knew it would have to be something fresh and unexpected. We were wary about attempting a single hack that would be compared to the likes of the Surround Sound Robosapien, but suddenly a light bulb went on. We both have our own Robosapiens in addition to the one provided as a victim, and you can do much more with three Robosapiens than with one. How could we use three

Robosapiens in one hack? Outfit them all with custom weapons for a Robosapien melee? No! The three Robosapiens provided us with an opportunity to make a tentative foray into the emerging field of swarm robotics.

The Robosapien

What is there to be said about the Robosapien that has not already been said? It walks, runs, dances, talks back, and can be programmed to clean up your room (though when we tried that, the Robosapien fell asleep). The Robosapien is With some household items and a hat, we will easy to control and easy coordinate Robosapiens into a swarm. to program, but that is not to say that it is an excessively simple machine. Reflexive motion and other principles of BEAM robotics that went into its design make it very efficient, and perhaps, to the eye of a connoisseur, even artistic. With socketed electronics and easily accessible innards, the RS was truly made to be tweaked.

22

SERVO 05.2005

Problem Analysis Swarm robotics has several defining characteristics, such as cost efficiency, scalability, robustness, and selforganization. We will try to connect these concepts to this project as often as possible. While what we create might not abide by all of the parameters that define swarm robots, it will be a model of swarm robots and significant in the same way (as in economics) that the market structure of pure competition is significant in that it does, in fact, closely approximate the real thing. An example of swarm robotics that we both have had experience with are the PARC Polybots. The PARC Polybots are modular robots built for applications like urban search and rescue that do abide by all of the parameters of swarm robotics. Multiple Robosapiens can function cooperatively to execute a variety of different tasks, from amplifying a single Robosapien’s abilities (the concept of “force multiplier” in action) to entertaining small children as a performance troupe. Maybe, with a little gumption and a lot of luck, they can even clean a whole room (watch out, Roomba!). We are not going to give the RS swarm an

TwinTweaks.qxd

4/5/2005

9:08 AM

Page 23

The Robosapien Swarm Cometh interactive intelligence like the Polybots, but we will still coordinate their actions to approximate swarm activity.

Roundin’ Up the Posse The Robosapien, when left to its own devices, is a very disorganized creature in need of some discipline. An easy way to coordinate the actions of the RS swarm would be to make them all obey one infrared remote. Infrared devices are limited in range by line of sight, so we definitely needed to figure out an alternative if we wanted to control three Robosapiens at once. An early idea was to tether the three Robosapiens to one remote with wires, replacing the infrared transmitter and receiver. One of the inspirations for this idea was a project we worked on while we were apprentices at the Palo Alto Research Center last summer. We were working on modular robots, and there was a remote-controlled tank that was being used to help in mapping. Due to the way the competition that we were entering was set up, radio control would not work. One of our jobs was to make the tank operate through a wire to where the receiver was on the tank and the antenna was attached on the remote, therefore having the tank on a tether. Would

the same method work on infrared devices? We thought so, but splicing three wires into one tether seemed a little fiddly. All options were still on the table. Another idea hit us while we were watching an old episode of “MacGyver.” To avoid detection by a laser security system, MacGyver The trio is ready for action. used plastic tubes as large fiber optics to essentially bend the lasers out of the combine them into one bundle to conway and expand the gap to allow him nect to a single remote. Before fabricatto fit through. Fiber optics! But do fiber ing the whole tether, we wanted to see optics work with infrared light? We if infrared fiber optics would actually have not covered the optics chapter in work. our AP physics class yet, so we would We have never heard of infrared need to experiment. fiber optics before, and we wanted to know if we were the pioneers of new optical technology or simply blowing smoke. Initial tests appeared encouragFiber optics are generally made out ing, but after beginning work on the of glass or plastic, and their average tether and performing another set of diameter is 60 micrometers. MacGyver tests, we found that fishing line was used a plastic tube, but fiber optics in ineffective. Stymied by fishing line fiber LEGO kits and our Team 1079 hats for optics, we were ready to try the idea of the FIRST competition are solid rods, a wire tether. and we like to work with what we are Before we visited a soldering iron used to. Fishing line appeared to be a upon the RS, though, we had a maglogical and cost-effective choice. We netism test in physics to study for. One would be able to bundle the lines like night, when opening the textbook, we stranded wire, so it would be easy to serendipitously happened upon a page

Fiddly Fiber Optics

Circle #54 on the Reader Service Card.

SERVO 05.2005

23

TwinTweaks.qxd

4/5/2005

9:09 AM

Page 24

Twin Tweaks ... came with plastic bushings on their ends that were perfect places to tape them together. We hoped that having big enough bundles would get enough good connections at the joints. A long tether was what we were going for, because it Fiber Optics from our FIRST team hats would Once decapitated, the bundle was would provide the RS serve as a nice source for our project. ready to be linked to the swarm. Swarm more mobility, but after testing some on fiber optics where we found the long tethers with a flashlight, we saw room for error. The strands would have average diameter tidbit above. That that too much intensity was lost to be to line up perfectly end-to-end to allow gave us the idea that maybe fishing line effective. the infrared light to continue the sucwas simply too thick, so we ran some To be sure, we tested the long tethcessive internal reflections that are the more tests with some good ‘n’ honest er with the infrared remote, ultimately basic mechanisms of fiber optics, and fiber optics to test the validity of such a finding that a shorter tether would be making a tether of a decent length form of infrared communication. The the way to go. We grouped the end of would involve quite a few suspect conhats from our FIRST team are crowned the tether leading to the Robosapiens nections with the short bits we had. with a bundle of real fiber optics, so we into three bundles with tie wraps and After testing some thinner fishing line plucked a few for testing. These tests cunningly fastened the tether to the and not getting any results, we acceptproved definitive: infrared fiber optics is backs of their heads with duct tape. ed our fate of fiddly fiber optics indeed a valid idea. Cunningly in the fact that the duct tape plucked from sparkly topped hats. The individual strands from the provided a strong attachment while hat’s fiber optics were only about 10 also covering the infrared receiver in the inches long, though, so we thought back of the Robosapiens’ heads to that thinner fishing line might be the anticipate the argument of detractors Our initial idea was to make indithat we were still simply pointing the way to go. If we had to line up several vidual long strands by using heat shrink remote at the trio. of the hat strands there would be more around the joints of singular fibers. We Once the tether was attached to found out that the fiber optics were both the trio of Robosapiens and the The sacrificial hats from which more vulnerable to heat than the heat infrared remote, we engaged in the we borrowed the fiber optics. shrink. The fiber optics came in bundles final tests. After trying to encourage already for the hats, and even though some synchronized motions, we found they were very big bundles, we decidthe Robosapien Swarm to be functioned to keep things simple. The bundles al, but only intermittently. We figured that the large bundle attached to the remote must have been too big Tethered together, their actions for the transmitter to effectively are exactly the same. communicate through all of the fibers. Bryce’s Robosapien was particularly taciturn, and after a good talking to proved fruitless, we proceeded to trim the bundle. We deduced that the connection between the two bundles in the tether must not have worked for all of the individual fibers. To make the good fibers all within the line of sight of the infrared transmitter at once, we trimmed down the bad fibers to make a smaller bundle of good fibers. This method

Construction and Testing

24

SERVO 05.2005

TwinTweaks.qxd

4/5/2005

9:11 AM

Page 25

The Robosapien Swarm Cometh proved effective, and soon the RS Swarm had no problem letting out a deafening roar on cue.

Judgement Earlier we said that our RS Swarm would adequately model a real swarm, so how close did we really get? A good way to find out would be to see how well we met all of the defining parameters of a robotic swarm. The parameters we stated before are: cost efficiency, robustness, scalability, and selforganization. As far as cost efficiency goes, the RS Swarm does pretty well. From what we hear, Robosapiens are down to about $75.00 a pop, which is not bad for individual members of a swarm. Other swarm robots that perhaps like to use nice servos for locomotion are looking at figures of up to $115.00 per servo, which makes the RS look more inexpensive. Also, one of the purposes of swarms is to replace larger, more com-

plex (and therefore more expensive) single robots. Who knows, in the future, a swarm of Robosapiens could supplant the Honda Asimo as far as some humanoid functions go. A Robosapien swarm would certainly not thin out your wallet as much as the taller humanoid, and a Robosapien swarm could certainly do things like plant a flag in a hole like the Asimo does in the commercial for the Honda Classic Golf Tournament. Another parameter is robustness. Even though swarms are composed of many small robots, they still need to complete their tasks without breaking down. Robustness is particularly important in such trying tasks as urban search and rescue, toxic waste cleanup, and minesweeping. The Robosapien as a unit is adequately robust — robust enough so that the potential jostling in a large swarm won’t cause it to fall apart. Another aspect of

Circle #68 on the Reader Service Card.

The bundles taped together. robustness to consider is the goal of swarms to be able to either repair or abandon broken modules or individuals. That would be difficult with our tethered RS Swarm, but our Robosapiens have more of the “never leave a man behind” mentality anyway. The next parameter is scalability. Scalability refers to the ease with which the swarm could be expanded or com-

SERVO 05.2005

25

TwinTweaks.qxd

4/6/2005

3:18 PM

Page 26

Twin Tweaks ... cant coloration or a form of sonar using ultrasonic sensors. Self-localization is where the real challenge of swarm robotics lies, because it is a daunting software challenge to come up with an effective, yet simple, way for the simple-minded members of a swarm to interact intelligently. Even though our Robosapiens obey one remote, they should have some type of Bryce’s Robosapien needed a good talking program to deal with objects in to to get it back in line again. the field. Vision sensors of the Robosapiens could be hacked pressed — how easy it is to add or take into for sight, or perhaps the sonic senaway robots from the swarm. Even sor could be used if some other sound though a tethered swarm is not really sensors were hacked in to complement like other swarms, our model does prothem. Or we could teach them to play vide good scalability. It would be very Marco Polo. An easy method would be easy to add more Robosapiens to the to program some reflexes based on the swarm; all it takes is another fiber optic Robosapiens’ touch sensors with the tether to be incorporated into the main standard programming. A little collision bundle. detection shouldn’t go amiss. The final and most defining paramSelf-organization also refers to the eter of a robotic swarm is self-organizaadaptability of swarm robots — their tion. Broadly speaking, self-organizaability to deal with obstacles in the tion is the ability of the individual memenvironment. Modular robots like the bers of the swarm to interact. The cenPARC Polybot change shape to deal tral form of interaction between the with different challenges, while other members of the swarm is self-localizaswarms can do things like hook togethtion — the ability for a single member er to cross gaps too big for a single of the swarm to know where it is in one. The Robosapien’s humanoid relation to the rest of the swarm. Since design makes it pretty adaptable to our RS Swarm is tethered and they all begin with, and most challenges it obey the same remote, self-localization could likely surmount without major isn’t much of an issue, but that also shape shifting. makes it less of a real swarm. Common forms of self-localization are visual recognition through signifiIn the March issue, a reader voiced a desire for With the fiber optics bundles and remote, a broader discussion of they were ready to go. problems rather than a narrow focus on a project, and the RS Swarm project provides a unique

Upping the Ante

opportunity for a broad discussion on what we see as some of the driving forces behind swarm robotics. Swarm robotics are essentially an economic approach to applications like search and rescue, mapping, exploration, toxic waste clean-up, minesweeping, and whatever other uses there are for swarms of simple robots. One who likes to wax philosophical might say that swarm robotics capitalizes on the dis-economies of Gestalt. The Gestalt theory contends that the whole is greater than the sum of its parts. The FIRST Competition is a fine example of the Gestalt theory in action. The finished product at the end of the six-week-build time is certainly more effective at playing the game than if someone just plopped down the kit of parts on the field and hoped for the best. In other cases, however, a structuralist approach is more effective. Structuralism is basically the opposite of Gestaltism. Structuralism asserts that the sum of the parts is more significant than the whole. When applied to robotics, this can be restated to mean that several simple robots can accomplish a task better than one big complex robot. A current example is the exploration of other planets. Take a look at the ill-fated Beagle II. Beagle II, in this case, is a representative of the Gestalt approach. This singular explorer likely had all of the necessary tools to do a thorough job of surveying the red planet, but a rough landing caused it to be dead on arrival. Spirit and Opportunity, though only two in number, are closer to a swarm approach. Closer in the philosophy, anyway, that if one breaks down, all is not lost. This brings us to the central diseconomy of Gestalt: if one part fails, everything fails. Everything is dependent on the singular whole. In swarm

Check it Out Check out these websites if you are an intrepid hacker who wants to learn more about swarm and modular robotics: www2.parc.com/spl/projects/modrobots www.swarm-bots.org/

26

SERVO 05.2005

TwinTweaks.qxd

4/5/2005

9:13 AM

Page 27

The Robosapien Swarm Cometh philosophy, if one part fails, others take over for it. In instances like minesweeping, if one big robot makes a mistake it is immediately back to the drawing board. If one member of a swarm ends up taking one for the team, the rest of the team can still go on.

Final Thoughts Swarm robotics is an esoteric but rapidly growing field. For any other intrepid hackers out there that might want to experiment with their own RS Swarm before miring themselves in difficult programming conundrum, we have a few recommendations that would be an improvement upon our design. One idea would be to use thinner fiber optics for more effective communication. Our 0.0125-inch diameter fiber optics were still quite larger than the normal 0.0024-inch diameter fiber optics that are used in most medical procedures ending in -oscopy, so there

is definitely room for optimization. Perhaps the best recommendation we could give would be to use small bundles of solid strands. It would have been better for us if we didn’t have to make a joint in the middle of our tether. A single solid strand would have guaranteed better communiThe RS Swarm serves as a model to cation by giving the demonstrate the basics of swarm robotics. infrared light a continuous path through which to make the internal reflections; disconbasic tenets of swarm philosophy. We tinuities, because of bad joints, were were also able to use infrared fiber some of our biggest problems. optics (of which we are not really the The RS Swarm serves as a model pioneers and only too happy to give to demonstrate the basics of swarm credit to whomever is). Now all we robotics, and, as always, there is room need to do is name our mini swarm for optimization. In the end though, it after a famous trio. Manny, Mo, and adequately demonstrates the concepts Jack? Dean, Woody, and Dave? Alexey, of cost efficiency, robustness, scalabiliIvan, and Dmitri? ty, and self-organization that are the So many possibilities ... SV

Affordable Motion Control Products Robot Building Blocks Motor Speed Control PID Motor Position Control Solutions Cubed Phone 530-891-8045 www.solutions-cubed.com

Solutions Circle #75 on the Reader Service Card.

3

SERVO 05.2005

27

Five.qxd

4/5/2005

R O B O T S A R E P L A Y I N G A N

I N C R E A S I N G L Y V I T A L

10:22 AM

R O L E I N O U R S O C I E T Y

Page 28

Five.qxd

4/5/2005

10:24 AM

Page 29

obots are playing an increasingly vital role in our society. Although many applications involve using robots to perform repetitive behavior (painting doors on an automobile assembly line, winding transformers, welding, etc.), robots are also moving into areas that are hazardous to humans, providing life-protecting and life-saving duties. Though robots may not yet be able to run through the city streets to fetch our inhaler (as depicted in the movie I, Robot), they are already assisting in the operating room, removing humans from harm’s way by performing difficult industrial and military duties, and performing chores in outer space and in the deep sea. Let us take a look at five robots that could save your life ...

R

Five.qxd

4/5/2005

10:26 AM

Page 30

FIVE ROBOTS THAT COULD SAVE YOUR LIFE

The da Vinci Surgical System n the original Star Trek television series, Dr. McCoy used his small medical tricorder to diagnose or cure many life-threatening calamities. Although we have not boldly gone that far yet, much progress is being made in the medical area of robotics. The da Vinci Surgical System, developed by Intuitive Surgical (www.intuitivesurgical.com) uses robotic technology to enable surgeons to perform minimally invasive surgery (MIS), operating through a tiny opening (port) into the body. MIS reduces trauma, blood loss, patient pain, and discomfort. The da Vinci Surgical System assists surgeons in the following ways:

I

• Routine surgical procedures are accomplished quicker and easier. • Difficult procedures may be performed by more surgeons via the controls provided by the system. • More procedures may now be performed through tiny ports that measure only one centimeter wide. The da Vinci Surgical System contains four parts: the Surgeon Console, the Patient-side Cart, the EndoWrist Instruments, and the InSite Vision System. The Surgeon Console is where all the action originates. The surgeon sits at the console, viewing a threedimensional image of the surgical site. Console controls allow the surgeon to manipulate the EndoWrist Instruments accurately, safely, and in real-time. The Patient-side Cart supports the robotic arms that manipulate the EndoWrist Instruments and endoscope. The da Vinci Surgical System uses the surgeon’s hand and wrist movements to control the robotic EndoWrist Instrument that replaces the surgeon’s own hand. A wide selection of EndoWrist Instruments are available, including forceps, cutting blades, hooks, and grippers, all of which operate within a one-centimeter opening. Intuitive motion is realized through the da Vinci Surgical System. Instruments move in the same direction as the controls, allowing the surgeon’s hand/eye coordination to be translated to the EndoWrist instruments. True three-dimensional vision inside the operating port is made possible using the InSite Vision System, which is controlled with the Navigator Camera Control software, allowing the surgeon to move, zoom, and rotate the surgeon’s view. A dual-lens, three-chip digital camera provides three-dimensional depth-of-field within the operating port and is easily positioned for different views. The da Vinci Surgical System is the first robotic surgical system approved by the FDA for such medical procedures as laparoscopic surgery, chest surgery, and cardiotomy. There are currently over 210 da Vinci Surgical Systems in use around the world.

30

SERVO 05.2005

Five.qxd

4/5/2005

10:28 AM

Page 31

FIVE ROBOTS THAT COULD SAVE YOUR LIFE

Dr. Robot he Johns Hopkins Hospital has a new doctor, a robotic doctor ... so does Hackensack University Medical Center, UCLA, Chicago Hospital, and many other medical institutions. Developed by InTouch Health, Inc. (www.intouch-health.com), and called Dr. Robot, Mr. Rounder, or Dr. RP-6 (depending on where you are), these robotic doctors provide remote access to a real, human doctor through a wireless audio-video teleconferencing link that directly connects the doctor to the patient over the Internet. The robots are able to move around the patient during an examination, and their movements are controlled remotely by the human doctor and a joystick. The patient sees the human doctor via a flat-screen display (the “head” of the robot) and is able to talk to the doctor via a microphone. A video camera allows the human doctor to see the patient and examine hospitalrelated websites for information on proper healing, scan X-rays, and view charts. The robotic doctor is popular with its patients, who say they prefer a virtual visit from their own doctor to an office visit with a different doctor.

T

SERVO 05.2005

31

Five.qxd

4/5/2005

10:30 AM

Page 32

FIVE ROBOTS THAT COULD SAVE YOUR LIFE

PackBot housands of people are killed every year by land mines, even those trained to retrieve and dispose of them. It is an unfortunate fact that current and past wars have led to millions of hidden and buried land mines just waiting for someone to tred on them. Combine that threat with those posed by house-to-house combat in unfamiliar locations, and you have a recipe for disaster for both military personnel and civilians. The PackBot series of robots from the US government and the Industrial Robotics Division of iRobot (www.irobot.com) are designed to go into harm’s way. For example, the PackBot Explorer is used to provide soldiers on the battlefield with real-time surveillance of dangerous areas, while the PackBot EOD is used to gather and dispose of explosive ordinance. The PackBot design has proven itself in Afghanistan and Iraq, with its on-board robotic control system controlled by a Pentium processor. iRobot is performing research on the SwarmBot and SwarmOS (Swarm Operating System), where 10 to 10,000 SwarmBots may be controlled in unison. This research pushes the boundaries of algorithms, hardware, and user-interface design to develop swarms of robots that exhibit useful group behavior, such as meeting at a point of interest, exploring a building, or navigating over long distances.

T

Model

Designed For

Used By

Features

PackBot EOD

Explosive ordinance disposal, HAZMAT, search-and-surveillance, hostage rescue

Bomb squads, SWAT teams, the military

Rotating gripper, OmniReach manipulator system, fiber spooler, vision and targeting head, wireless operator control unit

PackBot Scout

Search-and-surveillance in urban terrain

The military

QuickFlip flipper design, recessed vision system head, interchangeable payload modules, wireless operator control unit

PackBot Explorer

Intelligence, reconnaissance, surveillance, and battle damage assessment

Law enforcement, the military

Vision, sound, and sensor head with tilt/pan neck, long-run battery packs, GPS, temperature, heading, and other sensors, wireless operator control unit

Military R-Gator

Perimeter guarding, troop deployment, supply carrier

The military

Unmanned ground vehicle, obstacle avoidance system

Table 1. PackBot series of robots.

32

SERVO 05.2005

Five.qxd

4/5/2005

10:34 AM

Page 33

FIVE ROBOTS THAT COULD SAVE YOUR LIFE

Robonaut n December 1999, astronauts Steven Smith and John Grunsfeld from the Space Shuttle Discovery spent over eight hours in a spacewalk to replace gyroscopes on the Hubble Space Telescope. During the spacewalk, the temperature cycled between plus and minus 250 degrees Fahrenheit. And, of course, there is no air to breathe in outer space, so there are a few good reasons to want to stay inside the spaceship. Robonaut, developed by NASA and DARPA, is designed to assist (and/or replace) human astronauts in many extravehicular activities like spacewalks. Human astronauts require consumable resources while in space (power and life-support) that limit their time and ability to perform duties. Robonaut is designed to perform such mundane, yet dangerous, tasks as inspection and maintenance outside the space vehicle. Robonaut looks remarkably like a human astronaut. It does not have the typical robot-style grippers, but very articulate fingers, wrists, and arms instead. Through a process called telepresence, a human operator controls Robonaut’s 47 individual degrees of freedom through hand gloves and a visual helmet. Robonaut has the biological equivalent of a central nervous system, with a Versa Module Europa (VME) backplane used for input/output and PowerPC processors to do the number crunching for the VxWorks real-time operating system that controls Robonaut. The control system architecture of Robonaut must meet several requirements:

I

• Provide safe control for 47 degrees of freedom. • Operate completely under human control, share control, or even operate autonomously.

The Complete Electronics Design System

• It must operate under extreme temperatures. • Real-time performance must be achieved with current hardware. Robonaut is packed with technology. There are field programmable gate array (FPGA) motor controllers, scores of sensors (torque, position, temperature), harmonic drives, and vacuum-rated motors. One day, with a Robonaut attached to the end of the Space Shuttle’s cargo bay arm, the Hubble Space Telescope will feel the corrective touch of a robotic finger instead of a human one. Additional information about Robonaut can be found at http://vesuvius.jsc.nasa.gov/er_er/html/ robonaut/robonaut.html

EASY TO USE CAD TOOLS AT FANTASTIC PRICES! Schematic and PCB Layout • Powerful and flexible schematic capture. • Auto-component placement. • Rip-up and Retry PCB routing. • Polygonal gridless ground planes. • Library of over 8000 schematic and 1000 PCB foot prints. • Bill of materials, DRC reports and more.

Mixed Mode SPICE Circuit Simulation • Berkeley SPICE3F5 simulator with custom extensions for true mixed mode and interactive simulation. • Six virtual instruments and 14 graph based analysis types. • 6,000 models including TTL, CMOS and PLD digital parts. • Fully compatible with manufacturers’ SPICE models.

ProteusVSM- Co-simulation & debugging for popular Micro-Controllers • Supports PIC16 & PIC12, AVR, 8051, HC11 and ARM micro-controllers. • Latest version includes 40 new PIC18's. • Co-simulate target firmware with your hardware design. • Includes interactive peripheral models for LED and LCD displays, switches, keypads, virtual terminal and much, much more. • Provides source level debugging for popular compilers and assemblers from HiTech PICC, Crownhill, IAR, Keil and others.

PCB AutoRouting • Proteus PCB design includes an interface to the Electra Gridless autorouter.

FREE DOWNLOADABLE DEMO! Save Time. Save Money. Proteus Starter Kit – $199 • Complete Systems from $499 “This is clearly superior in every respect.”

R4 SYSTEMS INC.

Tel: 905•898•0665 www.r4systems.com [email protected]

Circle #89 on the Reader Service Card.

SERVO 05.2005

33

Five.qxd

4/5/2005

10:36 AM

Page 34

FIVE ROBOTS THAT COULD SAVE YOUR LIFE

VideoRay s any scuba diver knows, the underwater world is both an amazing and scary place. The wonder and beauty of the deep are tempered by the fact that humans are merely guests, visiting for a short while at the mercy of the remaining oxygen in their tanks (or other gas, depending on the depth). Accidents happen underwater just as they do on land, without warning, and with the added punch of drowning thrown in. Even routine underwater activities such as inspection and maintenance can turn deadly when something unforeseen happens. Fortunately, help is available. The VideoRay line of remotely operated vehicles (ROV) is designed for underwater surveillance, inspection, and rescue. They operate at depths of up to 1,000 feet, providing visual feedback from a color camera, as well as depth and heading information. Each VideoRay system is dive-ready and can be controlled via a joystick (with more advanced models utilizing wireless control from a laptop). All models use 300 watts of 10 to 240 volts AC power, with the VideoRay submersible fed with 48 volts DC through its tether (much lower than the 360 volts DC used by other ROVs). With the weight of the VideoRay packages ranging from 70 to 165 pounds, transportation and setup of each device can be done by only one or two individuals. VideoRays are used all over the world, in crystal-clear as well as polluted water, from the tropics to the Artic.

A

Model

Standard Features

Rated Depth

Price

Scout

Two 20-watt halogen lights, 420-line color camera, five-inch color LCD display monitor, 131-foot tether

300 feet

$5,995.00

Explorer

Two 20-watt halogen lights, 570-line color camera, camera tilt and focus controls, five-inch color LCD display monitor, depth gauge, heading, and cumulative time shown on display, 250-foot tether

300 feet

$9,995.00

Pro III

Two 20-watt halogen lights, 570-line color front camera, camera tilt and focus controls, 430-line resolution B&W rear camera, five-inch color LCD display monitor, 500 feet depth gauge, heading, and cumulative time shown on display, 250-foot tether, tether deployment system, PC remote control software

$19,995.00

Deep Blue

Two 20-watt halogen lights, 570-line color front camera, camera tilt and focus controls, 430-line resolution B&W rear camera, five-inch color LCD display monitor, depth 1,000 feet gauge, heading, and cumulative time shown on display, SeaSprite scanning sonar system, 1,000-foot tether, tether deployment system, PC remote control software

$46,500.00

Table 2. VideoRay product line and associated features.

Conclusion On the operating table, on land, in the air, and even underwater, somewhere a robot is lurking, ready to assist in saving a life or performing a hazardous job. Right now, a human controls the robot for the most part, but sometime soon, the application of artificial intelligence will perhaps provide robots with an autonomous behavior. Then, we truly will see robots running through the streets with our inhalers. SV

34

SERVO 05.2005

Five.qxd

4/5/2005

11:02 AM

Page 35

FIVE ROBOTS THAT COULD SAVE YOUR LIFE Not Done Yet — Some Juicy Tidbits to Feed Your Appetite for Info! Sensors Are People, Too

More, More, More Robots!

With all the fuss over robots saving lives, it is easy to overlook the good work done by simpler devices, namely the electronic sensors now being used to perform these critical functions:

In October 2004, the United Nations Economic Commission released a report indicating that the number of robots assisting with chores in the home may increase from over 600,000 in 2003 to over four million by 2007. The 2004 World Robotics Survey found an 18 percent increase in orders for industrial robots in 2003. Japan alone has 400,000 industrial robots (as many as the rest of the world’s industries). Japan’s New Energy and Industrial Technology Development Organization (NEDO) estimates their market for service-oriented robots will grow to $17 billion in the next five years. The Robotic Industries Association shows that North American orders for industrial robots were up 28 percent in 2003, with a $3 billion US market. Visit http://robots.net for additional information about personal and industrial robots.

• Chemical, biological, and nuclear detection • Blood analysis • Heart rate measurement • Measuring the brain’s electrical activity As robots become more human-like (as Robonaut is trying to do), sensors will play an increasingly important role in providing feedback for the robotic control system. Sight, touch, smell, hearing, and taste are the five human senses that must be mimicked by hardware. Not all sensors are alike, and this is true for their sensory processing, as well. An image sensor requires a hefty amount of processing to extract image information, while a touch sensor may be implemented as a simple microswitch, requiring only one bit of information to be tested. As sensors evolve, so must the ability to gather and process their information.

Circle #95 on the Reader Service Card.

James Antonakos can be reached at antonakos_j @sunybroome.edu or you can visit his website at www.sunybroome.edu/~antonakos_j

SERVO 05.2005

35

Barlow2.qxd

4/5/2005

9:27 AM

Page 36

L

ast month, we discussed several problems and errors that a beginner can experience while designing a new robot. We discussed where to begin and some of the many skills to be

learned. In this article, we will continue with more problems you may run into, programming errors, and a list of helpful notes for any beginner. In addition, you will find many useful circuits to use in your designs. There are many pitfalls to be avoided, but the rewards are great. We feel the ultimate goal for any beginner should be personal satisfaction. As mentioned in the last article, design and build in a way that you can easily understand. Use a program language and chassis design that you can easily work on. When you design your second, third, and fourth robots, you can begin to branch out by adding more complicated skills to your arsenal. I hope these primers will assist you, as well as guide you to a rewarding experience with robotics.

36

SERVO 05.2005

Barlow2.qxd

4/5/2005

9:29 AM

Page 37

PART 2: Common Errors in Building Robots Syntax and Code Errors One of the earliest pitfalls to be avoided is programming errors. As a list of potential errors could fill many volumes, I will only show you some of the more common problems to be avoided. Much of this depends on whatever program language you have chosen for your robot. 1. Declarations — Check your variable declarations. Make sure that you have a declaration for the size variable that you expect to see. If you return a wordsize variable (255) and only have a byte-size declaration (16), it can cause all kinds of weird errors. 2. Return — Make sure that all of your subroutines have a return statement at their ends. 3. Subroutines — Do not use a “go to” line statement when you really mean a “go sub” statement. In other words, do not mix the two. This mixture may work for awhile and then come back to bite you. Believe me, I learned the hard way. 4. Subroutine Names — Name your subroutines in a way that you can easily understand what they are doing. You are coding for your own use. As much as possible, keep things legible and readable. Subroutine names such as LEFTSERVO, FORWARD, and BACK are self-descriptive and tell you immediately what the subroutine is doing.

7. Comment, Comment, Comment — You can never have too many comments in a program. I now comment my variable declarations, my subroutines, and every single line within the program, as well. I can almost guarantee that, after a while, you will forget what something does and lose many hours trying to figure out your own code. I do this all the time. In fact, there cannot be enough comments. Have a section of nothing but comments at the start of your program, as well. It is also a good place for some simple wiring codes for your hardware. For example, you can list the wire codes for your sensors in your program comments section. The first line of your program should be comments describing the program’s name and date, along with changes you have made to the program. For example, “10/15/2004 bolomark3.2.bas added in second SRF04 Sensor.” 8. Stand-Alone Programs — Keep small working examples of programs for every sensor or subroutine you use. I have separate programs for LCD, SRF04, GP2D02, motor drive, and servo, etc. When testing things, you can load this small program and test the exact item you wish without loading a huge program.

5. Variable Names — Avoid at all costs using variable names such as “I” and “1” in your code. A “1” and an “I” can look so similar that you can have a typo error and never realize it. Even worse, many on-screen fonts display these characters as identical, when they are not.

9. New Hardware — As mentioned above, when you add in new hardware, create a simple test program that only tests this new hardware. After you have the hardware working to your satisfaction, you may add the new code to your existing robot. For example, I received a new compass for Christmas. I will write a program to implement the compass and save it as compass1.0 .bas. When I am satisfied with the operation of the compass, I will copy that code into my working robot. If I ever have any problems, I can load the compass code and test only that particular piece of hardware.

6. Declarations — Keep your variables in one section and your constants in another. Alphabetize these sections so you can easily find a variable.

10. Feedback — Get whatever feedback you can when debugging or designing a robot. Debug statements are fine while the robot is connected to

your compiler, but they won’t offer much help in real-world situations. To provide feedback while not connected to the computer, use a LCD display or speaker. I use a Seetron LCD mounted on my robot and also a speaker for output. In my various subroutines, I will call the LCD or the speaker and send out status information so I know what my program is doing. You can have a simple single word on an LCD display or a simple beep sequence from the speaker to tell you where in the program your robot is operating. This is also good for finding a major error. I once even resorted to putting an LCD message just before the END statement in my program, because I thought the code was somehow jumping out of the main loop and exiting. The LCD will slow down your code somewhat and so will the speaker. When you have your robot working the way you want it to, you can comment out the LCD and speaker sounds. I also will place the version number of the program at the start of my program and display it on the LCD. This way, when your robot is in operation, you can easily tell what program is loaded at that time. Another idea I am implementing is using Morse code as feedback from a speaker. This is a bit slower, but it adds an interesting touch for output. A voice or sound chip would be the ultimate output from your robot. 11. Backup, Backup, Backup — Back up your programs using more than one method. Storing all your programs on a single hard drive is a disaster waiting to happen. Back up to a floppy, CD-ROM, another friend’s hard drive, or anywhere you can. I recommend at least once in awhile to get a hard copy printout, as well. I know it will use a lot of paper, but this will seem trivial if you lose a year’s work to a hard-drive crash. I still have printouts from the 80s when I was programming. They are always useful. 12. Ideas — Keep a separate list of ideas you have for your robot, rather than digging through your logbook trySERVO 05.2005

37

Barlow2.qxd

4/5/2005

9:29 AM

Page 38

A PRIMER FOR THE NEW ROBOTICIST ing to find them. You also can keep a wish list of hardware, as people who are designing competition robots will probably have hardware requirements to follow. 13. Reserved Names — I have been burned more than once by using a reserved name for a variable or subroutine. Many times it is not obvious what the problem is when a program compiles. This happened quite a bit to me when I transferred a few Parallax programs to the Basic Micro Atom. If you have created a new subroutine or variable and have weird problems you can’t figure out, rename that item to something that definitely cannot be a reserved word. Use something strange like “dog.” 14. Hardware or Software Errors — This may also be designated as troubleshooting, and a book could be written on this topic alone. I can only guide you in certain directions. Try to remember what you have done most recently to your robot. Read your logbook (you keep one, correct?). Go back to a previous version of a program. Go way back in some versions, and by this I mean go back a couple of major revisions and see if the robot will run on an older version of your program. Be sure your batteries are fully charged, and set up debug points within your program to find out what your variables are doing. Display your variables on a debug screen or an LCD display. Do you have a variable out of range? Can you swap the parts on your robot from one side to another? For example, move the left wheel servo to the right side. If possible, swap pins on your CPU, because maybe one pin has burned out. Run a debug session and watch all of your variables for a strange value. Is a pin bent on a connector? Use speaker output as feedback to check code sequences. Put a beep sound after sections of code, simply to see if your program is flowing properly. Do you have a hardware output problem or a hardware input problem? Is your IR generator actually producing a waveform or are

38

SERVO 05.2005

your IR receivers not detecting a waveform present? Check all connections; maybe something has come loose. This next situation seems obvious, but sometimes you’ll forget if the robot quit on its own or if it was something you did. If the robot quit on its own, then there is a good chance you had a hardware failure. Will it run for an extended period of time on an old version? Is the CPU resetting? Place some feedback as your first lines in the program, display START on your LCD, or play a recognizable tone from your speaker. If the CPU resets, why is it doing that? Check for stack overflow or unshielded motor leads. Add a larger filtering capacitor to the CPU’s power input. Add a separate battery pack to run only the CPU. Write a very simple program for your robot and run it. For example, only drive the motors in this simple program. See if the robot will keep moving for three minutes. Write a simple program to rotate the motors forward, backward, left, and right. The combination of motor changes should cause the CPU to reset if it ever is going too. Sonar detectors may draw as much as one amp when they fire. Can your battery bus supply this quick surge of amperage? Are you testing on hardwood floors, then having problems on a rug? Motors will draw more amperage on rug floors. What are your light conditions? Halogen, incandescent, and fluorescent lights will all affect IR sensors differently. Duplicate the error as closely as possible. Does the robot only fail when it detects a wall at the same angle? Write down, in sequence, everything your robot does up to the point of failure. Check your flowchart or code and try to determine how your robot came to be in this situation from what you wrote down. Ask for help! We all need help at some time, and maybe someday you can help another person and return the favor. Remember, that there is never such a thing as a stupid question.

of code producing an error? Have somebody else read the line of code or the section of software. A friend may see an error that you cannot. This is also why authors should never edit their own work. Retype the line. I don’t know how many times just retyping a command line has resolved a problem. You can put the lines side by side and not see the difference, but in actuality, there may not be a visible difference. The difference could be buried at a machine level that the application is not making available to you. Even printing out the line may not show the error.

15. Line Errors — Why is a given line

• Vdd — On Stamp and Atom micro-

Helpful Notes In recent years, I have been keeping a notebook of problems that have occurred with my designs. The following list is only some of the many notes I have kept over the years. • Test — Test your robot in all environments. What may work well on hardwood floors could be a disaster on shag carpets. • Light — Different lighting conditions and colored walls can cause major grief with sensors. • Battery — Keep your batteries fully charged when testing. Weak batteries can cause many varied problems. • Label — Place labels on all your connectors and designate them top and bottom if they do not have a KEY in the connector. • IR sensitivity — To reduce IR sensitivity, lower the frequency output to a value less than 38 kHz or install a larger resistor on the IR LED to reduce its output. A two-kilohm resistor is recommended. • Glue — Use hot glue for holding wires and battery packs. • Diodes — The short lead is negative.

Barlow2.qxd

4/7/2005

10:00 AM

Page 39

PART 2: Common Errors in Building Robots processors, Vin is unregulated, Vdd is regulated. • Pins — Unused pins should be set to Output. • LED pins — + Anode is the long lead, while cathode is the flat side. • Basic Atom will not program in Board of Education. The capacitors on Parallax Stamp serial pins must be removed. • Sharp GP2D02 outputs at values from 35,000 to 50,000. The higher the value, the closer the object. To convert to a usable value: Val02 = Val02/100 max 255 Range = 255 to val02 Range = Range/4 (in inches) The above gives a rough measurement, in inches, that is returned in the Range variable. • GP2D02 will output a maximum value when an object is closer than its minimum range of detection. • Bumper switches are a necessary evil. Even your best remote sensor design is going to fail in some situation? In this case, a mechanical bumper switch may save you endless grief.

• Wiring — Double and triple check your wiring before you power on. Ask a qualified friend to also check it if you are unclear. I once burned out two PIR sensors at $50.00 each because the manufacturer’s wiring schematic was less than intuitive. • Sockets — Use sockets for any IC or CPU in your design. Use sockets for anything that you may change frequently. • Use a socket for a fixed resistor that you may occasionally change. • Printout — Physically print out a hardcopy of your program no matter how long it is. It is much easier to debug a program when you can hold the entire program in your hands rather than scrolling up and down a window, looking for mistakes. • If you get in over your head and cannot find the error in your code, go back a major revision or two and make sure your robot is still working. It is possible you don’t have a software error, but have developed a hardware error. I went through five major revisions and scores of minor changes, and all of a sudden, my robot quit turning one direction. I went nuts going over the software, trying to find what the latest error was I had made. It turned out that

a wire had never been soldered to my circuit board; it was only poking through the solder hole! This loose wire worked fine for over a year and then quit one day, making me think I had a software problem. I made this mistake, and have since repaired over a dozen commercial electronic products with the same problem: a bad solder joint. • White baseboards will mess up a light sensor. • Motor Leads — Twist the wires of your motor leads together. This forces the magnetic fields to cancel each other out. • Mix sensor types for robust object detection. You can never have too many sensors. • Use both high µF capacitors for power-spike filtering and low µF for high-frequency spikes across the CPU power input; 1000 µF and 0.1 µF. • Separate battery packs are recommended for noise filter problems. • Use stranded wire for anything that moves. Solid-core wire can break easily. • Keep high-power and low-power wire circuits separated, if possible.

Run Cool.

Too Much Heat? Circle #102 on the Reader Service Card.

SERVO 05.2005

39

Barlow2.qxd

4/5/2005

9:32 AM

Page 40

A PRIMER FOR THE NEW ROBOTICIST • Color-code your wiring and stay consistent in all your designs: red for power, green/black for ground, yellow for signal. • Use color-coded wire for all wire runs. This makes troubleshooting much easier. • Keep all your replaceable sensors color-coded, as well. It will be easier to swap them with troubleshooting. • Use quality connectors and battery packs. I have lost tremendous amounts of time struggling with cheap connectors and battery holders. • Workbench — Maintain a large clutter-free workbench. This can make more of a difference than it may seem.

about. Function is far more important than looks. • Design for easy repair. You will be tearing your robot apart many times during the design phase. Make life easier on yourself as much as possible. • Rugged Design — Make your robot sturdy enough to handle household abuse. Almost all small motor systems can handle three to four pounds, so use that to your advantage. • Expansion — Try to think ahead for future improvements. Leave room on your circuit board for additional components, and make a large robot base. Don’t paint yourself into a corner, so to speak.

melts easily and is not recommended. •Solder all permanent wire connections. Tape, wire nuts, and other connections may come loose. • Butt Splice — Use quality butt splices and ring terminals. Cheap terminal kits will fail every time. Tug on your crimp to be sure it is tight. • Fuse — Use a fuse or circuit breaker on any high-power load circuits. Rate the fuse for only the maximum amperage expected. • Organize all your spare components into parts bins and label them.

• Replaceable battery cells are better for beginner designs than sealed battery packs. A sealed pack can lose one cell and cause many headaches.

• Pre-test — Test your sensors on a bench first and write down what they output before installing them into the robot. This will also help you program, because you will know what your sensors are actually doing.

• Salvaged verses New Parts — If in doubt, throw it out. Sometimes it does not pay trying to work with an old part from your junk bin.

• Switch — Use a separate switch for the motor and the CPU. It is handy to turn off the power to your drive motors and yet still run your CPU/sensors for testing.

• Make a portable sensor and CPU on a breadboard. Carry this around and test various surfaces in your home. Find out where you may get odd reflections.

• Beauty — The overall look of your robot should be the last item to worry

• Heat Shrink — Use quality heat shrink. Bargin store-type heat shrink

• Place yourself in your robot’s shoes. You cannot expect to program your robot to do better with sensor information than you can. If your robot only returns a single ping in a certain situation, what would you do if that was all you knew?

• Test leads — Use only quality test leads. I cannot tell you how many times a test lead has failed on me, and I thought the robot was bad.

RESOURCES • Seattle Robotics Encoder: www.seat tlerobotics.org/encoder/index.html • Battery Bus Supply: Keith Payea www.seattlerobotics.org/encoder/ feb97/powerup.html • Acroname: Good source of robot parts and sensors. www.acroname.com

Subsumption.htm • SuperDroid Robot Kits: www.superdroidrobots.com/index.htm • Tracy Allen’s BASIC Stamp Application Notes: www.emesystems.com/BS2index.htm • Zagros Robotics: www.zagrosrobotics.com

• Atom Microprocessor: www.basicmicro.com

• IC Master: http://icmaster.com

• Sensors: Brooke’s Sensors Page. www.pacificsites.com/~brooke/Sensor s.shtml#Compass

• Online Conversions: www.sciencemadesimple.com/conver sions.html

• Subsumption Architecture: www.restena.lu/convict/Jeunes/

• Seetron LCD Displays and Electronics: www.seetron.com

40

SERVO 05.2005

• Expect your robot to fail at another person’s house. I can almost guarantee it will not perform like it does at your home. This may be caused by lighting, floor material, or color of cabinets, etc. • Display the output from your sensors on your robot’s LCD screen. You can watch the output values and see why a robot may not detect an object. • Early in your design, try not to waste I/O ports. I/O ports are to be hoarded at all times. If you plan for it, you can use a multiplex circuit.

Barlow2.qxd

4/5/2005

9:33 AM

Page 41

PART 2: Common Errors in Building Robots • Do not waste memory or stack space. Do not use a word declaration when a byte will do the same job. • Multiple Sensors and Types — One thing that all roboticists find out in the long run is that the more sensors you have, the better your crash avoidance will be. These sensors should be of mixed types, as well. On my latest robot, I used four SRF04 sonars, one GP2D02 IR range sensor, six IR edge sensors, and three light sensors. The combination of all of these sensors makes a very robust platform. I also have a light sensor and a GP2D02 mounted on a rotating servo head. I can swivel this head to look for objects around the robot. Trying to make your robot crash free with a single sensor is a fruitless endeavor.

noise, use three 0.1-µF capacitors across motor leads. Tie one capacitor across both leads and attach the second and third capacitor from each terminal to the metal case of the motor. 3. Battery Bus Supply — Separate battery packs are recommended but not always necessary. There is a very good article online at Seattle Robotics (www.seattleroboics.org) called “Power Grounding and Noise Problems in Mobile Robots,” by Keith Payea. 4. IR 555 timer circuit — This generates 38 kHz for infrared. 5. I/O PIN Sharing — Always share I/O pins with two sensors.

Useful Circuits

6. IR Detection Tool Schematic — This is useful to see if your IR generator is outputting a waveform.

Over the years, I have collected these circuits from various sources. I have found them to be very handy for design and testing purposes.

7. CDS Cell — This connects to an A/D port on your CPU.

1. LM2940 Voltage Regulator — To run from a six-volt-battery pack, you must use a LM2940 voltage regulator, as a 7805 drops too much voltage. 2. Motor Noise — To prevent motor

8. Servo Test Circuit — This is useful for testing servos. 9. H-bridge Circuit — These chips may be stacked for additional amperage. 10. LED Circuit

11. Pull-up and Pull-down Circuits 12. 4051 Multiplex — Add additional I/O ports to a CPU using this chip. 13. 4052 Multiplex — Dual-channel multiplex for SRF04 Sonar. I hope this has not overwhelmed you with the many problems that may develop during a robot build. Perseverance is one of the most useful skills a roboticist may have. Use this article as a guide for your designs that you can build on. Always remember, it is just as useful to record your errors as it is to record your working designs. Mark articles in SERVO with sticky notes so you can find them in the future. Visit websites and read about other people’s designs. Your friends and other builders can supply many more tips, as well. I encourage you to keep a list of all of these hints and record them in a notebook. Above all, do not become discouraged by this challenge. Thousands of people every day around the world are designing robots, and so can you. The robot community is always willing to offer you advice and design tips. I encourage you to be willing to ask many questions of others, but above all, have fun. SV

SERVO 05.2005

41

Grau4.qxd

4/5/2005

9:38 AM

Page 42

by Steve Grau

O

ccasionally, every robot needs to get away from the grind of doing the tedious and hazardous jobs we humans assign to it. Our robot, which we’ve been developing for a few months now, is able to keep track of its location and navigate from place to place. Now, let’s program it to take a road trip, so it can have a little vacation. As a metaphor for programming our robot, let’s consider how we might go about Behavior

Trigger

Avoid running into things

Obstacle in the way

Return home

Vacation time up

Head to first stop

Haven’t gotten there yet

Head to second stop

Nothing more important to do

Table 1. Simple Behaviors. Figure 1. Class Diagram.

42

SERVO 05.2005

taking our own road trip. When we leave on a vacation, we usually have a plan in mind that includes places we want to go. Often we don’t do a lot of detailed planning, so we aren’t sure how long it will take to get to each of our destinations. We just go to as many places as time permits and then head home. As we travel, we generally follow the most direct route to our next stop. We don’t attempt to make our plans so detailed that it includes every other car, obstacle, or hazard we Priority might encounter along the way. This would require 1 information that we don’t have, and even if we could 2 obtain the information, it would take an inordinate amount of time to do the necessary planning. Instead, 3 we just leave it up to our driver to look out for (and 4 react to) hazards along the way. We will use a behavior-based control approach to program our robot to take its vacation. With behavior-based control, the robot’s control program arbitrates among a collection of simple behaviors, combining them into a more complex overall behavior that governs the robot’s actions. The key is to identify a set of simple behaviors that will combine to create the desired overall behavior. In addition, we must also identify the circumstances that trigger each simple behavior and determine the relative priority of the behaviors. Using the vacation metaphor, the four simple behaviors listed in Table 1 will allow our robot to take a road trip with two stops. Conveniently, the RoboJDE™ class

Grau4.qxd

4/5/2005

9:40 AM

Page 43

PART 4 library, which comes with the IntelliBrain™-Bot, already provides a BehaviorArbiter class and a behavior interface. We will build upon these and the classes we created in the previous articles to implement the class diagram shown in Figure 1. This will require building three new behavior classes: AvoidBehavior, ReturnHomeBehavior, and GoToBehavior. These classes will implement the behavior interface so we can use them with the BehaviorArbiter. We will also need to create a new class that we will name “vacation” that will initialize everything and plug into the function selection mechanism we created in the first article in this series.

Avoiding Collisions

Quantity

Description

Part Number

2

Sharp IR range sensor

2

Three-pin JST cable

2

Three-circuit housing

WM2801-ND

www.digikey.com

6

Crimp terminals

WM2555-ND

www.digikey.com

1

Universal crimp tool

WM9999-ND

www.digikey.com

1

Wire stripper

Hardware store

1

Phillips head screwdriver

Hardware store

2

One-inch corner braces

Hardware store

4

4/40 1/4-inch screw

Hardware store

4

4/40 washer

Hardware store

4

4/40 nut

Hardware store

Crash, bang! Our robot has just had another “fender bender,” this time with Johnny’s backpack that he dropped on the floor, as he made a beeline from the front door to the cookie jar. With all the effort we’ve put into building our object-oriented, Java-programmed, multi-threaded, re-usable software, our robot still can’t help but crash into anything dropped in its path. Imagine leaving on a vacation in your brand new car with the latest top-of-the-line navigation system. No matter how carefully you stare at the navigator’s display and follow its verbal instructions, it’s not likely you’ll get very far if you don’t look out the window to avoid objects — other cars and pedestrians — the navigation system doesn’t know about. Similarly, our robot isn’t going to be able to avoid crashing into things if it doesn’t look where it is going and steer around obstacles in its path. We will solve this problem by adding two Sharp GP2D12 infrared range sensors to our robot to enable it to see obstacles. Table 2 lists the parts and tools we’ll need to add the sensors. They are shown in Figure 2, while Figure 3 shows the IntelliBrain-Bot with the sensors attached.

GP2D12

Source www.junun.org www.junun.org

Table 2. Range Sensor Parts and Tools. By selecting the “Do Nothing” function we created in a previous article and turning the thumbwheel to view the range finder screen, we can view the sensor readings while the robot (you guessed it!) does nothing other than periodically updating the user interface. By moving an object in front of each sensor, we see that the sensors produce the highest reading (around 500) when the object is about three inches away. The reading drops as we move the object further away from the sensor. The sensor reading drops to its minimum value, near zero, once the object is about 30 inches away. We can also move the object from side to side to determine the field of view of each sensor.

AvoidBehavior Class Now that our robot can see when it’s about to collide with something, we need to add software that will allow it to react quickly to avoid a collision. The AvoidBehavior class Figure 2. Range Sensor Parts.

Testing, Testing, Testing ... The first thing we always want to do when adding new sensors is test them in isolation. If we don’t do this, our robot will undoubtedly not work as we expect, and it will be very difficult to determine the reason why. By first testing the sensors separate from the rest of the system, we will verify they work correctly and also validate (or invalidate) assumptions we made about how the sensors should work. Fortunately, we can easily test the new range sensors by adding another screen to our robot’s user interface. We will create a trivial class, RangeFinderScreen, to display the readings of the sensors on the LCD screen. The following two-line method samples the sensors and updates the display: public void update(Display display) { display.print(0, “L Range: “ + mLeftRange.sample()); display.print(1, “R Range: “ + mRightRange.sample()); }

SERVO 05.2005

43

Grau4.qxd

4/5/2005

9:41 AM

Page 44

Creating Reusable Robotic Software Components The setActive method activates or deactivates the behavior. If the behavior is inactive, it must not attempt to control the robot, but if the behavior is active, it should take control of the robot. The BehaviorArbiter decides which behavior should be active at any point in time. This method of behavior arbitration relies on the individual behaviors working cooperatively at the direction of the BehaviorArbiter to achieve the desired overall behavior. To follow this model, the AvoidBehavior class will determine if there is an obstacle ahead by sampling the range sensors in its poll method. If the behavior has been activated, it must take control and avoid a collision with the object it sensed. We will compare the sensor readings to a threshold value to determine if there is an object that needs to be avoided. If the reading of either sensor is higher than the threshold, the behavior will want control of the robot. We will use the following code to implement this: Figure 3. IntelliBrain Bot With Range Sensors Attached. will do this. It will have the highest priority behavior, so if a collision is imminent, it will be given control of the robot so it can take evasive action. Each behavior must implement the behavior interface so it can interface with the BehaviorArbiter class. The behavior interface defines two methods:

public boolean poll() { boolean wantControl = false; int leftValue = mLeftRange.sample(); int rightValue = mRightRange.sample(); if ((leftValue > mThreshold) || (rightValue > mThreshold)) wantControl = true; if (mIsActive) { // take control : } return wantControl;

public boolean poll(); public void setActive(boolean isActive);

The poll method is called periodically by the BehaviorArbiter to poll whether the behavior wants control of the robot. If the behavior has previously been activated, the behavior may also issue control commands to the robot in the poll method. The poll method returns true if the behavior wants control of the robot. Figure 4. Collision Avoidance.

}

If the behavior was previously activated, the poll method will also take control of the robot. There are many possibilities as to how the software can go about navigating the robot around an object. We will simply program the robot to turn a pre-defined angle to head away from the object and drive for a pre-defined period of time, as shown in Figure 4. The following is the code that will execute when the behavior is active (below the “take control” comment in the previous code snippet): if (wantControl) { // object ahead, turn away Pose pose = mLocalizer.getPose(); if (leftValue > rightValue) mHeading = pose.theta - mTurnAmount; else mHeading = pose.theta + mTurnAmount; mNavigator.go(mHeading); mHoldUntil = System.currentTimeMillis() + mHoldTime; } else if (System.currentTimeMillis() < mHoldUntil) { // object out of view, continue driving away wantControl = true; mNavigator.go(mHeading); } else mNavigator.stop();

44

SERVO 05.2005

Grau4.qxd

4/5/2005

9:42 AM

Page 45

PART 4 If the object is in view, as indicated when wantControl is true, the code queries the localizer to get the current heading, then chooses a new direction to head in. The robot will turn clockwise if the object is closer to the left sensor or counterclockwise if it is closer to the right sensor. If the object is no longer in view, but the behavior’s hold timer hasn’t expired, the robot will continue in the same direction. Otherwise, it will stop and wait for another behavior to assume control. Note, the navigator’s go method is asynchronous, so it sets a new heading and returns immediately. The navigator, which is running on a different thread, will continue to drive the robot in the specified direction until told otherwise.

Listen to Your Navigator! The GoToBehavior class must implement the behavior interface just as the AvoidBehavior class does. Fortunately, the navigator provides the moveTo method which provides just what GoToBehavior requires to control the robot. The GoToBehavior class’ poll method can just tell the navigator where it wants to go and leave it up to the navigator to do the rest. However, the poll method cannot wait around while the robot travels to its destination; otherwise, the BehaviorArbiter would not continue to run, the AvoidBehavior class’ poll method would not execute, and the robot would run into obstacles instead of going around them. We must develop an alternative way for the navigator to notify the GoToBehavior when the moveTo operation is complete or has been cancelled. We will solve this problem by extending the navigator interface and adding another interface, NavigatorListener. The NavigatorListener interface simply needs to define a single method that gets called when a navigation command completes or is cancelled, as follows: public interface NavigatorListener { public void navigationOperationTerminated(boolean completed); }

Figure 5. Path With No Obstacles. public void moveTo(float x, float y, NavigatorListener listener); public void turnTo(float radians, NavigatorListener listener);

Finally, we must implement these two methods in the DifferentialDriveNavigator class, a class we developed in Part 3 of this series. These are minor changes, so we won’t go into the details here. You can learn the details by reviewing the source code, which is available online (see Resources). Now we have everything we need to implement the GoToBehavior class. The essence of the GoToBehavior class is contained in two methods mentioned, poll and navigationOperationTerminated. As it turns out, these methods are trivial: public boolean poll() { if (mCompleted) return false; if (mIsActive) mNavigator.moveTo(mDestinationX, mDestinationY, this); return true; } public void navigationOperationTerminated(boolean completed) { mCompleted = completed; }

Figure 6. Path With Obstacles.

The “completed” parameter that is in the navigationOperationTerminated method will be true if the operation completed and false if it was terminated before it completed. The GoToBehavior will listen to the navigator by implementing the NavigatorListener interface. This will allow it to be notified of the completion or cancellation of the commands it issues to the navigator. We must also extend the navigator interface to provide a mechanism to tell the navigator which listener to call. We will add the following two variants of the moveTo and turnTo methods for this purpose: SERVO 05.2005

45

Grau4.qxd

4/5/2005

9:43 AM

Page 46

Creating Reusable Robotic Software Components The “this” parameter in the call to moveTo tells the navigator that the object calling the moveTo method — an instance of the GoToBehavior class — is the object whose navigationOperationTerminated method should be called when the operation completes or is cancelled.

objects get created and the BehaviorArbiter object gets initialized: public Vacation(Localizer localizer, Navigator navigator, AnalogInput leftRange, AnalogInput rightRange, int priority) {

Home Beckons ... Finally, to complete our collection of simple behaviors, we must implement the ReturnHomeBehavior class. This class is similar to the GoToBehavior, except it doesn’t ask for control of the robot until after it is time to head home and, after it completes the trip home, it terminates the program by calling System.exit: public boolean poll() { if (System.currentTimeMillis() < mReturnHomeTime) return false; if (mIsActive) mNavigator.moveTo(0.0f, 0.0f, this); return true; } public void navigationOperationTerminated(boolean completed) { if (completed) System.exit(0); }

Road Trip! So now we have almost everything we need for our robot to take a road trip. All we need to do still is create a class to tie the behaviors together and plug the new vacation function into the function list in the user interface. The vacation class will do this. All of the interesting code in this class is in the constructor, which is where the behavior

RESOURCES RidgeWarrior II Source Code www.ridgesoft.com/articles/ridgewarriorii/ridge warriorii.htm IntelliBrain-Bot Kit www.ridgesoft.com/intellibrainbot/intellibrainbot.htm WheelWatcher WW-01 Quadrature Encoders www.nubotics.com Sharp GP2D12 Sensors www.junun.org Connector Hardware and Tools www.digikey.com

46

SERVO 05.2005

Behavior behaviors[] = new Behavior[] { new AvoidBehavior(localizer, navigator, leftRange, rightRange, 200, 0.7f, 3000), new ReturnHomeBehavior(navigator, 45), new GoToBehavior(navigator, 60.0f, 0.0f), new GoToBehavior(navigator, 30.0f, 30.0f), }; mArbiter = new BehaviorArbiter(behaviors, 200, null); mArbiter.setPriority(priority); }

Here we create a list of four behaviors in priority order. We pass a reference to the navigator object to each behavior. The AvoidBehavior also requires references to the localizer and the left and right range sensors. We set the AvoidBehavior object’s obstacle detection threshold at 200, which will cause the behavior to activate if an obstacle is within approximately 11 inches of either range sensor. The final two parameters to the AvoidBehavior constructor control the turn angle, 0.7 radians (around 40 degrees), and the hold time when driving away, 3,000 milliseconds. The ReturnHomeBehavior constructor’s second parameter is the number of seconds the robot is allowed to travel before it returns home. We use two instances of the GoToBehavior to define the two destinations we want the robot to travel to — (60, 0) and (30, 30). The order in which the GoToBehavior objects are placed on the behavior list is the order in which the robot will go to the particular destinations. Once the first GoToBehavior object on the list has been satisfied by the robot reaching the behavior’s destination, the behavior will cease to request control of the robot. Hence, the next GoToBehavior on the list will gain control, and the robot will head toward the next destination. Lastly, we update the list of functions in the RidgeWarriorII class to add the vacation function: Runnable functions[] = new Runnable[] { new Vacation(localizer, navigator, leftRange, rightRange, Thread.MAX_PRIORITY - 3), : }

Testing and Results With the behaviors we’ve added, our robot’s vacation plans are to visit two destinations, as shown in Figure 5. Testing reveals the robot does indeed follow a triangular path, though it does tend to drift from the path as localization errors accumulate. Equipping the robot

Grau4.qxd

4/5/2005

9:43 AM

Page 47

PART 4 with WheelWatcher encoders (see Part 2 of this series) significantly improves the accuracy with which it follows the plan. When unforeseen obstacles appear in the robot’s path, as depicted in Figure 6, it is highly effective at avoiding them. However, the robot does tend to drift further from its planned course with the addition of more obstacles it has to avoid. Adding more obstacles also makes it more difficult for the robot to find an unobstructed path through them. The placements of multiple objects, as well as the threshold and hold-time parameters to the AvoidBehavior, affect the robot’s ability to find the shortest path to its next vacation destination. Setting the object detection threshold too low causes the robot to be hyper-sensitive, which will make it react to objects that are far away. This makes it more difficult for the robot to find the gaps between obstacles and successfully navigate through them. If there are multiple obstacles in close proximity, the robot is more likely to take a circuitous path around them rather than a shorter path going between them.

Conclusion

basic behavior-based controls to our robot. By developing a few simple behaviors, we were able to program the robot to carry out its previously planned vacation while avoiding obstacles that were not included in the plan. These classes are not tied to the specific mechanical characteristics of the robot and therefore can be re-used to control other robots. In addition, we were able to make use of several pre-existing re-usable software components — Behavior and BehaviorArbiter — from the class library included with the IntelliBrain robotics controller. The behavior-based control system will enable us, in the end, to create a more sophisticated overall behavior for our robot by adding more sensors and more behaviors. So, stay tuned, as we will continue to build upon the foundation of re-usable software that we have developed thus far ... SV

ABOUT THE AUTHOR Steve Grau has been developing software for over 20 years. He is the founder of RidgeSoft, LLC, and the author of the RoboJDE, a Java-enabled robotics software development environment.

We have developed several new Java classes that added

Yes! The internet’s first and best robotics source has been purchased by Jameco Electronics, and we’re committed to greatly expanding the product line quickly!

We’re Back!

Each month we’ll add hundreds more new robotics products. Plus we’ll continue to supply favorites like Muscle Wire®, the OctoBot Survivor™ robot and more. Be sure to visit us online at

www.RobotStore.com Robotic Arm Kit (No. 4-523)

or call

1.800.374.5764 Twin Motor Gearbox Kit (No. 3-709)

...and see what’s changed!

For All Your Robotic Needs! Circle #111 on the Reader Service Card.

SERVO 05.2005

47

Geer.qxd

4/5/2005

11:39 AM

Page 48

THE LOW-DOWN: WEIGHT: 85 to 120 pounds MAXIMUM SPEED: 5.2 mph MAXIMUM RUN TIME: 4 hours REMOTE OPERATING DISTANCE: Up to 1/2 mile

by David Geer SWORDS (Special Weapons Observation Reconnaissance Direct-action System) come with M16s, M240s, M249s, Barrett 50 calibers, 40 mm grenade launchers, or M202 anti-tank rocket systems. Grenade launchers come with six barrels. The bots can also be armored and equipped with sensors for heat, gas, chemicals, and radiation to know when they are in environments that might be a danger to others or even themselves.

1. Zoom camera 2. Microphone 3. Night-vision camera 4. Lithium-ion battery 5. Antennas 6. Machine gun 7. Gunsight camera 8. Ammo can 9. Rear camera 10. Heavy-duty tracks

48

SERVO 05.2005

Geer.qxd

4/5/2005

11:41 AM

Page 49

U

S troops will carry, wield, and control these SWORDs as the soldiers of old did with their less technical weaponry, insinuating them into tight spots with the finesse of a master fencing instructor. That’s about as much as they have in common with their fencing counterpart. These SWORDs are small tank-like robotic defenders with more than one cutting edge. The SWORD robot is one of the latest offspring of the TALON military, police, and emergency rescue robot line of products developed by FosterMiller, in Waltham, MA.

technology like the SWORD so that a full third of our ground combat vehicles will be unmanned as early as 2015, a mere 10 years away. As we’ll see with the SWORD — just one of the iterations of the TALON line of robots — not all UMVs are big. But, if we were to judge military fitness and tenacity based on size alone, neither the SWORD nor any of the TALONs would qualify. In some cases, the SWORD wouldn’t even make the fighting weight at 85 to 120 pounds. But like the law in Walking Tall, it’s really the size of the stick and the force

duty tracks and a lithium-ion battery for power come standard.

Arsenal SWORDS come with M16s, M240s, M249s, Barrett 50 calibers, 40 mm grenade launchers, or M202 antitank rocket systems. Grenade launchers come with six barrels for six times the effectiveness. The bots can also be armored and equipped with sensors for heat, gas, chemicals, and radiation. This allows them to know when they are in environments that might be a

Our soldiers don’t carry the SWORD for nothing! There is a move away from manned vehicles and aircraft to unmanned vehicles (UMVs) and unmanned air vehicles (UAVs) across the entire military. In the wave of this trend, robotic attack vehicles are being employed, as unmanned efforts are expected to save lives and lower the general costs of waging war, while making combat more effective. Emanating from the President, the Senate, and the Pentagon is a mandate in the form of the Defense Authorization Bill for Unmanned Vehicles. This bill requires that our armed forces field unmanned, radio-controlled

behind it rather than the size of the bot (although neither The Rock nor Joe Don Baker were small fries). Our fighting men and women can utilize this fighting mobile war robot equipped with a zoom camera, microphone, antennas, gun sight camera, machine gun, and ammo can. The SWORD can be outfitted with numerous weapons, configurations, and as many as seven cameras in combinations such as night vision, wideangle, thermal, and zoom abilities. Other options include additional front and rear cameras, while heavy-

danger to others and even themselves. Even though they are expendable, we don’t want to allow them to be blown up every chance they get! These little warriors games are waged using an Operator Control Unit (OCU) complete with split-screen viewing, wireless control, and a joystick. Though the SWORD’s main job will be reconnaissance missions, it is loaded for bear or anyone else that stands in its way. Remote operation makes it possible to put up to a half mile between our troops and land-based enemy forces. It can run for four hours with a

Other TALONs and Their Talents SWAT Team TALONs Move to the Frontline in Protecting the Public! Special Weapons and Tactics (SWAT) is about controlling difficult policing situations and emergencies. It’s not about losing the lives of SWAT team members or innocent citizens. TALONs help mitigate the risks involved in maintaining control and producing positive outcomes. For this scenario, TALONs come equipped to do recon on the frontlines while SWAT members remain secure. TALONs come with up to 80 different payloads and attachments for countless configurations for any field situation. TALONs fulfill SWAT’s needs for nighttime surveillance, two-way communications, and a variety of environmental sensors. TALONs can break down doors, loft smoke and other grenades, and maneuver over almost any domestic terrain. These rugged, tracked anti-terror machines climb stairs, endure threatening environments, and respond with deadly force when there’s just no other way.

The robots can be transported in the trunk of any SWAT vehicle and can be controlled wirelessly from a safe distance with a handheld or wearable RC unit. They cannot only be carried by car, but by backpack as well. These tough TALONs make great search and rescue recruits, too. Whether responding to fires, emergencies, or search and rescue missions, the TALON can stand the heat, seek the victims, and save the day. Initial site assessments are enabled safely and quickly with these speedy bots that can roll with the speed of a human being at a full running gate. TALONs go safely into confinements like holes in the ground, walls, and burning buildings to determine the best recourse for victims and property. In many cases, it has the ability to also carry them out. These nearly unstoppable heroes can even swim underwater to get to where they’re needed most.

SERVO 05.2005

49

Geer.qxd

4/5/2005

11:42 AM

Page 50

and Afghanistan. The SWORDS are expected to be on the ground, in action, and in charge in coming months (if not by the publication of this article). SWORDS are precision perfect marksmen that fearlessly advance on the enemy, knowing nothing of retreat unless their operators decide to move them in a different direction. SWORDS are light and easily carried from combat site to combat site, and their comparably miniscule statures make them hard targets for unfriendly This Operator Control Unit (OCU) is the SWORD’s fire. SWORDS can go most anywireless remote control fitted with a hard-shell where a soldier can, with as case. Notice the antenna, numerous controls for much speed. driving and manipulating the SWORD combat SWORDS can explore caves robot, and the multiple split screens for viewing everything the robot’s cameras pick up. and territory where the enemy may be lying in wait for our max traveling velocity of 5.2 mph. At a fighting men and women. This mobile cost of around $230,000.00 per unit, warrior is increasing in capacity and that’s not too pricey (as government function while decreasing in cost. spending goes). SWORDS need little care and no trainThe military is going lighter and ing (but their operators do). more powerful. It’s going meaner as Though hundreds of billions of dolwell as leaner, employing the Small lars are being poured into a project Mobile Weapons Systems (SMWS). called the Future Combat Systems projThese TALONS and the SWORD are the ect (FCS), the SWORD doesn’t fall ground patrol answer to what we’ve under its umbrella, according to seen in the way of UAVs at work in Iraq Cynthia Black of Foster-Miller.

Foster-Miller, Robots, and Nanotechnology Foster-Miller is a nanotechnology firm as well as a robotics vendor. Small robots are just one of their many areas of expertise. With reference to SWORDS, however, the rate of improvement and miniaturization of various technologies affects the speed at which they develop and grow (or shrink). I know Moore’s Law in relation to the size and speed of computer chips and their rate of improvement over previous models (technology). Basically, Moore’s Law (coined by Gordon Moore who formed Intel) has reliably stated that the number of microcomponents that can be placed in a microchip at the lowest manufacturing cost doubles every 18 months. Computer chips are certainly a factor in smaller, smarter, and deadlier SWORDs and combat robots. Closer to the point, nanotechnology is getting smaller, cheaper, and more functional at a rate constrained by little more than the amount of funding applied to it. Case in point, SWORDS are now manufacturable at little more than half the cost of the production of the first models. In so far as smallness is considered as an advantage, they can certainly go much smaller as they grow more intelligent, precise, and overpowering. Though the company wouldn’t discuss specific materials that go into SWORDs, Foster-Miller is a leader in advanced materials discovery. You can be sure that it’s hardly mere steel that enables these virtually unstoppable bots to charge on in the face of attacks that would end a flesh and blood combatant’s military career. SV

Resources 1. Foster-Miller, SWORD vendor www.foster-miller.com/ 2. SWORD (a.k.a., Weaponized Talon) data sheet www.foster-miller.com/literature/ documents/Weaponized_Talon.pdf 3. Other Foster-Miller robotics technologies www.foster-miller.com/t_r_military/ relatedprojects.htm

50

SERVO 05.2005

Circle #63 on the Reader Service Card.

Davis2.qxd

4/5/2005

9:46 AM

Page 51

by Lester “Ringo” Davis Last month, I left off with the CNC machine mostly assembled but not moving under any type of control. This month, I’ll talk about the steps needed to cut out a simple part. This will include the electronics needed to interface the steppers to the computer and the software to drive them. he cutting tool you decide to use will depend on how fast you want to cut, how tough the material is that you want to cut (i.e., plastic or metal), and how much you want to spend. Several options are a Dremel tool, a RotoZip tool, or a Porter Cable motor. I’m starting off with a Dremel because it is the easiest, cheapest, and available everywhere. I made a couple brackets to hold the Dremel as shown in Figure 1. The top hole was cut to fit exactly, and the bottom hole was slightly larger to allow the tool to be easily inserted. The bracket is then tightened to hold the tool securely. When it comes to interfacing steppers, there are a lot of options. You can buy controller boards from many sites on the Web, you can build your own board using a stepper motor controller chip, or you can build one out of various parts. Since the purpose of building this CNC machine was to do it all myself, I decided to go for the last option and build the board out of various parts. While I was doing some research on the Web, I found a forum on CNCZone.com, which turned out to be a great source of info on boards, as well as what software to start with. Since I’m a fan of Eagle (www.Cadsoftusa.com) for board schematics and layout, I looked for boards that have already been designed. I found one and downloaded the file. The file is called OSuni-3(317).sch, and if you find the designer, thank him for me. A picture of the completed board is shown in Figure 2, while the schematic is shown in Figure 3. As you can see, the schematic is not very complicated. The printer port takes step and direction signals from

T

the PC and uses a little logic and some flip flops to turn on the transistors for the steppers. I’m using Uni-polar stepper motors, which means that the current only travels in one direction. As a result, I only need four transistors for each stepper. Bi-polar steppers change the direction of the current in a push-pull fashion. This gives them more torque but makes them a little more complicated to control. One thing to mention is that the four transistors are turned on in a sequence. If the wires from the steppers are in the incorrect order, the stepFIGURE 1. Closeup of machine cutting.

SERVO 05.2005

51

Davis2.qxd

4/7/2005

8:43 AM

Page 52

A Hobby CNC Milling Machine jumpers to allow the direction to be inverted in case the software you use does not allow this. I’m using a five-volt, 30-amp power supply purchased from a local supplier. This is overkill on the amperage side of things, since each stepper only needs about two amps. Better safe than sorry. At this point, the steppers are spinning and the parts of the CNC machine are moving like they should, so it is time to try to do something useful. On the software side of the project, there are lots of options. There are three different pieces of the software puzzle that must be put together to get everything to work. On the highest level, there is the CAD program. This is a drawing program that you use to draw the parts you want to cut out. Then there is the CAM program that takes the CAD drawing and generates the path the tool will take while cutting. The CAM software generates a list of instructions called G-Code. The lowest level of software is the G-Code interpreter. This reads the list of instructions and sends out the correct pulses to the stepper controller board. You could actually only use the interpreter and write G-Code by hand, but that would not be fun or easy. I looked around for software I could demo to test the machine, and there is plenty of stuff out there. Experiment

FIGURE 2. Stepper interface board. pers will not turn but just dance back and forth instead. It takes a little experimentation to get the order correct. I figured out the order by using a signal generator set to send out a pulse of about four hertz. I tried different combinations until the stepper started to spin. The board also has

FIGURE 3. Stepper interface schematic. VDD

IK

3.1K

R26

Ik XDIR

INOUT

C2 ADJ IC2 .1uf LM317

C1 C3 .1uf .1uf

C8 .1uf

C7 10uf

74HC14N

C11 220p

JP3 1 2 Dir

GND

12 13

e

8 9

e

IC3D 11

e

4030N IC3C 10

4030N GND

4030N

10k

VDD 1k YDIR

R19 1k R22 1k R25 1k

R18 1k R21 1k R24 1k

R17 1k R20 1k R23 1k

1 2 3 4 5 6 7 8 9 10

GND

12 13

R1 JP1 1 2

8 9

Dir

IC4D

e 11 e

5 6

e

4030N IC4C 10

IC4B 4 4030N GND

1k

R13 10k R8

VDD

13 C9 220p

4030N

GND 10k

ZDIR

R9 Limit Switches

5 C10 220p

IC1F

6

74HC14N

1 2

Dir

GND

e

IC4A 3 4030N

VDD

JP2 1 2

IC5B 8 S Q 13 9 D 11 CLK 10 R Q\ 12 4013N GND

12 13

e

8 9

e

IC6D 11 4030N IC6C 10 4030N

5 6

e

IC6B 4 4030N GND

IC7A 6 S Q 1 5 D 3 CLK 4 R Q\ 2 4013N

1k

R15 10k R16

A larger, printable, PDF copy of this schematic can be found on our website at www.servomagazine.com

52

SERVO 05.2005

9 C12 220p GND

IC1C

1 2 8

S6-2

S6-1

Q9 IRFZ44

S3-2

Q4 IRFZ44

Q3 IRFZ44

S3-1 Y Axis S2-2

S2-1

Q1 IRFZ44 GND

S5-2

Q8 IRFZ44

Q7 IRFZ44

S5-1 Z Axis

Q6 IRFZ44

GND

VDD

ZSTEP

S7-1 Q11 IRFZ44 X Axis

Q2 IRFZ44

IC1A 12 74HC14N

S7-2

Q12 IRFZ44

GND IC5A 6 S Q 1 5 D 3 CLK 4 R Q\ 2 4013N

GND

VDD

JP4

GND

GND

47k

VDD

74HC14N

C5 220p

R14

GND

IC1B 10

GND

YSTEP

1k

LED2 PWR

Logic Probe

1 2 3 XSTEP 4 5 YDIR 6 YSTEP 7 8 ZDIR 9 ZSTEP 10 11 12 13

IC3A 3 4030N

VDD

11

XDIR

10K

14 15 16 17 18 19 20 21 22 23 24 25

10k R7

LPT

e

IC8B 8 S Q 13 9 D 11 CLK 10 R Q\ 12 4013N

GND

R2

R28 330

D5 D2

R30 Q13 2N3904

1 2

IC1E 4 74HC14N

C4 220p

R12

VDD

120K

3

R6

IC8A Q 1 S D CLK R Q\ 2 4013N

Q10 IRFZ44

47k

1k XSTEP

7 VSS

7 VSS

7 VSS

7 VSS

7 VSS

7 VSS

7 GND

IC1P IC7P IC5P IC8P IC3P IC4P IC6P

6 5 3 4

IC3B 4

GND

R11

14 VDD

14 VDD

14 VDD

14 VDD

14 VDD

14 VDD

14 VCC

R3

330

5V

GND

LED1 PWR

IC1D 2

5 6

VDD

GND

PROBE

1

R5

GND

R29

R4 10k

R27

+V S1-2 Power + C6 GND S1-1 10uf

R10

VDD

47k

VDD

e

IC6A 3 4030N

8 9 11 10

74HC14N GND

IC7B Q 13 S D CLK R Q\ 12 4013N

Q5 IRFZ44

GND

S4-2

S4-1

Davis2.qxd

4/5/2005

9:50 AM

Page 53

PART 2 and see what you like best. I settled on Mach2 from www.artofcnc.ca/prod uct.html as the G-Code interpreter and Bobcad from www.bobcad.com/ for the CAD/CAM solution. BobCad has both CAD and CAM in one package which is convenient. It will also import files form other CAD packages as well, like Autocad, so it will work with whatever CAD software you like. I started with Mach2. After installation of the software, it is imperative that you reboot for everything to work properly. The first thing you must do is go into the configure menu and set the correct port pins. This is where you tell the software which printer port pin is assigned to X-step, X-direction, and the same pins for the Y and Z directions. You also need to tell the software how many steps per unit your machine has. This means how many pulses do you send out to move, and this can be configured in inches or metric units (mm). My machine uses steppers that have 200 steps per revolution and a lead screw that has 10 turns per inch. This means that it takes 2,000 steps to move each axis one inch, or one step to move each axis 0.0005 inches. Not too bad for a homemade machine. If you set this up incorrectly, the parts you cut out will be the wrong size, either too big or too small. The last step is to set the rate at which the stepper will move. The way I tested this was to pick a speed, then “jog” the machine to see if it moves correctly. You can jog yours by using the arrow keys on the keyboard and the page up/down buttons. Pressing the left arrow, for example, should move the cutting head to the left. If the head moves the opposite direction, then you can go into configure and reverse the motor directions. If the motors make noise but don’t move or move sporadically, then you may have the rate set too high. Lower it and try again. I ran into a problem here. As I said previously, I’m using a five-volt supply because my motors are rated at five volts. Because of this, I have to use a very slow feed rate in order to not miss any steps. The solution to this problem is to use a higher voltage on the steppers, which would allow the steppers to move faster, then the feed rate can be increased. The problem with this is that the motors will get hot if the voltage is too high. There are a couple solutions to this problem, as well. One is to use a “chopper” board that pulses the voltage to the steppers, and the

FIGURE 4. BobCad screenshot. other is to use large wattage-ballast resistors in line with the motors. The chopper is definitely the more elegant solution and the one I’ll be switching to in the future. Once you have everything set up and working, you can drive the cutting head around with the jog command and cut simple shapes like squares. But that is not what we set out to do. Start up BobCad, draw out some shapes, and generate some G-Codes. I don’t have room here to go into detail, but you can quickly figure out how to draw lines, arcs, cirFIGURE 5. Mach2 screenshot.

SERVO 05.2005

53

Davis2.qxd

4/5/2005

9:51 AM

Page 54

A Hobby CNC Milling Machine

FIGURE 7. After the cuts.

FIGURE 6. Cutting the part.

cles, and whatever else you need. After you draw something, you can select a part of the drawing and click the icon to generate the G-Code. You will see a list of the code generated, and there is an example of the BobCad screen in Figure 4. After the G-Code is generated in Bobcad, you can then load it into Mach2 and start the cutting process. I wanted to make sure the part came out correctly, so instead of using something I just drew, I used a drawing from an existing product. I contacted Jason from www.RoboticsConnection.com

D e s k to p C N C S o lu tio n s D e s k C N C

3 D

C A D /C A M

im s r v .c o m

S te p a n d d ire c tio n s e rv o d riv e s , 5 a m p G lo b e p m d c s e rv o m o to rs w ith e n c o d D e s k C N C c o n tro lle r a n d s o ftw a re , (M C N C C o m p o n e n t k its a n d a s s e m b le d S u rfa c e s c a n n in g p ro b e a n d P o w e r s u

I M S e r v ic e

P .O . B o x 1 4 2 , N e w H u d s o n , M I 4 8 1 6 5

V o ic e : 8 8 8 -4 5 1 -1 6 7 0 o r : 2 4 8 -4 8 6 -3 6 0 0

54

SERVO 05.2005

X T

v e c to r

3 e r S sy

s

0 v d c

-W in d o w s ) s te m s p p ly k its

FIGURE 8. The finished part.

and he gave me a file for a part used on his R1 robots. I imported the G-Code into Mach 2 and could see the tool path on the screen. A screenshot is shown in Figure 5. This is neat because you can see if the tool is going to cut exactly what you want. I decided to try out the machine by cutting a piece of expanded PVC. I first mounted a piece of high-density fiberboard to the machine as a backing board and then the PVC on top of that. The reason for this is so, when the cutter goes through the material, it does not cut into the machine. I jogged the cutter to the center of my material and used the “zero axis” button to set everything at zero. Then I started the program and watched the magic happen. The material I used was fairly thin, so it bounced a little. I held it down while it cut to smooth it out. I would not recommend doing this, as the cutter could easily slice a finger, but I really wanted to get a good first cut (see Figure 6). The cutting was slow because of my five-volt supply, but after a few minutes the process was done. The part came out really nice for a first try, and you can see where it cut into the backing board in Figure 7. The final part is shown in Figure 8. So that is the complete story of my first CNC part. There are several things I still need to do. I need to get a higher voltage supply and a chopper controller board, so I can use a higher feed rate to get things cut quicker. I also need to decide how I will fasten down the material and backing board to the machine for future parts. For this first experiment, you can see that I used the old standby, duct tape. I think, in the future, the backing material will bolt onto the machine, and the material to be cut will clamp onto the backing board. A light built into the machine and a blower or vacuum will also make life easier. For making prototype parts, engraving, or hobby stuff, this machine will work great. It is probably not stiff enough for production runs, but then again, it is made of plastic. The schematics for the stepper controller are available on the SERVO website (www.servomagazine.com) in both Eagle and PDF formats. Good luck and have fun. SV

ShowcaseMay05.qxd

4/5/2005

11:28 AM

Page 55

Building Blocks for Robotics THOUSANDS OF ELECTRONIC

PA R T S A N D S U P P L I E S

VISIT OUR ONLINE STORE AT

www.allelectronics.com WALL TRANSFORMERS, ALARMS, FUSES, CABLE TIES, RELAYS, OPTO ELECTRONICS, KNOBS, VIDEO ACCESSORIES, SIRENS, SOLDER ACCESSORIES, MOTORS, DIODES, HEAT SINKS, CAPACITORS, CHOKES, TOOLS, FASTENERS, TERMINAL STRIPS, CRIMP CONNECTORS, L.E.D.S., DISPLAYS, FANS, BREADBOARDS, RESISTORS, SOLAR CELLS, BUZZERS, BATTERIES, MAGNETS, CAMERAS, DC-DC CONVERTERS, HEADPHONES, LAMPS, PANEL METERS, SWITCHES, SPEAKERS, PELTIER DEVICES, and much more....

• unique smart servos • controllers & software • sensors

O R D E R TO L L F R E E

Complete kits starting at $70

1-800-826-5432

www.garage-technologies.com

Ask for our FREE 96 page catalog

Robotics Showcase Machine It Yourself & Save...Guaranteed! Tired of PAYING for Machining?

Put a COMPLETE MACHINE SHOP on Your Bench Top!

8lÛCYkl›ÛCgoÛ[gklÛ ]f[g\]jkÛ^gjÛ eglgjkÛ¬Ûk]jngk›

Now 7 Models! • 3 Tools in 1 – Lathe, Mill Drill • Versatile – Machine Metals, Plastic, Mo re • Precise – Built to tolerances up to 0.0005 inc h • CNC Compatible – Models ma nu factured to easily adapt CNC systems • EASY to Use – Full Instructions & Lifetime Tech Support

And ONLY the Smithy is... • GUARANTEED to Pay for Itself or Your Money Back!

Get Your FREE FACT KIT!

Call Today 1-80 0-476-4849 Ask for operator SER

N`]]dNYl[`]j

KD

ÝÛ NJ•Û?al][Û¬Û?gZZa[gÛk]jngkÛ Yf\ÛeYfqÛJgdYjZgla[kÛeglgjk ÝÛ Lk]kÛklYf\Yj\Ûo`]]dk ÝÛ ;]Y\Ûj][cgfaf_•Ûg\ge]ljq•ÛklYddÛ \]l][lagf•Û[dgk]\¤dgghÛ[gfljgd KD

ooofmZgla[k[ge SERVO 05.2005

55

Prochnow.qxd

4/5/2005

10:49 AM

Page 56

How to Add an LCD Display to Boe-Bot for Less Than $20.00! by Dave Prochnow PURE MARKETING GENIUS — That’s how we should view selling the Boe-BotTM through RadioShack® stores (Parallax, Inc.; www.parallax.com). Never before has such a powerful and programmable robot been so universally accessible to anyone with an interest in robotics. Likewise, this marketing venture has opened robotics up to a whole new audience. And this new group of fledgling robot owners can breathe new life into robotics.

A

s a devout reader of SERVO, you are acutely aware that robots and robotics are big news, but they are only now entering the mainstream public’s radar screen. Yes, iRobot’s Roomba Robotic Floorvac remote vacuum cleaning system and the WowWee Ltd Robosapien scored big in Christmas 2004 sales (one million and 1.5 million FIGURE 1. A solderless breadboard, two picture frame hangers, and four units sold, respec4-40 x 1/2-inch machine screws are all tively), but it is the that you need for mounting the compact Boe-Bot LCDBug on your Boe-Bot.

56

that will win the heart and minds of students, hobbyists, and high-tech tinkerers. One area where these robotic newbies might have a problem is in getting some sort of “familiar” visual feedback from the Boe-Bot. As many of us know all too well, a flashing light emitting diode (LED) ain’t going to hack it. More specifically, beginning users need a display that can visually convey some of the robot’s internal “brain” information in a meaningful and verbose manner. Unfortunately, this type of display has typically been rather costly and beyond the means of most FIGURE 2. Attach the angle hangers to the front beginners; especially after standoff screws of the Boe-Bot. spending nearly $200.00 for a robot. Yes, wiring and programming a liquid crystal display (LCD) unit is possible (see SERVO, January and February 2005; “Rubberbands and Bailing Wire,” by Jack Buffington). This type of advanced circuit construction is generally impractical for beginning robot builders, however. Likewise, there is a significant time investment that is necessary for adding this type of project to a Boe-

SERVO 05.2005

Prochnow.qxd

4/5/2005

10:53 AM

Page 57

Bot. What a beginner really needs is a low-cost, alphanumeric LCD unit that can be readily “plugged” into the Boe-Bot’s breadboard so it works … the first time. No debugging, no soldering, no programming; just plug it in and display. There is one other important factor that must characterize this LCD unit. It has to be inexpensive. While the Parallax LCD Terminal Application Module (#29121) can be installed on the Boe-Bot, the $39.00 price tag is a little too hefty for those users who are looking for a simple display (sans the terminal capability). For about half the price of this AppMod, Boe-Bot owners can find the ideal answer from BG Micro (www.bgmicro.com). Known as the LCDBug, this inexpensive two-line by eightcharacter display is a terrific visual interface companion to the Boe-Bot. Housed on a standard 20-pin IC socket header, the LCDBug consumes five volts of power, utilizes an Atmel ATtiny26 microcontroller for providing the LCD firmware, and requires only one serial output pin from the Boe-Bot. Therefore, with just a simple three-pin connection and a couple of lines of PBASIC, virtually anyone can have a great robot display for less than $20.00. There is another LCD unit with a similar insect-like name that initially looks like a worthy competitor to the LCDBug. The AVR Butterfly from Atmel Corporation (www.atmel.com) does contain some features that are similar to those of the LCDBug (see “Bug versus Butterfly” sidebar), but it has two extremely significant differences. First, the AVR Butterfly does not come equipped with a standard socket header that can be readily inserted into the Boe-Bot Board of Education® (BOE) breadboard. A beginning robot owner would either have to solder a series of jumper wires and headers to the upper surface of the AVR Butterfly or purchase a prebuilt carrier board (e.g., ECROS Technology Butterfly Carrier for $18.95; www.ecrostech.com/Products/Butter fly/Intro.htm). Second, and more worrisome, accessing the AVR Butterfly through PBASIC would be a tough, if not impossible challenge for a beginner. Therefore, the LCDBug is a practical visual interface for the Boe-Bot, as well as a terrific bargain. Whether you’re a budding Boe-Bot builder or a seasoned robot hacker, adding the LCDBug to your favorite robot design is remarkably easy. Sure, you could just slap the “Bug” down on the Boe-Bot’s breadboard, but then you would have a tough time chasing after your autonomous creation, trying to spy its visual display. A better method is to mount the LCDBug on an elevated breadboard “billboard” that can be easily read from a more relaxed vantage point. So let’s make a breadboard billboard, install the LCDBug, and write some PBASIC for enabling us to read the Boe-Bot’s thoughts. Step 1. Build Your Billboard. While you don’t have to erect a breadboard billboard for holding the LCDBug, it is a lot easier to read an upright display than a prone one. Remarkably, if you already have a spare breadboard IC sock-

FIGURE 3. Mount the breadboard to the angle hangers.

et laying around, the cost of the mounting hardware can be less than $2.00. Otherwise, expect to spend about $10.00 for a RadioShack-brand breadboard (#276-175) and mounting hardware. In keeping with the beginner spirit of this project, all of the required mounting hardware can be found at a home improvement center like Lowe’s (e.g., 4-40

STEER WINNING ROBOTS WITHOUT SERVOS!

P

erform proportional speed, direction, and steering with only two Radio/Control channels for vehicles using two separate brush-type electric motors mounted right and left with our mixing RDFR dual speed control. Used in many successful competitive robots. Single joystick operation: up goes straight ahead, down is reverse. Pure right or left twirls vehicle as motors turn opposite directions. In between stick positions completely proportional. Plugs in like a servo to your Futaba, JR, Hitec, or similar radio. Compatible with gyro steering stabilization. Various volt and amp sizes available. The RDFR47E 55V 75A per motor unit pictured above. www.vantec.com

Order at (888) 929-5055 SERVO 05.2005

57

Prochnow.qxd

4/7/2005

12:06 PM

Page 58

FIGURE 4. Only three wires are needed for connecting the LCDBug to the Boe-Bot.

FIGURE 5. Running the sample distance program with the variable’s output displayed on the LCDBug.

x 1/2-inch machine screws and nuts) and hobby centers like Hobby Lobby (e.g., small sawtooth picture hangers with nails). Step 2. Bend It But Don’t Break It. The small sawtooth picture hangers are used for holding the breadboard upright. Begin by bending the two hangers into 90-degree angles. A

pair of needle-nose pliers makes this job a snap. You will also have to ream out the holes on the ends of each hanger for accommodating a 4-40 machine screw. A handheld, portable, battery-powered drill with a 7/64-inch drill bit can be used for enlarging these holes. Step 3. Bolt ‘er Down. Remove the two pan-head screws from the standoffs along the front (i.e., the edge nearest the breadboard) of the Boe-Bot. Hold one of the angle hangers that you fabricated in Step 2 over the mounting hole in the BOE and forward standoff. Next, slip one of the removed pan-head screws through the reamed hole of the hanger and reattach the BOE to the standoff. Repeat this same procedure for the other forward standoff. You can refer to page 100 of the Robotics with the Boe-Bot manual (included with the kit) for additional information for reattaching the BOE to the front-end standoffs. Finally, attach the breadboard billboard to the angle hangers with the 4-40 machine screws and nuts. We added a second pair of machine screws and nuts to the two remaining empty mounting holes on the breadboard for visual esthetics. Step 4. Mount Your ‘Bug. Determine the location of Pin 1 of the LCDBug by studying your pin-out diagram. Install the LCDBug on the breadboard billboard with Pin 1 oriented toward the lower left corner and seat all of its pins firmly into each socket. Remember, do not press on the LCD screen during this process. Step 5. You’ve Got Your Connections. You will need three jumper wires for connecting the LCDBug to the Boe-Bot. First, make sure that the three-position power switch on the Boe-Bot is off (i.e., Position 0). Now attach one jumper from the power socket header (Vdd) on the BOE to Pin 5 (you can also use Pin 15 or both Pins 5 and 15) of the LCDBug. Next, connect another jumper from the BOE ground header (Vss) to Pin 6 (you can also use pins 16 or both Pins 6 and 16) on

58

SERVO 05.2005

Circle #47 on the Reader Service Card.

Prochnow.qxd

4/5/2005

10:56 AM

Page 59

the LCDBug.

The Minds Behind the LCDBug

Step 6. Serialize, Seriously. The final connection between the Boe-Bot and the LCDBug is for a serial data input line. This connection corresponds to one of the BASIC Stamp I/O pins. Since our Boe-Bot is already using several of these lines for navigation inputs, we connected the LCDBug to I/O Pin P7. Any pin that you have open will work just fine, however. Just run a jumper wire from Pin 9 of the LCDBug and connect it to I/O Pin P7 (or, your alternately selected I/O pin) of the Boe-Bot. Step 7. One Line Wonder. Once you’ve completed all of the hardware connections for the LCDBug, only one PBASIC command is needed to drive output to the LCD. Use SEROUT for sending text to the LCDBug. For example: SEROUT 7, 84, [“SERVO”] where, SEROUT 7 84 [“SERVO”]

= = = = = = = =

PBASIC command for serial output Tpin; the I/O pin we used in Step 6 Baudmode; baud rate for LCDBug; 9600, 8-bit, noparity, true OutputData; the text for display on the LCDBug

After a close inspection of the LCDBug’s underside, two names figure very prominently in the design and assembly of this display unit. The most visible of these two names is Hantronix. Anyone who has experimented with LCDs knows that Hantronix is a major manufacturer of display modules (e.g., HDM08216H-3 is the module used with the LCDBug; you can find ample technical documentation on the Hantronix website at www.hantronix .com/2_2.html). The other name, Dale Wheat, is a little more difficult to figure out. Thankfully, Mr. Wheat has his URL printed on the ‘Bug’s underside. It turns out that Dale Wheat is the inventive mind behind the LCDBug. Please visit his website (www.dalewheat.com) for more information about the LCDBug, as well as some of his other projects. Step 8. You Snooze or You Lose. During power-up initialization (or following a Clear Screen command), the LCDBug clears the screen, sets the default cursor style (i.e., blinking underline), and positions the cursor in the upper left corner. This initialization can result in a slight

Circle #59 on the Reader Service Card.

SERVO 05.2005

59

Prochnow.qxd

4/5/2005

10:58 AM

Page 60

Feature

LCDBug

AVR Butterfly

LCD

8x2

6x1

Interface

TTL

RS-232/USI

Processor

ATtiny26

ATmega169

Memory

Flash - 2K

DataFlash - 4Mbit

Speed

8MHz

32KHz

Power

+5V

+3V

Sensors

None

2

Price

$19.95

$19.95

TABLE 1. The LCDBug versus the AVR Butterfly.

delay before any text can be displayed on the LCD. Therefore, a short pause (or PBASIC NAP command) should be executed in your code before sending SEROUT data. For example: ‘ {$STAMP BS2} ‘ {$PBASIC 2.5} NAP 5 ‘ SEROUT 7, 84, [12] ‘ SEROUT 7, 84, [28] ‘ PAUSE 1000 ‘ SEROUT 7, 84, [12] ‘ SEROUT 7, 84, [“SERVO”, 10, 13, “Magazine”]‘ ‘

Sleep mode Clear Screen Show Revision Pause Program Clear Screen Display 2 lines of text

You can include this subroutine at the beginning of all of your Boe-Bot programs. In fact, this subroutine is a great replacement for the Start/Reset Indicator Circuit

Bug versus Butterfly If you’re an avid robot builder and you don’t know about the Atmel AVR Butterfly, then you’re missing out on one of the great bargains in microcontroller development tools. For less than 20 bucks, you get a powerful Atmel ATmega169 processor, a discrete one-line, six-character LCD display, a “joystick” input control, light and temperature sensors, a piezo speaker, and a three-volt button-cell-battery power source. Oh, and did we say that you can type your name into the Butterfly, clip in on your shirt, and wear it like a high-tech name tag? The AVR Butterfly can be purchased from Digi-Key (www. digikey.com). You can review the significant features of the LCDBug and the AVR Butterfly with our side-by-side comparison in Table 1.

60

SERVO 05.2005

program described in Robotics with the Boe-Bot, “Activity #3.” Step 9. Sever the Tether. Okay, let’s do something practical with the LCDBug. In this demonstration, rather than printing distance traveled values on a tethered computer via DEBUG, we will use the LCDBug for displaying these readings. Similarly, in your own programs, you can replace DEBUG commands with a series of SEROUT commands. This simple replacement will provide Boe-Bot with a remote message system for displaying sensor readings, status reports, and program variable values — all without the need for a tethered computer. ‘ {$STAMP BS2} ‘ {$PBASIC 2.5} counter distance

VAR Byte VAR Word

NAP 5 ‘ SEROUT 7, 84, [12] ‘ SEROUT 7, 84, [28] ‘ PAUSE 1000 ‘ SEROUT 7, 84, [12] ‘ SEROUT 7, 84, [“SERVO”, 10, 13, “Magazine”]‘ ‘

Sleep mode Clear Screen Show Revision Pause Program Clear Screen Display 2 lines of text

FOR counter = 1 TO 205 PULSOUT 13, 850 PULSOUT 12, 650 PAUSE 20 distance = (counter/41)*23 SEROUT 7, 84, [12] SEROUT 7, 84, [DEC distance, “ cm”] NEXT END

Having mastered the hardware and software aspects of displaying short informative messages onboard the Boe-Bot, you can now make the LCDBug a permanent fixture in all of your future Parallax robot experiments. SV

About the Author Dave Prochnow is a frequent contributor to Nuts & Volts and SERVO Magazine, as well as the author of 25 nonfiction books including the best selling Experiments with EPROMs. Dave also won the 2001 Maggie Award for the best “how-to” article in a consumer magazine. He is currently assembling an enormous selection of robot tips, programs, and hacks into his forthcoming book, The Official Robosapien Hacker’s Guide (TAB Electronics, 2005).

ServoHouseNov03Ad.qxd

4/7/2005

12:37 PM

Page 61

SUBSCRIBE NOW! 12 issues for $24.95 www.servomagazine.com or call toll free 1-877-525-2539

BookstoreMay05.qxd

4/5/2005

andy Mind Cday’s For To ticist Robo

11:33 AM

The SERVO Bookstore

ROBOT DNA SERIES Three Volume Pack

Everything you need to program your robot controller: • Microcontrollers in Robots • Software Development • The Microchip PICmicro Microcontroller • Microcontroller Connections • Designing the Robot System • Going Forward Everything you need to build your own robot drive train: • The Basics of Robot Locomotion • Motor Types: An Overview • Using DC Motors • Using RC Servo Motors • Using Stepper Motors • Motor Mounting • Motor Control • Electronics Interfacing • Wheels and Treads • Locomotion for Multipods All the data you need to build your own robot base: • Mechanical Construction • Electrical Construction • Operating Power • Robot Designs • Constructing a Two-Wheeled Rover Robot • Selecting the Right Materials • Glossary of Terms • Tables, Formulas, and Constants

Subscribers: $21.95 each book Non-subscribers: $24.95 each book

Electronic Gadgets for the Evil Genius by Robert Iannini The do-it-yourself hobbyist market — particularly in the area of electronics — is hotter than ever. This book gives the “evil genius” loads of projects to delve into, from an ultrasonic microphone to a body heat detector, all the way to a Star Wars Light Saber. This book makes creating these devices fun, inexpensive, and easy. $24.95

62

SERVO 05.2005

Page 62

OOP Demystified by James Keogh / Mario Giannini Learn object-oriented programming in no time with help from this easyto-understand guide, ideal for novice and expert programmers alike. Discover why objects are ! so successful as the NEW model for this type of programming and how objects are classified. Distinguish between how people see the world and how computers “see” it. Learn about attributes and methods, inheritance, polymorphism, real-world and case modeling, object-oriented programming languages, and much more. Each chapter ends with a quiz, culminating in a final exam at the end of the book to test your knowledge. $19.95

JunkBots, Bugbots, and Bots on Wheels: Building Simple Robots With BEAM Technology

Build Your Own Electronics Workshop by Thomas Petruzzellis The Electronics Workshop was written to assist the newcomer to the field of practical electronics through the creation of a personal electronics workbench. This is a place specially designed so that readers can go there to work on an electronic project, such as testing components, troubleshooting a device, or building a new project. This book includes invaluable information, such as whether to buy or build test equipment, how to solder, how to make circuit boards, how to begin to troubleshoot, how to test components and systems, and how to build your own test equipment, complete with appendix and resources, etc. This is THE book for anyone entering the field or hobby of electronics. $29.95

by Dave Hrynkiw / Mark W. Tilden From the publishers of BattleBots: The Official Guide comes this do-ityourself guide to BEAM (Biology, Electronics, Aesthetics, Mechanics) robots. They're cheap, simple, and can be built by beginners in just a few hours, with help from this expert guide complete with full-color photos. Get ready for some dumpster-diving! $24.99

Electronic Circuits for the Evil Genius by Dave Cutcher Cutcher's 57 lessons build on each other and add up to projects that are fun and practical. The reader gains valuable experience in circuit construction and design and in learning to test, modify, and observe results. Bonus website www.books.mcgraw-hill com/authors/cutcher provides animations, answers to worksheet problems, links to other resources, WAV files to be used as frequency generators, and freeware to apply your PC as an oscilloscope $24.95

We accept VISA, MC, AMEX, and DISCOVER Prices do not include shipping and may be subject to change.

Electronics Demystified by Stan Gibilisco Now anyone with an interest in electronics can master it by reading this book. In Electronics Demystified, best-selling science and math writer Stan Gibilisco provides an effective and painless way to understand the electronics that power so much of modern life. With Electronics Demystified, you master the subject one simple step at a time — at your own speed. This unique self-teaching guide offers problems at the end of each chapter, a section to pinpoint weaknesses, and a 70question final exam to reinforce the entire book. If you want to build or refresh your understanding of electronics, here’s a fast and entertaining self-teaching course that’s completely current. $19.95

Build Your Own Humanoid Robots by Karl Williams Build Your Own Humanoid Robots provides step-by-step directions for six exciting projects — each costing less than $300.00. Together, they form the essential ingredients for making your own humanoid robot. $24.95

BookstoreMay05.qxd

4/5/2005

11:35 AM

Page 63

To order call 1-800-783-4624 or go to our website at www.servomagazine.com PIC Microcontroller Project Book by John Iovine The PIC microcontroller is enormously popular both in the US and abroad. The first edition of this book was a tremendous success because of that. However, in the four years that have passed since the book was first published, the electronics hobbyist market has become more sophisticated. Many users of the PIC are now comfortable paying the $250.00 price for the Professional version of the PIC Basic (the regular version sells for $100.00). This new edition is fully updated and revised to include detailed directions on using both versions of the microcontroller, with no-nonsense recommendations on which one serves better in different situations.$29.95

Robot Builder's Bonanza by Gordon McComb Robot Builder’s Bonanza is a major revision of the bestselling bible of amateur robot building — packed with the latest in servo motor technology, microcontrolled robots, remote control, LEGO Mindstorms Kits, and other commercial kits. It gives electronics hobbyists fully illustrated plans for 11 complete robots, as well as all-new coverage of Robotix-based robots, LEGO Technicbased robots, Functionoids with LEGO Mindstorms, and location and motorized systems with servo motors. $24.95

Robot Builder's Sourcebook by Gordon McComb Fascinated by the world of robotics, but don’t know how to tap into the incredible amount of information available on the subject? Clueless as to locating specific information on robotics? Want the names, addresses, phone numbers, and websites of companies that can supply the exact part, plan, kit, building material, programming language, operating system, computer system, or publication you’ve been searching for? Turn to the Robot Builder’s Sourcebook — a unique clearinghouse of information that will open 2,500+ new doors and spark almost as many new ideas. $24.95

Open-Source Robotics and Process Control Cookbook by Lewin Edwards

! In this comprehensive NEW guide, Lewin Edwards demonstrates efficient and low-cost open-source techniques, covering end-to-end robotic/process control systems, using Linux as the development platform (and also as the embedded operating system). Specifically, the book targets the development of real-time physical system controls, using Atmel AVR microcontrollers and communicating with Linux-based PCs for overmonitoring. It also covers open-source tools for other controllers. Code examples are given to provide concrete illustrations of tasks described in the text. The accompanying CD-ROM contains all the code used in the design examples, as well as useful opensource tools for robotics and process control system design $49.95 Robot Building for Dummies by Roger Arrick / Nancy Stevenson Ready to enter the robot world? This book is your passport! It walks you through building your very own little metal assistant from a kit, dressing it up, giving it a brain, programming it to do things, even making it talk. Along the way, you’ll gather some tidbits about robot history, enthusiasts’ groups, and more. $21.99

Robotics Demystified by Edwin Wise There's no easier, faster, or more practical way to learn the really tough subjects. McGraw-Hill's Demystified titles are the most efficient, intriguingly written brush-ups you can find. Organized as selfteaching guides, they come complete with key points, background information, questions for each chapter, and even final exams. You'll be able to learn more in less time, evaluate your strengths and weaknesses, and reinforce your knowledge and confidence. $19.95

Check out our online bookstore at www.servomagazine.com for a complete listing of all the books that are available.

CNC Robotics by Geoff Williams Now, for the first time, you can get complete directions for building a CNC workshop bot for a total cost of around $1,500.00. CNC Robotics gives you step-by-step, illustrated directions for designing, constructing, and testing a fully functional CNC robot that saves you 80 percent of the price of an off-the-shelf bot and can be customized to suit your purposes exactly, because you designed it. $34.95

Robot Mechanisms and Mechanical Devices Illustrated by Paul Sandin Both hobbyists and professionals will treasure this unique and distinctive sourcebook — the most thorough — and thoroughly explained — compendium of robot mechanisms and devices ever assembled. Written and illustrated specifically for people fascinated with mobile robots, Robot Mechanisms and Mechanical Devices Illustrated offers a one-stop source of everything needed for the mechanical design of state-of-the-art mobile ‘bots. $39.95

Digital Electronics Demystified by Myke Predko The field of teaching digital electronics has not changed significantly in the past 20 years. Many of the same books that first became available in the late 1970s and early 1980s are still being used as basic texts. In the 20plus years since these were written, the rules have not changed, but they do not provide strong links to modern electronics, including CMOS logic, Programmable Logic Devices, and microprocessor/microcontroller interfacing. Courses teaching introductory digital electronics will fill in the missing areas of information for students, but neither the instructors nor students have resources to explain modern technology and interfaces. One assumption made by all the standard texts is that experimenting with digital electronics cannot be done easily — in the proposed book, “digital guru” Myke Predko will show how readers can set up their own apparatus for experimenting with digital electronics for less than $10.00. $19.95

SERVO 05.2005

63

RoboResources.qxd

4/5/2005

9:55 AM

Page 64

Tune in each month for a heads-up on where to get all of your “robotics resources” for the best prices!

Getting Geared Up! ower is the thing that makes your robots move. Transmitting that power from a motor to a wheel, leg, or track is the job of power transmission components. Among the most common power transmission components for robots are gears, sprockets and chains, timing belts, and bearings. In this month’s installment of Robotics Resources, we’ll take a look at these and several other useful parts used in power transmissions and where to find them.

P

Understanding Gears Gears are used for two purposes: to transfer power or motion from one mechanism to another and to reduce or increase the speed of the motion between two linked mechanisms. The simplest gear systems use just two gears: a drive gear and a driven (or output) gear. More sophisticated gear systems, referred to as gear trains, gear boxes, or transmissions, may contain dozens or even hundreds of gears. Motors with attached gearboxes are said to be gearbox motors. Gears are specified not only by their physical size, but also by the number of teeth around their circumference. Spur gears are most common and are used when the drive and driven shafts are parallel. Bevel gears have teeth on the surface of the circle, rather than the edge. They are used to transmit power to perpendicular shafts. Miter gears serve a similar func-

64

SERVO 05.2005

tion but are designed so that no reduction takes place. Spur, bevel, and miter gears are reversible — the gear train can be turned from either the drive or the driven end. Conversely, worm- and lead-screw gears transmit power perpendicularly and are not usually reversible. The lead screw resembles a threaded rod. Rack gears are like spur gears unrolled into a flat rod. They are primarily intended to transmit rotational motion to linear motion. When gears are used to reduce the output speed of a mechanism — say a motor — the torque at the output is increased. Gears are basically a form of lever; power can be increased by changing the ratio of the lever over the fulcrum. Substituting the fulcrum in a gear system is the number of teeth on each gear. Gear reduction is accomplished by changing the ratio of teeth of two or more mating gears: a two-gear system with a 100-tooth gear and a 50-tooth gear is said to have a 2:1 reduction. With such a system, output speed is reduced by 50 percent and torque is roughly doubled.

Common Gear Terms and Specifications Here are some common gear terms and specifications to keep you warm at night. • Pitch — The size of the gear teeth is

expressed as pitch, which is roughly calculated by counting the number of teeth on the gear and dividing it by the diameter of the gear. Common pitches are 12 (large), 24, 32, 48, and 64. Odd-size pitches exist of course, as do metric sizes. • Pressure Angle — The degree of slope of the face of each tooth is called the pressure angle. The most common pressure angle is 20 degrees, although some gears, particularly high-quality worms and racks, have a 14.5-degree pressure angle. • Tooth Geometry — The orientation of the teeth on the gear can differ. The teeth on most spur gears are perpendicular to the edges of the gear. But the teeth can also be angled, in which case it is called a helical gear. There are a number of other unusual tooth geometries in use, including double-teeth and herringbone.

Where to Find Gears Of course, you can always buy gears from Gears R Us. (Okay, most go by far more mundane names like Boston Gear, Small Parts, W.M. Berg, and Stock Drive.) You’ll get just what you’re looking for from these sources, but it’ll cost you. The average machined one-inch-diameter aluminum gear can cost $20.00 to $30.00. As long as your requirements aren’t too unusual, you may be able to

RoboResources.qxd

4/5/2005

9:57 AM

Page 65

locate the gears you want from other products and sources. • Toy Construction Sets — Don’t laugh! Toys from LEGO and Erector come with gears you can use in your robotics projects. Most are on the large size and are made of plastic. • Hobby and Specialty Retailers — Next time you’re at the hobby store, look for replacement gear sets for servos and drive motors for R/C cars and airplanes. Some are plastic, others are metal (usually either aluminum or brass). Typically, you’ll have to buy the whole set of replacement gears for whatever motor or servo the set is for, but in other cases, you can purchase just one gear at a time. Some online retailers, such as ServoCity.com and Jameco.com, sell gears specifically for hobby applications (like robots). The prices are reasonable. • Surplus Catalogs — New gears can be expensive, but surplus gears can be quite affordable. You can often find new gears, plastic or metal, for about 10 cents on the dollar. The only problem: selection can be limited, and it can be hard to match gear sizes and pitches even when buying gears from the same outlet. • Rechargeable Electric Screwdrivers — Inside are numerous gears, typically in a “planetary” configuration, used to produce their very high-speed reductions. Before raiding the screwdriver for just the gears, consider using the motor, too. The motor and gearing system of a typical electric screwdriver makes for a fine robot drive system. • Hacked Toys — Discarded and discounted toys make for good gear sources. These include friction and battery-powered toy cars, “dozer” toys, and even some action figures. These gears tend to be small and made of plastic. • Old Kitchen Appliances — Go to

thrift stores and garage sales and look for old food mixers, electric knives, even electric can openers. Unlike toys, kitchen appliances commonly use metal gears, or at the least, very strong plastic gears.

More Power Transmission Components Gears aren’t the only power transmission components you’ll encounter. There are literally hundreds of others, but the following comprise the most commonly used and the most critical. Timing Belts Also called synchronization belts. Typical timing belts for small mechanisms range from 1/8- to 5/18-inch in width and sizes from just a few inches in diameter to several feet in diameter. Material is usually neoprene, with metal or fiberglass reinforcement. Belts are rated by the pitch between “nubs,” or “cogs,” which are located on the inside of the belt. Timing belts are used with matching timing belt pulleys, which come with either ball-bearing shafts (used for

idler wheels) or with press-on or setscrew shafts for attaching to motors and other devices. V-belts V-belts have a taper V shape and are used to transfer motion and power from a motor to an output when synchronization of that motion is not critical (because the belt could slip). V-belts, which are often made with metal- or fiberglass-reinforced rubber, are used with V-grooved pulleys. By changing the diameter of the pulleys, it’s possible to alter the speed and torque of the output shaft in relation to the drive shaft. The same physics that apply to gears and gear sizes apply to V-belt pulleys, as well. Endless Round Belts Endless round belts are used to transfer low-torque motion. The belt looks like an overgrown O-ring and, in fact, is often manufactured in the same manner. Other endless round belts are made by fusing the ends of rounded rubber (usually neoprene). Some belt makers provide splicing kits so you can make custom belts of any length. Grooved pulleys are used with round

HobbyEngineering The technology technology builder's source for kits, components, supplies, tools, books and education.

Robot Kits For All Skill Levels Levels

ICs, Transistors, Pro Project Kits ject Kit s Components ponents Motors, Frame Com Supplies. pplies. and Scratch Builder Su y Internet, phone, fax or mail Order b by mail..

yEngineering.com www.Hobb www.HobbyEngineering.com

Books and Educational K

Components BEAM Kits and Components

1-866-ROBOT-50 1-866-762-6850 1-650-552-9925 1-650-259-9590 (fax) @HobbyEngineering.com sales [email protected] 180 El Camino Real Millbrae, CA 94030

Visit our store near SFO!

yment options day received! World-wide shipping. shipping. Convenient pa Most orders ship the day payment options..

SERVO 05.2005

65

RoboResources.qxd

4/5/2005

9:58 AM

Page 66

belts. With V-belt pulleys, the diameter of the ground belt pulley can be altered to change the torque and speed of the output. Ladder Chain Ladder chain resembles the links of a ladder and is used for fairly lowtorque and slow-speed operations. Movement of a robotic arm or shoulder is a good application for ladder chain. With most chains, links can be removed and added using a pair of pliers. Special toothed sprockets, engineered to match the pitch (distance from link-to-link) of the chain, are used. Roller Chain Roller chain is exactly the same kind used with bicycles, but for most small-scale machinery, the chain isn’t as big. Roller chain is available in miniature sizes down to 0.1227-inch pitch (distance between the links). More common is the #25 roller chain which has a 0.250-inch pitch. For reference, most bicycle chain is #50, or 0.50-inch pitch. Sprockets with matching pitches are used on the drive and driven components. Roller chain comes in metal or plastic; plastic chain is easier to work with, and links

66

SERVO 05.2005

can be added or removed. Many types of metal chains are pre-fabricated using hydraulic presses and require the use of “master links” to make a loop. Idlers Idlers (also called idler pulleys or idler wheels) take up slack in belt- and chain-driven mechanisms. The idler is placed along the length of the belt or chain and is positioned so that any slack is pulled away from the belt or chain loop. Not only does this allow more latitude in design, it also quiets the mechanism. The bores of the idlers are fitted with appropriate bearings or bushings. Couplers Couplers come in two styles: rigid and flexible, and are used to directly connect two shafts together. A common application is to use a coupler to connect the drive shaft of a motor with the axle of a wheel. Connectors can be rigid or flexible as well. Rigid couplers are best used when the torque of the motor is low, as it would be in a small tabletop robot. Flexible couplers are advised for higher torque applications, as they

are more “forgiving” of errors in alignment. Rigid couplers can be made using metal or plastic tubing, selected for its inside diameter. You can purchase suitable tubing at a hobby or hardware store. Cut the tubing to length, then drill two small holes at both ends for set screws. Use a tap to thread the hole for the size of set screws you wish to use — 4/40 is a good all-around size for most applications. Steel tubing provides the most strength but is harder to cut, drill, and tap. If the thickness of the tubing is sufficient, aluminum will work well for most low-torque applications. Brass and bronze should be avoided because these metals are too soft. For very low-torque jobs, plastic or even rubber tubing will work. Select the rubber tubing so that it is just slightly smaller than the motor shaft and axle you are using, and press it on for a good fit. There are many types of rigid and flexible couplers commercially available, and cost varies from under a dollar to well over $50.00, depending on materials and sizes. Common flexible couplers include helical, universal joint (similar to the U-joint in the drive shafts of older cars), and three-piece jaw (more about the latter in a bit). The couplers attach to the shafts either with a press fit, by a clamping action, by set screws, or by a keyway. Press fit and clamp are common on smaller couplers for low-torque applications; set screws and keyways are used on larger couplers. Three-piece jaw couplers, like those made by Lovejoy, consist of two metal or plastic pieces that fit over the shafts. These are the “jaws.” A third piece, which is called the spider, fits between the jaws and acts as a flexible cushion. One advantage of three-piece couplers is that you can readily “mix and match” shaft sizes because each piece of the jaw is sold separately. For example, you can purchase one jaw for a 1/4-inch shaft and another for a 3/8-inch shaft. Both

RoboResources.qxd

4/5/2005

9:59 AM

Page 67

jaws must have the same outside diameter. Bearings Bearings are used to reduce the friction of a spinning component, such as a wheel or idler, around a shaft. Several bearing constructions exist, with ball bearings being the most common. The bearing is composed of two concentric rings; between each ring is a row of ball bearings. The rings and the ball bearings are held in place by a mechanical flange of some type. Bearings can be mounted directly to a device. This requires precision machining and a press to securely insert the bearing into place. Another form of bearing uses narrow pieces of metal rod, called needles, and works in a similar manner. Pillow blocks are available that allow bearings to be readily mounted on any frame or device. Bushings Bushings and bearings serve the same general purpose, except a bushing has no moving parts. (Note: Some people also call these bearings or dry bearings, but I prefer to use the term bushing in order to differentiate them.) The bushing is made of metal or plastic and is engineered to be selflubricating. An example is Oilite, a self-lubricated bronze metal commonly found in industrial bushings. Several kinds of plastics, including Teflon, exhibit a selflubricating property. Bushings are used instead of bearings to reduce cost, size, and weight and are adequate when friction between the moving parts can be kept relatively low. Bushings, and not the more expensive bearings, are used in the output gear of the less expensive R/C servos, for example.

• Pulleys and belts — The pulleys are like wheels, and the belts ride over the wheels. Most pulleys incorporate a sleeve or rim to keep the belt in place. • Sprockets and chains — Sprockets are also wheels but incorporate teeth around their circumference in order to mesh with a chain. • Cable — A flexible cable, made of plastic or metal, transfers power/movement by spinning within some protective sheath. The speedometer cables on older cars are a good example of how these work. Except for cables, flexible linkages can function in a similar manner to gears, including reducing or increasing speed and torque. This is accomplished by using different sprocket or pulley diameters. A benefit of using pulleys/belts or sprockets/chain is you don’t need to be as concerned with absolute alignment of the mechanical parts of your robot. When using gears, it is necessary to mount them with high precision.

Sources Check out these sources for power transmission parts, though not all of the companies listed here sell directly to consumers. However, you may be able to locate their wares through a local distributor. A number of the websites provide helpful design information. Be sure to check out the free technical literature that these manufacturers provide.

Bearing Belt Chain www.bearing.com Local and online retailer of bearings (linear, roller, taper, pillow, etc.), belts (including V and timing), sprockets, and chains. Large inventory.

Bearing Headquarters Co. www.bearingheadquarters.com Industrial bearings (all types), couplings, clutches, belt drives and rollers, gears, conveyor rolls and chain, sprocket, and chain. See also Headco Industries, www.headco.com

Belt Corporation of America www.beltcorp.com Belt Corporation of America offers

FIGURE 1. Bearings and more at Boca Bearing.

Flexible Linkages Flexible linkages allow mechanical power or movement to be transferred from one place to another, using some form of bendable material. Examples are: SERVO 05.2005

67

RoboResources.qxd

4/5/2005

10:01 AM

Page 68

reels and, of course, robotics. Bearings are listed by size, type, and general application. Check out their engineering section, with nearly a dozen helpful technical backgrounders on using bearings.

Boston Gear www.bostongear.com Boston Gear offers gears, yes, but also bearings, transmissions, clutches, pneumatics, and many assorted other power transmission and actuation products. The company also offers free literature, maintenance manuals, and operating instructions for their products.

BRECOflex Co. www.brecoflex.com FIGURE 2. Gates Corp. at www.gates.com

just that — belts — and not the kind you wear. BCA offers timing belts, woven endless belts (can be useful to construct robot tank treads), natural rubber and neoprene stretch belts, and endless round belts.

Boca Bearing www.bocabearings.com Boca specializes in small and miniature bearings for such applications as radio control vehicles, inline skates, power tools, small appliances, fishing

FIGURE 3. Power transmission components at Manufacturer’s Supply.

BRECOflex is a manufacturer of belts: timing belts, profiled belts, flat belts, pulleys, belt tensioners, and slider beds.

Drives, Inc. www.drivesinc.com Drives, Inc., makes and sells roller chain and “attachment products,” as well as chain for conveyors. The chain is available in sizes from #35 (slightly smaller than bicycle chain) on up to A2060, which has a pitch of 1-1/2 inches. So-called attachments include mechanical clips that seat into the chain — ideal for making heavy-duty tracked robots.

Dura-Belt, Inc. www.durabelt.com Dura-Belt, Inc. is a maker and seller of round urethane endless belts (O-rings), quick-disconnected twisted belts, flat belts (in different thicknesses and widths), groove sleeves for round belts, idlers, and belt splicing kits.

Gates Rubber Co. www.gates.com Gates Rubber Co. is a major supplier of gears, timing belts, and power transmissions for both industry and automotive applications. The company’s products are available through

68

SERVO 05.2005

RoboResources.qxd

4/5/2005

10:03 AM

Page 69

distributors.

Helical Products Co. www.heli-cal.com Helical flexible couplings. Many different sizes, styles, and materials.

Huco Engineering Industries Ltd. www.huco.com Huco Engineering Industries is a manufacturer of flexible couplers. Products include three-part couplers with replaceable wear elements, onepiece couplers, and plastic universal joints.

igus GMBH www.igus.de

Includes wheels, chain, bearings, axles, snowmobile treads, and a lot more. Check out the Go-Kart page at www.GoKartParts.com

Minarik Corporation www.minarikcorp.com Miniarik Corporation offers a full line of mechanical (bearings, shafts, gears, chain, etc.) and electronics parts (PWM drives, sensors), online ordering, and many local warehouses throughout the US.

Nordex, Inc. www.nordex.com

igus GMBH is a maker of polymer (plastic) bearings, chain, linear slides, and other mechanicals. Web page is in many languages, including English and German.

Gears, miniature instrument bearings, shafts, Geneva mechanisms, fasteners, ball (linear and rotary) slides, brakes, clutches, couplings, assemblies, enclosed gear trains, and many other related precision components are available.

JJC & Associates www.jjcassociates.com

NSK www.nsk.com

JJC & Associates offers custom and standard drive components — belts, timing belts, pulleys, gears, plastic power drive components, collars and clamps, and rollers.

NSK offers power transmission bearings, bushings, gears, sprockets, and more are available. Extensive technical details are provided on the website, including online engineering calculators.

Lovejoy, Inc. www.lovejoy-inc.com

Power Transmission.com

Lovejoy manufactures a line of www.powertransmission.com affordable flexible couplers. These are PowerTransmission.com is an designed to connect a motor drive information site that helps you find with some driven device, like a pump suppliers of gears, motors, bearings, or a wheel. Because they are flexible, the coupler EVEN MORE POWER allows the shafts of the drivTRANSMISSION SOURCES er and the drivee to be The following three major parts and slightly out of whack from supplies companies offer many types of one another, and yet they power transmission products. Plan to spend won’t tear each other apart. some time touring their websites. All three One of the more common offer on-line ordering. Lovejoy connectors in use for robotics is the jaw Grainger coupling. www.grainger.com

Manufacturer’s Supply, Inc. www.mfgsupply.com

McMaster-Carr www.mcmaster.com

Manufacturer’s Supply, Inc. offers chain saw, motorcycle, and engine parts.

MSC Industrial Direct www.mscdirect.com SERVO 05.2005

69

RoboResources.qxd

4/5/2005

10:04 AM

Page 70

transmissions with precision plastic gears, chain, and sprocket drives. The products are injection molded, so they’re less expensive than machined gears made from Delrin or metal, yet they are precise enough for many robotic applications.

Small Parts, Inc. www.smallparts.com Small Parts is a robot-builder’s dream, selling most every conceivable power transmission part, from gears to sprockets, chain to belts, and bearings to bushings. Product is available in a variety of materials, including brass, steel, and aluminum, as well as nylon and Delrin.

Stock Drive Products www.sdp-si.com FIGURE 4. Reid Supply Company is an all-purpose supply resource.

clutches, couplings, speed reducers, and other components that transmit mechanical power. Most suppliers have websites where you can compare products.

Putnam Precision Molding www.putnamprecision molding.com Putnam Precision Molding manufactures and sells the Plastock line of mechanical-drive components. Its products include: timing belts and pulleys, chain sprockets, roller chain, and spur gears.

ABOUT THE AUTHOR Gordon McComb is the author of the best-selling Robot Builder’s Bonanza, as well as Robot Builder’s Sourcebook and Constructing Robot Bases, all from Tab/McGraw-Hill. In addition to writing books, he operates a small manufacturing company dedicated to low-cost amateur robotics. You’re welcome to visit at www.budgetrobotics.com He can also be reached at robots@robot oid.com

70

SERVO 05.2005

Quality Transmission Components www.qtcgears.com Quality Transmission offers medium and coarse metric pitch small gears and other power transmission goodies are available. They are a division of Stock Drive Products (see www.sdpsi.com).

Reid Supply Co. www.reidtool.com Reid Supply Co. is an all-purpose industrial supply resource. They carry thousands of items, including bearings, gears, linear shafts, lead screws and nuts, ball screws and ball nuts, multi-directional rollers (omniwheels), ball transfers and ball casters, light- to heavy-duty casters, machine framing, fasteners of all kinds, and much more.

Seitz Corp. www.seitzcorp.com They offer plastic gears, gears, and motion-control mechanicals.

Serv-o-Link www.servolink.com Serv-o-Link is the source for power

If Stock Drive doesn’t have it, it probably doesn’t exist. SDP is a manufacturer and seller of power transmission products: gears, bearings, bushings, shafts, sprockets, chain, and dozens of other categories. They specialize in the smaller scale stuff that is most useful in amateur robotics.

Vaughn Belting www.vaughnbelting.com Vaughn Belting is a local distributor of rubber, nylon, steel, and plastic timing belts, conveyor belts, and other belts used in industry.

W.M. Berg www.wmberg.com W.M. Berg, Inc., manufactures and distributes precision mechanical components, including gears, rotary bearings, pulleys, belts, hardware and fasteners, linear bearings and slides, couplings, flexible ladder chain (which is useful as miniature robot tracks), and roller chain (both plastic and metal).

Wholesale Bearing & Drive Supply www.wbds.com Wholesale Bearing & Drive Supply features online sales of bearings and many other power transmission components. SV

Full Page.qxd

4/7/2005

2:11 PM

Page 71

RESOURCES UN-L TD. UN-LTD. SURVEILLANCE OPTICS ELECTRONICS

ORDERS. 800.810.4070 Tech 603.668.2499 fax 603.644.7825 WWW.RESUNLTD4U.COM

NEW, ULTRA MINI, LIPSTICK CAMERA, SONY SUPER HAD CCD, SUPER 0.01 Lux SENS. and IT FITS ON A DIME! WOW!

SPECIAL, GM-L250.............$59ea.

HEAVY DUTY, HIGH TORQUE, METAL CONTRUCTION. These are brand new, very rugged, right angle drive, gearmotors originally intended for an automotive application. They are very substantial, weighing over 2 pounds each! They offer a 0.9" diameter x 0.3"H, 9 tooth steel gear drive, located centered between three 0.32" diameter cast aluminum "spider" mounting points on a diameter of 3". Overall size: 1.9"W x 7.1"L x 4"H (including the gear) with std. automotive style 2 pin connector. Motor will operate with strong torque with as little as 3VDC, Hand twisting torque at 12VDC. Current is 3.2A no load and about 6A loaded. RPM of 84/minute. Reversible. Heavy duty platic coupler included. WINMTR248...........$20ea. 4 for $69

LASER SCANNER, GSI LUMONICS, M SERIES, CLOSED LOOP, MOVING MAGNET MOTOR with capacitive position sensor. Speed & Accuracy! Brand new, GSI Model: 3008522 mirror scanner. M-series optical scanners are the first in GSI product to use moving magnet technology. This robust design combines the sub-millisecond speed with the micro-radian accuracy second generation capacitive position detector. Excellent drift, noise, linearity and dynamic performance optimized to position mirrors between 9 and 20mm clear aperture. M2 scanners deliver the performance needed in most of today’s beam and image steering applications.

GMV-EX6K...$449 Super, 6mm, f1.2 Manual Iris Lens...$69

These precision motors were removed from new optical assemblies. They were intended to provide focus and aperture control for a large zoom lens. The mini model (shown left) is from SAYAMA, # 43060300, size is 0.78"Diam. X 2.5"L with a 1.6"W mounting flange. Shaft is 0.155" Diam. The micro model (shown right) is from NAMIKI, PN 1D, size is o.47" Diam X 1.875"L with a 0.078"D shaft. A nice torque limiting drive gear is attached to each motor. (Can be easily removed) Motor specs are shown in tables below.

Specifications Parameter M2 Max Scan Angle ±30° Non-linearity (max) 0.1 Offset Drift (max) 30/10 100/20 Gain Drift (max) 0-50 Operating Temperature Optimal mirror size 9-20 Bandwidth (typ) >2000 Small Step Response (typ) <400 Full Step Response (typ) <2

Units degrees,optical % over ±20° optical µ radians/°C ppm/°C °C mm, clear aperture Hz µS ms

GSI SCANNER.............$149ea. LIMITED QUANTITY

SAYAMA MINI......$15ea. SPECIAL......4 for...$49 NAMIKI MICRO...$20ea. SPECIAL......2 for...$35

V (in) 3 5 7 9 12

DRILL DRIVE.......$39set, Motor & Cradle 2 sets for $69

WE W ANT TO BUY WANT ESOTERIC and UNUSU AL MA TERIAL UNUSUAL MATERIAL

TWO LITTLE GEMS, MINI and MICRO, REVERSIBLE, HIGH TORQUE, DC GEARMOTORS. End effector or beam robot.

GEAR RATIOS MINI MICRO 300:1 150:1

Brand new in mfgrs boxes, These assemblies normally provide the rotary motion for a quality Bosch 12V V (in) I (nl) Mtr RPM Out RPM drill/driver. The assembly consists of 3 3.5A 3400 242 a 17000RPM drive motor and a 14:1 6 5.0A 8000 571 planetary gear head with variable 9 5.7A 12500 893 clutch. The motor operates from 3 to 12 6.0A 17200 1228 12VDC. Measured data in table. A unique, custom, glass filled plastic cradle mount is included for easy surface mounting. Overall size is 7.4"L x 2.4" diam. (3.3"W in the cradle) Threaded output shaft is 0.048"diam. Fifteen torque setting plus locked. We have a limited supply of these fantastic robotic drive motors. Order now, avoid disappointment. Mtr # 2606200917, Drive # 2607022890

New, 18" L flex shaft enclosed in a 3/8"D protective sheath. V (in) I (nl) Out RPM One end "Plugs" into the motors right angle drive which 3 1.1A 133 outputs the flex rotation by turning of a 1/2" diam. x 7"L, 10 TPI 6 1.4A 295 lead screw upon which rides a 1" x1" 2"L "nut /carriage" with 9 1.6A 468 two 1/4 x 20 threaded holes spaced 1" apart on the long axis. 12 1.8A 642 Flex shafts have a 0.14" x 0.14" square drive end. You receive one motor/shaft set. They were originally designed to move power seats. Heavy duty. . FLEX-DRIVE KIT.......$24 2 for $40

Black and white, state of the Art Video, Our GMV-EX-6K, Takes the Prize. For covert, military & scientific applications, this is it. Unbelievable 0.00005Lux @ f0.8 performance is enhanced through low speed electronic shuttering, digital frame integration and advanced DSP. Auto sensitivity mode starts as it becomes dark. 24 hour surveillance is possible with the optional f1.2 auto iris lens shown below. Seven Gain/Shutter modes are user selectable. Normal, X4, X8, X16, X24, X32, X64 X128. Frame rates of 60, 15, 8, 4, 3, 2,1 and 0.5 per second. Auto/off BLC, S/N >52dB, Mirror on/off, Gain on/ off, auto electronic shutter 1/60 to 1/120,000 sec., Alum. housing, dual 1/4x20 mtg. Specs: 1/2" CCD, 768(H) X 494(V), with 380K pixels, 12VDC ±1V@200mA, S-VIDEO on 4pin DIN connector. Std. video out on BNC. Size: 51mm x 51mm x115mm long. Regulated power supply incl. All functions externally controlled. C-mount lens not included. We have the best price available for the 12V1E-EX CAMERA. VERY LIMITED QUANTITY AVAILABLE. DON'T BE FOOLED by 1/3", NON - EXVIEW, LOOK ALIKES!

I (nl) Out RPM 32mA 6 34mA 11 34mA 16 35mA 24 35mA 33

SPECIAL, GM-210...................$45ea.

BOSCH, DRILL MOTOR and GEAR DRIVE ASSEMBLY with CUSTOM SURFACE MOUNTING BRACKET! These beauties have all the torque you could want....

DC MOTOR drives FLEXIBLE SHAFT with LEAD SCREW and "NUT"

SONY EX-VIEW CCD for the best “ASTRONOMICAL” PERFORMANCE available in an affordable camera! With 600 Lines Resolution. NEW! 0.00005 Lux, The most sensitive, uncooled, 1/2" CCD camera available.

V (in) 3 5 7 9 12

MINI CCD CAM is SUPER RUGGED.

Top quality, black and white, mini CCD camera at a super price. Packaged in a Sleek black anodized, aluminum housing, no larger than a dime! super rugged cast aluminum housing O-Ring sealed & weatherproof. that fits like a glove! ( Not flimsy sheet (not for underwater metal ) Removeable mounting bracket use) Adjustable tilt / included as well as an 8", plug in cable swivel mounting with BNC video & DC power jack for, no bracket. Specifications: 1/3" SONY SUPER HAD CCD, sweat hook up. Why fool around with an 400 Lines Resolution, SUPER 0.01 Lux sensitivity, AGC, Auto Shutter, open P.C. board? Now you can have the (1/60 to 1/100,000) Power from regulated 12VDC @100mA, Super GM210 for the same price as a simple board camera • 1/3" • 3.6mm, 900 FOV real glass lens, NTSC video. Extra IR SENSITIVE. 420 Lines • 0.3 Lux • AGC • Auto Shutter • Power, 12V Size: 0.735"D X 2.15"L 50mm, 36" cable with BNC video & DC @100mA • 270k pixels • Standard 4 mm, 780 FOV lens • barrel jack. Weight: 65g Superior quality at an affordable price. Focus from 10mm to infinity • NTSC video • 2 ounces • Size: Limited qty. Regulated power adapter available for $6.95ea. 1.8" Square x 1.3" deep, including lens. Limited quantity.

POWERFUL, "KIDs CAR" DRIVE MOTOR. MASSIVE GEAR REDUCTION for BIG TORQUE.

New, right angle drive system intended for use in a childs motorized vehicle. A powerful 12VDC motor drives the attached gearbox to provide final drive through a 1.75" diam. splined drive shaft. The 2.7" diam.male mating hub, included. (black piece in photo). This terminates in a 3.9" diam. flange eith notches for bolts. There is also a 0.43"Diam through hole in the center of the hub. Nice for a large platform.

I (nl) Out RPM 4.0mA 22 4.4mA 36 5.0mA 60 5.3mA 78 6.0mA 104

VIDEO TIME and DATE GENERATOR, NEW! This simple device solves the problem of time stamping & identifying any video. Camera ID up to 20 characters, ID & Time on/off, ID at top center of screen & time on the bottom. Format: YR/MO/DAY and HR/MIN/SEC/ 24hour Std. RCA video in & out. 9VDC, AC adpter incl. Three button operation. Rugged case. Size: 3.5"L x 2.6"W x 1.25" H. SPECIAL..........$55ea.

V (in) 3 6 9 12

I (nl) 900mA 1.0A 1.1A 1.2A

BOSCH, REVERSIBLE, HIGH TORQUE, DC GEARMOTOR, With 2.4"LONG STEEL SHAFT. These are brand new, very rugged, right angle drive, gear motors originally intended for an automotive application. They are very substantial, weighing over 2 pounds each! They offer a 0.44" diam. x 2.4"L steel drive shaft located centered between three 0.45" diameter cast aluminum "spider" threaded mounting points. Each offset 120o and on a diameter of 2.75". Overall size: 5"H x 7.5"L x 2.7"W Motor will operates with wrist twisting torque. As little as 3VDC lights it up, nominal is 12VDC. Draws about 4.5 A under load. All metal construction. Also it is of course, reversible. V (in) I (nl) RPM 3 2.7A 16 6 3.1A 39 9 3.3A 63 12 3.5A 88

RA DRIVE with SHAFT......$24ea. SPECIAL....................2 for $39 REVERSIBLE, HIGH TORQUE, AC GEARMOTOR, ORIENTAL MOTOR, MODEL, 2RK6GN/2GN15KA A super nice, matched, 1450 RPM, 1/125HP motor & 15:1 gearbox provide 100rpm at the 0.3" diam. x 1.1"L out-put shaft. Shaft rota-tion is the same as the motor shaft. Instantly reversible capacitor start motor. (Cap. supplied) operates from 115VAC @ 0.19A. Torque is 4.4Lb in. Regular $135 each. Limited quantity. Overall size is: 2.4" X 2.4" x 4.25"Long. Weight 1.5lbs.

OM-2GN15K......$20 or 3 for $49

LIKE THIS STUFF? SEE MORE ON-LINE at OUR WEB STORE. 2005 our 14th Year!

RPM Amps 26 Loaded 57 5A 89 117

CAR DRIVE FP....$20ea. 2 for $35

Circle #34 on the Reader Service Card.

ENCODERS

MAXI FUSE BLOCK

SERVO 05.2005

71

BrainMatrix.qxd

4/5/2005

10:16 AM

Page 72

reversible r/c-style electronic speed controllers (escs) e ul od M

e ak Br e rs ve y Re la d/ De ar e rw im Fo T y nc ue eq Fr M PW ) ET (F s) al m rn oh te ( In ce n ) ta ps sis m Re (a nt us re uo s) ur tin p C on (am ak C t Pe n um re e r im u ng ax C Ra M ge lta Vo

SUPPLIER Astro Flight www.astroflight.com

Harbor Master

6 to 8

30

35

0.010

2.5 kHz

Yes

No

ESC200 Micro

4.8 to 7.2

3

20

proprietary

13.8 kHz

Yes

No

192*

660*

0.0046

1 kHz

Yes

Yes

DuraTrax www.duratrax.com I-Speed 16T Mild-Modified Reversible ESC 7.2 to 8.4 MC230CR

7.2 to 8.4

30

90

0.0035

1.5 kHz

Yes

Yes

MC330CR

7.2 to 8.4

70*

200*

0.001

1.5 kHz

Yes

Yes

Victor 883

6 to 30

60

200

0.007

2 kHz

Instant

Yes

Victor 884

6 to 15

40

64

0.012

120 Hz

Instant

Yes

Perfex KA-6

7.2 to 8.4

32

280*

0.006

1 kHz

Yes

Yes

LRP Runner Plus Reverse

4.8 to 8.4

20

80

0.017

1.3 kHz

Yes

Yes

Sonik4 Marine 15

4.8 to 12

15

15

0.007

1 kHz

Instant

Yes

Sonik3 Eco 20

4.8 to 9.6

15

50

0.007

2 kHz

Yes

Yes

Scorpion Mini

4.8 to 18

2.5

6

Spy Micro Reversible

4.8 to 8.4

2

12

0.019

1 kHz

Yes

Yes

7.2 to 16.8 180*

400*

0.0011

proprietary

Yes

Yes

XRS Sport

4.8 to 8.4

40*

40*

0.0055

1 kHz

Yes

Yes

RET411P

4.8 to 26

12

30

proprietary proprietary Instant

No

RET713P

4.8 to 26

33

85

proprietary proprietary Instant

No

Futaba www.futaba-rc.com

IFI Robotics www.ifirobotics.com Kyosho www.kyosho.com LRP Electronic www.lrp-electronic.de Mtroniks www.mtroniks.net Robot Power www.robot-power.com

Team Novak www.teamnovak.com

Vantec www.vantec.com

72

SERVO 05.2005

Super Duty XR High Voltage

proprietary proprietary Instant

No

BrainMatrix.qxd

4/5/2005

10:17 AM

Page 73

by Pete Miles Upcoming topics include SBCs and H-bridges, sensors, kits, and actuators. If you’re a manufacturer of one of these items, please send your product information to: [email protected] Disclaimer: Pete Miles and the publishers strive to present the most accurate data possible in this comparison chart. Neither is responsible for errors or omissions. In the spirit of this information reference, we encourage readers to check with manufacturers for the latest product specs and pricing before proceeding with a design. In addition, readers should not interpret the printing order as any form of preference; products may be listed randomly or alphabetically by either company or product name.

) es ch (in

e ic Pr st Li

ze Si

h itc Sw er w le Po ab m m nt ra re og ur s) Pr C p C (am BE

) es nc ou t( gh ei W

* Special Notes

1.0

No

No

1.2 x 1.6 x 0.2

1.06

$99.95

1.0

Yes

Yes

1.02 x 1.02 x 0.63

0.88

$79.99

1.0

Yes

Yes

1.48 x 1.34 x 0.57

2.19

$49.99

Yes

Yes

Yes

1.07 x 1.31 x 0.5

1.55

$49.99

Yes

Yes

Yes

1.07 x 1.31 x 0.5

1.59

$49.99

No

No

No

2.2 x 2.7 x 2.1

4.0

$149.95

No

No

No

2.2 x 2.7 x 2.1

4.0

$114.95

1.0

Yes

No

2.0 x 2.1 x 0.63

3.7

$109.99

0.6

Yes

No

1.57 x 1.57 x 0.59

1.94

$49.99

1.2

Yes

No

1.38 x 1.42 x 0.55

1.94

$39.99

1.0

Yes

No

1.38 x 1.42 x 0.55

1.94

$39.99

0.1

No

No

1.25 x 0.5 x 0.4

0.19

$34.99

1.0

Yes

Yes

1.12 x 0.95 x 0.48

0.51

$99.00

3.0

Yes

Yes

1.75 x 2.17 x 0.85

4.03

$265.00

1.0

Yes

Yes

1.31 x 1.10 x 0.53

1.27

$85.00

No

No

No

1.8 x 1.97 x 0.82

2.0

$74.95

No

No

No

1.8 x 1.97 x 0.82

2.5

$159.95

1. Pay special attention to the current rating on all ESCs that are specifically designed for R/C cars. Their continuous and peak current ratings are more theoretical than actually achievable. They make very good motor controllers for most robots. They are small, easy to hook up, interface to, and control. They are relatively inexpensive when compared to other electronic speed controllers. 2. Continuous current is based on operating with this current draw for a minimum of three minutes. The robot controllers usually operate with this current indefinitely; whereas the R/C-car-style controllers have this rating for three to five minutes. 3. Another important thing to look for is the forward-to-reverse time delay. Most ESCs have a small time delay (usually between 0.3 to 0.7 seconds) after commanding the controller to change from forward to reverse directions and before the reverse kicks in. Most robots won’t notice this, but those robots that require sudden motor direction control — such as those used in sumo or combat robot applications — the time delay will make your robot act like it is very sluggish to respond to your commands. In the table shown here, Instant Forward/Reverse time delay means that the robot has instant direction control reaction. A “Yes” for the time delay means there there is a time delay present when changing directions.

SERVO 05.2005

73

MrRoboto.qxd

4/5/2005

10:07 AM

Page 74

Our resident expert on all things robotic is merely an Email away.

[email protected]

Tap into the sum of all human knowledge and get your questions answered here! From software algorithms to material selection, Mr. Roboto strives to meet you where you are — and what more would you expect from a complex service droid?

by

Pete Miles

Q A

.What defines a robot, and where did the word come from?

anthropomorphic mechanical being built to do routine manual work for human beings or a mechanical device operating automatically, especially by remote control, to perform in a — Tina Ayling seemingly human way.” The Robot Institute of America via Internet defines a robot as, “a reprogrammable, multifunctional manipulator designed to move material, parts, tools, or .Let me first answer the second part of your quesspecialized devices through variable programmed motions tion. It is widely believed that the word originated for the performance of a variety of tasks.” from the Czech word robota, which means indenI personally believe that there are two types of robots, tured servant or slave. The first known use of the word simple and complex. A simple robot is anything that is man“robot” is from a 1920s short play written by a Czech made and designed to accomplish a set of tasks. A complex playwright Karel Capek, entitled “R.U.R.,” which stands for robot is a simple robot that has some level of intelligence/ “Rossum’s Universal Robots.” In this play, the robots features that enables it to react to its changing environment eventually turn on their masters, which has become a so it can accomplish its tasks. Quite a variety of definitions for the same word, and it major theme in most movies that have robots as one of the only diverges from there depending on who you talk to. main characters. There are many definitioins of what a robot is. There are far too many people that believe that if it is not Webster’s New World Dictionary defines a robot as, “any autonomous, it is not a robot. They believe that remote-controlled vehicles are not robots because they are only doing what the human operator is telling it. But Figure 1. Pull-up and pull-down resistor configurations used to isn’t an autonomous robot the same thing? It was ensure the input states are at known values. programmed by a human being to do what the human wants it to do and react to stimuli in such a +5V +5V way that the human programmer wanted it to react. The autonomous robot is doing exactly what the human designer wanted it to do but at a later 10 kΩ OPEN: INPUT = 0V time from when it was created. A remote-conR1 CLOSED: INPUT = 5V trolled vehicle just responds quicker because of the direct human reaction. But then again, the rovers INPUT INPUT on Mars react to human commands hours after they were given. OPEN: INPUT = 5V Regardless of what people think, if you 10 kΩ CLOSED: INPUT = 0V R1 designed and built it, whether it is mechanical, electrical, or virtual, and it is designed to accomplish some task for you, it is a robot. Remember the origins of the word robota, which loosely translates to servant. If your man-made creation is accomplishing PULL-UP RESISTOR PULL-DOWN RESISTOR some task for you, it is serving you, thus it is CONFIGURATION CONFIGURATION a robot.

74

SERVO 05.2005

MrRoboto.qxd

4/6/2005

3:06 PM

Page 75

Q

.I have been having a lot of fun making ant-weight robots and competing with them. I usually use the electronics from old RadioShack remote-control cars in my robots. One of the problems I have noticed is that when I point the antenna right at my robot, it starts to act crazy. It is not a big deal, but do you have any idea why this happens? — David Flanigan Los Angles, CA

A

.Actually, this problem is quite common, and can be seen in transmitters — anywhere from the inexpensive ones from RadioShack to the top-of-the-line units from Futaba. Basically, the energy pattern that leaves an antenna looks something like a donut with the antenna passing through the center of it, where the radio waves are leaving the surface of the antenna radially (perpendicularly). There is very little to almost no energy leaving the antenna from its tip. When you point the antenna at your robot, there is almost no radio energy that reaches your robot that is directly from the antenna. Most of the radio energy is transmitted away from your robot. The signals that your robot eventually does receive will be reflected signals off of the ground and other structures. These signals are weaker than the original signals; the receiver may not respond to them or it may receive more than one reflected signal (bouncing off of more than one wall). This may cause the robot to get out of phase with itself, thus causing it to respond erratically to the original signal. When working with any radio-controlled robot, make sure that you hold your antenna parallel with the antenna that is on your robot. This will ensure that the maximum amount of radio energy gets to the receiver’s antenna. One way to prove this is to take your robot to a large field, where there are no trees or buildings to reflect the radio waves back to your robot. Then see how far away you can get from the robot and still control it when the antenna is pointed directly at the robot and when the antenna is oriented parallel to the robot.

Q

.I am wondering if you can help me figure out why my robot occasionally thinks it is hitting a wall when there is nothing there. I am using eight lever switches that tell the robot to move away from whatever it bumps into. I have the switches directly wired between the battery and a BASIC Stamp. I have been wondering if this might be related to static electricity, because it usually happens when it is running on the carpet. — Louis Sharp Culver City, CA

A

.Without seeing the robot myself and based on the description you gave me, I am going to assume that the problem may be related to not using a pull-up or pull-down resistor with your switches. When the robot is touching an obstacle, the switch is

Figure 2. Memsic 2125 accelerometer module. closed and five volts are applied directly to the BASIC Stamp. The Stamp will interpret this as the switch being closed and respond accordingly. The interesting thing occurs when the robot is not touching the obstacle and the switch is open. Many people assume that the Stamp’s input will be reading zero volts, but this is not always the case. The only thing you know for sure is that the original five volts are not being applied to the Stamp’s input. In reality though, there is no current, but the voltage can be anything. You said that you notice this problem more often when the robot is running on the carpet. That gives me an indication that a small charge may be developing on the switch that will begin to look like a voltage, and when it reaches a certain minimum threshold, the Stamp will assume that the switch has closed. A BASIC Stamp will assume any voltage about 1.5 volts as being a Logic 1. All digital logic circuits have to respond to these types of situations. What people do to ensure that the voltage is zero when the switch is open is to add a pull-down resistor to the switch. Figure 1 shows a simple schematic for both pull-up and pull-down resistors. The 10-kilohm resistors are known

Figure 3. Memsic 2125 pulse output.

T1

T2 SERVO 05.2005

75

4/5/2005

10:09 AM

Page 76

X-AXIS

MrRoboto.qxd

+5V

MEMSIC 2125 T-OUT Y-OUT (TO P1 ON STAMP)

1

6

2

5

3

4

Y-AXIS

X-OUT (TO P0 ON STAMP)

volts. When the switch closes, the input sees zero volts. Hence, the pull-up term comes from the fact that the voltage is pulled up to five volts when the switch is open. These two configurations ensure that the input voltage states are always known. Hopefully this will help solve your problem.

Q

.I would like to be able to determine Figure 4. Memsic 2125 accelerometer test setup. just how much my robot is tilting when it is as the pull-up and pull-down resistors. In the pull-down congoing up hills. Some friends have suggested that I use figuration, when the switch is closed, the input sees five the ADXL210 accelerometers from Analog Devices, but their volts as expected. When the switch is open, the input is geometries are impossible to work with. Do you, by any forced to zero volts, because it is connected directly to chance, have some other suggestions and can you show me ground through the resistor. It is not allowed to float to any how to use them? voltage level. The term pull-down comes from the voltage being pulled —James Boarding down to zero volts when the switch is open. In the pull-up New York, NY configuration, when the switch is open, the input sees five .The ADXL210 accelerometers from Analog Devices (www.analog.com) are fine accelerometers and are fairly popular, but their small size, geometry, and lack of pins do make them fairly difficult to work with on regular breadboards. My suggestion would be that you take a look at the Memsic 2125 accelerometer from Parallax (www.parallax.com). This accelerometer is placed on a convenient six-pin DIP package so they are easy to interface in your projects. Figure 2 shows a photo of one of these sensors. This sensor has two axis of measurements oriented 90 degrees apart. By mounting the sensor vertically, you will be able to measure your robot’s tilt by using an arctangent function. All that is required to use the sensor is to measure the pulse width from the two axes and then convert that information into acceleration (see the formula below). Figure 3 shows the output from both axes. T1 is the measured pulse width, and T2 is the pulse period. These sensors are calibrated so that T2 is equal to 10 ms at 25 degrees C. If you want, you can measure the period also.

A

aaxis = 8

(

T1 T2

- 0.5

)

Take a look at Figure 4. It shows a simple schematic for hooking one of these sensors to a BASIC Stamp, and the source code shown below is a simple program that illustrates how to use the sensor and output its results to a debug window.

76

SERVO 05.2005

Circle #122 on the Reader Service Card.

MrRoboto.qxd

4/5/2005

10:10 AM

Page 77

Xtemp = ABS(Xaxis)

‘ {$STAMP BS2p} ‘ {$PBASIC 2.5} ‘ ‘ ‘ ‘ ‘

This program will calculate a title angle for the Memsic 2125 accelerometer. This program is based on the sample program provided with the accelerometer.

Xin

PIN

0

Yin

PIN

1

Xaxis Yaxis Xtemp

VAR VAR VAR

Word Word Word

Ytemp

VAR

Word

brads

VAR

Word

degrees

VAR

Word

‘X-axis input from Memsic 2125 ‘(X-out, pin 6) ‘Y-axis input from Memsic 2125 ‘(Y-out, pin 2) ‘X-axis pulse measurement ‘Y-axis pulse measurement ‘temp variable for X-axis ‘calculations ‘temp variable for Y-axis ‘calculations ‘Binary radians 0-255 brads in ‘1 revolution ‘Tilt angle

Init: ‘Open DEBUG window open PAUSE 250 DEBUG “Memsic 2125 Rotation”, CR Main: ‘Main program loop DO PULSIN Xin, 1, Xtemp ‘Read X-Axis pulse width PULSIN Yin, 1, Ytemp ‘Read Y-Axis pulse width ‘Convert to 1/1000 g since Stamps are limited to 16 ‘bit math ‘When using BS2 and BS2e use the following formula ‘ Xaxis = 8*Xtemp/5-4000 ‘ Yaxis = 8*Ytemp/5-4000 ‘When using BS2p use the following formulas Xaxis = 3*Xtemp/5-4000 Yaxis = 3*Ytemp/5-4000 brads = (Yaxis/16) ATN (Xaxis/16) degrees = brads*180/128

N

e

‘Calculate the ‘B-Radian angle ‘Convert to ‘degrees

‘Convert any negative numbers to ‘positive Ytemp = ABS(Yaxis) ‘numbers to simplify the integer ‘math. DEBUG CRSRXY, 0, 2 ‘Display the results in a Debug ‘Window. DEBUG “Axis A(g)”, CR, “X “, (Xaxis.BIT15 * 13 + “ “), DEC Xtemp/1000, “.”, DEC3 Xtemp//1000, “ g”, CR, “Y “, (Yaxis.BIT15 * 13 + “ “), DEC Ytemp / 1000, “.”, DEC3 Ytemp//1000, “ g”, CR, CR, “Tilt = “, DEC3 brads, “.”, DEC1 brads//1000, “ Brads”, CR, “ “, DEC3 degrees, “.”, DEC1 degrees// 1000, “ Degrees” LOOP END

This sensor only provides one tilt angle. By using two of these sensors, you can determine forward/backward tilt and sideways tilt. To do this, place two sensors where both x-axes are parallel and point toward the front of the robot. On one sensor, the y-axis will lie flat on the base of the robot, pointing to the left, and the other sensor will have the y-axis pointing upwards, 90 degrees from the other y-axis. The axis that is pointing up will now be known as the z-axis. The pitch angle (forward/backward) will now be the angle between the z-axis and the x-axis, and the roll angle will be the angle between the z-axis and the y-axis on the robot. With about 10 lines of code, you will know all of the angular orientations of your robot. Now keep in mind that these sensors are accelerometers; the angles will be skewed if the robot is accelerating or hitting bumps. You are probably going to need to do some time-averaging of the measurements so that these momentary accelerations/ bumps can be filtered out of the final results. SV

w

KHR-1 Robo-One Robot Kit These awesome kits are the latest craze in Japan. Robot has 17 motors for fluid movements. Programed and Controlled via PC. Upgradable to Bluetooth wireless.

BROUGHT TO YOU BY WWW.SOZBOTS.COM Circle #136 on the Reader Service Card.

SERVO 05.2005

77

Events.qxd

4/6/2005

1:53 PM

Page 78

Send updates, new listings, corrections, complaints, and suggestions to: [email protected] or FAX 972-404-0269 I've been asked for some tips for new robot clubs planning their first contest. Well, I aim to please. Here are a few pointers. Take a look at what other clubs are doing. It's much easier to adopt or adapt a proven contest format than invent something totally new. Start simple. A simple contest in which a lot of members can participate and complete is better than an overly-complex contest that no one is able to complete. You can always add a more complex contest later. One model of gradually increasing complexity is provided by the Dallas Personal Robotics Group. They start with "Quick-Trip," which involves the simplest navigation problem of moving from point A to point B and back again. The challenges involved in such basic navigation skills come as a surprise to many first time robot builders. After completing Quick-Trip, DPRG robots graduate to T-Time which involves a T-shaped course with three points: A, B, and C. From there, the addition of a gripper allows robots to enter "Can-Can," in which they must locate and retrieve soda cans. Where do you go from there? How about the Seattle Robotics Society Robo-Magellan. It requires all the skills developed in the above contests but also relies heavily on vision processing, obstacle avoidance, and waypoint navigation. Several robot groups have started holding Robo-Magellan contests and they are proving to be very challenging. If you can complete this one, you're probably ready to move on to the DARPA Grand Challenge. One last suggestion for anyone working on new contest ideas: make the goals as general as possible. Contests with very specific goals and complex rules result in robots that can only do one thing well. It's better to use general goals and minimal rules to guide the robot builder toward a more creative and general-purpose robot that may be useful in the real world. — R. Steven Rainwater For last-minute updates and changes, you can always find the most recent version of the Robot Competition FAQ at Robots.net: http://robots.net/rcfaq.html

M ay 2 0 0 5 6

78

Alcabot University of Alcala, Madrid, Spain SERVO 05.2005

Includes several events related to the Eurobot program. www.depeca.uah.es/alcabot

6

TEAMS (Technology Education Alliance with Middle Schools) Applied Physics Lab, Johns Hopkins University, Laurel, MD TEAMS looks like a new group trying to get in on the FIRST/BEST action. Like those more familiar events, TEAMS consists of mentors helping groups of students build robots that compete against each other. So far, it looks like TEAMS participation is limited to Maryland. www.theodysseyschool.org/~teams

11

Micro-Rato University of Aveiro, Aveiro, Portugal Micro-rats are similar to the more familiar micromouse, just a bit larger. http://microrato.ua.pt

14

Historical Electronics Museum Robot Festival Historical Electronics Museum, Linthicum, MD This local event is new to the robot competition list but it's actually their sixth year to hold the Robot Festival. They have a wide range of events including: Sumo, Fire-fighting robots, FIRST, LEGO Mindstorms, and even some "robot" combat for those who like to see radio-controlled vehicles crash into each other. www.robotfest.com

14

LVBOTS CHALLENGE Rancho High School, Las Vegas, NV Events include line following, line maze solving, and mini Sumo. www.lvbots.org

14

Western Canadian Robot Games Southern Alberta Institute of Technology, Alberta, Canada This will be the 15th annual event for one of the longest running robotics competitions in North America. www.robotgames.net/robot_society.htm

Appetizer.qxd

4/6/2005

1:46 PM

Page 79

Flashing the Lights by James Antonakos always tell students that I became interested in electronics to learn how to flash lights. Something about the on and off flashing of lights just got my attention. So, over the course of the past 20-odd years, I have worked on numerous projects that had their fair share of flashing lights, from multiplexed seven-segment displays, scrolling-text messages on dot-matrix LED displays, and even a 4,000-watt display that contained 384 25-watt, 120-volt AC light bulbs, all controlled with only three wires. Of course, along the way, I picked up a few other tricks. How did I do it? I built lots of circuits and created clouds of smoke when things went wrong. I read lots and lots of magazine articles and books, and I took plenty of things apart (without being able to get them back together when I was younger). When I became interested in electronics there was no Internet, so it was harder to locate a circuit similar to what you needed. I built a large number of RadioShack electronic kits. As a teenager, I read Popular Electronics, Radio Electronics, BYTE magazine, and even QST, a ham radio magazine that had interesting schematics in it. I looked at the schematics and read the descriptions of how they worked. Lucky for me, my scoutmaster was an electrical engineer (and also a math teacher), and he introduced me to analog and digital electronics, and exposed me to my first programming language, APL. He had also designed and built his own telephone answering machine (relatively new back in those days). It was a 19-inch, rack-mount chassis brimming with time-delay relays. I regret losing

I

the schematic he gave me, but I sure studied it while I had it. I have learned a great deal about how to design circuits by examining other people’s designs. It is the electronic equivalent of a crossword puzzle, where the blanks are answers to such questions as, “Why is that component used,” and “What is the purpose of that signal?” All through my adult life, I have had the good luck to work with people who were positive, hard-working, and enthusiastic about their jobs. These individuals shared their time and talent with me, teaching me about new things, challenging me, working with me to develop new applications or investigate existing devices. These individuals were my professors, my colleagues, business associates, and even friends. My first office mate when I was a new faculty member was Michael Coppola. He was the same age as me and had already been at the college for three years. During my first semester, Michael and I taught two sections of the same electronics course, where we covered DC and AC amplifier design

and analysis, frequency response, and active filters. I learned a great deal that semester by simply meeting with Michael for five minutes between classes (he taught the first class, I taught the second), where he would describe what he did during his lecture. I would go and do the same lecture myself and meet with him again afterwards to review. Michael figured out things that stumped me and showed me more about analyzing amplifiers than my four-year professors had. During our free time, we took an interest in the National Semiconductor Digitalker chip and spent weeks investigating how it worked. At one point, we hooked up a chart recorder to the audio output and slowed the Digitalker’s clock speed down considerably. We captured the audio waveform on the chart recorder and studied it. We learned there was a mirror symmetry in the waveform, which was a surprising discovery. Michael and I did many other experiments with audio and digital circuitry, and had a great deal of fun doing them. One professor, in particular, changed my life forever by inspiring me to become a teacher and to write my first book. This was Alan Dixon, my first electronics professor. Alan allowed me to take his digital electronics course (a senior-level course) before I even entered his department. This was rather nice of him, considering I was flunking out of college and wasting away in a different degree program that did not interest me while earning lots of Ds and Fs. Alan allowed me to take his digital course without any prerequisites, SERVO 05.2005

79

Appetizer.qxd

4/7/2005

11:40 AM

Page 80

because I told him I had built my own 8080-based S-100 computer in my basement. Those of you old enough to know what I just said will understand that Alan’s course on 8080 assembly language and digital electronics was right up my alley. After earning an A that semester, I finally had something no other college course had given me: confidence. Two years later, I graduated from Alan’s department and headed to RIT to work on my BSEE. Right before I left, I said to Alan, “Hey, do you want to write a book?” Now, 21 years later, I am a professor, teaching in Alan’s old department,

having written books on many different technical subjects. I was lucky to have Alan while I was a student and then to be able to work with him later as a colleague. Alan contributed heavily to my training as a faculty member. If I gained anything from my years of working by his side, it was that you should think big and make it interesting. My teenage world of video games included games like “Space Invaders,” “Asteroids,” “Donkey Kong,” and “Tempest.” Like any good geek, I sent away for the schematics of the game, having convinced the supply company I was an authorized service technician. I studied those game schematics for hours, learning many things about processor interfacing, video generation, and sound processing. There was something exciting about looking at the circuit board for a new video game, as they were as large as baking sheets back then and crammed with a couple hundred integrated circuits. Now, it can all be done on the PC with clever software and built-in sound and video. But back then, I managed to

find work at three different video game arcades, fixing pinball machines and video games. Even though I got fired for allowing my friends to play for free, it was fun being around all that electronic technology. At some point, it became apparent to me that the light flashing could be accomplished through a dedicated hardware circuit or through a simple hardware interface and a computer program. Assembly language, Basic, C, and other languages became part of my toolbox, as I began to use software to control my hardware. I also realized that the core of my fixation with flashing lights was something much simpler, and that is my need to know how things work. I just like to know. Lots of times, when I see some interesting electronic gizmo, I try to design and build one myself (after peeking under the hood, if I can). This interest in reverse engineering and creating things that do not exist extended itself into the areas of speech synthesis, data compression, error detection and correction, computer networking, image processing, and many other areas that fascinate me.

The Most Intelligent Servos on the Planet For Animatronics and Robotics Positioning and Continuous Rotation Models

www.i-Servo.com

T E X A S A R T RO B OT S H A N D M A D E

I N T E L L I G E N C E

UNIQUE LIMITED EDITIONS INTELLIGENT & AUTONOMOUS HAND CRAFTED

.

.

WWW A RT BOTS COM

80

SERVO 05.2005

Electronic Parts & Supplies Since 1967

For the finest in robots, parts, and services, go to www.servomagazine.com and click on Robo-Links to hotlink to these great companies.

Appetizer.qxd

4/6/2005

1:47 PM

Page 81

Once, during a student trip to the Boston Museum of Science, I saw a human reaction time circuit. I thought it was interesting, so I went back to my college and built one with a student. Students still play with it every day as it is mounted in the hallway on our floor right next to the water fountain. I spent over 15 years working parttime on a Ph.D. in computer science (I am not finished yet), taking courses, performing research, learning more about computers than I ever imagined, and being exposed to many things not in the orbit of an electrical engineer. I put in this time voluntarily, as my job does not require it. I did it for the fun of it, because I was interested in the new material. I used my new knowledge from my Ph.D. courses to add content to several of my college courses, and wrote several books with it, as well. In addition to Alan Dixon (whom I wrote my first book with) is my other co-author, Kenneth Mansfield. Ken and I have challenged each other greatly over the years, beginning as student lab partners, working on our two-year degrees, and continuing to this day as professors in the same department. My interest in flashing lights has evolved to the point where the flashing is controlled over the Internet by a TCP/IP application and a small embedded Web server module. Ken found the Web server modules and ordered a few to play with (he likes to experiment with new gizmos, too). We interfaced a single seven-segment display to the

module, and Ken wrote a simple TCP/IP application to flash numbers on the display. Ken and I trade program revisions back and forth, making the Internetbased flashing circuit do some new trick each time. Right now, we have it programmed to flash the IP address of Ken’s game server to both of our houses every few minutes. As I wrote this article, the display flashed silently above me several times. If I am successful at designing and building something, the results are, at least, partially due to the fact that I like challenges and do not like to quit working on a problem until I solve it. Alan Dixon challenged me constantly, both as a student and fellow faculty member. He would get a twinkle in his eye when we were discussing something new, and he would say, “That is probably too hard for you, Jamie,” or “I’ll bet you can’t do that, Jamie.” Naturally, I had to work night and day building a new circuit or writing a new program to show him I could do it. A sample of some of my designs can be found at http://web.suny broome.edu/~antonakos_j/projects/ You will notice that there are plenty of lights involved in the projects and almost all of them are built by or with students. Most of the projects allow you to see the electronic innards that make them work. Have I been a freak all my life? A hopeless electronic and computer geek? I think so, from a very early age. I remember making a small box and

calling it the “head” of my new robot. I was five years old. A television cartoon called “8th Man,” and another called “Gigantor” (TV from the 1960s), got me really interested in robots as a child. Of course, the inside of the robot was more interesting than the outside, so that led to the investigation of electronic brains. Can you imagine how lucky I felt when I scored a tour at a local IBM facility and actually touched and programmed an IBM 360? Pure geek, but firmly on course for a future in electronics. After 28 years of evolution, post high school, what am I now, ? An electrical engineer? A computer scientist? A professor? A designer? A programmer? I think I am all of these things, and more, because I also like to hike, read, watch sci-fi movies, play with my children and friends, and talk to my wife about things above my head. Will I continue trying to come up with new ways to flash the lights? You bet I will. I owe my way of life to my pursuit of flashing lights and all the wonder behind why we choose to make them flash. SV

AUTHOR BIO James Antonakos is a Professor in the Departments of Electrical Engineering Technology and Computer Studies at Broome Community College. You may reach him at antonakos_j@sun ybroome.edu or visit his website at www.sunybroome.edu/~antonakos_j

Advertiser Index Abacom Technologies .........................31 IMService ..............................................54 R4 Systems, Inc......................................33 All Electronics Corp. ............................55 Jameco ............................................47, 83 RadioShack .............................................9 AnyChip ................................................16 Labjack ..................................................35 Resources Un-Ltd. .................................71 AREXX Engineering ..............................21 Lemon Studios .....................................35 Robotics Group, Inc..............................25 BitScope ................................................17 Lynxmotion, Inc. ...................................69 RobotShop ...........................................66 Cook’s Institute .....................................76 Madell Technology ..............................23 Smithy.....................................................55 CrustCrawler ...........................................7 Net Media ...............................................2 Solutions Cubed....................................27 Electronic Goldmine ............................50 NUBOTICS .............................................55 Sozbots..................................................77 Enigma Industries .................................55 Parallax, Inc. ...........................Back Cover Technological Arts ...............................41 Garage Technologies ...........................55 PCB123/PCBexpress ...............................3 Tetsujin 2005 ..........................................11 HiTec ......................................................59 PCB Fab Express ...................................58 Vantec ...................................................57 Hobby Engineering ..............................65 Pololu Robotics & Electronics .............39 Zagros Robotics ...................................55 SERVO 05.2005

81

ThenAndNow.qxd

4/6/2005

1:57 PM

Page 82

THEN AND NOW

by Tom Carroll

Tomy Omnibots

1984, Lou Gostinger, marketing Imendirector for Tomy Corporation, called about a new line of robots that his company was developing. They had marketed several “robot” toys prior to that but were now interested in promoting a real robot that adults would find interesting and useful. They had a series of unique toys, such as a robot owl called “Hootbot” and a rather cute dog robot called “Spotbot” that really didn’t do a lot. Later came the “Verbot” talking robot that began to pique the interests of serious robot experimenters. The Omnibot arrived on the scene in 1984. At a price of $250.00, it was their first attempt at a serious home robot. During the conversation, I could sense that Lou wanted our Robotics Society of Southern California group to see and evaluate their latest and best, the Omnibot 2000. (Remember when the year 2000 was the future?) He brought several to one of our meetings. It was an instant hit with the members, but in later conversations, we all agreed that the attraction was for its ability to be hacked rather than for its out-of-the-box usefulness. One

82 SERVO 05.2005

of our members quickly did some measurements and determined that a small 6502 processor board would neatly fit into the base. We didn’t have to wait long before Tomy brought out an experimenter’s base called Homer. The $495.00 Omnibot 2000 was a great improvement over the original Omnibot. It stood quite a bit taller and seemed closer to a more useful personal robot than the previous models. The best part — as far as we experimenters felt — was its three-axis arm (only the right arm was motorized) that could grasp a soda can and pour it into a cup. If you had attached the motorized tray to the robot’s front, the tray could move several cups in an oval pattern. This was all accomplished by remote control, but hackers soon had the arm under control of a John Bell 6502 microprocessor board and programs that could be stored on the builtin tape deck. Tomy Koygo Co., the Japanese parent of Tomy, was trying to pull away from the “toy” image of its robot products with another robot called “Hearoid” from a Tomy offshoot company called TTC, Tomy Technical Corporation. This cute little robot made its debut in mid 1985 and was similar to the original Omnibot. The $395.00 Hearoid could be controlled by the user’s voice and also had a grasping hand, a removable carrying tray, and a built-in tape deck. Voice controls could operate all the movements, lights, and tape deck. One of the most interesting products to me was the Homer robot project base. At about the size of a fat bathroom scale, the $150.00 base was an experimenter’s ideal platform. With six driven wheels, an ultrasonic controller (remember when TV controllers were ultrasonic and not IR?) that could make it go forward and reverse, turn right or left, and even “return to

home.” I saw what I think were prototypes but never saw them in production. TTC also had a B&W TV camera attachment that could be used on the Homer or Hearoid at $350.00. Sometime around 1986, I got a call from Mary Woodworth of Tomy, asking if our robotics group would be interested in buying off some of their stock of robots, as they were no longer selling that well. I could hardly get the word “yes” out of my mouth, as saliva was dripping onto the phone. At their Wilmington warehouse, I managed to stuff six Hearoids, two Omnibot 2000s, some miscellaneous robots, and robot parts into my car without sounding too greedy. Hey, I’m sure she saw right through me when they only cost me $5.00 each, plus several free broken 2000 motorized arms. Others of our group bought all they could haul home. I managed to use several of mine as “action props” in the movie Automatic and as still props in I Robot. I’ve seen the Tomy robots on eBay and all over the Internet. I highly recommend them as an easily hackable robot, as well as an amazing toy of yesteryear. SV

CoverInside.qxd

4/5/2005

7:55 PM

Page 2

Remember when... ...electronics stores were stocked to the rafters with every component imaginable and there was

ALWAYS

a knowledgeable person there to help you?

Think those days are gone? Well they’re not! You just need Jameco!

Great Products. Awesome Prices.

1.800.831.4242

Call for a FREE 256-page catalog today. We have the electronic components and knowledgeable Technical Support people who can help bring back the fun in your electronics hobbies, inventions, and DIY projects. Circle #36 on the Reader Service Card.

Be sure to visit our new website at

www.Jameco.com/nvd

Jameco Electronics —where electronics is still fun! Circle #37 on the Reader Service Card.

Cover.qxd

4/7/2005

2:24 PM

Page 84

Vol. 3 No. 5 SERVO MAGAZINE ROBOTS TO THE RESCUE MAY 2005

U.S.

CANADA

$9.25 0 5>

0 Circle #40 on the Reader Service Card.

$5.50

74470 58285

4

Related Documents

Servo Magazine 05 2005
April 2020 5
Servo Magazine 02 2005
April 2020 5
Servo Magazine 01 2005
April 2020 6
Servo Magazine 03 2005
April 2020 6
Servo Magazine 04 2005
April 2020 5
Servo Magazine 2007-12
November 2019 11