WWW.GiURUMELE.Hi2.RO > 11 $7.00 CANADA $5.50 74470 89295 03 WWW.RADiOSCAMATORUL.Hi2.RO U.S.
Cover.qxd 10/8/2008 7:10 PM Page 1 7:10 PM 10/8/2008 Cover.qxd Vol. 29 No. 11 NUTS & VOLTS PICMAS TREE • HOLIDAY LIGHTS • ZLOG ALTIMETER • CRUSTCRAWLER ARM November 2008 Full Page.qxd 12/4/2007 4:26 PM Page 2
WWW.GiURUMELE.Hi2.RO WWW.RADiOSCAMATORUL.Hi2.RO Full Page.qxd 6/2/2008 11:31 AM Page 3
WWW.GiURUMELE.Hi2.RO WWW.RADiOSCAMATORUL.Hi2.RO
Free Book with Kit Full Page.qxd 10/7/2008 9:23 AM Page 4
WWW.GiURUMELE.Hi2.RO WWW.RADiOSCAMATORUL.Hi2.RO
Let your geek shine. Meet Pete Lewis, lead vocalist for the band Storytyme. Pete recently created the RS1000, a new personal monitor system for performing musicians. It was SparkFun’s tutorials, products and PCB service that enabled him to take his idea to market in less than a year.
The tools are out there. Find the resources you need to let your geek shine too.
Sharing Ingenuity WWW.SPARKFUN.COM
©2008 SparkFun Electronics, Inc. All rights reserved. Hear music from Storytyme at www.storytymeband.com, or check out Pete’s RS1000 at www.rockonaudio.com. Full Page.qxd 10/7/2008 9:30 AM Page 5
You’ve done it the hard way. You’ve earned the right. Introducing Logic, the new Logic Analyzer with SPI, Serial, and I2C. Now shipping for $149.
WWW.GiURUMELE.Hi2.RO WWW.RADiOSCAMATORUL.Hi2.RO
Divide the oscillator frequency by 10 million, and measure the timing with an LED and a stopwatch.
TM logic Decide if Logic is worthy of your workbench at saleae.com.
November 2008 5 TOC Nov08.qxd 10/8/2008 11:11 AM Page 6
NOVEMBER 2008 www.nutsvolts.com
FeaturesWWW.GiURUMELE.Hi2.RO Projects 58 THE ALTOIDIMETER 36 MICROPROCESSOR See how this Zlog miniaturized CONTROLLED WOOD STOVE: Part 2 WWW.RADiOSCAMATORUL.Hi2.ROrecording altimeter can give you Complete the hardware and learn how the stats you want from a variety everything interacts to finally get your of applications. fire burning. ■ By Marvin Mallon ■ By Kerry Barlow ●●●● Intermediate Level 62 SMILEY’S WORKSHOP: AN AVR C PROGRAMMING SERIES 43 MICROPROCESSOR CONTROLLED Part 4: Teaching a CHRISTMAS TREE Butterfly to Talk. Brighten the holidays with this ■ By Joe Pardue easy-to-build electronic PICmas project. ■ By Dave Baker, John Toebes, and Mark Schnell ●●●● Advanced Level
52 HOLIDAY LIGHTS REVISITED Give last year’s project a facelift to Columns make this season even more bright. 12 TECHKNOWLEDGEY 28 Q&A ■ By Peter Stonard 2008 Reader Questions Answered ●●●● Advanced Level Events, Advances, and News Here Topics covered High current LED include black holes, driver, dimmer for Page 78 all-in-one desktops, 12 VDC lamps, more. and electronic paper, just to name a few. 70 THE DESIGN CYCLE 15 PERSONAL Advanced Techniques for ROBOTICS Design Engineers Moving past the 2x16 Understanding, Designing & Page 15 Constructing Robots LCD display. Departments RoboBench Part 1: Putting the 78 NEAR SPACE 08 DEVELOPING 88 NV WEBSTORE Approaching the Final Frontier CrustCrawler AX-12+ PERSPECTIVES 92 CLASSIFIEDS Smart Arm to work. Near spacecraft recovery systems: 34 NEW PRODUCTS 94 TECH FORUM 22 STAMP Part 2 66 ELECTRO-NET 97 AD INDEX APPLICATIONS 68 SHOWCASE Putting the Spotlight on BASIC 84 GETTING STARTED Stamp Projects, Hints & Tips WITH PICs SX/B 2.0. The Latest in Programming Nuts & Volts (ISSN 1528-9885/CDN Pub Agree #40702530) is published monthly for $24.95 Microcontrollers per year by T & L Publications, Inc., 430 Princeland Court, Corona, CA 92879. PERIODICALS POSTAGE PAID AT CORONA, CA AND AT ADDITIONAL MAILING OFFICES. Holiday gifts for PICers. POSTMASTER: Send address changes to Nuts & Volts,P.O. Box 15277, North Hollywood, CA 91615 or Station A, P.O. Box 54,Windsor ON N9A 6J5; [email protected]. 6 November 2008 Full Page.qxd 10/7/2008 11:21 AM Page 7
SERIAL TO ETHERNET SOLUTIONS
Simple Ethernet connectivity for serial devices Works out of the box - no programming is required
Device P/N: SB70-100CR Customize to suit any Kit P/N: NNDK-SB70-KIT application with low-cost $69 SB70WWW.GiURUMELE.Hi2.ROdevelopment kit 2-port serial-to-Ethernet server Features: Q t y . 1 0 0 WWW.RADiOSCAMATORUL.Hi2.ROwith TTL support 10/100 Ethernet TCP/UDP mode DHCP/Static IP Support Data rates up to 921.6kbps Web-based configuration Need a custom solution?
NetBurner Serial to Ethernet Development Kits are available Device P/N: SB72-EX-100CR to customize any aspect of Kit P/N: NNDK-SB72EX-KIT operation including web pages, data filtering, or custom network SB72EX $139 applications. All kits include 2-port serial-to-Ethernet server platform hardware, ANSI C/C++ Qty. 100 with RS-232 & RS-485/422 support compiler, TCP/IP stack, web server, e-mail protocols, RTOS, flash file system, Eclipse IDE, debugger, cables and power supply.
Device P/N: PK70EX-232CR Information and Sales | [email protected] Kit P/N: NNDK-PK70EX232-KIT Web | www.netburner.com $269 PK70EX232 Telephone | 1-800-695-6828 4-port serial-to-Ethernet server Q t y . 1 0 0 with RS-232 support DevPerspectives.qxd 10/8/2008 2:45 PM Page 8 DEVELOPING by Bryan Bergeron, Editor PERSPECTIVES Clean Power dips, surges, audio, and RF noise. learned the hard way that one of the The US power grid may be 99.9% precautions commonly taken to While clean power is frequently reliable; that 0.1% can wreak havoc assure uninterrupted, clean power equated with green power, it can also on computers and other sensitive can take down your computer and refer to AC power free from spikes, electronics. Moreover, I recently potentially devastate your entire WWW.GiURUMELE.Hi2.ROworkshop. First, a bit of background on surge suppressors and uninterrupt- ed power supplies. Surge suppressors are the most affordable and simpler WWW.RADiOSCAMATORUL.Hi2.ROof the two technologies, often com- prising a 15 to 20A circuit breaker and at least one metal oxide varistor (MOV). Unfortunately, some power strips sold as “surge suppressors” are current surge suppressors — meaning they contain a circuit breaker and don’t clamp voltage surges. Voltage surge suppressors clamp the voltage to 150 to 250 VAC, depending on the MOVs or other components used in the circuit. Furthermore, a quality MOV-based surge suppressor will employ three MOVs: one from hot to neutral; and one each from hot and neutral to ground. When a voltage spike appears across one of the MOVs, it conducts — dissipating the power within the ceramic device. Large, high-energy spikes can destroy a MOV, leaving a short or open. Hence, the need to locate MOVs between the circuit breaker and the load so that the breaker trips, disconnecting the load from the power mains. My favorite surge suppressor is a modified Trip-Lite PS4816 — a 16 outlet power strip with a 15A circuit breaker and lighted on-off switch. To the $55 strip, I added three MOVs: one from hot to neutral; one from hot to ground; and one from neutral to ground. I used 150 VAC/400 VAC clamp MOVs rated at 6,000A peak current and <25 ns response time with good results (Mouser #581- VE17P00151K, $0.45). The aluminum Trip-Lite is easily disassembled, modified, and reassembled. Of course, you can also buy commercial surge suppressor power strips and 8 November 2008 DevPerspectives.qxd 10/8/2008 2:46 PM Page 9
rack-mount power conditioners — outside to cool for a few hours. After cut-off circuit project to share with with multiple outlets. The better another 20 minutes of prying, I man- other readers. NV power conditioners, such as the units aged to extract the two engorged, by Furnman (starting about $150) — oozing 12V 7 AH gel batteries. As add linear filtering to eliminate RF you can see in the photo, both noise from the power, a real-time batteries had burst. Despite the voltmeter, sub-ns response time, and touted “intelligence” of the unit, over-voltage protection. there was apparently no thermal cut- The second method of assuring off. So much for set it and forget it. “clean” power is to use an uninter- I no longer leave home without ruptable power supply (UPS) — a turning off my new UPS. You might battery-powered DC-to-AC converter consider doing the same — or with voltage sensing capabilities. A developing an independent thermal basic UPS senses when the line WWW.GiURUMELE.Hi2.RO voltage falls below, say, 105 VAC, and within a few ms fires up the DC- to-AC converter and switches the WWW.RADiOSCAMATORUL.Hi2.ROload to the converter. Depending on the battery capacity and the load imposed by your computer system, The Newest Products and you’ll have from two to 20 minutes to save your work and shut down. More Technologies are Only a Click advanced “smart” UPS models respond to both brown-out and over- Away! voltage conditions, add voltage surge mouser.com suppression for cable modem connections, and automatically power-down your computer equipment. It’s good to remember that a surge can enter your computer, TV, or test gear from any number of paths. The problem with all of this tech- nology is that it’s all too easy to treat it as plug-and-play. Unfortunately, it isn’t. Your “surge suppressor” may be nothing more than a power strip if the MOV(s) inside were destroyed. When was the last time you tested/ inspected your surge suppressors? Moreover, back to the story, when was the last you turned off your UPS for the night or when you went away for the weekend? This summer, upon returning home after a week away, I detected the unmistakable odor of burning insulation in my workshop. At first, I couldn’t determine the source. My • Over A Million Products Online computers booted up without a hitch, and the instruments were fine. • More Than 366 Manufacturers Frustrated, I took out my hand-held • Easy Online Ordering IR thermometer and scanned the • No Minimum Order room. The case of my UPS — a rather expensive, name-brand model — was • Fast Delivery, Same-day Shipping The Newest Products simmering at 190 degrees F. There (800) 346-6873 For Your Newest Designs was no alarm or any outward sign of problems. Using heavy work gloves, I Mouser and Mouser Electronics are registered trademarks of Mouser Electronics, Inc. Other products, logos, and disconnected the unit and brought it company names mentioned herein, may be trademarks of their respective owners. November 2008 9 Mouser_NutsVolts_11-1-08.indd 1 10/2/08 2:43:05 PM Page10.qxd 10/7/2008 4:37 PM Page 10
EVERYTHING FOR ELECTRONICS
Published Monthly By T & L Publications, Inc. 430 Princeland Ct. Corona, CA 92879-1300 (951) 371-8497 FAX (951) 371-3052 Webstore orders only 1-800-783-4624 www.nutsvolts.com Subscriptions Toll Free 1-877-525-2539 Outside US 1-818-487-4545 WWW.GiURUMELE.Hi2.ROP.O. Box 15277 North Hollywood, CA 91615 FOUNDER/ASSOCIATE PUBLISHER Jack Lemieux WWW.RADiOSCAMATORUL.Hi2.RO PUBLISHER Larry Lemieux NEW! HIDmaker FS for Full Speed FLASH PIC18F4550 [email protected]
Creates complete PC and Peripheral Both PC and Peripheral programs ASSOCIATE PUBLISHER/ programs that talk to each other over understand your data items (even odd VP OF SALES/MARKETING USB. Ready to compile and run! sized ones), and give you convenient Robin Lemieux [email protected] • Large data Reports variables to handle them. • 64,000 bytes/sec per Interface PIC18F Compilers: PICBASIC Pro, EDITOR • Easily creates devices with multiple MPASM, C18, Hi-Tech C. Bryan Bergeron Interfaces, even multiple Identities! [email protected] • Automatically does MULTITASKING PIC16C Compilers: PICBASIC Pro, • Makes standard or special USB HID MPASM, Hi-Tech C, CCS C. TECHNICAL EDITOR devices Dan Danknick PC Compilers: [email protected] NEW! “Developers Guide for USB HID Delphi, C++ Builder, Peripherals” shows you how to make Visual Basic 6. CONTRIBUTING EDITORS devices for special requirements. HIDmaker FS Combo: Only $599.95 Jeff Eckert Russ Kincaid Vern Graner Fred Eady Joe Pardue Marvin Mallon DOWNLOAD the HIDmaker FS Test Drive today! John Toebes Dave Baker Mark Schnell Peter Stonard www.TraceSystemsInc.com Kerry Barlow Chuck Hellebuyck 301-262-0300 Jon Williams Paul Verhage CIRCULATION DIRECTOR Tracy Kerley [email protected] The Standard for checking Locate shorted or leaky SHOW COORDINATOR Capacitors in-circuit components or conditions Audrey Lemieux in-circuit MARKETING COORDINATOR Good enough to be the to the exact spot WEBSTORE choice of Panasonic, Still cutting up the pcb, Brian Kirkpatrick Pioneer, NBC, ABC, Ford, and unsoldering every [email protected] JVC, NASA and thousands part trying to guess at WEB CONTENT Michael Kaudze of independent service where the short is? [email protected] technicians. $209 PRODUCTION/GRAPHICS Shannon Lemieux Inexpensive enough to pay for itself in just Your DVM shows the same shorted reading all Joe Keungmanivong one day’s repairs. At $209, it’s affordable. along the pcb trace. LeakSeeker 82B has the ADMINISTRATIVE ASSISTANT resolution to find the defective component. Debbie Stauffacher And with a 60 day trial period, satisfaction Touch pads along the trace, and LeakSeeker Copyright © 2008 by T & L Publications, Inc. guaranteed or money-back policy, the only beeps highest in pitch at the defect’s pad. Now All Rights Reserved thing you can lose is all the time you’re you can locate a shorted part only a quarter of All advertising is subject to publisher’s approval. We are not responsible for mistakes, misprints, or typographical currently spending on trying to repair all an inch away from a good part. Short can be errors. Nuts & Volts Magazine assumes no responsibility those dogs you’ve given up on. from 0 to 150 ohms for the availability or condition of advertised items or for the honesty of the advertiser. The publisher makes no CapAnalyzer 88A LeakSeeker 82B claims for the legality of any item advertised in Nuts & Volts. This is the sole responsibility of the advertiser. Available at your distributor, or call Advertisers and their agencies agree to indemnify and 561-487-6103 protect the publisher from any and all claims, action, Electronic Design Specialists www.eds-inc.com or expense arising from advertising placed in Nuts & Volts. Please send all editorial correspondence, UPS, overnight mail, and artwork to: 430 Princeland Court, Corona, 10 November 2008 CA 92879. Full Page.qxd 10/7/2008 9:35 AM Page 11
WWW.GiURUMELE.Hi2.RO WWW.RADiOSCAMATORUL.Hi2.RO Tech2008.qxd 10/8/2008 10:12 PM Page 12
TECH KNOWLEDGEY EVENTS, ADVANCES, AND NEWS 2008 ■ BY JEFF ECKERT ADVANCED TECHNOLOGY
Things are Looking Up... major flare about 300 years ago pretty much the cat’s meow for but has been relatively dormant nanoscale measurement. But last WWW.GiURUMELE.Hi2.ROever since. summer, Carl Zeiss, Inc. (www.zeiss. Well, astronomers at the MIT com), delivered the first helium ion Haystack Observatory are busy microscope to the National Institute peeping in, and the latest observation for Standards and Technology (NIST, WWW.RADiOSCAMATORUL.Hi2.ROtool is a “virtual telescope” that they nist.gov). Dubbed “Orion,” it will be created by linking radio dishes locat- used for improving production in the ed in Hawaii, Arizona, and California. semiconductor and nanomanufactur- The resulting device measures 28,000 ing industries. The new microscope miles (45,000 km) across and, — uses helium ions to generate the because its angular resolution enables signal used to image extremely small a technique known as very long base- objects, which is similar to the way an line interferometry — can generate SEM works. Paradoxically, although images 1,000 times as fine as those helium ions are much larger than ■This Chandra image shows our of the Hubble Space Telescope. The electrons, they can provide higher Galaxy’s center, with the arrow aimed current focus is on the glowing region resolution, higher contrast images. at Sagittarius A*. Credit: NASA/CXC /MIT/Frederick K. Baganoff et al. of Sagittarius A* (pronounced According to Bill Ward, the “A-star”), a suspected black hole that instrument’s principal inventor, resides in the center of our own Milky “Because the Orion ion beam lack holes are pretty well Way. A* is a jumbo, containing about appears to be emanating from a Baccepted as fact these days. After four million times the mass of the region which is less than an angstrom all, they were theorized as early as Sun. New observations have been in size, the resulting ion beam has a 1783 by Rev. John Michell, an made using 1.3 mm radio waves, remarkable brightness. This makes it amateur English astronomer. They which can penetrate the fog of possible to focus the beam into a are described by the general theory interstellar gas that blurs observations very small probe size. Ultimately, of relativity, have a definable event at longer wavelengths, and they have this microscope will enable further horizon at the outer edge, and may revealed the highest density yet for scientific advancements in a large last forever. (However, when quan- the concentration of matter at the number of fields, such as semicon- tum theory is taken into account, center of our galaxy. ductor process control, life science they may actually leak thermal The astronomers concluded that applications, and materials analysis.” energy [Hawking radiation] and may the source of the radiation likely Zeiss has already replaced the have a finite life. But I digress.) originates with either a disk of matter original Orion with the Orion Plus, For Capt. Jean-Luc Picard, black swirling in toward the black hole or a which incorporates many of NIST’s holes were more common than fleas high speed jet of matter being ejected suggestions in its design, including on a Clingon, so they must be real. by it. This “is important new evidence an improved cooling system for the The only snag is that no one has supporting the existence of black actually proven their existence. For holes,” according to MIT’s Sheperd obvious reasons, it’s impossible to Doeleman. “Future observations that see one, but at least you can observe create even larger virtual telescopes its effects — if you can get a ringside will be able to pinpoint exactly what seat, that is. makes Sagittarius A* light up.” Space gases and solid objects heat up as they are pulled closer to ...and Down ■ An image of gold atoms on tin the event horizon, so you can learn from a scanning electron microscope (left) has relatively poor depth of some things about the black hole ince it was introduced commer- field. By contrast, the entire image from the resulting glow. As it turns Scially in the 1960s, the scanning from a helium ion microscope image out, this one let out a mysterious electron microscope (SEM) has been (right) is sharp and clear. Credit: NIST. 12 November 2008 Tech2008.qxd 10/7/2008 8:51 AM Page 13
TECHKNOWLEDGEY 2008
Free File Translations or analog and clear QAM cable TV ood news, fellow cheap- on your PC, and record and pause Gskates. If you receive a lot the programming at will. The WinTV of word processor and graphics v6 application lets you watch and files from a wide range of record TV in a window or full screen, sources, you are bound to run and WinTV-Scheduler allows into some that are unreadable recording shows on a daily, weekly, by your software. Word, or once-only basis. Photoshop, etc., will open only The unit is also compatible with a relatively small number of Microsoft’s Windows Media Center. alien file formats, which can The package includes a remote con- cause you to scrounge the trol and a portable TV antenna. But WWW.GiURUMELE.Hi2.ROInternet for free conversion note that the unit supports over-the- utilities. Well, your scrounging air HD broadcasts but cannot decode days are over. All you have to HD signals that come through a cable ■ New models in the Sony VAIO® line-up put an HDTV, Blu-ray player, and PC in one do is log onto zamzar.com, or satellite box. Analog TV recording WWW.RADiOSCAMATORUL.Hi2.RObox. Courtesy of Sony Corp. upload the file, and tell it what will typically consume 1.5 Gb of you want the converted version disk space per hour, whereas ATSC helium source for better imaging. to be. A short time later, it will high-def recording gobbles up to appear in your mailbox. The basic 5 Gb, so you may need to beef up COMPUTERS AND service is free, and it works with a your storage capabilities. huge number of document, image, NETWORKING music, video, and compression CIRCUITS AND New “All-in-One” Desktop formats. But — of course — there is a catch. First, you have to wait until DEVICES ast September, Sony they are good and ready to send it to Another Shot at L(www.sony.com) introduced three you, which in my test took a couple Electronic Paper new all-in-one desktop machines: the hours. Not bad. And you are limited VAIO® JS, LV, and RT models. Each to files of 100 MB or less. But for a one includes an HDTV, a Blu-ray price, you can get faster conversion, Disc™ player, and a PC in a compact processing of files up to 100 GB, a design. Ranging in price from about personal inbox for online storage, $1,000 to $3,300, they are billed as and no ads when you log in. The “ideal for everything from everyday paid levels will run you $7, $16, or ■ E-paper has been around for computing to editing high-definition $49 per month depending on how several years in various forms, but the reading public has continued to video content.” much speed and capacity you need. prefer turning the pages of a morning At the top of the line is the RT newspaper or lumpy old paperback High Definition Studio, designed Watch, Record TV over USB book to endless scrolling on an especially for high-def video editing. f you like the idea of linking electronic display. Its 25.5 in (diagonal) LCD display Iyour desktop or notebook PC to features XBRITE-FullHD LCD commercial television but don’t want lastic Logic (www.plasticlogic. technology and a Blu-ray optical drive to spend a lot of money doing it, Pcom) is taking another whack at that lets you play, record, and edit there is always the WinTV-HVR-950Q E-paper with its recently introduced HD videos in 1080p resolution. In from Hauppauge Computer Works electronic reader, scheduled to hit addition to the built-in digital TV (www.hauppauge.com). the market early next year. This one tuners, an HDMI In port lets you Rather than chucking the old is bigger than most, offering an 8.5 x connect compatible HD cable and computer, you just plug this $99 11 in display, which makes is feasible satellite boxes. An HDMI output tuner stick into a USB port and away for business-oriented material and has also been included, allowing you go. decent-sized graphics. It is also connection to an external LCD You thinner than the average issue of display or HDTV. The RT series can National Geographic, so it won’t take incorporates Intel® Core™ 2 Quad watch up much space in your briefcase. processors, up to 8 GB of RAM, and live The reader supports a range of a terabyte hard drive. It is equipped HDTV document formats, including the with a high-speed eSATA port for Microsoft Office suite and Adobe ■ The WinTV-HVR-950Q allows you extra storage, and a CompactFlash® to watch, record, and pause TV PDFs. You can link to the document slot. The other models — naturally — programming on your PC. Courtesy source through either a wired or offer fewer frills but lower price tags. of Hauppauge Computer Works. wireless connection, and several November 2008 13 Tech2008.qxd 10/7/2008 8:51 AM Page 14
thousand documents can be stored the timer to take a photo every one, already used in more than 2,000 internally. As of this writing, no price five, or fifteen minutes, thus allowing classrooms. The result is the new tag has been attached, but one of you to see the world from your pet’s VEX Classroom Lab Kit, which the main deal killers of competing point of view. “provides a custom solution for products is the high initial cost (e.g., Is this a good idea? If I attached it robotics education that is flexible $359 for the Amazon Kindle and to my dog, I’m pretty sure the result enough to be applied at multiple about $300 for the Sony Reader). would consist mostly of pix of (1) grade levels, including secondary and Will this be the product that makes garbage cans, (2) rotting road kill, and post-secondary.” The basic $699 paper obsolete? Well, maybe. (3) the posteriors of other dogs. package contains a set of 17 units, Come to think of it, maybe 35 photos each of which contains a separate Make Your Pet a is plenty. Anyway, you can get one lesson, concept, and activity. For a list Photographer for a suggested retail price of $49.99. of included hardware and options, WWW.GiURUMELE.Hi2.ROvisit www.vexrobotics.com/vex- New Robotics Curriculum education.shtml. NV ■ The Pet’s n a move intended to “spur greater Eye View Iinterest in science, technology, camera turns engineering, and math (STEM) INDUSTRY AND WWW.RADiOSCAMATORUL.Hi2.ROyour dog or cat into a across the globe,” Innovation First, photographer. Inc. (www.innovationfirst.com), and THE PROFESSION Courtesy of Autodesk, Inc. (www.autodesk.com), Green Energy Research Center Launched Uncle Milton. have teamed up to offer a new robotics curriculum package. It is pri- iming to “facilitate the use of marily intended for classroom use, Agreen energy sources, reduce the but it includes some features that environmental impact of carbon his month’s Ill-Conceived Gadget should make it appealing to the emissions, and alleviate the growing Taward goes to Uncle Milton home hobbyist, as well. Autodesk energy crisis,” the National Science (www.unclemilton.com), which has been around for years, providing Foundation (www.nsf.gov) has appears to be responsible for the 2D and 3D design software to awarded $18.5 million to North Pet’s Eye View camera. It’s basically manufacturing, construction, and Carolina State University just a standard toy digital camera, other markets, and its contribution is (www.ncsu.edu) and its partners to offering 640 x 380 resolution for based on the Autodesk Inventor establish a new NSF Engineering 4 x 6 in prints and underwhelming package, which is used by many Research Center (ERC). It will be the storage capacity of about 35 photos. professional robotics engineers. first of five third-generation ERCs, But the twist is that you can hang it Innovation First is kicking in each of which will embrace “new from your dog or cat’s collar and set its VEX Robotics system, which is dimensions designed to speed the innovation process and prepare engineering graduates who are innovative, creative, and understand how to function in a global economy where engineering talent is broadly distributed throughout the world.” (Translation: Hold meetings, generate a slew of position papers, and have some really great lunches.) Dubbed the NSF ERC for Future Renewable Electric Energy Delivery and Management (yes, FREEDM), it will conduct research on how to modify the nation’s power grid so as to integrate alternative energy generation and novel storage methods into the existing network. The project includes more than 65 industry partners, 18 state and local government organizations, and about nine other universities and institutes. Results are expected in five years.
14 November 2008 PersonalRobotics-edited.qxd 10/7/2008 4:00 PM Page 15
PERSONALROBOTICS UNDERSTANDING, DESIGNING & CONSTRUCTING ROBOTS & ROBOTIC SYSTEMS PART 1 ■ BY VERN GRANER ROBOBENCH: Putting the CrustCrawler WWW.GiURUMELE.Hi2.ROAX-12+ “Smart Arm” to Work
IT’S INEVITABLE.When working on a project at your workbench, at some point WWW.RADiOSCAMATORUL.Hi2.ROyou’ll wish that you had a third hand. When you’re holding together two parts that need to be soldered or you need a screwdriver but you don’t want to take your eyes off of some small parts to reach for it, an extra hand would be awfully uhm ... “handy.” In response to this need, the industry has developed all sorts of “third hand” devices such as the alligator clip “helping hands” sold by RadioShack (Figure 1) or specialized vises such as the ones sold by PanaVise (Figure 2).Though these tools each do their jobs very well, it’s up to you to do the (re)positioning any time you want to have your item at a different orientation.
ust a short while ago, some robot way to go before we get to the level the venerable RadioShack “Armatron” Jenthusiasts and I went to see the of robotic helpers depicted in science (Figure 4), purchased in the early movie Iron Man. The hero of the fiction movies such as this, it made 1980s. When I got it home and (of story had a pair of autonomous, intel- me wonder how far off a useful course) disassembled it, I was both ligent, mobile robot arms that would robotic bench accessory was. For impressed and a bit disappointed. assist him by holding lights and hand- example, would it be possible to Turns out the Armatron used a ing him tools as he worked. In one re-purpose a hobby-level robotic arm compact (and complex!) plastic gear scene, the arm is intelligent enough to “earn its keep” by helping out on box with a single motor to drive all to know where to hold a magnifying our workbenches? the motions of the arm. The two joy- glass to help the hero build part of sticks mechanically engaged different his suit (Figure 3) by simply observing CHILD’S PLAY ■ FIGURE 3. Robert Downey Jr. as the human and discerning his needs. “Tony Stark” in the Paramount Though we obviously have a long The first robot arm I owned was feature film Iron Man. Photo Copyright © Paramount Pictures. ■ FIGURE 1. ■ FIGURE 2. PanaVise RadioShack workbench vise unit. “Helping Hands.”
November 2008 15 PersonalRobotics-edited.qxd 10/7/2008 4:01 PM Page 16
gear trains with the constantly and accurate arm just wasn’t contacts over at Nuts & Volts and spinning motor, causing the various available yet? gave them the broad outlines of the joints of the arm to move. Though idea I had and asked if they thought ingenious in design, it wasn’t very ENTER THE CrustCrawler might be interested “hackable” since there were no in this experiment. I told them I individually addressable motors to CRUSTCRAWLER! thought the AX-12+ would be the control. Today, most robot arms you perfect candidate for testing out the see for sale in electronics/robotics When CrustCrawler announced idea of a useful bench-top robot hobby magazines are composed of the AX-12+ intelligent arm, I remem- arm. They put me in touch with Alex some plastic or metal parts and a ber reading reports of its strength Dirks over at CrustCrawler, Inc., and handful of model aircraft-type servo and accuracy. More importantly, the he was happy to send an arm out motors. From a hacking/programming arm used the Dynamixel servo motors for torture ... er ... experimentation. perspective, this is a big step up fromWWW.GiURUMELE.Hi2.ROthat had real feedback capabilities. I dug through the CrustCrawler the Armatron single motor approach. This would make it possible to attain website and examined all the various Most of these robot arms are new levels of accuracy when using configurations at length. I finally sent quite useful for teaching robotic and the arm since, unlike a standard off a wish-list to Alex of the parts I WWW.RADiOSCAMATORUL.Hi2.ROautomation concepts. They do a good hobby servo, it can determine if the thought I would need and, before job of introducing the subject and arm had actually reached a position. I knew it, I had a bouncing baby showing someone just how complicated With these advanced features, I cardboard box on my porch. Time a simple human task such as “hand me wondered if the AX-12+ SmartArm to build! the TV remote” can be for a robot. would be able to do real work like I’ve seen these “educational” robotic the commercial robotic arms used in “SOME ASSEMBLY arms used to teaching the manufacturing. Could it hand me computational complexity involved tools? Could it hold a printed circuit REQUIRED” in stacking small wooden blocks or board (PCB) while I was soldering? moving disks to solve the “Tower of The more I thought about it, the When I opened the AX-12+ Hanoi” puzzle. Yet, I had not seen more I began to wonder why not? box, I was delighted to see little one employed doing real work in a I began to catalog the various bags of clearly labeled parts and a real workbench environment. Could tasks that I might need the arm to nice thick detailed manual. Other it be that a sufficiently powerful perform. Using it while constructing than some typical hand tools, the devices was the first thing that only thing I had to supply was the ■ FIGURE 4. The author’s came to mind. Holding parts or Loctite liquid to lock down the original 1980’s Armatron fetching the right tool seemed screws so they don’t wiggle loose robot arm from RadioShack. useful, as well. Need a #2 during use of the arm (good practical Phillips? The arm can hand it to advice that was stated right at the you. Need someone to hold front of the manual). The arm went these parts while you solder together in a couple of fun evenings them? The arm can do that in no small part due to that very nice AND it won’t burn its fingers! thick guide! The possibilities seemed Now that I had the arm all endless. All I would need was together, I was ready to get it to a CrustCrawler AX-12+ to move. Besides the AX-12+ itself, the experiment with. package from Alex included a cool little interface box called the CM-5 HEY BUDDY, CAN YOU (Figure 5) and the USB2Dynamixel unit (Figure 6). The CM-5 is a SPARE AN ... ARM? record/playback device that can be used to play sequences of moves. I spoke with my top-secret It also houses a rechargeable battery pack to allow portable use ■ FIGURE 6. The USB2Dynamixel of the arm and is recharged with USB to TTL/RS-485 adapter. the included hefty 12V, five amp power supply. To program the arm, you connect your PC to the ■ FIGURE 5. The ROBOTIS CM-5 USB2Dynmixel, connect a three-pin control/power unit for the cable from the USB2Dynamixel to CrustCrawler AX-12+ SmartArm. the CM-5 unit, then connect another 16 November 2008 PersonalRobotics-edited.qxd 10/7/2008 4:01 PM Page 17
PERSONAL ROBOTICS
three-pin cable from the CM-5 to the Dynamixel servo in the arm’s base. Once the connections above are established, you connect the 12V supply to the CM-5 and you’re ready to go. I started out using the Robotis “motion editor” software that comes with the CM-5. Though the software is fairly intuitive, I found it a bit ■ FIGURE 7. Four high-current cumbersome to use. It appears to cables and spliced a 2.1 mm power diodes wired in series to drop the have been designed with the connector into it and included four 12V power source. “Bioloid” plastic models in mind. high-current diodes in series to drop Sadly (at the time of this writing),WWW.GiURUMELE.Hi2.ROthe 12V from the supply down to a repositioning the mechanical “helping there was no “template” for my voltage that would not exceed the hands” I normally used for this task. nice new all-metal AX-12+, making 10V maximum rating of the servos positioning the joints a bit tough (Figure 7). FLIP IT! FLIP IT GOOD! WWW.RADiOSCAMATORUL.Hi2.ROfor me. GET A GRIP! I started by using the joystick to TIME FOR SOME GNU maneuver the arm into a braced posi- I booted up Scott’s software and tion with the elbow joint resting at SOFTWARE mapped an old joystick to the various the end of its travel, then I moved the joints of the AX-12+ and, in a matter shoulder joint so that it was holding While digging around for demo of minutes, was moving the arm all the gripper at a comfortable angle for sequences on the CrustCrawler around the desk. A word of warning soldering. I then fully opened the website, I discovered a link to the for those of you that may end up gripper and named this pose “Release “AX-12+ Arm Sample” project by with this arm: it is strong! I’ve Board.” Next, I brought the gripper Scott Ferguson. Scott’s code allows knocked things off my workbench, completely shut and named this pose you to map joystick controls to the dumped over a perfectly good can “Grip Board.” I executed the Release various AX-12+ joints and then of Dr. Pepper, put a nice nick in the Board pose, placed a small project “puppet” the arm. Once you move corner of my LCD monitor, and one board in the gripper’s range, and exe- the arm into a position, you can time I even managed to smack myself cuted the Grip Board pose. The gripper record the joint values as a “pose” right in the funny bone! If you are took a nice strong hold of the board. and then step forward/backward using the joystick to control the arm, I now used the joystick to rotate the through these poses. This is very use caution and make sure breakable wrist joint so the board was solder similar to the “teaching pendants” things are not in its path. Don’t learn side up and named this pose “Solder that many commercial robot arms this the hard way like I did! Side.” Lastly, I rotated the wrist so the use to create their processes. To top Now that I had the arm in place component side was up again and it off, Scott released the software (and a bandage on my elbow!), I named this pose “Component Side.” under the GNU public license so all was finally ready to try some work So now, with a click of a mouse I the source code is available, as experiments. I started with a task could have the arm grab a PCB and well (this would come in handy that was both repetitive and fairly hold it while I used two hands to down the road!). common, namely holding a PCB for install a component on it (Figure 9), This software looked very soldering. When I build through-hole then another couple of clicks flipped promising, however it was designed PCBs, I have to flip the board back the board over so I could use both to communicate directly with the and forth between Dynamixel servos and would not talk solder-side and to them through the CM-5. I would component-side as I have to remove the CM-5 from the stuff components and communication chain in order to get then solder them into Scott’s software to work. Though place. I wanted to see this would be fairly simple to do, it if the arm could would leave me without a power do this for me to source for the arm as the CM-5 was eliminate the time handling converting the 12V from spent manually the supply down to the acceptable 9.6V voltage levels required by the ■ FIGURE 8. servos. As a quick and dirty solution, The AX12 Arm Controller software I took one of the extra three-pin by Scott Ferguson. November 2008 17 PersonalRobotics-edited.qxd 10/7/2008 4:02 PM Page 18
WWW.GiURUMELE.Hi2.RO
WWW.RADiOSCAMATORUL.Hi2.RO■ FIGURE 9. Placing components into a PCB held by the ■ FIGURE 10. Soldering components into place while PCB AX-12+ SmartArm. is held steady by AX-12+.
■ FIGURE 13. A slight tug removes ■ FIGURE 11. AX-12+ gripper open, ■ FIGURE 12. The AX-12+ gripper clamps the solder vac from the AX-12+ ready to reach for the solder vac. down on the solder vac. gripper.
hands to solder on it (Figure 10). distant screaming sound wasn’t an above, naming them “Open Gripper” This process was so deceptively easy earthquake, it was just my ambitious (Figure 11), “Fetch Solder Vac” and the result so useful that I just ideas coming in direct contact with (Figure 12), and “Offer Solder Vac” swaggered on to the next task! reality. With the board flipping function (Figure 13). I then placed the solder under my belt, I decided to take things vac back in the spool and executed WHEN UNSTOPPABLE up a notch and see about having the the Open Gripper and the Fetch arm hand me one of the other more Solder Vac routines. Unfortunately, OPTIMISM MEETS popular and useful devices on my the gripper missed the vac and UNMOVABLE REALITY workbench: a solder vac. ended up dumping the spool over! I started by placing a spool of A bit (okay, more like hours) The rumble you felt and that hookup wire on the bench and then of experimentation later and I placing the solder vac in discovered that to reliably retrieve the center of the spool the solder vac, I would have to make to hold it upright where a much more accurate resting spot it could be easily gripped for it. Since the arm was reliably by the arm. I then used repeating the positions I had the joystick to move the recorded, the solder vac had to be arm through the series of at the same angle and height every poses as I had done time or there was a good chance the arm would miss. ■ FIGURE 14. Foot pedal Logically, this also meant that control expected to add any tool I wanted to have the arm hands-free control to the AX-12+ motions. handle would have to be equally well 18 November 2008 PersonalRobotics-edited.qxd 10/8/2008 8:37 AM Page 19
PERSONAL ROBOTICS
■ FIGURE 15. Old school meets cool tool!
WWW.GiURUMELE.Hi2.RO
WWW.RADiOSCAMATORUL.Hi2.ROTHANK YOUS ■ I would like to take a moment to thank the good folks over at CrustCrawler for providing this most excellent robotic arm for use in the project, Nuts & Volts Magazine for helping set it up, and Paul Atkinson and James Delaney for their invaluable assistance with this project.
situated. Could be this “hand me a tool” business is a bit trickier than I had imagined! I sat back and started to think about how I could make sure the robot’s environment would be as reliable as the arm itself. SAME BAT TIME, SAME BAT CHANNEL!
Luckily, I’ve got tough calluses on my ambition and I was able to pull myself from the wreckage of first contact and continue on my quest for a robotic helping hand on my bench. I’ve managed to sweet-talk one of my regular roboteers into helping write some software to allow foot-pedal control of the arm (Figure 14) and another one to help me build a “tool gallery” to hold the tools exactly where the arm can find them. Look for all the details of my continuing quest for a helping hand at the workbench in ROBOBENCH — Part 2! As always, if you have any questions or comments, I can be reached at [email protected]. NV RESOURCES ■ CrustCrawler (AX-12 Smart Arm Source) — www.crustcrawler.com
■ Forest Moon Productions (GNU Smart Arm software) — www.forest moon.com/Software/AX12ArmSample/
November 2008 19 NutNVolt200811.qxd 10/7/2008 9:44 AM Page 20
Mini-Kits... Holiday Themes! LED Animated Santa Animated Santa and reindeer display has 126 dazzling col- Passive Aircraft Monitor High Power LED Strobe Personal Guitar Amp ored LEDs! Makes a great hol- iday sign! Animated motion makes it come alive. Runs on standard 9V battery or external power supply. MK116 LED Santa Kit $17.95 LED Christmas Tree Electronic Christmas tree features 134 Most popular new kit ever! Super bright LED’s! Practice in peace! bright colored LEDs in the shape of a tree with 18 random flashing blinking Our patented circuit monitors the The fragile glass Xenon tube is The new PGA1 allows you to “candles”! Runs on a 9V battery or PS. entire aircraft band without any gone, replaced with high intensity practice both your regular and tuning! Passive design has no LED’s! Variable flash rate and base guitars in peace! Also works MK117 LED Christmas Tree Kit $18.95 radiation, no interference, for use built-in audio trigger input to sync as a great DI to feed your home onboard aircraft to listen to air to to your audio.WWW.GiURUMELE.Hi2.RO Optional display stereo amplifier! CD/MP3 input LED Animated Bell ground! Great for air shows to boards available. Runs on 12VDC allows you to play to your favorite listen to the active planes! or use our AC125 PS. music. Includes case shown! This holiday bell is animated to simulate swinging back and forth! ABM1 Airband Monitor Kit 89.95 LEDS1C LED Strobe Kit 44.95 PGA1 Guitar Amp Kit 64.95 84 bright colored LEDs will dazzle you with holiday cheer! Includes an on/off switch. Runs on 9V. WWW.RADiOSCAMATORUL.Hi2.ROECG Heart Monitor Plasma Generator HV Ion Generator MK122 LED Bell Display Kit $16.95 3D LED Christmas Tree Not your average LED display! 4 branch sections give this tree a 3D look! 16 red LEDs light it up with yellow LED’s for you to customize your tree! 9V battery base. Check your own heart! Generate 2” sparks! Make a blast of fresh air! MK130 3D LED Tree Kit $7.95 Provides a visible and audible dis- Produces a stunning and shocking Generates a steady state DC volt- play of your heart rhythm! 25kV at 20kHz from a solid state age at constant non-pulsed cur- SMT LED Christmas Tree Variable gain, bright “beat” LED, circuit! Build your own plasma rent at 7.5kV DC negative, 400uA. Build this subminiature Christmas tree and monitor output for display on bulbs, light fluorescent tubes That’s a LOT of ions! Learn how and learn SMT at the same time. Small your scope. Just like the lab! Re- without wires and more! A great modern spacecraft use ions to enough to wear as a badge or pen- usable sensors are included. learning kit. Runs on 16VAC, accelerate through space. Runs dant! Extra SMT parts are included so Runs on a safe 9VDC battery. order our PS21 power supply. on 12VDC or our AC125 PS. you can’t go wrong! Runs on Li-Ion cell. ECG1C ECG/EKG Kit 44.95 PG13 Plasma Gen Kit 64.95 IG7 Ion Gen Kit 64.95 MK142 SMT LED Tree Kit $10.95 20W SubMini Audio Amp Digital Voice Storage Speed Radar Gun SMT LED Smiley Face This is a great attention grabber and also teaches you the basics of SMT construction! Display your “smiley” as a pin or badge! Extra parts included! MK141 SMT LED Smily Kit $9.95 LED Traffic Signal 20 watts and no heat! Multiple message storage! Now YOU can be the cop! Impress your friends with this neat 4-way Delivers a super clean 20W out- The Bullshooter-II provides up to Our famous Speedy radar gun traffic signal! Operates just like a standard put from one SMT package! Ultra 8 minutes of digital voice storage teaches you doppler effect the signal, and features adjustable delay. Red, efficient class D design produces that can be broken down into 8 fun way! Digital readout displays yellow, and green LEDs are used just like no heat. PCB can be snapped separate stored messages! Great in MPH, KPH, or FPS. 1/8th mile the real thing! Runs on 9V battery. into a small circle for special for announcements, etc. Built-in range is typical. You supply two MK131 LED Traffic Signal Kit $7.95 applications. Runs on 18VDC for mic plus external input. Runs on coffee cans! Runs on 12VDC or rated output, use our SPS18 PS. 12VDC or our AC125 PS. our AC125 power supply. LED Switcher Blinky UAM2 20W SMT Amp Kit 34.95 BS2C Bullshooter-II Kit 69.95 SG7 Speedy Radar Kit 59.95 Run a 3V LED from 1.5V! Learn power supply switching and end up with a super bright blue Telux Doppler Direction Finder 40W Stereo Micro-Amp Signal Magnet Antenna LED blinking at 140kHz! Runs on a single AA battery not included. LSW1 LED Switcher Blinky Kit $14.95 Wheel Of Fortune Just like the casino game! Just push the button and the LEDs “rotate” Find that transmitter quick! 40 watts of stereo in 2½”! Pulls in distant stations! and slowly come to a stop, display- ing the “winner”! Push it again to Track down jammers and hidden The big brother to the UAM2, it Super Hi-Q ferrite rod antenna start over. Runs on 9V battery. transmitters with ease! 22.5 delivers 40W of crisp clear stereo with Faraday shield eliminates degree bearing indicator with power all in a 2½” board! One noise from power lines, dimmers, MK152 Wheel Of Fortune Kit $7.95 adjustable damping, phase inver- single SMT device operating 87% static and more! Great results sion, scan and more. Includes 5 efficient creates virtually no heat! from 500kHz to 15MHz. Super Cable Polarity Checker piece antenna kit. Runs on Selectable gain, pop filter and a for AM broadcast band! Includes You get a home theatre system for the holi- 12VDC vehicle or battery power. lot more! Runs on 10-18VDC. power supply. days, you run cables throughout the DDF1 Dir. Finder Kit 169.95 UAM4 40W SMT Amp Kit 69.95 SM100 Sig Magnet Kit 89.95 house, how do you identify polarity? It’s easy with the MK132! ✔ It’s impossible to give you full specs on these products MK132 Cable Polarity Checker Kit $8.95 in a 1” space! Did You Know... ✔ A lot of our kits are also available “factory assembled and tested”, if you don’t want to build it! Water Sensor Alarm ✔ We have over 350 products currently available, and The sump pump quits, the snow melts, all those don’t fit here! the basement floods! Don’t let it happen with the simple water sensor alarm. 9V Visit www.ramseykits.com battery operation with remote sensor. The Solution! Free Giveaways and ALL the MK108 Water Sensor Alarm Kit $7.95 information you ever needed! NutNVolt200811.qxd 10/7/2008 9:46 AM Page 21
FM Broadcasters Integrated Circuit Radio Labs ✔ Learn all about AM and FM radio theory and circuits!! Fun Stuff For The Holidays! ✔ Build an IC based radio with great reception! ✔ Step-by-step assembly & test Digital FM Stereo procedures! Transmitters ✔ Great to learn about IC’s! ✔ Rock stable PLL synthesized ✔ These Superhet AM and AM/FM radio kits AM/FM Front panel digital control and give you a great introduction to how AM display of all parameters! and FM radios actually work! Plus, they ✔ Professional metal case ✔ are designed using integrated circuits Super audio quality! rather than standard discrete components. ✔ 25mW and 1W models! These are the perfect kits to learn all For nearly a decade we’ve been the leader in hobbyist FM radio transmitters. We about IC design, theory, and troubleshoot- told our engineers we wanted a new technology transmitter that would provide ing! And when you’re done you have an AM or an AM FM100 series quality without the advanced mixer features. They took it as a chal- AM/FM radio that has really great reception...that you made yourself! lenge and designed not one, but TWO transmitters! IC’s, transistors, resistors, capacitors, coils and other parts are easily identified and The FM30 is designed using through-hole technolo- described in theory. The comprehensive manual includes step-by-step assembly gy and components and is available only as a do-it- and test procedures plus complete theory. The final alignment section is also pro- yourself kit with a 25mW output very similar to our vided to make sure you have a great sounding receiver! 9V battery required. FM25 series. ThenWWW.GiURUMELE.Hi2.RO the engineers redesigned their brand-new design using surface mount technology AMFM108K AM/FM Integrated Circuit Radio Learning Kit $34.95 (SMT) for a very special factory assembled and test- AM550K AM Integrated Circuit Radio Learning Kit $22.95 ed FM35WT version with 1W output for our export only market! Both are designed around an RF tight vinyl clad metal enclosure for noise free and inter- OBDII CarChip Pro ference free operation. All settings are done through the front panel digital control and LCD dis- ✔ Monitor vehicle performance to save gas! WWW.RADiOSCAMATORUL.Hi2.RO✔ play! All settings are stored in non-volatile memory Stores up to 300 hours of trip details! for future use. ✔ Records time, date, distance, speed, events and up to 4 separate engine parameters! Both the FM30 and FM35WT operate on 13.8 to 16VDC and include a 15VDC ✔ Records extreme acceleration and braking! plug-in power supply. The stylish black metal case measures 5.55"W x 6.45"D x ✔ Automatic accident log, records the last 20 1.5"H. (Note: After assembly of this do-it-yourself hobby kit, the user is responsible for seconds before impact! ✔ View and reset engine diagnostic trouble codes! complying with all FCC rules & regulations within the US, or any regulations of their ✔ respective governing body. FM35BWT is for export use and can only be shipped to Test for preliminary emissions status! locations outside the continental US or valid APO/FPO addresses or valid customs bro- No comments are necessary about the cost of gas! We kers for end delivery outside the continental US.) saw it approaching 4 bucks with disbelief. Then, in a FM30B Digital FM Stereo Transmitter Kit, 0-25mW, Black $199.95 blink of an eye, 5 bucks getting close! Now there’s lim- FM35BWT Digital FM Stereo Transmitter, Assembled, 1W, Black $299.95 ited availability in some areas. Will it ever end? Now it’s more important than ever to make sure your vehi- cle is in tip-top shape for the most economical per- Professional Synthesized formance possible. Stereo FM Transmitter Did you know old spark plugs can reduce fuel economy by 30%? It gets worse... ✔ Fully synthesized 88-108 MHz for a bad oxygen sensor cuts it by 40%! And that relates to a lot of extra gas and at no frequency drift 5 bucks a gallon, just do the math... That’s a LOT of money! ✔ Line level inputs and output ✔ All new design using SMT technology With the CarChip Pro you'll have complete access to all your vehicles diagnostic data at your fingertips! Sort miles by type (business, personal or driver), set Need professional quality features but can't jus- thresholds for alarms, calculate gas mileage, log extreme acceleration and brak- tify the cost of a commercial FM exciter? The ing, speed, engine parameters, and a whole lot more! And as you know, extreme FM25B is the answer! acceleration does not equal fuel economy! Find out who’s driving your vehicle like a race car...and deal with it! A cut above the rest, the FM25B features a PIC microprocessor for easy fre- quency programming without the need for look-up tables or complicated formu- The CarChip Pro is great if you have a new driver in the family. Easily monitor las! The transmit frequency is easily set using DIP switches; no need for tuning their performance and let them gain additional privileges with a good driving coils or “tweaking” to work with today's “digital” receivers. Frequency drift is a record! You have the proof! thing of the past with PLL control making your signal rock solid all the time - just like commercial stations. Kit comes complete with case set, whip antenna, 120 No more taking your car in to see why your “check engine” light is on. The VAC power adapter, 1/8" Stereo to RCA patch cable, easy assembly instructions, CarChip Pro will automatically provide the trouble codes and allow you to reset and the SMT parts are factory preassembled - you'll be on the air quick! it! CarChip Pro includes storage for up to 300 hours of driving data! If you're FM25B Professional Synthesized FM Stereo Transmitter Kit $139.95 unfortunate enough to be involved in an accident, it even records all the vehicle’s parameters for the last critical 20 seconds of operation! Includes USB cable, soft- ware and complete instructions. Tunable FM Stereo Transmitter 8226 Davis OBDII CarChip Pro Data Logger $99.95 ✔ Tunable throughout the FM band, 88-108 MHz ✔ Settable pre-emphasis 50 or 75 µSec for worldwide operation MORE than just friendly on-line ordering! ✔ Line level inputs with RCA connectors Clearance Specials, Ramsey Museum, User Forums, Dealer Information, FAQ’s, FCC The FM10C has plenty of power to cover your home, back- Info, Kit Building Guides, Downloads, Live Weather, Live Webcams, and much more! yard, or city block. You'll be amazed at the exceptional audio quality of the FM10C. Tunes through the entire 88-108MHz band. Re-broadcast your favorite music commercial free and with the dynamic range the musician intended without all that nasty compression the big boys use to make their sta- www.ramseykits.com tion sound louder than the competition. Compression produces a noticeably muddier and less dynamic sound. Runs on an internal 9VDC battery, external 5- 15VDC, or our AC125 power supply. FM10C Tunable FM Stereo Transmitter Kit $44.95 AC125 110VAC Power Supply for FM10C $9.95 800-446-2295
Get The Catalog! Where ✦ Build It! Get the latest 2008 Ramsey Hobby 590 Fishers Station Drive Electronics ✦ Learn It! Catalog! 112 value packed pages of Victor, NY 14564 Always Means ✦ Achieve It! the neatest goodies around with lots of (800) 446-2295 Holiday Fun! (585) 924-4560 ✦ Enjoy It! new stuff! Order yours today on line Prices, availability, and specifications are subject to change. According to Robin, we’re not responsible for typos, mistakes, stupids, and over indulgence of holiday spirits, and she writes the or give us a call... Or download the PDF at rules! Visit www.ramseykits.com for the latest pricing, specials, terms and conditions. www.ramseykits.com/catalog! Copyright 2008 Ramsey Electronics, LLC... so there! Stamp-Nov-edited.qxd 10/7/2008 9:58 AM Page 22
STAMPAPPLICATIONS PUTTING THE SPOTLIGHT ON BASIC STAMP PROJECTS, HINTS & TIPS ■ BY JON WILLIAMS SX/B 2.0 About four years ago, Ken Gracey — the crazy cat who runs Parallax — decided that it would be a goodWWW.GiURUMELE.Hi2.RO idea to provide a free BASIC language compiler for the SX microcontroller family. The BASIC Stamp had been around for some time and there were a lot of power users — myself included — that would benefit WWW.RADiOSCAMATORUL.Hi2.ROfrom such a beast. The goals were pretty simple: Make it PBASIC-like (though not necessarily source compatible), easy to use in the SX-Key IDE, and allow it to be a useful learning tool for those wanting to explore Assembly language (the dark side!).
ou know what? It all happened. SX/B is quite a lot like surprising to the new SX/B user than to “run out of YPBASIC which makes the transition from Stamps to variable space” after reading the SX datasheet and the SX fairly straightforward. It has been integrated right knowing how much RAM exists. into the SX-Key IDE so you have a choice between Part of the problem — and I’m partially responsible Assembly and BASIC, and it uses a single-pass, compile-in- for this — is that many of us declare a set of temporary place strategy that allows us to see how every line of SX/B variables for use in subroutines and functions. These code is translated into Assembly language. And given temporary variables eat into those 19 bytes of general- Parallax’s great relationship with its customers, SX/B has purpose RAM. In SX/B 2.0, we can define a [memory] steadily grown considerably, becoming a very useful tool stack that allows subroutines and functions to have local, for hobbyists and professionals alike. temporary variables, i.e., they’re only used during the Of course, many will rightfully point out that I’m a execution of the subroutine or function and do not little biased as I was working for Ken at the time and am consume any of the general-purpose RAM space. one of the three amigos responsible for SX/B. That said, To use locals, we need to declare a stack; in the SX28, now that I don’t work for Parallax I’m free to use anything that declaration will look like this: I want. Trust me, I’ve tried a bunch of neat chips and yet I still go back to the SX and do my coding in SX/B (with DEVICE SX28, OSCTX2, BOR42 FREQ 20_000_000 Assembly sprinkled in where it’s useful). You can too. STACK 16 Listen, for the price of a BASIC compiler for another chip you can buy yourself an SX-Key, an SX protoboard, and a very nice meal for yourself and a friend. For the SX28, the maximum stack size is 16. For the The latest incarnation of SX/B is 2.0 and it has a SX48, the stack can be as big as you like within the whole host of nice updates and improvements, but two practical limits of the RAM. In case I wasn’t clear, this really big ones that we’ll explore here: improved variables chunk of RAM is used as needed and recovered when a use and task management. subroutine or function is terminated. Something to keep in mind: If a subroutine calls LOCAL VARIABLES another and both are using local variables, we need to ensure that the stack is big enough to handle the The SX — like many chips of similar design — uses a requirements of both. Let’s say that subroutine A uses banked memory architecture which means that the three bytes of stack space and subroutine B uses four program has access to global variables (much of this bytes of stack space. If subroutine A calls subroutine B, consumed by I/O and system variables) plus one bank of then we will need a stack of at least seven bytes. If RAM 16 bytes. In the end, this means that the SX28 — the is tight in your project, you can analyze stack use and set device most of us will tend to use — allows SX/B just 19 it as required; if not, use 16 (for the SX28) and you’ll bytes of general-purpose RAM that we can use without probably never have to worry about it. having to do anything special. There’s nothing more Declaring local variables is just like regular program 22 November 2008 Stamp-Nov-edited.qxd 10/7/2008 9:58 AM Page 23
STAMP APPLICATIONS
variables except that it happens within the bounds of the array, and then restored before the subroutine terminates. subroutine, function, or task (more on tasks in a minute). In addition to local variables, SX/B 2.0 has some As with regular program variables, we can define bits, interesting memory management features — some bytes, arrays of bytes, and words. For example: specifically targeting advanced users who may have used Assembly in the past and are accustomed to very flexible ‘ Use: PRINT_STARS count memory manipulation. For example, arrays in the SX28 are ‘ — prints “count” stars (*) no longer limited to 16 bytes. We can also force an array SUB PRINT_STARS to be aligned with the beginning of a bank by using the starCnt VAR Byte ALIGN modifier with the array declaration. One of the nice new features of SX/B 2.0 is that it includes a very starCnt = __PARAM1 detailed memory use map at the end of the List file — this DO WHILE starCnt > 0 is quite handy. To be candid, most of our programs will TX_BYTE “*” WWW.GiURUMELE.Hi2.ROnot need or use SX/B’s advanced options, but it is nice to DEC starCnt have them as our programs — and our programming skills LOOP — become more complex and sophisticated. ENDSUB WWW.RADiOSCAMATORUL.Hi2.ROFor the PRINT_STARS subroutine, the user will pass a SX/B AS TASK MASTER byte value defining the number of asterisks to be printed via TX_BYTE. In the past, we would typically use one of The biggest and most involved update to SX/B 2.0 is our temporary variables — those that consume general- task management. Using tasks allows us to set up and purpose RAM — to hold this value. By defining a local schedule automated processes; these are like subroutine variable as we do above, we are using the stack and not but are called by a task scheduler instead of by us. For cutting into the general-purpose RAM space; this leaves example, let’s say we want to check a sensor every 100 more variable space for the main part of our program. As milliseconds no matter what else is going on in the you can see, this subroutine uses one byte from the stack. program. With tasks, we can do that pretty easily. Now, When the subroutine exits, that stack space will be restored this all sounds really neat and very cool and in fact it is; to the level it was when it entered the subroutine. that said, it takes a little bit of setup to get to this level A note of caution: Local variables cannot use the of automation. same name as normal program variables. The names of First things first. To use tasks, we must declare an local variables can be the same from one routine to interrupt. Task timing will be a derivative of the interrupt another, but I don’t recommend this; use unique names rate. As an example, we’ll create a simple interrupt that through your program to prevent ambiguity. There is one does nothing but allow us to run tasks with a base task noteworthy limitation with locals: Since the stack is an “tick” timing of one millisecond — we’d do it like this: array and array elements cannot be used as an index into another array, we cannot use a local variable as an array ‘ ======INTERRUPT 1_000 index. A simple solution is to create a variable in the ‘ ======general-purpose RAM space that will be used for array indexing. We can save the value of that variable when Mark_ISR: coming into a subroutine and then restore it on the way isrFlag = 1 out. For example: Schedule_Tasks: TASKS RUN, 1 ‘ Use: PRINT_BUF count ‘ — prints “count” characters from buffer() RETURNINT SUB PRINT_STARS bCount VAR Byte Here we’ve set the interrupt to run every millisecond bChar VAR Byte and, as we have in the past, set a flag on entry for use by saveIdx VAR Byte external processes. The TASKS RUN section sets the task bCount = __PARAM1 tick timing to one interrupt cycle, so in this case a task saveIdx = idx tick will be one millisecond. Note that this does not actually launch any tasks; it simply sets up the FOR idx = 0 TO bCount mechanisms to handle any tasks we define. bChar = buffer(idx) TX_BYTE bChar Okay, how about an automated blinker; something we NEXT might have a use for as an annunciator in a factory process. Let’s say we want it to toggle its state every 250 idx = saveIdx milliseconds. As with subroutines and functions, we have ENDSUB to define the task name before using it: In this example, the global variable idx is saved to a local variable, is then used as an index into the buffer() blink_LED Task November 2008 23 Stamp-Nov-edited.qxd 10/7/2008 9:58 AM Page 24
Note that tasks do not take parameters. Now, in the running when its own timer expires and it needs to be main body of our program we can set up the task’s timing called again. Using tasks can be fun and save some and enable it: programming headaches but it does take a little time to get used to. Start easy by playing with the LED code. TASKS SET, 0, BLINK_LED, 250 That’s where we always start, right? With blinking LEDs. TASKS ENABLE Once you get used to that, you can start combining some of the new memory features with tasks. By using TASKS SET, we have assigned task slot zero For example: Let’s say we’d like an RTC without to BLINK_LED and it will run every 250 task ticks; in this adding a physical device like a DS1320 or DS1307. case, every 250 milliseconds. Finally, TASKS ENABLE Here’s a possible way of handling that. We’ll start by allows this task (and others if defined) to run. The task defining the clock variables: code itself looks very much like a subroutine except that it is blocked with TASK and ENDTASK: clock VAR Byte (4) WWW.GiURUMELE.Hi2.ROhuns VAR Byte @ clock(R_HUNS) secs VAR Byte @ clock(R_SECS) TASK BLINK_LED mins VAR Byte @ clock(R_MINS) IF alarmOn THEN hrs VAR Byte @ clock(R_HRS) TOGGLE AlarmLed WWW.RADiOSCAMATORUL.Hi2.ROELSE AlarmLed = IsOff Whoa, Neo, that’s a little different, isn’t it? The clock() ENDIF array is easy; what we’ve done though is create pointers ENDTASK into that array — technically these are just offsets and we could use them with another array altogether (that’s really I stated earlier that we can’t pass parameters to a task advanced and we’ll explore it in the future). By defining but SX/B does; with this we can do more than one thing the elements this way, we can tell SX/B to use the clock with a given task. We start by defining task slots that point variables and have access to the internals as if they were to the same task routine: regular variables instead of array elements. Here’s what I mean: TASKS SET, 0, BLINK_LED, 250 TASKS SET, 1, BLINK_LED, 100 ‘ Real-time BCD clock, hh:mm:ss.xx TASKS ENABLE ‘ — modifies: clock(); values stored as BCD ‘ — set task to run every 10 milliseconds
So, how do we know which slot called the task? The TASK BCD_RTC slot number will be passed to the task code in __PARAM1. BANK @clock Here’s an update to BLINK_LED that looks at the slot INC huns number that called it: huns = huns + $06 IF DC = 0 THEN TASK BLINK_LED huns = huns - $06 slot VAR __PARAM1 ENDIF IF huns <= $99 THEN RTC_Done IF slot = 0 THEN huns = $00
IF alarmOn THEN INC secs TOGGLE AlarmLed secs = secs + $06 ELSE IF DC = 0 THEN AlarmLed = IsOff secs = secs - $06 ENDIF ENDIF IF secs <= $59 THEN RTC_Done ELSEIF slot = 1 THEN secs = $00
IF sysReady THEN INC mins TOGGLE SystemLed mins = mins + $06 ELSE IF DC = 0 THEN SystemLed = IsOff mins = mins - $06 ENDIF ENDIF IF mins <= $59 THEN RTC_Done ENDIF mins = $00 ENDTASK INC hrs For clarity, I’ve aliased __PARAM1 as slot. A simple hrs = hrs + $06 IF DC = 0 THEN IF-THEN structure determines which LED to work with. hrs = hrs - $06 Note that the code is simple and we will want to keep ENDIF task code fairly trim. Interrupts still work and will, in fact, IF hours <= $23 THEN RTC_Done interrupt a task, but what we don’t want is for a task to be hrs = $00 24 November 2008 Stamp-Nov-edited.qxd 10/7/2008 9:58 AM Page 25
STAMP APPLICATIONS
RTC_Done: that in a future article. BANK ENDTASK NEW TEMPLATE — PLEASE USE IT This task is designed to be run every 10 milliseconds Finally, I have included an updated SX/B template and will update all of the registers in the software RTC. in the download file on the Nuts & Volts website at And, like the DS1302 and DS1307, it uses BCD (binary www.nutsvolts.com. Please install this in your SK-Key coded decimal) registers. Note that on entry there is a IDE templates folder. The new template is better BANK @clock instruction. This is telling SX/B to point to organized, especially with the location of the PROGRAM the clock bank instead of the default (general-purpose) Start directive. With tasks, the interrupt code grows RAM bank. What this means, then, is that we can treat the quite a bit and by moving SX/B’s internal start-up clock variables like regular variables. That said, we cannot code (which is placed at PROGRAM Start) after the use regular program variables hereWWW.GiURUMELE.Hi2.RO without aliasing them subroutine, function, and tasks declarations we are (with the __RAM() array). less likely to have those declarations pushed out of the I’m always on the hunt for neat tricks and this task lower half of the code page — a situation that will cause uses one that helps us to create a BCD RTC (say that an error WWW.RADiOSCAMATORUL.Hi2.ROthree time, very fast). Why BCD? Well, it lets you move I know we’ve just scratched the surface of these the values to displays without the use of decimal division topics but this is still some pretty powerful stuff. In the which can, in fact, chew up a fair bit of code space. coming months, we will continue to explore and exploit If you look at the BCD_RTC task code, it is built of SX/B’s cool new features. As ever, I encourage you to four identical sections, so we’ll just look at the hundredths play, and if you’re willing, participate! SX/B 2.0 is what it register. The first part is easy: We use INC to bump the is because Parallax and compiler engineer, Terry Hitt, are value by one. What we want to check for now is if the open to making it better for all of us. You, too, can have lower nibble of the register moved from $9 to $A (10). a say in what comes next. How many products do you There are many ways to do this but an elegant solution is get to do that with? to add six to the register. Here’s why this is cool: If the lower nibble does now contain $A then adding six will GO FORTH AND BE PROSPEROUS cause the lower nibble to become zero and the upper nibble to be incremented by one ($A + $6 = $10). This An interesting thing happened with a few of my is exactly what we want. There is a bit in the SX’s status recent columns. I have been contacted by some readers register called DC (digit carry). After adding six to the vis-à-vis quasi-commercial ventures with the project register, we’ll have a look at the DC flag. If this flag is not designs. A gentleman named Andrew wanted to provide a set (1), then there was no carry between nibbles and we kit based on the VEX decoder article (see Resources), need to remove the six we just added. another suggested a commercial version of the Brake At first blush, this may seem like a bit of work but Light Buddy, albeit with some enhanced features, and yet it is, in fact, the most efficient method I’ve found for another guy thought he’d do a bulk-buy to save himself incrementing a BCD register. After the increment and and others a little “scratch” on the BLB PCB. digit-carry checks, we examine the register to see if it has For the record, if you think you can make money or reached its limit. If not, now the task exits. Otherwise, the help others with what you’ve learned from my articles register will be reset and the code drops through to the and the code/files that I provide for them, God bless you next register update/check. There is a critical step in this and please go forward. Just understand that beyond these task at the very end — note the lone BANK instruction. articles — which I absolutely love doing, especially when This causes SX/B to point back to the default RAM bank. I hear your success stories — I can’t be involved; my time We need to do this for the rest of the program to operate is just too limited. I hope this doesn’t seem harsh or correctly. One last note on the clock() array. unkind, and I do appreciate your understanding. If we’re not pointing to the clock bank as above, then Until next time, then, Happy Stamping! — SX/B 2.0 we need to access values though the array itself, like this: style. NV
IF clock(R_SECS) = $10 THEN TASKS STOP, 1 ENDIF JON WILLIAMS [email protected]
With this little bit of code, the RTC task will be PARALLAX, INC. stopped when the clock seconds register reaches $10. www.parallax.com Note how we’ve created a constant called R_SECS that RESOURCES makes using the clock() array obvious; obvious is always VEX DECODER PCB / KIT good. We can also suspend a task which allows it to www.m-re.com/VEX-Decoder restart after a pre-determined break; we’ll get into November 2008 25 Page 26.qxd 10/8/2008 7:48 PM Page 26
Interface a sharp LCD display to your BASIC Stamp® or other micro-controller project with ease. No-solder wiring harnesses and easy mounting kits available too. See www.seetron.com today.
• 3.2 x 1.4 in. supertwist LCD • 2400/9600 baud serial BPI-216N • Low (≈2mA) current draw • Great with BASIC Stamps®
• 3.2 x 2 in. backlit LCD • 1200-9600 baud serial ILM-216L • Advanced protocol, 4 switch inputs • EEPROM for configuration settings WWW.GiURUMELE.Hi2.RO• Favorite for OEM applications
• 3.2 x 1.4 in. graphics LCD SGX-120L • 2400/9600 baud serial • Font and 15 screens in EEPROM WWW.RADiOSCAMATORUL.Hi2.RO• Easily draw points, lines, screens • 3 x 2 in. supertwist LCD • 1200-9600 baud serial TRM-425L • ESD-protected, 4x4 keypad input • Store up to 95 screens in EEPROM
1939 S. Frontage Rd. #F, Sierra Vista, AZ 85635 phone 520-459-4802 • fax 520-459-0623 www.seetron.com • [email protected]
5 reflectance sensors on underside
battery charger piezo buzzer connector Item #975 $99.95 4 AAA batteries 30:1 micro (not included) metal The Pololu 3pi robot is a high-performance, compact gearmotors mobile platform featuring:
* Two metal gearmotors * High-traction silicone tires * Five reflectance sensors * Speeds exceeding 3 ft/sec * 8×2 character LCD using innovative constant- optional * Three user pushbuttons voltage motor supply power LED ISP * Buzzer and LEDs programming All peripherals are connected to an ATmega168 connector microcontroller running at 20 MHz, with free C-programming push-on/push-off tools, libraries, and support for the Arduino environment. power button reset removable 8x2 button character LCD
user pushbuttons robot diameter is 3π cm (~3.7 inches) Find out more at www.pololu.com/3pi or by calling 1-877-7-POLOLU.
26 November 2008 Full Page.qxd 10/7/2008 10:29 AM Page 27
WWW.GiURUMELE.Hi2.RO WWW.RADiOSCAMATORUL.Hi2.RO Q&A-edited.qxd 10/7/2008 1:41 PM Page 28
& WHAT’S UP: Q A Join us as we delve into the basics of electronics as applied ■ WITH RUSSELL KINCAID to every day problems, like: In this column, I answer questions about all ✓ aspects of electronics, including computer ● High Current LED Driver hardware, software, circuits, electronic theory, troubleshooting, and anything else of interest ●✓ Dimmer for 12 VDC Lamps to the hobbyist. Feel freeWWW.GiURUMELE.Hi2.RO to participate with your questions, comments, or suggestions. ●✓ Device to Scare Away Animals Send all questions and comments to: [email protected] Current Source for Battery be C/10 for the cell being charged Device to Scare Away Animals Charger but for two amps, the resistor, R1, is one ohm and R3 is 39 ohms. The In my garden, deer are I want to build a battery FCX718 will overheat at two amps, nipping flowers and buds, charger using the DS2714 so substitute 2SB1412 for current so I need a device which and I am having a problem over one amp or for higher reliability Qcan safely frighten them Qdesigning a suitable power at one amp. Allied lists the Fenwal away. I am thinking about a device supply. Their spec sheet (http://data thermistors but have none in stock. that will play sound for five to 10 sheets.maximic.com/en/ds/DS2714. However, Mouser part number seconds. The stored sound (could be pdf) calls for a current limited source 871-B57540G103F is very close to a dog barking or a human voice) of 2A. What would be a suitable the Semitec curve. Any thermistor should not be the same all the time voltage for the power supply and having a β near 3480 will work. or the deer will get used to it. Would how is the current limit implemented? it be possible to use a memory card Also, I am having trouble High Current LED Driver into which I could record sounds? sourcing the thermistor (Semitec, The means for starting could be a Fenwal) specified; are there I want to build an LED switch and string, photocells, sound, substitutes available from other driver that can drive a large heat, or movement sensors. manufacturers? number of LEDs from a — Ebbe Normark Sorensen — Jack Botner QPWM signal. I want to use Denmark a TTL level PWM signal from a The circuit in Figure 1 will small microcontroller that I am ■ do the job. The diode, using as the dimming control. It FIGURE 2 D1, is to temperature works fine for a single LED but now Acompensate the Vbe of the I want to scale it up to use a 12 transistor. I believe the current should VDC supply that can handle 150 white LEDs. I plan to have three LEDs in series (~3.5V @ 20 mA) ■ FIGURE 1 which would require about one amp of current switched at around 100 Hz. Thanks in advance for your help. — Michael Gerstweiler
You need a logic level MOSFET that is capable of switching one amp Asuch as the FQPF30N06L rated 60V @ 22A. You will have 50 parallel strings with 75 ohms in series with each; see Figure 2. 28 November 2008 Q&A-edited.qxd 10/8/2008 2:56 PM Page 29
QUESTIONS & ANSWERS
■ FIGURE4
WWW.GiURUMELE.Hi2.RO
WWW.RADiOSCAMATORUL.Hi2.ROHere is a simple solution: Go to a ■ FIGURE 3 greeting card store Aand buy a card with sound. Some of them allow you to record your own message, so you can put the dog barking or whatever you want on it and change it periodically. You will need an amplifier and outdoor speaker to make it loud enough to scare the deer. To activate the unit, you could hack an outdoor security light and in addition to turning on the light, turn on the sound generator. Figure 3 is an example of that, but if you want to operate from a battery, consider the STL12LV proximity detector and the circuit of Figure 4. The STL12LV costs ■ FIGURE 5 nearly $100 but all you have to do is connect it to power (12 volts AC or DC) and replace the sound generator switch with the STL12LV output switch. It is available from www.residential-landscape-lighting-design.com. An audio amp kit from Qkits will provide enough power; two watts with eight ohm speaker and 12 volt DC supply: http:// store.qkits.com/moreinfo.cfm/FK602. The speaker is eight ohms, 7.5 watts, outdoor, Bogen #SP58A, available from www.truedataonline.com/index.asp ?file=preBuilt&preBuiltSearchID=27816&sort=50& headerImage=. Figure 5 is the greeting card electronics. After removing the switch, the mounting pad will be the positive supply pad. It is not necessary to remove the batteries but if you do, the negative supply pad will be under the last one. The VSS pad and adjacent test point can be jumped to make the recording play only once. I was intrigued by this idea enough to build one for myself to keep deer and raccoons from my apple trees. I used the configuration of Figure 3, keeping in mind that the circuit is directly connected to the 120 VAC power and is lethal. For the transformer, T2, I used a small power November 2008 29 Q&A-edited.qxd 10/7/2008 1:41 PM Page 30
type with two 15 volt ■ FIGURE 6 windings to give a 1:1 ratio. A 240/24 volt transformer should work also. It is all in a securely fastened plastic box. Also, because the mains voltage in the US is 120 VAC, the resistor R4 is 620 ohms, 5W. Dimmer for 12 VDC WWW.GiURUMELE.Hi2.ROLamps I have a small pop-up camper with two sets of WWW.RADiOSCAMATORUL.Hi2.ROQdual lamp light Last month, Figures 6 and 7 (solar power supply) were inadvertently left out of the layout. They fixtures in it. There is only a single are reprinted here for your convenience and are also available at www.nutsvolts.com. on/off switch. I would like to build a couple of dimmers for these fixtures. I 90 VOLT SUPPLY PARTS LIST ■ FIGURE 7; October ’08 issue think I can do this the easiest with a circuit similar to a switching power PART DESCRIPTION P/N SUPPLIER supply. What are your thoughts and ■ IC1 NE556 dual timer 595-NE556N Mouser ■ IC2 LM393 dual comparator 511-LM393N Mouser ideas for a circuit? ■ Q1 NMOS, 100V, 0.45A, logic level 522-ZVN4210A Mouser — Tom Bohacek ■ D1 400V, 1A, 50 ns, DO-41 821-1N4936 Mouser ■ LED1 Red 156954 Jameco ■ R1 13.3K, 1/8W, 1% 270-13.3K-RC Mouser It is only necessary to chop ■ R2 1.0K, 1/8W, 1% 270-1K-RC Mouser the 12 volts; 12 volt lamps ■ R3 6.81K, 1/8W, 1% 270-6.81K-RC Mouser are normally 40 watts and ■ Ω R4 100 , 1/8W, 1% 270-100-RC Mouser there are two of them so ■ R5 10Ω, 1/8W, 5% 270-10-RC Mouser A ■ R6 1M, 1/8W, 1% 270-1.0M-RC Mouser the current to be chopped is: I = P/E ■ R7 10K, 1/8W, 1% 270-10K-RC Mouser = 80/12 = 6.7 amps. A 556 IC driving ■ R8 10K trimpot 652-3296Y-1-103LF Mouser a MOSFET is the circuit; see Figure 6. ■ C1, C2 1,000 pF, 50V, NPO 81-RPE5C1H102J2P1A03 Mouser ■ C3 0.1 µF, 50V, X7R 81RPER71H104K2P1A03 Mouser The frequency only needs to be high ■ C4 0.1 µF, 200V, film 80-R821C3100DQ60J Mouser enough that you don’t see the flicker, ■T1 Core F-42510-EC Magnetics so 100 Hz will work. The first 555 ■T1 Bobbin B2510-10 Magnetics ■ Battery 6V gel cell, 1.3 Ah 632-GH613 Mouser is an astable and provides the ■ Solar Panel 4.5V/90 mA, 2 3/8” square PWR1241 BG Micro frequency. The second 555 is a one
■ FIGURE 6; October ’08 issue
30 November 2008 Q&A-edited.qxd 10/7/2008 1:42 PM Page 31
QUESTIONS & ANSWERS
shot triggered by the first and has a get close to 100% duty cycle, but if becomes 50% because it is triggered pot to vary the pulse time. You can you exceed it, the duty cycle every other pulse.. NV MAILBAG lazy. A full circle draws easily but 762-LH2540T nor do they have a partially dashed would be time LH2540T. So, what is the correct part Dear Russell, consuming. I don’t have a library of # for the solid-state relay, in Figure 1? In your Q&A column about trans- tubes and do not plan to have one. — Paul Bergsman, N3PSO former design, get a copy of COYNE TELEVISION and RADIO HANDBOOK. Dear Russell, I got my Nuts & Volts today and I see This old book has some good I just got my September issue of your problem. The 762-LH1540T is a information on transformer design and Nuts & Volts. Your circuit in Figure 1 solid-state relay, 350 VAC, 120 mA rat- has copper wire tables. I have seen this on page 24 is very interesting. ing in a six pin DIP package, apparently book on eBay for about $10 and willWWW.GiURUMELE.Hi2.ROBut, Mouser has no 762-LH2540T no longer stocked by Mouser. An equal make transformer building easy. part. Datasheetarchives has no substitute is: 849-LCB110S, $2.71 ea. — Edwin Fitzpatrick, W8MFS WWW.RADiOSCAMATORUL.Hi2.ROThanks for the info, Ed, I will have to check it out.
Dear Russell, On page 29 of the August issue, you answered a question about building a vacuum tube version of a solid-state audio amplifier. The tubes were drawn wrong. When I was just getting into electronics almost every- thing was tubes. At that time, when a dual tube was used, both sides of the tube had the same V designation, and the symbols had partially dashed or sometimes open enclosures. Has this practice been abandoned, or is it now personal preference? Thanks for listening to my rant! — Paul Baxter
You are absolutely right, I was just
6ISIT /UR 7EBSITE !T HTTPWWWELEXPCOM