NUTS and VOLTS Message Code: We Can Use the Same Sendchar Function to Arbitrarily Set the Cursor Position
Total Page:16
File Type:pdf, Size:1020Kb
WWW.GiURUMELE.Hi2.RO WWW.RADiOSCAMATORUL.Hi2.RO > 11 $7.00 CANADA $5.50 74470 89295 03 U.S. Cover.qxd 10/8/2008 7:10 PM Page 1 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 SB70 WWW.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 loadWWW.RADiOSCAMATORUL.Hi2.RO 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.