TASK MANAGER EDITORIAL DIRECTOR/FOUNDER CHIEF FINANCIAL OFFICER Steve Ciarcia Jeannette Ciarcia My Favorite Subject MANAGING EDITOR CUSTOMER SERVICE Jennifer Huber Elaine Johnston I TECHNICAL EDITOR CONTROLLER ‘d have to say Robotics is my favorite issue theme.We get to feature C.J.Abate Jeff Yanco some of the most fascinating projects.That’s not to say the 11 other WEST COAST EDITOR ART DIRECTOR themes throughout the rest of the year don’t attract great applications.It’s Tom Cantrell KC Prescott just that this particular topic brings out an incredibly high level of creativi- CONTRIBUTING EDITORS GRAPHIC DESIGNER ty among designers.Their excitement for these inventive and fun projects Ingo Cyliax Mary Turek is contagious. Each year I look forward to reading about the newest Fred Eady STAFF ENGINEER George Martin advances in robotics and the interesting ways they’re being applied.We John Gorsky George Novacek selected a few for this issue that are sure to give you some great ideas for Jeff Bachiochi QUIZ COORDINATOR your own projects. David Tweed NEWPRODUCTSEDITOR A couple Atmel AVR 2004 Design Contest winners used the contest as John Gorsky an opportunity to experiment with AVR microcontrollers in robotics appli- PROJECT EDITORS cations, and the results were impressive.Turn to page 12 to learn about Steve Bedford the AVRcam.Designed around ATmega8 and ATtiny12 microcontrollers, Ken Davidson David Tweed this camera provides real-time tracking of multiple different-colored objects in addition to still photography capability. John Orlando discusses his ADVERTISING PUBLISHER range of goals—which included designing an inexpensive system that Dan Rodrigues E-mail:[email protected] would be easily expandable—and how he and codesigner Brent Taylor ASSOCIATE PUBLISHER/DIRECTOR OF SALES accomplished them.Their successful design won them Second Prize in Sean Donnelly Fax:(860) 871-0411 the contest.The well-designed AVRcam is also appropriate for motion (860) 872-3064 E-mail:[email protected] detection and object recognition applications. Cell phone:(860) 930-4326 For another terrific AVR-based robotics application, turn to page 44. ADVERTISINGCOORDINATOR Valerie Luster Fax:(860) 871-0411 Eric Gagnon won Honorable Mention for his 32-channel RC digital servo (860) 875-2199 E-mail:[email protected] controller.This ATmega8515L microcontroller-based project is well suited ADVERTISING ASSISTANT for projects that require versatile servos, including walking robots and ani- Deborah Lavoie Fax:(860) 871-0411 matronics applications.By upgrading from typical RC servos to digital RC (860) 875-2199 E-mail:[email protected] servos, he achieved a hardware-based solution that features 16-bit accu- Cover photograph Chris Rakoczy—Rakoczy Photography racy and 12-bit resolution.In the first part of this two-part series, Eric cov- www.rakoczyphoto.com ers the architecture.Be sure to come back next month, when he’ll discuss PRINTED IN THE UNITED STATES the circuits and FPGAs. CONTACTING CIRCUIT CELLAR Columnist Jeff Bachiochi also delves into robotics as he analyzes SUBSCRIPTIONS: INFORMATION:www.circuitcellar.com or [email protected] Paratech’s quantum tunneling composite (QTC) technology (page 48).He To Subscribe:(800) 269-6301,www.circuitcellar.com/subscribe.htm,or [email protected] wanted to explore ways to improve the sensitivity, or rather a lack thereof, PROBLEMS:[email protected] GENERAL INFORMATION: of robots.Sensitivity and input feedback will become increasingly impor- TELEPHONE:(860) 875-2199 Fax:(860) 871-0411 tant as robots become more integrated into fields such as manufacturing INTERNET:[email protected],[email protected],or www.circuitcellar.com EDITORIAL OFFICES:Editor,Circuit Cellar,4 Park St.,Vernon,CT 06066 and military applications.By adding QTC sensors to his Heathkit Hero, Jeff NEWPRODUCTS:New Products,Circuit Cellar,4 Park St.,Vernon,CT 06066 [email protected] was able to make the robot pick up an egg without crushing it. AUTHOR CONTACT: Finally, we have an interesting article entitled “Three-Axis Stepper E-MAIL:Author addresses (when available) are included at the end of each article Motor Driver,” written by the design team of Viraj Bhanage, Prajakta For information on authorized reprints of articles, Deshpande, and Praveen Deshpande (page 68).Their RC system, which contact Jeannette Ciarcia (860) 875-2199 or e-mail [email protected]. was built around Philips P89C51RD2 and Atmel AT89C2051 microcon- CIRCUIT CELLAR®, THE MAGAZINE FOR COMPUTER APPLICATIONS (ISSN 1528-0608) and Circuit Cellar Online are published trollers, improves component control.It was designed to aid laser techni- monthly by Circuit Cellar Incorporated, 4 Park Street, Suite 20, Vernon, CT 06066 (860) 875-2751.Periodical rates paid at Vernon, CT and additional offices.One-year (12 issues) subscription rate USA and possessions $21.95,Canada/Mexico $31.95,all cians who have to precisely control optical components. other countries $49.95.Two-year (24 issues) subscription rate USA and possessions $39.95,Canada/Mexico $55,all other countries $85.All subscription orders payable in U.S.funds only via VISA, MasterCard, international postal money order, or check I hope you enjoy reading these intriguing articles as much as I did.A drawn on U.S.bank. special thank you goes out to the Connecticut State Police for allowing us Direct subscription orders and subscription-related questions to Circuit Cellar Subscriptions,P.O.Box 5650,Hanover,NH 03755-5650 or call (800) 269-6301. to photograph their bomb disposal robot for the this month’s cover.One Postmaster:Send address changes to Circuit Cellar, Circulation Dept., P.O.Box 5650, Hanover, NH 03755-5650. last note to the robotics enthusiasts headed to Hartford this month:Good Circuit Cellar® makes no warranties and assumes no responsibility or liability of any kind for errors in these programs or schematics or for the consequences of any such errors.Furthermore, because of possible variation in the quality and condition of materials and workmanship of read- luck in the Trinity College Fire-Fighting Home Robot Contest! er-assembled projects, Circuit Cellar® disclaims any responsibility for the safe and proper function of reader-assembled projects based upon or from plans, descriptions, or information published by Circuit Cellar®. The information provided by Circuit Cellar® is for educational purposes.Circuit Cellar® makes no claims or warrants that readers have a right to build things based upon these ideas under patent or other relevant intellectual property law in their jurisdiction, or that readers have a right to construct or operate any of the devices described herein under the relevant patent or other intellectual property law of the reader’s jurisdiction. The reader assumes any risk of infringement liability for constructing or operating such devices. [email protected] Entire contents copyright © 2004 by Circuit Cellar Incorporated.All rights reserved.Circuit Cellar and Circuit Cellar INK are registered trademarks of Circuit Cellar Inc.Reproduction of this publication in whole or in part without written consent from Circuit Cellar Inc.is prohibited. 4 Issue 177 April 2005 CIRCUIT CELLAR® www.circuitcellar.com April 2005: Robotics FEATURES 12 AVRcam 44 Digital RC Servo Controller (Part 1) A Low-Cost Embedded Vision System 32-Channel Design John Orlando Eric Gagnon Atmel AVR 2004 Design Contest Winner Atmel AVR 2004 Design Contest Winner 20 Simple USB Data Acquisition 60 Practical Application for TDD (Part 2) Bruce M.Pride Automated Test-Driven Environment Mike Smith, Moreno Bariffi, Warren Flaman, Adam Geras, 28 Automatic Gate Control Lily Huang, Andrew Kwan, Alan Martin, & James Miller Peter Gibbs 68 Three-Axis Stepper Motor Controller (Part 1) 34 Embedded Security Design (Part 2) Design Basics Circuit Board Viraj Bhanage, Prajakta Deshpande, & Praveen Deshpande Joe Grand AAlltteerrnnaattiivvee ttoo TTyyppiiccaall RRCC SSeerrvvoo AAVVRR--BBaasseedd CCaammeerraa ((pp..1122)) LLPPCC22113388--BBaasseedd DDAAQQ PPrroojjeecctt ((pp..2200)) CCoonnttrroolllleerrss ((pp..4444)) SStteeppppeerr MMoottoorr CCoonnttrroolllleerr ((pp..6688)) COLUMNS 40 ABOVE THE GROUND PLANE Foolish LED Tricks Ed Nisley 48 FROM THE BENCH Stay in Touch Sensor Material for Robotics Applications LED Solution for Flashlight Jeff Bachiochi Performance (p.40) 52 APPLIED PCs Test-Driving the Micro64 Fred Eady 78 SILICON UPDATE USB Easy Riders HHeeaatthhkkiitt HHeerroo MMaakkeeoovveerr wwiitthh QQTTCC Tom Cantrell SSeennssoorrss ((pp..4488)) CP2102-BasedUSB Connectivity (p.78) DEPARTMENTS 4 TASK MANAGER 94 INDEX OF ADVERTISERS My Favorite Subject May Preview Jennifer Huber 96 PRIORITY INTERRUPT 8 NEW PRODUCT NEWS Dead as a Doornail edited by John Gorsky Steve Ciarcia 11 TEST YOUR EQ edited by David Tweed 6 Issue 177 April 2005 CIRCUIT CELLAR® www.circuitcellar.com NEW PRODUCT NEWS Edited by John Gorsky OPTICAL SENSOR OPERATES AT DISTANCES UP TO 40 mm A new reflective optical sensor capable of detecting of consumer, industrial, and automotive applications. objects at operating distances of up to 40 mm is now avail- With high sensitivity and an operating distance from able. The surface-mount TCND5000 reflective sensor, 2 mm to as great as 40 mm, the highly integrated which includes an IR emitter and PIN photodiode in a sin- TCND5000 sensor offers designers a compact and reliable gle package, is well suited for use in object presence sen- solution for enhancing the performance of electronic sys- sors, touch sensors, and proximity sensors in a broad range tems such as cell phones, in which the device compen- sates for the proximity of your ear and adjusts the volume of the speakerphone function accordingly. The sensor’s high-intensity IR emitter features an oper- ating wavelength of 950 nm, while a 950-nm IR band-pass filter eliminates interference from daylight. An optical barrier between the emitter and detector reduces crosstalk to very low levels. The TCND5000 sensor is 6 mm × 3.76 mm × 3.9 mm (h). The WEEE-compliant sensor is a restriction of haz- ardous substances (RoHS) device. It meets JEDEC level 4 standards and are available in a lead-free, surface-mount- style package. The sensor is designed for IR reflow solder- ing with a peak temperature of 260°C; therefore, it’s suit- able for lead-free solder processes. Pricing in 50,000-piece quantities starts at $75per 100pieces. Vishay Intertechnology,Inc. www.vishay.com 8 Issue 177 April 2005 CIRCUIT CELLAR® www.circuitcellar.com