Servo Magazine 04 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 04 2005 as PDF for free.

More details

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

3/10/2005

3:46 PM

Page 84

Vol. 3 No. 4 SERVO MAGAZINE REAL-WORLD ROBOTS April 2005

Circle #40 on the Reader Service Card.

CoverInside.qxd

3/10/2005

4:26 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

3/9/2005

Circle #38 on the Reader Service Card.

9:28 AM

Page 3

SV TOC.qxd

3/11/2005

10:20 AM

Page 4

SERVO Features & Projects 27 Reusable Robot Software Part 3: Navigation

34

For the New Roboticist

41

A Hobby CNC Milling Machine

46

Neural Networks 101

52

The Mini Servo Walker

58

Exoskeletons

62

The Robotic Waiter

Part 1: Common Errors in Building Robots Part 1: Platform Construction

22

Introduction to Artificial Neural Networks Part 2: Adding Power and the Brain What Are They Good For? Servos Serving Drinks

52

On The Cover The ever-popular ASIMO android from Honda displays his agility on our cover by balancing on one foot. Photo courtesy of Honda.

78

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, 430 Princeland Court, Corona, CA 92879-1300 or Station A, P.O. Box 54,Windsor ON N9A 6J5; [email protected]

SV TOC.qxd

3/11/2005

10:21 AM

Page 5

“Asimov thought that they would have a robotic intelligence — an AI that would function as a sentient, interactive [robot] — by 2030. What would it be like to have a being that from its very inception was curious, intuitive, drawn to certain things, fascinated by certain things?” —Robin Williams, actor

Departments 6

Mind/Iron

7

Bio-Feedback

10

New Products

51

Robotics Showcase

56

SERVO Bookstore

72

Brain Matrix

77

Events Calendar

79

Robo-Links

81

Advertiser’s Index

The Future of ASIMO Where You Have a Voice The Latest Project Parts Get What You Need Quick Feed Your Brain DIP Microcontrollers Find a Show Near You Your Link to Parts and Services A List of Supporting Advertisers

4.2005 VOL. 3 NO. 4

Columns 8

Robytes News from the Robotics World

12

Rubberbands

16

Robotics Resources

22

GeerHead

66

Lessons from the Laboratory

69

Assembly Line

74

Ask Mr. Roboto

78

Appetizer

82

Then and Now

Holonomic Drive Platforms Searching for Stepper Motors The RoboCoaster G2 Interview with Steve Hassenplug Parts Inspection, Round #2: Motors Your Problems Solved Here Why Do Most Women Hate Robots? A Look Back at the Androbot TOPO

Coming 5.2005 Five Robots That Could Save Your Life The advancement of robots has moved well beyond the battle arenas and into the practical applications they were truly meant for: aiding man in tasks that were once thought impossible.

Mind-Feedb.qxd

3/10/2005

3:37 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 www.servomagazine.com

Mind / Iron by Ryan Lee Price Œ ust when you thought you couldn’t get enough of Honda’s ASIMO (the one we’ll forever after refer to as “the original”), they’ve announced the development of new technologies for the next-generation humanoid robot. The main focus will be to achieve a new level of mobility that will better enable ASIMO to function and interact with people by quickly processing information and acting more nimbly in realworld environments. Since Honda rarely does anything low-key or in a mundane fashion (except for their new Civic, of course), they’ve decided to pack ASIMO with a whole slew of new improvements (well, three actually, but they’re big changes) that will usher in an higher level of robotic autonomy. Essentialy, when the new and improved ASIMO takes his first step, we’re that much closer to having one in our living rooms. Much like the Six Million Dollar Man, the revamp will make it faster, stronger, and more powerful than ever, literally. At 119 lbs, it has gained five pounds and grown 10 cm in height to 130 cm. ASIMO’s power can last twice as long as before (now one hour) and it enjoys 34 degrees of freedom over the 26 in the original ASIMO. The combination of newly developed, more responsive hardware and new posture control technology will enable ASIMO to proactively bend or twist its torso to maintain its balance and prevent the problems of slipping at higher speeds. Believe it or not, ASIMO will be capable of running at a speed of 1.8 mph (making itself airborne approximately 0.05 seconds during each stride), and the walking speed has been increased from the previous one mph to 1.5 mph. Depending on one’s speed and the airborne time, when a human runs (we’ve been doing it for more than a million years), the step cycle is 0.2 to 0.4 seconds, and the

J

6

SERVO 04.2005

time both feet are off the ground varies between 0.05 to 0.1 seconds. By comparison, the step cycle of ASIMO (who has only been doing it for a couple of years) is 0.36 seconds with an airborne time of 0.05 seconds. In order to run, a robot (and people alike) has to be able to repeat the movements of pushing off the ground, swinging its legs forward, and landing within a very short time cycle and very little time spent processing information as to where it is stepping. As well, it has to absorb the impact of the landing. With the newly developed processing circuitry and highpower motors — in addition to lightweight but very rigid legs — ASIMO can process these motions four times faster than that of the previous model. It can not only run, but it knows where it’s going, too. The next-generation ASIMO can maneuver toward its destination without stopping to compare any changes between its input information and the information about the surrounding area obtained from its sensors. As well, ASIMO can now autonomously change its path when its floor sensor and visual sensors located in its head detect obstacles. By detecting people’s movements through its visual sensors and kinesthetic sensors added to its wrists, ASIMO can now move in sync with people around it, making it able to give or receive an object, shake hands more naturally with a person’s movement, and step forward or backward in response to the direction its hand is pulled or pushed. By continuing to advance these new technologies, forward-thinking companies such as Honda (and the 75 others in the bigname robot race) will soon develop equipment and technology that will be useful to people. And isn’t that what this is really all about? SV

Subscription Order ONLY Line 1-800-783-4624

PUBLISHER Larry Lemieux [email protected] ASSOCIATE PUBLISHER/ VP OF SALES/MARKETING Robin Lemieux [email protected] EDITOR Ryan Lee Price [email protected] CIRCULATION DIRECTOR Mary Descaro [email protected] WEB CONTENT/STORE Michael Kaudze [email protected] PRODUCTION/GRAPHICS Shannon Lemieux STAFF Dawn Saladino Corrie Panzer 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 subscription orders, correspondence, UPS, overnight mail, and artwork to: 430 Princeland Court, Corona, CA 92879.

Mind-Feedb.qxd

3/11/2005

10:24 AM

Page 7

ROV Control

Animatronics vs. Robotics

I was wondering if you might consider delving into ROV and teleoperation in the “how-to” section of your magazine. Though not technically a robot, an ROV does employ many systems that could be put into use on a true robot. Of particular interest to me is stereo-vision (two cameras transmitting on different frequencies and the operator wearing an HMD, consisting of two LCD screens) and vibration detection (possibly a metal ball bearing in a curved section of pipe making contact with electrodes as the land ROV passes over rough terrain. The operator could feel this at the control station with a large speaker mounted to the chair). Any discussion would be much appreciated. Erik Zavrel Via Internet

I just wanted to let you know that I subscribed to this magazine with the hopes that it will include valuable information on building and programming servo-driven animations, and not specifically robots ... which I have very little interest in. What I should say is that I could not care less about robotics, yet I love animatronics. I hope that you will take this into consideration as you move forward. Erich Neugebauer Via Internet

Bracket Control I want to build a servo-controlled robot like KHR-1, but my problem is the body. How do you make the brackets that hold all the servos together? Do you know a place where they sell only brackets like a kit? Any information would be appreciated. Erick Soto Via Internet

Article Wish List How about less articles about BEAM and more about real robotics based in reality and not marketing hype. Articles based upon real world problems in robotics such as navigation, object recognition, color vision, etc. Disgruntled Via Internet How about a straightforward article on getting PWM going on an AVR. Try for the life of me, I can't quite get the hang of working the interrupts. C or Bascom would be great. Mark Weston Via Internet

Circle #61 on the Reader Service Card.

HELP!! If you’re not seeing the types of articles you’d like, let us know! Tell us the topics that you enjoy the most. Tell us what you’d like to learn. Are you a software or hardware guy? Are you totally new to robotics and don’t know where to start? What sort of robots would you like to build as part of a continuing series? How about considering submitting an article yourself? You may be more of an expert than you think! Did you figure out a killer fix for a problem you were having with some part of your robotic system? Are you participating on a team or in a club where you’ve got some unique experiences or insight you could share with your fellow roboticists? If you have general questions or comments about SERVO Magazine, please contact us: SERVO Bio-Feedback, 430 Princeland Court, Corona, CA 92879; or email: feedback@servo magazine.com Better yet, go to our website at www.servomagazine.com and check out the writer’s guidelines. You’ll get paid for your printed submissions. Look at this as an opportunity to make a difference in the development of robotics and make some extra cash for your own projects!

SERVO 04.2005

7

Robytes.qxd

3/9/2005

5:49 PM

Page 8

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

Virtual Robot Available 24/7

The virtual robot Maria, who claims to have an IQ of 250. Photo courtesy of the University of Auckland.

We normally think of bots as entities with a substantial mechanical presence, but the concept of artificial intelligence is surfacing in the form of virtual bots. Students at the University of Auckland (www.auck land.ac.nz), for example, may soon get academic support from “Maria,” an assistant teacher whose physical existence is limited to your computer monitor. The creation of Shahin Maghsoudi and Dr. Tiru Arthanari, she has “a vocabulary of 203,000 words, a repertoire of 106,000 grammatical rules, and 118,000 rules of logical interference.” The goal in creating Maria was to create an electronic “assistant” who would be available 24/7 to answer multiple student questions simultane-

8

SERVO 04.2005

ously as if they were having one-to-one conversations. The results are mixed, but often amusing. For example, I asked Maria to tell me the color of an orange, and she promptly replied, “Blue.” She also believes that lemons are red, but Maria is not stupid and, in fact, claims to have an IQ of 250. When asked to define reality, she replies, “Reality appears to be an illusion I created to contain human clients.” You have to suspect that this is a programmed answer rather than deductive reasoning, but it’s still pretty good. If you want to talk to Maria in person, just log onto www.robot-host ing.com You can also chat with some of her siblings, including Ayla, who is presented as a mermaid with the Weber Brothers Circus, but when pressed, will admit that she is really Maria. What appears to be a more attractive version also appears at www.intellibuddy.com and this one speaks to you. However, she firmly believes that oranges are black and gets pretty rude if you disagree with her. All in all, it’s a lot like trying to reason with someone at the Department of Motor Vehicles.

by Jeff Eckert Flying BEARs Pass Tests Since 1996, the University of California, Berkeley (www.berkeley. edu), with support from the US Army Research Office, the Office of Naval Research, and the Defense Advanced Research Projects Agency (DARPA), has been working on the development of autonomous helicopters via the Berkeley Aerial Robot (BEAR) program. In 2003, it began to focus specifically on obstacle avoidance problems as applicable to DARPA’s Unmanned Combat Armed Rotorcraft program, which aims to integrate autonomous unmanned aerial vehicles (UAVs) in combat and reconnaissance missions. The technology, however, is adaptable to a wide variety of applications, including automated search-and-rescue missions, inspection of power lines and pipelines, fighting wildfires, and taking photos of you driving around with a beer in your hand. At last report, the researchers had managed to get a 130-pound scale-model chopper to fly through a simulated “urban canyon” consisting of 10-foot canopy tents set up in a two-by-three grid. In one test, the heli-

An autonomous helicopter completes its run through a simulated “urban canyon.” Photo courtesy of UC Berkeley.

Robytes.qxd

3/9/2005

5:50 PM

Page 9

Robytes copter’s laser scanner generated three-dimensional images from which it generated its own flight path. Reportedly, the helicopter never veered more than 12 inches off the proper course. In another test, two of the UAVs successfully avoided each other by communicating their positions to a ground station, which then returned appropriate information that alerted them to each other’s presence. The helicopters then adjusted course to avoid collisions, all without human intervention. Practical implementation of these flying machines may not be as far off as you think. The UC Berkeley vehicles were adapted from commerciallyavailable, radio-controlled machines that are sold in Japan and used as crop dusters. They could be in the hands of your local police department soon.

Repairman Needed

The ROKVISS robotic arm remains flaccid on the International Space Station.

Late last December, EADS Space announced that a German-built ROKVISS (which stands for robotics component verification on the ISS) robotic arm was on its way to the International Space Station with the goal of demonstrating that dangerous and strenuous work in space usually

executed by astronauts can be done by robotic arms. ROKVISS consists of a small double-jointed manipulator arm, an illumination system, and a power supply and is supposed to test the ability of lightweight robotic joints to operate in space for future assembly work or satellite repair and servicing. “In order to be able to test the complex interplay of all components and the time sequences required An image sensor designed to approach the adaptive capabilities of the human eye. for data transmission and data Photo courtesy of Vladimir Brajovic, processing under real conditions, Carnegie-Mellon University, and Intrigue Technologies. this mission to the International Space Station is indispensable” noted Dr. Wolfgang Paetsch, ROKVISS Intrigue Technologies, Inc. (www. Project Manager at EADS intriguetek.com), are developing an SPACE Transportation (www.space. image sensor that is intended to give eads.net). robots the improved vision needed for Unfortunately, early in February, it applications outside controlled, illumiwas announced that the 11.5 million nation conditions. As a first step, they Euro (US $14,866.00) device doesn’t have created “Shadow Illuminator,” work. As of this writing, it has been which is a software plug-in that simuable to send a signal to Earth, but canlates chip circuitry. not receive a reply. Several more As it happens, neurons in our eyes attempts to kick start it are scheduled, are capable of processing information so stay tuned. before sending it to the brain. Likewise, the pixels of the new device will intercommunicate with regard to what they are seeing, allowing them Image Sensor Mimics the to modify their operation and adapt Human Eye to ambient lighting conditions before sending images to a computer Led by robot vision expert processor. Vladimir Brajovic, researchers at In this way, the sensor can generate images that show uniform illumination When applied to x-ray images (unprocessed and enhanced versions), the Shadow Illuminator software within both shadow reveals additional detail. Photos courtesy of and highlight porNikola Zivaljevic, M.D. tions of the scenery. Eventually, the concept may make robots better suited for monitoring dimly lit facilities, guiding unmanned vehicles in bad weather and combat conditions, and performing bioBefore After metric functions. SV

SERVO 04.2005

9

ArpNewProducts.qxd

3/10/2005

2:52 PM

Page 10

New Products

New Products CONTROLLERS & PROCESSORS 30-Amp DC Motor Controller

P

ololu introduces its new 30amp motor controller with multiple interface and feedback options for simplifying servo control of commonly available DC motors. The module features three independent interfaces: a serial protocol for microcontroller-based applications, a pulse-width interface for connection to hobby radio control equipment or serial servo controllers, and an analog voltage interface for simple tests and demonstrations. The new motor controller distinguishes itself from other devices in its class by offering a complete feedbackbased solution for applications requiring bi-directional,

closed-loop control. The user can select either an analog voltage feedback or a digital encoder feedback (quadrature encoding is not supported). With the two feedback alternatives, various simple devices, such as potentiometers, can be used as sensors to achieve position or speed control. The motor controller measures 2.475 x 1.175 inches and has an operating voltage of six to 18 volts, making the device well-suited for medium-sized robots and other projects. The unit price for the motor controller is $99.00, and there is free shipping in the United States. For further information, please contact:

Pololu Corporation

6000 S. Eastern Ave., Ste. 12-D Las Vegas, NV 89119 Tel: 877•7•POLOLU or 702•262•6648 Fax: 702•262•6894 Email: [email protected] Website: www.pololu.com

Circle #47 on the Reader Service Card.

SOFTWARE

STEER WINNING ROBOTS WITHOUT SERVOS!

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

P

Order at (888) 929-5055 10

SERVO 04.2005

TracEquipment

M

ustang Technologies announces the release of TracEquipment, its new equipment tracking software. In today’s business environment, it is very difficult to keep track of all the equipment that is owned by an organization, not to mention all the equipment’s information that must also be maintained. TracEquipment was designed to help organizations manage and track all their equipment, as well as equipment that has been temporarily assigned to customers and/or worksites (such as construction sites). By using TracEquipment, organizations can quickly identify all the equipment at a specific location and all the equipment assigned to a user, department, or division. TracEquipment also maintains a complete audit trail on each piece of equipment. Mustang provides a risk-free, “try before you buy” policy, which allows customers to evaluate Mustang’s products for 30 days. At the end of the trial period, customers can switch an evaluation copy and all of the data to a live copy by entering a registration code provided by Mustang. For further information, please contact:

Mustang Technologies

P.O. Box 8006 Green Bay, WI 54308 Tel: 920•265•6936 Website: www.MustangTechnologies.com

Circle #58 on the Reader Service Card.

Full Page.qxd

3/10/2005

9:38 AM

Page 11

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

3/9/2005

3:24 PM

Page 12

by Jack Buffington

Holonomic Drive Platforms: How to Drive a Robot That Has No Front

column will discuss how you can command a Thisdrivemonth’s platform that uses three or more omniwheels, which

are a special kind of wheel that has traction in the direction that the wheel rotates, but no traction to the sides. There are several kinds of omniwheels, but all of them have one main wheel and several smaller wheels or rollers around the edge. Take a look at Figures 1 and 2 for some examples of omniwheels. The cool thing that makes using omniwheels worth the extra effort is that they allow your robot to move in any direction at any time without turning. In essence, your robot won’t have a front because it will just as easily be able to drive sideways as it can forward and backward. An omniwheel drive train doesn’t look like your typical drivetrain where all of the wheels are lined up on either side of the robot and rotate along parallel axes. Instead, the omniwheels are arranged in a radial pattern around the robot’s center. Figure 3 shows some possible configurations for omniwheel drivetrains. A nice benefit of an omniwheel drivetrain that has more than three wheels is that you have some Figure 1. An omniwheel.

12

SERVO 04.2005

redundancy. As long as you retain the function of at least three wheels, your robot will be able to continue to move around holonomically. You might think that controlling omniwheels might be a Herculean task, but you would be wrong. There is some trigonometry involved, but it isn’t that hard to program. This column should make the task of programming it fairly easy if you are using a high-level language, such as C. Let’s start with the highest level of how you will drive your omniwheels. Let’s assume that you are creating a subroutine that will figure out the direction and speed for each omniwheel. You are going to give this subroutine four variables. These variables are angle, speed, twist, and offset angle. This column will treat all of these as eight-bit variables. Angle will be in binary radians (brads), which simply means that forward will be 0, to the right will be 63, backward will be 127, and left will be 191. You’ll be able to give it any direction from 0 to 255, not just the numbers listed here. Speed will be from a full stop at 0 to full speed at 255. There is no backward speed. You can accomplish that by adding 128 to your angle variable. Twist is a signed eight-bit variable in this

Figure 2. This type of omniwheel is also known as a transwheel.

Figure 3. You can have any number of omniwheels on your robot.

Rubberbands.qxd

3/9/2005

3:25 PM

Page 13

Rubberbands and Bailing Wire example, while you can Brads = degrees * 255 set this variable to be any value from -128 to 360 127, you’ll find that you will really want to limit Figure 4. Converting degrees into binary radians. the range that you give to some smaller range, such as –16 to 16. Twist causes the robot to spin around its center. If you send it a 0, then the robot will not turn. If you send it more or less than 0, then it will turn to the right or left faster as you get farther away from 0. The reason that you want to limit the range that you send is because, if you send a number too far from 0, the robot will spin so quickly that you won’t be able to drive it in any meaningful manner. Finally, there is angle offset. This is the angle in binary radians this wheel is offset from the first wheel. Figuring out the offset angle for each wheel is easy to do. For example, for the robot at the top of Figure 3, the offset angles would be 0, 120, and 240 degrees. You can measure these angles with a protractor. One thing to remember is that we are using binary radians for our calculations, so these angles convert to 0, 85, and 170 brads when you use the formula in Figure 4. For each omniwheel that you are using, you will take the input angle and add to it the offset angle. The great thing about using binary radians instead of some other range is that if, for example, you have an input angle of 100 brads and an offset angle of 170 and you add those two together you get 270 brads; however, due to how eight-bit variables work, you will overflow the register and end up with a value of 14 brads, which will work fine for your calculations! Now take your adjusted angle and perform a sine( ) operation on it. Trigonometry on a small microprocessor is a lengthy calculation. You can save a lot of time and processing power by using our good friend the “lookup table.” In

Figure 5. Another way of looking at the “lookup table.”

this table, you will have a pre-calculated list of 256 sine values. A true sine wave will oscillate between 1 and –1, but to keep these calculations simple and fast, this table will oscillate between 0 and 255; 127 will represent 0 in a real sine wave. If your motor driver code took a 0 as full forward and 255 for full backward, you could do the calculation just described for each wheel and pass it to your motor driver and have your robot go at full speed in the direction that it was being commanded. Obviously, this isn’t that useful, so what we will need to Figure 7. A graphical look at what the formula in Figure 6 does.

Figure 6. Scaling the sin( ) result to vary the robot’s speed.

result =

(

) (

sin ( ) result * speed 256 - speed + 256 2

)

TECH TIDBIT Do you sometimes find information about a cool electronic part, but can’t figure out where to buy it? Take a look at www.findchips.com This site is a central location where you can type in a part number and it will search the online inventory databases of the major electronic suppliers for matches and then display the results in a nicely formatted table. SERVO 04.2005

13

Rubberbands.qxd

3/9/2005

3:25 PM

Page 14

Rubberbands and Bailing Wire do is scale the values from the previous calculation based on the speed value that we are given. We will accomplish this using the formula shown in Figure 6. In a nutshell, this formula takes the input value and leaves it untouched if you want to go full speed. As your speed variable decreases in value, the results are scaled more toward 127, which represents the motor not turning. For those of you who are visual thinkers, Figure 7 should help you understand the function of this formula. At this point, if you were to feed the results of this formula into your motor drive subroutine, you would be able to move in any direction at any speed, but your robot would always face the same direction. That might be suffi-

cient for your purposes, but if you want to change the direction that the robot is facing, then you will need to use the twist variable. Twist is a signed integer, so all you need to do to get your robot to turn in place is to add the twist variable to the scaled “lookup table” value. You will need to keep in mind that this could overflow or underflow your eight-bit variable so make sure to do that addition in 16-bit signed math and then check that it will fit within an eightbit variable. Here’s an interesting piece of information that might surprise you: You can use this very same omniwheel calculation on two-wheeled robots, as well. Your robot won’t be able to move sideways anymore, but it might simplify how you con-

Figure 8. Code to drive an omniwheel and the necessary “lookup table.”

// this code is meant to be compiled by the CCS C compiler for a Microchip PIC processor const int8 sinWave[] = {128, 131, 134, 137, 140, 143, 146, 149, 153, 156, 159, 162, 165, 168, 171, 174, 177, 180, 182, 185, 188, 191, 194, 196, 199, 201, 204, 207, 209, 211, 214, 216, 218, 220, 223, 225, 227, 229, 231, 232, 234, 236, 238, 239, 241, 242, 243, 245, 246, 247, 248, 249, 250, 251, 252, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 254, 253, 253, 252, 251, 251, 250, 249, 248, 247, 245, 244, 243, 241, 240, 238, 237, 235, 233, 232, 230, 228, 226, 224, 222, 219, 217, 215, 213, 210, 208, 205, 203, 200, 198, 195, 192, 189, 187, 184, 181, 178, 175, 172, 169, 166, 163, 160, 157, 154, 151, 148, 145, 142, 139, 135, 132, 129, 126, 123, 120, 116, 113, 110, 107, 104, 101, 98, 95, 92, 89, 86, 83, 80, 77, 74, 71, 68, 66, 63, 60, 57, 55, 52, 50, 47, 45, 42, 40, 38, 36, 33, 31, 29, 27, 25, 23, 22, 20, 18, 17, 15, 14, 12, 11, 10, 8, 7, 6, 5, 4, 4, 3, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 16, 17, 19, 21, 23, 24, 26, 28, 30, 32, 35, 37, 39, 41, 44, 46, 48, 51, 54, 56, 59, 61, 64, 67, 70, 73, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 106, 109, 112, 115, 118, 121, 124, 128}; int8 omniwheel(int8 speed, int8 angle, int8 offsetAngle, signed int8 twist) { /* This routine takes speed, angle, offsetAngle and twist and returns an int8 that represents the speed and direction that the motor should turn. The returned value is a 0 for full forward, 127 for stop, and 255 for full backwards */ int16 tempInt; signed int16 signedInt; angle += offsetAngle; tempInt = sinWave[angle]; tempInt *= speed; tempInt /= 256; tempInt += (~speed / 2); signedInt = tempInt; signedInt += twist; if(signedInt < 0) signedInt = 0; else if(signedInt > 255) signedInt = 255; return signedInt; }

