You are on page 1of 108

Cover.

qxd 6/8/2006 5:25 PM Page 108

Vol. 27 No. 7
NUTS & VOLTS
What can you do with eight 32-bit processors (COGs) in one chip? Real simultaneous multi-processing! The
new Propeller chip is the result of our internal design team working for eight years. The Propeller chip was
designed at the transistor level by schematic using our own tools to prototype the product. The Propeller is
programmed in both a high-level language, called SpinTM, and low-level (assembly) language. With the set
of pre-built Parallax “objects” for video, mice, keyboards, RF, LCDs, stepper motors and sensors your Propeller
application is a matter of high-level integration. Propeller represents the first custom all-silicon product
designed by Parallax. The Propeller is recommended for those with previous microcontroller experience.

Propeller Chip Specifications


Power Requirements 3.3 volts DC
External Clock Speed DC to 80 MHz (4 MHz to 8 MHz with Clock PLL running)

LONG-RANGE STEREO MICROPHONES • MODEL TRAINSAVER • HEATSINKS


Internal RC Oscillator 12 MHz or 20 KHz
System Clock Speed DC to 80 MHz
Global RAM/ROM 64 K bytes; 32K RAM / 32 K ROM
Processor RAM 2 K bytes each (512 longs)
RAM/ROM Organization 32 bits (4 bytes or 1 long)
I/O Pins 32
Current Source/Sink per I/O 50 mA

Propeller users have already been hard at work developing Objects for the Propeller Object Library and discussing
Propeller programming on our online forums. To join in visit www.parallax.com/propeller.

Propeller Chips Stock Code Price


P8X32A-D40 (40-Pin DIP) Chip #P8X32A-D40 $25.00
P8X32A-Q44 (44-Pin QFP) Chip #P8X32A-Q44 $25.00
P8X32A-M44 (44-Pin QFN) Chip #P8X32A-M44 $25.00
Propeller Tools Stock Code Price
Propeller Demo Board #32100 $129.95
PropSTICK Kit #32310 $79.95
Propeller Accessories Kit #32311 $99.00

To order online visit www.parallax.com/propeller. To order by telephone call the Parallax Sales Department
toll-free at 888-512-1024 (Monday-Friday, 7 a.m. to 5 p.m., Pacific Time).
July 2006

0 74470 89295 3
CoverInside.qxd 6/6/2006 1:01 PM Page 2

C i rcuitSpecialists.com C i rcuitSpecialists.com C i rcuitSpecialists.com


ESD Safe CPU Controlled
Controlled SMD Hot Air Rework Station
Station 2.9GHz RF Field Str
Strength
ength Analyzer
Fantastic Low
The heater and air control system are The 3290 is a high quality hand-held Price:
built-in and adjusted by the simple touch RF Field Strength Analyzer with wide $1899.00!
of the front keypad for precise settings. band reception ranging from 100kHz
Temperature range is from 100°C to •WFM/NFM/AM/SSB modulated signals may
to 2900MHz.The 3290 is a compact & be measured.
480°C / 212°F to 896°F, and the entire lightweight portable analyzer & is a •Signal Levels up to 160Channels can be
unit will enter a temperature drop state must for RF Technicians. Ideal for displayed simulaneously on the LCD
after 15 minutes of non-use for safety and testing, installing & maintenance of •PLL tuning system for precise frequency
Mobile Telephone Comm systems, measurement and tuning
to eliminate excessive wear. •Built-in Frequency Counter
Item# CSI825A++ Only Cellular Phones,Cordless phones, pag-
•LED Backlight LCD (192x192 dots)
•CPU Controlled $199.00! ing systems, cable & Satellite TV as
•Built-in Vacuum System •All fuctions are menu selected.
well as antenna installations.May also •RS232C with software for PC & printer
•Temperature Range:100°C to 480°C / 212°F to 896°F be used to locate hidden cameras using
•15-Minute Stand-By temperature "sleep" mode interface
•Power:110/120 VAC, 320 W maximum RF transmissions. •Built-in speaker (Includes Antenna)
Item# 3290
Details at Web Site > Soldering Equipment & Supplies Details at Web Site > Test Equipment > RF Test Equipment

Butane Por table Soldering Iron


Iron & Kit
Br eadboard / Power Supply / •Electronic Instant Ignition System
MultiFunction DMM Bundle •Naked Flame Burner: Temp to
1300°C/2370°F
Provides the user with a quick and efficient •Flameless Burner: up to 400°C/750°F
system for breadboarding electronic circuits.
•Equipped with U.S.CPSC Approval
Comes with three built-in regulated power Child Safety Standard
supplies along with a deluxe, easy-to-use •Electronic Instant Ignition System
breadboard. Included is a multifunction DMM Two-Piece Iron comes •Naked Flame Welding: Temp to
with Solder Tip. 1300°C/2370°F
with 100VDC, 750VAC, frequency, resist- •Soldering Temp: up to 500°C/930°F RK3124:
ance, diode test, audible continuity, transistor RK3212 Solder Iron
RK3212: RK3124 Solder Kit
•Heat Shrinking: up to 500°C/930°F
check,temperature, and capacitance. $14.95 •Hot cutting of plastic sheets or plates $34.00
A Super Deal! Details at Web Site > Soldering Equipment & Supplies > Soldering Irons
Details at Web Site
> Breadboards & Prototyping Boards
Only 20MHz Dual Trace Oscilloscope
Powered
Powered Breadboard
Breadboard w/out DMM: $69.00 $69.99! •20MHz Bandwidth
Item#: PBB-272DMM BUNDLE: $69.99! •Alt-Mag sweep for simultaneous display of
main and X5 magnified trace
Powered Breadboard w/Multifunction DMM (CSIMS8264) •1mV/Div Vertical sensitivity
You Get The DMM for an Extra $.99 •Alternate trigger for a stable display of unre
lated signals
•Multi-level trigger
•X5 Sweep Magnification Item# PROTEK 6502
Digital Storage Oscilloscope Module
Details at Web Site $279.00!
Convert any PC with USB interface to a high > Test Equipment > Oscilloscopes/Outstanding prices
performance Digital Storage Oscilloscope.
This is a sophisticated PC basedscope adaptor 2MHz Sweep Function Generator
providing performance compatible to
mid/high level stand alone products costing •0.02Hz-2MHz(7 Ranges)
much more! Comes with two probes. •Sine,Triangle,Square,Pulse,Ramp, Slewed Sine Waveform
•Sync. Out (TTL Square Waveform)
Details & Software Price •Accuracy: ±5% of Full Scale to 200KHz,
Download at Web Site Breakthrough! ±8% of Full Scale from 200KHz-2MHz
> Test Equipment > Oscilloscopes/Outstanding Prices
•Sweep Function
•VCG Input Item# PROTEK 9205
PC based Digital Storage Oscilloscope, Special
200MHz 5GS/s equiv. sampling USB
interface
Item# 200DSO Only$749.00 Details at Web Site $139.00!
> Test Equipment > Function Generators Any Quantity
Any Quantity

SONY Super HAD CCD Color


SONY Intelligent DMM w/ RS-232
Weatherproof
eatherproof IR Cameras Super HAD •3999 Counts and 38 Segment Bar Graph Item# CSI345
•Day & Night Auto Switch CCD™ equipped •Dual Display (digits & bar graph)
SALE
•Signal System: NTSC •Capacitance Function, Transistor & Diode Test $29.95
•Image Sensor: 1/3" SONY Super HAD CCD camera’s feature dra-
matically improved •Frequency Range & Temperature
•Horizontal Resolution: 480TV lines
•Min. Illumination: 0Lux light sensitivity •RS232C Standard Interface Details at Web Site
4 8 0n e s •Data Hold
i > Test Equipment > Digital Multimeters/World Beater Prices
T V oLl u t i o n Item# VC-827D: $132.00
R e s

SONY Super HAD CCD B/W SONY Super HAD SONY Super HAD CCD Color
Weatherproof
eatherproof IR Camera CCD Color Camera Weatherproof
eatherproof IR Camera
•Day & Night Auto Switch •Weather Proof •Day & Night Auto Switch
•Signal System: EIA •Signal System: NTSC •Signal System: NTSC
•Image Sensor: 1/3" SONY Super HAD CCD •Image Sensor: 1/4" SONY Super HAD CCD •Image Sensor: 1/4" SONY Super
•Horizontal Resolution: 420TV lines •Horizontal Resolution: 420TV lines HAD CCD
•Min. Illumination: 0Lux •Min. Illumination: 1Lux/F1.2 •Horizontal Resolution: 420TV lines
Item# VC-317D: $59.50 •Min. Illumination: 0Lux
Item# VC-805: $53.95
Details at Web Site > Miniature Cameras(Board,Bullet,Mini’s, B/W, Color) Item# VC-819D: $62.50

Visit our website for a complete listing of our offers. We have over 8,000 electronic items on line @ www.CircuitSpecialists.com. PC based data acquisition,
industrial computers, loads of test equipment, optics, I.C’s, transistors, diodes, resistors, potentiometers, motion control products, capacitors,miniature observation
cameras, panel meters, chemicals for electronics, do it yourself printed circuit supplies for PCB fabrication, educational D.I.Y. kits, cooling fans, heat shrink, cable
ties & other wire handleing items, hand tools for electronics, breadboards, trainers, programmers & much much more! Some Deals you won’t believe!
C i r c u i t S p e c i a l i s t s , I n c . 2 2 0 S . C o u n t r y C l u b D r. , M e s a , A Z 8 5 2 1 0
8 0 0 - 5 2 8 - 1 4 1 7 / 4 8 0 - 4 6 4 - 2 4 8 5 / FA X : 4 8 0 - 4 6 4 - 5 8 2 4
Full Page.qxd 6/6/2006 1:08 PM Page 3
TOCJul06.qxd 6/8/2006 5:00 PM Page 4

40 18

46 08

J U LY 2 0 0 6

PROJECTS
and FEATURES ON THE COVER ...
36 LONG-RANGE STEREO This easy-to-build microphone setup
MICROPHONES can bring more than just our furry
Listen to faraway sounds using and/or feathered friends close up
this easily built microphone/ and personal.
amplifier assembly.
■ By J. Ronald Eyton

40 CONTROL YOUR WORLD


Interface your PC to the CMUcam.
■ By Michael Simpson COLUMNS DEPARTMENTS
46 THE TRAINSAVER DIGITAL 08 TECHKNOWLEDGEY 2006
ELECTRONIC CONTROLLER Events, advances, and news 06 READER FEEDBACK
This device will reduce wear from the electronics world.
and tear on model train 12 Q&A 32 NEW PRODUCTS
locomotives. Serious questions are answered,
■ By Vern Graner a very cool NASA website, and 56 SHOWCASE
more phone busy stuff.
59 RADAR AND ELECTRONIC 18 GETTING STARTED WITH PICs 64 NEWS BYTES
WARFARE FUNDAMENTALS Developing with a PIC bootloader.
Learn basic concepts of radar
26 PERSONAL ROBOTICS 66 ELECTRO-NET
and see how EW develops
Design a Mini Sumo — Part 1.
from that.
■ By Gerard Fonte 96 CLASSIFIEDS
82 STAMP APPLICATIONS
A Tale of Two Props.
67 CHOOSING A HEATSINK 100 NV BOOKSTORE
86 NEAR SPACE
Learn the basic process to keep
The Geiger counter telescope —
the right components cool. Part 2. 102 TECH FORUM
■ By H. Ward Silver
90 THE DESIGN CYCLE 105 ADVERTISERS INDEX
74 UNDERSTANDING DIGITAL The easiest Internet protocol of all.
LOGIC ICs Nuts & Volts (ISSN 1528-9885/CDN Pub Agree#40702530) is published monthly for $24.95 per year
Part 1: Digital Logic IC Basics. by T & L Publications, Inc., 430 Princeland Court, Corona, CA 92879. PERIODICALS POSTAGE PAID AT
CORONA, CA AND AT ADDITIONAL MAILING OFFICES. POSTMASTER: Send address changes
■ By Ray Marston to Nuts & Volts, P.O. Box 15277, North Hollywood, CA 91615 or Station A, P.O. Box 54,Windsor
ON N9A 6J5; cpcreturns@nutsvolts.com

4 July 2006
Full Page.qxd 6/6/2006 1:48 PM Page 5

Link Instruments
PC-Based Test Equipment

Logic Analyzers
New LA-5000 Series
• 40 to 160 channels
• up to 500 MSa/s
• Variable Threshold
• 8 External Clocks
• 16 Level Triggering
• up to 512K samples/ch
• USB 2.0 and Parallel Interface
• Pattern Generator option

LA5240 (200MHz, 40CH) $1700 USB 2.0/Parallel


LA5280 (200MHz, 80CH) $2350 USB 2.0/Parallel
LA5540 (500MHz, 40CH) $2500 USB 2.0/Parallel
LA5580 (500MHz, 80CH) $3500 USB 2.0/Parallel
LA55160 (500MHz, 160CH) $7500 USB 2.0/Parallel

Small and portable LA-2124 $800


• Small, Lightweight and Portable • 24 Channel Logic Analyzer
• Only 4 oz and 4.75” x 2.75” x 1” • 100MSa/S max sample rate
• Parallel Port Interface to PC • Variable Threshold Voltage
• Trigger Out • Large 128k Buffer

Digital Oscilloscopes

• 2 Channel Digital Oscilloscope • Small, Lightweight, and Portable DSO-2102S $525


• 100 MSa/s max single shot rate • USB or Parallel Port interface DSO-2102M $650
• 32K samples per channel • Advanced Math DSO-2102S(USB) $600
• Advanced Triggering • FFT Spectrum Analyzer (option) DSO-2102M(USB) $725
• Only 9 oz and 6.3” x 3.75” x 1.25”

Link Instruments (973) 808-8990


17A Daniel Road East · Fairfield, NJ 07004 · Fax (973) 808-8786

www.Link-instruments.com
July 2006 5
ReadFeed Pg 6 Jul06.qxd 6/7/2006 5:18 PM Page 6

READER FEEDBACK voltage to reach some convenient val-


EVERYTHING FOR ELECTRONICS

Published Monthly By
ue. Before the test, one is told to short- T & L Publications, Inc.
circuit the capacitor with a 1K resistor 430 Princeland Ct.
Corona, CA 92879-1300
CONSTANT SOURCE to ground. What ground? Just short-
(951) 371-8497
OF IRRITATION? circuit it. And it says the time can vary
from 0 to 60 seconds. But there is no FAX (951) 371-3052
I am writing about the Constant such limit. And in the example using a Product Order Line 1-800-783-4624
www.nutsvolts.com
Current Sources article in the May is- current of 1 mA, the math actually uses
sue. I assume you will get many letters a current of 10 mA, and if the correct 1 Subscriptions
about this one. I have seldom seen such mA were used, the time would be 100 Inside US 1-877-525-2539
messed up articles. When I showed it seconds, well over the above limit of 60. Outside US 1-818-487-4545
to my wife, the first thing she did was One final comment — the article P.O. Box 15277
check to see if it was an April issue! says digital storage oscilloscopes are North Hollywood, CA 91615
All the figures show voltmeters virtually the only scopes manufactured FOUNDER/ASSOCIATE PUBLISHER
with high and low leads — what is the today. That is news to me, as I seldom Jack Lemieux
significance of these? The text for see advertisements for them, but ads
Figure 4 belongs with Figure 5. I think for the ordinary scopes are common. PUBLISHER
Larry Lemieux
the text for Figure 5 belongs to Figure Kenneth E. Stone publisher@nutsvolts.com
6. The circuitry in Figure 6 has Cherryvale, KS
nothing to do with potentiometers, ASSOCIATE PUBLISHER/
and there is no figure for them. The Writer Response: VP OF SALES/MARKETING
scope setup sounds complicated. In response to this letter that was Robin Lemieux
display@nutsvolts.com
In the part about measuring ca- critical of the May issue article on
pacitors, we find, "... the measured time constant current sources, thanks for CONTRIBUTING EDITORS
for the voltage across the capacitor to your reply. Yes, there was a piece of Chuck Hellebuyck TJ Byers
rise from zero to its rated value is pro- artwork that was inadvertently omitted Jeff Eckert Jon Williams
Peter Best Phil Davis
portional to the capacitance." The truth and this had a "displacement" effect Dave Prochnow Paul Verhage
is that the time for a rise to any partic- and adversely impacted subsequent Ray Marston Vern Graner
ular voltage is proportional to the ca- pieces of line art, as well as text, to Ward Silver Gerard Fonte
Ron Eyton Michael Simpson
pacitance. And the particular CCS used some degree, for which I apologize.
might not have a maximum voltage to As for the charging of a capacitor, CIRCULATION DIRECTOR
match the rated voltage of the capaci- the point that was to be made was that Tracy Kerley
subscribe@nutsvolts.com
tor. To do the test, I would use a a capacitor in an RC circuit charges log-
stopwatch and measure the time for the arithmically and after 5 tau (ô) or time SHOW COORDINATOR
Continued on page 98 Audrey Lemieux

WEB CONTENT/NV STORE


Michael Kaudze
sales@nutsvolts.com

PRODUCTION/GRAPHICS
Shannon Lemieux

ADMINISTRATIVE ASSISTANT
Debbie Stauffacher

Copyright © 2006 by T & L Publications, Inc.


All Rights Reserved

All advertising is subject to publisher's approval. We are not


responsible for mistakes, misprints, or typographical errors.
Nuts & Volts Magazine assumes no responsibility for the
availability or condition of advertised items or for the honesty
of the advertiser. The publisher makes no claims for the legal-
ity of any item advertised in Nuts & Volts. This is the sole
responsibility of the advertiser. Advertisers and their agencies
agree to indemnify and protect the publisher from any and all
claims, action, or expense arising from advertising placed in
Nuts & Volts. Please send all editorial correspondence, UPS,
by J. Shuman overnight mail, and artwork to: 430 Princeland Court, Corona,
CA 92879.
6 July 2006
Full Page.qxd 6/6/2006 1:51 PM Page 7

PIC12HV615/PIC16HV616
Closed Loop Fan Speed Control
The Microchip name and logo, the Microchip logo, MPLAB and PIC are registered trademarks of Microchip Technology Incorporated in the USA and in other countries. © 2006 Microchip Technology Incorporated. All rights reserved.

VDD
Internal shunt
regulator allows
12, 24, 48V
operation
Actual data of the PIC12HV615/PIC16HV616
Fan Control Solution — Closed Loop Response
Timer1 gate Hardware PWM Typical Solution —
feature enables output for half- and Open Loop Response
all-digital period full-bridge drive Motor
and duty cycle
Drive
PWM sensing PIC12HV615
Control Internal pull-up PIC16HV616
resistors reduce Hall

RPM
component count Direct Hall element Sensor
interface with built-in
comparator hysteresis
reduces component cost
Programmable control for
customizeable features
such as:
• PID control PWM Control Duty Cycle
• Alert output
• Tachometer output
• Temperature-based control
• Failure detect and retry

Advantages of the PIC® Microcontroller Fan Now available for purchase on....
Control Solution: microchip
• Meets or exceeds the latest industry specifications DIRECT
www.microchipdirect.com
• Provides closed loop linear control
Get started with
• Software-programmable dynamic response the MPLAB®
In-Circuit
• High level of integration provides simplicity and cost savings Debugger (ICD)
• Offers high voltage support with integrated shunt regulator 2 Module for
only $159.99
• User-enabled comparator for hysteresis direct interface with a

High Voltage Program 10-bit ADC


Support Memory (channels) Comparators Enhanced CCP* Internal Oscillator
PIC12F615 — 1.75 KB/1 Kw 4 1 Half bridge 8 MHz
PIC12HV615 Yes 1.75 KB/1 Kw 4 1 Half bridge 8 MHz
PIC16F616 — 3.5 KB/2 Kw 8 2 Full bridge 8 MHz
PIC16HV616 Yes 3.5 KB/2 Kw 8 2 Full bridge 8 MHz
* Capture, Compare, PWM

For fan control application notes, reference designs and related


code examples, visit www.microchip.com/fancontrol. Microchip
also offers a full line of stand-alone fan controllers and fan
fault detectors.

RoHS Compliant www.microchip.com/fancontrol

Microcontrollers • Digital Signal Controllers • Analog • Serial EEPROMs


Tech2006.qxd 6/6/2006 11:08 AM Page 8

TECH

2006
KNOWLEDGEY
EVENTS, ADVANCES, AND NEWS
■ BY JEFF ECKERT
ADVANCED TECHNOLOGY
SILICON DEVICE this considerably. The device can tion from the outer part. This implies
MODULATES LIGHT produce modulation in a distance of that when the disk — which is basically
only 80 micrometers, which is about a giant cloud of gas and dust — col-
PHOTO BY JENNIE TROWER.
a tenth of the distance required by lapses and forms planets, some of the
traditional silicon optical modulators. planets will orbit in opposite directions.
Once Chen’s devices are com- According to Anthony Remijan, of
bined with lasers on a silicon platform, the NRAO, “This is the first time any-
the chips could become a mainstay of one has seen anything like this, and it
consumer electronic devices, telecom- means that the process of forming
munication systems, biosensors, and planets from such disks is more com-
other devices, allowing higher speeds plex than we previously expected.”
and lower power consumption. The system was discovered
by Remijan and a colleague, Jan
■ Two voltage probes contacting RADIO TELESCOPE M. Hollis of NASA’s Goddard
the surface of the green silicon chip
with the photonic crystals where the SEES STRANGE SOLAR Space Flight Center (www.gsfc.nasa.
laser light’s transmission is slowed to SYSTEM FORMATION gov). The assumption is that
modulate it. this system contains material from two
different clouds instead of a single one.

F or many years, researchers have


been trying to figure out how to
use light in silicon chips because of its
At the top of the illustration, a
huge star-forming region is rotating in
the direction of the arrow. This region
ability to move thousands of times can give birth to multiple star systems.
faster than electrons in solid materials. The center image shows the inside of
It now appears that an electrical the star-forming region, which shows
engineer at the University of Texas at three protostars forming as the region
Austin (www.utexas.edu), backed up collapses. The process is chaotic
with the sponsorship of the Air Force enough to cause eddies, which allows
Research Lab (www.afrl.af.mil), has newly forming stars to rotate in differ-
figured out how to do it. ent directions. The bottom view
Professor Ray Chen and some grad shows one cloud collapsing into a
students have created a chip made of disk-like structure that rotates counter-
silicon “photonic crystals” whose com- clockwise in the center but siphons off
plex internal structure can reduce the material from a second, passing proto-
speed of laser light traveling through stellar cloud that rotates clockwise.
the chip such that a small electric cur- If you want to pay it a personal
rent can alter, or modulate, the pattern visit, just head out toward the constel-
of light transmission. The result is a chip PHOTO COURTESY OF BILL SAXTON, NRAO/AUI/NSF. lation Ophiuchus. The thing is about
that causes the light to blink on and off ■ Building a counter-rotating proto- 500 light-years from Earth, though, so
at different rates, or at least to change planetary disk. take a change of underwear.
in intensity, and the blinks could be
used to encode and transmit data.
In computers, the light-modulat- U sing the Very Large Array radio tel-
escope operated at the National
COMPUTERSAND
ing chips would primarily serve to Science Foundation’s National Radio NETWORKING
send information between a comput- Astronomy Observatory (www.nrao. NEW INTEL PROCESSORS
er’s microprocessors and its memory. edu), astronomers have discovered a ON THE WAY
According to Chen, more than 50 disk of material encircling a still-form-
percent of a Pentium 4’s power is
consumed by this interconnection,
and doing it optically could reduce
ing star within our galaxy. The interest-
ing thing is that the inner part of the
disk is rotating in the opposite direc-
F ormerly code-named Conroe and
Merom, Intel (www.intel.com) has
unified the brand name and introduced
8 July 2006
Tech2006.qxd 6/6/2006 11:08 AM Page 9

TECHKNOWLEDGEY 20 06

■ Intel’s Core™ 2 Duo inch (25 mm) thick and weighs popular blog site to go down for several
processors are slated only 6.8 lbs (2.54 kg). hours. In addition, a spammer somehow
for arrival in the third It features a 2.16 GHz Intel derived the addresses of Do Not Intrude
quarter of this year.
PHOTO COURTESY OF INTEL CORP.
Core Duo processor and an members and bombarded them with
improved architecture that is said threatening messages, which in part
the Core™ 2 Duo to provide five times the perform- read, “You are receiving this email
processors for desk- ance of the PowerBook® G4, a because you are a member of Blue
top and notebooks 667 MHz front-side bus that is four Security. Due to the tactics used by Blue
PCs, respectively. The times as fast as the G4, and 667 Security, you will end up receiving this
chips are based on a newly designed MHz DDR2 SDRAM memory message, or other nonsensical spams
microarchitecture and will include two (expandable to 2 GB) that is twice as 20-40 times more than you would
processing cores per chip (hence the fast. The suggested (and generally normally.” As of this writing, the Blue
“Duo” addition). Intel will also call its observed) retail price is $2799. website is up and running again but is
top-end processor, aimed at gamers and still having a few operational problems.
other high-performance applications, SPAM WAR REACHES On the positive side, a 20-year-old
the Intel® Core™ 2 Extreme processor. NEW LEVEL (Jeanson Ancheta, a member of the
According to Intel, these devices Botmaster Underground) who was
will be built on a 65-nanometer design
and manufacturing process technology
that shrinks a processor’s circuitry and
Y ou may be familiar with Blue
Security, Inc. (www.bluesecurity.
com), purveyors of the Blue Frog appli-
prosecuted for hijacking computers,
damaging computer networks, and
sending waves of spam and viruses
transistors, thus producing both higher cation. Blue Frog basically enables you was recently sentenced to 57 months
performance and energy efficiency. to place your email address in the in prison, ordered to pay $15,000 in
They will include what is billed as the company’s “Do Not Intrude” Registry damages, and fork over $60,000 in
industry’s largest integrated memory and download the Blue Frog illicit gains to the government.
reservoir, called the Intel Advanced application. Blue Frog actively fights In addition, a court recently
Smart Cache, which includes an spam by posting opt-out requests on ordered Sanford Wallace and his com-
improved design for faster perform- the sites advertised by spam. pany — Smartbot.Net — to turn loose of
ance in memory-intensive applications. Users may report spam from any $4,089,500 that it derived from a spy-
The basic idea is that having a desktop email client or let Blue Frog ware scam. Apparently, the Internet will
common microarchitecture for the automatically report Gmail, Hotmail, remain a dangerous place for a long
consumer, gaming, notebook, and and Yahoo! spam directly from a time, but sometimes you win a few.
business desktop market segments will browser. It will send up to 1,000
make it easier for computer develop-
ers to create more efficient software
opt-out messages to the same
advertiser, thereby making his life
CIRCUITS
applications and provide the ability to almost as miserable as yours. AND DEVICES
share capabilities across all categories. According to the company, six out SLIMMER CELL PHONE
of the 10 most active spammers have
17-INCH LAPTOP stopped sending things to the “blue
INTRODUCED community” of more than 500,000
users. Unfortunately, though, some of

W e may now be approaching a


point at which the average lap
isn’t big enough to support a “laptop”
the spammers, and in particular one
identified as “PharmaMaster,” have
decided to up the ante. Apparently,
computer, with 17-inch machines PharmaMaster was able to block Blue
becoming the norm and a few even Security’s former IP address at the
sporting 19-inch displays (although backbone routers, thus knocking out
giving you the same 1680 by 1050 the system for users located anywhere
pixels). One of the latest machines outside of Israel.
apparently designed He also some- PHOTO COURTESY OF SAMSUNG.

to make airline travel how engineered a ■ Samsung’s new X820 is billed as the
even more uncomfort- massive denial of world’s slimmest phone.
able is Apple’s new service attack on
17-inch version of the
MacBook Pro. But at
least it’s still only one
sites associated with
Blue, causing five
hosting providers in
I f you’re tired of people asking you, “Is
that a cell phone in your pocket or are
you glad to see me?” then you may be
the US and Canada, interested in Samsung’s X820, which is
■ Apple’s MacBook Pro
is now available in a major DNS only 6.9 mm (0.27 in) thick and weighs
a 17-inch version. provider, and a in at a mere 66 g (2.3 oz). It offers a
PHOTO COURTESY OF APPLE.
July 2006 9
Tech2006.qxd 6/6/2006 11:09 AM Page 10

INDUSTRY AND Document Format for Office


Applications (OpenDocument) v1.0,
Reportedly, the folks at Microsoft
— who have been pushing their own
THE PROFESSION has been designed to be used
as a default file format for office
version (Office Open XML) — is not
entirely pleased, even though it is a
OPENDOCUMENT
applications, with no increase in file sponsor of OASIS. Current members
STANDARD ADOPTED size or loss of data integrity. of OASIS committees focusing on

T he Joint Technical Committee 1 OpenDocument defines an open OpenDocument include representa-


on Information Technology of the XML file format that will allow users tives of Adobe, IBM, Intel, Novell,
International Standards Organization/ to save and exchange editable office Oracle, and Sun Microsystems, as
International Electrotechnical documents such as text documents well as government agencies and
Commission (ISO/IEC) recently (including memos, reports, and other organizations, such as the
approved a new standard that covers books), spreadsheets, databases, Chanfeng Open Standards Platform
the OpenDocument format as charts, and presentations, regardless Software Alliance in China, National
submitted by the Organization for of application or platform in which Informatics Center of the
the Advancement of Structured the files were created. This will facili- Government of India, Netherlands
Information Standards (OASIS, tate document contents’ access, Tax and Customs Administration,
www.oasis-open.org). The newly search, use, integration, and develop- Royal National Institute for the Blind,
approved ISO/IEC 26300, Open ment in new and innovative ways. and Duke University.

functional keypad and a beveled cut for HIGH-SPEED DATA portable to make it suitable for both field
a natural grip, and the case is made of RECORDER INTRODUCED and lab use, the unit supports recording
fiberglass-infused plastic for strength and up to eight channels of isolated inputs to
weight reduction. It also includes a two-
megapixel camera, Bluetooth, an MP3
player, and a 176 x 220 color display.
T he new Dash 8HF from Astro-
Med (www.astro-med.com) is
a ruggedized eight-
an internal hard drive at sample rates of
up to 2 MHz with a bandwidth of 200
kHz per channel.
You may have to wait a while to channel data recorder The Dash 8HF
get one, though. It will be marketed that was engineered includes a 250 GB inter-
first in Russia and later in Europe, but specifically for captur- nal hard drive and a DVD
the company hasn’t mentioned the ing high-frequency burner for storing and
introduction of a US version as of this data and transient sig- archiving data. Other
writing. The best you can do in this nals. Ruggedized and features include 10/100/
country is the model T509, available 1000BaseT Ethernet for
from T-Mobile. It’s a relatively plump ■ Astro-Med’s Dash data upload and a USB
8HF is a portable data
9.8 mm (0.39 in) thick. Details are recorder for field or -MED,
INC. 2.0 port for archiving data
O
STR
available at www.samsung.com OF A to external drives. Free Windows-
lab use. OUR
TESY
TO C
PHO based AstroVIEW X software allows
data to be imported to a PC for analysis
and review. Using AstroVIEW X, a user
can import data to popular spreadsheet
and analysis programs including Excel,
FlexPro, DADiSP, and MathCAD with a
simple conversion command.
The system is built into a 16 x
12.125 x 6.628 inch (approx. 41 x 31 x
17 cm) case and weighs less than 21
lbs (7.8 kg). Operating on either 120 or
240 VAC, the device includes a capaci-
tive backup to ensure proper shutdown
without data corruption if power is lost.
Primarily designed for applications
in the automotive, electric utility,
telecommunications, pulp and paper,
metals manufacturing, steel mills, med-
ical, and other industrial, scientific, and
educational fields, it will set you back a
mere $14,750. An optional high-securi-
ty version is available for defense and
aerospace applications. NV
10 July 2006
Full Page.qxd 6/6/2006 2:06 PM Page 11
Q&A.qxd 6/6/2006 11:11 AM Page 12

■ WITH TJ BYERS
QA & WHAT’S UP:
A collection of serious questions
that took time to research finally
appear this month, a very cool
NASA website, and more phone
busy stuff.

✓ DVD formats demystified.


In this column, I answer questions about all
aspects of electronics, including computer ●
✓ Oscilloscope probe selection.
hardware, software, circuits, electronic theory,
troubleshooting, and anything else of interest ●
to the hobbyist.
Feel free to participate with your questions, ✓ Current mirrors with experiment.

comments, or suggestions.
You can reach me at: TJBYERS@aol.com ✓ LDO PIC power supplies.

— Robert E. Smith DL. Here are the definitions of what
DVD FORMATS Fox River Grove, IL each means.
DEMYSTIFIED

A
There are two competing • R — Write once

Q
I have a Panasonic DVD DVD recording standards: • RW — Write/erase multiple times
recorder (model MDR-E50) DVD- and DVD+. Panasonic • DL — Dual layer
and I can’t figure out how to — along with Toshiba, Apple
make a recording. I mean, Computer, Hitachi, NEC, Pioneer, Sam- Write once is self-explanatory. You
which recording blank to use. I called sung, and Sharp — support the DVD- can write to the disc one time and one
Panasonic and they said to use -DVD format. The DVD+ format is supported time only. You can’t add stuff later or
from TDK. But I can’t figure out what by Philips, Sony, Hewlett-Packard, Dell, erase it. It’s now carved in stone. RW lets
that means. I’ve asked many sales per- Ricoh, Yamaha, and others. Sometimes you add to, write over, or erase the data
sons, and they don’t have a clue either. the two formats are interchangeable many times over (typically 1,000). Think
I will purchase a pack of 20 or more if between machines, sometimes not. of it as a big floppy. Dual layer means
I can be assured they are the right ones Both formats have extensions: you have two layers of recording media
for my recorder. How do they work and DVD-R, DVD-RW, DVD-RW DL, on a single side of the disc — almost dou-
how do you know which is which? DVD+RW, and DVD+R, DVD+RW bling the capacity from 4.7 GB to 7.95
GB. Then there are double-sided discs
Designation Write Multiple Layers/Sides Capacity (GB) DVD Forum No. where you can record on both sides —
like an LP record (if you can remember
DVD+R N Single/Single 4.7 DVD-5
that far back) — further increasing the
DVD+R N Single/Double 8.75 DVD-10 storage capacity. Currently, there is no
DVD+RW Y Single/Single 4.7 DVD-5 designation for double sides, only dual
layers. Still confused? Let your fingers do
DVD+RW Y Single/Double 8.75 DVD-10 the walking through Table 1.
DVD+R DL N Dual/Single 7.95 DVD-9
DVD+R DL N Dual/Double 15.9 DVD-18 ABOUT SCOPE PROBES

Q
DVD-R N Single/Single 4.7 DVD-5 Recently, I was given two
DVD-R N Single/Double 8.75 DVD-10 25-year-old Leader LBO-15A
DVD-RW Y Single/Single 4.7 DVD-5
oscilloscopes — dual-channel,
15 MHz. They both work.
DVD-RW Y Single/Double 8.75 DVD-10 Having never owned a scope, it would
DVD-R DL N Dual/Single 7.95 DVD-9 be nice to use them. However, neither
came with a probe and I don’t know
DVD-R DL N Dual/Double 15.9 DVD-18
much about selecting one.
■ TABLE 1. DVD Formats. — Frank Lemon
12 July 2006
Q&A.qxd 6/6/2006 11:11 AM Page 13

QU E ST I O N S & A N S W E R S

A
If I were you, I’d buy
10X Probe Oscilloscope Input
the 15085 TE scope
probe from Marlin P. 9M Coaxial Cable BNC
Jones & Assoc. (800- Probe
652-6733; www.mpja.com). It
has a bandwidth of 20 MHz and
sells for a low $7.95. (MPJA also 15pF 1M 50pF
sells scope probes going up to Compensation
200 MHz.) But that’s just the Adjustment
beginning. Unless you properly
compensate the probe, you will
be displaying the response of ■ FIGURE 1 Scope Probe
the probe itself and not your
circuit. Refer to Figures 1 and 2 for this five volts p-p.).
discussion.
The typical input impedance of an 4) Set the sweep rate to 1 ms/div.
oscilloscope — especially one of that
era — is 1 megohm with 50 pF to 100 5) Adjust the trimmer until the tops
pF. If you put this load across a and bottoms of the square wave are
high-frequency oscillator, not only will flat (Figure 2).
you shift the operating frequency with
the added parallel capacitance, but
you risk stalling oscillation altogether.
AUDIO AMP INPUT
Which is why selecting a good CONFUSION
scope probe is essential to accurate

Q
measurements. The October ‘04 issue
Most probes have an attenuation showed the details of a 700
factor of 10x. A 10x probe has the mW audio power amp using
effect of reducing capacitance by a an LM386. I noticed that your ■ FIGURE 2
factor of 10. The trade-off is that it also input to the amp is on pin 3 (positive

A
attenuates the signal by a factor of 10. input). When I looked at the National Look at the Equivalent
This means that 10 volts at the source Semiconductor datasheet, it shows an Schematic on page 1 of the
becomes one volt at the scope input. “AM Radio Power Amplifier” typical datasheet (Figure 3). You’ll
A 10x probe is made up of a 9 application where the input is on pin 2 see that the + and - inputs are
megohm resistor, a 15 pF trimmer (negative input). This is where I get con- mirror images of each other — mean-
capacitor, and a short length of fused — which is the proper input to use? ing they are interchangeable. What
coaxial cable (Figure 1). When added — George changes is the relationship of the input
to the 1 megohm resistance of
the scope, the probe tip reflects a ■ FIGURE 3
10 megohm load to ground. The
capacitance, on the other hand, is
subtractive, resulting in a reflected
load capacitance of 9 pF (with the
trimmer set to 11 pF).
The trimmer is used to compen-
sate for overshoot and undershoot
that is common when probing a
circuit. This is done in five steps:

1) Connect the probe tip to the scope


calibrator. (Most scopes provide a 1
kHz square wave calibrator output.)

2) Switch the channel input coupling


to DC.

3) Set the volts/div switch to 1V/div


(assuming the calibration voltage is
July 2006 13
Q&A.qxd 6/6/2006 11:11 AM Page 14

A
+V +V For all in- you have a bunch of LEDs you want to
tents and light, and you want them all to be the
purposes, same brightness. This is a challenge
the diode- for most applications because
connected BJT (bipo- the brightness of an LED is directly
Rbias Rload
lar junction transis- proportional to its current flow.
Q1 Q2
Iref Iload tor) and current Sure, you could string them in
mirror are consid- series, but that increases the voltage by
Iref Iload
ered one and the the forward drop of the LED multiplied
Q1 Q2 same. While this by the number of LEDs. That is, four red
Rbias Rload circuit arrangement LEDs in series need at least six volts;
is often glossed over four blue LEDs ups the ante to almost
in college courses, 20 volts. When you only have five volts
without it the op- to work with, a current mirror (Figure 5)
Current Sink Current Source
amp would never is simpler than a boost switching regu-
have come to see lator. Moreover, you can mix and
Current Mirror ■ FIGURE 4 the light of day. In match the LED colors and not have to
fact, the LM741 is worry about their forward voltage drop.
waveform to the output. With the + riddled with them (you’ll find one in Of course, nothing’s perfect. In
input, the input and output are in Figure 3). Like you say, I don’t have the reality, the current flowing through
phase; with the - input, the input and ink to go into depth on the subject, but Q1 is equal to the collector current
output are 180 degrees out of phase. an overview I can do. plus the extra base current needed to
Generally, the + input is used, but This design starts with a transistor drive Q2. This is why it’s important
either will work. whose collector is wired to its base — that the gain of the transistors be as
essentially a diode junction. The cool high as possible, typically 300 or
MIRRORS YES, thing about a diode is that it maintains
a fairly stable voltage across the
more, to minimize the error.
Other configurations have been
SMOKE NO junction even as the current through it devised — using additional transistors
varies. In effect, Rbias establishes a — to take the load off Q1’s collector.

Q
I’m looking for an advanced constant current (Iref) through the Heat, too, plays a role because the for-
explanation — perhaps in- collector of Q1. Now if you couple ward voltage drop of the base-emitter
cluding some experiment the base of the first transistor to the diode is temperature-dependent, and
suggestions — of the so-called base of a second transistor, Figure 4, unless the two transistors are at exact-
diode-connected BJT and the current you create a current mirror. ly the same temperature, you’ll get
mirror. I’ve looked through all of my old Whatever current flows through an error. For further reading, go to the
college texts, the local communit y the base of Q1 also flows through the following websites.
college library, and my county public base of Q2, which, in turn, controls the
library, with no success. I don’t expect current flowing through the collector of www.4qdtec.com/csm.html
you to devote a full column, but any Q2. Here’s where it gets interesting,
pointers that you may be able to because the current through Q2 (Iload) www.allaboutcircuits.com/vol_3/
supply would be greatly appreciated. is equal to Iref. What’s more, Iload is chpt_4/12.html
— Joseph F. Richmond independent of the value of Rload!
Whether Rload is 1 ohm www.ece.cmu.edu/~ee321/
+5V ■ FIGURE 5 or 1,000 ohms, the current spring99/LECT/lect17mar12.pdf
through it will always be equal
R = 4.3/I
to Iref. What we have here is www.kettering.edu/~bguru/Pamp/
a way to control the current PA-04.pdf
220
through Q2 via Rbias. The
20mA circuit can also be rearranged
for current sourcing — shown
POWER SUPPLY
Q2 Q3 Q4 Q5 on the right — with no change DESIGN BOOKS
in performance.

Q
Q1
But the story gets even Regarding the question “Trans-
better. Theoretically, you can former Ratings, Again” in April
parallel as many Q2 transis- ‘06, you showed a group of
tors as you want — and they very useful equations. I would
Matched Current LEDs will all have the same collec-
tor current as Q1. Let’s say
like to go with more detailed theoretical
analysis and mathematical equations. I
14 July 2006
Q&A.qxd 6/6/2006 11:12 AM Page 15

QU E ST I O N S & A N S W E R S

am very interested to know full details works with the charges reversed — ■ FIGURE 6
about rectifier design. Could you please that is, a positive electrostatic
direct me to a good text book (old or image on a negative background.)
new) for that purpose? As the drum continues to
— M.J. rotate, it passes the toner car-
tridge. The toner contains a fine

A
Here are two books that go black powder, which clings to the
into depth on the subject. electrostatic image created by the
Both are available from laser on the drum. It then rolls
Amazon.com. over the paper, which has been
• Power Supply Cookbook, Marty given an even stronger electro-
Brown, Second Edition. static charge, and impresses the
pattern onto the paper. At this
• Reference Data For Radio Engineers point, a whisper can blow the
1977. Chapter 14. powder off the paper and smear
the image or create blotches. The imagine. I haven’t had the time to
RECYCLING LASER paper then passes through a fuser —
heated rollers which melt the
continue this path. But if you do, I’ll be
glad to publish what you discover.
PRINTERS powered toner onto the paper.
So what can you salvage from this?
WORKING WITH

Q
The laser column has been Generally, the rollers are the first to fail.
gone for years, and I miss it. These can be replaced from a mainte- LDO REGULATORS
New laser printers are so nance kit that runs between $20 and

Q
cheap these days, many are $50 for most printers — kits that let you Some time ago, you suggest-
being discarded rather than repaired. DIY (from www.fixyourownprinter. ed an ICL7663 adjustable
Do you know of any hobby use for the com/kits/all — among others). However, voltage regulator for a battery
laser parts? the technology is advancing so fast that operated application. And it
— Tom Grabowski the choice between buying a new print- worked great. Now I have another ap-
er versus repair usually results in the old plication that has the same requirements

A
First, you have to make sure printer being discarded at this point. — except for size. I’m limited to a very
you have a real laser printer What’s left are the cool stepper motors small case. I’m using a PIC16F628 and
and not an LED printer, which — make sure you scrounge the driver a nine-volt transistor battery. Is there a
uses the same paper feed and electronics, too — and a low-power low-power voltage regulator that does
drum mechanism. The construction of a solid-state laser diode that’s likely on its not require all of the resistors and caps
genuine laser printer is shown in Figure last leg. Also be aware that this is a of the ICL7663 design? Maybe an LDO
6. Look for the rotating/spinning mirror. strobed laser with a very low duty cycle. volt regulator is what I’m hoping for.
How does it work? When you Now, if you’re lucky enough to Any suggestions?
send an image of a document or a run across a newer laser printer, you’ll — Brad
picture to the printer, a low-level laser find an array of multi-beam laser
beam “draws” the image on the drum diodes — not the LED diodes I warned
using rotating optics. It generates a you about earlier. Each diode can MAILBAG
negative electrical charge — an elec- output as much as four watts and be Dear TJ,
trostatic image. (In some printers, this multiplexed in any pattern you can I need help regarding the “I’m
Busy!” phone-line indicator in the
March ‘06 issue. I have built two
of these and can’t get them
+
Phone Busy 3V
AA cells
to work. I have tried several
4.7M 4093 chips, components and
Indicator 4093 double-checked the soldering.
4093 4093 The output of the bridge goes
from -50.1 volts “on-hook” to
-8.8 volts “off-hook,” which is
200V
1A LED normal. If you have any sugges-
33K 1N4148
1N5245A 4.7M tions, please let me know.
15V — Roger Hamel KG8XC
Phone 4.7M
100
Line Response: The bridge
0.47
rectifier is backwards. Here
is the corrected schematic
■ FIGURE 7 (Figure 7). — TJ

July 2006 15
Q&A.qxd 6/6/2006 11:12 AM Page 16

replace the nine-volt battery


+2.5V to +16V
COOL WEBSITES with four AA cells or two lithi-
um cells — which equal six volts
With a plethora of images — the voltage drop becomes
Vout = 1.23(R1/51.1k) + 1.23
streaming in from Mars, Jupiter,
1 one volt. One volt at 2 mA is
and Saturn, the NASA Planetary
In 5 +1.3V to +15V just 2 mW, a four-fold gain.
Out Photojournal gives you a slide
3 Another benefit of LDO
On show of what’s happening beyond
R1 7pF the next full moon. voltage regulators is their low
LP2980-ADJ
1uF standby current — which can
4
Adj 2.2uF http://nl.internet.com/ct.html?rtr= be as low as 10 μA. The
GND on&s=1,2dek,1,bza4,3ajf,3qmh,cu1s LP2980 requires just 100 μA
2 51.1K at 2 mA. Adding up the
In search of unique clipart for your
numbers, it comes to 2.1 mW
next school project or screen
of operating power — a far cry
Adjustable saver? Everything from elephants
from the 35 mW demanded
to a dice roll, and all for free if
you don’t mind nasal medication by a 78L05.
+6V banners. No pop-ups. I’ve designed and built
lots of 16F628 circuits, and
www.classroomclipart.com found the LD2980 (from
3 STMicroelectronics) to be
1uF In +5V
1 2 mA. That means that some- most useful. It has a low 100 μA
Out
how or another you have to quiescent current, 120 mV voltage
LD2980 2.2uF shed four volts. All linear volt- drop, and a small SOT-89 footprint. It
age regulators — including also comes in many different fixed-
GND LDOs — do that by inserting voltages, making it easier to match
2 a series resistance between the voltage drop to the battery size
Fixed the battery and your PIC. (the 16F628 has a Vcc range of 3.0 to
■ FIGURE 8 Simple math (P = EI) tells 5.5 volts; 2.0 to 5.5 volts for the
us that 8 mW has to be 16LF628) for best efficiency. When I

A
The LDO (low-dropout) volt- wasted across the regulator as heat — needed an adjustable voltage source,
age regulator is probably the even across an LDO regulator. Since I used the LP2980-ADJ. Figure 8
most misunderstood of all the PIC dissipates 10 mW on its own, shows both designs.
voltage regulators. Many the wasted power amounts to almost
users think that because the voltage
between the input and the output is
half the power your battery has to give.
But that’s only half the story. Let’s
READER’S CIRCUIT:
200 mV or less, it will save power. Not take the 78L05, for example. Not only PHONE BUSY INDICATOR
true. Let’s use your nine-volt battery as must it dissipate your four volts, but it
an example. The 16F628 normally consumes 3 mA even when it’s not I have a circuit (Figure 9) which is
works at five volts and draws about doing anything but sitting there. Math simpler than the one published in the
says that with a nine- March ‘06 issue. It has fewer compo-
volt battery, that’s nents, and is powered by the phone
another 27 mW of line, so there is no battery. The
wasted power. This is transistors are high-voltage types, to
why the LDO was withstand the ringing voltage, and the
invented. To reduce LED is low-current. There is no diode
this wasted battery bridge, as this interface cannot be
power. used here in the UK. The phone
The proper way company employs automated testing,
to use an LDO is to and one test involves a low-voltage
match the input reverse polarity leakage test. If this
voltage to the output circuit is used with a diode bridge, it
voltage. The less volt- would upset the testing, which would
age the regulator has continue ad infinitum, flashing the
to waste, the more LED every few seconds. The circuit is
efficient your design taken from my book Telephone
and the longer the Installation Handbook.
battery will last. For — Steve Roberts
■ FIGURE 9 example, if you Bude, Cornwall England
16 July 2006
Full Page.qxd 6/6/2006 2:08 PM Page 17

RabbitFLEX A New Way To Customize

• Click-to-ship in 5 days!
• Pay only for what you need
• Revision friendly
• Perfect for prototype and production

RabbitFLEX™ is an unique build system that gives you the Start developing now by ordering the
power to develop custom boards without the hassle and RabbitFLEX Tool Kit and your own
the cost. The RabbitFLEX simple-to-use web interface allows custom RabbitFLEX board. Take your
you to choose from numerous options such as digital I/O, solution to the next level.
analog I/O, serial ports, and Ethernet connections on your
custom board. Just configure and buy online and our patent Configure and Buy Online
pending manufacturing process will deliver your solution www.myrabbitflex.com
Quick-Turn Boards Range From RabbitFLEX Tool Kit
in a matter of days. With RabbitFLEX you will reduce design
risk, manufacturing cost, and development time.
$
149- 279 $ $
199

Test Drive RabbitFLEX $49


Value
Build your custom RabbitFLEX board online. Free
Add a tool kit to your order for a complete Book
development system including Dynamic C®. 2900 Spafford Street, Davis, CA 95616 Tel 530.757.8400
For a limited time
Solutions That Work
www.myrabbitflex.com with kit purchase.
GetStartedWithPICs.qxd 6/6/2006 11:25 AM Page 18

■ BY CHUCK HELLEBUYCK
GETTING STARTED WITH
THE LATEST IN PROGRAMMING MICROCONTROLLERS
PICs
DEVELOPING WITH A PIC
BOOTLOADER
IF YOU’VE BEEN A REGULAR READER OF THIS COLUMN and have started
to actually program PICs, you are probably tired of moving the PIC from
programmer to project and back again every time you make a change. It not
only damages pins, but can sometimes cause confusion if the PIC is put in the
board backwards or even shifted by one pin. This is why I like to develop with
a bootloader and it’s one of the most difficult items to explain to a beginner.

A bootloader is software pre-


installed in the PIC that allows
you to program the PIC in-circuit so
one of the reasons I picked it for these
articles.
load or program this binary file into a
Microchip PIC: with a PIC hardware
programmer like the EZPIC
you don’t have to remove it over
and over again. Unfortunately, not
WHAT IS A BOOTLOADER? Programmer I talked about back in
January or let the PIC program itself,
all Microchip PICs allow you to use When you write your PIC using a bootloader program,
a bootloader. But as new parts program in PICBasic, Atom Basic, pre-installed in the PIC’s memory
are released, many of them have Assembly, C language, or any other (this is how the Atom modules get
the bootloader capability. The compiler, it will eventually become a programmed).
PIC16F876A I’ve been using in these binary file of 1s and 0s, also known as
columns is bootloader-capable and a .hex file. There are really two ways to Option 1 — PIC
Programmer Module
A PIC hardware programmer is a
custom-designed module that receives
the binary code file, created by the
compiler, via a PC serial or USB port.
The PIC programmer module then
generates the electrical signals the
PIC needs to see and downloads the
program to the PIC through the Data
and Clock pins on the PIC (B6 and B7
on the PIC16F876A). This is how the
EZPIC programmer works and lots of
other PIC programmers.

Option 2 — Bootloader
A bootloader is a custom binary
file pre-loaded in the PIC memory that
allows a PIC to program itself without
use of a hardware PIC programmer
discussed in Option 1. It does this
with special circuitry built inside the
PIC that generates the necessary
■ FIGURE 1 voltages internally. The PIC receives
18 July 2006
GetStartedWithPICs.qxd 6/6/2006 11:25 AM Page 19

G E T T I N G S TA R T E D W I T H P I C s

the binary file through its serial port similar to the in-circuit debugger ■ FIGURE 2
and then programs the internal included with the Atom module
program memory (without over- software that I’ve talked about in
writing the bootloader code). previous articles.
The bootloader software only The MCLoader is included
runs for about a half second. If it with the MCStudio Plus software
doesn’t see a new program arriving at and it gives you the .hex bootloader The value of “Char” is shown in
the serial port connection, it just files for many of the PICs that will Decimal, Hexadecimal, and Binary
jumps to the program that is in its run a bootloader. The MCStudio format at the point just prior to
program memory and runs that pro- standard version comes with executing the command highlighted in
gram. The catch is you need to get PICBasic Pro and you can download red. If you wanted to see the output
the bootloader binary file into the it for free from the mecanique port registers inside the PIC, such as
PIC first before you can run it. This website. The Plus version — which PortB, you would click on the
means you have to either buy a PIC includes the MCLoader and in-circuit Registers tab as seen in Figure 2.
with a bootloader programmed in or debugger — costs $49.95, but to me PortA, PortB, and PortC are
program a blank PIC with the boot- is well-worth the money. Let’s take a shown in Decimal, Hexadecimal, and
loader binary file using a PIC look at why this is such a great tool Binary format. If you have a command
hardware programmer module. So, in for the PICBasic Pro programmer and that is reading the port or driving the
other words, you need Option 1 in why I recommend it. port pins, then you can use this to see
order to get to Option 2. the status of the pins before or after

There are numerous bootloaders


USING MCSTUDIO PLUS the command executes. You see how
useful this can be?
available via the Internet, and many When you write a program, you
of them are free. They will include a
program that runs on the PC to send
are probably running through the
program flow in your head figuring
SAMPLE PROGRAM
your PIC program out the serial port out what the variables are doing after Included with the MCStudio soft-
and also the .hex file of the every command. Then when you ware are a couple sample programs
bootloader for the PIC you plan actually run the program and it does- written in PICBasic Pro that work great
to use. A good, free one is n’t work, you start to think about the with the in-circuit debugger. One of
at www.microchipC.com called program over and over again in your them is shown in the program listing
PICLoader. I’ve used it many times head trying to figure out why it isn’t as the program ICDSERIAL.BAS. The
and so have many other people. doing what you thought it should. reason I left this in its present form
In fact, one of the readers of this If you could only have the ability was because it was such a great demo
column — Ron Zlotnik — used this to run the program and watch each file. It uses the HSEROUT/HSERIN
bootloader and one of my RS232 command execute. Better yet, what commands. In a previous article, I
breadboard modules to make a if you could have the program run showed how to use the SEROUT/
PIC16F876A bootloader that he uses at close to normal speed, but then SERIN commands and just touched on
with PICBasic Pro. You can read automatically stop at a particular the HSEROUT/HSERIN commands.
Ron’s instructions on how to do it at command so you can execute that Because the MCLoader bootloader
my website through the link one slowly and determine why the uses the C6 and C7 pins of the
www.downtowninternet.com/el variable or output pin isn’t doing what PIC16F876A, we can easily use these
products/picloader.htm you expect? That is what an in-circuit commands with the bootloader. This
debugger does for you. is because the hardware serial port of
MCLOADER In Figure 1, you see the MCStudio
Plus screen, which is very similar to
the PIC16F876A is connected to the
C6 and C7 pins. This allows the PIC to
If you are willing to spend a little the MCStudio standard version includ- receive and send data through the
money and you use PICBasic Pro, then ed with PICBasic Pro. The MCStudio same bootloader connection back to
I recommend the MCLoader from Plus screen in Figure 1 also shows the the PC and the in-circuit debugger
mecanique (www.mecanique.co.uk). in-circuit debugger running a program. software.
The reason I suggest this bootloader Notice how one of the lines is high- The software sample program
for the PICBasic Pro user is that this lighted in red. The highlighted line is a simply receives an ASCII value from
bootloader also adds the option of breakpoint that I set. The program ran the PC serial port, which you enter
running with the MCStudio Plus in- until it got to that line and then into the keyboard, and displays it
circuit debugger. The debugger allows stopped. on the in-circuit debugger’s bottom
you to step through your PICBasic Pro On the right part of the screen are display window. When the HSERIN
code command-by-command and four tabbed displays. The first one is command is run, the in-circuit debug-
watch the registers and variables the variables tab and it shows the ger automatically brings up a serial
change after every command. It’s very variable “Char” used in the program. communication window on the PC
July 2006 19
GetStartedWithPICs.qxd 6/6/2006 11:31 AM Page 20

■ FIGURE 3 be displayed on the bottom of the screen. This


could easily be modified to drive an LCD display
once you’ve proved the communication code
works with the in-circuit debugger. Do you see
how great this tool is?

BOOTLOADER LIMITATIONS
Because the bootloader has to know what
frequency it’s running at to properly communi-
cate with the PC serial port, the bootloader can
only be set at one frequency. For example, if
you have a bootloader running on a PIC at 20
MHz, your program won’t run properly if you
compiled it for 4 MHz operation. You have to
adjust your program to run at the bootloader
speed or re-install a new bootloader that runs at
4 MHz. Most of the bootloader .hex files
which can be seen on the right of Figure 1. I entered the included with MCLoader offer a 20 MHz and 4 MHz
letter “u” and hit the enter key. At the bottom of Figure 1, resonator version for each PIC supported. They will
you see that the letter “u” was received and the hexa- even create a unique frequency version for you if you
decimal value of “$75” is shown next to it. This is the ASCII email them.
value for the small case letter “u.” Notice that you can also At the top of the sample program are two lines shown
see that value shown in the variable “Char” on the right of below.
Figure 1 in the variables window.
All this sample program does is receive an ASCII value DEFINE LOADER_USED 1 ‘ uses a bootloader
define OSC 20 ‘ *** SET THE CORRECT SPEED ***
from the PC and then send back the hexadecimal value to

The first one “DEFINE LOADER_USED 1” is needed


SAMPLE PROGRAM to tell the PICBasic Pro code to jump to the bootloader
at start-up rather than run the program. When you
‘***********************************************************
‘* Name : ICDSERIAL.BAS program a blank PIC with this same file and don’t want
‘* Author : David John Barker to run a bootloader, you just comment out this line.
‘* Notice : Copyright (c) 2002 Mecanique The second line sets the oscillator speed to match the
‘* : All Rights Reserved bootloader speed.
‘* Date : 26/02/02
‘* Version : 1.0 You also have to add the RS232 level shifter circuit
‘* Notes : Sample application to demonstrate ICD serial to get the MCLoader to work. Figure 3 shows a
‘* : communications support. Program your device recommended schematic from Reynolds Electronics
‘* : using the ‘ICD Compile and Program’ button, (http://rentron.com), which is also shown on the
‘* : then press ‘ICD Run’
‘***********************************************************
mecanique website. It’s really just a standard RS232
inverter chip circuit that I also use in my RS232 bread-
DEFINE LOADER_USED 1 ‘ uses a bootloader board module that Ron Zlotnik used in his setup. I built
define OSC 20 ‘ *** SET THE CORRECT SPEED *** the same circuit into my Ultimate OEM module so I
CR con 13 ‘ carriage return
could use my module in-circuit and program it with a
Char var byte ‘ character input bootloader and also run the MCStudio Plus in-circuit
debugger when I’m developing code. This allows me to
hserout [“Program Starting...”,CR] develop designs without having to pull the chip out and
ProgramStart: then plug it back in many times while I try to figure out
‘ read in a character, timeout after 5 seconds why my program won’t work. If you are writing simple
hserin 5000, Timeout, [Char] programs, then this setup may not be a lot of help. When
hserout [“Value = ‘“, Char,”’, ASCII = $”,hex2 Char,CR] you get into larger programs, though, this type of tool is
goto ProgramStart priceless.
Timeout: The TX pin in the schematic connects to the PIC’s
C6 pin. The RX pin of the schematic connects to the C7
‘ inform user of timeout, then loop back pin. The MCLR wire of the schematic connects to the
hserout [“Timeout after 5 seconds”,CR] MCLR pin of the PIC. When you first try to download,
hserout [“Trying again...”,CR]
goto ProgramStart it will give a message that the bootloader cannot
communicate. This is when you press the reset switch
20 July 2006
GetStartedWithPICs.qxd 6/6/2006 11:31 AM Page 21

G E T T I N G S TA R T E D W I T H P I C s

which starts the PIC up again in and more. ■ FIGURE 4


bootloader mode, ready to receive As usual, if
your program. you have questions or
comments, send them
TAKING IT FURTHER to me at chuck@
elproducts.com Also,
Another feature I like about this if you are attending the
type of setup is the ability to use the Microchip Masters
PIC16F876A to develop small PIC Conference in July,
projects. One of the great advantages look me up — I’ll
to the PIC microcontrollers is their be out there getting
common architecture. Many of the training, myself. NV
PICs share the same I/O and periph-
eral structure. This means if a program
works on a 16F876A, with very little
modification, you can make it work
on a smaller PIC with the same
peripherals. In Figure 4, I show how I
jumpered the I/O of my Ultimate
OEM module to an 18-pin PIC
development board. By matching up
the proper I/O pins, I can develop a
project on an 18-pin board without
having to use an 18-pin PIC. Later on,
I can recompile the code and actually
use an 18-pin PIC, but I will have
debugged 99% of the code using this
method. This is great because a lot of
the smaller PICs don’t offer the boot-
loader option.

NEXT STEPS
I highly recommend you get a
bootloader to work with a
PIC16F876A or similar. Even if you
just use the directions Ron wrote out
for the PICLoader, you won’t have
to spend a lot of money. You don’t
have to use my RS232 bootloader
module, either. You can find them
from various sources — such as eBay
(www.ebay.com) — or just build your
own. RS232 chips can be found at
various electronic suppliers — such as
Jameco (www.jameco.com) — for
under $2.00.
If you did the project on serial
communication from several issues
back, you probably already have the
circuitry ready to roll; you just didn’t
know it could help you program the
PIC in-circuit also.
I hope I’ve helped clear some
of the confusion about bootloaders
without adding more. It’s just a
great method to use and industry is
using this for field programming more
July 2006 21
NutNVolt200607.qxd 6/6/2006 2:18 PM Page 22

Summer Kits
The Favorites
Solar Trickle Charger
Your vehicle or boat battery will
For
Passive Air Band New006 never be dead again! Leave the
Solar Charger pluged in and your
Aircraft Monitor 2 battery is constantly charged, free-courtesy of the
✔ Monitors the entire aircraft band without tuning! sun! Built-in polarity reversal protection and status
✔ Passive design, can be used on aircraft, no local LED. Battery clips and accy plug provided.
oscillator, generates and creates no interference! SOL5N Solar Trickle Charger $26.95
✔ Great for air shows
✔ Patented circuit and design! 20W Sub-Mini Audio Amp
For decades we have been known for our novel and creative product designs. Delivers a super clean 20W output
Well, check this one out! An aircraft receiver that receives all nearby traffic without from one SMT device! Super Class-D
any tuning. It gets better... there is no local oscillator so it doesn't produce, and design produces NO HEAT! Neat mini
can't produce, any interference associated with all other receivers with an LO. That round or square PCB design! Runs on 18 VDC.
means you can use it onboard aircraft as a passive device! And what will you hear? UAM2 20W Audio Amp Kit $34.95
The closest and strongest traffic, mainly, the one you're sitting in! How unique is
this? We have a patent on it, and that says it all!
ECG Heart Monitor
This broadband radio monitors transmissions over the entire aircraft band of 118- Provides visual and audible display
136 MHz. The way it works is simple. Strongest man wins! The strongest signal of your heart rhythm! Monitor out
within the pass band of the radio will be heard. And unlike the FM capture effect, displays your heart directly on your scope!
multiple aircraft signals will be heard simultaneously with the strongest one the Uses professional reusable probe patches.
loudest! And that means the aircraft closest to you, and the towers closest to you! Runs on a safe and standard 9V battery.
All without any tuning or looking up frequencies! So, where would this come
in handy? ECG1C Electrocardiogram Kit $44.95

1. At an air show! Just imagine listening to all the traffic as it happens Digital Voice Storage
2. Onboard aircraft to listen to that aircraft and associated control towers
3. Private pilots to monitor ATIS and other field traffic during preflight Provides up to 8 minutes of digital
activities (saves Hobbs time!) voice storage that can be broken
4. Commercial pilots to monitor ATIS and other field traffic as needed at down into 8 messages! Great for
their convenience announcements. Built in microphone.
SPECIFICATIONS
5. General aircraft monitoring enthusiasts BS2C Bullshooter-II Kit $69.95
Frequency Range: 118 MHz to 136 MHz
Wait, you can't use a radio receiver onboard aircraft Receiver Type: Patented Passive Detector
because they contain a local oscillator that could gen- IF Frequencies: None! HV Ion Geneator
erate interfering signals. Receiver Sensitivity: Less than 2 uV for detectable Generates a steady state DC volt-
audio age, 7.5kV DC negative, 400uA!
We have you covered on that one. The ABM1 has no Audio Output: 700mW, 8-24 ohms That’s lots of Ions! Feel the con-
local oscillator, it doesn't, can't, and won't generate any Headphone Jack: 3.5mm stereo phone stant blast of fresh air from the air
RF whatsoever! That's why our patent abstract is titled External Antenna: Headphone cord coupled cannons! Runs on 12VDC or our PS adapter.
"Aircraft band radio receiver which does not radiate Power Requirement: 9VDC battery
interfering signals". It doesn't get any plainer than IG7 HV Ion Generator Kit $64.95
Dimensions: 2.25” x 2.8” PC Board
that! Available as a through-hole hobby kit or a factory 2.5” x 4.6” x .9” Case
assembled & tested SMT version. Weight: 4 oz. with battery
Plasma Generator
Provides a stunning 25kV at 20kHz
ABM1 Passive Air Band Monitor Kit $89.95 from a solid state circuit! Build
ABM1WT Passive Air Band Monitor, Factory Assembled & Tested $159.95 your own plasma bulbs, generate 2”
sparks and more! Runs on 16VAC.

Digital Tuned High Performance For PG13 Plasma Generator Kit $64.95
Aircraft Band Receiver New006
2 Laser Light Show
✔ Rock solid dual conversion PLL receiver! Produces impressive laser light
✔ Airport runway lighting controller output! shows just like the big boys do!
✔ 4 user memory scanner banks, 20 freq’s each Variable pattern and speed con-
✔ Full band scanner with skip and skip/timer modes trols and an audio input to modulate the show to
✔ Internal front panel speaker your music! Uses standard laser pointers included.
✔ External antenna input, speaker out, headphone out
✔ Stylish and shielded black metal enclosure LLS1 Laser Light Show Kit $44.95
✔ Available as a hobby kit or factory assembled & tested
Professional features at a hobbyist price! To begin with, we designed it with the LED Strobe Light
latest technology, utilizing a rock stable synthesized PLL dual conversion receiver. We gave it Say goodbye to the fragile glass
superb image and adjacent channel rejection to allow you to lock onto the signals you want and not to be Xenon tube! High power LED’s
bothered by those you don’t! SPECIFICATIONS produce super bright strobe displays.
Frequency Range: 117.975 MHz to 137.000 MHz
Variable flash rate and audio input to
Once we got the RF portion designed we took a close sync the flash to your music. Runs on 12VDC.
25kHz steps
look at the features desired in such a receiver. We LEDS1C LED Strobe Light Kit $44.95
gave it a neat 2x8 line LCD display to show you all the Receiver Type: Dual Conversion PLL
functions. Control of modes and setups is obtained IF Frequencies: 10.7 MHz & 450 kHz
through the front panel controls and confirmed on the Receiver Sensitivity: Less than 1 uV across the band Signal Magnet Antenna
LCD display. On/Off/Volume and Squelch controls are Image Rejection: Greater than -80 dB
Super Hi-Q ferrite rod antenna with
also provided on the front panel. We even gave it a Adjacent Ch. Rejection: Greater than -40dB Faraday shield pulls in the signal and
front panel speaker in case you stack the lighting con- Scanner Banks: 4, 20 frequencies each removes the noise! Great results from
troller or something else on top of it! So far we’ve Audio Output: 1 watt, 8 ohms 500kHz to 15MHz. Super for the AM broad-
described the ultimate aircraft receiver that’s not only Light Controller Output: 3 events, 5 events, 7 events cast band...no more noise! Includes power supply.
the perfect field monitor for a hangar or airport man- output to controller
ager’s office, but for the serious enthusiast. Can it get Power Requirement: 12VDC, 500mA
SM100 Signal Magnet Kit $89.95
any better than that? It sure can! External Antenna: BNC female, rear panel
Dimensions: 5.55”W x 6.45”D x 1.5” H Touch Tone Reader
The top request we’ve had for a professional aircraft
receiver was to embed automatic runway lighting con- Captures dialed phone numbers,
trol. Consider it done! The lighting controller follows the standard protocol for remote runway lighting. The repeater codes, control codes or
pilot “keys” his microphone on the local CTAF channel for the specified number of times. All you need to do is anything that uses Touch Tone!
set the receiver for the lighting control mode, then make sure the squelch is closed and will open on a suitably Phone line and audio inputs. Runs on 12-15 VDC.
strong signal. Typically the number of “keys” or “events” according to the receiver control the lighting as fol- TG2C Tone Grabber Kit $69.95
lows: 3 events, 25% brightness; 5 events, 50% brightness; and 7 events, 100% brightness. The AR2’s
adjustable lighting timer sets turn-on duration to your needs. Includes the matching case and knob set and
power supply. For the aviation professional that is not interested in building the receiver, the AR2 and the light- Tickle-Stick Shocker
ing controller are also available factory assembled and tested, ready to go. Just plug it in and you’re all set. Extremely popular kit, produces a
AR2 Synthesized Aircraft Receiver Kit With Case & AC Power Supply $199.95 pulsing 80V tickle output with a telltale
AR2WT Factory Assembled & Tested AR2 Synthesized Aircraft Receiver $269.95 blinking red LED! And who can’t resist a blinking
AR2L Plug-In Runway Lighting Controller Interface Kit With Case & AC Power Supply $59.95 light! Great fun for your desk! Runs on 3-6VDC.
AR2LWT Factory Assembled & Tested AR2L Runway Light Controller $99.95 TS4 Tickle-Stick Kit $12.95
NutNVolt200607.qxd 6/6/2006 2:21 PM Page 23

Our Hottest Prducts High Resolution Air


Pressure/Elevation Sensor
And Our Coolest Kits! ✔ Pressure resolution greater than
0.0001kPa!
✔ 128 x 64 pixel graphical display!
Professional Synthesized ✔ Shows realtime elevation & pres-
FM Stereo Transmitter sure changes!
✔ USB computer interface for easy
✔ Fully synthesized 88-108 MHz for data transfer!
no frequency drift! ✔ 13,824 samples of FLASH storage
✔ Line level inputs and output! available!
✔ Microprocessor controlled! For
✔ Line level inputs and output
✔ Special pilots menu
✔ Multiple built-in alarms
New006
✔ Adjustable RF power output
2
✔ Latest SMT design with pre-assembled
and tested components What The Customer’s Are Saying...
Need professional quality features but can't justify the cost of a commercial FM “JUST INCREDIBLE!”
exciter? The FM25B is the answer!
We really did it this time! The UP24 is one of our most advanced kits to date, and
A cut above the rest, the FM25B features a PIC microprocessor for easy frequency an absolute MUST for anyone serious about the environment around us! But the
programming without the need for look-up tables or complicated formulas! The applications only begin there.
transmit frequency is easily set using DIP switches; no need for tuning coils or
“tweaking” to work with today's “digital” receivers. The unique design allows unprecedented super high resolution measurements
and display of absolute atmospheric air pressure. The UP24 senses ambient air
Frequency drift is a thing of the past with PLL control making your signal rock pressure and critically calculates elevation with unheard of precision! Using a
solid all the time - just like commercial stations. Kit comes complete with case highly sensitive sensor and 24-bit A/D converter in a special noise-immune
set, whip antenna, 120 VAC power adapter, 1/8" Stereo to RCA patch cable, easy design, less than 1/3" of an inch of elevation resolution is achieved! YES, we said
assembly instructions, and the SMT parts are factory preassembled - you'll be on 1/3 of an inch! This high accuracy and resolution opens the door to a host of
the air quick! (Note: The end user is responsible for complying with all FCC rules sophisticated environmental air pressure monitoring applications.
& regulations within the US, or any regulations of their respective governing
body). Unlike your normal run-of-the-mill barometer, air pressure is sensed in Pa's or
kPa's. What are those you may ask? Pascals or KiloPascals. However, don't be
FM25B Professional Synthesized FM Stereo Transmitter Kit $139.95 afraid, for your convenience, and to fit any application you may have, it is also dis-
played in millibars, bars, PSI, atmospheres, millimeters of mercury, inches of mer-
cury, and feet of water! Take your pick! The range of the UP24 is 15kPa to
Digital Synthesized 155kPa.
FM Stereo Transmitter
✔ The newest Ramsey transmitter! We've talked about air pressure, now let's talk about elevation! The incredibly
✔ Rock stable PLL synthesized precise 24 bit A/D converter in the UP24 looks at the air pressure and converts it
✔ Front panel digital control and to elevation above sea level. In both graph and text, the elevation is displayed to
display of all parameters! a resolution of 1/3”! Yes, I said 1/3 of an inch! The applications for the super
✔ Professional metal case accurate elevation meter are endless. From watching and recording elevations
✔ Super audio quality! during hiking trips to measuring and recording the wave heights on boats! Let
your imagination take over from there!
You told us what you wanted, and we listened! The legacy continues with the lat- What if you're in the field and you want to save data captured in your UP24? The
est Ramsey transmitter, designed from the ground up to YOUR SPECS! built-in FLASH storage provides 13,824 samples of storage. Then you can transfer
your data to your PC with a standard USB interface.
The FM30 is designed around an RF tight vinyl clad
metal enclosure for noise free and interference free While the UP24 is small enough to be kept in your coat pocket it boasts a large
operation. All settings are done without taking the 2.78" x 1.53" 128x64 pixel LCD display screen making viewing easy. Display
cover off! Enter the setup mode from the front panel modes include both realtime pressure and elevation graphs as well as pressure
and step through the menu to make all of your and elevation statistics. There are 12 user selectable sample rates from 1/10th of
adjustments. A two line LCD display shows you all a second all the way up to every 15 minutes.
the settings! In addition to the LCD display, a front
panel LED indicates the PLL lock so you know you Needless to say, you cannot put all the specs and screen shots in the limited
are transmitting. Besides frequency selection, front space of this ad! Visit our website at www.ramseykits.com for full specs and
panel control and display gives you 256 steps of information.
audio volume (left and right combined) as well as
RF output power. A separate balance setting com- If you're looking for the finest air pressure and elevation sensor, check out the
pensates for left/right differences in audio level. In UP24, truly a marvel in the industry! Available in a ready-to-build kit or a factory
addition to settings, the LCD display shows you "Quality of Signal" to help you set assembled and tested version. Check our website at www.ramseykits.com for
your levels for optimum sound quality. And of course, all settings are stored in the more information!
non-volatile memory for future use!
UP24 High Resolution Air Pressure/Elevation Sensor Kit $239.95
The design includes EMI filters on line level audio and power inputs, and a state UP24WT Factory Assembled and Tested UP24 $299.95
of the art microstrip PCB inductor to reduce microphonics for the ultimate in AC125 110VAC Power Adapter/Charger $9.95
alignment free operation. RF output is through a professional well shielded rear
panel BNC connector for a perfect antenna match. Standard RCA connectors are
used for left and right line level audio inputs.

The FM30 operates on a 13.8 to 16VDC and include a 15VDC plug in power sup-
ply. The stylish metal case measures 5.55"W x 6.45"D x 1.5"H and is a perfect
match with your computer to broadcast your music files throughout your house. If MORE than just friendly on-line ordering!
you're looking for a super performer without all the features of our FM100 series
transmitters, the new FM30 is for you! (Note: The end user is responsible for com- Clearance Specials, Ramsey Museum, User Forums, Dealer Information, FAQ’s, FCC
plying with all FCC rules & regulations within the US, or any regulations of their Info, Kit Building Guides, Downloads, Live Weather, Live Webcams, and much more!
respective governing body).
FM30B Digital Snythesized FM Stereo Transmitter Kit

Did You Know...


$199.95
www.ramseykits.com
✔ It’s impossible to give you full specs on these products in a 1” space!
✔ A lot of our kits are also available “factory assembled and tested”, if you
don’t want to build them!
✔ We have over 350 products currently available, and all those don’t fit here! 800-446-2295
Get The Catalog! Where
Electronics


Build It!
Learn It!
590 Fishers Station Drive
Get the 2006 Ramsey Hobby Catalog!
Victor, NY 14564 Is Always ✦ Achieve It!
104 value packed pages of the neatest Fun!
(800) 446-2295 ✦ Enjoy It!
goodies around with over 150 new (585) 924-4560
items! Order yours today on line or Prices, availability, and specifications are subject to change. Not responsible for typos, stupids,
printer’s bleed, migraine headaches, or excessive summer sweat. Hey, Summer is finally here!
Put the top down and enjoy! Visit www.ramseykits.com for the latest pricing, specials, terms and
give us a call. Or download the PDF! conditions. Copyright 2006 Ramsey Electronics, LLC...so there!
Page24.qxd 6/8/2006 10:08 AM Page 24

CALL OR
CALL
TOLL-FREE
TO ORDER C&S SALES E-MAIL US
FOR OUR
FREE
(800) 292-7711 www.cs-sales.com CATALOG!

Elenco® Snap Circuits


Elenco’s new Snap Circuits make learning electronics fun and easy. Just follow the colorful pictures in
our manual and build exciting projects, such as: FM radios, digital voice recorders, AM radios, burglar
alarms, doorbells, and much more! You can even play electronic games with your friends. All parts are
mounted on plastic modules and snap together with ease. Enjoy hours of educational fun while learning
about electronics. No tools required. Uses “AA” batteries.
6 versions available. Great
Build up to 750 projects!
Gift
As low as $29.95 Idea!

Create
Your Own
Exciting
Experiments

Upgrades and replacement


parts available at:
www.cs-sales.com
4 Educational Models Available
SC-750 - Extreme Version, contains over 80 parts to build over 750 experiments. Includes everything from SC-500
plus experiments in solar, electromagnetism, vibration switches, and 70 computer interfaced experiments. $119.95
SC-500 - Pro Version, contains over 75 parts including voice recording IC, FM radio module, analog meter,
transformer, relay, and 7-segment LED display. Build over 500 experiments. $89.95
SC-300 -Deluxe Version, contains over 60 parts. Build over 300 experiments. $59.95
SC-100 - Snap Circuits, Jr., contains over 30 parts. Build over 100 experiments. $29.95

Electronic Science Lab Elenco® Educational Kits


Maxitronix 500-in-1 Electronic Project Lab Model RCC-7K
Radio Control Car Kit
Model AM-780K
Two IC Radio Kit
Model M-1006K
DMM Kit
Model MX-909 • 18 Ranges
Everything you need to build
500 exciting projects!
$
27.95 • 3 1/2 Digit
LCD
• Learn the basics of electronics. 500 different • Transistor
electronic experiments, special lighting effects, Test
radio transmitter and receivers, sound effects,
• 7 Functions • Diode Test
cool games and MORE!
• Includes built-in breadboard and an LCD.
• Transmitter included
$
9.95
Non-soldering Version
• Explore amplifiers, analog and digital
circuits plus how to read schematic AK-870 $27.95 $29.95
AM/FM-108K
$
AM/FM Version 95
18.
diagrams.
Visit our website www.cs-sales.com to see our assortment.
• Includes 11 parts.
• Lab-style manual included.
• Requires 6 “AA” batteries. $
169 Elenco® Test Equipment
MX-908 - 300-in-1 Lab $69.95 MX-906 - 130-in-1 Lab $39.95 Elenco® Quad Power Supply Elenco® Frequency Counter
MX-907 - 200-in-1 Lab $49.95 EP-50 - 50-in-1 Lab $18.95 Model XP-581 1MHz-3GHz Model F-2800
4 Fully Regulated Power Supplies in 1 Unit • 10 digit LCD

Elenco® Digital Multimeters


99
$ display
• 16-segment RSSI
bargraph
• Resolution to 1Hz
Model M-1750 Model LCM-1950 75
$
• Hi-speed
(300MHz) direct
4 DC Voltages: 3 fixed; +5V @ 3A, +12V
$
24.95
$
59. 95 @ 1A, 1 variable; 2.5 - 20V @ 2A • Fully
regulated & short protected • Voltage &
count
• Includes NiCd
charger and
• Large 1” 3 3/4 current meters • All metal case antenna
Digit LCD
• 3 3/4 Digit LCD
• Autoranging Freq. Elenco® Oscilloscopes Elenco® 5MHz Sweep
• Freq. to 10MHz to 4MHz
• Cap. to 200μF *Special* Function Generator
• Cap. to 400μF
• AC/DC Voltage with built-in 60MHz
• Current up to 10A
• Inductance to 40H
• Res. to 4,000MΩ
$
329 Frequency Counter
S1325 30MHz Model GF-8056
• Audible Cont.
• Diode Test
• Logic Test
• Diode &
Probes included $
229
• Transistor Test Transistor Test
S1330 30MHz Delayed Sweep $459
• Overload Prot. • Audible Continuity S1340 40MHz Dual Trace $469
Test
S1345 40MHz Delayed Sweep $549
S1360 60MHz Delayed Sweep $749
Quantity Discounts Available S1390 100MHz Delayed Sweep $999
Generates square, triangle, and sine
waveforms, and TTL, CMOS pulse.

15 DAY MONEY
Guaranteed Lowest Prices C&S SALES, INC. BACK GUARANTEE
UPS SHIPPING: 48 STATES 7% 2 YEAR FACTORY
150 CARPENTER AVE • WHEELING, IL 60090
(Minimum $7.00)
OTHERS CALL FOR DETAILS (847) 541-0710 FAX: (847) 541-9904 WARRANTY
IL Residents add 8.75% Sales Tax E-mail: sales@cs-sales.com PRICES SUBJECT
TO CHANGE
SEE US ON THE WEB www.cs-sales.com WITHOUT NOTICE

24 July 2006
Page25.qxd 6/8/2006 10:16 AM Page 25

WE CAN MAKE THIS BOARD ,


HOWEVER , OUR PCB ORDERS START AT ONLY $ 50

CSR Bluetooth Module

3mil Track
rack 0 . 1mm Plannar Antenna
Blind Via 0 . 5mm BGA Edged Half Hole

In the past 12 months , our PCBs have been


shipped to 36 countries .
The largest order : 2360 square meters
The smallest order : 5pcs 0 . 4 " x 0 . 4 " 2L
2L : $ 50 , 5pcs , 4 " x4 "
< $ 0 . 13 / sq inch @ Small Qty
4L : $ 188 , 3pcs , 4 " x4 "
< $ 0 . 22 / sq inch @ Small Qty
6L : $ 288 , 3pcs , 4 " x4 "
< $ 0 . 33 / sq inch @ Small Qty

FREE: 2 Sides silkscreen & solder mask , V - Cut , HASL ,


Gold Plated , OSP , 0 . 8 - 1 . 6mm Thickness

FPC start at $ 388 / 10pcs


Frameless stencil start at $ 50
Framed stencil start at $ 98

Http://EzPCB.COM
Sales@EzPCB.COM

July 2006 25
PersonalRobotics.qxd 6/8/2006 4:06 PM Page 26

■ BY PHIL DAVIS
PERSONAL ROBOTICS
UNDERSTANDING, DESIGNING & CONSTRUCTING ROBOTS & ROBOTIC SYSTEMS

DESIGN A MINI SUMO — PART 1


LAST SPRING, OUR ROBOTICS CLUB scheduled a Mini Sumo competition
for the summer of 2005. Of course, no one had a Mini Sumo robot, so a mad
frenzy of ideas, concepts, and parts ensued.

F or the uninitiated, Mini Sumo


competitions take their name from
the Japanese form of wrestling called
to write the program?

Many of the club members chose


platform which rigidly supports wheels,
motors, sensors, electronics, and
batteries. In addition, it must conform
Sumo. In this case, two robots combat to use an off-the-shelf chassis for their to the Mini Sumo rule constraints:
for three minutes in a black ring 77 cm Mini Sumos — such as the Mark III —
(just over 30 inches) in diameter, and, while this is an excellent choice, • It must fit into a “box” 10 cm long
bounded by a one-inch border. Each my thoughts were that if everyone by 10 cm wide (3.93” x 3.93”), but
robot attempts to locate the other and uses the same “kit,” then everyone may be an arbitrary height.
push it off the edge. will perform approximately the same
At the time the competition was — at least mechanically. To be different • It must weigh between 0 and 500
announced, our club used what we and have a better chance to win, you grams (0–1.1pounds).
called “Brandon’s” board, which was a need to do something different.
small Atmel Mega16-based system This started me thinking about what But what other functionality
with motor drivers, sensor ports, exactly would make a good Mini Sumo. should it have? Well, to think about
switches, and LEDS designed by (you If one were to stand a better than aver- this, we need to understand the
guessed it) Brandon. So, the “what to age chance of winning, how exactly fundamental objectives of the compe-
use for a microprocessor” part was would one go about designing a Sumo tition which are finding the opponent,
covered. That left: and what would one use for software? pushing the opponent out of the ring,
That’s what it’s about — winning! So, not getting pushed out, and not falling
• What to use for the chassis, motors, here in Part 1, I want to take you off. If we prioritize these objectives,
wheels, and sensors? through the steps and the processes for we see the following order:
designing the mechanical side of my bot
• What to use for software and how and in Part 2, I will go over the software • Don’t fall out of the ring.
I used and the program I • Don’t get pushed out of the ring.
wrote. I should issue a brief • Locate the opponent.
disclosure here: not all these • Push the opponent out of the ring.
ideas originated with me; I did
extensive searching on the Considering these priorities gives
Internet and brought together us some ideas about the direction of
many ideas, as well as some the design. To prevent an accidental
of my own. drive off the edge of the ring will
require sensors looking downwards
THE MINI SUMO for the white perimeter line on both
the front and rear of the robot. These
CHASSIS will also help us — if possible — to
avoid being pushed out of the ring.
The basic function of the Locating the opponent requires anoth-
chassis is to serve as a er sensor, but a different kind. What
we need here is a distance sensor,
■ PHOTO 1. CAD drawing of something which will allow the robot
the completed wheel system. to look across the ring and see if there
26 July 2006
PersonalRobotics.qxd 6/6/2006 11:35 AM Page 27

PERSONAL ROBOTICS

is an object (opponent) in its view. m*(v *v), in English: kinetic energy


Finally, this brings us to attacking equals mass times velocity squared. THE WHEEL SYSTEM
our opponent, and the only thing at The consequence of this formula for us As you can see, this “wheel
hand to do that is the ‘bot itself. This is that the faster you go, the more ener- system” is not a store-bought item, but
means we must make the best of what gy you hit the other ’bot with and since rather was designed from scratch to
we have and shape the chassis as our mass is a constant (we can’t exceed present the maximum wheel surface
much as possible so that it will be the the weight constraint), increasing the to the ring, to have a sticky surface,
most efficient at pushing the other velocity variable is a viable strategy. and to have incorporated within it
‘bot out of the ring. I think there are (Also, because the velocity is squared, (actually inside it) a gear head motor
several strategies here which we can it is more important to increase it, which is capable of providing speed
bring to bear to accomplish this. rather than the weight.) This will result and torque. The wheel system is
in a fairly agile ‘bot, so care must be basically composed of three separate
MECHANICAL taken in not dashing off the edge.
Hitting our opponent as fast as
parts: the rim, the motor (which fits
almost completely inside the rim), and
STRATEGIES we can (translate to hard with lots of a molded rubber tire.
energy) and getting under it while The motor I used is made by
The first thing we should consider lifting a wheel off the ground is good, Copal. It has a gear head built in with
is the amount of friction our wheels will but then we have to push it out of the a 74:1 ratio and is specified at six
have with the surface of the Sumo ring. ring. This brings us to the last mechan- volts. The torque rating after gearing is
This is important for two reasons. The ical strategy and that is torque, often about 43oz/in and, in addition, I over-
first is that when we attack our oppo- the opposite of speed. The design of drove this motor with fully charged
nent, we will need to push as hard as the wheel/motor “sub-system” has LiPols, producing about 8.4 volts.
possible without having our wheels to be a compromise allowing for a There is a stack of torque here. As
slip. In effect, we need to “out friction” balance of speed and torque, an example, a string wrapped around a
the other guy so he is the one slipping. however, there a few motors on the two-inch diameter wheel on this motor
Next, when our opponent is attacking market today which can offer both. could lift almost four pounds ... our
us, we want to hold our ground and not ‘bot weighs one pound, so we need
be pushed across the ring. Again, we
need to “out friction” the other guy. I
THE DESIGN AND the large area and the sticky surface of
the wheels we are designing. I also
believe accomplishing this is all about CONSTRUCTION designed the wheel so it had a final
wheel surface area and wheel surface diameter such that the ‘bot would
“gooeyness” (that’s a technical term). The rest of this part will be travel at around 12 inches per second.
The second consideration involves devoted to discussing the actual Note that this means the ‘bot will go
the best way to “unstick” our oppo- mechanical design and construction from one end of the ring to the other in
nent; that is, break the friction they of my Sumo ‘bot, illustrated with about 2.5 seconds. Lots of speed, but
have between their wheels and the copious images and photos. we will also have to be very responsive
surface of the ring. The solution to this Several of the strategies above to the line sensor in order to avoid
is hinted to in the previous sentence involved making sure the robots’ running out of the ring (see Photo 2).
“break the friction they have between wheels have the most friction possible Other than the motor, two
their wheels and the surface.” And the with the surface of the ring, that the additional components make up the
best way to do that is to get under bot moves fast when it has to, and at wheel system:
them and lift at least one wheel off the the same time is capable of exerting
ground. If we can do that, it will mean lots of torque. To satisfy these objec- • The rim, which was turned out of an
they will easily slide across the surface tives, I decided to
and off the edge (we hope). create a “wheel
Conversely, a third strategy has to system” by actually
be not letting the opponent get under building my own
our ‘bot and lift a wheel off the wheels from scratch
ground. This would be disastrous and and incorporating a
leave us vulnerable to being pushed motor inside the
out of the ring. wheel. Take a look at
The next strategy is speed. Yes, Photo 1. This graphic
speed. You might think that moving is a CAD representa-
slowly and “strongly/powerfully” would tion of the complet-
be the answer, but not necessarily so, ed wheel system.
especially during the launch of the
attack. Consider this simple formula we ■ PHOTO 2. Copal
all learned in high school physics: k = gear head motor.
July 2006 27
PersonalRobotics.qxd 6/6/2006 11:36 AM Page 28

■ PHOTO 3. CAD drawing of the placed in the hole that has the slight
turned rim and finished rim. counter sink which acted as a locater
and gave a better seal. Push the plunger
making up the tire mold: slowly until just a little of the fluid
comes out of the other hole, and then
• Two identical end caps. set it aside for about six hours. Oh, I for-
• The central tube. got, I also purchased Synlube 531 Wax-
• A threaded rod which holds it all Based Mold Release Agent with which
together. I sprayed the inside of the tube — do
not spray the rim. This, in theory, allows
For an idea of what the the rim and tube to separate easily,
unassembled parts look like, take a although I had to slide a feeler gauge
look at Photo 4. inside the rim to get it to come apart.
Assembly involves putting the So that’s it! Make two of these
threaded rod through the bottom and you have the wheels ready to
end cap (although you can’t see it, accept the Copal motor (see Photo 8).
the bottom of the bottom end cap is The next thing to do is to build a
counter sunk to take the head of the “Motor Block” which will hold the
threaded rod) and then placing the motor and wheel and, at the same
rim firmly on top of the end cap (see time, mount firmly onto the chassis
Photo 5). Photo 6 shows the tube in base. The wheel block was cut out
aluminum bar. place, ready for the top end cap. of aluminum and I had originally
Finally, the top end cap is put in intended to cut a slit and have a screw
• A tire, molded over the rim. place and the wing nut is tightened that would tighten it onto the motor.
down. We don’t want any of our Instead I got lazy, didn’t cut the slit,
The rim was designed to be casting material to leak past the end and glued the motor in place. In hind-
mostly hollow to allow the motor to fit caps (see Photo 7). sight, cutting a slit would have been
as far into it as possible; it looks a little Okay, the mold is completely the better mechanical design. Photos
like a thread spool which has been assembled and ready for the casting 9 and 10 show a CAD drawing of the
hollowed out (see Photo 3). material. Note that on the top end wheel block and a mock-up of the
Now, how do you cast a tire? cap, two small holes were drilled: one wheel system mounted to the block.
What do you use for a mold and what as input for the casting fluid and the This completes a wheel unit
substance do you use for the tire other for the excess to come out. The which may be screwed directly onto
itself? Let’s tackle the mold first. casting fluid I used is called Por-A- the chassis base with machine screws.
Mold (the two quart kit Por-A-Mold As a “self contained” unit, it may be
THE TIRE MOLD Soft Kit #33508-1308), which I
purchased online from DickBlick.com
removed and or replaced as a whole,
without affecting the rest of the ‘bot.
Just as the rim is custom turned, The soft version of this is fairly
so are the parts that make up the
mold. The mold forms an enclosure
sticky/gooey (good co-efficient of fric-
tion), and is very flexible and durable.
THE BASE OF THE
around the rim, leaving a vacant area I used an empty syringe without ‘BOT CHASSIS
where we want the rubber to be. the needle to carefully squeeze in a mix
These are the individual pieces of the casting fluid. The syringe was Finally! We get to build the base

■ PHOTO 4. Mold components ■ PHOTO 5. Mold partially assembled, ready ■ PHOTO 6. Mold partially
and rim. for the tube and top end cap. assembled, ready for the end cap.

28 July 2006
PersonalRobotics.qxd 6/6/2006 11:36 AM Page 29

PERSONAL ROBOTICS

■ PHOTO 7. Mold completely assem-


bled, ready for the casting solution. ■ PHOTO 8. Completed wheel. ■ PHOTO 9. Motor block.

of the chassis. This, of course, is


what the wheel blocks will
mount to and it will hold the
sensors, the electronics, and the
batteries, as well.
In keeping with our initial set
of strategies, we want to design
this so that it is as low to the ring
surface as possible to prevent
our opponent from getting
underneath us. It must also be
capable (if possible) of getting ■ PHOTO 10. Wheel system and
underneath our opponent. motor block.
Photo 11 is a CAD drawing of the
chassis showing the areas where the machine screws. The bottom of
wheel block will mount, the slots for the chassis must be counter sunk ■ PHOTO 11. Base of the chassis.
the sensors, and — most importantly — to match. See Photo 12 for a CAD
the front edge which is angled at mock-up of the completed ‘bot Photos 13 and 14 are the assembled
about 20 degrees. chassis with wheel system. ‘bot with sensors and electronics. The
As you can see, this front edge It’s all coming together, so it’s time space below the electronics board is
presents the opponent with a sharp to wrap it up. Hopefully, I’ve given you reserved for the LiPol batteries.
edge, which will lift his wheels off the a glimpse of what a good Mini Sumo Next month, we will focus on the
surface. design might be like and what you can real-time operating system I used and
The motor blocks screw onto the do with some patience and perhaps my program for reading sensors and
base chassis with counter sunk the loan of a friend’s machine shop. attacking the opponent. NV

■ PHOTO 12. Completed chassis ■ PHOTOS 13 and 14. Completed ‘bot with electronics and sensors.
with wheel system.

July 2006 29
Page30.qxd 6/8/2006 10:19 AM Page 30

The Mouser Advantage:


Faster Time to Market

• Over 40,000
Products
Stocked
• Access to over
1.5 million
electronic parts
and related
products

• Installer/Dealer
pricing program

• Quotation team,
send us your
quotes for quick
FREE ! response
Catalog
call toll free
1-800-543-4330
refer to or visit Experience Mouser’s time-to-market
www.mcminone.com/magazine advantage! Our vast selection of the
NEWEST products, NEWEST technologies,
no minimums, and same-day shipping on
most orders, gets you to market faster. We
make it easy to do business with Mouser! NEW Products
for NEW Designs

mouser.com (800) 346-6873

The NEWEST Semiconductors | Passives | Interconnects | Power | Electromechanical | Test, Tools & Supplies from Mouser Electronics
Source Code: NVM39 Mouser and Mouser Electronics are registered trademarks of Mouser Electronics, Inc. Other products, logos, and company names mentioned herein, may be trademarks of their respective owners.

30 July 2006
Full Page.qxd 6/8/2006 10:48 AM Page 31

TM
NewProductsJuly06.qxd 6/7/2006 5:16 PM Page 32

NEW
■ HARDWARE
■ SOFTWARE
■ GADGETS
■ TOOLS

P R O D U C T S
THE TENLAB The TR-50 is
available now at re-
cards, the PC installed with the DVRC-
TI series card doesn’t need to be
TR-50 sellers and distribu- dedicated. The DVRC-TI series cards
tors nationwide with a MSRP of $399. support triplex operation, any chosen

P AL, NTSC, SECAM T V systems


converters with 12 VDC operation
add global T V capabilit y to ships,
For more information, contact:
TenLab USA
channel can operate live viewing, play-
back, recording, and network accessing
simultaneously. Up to four cards can be
airplanes, cars, and RVs. 27346 Oak Summit Rd. operated and displayed on the same
Different TV systems around the Agoura Hills, CA 91301 interface. It provides a watermark func-
world have historically created video Tel: 818-706-8120 tion to prevent forgery and provides a
Fax: 818-706-3643
communication problems. A DVD low power consumption.
Email: info@tenlab.com
purchased in the US cannot be Web: www.tenlab.com
watched in Europe, or vice-versa. A For more information, contact:
family may find that all their TV and Matco, Inc.
video equipment is useless when they 649 S. Vermont St.
Palatine, IL 60067
move to a different country. This
incompatibility becomes a major
H.264 DSP Web: www.matco.com
problem for airplanes and ships that HARDWARE
move from one country to another. COMPRESSION
The new TR-50 video converter
DVR CARD FROSTED LED
by TenLab is an affordable quality
TUBE LIGHTS
solution performing TV standard
conversions in both AC and DC M atco, Inc., announces the release
of its break-through technology
environments. It converts from
every TV system in the world: PAL,
NTSC, SECAM, PAL-M, PAL-N,
DVRC-TI Series
H.264 DSP
hardware com-
L EDtronics®
announces
TBL3xxF Series
PAL-60, to PAL and NTSC. pression video Sealed Tube LED
The TR-50 comes equipped capture card. Light Strips that of-
with an AC adaptor to also be used T h e fer great illumination in many versatile
as a desktop unit in a variety of DVRC-TI series applications. The TBL3xxF series tube LED
applications including: DVR cards apply the most advanced comes in a milky frosted lens that pro-
video compression technology for vides a great looking diffused illumination
• Copying tapes or DVDs from/to video recording and transmission. The on applications such as RVs, buses, trains,
PAL, NTSC. on-board DSP (Digital Signal Processor) task lighting, under cabinets, concealed
compresses the input video signals into lighting, edge lighting, cubicles, marine
• For use with video or TV equipment H.264 format, which is the latest ISO recreation applications, retail store dis-
in a country using different TV video compression standard. The H.264 plays, and more. The construction of a
systems. file is only one-third the size of MPEG-4 sturdy UV-resistant polycarbonate hous-
and it delivers excellent video quality ing over the LED tube provides increased
• For use with medical or industrial across the entire bandwidth spectrum — protection and shielding against many en-
equipment imported from a country from 3G to HD (from 40 Kbps to vironmental effects, allowing you to place
with a different TV system. upwards of 10 Mbps). Since the video these light tubes in locations where typi-
signal is processed by hardware, no cal lights would be more vulnerable to
TenLab has been producing quali- video processing program is operated the elements. Furthermore, TBL3xxF se-
ty TV and video converters since 1988, by the PC, no PC resource (CPU, RAM) ries tubes come in a variety of lengths (6”,
with 10 models to meet consumer to is consumed so that any PC can be 12”, 24”, and 48”) to fit in many different
professionals’ video needs. Complete used for real-time video recording and locations, tight enclosures, and spaces.
product information can be found at real-time remote monitoring for each These frosted LED tube lights come
the company’s website. channel. Different from previous DVR in 6000K Pure White and 3000K Warm

32 July 2006
NewProductsJuly06.qxd 6/7/2006 5:17 PM Page 33

■ H A R D W A R E ■ S O F T W A R E ■ G A D G E T S ■ T O O L S

White colors all operating at 12V. Both play, 51,000 Count DMM is the latest ranges and adjustable duty cycle, con-
whites use .96 watts for the 6” model, addition to its growing line of test and forms to IEC-1010-1 600V CAT IV and
2.16 watts for 12”, 3.84 watts for 24”, measurement instruments. The new 1000V CAT III, and it is CE approved.
and 7.68 watts for 48” lengths. Pure hand-held, battery powered DMM of- The new Deluxe Dual Display
white 6000K LEDs give off 52 lumens fers true RMS ACV and ACA, in addi- 51,000 Count DMM offers versatility
at 6” lengths, 116 lumens at 12”, 206 tion to many features that are useful for and reliability for a broad spectrum of
lumens at 24”, and 413 lumens at 48” troubleshooting complex electrical and bench-top and field applications. In
sizes. Warm White 3000K LEDs radiate electronic circuits. The Model 2890A addition to the unit’s two backlit five-
40 lumens for 6”, 89 lumens at 12”, 158 can also be used to test and evaluate digit LCD readouts that can display
lumens at 24”, and 317 lumens at 48” circuits in a field service application. both ACV and frequency simultaneous-
length sizes. Other varieties of LED col- The Model 2890A is the ideal tool to ly, the meter can be used to measure
ors are available for OEM customers. get the job done quickly and econom- DCV, ACV, DCA, ACA, OHM, diode
Along with each LED tube strip is a ically, and is a must for every tool kit. check, audible continuity, temperature,
mounting clip (MTG-CLIP-STP-001) that The Model 2890A’s features frequency, duty cycle, and pulse width.
snaps onto the back of the tube. Two include true RMS ACV and ACA, Compact (7.56” x 3.55” x 1.46”)
clips are provided per foot of tubing. AC+DC true RMS, five digit LCD for (192 x 90 x 37 mm), and light weight
Each clip has a location for a self tap- both primary and secondary displays, (2 lbs) (936 g), the unit is available for
ping screw that allows users to mount 21 segment analog bar graph, automat- immediate delivery. It is priced at
the LED tubing in different locations. ic polarity indicator, 0.025% basic DCV $305, and comes complete with 9V
Solid-state design renders LEDs accuracy, resistance measurements up battery, test leads, carrying holster,
impervious to shock, vibration, frequent to 500 MΩ, conductance measure- and manual. A complete line of
switching, and environmental extremes. ments up to 50 nS with 0.01 nS resolu- optional accessories is also available.
With an average life span of 100,000- tion, capacitance measurement, fre-
plus hours (11 years), LED lamps oper- quency with ACV measurement, data For more information, contact:
ate more than 20 times longer than the hold, dBm measurement, REL mode, 1 B&K Precision Corp.
equivalent incandescent lamp. LED ms peak hold for glitch capture, back lit Tel: 714-921-9095
lamps produce almost no heat and re- LCD, frequency counter up to 20 MHz, Fax: 714-921-6422
quire 80%-90% less operating power squarewave output with 28 frequency Web: www.bkprecision.com
than equivalent incandescents, making
them as friendly to the environment as
they are to the operating budget.
Prices for TBL3xxF series sealed
tube LED lights retail from $26.95 to
$108.35, depending on length. Large
quantity discounts are available.
Availability is stock to 4-6 weeks for
special requirements. TBL3xxF LEDs
carry a three-year limited warranty.

For more information, contact:


LEDtronics, Inc.
23105 Kashiwa Ct.
Torrance, CA 90505
Tel: 800-579-4857 or
310-534-1505
Fax: 310-534-1424
Email: webmaster@
ledtronics.com
Web: www.ledtronics.com

DELUXE DUAL
DISPLAY, 51,000
COUNT DMM
B &K Precision Corporation’s new
Model 2890A Deluxe Dual Dis-

July 2006 33
Page34.qxd 6/8/2006 10:20 AM Page 34

G 
LUH QJ
TX U L
UH ROGH

G 
6

LUH QJ
TX U L
UH ROGH
7KH(VFDSH5RERW¶VEXLOWLQ

6
PLFURSURFHVVRUHQDEOHVLWWR (/(&7521,&&$1'/(
FDQQRWEHEORZQRXWE\WKHZLQG6DIHIRU
³WKLQN´RQLWVRZQ
NLGVDQGSHWV*UHDWDWKRPHIRUSDUWLHV
;PDV+DOORZHHQHWF
PP:KLWH
ZDWHUFOHDU
/('9
PFG &RPSOHWH&DUG
 0HORG\8QLWµ+DSS\
%LUWKGD\¶%DWWHU\DQG
SLH]RDOOUHDG\WRSOD\
VHFRQGYRLFHUHFRUGHUSOD\EDFN $VIRXQGLQ&KULVWPDV
PRGXOH7KHHOHFWUHWPLFURSKRQHLVRQWKH FDUGVDQGERRNV
ERDUG2QHEXWWRQWRUHFRUGWKHRWKHUEXWWRQ
MXVWKDVWREHPRPHQWDULO\SUHVVHGWRUHSOD\ 7KH9HOOHPDQ
3HUVRQDO6FRSH
WKHPHVVDJH SUHDVVHPEOHG 
LVQRWDJUDSKLFDO
86%3,& PXOWLPHWHU
3URJUDPPHU EXWDFRPSOHWH
$VVHPEOHG  SRUWDEOH
]LIVRFNHW RVFLOORVFRSHDW
LQFOXGHG WKHVL]HDQGWKH
)UHHVRIWZDUH FRVWRIDJRRG
 PXOWLPHWHU

(OHFWURQLFVFRP7HO
(3DUN$YH&ROXPELDQD2+86$

1HZ7KH3&2VFLOORVFRSHWKDW
¿WVLQWKHSDOPRI\RXUKDQG
7KH3LFR6FRSH 3&2VFLOORVFRSHV

7KLVFRVWHIIHFWLYHVROXWLRQLVD3&2VFLOORVFRSHFRQQHFWHGDQG
SRZHUHGYLDWKH86%FRQQHFWLRQ(UJRQRPLFDOO\GHVLJQHG
WR¿WLQWKHSDOPRI\RXUKDQGWKLVLVWKHSHUIHFWSRUWDEOH
FRPSDQLRQIRUWRGD\¶VHQJLQHHURQWKHJR+DQG\WRWUDYHO
ZLWKDQGHDV\WRVHWXSIRUWKHQRYLFHDQGWKHSURIHVVLRQDO
WKH3LFR6FRSH SURYLGHWKHSHUIHFWVROXWLRQWR
\RXUWHVWDQGPHDVXUHPHQWQHHGV$VZLWKDOO3LFRSURGXFWV
OLIHWLPHVRIWZDUHXSJUDGHVDQGWHFKQLFDOVXSSRUWDUHDYDLODEOH
IUHHRIFKDUJH

‡8SWR06VUHDO ‡6XSSOLHGZLWK3LFR6FRSH
WLPHVDPSOHUDWH 3LFR/RJDQGELW
SURJUDPPLQJOLEUDULHV
‡8SWR0+]
EDQGZLGWK ‡&RPSDWLEOHZLWK:LQGRZV
6(0(DQG;3
‡'LJLWDO(76HQKDQFHV
UHSHWLWLYHVLJQDO ‡NVDPSOHEXIIHU
VDPSOHUDWHWR*6V V
WX
3LFR6FRSH  WDF
&RQ GD\
3UHVHQWHGLQDKDQG\SURWHFWLYHFDVHSHUIHFWIRU\RXUWRROER[
6LQJOH&KDQQHO6FRSH6ROXWLRQV WR

6WDUWLQJDW

ZZZSLFRWHFKFRPKDQGKHOGQY 
34 July 2006
Full Page.qxd 6/6/2006 2:33 PM Page 35
Eyton.qxd 6/6/2006 10:50 AM Page 36

PROJECTS ●●●●
■ THIS MONTH’S PROJECTS
Stereo Microphones . . . . . . . . .36 LONG-RANGE

S T E R E O
Control Your World — Part 2 . . .40

The TrainSaver . . . . . . . . . . . . .46

■ LEVEL RATING SYSTEM


To find out the level of difficulty
for each of these projects, turn
MICROPHONES
to our ratings for the answers.
A readily available Velleman
“Super Stereo Ear” Mini Kit, or
a new undertaking. I used the guide-
lines given by Charles D. Rakes in his
●●●● . . . . Beginner Level manufactured “for the hard of December 2002 Poptronics article,
hearing,” microphone/amplifier “An Ear to the Outside World” (pp.
assemblies, plus some PVC tubing, 55-58), to construct the long-range
●●●● . . . . Intermediate Level foam inserts, a few pieces of wood, microphones presented in this article
and a handful of nuts, bolts, and but with one big difference — my
●●●● . . . . Advanced Level volts is all that is needed to build a design incorporates a dual micro-
stereo microphone system that lets phone system so that the listener can
●●●● . . . . Professional Level you pick up distant acoustic signals hear in stereo. I find that using two
with clarity and accuracy. microphone/amplifier systems (one
Using electronics to listen in on for each ear) placed at spacings of two
birdcalls or other distant sounds is not to three times the normal ear-to-ear

■ FIGURE 1. Three views of “Big Mike” showing the arrangement for the two
Friends, birders, 24-inch microphones fastened about 18 inches apart on a simple altazimuth
mount. The center tube is an optional Galilean telescope.
electronics
enthusiasts, lend
me your ears
so that you may
listen to faraway
sounds using
these easily built
long-range stereo
microphones.

(with apologies to
William Shakespeare
and Mark Anthony) ■ FIGURE 2a

36 July 2006
Eyton.qxd 6/6/2006 10:50 AM Page 37

BY J. RONALD EYTON

■ FIGURE 2. Construction details and


dimensions for the microphone tubes
and mount: (a) Microphone tube; (b)
Interior section of the altazimuth mount;
and (c) Front of altazimuth mount.

■ FIGURE 3. Front view of the


microphone tubes showing the plastic
foam inserts (blue) used as sound
dampening material.

■ FIGURE 4. Placement of the


battery holder for three AA batteries
and of the Velleman “Super Stereo Ear”
printed circuit board is visible, along
with a close-up look at the altazimuth ■ FIGURE 2b
mount construction.

distance (about 6-7 inches for an ■ FIGURE 2c


adult) enhances the listening experi-
ence in terms of sensitivity to nearly
inaudible sounds and sensitivity to
direction. I constructed two systems.
One system, which I call ”Big Mike”
(see Figure 1), follows more closely
the instructions given by Rakes for
creating a mono, long-distance mic.
Figures 2a, 2b, and 2c show the
details for constructing ”Big Mike.” I
had a hard time finding thin sheets of Ear,” which is ideal for this project. of each tube. Close-ups showing details
foam rubber to act as sound insulating Figure 4 shows the placement of the of the microphone element-to-funnel
material and instead cut up a plastic stereo amplifier and the battery holder assemblies are shown in Figure 6.
foam camping mattress that was on top of the wood mounting platform. The two 3 x 24 inch PVC tubes
about half an inch thick (see Figure 3). Figure 5 shows where the electret with insulating foam and end caps
The microphones are sensitive microphone elements — glued inside weigh about 10 lbs. I found it neces-
electret elements that are part of the orange plastic funnels — are located in sary to attach them to a crude (but
Velleman kit MK136 “Super Stereo order to channel the sound at the end effective!) wood altazimuth mount

July 2006 37
Eyton.qxd 6/6/2006 10:53 AM Page 38

■ FIGURE 6a

■ FIGURE 5. Back of the microphone


tubes showing the hookup wires for the
electret elements exiting the orange fun- ■ FIGURE 6b
nel stems sticking through the two inch
PVC end caps. Gorilla Glue was used to ■ FIGURE 6. Close-up views of the funnel/microphone/end cap assemblies.
glue the funnels in place and Goop was (a) Left end-cap unassembled; right end-cap in final configuration. (b) Close-up of
used to glue the two-inch PVC end caps funnel in end-cap; the electret element has been glued into place about 1/2 inch
to the 3 x 1-1/2 inch PVC pipe increasers. down the exit throat of the funnel stem.

(see Figure 4) using with lenses you can order from them.
“BIG MIKE” four-inch PVC pipe A second, smaller system, based
PARTS LIST as a pier. The optical
telescope in the
on the same principles as Big Mike, was
constructed as a handheld unit (Little
QTY ITEM/DESCRIPTION middle between the Mike) and is shown in Figure 7. This
❑2 24 x 3 inch PVC pipes two mics is not project makes use of readily available
❑2 3-inch PVC hub-to-hub couplings necessary, but if you components and a small wooden
❑2 3 x 1-1/2 inch PVC hub-to-hub pipe increasers
❑2 Two-inch PVC soc caps
are looking for an mount that requires only a little cutting
❑2 Two-inch diameter funnels from set obtained at excuse to make and and gluing. The two microphone/ampli-
American Science & Surplus (www.sciplus.com), use a Galilean fier assemblies (see Figure 8) are the
part number 91078 (You will need to order two telescope (which type you find in household gadget cat-
sets of four funnels to get the two funnels you provides a correct, alogs with names that include “Sonic”
need — these are hard to find and this set is
inexpensive @ $1.75 per set.)
right-side-up view), and “Super Ear.” They work quite well,
❑2 1/2 x 24 x 8 inch pieces of foam camping mattress this is a reasonable but the earphones accompanying them
pad or any other similar material suitable for construction oppor- are wired for mono listening with the
sound dampening tunity. The catalog single microphone/amplifier.
❑1 36 x 4 inch PVC pipe (pier) from Anchor A little cutting and soldering will
❑1 Four-inch PVC hub x hub coupling (pier)
❑1 Four-inch PVC hub closet flange (for base of pier)
Optical Surplus allow you to connect the left earphone
❑1 Velleman MK136 “Super Stereo Ear” mini kit (www.anchoropti to one microphone/amplifier and con-
(“boosts sound 50 times”) cal.com) has instruc- nect the right earphone from the same
❑1 Stereo headphone tions for building a headset to the other microphone/ampli-
Miscellaneous wood boards, hardware, and glue Galilean telescope fier so you can listen in stereo. And yes,

■ FIGURE 7. Photo of “Little Mike” con- ■ FIGURE 8. Pair of “Sonic Super Ears” ■ FIGURE 9. Rear view of “Little Mike,”
structed from two 13-inch long, two-inch used for the microphone/amplifier showing the two-inch outside diame-
diameter PVC microphone tubes mount- systems. The plastic case of one of the ter polyethylene foam pipe insulation
ed nine inches apart on a 12 x 5-1/2 x 3/4 microphone/amplifier systems is shown inside the PVC tubes. The microphones
inch wooden platform using 1/4 x 1/4 inch cemented into a 2 x 1-1/2 inch PVC pipe with foam covers (see Figure 8) fit
mounting rails and cable ties. increaser using Gorilla Glue. nicely into the 1-1/4 inch inside
diameter core of the polyethylene foam
pipe insulation inserts.

38 July 2006
Eyton.qxd 6/6/2006 10:52 AM Page 39

OVER 5000 UNIQUE OPTICAL PRODUCTS


since you bought two complete micro- WITH 5,000,000 IN STOCK!
phone/amplifier systems, you have one
headset left over — think of it as a spare.
The two PVC pipes used to house COMMERCIAL &
the microphones are, fortuitously, slight- EXPERIMENTAL
ly greater than two inches inside diame-
ter and will nicely accommodate the
GRADE LENSES
polyethylene foam-pipe insulating mate- • Start Up
rial that is two inches outside diameter • Prototype • Research
• Single Unit Applications
(see Figure 9). This makes for easy con-
• Educational Applications
struction; simply cut off an appropriate
• Initial Run Requirements
length of the two-inch PVC pipe (you
can try longer lengths than the 13-inch
length I used with perhaps better
results) and then cut off the same length
of the polyethylene foam-pipe insula-
tion and insert it into the PVC tube.
The microphones, which have their
own black foam cover, fit exactly into
the inside diameter of the polyethylene ANCHOR
foam insulating tube. I used 2 x 1-1/2 OPTICS
inch PVC pipe increasers as end pieces a division of Edmund Optics
so I could glue the amplifier housings A Catalog Devoted to Optics... New 84 page color catalog!
onto them to make rigid assemblies that ANCHOR OPTICS www.AnchorOptics.com/nv
could be placed at the end of the PVC Dept. B061-X916, 101 E. Gloucester Pike, Barrington, NJ 08007-1380
pipes. I did not glue the microphone/ Tel: 1-856-573-6865 • Fax: 1-856-546-1965 • E-mail: nv@AnchorOptical.com
amplifier/pipe increaser units to the end
of the PVC pipes, but simply used a
press fit, which turned out to be very ■ FIGURE 10. Rear view of “Little Mike”
snug and won’t come apart unless you with microphone/amplifier/PVC pipe
tap them lightly with a small hammer. increaser assemblies attached to the
I used a 12 x 5-1/2 x 3/4 inch PVC tubes.
wooden platform and plastic cable ties
to fasten the PVC microphone/amplifier Little Mike has two separate amplifiers
assemblies nine inches apart. A six-inch with separate volume controls, which
long, one-inch-diameter dowel attached may be useful if you are more hard of
to the underside of the wooden platform hearing in one ear compared to the
acts as a handle. This system, although other, but it does take a few seconds they are certainly fun to use, and they
much lighter than Big Mike, weighs to balance the sounds. In any case, do attract a crowd! NV
about 3-1/2 lbs. and can be tedious to
hold for long periods of time. A four-foot
by one-inch PVC pipe, with a 1-1/4-inch “LITTLE MIKE” PARTS LIST
rubber chair tip to act as a foot at one
end, can be used as a monopod — just QTY ITEM/DESCRIPTION
❑2 13 x 2 inch PVC pipes
slip the one-inch-diameter dowel handle ❑2 Two-inch PVC hub-to-hub couplings
into the pipe opening (the dowel handle ❑2 2 x 1-1/2 inch PVC hub-to-hub pipe increasers
visible in Figure 9 is shown mounted in ❑2 13 x 2 inch diameter polyethylene foam pipe insulation jackets for steel
the monopod pipe in Figure 10), and and copper pipes (You will need to measure the outside diameter and
you can effortlessly aim the micro- inside diameter of this material at the hardware store — depending on
the brand, they can vary considerably in size even though they are meant
phones anywhere you want. for fitting the same size pipe.)
Both setups work well and have ❑2 Microphone/amplifier systems that go by the trade name of Sonic Super
advantages and disadvantages. There Ear (A search on the Internet using the trade name will produce a
are obvious differences in transport- number of sites — check out all sites as prices vary considerably.)
ing ease and handling ability, due to ❑1 48 x 1 inch PVC pipe (for monopod)
❑1 1-1/4 inch rubber chair tip (for monopod)
size and weight. Big Mike is more sen- Miscellaneous wood boards, hardware, and glue
sitive to direction but is also noisier.

July 2006 39
Simpson2.qxd 6/6/2006 10:56 AM Page 40

●●●●
A while back, I
was researching
sensors for a project
CONTROL YOUR

WORLD
I was working on
when I came across
a little device called
a CMUcam.
PART 2 — Interface Your PC to
The CMUcam is a the CMUcam
low-cost vision
sensor developed T here are two versions of the
CMUcam being sold now: the
perfect for creating web pictures, but
it works great for an image sensor
by Carnegie original CMUcam and
CMU2cam2. I will concentrate on the
the with an RS232 interface.

Mellon University lower-priced CMUcam, but with slight Where Can I Get
modifications, the code presented a CMUcam?
(www.cmu.edu). here will work with both cameras. The
CMUcam has a resolution of 80 x 143 You can’t get a CMUcam
pixels. This low resolution may not be from Carnegie Mellon directly; you
The CMUcam has both must purchase it from a licensed
an RS232 level interface, Z EUS
manufacturer/distributor.
The CMUcam fully-assembled
as well as a TTL level ■ This article uses a Basic program- can be purchased from Images SI,
serial interface so you ming language called Zeus. Zeus is a
simple Windows programming
Inc., at www.imagesco.com This
camera comes with a small cable
can connect it to your environment that specializes in and will cost you about $109.
interface design. A special Nuts &
favorite microcontroller Volts version of the software is
The CMUcam2 camera comes
in a couple of variations, which can
or directly to a PC. available free, along with the
application and source downloads on be purchased from Acroname at
the Nuts & Volts website (www.nuts- www.acroname.com The camera
volts.com). A couple compiled appli- I interfaced was a CMUcam2+,
cations are also provided for those and does not include a RS232 level
who don’t want to play with the code. converter. The camera and level
This article will not present the
actual source code for space consid-
converter will run you about $181.
erations. The actual source code is None of the cameras come with
included in the download and has a printed manual. You will have to
plenty of comments that explain the download the latest manual from the
sections where appropriate. web. The manual will have all the con-
nections and jumpers for the
camera, as well as a list of all
■ FIGURE 1 the interface commands. The
CMUcam2+ comes with a
hookup sheet since it has a
different hardware layout
than the CMUcam2.

The Interface
The camera I purchased

40 July 2006
Simpson2.qxd 6/6/2006 10:57 AM Page 41

BY MICHAEL SIMPSON

came with a very small RS232 cable, so


you will need a nine-pin male to female
straight-through cable to connect your
PC. The camera has jumpers to set the
baud rate to 9600, 19200, 38400, and
115200. All the programs used here
have the 115200 rate, so set the jumpers
accordingly. If you have a slow machine,
you may want to use one of the slower
baud rates. The camera requires six to
nine volts DC to run. There is a single
two-pin header used to connect your
power source. I soldered a 2.1 power
coax connector to a two-pin female
header so I could use an AC adapter.
(Tip: I took a standard 2.1 coax and ■ FIGURE 2
soldered it to the two power terminals, as
shown in Figure 2. This can be done on commands that support double buffer-
both the CMUcam and the CMUcam2+.) ing. They are FormUpdateAutoOff and
You can also use a nine-volt battery, but FormUpdate. The FormUpdateAutoOff ■ FIGURE 3
you will have to make the connector. turns the automatic update system off
To get started, let’s look at the DF and the FormUpdate command lets us For our security application, we will use
command. This command tells the update the form manually. the first three. The cool thing here is that
camera to dump a single frame of Load and run CMUProgram2.txt. we get several readings per second so
data. This will help us focus the This program uses the new commands our program can be very responsive.
camera and is one of those instant and updates the form as each column Load and run CMUProgram3.txt. I
gratification things we geeks like to see completes. This program also continu- have included a wave file called
when we purchase something new. ously dumps the frame. Notice the Bell.wav. Place it into the same direc-
The DF command dumps a difference? In many cases, you can’t tory as the program code. After a few
complete frame (80 x 143 image) of even tell the image is updating unless seconds, the average readings will be
data in the form of 1 2 r g b r g b r g the image itself changes. stored into variables and, if there is a
b ... 2 r g b r g b ... 3 You may have noticed that the deviation of more than 20 units in any
actual display resolution was 160 x one color, it will trigger an alarm. The
where: 143 not 80 x 143, as stated earlier.
1 = Frame Start The column pixels are doubled to ■ FIGURE 4
2 = New Column correct the aspect ratio during display.
3 = Frame End
r = Red value 16-240 Turn it Up
g = Green value 16-20
b = Blue value 16-240 As a practical example, let’s look at
a security application. We can point the
Start by loading the program camera at an item or entrance to scan
called CMUProgram1.txt and then run for a change in pixels. The problem is
it. If you have the correct comport set, that it takes nearly five seconds to pull
you should see the image start to dis- in the image using the DF command.
play column-by-column until it is built. The CMUcam has several built-in
Figure 3 shows a typical capture. commands that let the camera actually
Did you notice the flicker as the image analyze much of the data for us. One
was being drawn? This is typical when command is called the GM command,
you are building a graphic image as we which stands for “Get Mean.” This com-
are. One way to create a smooth and mand constantly dumps six values: Red
clean image is by using a method Color Average, Green Color Average,
called double buffering. The free ver- Blue Color Average, Red Deviation,
sion of ZeusDeskTopNV v1.50 has two Green Deviation, and Blue Deviation.

July 2006 41
Simpson2.qxd 6/6/2006 10:57 AM Page 42

the form when the alarm is triggered. mine the direction the object is moving.
Figure 5 shows such a dump after I The CMUcam2+ supports five ser-
turned on a light that caused the vos and four I/O ports. The camera also
alarm to trigger. has a sleep mode to conserve power.
You could also modify the The CMUcam has only a single servo
ProcAlarm function to return different hookup. The CMUcam2+ is also much
codes based on which color actually faster than the CMUcam and outputs a
tripped the alarm. better quality picture in poor lighting.
Read the CMUcam manual and The downside to the CMUcam2+
take a look at the many other com- is that if you want to control the cam-
mands. The camera has a servo connec- era with a PC or Pocket PC, you will
tor and commands to control it. You can need a RS232 level shifter.
even set up the camera to track objects. Which is better? It all comes down
to how much you want to spend.
The CMUcam2+ Other than the RS232 level shifter, the
CMUcam2 will do everything the
There are command differences CMU2cam will do, but it costs nearly
between the CMUcam and the $80 more and has a bigger footprint.
CMUcam2. I have included three I have included two CMUcam2
■ FIGURE 5 CMUcam2 program files that will source files. They are called CMU2
work on a CMUcam2 or CMUcam2+. LowResDump.txt and CMU2HighRes
output should look like the form in I thought it important to describe Dump.txt. This will get you started
Figure 4. a few of the differences between the with the CMUcam2 if you decide to
CMUcam and the CMUcam2+. go that route.
Going Further The CMUcam2+ has two resolutions. As a bonus, I created three
The lower resolution is 87 x 143 and applications with ZeusPro. The first is
Okay, so we can trigger an alarm; the higher resolution is effectively 175 a fancy version of the CMUcam alarm
let’s take a look at CMUProgram4.txt. x 254, regardless as to what the program for the CMUcam2. This
Here, we made a few slight modifica- manual states. program will dump the image that
tions to the ProcAlarm function. The The CMUcam2+ buffers the inter- triggered the alarm to disk in the form
function now returns 1 when an alarm nal images so that when dumped, it will of a 350 x 255 jpeg.
is triggered and 0 if not. not blur. There are also several more The other two programs are small
We also added a function called tracking commands for automated web servers that will dump an image
SnapShot that dumps a frame on to tracking, as well as feedback to deter- every 60 seconds and serve it up over
the Web if requested by a browser. Not
to leave anyone out, I created both
CMUcam and CMUcam2 versions.
HobbyEngineering It is already built for you. The
applications, as well as the source can
The technology builder's source for kits, components, supplies, tools, books and education.
be found on the KRMicros website at
www.krmicros.com/Development/
Robot Kits For All Skill Levels ICs, Transistors, Project Kits ZeusPro/ZeusPro.htm
Motors, Frame Components What Else Can You Do?
and Scratch Builder Supplies.
The CMUcam has one servo
Order by Internet, phone, fax or mail.
connector and the CMUcam+ has
www.HobbyEngineering.com five. By mounting the camera to one
Books and 1-866-ROBOT-50 or more servos, you can utilize some
1-866-762-6850 of the built-in auto tracking features
Educational K 1-650-552-9925 or, at the very least, use Zeus to pan
1-650-259-9590 (fax)
sales@HobbyEngineering.com
and tilt the camera.
180 El Camino Real Experiment and have fun, and be
BEAM Kits and Components Millbrae, CA 94030 sure to visit the “Control Your World”
Visit our store near SFO! forum at www.kronosrobotics.com/
forums/viewforum.php?f=21 NV
Most orders ship the day received! World-wide shipping. Convenient payment options.
42 July 2006
Full Page.qxd 6/6/2006 2:35 PM Page 43

#1 in Price.
Lowest prices in the industry.
Absolutely. Positively. Guaranteed!

#1 in Availability.
Unbeatable turnaround on all your orders.
Over 99% of items are on-shelf and ready to ship!

#1 in Choice.
Major name-brand components—plus...
Exclusive generic equivalents for even greater savings!

No wonder Jameco’s becoming


the #1 go-to source for components.
Actual Jameco Savings vs. Other Major Catalogs
Name Brands House Brands
Best prices. Bar none. LED, T-13/4, Red, 1200mcd 12.5–44.0% 20.8–49.3% More choice: only at Jameco.
LEDTech LT1873-81-UR-P22 Savings Savings
Only Jameco guarantees You can get your favorite
you the lowest prices on Connector, RF, BNC, 50Ω 17.1–27.9% 31.6–40.5% name-brand components
Amphenol 31-202 Savings Savings
electronic components. at 10 to 15% off. Every day.
Cable/Wire, CAT 5E 10–20.6% 55–60.3%
Which is the number one Belden 1000' Savings Savings Or — choose top-quality,
reason engineers and buyers Molex Mini-Fit Jr™ R/A Gold 14.7–37.3% 22.1–70.7%
Jameco-guaranteed generic
are going to Jameco first. Molex 39-30-1241, 24 pos. Savings Savings equivalents, at 20 to 30% off!
Trimmer Pot,1/4" rnd, 1kΩ,.5W 15.6–28.9% 24.6–36.5% It gives you more options,
But that’s not all... Bourns 3329 P-1-102 Savings Savings smarter ways to save. But it’s
Jameco also gives unbeatable
See complete details at www.jameco.com/comparisons. available only at Jameco.
turnaround on orders.
Sound good? See for yourself. Call 1-800-831-4242
That’s because over 99% of their catalog items are
for your free catalog. Or go direct to the website...
always in stock and ready to ship.
And real people —not just voice mail —will take
orders 24/7. So you can order via the website,
email, fax or phone. Whenever you like.

They’ve got what you want! See for yourself, right now, at www.Jameco.com/NVN

July 2006 43
Page44.qxd 6/8/2006 10:21 AM Page 44

Turn Your PC into a Real-Time


Audio Spectrum Analyzer
Features
FFT to 1048576 pts
24 bit, 192kHz
1/96 Octave
Dual Channel
3-D Surface Plot
Spectrogram Plot
Digital Filtering
Signal Generation
RT-60, Leq, Delay
THD, IMD, SNR
DDE, Logging
Vibration Analysis

SpectraPLUS 5.0
FFT Spectral Analysis System

Download 30 day FREE trial!


www.spectraplus.com
Starting at $295

PHS Pioneer Hill Software


24460 Mason Rd
Poulsbo WA 98370
360 697-3472 voice
360 697-7717 fax
pioneer@telebyte.com

44 July 2006
Full Page.qxd 6/6/2006 2:37 PM Page 45

Get your teeth into our 410+ page catalog


jam-packed with over 780 new and
exciting products for 2006.
Claw your way on line to
www.jaycarelectronics.com/catalog and
request your new 2006 catalog - it’s FREE!
You can purchase from us 24/7/365 through POST AND PACKING CHARGES:
our secure encrypted system. Order Value Cost Order Value Cost
$25 - $49.99 $7.50 $200 - $499.99 $60
Post and packing charges are modest so you $50 - $99.99 $20 $500+ $75
can have any of 8,000 unique products $100 - $199.99 $40
delivered to your door within 7-10 days Max weight 12lb (5kg). Heavier
parcels POA. Minimum order $25.
of your order.
Starship Enterprise
Three Stage FM Transmitter
Smart Fuel Mixture KJ-8750 $12.75 + post & packing Door Sound Simulator
The circuit board may measure just 2 3/4”(L) x 2/3”(W), KC-5423 $23.25 + post & packing
Display Kit but it can transmit signals over half a mile in the open. It Emulate the unique sound made when the cabin
KC-5374 $17.95 + post & packing has flexible power requirements, with 6 to 12VDC input doors on the Starship Enterprise open and close. It
Features auto dimming for night driving, voltage (a 9V battery would be suitable). It is quick to can be triggered by switch contacts, which means
emergency lean-out alarm, and a 'dancing' build, and fun to use. Kit supplied with circuit board, you can use a reed magnet switch, IR beam or PIR
display which operates when the ECU is electronic components, and clear English instructions. detector. Kit includes PCB with overlay, case, all
operating in closed loop. • Recommended box UB5 HB-6015 $1.40 electronic
Kit supplied with PCB and all electronic components and
components with clear English instructions. clear English
• Car must be fitted with air flow and instructions.
EGO sensors (standard on all EFI • Requires 9-12VDC
systems) for full power
functionality.
• Recommended box
Tempmaster Kit
KC-5413 $23.25 + post and packing For all
UB3 HB-6014 $2.55 you Trekkie
Need accurate temperature for a wine cooler or beer
brewing heater? This project turns a regular fridge or fans
Universal High Energy Ignition Kit freezer into a wine cooler by
KC-5419 $55.25 + post & packing accurately controlling the
A high energy 0.9ms spark burns fuel faster and more temperature to make Battery Zapper MkII
efficiently to give you more power! This versatile kit it suitable for wine KC-5427 $58.00 + post & packing
can be connected to conventional points, twin points, storage. A much cheaper The circuit produces short bursts of high level
or reluctor ignition systems. Kit includes PCB, case and option than commercial units. energy to reverse the damaging sulphation effect in
all electronic components with Kit supplied with PCB, wet lead acid cell batteries. This improved unit
clear English instructions. case, mains plug & all features a battery health checker with LED indicator,
electronic components. circuit protection against badly sulphated batteries,
test points for a DMM and connection for a battery
We stock an Australian to US mains adaptor
charger. Kit includes
extensive range of required. Use PP-4020 $5.50
machined case with
quality automotive screenprinted lid, PCB with
kits Theremin Synthesizer Kit overlay and all
KC-5295 $34.95 + post & packing
The Theremin is a strange musical instrument that was electronic components
Voltage Monitor Kit invented early last century but is still used today. The Beach with clear English
KC-5424 $11.75 + post & packing instructions.
Boys' classic hit "Good Vibrations" featured a Theremin. By
This versatile kit will allow you to monitor the • Suitable for 6, 12, and
moving your hand between the antenna and the metal
battery voltage, airflow meter or oxygen sensor in 24V batteries.
plate, you can create unusual sound effects. Kit includes a
your car. It features a 10 LED bargraph that lights • Requires 9-12VDC
machined, silkscreened, and pre-drilled case, circuit board,
the LEDs in response to the measured voltage, power
all electronic components with clear
preset 9-16V, 0-5V or 0-1V ranges complete with a
English instructions.
fast response time, high input impedance and auto
• This product is also
dimming for night driving. Kit includes PCB
available built and fully
Battery Zapper Add-On Kit
with overlay, LEDs, all electronic KC-5428 $35.00 + post & packing
tested AM-4025
components and clear If you are one of our customers who purchased the
$64.95
English instructions. original Battery Zapper Kit, buy
• Requires 12VDC power Requires 9VDC this add-on and upgrade your Zapper
• Recommended box UB5 wall adaptor (Jameco to the full functionality of the
HB-6015 $1.40 #252751 $12.05). Battery Zapper MKII.

Log on to
www.jaycarelectronics.com/catalog
for your FREE catalog! New
410+ page
1-800-784-0263 Catalog
(Monday - Friday 09.00 to 17.30 GMT + 10 hours only).
For those who want to write: 100 Silverwater Rd
Silverwater NSW 2128 Sydney AUSTRALIA
Graner.qxd 6/6/2006 2:07 PM Page 46

●●●●
The TrainSaver is
a device that THE TRAINSAVER

D I G I T A L
reduces wear and
tear on model
train locomotives
used in commercial
environments.
ELECTRONIC TRAIN
The TrainSaver maximizes
the life of the engine by CONTROLLER
only running the train on
timed intervals, and only It All Started I began to mull over the

when people are present With a Hankerin’ problem and decided I should be
able to rescue the train from
for Bar-B-Que ...
to view the train’s abandonment while maybe at the
The PokeJo’s BBQ restaurant same time enhancing its value to
performance. This reduces that my fellow workers and I the restaurant. A few inquiries with
the cost of ownership frequent here in North Austin, TX, a local hobby shop showed there
has a nifty electric train that cir- might also be other applications for
of the train system by cumnavigates the entire restaurant. such a solution in enhancing the life
increasing the life of the As we entered the establishment
one afternoon, we noticed the train
of other toy trains used in commer-
cial environments. It seems that
engine. The device also was missing! A short chat with the the motor and gear train in many
adds synchronized sound manager revealed the train would
break down from continuous use
consumer grade trains are not
designed for the continuous use to
effects to enhance the and had to be sent to a repair shop. which they are put when placed in
Moreover, the cost of repairing the a commercial venue. Since there
train’s visibility to train engines had gotten high are a limited number of hours their
the audience. enough that the management had gearboxes and motors could
canceled plans to add trains to any provide, we needed to find a way
of their other locations to get the most out of them.
and was even consider-
ing retiring the existing Is it Train Time Yet?
train from our favorite
restaurant! Initially, my design revolved
around various
timer circuits to
A CKNOWLEDGEMENTS reduce the total
■ I would like to thank the following amount of time
people who were critical in making the the train spent in
TrainSaver a reality: Jim Huggans, Sharon a powered condi-
Sudduth, Nic Graner, Paul Atkinson, tion (presumption
Denise Scioli, The Robot Group of Austin, being less run
and the good folks at the PokeJo’s time = longer life).
BBQ restaurant. I built a simple
Prop-1™, BASIC Stamp® are
555 timer circuit
registered trademarks of Parallax, Inc.
to start and stop

46 July 2006
Graner.qxd 6/6/2006 2:08 PM Page 47

BY VERN GRANER

the train on intervals, but on testing, I ■ FIGURE 1. The Prop-1 from


discovered this approach was less ParallaxEFX.
than adequate. With no positioning
feedback, the train would stop at ran- controller at our command,
dom points around the track when we have a slew of new
power was removed by the timer. It capabilities that can add fun
was also not very realistic as it and value to the project. For
seemed as if the train had malfunc- example, we could utilize
tioned when it would stop or start for Pulse Width Modulation
no apparent reason in mid-lap around (PWM) to gently start/stop the
the track. motor. This should enhance
Some patrons actually the life of the motor and the
approached the cashier to point out gear train since it would reduce the staff, the user interface should be as
that the train had broken down. instant torque exerted on the gear box simple as possible consisting entirely
Worse yet, my simple timer approach when power was applied/removed. It of a single button and a single
would not allow the staff to start the would also make it trivial to allow indicator LED. So I had my list of
train on demand for folks who would direct control of the train so requirements ... or did I?
ask to see it run (as a treat for some- the restaurant staff could trigger it to
one’s birthday, for example). perform on command. What’s a Train
Having the train run and stop in a With a microcontroller, I could Without a Whistle?
predictable manner, combined with add a position sensor to have
the ability to start the train on predictable stop and start points and I tried out my prototype design at
command, would seem to need also count the laps the train had run. the restaurant, and I was able to have
something more sophisticated than a At first, I imagined using Hall-effect the train run on command, run on
simple timer. In fact, it seemed to call sensors or some other physical unattended intervals, and stop and
for a microcontroller. Coincidentally, it method to sense the train’s position, start from a consistent location. I even
would also give me an excellent but it seemed simpler and possibly had a small PWM routine in the code
opportunity to create a project more reliable to use a touch free that would ramp the power up on
around the new Prop-1 I had pur- sensor. I decided that an IR LED/IR start and down on stop to ease the
chased (see Figure 1) from ParallaxEFX phototransistor arranged in a beam- strain on the motor/drive train.
— a new division of Parallax that break style would provide a good way However, as I observed my prototype
specializes in controllers for anima- to determine the train position design in action, I noticed that in
tronics and entertainment devices. without requiring any modifications to many cases people would not notice
The Prop-1 microcontroller seemed to the train or the track. the train had started, or were puzzled
be a good match for this project for Also, most train track setups have when the train would just disappear
the following reasons: a station, trestle, tunnel, or some other without apparent reason.
feature where the IR LED and sensor It occurred to me that having
• It is low cost at only $35 for the could be mounted, so this seemed the some sort of sound effect would add
complete, assembled unit. best approach. In our case, there was to the realism of the train and bring
an obvious section of the track where people’s attention to it when it was
• It has an on-board ULN2803a high- the train should stop, so the optimal
current Darlington chip capable of position for the sensor was easy to ■ FIGURE 2. The Chip On Board (COB)
driving inductive loads. determine (there is a tunnel that Train sound effects sound module fully
would hide the train from view). assembled.
• The ULN2803a is socketed so Since the train would be integral
this critical part would be field to the ambiance of the establish-
replaceable. ment, we could have a self-start
mode that would cause the train to
• With eight I/O pins, it has plenty of run one or more laps if it was left idle
device control available. for a software configurable period of
time (i.e., not manually triggered by
• Using PBASIC, it’s easy to program. an employee in a 10-minute period).
Since the idea was to have the train
Of course, once we have a micro- operate without attention from the

July 2006 47
Graner.qxd 6/6/2006 2:08 PM Page 48

■ FIGURE 3. Train Sound Effects we could further extend the life of


Kit components. the engine and also reduce the
annoyance factor for the staff (they do
effects including a crossing get tired of hearing the bells and
bell, the clickety-clack of the whistles of the train after a while).
train wheels on a trestle, and a I added a motion sensor to the
steam train whistle. Due to the Prop-1 and added some code to keep
nature of the switch inputs, it track of the amount of time elapsed
would be trivial to trigger the since the last time the motion sensor
sounds using pins on the Prop- had seen movement. If that time
about to perform. For variety, I could 1. Since I can establish the position of amount reached a predetermined
use specific sounds to indicate when the train using the IR beam-break minute threshold, the train would be
the train was stopping or just passing sensor, I would be able to trigger the put to sleep and would cease to
through the station. Since the various sound effects to occur when auto-add laps. This also made it possi-
Prop-1 had some unused outputs in the train was near the speaker, thus ble for the train to sleep overnight in
my existing design, I decided to look enhancing the illusion the sounds the event the staff forgot to turn the
for a sound module. were emanating from the train itself. train off at the end of the day.

Sound, Sound, Whistle With Laryngitis? Put Your Parts


Everywhere the Sound Together Now!
After I assembled the COB sound
A quick web search turned up a module, I noticed it came with a rudi- So, now that I had all my parts
very inexpensive COB (Chip On a mentary audio amp in the form of a and some successful testing under my
Board) digital sound generator (see single transistor output. On my bench belt, it was time to break out the
Figure 2). This little sound module the sound was audible, but certainly soldering iron and create the final
kit is widely available from various didn’t play with much authority. version that would be permanently
manufacturers online. The Train When I put the prototype in place mounted at the restaurant. The Prop-1
Sound Module Kit comes with the at the restaurant, you couldn’t hear comes pre-assembled with the
sound generator itself, four NO the module at all! The single output ULN2803a, the LM2940 +5V regula-
(normally open) pushbutton switches, transistor on the module just wasn’t tor, and .100 spacing headers for each
a small motherboard on which the putting out enough power. of the I/O pins. It would be the heart
chip is mounted, and a 3”, eight-ohm I decided to beef it up by ordering of this project. I allocated the Prop-1
speaker (see Figure 3). an eight watt audio amplifier kit (see pins in this way (see Figure 5):
This neat little module plays back Figure 4). This little circuit puts out up
digital samples of various train sound to eight watts of power into eight • Pin 0 — Sound Module (Crossing Bell
ohms — a good match for the speak- sound)
■ FIGURE 4. Eight watt audio amplifier kit. er included with the sound module • Pin 1 — Sound Module (Clickety/
kit. It gave me the punch I needed Clack sound)
so the train sounds could be heard • Pin 2 — Sound Module (Whistle
throughout the restaurant. sound)
• Pin 3 — Motion Detector
Is There Anybody ... • Pin 4 — LED Indicator Light
Out There? • Pin 5 — Power to Train Motor
• Pin 6 — IR Phototransister
The train was now able to be • Pin 7 — NO Pushbutton
called into action on demand, play
sounds that would relate to its The assembly of the components
actions, and run automatically on into a small finished box is fairly
timed intervals, I thought I was straightforward. I started by soldering
finished adding features. However, together the COB sound module kit,
one of the folks working at the then the eight watt amplifier kit. With
restaurant pointed out that the train the two kits assembled, I now needed
continued to run even if the dining to fabricate the IR transmitter and
area was empty of patrons. If we receiver.
could cause the train to sleep when The pin spacing on the Prop-1 is
no one was in the dinning hall area, .100” and is a perfect match for extra

48 July 2006
Graner.qxd 6/6/2006 2:08 PM Page 49

The TrainSaver Digital Electronic Train Controller


CD-AUDIO
cables I happen ■ FIGURE 5. Schematic
to have laying for the TrainSaver.
around, so I
decided to
salvage them for
their connectors.
Since the Prop-1
has +5V (labeled
“R”), Gnd
(labeled “B”), and
IO (labeled “W”)
arranged for
servo connection,
I would have an
easy source for
power and
ground for the
sensor and for the
source IR LED.
I found some
three-conductor
wire from an old
mic cable in my
junk box and
added the .100
spacing header to
one end. I then
created two pig-
tails for the IR
LED and the IR
phototransistor. I
used an old pen
cap as the ambi-
ent light shield for
the phototransis-
tor. I placed a
current limiting
resistor in-line near the LED and then ULN2803a to get higher current terminals of the Prop-1 (see Figure 8).
wrapped it all up nicely with heat capability. The fact the part is socket- This modification allowed the BS1 to
shrink tubing (see Figure 6). ed made this process easy since all I send the PWM output to three input
Now, with the sensor squared had to do was remove the ULN2803a, pins on the ULN2803a using only pin
away, I needed to mount all the parts bend pins 1 and 2 out to
in the case. However, during the 90-degree angles (see Figure
preliminary testing I noticed the 7), bridge pins 1, 2, and 3
ULN2803a was getting rather hot with a bit of solder, and then
when switching the train. Though replace the chip.
ULN2803a is a versatile and robust I then bridged the three
part, when I measured the current corresponding ULN2803a
drawn by the train, it proved to be a output screw-terminals (out-
bit in excess of the recommended puts 7, 6, and 5) on the screw
max current draw for a single pin on
the ULN2803a. ■ FIGURE 6. IR beam-break
To make sure we had enough detector prototype. A pen cap
headroom and wouldn’t burn up the is used to reduce ambient
chip, I ganged multiple pins of the light sources.

July 2006 49
Graner.qxd 6/6/2006 2:09 PM Page 50

the sound module to the case.


■ FIGURE 7. The ULN2803a
pins bridged to allow a Prop-1 The eight watt amp kit (see Figure
output to control three of the 11) was easily mounted in the same
ULN2803a outputs. manner as the sound module (again, a
dab of hot-melt glue) and the output
■ FIGURE 8. Prop-1 output from the eight watt amp kit soldered
terminals bridged to provide to the speaker on the inside of the
higher amperage output. box. I mounted a NO pushbutton
switch with an integral LED indicator
ULN2803a’s ability to handle light (I had this in my junk box, but
current is based on total part you could use one of the NO push-
power dissipation. If your buttons included with the COB sound
train motor will draw more module kit) to the inside cover of
current that the chip can the box, and then soldered another
source, it will destroy the salvaged CD-AUDIO cable to it as a
chip. I recommend you pigtail and connected that to pin 7 of
examine the ULN2803a data the Prop-1.
sheet to determine if your I drilled holes in the box cover to
intended current draw will exceed the allow the sound to escape from the 3”
part specifications. If your train draws speaker and then used hot-melt glue
more current than the chip can handle, to mount the speaker to the inside
you might want to consider using the cover of the box. Lastly, I threaded the
Prop-1 outputs to drive a relay or a power and IR beam break sensor
high-power MOSFET instead. cables through the hole in the side of
the box. Now that I had the hardware
■ FIGURE 9. Parallax serial adapter. My newly modified Prop-1 board all assembled, all I needed to do was
Using this, you can program the Prop-1 was now ready to be mounted in the write some code!
using a standard serial output from the PC. case. I used a dab of hot-melt glue to
hold the Prop-1 to the bottom of the Go With the Flow
5, but ganging outputs P5, P6, and P7 case and then cut a hole in the
for a combined load capacity of side of the cabinet big enough to During the prototyping, I had
approximately 1.5 amps. accommodate the BS-1 serial written small routines to test each
programmer (see Figure 9). I connect- function of the train controller but I
NOTE: Please be aware that the ed the sound module’s power to hadn’t put all the pieces together.
the Prop-1 P0 “R” and “B” power Now I needed a final, master
connectors. I then connected the program that would encompass all
■ FIGURE 10. The Prototype Prop-1 open
for inspection. Note that the LED indica- sound module’s K1, K2, and K3 pins the functions. The software would
tor is integral to the pushbutton switch. to the Prop-1 P0, P1, and P2 “W” need to control the train, the sound,
I used this combo-part since I already had connectors (see Figure 10). Now that read the button, sense the train
it in my junk bin. You can use a discrete I had the connections made, I used position, and monitor the dining room
LED and one of the pushbuttons that another dab of hot-melt glue to affix for motion.
comes with the Train Sound Kit.
As the function list
got longer, the coding
concepts were getting
quite complex. If you are
ever faced with this situa-
tion, I highly recommend
that you spend some
time building a flow chart
for your program as it
will really help you to
clarify your vision and
help to write code to

■ FIGURE 11. Fully assem-


bled audio amplifier.

50 July 2006
Graner.qxd 6/7/2006 2:35 PM Page 51

The TrainSaver Digital Electronic Train Controller


handle every function. (Crossing Bell).
Figure 12 shows a basic concept Begin
flowchart that I built before 9) Play a sound
attempting to actually write code for when the train is
this project. The program breaks passing the IR Button Pressed? Yes Laps=Laps+Credit
down into these functions: sensor (Click/
Clack). No
• Check if the button has been
pressed. If so, add laps. 10) Blink the LED Laps=0 or Rest =1? No Start Train
to indicate the
• Check value of the laps variable and number of laps
stop/start the train. remaining. Yes

Stop Train
• Check if the idle time has expired. If Testing ...
so, add a lap. Testing ...
is This
• Check if the IR beam is broken. If so, Play Crossing Bell
Thing On? Play Whistle
decrement a lap.
Now that we
• Check if the motion is sensed, if so, had implemented
Idle=Idle+1
reset sleep time. all the functions Yes
in a complete
• Increment all time counters. program, it was Yes
time to set up the Motion=True? Yes RoomIdle=0
The program takes quite a bit of system and test it
space in the Prop-1’s memory, but I out on my work- No
managed to get all the functions in bench. The first
that I was seeking and still had enough thing needed for RoomIdle=RoomIdle+1
Yes
room to add both a diagnostic mode testing is power. I
to help align the IR beam sensor and a used a nine-volt
motion sensor walk test. At the time of 500 mA filtered
RoomIdle=15mins? Yes Rest=TRUE
this writing, the program provides the power supply to
following operations: run the microcon-
troller to insure it
1) Provide a test/calibrate mode for had clean power. Idle=10mins? Yes Laps=Laps+1
the IR LED beam. Make sure the
switch on the Idle=0
No
2) Provide a walk test mode for the Prop-1 is set to
motion sensor. the 0 position,
then connect the Laps = 0?
3) Read the button and add a number transformer to the
of laps when pressed. Prop-1 power No
connector. Now
4) Decrement laps whenever the train we need to con-
IR=unblocked?
passes through the IR beam. nect the unit to
the train like this:
No
5) If the train is idle for a preset time,
then the train runs a single lap. • Connect the Yes
GND wire from IR=blocked?
6) If room is empty for preset time, the train trans-
put the train to sleep. former to the No
GND connector
7) Play a sound when the train starts of the Prop-1. Play Click/Clack
■ FIGURE 12. Logic
up (Train Whistle). flow chart for the
• Connect the Laps=Laps-1 TrainSaver.
8) Play a sound when the train stops positive wire from

July 2006 51
Graner.qxd 6/6/2006 2:09 PM Page 52

the train transformer to the positive from the website shown at the end MaskTime: This value is set in
connector for the train track. of this article). Once the source milli-seconds and reflects how long
code is loaded, locate this section you want to ignore the IR beam-break
• Connect the negative connection near the top of the program shown sensor after it is tripped. This value
on the train track to “output 5” on the in Listing 1. setting is critical if you are unable to
Prop-1. (Be careful not to dislodge the These settings should be set the IR beam sensor so it stays
jumpers between outputs 5, 6, and 7!) examined and understood before interrupted the entire time the train
changes are made. To better under- and cars are present. You will need to
WARNING: Check the polarity of stand these settings, here are some set this value to cause the sensor to
the train transformer output and short summaries of the settings and wait until the entire train has passed
make SURE you do not reverse the what they do: the sensor before decrementing a lap.
voltage provided to the Prop-1 screw
terminals! Reversing the polarity (by TrainIdleTarget: This value is used to Credit: This value determines how
placing the train transformer into determine how long you want the many laps are added to the train for
reverse) can destroy the ULN-2803 or train to wait between automatic laps. each press of the button. If the button
other components! If you believe The default value is 10 minutes. The is replaced with a coin mechanism,
there is a danger of this occurring, you idea is to reduce the total amount of this can be used to determine how
might want to place a 1N4001 diode runtime on the train engine while still many laps are given in return for a
in series with the train power source to having the train perform often enough coin. Most coin mechanisms have a
block reverse voltage from the circuit. to be interesting to observers. If the SPDT switch that is used to detect
train were to run continuously, it the coin. Simply replace (or wire in
Turn on the train transformer and would not only wear the train out parallel) the coin switch with the
set the speed to approximately 50%. sooner, but people would rapidly existing NO pushbutton.
Now, turn the switch on the Prop-1 to lose interest. In a restaurant situation,
the 1 position. having the train run on 10 minute LapLimit: This allows you to limit how
intervals means an average patron will many total laps may be added to the
WARNING: If you use the 2 see three to six laps during an average train. This value was added to limit
position it will attempt to join your meal. how many laps could be added
wall-wart supply to that of the train if someone pressed the lap-button
power supply! This could destroy the RoomIdleTarget: This value is used to repeatedly. In our testing, we
Prop-1 controller! determine how long the performance discovered that sometimes the staff
area of the train remains empty before would rapid-press the button multiple
Once you have the Prop-1 the train is put to sleep. This further times adding lots of laps (i.e., 10 or
showing power, it’s time to down- reduces the total runtime accumulat- more rapid presses at five laps each!).
load the program. Open the Parallax ed by the engine and also gives the This insures that we don’t over run
BASIC Stamp Editor and load the staff a break from the sounds the train the train.
source code (available for download makes.
Once you’ve adjusted these
LISTING 1 settings, download the code to
the Prop-1. If the download is suc-
‘————————————————————————————————————————————————————— cessful, hold down the lap button
‘ Initialize Train System Variables
‘—————————————————————————————————————————————————————
and press the reset button on the
HIGH LED ‘ Turn off the LED in the button Prop-1. The program checks to
SYMBOL TrainIdleTarget = 10 ‘ Minutes of idle before a lap is added see if the lap button is in a down
‘ for the train to run (values 0-254) position on startup. If so, it will
SYMBOL RoomIdleTarget = 15 ‘ Minutes without motion before the train
‘ is put to sleep (values 0-254)
enter a calibrate mode where it
SYMBOL MaskTime = 1000 ‘ How many MS to wait b4 we check for the simply illuminates the indicator
‘ end of the train after beam-break. LED when the IR beam is intact,
SYMBOL Credit = 5 ‘ Number of laps added by a button press and then extinguishes the LED
‘ (or coin drop) when the beam is broken. This
SYMBOL LapLimit = 9 ‘ Set the maximum number of laps that may
‘ be added allows those of us who cannot
SYMBOL TicksPerMinute = 4000 ‘ 4000 ~number of ticks that pass in a minute see into the IR spectrum to
‘ Note that if you alter the loop length you align the LED IR source with the
‘ will have to recalibrate. phototransistor sensor across the
SYMBOL TunnelDelay = 6000 ‘ Delay from end of train till stop execution
‘ (allow train to traverse tunnel) track.
Now that you can see the

52 July 2006
Graner.qxd 6/6/2006 2:09 PM Page 53

The TrainSaver Digital Electronic Train Controller


alignment of the IR sensor, pick an for 10 minutes (or whatever number
appropriate position on the track you set before you downloaded the
where the train will reliably interrupt code), the TrainSaver will add one lap
the beam when it passes. The mouth to the lap counter, the train will play
of a tunnel or the start of a bridge the whistle, run one lap, and then halt
span are good locations. If possible, I to the accompaniment of the crossing
recommend placing the sensor at bell sound. If everything operates as
a height that will keep the beam described, then you have a working
continuously interrupted between the TrainSaver! Congratulations!
train cars. You can accomplish this by
placing the sensor at the level of the Plug it In, Plug it In ...
coupler between cars. If this is not ■ FIGURE 13. The IR beam-break sensors
possible, you may need to adjust the Once we completed the bench mounted on the train tunnel entrance.
mask value in the program to allow for testing described above, it was time to
all the train cars to pass the sensor head out to our BBQ restaurant early whistle sounded, the train engine
before you decrement a lap, other- on a Saturday morning armed with started up, and the train headed
wise each train car that passes the ladders, tool boxes, drills and all the around the track! Success! We then
sensor would decrement a lap! other bits and pieces we thought we noticed that about halfway around
Once you have the beam aligned, would need. We mounted the the track, the TrainSaver unit sound-
it’s time to test out the motion sensor. TrainSaver box on a wall adjacent to ed the click/clack sound and the
Press the lap button one time to drop the cash register so the cashier could LED blinked to indicate that the unit
into the walk-test mode. The LED will easily add laps to the box, but placed had decremented a lap. We were
illuminate each time that motion is it high enough on the wall to make surprised since the train was no
detected. Try holding very still and see it difficult for children to add laps where near the sensor when this
if the LED goes out. If it does, you themselves. occurred.
know that the motion sensor is We removed the ground lead When the train did arrive at the
working. Now press the LAP button from the track and ran it into the sensor, the click/clack played and a
one more time to exit the calibrate TrainSaver box and attached it to the lap was decremented as expected.
mode. Once out of calibrate mode, Prop-1 screw terminal 5 (being careful Though puzzled, we chalked it up to
the system is waiting for either the lap not to alter the jumpers between an anomalous IR reflection or some
button to be pressed or for enough terminals 5, 6, and 7). We then ran a other random event that could be
idle time to pass to cause a lap to be line from the Prop-1 GND screw ignored. However, as we were
added to the lap counter. terminal to the GND connector on packing up our tools, we noticed that
To have the train start, simply the train transformer. I plugged in the the train began to decrement laps
press the lap button one time. This will wall-wart power supply and turned the every so often when the train was in
add five laps to the train (the number power on while holding down the lap the middle of the track, sometimes
of laps added by a single button button on the unit, thereby placing it
press is adjustable in the software). in diagnostic mode. ■ FIGURE 14. The ParallaxEFX AP-8
A single blink of the indicator LED Then, while watching the LED to serially controlled digital sound playback
will acknowledge the five-lap credit make sure we had the sensor lined up unit. If this were used to substitute for
has been added. The train whistle with the IR LED, we installed the the COB sound effects module, it would
sound should play and the train sensor across the tunnel (see Figure free up three IO pins on the Prop-1,
allowing for expanded functions and
should slowly start up and begin to 13) making sure the sensor height was more sound effect events.
move around the track. at the same level as the engine-to-car
When the train gets to the point coupler. (Note: This is important to
where it interrupts the IR beam, the insure the short gap between the
indicator LED on the TrainSaver box engine and the cars doesn’t cause
should blink the number of laps extra decrements of laps as each car
remaining before the train will stop passes.) I pressed the button to drop
and the click/clack sound should play. the unit out of diag/calibrate mode
When the laps value has been and we were ready for our first real
reduced to 1, and the train breaks the test.
IR beam, the train will slow to a stop
and the crossing bell sound should Crock Full O’ Trouble!
play.
If no one presses the laps button We pressed the lap button, the

July 2006 53
Graner.qxd 6/6/2006 2:10 PM Page 54

causing the train to halt without buzzing sound each time that a
AUTHOR BIO parking in its assigned location (the false lap was detected. With more
■ Vern Graner is a Senior tunnel). Something was obviously investigation, we discovered that this
Systems Engineer with a Software wrong ... but what? crock pot had an old thermostat that
Company in Austin, TX. Though We double-checked the connec- was arcing and generating lots of
married with two kids, he still finds tions and checked the software but noise! It appeared that the interfer-
everything seemed to be set up ence was being picked up by the IR
time to create electronic projects in
correctly. While I was going over the sensor wire and being interpreted by
his so-called “spare time.” You
source code, my son mentioned that the software as the train breaking the
can contact him via email at
a crock pot on a shelf below the beam!
vern@graner.com
train transformer would make a Based on this theory, I added a
few lines of code that would check
the state of the IR sensor and make
sure it stayed in a “beam is broken”
state for at least 100 samples before
it would acknowledge the reading as
valid. Once the False Detection
code loop was added, the false laps
disappeared! Problem solved and the
TrainSaver was done!

Future Expansion
Though I’m happy with the
current incarnation of the TrainSaver,
I’ve already been brainstorming about
future improvements to this device.
For example, the pushbutton switch
could be replaced with a coin box
that would allow patrons to drop a
coin to receive a preset number of
laps from the train. This would allow
the owner of the train system to
recoup some of the inevitable cost of
repairing or replacing a train engine
when it wears out. An external speak-
er could be placed inside a tunnel or
in a fake building near the station
where the train stops so the sounds
would appear to come from the
vicinity of the train.
You could opt to reduce the
number of sounds (i.e., remove the
click/clack) and dedicate that pin to
controlling a relay that would switch the

RESOURCES
■ Vern Graner’s “TrainSaver” website
www.trainsaver.com

■ Parallax, Inc.
www.Parallax.com

■ The Robot Group of Austin


www.robotgroup.net

54 July 2006
Graner.qxd 6/6/2006 2:10 PM Page 55

The TrainSaver Digital Electronic Train Controller


sound between
speakers on differ-
ent parts of the PARTS LIST
track. You could ITEM DESCRIPTION SUPPLIER PART NO. PRICE
opt to free up ❑ Microcontroller Prop-1 Parallax 31101 $35
three pins by ❑ Serial Programmer BASIC Stamp 1 Serial Adapter Parallax 27111 $4.95
replacing the ❑ Motion Sensor PIR Sensor Parallax 555-28027 $7.95
COB sound mod- ❑ Sound Module Train Sound Generator Kit Quality Kits SG1M $7.95
ule with the ❑ Amp Eight Watt Audio Amp Kit Quality Kits FK604 $6.49
ParallaxEFX AP-8 ❑ IR LED and Sensor Matched Infrared Emitter and RadioShack 276-142 $3.29
(see Figure 14) Phototransistor Detector
serially controlled ❑ Project Case 8” x 6” x 3” Project Enclosure RadioShack 270-1809 $6.99
audio board. This ❑ Case Mount LED Red LED with Holder RadioShack 276-068 $2.39
would let you
trigger up to eight MISCELLANEOUS PARTS
❑ NO Pushbutton (Included with the Train Sound Generator)
sound effects
❑ 3” Eight-ohm Speaker (Included with the Train Sound Generator)
while using only ❑ 50 ohm 1/4W resistor (IR Transmitter LED)
ONE pin on the ❑ 10K ohm 1/4W resistor (Pull up Resistor for Phototransistor)
Prop-1. ❑ 180 ohm 1/4W resistor (Current Limit Resistor for Case LED)
Since the
configuration of
the Prop-1 is already set up for a servo train passes). TrainSaver, I invite you to visit
to be directly connected, one could It’s amazing to me that with such www.TrainSaver.com and exchange
be attached to a pin and code added a small and inexpensive controller, ideas, messages, and code improve-
to control an automatic crossing there’s still so much room for ments with others working on this
gate (lift and lower the barrier as the exploration! If you decide to build a neat little project. NV

July 2006 55
ShowcaseJul06.qxd 6/8/2006 10:02 AM Page 56

SHOWCASE

PRINTED CIRCUIT BOARDS


QUALITY PRODUCT 10 pcs (3 days)
FAST DELIVERY 1 or 2 layers $249
COMPETITIVE PRICING 10 pcs (5 days)
4 layers $695
* UL approved (up to 30 sq. in. ea.)
* Single & Double sided includes tooling, artwork,
* Multilayers to 8 layer LPI mask & legend
* SMOBC, LPI mask
* Reverse Engineering
* Through hole or SMT
* Nickel & Gold Plating
* Routing or scoring
* Electrical Testing 9901 W. Pacific Ave.
* Artwork or CAD data Franklin Park, IL 60131
* Fast quotes Phone 847.233.0012
We will beat any Fax 847.233.0013
competitor’s prices!!! Modem 847.233.0014
yogii@f lash.net • f lash.net/~yogii
ShowcaseJul06.qxd 6/8/2006 4:27 PM Page 57

What’s New
In The Forums?
If you haven’t been to the Nuts & Volts
forums lately, you’ve likely missed out
on a lot of great discussions.There are
over 3,300 registered users and
the number is growing daily. There are
over 36,000 posts covering every
electronics topic imaginable.
Site: www.vandvmachy.com Here are some recent topics that
email: victor@vandvmachy.com
have been in discussion.
USA Office: Blink Manufacturing 14019 Whispering Palms Dr.
Houston, TX 77066, PH. 281 397 8101, Fax. 281 397 6220.
Mexico Plant: Marketing Tech. De Mex. SA de CV. Alamo 93
➥ Playing CD-Rs in older DVD
Cuarto Piso, Santa Monica, Tlal. Edo. De Mexico, 54040
Tels. 011 52(555) 314 5325 & 011 52(555) 360 3648 players
➥ Voltage Regulation
Fax. 011 52(555) 361 5996.

➥ Optical tach output


➥ Ramsey remote repeater kit
mod
➥ What is “Computer Grade?”
➥ TV repair advice
➥ Reviving a “Washed” cellphone
➥ PIC Programmer for Linux
➥ How to persuade two
computers to talk via wireless
➥ Go carts and servos
Current forums include:
General Electronics
Discussion
Computers
Robotics
Programming
New ➥ Up For Grabs

We’ve just added a new


forum called Up For Grabs.
It’s the place to post any
electronics items for sale,
trade, or to give away to
a good home. It’s for private
party (personal) items only. No
commercial vendors allowed. Oh
yeah, and it’s FREE.
So, don’t throw out that junk
you’re not using — it may be
just what a budding electronics
hobbyist needs to get that
project finished!

Check it out for yourself today!


www.nutsvolts.com
July 2006 57
Full Page.qxd 6/8/2006 9:28 AM Page 58

Logon to our website for secure shopping cart, powerful


search engine, and latest news! www.halted.com

Silicon Valley’s Electronics Marketplace


♦V
Got excess electronic inventory? Send us your list or give us a call, we’d be happy to make an offer!
Call 1-800-4-HALTED (1-800-442-5833) to order... ...or use our web search! Deals @ HSC! Search

Electro-Hobbyist Alert -- HSC is your source! Fujitsu PenCentra


Even before there was a place called “Silicon Valley”, HSC was the favorite stop of hardware hackers, Tablet Computer -
techno-tinkerers, entrepreneurs and engineers on a budget! We have been buying and selling the Valley’s
excess inventory for 40 years now, and our collection is second-to-none! We are also factory-authorized
Good to Go!
distributors for many fine lines of parts, tools, equipment and accessories, so we feel we should be your first
stop when shopping for electronic basics. Give our ever-expanding website a try and see what we mean!

Embedded Wireless Transceiver!


2.4GHz - 200mW, 5VDC
HSC#21001 $65.00
Wireless Transmit/Receive set
from RainBird Sprinkler system
“Backpack Bantam”
PCI Internet Phone card
Parallel-port external CD ROM
HSC#21057 $4.95
HSC#80790 $9.95
HSC#20972 $19.95
♦ Fujitsu PenCentra 130 computer
Plantronics LS1 Computer Headset ♦ 131 MHz NEC VR4121 MIPS CPU
(Stereo & mic. plugs, not RJ-11) ♦ 32MB DRAM, 24MB ROM, 8MB Flash
HSC#20948 $12.50 ♦ Color DSTN Touch LCD 640 x 480
4-line 20 char. LCD w/ LED backlight
♦ PCMCIA, VGA, PS2, USB, SIO ports
Logitech QuickCam Express HSC#20627 $9.75 ♦ Win CE 2.11 Pro in PROM (no disks!)
RF Transistor Engineering Kit ♦ Microsoft Pocket Office, Outlook, IE
54 different devices HSC#21061 $19.50 ♦ “Radio Ready” for LAN/WAN PC Card
HSC#20999 $29.50 ♦ Internal microphone, speaker & jacks
♦ Stylus, Mini Keyboard, Dock & PS
Peltier Module - Electrocooler! ♦ New, never used, 90-day warranty!
HSC#80813 $24.95
HSC# 80797 $159.00
PCMCIA FireWire card
Docking Logitech Mini USB Keyboard! HSC# 20830 $12.50
Includes Playstation2 Gamepad!
700 MHz Transceiver
Toroidal Transformer, 70VCT, 1A HSC#21023 $14.95
Hobbyist Special!
HSC#20691 $14.95
Step-down Toroid Transformer
240 - 120 VAC 250VA
HSC#21058 $35.00 PCMCIA DVD/MPEG Video Card
HSC# 20829 $12.50
300W ATX PS with huge fan!
HSC#21055 $17.50
320 x 240 Mono. LCD panel ♦ Orig. for broadband wireless access
with backlight & inverter. ♦ Direct cable modem connection
HSC#80815 $29.50 Happy Hacking Cradle! ♦ 740 - 746 MHz In, 30 dB gain
Phihong switching power supply Connect a keyboard to your Palm PDA! ♦ 770-716 MHz Out, 24 dB
100-240 VAC in, 5VDC, 6A out -- small! ♦ Standard 44 - 50 MHz IF
HSC#21019 $2.95 ♦ Sold for experimental purposes only!
HSC#20659 $17.50 GPS Mobile Locator - Hacker’s special! ♦ Possible to mod for 400/900 Part 15
HSC#20628 $19.95 ♦ Complete w/ DC supply & inserter
♦ New, factory boxed, with mast mt.

12VDC Motor, worm gear reduction HSC#21067 $19.95


2 speeds, 40 & 106 RPM -- Hi torque!
Small DC Gearmotor HSC#80811 $15.95 Bargain Multimeter...Tiny! Real Monsters!
6 - 12 VDC, 3 - 6 RPM Genuine Monster Cable Interconnects!
HSC#20970 $8.95
HSC#19833 $9.95 Pressure Transducer, 0-30 psi
♦ "Interlink 201XLN" extra-low noise
HSC#21066 $9.95 ♦ 8 ft. long, purple jacket, gold RCA’s
♦ Dual Stereo (4 shielded conductors)

HSC#80806 $24.50
Tripplite Outlet Strip, 5 ft. long ♦ "AVPOD 203" audio/video cable
Slo-Syn Stepping Motor Sound Activated Neon H.V. Electrolytic Capacitor ♦ 8 ft. long, white jacket, gold RCA’s
Model SS-25, 120V, .3A HSC#20794 $39.95 Light for your PC! 2700 uF, 450VDC ♦ 1 double-shielded video, 2 audio
HSC#20725 $26.95 HSC#20441 $9.95 HSC#80809 $9.50
HSC#80807 $29.50

Since 1964!...
Silicon Valley’s BEST place to shop for Electronics!
Three Retail Stores to serve you! Order Toll-Free: 1-800-4-HALTED (442-5833)
Look for us on...
Main Office - Mail Orders... or...ONLINE AT: www.halted.com
3500 Ryder St., Santa Clara, CA 95051 Terms: Some quantities limited; all items are subject to prior sale. Minimum order: $10.00
Santa Clara 1-408-732-1573 seller ID: plus shipping. Orders under $30.00 subject to $3.00 handling fee, in addition to shipping.
Sacramento 1-916-338-2545 hscelectronicsupply All orders shipped by UPS Surface unless otherwise specified. $7.50 UPS charge added
for COD. Visit our website for detailed information on domestic and international shipping.
Rohnert Park 1-707-585-7344

58 July 2006
Fonte.qxd 6/6/2006 11:00 AM Page 59

B Y G E R A R D F O N T E

RADAR AND ELECTRONIC WARFARE (EW)


are usually thought of as being very complicated and very secret.
And while this is true for specific designs and detailed theory,
many of the basic principles are straightforward and easy to
understand. This article will present some of the fundamental
concepts of radar and show how EW develops from that.

July 2006 59
Fonte.qxd 6/6/2006 11:00 AM Page 60

RADAR BASICS
Acquisition and
Targeting Radar
A
s most folks know, radar (distance to target) is the most
(RAdio Detection And critical factor. This is pretty obvious
There are two general classes of
Ranging) came of age in World when you think about it. A transmit- radars: acquisition and targeting. The
War II. And everybody knows that ter’s signal decreases by the square acquisition radars are the big,
radar sends out a radio signal that of the distance. Twice the distance stationary, long-range kind while the
bounces back from an object. The means one-quarter signal strength. targeting radars are usually smaller,
range (distance away) of that object But the return signal decreases by portable, and shorter range (some-
is determined by timing how long it the square of the return distance, as times being the guidance system of a
takes for the echo (return signal) to well. So, the return signal decreases weapon). They have two different
come back. Most everyone has seen in strength to the fourth power of the functions.
huge parabolic antennas rotating in distance. So, doubling the distance Acquisition radar is used to
detect objects from a long distance
circles, scanning the sky for incoming to the target results in 1/16 of the
away. Since the object is a long way
airplanes or missiles. At the least on signal being returned (all else being off (sometimes thousands of miles),
TV and the old sci-fi movies. Many equal). its position, relative to the radar,
radar systems use such antennas. It’s for this reason that radar can’t change all that much in a few
But some don’t. transmitters are immensely power- seconds. For that reason, acquisition
It’s also important to remember ful. They can transmit very short radar only illuminates (or “paints” or
that the antenna performs two func- pulses (about 50 μS) that are tens of “lights up”) an object once every
tions. It acts as a transmitting anten- megawatts and more. For example, revolution of the antenna (which is
na for the out-going pulse and as a the AWACS (Airborne Warning And typically every few seconds or so).
For reference, a airplane moving
receiving antenna for the return sig- Control System) klystron-type trans-
at 700 mph, or the speed of sound at
nal. This means that the transmitter mitting tubes are rated at 50 sea level, only travels about 1,000
must be disconnected (or turned off) megawatts peak pulse power. Since feet per second. A 2,000 or 4,000
during the time you want to listen for the pulses are short and the repeti- foot difference at 100 miles is not
a return signal. Otherwise, any return tion rate (or pulse rate) is about too significant. Acquisition radars are
signal will be overwhelmed by the 1,000 pulses per second, the aver- the typical types shown in the
transmitting pulse. Additionally, age power is much less — about 250 movies and were the types used in
precautions must be made so that to 500 kilowatts. But that’s still plen- WWII.
the receiver front end isn’t damaged ty powerful. Of course, not all radars Targeting radars are used to
guide weapons to a target.
or destroyed by the powerful trans- are this powerful. Some portable or
Sometimes these are ground-based
mitting pulse. weapons radars are only a few watts.
radars and sometimes these are
Let’s examine the basic radar In order to locate an object, both incorporated into the weapon itself.
geometry and design factors. Signal its range and direction need to be A “guided” missile is one that is
strength is a critical factor in the determined. The range is obviously directed by ground-based radar to a
performance of any radar system. determined by the delay of the return target. A “homing” missile directs
Obviously, if you can’t detect the signal. The direction is determined by itself from the radar reflection.
return signal, you can’t detect the where the antenna is pointing. If this Note that a homing missile can
object. The more powerful your trans- seems rather crude, you’re right. use a ground-based radar to illumi-
mitter is, the greater the potential Directional sensors measure the nate the target. And in the early days
of radar this was very useful because
range of the radar. The larger the elevation angle and the azimuth angle
it meant the missile didn’t need
transmit/receive antenna, the (compass heading). a radar transmitter. However, if the
greater the range. The larger the Naturally, the radar antenna illumination signal was lost for
target (called Radar Cross Section or must be properly aligned and cali- whatever reason, the missile would
RCS) the stronger the return signal brated so that its elevation and “lose track” (or “lose lock”) and fail
and the greater the range. While not azimuth angles agree with the real to hit the target.
obvious, the longer the wavelength, world (or with the ship’s bow or Additionally, it meant that a
the less signal loss there is. So lower missile’s flight direction). The angle ground radar was dedicated to that
frequencies are better. (However, sensors are often “synchros” or target for the duration of the missile’s
flight. That’s not a problem if there
lower frequencies mean larger and “resolvers” which are a special
are only a few slow airplanes coming
heavier antennas.) type of transformer and will not be at you. But with today’s vast numbers
Of all these factors, the range discussed further.
60 July 2006
Fonte.qxd 6/6/2006 11:01 AM Page 61

RADAR and ELECTRONIC WARFARE Fundamentals


of fast fighters/bombers, this third is the pulse repetition rate. The measures than have been used for
approach is not used too much. fourth is the scanning rate or the some time: chaff and jamming.
The fundamental difference time it takes for the antenna to rotate Chaff started in WWII and consist-
between acquisition radar and 360 degrees. The fifth is the antenna ed of airplanes dropping aluminum-
targeting radar is the idea of “radar radiation pattern which is broken foil strips — called chaff — to create
lock.” Acquisition radar loses lock down into the “main lobe” and “side multiple reflective targets and to
and re-acquires (re-detects) the lobes.” These side lobes turn out to block radar beams from penetrat-
object during every revolution of the be a very significant weak point in ing (like a smoke screen). Chaff is
antenna. Targeting radar must never any radar system and can be used to effective for both of these functions
lose radar lock because it has no real create confusion and misrepresent if the length of the aluminum-foil
means of finding the target to begin the target. strips is appropriate for the radar
with. A radar “beam” is not just one frequency that is being used. If the
A targeting radar is always beam. It’s really a number of length of the foil is too different
initially directed to a target by some beams. Figure 1 shows a typical from the radar wavelength, it loses
outside means. This could be by radar antenna pattern. There is one its effectiveness. (This is why it
linking it with an acquisition radar main beam (or main lobe or focal is important to know the radar
system, which is typical for ground- point). This is where the antenna is signature before attempting
based missiles. Or, it could be by actually pointing and has the most countermeasures.)
actually pointing the missile at the power during transmitting and the Jamming is another method of
target and allowing the missile-radar most sensitivity while receiving. But defeating radar. It consists of trans-
to lock on, which is typical for air- no antenna is perfect. There are mitting continuous signals directly at
launched missiles. Since it is impera- actually a number of secondary the radar antenna that are the same
tive for a targeting radar to maintain beams called side lobes. These are frequency of the radar. Since a trans-
lock, it must send out radar pulses at identified in Figure 1. Typically, the mitter can be much more powerful
a much higher repetition rate, often two major side lobes have a than a radar reflection, it will present
at 100’s or 1,000’s of pulses per reduced sensitivity of only 10 dB to the receiver with a large signal and
second. It can’t allow the target to 15 dB relative to the main lobe. the weaker return signal will be
move too far between pulses or We’ll see how this can be employed masked. This significantly reduces
radar lock could be lost. And at for EW in more detail, later. the effective range of the radar.
close range, there can be consider- Eventually, the target will get close
able relative-position changes at Basic Radar enough to the radar system so that
high-speeds. Therefore, high pulse Countermeasures the radar return signal will be larger
rates are the key indication that a than the jamming signal. When
targeting radar is in use. There are two radar counter- this occurs (called burn through),

Radar System
Signatures
Since radar systems are
expensive to design and devel-
op, there are a limited number
of systems in use around the
world today (perhaps a few
hundred). Clearly, it is important
to know what particular radar
system you want to defeat
before you can design a particu-
lar defense or countermeasure.
There are a handful of
characteristics that identify a
given radar system. The first is
the frequency of operation. The
second is the pulse length. The

FIGURE 1. A typical polar plot of a


radar antenna sensitivity pattern.
Note that the side lobes are only 10
dB to 15 dB below the main lobe.

July 2006 61
Fonte.qxd 6/6/2006 11:01 AM Page 62

RADAR and ELECTRONIC WARFARE Fundamentals


FIGURE 2. A stationary receiver detects a
Antenna pointing direction series of signals as the radar antenna
rotates. The amplitude of the signals
Main lobe is related to the main lobe and side-lobe
pattern, as shown in Figure 1.

the antenna and anything close by.


It’s a fairly simple idea that is
somewhat harder to put into
practice. This is because there are
Relative Intensity

many different radar signatures that


the missile must be programmed for.
You obviously wouldn’t want one to
Side lobes Side lobes
target your own radar signal.
ARM missiles put the radar
operator in a dilemma. If they use the
radar to search for targets, they
expose themselves. (Literally, it’s like
a search-light at night.) If they turn off
Time the radar, they are no longer
exposed but they are also ineffective.
Neither choice is appealing.
normal radar operation can be tions that can hide incoming targets. False targets can be created
resumed. Multiple jamming transmitters, it several ways. The simplest is a form
Note that powerful jamming different locations, can create of jamming. Instead of transmitting a
transmitters can be located so far additional interference/spokes and continuous signal, pulses that match
away to be virtually untouchable. reduce the effectiveness of radar to a the radar signature are transmitted.
Also, due to the side lobes of significant degree. So instead of spokes on the display,
the antenna, the jammer can affect there are many dots that look like
multiple sectors (angles) of the ARMs and targets. Trying to find a real target
radar. The radar display shows False Targets among hundreds of false ones is not
“spokes” of interference that are a trivial matter.
related to the side lobe pattern. An Anti-Radiation Missile (ARM) A more sophisticated method of
Therefore, there are several direc- is arguably an EW component. It’s false target generation uses the
actually a missile that is designed Achilles heel of radar or the side
FIGURE 3. Knowing what the radar to lock on to a radar signal (or lobes. As noted before, the side
signature is from Figure 2, a false return “radiation”), home on it, and destroy lobes are often only 10 dB to 15 dB
signal can be created. below the main lobe in sensitivity.
False Antenna pointing direction So, if you transmit a “return pulse”
that matches the radar’s signature
while the side lobe is pointing at you,
False the radar will think it is a main-lobe
Main lobe reflection. The result is that the
antenna is pointing in the wrong
direction and any weapon than is
controlled by that radar will be
aiming at a false target.
Relative Intensity

Let’s examine this in more


detail. As you approach a radar, you
will be able to obtain its signature
before it detects you. (This is
False False because the return signal must
Side lobes Side lobes
travel all the way back to the radar.)
Your radar receiver will detect
pulses of different strength as the
acquisition radar antenna rotates.
Figure 2 shows a typical pattern
Time
with typical side lobes. Since you

62 July 2006
Fonte.qxd 6/6/2006 11:02 AM Page 63

RADAR and ELECTRONIC WARFARE Fundamentals


FIGURE 4. Combining the false signal with Apparent Antenna
the real signal creates a false signal that pointing direction
appears real to the radar. The radar Real Antenna pointing direction
antenna is pointing in the wrong direction Apparent main lobe
when the largest return signal is received.

know the RCS of your craft, you can


estimate when the radar will detect
your return signal. Before that time,

Relative Intensity
you (your computer actually) create
a return signal of your own. Figure 3
shows such a constructed return
signal. Real
Then you transmit this false Main lobe
return signal at just the proper time
in the radar signature so that the
largest return signal appears on a
radar side lobe. The radar system
assumes that the largest return signal Time
occurs in the main lobe. But in this
case, it isn’t. The radar antenna is
actually pointing in a significantly The field of EW is usually broken basic approaches described here fall
different direction from you. The down into ECM (Electronic Counter into the ECM category. There are
error can be as much as 30 methods for reducing the
degrees. So, if this acquisition effectiveness of jamming,
radar directs a weapon at chaff, and false targets.
you, it’s really pointing in the
“EW is like a chess These methods are ECCM.
wrong direction. (Figure 4 game. Every move by EW is like a chess game.
shows how this happens.) Every move by one side
If that weapon has a one side is answered is answered by the other
targeting radar, it is very side. The competition will
likely that it will never by the other side.” continue until the day that
achieve lock-on because you humans have thought up
will be out of its field-of-view. every possible method of
With proper timing, these false Measures) and ECCM (Electronic ECM and ECCM. That day appears to
return signals can be made to Counter-Counter Measures). The be in the far future. NV
“move” at any speed or direction
(within limits). Multiple false targets
with multiple headings can be
generated with a single side lobe
transmitter. Such an approach can
be used, to a degree, with targeting
radars, as well. But it is harder
because of the higher pulse rates
and because targeting radars don’t
re-acquire the target and expose
their side lobes as much.

Other Topics
This article barely scratches
the surface of this topic. There is
much, much more. Phased-array
and doppler radars have their
own strengths and weaknesses.
Stealth design and some tactical
maneuvers can cause problems for
radars.

July 2006 63
NewsBytesJuly06.qxd 6/8/2006 3:46 PM Page 64

A SNIP HERE, A
NEWS BYTES you can put your band saw in the cor-
■ NEWS ■ I N N O VAT I O N S ■ IDEAS

Measuring only .016” thick, these


CIRCUIT THERE ner and use a pair of snips or scissors to boards are flexible and easily cut with
separate your next big batch of PCBs. a pair of aviation snips. Best of all is

W e’ve all done it — ganged multi-


ple printed circuit board (PCB)
templates onto a single piece of single-
The Electronic Goldmine (www.
goldmine-elec.com) has a new PCB
fabrication product that can be cut with
the price. Recently, the 6” version was
being sold for 99¢ each, while the 12”
bigger brother was commanding a
or double-sided copper clad board. scissors. Sold as either 5-1/2” x 6” reasonable $1.75.
Although this form of PCB fabrication (G15697) or 5-1/2” x 12” (G15698) This flexibility in these board’s
frugality can save you time and money, single-sided copper clad boards, these composition might enable the creative
it becomes a real labor of love as you products are exposed and etched just circuit experimenter to build some
cut each template apart. However, now like their stiffer competition. unconventional PCB designs. Just
make sure that you don’t accidentally
pop a solder joint off of your curved
PCB as you “roll your own.”
The Standard for checking Locate shorted or leaky
Capacitors in-circuit components or conditions REALLY FREE PCB
Good enough to be the to the exact spot in-circuit
choice of Panasonic, Still cutting up the pcb,
DESIGN SOFTWARE

I
Pioneer, NBC, ABC, Ford, and unsoldering every
f you’ve been looking for that
JVC, NASA and thousands part trying to guess at
of independent service
perfect electronic design system
where the short is?
technicians. (EDS) software package, then look no
$209
further than McCAD. Published by
Inexpensive enough to pay for itself in just Your DVM shows the same shorted reading all VAMP, Inc. (www.mccad.com) — a
one day’s repairs. At $209, it’s affordable. along the pcb trace. LeakSeeker 82B has the company whose name sounds like a
resolution to find the defective component. bad (or, good) vampire website URL —
And with a 60 day trial period, satisfaction Touch pads along the trace, and LeakSeeker McCAD has been around for over 29
guaranteed or money-back policy, the only beeps highest in pitch at the defect’s pad. Now years, making McCAD one of the
thing you can lose is all the time you’re you can locate a shorted part only a quarter of original PCB CAD programs.
currently spending on trying to repair all an inch away from a good part. Short can be
those dogs you’ve given up on.
Originally, McCAD was only avail-
from 0 to 150 ohms
able for the Mac OS. Today, there is both
CapAnalyzer 88A LeakSeeker 82B a Mac OS X version and a PC Microsoft
Available at your distributor, or call 561-487-6103 Windows (98/ME/NT/2000/XP) version.
Electronic Design Specialists www.eds-inc.com Whichever version you opt to
use, the McCAD EDS enables the
circuit designer to create schematic
diagrams, capture these designs into
PCB layouts, and generate Gerber-
format files. Additionally, there is an
auto-routing feature that will help you
quickly add traces to your layout.
NEW! HIDmaker FS for Full Speed FLASH PIC18F4550 And McCAD EDS is a snap to learn
Creates complete PC and Peripheral Both PC and Peripheral programs and use. Just click, drag, and drop from a
programs that talk to each other over understand your data items (even odd large library of readymade analog and
USB. Ready to compile and run! sized ones), and give you convenient digital outlines. Or, if you have an unusu-
• Large data Reports variables to handle them. al IC pinout, you can edit and create
• 64,000 bytes/sec per Interface PIC18F Compilers: PICBASIC Pro, your own McCAD-compatible outline.
• Easily creates devices with multiple MPASM, C18, Hi-Tech C. You won’t get stumped using
Interfaces, even multiple Identities! McCAD EDS, either. There is ample
• Automatically does MULTITASKING PIC16C Compilers: PICBASIC Pro,
• Makes standard or special USB HID MPASM, Hi-Tech C, CCS C. online documentation for supporting the
devices McCAD EDS. Both web-based files and a
NEW! “Developers Guide for USB HID PC Compilers: Delphi, C++ Builder, couple of hefty PDF files will help to
Peripherals” shows you how to make Visual Basic 6.
answer any software usage question. In
devices for special requirements. HIDmaker FS Combo: Only $599.95 fact, within a couple of hours of installing
the McCAD EDS you can have your first
DOWNLOAD the HIDmaker FS Test Drive today! PCB template reading for etching.
www.TraceSystemsInc.com If you’re willing to live within a
301-262-0300 couple of restrictions on pin number
64 July 2006
NewsBytesJuly06.qxd 6/8/2006 9:59 AM Page 65

and board dimensions (6” x 6”), then • US Modular (www.usmodular.com) is portable hard drive, US Modular offers
you can use the McCAD EDS for FREE also entering the USB drive market with the Dragon Drive. This is a 2.5” exter-
— either the Mac OS or Windows ver- the Stainless Steel Monstor Drives. Priced nal hard drive enclosure which enables
sion. There is also a FREE Gerber File from $99 for the 2GB flavor, the Monstor anyone to “build it yourself” — a high
Viewer for 274-x format plotting docu- Drive fits in the palm of your hand, capacity portable storage device. The
ments. None of these FREE packages requires no extra software drivers, and Dragon Drive turns any 2.5” hard drive
employs any other form of file crip- runs on both Mac and PC computers. into a convenient portable storage
pling or expiration date system. Just There are 2GB, 4GB, and 8GB Monstor drive that can be used on any system
stay within the restrictions and you can Drive options currently available. with a USB or Firewire port. The
design schematics and PCBs for FREE. aluminum casing protects the drive
Otherwise, professional designers • Now, if you’d rather “roll your own” from overheating and vibration. NV
can elect — at anytime — to upgrade
the FREE versions of either McCAD
EDS format for under $1,100. Atmel AVR based Micro64/128
BRIEFLY NOTED Embedded Controller Module
8-Channel Analog to Digital Convertor
Real Time Clock/Calender
29 Digital I/O
SPI & I2C Bus
Two Serial Ports
The OpticSlim M12 Plus Serial Boot Loader
draws power from your PC
USB port. Photo courtesy of RS-232, 422 or 485
Plustek, Inc.
Selectable Baud

P lustek (www.plustek.com) now


Rates up to 250 Kbps
offers a portable sheet fed scanner Only 1.5 Cubic Inches
that is ideal for notebook PC road Supports Assembly, Starting at Only
warriors. The OpticSlim M12 Plus can BASIC and C Prog. Languages
rip a PDF file with the push of a button.
Capable of scanning letter, legal, and A4
Inexpensive CodeVision C Compiler $119 - Single Qty

sized documents, photos, as well as


providing OCR support, the OpticSlim
M12 Plus produces a resolution of 600 Start Developing
dpi. In keeping with its portable stature, The Micro6/128 Development
the power for this scanner is drawn from Board takes the Micro64/128 I/O
the USB port of the host PC. There’s no pins and expands them out to
extra power cord or bulky power brick. solder pads and headers for ease
Tired of those pesky USB flash of connection when developing.
“thumb” drives? Here are a couple of It also connects USART1 to RS-232
more capable and sizeable options: drivers or directly to screw
terminals for RS-422 or RS-485
• EDGE Tech Corp. (www.edgetech communication. USART0 is also
corp.com) announced their newest connected to RS-232 drivers. The
pocket-sized storage tool — the DiskGO RS-232 drivers are connected to
one-inch Mini Portable Hard Drive. Small two DB9 connectors. This board
enough to fit into a pocket, the unit is includes a prototyping area so the user can add external
powerful enough to hold large amounts circuitry. There is an onboard voltage regulator for powering the
of data. The DiskGO Mini Hard Drive Micro64/128 and additional circuitry. The Micro64/64A/128/128A
requires no driver or software installa- development system comes complete with a Micro64, Micro64A,
tion, except for Windows 98 systems. Micro128 or Micro128A, a Micro64/128 Development Board, and a
This sleek, aluminum-encased portable
power supply.
hard drive with anti-shock technology is
offered in capacities ranging from 4GB to
VISIT WWW.MICROMINT.COM FOR MORE
8GB, at prices from $109 to $149. INFORMATION or Call 1-800-635-3355
July 2006 65
ElectronetJul06.qxd 6/8/2006 8:14 AM Page 66

> > > > g o t o w w w. n u t s vo l t s . c o m — c l i ck E l e c t ro - N e t < < < <

1/2+.'4#&'
:%.75+8'.;(14 &XVWRP&RPSXWHU
—
  5
3,&ŠLVDUHJLVWHUHGWUDGHPDUNVRI0LFURFKLS
6HUYLFHV,QF
H[W
FFV#FFVLQIRFRP
7HFKQRORJ\,QFLQWKH86$DQGLQRWKHUFRXQWULHV ZZZFFVLQIRFRPSLFF

Thousands of active electronics hobbyists, experimenters,


and engineers are just a mouse click away from your
website. Now you can get both a print ad and Internet link
for one low price. We’ll place your ad on the Electronics Links
page of our website with a hotlink directly to your website —
Plus run your ad in the Electro-Net
section of Nuts & Volts. All for one low
monthly price. Call for pricing today!
www.allelectronics.com (951) 371-8497
66 July 2006
Silver.qxd 6/7/2006 9:45 AM Page 67

Choosing a
HEATSINK — by H. Ward Silver
et's face it — if this article was titled, “Thermal Analysis,” you might

L
Introduction
put off reading it! But choosing a heatsink? Everybody understands what
that’s all about, right? To make that choice, you have to do a little thermal
analysis (gotcha!), but if you can do Ohm’s Law, you already know how!

of voltage and heat flow (P) takes °C/W, which looks a little strange
the place of current. The new symbol until you consider that resistance is
Any time current flows through a — θ — represents thermal resistance, really “volts per amp.” As more
conductor, energy must be dissipated analogous to electrical resistance; power flows through a thermal
in the form of heat with the power — something you’re already quite resistance, the temperature drop
Pd = I2R. (For superconductors, R = 0.) familiar with. The fundamental across it increases; ‘a’ and ‘b’ are two
It’s also true that when a voltage drop equation for heat transfer looks just physical locations and the heat flow
and current flow exist at the same like Ohm’s Law: occurs between them.
time — Pd = V x I. Heating from current What happens if several different
flow is present everywhere in an ΔT = Ta - Tb = Tab = P x θab thermal resistances are encountered
electrical circuit, but by far most of the by the heat flow? Just like electrical
heat is generated within electronic T acts as a “heat voltage,” P like a resistance, the thermal resistances
components. “heat current,” and θab as “heat sum in series. The total thermal
An electrical component gets rid resistance.” T is usually specified in resistance is θ = θ1 + θ2 + ... + θn.
of heat by transferring it to the °C and P in watts. θ is specified in Temperatures at the junction of the
surrounding air. The heat can pass
directly to the air from the surface FIGURE 1. Basic heat transfer is very FIGURE 2. If the heat must flow through a
of the component or a heatsink can similar to Ohm’s Law for resistance. sequence of materials, then the thermal
be used. Either way, if too much resistance of each material sums together,
V just as electrical resistors in series do.
heat builds up, the component can a
be damaged. Most of the time, Total θ = θ1 + θ2 + θ 3
only a few components have a Voltage
Source V I R ΔV
heavy heat load — pass transistors,
driver ICs, solenoids. Nevertheless, θ1
you’re the circuit designer, so Vb
you’re responsible for figuring out ΔV = I x R
which components need to be
cooled and how to do it. θ2 T
Ta Tn

Heat Transfer = Ohm’s Law


Heat
Source P θ P ΔT
The flow of heat follows rules θ3
that are remarkably similar to those
that govern the flow of electric cur- Tb
rent. As Figure 1 shows, tempera- ΔT = P x θ Tn = ΔT ( θn / total θ )
ture difference (ΔT) takes the place
July 2006 67
Silver.qxd 6/7/2006 9:45 AM Page 68

Choosing a HEATSINK
the duty factor of the current. components from the heat-
TABLE 1 For example, if a resistor only carries generating junction to the surround-
Heat Generation in Common current in pulses that are on one-tenth ing — or ambient conditions — is
Electronic Components of the time, multiply Pd by 0.1. written as θja.
For semiconductors, you’ll have This is sometimes referred to as
● Resistor — Pd = I2 x R = V2 / R = V to figure out the average current flow the free-air thermal resistance because
xI and voltage. This can seem daunting it represents the total thermal
in AC circuits, but there is a shortcut resistance between the junction and
● Diode, SCR, or TRIAC — Pd = Vf x that overstates the heat load, leading the ambient air, including all of the
Iavg where Vf is forward voltage drop to a conservative design. For example, intervening package and mounting
and Iavg is average forward current
let’s estimate the heat dissipation in a material.
rectifier that is on for one half-cycle Components made from
● Transistor — Pd = VCE x IC (bipolar)
and off for the other half-cycle. semiconductors such as silicon or
Pd = VGS x ID (FET)
Multiply the peak current by the max- gallium arsenide must be kept cooler
imum forward voltage — this assumes than some maximum temperature
● Inductor, Capacitor, Transformer —
full heat generation whenever the (Tjmax) or the device will be destroyed
Pd = I2 x RLOSS
diode is conducting — then divide by melting or damaged by having its
● Solenoid or Relay — Pd = I2 x RCOIL by two to account for the 50% duty internal structures overheat and
factor. diffuse or migrate. For devices
This overstates the actual made from silicon, the maximum
thermal resistances can be calculated amount of heat generated, which temperature is 125 to 150 °C.
just like voltages in a voltage divider, reaches the maximum value at the To determine what the
as shown in Figure 2. (Yes, there are peak of the current, but is less at maximum temperature inside a
parallel heat circuits, too.) other times. If you design for the esti- device will be, start by looking up θja
The discrete thermal resistances mated heat load, your components in the device’s data sheet and
in series represent the flow of heat will run much cooler. Heating in calculating how much power it
through a series of materials. For other AC circuits can be estimated in will be dissipating during use. The
example, in winter, the heat in your similar fashion. junction temperature will be:
house flows first through the air inside, For estimating an IC’s power dis-
then through the inner wall, through sipation, total the power dissipation Tj = Tambient + P x θja
the insulation, and through the outer from each significant source of heat
wall to the ambient air outside. The — usually the output circuits. If you find Tj will be less than Tjmax,
larger the total thermal resistance, Calculate the power assuming the IC then no heatsink is needed. Be careful
the less heat is lost for any given output is a transistor. Don’t forget to when selecting your ambient temper-
combination of inside and outside include power dissipated by the IC’s ature. Inside an equipment enclosure,
temperatures. Conversely, if you like other circuitry — multiply the power the actual ambient temperature at the
the temperature high or it gets colder supply voltage times current drawn surface of the component may be
outside, you’ll lose more heat because by the IC. quite a bit higher than room tempera-
ΔT is larger. ture. You must also include a safety
Does Your Device factor — 25 percent or 35 °C is often
How Much Heat Does a Need a Heatsink? used.
Component Generate? Let’s say that you find your
Resistors and capacitors generate device’s Tj to be too close to the
Power dissipation in resistors is heat throughout or along their bodies. limit. Either P or θja must be reduced.
pretty easy to calculate, but what They are rated for some maximum To reduce P, you’ll have to change
about semiconductors and ICs? For continuous power dissipation (Pdmax) the circuit design. If you decide to
components where the resistance such as for a half-watt resistor. Pdmax is reduce θja, you’ll have to figure out
isn’t known or changes — such as for also specified at a specific ambient how to pass heat more effectively
an FET — you can’t easily use I2R. temperature because that determines through the component’s outer
In these cases, use V x I. And that the temperature at one end of the surface.
works for resistors, too! Table 1 component’s thermal resistance You must now split θja into two
shows a list of equations for heat string. thermal resistances in series: θjc — the
generation in some common elec- Diodes and transistors generate thermal resistance from the junction
tronic components. heat in the very small volume of the to the outer surface (which you can’t
If a resistor is carrying AC current, junctions or channels that conduct change) and θca — from the case to
use RMS values for voltage and current. This is generally referred to ambient (which you can change). θjc is
current. For either DC or AC currents as the “junction” and is abbreviated the thermal resistance from the
that are intermittent, multiply Pd by as ‘j.’ Thermal resistance in these junction to the case of the transistor,
68 July 2006
Silver.qxd 6/7/2006 9:45 AM Page 69

Choosing a HEATSINK
which might be a metal tab or just the power the component will dissipate. IERC 7-340-2PP-BA is a nice choice,
external plastic surface. This is illustrat- Since θjc is fixed, calculate maximum with a 7 °C/W rating. The margin
ed in Figure 3. case temperature: of 1.4 °C/W also allows for a
small additional amount of thermal
Picking a Heatsink Tcmax = Tjmax - P x θjc resistance in the insulating pad
required between the IC and
One way to cool a component is Estimate the ambient temperature. heatsink.
by moving air across its surface, The required thermal resistance of the
keeping Tambient low. You can use a fan heatsink is then: You might decide that the
or even orient the component so heatsink is too big (it’s about a cubic
that natural convection keeps air θca = (Tcmax - Tambient) / P inch) or too expensive (single
moving across the hot surface. This quantities are $1.75). In that case,
technique is limited to power From the catalogs or websites you must allow a higher junction
dissipation of about one watt or less, of heatsink manufacturers, you can temperature or figure out how to
particularly in small components that now select a heatsink that has reduce the power dissipation in
have small surfaces. both the right θca and fits in your the regulator. You could also lower
For larger amounts of heat, a enclosure. the ambient temperature. Any of
heatsink is required to lower θca. these three will allow you to use
Heatsinks can be anything sufficient- An Example of a heatsink with a higher thermal
ly massive and thermally conductive Heatsink Selection resistance. If you’d like more
to conduct heat away from the information on heatsink selection,
component. Almost any metal A common heatsink application heatsink manufacturer Aavid-
object can be used as a heatsink, is dissipating heat from a pass transis- Thermalloy has published a short
including printed circuit board tor or voltage regulator, such as the tutorial on picking heatsinks
ground planes and the equipment common 7805. (Download the 7805 at www.aavidthermalloy.com/tech
chassis. You don’t have to use a data sheet from www.datasheet nical/papers/semisize.shtml
manufactured heatsink! archive.com) Let’s say the 7805 will
Semiconductors that are intend- drop the input voltage from 12V to Summary
ed to dissipate heat have packages 5V at its output with a peak sustained
designed for use with a heatsink. For current load of 0.5 amps. We’ll That’s the basic process: Figure
example, in the TO-220 package, also assume that the inside of the your heat load, specify the maximum
the semiconductor sits directly on electronics enclosure will be 33 °C or temperature, determine the thermal
a metal tab that is electrically 10 °C higher than room temperature resistances involved, and go shopping!
connected to the device. The TO-3 of 23 °C. Eventually, you’ll become skilled at
package is completely metal and is managing heat — both in reducing its
also electrically connected to the • Start by calculating total heat dissi- generation and in getting rid of it. And
device inside. Why electrically con- pation: PD = (VIN - VOUT) x I = 7V x 0.5 you can chalk it all up to thermal
nected? To avoid an intervening A = 3.5 W. Without a heatsink, this analysis. NV
layer of material that would increase regulator will get mighty toasty!
thermal resistance. The aggravation FIGURE 3. Total device thermal resistance
of having a non-isolated package • Look up the 7805 junction to includes internal and external resistance.
is well worth the improved heat case thermal resistance: Codi
transfer efficiency. Electronics specifies it as Rj-c = 5 Tj
The heatsink’s thermal resist- °C/W. Junction
ance in °C/W tells you how much
the surface temperature (not the • If we set maximum junction
junction temperature) of the temperature at 80 °C, then Tcmax Internal θ jc
attached component will rise per = Tjmax - P x θjc = 80 - 3.5 x 5 =
watt of heat. Assume that this is a 62.5 °C. Case θ ja ΔT ja
value based on a natural convection
figure. Using a fan lowers the • The heatsink’s thermal External θca
heatsink’s thermal resistance. High resistance must be no larger
power heatsinks will have values of than θca = (Tcmax - Tambient) / P =
θca that are specified for different (62.5 - 33) / 3.5 = 8.4 °C/W. Ambient
amounts of air flow. Ta
To select a heatsink, start by • Browsing the Digi-Key
specifying a maximum junction selection of heatsinks (www. Total θ ja = θ jc + θca
temperature. Calculate the amount of digikey.com), I found that the
July 2006 69
Full Page.qxd 6/6/2006 2:43 PM Page 70

ALL
QUALITY Parts
FAST Shipping

ELECTRONICS
DISCOUNT Pricing
CALL, WRITE, FAX or E-MAIL
for a FREE 96 page catalog.
C O R P O R A T I O N Outside the U.S.A. send $3.00 postage.

300W POWER INVERTER 3' AUDIO/VIDEO CABLE, 1A SOLID STATE RELAY


Monster Cable MCPI-300. STEREO Grayhill #70YY14350.
300 Watt Dual Outlet DC to Triple RCA cable for video / In-line solid-state relay.
AC Power Inverter. stereo audio applications. Output, 1 Amp / 120 Vac.
Converts 12 Vdc to 75 Ohm video cable Input not listed on part, but
120 Vac. Suitable for with two shielded appears to be the typical
TVs, portable 3-32 Vdc control voltage.

1
$ 75
audio cables. Gold-plated,
electronics and molded RCA plugs. Color-coded 1.52" x 0.68" x 0.18" thick. UL.
power tools. CAT# SRLY-10 each

2
$ 95
plugs and labels. 10 for $1.50 ea.
Includes hardware kit to CAT# AVS-31
permanently install Power each
Station in your vehicle. 100 for $2.00 each 12 VDC 800 MA WALL
* Stage One Clean Power to reduce interference. TRANSFORMER
* Built-in cooling fan for optimum performance. LASER POINTER / PEN 2.1mm i.d. coax power plug.
* Audible overload alarm and LED status indicators.
Center positive.
* Gold-plated contacts for maximum conductivity.
* Complete hard-wire install kit included. Good-looking, good quality, ball point pen
CAT# DCTX-1280
* Dual outlet design provides ability to run multiple
devices simultaneously.
* 6.50" x 4.75" x 2.50".
CAT# INV-300
$ 49 95
each
with a bright push-button laser built into the
back end. Metallic-grey pen was a promo-
tional item for a medical company whose
$ 505
each
logo is imprinted on it. Replaceable ink car-
tridge and batteries. 4 AG3 batteries are
PRECISION DC MOTOR
CELLPHONE / CAMERA / Faulhaber 2342.39054.
included. Individually boxed. Excellent price
MP3 CASE Quiet, powerful little
Attractive, ballistic nylon case
fits most cell phones, small
digital cameras and
for a laser pen of this quality.
CAT# LP-100
3
$ 50
each
25 for $3.00 each • 100 for $2.50 each
DC motor. Operates
effectively 3-30 Vdc.
12 Vdc, 70 mA no
MP3 players. Includes a load rating. Overall length without shaft,
removeable carabiner 12 VDC 500 MA 2-STAGE 48mm. Motor is incased in a black aluminum,
that lets you attach keys heat-sinking sleeve with a 30mm square
CHARGER FOR LEAD-ACID mounting bracket on one end. Mounting holes
or other items to the case.
A nylon clip on the back of the case can be BATTERIES on 25mm centers. 2mm diameter shaft
used as a belt clip or attachment to a purse. Designed to maintain extends 12mm on one end of motor. Other
Multiple pockets allow you to carry more than maximum performance end has 11mm diameter gear with 18 teeth.
just a phone - perhaps your MP3 player, or from your sealed lead 90mm wire leads.
other electronic devices. Magnetic front pocket
flap for easy access. Larger middle pocket has
acid batteries. Dual stage
output and regulated current
CAT# DCM-274
6
$ 00
each

$ 503
a zipper for even more security. control to insure that no damage
CAT# CSE-44 10 for $3.00 ea. occurs while battery remains on charger.
24 X 1 LCD
each "Fast-charge" cycle of 15Vdc, 500mA Wintek# WDC2401P-1GNNA.
brings battery to fully charged state at Module size:
BLUE ULTRA-BRIGHT LED 4.25" x 0.79" x 0.3"
which point the float-charge takes over,
Our lowest price ever on 5mm (T 1 3/4) Display size:
maintaining the battery at a constant 13.8
ultrabright blue leds. Water clear in off- 3.5" x 0.4"
Vdc. LED indicators; red indicates fast-
state. We don't have exact specs, but LED Built-in driver.
charge, green indicates power-on and float-
is at least 1500 mcd, very bright and clear. 14 pin male header, pins on 0.05" centers.
charge. Screw terminals allow user to
CAT# LED-122 attach desired cable and connector. UL. Includes hook-up diagram.

70 ¢ CAT# LCD-111
each
100 for 45¢ each
1000 for 35¢ each
CAT# BC-212
$ 12 75
each 10 for $1.50 each $ 851
each

Shop ON-LINE www.allelectronics.com


ORDER TOLL FREE 1-800-826-5432
MAIL ORDERS TO: FAX (818) 781-2653 • INFO (818) 904-0524
ALL ELECTRONICS CORP.
14928 OXNARD ST., VAN NUYS, CA 91411-2610 E-MAIL allcorp@allcorp.com
NO MINIMUM ORDER • All Orders Can Be Charged to Visa, Mastercard, American Express or Discover • Checks and Money Orders Accepted by Mail •
Orders Delivered in the State of California must include California State Sales Tax • NO C.O.D • Shipping and Handling $7.00 for the 48 Continental United
States - ALL OTHERS including Alaska, Hawaii, P.R. and Canada Must Pay Full Shipping • Quantities Limited • Prices Subject to change without notice.

MANUFACTURERS - We Purchase EXCESS INVENTORIES... Call, Write, E-MAIL or Fax YOUR LIST.
70 July 2006
Page71.qxd 6/8/2006 11:37 AM Page 71

Microprocessor PIC Programming Made Easy!


Hands-On Training Proton+ PICBASIC Development Suite
T he PRIMER Trainer is now New & Improved
and even easier to use. The PRIMER is
a flexible instructional tool featured
in Prentice Hall textbooks and used
by colleges and universities
around the world. Ruggedly
designed to resist wear, the Next Generation IDE
PRIMER supports several Proton IDE is a professional
different programming and powerful visual Integrated
languages. A comprehensive Development Environment (IDE)
Self Instruction Manual and an Primer which has been designed specifically
Applications Manual provides Training for the Proton Plus compiler. Proton
lessons, theory, and sample code Kit starting IDE accelerates product development SAVE TIME WITH
for a number of Hands-On lab projects. at $120.00 USD in a comfortable user environment END TO END
! Scan Keypad Input & Write to a Display without compromising performance,
! Detect Light Levels with a Photocell flexibility or control.
INTEGRATIONS
! Control Motor Speed using Back EMF NEW IDE - New IDE makes
! Design a Waveform Generator • Code Explorer development using Proton+
Application ! Measure Temperature • Compiler Results even faster and more intuitive!
Projects ! Program EPROMs • Programmer Integration COMPILER - The popular
! Bus Interface an 8255 PPI • Integrated Bootloader FREE Proton+ compiler has
Include: ! Construct a Capacitance Meter • Serial Communicator DOWNLOADABLE enhanced support for I2 C,
! Interface and Control Stepper Motors • Online Updating DEMO SPI, Dallas 1-wire bus, RS232,
! Design a DTMF Autodialer / Controller • Plugin Architecture X10, Compact Flash
! Programming a Reaction Time Tester Memory Cards and USB.
• Real Time Simulation Support VIRTUAL SIMULATION -
Since 1985 Simulate your project in
OVER Visit www.r4systems.com to see RealTime using the integrate
20 our latest Proton+ projects Proteus Virtual PIC Boards.
YEARS OF Phone 618-529-4525 Fax 618-457-0110
SINGLE BOARD 2390 EMAC Way, Carbondale, IL 62901
SOLUTIONS World Wide Web: www.emacinc.com The Complete
Electronics
Design System
EASY TO USE
CAD TOOLS AT
FANTASTIC PRICES!
Schematic and PCB Layout
• Powerful and flexible schematic capture.
• Auto-component placement. • Rip-up and Retry PCB routing.
• Polygonal gridless ground planes.
• Library of over 8000 schematic and 1000 PCB foot prints.
• Bill of materials, DRC reports and more.
Mixed Mode SPICE Circuit Simulation
• Berkeley SPICE3F5 simulator with custom extensions for true
mixed mode and interactive simulation.
• Six virtual instruments and 14 graph based analysis types.
• 6,000 models including TTL, CMOS and PLD digital parts.
• Fully compatible with manufacturers’ SPICE models.
ProteusVSM- Co-simulation & debugging for popular Micro-Controllers
• Supports PIC16 & PIC12, AVR, 8051, HC11 and ARM micro-controllers.
• Latest version includes 40 new PIC18's.
• Co-simulate target firmware with your hardware design.
• Includes interactive peripheral models for LED and LCD displays,
switches, keypads, virtual terminal and much, much more.
• Provides source level debugging for popular compilers and
assemblers from HiTech PICC, Crownhill, IAR, Keil and others.
PCB AutoRouting
• Proteus PCB design includes an interface to the Electra Gridless
autorouter.
FREE DOWNLOADABLE DEMO! Save Time. Save Money.
Proteus Starter Kit – $249 • Complete Systems from $499
“This is clearly superior in every respect.”
Tel: 905•898•0665
R4 SYSTEMS INC. www.r4systems.com info@r4systems.com
Full Page.qxd 6/7/2006 3:12 PM Page 72

Cutting edge products to quickly solve your toughest


design and measurement problems!
USB to I2C PLC on a Chip 4/8 x RS232 USB TC-08 Motion Detector New Products!
Dualcore..............................dual ARM IC
Emulin.............LlNbus/J2602 emulator
WIZnet......................................TCP/iP IC
Hunt RTG...........instant FPGA/DSP
Video Motion Detectors -
USB I2C/IO - provides a simple Cubloc - multi-tasking PLC-on-a-chip 4COM - add 4 or 8 COMports to USB TC-08 - USB connected and Byteparadigm.................USB 2.0 I/O
Automatically detect motion of
"drop-in" solution for connecting - Basic + Ladder Logic: fast control, your PC with this unit that plugs into powered 8-ch thermocouple data Systembase..........Quad UART chip
objects within a video signal for security
your PC to 90kHz I2C + 20 I/O lines. complex math, graphic LCD, data- your PC's USB port. 4COMi version logger. Samples at up to 10 rdgs/S cameras, VCRs, video switchers, quad T&D........networked temp/hum logger
Free software. Use multiple boards comms 49 I/O ports, 8 x 10-b A/D, gives 4 X RS 422/485 ports with h/s. with built-in CJC for -270 to 1820 TV processors, etc. Owasys.............embedded wireless
for more I2C/IO. up to 6 x 16-bit PWM. USB-4COM from $105! degC. VMD19 only $32.79! TrackStick..............GPS data logger
USB I2C/IO only $79! Cubloc from $99! USB-8COM from $195! PP222 only $401.65! VMD19-M only $155.79! DLP-D...Programmable USB dongle
PenScope FATfile Storage AudioWave easyRADIO RS232<>422/485 I2C for PCs

2105 - High-perf. USB2.0-pwrd Micro ALFAT-SD - easy, ready- AudioWave - Software turns your easyRADIOTM ER900TRS Transceiver K2 9p-9p self-pwrd RS-422/485 UCA93LV - USB-connected I2C
scope-in-a-probe! Up to 100MS/s, made way to add SD storage to Soundcard into a Sweep Generator! Modules make wireless data K3 9p-9p isolated RS-422/485 interface for PCs - 400kHz master/
25MHz 24kbuffer. +/-100mV to your product. Serial data in/FATfile Easy-to-use digitally-controlled LF- transmission simple for USA and K3-232 9p-9p isolated RS232 slave/monitor WINI2C/UCA software
+/-20V. 20nS/div – 50S/div data out. - $39.95. signal-generator, 1Hz-20kHz. Great Europe ! Add wireless capability to K232-ISOL 25p -25p RS232 gives windows-interface to develop
C/VB/Delphi/LabView/ VEE drivers. Or design-in an micro ALFAT ic for for service calls! your project today! KD485-STD DINrail - isolated and debug I2C bus systems.
PP317 from $199! MB storage - $14.00! AudioWave only $59.95! from $35 (100pr) KD485-PROG programmable! UCA93LV only $499!

Stepper Motor Easy VGA CleverScope FrontDesign SM PCB Adapters Disturbance Logger

Easy-Step™ 3000 - advanced stepper microVGA - graphics adapter that CleverScope - 100 MHz Scope, FrontDesign - software for designing OM-Adapt SM miniboards have ACR PowerWatch - PowerWatch
motor drive and control system for allows micros to display text & graphics Spectr.Anal, LogicAnal, & SigGen. for professional-looking front panels - two footprints on either side. Now 120V - monitor/record essential voltage
unipolar stepper motors up to 35V/3A on any VGA monitor. Connect to any PCs. 4 Msamples storage! Easy A-B, with a host of drawing functions. use your ultra fine pitch SMD disturbances from any power socket.
and 3 Amps - ideal for robots/industrial host micro controller, embedded math! 2 x 10 bit ch, 8 dig. I/P. Opt. Print, mill or engrave, or export final components with more useful 0.1" Set thresholds and plug it in. No
control – turns you into an instant device or a PC with a USB or serial 0-10 MHz SigGen.+ math + filters. at 600 dpi. inline spaced holes. wiring! 4000 events; optical alarm.
motor control expert! from $119! port. Clever & simple to use. $139! CS328 only $999! FrontDesign only $79.95! One-to-one pinouts. $9.52! from $495!

USB <> RS485 Easy USB USB Logic Analyzer Touchpanel Controller Instant FPGA FT232R Module

USB-COMi (non-isolated) or uUSB - Tiny USB ready-made ANT8 Matchbox-sized USB-powered CUTOUCH - 320 x 240 Blue Hevday - Instant FPGA Logic – UM232R - FT232R 24-pin DIP
USB-COMiSI (isolated) offer self- USB Interface to 1 Mbps 0.7” x logic analyzer. Sample 8 channels GraphicLCD Touchpanel/controller j u s t a d d k e y s t r o k e s ! F a s t e s t module - USB-TTL serial converter
powered USB to RS485 conversion 0.5” based on SiLabs CP2101. at up to 500 million samples-per-sec. CUBLOC Program in BASIC and/or 100 MHz FPGA logic design. for your project. Reference circuit
with baud rates 184bps - 3Mbps. Gnd/RX/TX Suspend, Reset, & View traces on PC. Print or save LadderLogic. 82 I/Os and 2 RS232 Design / control / monitor visually! for FT232R. Plug-in module adds
PC thinks it’s talking to a COMport! 3.3V 100mA source –40°C for later review! (16-ch. ver. too MODBUS support. FPGA with an OS! USB1.1 instantly!
COMi/COMiSI only $48/$85! +85°C. Micro USB only $25! $333!) ANT8 $222! CT1720 only $359! HDK-0501 only $499! UM232R only $19.99!

Easy LCD 4ch 12-bit USB scope USBwiz CAN-USB USB Bus Analyzers RF Testing

USBwiz - Easily add USB peripherals


uLCD - Easy way to add 2” sq PS3424 - New 4channel 12-bit to your system. Includes FATfile CAN-USB - intelligent CAN connection Tracker 110/Explorer 200 high- STE3000B - Economical benchtop
LCD to your project. microLCD 20MS/s USB2.0-connected/powered system for USB thumb drives & from PC’s USB port. Provides performance, economical USB RF test enclosure for troubleshooting,
128 x 128 color LCD. Add scope adapter. Scope, FFT, and external USB hard drives. USBwiz plug’n’play opto-isolated. Other 1.1/2.0 protocol analyzers. tuning, testing electronic devices in an
knows TCP/IP- connect your product to
text/graphics/animations for any meter displayed simultaneously CANbus boards and systems only $999/$2999! RF-free environment. 8"H x 17"W
internet/LAN. No USB knowledge
micro with serial or USB. with free software. needed, plug and play! available from Janz AG. USBEX300 for debugging USB x 10½"D inside. Built-in illumination
uLCD only $69! PP298 $1269.95! IC $39.95 Demoboard $69.95 from $299! wireless Wimedia $<29,500! (RF-filtered supply). from $1095!

Customer Comments USB Temp Logger Ether-IO Signal Wizard FREE COFFEE Saelig Company Inc.
searches the world to bring
"Your personal service you unique, easy-to-use
control and instrumentation
makes you different"
products from overseas.
"I like being able to talk to Call 1-888-7SAELIG Customers include: Intel,
EL-USB-1 - Standalone USB temp Ether-IO - UDP/IP-controlled 24 X Signal Wizard - easy-use real-time Philips, NEC, Kodak, Nokia,
a human being that Mention Offer# SBW
data logger (25 to +80oC). Stores digital I/O board. 3 x 8-bit TTL ports DSP-based filter board for audio US Military, Microsoft, Dell,
understood what I needed." to get a free
16K Li-backed readings. Log data each independently programmable. bandwidth signals. Design filters Xerox, Universities, T.I.,
STARBUCKS Card
for >1 year! from $59.95! Connects to any TCP/IP Ethernet in seconds without any DSP Harris, Sony, J&J, Thomson,
"Delivery prompt .. with your order!
El-USB-2 (+ humidity) $79.95! network. knowledge! Sandisk, General Dynamics,
While supplies last -
product works great!" EL-USB-3 (voltage) $69.95! Ether-IO 24 from $99! Signal Wizard II only $399! Not available with any other offers H-P/Compaq, etc.
Saelig Co. searches the world to bring you unique, easy-to-use Also: Wireless Temp Loggers, PC for harsh environments, Temp Loggers, Automotive
control and instrumentation products from overseas. Customers Diagnostic Kit, PCI board, PC for Healthcare, Wi r e l e s s c o n t r o l l e r , O s c i l l o s c o p e , J T A G
include: Intel, Philips, NEC, Kodak, Nokia, US Military, testing, Indicator modules, SBC Compact control, Ether/IO, Industrial IO modules,
Microsoft, Dell, Xerox, Universities, T.I., Harris, Sony, J&J, Software for soundcard - front panels - logic simulation and hardware control - CAD
Thomson, Sandisk, General Dynamics, H-P/Compaq, etc. If you don’t see what you need maybe we can find it for you? - Ask for sales!
Page73.qxd 6/8/2006 10:28 AM Page 73

Amazing Devices
www.amazing1.com
Laser Modules
All laser modules operate from 3 volts and include built in optics
providing a parallel beam of 1mr or less. Includes instructions on
safety requirements for FDA full compliance
Red - Class IIIa
LM650P3 - 3mw 650 nm12 x 45 mm ........ $14.95
LM650P5 - 5mw 650 nm 12 x 45 mm ....... $24.95
LM630P3 - 3mw 630 nm 10.5 x 45 mm .... $34.95
Red - Class IIIb
LM650P10 - 10mw 650 nm 12 x 51 mm ... $99.95
LM650P30 - 30mw 650 nm 12 x 51 mm . $249.95
Green - Class IIIa
LM532P5 - 5mw 532 nm 12X45 mm ........ $49.95
Infrared - Class IIIb
LM980P30 - 30mw 980 nm 12X30 mm ..... $49.95
Laser Diode Visible Red - Class IIIb
LD630-P10 - 10mw 635 nm 5 mm diode .... $29.95

High Voltage Capacitors


Ceramic capacitors for voltage multipliers, etc.
22/6KV - 22 pfd 6kv .28” x .17” ................. $.35
50/6KV - 50 pfd 6kv .325” x .18” ................ $.45
100/6KV - 100 pfd 6kv .46” x .17” .............. $.65
200/3KV - 200 pfd 3kv .3” x .25” ................ $.45
270/3KV - 270 pfd 3kv .3”d x .25” .............. $.45
470/10KV - 470 pfd 10kv .35”d x .25” ......... $.75
1000/20KV - 1000 pfd 20kv .5”d x .37” ..... $2.25
.01/2KV - .01mfd 2kv .63” x .13” ............... $.50

Energy Storage Capacitors


Electro-kinetics,wire exploding, can crushing, emp, etc.
25M/5KV - 25 mfd 5 kv 312J 10 x 4 x 3 can ...... $100.00
32M/4.5KV - 32 mfd 4.5 kv 324J 9 x 4 x 2 can ... $170.00
10002M/2KV - 1000 mfd 2 kv 2K J 4 x 8 x 7 can $299.00
1.3M/100KV - 1.3 mfd 100 kv 6500J case ........ $750.00

High Voltage Transformers


Includes circuit schematics on how to use.
28K089 - 7kv 10ma 30 khz 9-14v 1”cube . $19.95
28K074 - 4kv15ma 30 khz 9-14v 1”cube . $17.95
28K077 - 2kv 10ma 30 khz 7-9v .7x1.25 .... $9.95
CD25B - 20 kv trigger pulse 1 x 1.25 ...... $16.95
CD45 - 40 kv trigger pulse 1.25 x1.25 .... $18.95
TRAN1035 - 10 kv35 ma bal output ........ $39.95
FLYLABURN - 10 kv 60 ma end grd ...... $49.95
FLYEXP - 4 misc flybacks ................... $24.95
FLYHP - High power large flyback ........ $34.95

High Volt/Freq Modules


12 vdc with instructions on how to use.
MINIMAX1 - 1kv15 ma 35 khz ................ $17.95
MINIMAX2 - 2kv10 ma 50 khz ................ $17.95
MINIMAX3 - 3kv10 ma 35 khz ............... $19.95
MINIMAX7 - 7kv10 ma 35 khz ................ $34.95
SS01S - 1 to 7kvac for ozone .............. $24.95
GRADRIV10 - 7.5 kv15 ma 35 khz adj .... $79.50
PVM300 -20kv25ma 115vac input ......... $179.95

High Volt DC Modules


12 vdc with instructions on how to use.
PBK40 - 10 kv 100ua 9 vdc in .................. $34.95
CHARGE10 - 10kv 2.5 ma ....................... $59.95
SHK10 - 2kv 10 ma shocker .................... $39.95
TRIG10 - 20 kv trigger/shock pulses ........ $54.95
SS016S - +20kv 100ua ............................ $29.95
SS010S - -20kv for neg ions .................... $24.95

Parts for Tesla Coils


Includes plans for two of our coils. Parallel for 60&120ma.
4KV/.03 - 4kv30ma60hz floating output ........ $59.95
6.KV/.02 - 6.5kv20ma60hzfloat output ......... $59.95
9KV/.03 - 9kv 30ma60hz midgrd output ..... $79.95
12KV/.03 - 12kv30ma60hz midgrd output .... $109.95
15KV/.03 - 15kv30ma60hz midgrd output .... $139.95
14.4KV/.5A - 14.4kv.5amp pole pig ............ $699.95
Spark Gaps and Electrodes
SPARK1 - Fan cooled dual gap 3/8” tungsten $149.95
SPARK05 - Single gap 1/4” tungsten ............ $49.95
TUNG141B - 1/4” x1” pair electrodes with holders tungsten $14.95
TUNG38 - 3/8” x2” pair electrodeswith holders tungsten .... $59.95
Toroidal Terminals
TO8 - 8 x 2” Spun Aluminum Toroid .... $59.95
TO12 - 12 x 3” Spun Aluminum Toroid . $79.95
TO24 - 24 x 6” Spun Aluminum Toroid $399.95
TO30 - 30 x 7”’ Spun Aluminum Toroid$525.95
See website for more data on above items
Minimum order is $25.00. Volume pricing available
Information Unlimited, Box 716, Amherst, NH 03031 USA
Orders: 800-221-1705 Info: 603- 673-6493 Fax: 603-672-5406
Email: riannini@metro2000.net
Marston1.qxd 6/6/2006 10:42 AM Page 74

UNDERSTANDING
Digital Logic ICs
PART 1 — Digital Logic IC Basics

Ray Marston explains digital logic IC


fundamentals in this opening episode BY RAY MARSTON
of a four-part, introductory mini-series.

M
odern digital logic ICs are used as pre-amplifiers, power known as the “logic” type, in which
widely available in three amplifiers, oscillators, and signal the ICs are designed around fairly
basic types: TTL devices processors, etc., and give a basic simple logic circuits such as digital
(typified by the 74LS00 logic family), output that is directly proportional to buffers, inverters, gates, or flip-flop
“slow” CMOS devices (typified by the magnitude (analog value) of the elements. Digital logic circuits come
the “4000” logic family), and “fast” input signal, which itself may have in a variety of basic types and can be
CMOS devices (typified by the any value between zero and some built using a variety of discrete or
74HC00 and 74AC00 logic families). prescribed maximum limit. integrated technologies. Figures 2
Each of these families has its own One of the simplest types of through 7 show a selection of very
particular advantages and disadvan- linear IC elements is the unity-gain simple logic circuits that are designed
tages, and its own special set of buffer. If a large sine-wave signal is around discrete components.
usage rules. connected to the input of this circuit, Figure 2(a) shows a simple
This four-part mini-series explains it produces a low-impedance output inverting digital buffer (also known as
the basic principles and usage rules of almost identical form and ampli- a NOT logic gate), consisting of an
of each of these three digital logic tude, as shown in Figure 1(a). Digital unbiased transistor wired in the
families, and provides practical usage ICs, on the other hand, are effective- common-emitter mode, and Figure
guidance for the vast range of ICs ly blind to the precise amplitudes of 2(b) shows the international symbol
available in each of these families. their input signals, and simply recog- that is used to represent it. The
This opening article concentrates on nize them as being in either a low or arrowhead indicates the direction of
digital logic IC basics. a high state (usually known as logic-0 signal flow, and the small circle on
and logic-1 states, respectively). the symbol’s output indicates the
Digital Logic IC Basics Their outputs similarly have only inverting action.
two basic states, either low or high The circuit action is such that Q1
An IC can be described as a (logic-0 or logic-1). One simple is cut off (with its output high) when
complete electronic circuit or type of digital IC element is the non- its input is in the zero state and is
“electronic building block,” integrat- inverting buffer. If a large sine-wave driven fully on (with its output pulled
ed into one or more semiconductor signal is connected to the input of low) when its input is high. This
slices (or “chips”) and encapsulated this circuit, it produces an output that information is presented in concise
in a small, multi-pin package. An IC (ideally) is of purely digital form, as form by the Truth Table of Figure 2(c),
can be made fully functional by shown in Figure 1(b). which shows that the output is at
wiring it to a suitable power supply Digital ICs are available in a logic-1 when the input is at logic-0,
and connecting various pins to variety of rather loosely defined and vice versa.
appropriate external input, output, categories such as memory ICs, Figure 3(a) shows a simple non-
and auxiliary networks. electronic delay-line ICs, and micro- inverting digital buffer, consisting of a
ICs come in both “linear” and processor support ICs, etc., but the direct coupled pair of common-
“digital” forms. Linear ICs are widely most widely used category is that emitter (inverter) transistor stages.
74 July 2006
Marston1.qxd 6/7/2006 9:29 AM Page 75

FIGURE 1. When a large input sine wave FIGURE 2. Circuit (a), symbol (b), and FIGURE 3. Circuit (a), symbol (b), and
is fed to the input of a linear buffer (a), it Truth Table (c) of a simple inverting Truth Table (c) of a non-inverting digital
produces a sine-wave output, but when digital buffer. buffer.
fed to the input of a digital buffer (b), it
produces a purely digital output.

FIGURE 4. Circuit (a), symbol (b), FIGURE 5. Circuit (a), symbol (b), and Truth FIGURE 6. Circuit (a), symbol (b), and
and Truth Table (c) of a simple two- Table (c) of a two-input NOR gate. Truth Table (c) of a simple two-input
input OR gate. AND gate.

Figure 3(b) shows the arrow-like gate’s Truth Table, which indicates describe the relative density or
international symbol used to represent that the output goes to logic-1 only if complexity of integration:
it. Figure 3(c) shows the Truth Table inputs A and B are at logic-1.
that describes its action, e.g., the Finally, Figure 7 shows the circuit, • SSI (Small Scale Integration) —
output is at logic-0 when the input is symbol, and Truth Table of a two-input Complexity level between one and 10
at logic-0, and is at logic-1 when the NAND (Negated-output AND) gate, gates.
input is at logic-1. in which the output is inverted
In digital electronics, a “gate” is a (as indicated by the output circle) and • MSI (Medium Scale Integration) —
logic circuit that opens or gives an goes to logic-0 only if both inputs are Complexity level between 10 and 100
output (usually defined as a high or at logic-1. gates.
logic-1 state) only under a certain set Note that although the four basic
of input conditions. Figure 4(a) shows types of logic gate circuits described • LSI (Large Scale Integration) —
a simple two-input OR gate, made here are each shown with only two Complexity level between 100 and
from two diodes and a resistor, and input terminals, they can, in fact, be 1,000 gates.
Figure 4(b) shown the international designed or used to accept any
symbol used to represent it. Figure desired number of inputs, and can be • VLSI (Very Large Scale Integration) —
4(c) shows its Truth Table (in which used to perform a variety of simple Complexity level between 1,000 and
the inputs are referred to as A or B). logic operations. Many types of digital 10,000 gates.
Note that the output goes to logic-1 if buffers and gates are readily available
A or B goes to logic-1. in IC form, as are many other digital • SLSI (Super Large Scale Integration)
Figure 5 shows the circuit, logic circuits, including flip-flops, — Complexity level between 10,000
symbol, and Truth Table of a two-input latches, shift registers, counters, data and 100,000 gates.
NOR (Negated-output OR) gate, in selectors, encoders, and decoders.
which the output is inverted (as indi- Practical digital ICs may range Note that most logic ICs of the
cated by the output circle) and goes from relatively simple logic devices — types described throughout this series
to logic-0 if either input goes high. housing the equivalent of just a few of articles have complexity levels
Figure 6(a) shows a simple two- basic gates or buffers — to incredibly ranging from four to 400 gates, and
input AND gate, made from two complex devices housing the equiva- are thus SSI, MSI, or LSI devices. In
diodes and a resistor, and Figure 6(b) lent of tens of thousands of intercon- broad terms, most microprocessor ICs
shows its standard international nected gates, etc. By convention, the and moderately large memory ICs are
symbol. Figure 6(c) shows the AND following general terms are used to VLSI devices, while large dynamic
July 2006 75
Marston1.qxd 6/6/2006 10:43 AM Page 76

U N D E R S TA N D I N G Digital Logic ICs


RAM (Random Access Memory) ICs or negative-going leading edge. Note ICs can be built using various
are SLSI devices. that many modern MSI digital ICs, technologies. The first successful
such as counter/dividers and shift family of digital logic ICs appeared in
Digital Waveform Basics registers, can be selected or the mid 1960s. These used a 3.6 V
programmed to trigger on either the supply and employed a simple
Digital logic ICs are invariably rising or the falling edge of an input technology that became known as
used to process digital waveforms. It pulse, as desired by the user. Resistor-Transistor Logic, or RTL.
is thus pertinent at this point to If a near-perfect pulse waveform Figure 12 shows the basic circuit for
review some basic facts and terms is fed to the input of a real-life ampli- a three-input RTL NOR gate. RTL was
concerning digital waveforms. fier or logic gate, etc., the resulting rather slow in operation, having a
Waveforms are available in either output waveform will be distorted typical propagation delay (the time
square or pulse form. Figure 8 both in form and time, as shown in taken for a single pulse edge or
illustrates the basic parameters of a Figure 10. Thus, not only will the transition to travel from input to
square wave. In each cycle, the wave output waveform’s rise and fall times output) of 40 nS in a low-power gate,
first switches from zero to some peak be increased, but the arrival and or 12 nS in a medium power gate.
voltage value (Vpk) for a fixed period, termination of the output pulse will RTL is now obsolete.
then switches low again for a second be time delayed relative to that of the Another early type of IC logic
fixed period, and so on. The time for input pulse. technology, developed in the late
the waveform to rise from 10% to The mean value of the delays is 1960s, was based on simple develop-
90% of Vpk is known as its rise time, called the device’s propagation delay. ments of the discrete types of logic
and the time for it to drop from 90% Also, the peaks of the waveform’s ris- circuit shown in Figures 2 through 7,
to 10% of Vpk is known as its fall ing and falling edges may suffer from and was known as Diode-Transistor


time. various forms of ringing, overshoot, Logic, or DTL. Figure 13 shows the
In each square-wave cycle, the undershoot, etc. The magnitudes of basic circuit of a three-input DTL

An IC can be described as a complete electronic circuit or “electronic


building block,” integrated into one or more semiconductor slices
(or “chips”) and encapsulated in a small, multi-pin package.”

high part is known as its mark and the these distortions vary with the quality NAND gate. DTL used a dual five-volt
low part as its space. In a symmetrical or structure of the amplifier or gate. power supply, gave a typical propa-
square wave such as the one in Figure In practice, pulse input wave- gation delay of 30 nS, and gave an
8, the mark and space periods are forms may sometimes be so imper- output of less than 0.4 V in the logic-
equal. Such waveforms are said to fect that they may need to be “condi- 0 state and greater than 3.5 V in the
have a 1:1 Mark-Space (or M-S) ratio, tioned” before they are suitable for logic-1 state. DTL is now obsolete.
or a 50% duty cycle (since the mark use by modern, fast-acting digital ICs. Between the late 1960s and mid
duration forms 50% of the total Specifically, they may have such long 1970s, several other promising IC
cycle period). Square waves are not rise or fall times that they may have to logic technologies appeared. Most of
necessarily symmetrical, but are be sharpened up via a Schmitt trigger them soon disappeared back into
always free-running or repetitive, i.e., before they are suitable for use. oblivion again. Amongst those that
they cycle repeatedly, with consistent Again, many mechanically- came and either went or receded in
mark and space periods. derived pulse waveforms, such as importance were HTL (High
A pulse waveform is a bit like a those generated via switches or con- Threshold Logic), ECL (Emitter
square wave. It has both rise and fall tact-breakers, may suffer from multiple Coupled Logic), and PML (P-type
times, but only one portion — either “contact bounce” problems such as MOSFET Logic). The most durable of
its mark or its space period — is spec- those shown in Figure 11(a). In this these technologies was ECL, which is
ified; the duration of the remaining case, they will have to be converted to still in production and gives very fast
period is unimportant. Figure 9(a) the clean form shown in Figure 11(b) operation, but at the cost of very high
shows a basic “positive-going” pulse before they can be usefully used. current/power consumption.
waveform, which has a ‘rising’ or Figure 14 shows the basic circuit
positive-going leading edge, and Logic Families of the ECL digital amplifier — a non-
Figure 9(b) shows a “negative-going” saturating emitter-coupled differential
pulse waveform, which has a “falling” Practical digital logic circuits and amplifier (Q1 and Q2) with emitter-
76 July 2006
Marston1.qxd 6/7/2006 9:30 AM Page 77

FIGURE 7. Circuit (a), symbol (b), and Truth Table (c) of a FIGURE 8. Basic parameters of a square wave.
two-input NAND gate.

FIGURE 9. Basic forms of FIGURE 10. A perfect pulse, fed to the input of a practical amplifier or gate, produces an
(a) “positive-going” and (b) output pulse that is distorted both in form and time. The output pulse’s time delay is called
“negative-going” pulses. its propagation delay, and (in (b)) = (t1 + t2) / 2.

FIGURE 11. Mechanically derived FIGURE 12. IC version of a three-input RTL FIGURE 13. IC version of a three-input
pulse waveforms often suffer from NOR gate. DTL NAND gate.
contact bounce (a), and must be
cleaned up (b) before use.

FIGURE 15. (a) Simple digital switch. (b) Basic


FIGURE 14. Basic ECL (Emitter-Coupled Logic) amplifier circuit. “totem-pole” digital switch.

July 2006 77
Marston1.qxd 6/6/2006 10:43 AM Page 78

U N D E R S TA N D I N G Digital Logic ICs


follower output stages (Q3 and Q4). its output gives an active pull-down with both high-impedance gates
Because its transistors do not saturate action (via S1), but a passive pull-up joined together. The pair can be
when switched, it gives typical action (via S2). Obviously, a far better powered from any supply in the 3–15
propagation delays of only 4 nS. Note digital output stage could be made V range. When the circuit’s input is at
that the circuit’s V+ line is normally by replacing R2 and S1 with a ganged logic-0, the basic action is such that
grounded and the V- line is powered pair of change-over switches, Q1 is driven on and Q2 is cut off, and
at -5.2 V. connected as shown in Figure 15(b), the output is actively pulled high (to
Under this condition, the circuit so that S2 gives active pull-up action logic-1). Note that the output can
provides nominal digital output and S1 gives active pull-down action, source (drive) fairly high currents into
swings of only 0.85 V, i.e., from a low but so arranged that only one switch an external load (via Q1) under this
state of -1.60 V to a high state of -0.75 can be closed at a time (thus ensuring condition, but that the actual inverter
V. The circuit’s digital input is applied that the circuit consumes zero stage consumes near-zero current,
to the base of Q1. A non-inverted quiescent current). Such a circuit — since Q2 is cut off.
output is available on Q3 emitter, and with one electronic switch placed When the circuit’s input is at
an inverted output is available on Q4 above the other — is called a totem- logic-1, the reverse of this action
emitter. Modern ECL ICs are used pole output stage. occurs: Q1 is cut off and Q2 is
only when ultra high-speed operation Throughout the late 1960s, driven on, and the output is actively
is required. digital engineers strove to design a pulled low (to logic-0). Note that the
The basic aim of digital IC design- cheap and reliable electronic version output can sink (absorb) fairly high
ers during the late 1960s to early of the totem-pole output stage, and currents from an external load (via
1970s was to devise a technology then — in the early 1970s — they hit Q2) under this condition, but that the
that would be simple to use and that the jackpot. Two such technologies actual inverter stage consumes near-
achieved a good compromise hit the commercial market like bomb- zero current, since Q1 is cut off.
between high operating speed and shells and went on to form the basis Thus, the basic CMOS inverter
low power consumption. The of today’s two dominant digital IC can be used with any supply in the
problem here was that conventional families. The first of these — based on 3-15 V range, has a very high input
transistor-type circuitry, using an bipolar transistor technology — is impedance, consumes near-zero
output stage of the Figure 2 type (as known as TTL (Transistor-Transistor quiescent current, has an output
in RTL and DTL systems), was simply Logic). TTL is the basis of the so- that switches almost fully between
not capable of meeting the last two called “74” family of digital ICs that the two supply rails, and can source
of these design needs. The essence of first arrived in 1972. or sink fairly high output load
this problem — and its ultimate The second, based on FET currents. Typically, a single basic
solution — can be understood with technology, is known as CMOS CMOS stage has a propagation
the aid of Figure 15. (Complementary MOS-FET logic). delay of about 12-60 nS, depending
Figure 15(a) shows a simplified CMOS is the basis of the rival “4000- on supply voltage.
version of the circuit in Figure 2, with series” (and the similar “4500-series”) The TTL inverter of Figure 17 is
Q1 replaced by a mechanical switch. digital IC family that first arrived in split into three sections, consisting of
Remember here that all practical about 1975. The TTL and CMOS an emitter-driven input (Q1), a phase-
output loads inevitably contain technologies have vastly different splitter (Q2), and a totem-pole
capacitance (typically up to about 30 characteristics, but both offer output stage (Q3-D1-Q4). It must be
pF in most digital circuits), so it can specific technical advantages that powered from a five-volt supply.
be seen that this basic circuit will make them invaluable in particular When the circuit’s input is pulled
charge (source current into) a applications. down to logic-0, the basic action is
capacitive load fairly slowly via R2 The most significant differences such that Q1 is saturated, thus
when S1 is open, but will discharge it between the technologies of CMOS depriving Q2 of base current and
(sink current from it) rapidly via S1 and TTL ICs can be seen in their basic causing Q2 and Q4 to cut off, and, at
when S1 is closed; thus, circuits of inverter/buffer networks, which are the same time, causing emitter-
this type produce digital outputs that used (sometimes in slightly modified follower Q3 to turn on via R2 and
tend to have long rise times and short form) in virtually every IC within the give an active pull-up action in which
fall times. The only way to reduce the family range of each type of device. the output has (because of various
rise time is to reduce the R2 value, Figures 16 and 17 show the two volt-drops) a typical loaded value of
and that increases S1’s (Q1’s) current different basic designs. about 3.5 V.
consumption by a proportionate The CMOS inverter of Figure 16 This circuit can source fairly
amount. consists of a complementary pair high currents into an external load.
Note that one good way of of MOSFETs, wired in series, with Conversely, when the circuit’s input
describing the deficiency of the p-channel MOSFET Q1 at the top and is at logic-1, Q1 is disabled, allowing
Figure 15(a) logic circuit is to say that n-channel MOSFET Q2 below, and Q2 to be driven on via R1 and the
78 July 2006
Marston1.qxd 6/7/2006 9:30 AM Page 79

FIGURE 16. Circuit and Truth FIGURE 17. Circuit and Truth Table of a basic TTL inverter. FIGURE 18. TTL inverter with
Table of a basic CMOS inverter. open-collector output.

FIGURE 19. TTL non-inverting buffer FIGURE 20. TTL three-input NAND gate. FIGURE 21. Tri-State
with open-collector output. logic enables several
outputs or inputs to
be connected to a
FIGURE 22. An external 2 kΩ pull-up resistor common bus. Only
connected to the output of a totem-pole one output/input must
stage pulls the output to almost +5 V in the be made active at any
logic-1 state. given moment.

forward-biased base-collector load currents. Typically, a single basic (when lightly loaded) switches
junction of Q1, thus driving Q4 TTL stage has a propagation delay of almost fully between zero and the
to saturation and simultaneously about 12 nS. positive supply rail value.
cutting off Q3. Alternatively, it can be used to
Under this condition, Q4 gives an Basic TTL Circuit drive an external load (such as an LED
active pull-down action and can sink Variations or relay, etc.) that is connected
fairly high currents, while the output between OUT and a positive supply
takes up a typical loaded value of 400 There are five very important rail, in which case the load activates
mV. Note that (ignoring external load variations of the basic Figure 17 TTL when a logic-1 input is applied.
currents) the circuit consumes a inverter circuit. The simplest of these The second variation is the non-
quiescent current of about 1 mA in is the so-called “open collector” TTL inverting amplifier or buffer. This is
the logic-1 output state, and 3 mA in circuit, which is shown in basic form made by simply wiring an additional
the logic-0 output state. in Figure 18. Here, output transistor direct-coupled inverter stage between
Thus, the basic TTL inverter can Q3 is cut off when the input is at the phase-splitter and output stages of
only be used with a five-volt supply, logic-0, and is driven on when the the standard inverter. Figure 19 shows
has a very low input impedance, input is at logic-1. Thus, by wiring an an open collector version of such a
consumes up to 3 mA of quiescent external load resistor between the circuit, which can be used with
current, has an output that does not OUT and +5 V pins, the circuit can an external resistor or load. In this
switch fully between the two supply be used as a passive pull-up voltage example, Q4 turns on when a logic-0
rails, and can source or sink fairly high inverter that has an output that input is applied.
July 2006 79
Marston1.qxd 6/6/2006 10:44 AM Page 80

U N D E R S TA N D I N G Digital Logic ICs


Figure 20 shows a major TTL dozen emitters to make a 12-input disabled (turned off), creating an
design variation. Here, the basic gate. open-circuit (high impedance)
inverter circuit is used with a triple- A further variation concerns the output. This facility is useful in
emitter input transistor, to make a use of a “Tri-State” (or “three-state”) allowing several outputs or inputs to
three-input NAND gate in which the type of output that incorporates be shorted to a common bus or line,
output goes low (to logic-0) only additional networks plus an external as shown in Figure 21, and to
when all three inputs are high (in ENABLE control terminal. In one communicate along that line by
the logic-1 state). Multiple-emitter state, the totem-pole output stage ENABLING only one output and one
transistors are widely used within operates in its normal logic-0 or input device at a time.
TTL ICs. Some TTL gates use an logic-1 mode, but in the other The final circuit variation is an
input transistor with as many as a state, both totem-pole transistors are application one, and concerns the
use of an external 2 kΩ pull-up
resistor on a totem-pole output stage,
as shown in Figure 22. This resistor
pulls the output (when lightly loaded)

Download a whole up to virtually the full +5 V supply


value when the output is in the logic-
1 state, rather than to only +3.5 V.
This is sometimes useful when
interfacing the output of a TTL IC to

Machine Shop the input of a CMOS IC, for example.

The “74 Series”


Digital ICs

Right now - Free!


TTL IC technology first hit the
electronics engineering scene in a big
way in about 1972, when it arrived in
the form of an entire range of digital
logic ICs that were exceptionally
easy to use. The range was an instant
international success, and quickly
Easy Online Machining at eMachineShop.com. became the world’s leading IC logic
system. Its ICs were produced in both
commercial and military grades,
! Download our FREE CAD software and carried prefixes of 74 and 54,
! Design your custom part respectively; the commercial product
! Review the instant price quote range soon became known simply as
! Click to order the “74 series” ICs.
Over the years, the “74 series”
ICs have progressively expanded
Easy as that - your parts will be made and shipped to
their range of devices and advanced
you. Use our metals, plastics, composites and more. their production technology, so that
Try laser cutting, water jet cutting, milling, lathes, today the 74 series is as popular and
brakes or any of 23 machines. Apply plating, versatile as ever. When first intro-
powdercoat, brushing or leave your part raw. All duced in the early 1970s, the series
online 24/7 - with a free virtual machinist to guide was based entirely on a simple type
of TTL technology, but in later years,
you. Quantity 1 to 1-million. Rapid Prototyping, too! new sub-families of TTL were intro-
duced in the series, and then various
The Industrial Revolution is now a click away. types of CMOS technology was
added to it, so that today’s 74 series
incorporates a variety of TTL and
eMachineShop.com CMOS sub-families. Next month, we
666 Godwin Ave. will take a close look at the sub-
Midland Park, NJ 07432 families of 74 series ICs, and explain
some basic TTL terminology. NV
80 July 2006
Page81.qxd 6/8/2006 11:33 AM Page 81

6XUSOXV6DOHVRI1HEUDVND
%DGJHU2PQL5HPRWH1HWZRUN0RQLWRULQJ6\VWHP (43 %$'*(5
 'R\RXRSHUDWHDUHPRWHEDVH"$UHSHDWHU"$SDFNHWIRUZDUGLQJV\VWHP"'R
\RXKDYHDYDFDWLRQKRPH\RXZRXOGOLNHWRPRQLWRUUHPRWHO\"$OPRVWDQ\UHPRWH
FRQWURODSSOLFDWLRQ6WDUWDQGPRQLWRUDJHQHUDWRUUHPRWHO\¶VRIXVHV
 7KHUHDUHPDQ\RFFDVLRQVZKHQLWLVGHVLUDEOHWRFROOHFWGDWDDQGDODUPVIURP
UHPRWHVLWHVRUHYHQKDYHUHDOWLPHFRQWURORYHUVHFXULW\3DUWLFXODUO\VXLWDEOHIRU
WHOFRVDQGZLUHOHVVRSHUDWRUVZKHUHIRUH[DPSOHUHPRWHFHOOVLWHPRQLWRULQJFDQ
QRZEHDFKLHYHGLQDFRVWHIIHFWLYHPDQQHUWKH%DGJHU2PQL5HPRWHLVDKLJKO\ÀH[LEOHXQLWWKDWDOORZVDOOWKLVDQGPRUHLQDVLPSOHWRLQVWDOO8IRUPDW7KHUH
DUHWKUHHPRGXOHW\SHV7KH%LVWDWH$QDORJXH0RGXOH %$0 WKDWKDVHLWKHURULQSXWVWKH6HULDO$ODUP0RGXOH 6$0 ZLWKWZRRULQSXWVDQGWKH5HPRWH
$FFHVV0RGXOH 5$0 
 &RQQHFWWRWKHRXWVLGHZRUOGYLD'6/SKRQHOLQHRUUDGLRPRGHP7KH2PQL5HPRWHDFFHSWVDQDORJ77/YROWDJHDQGGU\FRQWDFWLQSXWVWRUHSRUWVWDWXVRI
DODUPV\VWHPVZHDWKHUPRQLWRUVUDGLRVFRPSXWHUVDQGQHWZRUNVYLUWXDOO\DQ\DQDORJGLJLWDORUPHFKDQLFDOGHYLFH,WFDQDOVREHFRQWUROOHGWRRSHQRUFORVHGU\
FRQWDFWVURXWHGDWDWRRWKHULQSXWVDQGFRQWUROH[WHUQDOGHYLFHV6HHRXUZHEVLWHIRURWKHUSRVVLEOHFRQ¿JXUDWLRQVDQGXVHVIRUWKH%DGJHU2PQL5HPRWH

3OHDVHYLVLWRXUZHEVLWHZLWKRYHUSDJHVDQGLPDJHV‡ZZZVXUSOXVVDOHVFRP
+,0DQXDOVVRIUDGLRPLOLWDU\DQG 9DFXXP7XEHV2YHUYDFXXP (0,5),)LOWHUV6LQJOH3KDVH7KUHH
WHVWHTXLSPHQWPDQXDOVRQKDQG WXEHVLQVWRFN 3KDVH 6LQJOH/HDGVW\OHV

39& 1RQ7)(+RRNXS:LUH 0DQ\ .QREVRIDOOW\SHV&UDQN´´GXDO (OHFWURO\WLF&DSDFLWRUV6LQJOHDQG


VL]HVVW\OHVDQGFRORUVWRFKRRVHIURP VHWVSRLQWHUHWF PXOWLSOHVHFWLRQ

)HUULWH5RGV VOHHYHVLQPDQ\VL]HV 6ROGHUOHVV7HUPLQDOV 3UHVVXUH6ZLWFKHV 7UDQVGXFHUV

/DPS6RFNHWV0DQ\YDULHWLHV6RFNHWV 0LFURSKRQHV&RPPHUFLDO0LOLWDU\  3UHVVXUH*DXJHV%DFNVWHPERWWRP


ZLWK$&SOXJVOHDGVVZLWFKHVHWF (OHPHQWV VWHPGLUHFWUHDGLQJ PRUH

&ROOLQV5DGLR3DUWV³$´DQG³6´/LQH 6KRFN0RXQWV 7KHUPDO6ZLWFKHV

1LFKRODV6WUHHW2PDKD1(‡)D[‡HPDLOJULQQHOO#VXUSOXVVDOHVFRP‡9LVD0DVWHUFDUG$PHULFDQ([SUHVVRU'LVFRYHU
&DOORUHPDLOIRUVKLSSLQJDQGWRWDOFKDUJHV$OO63(&,$/6LQWKLV$GRQO\JRRGIRUGD\DGYHUWLVLQJF\FOH1RH[FHSWLRQVSOHDVH
9LVLWRXUZHEVLWH#
ZZZVXUSOXVVDOHVFRP  ‡ 

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


BPI-216N
• 2400/9600 baud serial
• Low (≈2mA) current draw
• Great with BASIC Stamps®

• 3.2 x 2 in. backlit LCD


ILM-216L
• 1200-9600 baud serial
• Advanced protocol, 4 switch inputs
• EEPROM for configuration settings
• Favorite for OEM applications

• 3.2 x 1.4 in. graphics LCD SGX-120L


• 2400/9600 baud serial
• Font and 15 screens in EEPROM
• Easily draw points, lines, screens

• 3 x 2 in. supertwist LCD


TRM-425L
• 1200-9600 baud serial
• 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 • sales@seetron.com

July 2006 81
Stamp.qxd 6/6/2006 10:47 AM Page 82

■ BY JON WILLIAMS
STAMP APPLICATIONS
PUTTING THE SPOTLIGHT ON BASIC STAMP PROJECTS, HINTS & TIPS

A TALE OF TWO PROPS


(Advanced BS1 Programming)
AFTER SPENDING A FEW MONTHS with Parallax’s newest controller — the
Propeller chip — why not step back in time a bit (13 years!) and work with the
oldest, the venerable BS1 — the controller that started it all for Parallax. I
recently noted that these days (with the Propeller) remind me of the first
months of the BS — when everything was new, the rules had changed, and
what wasn’t possible yesterday suddenly was today. Of course, the BS1 has
found new life as the core of the Prop-1 controller and, despite its low cost,
many customers have asked for “more,” that is, some actually want to control
two props — independently — with one controller. Can we do it? Sure, but it
will test our BS1 programming skills.

H ere it is — the middle of summer.


It’s hot as Hades in many places
and we’re already talking about
named Allan — had a bit of success,
which was quite impressive for some-
one who hadn’t spent a great deal of
into multiple props on one controller
we’re stepping it up a bit. In essence,
we’re creating and running multiple
Halloween prop control. The truth is time with the BS1 — remember, PBA- “threads” of program code. Of
that real die-hards have been at it for SIC1 is not nearly as fancy as other course, the Prop-1 is a very simple
a couple months now, and Parallax flavors of BASIC. He and I exchanged controller and I’m not suggesting
has attended and participated in ideas and it finally occurred to me that for a millisecond that it’s “multi-
several regional trade shows that I could use tricks developed for a threaded.” That said, we can employ
attract Halloween prop builders. commercial product (BS2-based) to techniques in high-level PBASIC
In fact, you can catch us this create a BS1-based multi-prop that mimic “time-slicing” in more
month in Columbus, OH, at the controller program. sophisticated systems.
Midwest Haunters Convention. No
doubt there will be lots of discussion
on prop programming — we’re
THE KISS PROP DUAL-ACTION
actually doing a short seminar on PRINCIPLE DEMOLITION
the subject.
When we designed the Prop-1 Most of the prop builders we Controlling two sets of outputs
after HauntX in 2005, we set the work with are not hardcore simultaneously requires a different
price at a point where we felt users programmers and really don’t care to approach — we certainly can’t allow
could dedicate one controller per be, so they tend to stick with the KISS one prop to be hung up on a PAUSE
prop. Did that happen? Well, mostly, prop principle: instruction while the other prop needs
but there are those on a real to change the output states of its I/O
serious budget that turned to us for A) Activate an output. pins. So, Rule #1 is that PAUSE — for
guidance — they expressed a need to B) PAUSE as required by the output. event timing — is out.
control two completely independent C) Deactivate the output. How, then, do we control the
props with just a single Prop-1 timing of the outputs? Some of you
controller. This works perfectly well for may remember a program we did a
One of our customers — a guy single-prop controls, but when we get few years ago called a “drum
82 July 2006
Stamp.qxd 6/6/2006 10:48 AM Page 83

S TA M P A P P L I C AT I O N S

sequencer.” This coding technique is the software analog a our program is doing this:
player piano; as the “sheet” is scrolled, events are picked up
and “played.” 1) Timing/Trigger input loop
We can create a play “sheet” (outputs sequence) in an 2) Process sequence 1 if running
EEPROM table and include the timing between events to 3) Process sequence 2 if running
control how quickly things move. The timing will actually
control the duration between table reads, therefore, Steps 2 and 3 above are identical; the only difference
controlling the timing between possible output changes. So, being the pointer to the tables used and the escape
Rule #2 of a dual prop controller on the BS1 is that events destinations (Sequence 1 escapes to Sequence 2, Sequence
are table-driven. 2 escapes back to Main). Since we’re talking about
Okay, how are we going to get some known timing tables, let’s have a look at them as they’re structured in the
element into the prop control? The answer is deceptively program:
simple: use the trigger input check code to create a
specific delay. In order to keep things really simple, I use SYMBOL Seq1Start = 0
100 ms. Let’s have a look: SYMBOL Seq1Mask = %00111000

Main: Sequence1:
FOR loopTmr = 1 TO 5 EEPROM (%00000001, 5)
seq1 = seq1 | Trigger1 EEPROM (%00000010, 5)
seq2 = seq2 | Trigger2 EEPROM (%00000100, 5)
PAUSE 20 EEPROM (%00000010, 5)
NEXT EEPROM (%00000001, 5)
EEPROM (%10000000, 0)

As you can see, this looks a bit different than our SYMBOL Seq2Start = 12
stock trigger-detection loop — usually such a loop waits SYMBOL Seq2Mask = %00000111
until a trigger is present before dropping through. In this
Sequence2:
case, though, what the loop does is update (if a trigger EEPROM (%00100000, 2)
input is present) one or both bit status flags (seq1 and EEPROM (%00010000, 2)
seq2) for the sequences. The loop always runs five times EEPROM (%00001000, 2)
and, with a 20 ms PAUSE embedded in the loop, it takes EEPROM (%10000000, 0)
just a bit longer than 100 ms to scan the inputs. This
100 ms delay will be used as our core timing element Notice, too,
(we’re going to keep things simple and ignore program that we’re embed-
overhead). ding some named
Let me take a small detour for a moment on a BS1 constants in the
programming habit. When I write code for the BS1, I always table section; we
start assigning variables at B2, leaving B0 and B1 available don’t normally do
for future use. Why? Because these are the only two BS1 this but, for BS1-
variables that allow bit-level access and — in this program — based table pro-
we need them. Since most BS1 programs are small and we grams, it’s a good
generally have enough RAM, start your assignments at B2 idea as we have to
so that you have the bits in B0 and B1 available if an update assign these values
requires them. manually; keeping
Back to the program: Note that the OR operator is the assignment
used in the trigger loop. The reason for this is that seq1 and code close is just
seq2 denote the running state (1 is running, 0 is not handy, especially
running) of the respective sequences. By using the OR after changing the
operator, we can start a sequence (0 OR 1 = 1), and if the length of either of
sequence is already running, there is no change on a the tables.
subsequent trigger input (1 OR 1 = 1). Note that the For each
Prop-1 inputs pins — P6 and P7 — have been set to active- sequence, we have
high, that is, their SETUP jumpers have been moved to the a start value. This
DN (pull-down) position. is the location in
EEPROM where
TABLE MANNERS the actual table
data starts. The
Now things get a little bit heavy; our code has to slice-
■ FIGURE 1. Dual
and-dice two sequence tables, dealing with each step in Controller
each table as independent entities. In the simplest terms, Connections.
July 2006 83
Stamp.qxd 6/6/2006 10:48 AM Page 84

second constant is a pins mask for the other ANDing the current pin’s state with the protection mask.
sequence. This will be used for clearing the pins of one Just for clarification, the mask for sequence 1 is designed
sequence without disturbing the pins under control by to protect the pins for sequence 2 (and vice-versa). With
the other. Remember, this code is supposed to behave the pins updated, the record pointer is incremented to
like two independent sequencers, so I/O pins are point to the timing for this step. This gets read into timer1
assigned to just one sequence and cannot be controlled and the pointer is incremented a second time to point to
by both. the next table entry.
Finally, each table entry consists of two bytes: If this is not the end of the sequence, the program
the first is the outputs (with an end-of-sequence flag will make its way back to the top and the timer will
embedded in bit 7), and the second is the timing value, be updated in the Run_1 section. If you look closely
which is expressed in units of 100 ms (from the timing at the last entry in each table, you’ll see that the pin’s
input loop). output value has bit 7 set. This is used as the end-of-
Now for the nitty-gritty. Let’s have a look at how the sequence indicator. Since pinsTemp is assigned to
sequence processing works. This part of the program is B1, the variable endOfSeq is aligned in BIT15 (bit 7 of
divided into two sections: A) if sequence running and timer B1, which we’ve aliased to make the program easier
active, decrement timer, and B) load next step (outputs and to follow).
timer). If endOfSeq is 1, the program will clear the status
Section A is labeled Run_X (X is 1 or 2) in the program. variable — seq1 — and then reset the table pointer — pntr1
Here’s the code: — back to the beginning. The code for sequence 2 is
identical; the only difference being that it has jumps back to
Run_1: the top of the program at Main.
IF seq1 = Stopped THEN Run_2 And there you have it — on a tiny little Prop-1
IF timer1 = 0 THEN Reload_1 controller we have the ability to control two props,
timer1 = timer1 - 1 completely independent of each other. And you
GOTO Run_2
thought it took a big PC to do time-slicing! Okay, I’m
exaggerating a bit, but that is in essence what we’re
Remember that with the BS1, we don’t have doing.
IF-THEN-ELSE, so we’re limited to IF-THEN-Address.
This is not a programming problem, it just means that
we have to be very deliberate in our design, often
EVEN FARTHER?
using what seems to be inverted logic. In this case, Believe it or not, we can go even farther with this
we want to update the timer if the sequence is running technique, but we’ll save that for another day. I have
(seq1 = 1), so our first check is to see if it’s stopped actually written a program that will control two sequences
(seq1 = 0). If the sequence is stopped, then we and can use the Prop-1 outputs, as well as an RC-4 for AC
blow right by the rest of this section and deal with outputs (lights, etc.). The program works, but it’s a bit of a
sequence 2. bear and, with all the code to manage parallel and RC-4
Let’s say that the sequence is running and that we outputs, it doesn’t leave a lot of room left for sequence
have time left for the current table entry. What we do is tables.
decrement the sequence timer value and then move on to Okay, gang, Halloween is not that many months away,
the next sequence. Again, the timing delay is created at so start your code writing now — and if you’re in a budget
the trigger input loop so there is no need to put a PAUSE pinch, you can double-up your Prop-1. And if you’re in the
here. Columbus, OH area this month, come by the Midwest
When the sequence is running and the timer has Haunters Convention and say hello to John Barrowman
expired, we will jump to the next part of the sequence and me. We’ll have a booth there and love to meet new
processor: Reload_1. friends.
Until next time, Happy Stamping. NV
Reload_1:
READ pntr1, pinsTemp
PINS = PINS & Seq1Mask | pinsTemp JON WILLIAMS
pntr1 = pntr1 + 1
READ pntr1, timer1
jwilliams@parallax.com

RESOURCES
pntr1 = pntr1 + 1
IF endOfSeq = No THEN Run_2 MIDWEST HAUNTERS CONVENTION
seq1 = Stopped
pntr1 = Seq1Start
www.midwesthauntersconvention.com

PARALLAX, INC.
At Reload_1, we begin by reading the next table entry www.parallax.com
into pinsTemp. This is then sent to the outputs after
84 July 2006
Page85.qxd 6/8/2006 10:34 AM Page 85

Phone: (719) 520-5323


Order online at: Development Tools for PICmicro ® MCUs Fax: (719) 520-1867
www.melabs.com microEngineering Labs, Inc. Box 60039
Colorado Springs, CO 80960

USB Programmer $119.95 LAB-X Experimenter Boards BASIC Compilers for PICmicro®
Pre-Assembled Board
for PICmicro® (with accessories)
Available for 8, 14, 18, 28,
Easy-To-Use BASIC Commands
Windows 9x/Me/2K/XP Interface
and 40-pin PIC® MCUs
2-line, 20-char LCD Module PICBASIC™ Compiler $99.95
9-pin Serial Port BASIC Stamp 1 Compatible
Sample Programs Supports most 14-bit Core PICs
Built-In Serial Comm Commands
Full Schematic Diagram
Pricing from $69.95 to $349.95 PICBASIC PRO™ Compiler $249.95
Supports All PICmicro® MCU Families
Direct Access to Internal Registers
Includes:
Programmer, USB Cable,
PICPROTO™ Prototyping Boards Supports In-Line Assembly Language
Interrupts in PICBASIC and Assembly
ZIF Programming Adapter for 8 to 40-pin DIP, Double-Sided with Plate-Thru Holes Built-In USB, I2C, RS-232 and More
Software for Windows 98/Me/NT/2K/XP Circuitry for Power Supply and Clock Source Level Debugging
Large Prototype Area
EPIC™ Parallel Boards Available for Most PIC® MCUs See our full range of products, including
Port Programmer Documentation and Schematic books, accessories, and components at:
starting at $59.95 Pricing from $8.95 to $19.95 www.melabs.com

6ISIT/UR
7
HTTPWW EBSITE!T
WELEXPC
OM
-(:37%%0 $# 0/7%2 3500,)%3 3/,$%2).' 34!4)/.
&5.#4)/.'%.%2!4/23 /3#),,/3#/0% -/$%, (9 n $)')4!, $)30,!9 2/4!294//,+)4
7AVEFORM&UNCTIONS )NT%XT -/$%,'/3  6ARIABLEOUTPUT  6$#  !MP 

 "%34 3%,,).' 
34!4)/.
 

#OUNTER LINLOGSWEEP 6ARIABLESPEEDTOOL 
$UAL#HANNEL
-/$%,&'  -/$%,&'  -/$%, (9  n 42)0,% /54054 -/$%,7,# 20- WITHACCESSORYKITINA
.O$IGITAL$ISPLAY $IGIT$ISPLAY n -(:

  
 
4WO 6$#  !MPVARIABLEOUTPUTS 
).#,5$%3 02/"%3 PLUS6!lXED$IGITAL$ISPLAY  67,#
HARDPLASTICCARRYCASE
6$2
"%.#( $-- 7)4( 23 ).4%2&!#% $)')4!, -5,4)-%4%2 !,,)'!4/2 ,%!$3 ()'( 0%2&/2-!.#%
 7)2% )2/.
-/$%,$-2
4RUE2-3 DIGITALANDBAR
2ANGESn $IGIT 3%4/&   6
 

GRAPHDISPLAY !#$##AP 2ES
-/$%,-9  
 
3/5.$ 3%.3/2 #!2 $)')4!, -/2%
FREQUENCYFUNCTIONS)NCLUDES !#$#6OLT#URRENT 2ES#AP -5,4)-%4%2  
SOFTWARE !#OR$#OPERATION

 
 &REQUENCY2UBBER(OLSTER)NCLUDED
2%15)2%33/,$%2).'
2EVERSES 350%2  
,OW 0RICED
DIRECTION
)TEMS)N/UR
37)4#(%3     %#/./-9
   0/4%.4)/-%4%23
#ERMET 3433ERIES `` ` WHENEVERIT &2%%
0/3$)0 6$)033    -/$%,"
-ULTITURN -443ERIES `` ` DETECTSNOISE
4OGGLE-INI30$4 64/'3$ -   
     0AGE
4OGGLE-INI$0$464/'$$ -   
0ANEL-OUNT 0-!3ERIES `` `
OBSTACLE

ORTOUCHESAN       #ATALOG
3TANDARD6ALUES!VAILABLE 6 6$-"
4%2-3-IN SHIPPING3CHOOL0URCHASE/RDERS 6)3!-# -ONEY/RDER 0REPAID./0%23/.!,#(%#+3 ./#/$.*2ESIDENTS!DD3ALES4AX

)N .*     "LAIR 2OADs!VENEL .*   HTTPWWWELEXPCOM
  
&!8   
EMAIL ELECTRON ELEXPCOM
July 2006 85
NearSpace.qxd 6/6/2006 2:15 PM Page 86

SPACE
NEAR

APPROACHING THE FINAL FRONTIER


■ BY L. PAUL VERHAGE

THE NEAR SPACE GEIGER


COUNTER TELESCOPE — Part 2
THIS MONTH’S COLUMN wraps up the Geiger Counter Telescope (GCT) and discusses
a transistor experiment I performed.This article covers the GCT’s field-of-view, a ground
test of the GCT, and flight software that operates the GCT.There is a small note to clear
up the RM-60 instructions in chapter eight of my near space book at the
Parallax website and a transistor experiment which includes a competition for readers.

T he GCT is launched on near


spacecraft with a BASIC Stamp 2p
pages.charter.net/kc0mwm/home GM tubes. Note that I’m ignoring any
cosmic ray flux from beneath the GCT
based flight computer. With luck, its
first flight will be NearSys 06A which
GCT RESOLUTION since Earth should block cosmic rays
approaching from below.
takes place in Grand Island, NE. My What’s the field-of-view of the From this arrangement of GM
plan is to eventually launch from every GCT? Here are the pertinent measure- tubes, I used trig to calculate that the
state, and Nebraska is one that is still ments needed to calculate its field-of- GCT will only detect cosmic rays
on my list. You can read about the view; the size of its Geiger-Muller (GM) approaching within a 19.7 degree field-
CNNSP at their website: http://web tubes, and the distance between them. of-view. However, that 19.7 degree
In Figure 1, the rays shown pass- field-of-view is the GCT’s maximum
ing through both GM tubes represent range and it represents any cosmic ray
the cone of cosmic ray paths that will passing through any part of the two GM
intersect both GM tubes. Cosmic rays tubes, even through their outer edges.
traveling outside this cone will not be The GCT is more likely to detect
detected because they don’t trigger a cosmic rays that pass through the
near simultaneous detection on both maximum volume of the GM tubes (as
opposed to just nicking their edges).
■ FIGURE 1. The physical arrangement So the GCT is more sensitive to cosmic
of the GM tubes inside the GCT.

GCT Angular Sensitivity ■ FIGURE 2


1.2

1.0
Sensitivity (relative)

0.8

0.6

0.4

0.2

0.0
-15 -10 -5 0 5 10 15
Off Center Axis (degrees)

86 July 2006
NearSpace.qxd 6/6/2006 2:15 PM Page 87

N E A R S PA C E

rays approaching within the central 9.4 ■ FIGURE 3


degrees of its maximum field-of-view. Cosmic Ray Flux
(normalized to 90 degrees)
Just how sensitive the GCT is to 1.4
cosmic rays depends on many factors.
One is the distance a cosmic ray trav- 1.2
els through the GM tubes. I’ve taken a

Flux (counts/minute)
stab at generating a sensitivity versus 1.0
angle chart for the GCT, which is
shown in Figure 2. The GCT sensitivity 0.8

chart is based on the length of three


0.6
paths through a GM tube. The three
lengths are: passing straight down the
0.4
middle of the GM tubes; through their
top rims (the 9.4 degree cone); and 0.2
through their bottom rims (the 19.7
degree rim). The sensitivity values are 0.0
normalized (that is set to a value of 0 10 20 30 40 50 60 70 80 90
1.0) at the maximum sensitivity. Elevation (degrees)
Note that the GCT sensitivity is
very flat within 4.7 degrees of its my BS2p-based flight computer. is added to the running total.
central axis then drops off to zero in The BS-2p in my flight computer Experimental data collected dur-
the next 5.15 degrees. can only record pulses for a maximum ing a flight is stored in a variable called
of around 18 seconds. For a single workSpace. By calling a subroutine
GCT GROUND TESTS Geiger counter, this is acceptable, since
a single Geiger counter has a field-of-
called Convert_Save_To SPRAM, the
results of all the mission’s experiments
Using the Aware Electronics soft- view that encompasses the entire sky. are stored in the BS-2p SPRAM. Then,
ware — AW-SRAD — I ran a test of the For the GCT, this is way too short since at the conclusion of the mission’s
GCT in my classroom in Boise, ID. The the GCT has such a small field-of-view. experiments, the properly-formatted
chart in Figure 3 was generated from So, my code counts cosmic rays for one results in SPRAM are moved into non-
over 18 hours of data. The cosmic ray minute by counting pulses for a 10- volatile RAM. This cycle of collecting
flux was measured at angles of 0, 30, second interval and looping through data, storing (and formatting) it in
45, 60, and 90 degrees above the the code six times. Each 10-second flux SPRAM, and then moving the final
horizon. Several runs were made to
generate the data, which was
combined in a single spreadsheet. CLEARING UP SOME WIRING INSTRUCTIONS
I’m not surprised the flux dropped In chapter eight of my near space one. Now it’s time to get to work.
off as the telescope approached an ele- book, I explained how to add a Geiger Cut off the RJ-11 jack and strip back
vation of zero degrees, but I am puzzled counter to a near spacecraft. My instruc- the outer jacket from its four wires.
tions for modifying the Geiger counter’s Leave the other end of the cable alone so
by the peak at 60 degrees elevation. The RJ-11 jack are correct for one end of the it can still connect to the RM-60 Geiger
tech center where I teach is a large brick cable, but it’s not clear which end that is. counter. The exposed wires then are
and metal building, so that may be a So, let me try this again. It’s easier to see connected to the expansion port of your
factor. I’ll run the test again outside the wires inside a RJ-11 jack if you look flight computer as described below.
some day and compare the results from through the side of the plug without the From left to right and looking at the flat
tang. So we’ll work from that side of the side of the RJ-11 jack, the four colored
the NearSys 06A flight. Expect to read plug. Since the wires inside a phone cable wires have the following function.
the results some time this summer. don’t switch around inside the cable,
there are two different arrangements of ■ Leftmost (black or yellow) is ground
■ Left of center (red or green) is +5V
THE GCT SOFTWARE wires you can see inside the RJ-11 jack.
The arrangement will be one of these two. ■ Right of center (green or red) is signal
■ Rightmost (yellow or black) is not
The NearSys 06A mission will Black, Red, Green, Yellow connected
record cosmic ray counts for one Or
minute intervals at the angles of 0, 45, Yellow, Green, Red, Black I solder the wires to a male header,
and 90 degrees. The GCT PBASIC which is the standard interface for my
code orients the GCT, count pulses six Remember, this is through the flat near space program. The cosmic ray flux
side of the RJ-11 jack, the side without rate is determined by the PBASIC COUNT
times for 10-second intervals, combine
the tang to get in the way. Which pattern command since each RM-60 Geiger count-
the results, and then stores the results of colored wires you see depends on er pulse (the RM-60 briefly goes from high
in non-volatile RAM. The process is which end of the phone cable you’re to low) signifies the detection of a cosmic
then repeated at a different angle. looking at. So, before you begin cutting, ray. The count is stored in memory along
Listing 1 shows the code I wrote for make a note which color is the leftmost with the current GPS altitude.
July 2006 87
NearSpace.qxd 6/6/2006 2:16 PM Page 88

■ FIGURE 4. The setup I used for this device for near spacecraft, I
experiment. performed an experiment with the
processing. I’ll show the entire process 2N3904 transistor (which I use as a
in a future column. digital switch in different projects). In
By the time you read this, I’ll them, current from a microcontroller
know how well the GCT works. Be or timer saturates the transistor’s base,
sure to read about the results of the completing a circuit’s connection to
NearSys 06A mission at the CNNSP ground. To design an efficient circuit
website listed previously. that only uses as much current as
necessary to saturate the transistor, I
record into NVRAM repeats through
the entire flight.
A TRANSISTOR RESIS- measured the resistance between the
2N3904’s collector and emitter as a
After recovery, the results are TANCE EXPERIMENT function of base current. I put the data
retrieved with Stamp Plot Lite and into a spreadsheet to create a chart of
copied into a spreadsheet for final While engineering a cutdown the collector-emitter resistance and
base current. The results were far
more interesting than I thought they
LISTING 1 would be.
GCT_Servo CON 0 ‘gct servo on pin 0 In this experiment, I varied the
GCT CON 1 ‘geiger counter telescope on 1 resistor controlling the current flow
MinuteLoop VAR Nib ‘run gct for one minute
GCT00 CON 900 ‘servo seting for 0 deg into the base of a 2N3904 NPN tran-
GCT45 CON 1300 ‘servo setting for 45 deg sistor, calculated the resulting base
GCT90 CON 1900 ‘servo setting for 90 deg current, and measured the resistance
Workspace VAR Word ‘temporary storage of data to store in sp ram between its emitter and collector with
experimentLoop VAR Byte ‘loop control for experiments my digital multimeter (DMM).
adcResult VAR Word ‘result from adc conversion or other exp The transistor’s base current came
numberOfDigits VAR Nib ‘number of digits to be stored in nvram from a wall-wart style power supply. To
keep my calculations accurate, I meas-
GC_Telescope:
ured the resistance of each resistor
GCT0Deg: rather than relying on their printed val-
workSpace = 0 ues. The voltage output of the power
FOR experimentLoop = 1 TO 30
PULSOUT GCT_Servo,GCT00 supply varied a bit under load, so I also
PAUSE 20 measured the power supply’s voltage
NEXT
FOR minuteLoop = 1 TO 6 ‘count for one minute after every resistor change. The resist-
COUNT GM,34843,adcResult ance between the transistor’s emitter
workSpace = workSpace + adcResult and collector was measured twice. The
NEXT
numberOfDigits = 2 first time was with the DMM’s com-
GOSUB Convert_Save_To_SPRAM mon lead connected to the emitter and
GCT45Deg:
the positive lead connected to the col-
workSpace = 0 lector. On the second measurement,
FOR experimentLoop = 1 TO 30 the leads of the DMM were switched.
PULSOUT GCT_Servo,GCT45
PAUSE 20 Measurements of the resistor’s
NEXT value, the power supply’s voltage, and
FOR minuteLoop = 1 TO 6 ‘count for one minute the transistor’s two resistances went
COUNT GM,34843,adcResult
workSpace = workSpace + adcResult into a spreadsheet. The spreadsheet
NEXT calculated the transistor’s base current
numberOfDigits = 2 by dividing the power supply’s voltage
GOSUB Convert_Save_To_SPRAM
by the measured resistor value. A chart
GCT90Deg: was created in the spreadsheet from the
workSpace = 0
FOR experimentLoop = 1 TO 30 base current and transistor resistances.
PULSOUT GCT_Servo,GCT90 Notice that there’s a knee in
PAUSE 20 the transistor’s emitter and collector
NEXT
FOR minuteLoop = 1 TO 6 ‘count for one minute resistance at around 3.5 mA of base
COUNT GM,34843,adcResult current (the DMM common lead
workSpace = workSpace + adcResult connected to the emitter). When the
NEXT
numberOfDigits = 2 DMM leads were reversed, the knee
GOSUB Convert_Save_To_SPRAM occurred at 6 mA. So from that, I
RETURN
concluded that any base current
88 July 2006
NearSpace.qxd 6/6/2006 2:16 PM Page 89

N E A R S PAC E

greater than 3.5 mA at six volts is


wasted since it doesn’t reduce the
resistance across the transistor.
Now, as I understand, the
resistance between the 2N3904’s
Lead-Acid
■ FIGURE 5. The transistor schematic.
emitter and collector isn’t really
changing as the base current changes.
So I don’t believe my DMM was
ing the transistor’s behavior.
If you have a good explanation for
Ni Cad
really measuring transistor resistance.
Also, I don’t understand why the
resistance measured between the
emitter and collector is so different
the experiment’s observations, send it
to me in an email. If I use your expla-
nation in my next column, I’ll send
you a patch that’s been to near space.
Ni MH
when the DMM leads are switched
around (unless the DMM is reverse-
biasing the transistor in some way). I
Onwards and Upwards,
Your Near Space Guide NV Li-ion
suspect that something about how a ■ FIGURE 6. You can download a copy
DMM measures resistance is influenc- of my spreadsheet from the Nuts &
Volts website; www.nutsvolts.com BATTERY-BASED
Transistor Experiment in Resistance POWER SUBSYSTEM
70
FOR YOUR
60
APPLICATION
50
Resistance (ohms)

40

Collector to Emitter
30
Emitter to Collector

20

10

-10
0 5 10 15 20 25 30 35 Intelligent Battery
Base Current (mA) and Power System™

• Highest Power Density


Available
• Component Level Power
Supply - Includes UPS
Functionality
• Built-in Safety Circuits
• 95 to 12,000+ Watt-Hours
at 3.3 to 48+ VDC
• Integrated Charger -
AC/DC/Solar/Fuel Cell
• Intuitive Windows™-based
Management GUI

Call today!
508-678-0550

TM

www.ocean-server.com
July 2006 89
DesignCycle.qxd 6/6/2006 2:19 PM Page 90

■ BY PETER BEST
THE DESIGN
ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
CYCLE

THE EASIEST INTERNET


PROTOCOL OF ALL
RS-232-BASED SERIAL PORTS ARE GREAT DATA DONKEYS until you need to
move data on an Ethernet LAN or throw it out onto the Internet. Most of the
networking email questions I field from Nuts & Volts’ readers concern moving
their data transfers away from traditional RS-232 cables and on to an Ethernet
LAN or the Internet. Because of its relative ease of use and implementation, I
normally suggest using the UDP protocol. Although it isn’t very hard to code
up on a microcontroller, TCP/IP is a bit more complicated when compared to
UDP as TCP/IP requires more attention from the microcontroller programmer
than UDP does.

U nless you create your own


custom protocol from scratch,
UDP is the closest thing to RS-232
able enough to transport small data
packets on an Ethernet LAN and the
Internet. The data delivery principles
over to the delivery person.
When the package arrives at its
destination, the shipping carton is
communications you can get in an behind UDP are very similar to those opened and discarded. The gift boxes
established Internet protocol. There associated with RS-232. So, if you are dispersed to their receivers as
are no strict timing restrictions associ- understand how data is delivered marked and the boxes containing the
ated with UDP. With UDP — as with using RS-232, you’ll have no problem gifts are opened and discarded. The
RS-232 — you can send data at any understanding how UDP does things. gift is then opened by the recipient
time you wish. The lack of timing UDP is a very simple protocol. and its packaging is also discarded.
restrictions and the ease of assem- Basically, UDP takes a message (your The process of adding and discarding
bling a UDP datagram make UDP the data) from an application (your micro- layers of addressing information to the
easiest of all of the Internet protocols controller program) and attaches a actual data is called encapsulation.
to implement. This month’s Design checksum and source/destination port A UDP host transmits a UDP
Cycle will focus on the hardware and numbers before handing over the UDP datagram through a logical source
firmware you’ll need to assemble and segment to IP for encapsulation. IP does port to a UDP recipient’s logical
deliver UDP datagrams. its best to deliver the UDP segment destination port. The destination port
since there is nothing to guarantee that number and destination IP address are
WHAT IS UDP? the UDP segment will arrive intact. In
fact, IP is just as unreliable as UDP.
used to route the UDP segment to the
correct application once the segment
UDP is short for User Datagram Let’s define encapsulation as it is arrives at its destination. By using port
Protocol. It has unofficially been a very important Internet protocol numbers, various applications can be
called the Unreliable Delivery concept. All of you have at one time using the services of UDP simultane-
Protocol. UDP has absolutely no either received or sent a package of ously. This is called multiplexing. The
means of insuring that a data packet gifts via mail, UPS, or FEDEX. Each gift combination of the IP address and the
will arrive in one piece or even arrive in the shipment is boxed individually. port number is called a socket.
at all. However, you’ll find that it is reli- After marking each individual gift box Let’s examine Hex Dump 1, which
with the receiver’s name, you pack all is a typical UDP datagram transmis-
■ NOTE: All code listings and hex of the individual gift boxes into a larg- sion that would flow over an Ethernet
dumps are available on the Nuts & er shipping carton. The large shipping LAN. The first six bytes are always the
Volts website at www.nutsvolts.com carton is then addressed and handed hardware destination address. The
90 July 2006
DesignCycle.qxd 6/6/2006 2:19 PM Page 91

THE DESIGN CYCLE

hardware address is also known as the a result is a faster way to send a mes- All you need to do as a network
MAC address. MAC is short for Media sage. TCP must use a three-way hand- applications programmer is to add
Access Control. Every piece of shake to establish a communications your desired IP, UDP, and MAC
Ethernet LAN hardware must have a session before transmitting any data addresses, compute the IP and UDP
unique MAC (hardware) address. This and TCP requires an awful lot of house- checksums, insert your UDP datagram
allows you to reuse IP addresses. keeping compared to none for UDP. payload, and send the IP packet.
For instance, host 192.168.0.100 UDP is able to send messages as Before we get into building up
on LAN A in Fayetteville, TN, can fast as the microcontroller and applica- some AVR hardware to transmit and
communicate with host 192.168.1. tion it is involved with can run. The receive UDP datagrams, let’s build up
100 on LAN B in Fayetteville, AR, only things that slows UDP down are an AVR-based UDP application that
because the Ethernet cards on LAN A the limitations of the hardware it is runs on an ATmega16.
and LAN B have unique hardware running on and the bandwidth of the
(MAC) addresses. The applications
running on each of the hosts are the
LAN it is riding on. Unlike UDP, TCP
has built-in rev limiters that throttle the
CODING AN AVR
only things that care about the IP data rate to relieve congestion on the UDP APPLICATION
addresses in this instance. LAN segment. UDP segments with any
Once the Ethernet hardware kind of problems are simply discarded. Before anything happens within
determines (via the MAC address) that the UDP application, the microcon-
it should grab the IP packet, the appli-
cation sifts through the IP header
BUILDING A UDP troller’s networking application has
already identified half of the socket —
information to determine where next DATAGRAM the IP address, which matches the
to route the incoming packet data. AVR’s IP address. The very first thing
Note that the application now has a The layout of the UDP header in our UDP application code in Listing 2
full return address for the IP part of the Listing 1 and the breakdown in Hex does is check the destination port
packet thanks to the source MAC Dump 1 show that the UDP segment number, which completes the socket
address and the source IP address. rides along as a passenger in the IP address. If the port number is found to
The application also knows that a data area, which rides inside an be 7, the firmware immediately flows
UDP datagram is encapsulated in the Ethernet frame. Thus, the UDP data- into the process of preparing the
IP data area as the Protocol byte is 17 gram is encapsulated within the IP data- frame to be echoed. At this point, we
decimal, which indicates a UDP data- gram, as shown in Figure 1. Notice that could also check for other UDP port
gram is the object of this transmission. the UDP source and destination ports addresses to route the application to
The final gate the UDP datagram are 16 bits in length, which allows port other subordinate UDP applications.
has to pass through routes the UDP numbers to range from 0 to 65535. Using the addressing information
datagram to the correct application Take another look at Hex Dump 1 and garnered from the incoming IP packet
port. In the case of Hex Dump 1, the you’ll see that the UDP header is only and the local IP and hardware
destination port is the well-known eight bytes long, compared to the 20 addressing information stored inside
echo port. So, the UDP application bytes that make up the IP header. The the AVR microcontroller, the setipad-
area that supports echoing incoming UDP datagram length or size is simply drs function shown in Listing 3 points
characters is summoned to echo the the total number of bytes in the UDP the frame in the microcontroller’s
contents of the UDP data area back to header plus the number of bytes in the packet array memory at the original
the source UDP port via the source IP payload or data area. sender of the frame. In addition to the
address by way of the source MAC Using a checksum with UDP is IP and MAC source and destination
address. All of which were gleaned optional. The UDP checksum is put address swaps, the UDP source and
from the original incoming IP packet. there for use by the application as UDP destination ports must be reversed, as
As I mentioned earlier, a UDP itself doesn’t care about it at all. well. All of the IP source/destination
transmission — such as our echo reply However, I will show you how to code turnarounds are performed by the seti-
— can occur at any time without the UDP checksum calculations. The UDP paddrs function. The UDP address
need to establish a structured commu- checksum won’t make your data’s trip redirection takes place inside the UDP
nications session with the remote any more reliable, but it will help the function shown in Listing 2.
host. Since there is no handshaking or receiving application determine if what After the addressing in the IP
predetermined contact between UDP data that did get there is any good. header has been completed, the icing
hosts, UDP is defined as a connec-
tionless protocol. This is very similar to ■ FIGURE 1. There are 28
the way RS-232 is implemented. bytes of header informa-
Despite UDP’s apparent shortcom- tion in the UDP datagram.
As you can see in this
ings, UDP does have advantages over figure, the UDP datagram
TCP. For instance, UDP does not have is riding inside the IP
to establish a formal connection and as datagram’s data area.
July 2006 91
DesignCycle.qxd 6/6/2006 2:19 PM Page 92

■ FIGURE 2. Here’s where


we have been working
within an Ethernet packet.
The only data we have to
define consists of the DA
(Destination MAC Address),
SA (Source MAC Address),
Length/Type, and LLC
(Logical Link Control) Data.
The rest of the packet
components are taken care
of by the Ethernet engine IC.

cussed within The Design


Cycle run at 40 MHz and
60 MHz clock rates, but
the ATmega AVRs execute
most instructions in a single
cycle and thus are capable
of producing up to 16
MIPS with a 16 MHz clock.
The number in the
name of an ATmega AVR
represents the amount of
program Flash in kilobytes.
For instance, the ATmega16
to the cake is computing the IP head- checksum algorithm. contains 16K of program Flash, while an
er checksum. The IP header checksum We have assembled a UDP echo ATmega128 has 128K of program Flash.
is an inverted summation of the bytes reply datagram in the AVR’s packet SRAM is essential to support the
within the IP header plus any summa- array memory area. I’ve sliced and data arrays and variables used within
tion overflow beyond 0xFFFF. The IP diced the IP packet and UDP the UDP application. To meet that
header checksum algorithm is out- datagram in Hex Dump 2. With every- requirement, the 16K of ATmega16
lined in the Listing 3 cksum function. thing now in place, the ATmega16 program memory is supplemented
When all of the fields within the executes the code contained within with 1K of SRAM. That’s enough to
IP and UDP headers are loaded with the echo_packet function (Listing 4) send and receive small UDP packets.
the correct data, the UDP checksum and sends our UDP datagram along In a networking application, accu-
calculations in the UDP function its way. rate timing routines and delays are
outlined in Listing 2 can begin. The Figure 2 is an illustration that just as important as having SRAM
UDP checksum calculation process is describes how encapsulation works buffer space. The ATmega16’s trio of
a bit different than the IP checksum within the framework of Ethernet, IP, eight-bit timers and 16-bit timers allow
calculation. You would think the UDP and UDP. The goal behind all of this the creation of precision delays while
checksum would cover only the bytes coding is to allow a network applica- an on-chip USART (Universal
within the UDP header and data tion running within our ATmega16 to Synchronous Asynchronous Receiver
area. However, the UDP checksum send data to another UDP host. In Transmitter) takes care of the house-
includes bytes from the IP header, as the application I’ve described, we keeping chores needed to implement
well. The UDP checksum is calculated encapsulated a UDP datagram within a true RS-232 serial port. Twenty-one
using the following fields: an IP packet and sent the data down interrupt vectors cover all of the AVR’s
the line encapsulated within an networking components including the
• The IP source address word Ethernet frame. two-wire interface (Atmel’s name for
• The IP destination address word I2C), the SPI subsystem, and the


The
The
IP protocol byte
UDP length word
THE ETHERNET USART.
I think you can see why I’ve
• The UDP header HARDWARE decided to go with Atmel’s ATmega16
• The UDP data as far as this networking project
When it comes to driving an is concerned. The ATmega16’s
The UDP length word is used Ethernet host, the Atmel AVR is a very high speed and large program Flash
twice in the calculation of the UDP good choice. The ATmega16 has a memory areas coupled with ample
checksum. Otherwise, the UDP maximum clock speed of 16 MHz. SRAM make the AVR ATmega16
checksum uses the same inverted That may not sound fast when you con- microcontroller a good choice for
summation technique as the IP sider other microcontrollers we’ve dis- small networking devices.
92 July 2006
DesignCycle.qxd 6/6/2006 2:19 PM Page 93

THE DESIGN CYCLE

I’ve applied the ATmega16 in a RTL8019AS provides all the Media conjunction to form a simple packet
classic configuration. Schematic 1 Access Control layer functions management scheme that provides up
shows the ATmega16 supporting an required for transmission and recep- to 10 megabytes per second internal
RS-232 port — which is centered tion of packets in accordance with the DMA transfers. The FIFO lies between
around a Sipex SP233ACP — and an IEEE 802.3 CSMA/CD (Carrier Sense the network interface and the Local
RTL8019AS Ethernet engine IC shown Multiple Access/Collision Detection) DMA channel.
in Schematic 2. The ATmega16’s standard. A second Realtek RTL8019AS
7.3728 MHz clock frequency was In eight-bit mode, the RTL8019AS Remote DMA channel is included
chosen to provide minimal baud rate uses only 4K of the 16K on-chip on-chip to get data out of the
error for the 56Kbps RS-232 port. SRAM. The use of the full 16K of RTL8019AS’s internal Buffer Ring and
Provisions have also been made to SRAM within the RTL8019AS can into and out of the ATmega16’s micro-
accommodate in-circuit programming only be accomplished when running controller memory for processing. It’s
using the inexpensive AVR ISP pro- in 16-bit mode. In standard NE2000 important to remember that the Local
gramming dongle. fashion, the RTL8019AS’s 4K of buffer DMA channel moves data between
The Realtek RTL8019AS is an memory is configured as a ring. the Realtek RTL8019AS’s internal FIFO
NE2000-compatible IC that is easily The RTL8019AS uses internal and the RTL8019AS’s Buffer Ring and
integrated with just about any micro- DMA resources to manage and move the Remote RTL8019AS DMA channel
controller that has enough I/O to feed data between the RTL8019AS’s FIFO moves data between the Realtek
the RTL8019AS’s address, data, and and the Realtek RTL8019AS’s internal RTL8019AS’s Buffer Ring and the
control lines. Although RTL8019AS is buffer memory. Within the Realtek microcontroller’s working memory.
manufactured by Realtek, it is actually RTL8019AS, the onboard FIFO (First
based on the National DP8390 In First Out) and Local DMA (Direct ■ SCHEMATIC 1. Nothing new here. Just
Network Interface Controller. The Memory Access) channels work in good old, sturdy microcontroller stuff
that can be built on a piece of perfboard.
J1 +5VDC
MOSI
1 2
RESET 3 4
SCK 5 6
MISO 7 8
9 10
AVR ISP

+5VDC
U1
SA01 40 SD0
+5VDC SA1 PB0 PA0 SD1
2 PB1 PA1 39
SA23 38 SD2
SA3 PB2 PA2 SD3
4 PB3 PA3 37
SA45 36 SD4
R5 MOSI PB4 PA4 SD5 U2 JR2A
6 PB5 PA5 35
100K MISO
7 34 SD6 TXD 2 5 TXOUT 9
RESET SCK PB6 PA6 SD7 T1IN T1OUT 9
8 PB7 PA7 33 1 T2IN T2OUT 18 8 8
RESET
9 32 RXD 3 4 RXIN 7
RESET AREF R1OUT R1IN 7
10 VCC GND 31 20 R2OUT R2IN 19 6 6
C8 11 30 5
GND AVCC PC7 5
12 XTAL2 PC7 29 4 4
.1uF 13 28 PC6 RXIN 3
RXD XTAL1 PC6 PC5 3 TXOUT
14 PD0 PC5 27 C2+ 12 2 2
TXD 15 26 PC4 15 1
INT0 PD1 PC4 PC3 C2+ 1
16 PD2 PC3 25 10 V- C2- 16
LE 17 24 PC2 17 11
RSTDRV 18 PD3 PC2 SDA V- C2- DB9 FEMALE
PD4 PC1 23
EEDO 19 22 SCL SP233ACT
IORB PD5 PC0 IOWB
20 PD6 PD7 21
SP233ACT PIN 7 = +5VDC
ATMEGA16 SP233ACT PINS 6,9 = GND
7.37MHz
XTAL2
+5VDC
JR3 +9VDC VR1 +5VDC
D1 LM340S-5.0
C11 C12 1 1 3 R6
IN OUT
1N5819 C14 + 470
20pF 20pF C15
GND

.1uF
2

10uF

LED3
2

+5VDC

C9 C10 C13

.1uF .1uF .1uF

BYPASS CAPACITORS FOR


ATMEGA16 AND SP233

July 2006 93
DesignCycle.qxd 6/6/2006 2:19 PM Page 94

.1uF

C2

+5VDC
100
99
98
97
96
95
94
93
92
91
90
89
88
87
86
85
84
83
82
81
INT4
INT5
INT6
INT7
IOCS16B
SD8
SD9
SD10
SD11
SD12
SD13
VDD
SD14
SD15
GND
BD0
BD1
GND
BD2
BD3
1 INT3 BD4 80
2 79 EESK
INT2 BD5 EEDI
3 INT1 BD6 78
INT0 EEDO
.1uF

4 INT0 BD7 77
SA0 EECS
C8

5 SA0 EECS 76
6 VDD BCSB 75
SA1 7 74
SA2 SA1 BA14
8 SA2 BA15 73
SA3 9 72
SA4 SA3 BA16
10 SA4 BA17 71

RTL8019AS
11 SA5 VDD 70
12 SA6 BA18 69

.1uF
C7
13 SA7 BA19 68
14 GND BA20 67
.1uF

15 SA8 BA21 66
C1

680

R5
16 SA9 JP 65
17 VDD AUI 64
18 SA10 LED2 63
19 SA11 LED1 62 LED2

680

R4
20 SA12 LED0 61
21 SA13 LEDBNC 60
22 SA14 TPIN+ 59
23 SA15 TPIN- 58 LED1
24 SA16 VDD 57
25 SA17 RX+ 56

.1uF
C6
26 SA18 RX- 55
27 SA19 CD+ 54
28 GND CD- 53
IORB 29 52
IOWB IORB GND

LEDS INTEGRAL TO RJ-45 MAGNETICS


30 51
SMEMWB

IOCHRDY
SMEMRB

IOWB OSCO
RSTDRV

OSCI
GND

VDD
AEN

SD0
SD1
SD2
SD3
SD4
SD5
SD6
SD7

TX+
TX-
HD
LD

20MHz

XTAL1
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
SD0
SD1
SD2
SD3
SD4
SD5
SD6
SD7
RSTDRV

22.1K

+5VDC
R1

.1uF

C5
+5VDC
.1uF
+5VDC

C3

200
R2
.1uF

C4
1

8
CTX_EXT

CRX_EXT

CTX_INT

TPOUT+

TPOUT-

TPIN+

TPIN-

CRX_INT
LF1S022

INTERNAL CONNECTIONS

TO CABLE
1
2
3
4
5
6
7
8

■ SCHEMATIC 2. A handful of
RECEIVE+
RECEIVE-
TRANSMIT+

TRANSMIT-

supporting capacitors, LEDs, and


resistors are all that you need to
get a full-fledged Ethernet engine
up and running.

94 July 2006
DesignCycle.qxd 6/6/2006 2:20 PM Page 95

THE DESIGN CYCLE

The Realtek RTL8019AS is Design Cycle as a free download from when you download this month’s
controlled through an array of on-chip the Nuts & Volts website (www.nuts code package, you’ll get all of the
registers. The Realtek RTL8019AS volts.com). The AVR firmware was drivers for the Internet protocols we
registers are used during initialization, originally written using ImageCraft’s have yet to talk about. My goal is to
packet transmission, and reception. AVR C compiler. However, you can put a mix of microcontrollers and the
Using the Realtek RTL8019AS internal easily port the C source code for use major Internet protocols into your
registers, we can perform basic with the free GNU AVR compiler Design Cycle. NV
operations including defining the tools, as well.
hardware physical address, setting the The AVR hardware I’ve offered
receive parameters, and setting the can support TCP/IP, ICMP, and Telnet ABOUT THE AUTHOR
transmission parameters. applications in addition to the UDP ■ Peter Best can be contacted via
The Realtek RTL8019AS was orig- application we discussed. In fact, email at peterbest@cfl.rr.com
inally designed for major Ethernet
applications in desktop personal com-
puters and some of the RTL8019AS’s
functionality will be useless to the
ATmega16 hardware portrayed in
Schematic 1. Not to worry, we won’t
be writing any code for the “useless”
RTL8019AS functionality.

WE’RE NOT DONE YET


UDP is very easy to get up and
running on small microcontroller-
based systems. Little is needed in
addition to the necessary IP header
information to pass a UDP message
from host to host.
If you still have some blank spaces
to fill in your understanding of UDP or
the UDP hardware I’ve just described,
fret not. As we continue our discussion
of integrating microcontrollers and
Internet protocols, I’ll revisit and build
upon some of the things we’ve looked
at in this installment and introduce you
to new concepts as we encounter
them in our hardware assembly and
Internet protocol coding.
To help you better understand
what I have presented in this month’s
column, I have provided a complete
set of C source code for the AVR and
RTL8019AS circuitry in this month’s

SOURCES
■ Realtek — RTL8019AS:
www.realtek.com.tw

■ ImageCraft — ImageCraft ICCV7


for AVR: www.imagecraft.com

■ Atmel Corporation — ATmega16:


www.atmel.com

■ WinAVR — C Compiler:
http://sourceforge.net/projects/winavr
July 2006 95
ClassifiedsJul06.qxd 6/7/2006 2:01 PM Page 96

PLANS/KITS/ AUDIO/VIDEO CONNECTORS/WIRE/CABLE


SCHEMATICS The RF Connection MIL-Spec Coax Available (Teflon, PVC IIA)
R
T C
O
213 N. Frederick Ave., Ste. 11NV New Product: Belden 9913F, 9913 with
H
N

F
E
N
E
C Gaithersburg, MD USA 20877 High Density PE Foam dielectric,
T
I
O http://www.therfc.com/ stranded center cond. and Duobond
N
III Jacket $0.80/ft or $76.00/100ft
Complete Selection of MIL-Spec Coax, Also New: 9092, RG8X with Type II Jacket.
RF Connectors and Relays Intro Price ............$23.00/100ft
UG-21B/U N Male for RG-213/214 .$5.00 Call for Specials of the Month
UG-21D/U N Male for RG-213/214 .$3.25 Full Line of Audio Connectors for Icom,
N Connectors for 9913/Flexi4XL/9096 Kenwood, and Yaesu
UG-21B/9913 .....$6.00 / Pins Only......$1.50 8 Pin Mike Female $2.50
UG-21D/9913 ..$4.00 / Extra Gasket.$0.75 8 Pin Mike Male Panel $2.50
Amphenol 83-1SP-1050 PL-259 $0.90 13 Pin DIN for Kenwood $2.75
UG-176/U Reducer RG-59/8X, $0.25 8 Pin DIN for Icom $1.00
or 5/$1.00 8 Pin DIN for Kenwood $1.50
UG-175/U Reducer RG-58/58A, $0.25 Prices Do Not Include Shipping
or 5/$1.00 Orders 800-783-2666
Silver Teflon PL-259/Gold Pin, $1.00 Info 301-840-5477
or 10/$9.00 FAX 301-869-3680

COMPUTER
HARDWARE
WANTED LCDs/DISPLAYS
DEC EQUIPMENT
WANTED!!!
Digital Equipment Corp.
and compatibles.
Buy - Sell - Trade
CALL KEYWAYS 937-847-2300
or email buyer@keyways.com

BUSINESS SERVICES

PUBLICATIONS
CNC Book
Easy CNC MILITARY SURPLUS
G-code
Bit map draw programs
Bit map image converter SATELLITE
Bit map to G-code
CAD - machine drawings FREE Satellite TV Buyer’s Guide
CAM - DXF to G-code Home of DishSkinz
http://www.cncintro.com C-band • Ku-band

QUARE 1
4DTV • MPEG-2
S
SQUARE Get it all with just one call!
ELECTRONICS 800-500-9275
(208) 664-4115
Hayden, ID USA www.skyvision.com
96 July 2006
ClassifiedsJul06.qxd 6/7/2006 3:38 PM Page 97

COMPONENTS DESIGN/ENGINEERING SERVICES

FREE 120 Pg CATALOG

Electronic components, kits,


test equipment, tools, and sup-
plies for hams, hobbyists, and
businesses. Many hard-to-find
items like variable capacitors,
vernier dials, coil forms, magnet
wire, and toroids.
Ocean State Electronics
www.oselectronics.com

Floating Point Coprocessor


I2C to 400 kHz
SPI to 4 MHz
32-bit IEEE 754
32-bit integer
Pre-defined functions
User-defined functions MICRO
8-pin DIP or SMT
uM-FPU IDE generates code
CONTROLLERS
from standard math expressions
Applications: sensor readings,
GPS calculations, robotics, signal
processing, embedded systems
MicroStamp11
World’s Smallest 68HC11
www.micromegacorp.com Microcontroller Module!
telemetry
z
ROBOTICS microrobotics
z
smart toys
z
SECURITY
MISC. FOR SALE animatronics
z
model railroading
z
home automation
z

z tiny (1 by 1.4 in.), light-weight (0.5 oz.)


zon-board 5V reg., crystal, & reset chip
zchoice of 8K or 32K EEPROM
z or 32K RAM + 32K EEPROM (64K version)
z SCI, SPI, Output Compare and Input
Capture channels, timer, pulse accumulator
z all 14 I/O lines and 2 interrupt lines
brought out to versatile 20-pin connector
zprogram in BASIC, assembler, or C
zeasy code-loading with Docking Module
z Starter Packages:*
 z 8K EEPROM (#MS11SP8K).......$49
 z 32K EEPROM (#MS11SP32K)...$77
 z 32K EE/32K RAM (MS11SP64K)$90

* includes MicroStamp11, manual, PC soft-


ware (assemblers, SBASIC compiler, Submit your
AMATEUR RADIO MicroLoad utility, and sample programs),
serial cable, Docking Module, & accessories.
BEST
www.technologicalarts.com
Toll-free (USA & Canada): security/video
1-877-963-8996
Visa • MasterCard • Discover • Amex stories for an
PIC Microcontroller upcoming book.
Books $$ ADVANCES
4 Titles
Beginner to Advanced RBogdan.com
Table Of Contents
Ordering Info
On Web Site
http://www.sq-1.com

(208) 664-4115
Hayden, ID USA

July 2006 97
ReadFeed Pgs 98-99 Jul06.qxd 6/8/2006 2:25 PM Page 98

READER FEEDBACK
Continued from page 6
constants, it is about 99.5% fully charged or ND is actually a Normally Open switch and capacitance is multiplied by the gain of the
discharged when being shorted through a re- will NOT WORK AT ALL IN THE CIRCUIT! MOSFET during the switching time. For in-
sistor. However, with a constant current source, A better choice is the SPST Momentary NC stance, using data from the IRF150 data sheet,
this is a linear instead of a logarithmic phe- Switch, Digi-Key Part #450-1103-ND for the gm (forward transconductance) is 9 ohms
nomenon. As for the predominance of stor- $5.96. A much less expensive alternative is and if the drain resistor (load resistor) is 3 ohms,
age scopes being made today, I suggest this from RadioShack, #275-1548, Package of 4 the gain is 27 so the effective gate-to-drain
critical reader go to the website of the three for $2.99. My apologies to all the readers. capacitance is 27 times the data sheet value.
leading manufacturers — Tektronix, LeCroy, Chuck Irwin More importantly, Figure 2 and its
and then Agilent. You will be very hard-pressed description is just plain wrong. First of all, the
to find a single analog oscilloscope still made, DISMAY FOR Q&A MOSFET Turn On Characteristics shown should
so this reader is unfortunately absolutely wrong I've been a subscriber reading Nuts & have stated that the gate was driven by a
about this point. Thank you for your interest. Volts for about two years now. I enjoy read- current source (or a voltage source with a large
Vaughn Martin ing your magazine every month. I like the ideas value external gate resistor). Since most real-
people come up with for projects. The Q&A world circuits do not use current sources to
PARTS PREDICAMENT column usually has some interesting ideas. drive the gate, the turn on characteristics will
You have my profound appreciation However, in the May Q&A column, I look different in real circuits. Specifically, there
and thanks for the terrific job you did pub- was dismayed to find numerous errors. Much will not be a linear rise in gate voltage and there
lishing my article. You guys are the GREAT- of this column was devoted to explaining will not be a linear fall in drain current. Also,
EST! Thanks very, very much. I did get some the basics of MOSFET and IGBT operation the regions shown in Figure 2 are wrong! When
email from one of your readers in NC who and I find it disturbing that this basic infor- the gate reaches threshold, Vth, the drain
clued me in on a couple of problems with mation was seriously wrong. As a retired en- current starts to rise as shown but the drain
the parts I specified in my parts list: gineer with 40 years of experience — much voltage begins to fall at the same time and the
1. The Sonalert I specified as Digi-Key of it with MOSFET and IGBT circuits — I Miller plateau occurs at that point. Further-
Part #102-1149-ND will not work as it needs would like to set the record straight. Hope- more, the Miller plateau is not flat; it gradual-
an external driver circuit. A better choice is fully, you will present this corrected infor- ly rises as the current increases. Lastly, the falling
the CUI Piezo Buzzer w/drive circuit built mation to your readers so they will under- current is incorrectly labeled ‘On Resistance.’
in, Digi-Key Part #102-1120-ND for $3.27 stand how these devices really work. On Resistance doesn't have any meaning un-
2. The Push-Button Switch (Normally MOSFETs — The paragraph on “Miller” til the drain voltage stops falling (at least most
Closed) I specified as Digi-Key Part #EG2015- capacitance should note that the gate-to-drain of the way). In region 4 of Figure 2, the On

98 July 2006
ReadFeed Pgs 98-99 Jul06.qxd 6/8/2006 2:25 PM Page 99

READER FEEDBACK
Resistance does keep falling (not shown), of the non-linearity of the capacitance. converter or a battery. A battery would work
albeit slowly, as the gate voltage keeps rising. You Take the High Road — Mostly cor- for quite a while as the current drain of the
Also, the description of section 2 says the drain rect except for Figure 10 and its description. gate driver is very low except when switch-
voltage is typically constant (already com- The gate driver does not level shift the 15 ing the MOSFET. As shown, it does not work!
mented on) at the source voltage (Vcc). Vcc is volts; it only level shifts the signal to its out- I can understand not going into too
not the source voltage; it is the supply voltage. put stage (MOSFET Driver). You must supply much detail and giving approximations that
The next-to-last paragraph should state a floating 15 volt power supply. If the MOS- people can use, but you should try to keep
that reducing the external gate resistor will FET is being continuously switched on and tutorial articles accurate. Giving someone
also speed up the switching time. The state- off, a floating 15 volt supply can be made with wrong knowledge is worse than giving them
ment that the Miller plateau discharge time a diode and capacitor; it's called a bootstrap no knowledge at all. When giving approxi-
is governed by the resistance of Rg is supply. If the MOSFET will only occasionally mations, say so and say that the detail is
confusing. The Miller plateau doesn't get dis- be switched on, the gate driver will require beyond the scope of the column.
charged, the gate-to-source capacitance does. a hard supply such as an isolated DC-DC Stuart Michaels
The statement should also say the the charge
time is governed by the resistance of Rg.
IGBTs — The second paragraph says that
the NPN transistor forms a Darlington pair.
This could not be more wrong! The NPN tran-
sistor is a parasitic device that results from
the construction of the IGBT; it is not de-
signed into the IGBT and should never be
turned on. The resistor shown in Figure 4 from
base to emitter of the NPN transistor is the
resistance of metal traces on the IGBT die
and is a very low value, usually a few mil-
liohms. If the current through the IGBT is high
enough for the voltage across this resistor to
turn on the NPN transistor, the IGBT will latch
up and cannot be turned off. If some other
means cannot turn off this current quickly (in
microseconds), the IGBT will be destroyed!!!
Table 1 (which compares power devices)
is misleading as many of these values will vary
considerably from device type to device type.
It's also wrong about the saturation voltage
of the IGBT. IGBT saturation voltage is much
higher than most MOSFETs and higher than
most bipolar transistors. The MOSFET acts as
a resistor in saturation so its voltage drop is
simply I times R. If the current is high, you
can put many MOSFETs in parallel to get a
low voltage drop. The IGBT has the base-emit-
ter junction in series with the resistance of a
MOSFET so it has a high voltage drop (usu-
ally 1.5 to 3V) even at low currents. Parallel-
ing IGBTs will not have much effect on the
voltage drop. So, while some single IGBTs
may have a lower drop than some single
MOSFETs, parallel MOSFETs will have a low-
er voltage drop, hence, a lower power dissi-
pation. Figure 5 should say that this assumes
either a current source driving the gate or a
voltage source with a large gate resistor.
The paragraph that starts “Enter Rs” states
the “formula t = 5(RC).” It sounds like you have
to wait five time constants for the IGBT to turn
on or off. Not true! The time to turn on does
depend on the RC product but also depends
on the threshold of the particular IGBT and
the driving voltage and can be solved using
an exponential equation, not a simple one-for-
mula-fits-all equation. Even the exponential
equation is not completely accurate because
July 2006 99
BookstoreJuly06.qxd 6/8/2006 2:22 PM Page 100

S e l e c t e d T i t l e s f o r t h e E l e c t r o n i c s H o b b y i s t a n d Te c h n i c i a n

The Nuts & Volts Hobbyist BOOKSTORE


Teach Yourself Electricity and
ELECTRONICS Electronic Sensors for the Evil
Genius — 54 Electrifying Projects Electronics — Fourth Edition
Printed Circuit Boards by Thomas Petruzzellis by Stan Gibilisco
by R. S. Khandpur Nature meets the Learn the hows and
The printed circuit is Evil Genius via 54 fun, whys behind basic
the basic building block safe, and inexpensive electricity, electronics,
of the electronics hard- projects that allow and communications
ware industry.This is a you to explore the without formal train-
comprehensive, single fascinating and often ing.The best combina-
volume self-teaching mysterious world of tion self-teaching
guide to the art of natural phenomena guide, home reference,
printed circuit board using your own home- and classroom text
design and fabrication built sensors. Each on electricity and
— covering the com- project includes a list electronics has been
plete cycle of PCB of materials, sources updated to deliver the latest advances.
creation, design, layout, for parts, schematics, and lots of clear, well- Great for preparing for amateur and
fabrication, assembly, and testing. Clear and illustrated instructions. Projects include commercial licensing exams, this guide has
concise, Printed Circuit Boards leads readers rain detector, air pressure sensor, cloud been prized by thousands of students and
through the complete cycle of PCB cre- chamber, lightning detector, electronic gas professionals for its uniquely thorough
ation, from design, layout, fabrication, and sniffer, seismograph, radiation detector, and coverage ranging from DC and AC con-
assembly to final testing. Skirting dense much more. $24.95 cepts to semiconductors and integrated
mathematics, the text provides insight and circuits. $34.95
guidance on design challenges brought Bionics for the Evil Genius
about by the ever-increasing density of by Newton C. Braga Intuitive Analog Circuit Design
today's microelectronics. $99.95 Step into the future — by Marc Thompson
(or the past, if you This book introduces
have a touch of Dr. analog circuit design
101 Spy Gadgets for Frankenstein in your with a minimum of
the Evil Genius soul) — with these mathematics. It gives
by Brad Graham/Kathy McGowan 25 incredibly cool readers an intuitive
Utilizing inexpensive, bionic experiments! “feel” for analog circuit
easily-obtainable com- Demonstrating how operation and rules-of-
ponents, you can build life forms can be thumb for their design.
the same information enhanced, combined, The author uses
gathering, covert manipulated, and numerous analogies
sleuthing devices used measured with elec- from digital design to
by your favorite film tronic and mechanical components, these help readers whose main background is in
secret agent. Projects inexpensive projects from internationally digital make the transition to analog design.
range from simple to renowned electronics guru Newton Braga The application of some simple rules-of-
sophisticated and thumb and design techniques is the first
come complete with a N E W !
provide hours of fun and learning.Totally
safe, Bionics for the Evil Genius guides you step in developing an intuitive understand-
list of required parts step by step through 25 complete, intrigu- ing of the behavior of complex electrical
and tools, numerous illustrations, and step- ing, yet low-cost projects developed systems.This book outlines some ways of
by-step assembly instructions. $24.95 especially for this book — including an thinking about analog circuits and systems
electric fish, a bat ear, a lie detector, an that hopefully develops such "circuit intu-
electronic nerve stimulator, a panic ition" and a "feel" for what a good, working
Grob's Basic Electronics generator, and 20 other exciting bioelec- analog circuit design should be. $59.99
With Simulation CD tric/mechanical projects! $24.95
by Mitchel E. Schultz MORE Electronic Gadgets
Grob’s Basic Electronics, Small Antenna Design for the Evil Genius
Tenth Edition is written
for the beginning by Douglas Miron by Robert E. Iannini
student pursuing a Small Antenna Design This much anticipated
technical degree in covers antenna design follow-up to the wildly
Electronics Technology. techniques from very popular cultclassic
In covering the funda- low frequency (below Electronic Gadgets for the
mentals of electricity 300 kHz) to microwave Evil Genius gives base-
and electronics, this (above 1 GHz) ranges. ment experimenters 40
Special attention is given all-new projects to tin-
text focuses on !
essential topics for NEW to antenna design for
mobile/portable applica-
ker with. Following the
tried-and-true Evil
the technician, and the
all-important development of testing and tions.As wireless devices Genius Series format,
troubleshooting skills. $126.00 and systems get both each project includes a
smaller and more ubiquitous, the demand detailed list of materials, sources for parts,
for effective, but small antennas is rapidly schematics, documentation, and lots of
If you don’t see what you need increasing.This book will describe the the- clear, well-illustrated instructions for easy
ory behind effective small antenna design assembly. Readers will also get a quick
here, check out our online store at and give design techniques and examples briefing on mathematical theory and a sim-
www.nutsvolts.com for a complete for small antennas for different operating ple explanation of operation along with
listing of the titles available. frequencies. Design techniques are given enjoyable descriptions of key electronics
for the entire radio spectrum. $69.95 topics. $24.95

100 July 2006


BookstoreJuly06.qxd 6/8/2006 2:23 PM Page 101

CALL 1-800-783-4624 today!


Or Order online @ www.nutsvolts.com
Build Your Own Car PC
MICROCONTROLLERS by Gavin D J Harper HOME COMPUTING
Nuts & Volts of BASIC This is a heavily- SERVO CD-Rom
illustrated, step-by-
Stamps — Volume #6 step guide to installing
Starting with the
by Jon Williams first SERVO issue
and controlling a car — November
Nuts & Volts of BASIC PC — using commonly-
Stamps — Volume 6 2003 — all of the
available, off-the-shelf issues through the
includes articles #117- components.
128, written for 2005. 2004 calendar
Numerous how-to year are now
Article topics consist photos and product
of RFID Readers available on a CD
and Ultrasonic
shots allow you to
easily navigate each N E W
! that can be
Measurement, SX/B searched, printed,
step even if you have and easily stored.
and the Professional little “do-it-yourself” experience. Includes
Development Board, This CD includes all of Volume 1, issues 11-
parts and required tool lists, troubleshoot- 12 and Volume 2, issues 1-12, for a total of
the advanced MIDI ing tips, and a list of manufacturers where
receiver, programming the SX microcon- 14 issues.The CD-Rom is PC and Mac
you can purchase the parts best suited for compatible. It requires Adobe Acrobat
troller in BASIC, mastering the MC14489 your customized system. $27.95
display driver, and more! The Nuts & Volts Reader version 6 or above. Adobe Acrobat
of BASIC Stamps books are a favorite Reader version 7 is included on the disc.
Parallax technical pick and are a tremen- $29.95
dous technical resource for all PBASIC
programming projects. $14.95 ROBOTICS Build & Upgrade Your
Own PC — Fourth Edition
Linux Robotics by Ian Sinclair
PIC in Practice by D. Jay Newman Ian Sinclair's “Build Your
A Project-based Approach If you want your robot Own” books have estab-
Second Edition to have more brains lished themselves as
by David W. Smith than microcontrollers authoritative and highly
PIC in Practice is a graded can deliver — if you practical guides for home
course based around the want a truly intelligent, and small business PC
practical use of the PIC high-capability robot — users and IT technicians
microcontroller through everything you need is alike. Build & Upgrade Your
project work. Principles right here. Linux Own PC — Fourth Edition is
are introduced gradually, Robotics gives you based around building and
through hands-on experi- step-by-step directions upgrading to the latest sys-
ence, enabling students for "Zeppo," a super- tems, such as Pentium 4 or AMD Athlon
to develop their under- smart, single-board-powered robot that can XP motherboards running Windows XP
standing at their own be built by any hobbyist.You also get com- and Windows 2000 Professional. As well as
pace.The book can be plete instructions for incorporating Linux guiding you around the inside of your PC
used at a variety of levels single boards into your own unique robotic base unit, Ian Sinclair also covers setup, and
and the carefully graded designs. No programming experience is security issues and peripherals. $34.95
projects make it ideal for colleges, schools, required.This book includes access to all
and universities. Newcomers to the PIC the downloadable programs you need, plus
will find it a painless introduction, whilst complete training in doing original pro- Nuts & Volts CD-Rom
electronics hobbyists will enjoy the practi- gramming. $34.95 Here’s some good
cal nature of this first course in microcon- news for Nuts &
trollers. $29.95 Volts readers!
Starting with the
Robot Builder's Bonanza January 2004
Third Edition issue of Nuts &
AUTOMOTIVE by Gordon McComb/Myke Predko Volts, all of the
Everybody's favorite issues through
50 Awesome Auto Projects amateur robotics the 2004 calendar
for the Evil Genius book is bolder and year are now
by Gavin D J Harper better than ever — available on a CD
The Evil Genius format and now features the that can be searched, printed, and easily
is the perfect "vehicle" field's "grand master" stored.This CD includes all of Volume 25,
for 50 incredible auto- Myke Predko as the issues 1-12, for a total of 12 issues.The
motive projects that new author! Author CD-Rom is PC and Mac compatible. It
are compatible with duo McComb and requires Adobe Acrobat Reader version 6
any car, no matter Predko bring their or above. Adobe Acrobat Reader version 7
what make, model, or expertise to this fully- is included on the disc. $29.95
year. Focusing on low- illustrated robotics "bible" to enhance the
cost, easily obtained already incomparable content on how to WE ACCEPT VISA, MC, AMEX,
components, 50 build — and have a universe of fun — with and DISCOVER
Awesome Auto Projects robots. Projects vary in complexity so Prices do not include shipping and
for the Evil Genius lists everyone from novices to advanced hobby- may be subject to change. Ask about
the items needed to complete each project ists will find something of interest. Among our 10% subscriber discount on
along with a troubleshooting and repair the many editions, this book features 30 selected titles.
section. $24.95 completely new projects! $27.95

July 2006 101


TechForumNew.qxd 6/8/2006 4:50 PM Page 102

TECH This is a READER-TO-READER Column.


FORUM
All questions AND answers are submitted by Nuts & Volts readers and are intended to promote the exchange of ideas and provide assistance
for solving problems of a technical nature. Questions are subject to editing and will be published on a space available basis if deemed suitable
by the publisher. Answers are submitted by readers and NO GUARANTEES WHATSOEVER are made by the publisher. The implementation of
any answer printed in this column may require varying degrees of technical experience and should only be attempted by qualified individuals.
Always use common sense and good judgement!

All questions and answers should


be sent by email to forum@nuts
volts.com All diagrams should be
computer generated and sent with your
submission as an attachment. >>> QUESTIONS I replaced the battery pack with a
fully charged 6AA Ni-MH (1,800 mA
QUESTIONS 1.2V x 6). Immediately the indicator
To be considered, all questions should relate I want to build a light timer/ started to blink. The battery lasts only
to one or more of the following: controller for a reef aquarium that 30 minutes. (A 1,000 mA ampere
❶ Circuit Design would incrementally turn on a bank of meter was connected and it showed
❷ Electronic Theory fluorescent lights and/or metal halide the camera drew only 700 mA/h Can
❸ Problem Solving lights in a specific order in the anyone shed some light on this?
❹ Other Similar Topics morning, then off in the opposite #7062 Robert Treuer
■ Be brief but include all pertinent informa- order in the evening. This would sim- Ontario
tion. If no one knows what you're asking, you ulate the rise and fall of the sun. I
won't get any response (and we probably need some manual control of the For several years now, I have
won't print it either). on/off process. I could use an array of been experimenting with a wireless
■ Include your Name, Address, Phone Num-
individual timers from the hardware intercom system that uses the
ber, and email. Only your Name, City, and
store, but that takes more room and ground for its medium. I have desired
State will be published with the question,
outlets than I like. Can something a to transmit and receive voice
but we may need to contact you.
■ No questions will be accepted that offer little more compact and versatile be frequencies only, since I believe that
equipment for sale or equipment wanted to done with 555s or similar circuits? I 300 to 3,000 Hz is an unregulated
buy. don’t want to use microcontrollers part of the spectrum. I have had
■ Selected questions will be printed one because of the extra complexity, excellent success building receivers
time on a space available basis. programming, etc. Any help is greatly (which are really nothing more than
■ Questions are subject to editing. appreciated. glorified filtered audio amps with the
#7061 Phil Daniels inputs tied to two poles stuck in
ANSWERS Novice Reef Aquarium Owner the ground), but I’m having trouble
■ Include in the subject line of your email, Striving To Be An Advanced Reef getting my transmitters to go farther
the question number that appears directly Aquarium Owner than a few hundred yards. My latest
below the question you are responding to. transmitter delivers 170V peak-to-
■ Payment of $25.00 will be sent if your an- I have a mini DV camcorder which peak swing straight to a copper pipe
swer is printed. Be sure to include your mail- came with a Lithium-ion 800 mA 7.4V driven about eight feet in the ground
ing address or we cannot send payment.
power pack. It lasts about an hour and still won't carry even half a mile.
■ Only your Name, City, and State, will be
in camera mode. There is a battery Heinrich Barkhausen in WW2 spied
printed, unless you say otherwise. If you
indicator on the LCD screen with five on allied army field phones by
want your email address included, indicate
to that effect. dots to denote the capacity (five dots hooking a sensitive audio amplifier to
■ Comments regarding answers printed in for 100% and three dots for 60% etc.) two poles driven in the ground. He
this column may be printed in the Reader The indicator starts to blink when the picked up eddy currents from conver-
Feedback section if space allows. battery drops below 20%. sations miles away and was able to
102 Jul July 2006
TechForumNew.qxd 6/8/2006 5:41 PM Page 103

> > > R E A D E R - TO - R E A D E R Q U E S T I O N S A N D A N S W E R S


understand them. If he could pick up
signals unintentionally induced into >>>> ANSWERS trigger line can stay low. The
trigger must go high before the
the ground, then why can't I find [#6063 - June 2006] one shot times out because the
the secret to sending intentional cur- I have a spot welder that I want to timer will not stop until the trigger
rents into the ground to my cousin's use on delicate metal. The trigger is line goes high. For C1 = 10 μF and
house about two miles away? My not reliable due to its unpredictable R2 = 10K, switch one holds the
goal is to have a two-way intercom “on” time. Is there a way to build a trigger line low for 55 milliseconds
between his house and mine. I know timer that would regulate the “on” (T = .55RC). Using the same values
it can be done. I once read a radio time to very short but accurately for C2 and R3 sets a minimum on
electronics book at the local library repeatable (one shot) bursts? time of 110 milliseconds. (T = 1.1
where the author and a friend RC). A 100K linear pot (Vr1) allows
plugged their guitar amps into the #1 Here is a schematic of a 555 adjustment up to 1.2 seconds of
ground, in a similar way, and could chip configured as a one shot on time. If you have trouble with
pick each other up at about two timer. The schematic also includes double firing, you can double or
miles. Ideas? switch one, used to activate the triple the values of all three fixed
#7063 J.B.Young timer, and switch two, to change resistors. That should slow every-
Gravel Switch, KY back to manual control. This is thing down enough to ignore
just a matter of convenience so switch bounce, but the minimum
I purchased a GOLDSTAR DC you can use switch one in timed on time will also double or triple.
power supply model GP-305. There or manual configuration. When The output is defined as "on
are some LEDs, switches, and switch two is open, it's a one shot equals high." You did not say any-
terminals that I have not been able device. When switch two is thing about what kind of signal is
to figure out. Can anyone tell me the closed, switch one acts "normal." being switched to activate the
function of these or have a manual I Press for on. Release for off. welder, so you will have to design
might be able to copy? Switch one is normally closed the appropriate circuit to convert
The mystery elements are: to R1 (10K) so the wiper is high. "high at pin 3" to whatever it is
When you press switch one, C1 that needs to be switched to
1. A switch marked EXT/INT. discharges to ground and a pulse make the welder activate.
2. An LED marked C.C. pulls the trigger input low. R2 and C.L. Larson
3. An LED marked C.V. C1 set the amount of time the Largo, FL
4. A external terminal strip with
the following contacts /C1/C2/+/
EXT/-/PL/GND.

I have figured out GND.


#7064 Robert B. Lang Jr
via email

I quite enjoyed reading Russell


Kincaid’s response on a simple cur-
rent sensing circuit. Another tougher
problem is on measuring the 250V
plus DC voltage. Can Russell or
anyone else suggest a circuit that is
isolated from the microcontroller?
#7065 Steve Yang
Sunnyvale, CA
#2 Here's basically what you will troller that has the needed I/O pins.
I bought a TL507C — a one bit need to control the welder. I have just For the peripheral circuitry, it will
AD converter chip in the mid 80s. It’s begun designing a circuit to remedy need a zero-cross detector for power
been sitting idle since then and I've this exact problem; so here's my line timing. This will feed an input bit
been thinking of using it with my approach. on one of the ports; most likely I will
Timex 1000 computer, to measure A spot welder needs to have its use one of the interrupt pins for that
temperature, if possible. weld time very precisely controlled, in function. It will also need an input pin
What are some practical applica- terms of power line cycles. I plan to that detects when the trigger on the
tions that a one bit converter chip use a microcontroller such as the welder has been tripped. If your
could be used for? 8051 or similar as the core, since I welder is like those from one of the
#7066 Theodore Turk already have a basic development mail-order tool stores (e.g., Harbor
Euclid, OH setup for that. You can use any con- Freight), the trigger switch will have to
July 2006 103
TechForumNew.qxd 6/8/2006 5:41 PM Page 104

> > > R E A D E R - TO - R E A D E R Q U E S T I O N S A N D A N S W E R S


be rewired to isolate it from the which, of course, turns the power to 4) Turn the triac off.
power line, and brought back into the the welder on and off. It should have a time delay built in
controller. The key to all this is the software to enforce the duty cycle rating of the
Next, it will need a keypad to that will run in the microcontroller. I welder so you don't burn up the
input the weld parameters. A 3x4 have some basic ideas for the welder.
matrix keypad similar to a touch tone software, but as yet, I haven't written A word of caution is necessary,
phone keypad should work nicely. Of any code. Basically, it will need to have because lethal voltage is used by
course, it will need a display to prompt the following functions: the welder. If you don't know and
for user input and to tell the user 1) Ask the user for the weld time in understand the precautions that you
what's happening. One of the cheap either number of power cycles or in should use, then please don't attempt
one or two line LCD displays should fit seconds. a project like this.
the bill. 2) Wait for the trigger to be pulled. I don't have a lot of time to work
Next, it will need an output pin to 3) Turn the triac on for the specified on this, but it is destined to be a sum-
drive a large optically isolated triac, time or number of power cycles. mer project for me. I'll be glad to pass
on any discoveries as I discover them.
Weld On!!!!
David Mason
Middleburg, FL

[#6062 - June 2006]


I have two JumpDrives and was
wondering if there is a chip to make
it work like a USB JumpDrive MP3
player. I see that they sell them, but
I want to build one. Does anyone
have a schematic or any ideas?

Here are several web links to


home-built MP3 players.

www.frankvh.com/mp3player/
web.media.mit.edu/~ladyada/
make/minty/
www.teuthis.com/html/mp3.html

Here are some links to MP3


codecs and USB interface ICs:

Atmel — AT43USB370 USB 2.0


Full-Speed Host/Function Processor -
www.atmel.com/dyn/produc ts/
product_card.asp?part_id=3393
STMicro — STA013 MPEG 2.5
LAYER III (MP3) AUDIO DECODER -
www.st.com/stonline/produc ts/
literature/ds/6399.pdf
Daryl Rictor
via the Internet

Check out the Nuts & Volts


Electronics Forums at
www.nutsvolts.com
There are currently over 3,400 registered
users and over 36,000 posts, covering every
electronics topic imaginable!
Our new “Up For Grabs” forum is the
place to post your used electronic
items for sale, trade, or give-away.
104 July 2006
IndexJuly06.qxd 6/8/2006 2:28 PM Page 105

■ LOOK FOR

AMATEUR
■ SEARCH FOR
Find your favorite advertisers here!
■ FIND

Coridium Corporation............................31
MOTORS
AD INDEX Abacom Technologies ...............34
RADIO AND TV EMAC, Inc. ...........................................71
HVW Technologies ..............................56
Jameco ................................................43 ActiveWire, Inc. .........................56
Coax-Seal/Universal Electronics ..........57 All Electronics Corp. ..................70
PolarisUSA Video, Inc. .........................11
Microchip ................................................7
OPTICS Anchor Optics ............................39
microEngineering Labs ........................85
Anchor Optics ......................................39
Ramsey Electronics, Inc. ................22-23 Micromint .............................................65 Atlantic Int’l Institute, Inc. ..........71
Surplus Sales of Nebraska ..................81 mikroElektronika ..................................95
Net Media................................................2
PROGRAMMERS Blink Manufacturing ...................57
Budget Robotics ........................89
Conitec DataSystems .........................104
BATTERIES/ Parallax, Inc. ..........................Back Cover
Electronics123 .....................................34
C & S Sales, Inc. .......................24
CHARGERS R4Systems, Inc. ...................................71
microEngineering Labs ........................85
Circuit Specialists, Inc. .....106-107
Scott Edwards Electronics, Inc. ...........81 Coax-Seal/Universal Electronics ..57
Cunard Associates ...............................56 mikroElektronika ..................................95
Trace Systems, Inc. .............................64 COMFILE Technology .................3
Ocean Server Technology, Inc. ...........89
World Educational Services .................98
XGameStation ......................................56
PUBLICATIONS Command Productions ........25, 81

BUSINESS Mouser Electronics ..............................30 Conitec DataSystems ..............104


Coridium Corporation ................31
OPPORTUNITIES Software
EZ PCB ................................................25 Pioneer Hill Software ............................44 RF TRANSMITTERS/ Cosmos .....................................73
CrustCrawler .............................85
RECEIVERS Cunard Associates ....................56
BUYING ELECTRONIC DESIGN/ Abacom Technologies .........................34 DesignNotes.com, Inc. ...............57
SURPLUS ENGINEERING/ Linx Technologies ................................54 Earth Computer Technologies ...56
Earth Computer Technologies . ............56 REPAIR SERVICES Matco, Inc. ...........................................56 Electronic Design Specialists .....64
Electronics123 ...........................34
GreenChip ............................................56 Blink Manufacturing .............................57
ROBOTICS Electronix Express ....................85
Jaycar Electronics ................................45 eMachineShop.com .............................80 Budget Robotics ...................................89 eMachineShop.com ..................80
ExpressPCB .........................................21 COMFILE Technology ...........................3 EMAC, Inc. ................................71
CCD CAMERAS/ EZ PCB ................................................25 CrustCrawler ........................................85 ExpressPCB ..............................21
VIDEO Front Panel Express LLC ...................104 Hobby Engineering ..............................42 EZ PCB .....................................25
GME Technology .................................56 HVW Technologies ..............................56
Circuit Specialists, Inc. ................106-107 Front Panel Express LLC .........104
PCB Cart ..............................................33 Jameco ................................................43
Cosmos ................................................73 Future Technology Devices .......35
PCB Pool .............................................63 LabJack ................................................25 GME Technology .......................56
Matco, Inc. ...........................................56
Pulsar, Inc. ...........................................56 Lemos International Co., Inc. ...............25 GreenChip..................................56
PolarisUSA Video, Inc. .........................11
R4Systems, Inc. ...................................71 Lynxmotion, Inc. ...................................55 Halted Specialties Co. ...............58
Ramsey Electronics, Inc. ...............22-23
Trace Systems, Inc. .............................64 mikroElektronika ..................................95 Hobby Engineering.....................42
CIRCUIT BOARDS EDUCATION
Net Media ...............................................2 HVW Technologies ....................56
Ocean Server Technology, Inc. ...........89 Industrial Ventures ..............56, 99
Blink Manufacturing .............................57
Atlantic Int’l Institute, Inc. .....................71 Information Unlimited ................73
Cunard Associates ...............................56
ExpressPCB .........................................21 Command Productions ..................25, 81 SATELLITE Integrated Ideas & Tech. ............44
EZ PCB ................................................25 EMAC, Inc. ...........................................71 Lemos International Co., Inc. ................25 Jameco.......................................43
Maxstream ...........................................44 Hobby Engineering ..............................42 Jaycar Electronics ......................45
Micromint .............................................65 Schmart Board .....................................56 SEALANTS LabJack......................................25
PCB Cart ..............................................33 XGameStation ......................................56 Coax-Seal/Universal Electronics ..........57 Lemos International Co., Inc. .....25
PCB Pool .............................................63 Link Instruments ..........................5
Pulsar, Inc. ...........................................56 ENCLOSURES SECURITY Linx Technologies .....................54
R4Systems, Inc. ...................................71 Integrated Ideas & Technologies, Inc. ....44 Cosmos ................................................73 Lynxmotion, Inc. ........................55
Saelig Company, Inc. ...........................72 Information Unlimited ...........................73 Matco, Inc. .................................56
Schmart Board .....................................56 KITS & PLANS Linx Technologies ................................54 Maxstream ................................44
C & S Sales, Inc. ..................................24 Matco, Inc. ...........................................56 MCM ..........................................30
COMPONENTS DesignNotes.com, Inc. .........................57 PolarisUSA Video, Inc. .........................11 Microchip .....................................7
Electronics123 .....................................34 Earth Computer Technologies . ............56 microEngineering Labs ..............85
Electronix Express ...............................85 Electronics123 .....................................34 TEST EQUIPMENT Micromint ...................................65
EMAC, Inc. ...........................................71 C & S Sales, Inc. ..................................24 mikroElektronika ........................95
Front Panel Express LLC ...................104
Future Technology Devices .................35 Circuit Specialists, Inc. ................106-107 Mouser Electronics ....................30
Future Technology Devices .................35
Conitec DataSystems .........................104 Net Media.....................................2
Jameco ................................................43 Hobby Engineering ..............................42
DesignNotes.com, Inc. .........................57 Ocean Server Technology, Inc. ..89
Lemos International Co., Inc. ...............25 Industrial Ventures .........................56, 99
Electronic Design Specialists................64 Parallax, Inc. ...............Back Cover
Linx Technologies ................................54 Information Unlimited ...........................73
GME Technology .................................56 PCB Cart ...................................33
Maxstream ...........................................44 Jaycar Electronics.................................45
Jaycar Electronics.................................45 PCB Pool ...................................63
Micromint .............................................65 QKITS ...................................................56
LabJack ................................................25 Pico Technology Ltd. UK............34
Pulsar, Inc. ...........................................56 RABBIT Semiconductor ........................17
Link Instruments .....................................5 Pioneer Hill Software .................44
Super Bright LEDs ...............................10 Ramsey Electronics, Inc. ................22-23 Pioneer Hill Software ............................44 PolarisUSA Video, Inc................11
Scott Edwards Electronics, Inc. ...........81 Pico Technology Ltd. UK .....................34
COMPUTER XGameStation ......................................56 Saelig Company, Inc. ...........................72
Pulsar, Inc. ................................56
QKITS ........................................56
Hardware Trace Systems, Inc. .............................64
ActiveWire, Inc. ....................................56 LASERS R4Systems, Inc. .........................71
RABBIT Semiconductor .............17
COMFILE Technology ...........................3 Information Unlimited ...........................73 TOOLS Ramsey Electronics, Inc. .....22-23
Earth Computer Technologies . ............56 C & S Sales, Inc. ..................................24
Future Technology Devices .................35 MISC./SURPLUS GME Technology .................................56
Saelig Company, Inc. ................72
Schmart Board ..........................56
Halted Specialties Co. ..........................58 All Electronics Corp. .............................70
Scott Edwards Electronics, Inc. ..81
Front Panel Express LLC ...................104
WIRE, CABLE
Surplus Sales of Nebraska ...................81
Super Bright LEDs ....................10
GreenChip ............................................56
Microcontrollers / I/O Boards Halted Specialties Co. ..........................58 AND CONNECTORS Surplus Sales of Nebraska ........81
Trace Systems, Inc. ..................64
Abacom Technologies ..........................34 MCM ....................................................30 Coax-Seal/Universal Electronics ..........57
World Educational Services ......98
COMFILE Technology ...........................3 Ocean Server Technology, Inc. ...........89 DesignNotes.com, Inc. .........................57
XGameStation ...........................56
Conitec DataSystems .........................104 Surplus Sales of Nebraska ..................81 Jameco ................................................43

July 2006 105


Full Page.qxd 6/6/2006 1:05 PM Page 106

C i rcuitSpecialists.com C i rcuitSpecialists.com C i rcuitSpecialists.com

PowerSupply1 Switching Power Supplies Programmable DC Power Supplies


New to CircuitSpecialists.com are these Highly The CSI 3600 Series
Reliable, Universal AC input/full range single output Programmable DC Power
power supplies. Choose between various 40, 60, 100 & Supplies are equipped with a
150 Watt versions. They have the approval of UL and back-lit LCD display, number
C UL and come 100% full load burn-in tested and are keypad and a rotary code
protected with overload/over and voltage/short circuit. switch for ease of use & quick
Also included is a 2 year warranty. programming. Voltage, Current & Power can all be displayed on the
LCD or computer screen (with optional RS-232 interface module). It can
PowerSupply1 Qty 1 Qty 10 Qty 25 Qty 100 Qty 500 Qty 1000
be operated at constant current mode, constant voltage mode & constant
40W Series power mode. It also can be set with maximum limits for current &
Available in $28.99 $26.09ea $24.53ea $21.95ea $15.98ea $13.79ea
5,12,15,24,48V power output. Ideal instruments for scientific research, educational labs
60W Series
or any application requiring a sophisticated DC-power source.
Available in $32.99 $29.69ea $27.91ea $25.95ea $17.69ea $15.49ea Model CSI3644A CSI3645A CSI3646A
5,12,15,24,48V
100W Series DC Voltage 0-18V 0-36V 0-72V
Available in $38.50 $34.65ea $32.57ea $29.99ea $21.18ea $18.49ea
3.3,5,7.5,12,15,24,48V DC Current 5A 3A 1.5A
150W Series Power (max) 90W 108W 108W
Available in $48.99 $44.09ea $39.00ea $37.50ea $26.93ea $23.49ea
5,7.5,9,12,24,28,36V Only $199.00 Each!
Programmable
Programmable DC Electronic
Electronic Loads
www.Cir cuitSpecialists.com The CSI 3700 series electronic
loads are single input program-
mable DC electronic loads that
Circuit Specialists Soldering Station $34.95! provide a convenient way to
w/Ceramic Element & Seperate test batteries and DC power
Solder Stand supplies. It offers constant current mode, constant resist-
•Ceramic heating element for more accurate ance mode and constant power mode. The backlight
temp control LCD, numerical keypad and rotary knob make it much
•Temp control knob in F(392° to 896°) & easier to use. Up to 10 steps of program can be stored.
C(200° to 489°)
•3-prong grounded power cord/static safe tip In B usiness Model CSI3710A CSI3711A
•Seperate heavy duty iron stand Input Voltage 0-360V DC 0-360V DC
•Replaceable iron/easy disconnect Item# Input Current 0-30A DC 0-30A DC
•Extra tips etc. shown at web site Rapid Heat Up! Input Power 0-150W 0-300W
CSI-STA
CSI-STATION1A
CSI3710A: $349.00 CSI3711A:
CSI3711A: $499.00
Also Available w/Digital Display SMD Hot Tweezer
& MicroPr
MicroProcessor
ocessor Controller
Controller Adaptor Fits CSI 50,000 Count Advanced DMM w/RS232
Stations 1A & 2A,
2A,
and CSI906 •DC voltage: 1000V
Item#
CSI-STA
Since 1 971 •AC voltage: 750V
CSI-STATION2A $29.00 •DC accuracy 0.05%
•Low voltage Ohms measurement
$49.95 Item# and conductance
Details at Web Site CSITWZ-STA
CSITWZ-STATION •Auto and software calibration
> Soldering Equipment & Supplies > Soldering Stations
•Dual back-lit display and K type
thermocouple
•Measures duty cycle, pulse width
Heavy Duty Regulated Linear and conductance
Bench Power Supplies •Compare function for go-no go
•Multi-loop high precision voltage regulation testing
•Automatic voltage & current stabilizing conversion •Peak detection for capturing high
•Automatic radiant cooling system speed signals
•Over-heating protection •Binary bit expression bar graph
•AC and AC + DC true RMS AC voltage and
CSI5030S 0-50v/0-30amp
CSI5030S: $595.00 current measurements
CSI12005S 0-120v/0-5amp
CSI12005S: $595.00 •Auto/manual ranging
Details at Web Site •Test zener diodes up to 20 volts MSRP $199.00
CSI20002S 0-200v/0-2amp
CSI20002S: $595.00 •Min/Max/Avg relative modes
> Test Equipment > Power Supplies Item# PROTEK608
•Memory store and recall
Dual Output DC Bench Power Supplies
•Fuse protected current ranges $129.00
•Cat II 600V and CE approved
High stability digital read-out bench power supplies New Lower Price!
Details at Web Site
featuring constant voltage and current outputs. Short- As Low As > Test Equipment > Digital Multimeters
circuit and current limiting protection is provided. $93.00!
SMT PC boards and a built-in cooling fan help ensure Triple Output Bench Power Supplies
reliable performance and long life.
with Large LCD Displays
•Source Effect: 5x10-4=2mV
•Load Effect: 5x10-4=2mV HOT •Output: 0-30VDC x 2 @ 3 or 5 Amps
& 1ea. fixed output @ 5VDC@3A
•Ripple Coefficient:: <250uV ITEM! •Source Effect: 5x10-4=2mV
•Stepped Current: 30mA +/- 1mA •Load Effect: 5x10-4=2mV
*All 3 Models have a 1A/5VDC Fixed Output on the rear panel* •Ripple Coefficient: <250uV
•Stepped Current: 30mA +/- 1mA
CSI3003X-5 0-30v/0-3amp 1-4: $97.00 5+: $93.00
CSI3003X-5: •Input Voltage: 110VAC
CSI5003X5 0-50v/0-3amp 1-4: $107.00 5+: $103.00
CSI5003X5: CSI3003X3 0-30VDCx2 @3A $179.00 5+: $169.00
CSI3003X3:
CSI3005X5 0-30v/0-5amp 1-4: $119.00
CSI3005X5: $119.00 5+: $115.00
$115.00 CSI3005XIII 0-30VDCx2 @5A $219.00 5+: $209.00
CSI3005XIII:
Details at Web Site > Test Equipment > Power Supplies Details at Web Site > Test Equipment > Power Supplies

C i r c u i t S p e c i a l i s t s , I n c . 2 2 0 S . C o u n t r y C l u b D r. , M e s a , A Z 8 5 2 1 0
8 0 0 - 5 2 8 - 1 4 1 7 / 4 8 0 - 4 6 4 - 2 4 8 5 / FA X : 4 8 0 - 4 6 4 - 5 8 2 4
CoverInside.qxd 6/6/2006 1:01 PM Page 2

C i rcuitSpecialists.com C i rcuitSpecialists.com C i rcuitSpecialists.com


ESD Safe CPU Controlled
Controlled SMD Hot Air Rework Station
Station 2.9GHz RF Field Str
Strength
ength Analyzer
Fantastic Low
The heater and air control system are The 3290 is a high quality hand-held Price:
built-in and adjusted by the simple touch RF Field Strength Analyzer with wide $1899.00!
of the front keypad for precise settings. band reception ranging from 100kHz
Temperature range is from 100°C to •WFM/NFM/AM/SSB modulated signals may
to 2900MHz.The 3290 is a compact & be measured.
480°C / 212°F to 896°F, and the entire lightweight portable analyzer & is a •Signal Levels up to 160Channels can be
unit will enter a temperature drop state must for RF Technicians. Ideal for displayed simulaneously on the LCD
after 15 minutes of non-use for safety and testing, installing & maintenance of •PLL tuning system for precise frequency
Mobile Telephone Comm systems, measurement and tuning
to eliminate excessive wear. •Built-in Frequency Counter
Item# CSI825A++ Only Cellular Phones,Cordless phones, pag-
•LED Backlight LCD (192x192 dots)
•CPU Controlled $199.00! ing systems, cable & Satellite TV as
•Built-in Vacuum System •All fuctions are menu selected.
well as antenna installations.May also •RS232C with software for PC & printer
•Temperature Range:100°C to 480°C / 212°F to 896°F be used to locate hidden cameras using
•15-Minute Stand-By temperature "sleep" mode interface
•Power:110/120 VAC, 320 W maximum RF transmissions. •Built-in speaker (Includes Antenna)
Item# 3290
Details at Web Site > Soldering Equipment & Supplies Details at Web Site > Test Equipment > RF Test Equipment

Butane Por table Soldering Iron


Iron & Kit
Br eadboard / Power Supply / •Electronic Instant Ignition System
MultiFunction DMM Bundle •Naked Flame Burner: Temp to
1300°C/2370°F
Provides the user with a quick and efficient •Flameless Burner: up to 400°C/750°F
system for breadboarding electronic circuits.
•Equipped with U.S.CPSC Approval
Comes with three built-in regulated power Child Safety Standard
supplies along with a deluxe, easy-to-use •Electronic Instant Ignition System
breadboard. Included is a multifunction DMM Two-Piece Iron comes •Naked Flame Welding: Temp to
with Solder Tip. 1300°C/2370°F
with 100VDC, 750VAC, frequency, resist- •Soldering Temp: up to 500°C/930°F RK3124:
ance, diode test, audible continuity, transistor RK3212 Solder Iron
RK3212: RK3124 Solder Kit
•Heat Shrinking: up to 500°C/930°F
check,temperature, and capacitance. $14.95 •Hot cutting of plastic sheets or plates $34.00
A Super Deal! Details at Web Site > Soldering Equipment & Supplies > Soldering Irons
Details at Web Site
> Breadboards & Prototyping Boards
Only 20MHz Dual Trace Oscilloscope
Powered
Powered Breadboard
Breadboard w/out DMM: $69.00 $69.99! •20MHz Bandwidth
Item#: PBB-272DMM BUNDLE: $69.99! •Alt-Mag sweep for simultaneous display of
main and X5 magnified trace
Powered Breadboard w/Multifunction DMM (CSIMS8264) •1mV/Div Vertical sensitivity
You Get The DMM for an Extra $.99 •Alternate trigger for a stable display of unre
lated signals
•Multi-level trigger
•X5 Sweep Magnification Item# PROTEK 6502
Digital Storage Oscilloscope Module
Details at Web Site $279.00!
Convert any PC with USB interface to a high > Test Equipment > Oscilloscopes/Outstanding prices
performance Digital Storage Oscilloscope.
This is a sophisticated PC basedscope adaptor 2MHz Sweep Function Generator
providing performance compatible to
mid/high level stand alone products costing •0.02Hz-2MHz(7 Ranges)
much more! Comes with two probes. •Sine,Triangle,Square,Pulse,Ramp, Slewed Sine Waveform
•Sync. Out (TTL Square Waveform)
Details & Software Price •Accuracy: ±5% of Full Scale to 200KHz,
Download at Web Site Breakthrough! ±8% of Full Scale from 200KHz-2MHz
> Test Equipment > Oscilloscopes/Outstanding Prices
•Sweep Function
•VCG Input Item# PROTEK 9205
PC based Digital Storage Oscilloscope, Special
200MHz 5GS/s equiv. sampling USB
interface
Item# 200DSO Only$749.00 Details at Web Site $139.00!
> Test Equipment > Function Generators Any Quantity
Any Quantity

SONY Super HAD CCD Color


SONY Intelligent DMM w/ RS-232
Weatherproof
eatherproof IR Cameras Super HAD •3999 Counts and 38 Segment Bar Graph Item# CSI345
•Day & Night Auto Switch CCD™ equipped •Dual Display (digits & bar graph)
SALE
•Signal System: NTSC •Capacitance Function, Transistor & Diode Test $29.95
•Image Sensor: 1/3" SONY Super HAD CCD camera’s feature dra-
matically improved •Frequency Range & Temperature
•Horizontal Resolution: 480TV lines
•Min. Illumination: 0Lux light sensitivity •RS232C Standard Interface Details at Web Site
4 8 0n e s •Data Hold
i > Test Equipment > Digital Multimeters/World Beater Prices
T V oLl u t i o n Item# VC-827D: $132.00
R e s

SONY Super HAD CCD B/W SONY Super HAD SONY Super HAD CCD Color
Weatherproof
eatherproof IR Camera CCD Color Camera Weatherproof
eatherproof IR Camera
•Day & Night Auto Switch •Weather Proof •Day & Night Auto Switch
•Signal System: EIA •Signal System: NTSC •Signal System: NTSC
•Image Sensor: 1/3" SONY Super HAD CCD •Image Sensor: 1/4" SONY Super HAD CCD •Image Sensor: 1/4" SONY Super
•Horizontal Resolution: 420TV lines •Horizontal Resolution: 420TV lines HAD CCD
•Min. Illumination: 0Lux •Min. Illumination: 1Lux/F1.2 •Horizontal Resolution: 420TV lines
Item# VC-317D: $59.50 •Min. Illumination: 0Lux
Item# VC-805: $53.95
Details at Web Site > Miniature Cameras(Board,Bullet,Mini’s, B/W, Color) Item# VC-819D: $62.50

Visit our website for a complete listing of our offers. We have over 8,000 electronic items on line @ www.CircuitSpecialists.com. PC based data acquisition,
industrial computers, loads of test equipment, optics, I.C’s, transistors, diodes, resistors, potentiometers, motion control products, capacitors,miniature observation
cameras, panel meters, chemicals for electronics, do it yourself printed circuit supplies for PCB fabrication, educational D.I.Y. kits, cooling fans, heat shrink, cable
ties & other wire handleing items, hand tools for electronics, breadboards, trainers, programmers & much much more! Some Deals you won’t believe!
C i r c u i t S p e c i a l i s t s , I n c . 2 2 0 S . C o u n t r y C l u b D r. , M e s a , A Z 8 5 2 1 0
8 0 0 - 5 2 8 - 1 4 1 7 / 4 8 0 - 4 6 4 - 2 4 8 5 / FA X : 4 8 0 - 4 6 4 - 5 8 2 4
Cover.qxd 6/8/2006 5:25 PM Page 108

Vol. 27 No. 7
NUTS & VOLTS
What can you do with eight 32-bit processors (COGs) in one chip? Real simultaneous multi-processing! The
new Propeller chip is the result of our internal design team working for eight years. The Propeller chip was
designed at the transistor level by schematic using our own tools to prototype the product. The Propeller is
programmed in both a high-level language, called SpinTM, and low-level (assembly) language. With the set
of pre-built Parallax “objects” for video, mice, keyboards, RF, LCDs, stepper motors and sensors your Propeller
application is a matter of high-level integration. Propeller represents the first custom all-silicon product
designed by Parallax. The Propeller is recommended for those with previous microcontroller experience.

Propeller Chip Specifications


Power Requirements 3.3 volts DC
External Clock Speed DC to 80 MHz (4 MHz to 8 MHz with Clock PLL running)

LONG-RANGE STEREO MICROPHONES • MODEL TRAINSAVER • HEATSINKS


Internal RC Oscillator 12 MHz or 20 KHz
System Clock Speed DC to 80 MHz
Global RAM/ROM 64 K bytes; 32K RAM / 32 K ROM
Processor RAM 2 K bytes each (512 longs)
RAM/ROM Organization 32 bits (4 bytes or 1 long)
I/O Pins 32
Current Source/Sink per I/O 50 mA

Propeller users have already been hard at work developing Objects for the Propeller Object Library and discussing
Propeller programming on our online forums. To join in visit www.parallax.com/propeller.

Propeller Chips Stock Code Price


P8X32A-D40 (40-Pin DIP) Chip #P8X32A-D40 $25.00
P8X32A-Q44 (44-Pin QFP) Chip #P8X32A-Q44 $25.00
P8X32A-M44 (44-Pin QFN) Chip #P8X32A-M44 $25.00
Propeller Tools Stock Code Price
Propeller Demo Board #32100 $129.95
PropSTICK Kit #32310 $79.95
Propeller Accessories Kit #32311 $99.00

To order online visit www.parallax.com/propeller. To order by telephone call the Parallax Sales Department
toll-free at 888-512-1024 (Monday-Friday, 7 a.m. to 5 p.m., Pacific Time).
July 2006

U.S. $5.50 CANADA $7.00


0 7>

0 74470 89295 3

You might also like