14

SERVO 04.2005

// add the offset angle // run it though the lookup table // scale the result // ~speed complements the bits which is the same as // performing 256 - speed only faster // add in twist // then check to make sure it didn’t underflow // or overflow // the return will truncate signed int but will // still return 0 to 255

Rubberbands.qxd

3/9/2005

3:36 PM

Page 15

Rubberbands and Bailing Wire trol your robot. To control a twowheeled robot using this calculation, just keep the angle variable at 0 for forward and 127 for reverse, have the offset angles for the wheels be 63 and 191, use speed to control the speed of the robot, and use twist to turn the robot. Now that this whole process has been described, there is a C function that will perform this whole calculation in its entirety, as well as the sine “lookup table” that it needs. Writing code to drive omniwheels seems pretty intimidating at first, but — as you can see — it actually renders down to a surprisingly small amount of code. Let’s look at what it would take to turn these values into actual motor rotations so that you can impress your robot-building buddies. One way would be to use a microcontroller that has as many pulse width modulators (PWM) as the number of motors that you would like to drive and use them to drive some H-bridges in locked antiphase mode. Locked antiphase PWM rapidly switches the motor forward and backward to achieve speed and direction control of a motor. Take a look at November 2004’s “Rubberbands and Bailing Wire” column for more information about locked antiphase PWM and driving motors. You could also write a routine to bit-bang as many pulse width modulators as you need. That would be horribly inefficient of your processing

RESOURCES www.ccsinfo.com Sells the C compiler for PIC processors used in this column www.microchip.com Manufacturer of the PIC microcontroller www.omniwheel.com Sells omniwheels www.acroname.com Also sells omniwheels

Figure 9. Shown is a large robot that uses omniwheels. The arrow shows where zero degrees is so the proper starting direction is always known.

your microcontroller. Using omniwheels on your robots can make them a lot of fun to play around with. This sort of robot can move in ways that others can’t, so sometimes it can help you achieve a task that would otherwise be impossible. Hopefully, you now understand how to drive omniwheels and will be able to apply this new knowledge to your next project. SV

power, but it would work. Another method would be to use one of the many hobby servo controllers out there — such as the Buffington Effects hobby servo controller. If you were to connect a DC motor controller — such as a Vantec RET411P or IFI Robotics Victor884 — that takes servo pulses as its input to the hobby servo controller, you could easily control many motors without bogging down

Custom Computer Ser vices, Inc.

Build-It-Yourself Robotics Development Kit! See!

Sense Direction!

Features include: Respond to IR Remote!

Speak!

Great for Robot Sumo Competition!

Move!

t ga r tin Sta $229 y Onl

Assembled Robot Shown Here

The Robotics Development Kit offers an introduction to the world of robotics for both beginners and advanced robot enthusiasts.

Use code SVA05 to get FREE Batteries for your$10 robot. Value For more information request a free copy of our brochure today! Sales 262-522-6500 x35 www.ccsinfo.com Fax 262-522-6504 Circle #41 on the Reader Service Card.

SERVO 04.2005

15

RoboResources.qxd

3/9/2005

3:14 PM

Page 16

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

On the Hunt for Stepper Motors

D

irect current (DC) dominates the field of robotics. DC is used as the main power source for operating the onboard electronics, for opening and closing solenoids, and, yes, for running motors. Few robots use motors designed to operate from AC — even the automatons used in factories. Such robots convert the AC power to DC, then distribute the DC to various subsystems of the machine. DC motors can either be continuous (for the lack of a better word) or stepping. Here is the difference: With a continuous motor, the application of power causes the shaft to rotate continually. The shaft stops only when the power is removed or if the motor is stalled because it can no longer drive the load attached to it. With stepping motors, the application of power causes the shaft to rotate a few degrees, then stop. Continuous rotation of the shaft requires that the power be pulsed to the motor. The more pulses fed to the motor, the more the shaft turns. As such, stepper motors are inherently “digital” devices — a fact that will come in handy when you want to control your robot via computer. By the way, there are AC stepper motors, as well, but they aren’t really suitable for robotics work and won’t be discussed here. Stepper motors aren’t as easy to use as standard DC motors, but for the applications that require them, stepper motors can solve a lot of problems with a minimum of fuss. In this column, we’ll take a closer look at steppers and

16

SERVO 04.2005

learn how to apply them to your robot designs.

Under the Hood of a Stepper Motor There are several designs of stepper motors. A common type is the unipolar stepper motor. The motor is composed of two sets of paired windings. Internally, wires connect to each of the windings, and there may be as many as eight wires coming from the motor. Though some wires are commonly connected together, this reduces the wire count to five or six instead of eight. In operation, the common wires of a unipolar stepper are attached to one side of the power supply, say, the positive rail. Each winding is then energized, in turn, by grounding it to the power supply for a short time. The motor shaft turns a fraction of a revolution each time a winding is energized. For the shaft to turn properly, the windings must be energized in proper sequence. For example, energize wires one, two, three, and four in sequence and the motor turns clockwise. Reverse the sequence, and the motor turns the other way. This is called the wave-step sequence. Another approach actuates two windings at once in an on-on/off-off, four-step (or “phase”) sequence. This enhanced actuation sequence increases the driving power of the motor and provides greater shaft rotation precision. There are other varieties of stepper motors and they are actuated in differ-

ent ways. One you may encounter is bipolar. It has four wires and is pulsed by reversing the polarity of the power supply for each of the four steps.

Design Considerations of Stepper Motors Stepping motors differ in their design characteristics over continuous DC motors. The following sections discuss the most important design specifications for stepper motors. • Stepper Phasing. A unipolar stepper requires that a sequence of four pulses be applied to its various windings for it to rotate properly. By their nature, all stepper motors are at least two-phase. Many are four-phase, while some are six-phase. • Step Angle. Stepper motors vary in the amount of rotation of the shaft each time a winding is energized. The amount or rotation is called the step angle and can be as small as 0.9 degrees. The step angle determines the number of steps per revolution. A stepper with a 1.8-degree step angle, for example, must be pulsed 200 times for the shaft to turn one complete revolution. • Pulse Rate. The smaller the step angle is, the more accurate the motor, but the number of pulses stepper motors can accept per second has an upper limit. Heavy-duty steppers usually have a maximum pulse rate (or step

RoboResources.qxd

3/9/2005

3:14 PM

Page 17

rate) of 200 or 300 steps per second, so they have an effective top speed of one to three revolutions per second (60 to 180 rpm). • Running Torque. Steppers can’t deliver as much running torque as standard DC motors of the same size and weight. A typical 12-volt, medium-sized stepper motor may have a running torque of only 25 oz-in. To increase the torque, it is necessary to either use a gear train or increase the voltage. Unlike a continuous DC motor, increasing the voltage to a stepper does not increase its speed. • Braking Effect. Actuating one of the windings in a stepper motor advances the shaft. If you continue to apply current to the winding, the motor won’t turn any more. In fact, the shaft will be locked — as if you’ve applied brakes. As a result of this interesting locking effect, you never need to add a braking circuit to a stepper motor because it has its own brakes built in. • Voltage, Current Ratings. Like DC motors, stepper motors vary in their voltage and current ratings. Steppers for five-, six-, and 12-volt operation are not uncommon. Unlike DC motors, though, if you use a higher voltage than specified for a stepper motor, you don’t gain faster operation, but more running and holding torque.

The UCN5804 can be directly interfaced to the stepper motor, as long as the motor does not require more than about one amp per winding. In operation, the chip is given two input signals: direction and step. Pulling the direction pin high or low reverses the rotation of the motor. Pulsing the step pin manually, from a microcontroller or even a 555 timer IC, rotates the motor. For more information on the UCN5805, refer to the data sheet available for it. Several websites, including Alltronics (www.alltronics .com), provide the data sheet as a free download. It’s also possible to use discrete logic gates to control stepper motors. I won’t get into specifics here; you can find schematics on the Web, as well as in my book, Robot Builder’s Bonanza, Second Edition, and Building Robot Drive Trains, by Dennis Clark and Michael Owings. These books provide useful details on using a volt-ohm meter to “decode” the wires on typical unipolar motors. Let’s not forget that there are many more advanced stepper motor chips available from semiconductor companies — including ST Micro, Allegro, and Analog. Many of these companies will provide free samples

upon request, but note that more and more specialty ICs are available only in surface-mount packages. So be sure to brush up on your soldering skills!

When to Use a Stepper Motor Stepper motors aren’t a replacement for ordinary continuous DC motors. The lower overall torque and speed of steppers make them less ideal as drive motors for robots weighing more than a few pounds. Unless your robot is small or lightweight — say, under a pound or two — use geared DC motors. Reserve stepper motors for those applications where controlled positioning is required. For example, you might mount an ultrasonic sensor or camera on a turret and drive the turret back and forth with a stepper motor. Keep in mind that stepper motors are inherently open-loop control systems, and you will need some mechanism for “homing” the motor to a known start point each time your robot is powered on. This can be done manually, with a switch, or potentiometer. Keep the following in mind if you’re still keen on using stepper motors for the drivetrain of your robot:

Controlling a Stepper Motor Though stepper motors can be controlled via mechanical means — like a relay — the most common approach is to use a computer or a stepper motor control circuit. In the absence of direct computer control, the easiest way to provide the proper sequence of actuation pulses is to use a custom stepper motor chip, such as the Allegro Micros UCN5804, available from several surplus sources such as Alltronics. This chip is designed expressly for use with the common unipolar stepper motor and provides a four-step actuation sequence. SERVO 04.2005

17

RoboResources.qxd

3/9/2005

3:16 PM

Page 18

gear train. Even a 2:1 gear train ratio will double the torque. Of course, the gear train will also reduce the effective speed of the motor by an inverse amount: the output of a 2:1 gear train is half the input speed. If the motor turns at a top rate of 60 rpm, for example, a 2:1 gear train will reduce it to 30 rpm.

Sources for Stepper Motors

FIGURE 1. All Electronics at www.allelectronics.com

• Avoid uneven terrain, like ramps or bumps. The smoother the surface, the better the motors will drive the robot across the floor.

technique is to use a 12-volt power source with motors rated at five volts. Be sure to observe all current ratings and design your drive circuitry accordingly.

• Increase voltage to the motors. One

• Increase torque through a simple

FIGURE 2. B.G. Micro at www.bgmicro.com

Despite their many advantages, stepper motors aren’t nearly as common as the trusty DC motor, so they are more difficult to find. When you do find them, they’re expensive when new. The surplus market is by far the best source for stepper motors for hobby robotics. In this “Robotics Resources,” you’ll find sources for selected mail-order surplus companies that regularly carry stepper motors. They carry most of the “name brand” steppers — Thompson-Airpax, Molon, Haydon, and Superior Electric. The cost of surplus steppers is often a quarter or fifth of the original list price. The disadvantage of buying surplus is that you don’t always get a hook-up diagram or adequate specifications. Purchasing surplus stepper motors is largely a hit-or-miss affair, but most outlets let you return the goods if they aren’t what you need. If you like the motor, yet it still lacks a hookup diagram, read the following section on how to decode the wiring. If you like the motor, yet it still lacks a hookup diagram, use a multimeter to determine the wiring layout. Here are two websites that provide useful information on how to do this: http://209.41.165.153/stepper http://www.bbastrodesigns.com/ cot/operate_stepper_windings. html You can also find stepper motors in discarded computer printers and fax machines. Most of these motors are designed for five- or 12-volt operation. These motors are not built for torque, so plan accordingly if you’re thinking

18

SERVO 04.2005

RoboResources.qxd

3/9/2005

3:17 PM

Page 19

about using them to drive a five-pound deskbot around the room.

All Electronics Corp. www.allelectronics.com All Electronics is one of the primary sources in the US for new and used robotics components. Prices and selection are good. Walk-in stores are in the Los Angeles area. Product line includes motors, switches, discrete components, semiconductors, LEDs, infrared and CdS sensors, batteries, LCDs, kits, and much more. Specifications sheets for many products are available at the website.

Alltronics www.alltronics.com Not to be confused with All Electronics in Southern California, this Northern California electronics mailorder firm is known for a good assortment and reasonable prices on new and surplus merchandise. Request their printed catalog or download one for free from the site (you need Adobe Acrobat Reader to view it). Among their robotic product line are motors (DC and stepper), stepper motor controllers, power MOSFETs, and more.

American Science & Surplus www.sciplus.com Often carries surplus stepper motors. Printed and online catalog available.

B.G. Micro www.bgmicro.com B.G. Micro is a haven for the electronics tinkerer and robotics enthusiast. Much of the stock is surplus, so it comes and goes, but while it’s being offered, it has a good price attached to it. Get it while you can because someone else surely will.

C & H Sales www.candhsales.com C & H sells motors of all types, gears, pneumatics, pumps, solenoids, relays, and lots of odds and ends. Their catalog (both printed and online) regularly contains dozens of quality surplus

DC (geared and non) and stepper motors. If you’re in the Los Angeles area, be sure to take a trip to the C & H retail store.

Digi-Key www.digikey.com Digi-Key is one of the largest mail order retailers/distributors of electronic components in North America. Their printed catalog has everything — you’ll probably need a magnifying glass to read it! Fortunately, they also offer a very fast and efficient online ordering system, complete with links to data sheets (when available). Check them out for specialty stepper motor integrated circuits.

Electronic Goldmine www.goldmine-elec.com Electronic Goldmine sells new and used electronic components, robot items, electronic project kits, and more. A catalog in PDF format is available; printed catalogs are sent to US addresses only. Be sure to check out the interesting and unusual (and lowcost) robotics kits.

Fair Radio Sales www.fairradio.com Fair Radio Sales primarily caters to ham operators, with their radio sets and old gear, but they have plenty of test equipment and general surplus electronics to tide over anyone. Prices are always reasonable. I’ve bought from them for over three decades. The company provides an annual catalog, with updates.

Fry’s Electronics www.frys.com Fry’s is an electronics superstore chain operating primarily in the West Coast region of the US. Among the wide product line are some electronics kits, including a stepper motor experimenter kit. If there isn’t a Fry’s near you, they offer online shopping (limited selection) at www.outpost.com

Gateway Electronics, Inc. www.gatewayelex.com Gateway is a general electronics SERVO 04.2005

19

RoboResources.qxd

3/9/2005

3:18 PM

Page 20

Sacramento, and Santa Rosa). Included in their line are surplus stepper motors.

H&R Company, Inc. (Herbach and Rademan) www.herbach.com Surplus mechanicals: motors, relays, gears, optics, and lots, lots more.

Jameco Electronics www.jameco.com Full-service general electronics mail-order, Jameco carries just about everything you need. The product line includes some stepper motors.

MECI — Mendelson Electronics Company, Inc. www.meci.com

FIGURE 3. HSC Electronic Supply at www.halted.com

mail-order and retailer. Among their product line are passive and active components, motors, electronic kits, gadgets, books, and tools. Some of their goods are new; others are surplus. They operate local stores in

St. Louis, San Diego, and Denver.

HSC Electronic Supply / Halted www.halted.com They offer mail-order, with walk-in retail stores in California (Santa Clara,

FIGURE 4. Mendelson Electronics at www.meci.com

Well, MECI sells just about everything you could want or need in electronics components. If you can think of it, they probably have it. They also provide a “BattleBots Parts” page on their website with some new and surplus components suitable for combat robots. These include heavy-duty motors, batteries, and more.

Mouser Electronics www.mouser.com Mouser Electronics is a mail order components distributor, providing a full line of products for industry and hobbyists. All general electronics are carried, including active and passive components, wire and cable, hardware, relays, switches, fans, heatsinks, batteries, component kits, chemicals, and tools. SV

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

20

SERVO 04.2005

Full Page.qxd

3/9/2005

9:25 AM

Page 21

Produced by

Profiting from the 1st New Industry of the 21st Century

Founding Sponsor

Premier Sponsors

RoboticsTrends

Evening Reception Host

Premier Media Sponsor

SECOND ANNUAL

Conference and Exposition The Nation’s Premier Business Development Event for Mobile Robotics and Intelligent Systems May 10-11, 2005 Hyatt Regency Cambridge Cambridge, MA

www.roboevent.com Photos courtesy of iRobot, SICK, K-Team, CTG, Business Design Lab, ActivMedia Robotics, LLC. Corporate Sponsors

Media Sponsors

Association Sponsors

SERVO 04.2005

21

Geerhead.qxd

3/9/2005

3:07 PM

Page 22

by David Geer

Contact the author at [email protected]

The RoboCoaster G2 It’s the Ride of Your Life!

kay, I’m writing this RoboCoaster G2 piece for “GeerHead” and all I can think of is the lyrics to the Cars’ song “Magic.” RoboCoaster G2 can definitely get you twisted. I love the Cars, so all I can think is I must love this RoboCoaster, too. Well, who wouldn’t? You like warm weather, amusement parks, rides, and roller coasters, right? And you’re a roboticist, so you love robots, of course.

O

Dish on the Coaster, Man RoboCoaster G2 is an update to a

rarely seen or experienced state-of-theart ride that’s a lot like a roller coaster, but all robot. From its hexapod base, the G2 has six degrees of freedom of movement. It offers the rider the sensations of briefly sustained inertia, several feet of articulation, and up to 15 degrees of rotation. Rotating and gyrating on its six axes extended over the length of its gigantic robot arm, the G2 can be programmed to move in new patterns every time, so it’s never the same ride twice. The G2 major axis rotates, bends,

Frontal view. You can see how the robot’s gigantic size makes it difficult to get a close-up and keep all of its features in view.

22

SERVO 04.2005

stoops, and does a shoulder rise and fall while the wrist axis can roll, pitch (to veer off a degree from a horizontal plane), and yaw (swerve), giving it motion effects seldom experienced in other rides. In addition to taking passengers on a ride within its six degrees of freedom of movement, the RoboCoaster G2 can make a large, circular movement with the passenger module outside its normal footprint of mobility. It can also shoot its arm straight up in the air while maintaining a full range of wrist mobility. The robot comes equipped to carry two or four passengers and, as a stand-alone ride secured to the ground, it can serve (process? shake up?? turn into human milkshakes???) 60 to 120 people per hour, assuming a one and a half minute thrill ride. Until now, we’ve been talking about the RoboCoaster as a single, fixed, stand-alone ride. With the G2, multiple RoboCoasters can be affixed to a high-speed re-circulating track in which the robots are coupled together in train sets. This multiplies RoboCoaster’s individual movement abilities with the highspeed, twisting, turning movements of state-of-the-art roller coasters. The attraction to thrill seekers is obvious — a motion experience you can get nowhere else. Just don’t eat or drink before you get on. In addition to being one of few locations with such an offering, parks could theoretically build a working

Geerhead.qxd

3/9/2005

3:08 PM

Page 23

GEERHEAD ride big enough and fast enough to serve 2,500 passengers an hour. Can you say “Cha-ching?”

G-Whizzzzzzzzzzzzz!! Though the ride is capable of four Gs of gravity, it is limited to 1.9 Gs for passenger safety. It is also limited to movement combinations that aren’t likely to kill passengers — which is a good thing. The ride can be configured to be slow and gentle, like a rocking chair or fast and furious, like a hurricane. Each individual RoboCoaster can be configured, ride to ride, to suit the tastes of the individual passengers. One car can provide a modest rush, while the very next set of passengers can be flung from one extreme to the other at top speed. Other extreme ride movements include lateral head (passenger compartment) shaking and inverted rotation. Training in an astronaut’s centrifuge doesn’t come close to the experience this ride brings to the public.

Robotics, Already! RoboCoaster is similar in many ways to modern industrial robots found in production lines, though many times larger. Where the payload of an average industrial spot-welding robot is about 150 Kg (around 330 lbs), the RoboCoaster’s payload is 500 Kg (about 1,100 lbs). So, that theoretical 2,500 passenger an hour coaster could easily weigh in at well over a dozen tons. If you plan to seek out the first fullon, track-based RoboCoaster G2 roller coaster thrill ride built in the US, you’ll have to look pretty hard. We won’t expect to see the very first one(s) to start popping up at popular attractions until the 2006/2007 season. When you do find them, here’s what you’ll want to check out to take note of their robotics: The arm structure of the individual cars and the system controls are the key robotic elements, built by KUKA — a robotics manufacturer based in Germany.

This view of RoboCoaster shows a loaded four-passenger carriage, as well as the individual G2 “car’s” wrist, forearm, arm, and part of its base. As a piece of machinery, it’s as beautifully streamlined as it is agile.

The control system includes highperformance AC servo drives that use a motion profile for an optimized relationship between the ride’s individual motors and their speed. The system

also includes a broad array of PC-based and industrial field bus communications formats. Other features include remote, Internetbased system diagnostics and an

Speed and construction that many a roboticist would call art. Look at the flesh-tone-colored arm behind the yellow carriage.

SERVO 04.2005

23

Geerhead.qxd

3/9/2005

3:08 PM

Page 24

GEERHEAD future tracked G2 coaster depend on the construction an amusement park plans to build and offer to its constituency. However, the largest one currently in the planning stages is for a dark ride of about 65,000 sq ft with a track 1,400 feet long. Since any tracked G2 construction is based on totally modular components, almost any size and configuration will be possible.

Why G2?

Straight-on view of side-angle ability. A demonstration of the uniqueness of the experiences this robotic ride has to offer.

open-network-capable, industrial, PC control module. Specifically, the motion control system is based on 600-volt AC servo drive technology, while the robot’s controller user interface is Windows-based. The real-time and motion control, however,

are actually managed by VXWorks, which is a popular OS for embedded devices.

How Big Did You Say? The size and capacity of any

Nothing like this type of engineering has been seen in the amusement parks yet.

The G2 offers much greater capacities, not the least of which is the ability to assemble several of them together for a tracked motion ride. This enables rides to be constructed that take passengers through any of a variety of interactive shows that tell stories based on themes. The G2 can be built to run on a track that extends through up to nine interactive four-dimensional cinemas. The object is to make you part of the story. (Not that anyone in the general public knows, but wouldn’t you be guessing Disney right now?)

That Does Compute! New motion sequences are easily programmed. The G2 can adopt one path through a dark ride for one show and another for a completely different show — different projections for the cinematic aspect — on the very next trip through.

Safe Enough for Passengers, a First for Robotics Until now, industrial robots have not been acceptable for the safe carriage of human passengers. The RoboCoaster was developed pretty much from scratch from a specialized industrial robot. This meant that the amusement park industry’s regulators had to start from scratch, as well as to make sure that this application of the technology was going to be safe. Nothing quite like this type of engi-

24

SERVO 04.2005

Geerhead.qxd

3/9/2005

3:10 PM

Page 25

GEERHEAD neering, building materials, and robotics had been seen in the amusement park industry before. New protocols were developed to insure appropriate designs and ultimate safety approvals for passengers.

The Spin on Spin Offs RoboCoaster development has spun off two new and rapidly growing areas in the service robotics industry, which is said by some to be the last frontier of robotics. These are entertainment robotics and medical robotics. Having proven that robots and people can safely live together in a common environment in which robots serve people in a very intimate way without harming them, the RoboCoaster is leaving behind a stream of debates and inquiries among roboticists as to how the technology can be a stepping stone into

What a rush. Not only do they look safe, they’re clearly having fun!

the lesser charted territories of medical robots and other areas of robotic entertainment.

You Missed It! If you weren’t at the International

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 #53 on the Reader Service Card.

SERVO 04.2005

25

Geerhead.qxd

3/9/2005

3:10 PM

Page 26

GEERHEAD Association of Amusement Parks and Attractions last fall in Orlando, FL, you missed what may be your only chance to see and ride a tracked RoboCoaster G2 for the next year or two. You know the only way to get

people to pay to build one of these is a full-function live demonstration. The word is that amusement industry executives were chomping at the bit to put up one of these puppies in their playgrounds.

RESOURCES KUKA automation and robotics — www.kuka.co.uk/ AMEC — www.amec.com RoboCoaster — http://archiv.kukaroboter.de/robocoaster/index_flash.html

When, When?? Where, Where???! While the first generation RoboCoaster can be inspected and enjoyed this summer at LEGOland parks in Europe and in California as a family attraction, the G2 tracked ride won’t be in parks until the 2006-2007 time frame. Just where you’ll find G2 is still hush, hush, but you can expect to find G2 rides not only in the US, but in Asia and Europe, as well. SV

THE STORY OF INVENTOR GINO DE-GOL You knew there had to be a personal story of one lone roboticist with a dream in here somewhere, didn’t you? Gino De-Gol, who eventually formed RoboCoaster, Ltd., is the man with that story. Roboticist Gino De-Gol left college to enter the professional world of industrial robotics and never looked back. He has been a specialist in robotics applications for Rolls Royce — if you’ve never driven or ridden in one, it is really something to appreciate — and then for the German automotive engineering giant KUKA, which became one of three companies that produced the RoboCoaster — together with AMEC and RoboCoaster, Ltd.

The Early Years Through the 1980s and early 1990s, De-Gol was a hands-on kind of guy — just your kind of roboticist, I’ll bet. He tailored robotics to automated automobile assembly lines, programming their every thought and action, finessing their every caress for the materials that they would form into millions of cars that have since been driven, loved, and eventually junked or preserved for posterity. This meant working in tight spots, dangerously close — personally — with each robot. The truth is that experiences like De-Golo’s, which so many industrial roboticists have shared in, were among the earliest intimate manmachine environments. In some cases, De-Gol had to literally ride the robot to finesse its movements because the quar-

26

SERVO 04.2005

ters were so close and small and the robot so large. As early as the 1980s, De-Gol was struck with an astounding idea: “What a great ride a robot would make!” The world of robotics in the 1980s was an infant technology by today’s standards. Working safely with robots meant turning them off, putting them in fully enclosed safety barriers, or being able to run like heck! Safety measures today follow much the same philosophy — keep people and their machines at a distance from each other. In the 1990s, servo technology brought better safety assurances to robotics, enabling a fail safe that kept robots from losing control and running over their roboticists. Safer robots made the prospect of increased man-machine interactions viable. Working together more closely, people and machines could be more productive. With this, De-Gol added another brush stroke to his idea of one day building RoboCoaster!

Safety is a Plus As industrial robotics grew, the need arose for further safety measures in man-machine working conditions. In shops where a human operator would be working in close proximity with the robot while its servos were still active, the arrangement had to be fundamentally safe. This is how the controls architecture that enables safe and redundant

drives was born. A key enabler for safe robotic-human interaction, the technology became a foundation for part of the architecture for the RoboCoaster program. By the year 2000, De-Gol had realized that many of the separate automotive design and construction abilities and safety technologies of industrial robots — though seemingly unrelated — could be combined to form an approvals standard for a passengercarrying robot.

The Ride Was Born De-Gol wanted to build an advanced robotic amusement park ride, but his vision was open to obvious applications in the military, medical, and aerospace fields. In 2000, De-Gol started RoboCoaster, Ltd., to bring the world its first passenger-carrying robot that was fully realized, developed, and safety certified. De-Gol presented it to the amusement park industry and, due to his highly applicable, high safety standards, the RoboCoaster was immediately accepted. Today De-Gol is bringing new and innovative robotics applications to other areas of amusement rides, including show-action robotics, also known as peripheral effects. De-Gol’s work is bearing fruit in Edutainment (a new concept that combines education with entertainment), TV, and movies, where actors and robots intermingle to bring true millennium-era stories to life.

Grau3.qxd

3/9/2005

6:15 PM

Page 27

by Steve Grau

Figure

hether you are building a robot to explore another planet, compete in the DARPA Grand Challenge, rescue victims of a disaster, or just satisfy your own curiosity, it’s likely that you’ll want it to have the ability to navigate from place to place on its own. Last month, we laid the groundwork for navigation by developing shaft-encoder and localization software components. These components enabled our robot to keep track of its position using dead reckoning. We also created test software that enabled the robot to navigate by performing timed maneuvers. This was fine for testing, but lacked feedback to compensate for changing battery voltage, varying floor surfaces, differences between the servo motors, and other factors. In this article, we will develop reusable navigation software components that use the output of the localizer to provide feedback for improved navigation. In this article series, we have been developing software (programmed in Java) for a robot we’ve named the “RidgeWarrior II.” We are using the pre-built IntelliBrain-Bot robot chassis and electronics kit from RidgeSoft (www.ridge soft.com), shown in Figure 1. The goal is to develop useful robotics software components that we can put to use in the RidgeWarrior II and easily reuse in future projects. Java source code for this series of articles is available at www.ridge soft.com/articles/ridgewarriorii/ridgewarriorii.htm

ware components and will allow software components that use navigation functions to be decoupled from components that implement navigation functions. In other words, high-level control software will only need to be concerned with where the robot should go next. It need not be concerned with the underlying details of the robot’s steering and propulsion mechanisms; these details will be the responsibility of the Navigator. Our Navigator interface will define four navigation operations:

W

1. 2. 3. 4.

1

moveTo — Move the robot to a specified point. rotateTo — Turn in place to face a particular direction. go — Move continuously in one direction. stop. We specify this in Java with the following code:

public interface Navigator { public void moveTo(float x, float y, boolean wait); public void rotateTo(float radians, boolean wait); public void go(float radians); public void stop(); }

Figure

2.

Navigation and localization class diagram.

Defining a Navigator Interface We will use Java’s interface mechanism to define a generic interface to the navigation components. This facilitates software reuse by allowing the functionality of a navigator to be defined independent from a particular implementation. This minimizes the interdependencies — coupling — between softSERVO 04.2005

27

Grau3.qxd

3/9/2005

6:16 PM

Page 28

Creating Reusable Robotic Software Components this design, it makes sense to implement a generic component applicable to typical differentialdrive robots, rather than a component that is specific to just our RidgeWarrior II robot. We will implement a class named DifferentialDriveNavigator that can be used for navigation in a wide variety of differential-drive robots. The key to steering a differential-drive vehicle is varying the speed of the wheels or tracks independently. Similar to a tank, our two-wheeled robot will go straight ahead when both wheels turn at the same speed. It will move forward in a curve when the wheels turn in the same direction, but at different speeds. The robot will rotate in place when the wheels turn at the same speed, but in Figure 3. Servo speed verses position input setting. opposite directions. Obviously, our DifferentialDriveNavigator class The moveTo and rotateTo methods provide a “wait” arguwill need the ability to vary the speed of the motors. ment. This argument indicates whether the method should return before the operation is complete or should it wait to return until the operation has been completed. Before we get into the details of navigating, let’s first develop a Java class named ServoMotor that allows a servo to be controlled like a generic motor. This will allow our DifferentialDriveNavigator class to work with any variable Our robot’s locomotion is based on an ordinary twospeed motor, not just servo motors. Our ServoMotor class wheeled, differential-drive design. Because of the popularity of will create a façade that makes the servos appear to be generic variable-speed motors. The Java class library included with the IntelliBrain-Bot kit Figure 4. Heading error. already defines a generic motor interface named Motor. The ServoMotor class will translate from this interface to the Servo interface. The Servo interface defines servo shaft positioning commands, whereas the Motor interface defines motor power commands. The servos included with the IntelliBrain-Bot kit incorporate modifications for continuous shaft rotation, so they function like motors but are commanded like servos. Giving a continuous rotation servo a positioning command actually results in setting the power level applied to the output shaft rather than setting the position of the shaft, as is the case with conventional servos. Calling the servo interface method to position the shaft at the midpoint, setPosition(50), turns the power off. Setting a value greater than 50 causes the servo shaft to turn in the forward direction. Setting a value less than 50 causes the servo shaft to turn in the reverse direction. However, the servos we are using reach their maximum power and speed long before the position value reaches the extremes of the input range: zero and 100. Figure 3 is a chart of data collected using the TestServoResponse class. The chart shows that the wheels

Controlling Servo Motor Speed

Navigation for a Differential Drive Robot

28

SERVO 04.2005

Grau3.qxd

3/9/2005

6:16 PM

Page 29

PART 3 reach maximum speed when the position input offset reaches 14 percent above or below the power-off point of 50 percent. Therefore, the effective range of the position setting is roughly 50, plus or minus 14 (36 to 64). Varying the position setting within this range will affect the wheel speed, but variations outside of this range will have no effect. Our ServoMotor class’ setPower method will convert the power setting value to a position setting value, as follows: mServo.setPosition((power * mRange) / Motor.MAX_FORWARD + 50);

The mRange variable is the effective range above and below the center value, 50. In our servo analysis above, we determined 14 is the range value for the servos we are using. Rather than “hard coding” the value 14, we will allow the range to be set when a ServoMotor object is created. This will allow the ServoMotor class to be reused with other servo makes and models. The setPower method will also need to communicate the motor direction to a DirectionListener, which we defined in the previous article. The following code accomplishes this: if (mDirectionListener != null) if (power != 0) mDirectionListener.updateDirection(power > 0);

The two servos mount in opposite directions on our robot’s chassis. The sense of shaft rotation of the left servo motor is the same as the robot’s sense of direction. However, the sense of direction of the right servo is the reverse of the robot’s sense of direction. Rather than propagate confusion related to the sense of direction throughout our software, we will avoid this by making the sense of direction configurable in the ServoMotor class. The setPower method will convert from the robot’s sense of direction to the servo’s sense of direction:

navigation commands mentioned earlier: go, move to, rotate to, and stop. The navigator’s run method will periodically check the robot’s progress and react accordingly. When the thread is not busy, it will sleep so other threads can do their work. The following code implements the run method: public void run() { try { while (true) { switch (mState) { case MOVE_TO: goToPoint(); break; case GO: goHeading(); break; case ROTATE: doRotate(); break; default: // stopped break; } Thread.sleep(mPeriod); } } catch (Throwable t) { t.printStackTrace(); } }

if (mReverse) power = -power;

Finally, our setPower method will handle the special case of turning the servo off when the power is set to zero, as well as limit the range of the power variable: if (power == 0) { mServo.off(); return; } else if (power > Motor.MAX_FORWARD) power = Motor.MAX_FORWARD; else if (power < Motor.MAX_REVERSE) power = Motor.MAX_REVERSE;

Implementing the DifferentialDriveNavigator Class In order to avoid complicated scheduling interactions between the DifferentialDriveNavigator class and our robot’s other sensing and control activities, we will use a separate thread to carry out navigation functions. This thread will navigate using four states of operation, coinciding with the four Circle #68 on the Reader Service Card.

SERVO 04.2005

29

Grau3.qxd

3/9/2005

6:17 PM

Page 30

Creating Reusable Robotic Software Components

Figure 5. Navigator response to heading change. Next, we will need to implement the navigation methods: goToPoint, goHeading, and doRotate. Since driving in a straight line shouldn’t be too complex, let’s start with the goHeading method.

Going Straight Ahead with Proportional Control The function of the goHeading method is quite simple: check the current heading then adjust the power to each wheel to keep the robot on course. When the robot is heading off course — as shown in Figure 4 — the goHeading method needs to apply different amounts of Figure 6. Navigating to a point.

power to the wheels to correct the heading. In the case shown, more power must be applied to the right wheel and less to the left wheel. Of course, if the error were in the opposite direction, the response would be reversed. As the error gets larger, the navigator should respond more aggressively by increasing the power difference applied to the wheels. We will make the amount of the power difference proportional to the size of the error. Hence, our navigator will use “proportional control” to keep the robot on course. The following code obtains the heading from the Localizer, performs the proportional control calculation, and sets the motor power accordingly:

Pose pose = mLocalizer.getPose(); float error = mTargetTheta - pose.theta; // constrain the error value to –Pi < error <= Pi if (error > PI) error -= TWO_PI; else if (error < -PI) error += TWO_PI; int differential = (int)(mGain * error + 0.5f); mLeftMotor.setPower(mDrivePower - differential); mRightMotor.setPower(mDrivePower + differential);

The mGain variable is a tunable, proportional-gain constant that controls how strongly the navigator reacts to error. A larger gain will result in a more aggressive response to error. However, too large a gain will cause the robot to oversteer. Figure 5 shows the robot’s response — measured using the TestNavigatorResponse class — to a sudden change of the target heading. A gain of 6.0 results in a slow response and the robot tends to drift off course. A gain of 100.0 causes the navigator to oversteer, resulting in erratic motion. A gain of 25.0 yields a quick response to the change in heading and good stability.

Navigating to a Specific Location Now that our robot has the ability to steer itself in a particular direction, it won’t be hard to implement the goToPoint method, allowing it to navigate to a specific location. After all, it is just a matter of heading to the des-

30

SERVO 04.2005

Grau3.qxd

3/9/2005

6:18 PM

Page 31

PART 3 tination and stopping once it is there. Our navigator can calculate the distance and direction to the destination using the output of the localizer and a little bit of trigonometry. Once it calculates the direction, it can then use the goHeading method to head that way. The navigator can determine the robot has arrived at the destination by noting that the distance to the destination has dropped below a threshold. We will use the following overall structure for the goToPoint method: private synchronized void goToPoint() { // Get the current position from the localizer Pose pose = mLocalizer.getPose(); // determine the proximity to the destination : if (very close to the destination) { // stop : } else { // update heading : goHeading(); } }

Figure 6 depicts the robot heading toward its destination. The location of the destination relative to the robot’s current destination in Cartesian coordinates is (xError, yError). The angle theta is the straight-line direction to the destination. The values of xError and yError can be calculated by subtracting the robot’s current coordinates — obtained from the Localizer — from the destination’s coordinates: float xError = mDestinationX - pose.x; float yError = mDestinationY - pose.y;

We could determine if the robot has arrived at the desti-

nation by using the Pythagorean Theorem to calculate the distance to the destination. However, this calculation would require calculating a square root, which is computation intensive. Instead, we will use a less intensive method, summing the absolute values of the two error terms. This won’t yield the exact distance, but it will be good enough. When the robot is in transit to the destination, the navigator will need to make regular adjustments to keep the robot on course. To do this, it must determine the angle — theta — to the destination. Fortunately, the Java class library provides just the function we need: Math.atan2, a method for calculating arc tangents. We will implement the remainder of our goToPoint method as follows: float absXError = (xError > 0.0f) ? xError : -xError; float absYError = (yError > 0.0f) ? yError : -yError; if ((absXError + absYError) < mGoToThreshold) { // stop mLeftMotor.setPower(Motor.STOP); mRightMotor.setPower(Motor.STOP); mState = STOP; // signal waiting thread we are at the destination notify(); } else { // adjust heading and go that way mTargetTheta = (float)Math.atan2(yError, xError); goHeading(); }

Rotating in Place The final navigation method we need to implement is doRotate to enable rotation in place. Similar to the goToPoint method, this method will use data from the Localizer and the target heading to determine which direction to rotate and when to stop. We will use the following Java code for this:

Run Cool.

Too Much Heat?

PololuSMC04 motorcontrollerwith tripleinterfaceandfeedback control,shownactualsize.

Introducing Pololu’s new line of high-current motor controllers with total resistance under 0.050 ohms. Find out more at www.pololu.com or by calling 1-877-7-POLOLU. Circle #74 on the Reader Service Card.

SERVO 04.2005

31

Grau3.qxd

3/9/2005

6:18 PM

Page 32

Creating Reusable Robotic Software Components private synchronized void doRotate() { Pose pose = mLocalizer.getPose(); float error = mTargetTheta - pose.theta; // choose the direction of rotation that results // in the smallest angle if (error > PI) error -= TWO_PI; else if (error < -PI) error += TWO_PI; float absError = (error >= 0.0f) ? error : -error; if (absError < mRotateThreshold) { mLeftMotor.setPower(Motor.STOP); mRightMotor.setPower(Motor.STOP); mState = STOP; notify(); } else if (error > 0.0f) { mLeftMotor.setPower(-mRotatePower); mRightMotor.setPower(mRotatePower); } else { mLeftMotor.setPower(mRotatePower); mRightMotor.setPower(-mRotatePower); } }

Coordinating Threads We’ve kept our control logic simple and avoided undue coupling between the navigator and other components by using a dedicated thread to execute the navigation code. This allows the navigator to pilot the robot without awkward consideration for the robot’s other tasks, such as sampling sensors. If we were to implement the RidgeWarrior II as a single threaded program — the only choice with many robot controllers — the navigator code would need to include logic to take into consideration the priority and timing constraints of other tasks. For example, we would need to consider if the arc tangent calculation is going to take so long that the wheel encoder will miscount. With multi-threading, we can give the wheel encoder threads a higher priority than the navigator thread. This moves the scheduling burden to the operation system — in our case, the Java virtual machine — simplifying Description

Error Sources Calibration

The accuracy of the wheel-diameter and wheel-base measurements provided to the Localizer affect its accuracy.

Encoder

The accuracy to which the wheel encoders are able to measure the position of the wheels directly affects the accuracy of the Localizer. Using wheel encoders that provide more counts per revolution — such as the WheelWatcher WW-01 encoder — reduces error due to encoder quantization.

Wheel Slippage

Any slippage of the wheels will result in localization errors.

Localization

The dead-reckoning localization method we are using is based on self-centric encoder measurements. This results in accumulation of error because the robot has no fixed external reference from which it could recalibrate its position. Incorporating external references — such as landmarks, the Earth’s magnetic field (compass), or satellites (GPS) — would help improve the accuracy of the Localizer.

Tablle 1. Major sources of error.

32

SERVO 04.2005

our software. The operating system will take care of briefly suspending execution of the navigator thread when a wheel encoder thread needs to take a quick peek at its sensor. Multi-threading helps simplify scheduling, but — in order for it to work properly — we must consider the interaction between threads. Our main thread will provide high-level control of the robot, calling the navigator methods: go, moveTo, rotateTo, and stop. These are just simple methods that set the goal of the navigator. We will not go into the details of each of these methods. We will only consider the moveTo method: public synchronized void moveTo(float x, float y, boolean wait) { mDestinationX = x; mDestinationY = y; mState = MOVE_TO; if (wait) { try { wait(); } catch (InterruptedException e) {} } }

We call this method from the main thread to give the navigator thread its next goal. We must assure that the variables that define the goal — mDestinationX, mDestinationY, mTargetTheta, and mState — are only changed and read as a consistent set; otherwise, the navigator thread could resume execution at an inopportune time and use some values from the new goal and other values from the old goal. For example, the navigator would use mDestinationX from a new goal and mDestinationY from the previous goal if it was to resume execution just as the main thread finished execution of the first line of the moveTo method. This would result in the navigator steering toward an unintended location — the combination of the new destination’s x coordinate and the old destination’s y coordinate. This wouldn’t be desirable, especially if heading toward this unintended destination happened to lead the robot over a cliff! Fortunately, Java comes to the rescue, again, by providing the “synchronized” keyword. Adding this keyword to a method or a smaller block of code allows the Java virtual machine to act like a traffic cop, only allowing one thread (car) into synchronized code (an intersection) at a time. By adding the synchronized keyword to the methods: go, moveTo, rotateTo, stop, goHeading, goToPoint, and doRotate, we’ve assured the variables that are shared by multiple threads will always be accessed and manipulated as a consistent set. One other thread coordination caveat we must consider is allowing a calling thread to wait while the navigator carries out the requested command. This will allow a thread calling moveTo or rotateTo to wait for the operation to complete before continuing to execute. Once again, Java provides a means to do this: the wait and notify methods. We’ve included a call to wait in the moveTo method. This tells the Java virtual machine the thread must wait until another thread notifies the virtual machine that the waiting thread can continue. We’ve included a call to notify in the goToPoint and doRotate methods to notify the Java virtual machine that the waiting thread — if there is one — can resume execution.

Grau3.qxd

3/9/2005

6:20 PM

Page 33

PART 3

Testing and Results

RESOURCES

We’ll use four test classes to exercise our navigator by moving the robot in well-defined patterns: 1. NavigateForward — Moves the robot straight ahead. 2. Rotate — Rotates the robot 180 degrees in place. 3. NavigateSquare — Moves the robot in a square pattern. 4. NavigateFigureEight — Moves the robot in a figure-eight pattern. Experimenting with these classes confirms that the shaft encoders, localizer, and navigator software work well. However, the navigation precision is far from perfect, due to a variety of errors. Table 1 lists some of the more significant sources of error that affect the precision with which our robot can navigate.

Conclusion This month, we have implemented two more reusable software components — a ServoMotor controller and a DifferentialDriveNavigator — to add to our robot software components bin. By using the Motor and Navigator interfaces, as well as multi-threading, we have been able to minimize the coupling of these components to other software, hardware, and electronics components, making it easy to reuse them for

RidgeWarrior II Source code www.ridgesoft.com/articles/ridgewarriorii/ridgewarriorii.htm IntelliBrain-Bot kit www.ridgesoft.com/intellibrainbot/intellibrainbot.htm WheelWatcher WW-01 Quadrature Encoders www.nubotics.com

other robot projects. We also discovered that our robot is less than perfect — no big surprise! While it is tempting to try to produce a robot that is error free — no matter how hard we try — we can only reduce the built-in errors. We can’t eliminate them, and we can’t do anything to prevent unpredictable random errors. A robot’s systems and control software will always need to deal with imperfection and unknowns. In the next article in this series, we will develop software to deal with navigating an imperfect robot through uncharted territory. 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.

Circle #85 on the Reader Service Card.

SERVO 04.2005

33

Barlow1.qxd

3/9/2005

2:21 PM

Page 34

FIGURE 1

D

esigning your first robot can be a daunting task. There are so many disciplines you have to learn that it can appear to be a major undertaking. In this first of two parts, I will detail some of the many errors I have encountered over the years while designing my robots. This information will be most useful to the beginner, but I know that the seasoned veterans may find some of my errors informative, as well. Part 1 of this primer will include mistakes I have made, as well as design ideas, necessary skills, tips, and time-saving methods for a new design. In Part 2, I will go into detail regarding program errors, tips for programming, hardware tips, and useful circuits that I routinely use for my robots. 34

SERVO 04.2005

Barlow1.qxd

3/9/2005

2:21 PM

Page 35

PART 1: Common Errors in Building Robots Where to Begin? Because this article is primarily targeting the new and beginning designer, I will tell you how I personally got started in robotics. I have always had some programming skill from working with computers and I preferred the Basic language. I had programmed in assembly and Fortran, but as mentioned earlier, Basic simply was less of a strain. For those of you who have success in low-level languages, please do not feel I am criticizing these in any way. In addition, I have always had mechanical skills and was skilled with some electronics and soldering. I realize that these abilities are possibly more than some beginners may have right now. I started my first robot when I received a Parallax Board of Education (BOE) as a present. I learned a few simple programs on the BOE and then built a small robot (Figure 1), very similar to the BOE-Bot sold by Parallax. I would recommend starting out with the BOE-Bot to anyone. With this kit, you will learn programming skills, as well as hardware skills, and right out of the box you will have a working robot (once it’s assembled). You will not have to learn how to create 360-degree rotational servos, H-bridge circuits, sensors, or any of the other myriad skills necessary. The LEGO Mindstorms kits and a few other beginner kits will whet your appetite, as well, without throwing you into the deep end immediately.

Design Ideas Do not bite off more than you can chew. We all want the super fancy high-tech, whiz-bang robot, but Rome was not built in a day. Start off simple and add to your robot as you go along. If you reach a point where the original design is limiting you, great. This is a good stage. You now have a reason to build a second robot. I know it costs more money for a new robot, but the rewards will be worth it. My first robot had two servos for drive wheels and three fixed IR sensors. I then moved up to a track system

when I wanted an SRF04 range sensor (Figure 2). I then ran out of room with that design and started another. As you learn to create, you will also learn about new ideas and features you may want. You could start out with a really big chassis and a few highpower CPUs, but then the entire system will overwhelm you and you’ll never get a working robot. If your first robot bounces off a wall, turns, and moves on, that is good enough, and you have reason to be proud of yourself. Even companies within the industry build prototypes first before going into production.

The CPU From my years of programming experience, I have to recommend the Basic program language for the beginner. Of the Basic-compatible CPUs, I recommend the Parallax BASIC Stamp. The Basic Atom is very good, as well, as I described in the January 2005 issue in SERVO. The Atom is really made for people with some experience, however, so I give the nod to Parallax when it comes to the outright beginner. You can use 99 percent of Parallax programs on the Atom, so I leave this up to your choice. The Atom has more memory space and features, but the learning curve is slightly steeper because of a smaller amount of available documentation. There are many fine assemblybased CPUs, as well, and they may have more features than a Basic-compiled CPU. I personally do not recommend them for a beginner, though.

Tracks or Wheels? This is a design choice we all must face in the beginning. From experience, I would have to say that tracks are easier to work with for a beginner. To help you make an informed decision, I will list some pros and cons of each. Tracks Pro — Stable platform, easy to rotate, excellent traction, and easy motor control with an H-bridge circuit.

FIGURE 2

Con — They cost more, use more battery power, and are harder to design if not based on an existing track system. Wheels Pro — They are slightly cheaper than tracks, use less battery power, and are easier to build from scratch. Con — The steering is more difficult, caster wheels hangup, programming is more difficult using servo commands or steering commands, and tricycle gear is less stable.

Time I have spent many, many years designing robots and developing my skills. You cannot expect to learn everything at once. If you try to cram in too much, you could lose any of the enjoyment you have. Start off as simple as you can. Ultimately, this hobby is meant to be fun for you and you alone. It is very nice to show off a robot to a friend, but — if you are losing patience trying to get a design to work just to display a fancy feature — you will lose your desire to create. I have had some robots that spent years in the design stage. I am always adding features as I go along. Have fun with what you have now; don’t dwell on what you want to have in the future.

Program Language Program in the language that is easiest for you, not what anyone else SERVO 04.2005

35

Barlow1.qxd

3/9/2005

2:21 PM

Page 36

A PRIMER FOR THE NEW ROBOTICIST

FIGURE 3 tells you and not just for the so-called added features of a different language. Pure assembly code is theoretically the quickest, but what good is that if you cannot understand it? You are the master of the robot, not the other way around. Why should your robot/CPU dictate to you that you must learn a low-level language simply to gain a few faster CPU cycles? Worldfamous aviator Chuck Yeager once said that he would rather fight a poor pilot in a top-line fighter jet than an excellent pilot in a poor-quality jet. This is true of your program language, as well. If you struggle and strain every day trying to figure out code simply because this CPU language may run faster than another language, then what is the advantage to you in the end? I cannot emphasize this enough. Pick a language that is the easiest to

code for you personally. With that said, as mentioned under the CPU heading, I can recommend that beginners start out with the Basic language. There is no better place to begin than the Parallax website. If you already program in C or assembly, then by all means, stick with it. I myself freely admit that C and assembly just aren’t my bag. I spend too much time struggling with the language and not enough time actually coding. If the language is not intuitively obvious, then I want no part of it. Obviously, many millions of people do an excellent job with assembly, C, Java, etc., so to each his own. I am in awe of the people who have mastered the low-level languages. If you feel you can handle it, then, of course, jump in and have fun.

Work Environment Program in a quiet and comfortable environment if at all possible. Nothing is worse for creativity than having a dozen distractions taking you away from your mental processes. This is true of any form of creativity, such as painting or writing. Even the monitor can make a difference. I prefer to code on my laptop. The LCD screen does not hurt my eyes as much as a tube monitor.

Debugging

FIGURE 4

36

SERVO 04.2005

When debugging software, I highly recommend a hard copy printout of your program. I realize this becomes unwieldy for large programs, but the benefit is more than worth it. If you have spent hours trying to find an error in your code, you may be surprised to realize how quickly you see your mistake once you have a hard copy in front of you. Tractor feed printers are becoming more scarce every day, but if you have to, tape your single-page printouts together into one long page. With this

long page, you will be able to easily scan up and down it, following your variables and checking subroutines.

Skills Necessary Regarding the skills necessary for building a robot, some of you may be wondering where it all ends. I think I can say from years of experience that you never will acquire all the skills necessary. Each year, new hardware is being developed to advance robotics. I have compiled a list of basic skills below. Please realize this is not an allinclusive list. Other roboticists will have their own lists of skills. 1. Soldering. Soldering is a mandatoryskill for any home-built design. A panavise to hold your work and a good quality temperature-controlled soldering iron are must-have items. A soldering iron with a replaceable element and tip will also work well. For us middle-aged builders, reading glasses will make a big difference when soldering tiny wires. If you can afford it, purchase a large, lighted magnifying glass for your solder stations. 2. Basic Electronics. High-level skill with electronics is not necessary, but basic understanding of wiring and connections skills are. Areas in this category would be battery connections, working with capacitors and resistors, connecting four-wire sensor packages, LED circuits, and servo connections. 3. Advanced Electronic Skills. These would be circuit board production, Hbridge motor design, 360-degree servo modifications, pulse-width modulation (PWM), etc. For your first robots, do not worry too much about these. I presume you will be designing a small robot that can be wire-wrapped or breadboarded. H-bridge chips are very cheap and can drive small motors directly. Fully rotational servos can also be purchased these days, so you don’t need to rewire a conventional servo. 4. Hardware Skills. These can be as simple or as fancy as you desire. My first

Barlow1.qxd

3/9/2005

2:22 PM

Page 37

PART 1: Common Errors in Building Robots robot used a wood platform for the chassis and servo mounts were screwed to the wood frame (Figure 1). Any form of substrate will work. Aluminum is not necessary for a small robot. Plexiglas works well, but is difficult to cut. “Robotics Resources” in SERVO Magazine has had numerous articles on materials for robotics and I encourage you to look back through these. I am always searching toy stores for robot bases to modify. A remote control tank, bucket loader, or bulldozer are obvious and easy modifications. Simply throw away the entire top section of the tank or bulldozer and save the track and motor assembly for your new robot. Figure 3 shows a bucket loader that I used, which is a cheap way to go. There are also many very fine robot bases sold in SERVO and Nuts & Volts. 5. Program Skills. This is something that may have to be learned on your own or at a college. I highly recommend the book Programming and Customizing the BASIC Stamp Computer by Scott Edwards (Figure 4). This book not only teaches basic program skills, but it teaches you electrical skills, as well. This book is not specifically for robotics, but what it teaches is easily applied to them. There is a small robot you can build and a sonar chapter in the book, as well. Parallax has excellent manuals and tutorials online, but start off slowly; do not try to add many features at once. A flowchart is not always necessary, but it will definitely help you. If you don’t understand how to create a professional flowchart, don’t worry. Simply write on a paper what you want your robot to do. Anything written down is better than nothing. For example: your text-based flowchart could show the following: Drive forward If obstacle detected, then do something (turn left?) (bumper switch?), (IR sensor?). If no detection, then drive forward again. End

Wire up a single LED and make it flash with your program. Add in a switch to turn the LED on and off. Add a single servo or motor and see if you can make it rotate. Make the switch shut the motor off through software. Do not bother with wheel encoders and PWM. A simple wired H-bridge will have plenty of amperage for a small robot (Figure 5). Once you can get the robot to move, then you can add in some sort of collision sensor. Nothing can be more simple than a bumper switch mounted on the front of your robot. This will work on the switch circuit you learned earlier. Have your program simply detect a switch and shut off both motors/servos. With these new skills behind you, you can tackle adding an I/R or sonar range sensor. You will have confidence to program the sensor because you already have accomplished so much. Your robot’s program should not be complicated. My first robot had a bumper switch, two switches (left and right). Then, I added two I/R sensors, then a SRF04 with range detection. On my latest robot, I have I/R range sensors, light sensors, sonar sensors, IR edge sensors, all working together (Figure 6). I never could have added all these various sensors at once without learning them in steps. 6. Research. This is a very necessary skill. Research can be as easy as marking useful code found in SERVO or as daunting as spending hours on line searching the Web for information. Write things down, keep notes on circuit designs, and write down your own ideas.

FIGURE 5 You may never use them all, but you may be able to combine some ideas with others to create something new. Save all references found in magazines and on websites. I am always reading about new features or hardware being designed. SERVO always has excellent articles and ideas for robotics. Tape sticky notes to the pages of the magazines so you can find them in the future. If you see an H-bridge circuit, mark the location. For example, if you find a website for a SRF04 sensor, save the website link. You will always find a good use for these items in the future. 7. Pack Rat Skill. Don’t laugh; this is truly an art form in itself. I am always looking at old toys, electronics, or hardware to see what may be useful for robotics. “Robotics Resources” in the October 2004 issue covered salvaging electronics and useful hardware for your robots. I encourage you to pack away any useful items you find. Some

FIGURE 6 SERVO 04.2005

37

Barlow1.qxd

3/9/2005

2:41 PM

Page 38

A PRIMER FOR THE NEW ROBOTICIST your design. Two years ago, I created a quite complicated circuit board all from my head. I added many dozens of components and ICs, but I never got around to creating a wire schematic. This has come back to haunt me more times than you can imagine. I now have this board on the bottom of my robot with a second board FIGURE 7 stacked over it. Sure enough, I am always of these may be small switches, needing to know where a certain wire motors, wire, lights, rheostats, broken goes and ... you guessed it. I have to circuit board sections, remote control tear the robot apart to figure out my units, plywood scraps, angle brackets, own work. At the time of creation, a tin sheets, etc. schematic just did not seem necessary. Wrong! This does not have to be a 8. Disassembly Skill. Tear things apart. daunting chore. You can either write If you have a broken VCR, take it apart the schematic by hand on paper or use and see what is inside. If you cannot fix a computer based schematics program. it, you can use parts for your pack rat I myself use Express PCB Schematic skill. I have been taking things apart all Designer (www. expresspcb.com). my life. I admit, I did not get many of Scribble anything onto paper; it is these back together or working again, better than tearing apart your robot a but some, I did. In the process, I have year down the road. You do not need learned the tricks and secrets to their to learn how to make an industry-standesign. I also have gained a junk box dard schematic in the beginning. Write full of spare parts. down what you can understand initially. As you gain experience, you can 9. Schematics. Drawing or creating a increase your skill level. schematic of your work is a very necessary skill to have. I cannot emphasize 10. Circuit Board. Your basic circuit this enough. Create a schematic of board can be anything that is easily understood by you. Wire-wrap, breadboard, copper breadboard, or a professionally designed circuit board will all work well. Breadboards work great for debugging and the learning process. They also are reliable for robots (Figure 7). For your first robot, use a breadboard. Then go from a breadboard to an actual wired board. The industry makes a copper perf board that is wired exactly the same as a breadboard (Figure 8). You can take your design and transfer it directly to this copper board and solder on your parts. Designing an actual printed circuit board is an entirely new skill. These can be made online by companies such as FIGURE 8 ExpressPCB or you can make your own

38

SERVO 04.2005

circuit board. I do not recommend this as a first step for beginners. If you wish to, you may read my article on circuit board production in the August 2001 issue of Nuts & Volts. 11. Logbook. Keeping a journal or logbook of your designs is indispensible. For years, I would wire a robot, write code, make changes, and never write anything down. This was a horrible habit to get into and it has more than once really hurt me. I always commented my code (a little bit), but never kept a list of changes or what I had done that day. A logbook does not have to be fancy. I use a simple school notebook. If I do work on my robot, I write down the date, any new program revisions — such as bolomark5.1.bas — and what exactly I did to change that program. If I add new hardware, I write down what I added or modified and any applicable wiring codes. It will take some effort to get into the habit of writing things down, but your logbook only has to be legible to you. You should see the chicken scratch on some of my pages. Obviously, being clear and concise is best, but it is far more important to have something written down rather than nothing. Make this one of your very first habits to develop. 12. Read Your Logbook. This sounds silly, but — if you have debugging problems — don’t just assume you can remember everything that you have done over the years. This is the purpose of a logbook: to remember things you can’t. On one robot, I had a socket connection for an IR calibration resistor. On the disassembly of my main boards to check my wiring (recall that I had no schematic), I inadvertently pulled loose this resistor. Sure enough, my IR circuit failed and I spent hours finding locating the problem. I wrote this down in my logbook. Wouldn’t you know it, this happened to me a second time about a year later for the same reason. Once again, I pulled the resistor loose, and once again, I spent hours debugging. If

Barlow1.qxd

3/9/2005

2:42 PM

Page 39

PART 1: Common Errors in Building Robots I had only read my logbook, I would have seen this problem documented and fixed it in two seconds.

bolt into the center of the ball half to attach it to your robot (Figure 9).

Tools

• IR edge sensors. One difficult problem I had was implementing IR edge sensors on a robot using the Atom’s hardware interrupt. I had spent many long hours trying to figure out why I was getting many false interrupts in my code. I was not sure if I was getting motor noise interfering with the edge sensors tied to the interrupt pin, if I was getting stray noise through my circuit board, or where the false interrupts were coming from. I even tried a counter in my code to only act upon an interrupt if the system had counted five occurring interrupts. I finally installed a pull-up resistor on the interrupt pin. I thought that I needed to keep this pin pulled up to +5 volts until the I/R edge sensors output a low or zero. This, too, did not work. I was on the right track, however. I finally determined that this pull-up resistor is a critical value. Too low a resistor value (300 ohm), and the edge detectors cannot bring the interrupt pin low fast enough. Too high a resistor value (1.2 kilohm), and the false interrupts continued unabated. This value

You will spend a lifetime acquiring tools — both expensive and inexpensive. Some useful tools are: a logic probe, Dremel drill, panavise, soldering iron (good quality), tweezers, jeweler’s screwdriver set, parts bins, alligator clips, X-acto knife and saw, hot-melt glue gun, solder sucker or solder wick, resistor color code chart, magnifying glass, mini drill bits, heatshrink, basic multimeter, bench-top power supply, oscilloscope, and IR test card or IR test circuit.

Problems I Have Had If you are still with me, then you may find some useful information from the many problems that I have had over the years: • Battery problem. Ni-MH caused the CPU to reset, as Ni-MH batteries are not always a direct replacement for NiCad batteries. I had a working robot, that used four Ni-Cad batteries. The motors were tiny and only drew 300 mA/h. I installed four Ni-MH batteries and spent weeks trying to figure out why my CPU kept resetting. It was not this simple at the time, of course. I tried filter capacitors and storage capacitors to no avail. I finally determined that the Ni-MH batteries could not supply the instant-on amperage draw from the motors. I solved this with a second battery pack of Ni-Cad batteries, in parallel. • Tricycle drive robot. On one of my robots, I had dual-servo-drive motors and a trailing wheel. I found out that, when backing up, this wheel would jam or twist in an odd direction and cause the robot to become stuck. I solved this by placing a fixed, round ball caster on the rear of the robot. A plastic round caster from a chair works well. I have heard of other people who use half of a ping-pong ball. Glue a

FIGURE 9 changed, depending on how many edge sensors there were tied in parallel, as well. I never did figure out why the IR sensors were putting out false triggers. I think they were in a floating state and any stray circuit noise must have affected them. I’m telling you this long story so that you, too, will always persevere through your problems. Don’t give up! • SRF04 sonar and “specular error.” On one of my robots, I had a single SRF04 sensor (Figure 2), and many times, the sonar would not detect a wall or a corner. I found out that this is called “specular error.” This manifests itself if a robot moves towards a wall at an angle of about 30 degrees.

HobbyEngineering

The Thetechnology technologybuilder's builder'ssource sourcefor forkits, kits,components, components,supplies, supplies,tools, tools,books booksand andeducation. education.

Robot Robot Kits Kits For For All All Skill Skill Levels Levels

ICs, ICs, Transistors, Transistors, Project Project Kits Kits Motors, Motors, Frame Frame Components Components and and Scratch Scratch Builder Builder Supplies. Supplies. Order Orderby byInternet, Internet,phone, phone,fax faxor ormail. mail.

www.HobbyEngineering.com www.HobbyEngineering.com

Books Books and and Educational Educational KK

BEAM BEAM Kits Kits and and Components Components

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

Visit Visit our our store store near near SFO! SFO!

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

SERVO 04.2005

39

Barlow1.qxd

3/9/2005

2:42 PM

Page 40

A PRIMER FOR THE NEW ROBOTICIST FIGURE 10

The signal will bounce off the wall, slide down along the wall, hit a corner, and come back to the robot — or the signal may simply continue and never show a return. The sonar will think there is a long distance ahead when there really is not. This is most noticeable on very smooth walls, particularly metal walls. • Keep your code neat and clean. I have never been the best programmer, but — over the years — I have realized that neat code makes for easily understood code. Keep your variables in one section and constants in another. Subroutines should be clearly listed and grouped in sections. This will also help tremendously with debugging your program. I once had a stack overflow problem in my code. My robot would only run for around 30 seconds before resetting. I thought I had a hardware problem — possibly some stray voltage on the CPU power line. Finally, someone on the Atom forum reviewed my code and found out that I had some goto subroutines without proper returns. He cleaned up my code and, now, I can run for hours without errors. This problem crept up on me because I

had been testing other items on the robot and never ran it for more then 30 seconds.

• One change at a time. Only make one change at a time while debugging or making coding changes. Resist the temptation to make two or more changes at the same time. Unless you are racing against a deadline, there is no reason to ever make two code changes at once. Even something so simple as a subroutine name change or a variable name change can cause grief if combined with a second change. When you make two changes together, it’s very hard to know which change caused a new program error. Perhaps, professional programmers can make more than one change before compiling, but it seems like every time I try to do it, I get burned in the long run. • Version numbers. Save different versions of your program. I used to make a code change and overwrite my original program. I did this routinely until one time, I made many major changes at once and overwrote the original (note the one change at a time item above). Naturally, the program quit running and it took me forever to figure out what went wrong. Use any method you wish, but — whenever you make a code change — save it as a new program. For example, change the base number for minor revisions and the tens digit for major revisions — bolomark3.7 to bolomark3.8 is a minor change and bolomark3.5 to bolomark4.0 is a major change.

• Single sensor on a rotating servo head problems. I spent many long hours trying to RESOURCES get a robot to be crash free Parallax: www.parallax.com using a SRF04 and GP2DO2 Basic Micro Atom: http://basicmicro.com mounted on a swiveling servo head. I never was Nuts & Volts: www.nutsvolts.com able to get my robot 100 Keystone Electronics battery holders: www.keyelco. percent reliable with this com/kec/standpro/stdframe.htm method. First of all, this is a Acroname Sensors: http://acroname.com slow way of detecting Author: [email protected] objects ahead if you have

40

SERVO 04.2005

to keep moving a servo back and forth. I also had many problems with the sensors not detecting narrow objects, such as chair legs. This is an inexpensive method of sensing, but — in the end — installing multiple sensors will make a much better system. If you can afford it, you can never have too many sensors! A rotating sensor head works fine for large objects and walls, but it will fail most of the time on narrow objects. Four SRF04 sensors work a billion times better than one on a rotating head. Please understand I am not knocking a swivel-head design; I just wish to make it clear that, if you can afford it, multiple sensors will always give more efficient object detection. • Metal battery holders. I highly recommend metal battery holders for all applications (Figure 10). Over the years, I have had many plastic battery holders fail. The contacts will melt out of the holders or the case will split in half. I know that many people will say I am drawing too much amperage, but this is not always so. Even when it is new, a plastic battery holder can cause all kinds of grief. Keystone Electronics sells nice aluminum and steel battery holders.

Summary I hope that this first article has shown you many of the problems and errors that can develop for a roboticist. Part 2 will go into detail regarding syntax and code errors, useful programs, helpful notes, and useful circuits. I’m sure that many other people have good tips and tricks, as well. I encourage you to always search for useful information and record these tips in your logbook. We are all working on the cutting edge of technology and anything you learn now will certainly be useful in the future. Always remember never to give up when struggling with a problem. Sit back, relax, ask a friend for help, or ask for help on forums. Your simple designs today may lead to tomorrow’s next great breakthrough in robotics. SV

Davis.qxd

3/9/2005

11:48 AM

Page 41

by Lester “Ringo” Davis computer numerical control (CNC) machine is basically a milling machine with motors attached to each axis with a computer controlling them. A small three-axis CNC milling machine can cost up to $35,000.00, and after looking at what it did, I decided to try to build one for slightly less money — about $34,500.00 less, to be exact. This article is not intended to be a recipe for building a copy of my design, but for giving you ideas on how to build your own using some of the techniques I found and avoiding some of the mistakes I made. I’m an electrical engineer, so machining is not part of my background, but if I can make this work, then so can you. I did have access to a small machine shop with a band saw, lathe, and a milling machine. I wanted my machine to be able to cut plastic up to four-inches thick, thin metal, and also be able FIGURE 1. This shows the Acme screw, coupler, bronze bearing, tap, snap ring, ball bearing, and the precision ground rod. to make printed circuit boards (PCBs). I wanted to work on material at least 12-inches wide and 18-inches long, and I was looking for precision in the range of 0.001 inch. With those ideas in mind, I started looking at what materials were available ...

A

SERVO 04.2005

41

Davis.qxd

3/9/2005

11:48 AM

Page 42

A Hobby CNC Milling Machine A little research on the Web revealed that there was plenty of software available to run a CNC machine using the printer port of a PC. The PC sends commands to stepper motors that, in turn, spin the Acme threads to move the cutting tool. An interface board is needed between the PC and the stepper, but that was also easy to find. For a cutting tool, I was looking at a Dremmel, a Roto-Zip, and a laminate trimmer from Porter-Cable. FIGURE 2. This is the completed tap for the screw holes. A glance at the McMaster-Carr catalog showed me that the precision ground rod I would use as my bearing supports came in stock lengths of six, 18, and 24 inches, so I used those numbers as my main dimensions. The threaded Acme screw I would use to move each axis came in 36-inch lengths, so it would have to be cut down. The Acme screw is 10 turns per inch and the stepper has 200 steps per revolution. This means that one step of the motor moves the desired axis 1/2000 or 0.0005 inches, which is better than I was initially shooting for. There will be some slop in the system, but hopefully it will be minimized. In Figure 1, you can see the Acme screw, coupler, bronze bearing, tap, snap ring, ball bearing, and the precision ground rod. The next thing to decide was what material to use to make the frame of each axis. Wood would have been okay (and cheap), aluminum would be sturdier (but expensive), but I decided to use a plastic material called high-density polyethylene or HDPE for short. HDPE is available from any plastic reseller, like McMaster-Carr, and comes in sheet form in a variety of widths and thicknesses. It is easy to machine; you can cut it with a band saw, drill it, tap it, etc., and the white color gives it a nice clean appearance. FIGURE 3. Completed machine without deck or cutter.

42

SERVO 04.2005

Design With the basic materials decided upon, I started designing the actual machine. Some CNCs move the material in at least one direction while moving the cutting tool in the other direction (s), but my design keeps the material stationary while the cutting tool moves in all three directions. I started with the Z axis (vertical) since it is the smallest. I planned from the start on using the 1/4-inchdiameter, six-inch-long linear rods, so the height of the Z axis was to be six inches. If you want more Z travel, then just use longer rods and change your dimensions to fit. At this point, I had not decided which tool I would be using for the cutter so I designed the width of the Z axis to fit the largest one. After I drew the rods and Acme screw, I could then get an idea on how deep the Z axis needed to be in order to have room to fit the horizontal linear rods and screw for the Y axis. I spaced the linear rods as far apart as I could and still be comfortable that they were not so close to the edge as to make it weak. I wanted to use two bearings on each rod for stability, so I designed two one-inch-thick blocks to ride on the Z axis rods. The lower block will be tapped to allow the Acme rod to move it up and down. These two blocks are attached to a 4 x 5-inch piece of 1/2-inch HDPE. This piece is what the cutting tool will be attached to. It has holes evenly spaced so that it can be moved up or down depending on the type of tool that is attached to it. So, the Z axis is basically a box with two rods running up and down, through it and the cutting tool attached to the front of it. The Y axis (left and right) consists of a frame with two horizontal linear rods and an Acme screw. These rods go through the Z axis and support it while one side is tapped for the Acme screw so that it can move. The width of the Y axis is 18 inches, again because of the standard length of the linear rods. I made the sides and back out of 1/2inch HDPE and six inches wide to make it stronger. Making the sides narrower would reduce weight, but I was afraid of flexing, so I decided to err on the side of caution. I determined the height by drawing the Z axis with the largest motor attached and then leaving enough room for a fourinch-high block of material. The bottom pieces of the frame are where the bearings will be held so I used oneinch-thick HDPE for these, as this allows almost the entire bearing to be enclosed for added stability.

Davis.qxd

3/9/2005

11:49 AM

Page 43

A Hobby CNC Milling Machine The X axis (forward and backward), like the rest, is a frame that moves the other two axes. This frame sits on the table and also holds the material that is being machined. This is made entirely out of one inch thick HDPE for strength. It is 24-inches long, 20.5-inches wide, and 2.5inches high.

Cutting and Drilling With the dimensions set, it was time to start building. I did a rough cut of the HDPE on a table saw and grouped the pieces according to which axis they belonged to. To make sure everything came out exactly the same size, I clamped the two sides of the Z frame together and drilled a couple of holes and bolted them together. That way, when I make the finishing cuts for length, both parts are exactly the same size. For the width cuts, I also bolted on FIGURE 4. This shows the completed Z-axis assembly. the top and bottom pieces, then cut all four pieces on the milling machine at the same time. The most important slightly smaller so that the bearing can be pressed into thing to remember when building this type of CNC place, then it will save you a headache later. machine is that some dimensions are extremely critical, One of the outer pieces should be drilled large enough while others are not. For example, it doesn’t matter if the for the Acme screw of the motor coupler to pass freely width of the Z axis is 3-1/2-, 4-, or 4-1/2-inches wide. The height of the Z axis should be close to what was designed because, if it is too tall, then FIGURE 5. Measurement layouts are available at www.servomagazine.com the rods will not fit. Likewise, the spacing between the rods does not matter, as long as there is enough clearance for everything. The part that is absolutely critical is that the spacing you use has to be exactly the same for all four parts for the rods to pass through. For the Z axis this means the top and bottom of the frame as well as the two blocks that will hold the Motor motor mounting plate. For the Y axis, it is the sides of the Z axis and the sides of the Y axis. The way I ensured that everything was lined up was to stack all the parts that would be drilled together with the parts needing the smallest holes on the bottom. Then, I used a milling machine with end mills to do the drilling. I had to cut holes for the linear rods and the Acme screw. For the linear rod, I cut the smallest diameter hole first through all the pieces, then used the next larger mill and only went through the first three layers, then I went to the largest mill and did the top piece. You can feel it as you pass through each layer, so stopping at the correct time was easy to do. The outer pieces should be the diameter of the rod and the inner pieces should be the diameter of the outer dimension of your bearings. If you can drill it just SERVO 04.2005

43

Davis.qxd

3/9/2005

11:49 AM

Page 44

A Hobby CNC Milling Machine a 27/32 mill for my hole to be tapped, and since all of these holes were drilled at the same time, everything line dup perfectly. You will want to go ahead and also drill the holes to mount your stepper motors at this time.

Tapping I bought taps for the 10-24 and 1/4-inch bolts I used to bolt everything together, but decided to go another route for tapping the holes of the frames to move everything around. I could have bought Acme nuts that just bolt to each frame, but they are expensive and can have too much backlash. After I cut my Acme rod to the lengths I needed, I had several pieces left over. I decided to use one of them and turn it into a tap. This way, the tap would match the Acme screw exactly and backlash would be minimized. FIGURE 6. This is the completed Y-axis frame. To do this, I drilled a hole into one end to use as a handle. Then, I turned down the other end a couple of through, where the other outer piece should be drilled to degrees to make starting the tap easier. Then, using a hold a bronze bearing. One of the inner pieces should be milling machine, I cut a couple of four-millimeter grooves slightly larger than the rod diameter, and the other side into the Acme screw. This had to be done very slowly to should be the correct diameter so that it can be tapped prevent breaking the bit. After this was done, I used a later for the Acme rod. For my 1/2-inch Acme rod, I used small file and an X-acto blade to clean up the threads. Once this was done, I was able to tap the pieces of the frames. FIGURE 7. This shows the overall dimensions of the X axis.

Acme Screws

Overall View X Axis Dimensions

Motor

.201 6 places per side 0.149 back only 4 places

2.5 2.18 1.25 0.32

0.5

2.25

3/8 in front piece 3/4 in front piece 0.5

8.32 9.25 10.18 16.25

44

SERVO 04.2005

18.50

The Acme screws I used were 1/2-inch diameter, but the stepper motors had 1/4-inch shafts. The couplers available with the steppers were also 1/4 inch, so I needed to reduce the diameter of the end of the Acme screw. To do this, I used a lathe and turned down the last 1/2 inch of each screw until it was 1/4 inch and fit in the coupler snugly. It is held in place by a set screw. I also turned down the opposite end to 1/4 inch so that I could use a 1-1/4-inch bronze bearing to support it. The bearing is inserted into a 3/8inch hole in the outer frame opposite the stepper.

Final Assembly At this point, the only thing left to do is to assemble each frame. There are several options when it comes to attaching the sides to the top and bottom. You could use extruded-aluminum, L-shaped pieces to bolt everything together, or steel L-brackets from the local hardware store. I took another option and drilled holes though the top and bottom and then smaller holes into the sides, which I tapped for 10-24 bolts. This gives a nice, clean appearance and holds very securely. I countersunk the holes on my Y axis because I needed the clearance, but you could do it for all the axes, if you want to.

Davis.qxd

3/10/2005

9:16 AM

Page 45

A Hobby CNC Milling Machine

FIGURE 8. The completed X-axis frame. After assembling everything except the Acme screws and steppers, you can slide each axis around by hand. I was really impressed by how smoothly everything moved. The Z axis moves up and down with very little friction, but there is no noticeable movement at all in the front-back or left-right directions. The other axes feel just as stiff. One modification I made here was to double up the thickness of the Z-axis sides where the bearing goes through. It looked a little thin having a bearing over oneinch wide sticking through 1/2-inch walls. I made a small piece to fit inside the Z axis about 1/4-inch thick. This allows me to use snap rings to hold the bearings in place. All of the other axes used one-inch thick material, so they did not need modification. After threading in the Acme screws, you can move each part by spinning the screw with your finger. Everything should move smoothly with no binding. Once you see that everything works, you can attach your stepper motors.

Next Time The drawings I made when designing my machine can

PARTS LIST Ball bearings — 1/2-inch Thomson linear bearings #A81420 Linear rod — Thomson linear bearings #QS 1/2-L-SS-18 Acme screw — Keystone Threaded Products

FIGURE 9. Here, the holes are tapped for the Acme screw. be downloaded from the SERVO website (www. servomagazine.com). Next time, I’ll discuss the interface board you will need to control the stepper motors from your printer port and the software to drive it. We’ll attach the cutting tool and walk through cutting out a simple part. SV

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

X T

v e c to r 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

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

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

Stepper motors — Japan Servo #KP56LM2-097 Bronze bearings available from any hardware store High-density polyethylene available from McMaster-Carr or any plastics distributor

SERVO 04.2005

45

Thaler.qxd

46

3/9/2005

11:40 AM

SERVO 04.2005

Page 46

Thaler.qxd

3/9/2005

11:40 AM

Page 47

Prior to 1974, there had been many attempts to model events and phenomena via network-based techniques. Probably the most well-known of these modeling methodologies was introduced by the Reverend Thomas Bayes as early as 1763. Within these models (Figure 1), simple probability or rule-based calculations were carried out within so-called “nodes,” and the results transmitted to other such nodes to create compound models. Once completed, such Bayesian networks were impressive, although they did admittedly require humans to endow each node with wisdom. Certainly, the creation of a Bayesian net is an admirable and scholarly project; FIGURE 1. Network vs. neural network models. Vintage network models however, it does not qualify as the basis consist of intelligent nodes, communicating through dumb connections. for the kinds of futuristic AI or robotics Modern day neural networks consist of dumb nodes or switches that effectively grow connections that embody intelligence. that Hollywood envisions. For one thing, what happens when an AI agent or the logical inputs — in1 and in2 — and comparing against some robot encounters a new scenario or environment for which predetermined threshold value, θ. If the weighted input (in1 x new human wisdom is required? Out of pure necessity, the w1) + (in2 x w2) exceeds θ, the neuron transitions from the off kinds of cybernetic systems predicted by science fiction must to the on state. (Check for yourself that, by simply adjusting be capable of fending for themselves. the threshold value, θ, normally considered a connection The breakthrough year, 1974, was when researchers disweight fed by a constant neuron outputting a value of 1, the covered that multiple layers of totally unintelligent nodes, AND network becomes an OR network.) effectively acting as “on-off switches,” could autonomously wire themselves together so as to effectively eliminate the need for humans planting explicit rules or calculations within the individual nodes (Werbos). Instead, all of the wisdom spontaneously “grew” in the form of connection weights between very dumb nodes, called neurons. Realizing that the single neuron neural network just disInterestingly enough, this work was fueled by so-called cussed was purely a pedagogical one that did not self-organize computational psychologists who were attempting to gain a itself, let’s discuss how really practical neural networks function. mathematical foothold into how the brain perceived things These will be nets that effectively build themselves and capture and events within an environment. They needed to account much more complex relationships in higher dimensional spaces. for how the brain could enlist relatively dumb switches to encode all world knowledge in FIGURE 2. This is a simple example of how intelligence may be contained in connection weights. With weights w1 and w2 both assigned values of 1.0 and the form of electrochemical connections between them. The result was the so-called the switching threshold q set to 1.5, this simplest of neural networks acts as an AND logic gate. By lowering the threshold to 0.5, it then acts as an OR gate. perceptron, a collection of interconnected neurons that allowed sets of patterns to be associated with one another. Therefore, the image of broccoli — a million-dimensional, retinal firing pattern — could activate an opinion: the cortical firing pattern representing one’s emotional response to eating this vegetable. To better understand how wisdom — in the form of complex logic — can be represented by connection weights between simple switches, consider Figure 2. There, human ingenuity has been used to prescribe connection weight values that convert the simplest neural network of them all, a single neuron, into either an AND or OR logic gate. Note that the neuron switches between off (0) and on (1) states by weighting

An Exemplary Artificial Neural Network

SERVO 04.2005

47

Thaler.qxd

3/9/2005

11:40 AM

Page 48

The input patterns could, therefore, consist of 28 sonar range measurements, perhaps in meters {1, 1, 1, … , 4, 4, 4, 4, … , 1, 1, 1}. Since this pattern looks as though it’s an open door, the corresponding desired network output pattern would be {1, 0}, with the first component set to 1 to indicate a doorway pattern. The second component — here represented as 0 — would be reserved to indicate those sonar patterns that do not qualify as open doorways. If this had been the sonar return from a wall, this latter component would be set to 1. Prior to training this network, we would amass a training exemplar database consisting of several hundred records that include 28 fields describing the range measurements in the sonar sweep and two latter fields indicating whether the corresponding sonar pattern represented a doorway or not. Hopefully, this database would be collected over a range of scenarios that include sonar sweeps of both walls and openings at a variety of viewing aspects. The particular network chosen (Figure 4) is known as a multilayer perceptron (MLP) and consists of 28 input neurons FIGURE 3. Doorway detection using sonar sweep. to accept the 28 sonar ranges from the angular sweep, 10 A hexapod robot, simulated here in virtual reality, conducts intermediate or hidden layer neurons, and two output neua 30-degree sonar sweep to detect doors, portals, and rons that are intended to activate in a mutually exclusive fashother openings through which it can crawl. Here it has identified a doorway to crawl through. ion to indicate the presence or absence of a doorway. To train this MLP, we intend to rapidly stream these records — Let’s consider, as an example, a sonar system aboard a called exemplars in neural network parlance — applying input robot (i.e., a hexapod crawler) that is returning range measpatterns to the net’s input layer and corresponding output urements over a 30-degree range (Figure 3), in one degree patterns to its output layer as the MLP’s connection weights sampling windows in the robot’s forward vista. If we elect to self-organize so as to capture all the complex relationships build a neural network to classify the kind of scene in front involved. In this manner, we hope to create an accurate doorof the robot as an open doorway or not, all we need to do way detector for the robotic crawler. is assemble a training database involving representative In beginning such network training, all connection weights sonar input patterns along with human judgments as to would be randomized, perhaps in the range from -1 to +1. In whether each sonar pattern represents a passageway. training this network, each of our input patterns would be applied to the net in what is called a feedforward cycle. Now, each of the hidden FIGURE 4. Doorway-detecting neural network. Inputs are 28 sonar ranges for the angular sweep between +14 and -14 degrees. Outputs represent classification into layer neurons — labeled by the index j — door and not door categories. The intermediate layer is called the hidden layer. receives 28 analog inputs, instead of the two Boolean inputs in Figure 2. We call this weighted sum netj, the net input to the jth neuron (Equation 1). Rather than simply comparing this net input against some stored threshold value — as we did before — we utilize a sigmoid function (Figure 5) to approximate this switching behavior and to calculate the activation for the jth neuron, actj (Equation 2): netj = ∑iwij x acti

(1)

actj = 1/(1 + exp(-netj + θj))

(2)

where θj is the switching threshold or bias of the jth neuron and acti, the activation of any preceeding neuron i. Note that the functional form expressed by Equation 2 manifests the necessary switching behavior required of

48

SERVO 04.2005

Thaler.qxd

3/9/2005

11:41 AM

Page 49

a neuron, transitioning from an off state (0) to an on state (1) near the threshold value of θ (Figure 4), where actj assumes the value of 1/(1 + exp(0)) = 1/2. One very convenient feature of the sigmoid function is that its first derivative is well behaved, in a mathematical sense, and takes on a very simple form: actj ‘ = actj x (1 – actj),

(3)

where actj’ represents the differential of actj with respect to netj. This quantity, actj’ is very important, as you are about to see, because it helps determine the corrections to any connection weight feeding the neuron j. Further, because of its simple analytical form, it can be readily incorporated into the computer algorithm responsible for training this neural net. Once all of the outputs have been calculated for each hidden layer neuron, the forward propagation is repeated for the two output-layer neurons that are likewise accepting activation values from the 10 hidden layer neurons. They calculate net inputs and produce activations that are always initially wrong when compared with the desired network outputs. It is at this stage that a training algorithm takes charge, notes the difference between actual and desired outputs of the network, and begins the process called backpropagation. In the process, the connection weights feeding any neuron are corrected or updated according to the following rule: ∆wij = η * δj * actj’ * acti

FIGURE 5. Sigmoid function (solid blue) versus simple thresholding function (dashed red). This is a plot of Equation 2, showing the activation of the jth neuron, actj with respect to its net input, netj. Here, the threshold, qj has been set to a value of five.

Its purpose is to keep the average training error from “falling” into and dwelling within local minima and, instead, keeps the error rolling between these error canyons and valleys

(4)

where ∆wij is the correction — either positive or negative — that must be added to the weight, wij. The adjustable constant called the learning rate is η, δj is the output “error” of the jth neuron, actj’ is the first derivative of neuron output with respect to net input noted above, and acti represents the raw, unweighted output of the neuron i feeding the neuron j through the weight wij. The output error δj is easy to calculate for any output neuron, being the difference between its desired and actual outputs. Otherwise, the calculation of δj for any hidden layer neuron is more formidable, since it involves the weighting of all the output layer deltas as they propagate from the network output layer back to the neuron of interest, j. In effect, the network’s output errors percolate back through the network counter to the direction of typical information flow. This backpropagation takes place along “trees” whose branches begin at all the output neurons and terminate at the “back doors” of the neuron whose weights are being corrected. Thereafter, these weighted error sums govern the size and sign of updates applied to weights leading to the “front door” of each neuron. Before departing from our discussion of Equation 4, I offer three observations. First of all, although the weight update rule looks simple, it is derived from the requirement that the average prediction error of the network over all of its training exemplars be minimized, producing some very impressive differential equations that ultimately reduce to this simple equation. Secondly, Equation 4 may contain another additive optional term proportional to the product of the last weight update, ∆wij, and a constant called momentum. Circle #99 on the Reader Service Card.

SERVO 04.2005

49

Thaler.qxd

3/9/2005

11:41 AM

Page 50

until it arrives at an exceptionally deep error minimum from which training cannot escape. Finally, Equation 4 amounts to what I typically call a “mathematical spanking,” effectively punishing connection weights that do not contribute to the accuracy of the neural network by modifying their values. This mathematical spanking continues as we repeatedly apply input and output training exemplars to the network until the prediction error falls below some acceptable level. As a result of these myriad weight updates, some very interesting phenomena are occurring within the network. The first of these is the formation of what is called a classification layer, as the connection weights leading to the hidden layer self-organize to effectively collect input patterns into important families or classes. In so doing, this classification layer learns by repeated exposure to detect the important features of the input space that can ultimately contribute to the correct classification of the sonar pattern as indicative of a doorway or not. In this sonar example, distributed colonies of neurons develop so that — because of their feeding or afferent connection weights — they respond to important features, such as walls, edges, and gaps. Therefore, when the sonar return senses a solid wall ahead of it with no available portal to crawl through, only the colony of cells corresponding to walls activates. However, if the sonar return is from an open doorway, then wall, gap, and edge detecting colonies all activate, producing a preliminary classification of the doorway as just that. The second self-organizational phenomenon takes place in the output weight layer, wherein the necessary logic for classification develops that might very well resemble our previous example of the AND gate. This heuristic knowledge, once discerned, would look something this: If edge, gap, and wall features are all indicated in the classification layer, then a door is present; otherwise, the forward scene does not include a doorway. Now that I’ve described the training of an artifical neural network (ANN), let me emphasize that absolutely no domain knowledge was necessary. The network simply trained on both examples and non-examples of doors, essentially learning the “zen” of what constitutes a doorway. This process consisted of: 1) Learning the essential features of what constitutes a door, and 2) The required logic to discern the presence of a door, should the requisite features be detected. A programmer did not have to hard code this logic into software, drawing upon his or her world knowledge. The ANN learns completely by exposure to sonar returns that are representative and nonrepresentative of doorways. (What I haven’t told you is how this process may be totally automated in real-time.)

References Freeman, J. A. and Skapura, D. M. (1991). Neural Networks: Algorithms, Applications, and Programming Techniques. Addison-Wesley, Reading, MA. Werbos, P. (1974). Beyond Regression: New Tools for Prediction and Analysis in the Behavioral Sciences. Ph.D. thesis, Harvard, Cambridge, MA.

50

SERVO 04.2005

You now should have a handle on how intelligence is automatically absorbed within the connection weights between neurons, typically through this iterative process of weight corrections. Of course, this particular example has illustrated just one kind of artificial neural network, notably the workhorse of the field, the MLP. Although we have chosen a rather small, three-layer network as a robotics-related working example, oftentimes, four or more layers are used with many more neurons. Researchers in many fields are discovering the MLP architecture may be used to conveniently model phenomena and relationships within their respective disciplines. In robotics, the kind of neural network just discussed may be used to build reactive robotic systems, somewhat like a spinal reflex that automatically maps sensor inputs to some robotic response. In this case, such a response may involve generating the necessary leg servo signals to advance a robot toward the sensed doorway. Note that the kind of neural architecture required in building more ambitious deliberative robots — those that choose among multiple courses of action from self-acquired world models — is quite different than that discussed above and is beyond the scope of this introductory article.

Conclusions Neural network practitioners are always quick to point out that the primary advantage of artificial neural networks is their ability to capture highly non-linear relationships, but I typically take the argument a few levels deeper than that. Throughout history, humans have devised models of things and events by combining fundamental analogies to describe more complex phenomena. Mathematicians have characteristically combined well understood functional behaviors, such as linear, power law, and sinusoidal relationships to account for phenomena having scientific or technical merit, weighting these simpler functional analogies by expansion coefficients, ai: F(x) = a1F1(x) + a2F2(x) … + anFn(x)

(5)

Here, the Fi represents the simpler functional behaviors that could be the powers of x, Fourier components in the form of sine and cosine terms, or a simple linear expansion. The choice of proper functional analogies, Fi, and solution for the expansion coefficients, ai, has occupied scientists and mathematicians for centuries. Once these weightings are discovered — typically through linear matrix techniques — we produce precise mathematical models to predict moderately complex behaviors. However, the bulk of activities going on in the world are not describable in terms of simplistic series expansions of the type embodied in Equation 5. In reality, in the more complex and non-ideal problems increasingly mulled over by scientists and engineers, events happen in complex, causal chains. For instance, there may be some initializing event and then subsequent events occur in a cascading fashion. Looking at any given output neuron in Figure 4, its activation is a function of all the activations within the hidden layer that are, in turn, a

Thaler.qxd

3/9/2005

11:42 AM

Page 51

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

function of activations in the previous layer. In effect, this network can represent a causal chain of the form: THOUSANDS OF ELECTRONIC

F(x) = Fn(Fn-1(...F0(x))),

(6)

where F(x) is the output of any output neuron that may be represented in a nested functional form. In other words, something has happened, Fn, because something else has happened, Fn-1, ultimately because of some initiating event x. In other words, multilayered neural networks are the natural and most flexible way of modeling the world. A moment’s reflection reveals that Equation 6 is a much more general functional fit than Equation 5, allowing for such nontrivial causal chains and incorporating the less general series expansions at any level of nesting. Also, realize that the solution for the basic functional forms, Fi, cannot be achieved using the traditional linear matrix techniques. Instead, we must rely upon the iterative weight update procedure discussed above that forms the basis of training methods like backpropagation. Because of the generality of fit without any presuppositions about the functional forms to be chosen, I call MLPs the “Swiss Army knife” of fitting functions. As long as there exists some intrinsic relationship between input and output patterns, a multilayered neural network can discover it. In the process, the network will automatically divide its world into its most notable entities (i.e., micro-feature detection that partitioned the sonar network into edges, walls, and gaps at the hidden layer), classify its sensed world according to the dominance of such features (i.e., hidden-layer classification), and automatically grow the logic in the form of connection weights to make some decision (i.e., the decision as to whether the forward vista contained a portal through which to crawl). For these and other reasons, I will always think of neural networks as so much more than very high-dimensional, non-linear, statistical curve fits. They are the future of autonomous robotics, as well as a revealing model of human perception. SV

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....

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

1-800-826-5432 Ask for our FREE 96 page catalog

Put a COMPLETE MACHINE SHOP on Your Bench Top! 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

Robotics Showcase

SERVO 04.2005

51

Simpson2.qxd

3/9/2005

1:46 PM

Page 52

Have you ever wanted to build a hex walker robot? Their interesting, insect-like gait and seemingly complex leg construction make them one of the more fascinating projects in robotics. Hex walkers are actually more accessible for the hobbyist than they may seem at first. In this series of articles, I will show you, step by step, how to build a six-legged crawler using only three servos. With six legs and three servos, we can experiment with different gaits and full directional control over the robot. Now that the mechanical portion of

your

walker

robot is finished, it’s time to add power and a brain. So, get your soldering iron out and let’s get started!

52

SERVO 04.2005

Simpson2.qxd

3/9/2005

1:47 PM

Page 53

Part 2

FIGURE 1. Install the socket, resistor, and two capacitors.

Electrical Construction We will use a Perseus microcontroller and a Perseus carrier kit to build the brain. They can be purchased from Kronos Robotics at www.kronosrobotics.com We will also need a female header, but all these parts will be listed in the resource section at the end of the article. Step 1: Assemble the Perseus carrier using the included instructions. Install only the socket, resistor, and two capacitors as shown in Figure 1. Don’t install the headers yet. Step 2: The headers included with the Perseus carrier are the snapable variety. Use needle-nosed pliers to break off three, threepin headers. Install them into the positions shown in Figure 2. These will be the headers used to connect the servos. Break off a two-pin header and install it into the position shown at the top of Figure 2. This will become the power header.

FIGURE 2. The headers of the Perseus carrier.

battery holders and attach it to the front of the main body between the two servos on the underside of the base. Make sure the holder is placed all the way forward as shown in Figure 4. Mark and drill a 1/8-inch hole by dry fitting the battery holder. Attach with a #4, 1/2-inch machine screw and nut. Take the other two-Cell AAA battery holder and attach it near the rear of the main body on the underside of the base. Make sure it is up against the two lock nuts as shown in Figure 4. Use a #4, 1/2-inch machine screw and nut. Step 5: Take the red wire from the lower (rear) battery holder FIGURE 5. Connect the two leads to a switch.

FIGURE 4. The proper location of the battery holder.

Step 3: Use wire cutters to cut off a three-pin header from the 36-pin female header and install it as shown in Figure 3. This will allow you to plug in an IR module so that you may control the walker with a universal remote. Next, using a set of wire cutters, cut off a five-pin female FIGURE 3. The program and IR headers. header and install as shown in Figure 3. This will become the program header. In order to program the Perseus, we will plug the EZ232 driver into this header. The brain is now complete. We will attach it a bit later. For now, let’s attach our walker’s power source. Step 4: Take one of the two-cell AAA SERVO 04.2005

53

Simpson2.qxd

3/9/2005

1:48 PM

Page 54

The Mini Servo WALKER

FIGURE 6. Heatshrink the battery leads.

FIGURE 7. Fix the PCB as shown.

and the black wire from the upper (front) battery holder and twist them together as shown in Figure 4. You can complete the power connection one of two ways: You can solder the leads together and place a piece of tape over the connection or you can connect these two leads to a switch as shown in Figure 5. If you opt for a switch you will have to drill a hole and mount the switch, and the side opposite the 5/16-inch hole is a good

FIGURE 8. The power connections.

location for it.

Step 6: Using a pair of wire cutters, break off a two-pin header from the 36-pin female header. Then take the two remaining wires — black from the lower battery holder and red from the top — and solder the leads to the two-pin header. Make sure you insert two pieces of 1/16-inch heatshrink before soldering it in place. Once soldered, move the heatshrink up and shrink it with a heat FIGURE 9. The power connections schematic. gun or flame. Figure 6 shows the completed connector. This connector will plug into the two-pin male header that we added to the Perseus carrier back in Step 2. If you did not install a switch, you will use the header as the switch. Place the female header on the male header to turn the walker on. Otherwise, you will leave the header in place and use the switch to control the power. Step 7: Now, it is time to attach the brain. To do this, stick three pieces of mounting foam to the underside of the Perseus printed circuit board (PCB). The tape does not need to run the full length of the board; about an inch will do. Trim the excess from the sides, then stick the PCB in the position shown in Figure 7. We want the board to be as close to the center legs as possible without touching them, so leave about an 1/8-inch gap. Before we continue, let’s take a closer look at the servo and power connections depicted in Figures 8 and 9. The power connector plugs into the header marked “- ++” near the top of the PCB.

54

SERVO 04.2005

Simpson2.qxd

3/9/2005

2:07 PM

Page 55

Part 2

FIGURE 10. Plug in the EZ232 driver to the program header.

As you can tell from the schematic diagram (Figure 9), there are eight more ports available to connect sensors or LEDs. One of these (Port 4) we show connected to the IR module that we will use later. Step 8: Enlarge the 5/16-inch hole a bit so that the servo connectors will fit. Once the hole has been enlarged, pass the power connector up through the hole and plug it into the two-pin header. Make sure the red lead is facing the front of the walker. Note that, if you did not install a switch, you will have to plug and unplug this header to turn the walker on and off. Next, plug the EZ232 driver into the five-pin program header as shown in Figure 10. You can now program the Perseus. Step 9: To program the Perseus, you need the Athena compiler. Download and install the Athena compiler from www.kronosrobotics.com Connect a nine-pin cable from the EZ232 driver to the PC and you should be ready to go. The Athena software comes with a complete manual that includes hookup instructions, as well as a complete tutorial. With the PC connected to the EZ232 driver and the driver plugged into the five-pin program port, turn on the power to the carrier board, and load the debug terminal in the Athena software by hitting F6. With power applied to the Perseus, you should see test data as shown in Figure 11.

FIGURE 11. This is the test data for Perseus.

with the Perseus by running through the tutorial. You can actually run through the tutorial without connecting to the walker by using the included simulator. SV

SOURCES The Kronos Robotics website is located at www.kronosrobotics.com Qty 1 1 1 1 1 1

Description Perseus microcontroller Perseus carrier, one kit 36-pin female header EZ232 eriver IR module SPST switch

2

Two-cell AAA battery holder

1

Athena compiler

Source and part number Kronos Robotics # 16382 Kronos Robotics # 16390 Kronos Robotics # 16291 Kronos Robotics # 16167 Kronos Robotics # 16226 Kronos Robotics # 16241 or All Electronics # MTS-4 All Electronics # BH-42 or RadioShack # 270-398 Free download from Kronos Robotics website.

That’s It Next month, we will calibrate and program the walker. Until then, play Circle #106 on the Reader Service Card.

SERVO 04.2005

55

BookstoreApr05.qxd

3/9/2005

andy Mind Cday’s For To ticist Robo

6:07 PM

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

56

SERVO 04.2005

Page 56

Mobile Robotic Car Design by Pushkin Kachroo / Patricia Mellodge This thoughtful guide gives you complete, illustrated plans and instructions for building a 1:10 scale car robot that would cost thousands of dollars if bought off-the-shelf. But, beyond hours of entertainment and satisfaction spent creating and operating an impressive and fun project, Mobile Robotic Car Design provides serious insight into the science and art of robotics. Written by robotics experts, this book gives you a solid background in electrical and mechanical theory, and the design savvy to conceptualize, enlarge, and build robotics projects of your own. $29.95

Robot Programming

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 Joe Jones / Daniel Roth Using an intuitive method, Robot Programming deconstructs robot control into simple and distinct behaviors that are easy to program and debug for inexpensive microcontrollers with little memory. Once you’ve mastered programming your online bot, you can easily adapt your programs for use in physical robots. $29.95

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 NEW 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

BookstoreApr05.qxd

3/9/2005

6:08 PM

Page 57

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 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

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

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

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 Building for Dummies JunkBots, Bugbots, and Bots on Wheels: Building Simple Robots With BEAM Technology by Dave Hrynkiw / Mark W. Tilden

Robot Builder's Bonanza

CNC Robotics by Geoff Williams

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

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

Digital Electronics Demystified by Myke Predko

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

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

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 NEW 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 04.2005

57

Little.qxd

3/9/2005

11:30 AM

Page 58

by Jascha Little

F

or many — especially those of us that have read science fiction since childhood — the remarkable lack of human-augmenting exoskeletons in our modern world is very disappointing. Are useful exoskeletons technologically not feasible? Perhaps there simply aren’t any tasks that we really need them for. When we ask these questions, what exactly do we mean by the word “exoskeleton?” An exoskeleton could be a multi-ton armored behemoth that increased the user’s strength by a factor of 100. For rehabilitation or mobility, it could be lightweight — no more cumbersome than heavy clothing — designed solely to give its wearer the strength to move. Both of these examples fit the simple definition I would like to use for this discussion: a device worn by a human operator to augment some aspect of his physical capabilities and controlled directly by the operator’s movements. Let’s take a broad look at the feasibility of exoskeletons with today’s technology. In order to simplify the discussion, I will break it down into four functional areas: power supply, actuators, structure, and control systems. 58

SERVO 04.2005

Little.qxd

3/9/2005

11:31 AM

Page 59

What are They Good For? Structure The structure of an exoskeleton may be an engineering challenge, but modern design capabilities, manufacturing techniques, and materials science are more than sufficient to meet the challenge. It would be difficult to argue that an exoskeleton needs to be more complex or requires more advanced materials than a modern fighter jet.

Actuation There is a lot of research on artificial muscle fibers at the moment. In the future, artificial muscles may represent an excellent solution for actuating an exoskeleton, but good, old-fashioned hydraulics is already up to the task. Hydraulic actuators have an enormous force-to-weight ratio that may never be matched by artificial muscles. High movement rates can also be achieved with appropriate valves and plumbing. The primary disadvantage to hydraulics is the complexity of the overall system. A great number of moving seals and high-pressure fittings must be maintained. Despite this, hydraulics could be utilized in a wide range of exoskeleton sizes and strengths. Although hydraulics may be the most appropriate solution at the moment, there are already other alternatives. Linear motors and motor-driven ballscrews are used in many similar applications, such as robotics.

Control System Who is to say exoskeletons aren’t feasible?

This may be one of the reasons we have not seen exoskeletons yet. In 1965, the General Electric Research and ment, the operator’s sense of balance will be wasted. Just Development Center attempted to create an exoskeleton how accurate and how quick the control system must be has known as Hardiman 1. Although they succeeded in building yet to be determined. an exoskeleton, the control system proved to be so difficult Recent attempts at lower extremity exoskeletons appear that — according to a GE report — attempts to move both legs at once resulted in “violent and uncontrollable :$17(''($/(56$1',03257(56 motion.” )RU(8523(¶V1R (GXFDWLRQDO 52 We certainly have far more /RZFRVW+REE\ advanced sensing and control tech$6852URERWNLW 3&&RQWUROOHU nologies available today. However, only $FRPSOHWHVRIWZDUHDQG 'HYHORSHGE\'/5 ZZZGOUGH in the last few years have we seen KDUGZDUHVHWWRFRQWURO 3URJUDPPDEOHLQ&LQFOXGLQJ bipedal robots that can balance themWKH2:,029,7URERW /,18;DQG:LQGRZVŠVRIWZDUH selves while performing even simple DUPWUDLQHU tasks and these robots are the product of massive research programs at large companies. An exoskeleton would have an advantage over these robots. It would have one of the best balancing systems onboard that is known to man: the 52%%<53URERWNLW human brain. Still, tapping into this (XURSH¶VPRVWDGYDQFHGURERW resource will require a control system 0RUHLQIRUPDWLRQ#ZZZFURERWLFVGH that works almost seamlessly with the exoskeleton’s operator. If the control :::$5(;;&20 system is unable to respond quickly 3OHDVHFRQWDFWXVE\HPDLOLQIR#DUH[[QO and accurately to the operator’s moveSERVO 04.2005

59

Little.qxd

3/9/2005

11:31 AM

Page 60

EXOSKELETONS

The structure of a system is a challenge.

to be much more promising than Hardiman, but they certainly aren’t ready to stroll down the street. However, with the sensors and computing power available today, I believe we have the tools to solve the control problems presented by an exoskeleton.

Power Supply The difficulty of this aspect of the exoskeleton depends heavily upon the application. In some cases, the exoskeleton could receive its power from an external source via electrical cables, hydraulic lines, or other means. This technique is frequently used with mining equipment, commercial diving tools, and in other industrial applications. Obviously, the power supply isn’t a problem at all in these cases. When we consider truly mobile applications, the problem can become formidable. The power required from the system should not be a problem; modern combustion engines and electrical motors can be designed with power densities greater than one hp/lb. The average human (all 150 lbs or so) can only put out about one horsepower. The difficulty lies with energy density. Humans are highly efficient machines. A physically fit human can eat a little food and then perform hard physical labor for hours and hours. Building an exoskeleton that can keep up with its operator for an entire workday will

60

SERVO 04.2005

be a serious challenge. The high-energy density of combustible fuels seems attractive in this case, but — since the exoskeleton must be worn by a human — including a combustion engine in the system is not a trivial matter. The operator must be protected from heat, noise, vibration, and exhaust. Also, the power from the engine must be harnessed efficiently to operate the exoskeleton’s complex system of actuators. Alternatively, a battery-powered system would be much kinder to the operator. Unfortunately, the energy density of the best batteries is far less than that of combustible fuels. Perhaps this problem can be solved well enough that an exoskeleton could be used continuously for hours, but this is not necessary for them to be useful in all applications. Many of our most commonly used tools only run for a few hours or less before they need refueling or recharging. It is reasonable to believe that we will see exoskeletons in actual use within the next decade. DARPA has been funding research on human exoskeletal augmentation for a few years and the first prototypes are being tested. SERVO Magazine’s Tetsujin (Japanese for “iron man”) competition is another bright moment for the future of exoskeletons. Hopefully, future competitions will see more advanced entries. The DARPA projects will probably result in equipment that is cost prohibitive for anyone but the military, but SERVO’s Tetsujin will engender a more practical approach. Hopefully, it will be the source of designs that could be developed into commercially viable equipment. Assuming that exoskeletons are on their way, the most important question is: What will we use them for? Visions of power-armor clad soldiers are the first thing that comes to mind for many when the word exoskeleton is mentioned. For the military and DARPA, this is definitely a wonderful dream. We can imagine a form-fitting exoskeletal suit that adds relatively little bulk to the operator but increases his strength, endurance, and deadliness. The suit would be armored and heavily armed with equipment that a normal infantryman couldn’t carry into battle. The suit could operate for days without refueling … and then we fade back to reality. The exoskeleton described above is exciting, but for us to pursue it first would be like Henry Ford skipping the Model T and going straight for the Porsche 911. There are many, many iterations of the exoskeleton that we will see before a soldier wears one as standard issue gear. However, the first exoskeletons may see use in combat situations. A properly designed exoskeleton could be the ideal method for delivering soldiers or law enforcement personnel into difficult urban situations. Building entry in the face of armed resistance is a brutal, extremely dangerous task. An exoskeleton could allow the operator to wear armor far too heavy for a human to carry normally. Also, this armored suit would only have to operate for the limited duration of the building entry operation and would not require the suit to roam far from resupply and repair equipment. Such a suit might allow law enforcement to bring a human negotiator into a situation that would be too dangerous for an unarmored human.

Little.qxd

3/9/2005

11:32 AM

Page 61

What are They Good For? More peaceful applications are also likely candidates for the exoskeleton’s debut. Although it is ridiculous to think that they would replace forklifts in any type of warehouse application, there are other types of lifting where an exoskeleton would have an advantage. In rescue operations, especially after natural disasters, teams of rescue workers swarm over piles of rubble trying to save victims. These teams utilize heavy-lifting equipment, but — in the wake of a large disaster — it is often very difficult to get such equipment to the scene quickly. An exoskeleton could be designed to allow rescue workers to move wreckage far heavier than an unaided human could move, yet still allow the wearer to climb over and on top of rubble impassible to wheeled vehicles. The exoskeleton could also be designed to protect its wearer from the incredibly dangerous environment that the wreckage presents. As hinted at in the beginning of this discussion, exoskeletons may have a humanitarian future, as well. There are an unfortunate number of ailments which reduce or completely destroy a human’s motor facilities. For centuries, wheelchairs have been the only solution. For patients whose bodies have been weakened, an exoskeleton could be designed that could sense the wearer’s efforts to move his body and amplify his strength to a normal level. This application would not require any technology that is not available today, but simply the research and engineering to make it a viable tool. Such an exoskeleton would provide the wearer with a far more normal life than a wheelchair. Unfortunately, people who have a complete loss of motor function in some or all of their body would require an interface with the exoskeleton that we have not yet developed. However, direct measurement of the signals from our brain in not complete science fiction. Still, it is not within the scope of my experience to discuss how realistic or how soon we might see such technology. I hope that the current DARPA exoskeleton projects produce some good results. Even more than that, I hope that

With motivation from the darpa challenge and tetsujin, a breakthrough is near.

grass roots efforts like SERVO’s Tetsujin competition will get some sharp, motivated engineers interested in exoskeletons and really get the ball rolling. When lots of people start building something in their garages and home shops, you know that something has a bright future! SV

SERVO 04.2005

61

Neal.qxd

3/9/2005

6:25 PM

O

Page 62

ver the years, I have built many different robots. These robots have successfully navigated around rooms, avoided objects, and completed other common mobile robot tasks. However, believe it or not, most of my friends are not “robot geeks.” When they would see one of my creations, they ask me, “What does it do?” I then explain my robot navigates around the room and doesn’t bump into things, and they would give me a “deer in the headlight” stare and change the subject. One of the reasons I built the robot waiter is that I wanted a project that my friends could enjoy and provide me with a better answer to the question, “What does it do?” When my friends ask me what this robot is supposed to do, I can finally say, “It serves drinks!”

62

SERVO 04.2005

Neal.qxd

3/9/2005

6:25 PM

Page 63

THE ROBOTIC WAITER Components The Robowaiter is based on a Zagros Robotics Max 99 Mobile Robot and was selected because of the weight requirements of this project. The total weight of the Robowaiter is 33lbs, and the Max base is driven by two 12-VDC, 20-inch/lb, 25-rpm motors with six-inch lawn mower wheels. A front and rear three-inch caster balances the robot, and this configuration is very stable but has one serious disadvantage: It will “high center” or jam if any steep inclines are encountered. However, this is not a problem in the environment in which the robot will be working. The parts list includes the following components: Zagros Robotics Max 99 Mobile Robot, $229.95: • Two 12-VDC motors • Two casters • Riser set with 7.5-inch spacers • Optics for wheel encoders • Two D-cell battery holders • 203 dual-channel motor driver • 12-inch-diameter deck, $9.95 • 12 x 12-inch plastic square (Max 97 additional deck), $9.95 Tower Components: • Three-foot PVC pipe (four-inch diameter), $20.00 • PVC pipe base, $5.00 • PVC pipe cap, $5.00 • Shelve bracket, $3.00 • Scrap plastic sheeting (robot skin) Electronic Components: • HC11 MC package, $129.95 • MC motor driver, $39.95 • MC encoder/sonar driver, $49.95 • Two SRF08 range finders, $54.95 each • Devantech digital compass, $45.95 • Devantech text-to-speech module, $84.95

Mechanical Construction The Max 99 has the ability to carry the weight to do the job, but at 14inches tall, it would have made a vertically-challenged waiter. After a few

trips to the hardware store, I found a solution to my robot’s height problem. I purchased a piece of four-inch-diameter PVC and a mounting base. I cut the PVC down to three feet to give the robot a total height of about 4.5 feet. With wood screws, I attached a square piece of plastic to a common bookshelf bracket to the PVC pipe. I originally planned to make some sort of head for the robot, but decided that I liked the sleek and simple look with only a tray and a cap at the end of the PVC. In the future, I plan to use the PVC pipe as a wire conduit between the robot base and a head, as this should help keep the sleek, clean look I was going for. FIGURE 1. Max 99 base. Assembly of the Max base was very straightforward, as the base is shipped ready for mounting hardware Arts (www.technologicalarts.com) and electronics. First, I mounted the for the main processor for this project. two additional decks and the tower to The HC11 processor, motor-driver, and see if the robot would tip over. encoder-driver board all plug into a I painted the PVC riser black, then common backplane which is included cut it in half to allow the additional with the HC11 package. This reduces deck to be mounted between the drive the wiring of the processor to terminatbase and the upper deck. ing the motors, connecting two pins I mounted the Max 97 deck with for a I2C bus, and wiring up the power. the shelve bracket slightly more than I also installed a small switch between halfway up the tower PVC pipe. At this the battery power supply and the point, I bolted the PVC tower and PVC power distribution terminal strip. The base to the upper deck to check for staencoder/sonar driver board was used bility. I mounted the PVC base as far to to supply the five volts DC required for the rear as the riser bolts would allow to the I2C devices and encoder optics. keep the center of gravity toward the There are several sensors on the center of the base (to prevent tipping). market which will do a good job of Originally, I thought I would need to use a larger FIGURE 2. Base with PVC mounting base attached. base for the robot to be stable enough to stop without tipping over. However I was pleasantly surprised when the Max 99 did not tumble over when I jogged the robot around the room. Once the electronics were mounted and tested, I used some scrap plastic sheet as a skin for the robot. This improved the appearance and also protects the electronics if a drink spills.

Electronics I used the Microcore HC11 package from Technological SERVO 04.2005

63

Neal.qxd

3/9/2005

6:25 PM

Page 64

THE ROBOTIC WAITER roaming around the room and serving drinks. The Robowaiter program is very simple. The robot will move straightforward and stop went it encounters an obstacle. The robot will wait a few seconds and if the obstacle is still in the path, the robot will rotate to the left until there is a clear path. Once a clear path is detected, the robot will move forward again and repeat the process. The key to this project is all in the code. The Robowaiter programming is in C and compiled using the popular Imagecraft C compiler version 7.0 for the HC11. The project is broken into three key C libraries:

FIGURE 3. The HC11 package. detecting obstacles, but I selected the Devantech SRF08 range finders for two key reasons: These sensors communicate via the I2C protocol and work very well in the one- to four-foot range. A terminal strip was used to set up an I2C bus, while Port D, Bits 4 and 5 were used to drive the I2C communication. Pull-up resistors (1.8K) are required on each I2C communication lines. Telephone four-conductor cable is used to connect the SRF08s to the I2C bus.

• Max.c — This contains general motor control and sensor routines. • I2C.c — This contains the code, which drives the I2C communication. • Waiter.c — This is the routine written specifically for this project.

Through some experimentation, I found if I don’t want a drink to fly off the tray or the robot to do a forward flip, I needed to control the speed. A simple, interrupt-driven pulse width modulation (PWM) routine made the speed of each wheel adjustable. If I reduced the speed of the robot to about 50 percent, I was able to keep more The purpose of the Robowaiter is to glasses on the tray than on the floor. entertain guests at a social gathering, Now that the robot was moving, I needed it to stop FIGURE 4. Block diagram of Robowaiter’s electronic components. when its path was blocked. As mentioned in the electronics discussion, I chose to use two Devantech SRF08 range finders to detect obstacles. The SRF08 sensors use the popular I2C communication protocol, which allows you to drive up to eight sensors with just two digital I/O points alone with the compass and text-to-speech modules.

Programming

64

SERVO 04.2005

When an object is detected less than 16 inches from the robot, the robot will stop for about five seconds or until the way is clear again. If the path remains blocked, the robot will rotate left until a clear path is detected. This behavior should allow a guest to step in front of the robot, grab a drink, and then allow the robot to continue on its way. Usually when I write a program for a robot, it requires a terminal connected to a serial port or RF modem to send the robot a command. This is very inconvenient when taking the robot out to show off. The program for Robowaiter starts running the waiter program as soon as the power switch is turned on. I think this is in keeping with the clean, sleek design I was striving for.

The Party The Robowaiter was finally ready to debut at a small gathering of family and friends, and it was time to answer that age-old question. I loaded fresh batteries into the robot and ran a few tests in the room the Robowaiter would be working in before the guests started to arrive. The room was almost empty to allow the robot a larger area to work in. Once people started to arrive, I loaded some cups on the tray and turned it on. Immediately, the robot was a huge hit with the children. They enjoyed blocking the path of the robot and seeing the robot react to them. I allowed the robot to run for most of an hour, shutting it down several times to reload the tray. I was pleasantly surprised that there where very few times I actually had to help the robot out of a situation. The sonic range finders do a very good job of detecting walls and people, but do not always detect chair legs or lamps. During the party, I also found that bookshelves could be hard to detect. Once, the robot managed to get hung up in a corner and needed a rescue. The SRF08 range finders were set to react to objects within 16 inches, but for future events, this range will be extended to 20 inches. In some cases, the robot would bump the person as it was stopping. This made some folks a little nervous since it appeared robot

Neal.qxd

3/9/2005

6:26 PM

Page 65

THE ROBOTIC WAITER

FIGURE 5. Serving drinks at the Robowaiter’s premiere party. had revolted and started attacking people with its killer tray. Some of the guests made some suggestions for future improvements. Ideas worth mentioning include using a wider base to prevent the robot from “wobbling.” With the smaller 12-inch-diameter base, the robot had a tendency to rock forward when stopping. It never tipped over or dumped a drink, but appeared to

FIGURE 6. At the MARS meeting, it was a big hit.

come very close a few times. Another suggestion was to “dress the robot up a little” by adding a bow tie and maybe some arms to hold the tray.

The Future Before the next social event, I plan to make some improvements based on what I observed during the party. This

includes adding the SP03 speech synthesizer to the routine. This device will allow me to pre-program statements, which can be triggered by the HC11 via the I2C bus. I would also like the robot to ask the guests if they would like a refreshment when it stops and then warn them when it is about to start moving again. Lastly, I plan to add another form of bump detection to the robot. 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 #111 on the Reader Service Card.

3

SERVO 04.2005

65

LessonsFromTheLab.qxd

3/9/2005

5:53 PM

Page 66

// castling bonuses B8 castleRates[]={-40,-35,-30,0,5}; //center weighting array to make pieces prefer //the center of the board during the rating routine B8 center[]={0,0,1,2,3,3,2,1,0,0}; //directions: orthogonal, diagonal, and left/right from orthogonal for knight moves B8 directions[]={-1,1,-10,10,-11,-9,11,9,10,-10,1,1}; //direction pointers for each piece (only really for bishop rook and queen B8 dirFrom[]={0,0,0,4,0,0}; B8 dirTo[]={0,0,0,8,4,8}; //Good moves from the current search are stored in this array //so we can recognize them while searching and make sure they are tested first

— PART 8 — Interview With Steve

I

A bi-month column ju ly st for kids!

LESSONS FROM THE LABORATORY by James Isom

f you have been to a LEGO Fest or major robotics competition in the recent past, chances are you have run into Steve Hassenplug and his LEGO creations. I first saw Steve’s work when putting together my website, and I have always admired him for his creativity and ingenuity. I recently sat down with Steve to ask him a few questions about his work with LEGO robots.

Steve Hassenplug: Like most people, I played with LEGOs as a kid. My favorite challenge was to build a car chassis, drive it off the table, find the weak spots, and then rebuild it, stronger.

SERVO: How did you get started building LEGO robots?

SV: What do you do now when you’re not building LEGO robots?

SV: Besides playing with LEGOs, what did you enjoy doing as a kid? SH: I liked to play chess. There weren’t video games back in those days.

Here, the LegWay balances on two wheels.

Full Contact is a Connect Four-playing robot.

SH: Right now, most of the stuff I do in my free time has something to do with robots. I build robots for different types of competitions. This summer, I have trips planned around the US and even a trip to Denmark. SV: You’ve created some pretty fun stuff. Where do you find your inspiration? Steve: Most of my creations are designed for some sort of competition, but, actually, a couple of my most popular robots just came up by chance. SV: Tell us a little bit about LegWay and how it works. SH: Out of all the robots I’ve made, I get more questions about it than any other. The name is sort of a takeoff on the Segway. I first started on the idea of building a robot to balance on two wheels when I got a custom tilt sensor from a friend of mine. I spent a few hours trying to get it to balance with no luck at all. Then, I gave up and decided to mount a distance sensor on the front to measure the

66

SERVO 04.2005

LessonsFromTheLab.qxd

3/9/2005

5:53 PM

Page 67

distance to the ground. That worked right away, with very few changes to my program. Many people think it won’t balance on a slope, but that’s not true. It constantly recalculates its balance point, so it’s always adjusting to the surface it’s on. SV: When you approach a project, do you follow a certain design process? SH: Full Contact was the hardest project I’ve worked on. It took me about three months to The biggest difficulty was making sure the chips always fell into the board. build and program it. I started with a couple of ideas about the strategy and approach I wanted to take. The key is to find the SV: You have a newer version called Stick. How is it different than Full Contact? most critical part of the robot and start with that. Sometimes, that means figuring out how fast you want the SH: When I built Stick, I wanted to make something that would robot to move and building a drive train that goes the right speed — or, maybe, building a good wedge. only use the electronics from a single Mindstorms kit. That The two main hardware challenges with Full Contact means two motors, two touch sensors, and one light sensor. A were checking the board and dropping chips into the board. friend gave me an idea for dropping a stick down inside the board to see how many chips were in the column. In the finI decided early on that I didn’t want to attempt to use a light sensor to detect chips. With a light sensor, it would be hard to tell if the object was a chip or if the person behind the board was just wearing a light or dark shirt. I finally decided to use an axle and touch sensor to feel if there was a chip. SV: When designing Full Contact, what was the most difficult problem you ran into? SH: The hardest part was making sure the chips always fell into the board. Because of how the board is designed, it has some play. So, even if the robot goes to exactly the same point every time, the chips won’t always go into the board. My solution was to go past where the chip should go, drop the chip (so it rests on top of the board), then slowly back up the robot until the chip fell into the board. SV: Tell us about the touch-sensor array. SH: The touch-sensor array was actually pretty interesting. It used six touch sensors, all connected in series. So, there is one connection point on the back of the assembly where seven wires (including the wire for the RCX) are connected together. Five of the sensors are from an older LEGO set called a Cybermaster, while the sixth is a normal Mindstorms touch sensor. Each of the Cybermaster sensors has a resistor across it, so when it’s open, there is still a reading. With that configuration, I was able to tell how many of the sensors were pressed (and I know they are the bottom sensors).

Circle #125 on the Reader Service Card.

SERVO 04.2005

67

LessonsFromTheLab.qxd

3/9/2005

5:54 PM

Page 68

The problem was solved by overshooting the slot.

ished robot, the stick is the critical part that does all the work, but — when taken out — it is little more than a simple stick.

AUTHOR BIO James Isom is a part-time robotics teacher and general all-around geek. He has taught robotics to children and teachers in the US and abroad. His website with additional goodies (including the MLCAD file of this robot) can be found at ww.the roboticslab.com He can be reached at james @megagiant.com

Rube Goldberg would be proud.

SV: Your latest project is the Rube Goldberg-inspired Great Ball Contraption. Tell us about it. SH: The idea was to develop a project to which many people could contribute. Some people like this more than a competition. The Great Ball Contraption is a combination of Rube Goldberg and a bucket brigade, where people build a module to take in LEGO soccer balls and pass them on to the next module. Some modules are very simple and others are very complex. It’s a great group project because builders can design a module that fits with their individual abilities.

The Great Ball Contraption gets everyone involved.

SV: How many modules does it currently have? SH: Actually, the GBC is not a static model that has a specific number of modules. Every time we get together, we set up a different arrangement and builders have changed, improved, and added to their modules. Last time we set it up, we had 18 modules from nine different builders. SV: How could our readers get involved? Are you bringing it to any shows in the future? SH: The GBC was developed for Brickfest, which takes place every August in Washington DC. At that time, we hope to have 30 or more modules connected together to create one of the greatest pieces of moving LEGO artwork, ever ... If you’re interested in making a module for the Great Ball Contraption or even starting one of your own with your friends, a complete specification, as well as video and other assorted goodies, can be found on Steve’s website at www.teamhassenplug. org/GBC/ SV

68

SERVO 04.2005

AssemblyLine.qxd

3/9/2005

11:36 AM

Page 69

by James Antonakos

Parts Inspection — Round # 2: Motors, Motors, Motors

L

ast time, we examined the miniature components (photoresistor and tilt switch) that will be used for the Uno robot design, an update of a 1950s light-sensing, collision-detecting robot. This month, we will investigate the motors (both DC and stepper) that will give Uno its ability to move. Table 1 shows two of the five requirements needed to satisfy the Uno design. A DC motor was chosen for moving Uno forward and backward, since a simple polarity change on the motor terminals changes its direction of rotation. A stepper motor was chosen to steer Uno, since only a small range of motion is needed for the steering mechanism. A servo motor would be overkill for this design requirement. A DC gear-head motor is a DC motor with a gear-box attached that reduces the motor’s rotational speed by a certain factor. We do not want Uno to zip all around the floor at 500 miles per hour. In fact, if Uno travels at a speed of one-half foot per second, that would seem good enough for now. One foot of motion corresponds to one or more revolutions of the rear wheels on Uno’s chassis. The rear wheels rotate at a rate determined by the speed of the gear-head motor and the ratio of the motor (DM) and wheelshaft (DW) diameters. Figure 1 shows the connection between the motor and the rear wheels.

Since the motor shaft diameter is smaller than the wheel shaft diameter, it takes multiple revolutions of the motor shaft to make one revolution of the wheel. In fact, the ratio of the diameters (DW divided by DM) tells us how many revolutions of the motor are needed. After rolling several wheels across the floor, the following assumption

was made regarding Uno’s forward motion: The rear wheels should rotate at the rate of 3/5 revolutions per second. How does this translate into the required motor’s RPM? Mathematically, we have: RPM =

rev sec

Requirement

x

DW DM

x

60 sec min

Uno Component

Ability to move and change direction.

One DC motor to operate a pair of rear wheels. One stepper motor to control the direction of a front wheel that swivels.

Move on a smooth, level surface.

No need for brakes.

Table 1. Two of Uno’s design criteria. Ratio DW:DM

Motor Speed (RPM)

10:1

360

5:1

180

4:1

144

2:1

72

1:1

36

Figure 1. Connection between the DC motor and rear wheels.

Table 2. Motor RPM as a function of shaft-diameter ratio. Part Number

Product Number

Current* (mA)

Speed (RPM)

Torque (g-cm)

Gear Ratio

Price

162190CC

GH12-1324Y

145

176

300

30:1

$16.95

161373CC

GH12-1345T

185

116

650

30:1

$23.95

151440CC

GH12-1632T

275

57

2200

100:1

$21.95

161381CC

GH12-1634T

293

145

850

30:1

$21.95

155862CC

GH12-1926Y

300

70

1000

60:1

$21.95

*Current at maximum efficiency

Table 3. DC motor characteristics.

SERVO 04.2005

69

AssemblyLine.qxd

3/9/2005

11:37 AM

Page 70

THE ASS EMB L Y L INE Motor

No-Load Current (mA)

Current With Load Applied (mA)

Armature Estimated Resistance Starting Current (Ohms) (mA)*

GH12-1324Y

37

80

22.7

528

GH12-1345T

40

100

26.5

453

GH12-1632T

59

90

10.6

1132

GH12-1634T

59

150

13

923

GH12-1926Y

40

80

70

171

*With a 12-volt terminal voltage.

Table 4. Results of parts inspection on the DC gear-head motors.

Figure 2. Several different DC reversible gear-head motors. Four larger motors have a shaft size (diameter x length) of 0.23 x 0.90 inches. The smaller motor has a shaft size of 0.16 x 0.70 inches.

where rev/sec is the number of revolutions of the rear wheels each second. For the assumed value of 3/5 rev/sec and a shaft ratio of 10:1, the required motor shaft RPM is: (3/5)rev RPM =

sec

x

10 1

x

60 sec min

= 360rev/min

Plugging a few other ratios into the equation gives us a set

70

SERVO 04.2005

of speeds to consider, as indicated in Table 2. We need to go shopping for motors with speeds in this range. Table 3 lists different DC reversible gear-head motors available from Jameco Electronics (www.jameco .com). Note that the speeds of the Jameco motors fall within the calculated range from Table 2. In addition, the motors come in a variety of torques. A heavy motor load may require a high torque. Not knowing yet how much Uno will weigh when fully assembled makes it difficult to select just one motor, so the entire group of motors from Table 2 was ordered and inspected. These motors are shown in Figure 2. One by one, each motor was connected to a 12-volt power supply, in series with a digital multimeter set to measure the motor current. The motors were simply laid on top of the lab bench, started, and allowed to run for a full minute to allow their no-load current to stabilize. These no-load currents are listed in Table 4. Each motor was then held firmly with one hand while the shaft was gripped tightly with the fingers of the other hand — not as tight as humanly possible, but forcefully enough to make the motor work harder (simulating the load of pushing Uno around). As indicated in Table 4, the motor current more than doubled for many of the motors. Note that it was not possible to stop any of the five motors from rotating. They were all too powerful. Next, the internal resistance of the motor was measured and used to estimate the starting current for the motor. The starting current is a higherFigure 3. Close-up of the larger motor type. Positive and negative than-average current power terminals are on the opposite that exists for a short ends of the motor from the shaft. period of time when a motor first begins turning. It is important to have an idea of how large the starting current may be so that the power supply and wiring are capable of handling the starting current surge. Figure 3 shows

AssemblyLine.qxd

3/9/2005

11:37 AM

Page 71

another view of the gearhead motor. Can you see from the side view that the shaft of the motor coming out of the gear box is off-center? This is due to the gearing inside the gear box. As for the power terminals, when 12 volts were applied plus-toplus and minus-to-minus, the motor rotated counter-clockwise, as seen Figure 4. Selling for $6.49, this stepper motor when looking into the Figure 5. Unipolar stepper motor schematic (rt 105881CC) will be used to steer Uno’s showing connections to all four phase coils. front wheel. shaft. Since the five motors are all reversible, the polarity was swapped Drive Phase Phase Decent Holding Voltage Step Angle Current System Resistance Inductance Torque Torque to the power terminals to verify that the motors Unipolar 12 volts 3.6 degrees 75 ohms 150 mA 43 mH 80 g-cm 504 g-cm rotate in the opposite direction. Note: This motor has characteristics similar to the Jameco part #105881CC, which sells for $6.49. It was also noted that Table 5. Stepper motor characteristics. the shaft continued to turn briefly after power was shut off to the motor. Even phase coils. sweepstakes, where we ask and though the time was very short — half Today, we have a driver IC — such answer the following question: Which a second or so — it has implications for as the ULN2803 high-voltage, high-curmicrocontroller should we use in the the operation of the motor and of rent Darlington driver — that can be Uno design? The choice will affect the Uno overall. How fast can it switch used instead. A pinout of the ULN2803 hardware interfacing and software from forward to backward? How long is shown in Figure 6(b). design, but assembly and testing are does it continue moving after hitting Next up is the microcontroller right around the corner. SV something? These areas will need to be investigated. Figure 6b. Driving the stepper motor phase coils. Using the ULN2803 driver IC. For right now, the motor chosen for the rear-wheel-drive system is the James Antonakos is a professor GH12-1632T. Why, you ask? It’s just in the Departments of Electrical a gut feeling. Perhaps all of them Engineering Technology and Computer are suitable, but we have to start Studies at Broome Community College. somewhere. You may reach him at antonakos_j@ For steering, a unipolar stepper sunybroome.edu or visit his website at motor will be used. Figure 4 shows the www.sunybroome.edu/~antonakos_j actual stepper motor, whose characteristics are listed in Table 5. Pairs of coils Figure 6a. Driving the stepper motor are energized in an alternating fashion phase coils, using individual components. to make the stepper motor rotate clockwise or counter-clockwise. When energized, each coil draws an average of 155 mA. Thus, a device to switch the coil current on and off will be required. In the past, this has been done with a transistor or Darlington, as indicated in Figure 6(a), with the diode serving to dissipate the inductive counter-EMF produced by the coil when it is shut off. The same circuit is needed for each of the four

ABOUT THE AUTHOR

SERVO 04.2005

71

BrainMatrix.qxd

3/9/2005

2:13 PM

Page 72

DIP MICROCONTROLLERS

New Micros, Inc. www.newmicros.com

Parallax, Inc. www.parallax.com

Technological Arts www.technologicalarts.com

TinyARM www.tinyarm.com

72

SERVO 04.2005

ns Pi I/O s g n lo Pi na A I/O of ze l# Si ta M To RA

Micromint, Inc. www.micromint.com

e iz )S am gr ro n (P io M ut ) O ec sec PR Ex ns/ EE m io ra ct og ru Pr st d (in ee d Sp ee r so Sp es oc Pr

Faraday Engineering www.faradayco.com

r lle ro nt co ro ic M

BasicX www.basicx.com

e ag ck Pa

Basic Micro www.basicmicro.com

e ul od M

SUPPLIER

Atom 24

24-pin Dip

PIC 16F876

20 MHz

35,000

14K Bytes 300 Bytes

20

3

Atom 28

28-pin Dip

PIC 16F876

20 MHz

35,000

14K Bytes 300 Bytes

20

4

Atom 40

40-pin Dip

PIC 16F877

20 MHz

35,000

14K Bytes 300 Bytes

32

8

AtomPro 24

24-pin Dip

Renesas H8/3664

16 MHz

100,000

32K Bytes

2K Bytes

16

4

AtomPro 28

28-pin Dip

Renesas H8/3664

16 MHz

100,000

32K Bytes

2K Bytes

20

8

BasicX-24

24-pin Dip

Atmel 8535

7.3728 MHz

65,000

32K Bytes 400 Bytes

19

8

CStamp

24-pin Dip

Zilog Z8 Encore

18.432 MHz

4,000,000

64K Bytes

4K Bytes

17

6

Domino 1

2x10 Header

80C52

11.0592 MHz

921,600

32K Bytes 32K Bytes

12

None

Domino 2

40-pin Dip

80C52

11.0592 MHz

921,600

32K Bytes 32K Bytes

28

None

PicStic 4

32-pin Dip

PIC16F84A

4 MHz

1,000,000

1K Bytes

64 Bytes

19

4/2

PicStic 4-2k

32-pin Dip

PIC16F628

4 MHz

1,000,000

2K Bytes

128 Bytes

19

4/2

PicStic 5

28-pin Dip

PIC16F876

8 MHz

2,000,000

8K Bytes

256 Bytes

16

4/2

Micro64

40-pin Dip

ATmega64

11.0592 MHz 11,059,200

64K Bytes 36K Bytes

29

8

Micro128

40-pin Dip

ATmega128

11.0592 MHz 11,059,200 128K Bytes 36K Bytes

29

8

Plug-an-ARM

Dual 2x12 Header

LPC2129

60 MHz

~60,000,000 256K Bytes 16K Bytes

32

4

Plug-a-Pod

Dual 2x12 Header

DSP56F803

80 MHz

40,000,000

64K Bytes

4K Bytes

32

8

BS2-IC

24-pin Dip

PIC 16C57C

20 MHz

4,000

2K Bytes

32 Bytes

18

None

BS2p24-IC

24-pin Dip

SX48AC

20 MHz

12,000

8x2K Bytes 166 Bytes

18

None

BS2p40-IC

40-pin Dip

SX48AC

20 MHz

12,000

8x2K Bytes 166 Bytes

34

None

Javelin Stamp

24-pin Dip

SX48AC

25 MHz

8,500

32K Bytes 32K Bytes

16

None

NanoCore12C32

24-pin Dip

MC9S12C32

24 MHz

6,000,000

32K Bytes

2K Bytes

16

8

NanoCore12DXC32

32-pin Dip

MC9S12C32

24 MHz

6,000,000

32K Bytes

2K Bytes

24

8

NanoCore12MAXC32

40-pin Dip

MC9S12C32

24 MHz

6,000,000

32K Bytes

2K Bytes

30

8

TinyARM Dip 40

40-pin Dip

LPC2106

10 MHz

~10,000,000 128K Bytes 64K Bytes

32

None

TinyARM Dip 50A

50-pin Dip

LPC2129

10 MHz

~10,000,000 256K Bytes 16K Bytes

47

4

TinyARM Dip 50B

50-pin Dip

LPC2194

10 MHz

~10,000,000 256K Bytes 16K Bytes

47

4

BrainMatrix.qxd

3/9/2005

2:14 PM

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.

g in m e m ag ra gu og an Pr L -in ilt it un Bu r pe k in /S ce nt ur re So ur /O C I k er in p /S ce ) ur ng So ni un (r w ge ra lta s D Vo nt nt ly e re pp rem ur h C Su qui at Re t M on in ti Po lu g eso ath tin R t M oa in Fl Po g tin oa e Fl ar dw es ar p H n Ty io at ic un m om C ts up rr te In s er im eT ar M dw PW ar e ion H ar lut dw so ar e te H tr bi Ra e e) pl at m s/r Sa le C p D m A (sa 35,000

10 bit

3

Software

RS-232, I2C, SPI, MicroWire, Yes 32 bit 1-Wire, X-10, NTSC

5-12 VDC

5 mA

25/25 mA

200/200 mA

Mbasic

35,000

10 bit

3

I2C, SPI, MicroWire, Yes 32 bit Software RS-232, 1-Wire, X-10, NTSC

5-12 VDC

5 mA

25/25 mA

200/200 mA

Mbasic

35,000

10 bit

3

I2C, SPI, MicroWire, Yes 32 bit Software RS-232, 1-Wire, X-10, NTSC

5-12 VDC

5 mA

25/25 mA

200/200 mA

Mbasic

100,000

10 bit

3

Yes

RS-232, I2C, SPI, MicroWire, Yes 32 bit 1-Wire

5-12 VDC 15 mA

2/2 mA

80/80 mA

Mbasic

100,000

10 bit

3

Yes

RS-232, I2C, SPI, MicroWire, Yes 32 bit 1-Wire

5-12 VDC 15 mA

2/2 mA

80/80 mA

Mbasic

6,000

8 bit/10 bit

2

1

Yes 32 bit

5-12 VDC 12 mA

3/20 mA

40/40 mA

Basic

50,000

12 bit

4

Yes

RS-232, I2C, SPI, etc.: Quasi Yes 32 bit RS-232, SPI, or I2C

5-24 VDC 30 mA

2/20 mA

150/150 mA

None

N/A

N/A

3

2

RS-232A/RS422/RS485, I2C Yes 32 bit 5 VDC Only 15 mA

N/A

10 bit

3

2

RS-232A/RS422/RS485, I2C Yes 32 bit

1k/1k

N/A

1

8

1k/1k

10 bit

3

RS-232, I2C, SPI

300 µA/24 mA

BASIC-52 300/300 mA Interpreter

BASIC-52 8-16 VDC 35 mA 300 µA24 mA 300/300 mA Interpreter

RS-232, I2C, SPI

No 16 bit

8-16 VDC

5 mA

25/25 mA

200/200 mA

None

8

RS-232, I2C, SPI

No 16 bit

8-16 VDC

4 mA

25/25 mA

200/200 mA

None

No 16 bit

8-16 VDC

4 mA

25/25 mA

400/400 mA

None

20k/10k

N/A

3

8

RS-232A/RS422/RS485, I2C, SPI

15,000

8 bit/16 bit

4

5

RS-232A/RS422/RS485, I2C, SPI

Yes 32 bit 6.5-20 VDC 50 mA

20/20 mA

400/400 mA

None

15,000

8 bit/16 bit

4

5

RS-232A/RS422/RS485, I2C, SPI

Yes 32 bit 6.5-20 VDC 50 mA

20/20 mA

400/400 mA

None

400,000

32 bit

2

9

RS-232, I2C, CAN

Yes 32 bit

6-12 VDC 18 mA

500,000

15 bit

16

64

RS-232, CAN, SPI

Yes 32 bit

6-9 VDC

18 mA

25/25 mA

180/180 mA

IsoMax

N/A

N/A

None Software

RS-232, I2C, X-10, 1-Wire

No 16 bit

5-15 VDC

3 mA

20/25 mA

40/50 mA

Pbasic

N/A

N/A

None Software

RS-232, I2C, X-10, 1-Wire

No 16 bit

5-12 VDC 40 mA

30/30 mA

60/60 mA

Pbasic

N/A

N/A

None Software

RS-232, I2C, X-10, 1-Wire

No 16 bit

5-12 VDC 40 mA

30/30 mA

60/60 mA

Pbasic

N/A

N/A

1

RS-232

No 16 bit

5-24 VDC 80 mA

30/30 mA

60/60 mA

Java

140,000

8 bit

8

8

RS-232, SPI

Yes 32 bit

3-16 VDC 27 mA

25/25 mA

160/160 mA

None

140,000

8 bit

8

24

RS-232, SPI, CAN

Yes 32 bit

3-16 VDC 27 mA

25/25 mA

240/240 mA

None

140,000

8 bit

8

24

RS-232, SPI, CAN

Yes 32 bit

3-16 VDC 40 mA

25/25 mA

240/240 mA

None

None

4/4 mA

50/50 mA MPE-FORTH

N/A

32 bit

2

3

RS-232, I2C, SPI

No 32 bit 3.6-5.5 VDC 15 mA

4/4 mA

50/50 mA

None

2.44ms

32 bit

2

4

RS-232, I2C, SPI

No 32 bit 3.6-5.5 VDC 18 mA

4/4 mA

50/50 mA

None

2.44ms

32 bit

2

4

RS-232, I2C, SPI

No 32 bit 3.6-5.5 VDC 18 mA

4/4 mA

50/50 mA

None

SERVO 04.2005

73

MrRoboto.qxd

3/9/2005

6:00 PM

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

Why are the diameters of wires and sheet metal different when they have the same gauge number? — Bill Rylie via Internet

This has been a confusing topic for most people. The short answer to your question is that there is no comparison between wire and sheet metal. What adds to the confusion is that, for the same gauge thickness of sheet metal, the actual decimal thickness is different for steel, aluminum, brass, and so on. Also, the numbering trends are not consistent. For example, for most sheets and wires, as the gauge number increases, the wire diameter/sheet thickness decreases. This is not the case with music wire. As the gauge number increases, so does its diameter. The gauge system is a holdover from early attempts at standardizing dimensions. Different companies and different countries tried to establish their own system of standards. With sheet metal, the gauges were tied to the weight of a sheet of one-inch-thick metal that was one foot square in size. Originally, gauges were based on the weight of wrought iron, which is 480 pounds per cubic foot — that’s equivalent to 40 pounds per square foot. The confusing part is that a particular company could choose that a Gauge 3 is equivalent to 10 pounds of material. To convert that to a thickness, just divide the weight of the Gauge 3 standard by the weight of one square foot of material (in this case, 40 pounds/inch). The thickness will be 0.25 inches (thickness = 10/40). These standard “gauge” weights are different for different materials and, in the old days, they were different at different organizations. Aluminum, steel, and brass all have different weights per square foot (14.1, 40.75, and 44.64 pounds/inch) and their thicknesses for the same gauge number are similar, but not the same. This means that the weight of the gauge “standard” is different for different materials. Since different companies and countries had different “standards,” this resulted in a great deal of confusion in getting materials that have the same thickness from different companies.

74

SERVO 04.2005

Though there have been some international efforts toward creating standards, there are still differences in material thicknesses/diameters, based on what the material is. When it comes to electrical wire, the American Wire Gauge (AWG) is the standard that is fairly constant. When you are looking to buy sheet metal and wire (other than electrical wire), it is better to order the material by the actual thickness that you want and not by gauge number. This way, you will know what thickness you are getting.

Q

Last year, I got a Lynxmotion Extreme 1 walking robot for Christmas. This is a really cool robot, and I have been having a lot of fun programming it. I was wondering if you know of any good contests that I could enter my robot in? — Zach Field via Internet

A

I am not sure where you live, but you should check out the Walking Robot Race that was created by members of the Portland Area Robotics Society (www.portland robotics.org). They run this contest in their annual robotics event — PDXBot (www.pdxbot.com). This is a relatively simple contest where your robot has to travel from one end of the course to the other end, turn around, and then go back to the stating point. Most of the arena is white with a black starting point and a green turn-around area. The arena is three feet wide and seven feet long. The robot with the quickest time wins. The Extreme Walker 1 from Lynxmotion (www.lynx motion.com) is fully capable of negotiating this contest and has a good chance of winning it. The reason I say this is that in the rules of the contest, they use a handicapping formula that is based on the geometry of your robot to make sure that small robots compete on equal grounds with large robots. This formula is known as Alexander’s Formula, and it is used to adjust the final times of the robot based on its geometry. Because of this formula, all walking robots can compete together. Another contest to look at is the Walker Challenge that is

MrRoboto.qxd

3/9/2005

6:01 PM

Page 75

run at the ROBOlympics (www. robolympics.net). Here, a walking robot must negotiate a onemeter-wide by two-meter-long obstacle course that is covered with various objects no taller than 5 cm and then climb a couple of stairs at the end of the course. The robot with the quickest time wins. If you are not able to attend either one of these contests, the arenas are very easy to build and you can construct one yourself and start a contest in your area with your friends. I would highly encourage you to do this. The more walking robot contests there are out there, the more people will get involved in building walking style robots. Good luck.

Q A

Vin

Vdd +9V 0.01 uF C6

Vcc +5V 10 uF C5

470 ohm R6

Vcc +4.8V - 6V

4.7 kohm R1

1 kohm R4

8 7

10 kohm R2

1 uF C1

4

6

1 kohm R5

3 5

1

8 7

10 kohm R3

555 U1

2

0.001 uF C2

1 uF C3

4

6

555 U2 3

2

0.01 uF C4

5

1

SERVO SOCKET SIGNAL

Figure 1. Megarobotics AI Motor-601 Modules.

Driving a servo with a 555 timer is pretty simple and many people use them to test their servos. The circuit shown in Figure 1 is a simple one that uses a pair of 555 timers to develop the 50- to 60-Hz duty cycle that the servos need to maintain position and the one- to two-ms pulse width to set the servo position. The first 555 timer (U1) is configured as an astable circuit to generate a 58.7-Hz square wave that is fed into the second 555 timer. The second timer (U2) is configured as a monostable circuit that is used to gen-

N

Vout

GND

I see a lot of 555 timer circuits shown in the Q&A section of Nuts&Volts Magazine. Can they be used to drive RC servos? — Phil Strack via Internet

e

7805

erate a one- to two-ms pulse width, while C2 and R3 are used to create an AC couple between the two timers. The reason that this is in here is that, in order for the monostable circuit to work properly, the input trigger must be driven high before the output pulse is completed; otherwise, the output pulse will not go low until the input trigger goes high again. R4 and R5 combined are used to adjust the pulse width between one to two ms. When the servo is attached to the circuit, adjusting the potentiometer (R4) will cause the servo horn to move. If you want a greater range of motion, you could replace R5 with a 470- or 510-ohm resistor and replace the R4 with a two-kilohm potentiometer. This will result in an output pulse width range between 0.5 to 2.5 ms. This circuit can be built into a small hand-held unit that would make a great device for field-testing your servos. 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 #130 on the Reader Service Card.

SERVO 04.2005

75

Tetsujin2005Ad.qxd

3/10/2005

2:48 PM

Page 76

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.

Events.qxd

3/10/2005

8:02 AM

Page 77

Send updates, new listings, corrections, complaints, and suggestions to: [email protected] or FAX 972-404-0269 I recently noticed an interesting discussion on the comp.robotics.misc newsgroup . It started out as the usual sort of argument that crops up frequently about popular TV programs that stage “robot combat.” Are the “robots” really robots if they're actually being controlled by off-camera human operators much like the prop robots in a science fiction movie? Often the solution posed when this topic comes up is a contest in which real (that is, autonomous) robots battle each other. In this case, however, a more interesting solution was proposed. What if, instead of trying to make real robots emulate robot “actors” on TV shows that popularize mindless destruction, we went the opposite direction and came up with a competition in which robots try to achieve some constructive, realworld goal. Suggestions included building walls, laying foundations, and perhaps eventually a “Habitat for Humanity”-type contest in which a team of robots construct a house. It sounds far fetched at first, but there are a lot of researchers working on robotics technology for RoboCup that they hope will allow a team of humanoid robots to beat a human team at a game of soccer by the year 2050. How much more useful and interesting would it be for a team of robots to construct a house instead of a playing games or destroying each other for our amusement? [It’s worth thinking about, as this noble concept is the driving force behind SERVO Magazine’s annual Tetsujin contest. For more information, look to your left. —Editor] — 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

A p r il 2 0 0 5 3

9-10

Penn State Abington Fire Fighting Robot Contest Penn State Abington, Abington, PA Regional qualifier for the Trinity College Fire Fighting contest. www.ecsel.psu.edu/~avanzato/robots/contests Trinity College Fire Fighting Home Robot Contest Trinity College, Hartford, CT Could the fire have been set by a robot builder

frustrated with the voluminous rules? www.trincoll.edu/events/robot

11-16 BattleBots IQ Universal Studios Orlando, Orlando, FL BattleBots IQ is sort of like FIRST or BEST except that instead of learning about engineering, the kids get to learn about smashing radio controlled vehicles and the joys of destruction. www.battlebotsiq.com

12-14 DTU RoboCup Technical University of Denmark, Copenhagen, Denmark Start out by imagining your typical line following contest. Now, add forks in the line, ramps, stairs, gaps in the line, shifts from indoor to outdoor lighting, reversals of the line shading (white to black), and 50-cm “gates” though which the robot must pass. www.iau.dtu.dk/robocup/about_robocup.html

15

Carnegie-Mellon Mobot Races Wean Hall, CMU, Pittsburgh, PA The traditional Mobot slalom and MoboJoust events will be hosted by CMU. www.cs.cmu.edu/~mobot/

16

RoboRodentia Mott Gymnasium, California Polytechnic State University, San Luis Obispo, CA A micromouse-like maze navigation contest for autonomous robot mice. In addition to navigating the maze, a robot must all pick up balls and place them in a nest. www.ceng-web.calpoly.edu/openhouse/satur day.php

30PDXBOT May 1 Smith Center Ballroom, Portland State Univ., Portland, OR Lots of cool stuff planned this year including Nano, Micro, Japan, and Mini Sumo contests, a line following contest, and a Robo-Magellan contest based on SRS rules. www.pdxbot.org SERVO 04.2005

77

Appetizer.qxd

3/10/2005

10:31 AM

Page 78

Why Do Most Women Hate Robots? by Dave Prochnow s the father of three daughters and devoted husband of an architect, I have a rather unique perspective on hot-button issues like glass ceilings, gender bias, and discrimination. I’ve suffered and commiserated for years over questionable hiring and firing practices, unequal promotions, and downright laughable management edicts. However, if you think that I’m just going to skew off into some tirade about how men are boorish neanderthals and women are great, forget it. I just want to know why women hate robots. Once you accept my motives and appreciate my vantage point, it’s tough to totally ignore some of the statistical numbers related to women in science and engineering. For example, in a 1995 study by the US Department of Education, of all the men and women

who earned Bachelor of Science degrees in computer science only 28 percent were women. Oddly enough, as you progressed to advanced degrees, the percentages changed to 26 percent of women earned Master’s degrees while 18 percent of women earned Doctorate degrees. What does that mean? This disparity gets even more dramatic in engineering fields. Women earned 17 percent of the BS degrees in engineering, 16 percent of the MS degrees, and 12 percent of the Ph.D. degrees. Finally, in an oddly titled category of “engineering-related technologies” degrees, women earned nine percent of the BS degrees, 19 percent of the MS degrees, and 11 percent of the Ph.D. degrees. Those are some serious differences in achievements. Where does that type of incongruity begin? Are there Not all women hate robots. In fact, Robosapien educational factors that conis a terrific way to make robots fun for all kids. tribute to this enormous degree gulf, or is there some sort of fundamental attitude that makes us “feel” that someone or some gender is better at one task than another one? Let’s explore each of these questions. First, consider this classic robo-thriller: Are the robots in the 2004 20th Century Fox movie I, Robot male or female? Your response might be dictated by your own gender or your biases from other science fiction movies. As you’ll recall in this movie, Chicago Police Department detective Del Spooner (Will Smith) investigates a social civil war, pitting malevolent “free-thinking” robots against the human population. One radical departure for this movie from other sci-fi flicks

A

78

SERVO 04.2005

that depict robotic violence is that I, Robot featured androgynous beings totally lacking in either the overly testosterone excesses of a Terminator or the evocative sexuality of Pris (Daryl Hannah) from Blade Runner. These robots were effectively sexless in their physical features. This removal of visual prejudice prevented the audience from anticipating the odd behavior of Sonny (Alan Tudyk) and the other USR robots. In a National Science Foundationfunded research project, investigators Mahzarin Banaji and Anthony Greenwald designed an Implicit Association Test (IAT). Conducted from 1995 to 2002, one aspect of this test was to statistically measure “hidden or unconscious attitudes.” Based on the association of words to images, the IAT was able, for example, to demonstrate how people generally attribute higher intelligence and character to attractive men and women based solely on their looks. That makes us sound rather shallow, doesn’t it? Is a presidential candidate’s physical appearance more important than a campaign platform? On the Internet, over 1.5 million international participants took the IAT. The results were sobering. In fact, according to the NSF’s report, “People show strong preferences for young versus old and have far more difficulty grouping women’s names with words having to do with science (chemistry, biology), than with arts (drama, poetry). This last result is as apparent in responses of women as in those of men.” Does this mean that we are destined to be sexist? In response, investigator Greenwald states, “You’ve got these things going on automatically. You may not approve of them, but they’re there. And you’ve got to expect

Appetizer.qxd

3/10/2005

12:37 PM

Page 79

that they might influence your behavior, unless you’re actively trying to avoid acting in a biased manner.” So, based on the IAT results, rather than treating young girls like artists, we need to educate them to be technologically and scientifically equal with boys. Oddly enough, Africa is actually ahead of America in realizing this need for “actively trying to avoid acting in a biased manner.” If you don’t think of Africa as a growing force in science and technology education, think again; better yet, think last century. It was back in 1989 when the Commonwealth Secretariat Education Programme began soliciting African countries to sponsor a program called The Science and Technology Roadshow — for girls. In 1990, the Ministry of Education for Botswana became the inaugural host for the Roadshow. Focusing on secondary school students, the program pro-

moted careers in science and technology as a viable option for girls. Unlike later American programs, however, the Roadshow also educated parents, teachers, and even employers about Botswana’s need for technology manpower — and womanpower. Remarkably, predating the IAT results, the Roadshow has mandated that participants should “be encouraged to change their attitudes toward women in these fields.” Although slow to act, the US is now attempting to define the factors Amelia loves her little “Roro.” With just a that contribute to the gender gap in little instruction, she is now able to program lengthy command sequences into it. technology education. While the initial reaction is to throw money at the topic, one very interesting 1999 study public school district in the country, it is suggests that filling our classrooms with a “technology-rich learning environtechnology isn’t the sole answer. ment” with every classroom wired for Arguably, the highest tech school the Internet. According to this 1999 system in the US is the Fairfax County study of the 1998 enrollment in all techPublic School District in Virginia. Even nology classes offered by the Fairfax though this district is the 12th largest County Public School District, only six

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

.

Electronic Parts & Supplies Since 1967

.

WWW A RT BOTS COM

www.gatewayelectronics.com (Electronically Speaking, Gateway’s Got It!) MAIL ORDERS CALL TOLL-FREE-1-800-669-5810 Megarobotics’

AI Motors

Building blocks for robots! Starting at $65 www.garage-technologies.com

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

79

Appetizer.qxd

3/10/2005

10:33 AM

Page 80

YES, BUT WHAT CAN I DO? Don’t feel helpless, don’t give up, and don’t just sit there. Here is a brief selection of proactive educational pastimes, practices, and promotions that you can try for bringing technology and robots into children’s lives.

please shy away from giving away your old “junk” robots. Your school might take them, but the kids will hate them. Also, remember to throw in a couple of buckets worth of batteries; dead batteries or no batteries can make robotics very dull.

• Be a foster scientist — Sure, mentoring is a hot buzz word of wealthy bureaucrats, but it is so hollow (e.g., typical “mentoring” programs offer a scant one or two hours of assistance per week). Instead, approach mentoring like a foster parent and provide a full-time, hands-on science education to kids.

• Turn the TV off — While science on TV might be an attractive educational tool, it is a two-dimensional, spoon-fed, in-yourface format that can actually distract a student more than inspire her/him.

• Take-a-robot-to-school program — Use some of your “spare” cash to purchase and donate brand new robots to your local school, church, club, and/or museum. For example, Tamiya America (www.tamiyausa.com) used to make extremely inexpensive robot kits that I have regularly given away. Consider a Robosapien for your donation, but

percent of the students enrolled in artificial intelligence classes were young women. Likewise, 23 percent of the students enrolled in computer programming were female. Interestingly enough, this percentage jumps to near parity with desktop publishing and information system classes at 46 percent female enrollment for each subject. Finally, in a rather disappointing result, the girls’ enrollment (55 percent) Making electronics, computers, and robots commonplace in a child’s life will expand his or her interests and allow for a broader choice of future careers.

80

SERVO 04.2005

• Sponsor some school smarts — Help your local school, church, club, and/or museum purchase an additional computer. Don’t try to dictate manufacturer, model, or features — just give them one that matches the administration’s requirements. • Read, read, read — You can’t ever read enough, nor can you begin reading too early. SERVO Magazine is a great source for reading about robots and technology.

actually exceeded the boys’ enrollment in only one class — word processing. This course is considered by some educators to be nothing more than a politically correct euphemism for the typing classes of the middle 20th century. In engineering-related coursework, the number of enrolled girls were even further reduced. One percent of the students in electronics were young women, 15 percent of the technical drawing students were female, and 18 percent of the enrolled architectural drawing students were girls. So what are girls in Fairfax County taking? The enrollment numbers for foreign language, chemistry, economics, history, art, and music showed a “higher” percentage of female participation. The largest female enrollments, however — where girls outnumbered boys by 30 percent or more — were in child care, nursing, dance, cosmetology, fashion marketing, dental careers, food occupations, and animal science. So, are girls just not academically motivated? In some accelerated high schools, like those found in the Fairfax County Public School District, students can take an Advanced Placement (AP) test administered by the College Board and earn college credit in computer science. This is a three-hour exam that typically requires a score of three or

higher to receive college credit (some schools require a score of four or five for receiving credit). This AP test is further divided into a one semester introductory exam (i.e., “A” exam) and a more comprehensive one year introductory exam (i.e., “AB” exam). In 1999, 83 percent of those students who applied for the “A” exam were male, while only nine percent of the “AB” exam test-takers were female. Even with such a dramatic difference in the gender ratio, the young women scored higher than their curriculum choices would seem to indicate. For example, this same study showed that while 41 percent of the girls scored a one on the “A” exam, 17 percent of them scored a three, 20 percent a four, and 10 percent scored a five. That is an impressive achievement for a group that is traditionally ignored in technology coursework. As for the boys, 19 percent scored a three, 25 percent scored a four, and scores of five were achieved by 17 percent. The differences in these scores suggests that girls don’t really require a “pink” education, rather a stronger and more supportive foundation in technology that they can build upon. So, maybe it’s really a matter of packaging. In other words, don’t make a whole new curriculum just for girls (those are the educators who think “pink”); instead, just modify an existing “girl-appreciated” curriculum and infuse it with computers, programming, robots, and technology. You know the cliché … call it fashion and they will enroll. Now, before you snort and roll your eyes, maybe you should really study some of today’s sewing machines. While names like Bernina (www.bernin a.com), Janome (www.janome.com), and Pfaff (www.pfaff.com) aren’t as familiar to you as Apple, Intel, and Microsoft, these are the big players in the multi-billion-dollar fashion industry. Likewise, you might think that your new PowerBook is a high-priced powerhouse; conversely, these sewing machines — like the $5,000.00-plus Pfaff 2144 — are incredibly powerful, computerized stitching phenoms that rely on sophisticated programming, the installation of system firmware, and the integration of complex digitizing software for regular operation. Can you imagine doing that level of techno-

Appetizer.qxd

3/10/2005

3:53 PM

Page 81

logical work just to write a letter with your word processor? Remarkably, women of all ages are able to perform these operations without any acknowledgment of being a programmer, a system engineer, or a hardware technician. They just like to sew and consider themselves fashion designers. So, what can you do? Luckily, you’re holding the best tool in your hands right now! SERVO Magazine is a great place to start integrating technology into your children’s lives, whether they are male or female. For example, I read each issue to my daughters every month. Sure, they don’t really appreciate it at the same level as I do, but they like reading and they love robots. Making technology a commonplace household resident will give your children the best foundation that they will ever need. Programming the kitchen’s microwave, burning the family video to a DVD, or walking Robosapien around the house all help to put a face on technology. Also, watch your children and learn their interests, then you will be better equipped to integrate technology into their daily lives. You

AUTHOR BIO Dave Prochnow is 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. Building on his newfound friendships with Robosapien and Mark Tilden, Dave is currently assembling an enormous selection of Robosapien tips, programs, and hacks into his forthcoming book, A Hacker’s Guide to Robosapien (TAB Electronics, 2005).

can’t start too early with their introduction to technology. My one-year-old daughter, for example, calls Robosapien “Roro” and can deftly program 14-step activities into its internal memory without assistance. Do women really hate robots? Ironically, it’s the inventor of the Robosapien, Mark Tilden, who makes

the strongest case for females liking robots. In a 2003 interview with Taiwan News, Tilden offered some insightful quotes regarding a proposed “FemBot” design. Specifically, “She [the proposed FemBot design] can also do simple tasks like combing her owner’s hair … unlike boys, girls like to interact with their toys.” SV

GIRL POWER Knowledge is power. In order to empower girls to enter technology fields, you will need to arm yourself with some information. Below is a small sampling of websites that detail numerous programs and activities that can be used for helping all children achieve their potential. The Advertising Council on Math, Science, and Technology Education www.adcouncil.org/issues/Math_and_ Science_Education/ American Association of University Women — Tech-Savvy: Educating Girls in the New Computer Age (2000) www.aauw.org/research/girls_ education/techsavvy.cfm AWE — Attracting Women into Engineering: A Mentoring Program for Middle School Girls users.rowan.edu/~jahan/personal/ kjweb/awe-web/awe.htm Botswana Roadshow — Girls and Women in Science and Technology www.col.org/10th/best/botswana.html Education Development Center: Center for Children and Technology — Telementoring Young Women in Engineering and Computing: Providing the Vital Link

www2.edc.org/CCT/projects_summary .asp?numProjectId=771 EducatingJane.com — Teacher’s Resources for Educating Girls www.educatingjane.com/educators.htm Girl Scouts Original Research Studies www.girlscouts.org/research/ publications/original/default.asp IEEE Women in Engineering www.ieee.org/portal/site/mainsite/me nuitem.818c0c39e85ef176fb2275875ba c26c8/index.jsp?&pName=corp_level1 &path=committee/women&file=index. xml&xsl=generic.xsl National Science Foundation: Discoveries www.nsf.gov/discoveries/ Society of Women Engineers www.swe.org/stellent/idcplg?IdcSer vice=SS_GET_PAGE&nodeId=5

Taiwan News: “Humanoid Robot Dishes Out Kung-Fu Moves” www.etaiwannews.com/Business/2003/ 11/22/1069466565.htm Wired News: Bots Not a Bra-Burning Issue www.wired.com/news/women/0,1540, 48337,00.html

Advertiser Index All Electronics Corp. ............................51 Hobby Engineering ..............................39 Robotic Trends .....................................21 AREXX Engineering ..............................59 Jameco ...........................................25, 83 BitScope ................................................11 Lemon Studios .....................................67 Lynxmotion, Inc. ...................................19 Budget Robotics ...................................70 Net Media ...............................................2 CrustCrawler ...........................................7 Parallax, Inc. ...........................Back Cover Custom Computer Services, Inc. ........15 PCB123/PCBexpress ...............................3 Eagle Tree Systems ...............................55 PCB Fab Express ...................................49 E-Clec-Tech ............................................29 Pololu Robotics & Electronics .............31

RobotShop ............................................17 Smithy .....................................................51 Solutions Cubed....................................65 Sozbots..................................................75 Technological Arts ...............................61 Tetsujin 2005..........................................76 Vantec ....................................................10

IMService ..............................................45 Robotics Group, Inc..............................33 Zagros Robotics ....................................51 SERVO 04.2005

81

Last Page.qxd

3/9/2005

5:58 PM

Page 82

THEN AND NOW A Look Back at the Androbot TOPO by Tom Carroll he two-wheeled balancing robots Trobotics that you’ve seen in experimental exhibitions across the country are not new, but these later versions have sprung from the success of Dean Kamen’s Segway Human Transporter. Experimenters have used sensors similar to Segway’s five-gyroscopic and two-tilt sensors to reproduce their own balancing robots at a cost far cheaper than Segway’s $4,000-plus. I loved riding the Segway, though I feared a small hiccup in the control electronics would cause me to dive forward and trip over the “T” handle bar. Was it the first two-wheeled robotic device? Nope! There was a unique entry into the field two decades prior. Quite a few of you readers may remember the Androbot TOPO that made the “robotic scene” in 1982. The two-wheeled robot — yes, it managed to balance on just two wheels — was one of the creations of Nolan Bushnell, who is best known for Atari, Pizza Time Theater, and the Pong video game. This rather strange looking robot caught the eyes of many robot experimenters when it made its public debut at the 1983 Consumer Electronics Show in Las Vegas. Bushnell described Androbot, “as my greatest joy and my greatest sorrow.” Androbot went bankrupt and Bushnell sold it in 1985. But TOPOs went through several versions before they finally left the scene. The original TOPO was constructed from 17 blow-molded pieces of plastic held together by a series of plastic riv-

ets. In assembling the robot (after you took it apart, as everyone I know did), you began by trying to align the plastic panels while making sure the rivet holes were aligned. You would insert the rivet into both aligned holes and then insert a small plastic pin into the center of the rivet to spread apart the back pieces of the rivet to hold the two pieces of plastic panels together. This pin went into the rivet and was flush at the surface. After 50 or so rivets, the robot would be held together; however, the only way to take it apart again was to stick a small rod or punch into the rivet hole to push the pin through, and it fell into the robot’s body. To get at the pin(s), you either had to completely disassemble it again or turn it upside down and shake the robot until the pin(s) finally fell out. Bad design. Very bad. This original model had an RF transmitter for the remote control that linked to an external Apple II computer. The next model had an IR link and a speech synthesizer, and a later model did away with the 18 separate panels and used five molded body parts instead. The most unique feature was its ability to balance on two wheels. It did have two casters (if you could call those ball-bearing casters),

ABOUT THE AUTHOR Retired from Rockwell and NASA projects, Tom Carroll is a space robotics engineer. He's authored numerous articles on combat robots, lives on an island in the Pacific Northwest with his wife, Sue, and enjoys robotics, kayaking, and hiking. He can be reached at: [email protected]

82 SERVO 04.2005

one each at the front and back to keep it from tilting over too far. It did not use gyroscopic feedback in the control system, but rather the two wheels were canted outward enough so the bottom surfaces were not circular but like the oval bottom rails of a rocking chair that keeps it from tipping over. Hey, you might call that cheating, but at least it could still stand upright with the power off. SV

CoverInside.qxd

3/10/2005

4:26 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

3/10/2005

3:46 PM

Page 84

Vol. 3 No. 4 SERVO MAGAZINE REAL-WORLD ROBOTS April 2005

U.S.

CANADA

$9.25 0 4>

0 Circle #40 on the Reader Service Card.

$5.50

74470 58285

4

Related Documents

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