Download as pdf or txt
Download as pdf or txt
You are on page 1of 108

O

.R
i2 .R
O
E.H i2
EL .H
RU
M UL
iU OR
.G AT
W M
W CA
W OS
A Di
.R $7.00
0 5>
W
3
CANADA
W

74470 89295
W
$5.50
U.S.

0
Vol. 28 No. 5 NUTS & VOLTS X-10 DOGGY DISH • HACKING • SONIC REALISM • FLOOD DETECTION ALARM May 2007
Page 108
11:11 PM
4/5/2007
Cover.qxd
CoverInside.qxd 4/4/2007 11:36 AM Page 2

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


ESD Safe CPU Controlled
Controlled SMD Hot Air Rework Station
Station Stepper Motors
The heater and air control system are built-in Part #: Motor Frame Holding Torque: Price:
and adjusted by the simple touch of the front Size:
keypad for precise settings. Temperature 42BYGH404 NEMA 17 3.4kg.cm/47oz.in $17.95
range is from 100°C to 480°C / 212°F to 57BYGH207 NEMA 23 8kg.cm/111oz.in $24.95
896°F, and the entire unit will enter a temper- 57BYGH303 NEMA 23 15kg.cm/208oz.in $29.95
ature drop state after 15 minutes of non-use 57BYGH405 NEMA 23 20kg.cm/277oz.in $34.95
for safety and to eliminate excessive wear. 85BYGH350B-03 NEMA 34 48kg.in/665oz.in $79.95
•CPU Controlled Item# CSI825A++ 85BYGH350C-03 NEMA 34 63kg.cm/874oz.in $119.95
•Built-in Vacuum System
•Temperature Range:100°C to 480°C / 212°F to
896°F Stepper Motor Contr ollers 2 Phase Microstepping
Microstepping
•15-Minute Stand-By temperature "sleep" mode Sale Stepper Motor Driver (Bi-polar & Unipolar Motors)
•Power:110/120 VAC, 320 W maximum $149.00! Part #: Dimensions: MicroStep: Price:
Details at Web Site > Soldering Equipment & Supplies XCW220 100mm x 61mm 1(200), 1/2(400), 1/4(800), $39.95
x 19mm 1/8(1600)
CW220 99mm x 65mm 1/2(400), 1/8(1600) $49.95
Br eadboard / Power Supply / x 30mm
W
MultiFunction DMM Bundle CW230 115mm x 72mm
x 32mm
1(200), 1/2(400), 1/4(800),
1/8(1600), 1/16(3200),
$59.95
Provides the user with a quick and efficient 1/32(6400), 1/64(12800)
system for breadboarding electronic circuits.
W
CW250 140mm x 94mm 1(200), 1/2(400), 1/8(1600) $69.95
Comes with three built-in regulated power x 45mm
supplies along with a deluxe, easy-to-use CW860 147mm x 97mm 1(200), 1/2(400), 1/4(800), $119.95
W

breadboard. Included is a multifunction DMM x 30mm 1/8(1600), 1/16(3200),


W
1/32(6400), 1/64(12800),
with 1000VDC, 750VAC, frequency, resist- 128(25600), 1/5(1000),
ance, diode test, audible continuity, transistor 1/10(2000), 1/25(5000),
W

.G
check,temperature, and capacitance. 1/50(10000), 1/125(25000),
A Super Deal! 1/250(50000)
Details at Web Site
W

iU
> Breadboards & Prototyping Boards
Only
Powered
Powered Breadboard
Breadboard w/out DMM: $69.00 $69.99! Protek
Protek 2.0 & 2.9GHz Field Str
Strength
ength Analyzers
.R

RU
Item#: PBB272-DMM: $69.99! •Frequency Range : 100KHz ~ 2900MHz 3290N

Powered Breadboard w/Multifunction DMM (CSIMS8264) (2060MHz for 3201N)


AD

•WFM/NFM/AM/SSB modulated signals


You Get The DMM for an Extra $.99
M
may be measured.
•Sweep Trigger Mode: Free Run, Single
Run, Continuous Wave, Squelch Run
iO

Digital Storage Oscilloscope Module


EL
•Sweep Speed: 500 to 2000msec
Convert any PC with USB interface to a high •PLL tuning system for precise frequency
measurement and tuning
SC

New
E.H
performance Digital Storage Oscilloscope. This
•Built-in Frequency Counter Rev.
Rev. Now
is a sophisticated PC basedscope adaptor pro-
•RS232 interface Available
viding performance compatible to mid/high
level stand alone products costing much more!
AM

Item#’s 3290N & 3201N Special


i2
Comes with two probes.
Details at Web Site $1899.00 (for 3290N)
Details & Software Price > Test Equipment > RF Test Equipment $1374.00 (for 3201N)
Breakthrough!
.R
Download at Web Site
AT

> Test Equipment > Oscilloscopes/Outstanding Prices


PC based Digital Storage Oscilloscope, Outdoor Color Speed Dome Camera
O
200MHz 5GS/s equiv. sampling USB
interface
Item# 200DSO Only$819.00 •1/4” SONY Exview CCD Item# VC-EX861
O

•768(H) x 494(V) effective pixels


•Horizontal Resolution: 480TV lines $899.00
RU

•Up to 80 preset points


SONY Super HAD CCD Color SONY •Line scanning
Weatherproof
eatherproof IR Cameras Super HAD •Continuous 360° horizontal rotation
•Day & Night Auto Switch CCD™ equipped •Vertical rotation: 0-100°
L.H

•Signal System: NTSC camera’s feature dra- •RS485 control interface


•Image Sensor:1/3" SONY Super HAD CCD •Min. Illumination: 0.1Lux (color) / 0.001Lux (B&W)
•Horizontal Resolution: 480TV lines matically improved
•Min. Illumination: 0Lux light sensitivity Details at Web Site Shown with optional wall mount
> Miniature Cameras(Board,Bullet,Mini’s, B/W, Color)
4 8 0n e s Item# VC-827D: $132.00
i2

i
T V oLl u t i o n
Res
SONY Super HAD CCD B/W SONY Super HAD SONY Super HAD CCD Color
.R

Weatherproof
eatherproof IR Camera CCD Color Camera Weatherproof
eatherproof IR Camera
•Day & Night Auto Switch •Weather Proof •Day & Night Auto Switch
O

•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 Item# VC-805: $53.95 •Min. Illumination: 0Lux

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 3/8/2007 10:00 PM Page 3

W
W
W

W
W

.G
W

iU
.R

RU
AD

M
iO

EL
SC

E .H
A

i2
M

.R
AT

O
OR
UL
.H
i2
.R
O

2900 Spafford Street, Davis, CA 95618 Tel 530.757.8400


TOC - May07.qxd 4/5/2007 7:07 PM Page 4

M AY 2 0 0 7

COLUMNS
08 TECHKNOWLEDGEY 2007
W
Events, advances, and news
from the electronics world.
W
12 PERSONAL ROBOTICS
Parameters on the fly — Part 3.
W

W
18 STAMP APPLICATIONS
Control virtually anything ...
W

.G
virtually!
W

26 Q&A
iU
18 Russ Kincaid offers his own
solutions to reader questions.
.R

RU
67 IN THE SPOTLIGHT
AD

PROJECTS and FEATURES This month: Parallax.


M
80 THE DESIGN CYCLE
36 CONTROL YOUR WORLD 62 GOING SECURITY GEEK
iO

Configuration wizardry.
EL
Home Automation — Part 4: ON PENETRATION TESTS
Build an X-10 doggy dish. WITH IRA WINKLER 86 NEAR SPACE
SC

E
The Near Space Ventures
■ By Michael Simpson When is hacking legal?
webpage.
.H
When the company being
42 BUILD A FLOOD hacked hires the hacker. 90 GETTING STARTED WITH PICs
A

i2
DETECTION ALARM ■ By David Geer The 8/14/20-pin PIC family.
M

Know when the water is


.R
rising ... before it’s too late. 68 UNDERSTANDING
AT

■ By Paul Florian DIGITAL BUFFER, GATE, DEPARTMENTS


O
AND LOGIC IC CIRCUITS
46 THE MYSTERIOUS
OR

This month, digital inverter 06 READER FEEDBACK


MAGIC BOX
and AND gate circuits are
Examine the theory of
covered.
30 NEW PRODUCTS
UL

operation behind this


■ By Ray Marston
magical project. Plus,
finish assembly and testing.
73 SONIC REALISM 34 SHOWCASE
.H

■ By Vaughn D. Martin Why can’t sound


and John Stabler
i2

reproduction sound real? 66 ELECTRO-NET


Find out here ...
60 BOOK REVIEW:
■ By Gerard Fonte
.R

Hacking through Hardware 96 CLASSIFIEDS


Hacking Projects for Geeks.
O

■ By Edward B. Driscoll 98 NV BOOKSTORE

Nuts & Volts (ISSN 1528-9885/CDN Pub Agree#40702530) is published monthly for $24.95 per year 101 TECH FORUM
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
to Nuts & Volts, P.O. Box 15277, North Hollywood, CA 91615 or Station A, P.O. Box 54,Windsor 105 ADVERTISERS INDEX
ON N9A 6J5; cpcreturns@nutsvolts.com

4 May 2007
Full Page.qxd 4/4/2007 2:04 PM Page 5

Link Instruments
PC-Based Test Equipment

Digital Oscilloscopes • 2 Channel Digital Oscilloscope


• 500 MSa/s max single shot rate

NEW! • 1Mpt sample memory


W
250 MSa/S (Dual channel) 512 Kpts
500 MSa/S (Single channel) 1 Mpts
W
• Advanced Triggering
• Only 9 oz and 7” x 3.5” x 1.5”
W

W
• Portable and Battery powered
• USB 2.0
W

.G
• Advanced Math
• FFT Spectrum Analyzer
W

iU
• Priced at only $950
.R

RU
Sa/s
500M 1Mpts
AD

M
iO

EL
SC

E
Windows
.H
Screenshot
A

Logic Analyzers
i2
M

.R
AT

O
• 40 to 160 channels
OR

• up to 500 MSa/s
• Variable Threshold
• 8 External Clocks
UL

• 16 Level Triggering
• up to 512K samples/ch
.H

• USB 2.0 and Parallel Interface


• Pattern Generator option
i2

LA5240 (200MHz, 40CH) $1700


LA5280 (200MHz, 80CH) $2350
.R

LA5540 (500MHz, 40CH) $2500


Windows Screenshot
LA5580 (500MHz, 80CH) $3500
LA55160 (500MHz, 160CH) $7500
O

Link Instruments (973) 808-8990


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

www.Link-instruments.com
May 2007 5
ReadFeed May07.qxd 4/4/2007 3:43 PM Page 6

READER FEEDBACK myriad of special batteries this would


EVERYTHING FOR ELECTRONICS

Published Monthly By
demand quite a variet y of safet y T & L Publications, Inc.
measures built in. Nor was it intended 430 Princeland Ct.
THUMBS UP FOR to be a component tester either. How- Corona, CA 92879-1300
ANEMOMETER ever, the reader has two choices on (951) 371-8497
FAX (951) 371-3052
Just wanted to say I really enjoyed these options: 1) Go to National Semi's
Product Order Line 1-800-783-4624
the article by Michael Simpson on website and download the LM317 data
www.nutsvolts.com
making the anemometer. I don't know sheet. There you will find additional
of any hobbyist who hasn't attempted info on the LM317 as a current source Subscriptions
or at least thought of making a home that you may want to incorporate into Inside US 1-877-525-2539
W
weather system. this design. 2) An outboard constant Outside US 1-818-487-4545
Dan Bacon current source is a very simple circuit P.O. Box 15277
North Hollywood, CA 91615
W
to build requiring one transistor and a
couple of resistors. These options were FOUNDER/ASSOCIATE PUBLISHER
MISSING FEATURES
W

Jack Lemieux
W
deleted from design for several reasons
ON POWER SUPPLY as mentioned in the article: simplicity,
PUBLISHER
W

Robert Reed’s interesting article compactness of size, and personal lack


.G
Larry Lemieux
on a Test Bench Power Supply (March of desire for these options. publisher@nutsvolts.com
W

2007) includes many desirable features As to item two, I don't know if I


iU
ASSOCIATE PUBLISHER/
and a number of clever ideas. I am understand the question correctly, but VP OF SALES/MARKETING
troubled by what I consider to be two the 5 VDC supply is rated for one
.R

Robin Lemieux
RU
fundamental problems: ampere of current and the article states display@nutsvolts.com
1. The inabilit y to adjust the the heat dissipation is well within the
AD

CONTRIBUTING EDITORS
maximum current means you cannot devices range, as verified by actual case
M
Chuck Hellebuyck Phil Davis
use the device to conveniently test temperature measurements, and this Jeff Eckert Ray Marston
Peter Best Michael Simpson
iO

diodes (especially LEDs), or to recharge was with all supplies loaded. In fact, I
EL
David Geer Marvin Mallon
Nicad or similar batteries. have actually run any of the outputs at Paul Verhage Gerard Fonte
2. The unit is not designed for a 1.5 amps for short periods of time Vaughn Martin Ed Driscoll
SC

E
typical use at five volts at near full (15-20 mins.) and experienced no Paul Florian Russ Kincaid
.H
Jon Williams John Stabler
current. The unit will overheat at this problems. Does the reader understand
CIRCULATION DIRECTOR
A

load, and the output voltage will that all devices are heat sinked to
i2
cycle as the regulator goes into and the chassis? I hope this answers the Tracy Kerley
M

subscribe@nutsvolts.com
out of thermal overload (as noted by readers questions satisfactorily.
.R
the author). When working on a Robert Reed SHOW COORDINATOR
AT

circuit on the bench, one does not Audrey Lemieux


O
want to be worrying about the power
ENCLOSURE WEB CONTENT/NV STORE
OR

supply overheating!
I built a dual bench supply in 1966 ENQUIRY Michael Kaudze
sales@nutsvolts.com
(from a 73 Magazine article), which The Test Bench Power Supply
PRODUCTION/GRAPHICS
UL

has both adjustable voltage and article was wonderful, informative, and
Shannon Lemieux
current, and still use it daily. The the photos were of exceptionally high Michele Durant
adjustable current is a feature I simply quality. Many details are included,
.H

could not do without. I’d like to see a but extremely little is said about the ADMINISTRATIVE ASSISTANT
Debbie Stauffacher
follow-up article by this obviously methods to be used in working the
i2

talented author, which adds current aluminum to form the enclosure. In Copyright © 2007 by T & L Publications, Inc.
adjustment (perhaps another LM317) particular, how do you cleanly cut out All Rights Reserved
.R

and better heat control. the rectangular holes for the meters in All advertising is subject to publisher’s approval. We are not
Paddy Johnson the front panel? responsible for mistakes, misprints, or typographical errors.
O

Judy May Nuts & Volts Magazine assumes no responsibility for the
availability or condition of advertised items or for the honesty
Response: Well, let me see. Where do Union, KY of the advertiser. The publisher makes no claims for the legal-
I start? As to item one, current limiting ity of any item advertised in Nuts & Volts. This is the sole
responsibility of the advertiser. Advertisers and their agencies
and constant current were deleted from Response: Well for starters, like most agree to indemnify and protect the publisher from any and all
design for reasons stated in the article. people who lack a machine shop for claims, action, or expense arising from advertising placed in
The supply was not meant to be a metal work, I did it the slow way. For Nuts & Volts. Please send all editorial correspondence, UPS,
overnight mail, and artwork to: 430 Princeland Court, Corona,
battery charging device, as with today's bending the sheet metal, I jury-rigged CA 92879.
6 May 2007 Continued on Page 35
O
.R
i2 .R
O
E .H
EL i2
.H
RU
M UL
iU OR
.G AT
W A M
W SC
W iO
Page 7

AD
9:35 AM

.R
W
1/11/2007

W
W
Full Page.qxd
Tech2007.qxd 3/29/2007 1:23 PM Page 8

TECH

2007
KNOWLEDGEY
EVENTS, ADVANCES, AND NEWS
■ BY JEFF ECKERT
ADVANCED TECHNOLOGY
COATING MAY IMPROVE reflect no light at all. If used in next- on luggage and biomarkers in urine” to
SOLAR CELLS, LEDS generation solar cells, the coating provide an early warning of diseases.
would allow more light and more The device is a compact mass
PHOTO COURTESY OF E. FRED SCHUBERT AND JONG KYU KIM,
RENSSELAER POLYTECHNIC INSTITUTE. wavelengths to pass through the cell spectrometer that is enhanced by a
W
surface, thus improving its efficiency. technique called desorption electro-
The team also expects that the spray ionization (DESI), developed at
W
films can be used to eliminate reflec- Purdue. Whereas conventional mass
tions that reduce light emissions from spectrometers analyze samples that
W

W
LEDs, so upcoming research will focus are loaded into a vacuum chamber,
on solid-state lighting applications. DESI allows an analysis to be
W

performed in air or directly on the


.G
“TRICORDER” REALIZED? sample’s surface. The new device is
W

also much smaller than standard ana-


iU
S ome researchers at Purdue
University (www.purdue.edu)
lyzers, weighing less than 20 lbs, and
does its work in a relatively short time.
.R

RU
recently developed a new instrument For example, the team has used
that they have likened to the infamous the device to analyze clothes, foods,
AD

“tricorder” from Star Trek. My recollec- and tablets, and it can identify
M
tion is that the fictitious device was cocaine on paper money in less than
iO

useful for everything from analyzing one second. It is likely that the device
EL
the chemical makeup of alien brains to will be commercially available soon,
opening cans of intergalactic Vienna as two companies have already been
SC

■ Top: Silica nanorod layers seen with


E
a scanning electron microscope. sausages, so the analogy may be a bit established on the basis of DESI and
.H
Bottom: Antireflective material (left) overstated. However, it is an interesting the portable mass spectrometer.
looks dark in contrast to other coatings.
A

chemical analysis tool that they say has These are Prosolia, Inc. (www.proso
i2
promise for detecting “everything from lia.com), and Griffin Analytical
M

A team from Rensselaer Polytechnic cancer in the liver to explosive residues Technologies LLC (www.griffinanaly
.R
Institute (www.rpi.edu) recently tical.com).
AT

■ Analysis of lipids in rat brain tissue.


reported development of an antireflec- The first (a) is an optical image, and the
COMPUTERS AND
O
tive coating that is said to be at least rest are ion images produced using the
OR

NETWORKING
ten times as effective as substances DESI technique.
currently used on sunglasses and com-
puter monitors. Composed of silica POSSIBLE JPEG
UL

nanorods, it could be used to channel SUCCESSOR


light into solar cells or improve the INTRODUCED
photonic emissions of LEDs.
.H

The coating is produced by a


process that is based on a common F or 15 years or so, you have
probably been working with
i2

method for depositing silica layers onto the familiar JPEG format for
computer chips, but it involves growing digital imaging, especially with
.R

tiers of nanoscale rods that lie at the devices that use a memory
same angle, the precise angle being card for storage. However, if
O

determined by temperature. By laying Microsoft has its way, JPEGs may


down multiple layers at different angles, follow PICT files into obscurity,
the researchers have generated thin being supplanted by their HD
films that can be used to control light. Photo format (formerly known as
It is believed that by creating Windows Media Photo).
layers in the proper configuration, it is The product was formally
IMAGE COURTESY OF
possible to create a film that will ANGEWANDTE CHEMIE. introduced in March, and it is
8 May 2007
Tech2007.qxd 3/29/2007 1:24 PM Page 9

TECHKNOWLEDGEY 20 07

said to offer up to double the the older, slower WiFi capabilities. tachometer, anemometer, humidity
compression efficiency of JPEG with For $149, QuickerTek, Inc. (www. psychrometer, and hygro-thermometer,
fewer damaging artifacts, which quickertek.com), will sell you an all using IR technology.
results in higher quality images that upgrade card or — for $199 — will The thermometers incorporated
are only half as large. In addition, install it for you. into the Extech products feature a
the technology offers increased The cards are made to the same temperature range as low as -58°F
image fidelity, preserving the entire specs as the Apple products and fit (-50°C) to a high of 932°F (500°C),
original image content (i.e., “lossless into the AirPort slot. They work with and a built-in laser pointer allows a
compression”) and enabling improved all 802.11/b/g/n WiFi equipment, user to pinpoint the target area. This is
exposure and color adjustments. including AirPort and AirPort Extreme. particularly useful for small targets and
The format does not seem to have They are compatible with all of the hard-to-reach areas.
generated a great deal of software sup- newer 17-, 20-, and 24-inch iMacs, as The cost isn’t exorbitant, either, so
port so far, but Microsoft has announced well as pre-802.11n MacBooks and you might want to consider the EX470
W
the beta release of a set of HD Photo MacBook Pros, but you’ll need to be multimeter, for example, which sells
plug-ins for Adobe® Photoshop®, devel- running OS X 10.4.8 or later. for about $125. If nothing else, you
W
oped with the help of Adobe Systems, can check the temperature of your
Inc. The plug-ins support both the CS3
CIRCUITS AND beer from across the room with it.
W

W
and CS2 versions of Photoshop software
and will be available for Windows® DEVICES FOUR-IN-ONE MODULE
W

Vista™ and XP, as well as Mac OS X. By INSTRUMENTS INCLUDE


.G
PHOTO COURTESY OF FRONTIER SILICON.
the time you read this, they should be TEMPERATURE
W

available — for free — from MEASUREMENT


iU
www.microsoft.com/downloads.
.R

PHOTO COURTESY OF EXTECH INSTRUMENTS.


RU
ANOTHER NEW SEARCH
ENGINE
AD

M
I f you thought the World Wide Web
iO

had enough search sites, meet


EL
hakia Galleries (www.hakia.com), an
■ The Venice 6 provides four types of
innovative “meaning-based” engine. It
SC

E
audio in one module.
delivers categorized search results
.H
(the galleries) in response to a short
A n interesting new chip from
A

query, providing the equivalent of 10 Frontier Silicon (www.frontier-


i2
search variations. silicon.com) is the Venice 6, billed as
M

The hakia Galleries cover a range the world’s first four-in-one module
.R
of topics, including diseases, company capable of receiving Internet radio,
AT

■ Extech’s meters feature built-in IR


profiles, data about cities and coun- temperature measurement. digital audio broadcasting (DAB), FM,
O
tries, and famous people. Current and music streamed from a PC. It

I
OR

examples of the hakia Galleries (there f you need to, for example, test a integrates a WiFi, DAB, and FM front
are said to be thousands available high-voltage breaker box or make end with an on-board WiFi antenna,
already) include Anna Nicole Smith, physical contact with an active enabling audio manufacturers to build
UL

Pokemon, Tokyo, Red Sox, cancer, electric motor, it can be pretty handy a new generation of versatile radios
chocolate, Vioxx, cello, and George (and a lot safer) if you can first point for the global market.
Washington. And the engine will keep something at the target area and Based on Frontier’s Chorus 2i
.H

getting better, as the coverage of check for hot spots, given that large processor, the device streams radio
hakia Galleries is slated to expand temperature rises may indicate stations and music files in several
i2

continuously throughout 2007 via an problems with motors and circuits. A formats and protocols, including MP3,
automated “distillation” algorithm. noncontact infrared thermometer WMA, and Real Audio. It provides
.R

would do the trick, but who wants to access to over 10,000 Internet radio
802.11N UPGRADES carry around an extra instrument? stations plus a wide selection of
O

AVAILABLE That’s the basic idea behind a podcasts with only a few key presses,
series of test instruments from Extech accessed through a vTuner Internet

If you happen to be the owner of an


Intel-based Mac that was built
before Apple started putting 802.11n
Instruments (www.extech.com). The
company originally introduced a
patented line of digital multimeters
Portal that manages all the stations.
A company representative noted,
“Audio manufacturers want to build
wireless network cards in them, you with the thermometer included, but products that can be used and sold
now have an alternative to living with now also offers a clamp meter, anywhere in the world. With the
May 2007 9
Tech2007.qxd 3/29/2007 1:26 PM Page 10

INDUSTRY AND
structure and galaxy evolution.
Registration will run you $350,
THE PROFESSION which includes a reception, coffee
breaks, lunches, and a poster session
NRAO CELEBRATES reception. Also offered (separately)
50TH is a tour of the NRAO Green
PHOTO COURTESY OF NRAO. Bank, WV, facility, which houses —
among other things — the Robert C.
Byrd Green Bank Telescope (GBT),
said to be the world’s largest fully
steerable single-aperture antenna
(see photo).
W
GATES WINS AGAIN

I
W
n case you were worried about it,
rest assured that Bill Gates has once
W

■ The GBT, located in Green Bank, WV,


W
again come out on top of the Forbes
weighs 16 million pounds, has a magazine (www.forbes.com) list of
W

surface area of 8,000 square meters,


billionaires, with a net worth of $56.0
.G
and is taller than the Statue of Liberty.
billion. Next in line is investment guru

I
W

Warren Buffet, with $52.0 billion, but


iU
n case you weren’t keeping track,
the National Radio Astronomy both are losing ground to Carlos Slim
Helu, a Mexican telecommunications
.R

Observatory (NRAO, www.nrao.edu)


RU
turns 50 this year, and they will be mogul who has $49.0 billion ($19 bil-
observing the occasion at the Science lion more than last year).
AD

Symposium June 18-21. Its official The sad news is that Gates’
M
title is “Frontiers of Astrophysics: A buddy Steve Ballmer dropped in rank-
iO

Celebration of NRAO’s 50th ing from 24th to 31st, although his


EL
Anniversary,” and the event will be holdings actually grew from $13.6 to
held at the Omni Charlottesville Hotel $15 billion. Other heavy-walleted
SC

E
• Over 40,000 in Charlottesville, VA. The scientific folks from the electronics industry
.H
Products program has not been announced as include Oracle’s Larry Ellison ($21.5
Stocked
of this writing, but a downloadable billion), former Microsoft guy Paul
A

i2
• Access to over
1.5 million poster mentions such subjects as Allen ($18 billion), and Michael Dell
M

electronic parts cosmic microwave background, dark ($15.8 billion). Steve Jobs, with a pal-
.R
and related
products energy and dark matter, extreme try $5.7 billion, didn’t even crack the
AT

• Installer/Dealer gravity, and the origin of cosmic top 100. Oh, well.
O
pricing program
OR

• Quotation team, fragmentation of broadcast radio stan- micron pixel, 1/2.5 format sensor is
send us your
quotes for quick dards, this has been a difficult goal to said to offer improved image quality,
response achieve — until Frontier introduced the lower noise, and top-notch color
UL

Venice 6 module.” Indications are that reproduction.


FFRREEEE ! the device will be appearing in radios, The sensor incorporates the com-
CCaattaalloogg! small CD systems, boom boxes, and pany’s PIXELUX technology, which is
.H

call toll free HiFi tuners sometime in July. an architecture that uses pinned pho-
1-800-543-4330 todiodes and a four-transistor shared
i2

refer to or visit 5 MPIXEL SENSOR pixel structure to produce lower noise.


www.mcminone.com/magazine INTRODUCED It also includes charge-domain binning
.R

of multiple pixels on the imaging array

E astman Kodak Co. (www.kodak. for higher sensitivity and 30 frame/sec


O

com) has changed quite a bit from video recording.


the days of Brownie cameras and Plus- The KAC-05010 is now available
X film, and its latest venture into the in samples, with production quantities
digital world takes the form of the to be available at an unspecified time.
KAC-05010 5.0 megapixel CMOS Kodak also offers products for the
image sensor aimed for digital still automotive and industrial imaging
Source Code: NVM49 cameras and mobile phones. The 2.2 markets. NV
10 May 2007
Full Page.qxd 4/4/2007 2:50 PM Page 11

Turn Digital Power


into Real Power
The Microchip name and logo, the Microchip logo and dsPIC are registered trademarks of Microchip Technology Incorporated in the USA and in other countries. dsPICDEM is a trademark of Microchip Technology Incorporated in the U.S.A.

W
W
W and other countries. All other trademarks mentioned herein are property of their respective companies. ©2007, Microchip Technology Inc.

W
W

.G
W

iU
.R

RU
AD

M
Looking to bring the benefits of digital power conversion – including higher
iO

EL
power density, lower cost features and accelerated innovation – to your product?
SC

E
Microchip’s dsPIC® Digital Signal Controllers (DSCs) for Switch Mode Power Supplies (SMPS) and digital power
.H
conversion are designed for applications in AC/DC power supplies, power factor correction, DC/DC converters,
A

uninterruptible power supplies, power inverters, digital lighting and advanced battery chargers.
i2
M

GOING DIGITAL THE EASY WAY!


microchip
.R
Purchase and program your
1. Educate yourself
AT

16-bit dsPIC® DSCs


Learn the technical aspects of digital DIRECT
O
power conversion and SMPS design with and related development tools at.... www.microchipdirect.com

hands-on training and FREE web seminars


OR

High
and low-cost seminars from Microchip. 10-bit, Speed
Flash 2 MSPS PWM Analog
2. Accelerate your development Device Pins (KB) (CH) (CH) Comparators
UL

Speed up your design time with tools


targeting digital power such as the dsPIC30F1010 28 6 6 4 2
dsPICDEM™ Buck Development Board. dsPIC30F2020 28 12 8 8 4
.H

3. Win stuff in our two 16-bit contests! dsPIC30F2023 44 12 12 8 4


ENTER TO WIN development tools, an Visit our web site for more information about new
i2

Apple® iPod® mobile digital media player 16-bit seminars coming to a city near you!
and even your share of $15,000 in cash
.R

prizes! Visit our web site for complete


details.
O

www.microchip.com/SMPS

Microcontrollers • Digital Signal Controllers • Analog • Serial EEPROMs


PersonalRobotics.qxd 4/5/2007 7:20 PM Page 12

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

PARAMETERS ON THE FLY: Part 3


THIS MONTH, I WOULD LIKE TO WRAP UP the design and functioning of the
Hand-Held Console by showing you the completed device and by posting the
W
software online for all to use.
W
T he idea behind this device is about most of the components which EB501 Bluetooth device.
W

W
to allow the changing of those go together to build this device. The You may have noticed that the
variables which are typically used to first of these is, of course, the frame console is no longer white. Jerry —
W

tune or control the robot. For example, which is made out of ‘white board’ who cuts the white board on his
.G
if you have a robot that is designed to and cut on a laser printer. As you can laser (see the Resources sidebar
W

stop four inches from a wall, then you see in Photo 1, there is a hole cut if you need something or this
iU
will probably have a distance sensor for the LCD, a small slot just beneath console cut) — decided to spray
and a variable containing 4 and the bot that for the keypad cable, and a paint it silver. The paint had some
.R

RU
will stop when the distance sensor series of holes for your fingers to get a strange reaction with the white board
matches the variable. However, when good grip. — probably an oil layer — and formed
AD

building your robot you find that due In Photo 2, you can see the an odd textured pattern. I liked it, so
M
to inaccuracies in the distance sensor, front of the console with the LCD I kept it.
iO

your robot actually stops six inches installed and the keypad ‘stuck’ onto Looking at the console from the
EL
from the wall. Typically, the only way to the surface. This particular keypad back in Photo 3, you can see how that
fix this is to edit your code, recompile comes with a self-adhesive back; just various components are arranged. The
SC

E
the program, and download in into the peel off the cover and press in place. LCD is secured in place via screws
.H
robot. You might find you have to do It also has a ribbon cable which plugs through the laser cut holes, however,
A

this many times to get it just right. With directly into the LCD and can the rest of the components are held in
i2
the Hand-Held Console we are build- then be read off the I2C from the place with double-sided tape. There is
M

ing, you will be able to do this on-the- processor board — very simple no real stress on these components
.R
fly, without having to change the code. and easy. Also note on the top left and it saves putting holes through the
AT

the on/off switch and the two white board, especially where the
O
momentary switches for controlling keypad is. The LiPol Battery is held in
PHYSICAL LAYOUT
OR

the functions. Sticking up from the place with Velcro®, allowing removal
In the previous articles, I talked back at the top is the rubber duck for charging.
antenna from the A7 Engineering’s Photo 4 is a quick shot of the
UL

■ PHOTO 1. White board cut out. console being held with


both hands just to test the
usability and position of
.H

the components. Seems


to work very well!
i2

I have been using


two different Bluetooth
.R

modules for this project.


One is the “Embedded
O

Blue” product offered


by Parallax and the other
is the EB501 offered
by A7 Engineering. The
EB501 is a good fit
■ PHOTO 2. Console front
with components installed.
12 May 2007
PersonalRobotics.qxd 4/5/2007 7:22 PM Page 13

PERSONAL ROBOTICS

■ PHOTO 3. Components secured on the ■ PHOTO 4. Test for


back of the console before wiring. console hand fit and
usability.
for the hand-held portion of the
console. However, if you are
using Parallax products (or any
other), the Embedded Blue product
is a great fit for onboard the bot.
Photo 5 shows Parallax’s Embedded
Blue product.

PROTOCOL CODE
W
Last month, I discussed the need
to be able to transmit non ASCII
W
code back and forth and still be
able to wrap the data in a packet. ■ PHOTO 5. Embedded Blue from Parallax.
W

W
To do this, I wrote a couple of
small routines to encapsulate the
W

packets and to place a ‘marker’


.G
byte in front of any byte which would
W

conflict with the start and end of


iU
the packet. added to the
The sendPacket routine is the simpler of the two and bot, as well as
.R

RU
places a header, marker bytes, and trailer in the packet. the console. The
Figure 1 shows this simple piece of code. protocol portions
AD

The code to receive the data is slightly more are symmetrical, however, layered on top of the protocol is
M
complicated because we need to wait for the beginning code that makes the bot respond to the console and, of
iO

of a packet — ignoring everything else — check for course, the console respond to the user and to the bot.
EL
marker bytes and then wait for the end of
the packet, storing everything in between. In ■ FIGURE 2. Code to
SC

E
addition, we only want to wait a finite time. wait for a packet, timing
.H
Consequently, we want to pass a parameter out if not received.
A

to use as a ‘time out.’ In other words: “Go


i2
get me a packet, but if you don’t get one in
M

say, two seconds, just come back.” Check


.R
out Figure 2. Allowing the process to time
AT

out like this will safeguard us against noise


O
or the bot switching off or getting out of
OR

range, etc.

OPERATION
UL

As discussed in the previous months,


the protocol portions of code must be
.H
i2
.R
O

■ FIGURE 1. Code
to packetize the
data.
May 2007 13
PersonalRobotics.qxd 4/5/2007 7:23 PM Page 14

■ PHOTO 7. Console indicating it is


ready and the number of parameters ■ PHOTO 8. Console displaying an
W
■ PHOTO 6. Console searching for a bot. uploaded. uploaded float parameter.
W
When the console is first
switched on, its first function is to
W

W
search for the bot. It does this by
having the Bluetooth module look for
W

the address of the bot which I have


.G
currently hard coded in. Future
W

versions should display the addresses


iU
of bots found and let you choose
from the list.
.R

RU
Having found the bot, the
console requests that the bot
AD

respond with the list of parameters.


M
At this point, the console displays
iO

the name of the bot associated with ■ PHOTO 9. Console displaying an ■ PHOTO 11. Console confirming
EL
the address (the Bluetooth modules uploaded int parameter. parameter change.
allow you to change their ‘name’)
SC

E
and the number of parameters ■ PHOTO 10. Console
RESOURCES
.H
uploaded. See Photo 7. ready for input.
■ Matrix Orbital LCD —
A

The parameter information that


i2
www.matrixorbital.com
we are currently maintaining is:
M

• Parameter name ■ EmbeddedBlue —


.R
• Parameter type (i.e., int, float) www.parallax.com
AT

• Default value ■ EmbeddedBlue —


O
• Current value www.a7eng.com
OR

By toggling the first momentary ■ FreeRTOS — www.freertos.org/


switch, the console is designed to ■ WinAVR — http://winavr.source
UL

scroll through all of the uploaded forge.net/


parameters displaying the above When the bot responds that the
■ AVRstudio —
details of each, as shown in Photo 8. change is complete, the console
.H

www.atmel.com/dyn/products/tools
Toggling the first switch switches to displays the final message of the series _card.asp?tool_id=2725
the next parameter and then by confirming the edit. See Photo 11.
i2

toggling the second momentary So, that’s it. Using the console, ■ Rutherford Robotics can laser-cut
the console for you — http://ruther
switch, the console will allow the user you can flip through the various
.R

ford-robotics.com/laser.html
to change the value of the parameter parameters you have set up to allow
currently displayed. Please see Photos modification and change them on-the- ■ Parallax — www.parallax.com
O

9 and 10. fly. This is not designed to remotely ■ Phil Davis — phild2@charter.net
The user now has the ability to control your robot, but rather to make
key a new value using the keypad and, it easier to program and set up. useful tools I have developed for my
when complete, toggles the second personal robots. It has the potential
momentary switch again. This tells the to save lots of time in the future and
console to send the changed parame-
SUMMARY certainly makes it easier to fine-tune
ter to the bot and wait for a response. I think this is one of the more your robots behavior. NV
14 May 2007
O
.R
i2 .R
O
E .H
EL i2
.H
RU
M UL
iU OR
.G AT
W A M
W SC
W iO
Page 15

AD
.R
2:57 PM

W
4/4/2007

W
W
Full Page.qxd
NutNVolt200705.qxd 4/4/2007 3:03 PM Page 16

Providing The Neatest Electronic Mini-Kits...


Products... The Building Blocks!
FOR OVER 3 DECADES! Tickle-Stick
The kit has a pulsing 80 volt
tickle output and a mischie-
Passive Air Band vous blinking LED. And who
Aircraft Monitor can resist a blinking light! Great
✔ Monitors the entire aircraft band without tuning! fun for your desk, “Hey, I told you not to touch!”
✔ Passive design, can be used on aircraft, no local Runs on 3-6 VDC
oscillator, generates and creates no interference! TS4 Tickle Stick Kit $12.95
✔ Great for air shows
✔ Patented circuit and design! Super Snoop Amplifier
For decades we have been known for our novel and creative product designs. Super sensitive amplifier that will
Well, check this one out! An aircraft receiver that receives all nearby traffic without pick up a pin drop at 15 feet! Full
any tuning. It gets better... there is no local oscillator so it doesn't produce, and 2 watts output. Makes a great “big
can't produce, any interference associated with all other receivers with an LO. That ear” microphone. Runs on 6-15 VDC
means you can use it onboard aircraft as a passive device! And what will you hear? BN9 Super Snoop Amp Kit $9.95
The closest and strongest traffic, mainly, the plane you're sitting in! How unique is
this? We have a patent on it, and that says it all!
Dripping Faucet
W
This broadband radio monitors transmissions over the entire aircraft band of 118- Produces a very pleasant, but
136 MHz. The way it works is simple. Strongest man wins! The strongest signal obnoxious, repetitive “plink, plink”
within the pass band of the radio will be heard. And unlike the FM capture effect, sound! Learn how a simple transistor
W
multiple aircraft signals will be heard simultaneously with the strongest one the oscillator and a 555 timer can make such
loudest! And that means the aircraft closest to you, and the towers closest to you! a sound! Runs on 4-9 VDC.
All without any tuning or looking up frequencies! So, where would this come
W

in handy? EDF1 Dripping Faucet Kit $9.95


W
1. At an air show! Just imagine listening to all the traffic as it happens LED Blinky
2. Onboard aircraft to listen to that aircraft and associated control towers
W

.G
3. Private pilots to monitor ATIS and other field traffic during preflight Our #1 Mini-Kit for 31 years!
activities (saves Hobbs time!) Alternately flashes two jumbo red
4. Commercial pilots to monitor ATIS and other field traffic as needed at LED’s. Great for signs, name badges,
W

their convenience model railroading, and more. Runs on 3-15 VDC.


iU
SPECIFICATIONS
5. General aircraft monitoring enthusiasts BL1 LED Blinky Kit $7.95
Frequency Range: 118 MHz to 136 MHz
Wait, you can't use a radio receiver onboard aircraft Receiver Type: Patented Passive Detector
.R

Cricket Sensor
RU
because they contain a local oscillator that could gen- IF Frequencies: None!
erate interfering signals! Receiver Sensitivity: Less than 2 uV for detectable Senses temperature and
audio changes the chirp according-
AD

We have you covered on that one. The ABM1 has no Audio Output: 700mW, 8-24 ohms ly. Can actually determine
local oscillator, it doesn't, can't, and won't generate Headphone Jack: 3.5mm stereo phone temp by chirps! Runs on
M
any RF whatsoever! That's why our patent abstract is External Antenna: Headphone cord coupled 9VDC battery. Speaker included.
titled "Aircraft band radio receiver which does not radi- Power Requirement: 9VDC battery
ate interfering signals". It doesn't get any plainer than ECS1 Cricket Sensor Kit $24.95
Dimensions: 2.25” x 2.8” PC Board
iO

EL
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
Electronic Siren
Produces the upward and down-
SC

E
ABM1 Passive Air Band Monitor Kit $89.95 ward wail of a police siren.
ABM1WT Passive Air Band Monitor, Factory Assembled & Tested $159.95 Produces 5W output, and will drive
.H
any speaker! Runs on 6-12 VDC.
SM3 Electronic Siren Kit $7.95
Digital Tuned High Performance
A

i2
Aircraft Band Receiver Universal Timer
✔ Rock solid dual conversion PLL receiver!
M

Build anything from a time delay


✔ Airport runway lighting controller output! to an audio oscillator using the
.R
✔ 4 user memory scanner banks, 20 freq’s each versatile 555 timer chip! Comes
✔ Full band scanner with skip and skip/timer modes
AT

with lots of application ideas. Runs on


✔ Internal front panel speaker 5-15 VDC.
✔ External antenna input, speaker out, headphone out
O
✔ Stylish and shielded black metal enclosure UT5 Universal Timer Kit $9.95
✔ Available as a hobby kit or factory assembled & tested
OR

Professional features at a hobbyist price! To begin with, we designed it with the Voice Switch
latest technology, utilizing a rock stable synthesized PLL dual conversion receiver. We gave it Voice activated (VOX) provides a
superb image and adjacent channel rejection to allow you to lock onto the signals you want and not to be switched output when it hears a
bothered by those you don’t! SPECIFICATIONS sound. Great for a hands free PTT
UL

Frequency Range: 117.975 MHz to 137.000 MHz


switch, or to turn on a recorder or light! Runs on
Once we got the RF portion designed we took a close 6-12 VDC and drives a 100 mA load.
25kHz steps
look at the features desired in such a receiver. We VS1 Voice Switch Kit $9.95
gave it a neat 2x8 line LCD display to show you all the Receiver Type: Dual Conversion PLL
.H

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 Tone Encoder/Decoder
LCD display. On/Off/Volume and Squelch controls are Image Rejection: Greater than -80 dB
Encodes OR decodes any tone 40
also provided on the front panel. We even gave it a Adjacent Ch. Rejection: Greater than -40dB
i2

Hz to 5KHz! Add a small cap and it


front panel speaker in case you stack the lighting con- Scanner Banks: 4, 20 frequencies each will go as low as 10 Hz! Tunable with
troller or something else on top of it! So far we’ve Audio Output: 1 watt, 8 ohms a precision 20 turn pot. Runs on 5-12 VDC and
described the ultimate aircraft receiver that’s not only Light Controller Output: 3 events, 5 events, 7 events will drive any load up to100 mA.
.R

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
TD1 Encoder/Decoder Kit $9.95
any better than that? It sure can! External Antenna: BNC female, rear panel
O

Dimensions: 5.55”W x 6.45”D x 1.5” H RF Preamplifier


The top request we’ve had for a professional aircraft
receiver was to embed automatic runway lighting con- Super broadband preamp from
trol. Consider it done! The lighting controller follows the standard protocol for remote runway lighting. The 100 KHz to 1000 MHz! Gain is
pilot “keys” his microphone on the local CTAF channel for the specified number of times. All you need to do is greater than 20dB while noise is less
set the receiver for the lighting control mode, then make sure the squelch is closed and will open on a suitably than 4dB! 50-75 ohm input. Runs on 12-15 VDC.
strong signal. Typically the number of “keys” or “events” according to the receiver control the lighting as fol- SA7 RF Preamp Kit $19.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- Touch Switch
ing controller are also available factory assembled and tested, ready to go. Just plug it in and you’re all set. Touch on, touch off, or momentary
AR2 Synthesized Aircraft Receiver Kit With Case & AC Power Supply $199.95 touch hold, your choice! Uses CMOS
AR2WT Factory Assembled & Tested AR2 Synthesized Aircraft Receiver $269.95 technology. Runs on 6-12 VDC and drives any
AR2L Plug-In Runway Lighting Controller Interface Kit With Case & AC Power Supply $59.95 load up to 100 mA.
AR2LWT Factory Assembled & Tested AR2L Runway Light Controller $99.95 TS1 Touch Switch Kit $9.95
NutNVolt200705.qxd 4/4/2007 3:07 PM Page 17

Some Of The Hottest Items... Personal Practice


Guitar Amplifier & DI
Are Our Coolest Kits!!
“Tone Grabber” Stereo Headphone Amp “Rat Blaster”

✔ Practice your guitar or


base without
disturbing others!
Grab those numbers dialed! The next generation! Get rid of those pests! ✔ Standard ¼” guitar audio
plug input
Whether it’s dialed numbers, Next generation of our world Our famous “Rat Blaster” gets rid ✔ CD/MP3 player audio
repeater codes, or any other famous SHA1! Provides super of your pests with a blast of ultra headphone input to
Touch Tone tones, you can read quality headphone level output high frequency sound! It doesn’t practice to your favorite music!
them from any audio circuit! 8 with bass, treble, balance, and bother you, but it drives them ✔ Switchable base boost!
digit display stores and displays loudness controls from the line nuts! Can be built into a wall or ✔ Great as a DI to your home stereo amplifier!
captured data. Standard RJ11 output of your audio source. A barn or order the matching case. ✔ Uses standard 9V battery
and audio imputs. 12VDC input. favorite for the audiophiles! ✔ Includes guitar strap/belt clip case!
RB1 Pest Repeller Kit 59.95
TG2C Tone Grabber Kit 69.95 SHA2 Headphone Amp Kit 44.95 CRB Matching Case Set 39.95
W
So you're a guitar musician, and you live in an apart-
ment...what else needs to be said! You would love to
ECG Heart Monitor Stepper Motor Driver DC Motor Controller plug into your 100 watt HiWatt (my favorite brand!)
amplifier and let it crank, but the neighbors probably
W
wouldn't share your enthusiasm! The PGA1 was
designed to give you hours of enjoyment playing your
favorite electric guitar while isolating your family, friends,
W

W
and neighbors from your music and your passion. (I still
use the original engineering prototype with my SG with
P90’s!)
W

.G
Check your own heart! Control those steppers! Full power, any speed! Whether you use an electric, acoustic electric, or bass gui-
tar, the PGA1 gives you an adjustable volume output to
Provides a visible and audible dis- Build an accurate positioner, X-Y Real pulse width modulation your favorite headphones. Unlike a lot of practice amps,
W

play of your heart rhythm! controller, plotter or even a robot! accurately smoothly controls DC
iU
the PGA1 has a special bass boost to enhance bass guitar
Variable gain, bright “beat” LED, Stepper motors are a dime a motors speed while maintaining use. One practice amp for all your guitars! If you want
and monitor output for display on dozen but controlling them is full torque! Controls DC motors to practice to your favorite music, the PGA1 has a stan-
your scope. Just like the lab! Re- another story. We’ve got that from 3-50V up to 10 amps! Runs dard style audio input to play to your favorite music! Just
.R

RU
usable sensors are included. solved with the popular SMD1C. on 9-15VDC. Order our AC125 plug in your Walkman style CD player, MP3 player, or
Runs on a safe 9VDC battery. Drives any stepper 5-15V. power adapter. even the headphone output on your mixer board and
you'll hear both your music source and your guitar in
AD

ECG1C ECG/EKG Kit 44.95 SMD1C Stepper Driver Kit 34.95 MSC1C Motor Control Kit 34.95
your headphones!
M
20W SubMini Audio Amp Solar Vehicle Charger Code Practice Oscillator The PGA1 uses a powerful LM386 power amplifier to
provide one watt of power to your headphones, or even
a small speaker! It gets even better...use the PGA1 as a
iO

EL
cheap and easy direct inserter box to match your guitar
into an aux input of a stereo receiver amplifier or PA
amplifier! It sounds GREAT! A standard ¼" audio input
SC

connector is used for your guitar input, matching your


E
standard guitar cables. A top mounted on/off/volume
.H
control adjusts the headphone output level through the
20 watts and no heat! Keep your battery charged! Learn the code! full range. The small belt clip pocket size device runs on
a standard 9V battery (not included). A LED indicates
A

Delivers a super clean 20W out- Keep that parked car’s battery We took the ever popular code power-on and relative battery condition. The attractive
i2
put from one SMT package! Ultra charged! Great for extended practice oscillator and made a compact case measures 4.5"H x 2.7"W x 1.1"D.
efficient class D design produces parking at airports, and seasonal simple easy to build kit as a “first
M

no heat. PCB can be snapped cars. Plugs into the cigarette kit” for the Scouts and radio Available in a kit form to “learn as you build” or factory
into a small circle for special lighter jack and includes clubs. A built-in key is included
.R
assembled and tested to get playing right out of the box!
applications. Runs on 18VDC for dash/windshield mounts and bat- and features a tone adjustment.
AT

rated output, use our SPS18 PS. tery clamps. Fully assembled. Runs on a standard 9V battery. PGA1 Personal Practice Guitar Amp Kit $64.95
O
UAM2 20W SMT Amp Kit 34.95 SOL5N Solar Charger 26.95 CPO3 Code Practice Kit 14.95 PGA1WT PGA1 Factory Asmb & Tested $99.95
OR

Did You Know... ✔ It’s impossible to give you full specs on these products MORE than just friendly on-line ordering!
UL

in a 1” space!
✔ A lot of our kits are also available “factory assembled Clearance Specials, Ramsey Museum, User Forums, Dealer Information, FAQ’s, FCC
and tested”, if you don’t want to build them! Info, Kit Building Guides, Downloads, Live Weather, Live Webcams, and much more!
✔ We have over 350 products currently available, and
all those don’t fit here!
.H

The Solution! www.ramseykits.com


i2

Visit www.ramseykits.com
Free Giveaways and ALL the
800-446-2295
.R

information you ever needed!


O

Get The Catalog! Where


Electronics


Build It!
Learn It!
590 Fishers Station Drive
Get the brand new 2007 Ramsey Hobby
Victor, NY 14564 Is Always ✦ Achieve It!
Catalog! 96 value packed pages of the Fun!
(800) 446-2295 ✦ Enjoy It!
neatest goodies around! Order yours (585) 924-4560
on-line today or give us a call! Or Prices, availability, and specifications are subject to change. Not responsible for typos, stupids,
printer’s bleed, or migraine headaches. Robin needed the ad copy early this month... What’s up
with that! Visit www.ramseykits.com for the latest pricing, specials, terms and conditions.
download the PDF at www.ramseykits.com. Copyright 2007 Ramsey Electronics, LLC...so there!
Stamp.qxd 3/29/2007 2:21 PM Page 18

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

CONTROL VIRTUALLY ANYTHING ...


VIRTUALLY
W
WHEN THE SX MICROCONTROLLER was developed, the core philosophy was
W
to create a chip fast enough and clean enough that most specialized peripherals
W

could be made “virtual,” that is, created in code. And when SX/B was developed,
W
the core philosophy was to create a compiler with such clean output that it could
W

.G
be used as a self-teaching guide for those wanting to learn assembly language.
It may have taken me a while to catch on to the assembly stuff, but I think
W

iU
these promises have been met, and this month’s project brings them together
.R

RU
into a neat little device that just might save an old PC from the junk pile.
AD

I think that most regular readers bawdy, adult humor; the kind of stuff what I did. In the process, my goal is
M
know I’m an actor (see www.jon that South Park is made of — and to show you how to combine virtual
iO

mcphalen.com) which means I have a made famous for. peripherals (VPs) when you have a
EL
built-in interest in the movie business. And no, my reaction was not, project than needs more than one
And as much as I enjoy my work in “Hey, I want to do raunchy comedy!” It and, especially, when those VPs must
SC

E
front of the camera, I also love was, “Hey, I want to build a [small] run at different rates.
.H
working with the myriad technical animatronics control system.” If you’ve
A

magicians behind the scenes. Because seen Team America, you know that all
THE SPECS, PLEASE ...
i2
of this, a DVD purchase for me is of the characters are puppets —
M

usually based more on the “extras” marionettes, in fact. What you may not As always, it’s best to know where
.R
material than the movie itself. When I know is that inside each of the puppet’s we’re going before we start on the
AT

was young, my parents had hoped heads were nine mini servos to control journey. The goal for this project was
O
that learning the secrets of Hollywood the facial movement. Imagine that: The to have a PC-driven controller board
OR

movie-making would dissuade me puppet heads were a bit smaller than that could manage eight digital
from my desire to act when, in fact, it the size of a softball and yet they outputs and eight standard servos.
had quite the opposite effect. A tour held nine servos! Servo control was The digital outputs would be buffered
UL

of Paramount Studios when I was a done through a piece of specialized by a ULN2803 so that they can drive
teenager sealed the deal for me and software, originated by Gilderfluke (the lamps, relays, and other moderate-
I’ve known all my life that some how, provider of the servo controllers) and current devices. The servos will be the
.H

some way, I would be involved with heavily modified by the production standard hobby type and will be
movies and television. crew for that enabled real-time control refreshed every 20 milliseconds.
i2

The truth is that unless a movie is when required. In my opinion, the Based on these specifications, the
just horrible, I can completely lose Team America puppets and their hardware design is really simple, and
.R

myself in it and shut off that portion of control demonstrate the tremendous that’s a good thing. This board
my brain that knows how it was done. skills of the craftspeople and engineers becomes somewhat generic and a
O

This goes for all movies — even those at The Chiodo Brothers CBFX unit. change of code gives it a change of
without people. One of those movies So, I have had for some time now personality — always a useful trait in a
that caused me to have a, “I want to the desire to build a small animatron- microcontroller circuit. As you can see
do that ...” reaction was Team ics control board that I could run from in Figures 1 and 2, we have a power
America. Now, this kind of movie is a PC — and I have finally got past a supply, an SX28, a simple RS-232
not for everybody; Matt Stone and learning curve with the SX and done interface, and the ULN — nothing to it.
Trey Parker are well known for their it. This month, I’m going to show you And due to the small parts count, the
18 May 2007
Stamp.qxd 3/29/2007 2:21 PM Page 19

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

project fits very comfortably on


an ExpressPCB mini-board.

CRACKING THE CODE


The real challenge with this
project is the code, probably the
most sophisticated that I’ve pre-
sented in this column. I promise
you, though, that after you’ve
spent a bit of time with it, you
will reach that comfort zone —
something I hit within the last
W
month or two — where mixing SX
VPs is no longer a big mystery;
W
it’s simply a bit of work to do like
anything else.
W

W
Having spent some time
with other control protocols
W

lately, specifically LANC and


.G
DMX512, I decided to take a
page from those books and ■ FIGURE 1. Processor schematic.
W

iU
create a protocol for this project
that uses a break in the control transmission as the that will work and we know that our serial data is going to
.R

RU
synchronizing point. The idea is dirt simple: synchronization be solid as we’re actually sampling the receive line twice as
of the packet is achieved by leaving the receive line into the frequently as we need to.
AD

controller idle for at least two byte periods. After that, we In review, we’re going to set the ISR rate to 3.255
M
will expect a nine byte packet; the first byte contains the microseconds and have the serial routines divide that by
iO

state of the digital outputs and the eight bytes that follow eight for proper bit timing, and the servo routine will divide
EL
are the position values for the servos. Figure 3 illustrates the ISR by three to derive its base timing of approximately
the control packet. 10 microseconds. The ISR does a couple other things, too;
SC

E
That all sounds pretty easy, right? It is, mostly, but things here is the list, in order of appearance:
.H
get a little tricky when we start to look deeper into the
A

timing details. The packet structure and code on both ends • Process the delay timer (if running).
i2
is kept clean by using byte values for the servos, suggesting • Update the packet sync timer.
M

that we’d use a BS1-compatible, 10-microsecond resolution • Receive a serial byte.


.R
for servo position. This means, then, that in order to receive • Transmit a serial byte.
AT

the packet while maintaining the servo positions we’d • Refresh the servos.
O
like to have an ISR rate that is 10 microseconds or a nice
OR

fraction thereof. Since most of the work for this project is done in the
And there’s the rub ... You see, we really need to put ISR, that’s were we’ll focus our discussion. Here we go ...
detail into the bit timing of the virtual UARTs so that we
UL

have reliable communications. I decided on a maximum ‘ ————————————————————————————


INTERRUPT NOPRESERVE 307_200
data rate of 38.4K baud so that the level shifter circuitry
‘ ————————————————————————————
could be removed and I could control this with a BS2. At
.H

38.4K, the bit time is 26.042 microseconds. But remember, Update_Delay_Timer:


we need to sample the receive line at least four times per IF tix <> 0 THEN
i2

bit period so that means we need to set the ISR period to DEC tix
ENDIF
6.51 microseconds.
.R

You can see the problem: 6.51 microseconds is quite a Check_Sync_Timer:


long way from the 10 microsecond unit value we want for INC syncTimer
O

servo control, and doesn’t divide evenly into it. What do we IF syncTimer > SyncCount THEN
armed = Yes
do? Well, if we divide the bit period by eight, we get 3.255 syncTimer = 0
microseconds, and that multiplied by three is 9.766 microsec- ENDIF
onds, which is very close to the 10 we’re looking for — we
can live with that. This means, then, that to get the servo The interrupt is declared with a rate of 307,200 times
centered (at 1,500 microseconds) we will use a position value per second; this gives us a period of 3.255 microseconds.
of 154 which actually gives us 1504 microseconds; I’d say And as the SX/B code used in the interrupt doesn’t use any
May 2007 19
Stamp.qxd 3/29/2007 2:22 PM Page 20

of the compiler’s __PARAMx variables, we can use the sampled and the bit timer reloaded with one bit
NOPRESERVE keyword so that those variables — which period. After all bits have been received, the rxReady flag bit
aren’t changed during the ISR — are not saved and restored; is set and the armed flag and packet sync timer are reset.
this just wastes time if we don’t need it to happen.
Receive:
The first VP encountered decrements the delay timer if
ASM
it’s running. Remember, PAUSE will not work properly with JB rxReady, RX_Done
the ISR so we’ll have to use a custom subroutine to handle BANK serial
that — we’ve done that in the last couple projects so I’m MOVB C, RX
sure it’s old hat by now. TEST rxCount
JNZ RX_Bit
Next up is the sync timer. It will be incremented each MOV W, #9
time through the ISR and if it goes past the required idle SC
time bit count (20), a flag will be set that will allow the MOV rxCount, W
foreground process to receive serial data. What you’ll see MOV rxDivide, #Baud1x5
W
up ahead is that this flag and its control timer get cleared at RX_Bit:
the end of a received byte; this forces the program to ignore DJNZ rxDivide, RX_Done
W
serial data for two byte periods after the last packet byte has MOV rxDivide, #Baud1x0
been received. DEC rxCount
W

SZ
W
And now for the receive UART. We’ve actually used RR rxByte
this code a couple times before (see the serial seven- JNZ RX_Done
W

segment display project from January 05 for a detailed


.G
SETB rxReady
description). Briefly, the receive line is sampled until a CLRB armed
CLR syncTimer
W

start bit is detected. When this happens, the receive


iU
bit counter is loaded and the timer decremented. When RX_Done:
the start bit timer (which is 1.5 bits long so that sampling
.R

BANK 0
RU
starts in the middle of the first bit) expires, the line is ENDASM
AD

For those who might be new


M
to SX/B, you can see how easily
iO

assembly code is integrated


EL
into the program through the
ASM..ENDASM block. And to
SC

E
be honest, I didn’t create this
.H
code; I “liberated” it from Al
A

Williams’ SX programming book


i2
Exploring the SX Microcontroller
M

(available as a free PDF from


.R
Parallax). As good as SX/B is, there
AT

will be times when inserting some


O
assembly code will be the best
OR

development choice — it’s nice


that SX/B makes it so easy.
Another great source of assembly
UL

routines is Günther Daubach’s


excellent book Programming the
SX Microcontroller. And don’t
.H

forget James Newton’s SX List


(www.sxlist.com).
i2

Next up is the transmit UART,


something we haven’t used in
.R

the past, but as with the receive


UART, this was lifted right out of Al’s
O

■ FIGURE 2. book.
Outputs schematic.

■ FIGURE 3. Control packet.


20 May 2007
Stamp.qxd 3/29/2007 2:23 PM Page 21

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

Transmit: high-level SX/B that looked like this:


ASM
BANK serial Test_Servo_Tix:
TEST txCount INC svoTix
JZ TX_Done IF svoTix < 3 THEN ISR_Exit
DEC txDivide svoTix = 0
JNZ TX_Done
MOV txDivide, #Baud1x0
STC So why bother converting to assembly? Because I
RR txHi want to learn and get comfortable with assembly, and the
RR txLo best way is by exploring good examples — starting with
DEC txCount
simple stuff. If you look at the list file output of one of
MOVB TX, txLo.6
your programs (press Ctrl-L in the SX-Key IDE), you will
TX_Done: see how your SX/B code is translated into assembly. In
W
BANK 0 fact, the entire servo processing section started that way;
ENDASM I took the assembly output from the compiler, trimmed
W
the few extra bits (that the compiler uses for safety), and
You can see that the transmit code is somewhat simpler used it in the program. Doing this forced me to crack
W

W
that the receive code — the reason is that it’s not waiting on open the SX book and look up instructions so that I could
anything, it’s just doing something. To transmit a byte, we’ll really understand what’s going on. There will come a time
W

load the byte to send into txHi (the output buffer) and set when we have really critical timing requirements and
.G
the bit count, txCount, to 10; we have one start bit, eight using assembly is going to be the way to get there.
W

data bits, and one stop bit. Of course, we don’t want The reason SX/B provides such a clean output is so that
iU
to try to send a byte when we’re in the middle of another, folks like us can learn from it, and for me that promise is
so we’ll check to make sure txCount is zero before sending holding true.
.R

RU
a new byte.
After enabling the transmitter, a start bit is placed on Okay, back to the servo stuff ...
AD

the line and then the bits are sent out, at the specified
M
baud rate, LSB to MSB. You can see the RR (rotate Here’s how the servo processing works. At the
iO

right) instructions in the code that shift the bits of the expiration of a 20 millisecond timer, the first servo,
EL
transmitted byte out one at a time. Note that the STC (set svoFrame, is started and the pulse timer, svoTimer, is
carry) instruction precedes the buffer rotation; what this loaded with the servo value. On subsequent passes
SC

E
does is pad the end of the shifted data byte with 1s so that through the code, the servo pulse timer is decremented.
.H
we have a valid stop bit. If, for example, we wanted to have When that timer expires, the next servo is started and the
A

two stop bits, the only change we’d need to make is to set servo timer value is reset to the appropriate value. After
i2
txCount to 11. the eighth servo is finished, nothing happens until the 20
M

What may not be apparent is that the program can millisecond frame timer expires and the process starts
.R
receive and transmit bytes at the same time because our again. Figure 4 shows what the servo outputs look like in
AT

circuit uses separate RX and TX pins. Yes, you can use the action and in relationship to the frame timer. As you can
O
same pin, but you’ll have to add a bit of check logic in see, only one output is on at a time — this means we only
OR

the TX_BYTE subroutine to make sure that we’re not in need one active servo timer, so this significantly simplifies
the middle of receiving a byte when we want to transmit the program.
one — other than the RX/TX pin definition(s), the ISR code Okay, here’s the bit that handles the frame timer; in this
UL

remains the same. code, you can see that when it expires the first servo port
Okay, now for the really fun bit: the code that handles is enabled and the servo timer is loaded with the Servo 1
the servo control. First things first: We have to divide the ISR timing value.
.H

period by three to get the base servo timing. It’s easier than
you think: Check_Frame_Timer:
i2

CJNE svoFrame_LSB, #0, Update_Frame_Timer


Test_Servo_Tix: CJNE svoFrame_MSB, #0, Update_Frame_Timer
.R

ASM MOV svoFrame_LSB, #2048 & 255


BANK svoData MOV svoFrame_MSB, #2048 >> 8
O

INC svoTix MOV svoPin, #%00000001


CJB svoTix, #3, ISR_Exit CLR svoIdx
CLR svoTix MOV FSR, #pos
MOV svoTimer, IND
JMP Refesh_Servo_Outs
All we have to do is count up to three and execute
the rest of the servo management code when we get Update_Frame_Timer:
there, otherwise we jump to the exit point of the ISR. SUB svoFrame_LSB, #1
Let me share a secret with you ... this bit of code started as SUBB svoFrame_MSB, /C
May 2007 21
Stamp.qxd 3/29/2007 2:23 PM Page 22

Two things of note: 1) We use a value of 2048 for the port (RB, in this case). It is necessary to clear the carry bit
frame as our effective rate is 9.765 microseconds, and 2) before the RL instruction so that previous servo ports get
By devoting the eight contiguous bits for the servos, the turned off.
control and updating of outputs is made very simple. Here’s Whew ... we have just done a whole lot of work in
how it works: the ISR. The payoff? Look how simple the foreground
program is:
Check_Servo_Timer:
TEST svoPin
SNZ Start:
JMP ISR_Exit Outs = %00000000
DEC svoTimer FOR idx = 0 TO 7
SZ pos(idx) = 154
JMP ISR_Exit NEXT

TX = 1
W
Reload_Servo_Timer:
INC svoIdx DELAY_MS 2
CLRB svoidx.3
W
MOV W, #pos Main:
ADD W, svoIdx IF armed = No THEN Main
W

Outs = RX_BYTE
W
MOV FSR, W
MOV svoTimer, IND
FOR idx = 0 TO 7
W

.G
Select_Next_Servo: IF armed = Yes THEN EXIT
CLC pos(idx) = RX_BYTE
W

NEXT
iU
RL svoPin

Refesh_Servo_Outs: GOTO Main


.R

RU
MOV ServoCtrl, svoPin
At Start, we clear the outputs and center the servos,
AD

ISR_Exit:
set the TX pin and let it idle so that the receiver doesn’t get
M
BANK 0
ENDASM any junk, and then wait for bytes to come in. Again, we
iO

don’t want to receive anything unless there has been a


EL
RETURNINT
valid idle period. When this has happened, the armed bit
The TEST instruction lets us check a variable for zero — will be set. Note that the servo position values are
SC

E
so we look at the active servo pin control value, svoPin. If received in a loop with a recheck of the armed
.H
no servos are running, then it will be zero and the routine flag between each; what this does is allow the program
A

will exit. Otherwise, we can decrement the timer for the to escape from that loop if the packet transmission gets
i2
servo that is presently running. interrupted.
M

When the timer expires, we increment the servo


.R
index pointer (keeping it in the range 0..7) and reload the
CONSTRUCTION NOTES
AT

timer for the newly-selected servo. By doing a left


O
shift (RL) on the servo control value, the next servo is As with the past few projects, I used ExpressSCH for
OR

activated when we write that value to the physical control the schematic and created the board with its companion,
ExpressPCB. Please, please, please ... don’t think you
■ FIGURE 4. Servo pulse outputs. can do boards manually anymore. ExpressSCH will let
UL

■ FIGURE 5. Animatronics controller PCB.


.H
i2
.R
O

22 May 2007
Stamp.qxd 3/29/2007 2:24 PM Page 23

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

you check for gross errors and between the top pads.
ExpressPCB will link to your
schematic to show you what
connects to what. This is a huge
TESTING THE
timesaver and way to prevent ANIMATRONICS
headaches. A friend of my recently CONTROLLER
skipped the link step and created a
board manually — and then ended up To test the unit, I wrote
sorry for it as he had problems with a simple Visual Basic program,
that board. as shown in
■ FIGURE 6.
One of the latest features of the source code Animatronics
ExpressPCB is the ability to add included in the controller.
a flooded plane to the top or
W
bottom layer of the board. I decided
to use this for ground instead of
W
running traces. When you make
your own boards, it’s usually best
W

W
to lay out the components and
other traces first, then add in Easy Ordering In Nanoseconds
W

the flooded plane. To connect a


.G
component to my ground plane, I
W

had to right-click on the pad, then


iU
select Bottom Layer Pad Shape, then
select the connection type; I used
.R

RU
Thermal Pad to Filled Plane. For
vias that are not soldered, you
AD

could select a solid connection to


M
the plane.
iO

As Figure 5 shows, the plane


EL
goes everywhere except where
there are traces and pads and
SC

E
where you explicitly tell it not to be
.H
(I removed a couple stranded
A

islands). When you build the board,


i2
you need to be very careful about
M

solder bridges from a pad to the


.R
plane — it’s easy with no solder-mask
AT

... I found out the hard way. On


O
my initial test of the board, I found
OR

that control output 1 didn’t work;


with a loupe I discovered a hair-thin
solder bridge from RC.0 to the
UL

ground plane. Thankfully, the SX28


is a tough dude, and removing
the solder bridge fixed the problem; • The ONLY New Catalog Every 90 Days
.H

the pin did not seem damaged. The • NEWEST Products & Technologies
lesson here is to use a clean iron
i2

• Over 765,000 Products Online


with a sharp tip, and lift it straight
up instead of dragging it away from • More Than 325 Manufacturers
.R

the pad. • No Minimum Order


Figure 6 shows the completed
O

• Fast Delivery, Same-day Shipping The Newest Products


controller — as you can see, I now
For Your Newest Designs
have animatronics control in the
palm of my hand! The photo shows mouser.com (800) 346-6873
that I stood resistors R7-R14 on
end. If you’re comfortable with
The NEWEST Semiconductors | Passives | Interconnects | Power | Electromechanical | Test, Tools & Supplies
SMD soldering (I’m not, yet), you
Mouser and Mouser Electronics are registered trademarks of Mouser Electronics, Inc. Other products, logos, and
can probably fit SMD resistors company names mentioned herein, may be trademarks of their respective owners.

May 2007 23
Stamp.qxd 3/29/2007 2:26 PM Page 24

RA.3 are available, so


◗ PARTS LIST they could be used
Item Description Source/Part No. for hardware flow
◗ C1, C2 47 µF 647-UVR1V470MDD control on a derivative
◗ C3 0.1 µF 80-C315C104M5U project, if required.
◗ C4 10 µF 647-UVR1E100MDD
◗ C5 330 µF 647-UVR1A331MED So, here’s an
opportunity to save an
◗ D1 LED M859-LTL-4222N old PC from the scrap
◗ D2, D3 1N4148 512-1N4148 heap. It doesn’t take a
◗ J1 2.1 mm barrel 806-KLDX-0202-A lot of resources to
◗ J2 DB9-F, R/A 571-5747844-4 send serial data, so
◗ J3 Pin socket 506-510-AG91D what I’m going to do is
reformat an old laptop
◗ PB1
W
N.O. button 612-TL59F160Q
and devote it to
◗ Q1 2N3906 610-2N3906 animatronics control
W
◗ Q2 2N3904 610-2N3904 for Halloween and
Christmas. For me, the
◗ R1
W

1K 299-1K-RC
W
◗ R2, Rf 10K 299-10K-RC
next big question is the
◗ R3-R6 4.7K 299-4.7K-RC PC development lan-
W

◗ R7-R14 100Ω 299-100-RC guage; I tend to default


.G
to VB because I have a
◗ RES 50 MHz Parallax; 250-05060
W

lot of practice with it,


iU
◗ TB1-TB5 Two-pos term 571-2828362 but I would like to
work with others who
.R

RU
◗ U1 SX28AC/DP Parallax; SX28AC/DP run different operating
◗ U2 ULN2803 595-ULN2803AN systems (Mac, Linux,
AD

etc.). So, I’m looking


M
◗ VR1 LF50CP 511-LF50CP
◗ X1-X9 Pin header 517-6111TG for a cross-platform
iO

development tool with


EL
All parts are from Mouser unless noted otherwise. which I can develop
the same comfort as I
SC

E
download file on the Nuts & Volts have with VB. Java seems to be the
.H
website (www.nutsvolts.com). It’s leading contender, but if you have
A

very simple: Once a serial port has another suggestion, I’m open to it.
i2
been selected and opened, a timer is Okay, that’s about it. Be sure to
M

started that sends the packet every 20 study the full listing and don’t be
.R
milliseconds. Sending it more concerned if it doesn’t make sense
AT

frequently makes no sense because right away. When it does, a big smile
O
the servo framing timer is 20 millisec- will cross your face and you’ll be off to
OR

onds. It won’t hurt, of course, and you other things. Not too long ago, I helped
can cause the control outputs to a customer in the Parallax SX forum to
change at the packet transmission rate mix VPs for “background” serial I/O
UL

— so long as the transmission rate is and Sony SIRCS decoding, and at the
just over 11 byte periods long. moment I’m working on a serial-
I think that 20 milliseconds is controlled lamp dimmer. Once you’re
.H

probably a useful value for packet used to mixing VPs, you’ll find that
transmission timing considering the you can control virtually anything —
i2

mechanical elements that are to be virtually! Well, until next time, Happy
controlled with the board (servos take Stamping! NV
.R

time to move). This will work with data


rates down to 9600 baud (which you
O

might want to use if the RS-232 cable JON WILLIAMS


is long). Do keep in mind that the little jwilliams@efx-tek.com
transistor level-shifter circuit is not true
RS-232; the TX level out is only 5V. If
you need a long transmission line, you
can replace these components with a
RESOURCES PARALLAX, INC.
www.parallax.com
www.sxlist.com
MAX232 or similar device. RA.2 and
24 May 2007
O
.R
i2 .R
O
E .H
EL i2
.H
RU
M UL
iU OR
.G AT
W A M
W SC
W iO
Page 25

AD
.R
3:19 PM

W
4/4/2007

W
W
Full Page.qxd
Q&A.qxd 4/5/2007 8:48 PM Page 26

■ WITH RUSSELL KINCAID


QA & WHAT’S UP:
Join us as we delve into the
basics of electronics as applied
to every day problems, like:

✓ A current limiting mystery.


I was saddened to hear of T.J. Byer’s death; I
have been in awe of his range of knowledge and
enjoyed his column. I am honored to be asked

to continue the column and hope to be as
interesting as he was. My experience has been as
✓ Happy fish.

✓ A game show quizzer.
W

an analog design engineer, although, I have
recently discovered microprocessors and will use
W
one when applicable and simple enough that I
can do it. I will no doubt make some mistakes, but ✓ Vespa flywheels.

W

W
there are certainly readers that can set me straight.
Feedback is welcome. — Russ Kincaid
W

Send all questions and comments to:


.G
Q&A@nutsvolts.com
W

iU
A Short Biography of Russell Kincaid:
I became interested in radio while in high school. I saw an ad in Popular Science for a battery-less, tube-
.R

RU
less radio and bought a crystal radio kit. A neighbor, who was a college student, helped me build a short
AD

wave radio and I was hooked. I got a book from the library and built some radios of my own. I talked my
M
parents into sending me to the Commercial Radio Institute, in Baltimore, Maryland, but was drafted and
spent a year teaching basic electronics at the Infantry School, Fort Benning, Georgia. I took advantage of
iO

EL
the GI Bill and went to Rensselaer Polytechnic Institute in Troy, New York, getting an MEE degree. I worked
for 22+ years as an analog design engineer at Sanders Associates and subsequent assigns, and seven
SC

E
years as Manager of hybrid electronics for Sprague Electric. I told myself that I would never retire, but
.H
the demand for analog engineers is greatly diminished, and I found myself out of work at 59 years old, so
A

I retired. I have been retired for 18 years and will never get to the bottom of my to-do list.
i2
M

.R
to be able to generate a current sweep setup that sells or will build a
AT

CAUSE OF CURRENT 15/1.3 = 11.5A. 75 ohm, 170-184 MHz reject filter.


O
LIMIT? — WR Hwang — David Schoepf,
OR

Marianna, FL
I am using a coil to The resistance that is limiting

Q generate a magnetic field

A you to eight amps is: R =

A
I designed a three-pole
UL

and in turn, control the 15/8 = 1.9 ohms. The coil is bandstop filter to see what
torque in a clutch. The 1.3 ohms which leaves 0.6 it looked like: check out
current control uses an H-bridge to ohms in the H-bridge, which is perfectly Figure 1. The design is for
.H

apply a PWM dut y cycle. My coil reasonable. You need a better H-bridge perfect inductors; the real thing
resistance = 1.3 ohms, the inductance or more supply voltage. won’t be as good. Note the 1.36 pF
i2

= 4.1 mH and I expected to move capacitors; the stray capacitance will


more than 10A through the coil at a be significant and such a small
BANDSTOP FILTER
.R

frequency of 5 kHz at 15 VDC. For value can be made by twisting two


some reason, I can not get more than I need a reject filter for off-air enameled wires together. Cut

Q
O

8A to flow. I wonder if there’s some Channel 7. One of the area the wires to trim the value. You
power consumption in the PWM DTV signals is on 9, and I will need a sweep generator to
switching semi-conductors? have a severe intermod tune the filter. This equation can
Where can I measure the power problem when I amplify it enough to be used to wind the inductors:
consumption in the PWM circuitry? be useful. L = N 2 (RADIUS/2(9*RADIUS +
It seems to me the junction resistance I haven’t been able to find a 10*LENGTH)). Dimensions are in
is just 1.3 ohms and I am supposed manufacturer — or individual — with a inches, inductance is in micro-
26 May 2007
Q&A.qxd 4/5/2007 8:16 PM Page 27

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

henries. Layout is critical in


high frequency filters; in particular,
the coils should be at right
angles to each other. I designed
this filter using Philip R. Geffe’s
book Simplified Modern Filter
Design, John F. Rider Publisher,
1963.

FISH TANK
TACHOMETER
W
Could you please suggest

Q a circuit and component


W
design to monitor the
flow of water through
W

W
a pipe? I envision a paddle wheel
with possibly two small magnets
W

on opposite sides (to balance the ■ FIGURE 1


.G
spinner) and with a pickup coil
W

outside the housing to sense the file/0643.pdf. It has the magnet on the outside and connect it to a
iU
impulses as it rotates. I am capable of built in so your measuring vanes only frequency-to-voltage converter. The
making up the mechanics of the unit need to be made of ferrous material. maximum spacing between vane
.R

RU
but not capable of designing the The enclosure should be brass, and IC is 0.1 inch, as shown in Figure
electronics. aluminum, or non-magnetic stainless 2. You can use a digital voltmeter to
AD

I have three filters on a fish pond steel. Mount the Hall effect switch read the voltage and calibrate it to the
M
in parallel with a common outlet.
iO

When one needs cleaning, there is ■ FIGURE 3


EL
no way to tell which one has slowed.
The paddle would just dip a little
SC

E
into the stream so as to not slow the
.H
output and be sealed in each unit.
A

The frequency might be displayed


i2
on a small screen. The speed
M

indicated would simply be compared


.R
to each filter to tell which one
AT

needed cleaning when it was clean


O
or fouled.
OR

Thank you for your help.


— Charles Forman
UL

I will leave the mechanics up

A to you. I found this Hall


effect IC, made by Allegro
.H

Microsystems; the datasheet


is at: www.allegromicro.com/data
i2

■ FIGURE 2
.R
O

May 2007 27
Q&A.qxd 4/5/2007 8:17 PM Page 28

has six solenoids wound with five Thank you very much for any help
wraps of 12 gauge stranded copper you can give.
wire on 5/8 x 8 inch mild steel bolts — Frank Lemon
that end in one inch square angle iron
shoes fitting inside the flywheel I assume the shop vacuum
■ FIGURE 4

flow rate, if you wish. In the circuit in


Figure 3, I added the three outputs and
divided by three so you only need one
diameter to complete the flux
circuits on the business end of
the re-magnetizer. All solenoids
(electromagnets) are in parallel with
about half an ohm resistance
A and saw both run on 115
VAC, so just connect the saw
motor and shop vac in
parallel. If you don’t want to mess with
the saw switch, buy a switch box and
voltmeter. When the indication is overall; 160 amps for two seconds switch at the local hardware store, and
slowed, you can switch the meter to the warmed the coils but a little. Assum- while you are there, get an outlet box
individual outputs to see which one has ing polarities are correct, what is and outlets. You can wire it up per
W
slowed. likely wrong with my contraption? Figure 4 and plug both the saw and
I don’t know how fast the paddle Are the solenoid shoes too small vacuum into the outlet box.
W
wheel will rotate in this system; I and too loosely fitted against
assumed 300 RPM maximum in this the magnet faces? Do I need a
GAME SHOW LOGIC
W

W
design, but the equations to change bolt through the flywheel center
the maximum RPM are: connecting to the re-magnetizer I’m looking for assistance

Q
W

bottom, thus completing the flux in designing a hobby circuit


.G
C1 = 21.3/Fmax in microfarads and, circuit in another way? The picture to use as a game show
W

R1 = 6.26*Voutmax in Kohms. of the factory machine hinted at quizzer for our church
iU
something like this. youth. I’ve made several quiz boxes
The Hall effect IC has a current — Melvin Schallot over the years using SCRs as the
.R

RU
output, 6 mA minimum and 16 mA trigger and latch device per the
maximum. It switches between Any air gap will greatly re- schematic I found in the Feb. 1977
AD

those values as the vanes rotate. I

A duce the magnetic field; the issue of Popular Electronics magazine.


M
used a 1N4148 diode to bias one fit should be tight. I would I need to update the design to
iO

input so that 6 mA times 51 ohms connect the coils in series show which contestant came in first,
EL
will be less than the diode drop for a because you don’t know how the second, third, and fourth in a match
low input; 16 mA times 51 ohms is current divides when in parallel. You with four teams of five contestants
SC

E
more than the diode drop for a high will need 88 volts to drive 27 amps per team (20 total contestants). I’d
.H
input. You could connect the through the six series coils. If you also like to select between individual
A

voltmeter to the LM2917 output, but charge up a 1,000 µF, 100 volt, can mode (where each contestant
i2
I wanted to add the three tach type, high ripple electrolytic capacitor competes against all others) and team
M

signals and the summer inverts the and discharge it through the coils, that mode (where the fastest contestant
.R
signal, so I needed an inverter in should work; although bigger is better. on a team locks out the rest of
AT

front of the summer. The inverter If all the coils are wound identically, his team).
O
also converts the 0-to-6 volt signal then you mount them around the Each contestant will hold
OR

from the LM2917 to a 6-to-0 volts circle; the magnetic fields will cancel a normally open push button to
signal into the summer. unless you reverse every other one. depress when they think they can
That may be the real problem. You only answer the question. This sounds a
UL

have to reach a peak of magnetic flux buzzer (telling the quizmaster to


FLYWHEEL in order to re-magnetize. Time is not a stop reading the question), lights
RE-MAGNETIZER factor, as far as I know. their signaling light on a remote team
.H

light box, as well as lights in front


I built a re-magnetizer for of the timekeeper official (color of

Q
i2

Vespa P series flywheels SAWDUST VACUUM light or blink rate identifies if they
that produces a strong I use a table saw with a were the first, second, third, or fourth),

Q
.R

field at all six solenoid core shop vacuum attached. and starts a digital timer. The circuit
ends, or shoes, as I call them. But, It would be more convenient should not have any ties (response
O

the rig doesn’t work on the flywheels. if the vacuum would rate of 0.1 millisecond or faster).
I copied loosely a picture of a come on automatically whenever I It also needs immunity to static
factory machine. The Vespa flywheels start the table saw. I think a electricity since it will used be in a
are about six inches ID. Six 2 x 1.5 current/voltage sensing system carpeted room during the winter
inch magnet faces of alternate may have already been published. with lots of spectators walking around.
polarit y are exposed within the However, would you please recom- I can accept a hardware or software
inside diameter. The re-magnetizer mend such a system? solution. I have some experience
28 May 2007
Q&A.qxd 4/5/2007 8:17 PM Page 29

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

with the Parallax BS2sx OEM module, line #1 being high, causes IC5A players of the team.
but it has a limited number of I/O output to go low and set Q of
pins and barely meets the response IC1A high. At the same time, Q3
rate requirement. Any help would be pulls line #1 low, locking out
CONVERT 33 1/3 TO CD
appreciated. all other players on the bus. When I have a stack of old 33-1/3
— James Good

The circuit diagram (see


not-Q goes low, the output of Q4
goes high, enabling line #2. Similar
logic applies to second, third, and Q RPM records which I would
like to transfer to CDs. What
hardware and software are

A Figure 5) is for one player.


When a player presses
his button, his light lights if he
has been faster than the other players.
fourth place. There may be a
problem in driving the LED with the
Q output; a buffer/driver may be
needed.
needed for this mission?
— Bud Damnjanovic

You will need a sound card.


Once the light is on, all other players If the mode switch is in the team

A Look in the back of your


W
are locked out at that level. The game position, the player push button computer; if there is a card
master has the reset button to reset works as long as the lockout bus is with three or four 1/8” phone
W
all the lights. Here is the detail of how low. When any person on the team sockets and symbols for microphone
it works: lights a light, one of the inputs to and speaker, you already have it. You
W

W
Initially Q of IC1A is low causing IC4A goes low, making its output probably will need an adapter to plug
Q3 output to be in the high high. The output of the inverter, IC6A, your record player into the sound
W

impedance state. Enable line #1 goes low allowing the lockout bus to card and software. I only did this
.G
is high, being pulled up by R1. go high. The buzzer bus is active once; I believe I used Audio Record
W

When a player pushes his button, when low. Wizard V3.97 (ARWizard3), although I
iU
the output of IC6B goes low Note that the reset, enable, and also have RealPlayer on my computer.
causing IC5B output to go high buzzer bus goes to all 20 players but A Google search may turn up other
.R

RU
which, in conjunction with enable the lockout bus goes only to the five possibilities. NV
AD

M
iO

EL
SC

E .H
A

i2
M

.R
AT

O
OR
UL
.H
i2
.R
O

■ FIGURE 5
May 2007 29
NewProductsAMay07.qxd 4/5/2007 11:00 PM Page 30

NEW
■ HARDWARE
■ SOFTWARE
■ GADGETS
■ TOOLS

P R O D U C T S
use by scientists, engineers, experimenters, and hobbyists. The
NEW ZX MICROCONTROLLER ZX-1281 is a 64-pin TQFP format device targeted to high vol-

E lba Corporation announces the first shipments of a new,


more powerful multi-tasking microcontroller intended for
W ume products or resource-intensive applications where addi-
tional I/O capabilities are required. All ZX-series microcon-
trollers are programmed in ZBasic, a
subset of Microsoft’s Visual Basic (VB6)
with microcontroller-specific extensions
W
and other productivity enhancements.
The newest member of the ZX
W

W
microcontroller family is based on the
Atmel ATmega1281 MCU. The pri-
W

mary benefits offered by the new ZX


.G
model are increased execution speed,
W

expanded user RAM (7.5K standard,


iU
63K maximum), extended user pro-
gram space (60K total), additional
.R

RU
PWM channels (up to six), and a sec-
ond hardware serial port. The new ZX-
AD

1281 is largely source code compati-


M
ble with the previously released ZX
iO

family members — the ZX-24, ZX-24a,


EL
ZX-40, ZX-40a, ZX-44, and ZX-44a.
The single unit pricing of the new
SC

E
ZX-1281 is $49.95. Volume pricing is
.H
available. A ZX-1281 Development
A

Board is available to facilitate quick pro-


i2
totyping of a ZX-1281 application. The
M

Development Board, which includes a


.R
ZX-1281 device, is priced at $79.95
AT

The ZBasic programming language


O
is a subset of VB6 with extensions suit-
OR

able for microcontroller programming.


The ZBasic compiler can detect com-
mon programming defects such as use
UL

of a variable before its initialization and


other likely errors. The compiler incor-
porates advanced optimization tech-
.H

niques that help programmers pack


more functionality into the available
i2

code and data spaces by, for example,


eliminating unused or superfluous vari-
.R

ables and unreachable code.


Programs for the ZX-1281 may be
O

edited, compiled, and downloaded


using a state-of-the-art Integrated
Development Environment. The ZBasic
IDE provides productivity-enhancing
features such as word completion, call
tips, auto-indenting, syntax highlight-

30 May 2007
NewProductsAMay07.qxd 4/5/2007 11:03 PM Page 31

■ 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

ing, and undo/redo. The IDE can also be used to perform The ZX-128e and
For more information,
field updates of the ZX-1281’s internal firmware, making it ZX-1281e are also
contact:
simple to upgrade to programmed using
Oak Micros
new firmware releases For more information, contact: the ZBasic program- Web: www.oakmicros.com
as they become avail- Elba Corporation ming language.
able. Web: www.zbasic.net

NEW PROTOTYPING-FRIENDLY ZX
CRYSTAL EAR-PIECE
TRANSISTOR AMPLIFIER KIT
MICROCONTROLLERS
O ak Micros announces two new microcontrollers based on
the ZX microcontroller platform. The ZX-128e and ZX-1281e
A new amp from The Xtal Set Socity is designed specifically
to drive a crystal earphone, which is capacitive. Maximum
gain is set at 14x. The input is capacitively coupled and includes
are based on their namesake Atmel AVR ATmega128 and AT- a 100K pot, ideal as a load for a crystal set and as a volume con-
W
mega1281 devices and include a preprogrammed ZBasic Virtu- trol. All components mount on the 2 x 2-inch PCB, including
al Machine from Elba Corporation. These devices are suitable for nine-volt battery holder and nine-volt clip with wires. Battery and
W
the hobbyist and professional alike and provide a powerful, easy audio cables/connectors are not included. Interconnect wiring
to use platform for scientific and industrial control applications. can be soldered directly to the PCB pads. Assembly time is ~45
W

W
The new ZX-128e/ZX1281e are similar to the successful minutes. Price is $19.95. The XS-EAK Ear Piece Transistor Am-
Oak Micros ZX-24e/ZX-24ae devices and have a prototyping plifier Kit is $19.95 plus $4.95 shipping/handling.
W

and breadboard friendly 40-pin dual in-line format that fea- Orders may be placed via the website catalog.
.G
tures 32 I/O pins, true voltage level RS-232 transceiver, slide
W

switch to choose between RS-232 and logic voltage levels for For more information, contact:
iU
serial channel one, LED monitoring on two I/O pins, and a five The Xtal Set Society
volt regulator and power monitor LED. PO Box 3636, Lawrence, KS 66046
.R

RU
By utilizing the base features of the AVR microcontrollers, Tel: 405-517-7347
these new devices offer a second hardware serial port and four Email: xtalset@sunflower.com
AD

additional PWM channels. Up to 60K bytes of ZBasic program Web: www.midnightscience.com


M
code can be stored in the AVR Flash
iO

memory, which as a side benefit pro-


EL
vides read protection of user programs
and is 20% faster than the previous
SC

E
devices that used 32K bytes of EEPROM.
.H
A RAM daughter card allows user pro-
A

grams to address over 63K of RAM for


i2
program variables, task stacks, and heap
M

storage. This is an increase from the pre-


.R
vious 3.5K bytes that was available for
AT

the ZX-24ae device and permits these


O
new devices to be used in RAM inten-
OR

sive applications such as web servers


and data collection/management
engines. The single unit pricing of the
UL

ZX-128e is $69.95 and the ZX-1281e is


$79.95. Volume pricing is available.
“These new ZBasic devices togeth-
.H

er with the ZX-1281 provide a wide


range of options and choices for cus-
i2

tomers” said Donald Kinzer, President


of Elba Corporation. “Oak Micros is a
.R

strong partner and provides many useful


ideas and help to improve and extend
O

the ZBasic platform. A recent ZBasic


application note on RS-485 networking,
written by Oak Micros, utilizes the pow-
erful multi-tasking capabilities of the
ZBasic platform to support master-slave
data transfers up to 460,800 baud.”

May 2007 31
Page32.qxd 4/5/2007 9:42 PM Page 32

t o rs Dio
e s is des
R Order PCB
Get FREE parts
T r a Capacitors
t o rs
nsis ec
tors n n
C o
W
O nly $50 for 5pcs 4 " x4 " 2L
W
Free Solder mask and silkscreen !
W

W
FREE
W

.G
With first order
W

iU
.R

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

M
iO

EL
SC

E .H
A

i2
M

.R
AT

O
OR
UL
.H
i2
.R
O

32 May 2007
Full Page.qxd 4/4/2007 3:21 PM Page 33

WIN
Every week, Jameco is
giving extra discounts on
major brands like these:
• AlcoSwitch • AMP/Tyco

BIG
• Dallas Semiconductor
• Intersil • Maxim
• Microchip • Molex
• Panasonic • AVX
• Fairchild Semiconductor

AN
• Tyco • Aromat
E
TAK

E X T R%A
• Aavid Thermalloy
W
• Atmel • ST Micro

And that’s in
W
15
addition to the

OFF
W

industry-best
W
pricing you
already get
W

.G
EW at Jameco
ON 2 N

M AAJNODRS
every day!
W

iU
You already
know about
.R

RU
BR W E E
Jameco’s
K! best-in-the-
AD

EVERY business
M
low pricing...
iO

EL
Now we’re
out to get a new
SC

message across:
E
Major Brands—at
.H
Jameco pricing!
A

To dramatize the
i2
M

point, we’re giving

EVERY
you an additional 15% discount on two
.R
• T.I. Semiconductor
AT

different major brands each week. From


• Augat/Tyco • Bourns
O
now through the end of May!
• CTS • Cypress
And that’s on top of our
OR

SEE
• C&K Switches
everyday discounted pricing!
• Comair Rotron UP
O’S We wanted to make this

THIS WEEK
WH
• Condor • Grayhill so good a deal that you just
UL

• Intel • Micron O couldn’t pass it up.


GO T I T E So... Want to know which

WEEK
• Philips • Power-One
E B S
THE W
.H

• Raychem/Tyco two major brands you can


• Renesas • SanDisk save extra-big on this week? Just head
i2

— —
• Toshiba to the website...
• Vishay Siliconix
AT
.R

www.Jameco.com/NVS

JAMECO
O

Great Products.
Awesome Prices.

May 2007 33
Showcase-ReadFeed May07.qxd 4/5/2007 10:30 PM Page 34

SHOWCASE
5 Amp Smart Battery Charger
For Gel-Cell or Lead Acid Batteries
The Model 155 charger
maintains large batteries:
marine, auto & deep cycle.
Features include a precision
temperature tracking
voltage reference and three
mode charging sequence.
May be left connected, will
not overcharge. If a load
is applied, the charger will
contribute it’s bulk current
to the load. When the load
is removed, charger current will flow into the battery. Not a
switcher! Low RF noise linear charger. Good for Radio Use
See review by W1ZR in MAR 04 QST. Input 120 VAC. Output
13.8 VDC. Weighs 10 lb, 7“W x 8”D x 4 3/4”H. Custom units
and various output cables available, see website for details.
Assembled & Tested (Order #155-ASY) ........ $149.95
CA Residents add 7.75% sales tax. S & H $12.50 to US 48 (insured)
AK, HI and Foreign Orders, please contact us for details
www.a-aengineering.com
W
2521 W. LaPalma #K • Anaheim CA 92801
(714) 952-2114 • FAX (714) 952-3280
W
PP:KLWH
W

W
ZDWHUFOHDU
/('9
W

PFG
.G
$%  Evaluation Kits
 $299.00
W

iU
VHFRQGYRLFHUHFRUGHUSOD\EDFNPRGXOH OceanServer provides tiny, low-cost digital compass
SUHDVVHPEOHG  $  products for uses in precision heading or attitude
.R

7KH9HOOHPDQ3HUVRQDO6FRSH sensing applications. Compasses are tilt-compensated


RU
in three axes, incorporating highly accurate MEMs
LVDFRPSOHWH06VSRUWDEOH two-axis accelerometers. Serial or USB interconnect
options simplify system integration. Compasses provide
AD

reliable heading, roll, pitch, and optionally depth


QGV
7KRXVD
M
reading when connected to standard pressure
L WH P VRQ transducers.
PRUH
E V LWH
RXUZH
iO

OceanServer Technology, Inc.


EL
(508) 678-0550
www.ocean-server.com
SC

E .H
PRINTED CIRCUIT BOARDS
A

QUALITY PRODUCT 10 pcs (3 days)


i2
FAST DELIVERY 1 or 2 layers $249
M

COMPETITIVE PRICING 10 pcs (5 days)


4 layers $695
.R
* Aluminum Backed PCB (up to 30 sq. in. ea.)
* Single & Double sided
AT

includes tooling, artwork,


* SMOBC/RoHS LPI mask & legend
* LPI mask
O
* Through hole or SMT
* Nickel & Gold Plating
OR

* Routing or scoring
* Electrical Testing
* Artwork or CAD data 9901 W. Pacific Ave.
* Fast quotes Franklin Park, IL 60131
* Flex Circuits
UL

Phone 847.233.0012
We will beat any Fax 847.233.0013
competitor’s prices!!!
w w w.pulsar-inc.com • sales@pulsar-inc.com
.H
i2
.R
O
Showcase-ReadFeed May07.qxd 4/5/2007 10:32 PM Page 35

SHOWCASE
FORENSIC LAB

$100 REWARD
We will reduce the invoice of your
next paying recovery case by $100.00
Computer Hard Drive:
>
DATA RECOVERY
>
IMAGING
>
FORENSIC EXAMINATION
Free Confidential Telephone Consultation

(888) 505-2566
W
Member:
I E E E & Institute of Computer Forensic Professionals.
W
W

READER FEEDBACK
W
W

.G
Continued from Page 6
a sheet metal break. I did this with two
W

iU
pieces of wood that have a 45 degree
bevel on one edge (this gives relief clear-
.R

RU
ance when completing the last part of
the bend). Clamp these at the bend line
AD

and clamp in a vise. Two more pieces of


M
wood clamped over the other side of the
bend line and Voila! you have a hand
iO

EL
break! Now pull or push that extended
edge toward you or away from you until
SC

E
you have a 90 degree bend. Check with
.H
a square to be sure. As for rectangular panel firmly in a vise (or whatever) and a chassis/case or use whatever they have
holes, scribe your layout lines directly on file the rest out to the scribe lines. I am on hand that’s close in size, so I didn't
A

i2
the panel and then "hog" out the hole sorry for your trouble, but the article was dwell on that aspect of construction too
M

with a series of the biggest drill that will not meant to be a metal working primer, much — just enough to give some insight
.R
fit inside these layout lines (in my case, as this is a whole different feild.Most on what could be done.
AT

that was a 1/2" drill bit). Then clamp the constructors will look for a good buy on Robert Reed
O
OR

6ISIT/UR
7
HTTPWW EBSITE!T
WELEXPC
OM
-(:37%%0 $# 0/7%2 3500,)%3 3/,$%2).' 34!4)/.
UL

&5.#4)/.'%.%2!4/23 /3#),,/3#/0% -/$%, (9 n $)')4!, $)30,!9 2/4!294//,+)4


"%343%,,).'  
7AVEFORM&UNCTIONS )NT%XT
#OUNTER LINLOGSWEEP
-/$%,'/3  6ARIABLEOUTPUT  6$#  !MP 
 34!4)/.
 

$UAL#HANNEL 6ARIABLESPEEDTOOL 


-/$%, (9  n 42)0,% /54054
.H

-/$%,&'  -/$%,&'  -/$%,7,# 20- WITHACCESSORYKITINA


.O$IGITAL$ISPLAY $IGIT$ISPLAY n -(:

  
 
4WO 6$#  !MPVARIABLEOUTPUTS 
).#,5$%3 02/"%3 PLUS6!lXED$IGITAL$ISPLAY  67,#
HARDPLASTICCARRYCASE
6$2
i2

"%.#( $-- 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
 

.R

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

 
 &REQUENCY2UBBER(OLSTER)NCLUDED  ,OW 0RICED
O

2EVERSES 350%2 
)TEMS)N/UR
37)4#(%3     DIRECTION %#/./-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
May 2007 35
Simpson.qxd 3/29/2007 12:40 PM Page 36

PROJECTS ●●●●
■ THIS MONTH’S PROJECTS
Build an X10 Doggy Dish . . . . .36

Flood Detection Alarm . . . . . . .42

Magic Box — Part 2 . . . . . . . . .46

■ LEVEL RATING SYSTEM


W C O N T R O L
YOUR WORLD WITH
To find out the level of difficulty
for each of these projects, turn AN X-10 INTERFACE
W
to our ratings for the answers.
Build an X10 Doggy Dish
W

W
●●●● . . . . Beginner Level

O
W

ver the last 10 years, I have built weight of the dish. While this system
.G
●●●● . . . . Intermediate Level
many different automatic dog worked well, it was not portable and
W

watering dishes. Some worked pretty the mechanics were prone to failure.
iU
●●●● . . . . Advanced Level
well and others did not. Inevitably, all I tried using sonar and IR
dishes eventually failed and one sensors to detect the depth, but they
.R

●●●● . . . . Professional Level


RU
conclusion I came to was that it was were a failure, as well. Then I remem-
not practical to automatically fill the bered an experiment I performed
AD

dish; as eventually all the systems about a year ago using an I/O
M
Last month, I gave failed and I ended up with a mess. interrupt (IRQ) as a counter. I set up
iO

What I wanted instead was a system a DiosPro microcontroller with one


you details on how to
EL
that would let us know when the dish of its leads as an IRQ counter and
communicate with needed to be filled. I came up with created a routine that would
SC

E
the following project requirements: increment a variable each time the
.H
various X10 computer IRQ fired. During one of my
A

• No probes are to come in contact experiments, I found that if I toggled


i2
interfaces. This month, with the water. one of the other ports while I was
M

• No floats or other items are to be touching the IRQ port, it would


I had planned on
.R
placed inside the dish. detect the toggled port. My body
AT

• The system must be portable and was acting as a giant antenna for the
showing you how to
O
able to be installed under the dish. very sensitive IRQ port and just
OR

use each one of those about any electrical activity would


While playing with the cause the IRQ to fire.
interfaces with a FireCracker and the microcontroller To expand on the experiment, I
UL

interface, the idea for this project held the IRQ port low with a 100K
microcontroller. I came to me. The FireCracker resistor. This would reduce the sensitiv-
(CM17A) is small and gets its power ity, but when I touched the IRQ port,
.H

want to deviate a bit from the control leads. The interface nothing happened. If I touched both
and actually is simple and requires no external the IRQ port and the toggling port, the
i2

components. All that was left was to IRQ would fire with each toggle. I then
come up with a way to detect the connected large metal plates to both
.R

show you how to amount of water in the dish.


The easiest way would have been
the IRQ port and the toggle port. I
placed them very close without touch-
O

build a cool project to sink a couple of leads into the water,


but this is not safe for the animals no
ing and the toggle port would cause
the IRQ port to count. This is exactly
using the CM17A matter how low the current and what I was looking for so I placed the
voltage is. Floats are a pain and tend to plates against a plastic jug and when
FireCracker. get in the way. In the past, I had used filled with water, the IRQ port would
a special platform that measured the pick up the toggle port level changes.

36 May 2007
Simpson.qxd 3/29/2007 12:41 PM Page 37

BY MICHAEL SIMPSON

It’s the results of this experiment that I ports 7 and 13. Install a
am basing this project. two-pin header into the ■ FIGURE 1
two pads marked – and +
Building Sensor Pads near the upper right hand
of the board shown in
It’s time to create a couple of sen- Figure 6. Install a five-pin
sor pads that you can use for your own female header into the
experiments and eventually use on pads marked –, +, Rx, Tx,
your own doggy dish project. You will and Atn in the lower left
need some foil tape — the kind that hand corner of the
■ FIGURE 2
W
you can purchase from the heating and board. This header will
air-conditioning section of your home be used to insert an
W
center. One side is conductive and the EZRS232 for program-
other has a very strong adhesive. Take ming the DiosPro. Install
W

W
an 8” piece of foil tape and split it a 100K resistor between
down the middle as shown in Figure 1. I/O port 7 and Vss as
■ FIGURE 3
W

Next, take a 12” piece of solid shown in Figure 7.


.G
hookup wire and strip about 4” from
• STEP 2 — Attach the DB-9
W

the end. Lay the wire on one of the tape shown in Figure 10. To do this, you need
iU
strips foil side up as shown in Figure 2. Connector. Break off a two-pin header to pry up the small tab covering the pin.
Take the other tape strip and remove from one of the headers that came Keeping the orientation of the recepta-
.R

RU
the adhesive backing and place it over with the Dios Carrier 1 and solder it to cle the same, push it into the slot next to
the wire and original strip as shown in the pins 4 and 5 as shown in Figure the black wire. It should snap into place.
AD

Figure 3. Use your thumb to smooth 8A. Then break off a single pin and sol- Snap off a single one-pin section
M
out the bubbles and to make sure the der it to pin 7 as shown in Figure 8B. from the 36-pin female header and
iO

wire is firmly sandwiched between the Attach the DB-9 connector to the solder the end of the wire connected
EL
two strips. You now have a sensor Dios Carrier 1 as shown in Figure 9. to the sensor pad to this female
pad. You will need two of these sensor The header pins 4 and 5 are soldered header. For more strength, slip a piece
SC

E
pads. For now, attach the two sensor on the top of the board to I/O ports 2 of 1/8” heat shrink over the pin and
.H
pads to a jar similar to the one shown and 3. The header pin 7 is soldered on shrink as shown in Figure 11.
A

in Figure 4. Use cellophane tape so the bottom of the board to I/O port 0.
i2
they can be removed later. This connector will eventually connect • STEP 4 — Sensor Pad Test. If you
M

to the FireCracker. have not done so, you need to


.R
Controller Board assemble and test the EZRS232 board
AT

Construction • STEP 3 — Final Prep. Move the red


O
wire on the battery connecter so that it ■ FIGURE 4
OR

Before we can proceed with the first is located next to the back wire as
test, we need to build the controller
board that will take readings and send ■ FIGURE 5
UL

out our X10 control codes. We will use


a DiosPro 28-pin chip, a Dios Carrier1
board, and a FireCracker X17A. I will
.H

provide a complete list of materials at


the end of this article along with
i2

sources for the various components.


.R

• STEP 1 — Build the Dios Carrier


Board. Use the instructions that
O

come with the Dios Carrier 1 board


to assemble it. Don’t assemble
the two 12-pin headers. When
complete, it should look like
Figure 5. Install one-
pin headers into ■ FIGURE 6

May 2007 37
Simpson.qxd 3/29/2007 12:42 PM Page 38

(A) ■ FIGURE 8 Once you run the program, it


should start reporting 0 in the debug
Insert the Dios window. Start to fill the jar or container
Pro chip into the and as the water reaches the top, the
carrier, then plug the sensor pad reading should change to 50.
EZRS232 driver into The program is simple enough.
the five-pin female The startirqasm is a simple assembly
connector on the routine that fires each time there is a
(B) carrier and connect change from low to high on port 7.
the battery connec- The routine increments the global vari-
tor as shown in able dishvarb. The DishTest routine is
Figure 12. Make called each time you want to test the
W
sure the orientation water level. What it does is toggle port
of the black and red 13 100 times. This is 50 low to high
W
■ FIGURE 7 wires is correct. If transitions and 50 high to low transi-
they are not, you will tions. Upon entry to the routine, I set
W

W
according to the accompanying instruc- damage the DiosPro chip. the global variable dishvarb to 0 so we
tions, then download and install the Connect the carrier to your PC by get a fresh count with each call.
W

free Dios compiler. using a nine-pin serial cable. All new Play with the location of the
.G
DiosPro chips contain sensor pads, as well as the 100K
W

a small test program resistor. I have found that you may


iU
L ISTING 1 that will display a test also place the two sensors across from
DiosPro message on the debug each other on the container.
.R

RU
‘—————————————————————————————————————————————————-
‘DDishP1 Simple Water Level Test Program terminal.
Now connect each • STEP 5 — Doggy Dish Assembly. Dish
AD

‘—————————————————————————————————————————————————-
func main() of the sensor pad selection is important. You need to
M
dim irqcount as integer female headers to the select a dish that has some sort of
iO

single pin male headers chamber on the under side. This cham-
EL
‘Start INT0 IRQ
irqglobalstart ‘enable global IRQ’s on I/O ports 7 and 13 ber will be used to house the DiosPro,
that we installed earlier. FireCracker, and battery pack. The bowl
SC

irqINT0start ‘enable INT0 IRQ


E
Schematic 1 shows the shown in Figure 13 is very common,
.H
loop:
irqcount=DishTest(13) complete hookup for available at most pet and department
A

print irqcount this experiment. stores and is available in many sizes and
i2
pause 100
Program the code colors. You may also make your own
M

goto loop
from Listing 1 into the bowl by attaching two bowls as shown
.R
endfunc DiosPro. For the Dios in Figure 14. The best way to attach the
AT

Carrier 1, you will need two is with some industrial double stick
O
‘—————————————————————————————————————————————————- to use an EZRS232 driv- foam tape or hot glue or both.
‘Sensor Test Program
OR

‘Will Return 50 if IRQ catches all er. The DiosWorkboards Remove the sensor pads from the
‘ port toggles have the RS-232 driver jar and, using cellophane tape, attach
‘—————————————————————————————————————————————————-
func DishTest(tport as integer) built in so experimenta- the two pads near the bottom of the
UL

global dishvarb as integer tion is much easier. doggy dish bowl across from each
dim x as integer
output tport
■ FIGURE 10
.H

dishvarb = 0
for x = 1 to 100
toggle tport
i2

next
exit dishvarb
endfunc
.R

‘—————————————————————————————————————————————————-
O

‘IRQ handler for INT0 irq


‘—————————————————————————————————————————————————-
startirqasm INT0
movlb .2 ;Need this to access global variables
infsnz G_dishvarbl,f
incf G_dishvarbh,f
endirqasm
‘—————————————————————————————————————————————————- ■ FIGURE 9

38 May 2007
Simpson.qxd 3/29/2007 12:43 PM Page 39

Build an X10 Doggy Dish

■ FIGURE 11

other as shown in
Figure 15.
Set the bowl
right side up
and connect the
sensor pads to
the DiosPro and
power it up by
plugging in the
battery connec-
W
tor. Slowly fill the
dish with water
W
until the readout
starts to display
W

W
50. Using a small
cup, remove small
W

amounts of water
.G
until the display ■ FIGURE 14 ■ FIGURE 13 ■ FIGURE 12
W

reads 0 once
iU
again; this is the point that the dish will not already connected and add water Dry fit the controller and battery
alert you when it needs more water. to the bowl. The K3 device should holder first by holding them in place.
.R

RU
If you aren’t happy with the level, turn off as long as the water level is Make sure you can reach the board
reposition the sensor pads until you are. okay. It will turn on when the water with the sensor pad wires as shown in
AD

level drops below your sensors. The Figure 17. Don’t install the batteries
M
• STEP 6 — Test the FireCracker program tests the dish every 10 sec- and controller too close to any of the
Interface. Connect the FireCracker to
iO

onds which seems like a good rate. sensor pads or they may interfere with
EL
the DB9 connector that you attached the readings. Position the Carrier 1
to the Carrier 1 board back in Step 2, • STEP 7 — Final Assembly. By this board so that you can still install the
SC

E
as shown in Figure 16. Load up the point, we have tested the control sys- EZRS232 when needed.
.H
program DDishP2.txt (available from tem, the sensors, and the water levels Once you are happy with the loca-
A

the Nuts & Volts website at www.nuts and are happy with their operation. tion of the controller, place some dou-
i2
volts.com) and program it into the It’s much harder to program the ble stick foam tape on the FireCracker
M

DiosPro using the EZRS232. DiosPro once it has been installed and stick it in place. You will also want
.R
The program is set to turn device under the bowl. to attach some foam tape to the
AT

K3 on and off, depending on the


O
water level. You can change this by
■ SCHEMATIC 1
OR

modifying the constants used in the


call to the SendX17Adata routines.
Connect the sensor pads if they are
UL

■ FIGURE 15
.H
i2
.R
O

May 2007 39
Simpson.qxd 3/29/2007 2:29 PM Page 40

device on or off depending on


■ FIGURE 18 the reading. We are providing
the power to the FireCracker, so
just before we put the chip to
sleep the power is removed so
that the FireCracker itself does
not drain the battery.
Another hardware feature of
the DiosPro is the ability to
self-monitor the supply battery.
We make a call to this routine
once each cycle and if the
W
battery voltage drops below 4.24
■ FIGURE 16 ■ FIGURE 17 DiosPro. The DiosPro has the volts, it will toggle the device five
W
ability to be put to sleep and times to warn us.
Carrier 1 board, as well. The board sits will draw only about 40 µS of power
W

Final Thoughts
W
higher than the FireCracker so you will from the battery in this mode. To wake
need two to three layers of the foam up the DiosPro, we use another
W

tape for the added height. Attach the feature called the watchdog timer. I have been using the dish now for
.G
four-cell battery holder next. You may When turned on, it will wake up the a couple of months and it has worked
W

also want to use some tape to hold the DiosPro after it has been asleep for without a failure. The alkaline batteries
iU
sensor pad wires in place. Make sure two seconds. If you look at the code, I have been using also show no signs
you don’t use metal tape for this. you will see that I make 130 calls to of significant drain.
.R

RU
Load up program DDishP3.txt and the sleep command. This causes the The complete schematic for the
program it into the DiosPro. This DiosPro to stay on a low power mode final assembly is shown in Schematic
AD

program takes advantage of a few of for five minutes. Once it wakes up, it 2. Feel free to make modifications.
M
the hardware features built into the does a dish test then turns the X10 There are several ports available for
iO

connecting things like LEDs, beepers,


EL
or other devices. You could also run a
LINKS TO PARTS couple of additional sensor pads to
SC

E
AVAILABLE FROM KRONOS ROBOTICS com/xcart/customer/product.php? test different water levels. For instance,
.H
AT www.kronosrobotics.com: productid=16288 use port 14 to run a second toggle
A

pad. Just make an additional call to the


i2
■ DiosPro28 — www.kronosrobotics. AVAILABLE FROM www.X10.Com:
DishTest routine passing I/O port 14.
M

com/xcart/customer/product.php?
productid=16169 ■ FireCracker — (Note the FireCracker As for the water level warning
.R
can be purchased cheaper from an eBay indicator, just about any lamp will
AT

■ Dios Carrier 1 — www.kronosroboti eStore.)


work. I use something a little different.
O
cs.com/xcart/customer/product.php?
productid=16170 AVAILABLE FROM ALL ELECTRONICS I use one of those strobe flashers con-
OR

AT www.allelectronics.com: nected to an AC adapter as shown in


■ EZRS232 Driver — www.kronosrob Figure 18. I’m using the standard lamp
otics.com/xcart/customer/product.php? ■ Strobe Light — www.allelectronics.
productid=16167 com/cgi-bin/category/605/Strobes. module that came with the CM18
UL

html FireCracker kit. The strobe will flash


■ Four-cell Battery Holder — www. whenever the dish needs more water.
kronosrobotics.com/xcart/customer/ AVAILABLE FROM HOME CENTER:
The FireCracker — also known as
.H

product.php?productid=16323
■ Foil Tape — Standard HVAC metal tape. the CM17A — is not an X10 device, nor
■ 36-pin Female Header — www. does it communicate with the X10
i2

kronosrobotics.com/xcart/customer/ ■ Double Stick Foam Tape — Used to protocol. It is a wireless transmitter that
product.php?productid=16291 secure the Dios Carrier 1 and FireCracker
is designed to work with the TM751
.R

to the inside of the bowl.


■ Nine-pin DSub Plug — www.kronos transceiver module. While you can
robotics.com/xcart/customer/product.ph ■ Hookup Wire — I used wire removed purchase the CM17A by itself, it won’t
O

p?productid=16254 from standard telephone cable (Cat 3). do you any good unless you already
■ 100K Resistors — www.kronosrobot AVAILABLE FROM PET STORE: have a TM751. This is why they creat-
ics.com/xcart/customer/product.php? ed the CM18 FireCracker Kit. This kit
productid=16195 ■ Water Dish — I purchased the bowl I contains the following modules:
used from PetSmart. I have seen them
■ Heat Shrink — www.kronosrobotics. at various department stores, as well.
• FireCracker Module (CM17A)

40 May 2007
Simpson.qxd 3/29/2007 12:44 PM Page 41

Build an X10 Doggy Dish

WEB LINKS
■ Kronos Robotics
www.kronosrobotics.com/xcart/
customer/home.php

■ KRMicros
www.krmicros.com/Development
/ZeusPro/ZeusPro.htm

www.krmicros.com/Development
/ZeusLite/ZeusLite.htm

■ SmartHome
W
www.smarthome.com/1132b.html

■ X10
W
www.x10.com
W

W
• Transceiver Module (TM751)
• Lamp Module (LM465)
W

• PalmPad Remote Control (HR12A)


.G
■ SCHEMATIC 2
W

Since the FireCracker is so easy


iU
to use with both a PC and micro-
controller. I recommend at least one As for projects using a CM17A All the example programs, as well
.R

RU
CM18 Kit. After that, you may and microcontroller, they are endless. as the source are available for down-
purchase additional CM17A units for I have already started on a sonar car load at www.kronosrobotics.com/
AD

as little as $12. parking aid for the garage. Projects/x10b.shtml. NV


M
iO

EL
SC

E .H
A

i2
M

.R
AT

O
OR
UL
.H
i2
.R
O

May 2007 41
Florian.qxd 3/29/2007 12:51 PM Page 42

●●●●

Wouldn’t it be BUILD A FLOOD


great to detect a
flooding issue
DETECTION
before it’s
ALARM
W
too late?
W
T
W

W
his project consists of a box Circuit Description
Well, this device can containing circuitry and the
W

water probe assembly. When The circuit in Figure 1 consists


.G
detect when rising water touches the probe assembly, of a 700 Hz oscillator, rectifier,
W

an alarm will sound. A relay is threshold detector transistors, and


iU
water occurs. The provided to switch on a water drive transistors. U1, R1, R2, and C1
pump. As long as the probe form the 700 Hz oscillator. This
.R

RU
circuit shown in assembly is in contact with the
water, the pump switch will remain
drives probe P1 on TB1. When
water touches probe P1 and P2, P2
AD

Figure 1 is a on. The alarm can be shut off with picks up the square wave. The signal
M
a switch once the flooding has at P2 is rectified by D1 and charges
iO

been detected. Optionally, a 12V C4. Q1 is used as a threshold detec-


schematic for a flood
EL
lantern battery can be used as tor. If the charge on C4 reaches a
a back-up power source if the threshold of approximately 600 mV,
SC

E
detection alarm. power from the wall transformer is Q1 turns on. When Q1 is on, driver
.H
interrupted. transistors Q2 and Q3 are also on.
A

i2
M

.R
AT

O
OR
UL
.H
i2
.R
O

■ FIGURE 1

42 May 2007
Florian.qxd 3/29/2007 12:52 PM Page 43

BY PAUL FLORIAN

■ PHOTO 1 ■ PHOTO 2
W
Q2 drives the piezo alarm and Q3 ener- crimp housing con- ■ FIGURE 2
gizes the pump switch relay coil. D4 is used to eliminate the nector mated to a .100” male
W
back-EMF when the relay coil voltage is turned off. C4 remains header soldered to the PCB. Next,
charged when the probes detect water. If the water level falls construct the probe assembly. Start
W

W
below the probe tips, C3 discharges through R3, providing a with a 1.5“ by 2” piece of single
time delay in turning off Q1. This means that the relay will not sided, copper clad PCB. Put 3/4”
W

chatter when the probes are just barely in contact with water. pieces of tape on both sides and
.G
The unit is powered by a 12 VDC 200 mA wall then etch. After etching, there should
W

transformer. However, the device can operate from a be copper foil as shown in Photo 3.
iU
lantern battery as a backup power source (optional). The (the probe assembly). Drill the three
Water Detection Alarm (WDA) will draw power from the holes as indicated in the photo. Take
.R

RU
greater of the voltages at the anodes of D1 and D2. When two 4” lengths of 12 Ga wire and sol-
power is applied from J1, the voltage at the anode of D1 der to the PCB. It may be necessary
AD

will generally be greater than the 12V battery. If the voltage to use a 100 watt soldering iron to do
M
from the wall transformer fails, a lantern battery can power this. Bend the wire at an angle such
iO

the circuit through D2.


EL
Construction PARTS LIST
SC

E .H
PART DESCRIPTION PART NO. SUPPLIER COST
Photo 1 shows the top ❑ U1 LM555CN LM555CNNS-ND $1.04
A

side of the PCB (printed ❑ R1, R5, R6 10K 5% 1/4W 10KQBK-ND 5 for $0.27
i2
circuit board) and Photo 2 ❑ R2 1K 5% 1/4W 1KQBK-ND 5 for $0.27
M

shows the reverse side of the ❑ R3 470K 5% 1/4W 470KQBK-ND 5 for $0.27
.R
PCB. The Parts List shows the ❑ R4 1M 5% 1/4W 1MQBK-ND 5 for $0.27
AT

❑ C1, C2 100 nF 478-3187-ND $0.24


component references. Be
O
❑ C3 10 nF 478-2462-ND $0.24
sure to use an eight-pin socket ❑ C4, C5 22 µF 35V radial electrolytic P1188-ND $0.31
OR

for U1. Install the parts on the ❑ Q1 2N3904 2N3904FS-ND $0.16


perfboard. Transistor pinouts ❑ Q2, Q3 2N3906 2N3906FS-ND $0.18
are shown in Figure 2. Attach ❑ D1, D2, D4 1N4002 578-1360-1-ND $0.04
❑ K1
UL

8” of red wire to the TIP 10A SPST relay 275-248A RS $4.49


❑ J1 1/8” phone jack 274-249 RS $2.99
terminal of J1, and 8“ of black ❑ PZ1 Piezo buzzer 273-057 RS $10.49
wire to the RING terminal of
.H

❑ TB1, TB2 PCB terminals 276-1388 RS $2.29


J1. Then connect two 8” white ❑ S1 SPST toggle switch 275-624 RS $2.99
wires to switch S1. Also ❑ Case 270-1805 RS $3.79
i2

connect a 12” red wire to the ❑ Eight Pin Socket ED3308-ND $0.42
+ terminal of the 12V battery ❑ Terminals Ring tongue connector 64-3032 RS $1.99
.R

❑ Four Standoffs 4/40 1/2” Nylon standoffs 1902CK-ND 10 for $5.17


and another 12” black wire to ❑ Ten Screws 4/40 1/4” screws Varies HWS
the – terminal of the battery.
O

❑ Two Screws 4/40 3/8” screws Varies HWS


These wire colors are shown ❑ Four 4/40 nuts Varies HWS
on the schematic in Figure 1. ❑ Hookup Wire Varies HWS
The connections can be ❑ Wall Xfmr 12 VDC 200 mA transformer Varies
made by soldering the wires
All part numbers are DigiKey except for RS part numbers (RadioShack) and HWS (your local
directly to the PCB, or they hardware store).
can be made using a female

May 2007 43
Florian.qxd 3/29/2007 12:53 PM Page 44

from TB1 to the probe end of each wire and tin.


assembly as follows. Cut One end of the twisted pair has
two lengths of wire long ring tongue connectors soldered to
enough to reach the case them. These connectors are mounted
containing the circuit board to the probe assembly with two 4-40
from the probe assembly. 1/4” long screws and two 4-40 nuts.
Once these wires are cut, The other end of the twisted pair is
■ PHOTO 3
twist them together with a connected to terminals P1 and P2 of
variable speed drill until they TB1 on the circuit board.
that they are separated by 1/8” at the have about eight turns per inch. Then,
tips. Next, make the cable that goes strip about 1/2” of insulation from the Testing and Assembly
W
Connect the unit to the 12V wall
transformer. Then check the voltage
W
between U1 pin 8 and U1 pin 1. The
meter should read between 12 VDC
W

W
and 18 VDC. If this reading is zero,
check for proper installation of D1
W

and J1. When the voltage checks out,


.G
install U1 in its socket. Verify that the
W

wires from the probe assembly are


iU
connected to P1 and P2. Then place
the probe tips into water. The piezo
.R

RU
alarm should sound. If the piezo is
silent, flip the switch S1. If the alarm is
AD

still silent, check the installation of Q1,


M
Q2, and Q3.
iO

Once the alarm is working


EL
properly, mount the circuit board, J1,
S1, and PZ1 in an appropriately sized
SC

E
case. Orient the switch S1 so that the
.H
piezo alarm is enabled when S1 is in
A

the 12:00 position. Drill holes in the


i2
case to route the wires from TB1, TB2,
M

PZ1, and the lantern battery. Also drill


.R
a hole to mount J1.
AT

HobbyEngineering
O
Use
OR

The technology builder's source for kits, components, supplies, tools, books and education.
Verify that the probe wires are
connected to TB1. The TB2 terminal
UL

Robot Kits For All Skill Levels ICs, Transistors, Project Kits block is connected in series with the
pump motor and the power source for
Motors, Frame Components the pump motor. The relay contact
.H

and Scratch Builder Supplies.


rating is 10A at 120 VAC. Once all of
the necessary connections have been
i2

Order by Internet, phone, fax or mail.


made, attach the lid to the case. When
www.HobbyEngineering.com mounting the water detection alarm,
.R

Books and 1-866-ROBOT-50 care must be taken to install the unit, as


well as the wall transformer in a place
O

Educational K 1-866-762-6850
1-650-552-9925 high above the expected flood level.
1-650-259-9590 (fax)
sales@HobbyEngineering.com
The probe assembly should be placed
180 El Camino Real such that the probe tips are exposed to
BEAM Kits and Components Millbrae, CA 94030 water when flooding occurs. A 3/16”
Visit our store near SFO! mounting hole on the probe assembly
makes it easy to install. NV
Most orders ship the day received! World-wide shipping. Convenient payment options.
44 May 2007
O
.R
i2 .R
O
E .H
EL i2
.H
RU
M UL
iU OR
.G AT
W A M
W SC
W iO
Page 45

AD
.R
3:28 PM

W
4/4/2007

W
W
Full Page.qxd
Martin2.qxd 4/5/2007 2:43 PM Page 46

●●●●
This unique DIY
construction project
blends electronics
THE MYSTERIOUS
technology with
subtle magic and
hand craftsmanship.
W MAGIC
This concluding part

BOX
W
examines the theory of
Part 2
W

W
operation, installation
and assembly, testing,
W

.G
and verification that the C arefully follow these instruc- advantageously exploits magnetism.
W

tions to avoid any problems


iU
design works properly. with sensor alignment, soldering The Hall Effect Phenomenon
bridges, and proper placement of When an electric current flows
.R

It also presents
RU
deliberate shorts on the PC board. through a conductor in the presence
mini-tutorials on Hall- We’ll help you recognize the differ- of a magnetic field, the magnetic
AD

ences in component selection and field exerts a transverse pressure on


M
Effect and magnetism. placement in the two kit versions the moving charge carriers. This, in
This allows you to more
iO

which are available for purchase, for turn, pushes these carriers to one
EL
your convenience. side of the conductor. This is most
fully understand and conducive and therefore prominently
SC

E
appreciate this project. Magnetism and occurs on thin, flat conductors. As
.H
the Hall Effect the charge accumulates on the sides
A

of the conductor, it balances this


i2
Sometimes we take the simplest magnetic influence. This produces a
M

■ FIGURE 1. The Hall effect phenomenon things for granted that profoundly measurable potential or voltage
.R
of charge accumulation on the conductor’s influence us. In this project, it is between these two sides. This phe-
AT

edges under the influence of a current magnetism and the Hall effect that nomenon is known as the Hall effect.
O
source. Edwin Hall — a 24-year-old
OR

(a) graduate student at Johns Hopkins


University — discovered this in
1879. He experimented with a thin
UL

sheet of gold foil on a glass plate


(later, he used other materials) and a
current source (see Figures 1a and
.H

1b). He tapped off the gold leaf at


different points down its length and
i2

noticed the varying potential.


.R

(b)
O

46 May 2007
Martin2.qxd 4/5/2007 2:43 PM Page 47

BY VAUGHN D. MARTIN and JOHN STABLER

■ FIGURE 2. The magnetic field must be


perpendicular to the Hall effect’s active
surface.

Interacting Perpendiculars
In order to create the Hall effect
potential, the magnetic field must be
perpendicular to the Hall element.
The ratio of the voltage created to the
product of the amount of current and
W
the magnetic field divided by the ele-
ment thickness is the Hall coefficient.
W
This characterizes the material com-
prising the element.
W

W
Where Theory Meets Practicality
W

The Hall effect occurring perpen-


.G
dicular to a magnetic field (see Figure circuit board) from the acrylic
W

2) is why you tilt this project’s Hall sheet. In the six-pawn version,
iU
effect sensors upward. These 1/4” there will be six shorter spacers to
diameter magnets in the pawns’ base offset the six sensors to a distance
.R

RU
produce lines of flux which are most that is virtually next to the magnets
concentrated directly downward. for reliable activations.
AD

Magnetic lines of flux do indeed


M
emanate in an almost spherical fashion Helping Theory Comply with
iO

(see Figure 3). However, as you deviate Practical Constraints


EL
farther from the center-line, the flux The white Nylon mounting
intensity diminishes dramatically. This hardware secures and “cradles” the
SC

E
strategic magnet placement directly sensors. It does so without use of
.H
exposes the sensors’ façades to the traditional ferrous metallic hard- ■ FIGURE 3. Magnetic lines of force
A

strongest magnetic field. This further ware. This ensures no magnetic field and their typical convex spherical
i2
ensures that your project’s missing interaction from metallic hardware that pattern. Artwork courtesy of the
M

pawn detection scheme will remain as could diminish the effectiveness of Regents of the University of California.
.R
reliable as our design intended it to be. the magic trick. (Imagine what would
AT

The sensors’ façade has writing on happen if one field coupled from one this region either attracted or repelled
O
it to distinguish it from the non-active sensor to an adjacent sensor!) one another. Touching one of these
OR

side. Notice where it says “branded” stones with an iron needle made it ori-
(see Figure 4). The A3214A sensor is Magnetism: A Historical ent itself like the stone; thus, the origin
too small for all of that, so you will just Perspective
UL

see a 14A nomenclature on it. Use the


white Nylon spacers to ensure these Magnetism’s first
sensors assume this upward orienta- observances occurred
.H

tion. They will just slightly bend over around 600 BC in the dis-
the lip of the spacers for proper align- trict of Magnesia,
i2

ment under their respective magnets Thessaly (one of the 13


(embedded within the pawns). peripheral states of
.R

Greece). Certain stones in


Nylon Spacers
O

If you decide to purchase a kit, it


■ FIGURE 4. The Hall
will come with two sizes of spacers. effect sensors’ “branded”
They appear identical until you place façade where an abbrevi-
them side-by-side. One is slightly taller ated part number would
than the other. The taller spacers are appear. Artwork courtesy
for standing off the PCB (printed of Allegro Microsystems.

May 2007 47
Martin2.qxd 4/4/2007 3:54 PM Page 48

images with only changes in intensity.


This is sensation flicker. Flicker ceases
above a certain critical rate. This is the
critical flicker frequency (CFF).

The Ferry-Porter Law


The Ferry-Porter Law states that
CFF is proportional to the logarithm of
the luminance of the flickering stimu-
lus (L). Equation 1 states that:
W
EQUATION 1:
CFF = a log L + b
■ FIGURE 5. The project’s
W
block diagram theory of
operation. Here, a and b are constants. This
W

W
relationship is valid over a wide range.
The above equation implies that when
W

of the compass. This acted like a magnet. This prompted Michael you plot CFF as a function of log L, the
.G
lodestar, or direction finding star refer- Faraday’s theories on electromagnetic straight line identifies the region where
W

enced to e.g., Polaris. The name comes induction and development of the the Ferry-Porter Law is valid. Increasing
iU
from lodestone (magnetite, Fe3O4) since transformer, alternator, and dynamo. the intensity of your test stimulus also
lode meant “way” in Middle English, and In 1821, Oersted noticed the flow increases your flicker perception. This is
.R

RU
magnet evolved from Magnesia. of the electric current in the why when your computer monitor flick-
In 1269, Frenchmen Peter wire-deflected compass needles. ers, decreasing the intensity eliminates
AD

Peregrinus and Pierre de Maricourt, Andre-Marie Ampere pursued this to this flicker. In fact, the reason NTSC
M
used a compass and a spherical lode- discover that magnetism was quite television signals use a 30 Hz frame
iO

stone to discover invisible lines of force different from popular belief. Ampere rate with two interleaved halves to get
EL
surrounding the sphere at opposite concluded it was a force between a 60 Hz rate is to minimize flicker.
ends. Maricourt called these points the electric currents: two parallel currents
SC

E
North and South Poles. In 1600, in the same direction that attract, and Theory of Operation
.H
William Gilbert systematically studied in opposite directions that repel.
A

terrestrial magnetism and demonstrat- The I/O Basics


i2
ed that the Earth itself is a large mag- The Human Eye as There are two outputs — the visible
M

net. In 1820, Hans Christian Oersted a Light Sensor LED and the transformer — that produce
.R
proved a relationship between magnet- the tingling sensation you feel on the
AT

ism and electricity, and in 1825, Our eyes must function over a back hinges. We flipped the transformer
O
William Sturgeon invented the electro- wide range of luminance levels (light around and applied the input to its sec-
OR

intensity per given area). During a ondary, forming a step-up transformer.


normal day, our eyes continuously Figure 5 is a functional block diagram.
C F
RITICAL REQUENCY sample information as images Each ouput has one-second pulses of
UL

F LICKER (CFF) projected onto our retinas (the light


sensitive nerve tissue in your eye
60 Hz up to seven times (see the side-
bar on CFF). When you view the LED, it
CFF is the transition point of an inter-
that converts images from your eye’s appears to be on for the entire pulse
.H

mittent light source where the flickering


light ceases and appears as a continuous optical system into electrical impuls- because the human eye cannot
es sent by the optic nerve to your distinguish 60 pulses a second. There
i2

light. Marks and Bornstein (1973) found


that flicker frequencies ranged from 20 to brain). Our brain integrates or aver- are either four or six Hall effect sensor
35 Hz in normal healthy human eyes. ages these objects to make them circuits as inputs. (Refer to Figure 6.)
.R

This is where you start to experience a appear stable or smoothly moving.


compromised ability to detect flicker and The time our brains require to The Selection Process
O

start to incorrectly interpret it as a


continuous light source. You experience
collect and process these images The 16-to-1 multiplexer selects
this here since 60 Hz appears to you as a limits our eyes’ or visual system’s one channel for each state of the four-
continuously on light source (LED). ability to tolerate rapid change. If bit counter. The first three states select
Various factors determine humans the rate at which our eyes see the 60 Hz oscillator directly. The
perception of flicker. These include the intermittent stimuli is slow, our fourth, sixth, eighth, 10th, 12th, 14th,
intensity and size of the stimulus. eyes perceive this as acceptable and 16th channels are tied to ground

48 May 2007
Martin2.qxd 4/5/2007 10:58 PM Page 49

The Mysterious Magic Box — Part 2

W
W
W

W
W

.G
W

iU
.R

RU
AD

M
iO

EL
SC

E .H
A

i2
M

.R
AT

O
OR
UL
.H
i2
.R
O

■ FIGURE 6. The project’s


schematic diagram.

May 2007 49
Martin2.qxd 4/5/2007 2:43 PM Page 50

■ FIGURE 7. A timing diagram of all six


Hall effect sensors and the starting bit.

two-input NOR gates, U15, is not need-


ed, so it is not installed. This leaves two
of the multiplexer channels floating, so
they are tied low through two addition-
al pull-down resistors, R18 and R19.
■ FIGURE 8. A timing diagram of all six
Hall effect sensors and the starting bit gate is used to invert the most signifi- Quick Summary
showing a missing pawn in Position #3. cant output of the counter to the dis- To summarize the differences in
able input of the first 8-to-1 multiplex- the two versions: Install resistors R18,
W
or low. The fifth, seventh, ninth, 11th, er. Thus, the first 8-to-1 multiplexer is R19, R20, and R21 for the four-sensor
13th, and 15th channels connect to only selected for the first eight counts. version, but omit them in the six-
W
the NOR gate’s outputs. The inputs to The noninverted most significant sensor version. For the six-sensor ver-
the NOR gates are the 60 Hz output is routed to the disable input of sion only, you install Hall effect sensors
W

W
oscillator and one each of the Hall the second 8-to-1 multiplexer. The U13 and U14, associated pull-ups, and
effect sensors. With no magnetic field second multiplexer is therefore select- capacitors (R22, R23, C13, C14, C15,
W

present, the sensor is inactive and the ed for the remaining ninth through and C16), U15 (the second package of
.G
output is pulled high. The high state 16th counts. The two multiplexer’s two-input NOR gates), R23, and R24.
W

blocks the 60 Hz oscillator signal from inverted outputs are connected to a


iU
appearing at the multiplexer input. NAND gate. Inverting the inputs of a The Assembly and
When the sensors are in the pres- NAND is equivalent to an OR gate, so Testing Phase
.R

RU
ence of a sufficiently strong magnetic the NAND gate passes the output sig-
field, the output switches low. The low nal of whichever multiplexer is active. If you have purchased a kit, you
AD

state allows the 60 Hz oscillation to begin this phase by removing the


M
pass through to the multiplexer input. The Four-Sensor Version parts from the box and taking a
iO

This version is slightly different. The cursory and then more detailed parts
EL
The Electronic Detection Process counter is reset after 12 states, so the inventory. Next, you will assemble the
The resultant effect is one pulse of multiplexer, in effect, becomes a 12-to- wooden cradle, pawns, top panel,
SC

E
60 Hz (which appears to your eye as 1 multiplexer. The circuit remains a 16- acrylic sheet, and install the felt and
.H
a continuous illumination) about three to-1 multiplexer, however, four channels paper pads. You then assemble the
A

seconds long. (Again, refer to the are never selected. The counter reset PCB and finish by testing the project.
i2
sidebar on CFF for a more detailed occurs when the two highest significant
M

discussion of flicker rates). This marks bits (the “eight” and “four” outputs) go Ease of Kit Assembly
.R
the start of the sequence. There are six high at the same time. These two To facilitate assembly and testing,
AT

distinct times for pulses of one second outputs are gated through a NAND to we pre-cut the optical fiber cable and
O
duration; one for each of the sensor create the counter reset signal. wires, then pre-stripped and tinned
OR

circuits (see Figure 7). A common PCB can cleverly accom- (solder dipped) one end of each of the
If one of the pawns is missing (for modate both of these two circuit’s two wires and attached a #6 lug on
example, number three), there will be requirements. The counter reset for the the other (see Figure 9). We pre-cut
UL

a missing pulse (see Figure 8). four-sensor system is used when the two all wooden pieces and pre-drilled
most significant outputs are individually the pawns’ bases for easier magnet
Multiplexing jumpered (the jumpers are labeled R20 insertion.
.H

We created the 16-to-1 multiplex- and R21) to the counter reset NAND There is an LED built in for test
er by combining two 8-to-1 multiplex- circuit. The counter reset NAND circuit purposes on both versions. This test
i2

ers with two NAND gates. One NAND is disabled for the six-sensor system by LED does double-duty on the
leaving out the jumpers (R20 and enhanced version. It is an LED with a
.R

R21) for the inputs of the NAND shroud and optical fiber that also
and installing pull-down resistors serves as the missing pawn visual
O

R24 and R25 instead. detector. The LED on the standard


When there are only four four-pawn version is a stand-alone
sensors, the second package of purplish-blue LED that you observe
during the check-out procedure. It is
■ FIGURE 9. The stripped and not visible to the outside world as part
pre-tinned wire and optical cable. of visual detection scheme.

50 May 2007
Martin2.qxd 4/4/2007 3:55 PM Page 51

The Mysterious Magic Box — Part 2


Power Conserving CMOS ICs test this by pointing the free end of the you bridge it with a spent clipped
This project’s ICs — including Hall optical cable at a light source and resistor lead. Components R20 and
effect sensors — are all CMOS. The two observing the light in the hole from R21 are labeled as resistors, but are
555 timer ICs can also operate up to 2 the outside of the box. actually jumpers that are used for the
MHz. The CMOS high input impedance Replace the brass screws and nuts four pawn version. These two jumpers
allows you to use smaller timing capac- you initially removed from the back are not included in the six pawn ver-
itors than you would normally use on hinges. It is best to hold the nut and turn sion. You use two pull-down resistors,
the non-CMOS NE555. This results in the screw from the back of the box with R24 and R25, to disable the circuit
greater accuracy in time delays and a screwdriver, advancing the screw required in the four pawn version.
oscillations. Lower power consumption within and securing the nut. If holding
across the full range of power supply the nut proves difficult, you may wish to • Power Component Leads. Leave
voltages is the best feature for battery- allow the shrink tubing to hold it as you these long. They will later serve as
W
operated applications like this. start the nut and get a turn or so going. convenient “hooks” for a probe when
Remove the paper Alignment you test the project’s power supply.
W
Mechanical Assembly pattern from the box’s lid if you have
NOTE: Most instructions assume a kit. (Align this pattern with the • Install the Battery Holder and
W

W
the six pawn version with the LED acrylic sheet using the four corner Transformer Last. We suggest you do
holder and optical fiber cable. For holes as reference points and this, which will require you to use clip
W

the four pawn version, substitute the temporarily tape into place.) leads and an external DC power supply
.G
regular LED and ignore instructions The Alignment pattern inside the during testing of the project’s power
W

related to the optical fiber option. box’s lid has three sets of intersecting supply section. If you don’t have a DC
iU
Insert the magnets in the pre- circles. The largest represents the peel- power supply on your bench, use clip
drilled base of each pawn. If you drill off adhesive backed paper patterns leads to your nine volt battery.
.R

RU
the pawn holes too deeply, fill them in used to conceal the electronics below.
with wood putty — until the magnets The next two sized holes represent the • Installing Capacitors. Exercise care
AD

are flush with the outside surface. plastic hardware spacers through which here by bending them over affording
M
Place a felt pad over each magnet you pass the sensors so their respective clearance when you solder the Hall
iO

to conceal it to help preserve the trick. magnets will be able to activate only effect sensor leads. This assumes you
EL
Temporarily remove the brass that sensor. There are some crosshairs install the capacitors first.
screws and nuts from the rear hinges. that indicate where the active sensing
SC

E
Assemble the three wooden area of the Hall effect sensors’ facades • Installing Resistors. We highly recom-
.H
pieces with the six Escutcheon pins, will reside once bent over. Bend all mend you check all resistors with a
A

small brads, or nails provided. Ensure sensors toward the middle in all DMM since there are some 1% resistors
i2
that the piece with the recessed instances to intersect the crosshairs. with five stripes; the extra stripe is a reli-
M

drilled hole faces to the outside and ability code and this can be confusing.
.R
appears on the right. Precautionary Assembly Tips
AT

Attach and shrink the 1/8” shrink The following tips are from our • Look for Shorted Adjacent Pins.
O
tubing at one end of the optical cable. empirical observations after assembling Double-check the adjacent pins on
OR

Cut at 90 degrees the combined this DIY project’s PCB numerous times. the Hall effect sensors and voltage
optical cable and shrink tubing with a regulator for solder bridges. We
blade as close to the end as practical. • Tilt Sensor Leads. Leave these leads suggest using the continuity beeper
UL

Insert the shrink tubing end through long so that you can purposely short found on most DMMs to check their
the narrow side of the (Nylon) them during test. This alleviates your very closely spaced 50 mil leads.
shoulder washer (see Figure 10) and concern about tilting the PCB in just
.H

make it flush with the wider side. the right way to power the project. • Hall effect Sensors’ Crucial Lead
Insert the narrow side of the
i2

plastic (Nylon) shoulder washer (mold- • Save Your Spent Leads. Some of the
ed Nylon insulator) into the piece with resistors serve as bridges where resis-
.R

the 1/4” recessed hole (to the right) tors R10, R20, and R21 should have
until the washer is flush with the wood- gone. As the design evolved, it used a
O

en surface. This completes the cradle. different voltage regulator of just 3.3
Insert the cradle into the box, volts, so there was no longer a need
again, with the recessed hole or shoul- for a series limiting resistor (R10). Now
der washer to the right. The optical
cable and hole should line up with the ■ FIGURE 10. The nylon extended shaft
hole in the side of the box. You can shoulder washer.

May 2007 51
Martin2.qxd 4/4/2007 3:56 PM Page 52

■ FIGURE 11. The proper bending


battery; the 3.33 volt regulator circuit
technique for the sensors’ bodies — (because sensors cannot handle all 9V)
push down on the leads and hold runs the sensors, logic, and LMC 555
them fast with pliers, protecting the oscillators. Bend the tilt sensor leads so
leads from strain as they enter the they do not lay flat to the surface
sensors’ bodies. below. This enables the internal ball
bearing to roll away from the contacts.
Electrical Assembly This opens the circuit and reliably turns
and Testing the circuit off when you tilt the box on
its back hinges (see Figure 31 in last
Both versions of the available month’s issue to better visualize how
kits have two pots: a 10K and a the tilt sensor actually works).
W
Lengths. The sensors must intersect the 100K pot. Due to multiple sources of Connect the 9 VDC power supply
crosshairs in the paper pattern for prop- supply, these components assume or battery to battery inputs and
W
er alignment directly below the magnets different shapes and footprints; there- measure the output of the voltage
for optimum effectiveness and reliability. fore, the PCB accommodates this by a regulator. The nominal value is 3.33
W

W
We suggest you bend the sensor body universal footprint that accepts a VDC. The worst-case range is 3.16
so it just slightly overlaps the Nylon variety of different pots (see Figure VDC to 3.50 VDC. The selected val-
W

spacers’ lip (see Figure 11). Ensure that it 12). This is also true with C1, the 6.8 ues of the two programming resistors
.G
faces so the nomenclature on the IC µF 555 timer IC’s timing capacitor, ensure they sink enough current to
W

points upward (see Figure 4 again). which has three leads (see Figure 13). exceed the minimum output current
iU
This beneficial feature may seem required by the voltage regulator IC.
• Hall effect Sensor Handling. These ICs strange to you. The positive terminal Assemble the LED driver circuit:
.R

RU
have extremely brittle, unforgiving leads. goes in the center hole. The two outer R13, LED, Q1, jumper (R10, an electri-
If you incorrectly bend a sensor with the holes are for the negative terminals, so cal short in the form of a simple piece
AD

façade pointing down, you’ll need to re- it is impossible to install this polarized of wire or clipped component lead), R8,
M
bend it. After several bends, its brittleness capacitor backwards. and pot R9. For the six pawn kit version,
iO

can cause the leads to snap off. Properly On later versions of the kits, we when you mount the LED/optical fiber
EL
bending and soldering these closely use an ordinary two lead polarized 6.8 holder, screw it in first using the plastic
spaced sensor leads is by far the most µF capacitor since we only had a hardware supplied. Ensure the two plas-
SC

E
difficult part of assembling this project. limited number of these foolproof- tic alignment nibs (positioning/seating
.H
We averaged two solder bridges per insertion capacitors. The PCB also feet) are properly seated in the two
A

every six sensors installed, and we are accommodates 0.01 µF or 0.02 µF holes on the PCB right behind the col-
i2
both experienced electrical engineers. capacitors with 0.2”, as well as 0.25” let. This allows you to solder it without
M

lead spacings (see Figure 14). We fear of slippage or improper positioning.


.R
■ FIGURE 12. A PCB multiple footprint discovered after experimenting and For the four pawn version, make
AT

accommodating the pot insertion pattern. running tests that the Hall effect sensors sure the cathode lead goes in the hole
O
recommended output capacitors may marked “K” and that the anode lead
OR

be either a 0.01 µF or 0.02 µF capacitor. goes in the hole marked “A.” The
typical LED has a shorter lead and a
Electrical Assembly flat on the cathode side of the lens.
UL

Procedure Failure to insert a bridge or wire


(short) where R10 goes will cause the
Assemble the power supplies: Tilt kit to function improperly.
.H

the switch circuit to connect the 9V Assemble the 1 Hz oscillator (U6


circuit). Test with a DMM/frequency
i2

counter or use a test lead to jumper a


■ FIGURE 13. A three-lead, foolproof 1 Hz oscillator to LED driver (either
.R

insertion, polarized capacitor. terminal of R8) to verify its operation.


Assemble the 60 Hz oscillator
O

(U5 circuit). Test with a DMM/


frequency counter or jumper a 60 Hz

■ FIGURE 14. The PCB layout pattern


showing built-in accommodation for
various capacitor spacings.

52 May 2007
Martin2.qxd 4/5/2007 2:44 PM Page 53

The Mysterious Magic Box — Part 2


oscillator to LED driver to verify its ■ FIGURE 15. The Hall
operation. It will look like it is continu- effect sensors all properly
ously on with the LED driver; it should pointing inward toward the
be flashing at about 60 Hz. PCB’s center.
Complete the assembly of the
sensor circuits by adding 0.1 µF, 0.01 µF, supply and observing the
or 0.02 µF, the sensors, NOR gates (U7, LED. It should be on for
and U15 for the six pawn version), and three counts at the start of
pull-up resistors (R1-R4, R22, and R23). It the sequence and one
works best to install the sensors last. First count for each sensor
bend the sensor leads at a 90-degree location activated.
angle (see Figure 10 again). Insert the You can accomplish
W
sensor leads into a 1/4” spacer. this by holding one magnet
This is an absolute must and is vital- close to each sensor and observing the ends of wires) to improve their
W
ly crucial to ensure good reliable opera- the pulse timing change. There should soldering ability during assembly. Most
tion. Insert a Hall effect sensor into the be one long pulse for the marker pulse often you do this using a solder pot (as
W

W
appropriate white plastic spacer and and one short pulse for the detected we have done for you in the kit). The ter-
bend the leads over with the sensor’s magnet. The short pulse time relative minal block is a Eurostyle 5 mm (.197”)
W

nomenclature side face up so that the to the long pulse will change depend- pin-to-pin spacing model. It uses 0.05”
.G
sensor’s body just barely overlaps the ing upon which sensor you activate. round pins instead of 0.025” square pins
W

edge of the spacer. This ensures a prop- like wire-wrapping terminals have.
iU
er length that the sensor will jut out to Adding the Tingling
coincide with the maximum magnetic Circuit (T1 and TB1) A Two-Part Terminal Block
.R

RU
field from the magnet directly above it. The terminal block’s upper
Next insert the leads into the cor- Take the two wires (as in the kit) portion slides over these two pins.
AD

responding pads on the underside of and unscrew the terminal block’s ter- This conveniently allows you to slide
M
the PCB (the side without a silkscreen). minals. Now slide the pre-tinned bare off the two wires which — after you
iO

The spacers will be near the capacitor ends of the wires underneath each unscrew the collet of the LED on the
EL
and the pull-up resistor leads solder terminal. Tighten the screws so the ter- enhanced version — allow you to
pads, so it is easier to solder these minal block securely holds the wires. temporarily remove the PCB from the
SC

E
components in place before installing There are two brass screws on the two base. This might prove handy when
.H
the sensor. If you install each sensor back hinges. Unscrew these and tem- you change the nine volt batteries.
A

correctly, it will “point” to the center of porarily remove their nuts to slip the
i2
the PCB (see Figure 15). The silkscreen lug over the screw. Take the other end More Foolproof Instructions
M

outline for the sensor location has a of each wire with the #6 lugs. Attach It does not matter which way you
.R
chamfered corner to denote pin 1 (see the nuts back onto these two screws. attach the upper portion of the termi-
AT

Figure 16). When you look at the face These are for the transformer’s
O
of the sensor with printing and with output, and provide the tingling
OR

the leads pointed down, pin 1 is on the sensation for missing pawn
left, pin 2 is the center pin, and pin 3 detection by the tactile method.
is the pin on the right (see Figure 17). Now you can push-fit the top
UL

Test each sensor circuit at the of the terminal block onto the
output (pin 3) with a DMM or use a test two pins that you soldered onto
lead to jumper the output (pin 3) to the the PC board (see Figure 18).
.H

LED driver. The presence of a sufficient- The transformer’s output


ly strong magnetic field with the close attaches to the terminal block. It
i2

proximity of one of your assembled holds two conductors or wires.


pawns makes the output of the sensor Each wire needs a #6 lug on one
.R

short to ground. The LED remains on end and a pre-tinned bare wire
until the sensor detects the magnet. on the other end to prevent
O

When the sensor detects the magnet, corrosion. Pre-tinning is applying


the output goes low, turning off the LED. solder to metallic parts (usually
Assemble logic (U1, U2, U3, and
U4), pull-up resistors (R11), and pull- ■ FIGURE 16. Here is the PCB
down resistors (R15, R24, R25). Test component outline drawing/
this by connecting the 9 VDC power silkscreened pattern.

May 2007 53
Martin2.qxd 4/5/2007 2:44 PM Page 54

■ FIGURE 17b. The


Hall effect sensor
IC’s outline drawing.
Artwork courtesy of
Allegro Microsystems.

should get a strong


tingle in your fin-
gers each time the
test LED illuminates.
The DMM will
measure a large
W
voltage and/or the
same frequency as
W
the 60 Hz oscilla-
tor. If you prefer a
W

W
less intense tingle,
you can increase
W

the value of the


.G
pot to further limit
W

the current into


iU
the base of
Q1. Conversely,
.R

RU
decreasing the
value of the pot
AD

■ FIGURE 17a. The Hall effect sensor


former’s input and it will not pass DC. yields a more intense tingle.
M
IC’s pin assignment. Artwork courtesy
of Allegro Microsystems. Turn the 10K pot (R9) to the mid- Permanently install the battery
iO

dle of its range. One side of the pot is holder with Nylon screws and nuts
EL
nal block since it carries AC (has no shorted to the tap, so you increase or and solder the pins to the board.
polarity) to the hinges for the tingling decrease the resistance in the circuit Once you assemble and test the
SC

E
or tactile missing pawn detection when you adjust the pot. You can test PCB, insert the four wood screws (one
.H
method. If it seems strange to you that the circuit with the DMM or touch it in each corner of the top wooden panel
A

this is AC in a battery powered proj- with two fingers of one hand after with the PCB assembly), the longer
i2
ect, remember, AC pulses the trans- attaching the wires to the hinges. You spacers, and the acrylic sheet aligned
M

.R
AT

HALL EFFECT IC AND SENSOR MANUFACTURERS


O
■ Allegro Microsystems — {Hall effect ■ CR Magnetics, Inc. — {DIN rail or ■ Micronas Intermetall — {Hall effect sen-
OR

sensors}; 115 Northeast Cutoff, Worcester, panel mount DC Hall effect current sors} Hans-Bunte-Strasse 19, P.O. Box 840,
MA 01606; (508) 853-5000. transducers modules} 3500 Scarlet Oak D-79108 Freiburg, Germany; 49-761-517-0;
Blvd, St. Louis, MO 63122; (636) 343-8518; Fax: 49-761-517-2174; www.intermetall.de.
■ American Electronic Components, Inc. Fax: (636) 343-5119; Email: sales@cr
UL

— {Hall effect sensors} 1101 Lafayette magnetics.com. ■ Motion Sensors, Inc. (MSI) — {Hall
Street, Elkhart, IN 46516; (574) 295-6330; effect sensors} 786 Pitts Chapel Rd.,
Toll Free: (888) 847-6552. ■ Honeywell — {Hall effect sensors} 101 Elizabeth City, NC 27909; (252) 331-2080;
.H

Columbia Road, Morristown, NJ 07962; Fax: (252) 331-1666; Email: info@motion


■ Amploc — {Hall effect current sensors} (973) 455-2000; Fax: (973) 455-4807. This sensors.com.
i2

P.O. Box 152, Goleta, CA 93116; (805) link describes an excellent book on the
964-9119. subject published by Honeywell www. ■ Optek, Inc. — {Hall effect sensors} North
.R

sensorsportal.com/HTML/BOOKSTORE/ American Headquarters Mexico and The


■ F.W. Bell/Bell Technologies, Inc. — {Hall Hall_Effect_Sensors.htm. Americas, 1645 Wallace Drive, Carrollton,
effect sensors} A Division of Sypris Test & TX 75006; (972) 323-2200; Toll Free: (800)
O

Measurement; 6120 Hanging Moss Road, ■ Infineon — {High sensitivity Hall effect 341-4747; Fax: (972) 323-2396; Email:
Orlando, FL 32807; (407) 678-6900; Toll sensors} Service Center: (866) 951-9519. sensors@optekinc.com.
Free: (800) 775-2550; Fax: (407) 678-0578.
■ Melexis Microelectronic Integrated ■ X ensor Corporation — (Hall effect
■ Cherry Electrical Products — {Hall effect Systems — {Hall effect sensors} 41 Locke sensors — single, dual, and triple) 530
sensors} 11200 88th Avenue, Pleasant Road, Concord, NH 03301; (603) 223-2362; South Henderson Road, Suite A, King of
Prairie, WI 53158; (262) 942-6500. Fax: (603) 223-9614. Prussia, PA 19406; www.xensor.com.

54 May 2007
Martin2.qxd 4/5/2007 2:31 PM Page 55

The Mysterious Magic Box — Part 2


and sandwiched between. Use a
5/16” spacer and a #4 by 3/4” wood A CKNOWLEDGEMENTS
screw at each corner. Attach wires to ■ We wish to thank Stephanie Fennelly
the terminal block and hinge screws if of Allegro Microsystems for supplying
us numerous pieces of high quality line
you have not already done so.
art and for having a member of the
Insert the optical fiber into the Allegro technical staff read this article to
heat shrink at one end and shrink the ensure its technical accuracy.
tubing. You can easily shrink it with a
hair dryer, but do not touch it with a sol- Test the assembly by installing the
dering iron! This can damage the optical six pawns into their respective holes.
fiber. Use another piece of shrink tubing You should observe seven pulses at ■ FIGURE 19. Inserting the nylon
around the tilt sensor so that it does not the end of the optical fiber through extended shaft shoulder washer into
W
inadvertently short to anything metallic. the pinhole and feel the correspon- the cradle’s right side member.
Cut a small piece of the end with a ding tingles when you touch the
W
razor knife at 90 degrees to get a clean hinge. You should observe one long tion of the Magic Box and are able to
end for maximum light output. Insert the and six short pulse durations. spend many hours mystifying and
W

W
heat-shrunk end through the wooden We hope you enjoy the construc- bewildering family and friends. NV
support on the side of the box
W

with the corresponding hole.


.G
ITEM DESCRIPTION
There will be a 1/4” or 3/8” Passives (all resistors are 1/4 watt 5% unless stated otherwise)
W

sunken recess about 0.05 ❑ R1, R4, R7, R11, R12,


iU
inches deep on the side which R15, R18, R19, R22-R25 100K
❑ R5 120K
faces the interior of the box.
.R

❑ R6
RU
100K rate control pot (various suppliers)
Insert the optical fiber and heat ❑ R8, R13 100Ω
shrink through the molded ❑ R9 10K amplitude control pot (various suppliers)
AD

❑ R10, R20, R21 Onboard jumpers


Nylon insulator so that the
M
❑ R14 10K
“washer” side is nearest and ❑ R16 215Ω, 1%
❑ R17
iO

flush with the end of the optical 357Ω, 1%


EL
❑ C1 6.8 µF tantalum polarized capacitor
fiber. Insert the molded Nylon ❑ C2-C8, C13, C14 0.1 µF capacitor 0.25” spacing (various suppliers)
insulator, with the fiber running
SC

❑ C9-C12, C15, C16


E
0.01 or 0.02 µF capacitor 0.2 or 0.25” spacing (various suppliers)
through it into the 9/64” hole in
.H
the wooden support (see Figure Semiconductors
❑ U1 74AC00
A

19). Insert the wooden supports ❑ U2, U3


i2
74AC151
into the box. This should line up ❑ U4 74AC161
M

the optical fiber with the hole in ❑ U7, U15 CD4001B


.R
❑ U5, U6 LMC555CN
the box’s side.
AT

❑ U8 LM317LZ
Attach the terminal block ❑ U9, U10-U14 A3214LUA SOT package (Digi-Key P/N A3214LUA-ND)
O
to the PCB assembly. For the six ❑ LED 1 LEDXMTR blue LED or Industrial Fiber Optics P/N IF-E96
(Digi-Key P/N FB128-ND)
OR

pawn version, attach the optical ❑ Q1, Q2 PN2222A


fiber to the PCB. Insert the 9
VDC battery into its holder. Misc.
❑ S1
UL

SPST tilt switch, metal case two-lead


Install this assembly with the (Electronix Express Rollerball P/N 1700TLRB)
PCB component side down and ❑T 2 VA CT transformer, like Tamura SB2812-1204
the battery holder to the right. (Digi-Key P/N MT7249-ND)
.H

❑TB1 2 pin .197” (5mm) Euro terminal block (Jameco P/N 164793)
❑Two #6 stud ring terminals,
■ FIGURE 18. Installing the
i2

22-16 AWG (Jameco P/N 103684)


wires onto the terminal block. ❑ 9 VDC battery holder (Digi-Key P/N BH9V-PC-ND)
❑ Six or four pawns with six or four magnets and felt self adhesive pads
.R

❑ Metallic hardware
❑ 19 pieces of plastic hardware
O

Notes
For the six pawn enhanced version, delete R18-R21. For the basic four pawn version, delete
C13-C16, R22-R25, and U13-U15. Send a personal check, cashier's check, or money order.
International orders also accepted. Address it to Vaughn Martin, Zonemasters, 106 Shadowood
Drive, Warner Robins, GA 31088. The price of the six pawn kit is $39.95 plus $5 shipping and the
four pawn kit is $33.50 plus $5 shipping. The wooden box is $12 postage paid and the PC board
is $12.50 postage paid; www.zonemasterskits.com.

May 2007 55
O
.R
i2 .R
O
E .H
EL i2
.H
RU
M UL
iU OR
.G AT
W A M
W SC
W iO
AD
Page 56

.R
7:34 PM

May 2007
W
4/5/2007

W
Page56.qxd

56
Full Page.qxd 4/4/2007 3:40 PM Page 57

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! Laptop Hard Drives!


Even before there was a place called “Silicon Valley”, HSC was the favorite stop of hardware hackers, ♦ Toshiba MK6015MAP 6.0 GB Drive
techno-tinkerers, entrepreneurs and engineers on a budget! We have been buying and selling the Valley’s ♦ 2.5” SATA Interface -- New!
excess inventory for 40 years now, and our collection is second-to-none! We are also factory-authorized HSC#21403 $14.95
distributors for many fine lines of parts, tools, equipment and accessories, so we feel we should be your first ♦ Samsung MP0603H 60.0 GB Drive
Fujitsu Laptop Power Supply
stop when shopping for electronic basics. Give our ever-expanding website a try and see what we mean! ♦ 2.5” SATA Interface -- New!
16VDC, 3.75 A, Fits many models HSC#21399 $59.95
HSC#21183 $24.95 ♦ External USB-interface 2.5” Case
W
♦ Bundled Price with above -- reg 14.95!

Solar Panel 4.7 - 5.0 VDC, .25W 12 VDC Hobby Motor HSC#80824 $12.50
60 x 60 mm, CuInSe 1.25” dia Globe IM-13
W
Vicor 48VDC 2.1A Flatpac Supply
HSC#80821 $4.95 HSC#21371 $4.95
HSC#80849 $27.50 Belden Blowout!
W

Genuine Belden Cable at super prices!


W
♦ Belden 8240 RG-58/U Coax Cable
USB 2.0 to IDE Drive Adaptor ♦ 20 AWG center cond., 95% shield
♦ Black PVC jacket, .193” dia.
W

HSC#80822 $14.95
.G
♦ 1000’ Easy Box Dispenser- list $431!
“Backpack Bantam” Cushcraft 710 - 750MHz Antenna
Parallel-port external CD ROM HSC#21153 $12.50 HSC#21381 $149.00
W

RF Transistor Engineering Kit


iU
54 different devices
HSC#20972 $19.95 ♦ Belden 9502 2-Twisted Pair Cable
♦ Four 24 AWG stranded conductors
HSC#20999 $29.50 ♦ Beldfoil 100% shield w/ drain wire

.R

1000’ Easy Box Dispenser- list $526!


RU
12 VDC Hobby Motor
HSC#21380 $149.00
1” dia., Qty Discounts! Small DC Gearmotor
AD

♦ Belden 8760 Twisted Pair Cable


6 - 12 VDC, 3 - 6 RPM
HSC#21369 $2.50 ♦ Two 18 AWG stranded conductors
AC Adaptor, 12VDC, 3.4A HSC#80812 $12.95
M
♦ Beldfoil 100% shield w/ drain wire
External 3.5” IDE Drive Case HSC#19312 $12.50 ♦ 1000’ Easy Box Dispenser - list $405!
HSC#19976 $19.95 HSC#21379 $149.00
iO

EL
700MHz Transceiver
Hobbyist Special! Fujitsu PenCentra
SC

E
PCMCIA DVD/MPEG Video Card
HSC#21067 $19.95 PCMCIA FireWire card
HSC# 20829 $12.50 Tablet Computer -
.H
HSC# 20830 $12.50 Clearance!
A

29.4 GHz Transceiver


i2
with 12” dish -- Wow!
M

HSC#21154 $95.00
.R
Tripplite Outlet Strip, 5 ft. long
AT

USB Mini-Footprint Keyboard Logitech QuickCam Express


HSC#20794 $39.95
HSC#80842 $12.50 HSC#21061 $19.50
O
OR

Pressure Transducer, 0-30 psi ♦ Fujitsu PenCentra 130 computer


HSC#21066 $9.95 ♦ 131 MHz NEC VR4121 MIPS CPU
Touch-screen element (no LCD) ♦ 32MB DRAM, 24MB ROM, 8MB Flash
Hands-free Cell-phone Headset
UL

for Palm V, VX, IBM Workpad -- New! Step-down Toroid Transformer ♦ Color DSTN Touch LCD 640 x 480
2.5mm plug fits many phones
HSC#20529 $2.95 240 - 120 VAC 250VA
HSC#21118 $2.95 ♦ PCMCIA, VGA, PS2, USB, SIO ports
HSC#21058 $35.00 ♦ Win CE 2.11 Pro in PROM (no disks!)
♦ Microsoft Pocket Office, Outlook, IE
.H

♦ “Radio Ready” for LAN/WAN PC Card


♦ Internal microphone, speaker & jacks
320 X 240 LCD Module ♦ Stylus, Mini Keyboard, Dock & PS
♦ New, never used, 90-day warranty!
i2

Slo-Syn Driving Motor with back-light Embedded Wireless Transceiver!


Model SS-50, 120V, .3A
HSC#80815 $19.95 2.4GHz - 200mW, 5VDC Peltier Module - Electrocooler!
HSC#20724 $34.95 HSC#21001 $65.00 HSC#80813 $24.95 HSC# 80797 $119.00
.R

Since 1964!...
O

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

May 2007 57
O
.R
i2 .R
O
E .H
EL i2
.H
RU
M UL
iU OR
.G AT
W A M
W SC
W iO
AD
Page 58

.R
8:34 PM

May 2007
W
4/5/2007

W
Page58.qxd

58
Full Page.qxd 4/4/2007 3:46 PM Page 59

ew
675+ N s
t
Produc

ages
430+ P r
lo
Full Co
Ou
expand r brand new,
e fu
It's bur d catalog is o lly
and th s t ing ut no
Jacob’s Ladder High e lates with new pr w!
Visit w t o
Voltage Display Kit ww.jay in electronic ducts
KC-5445 $23.25 + post & packing
get yo c a r.com kits.
W
With this kit and the purchase of a ur FRE /catalog to
E
today. copy
12V ignition coil (available from auto stores POST AND PACKING CHARGES:
and parts recyclers), create an awesome Order Value Cost Order Value Cost
W
rising ladder of noisy sparks that emits the $25 - $49.99 $7.50 $200 - $499.99 $60
distinct smell of ozone. This improved circuit $50 - $99.99 $20 $500+ $75
is suited to modern high power $100 - $199.99 $40
W

W
ignition coils and will deliver a Max weight 12lb (5kg). Heavier
spectacular visual display. Kit includes Speedo Corrector MKII Kit parcels POA. Minimum order $25.
PCB, pre-cut wire/ladder KC-5435 $29.00 + post & packing
W

Note: Products are dispatched from Australia,


When you modify your gearbox, diff ratio or change
.G
and all electronic local customs duty and taxes may apply.
components. to a large circumference tyre, it may result in an
Improv inaccurate speedometer. This kit alters the
• 12V car battery, 7AH model ed Programmable High Energy
W

iU
SLA battery or 5Amp fo
2007 r
speedometer signal up or down from 0% to 99% of
DC power supply required the original signal. With this improved model, the Ignition System
input setup selection can be automatically KC-5442 $52.25 + post & packing
.R

50MHz Frequency Meter MKII Kit detected and it also features an LED This advanced and versatile ignition system can be
RU
KC-5440 $40.75 + post & packing indicator to show when the used on both two & four stroke engines. The system
This compact, low cost 50MHZ Frequency Meter is input signal is being can be used to modify the factory ignition timing or
AD

received. Kit as the basis for a stand-alone ignition system with


invaluable for servicing and diagnostics. This upgraded variable ignition timing, electronic coil control and
version, has a prescaler switch which changes the units supplied with
M
anti-knock sensing.
from Mhz to GHz, kHz to MHz and Hz to kHz, and PCB with overlay Features:
Improv
has 10kHz rounding to enable RC modellers to and all electronic model ed • Timing retard & advance over a wide range
fo
2007 r
iO

components with clear • Suitable for single coil systems


EL
measure more accurately. Kit includes PCB with
overlay, enclosure, LCD and all electronic components. English instructions. • Dwell adjustment
Other features include: • Single or dual mapping ranges
Fuel Cut Defeat Kit • Max & min RPM adjustment
SC

• 8 digit reading (LCD)


E
KC-5439 $11.75 + post & packing • Optional knock sensing
• Prescaler switch • Optional coil driver
This simple kit enables you to defeat the factory fuel cut KC-5442 Ignition
.H
• Autoranging Hz, kHz or MHz • Kit supplied with PCB, and
• 3 resolution modes including 10kHz rounding, 0.1Hz signal from your car's ECU and allows your turbo all electronic components. System
up to 150Hz, 1Hz up to 16MHz and 10Hz up to charger to go beyond the typical 15-17psi factory boost
A

limit. - Note: Care should be taken to ensure that the


i2
16MHz KC-5386
Im
prov boost level and fuel mixture don’t reach Hand
model ed
M

fo unsafe levels. Controller


2007 r
• Kit supplied with PCB,
.R
Requires 5VDC and all electronic
AT

Wall adapter use KC5444 Coil Driver Due


components. Next
Jameco #228726
O
$12.95 Ignition Coil Driver Month
KC-5443 $26.00 + post & packing
Deluxe Theremin
OR

Note: Prototype shown Add this ignition coil driver to the KC-5442
Synthesizer MKII Kit Variable Boost Kit for Programmable Ignition System and you have a
KC-5426 $87.00 + post & packing complete stand-alone ignition system that will
By moving your hand between the metal antennae,
Turbochargers trigger from a range of sources including points,
KC-5438 $11.75 + post & packing
UL

create unusual sound effects. The Theremin MkII allows Hall Effect sensors, optical sensors, or the 5 volt
It's a very simple circuit with only a few components signal from the car's ECU. Kit includes PCB with
for the adjustments to the tonal quality by providing a
to modify the factory boost levels. It works by overlay and all specified components.
better waveform. With a Improv intercepting the boost signal from the car's engine
multitude of controls this model ed
Knock Sensor
.H

fo
2007 r
management computer and modifying the duty cycle
instrument's musical potential
of the solenoid signal. Kit supplied in KC-5444 $10.00 + post & packing
is only limited by the skill
short form with PCB and Add this option to your KC-5442 Programmable
and imagination of it's
i2

overlay, and all specified High Energy Ignition system and the unit will
player. Kit includes stand,
electronic components. automatically retard the ignition timing if knocking
PCB with overlay, machined case
Note: Prototype is detected. Ideal for high performance cars running
with silkscreen printed lid,
.R

shown high octane fuel. Requires a knock sensor which is


loudspeaker, pitch and volume antennae
cheaply available from most auto recyclers.
and all specified electronic components.
• Kit supplied with PCB, and all electronic
Requires 9-12VDC Wall adapter use
O

components.
Jameco #252751 $12.05
Log on to
www.jaycar.com/catalog 430+
page
for your FREE catalog! Catalog
1-800-784-0263
(Monday - Friday 09.00 to 17.30 GMT + 10 hours only). All
For those who want to write: 100 Silverwater Rd
prices in
Silverwater NSW 2128 Sydney AUSTRALIA
USD www.jaycar.com
w w w. j a y c a r. c o m
Driscoll.qxd 3/30/2007 7:40 AM Page 60

HACKING
THROUGH
Hardware Hacking
Projects for Geeks
S cott Fullam wants to hack into your computer.
W
Your satellite dish. And even your coffeepot
and toaster. Actually, it’s worse — the former Apple
W
employee wants you to do his dirty work for him.
W

W
by Edward B. Driscoll, Jr.
W

.G
W

iU
and retail booksellers). old-timers — the Internet coffeemaker.
.R

RU
It’s a book that does a It’s a homage to a project by
Fullam is the author of Hardware great job of teaching Cambridge students in the late 1980s,
AD

Hacking Projects For Geeks, an basic electronics skills through a when they mated a video cam with a
M
O’Reilly & Associates release variety of projects that can be created coffeepot, to remotely see via the
iO

(available at www.oreilly.com/ as a reader’s skills progress. The first Internet if coffee was done.
EL
catalog/hardwarehks, Amazon.com, half of the book contains some fun “I really was sort-of inspired by my
but smaller projects, such as building a own experience. I learned by taking
SC

E
battery pack to extend the life of things apart, I learned by building
.H
Meet the Hacker a laptop, an aquarium inside a Mac things,” Fullam explains. “I didn’t always
A

Fullam is a 30-something-year-old computer, and transforming a understand what I was doing at the
i2
computer consultant who resides in Primestar satellite TV dish into an time. But the process you go through to
M

Menlo Park, CA — not all that far 802.11b wireless Internet extender. do that thing, you pick up the skills; you
.R
actually, from where another famous In the second part of the book, gain an understanding of that object
AT

hacker, Steve Wozniak, designed what the projects get more advanced, but and of those skills. So that’s really how I
O
would become the Apple computer.
they build on the basics taught in the tried to structure the book — it’s learn-
Fullam has been an inveterate tinkerer
OR

ever since he was 10 years old living in


first half. Throughout the book, there ing by doing. It’s sort-of part cookbook,
upstate New York and hacking his are little thermometer-shaped graphs part tutorial, and part ‘hey, this is a great
RadioShack 100-in-1 electronics kit to that show what’s involved in a project jumping off point, and you can use your
UL

build an intruder alarm to keep his and how much money it will cost. skills to build some new stuff.’”
sister out of his room. The second half of the book has Every project contains a complete
Fullam eventually attended MIT, some great projects: a way to fill the parts list with information on where to
.H

where he earned bachelors and masters windows of a multi-story office build- buy the parts, and the book is
degrees in electrical engineering and ing with lights and create a Goodyear thoroughly illustrated with black and
i2

computer science. While an undergradu-


blimp-style display that can be white photos, showing both the
ate there, to help see if there was
remotely controlled; building a completed project, and many of the
.R

any hot water available in his


dorm during the brutal New home arcade machine steps to get it to that point. There are
(complete with standup also plenty of schematics and
O

England winters, he built a


detection system so that he case); wearable comput- diagrams. “I’m a very visual person, so
could see if the community ers; radio controlled cars those things at least helped me, and I
shower was in use. that play laser tag; a thought they would help others, as
After graduating from toaster that will burn well,” Fullam says. “I really tried to
MIT, Fullam designed
user-programmed words take a lot of the work out it, so that
children’s toys in New York,
onto a piece of toast; and you could build the project as listed by
Continued on next page
a great in-joke for Internet following the instructions.”
60 May 2007
Driscoll.qxd 3/30/2007 7:41 AM Page 61

Burning the Toast and built close to 50 prototypes in two


years, including “Teen Talk Barbie.” He
So how did Fullam end up then went to work at Apple Computer
writing a book about hacking? in the Advanced Technology Group
A few years ago, he was designing digital still cameras. He
approached by a friend of his holds 15 patents, several of them for
from grad school who was his work in bringing some of the first
working for O’Reilly. “And they digital cameras to the marketplace.
were looking to expand their Some of Fullam’s other patents
stem from his work with
repertoire of books; push them-
PocketScience, which he co-founded in
selves in an area that they maybe 1995. PocketScience (now called
hadn’t approached before. My PocketMail) develops mobile e-mail
associate, when he thought communications products and servic-
W
about hardware hackers, mine was the cherry on the cake with the book’s cover, es. As the chief technology officer,
first name that popped into his head! which features the classic black horn rim Fullam personally developed all of the
W
“We saw an open forum as far as Woody Allen glasses long associated algorithms for the company’s products.
what we could do, and I just decided to (rightly or wrongly) with computer geeks, Fullam now works as an
W

independent consultant assisting


W
pick out some work and projects that I held together at the bridge with white
consumer electronic companies. Not
had done before, even some new ones, tape, on top of a set of schematics. The surprisingly, he often takes his own
W

and look around in the community and book begins with a very ominous
.G
consumer electronics products apart
see what people had done that I disclaimer that releases O’Reilly from and tinkers with their features. In a
W

thought was interesting.” Fullam then any damages resultant from hacks
iU
profile of Fullam, the San Jose
documented both those outside hacks, gone awry. But Fullam says if readers Mercury News described his garage
as well as his own projects “to make follow the instructions carefully, they as resembling a “Hollywood movie-
.R

RU
them readable, to make them under- aren’t likely to blow themselves up. set version of a Silicon Valley garage,
standable, and to make them work.” “They might burn their toast a little bit, bulging from floor to ceiling with
AD

disemboweled gadgetry.”
O’Reilly’s art department added the but that’s about it.” NV
M
iO

EL
Extreme Robot Speed Control!
SC

E
6 14V - 50V - Dual 80A H-bridges - 150 A+ Peak!
.H
6 Adjustable current limiting
6 Temperature limiting
6 Three R/C inputs - serial option
A

6
i2
Many mixing options - Flipped Bot Input
6 Rugged extruded Aluminum case
M

6 4.25" x 3.23" x 1.1”


$399
.R
AT

O
$79.99 $119.99
$29.99 Scorpion XL
OR

Scorpion HX
Scorpion Mini 6 Dual 2.5A (6A pk) H-bridges 6 Dual 13A H-bridge 45A Peak!
6 2.5A (6A pk) H-bridge 6 Plus 12A fwd-only channel 6 5V - 24V
6 5V - 18V 6 5V - 18V 6 2.7“ x 1.6” x 0.5”
6 1.25“ x 0.5” x 0.25” 6 1.6“ x 1.6” x 0.5”
UL

Introducing Dalf
6 Closed-loop control of two motors
6 Full PID position/velocity loop
.H

6 Trapezoidal path generator


6 Giant Servo Mode!
6 PIC18F6722 CPU $250
i2

6 C source for routines provided


6 See www.embeddedelectronics.net
H-bridges: Use with Dalf or with your Micro/Stamp
.R

OSMC Simple-H
6 6-28V 25A!
O

6 Monster power!
6 14-50V 160A! 6 2.25”x2.5 ”x0.5”
6 3.15”x4.5”x1.5” 6 3 wire interface
6 3 wire interface 6 current & temp
$79 protection

MADE IN

THE USA
www.robotpower.com
Phone: 253-843-2504  sales@robotpower.com

May 2007 61
Geer.qxd 3/30/2007 8:14 AM Page 62

Going Security Geek


on Penetration
Tests With
IRA WINKLER
W
W
by David Geer
W

W
W

.G
Q: When is hacking legal?
W

iU
A: When the company being hacked hires the hacker.
.R

RU
T
hese hacks — called penetration cal access to computers, and remote espionage, in an effort to pull together
AD

tests — are done on purpose to hacking. Pen tests often require a the non-technical pieces of the puz-
M
show companies how much they combination of two or more of these zle. This brings the system or systems
iO

stand to lose if they don’t patch their elements. With the help of Mr. he wants to penetrate out into the
EL
security holes. Winkler, we’ll cover pen tests and open. Sometimes, Ira uses social engi-
Penetration tests are used to try to protections against hacking. neering — a form of social interaction.
SC

E
compromise the security of computer Who is Ira Winkler? He’s a straight Social engineering lets you gather
.H
systems to make sure they are not vul- shooter and someone who can speak bits of information, compiling what you
A

nerable. This is a good thing, done by with authority on the subject. Ira is a for- need until you have the whole picture.
i2
good guys, called White Hat Hackers. mer software tester, NSA guru, and now In this case, the information is how to
M

There are many reasons to do a confirmed good guy hacker. Dubbed a access the company’s computers.
.R
pen test, including: modern day James Bond by the media, Social engineering can be done in per-
AT

Ira has a history of discovering how son, but is usually done over the phone.
O
• To see how a malicious party may information systems are hacked. For example, Ira once called a
OR

attack ... and how far they would get. Mr. Winkler has been hired to bank and took control of it in three
• To see if the company can detect the hack into many Fortune 500 compa- days. The information he used to
attacks. nies. He has done so, handing them accomplish this was gained entirely
UL

• To identify as many vulnerabilities as back anything from access to $1 over the phone — information about
possible. billion in assets to plans for a nuclear computer access. You may have seen
• To get the attention of management. reactor. All this is done to point out the these kinds of calls portrayed in
.H

companies’ network vulnerabilities. movies or TV, usually being used by


Taken (from “Ideal Goals of a Pen Test,” The author of Corporate private detectives. Deceit and misrep-
i2

presentation slide by Ira Winkler, presi- Espionage: What It Is, Why It Is resentation are definitely on the menu.
dent and CEO, the Internet Security Happening in Your Company, What In the following detailed example,
.R

Advisors Group (ISAG), “an internation- You Must Do About It, Ira advises the espionage, social engineering, and
al information security firm specializing FBI and other top dog organizations. physical access were all used.
O

in mass marketing product security They listen; so should you. “I stole the designs for a nuclear
offerings through channel partners.”) reactor by saying I was doing a quick
Pen tests use simulated corporate Espionage Simulations, security audit. I walked over to the
espionage, social engineering, physi- Social Engineering, and people who put together the design
plans for a proposal that was going to
Physical Access be presented to the people buying the
Photos courtesy of Ira Winkler.
Ira usually starts with corporate nuclear reactor. I said I just needed to
62 May 2007
Geer.qxd 3/30/2007 8:16 AM Page 63

type a couple of quick commands. for the administrator accounts. Just Tips From Ira Winkler
I got the Internet protocol (IP)
addresses of the computer that stored
type in “administrator,” “administrator,”
and you’ll gain access frequently.” for Hardening Your
that information,” says Winkler. Here’s another example from Ira Home Network
In another pen test, Mr. Winkler on password guessing: “I always tell

ONE
stole a $1 billion in sensitive the story where I knew this woman and
information in just a day and a
half after getting himself hired as a
temporary employee. The list of cases
her user id was “Kirk” and I was just
joking around with her that her pass-
word was “captain.” She just looked at
1: All systems should run
anti-virus software. Enable
the feature to automatically
is long and distinguished. me in horror, saying, ‘how do you check for updates.
know what my password is?’” People
The Technical Side tend to think in associative ways. If you
of Pen Tests start where they start, you’ll often
come up with the same choices. TWO
2: Check for backups and
make your own backups
W
There are only two ways to hack. Other common holes include the on a regular basis.
One is to exploit weaknesses built into default Login/Password (LP) accounts
W
operating systems and software. The on Unix systems. It’s called LP
other is to exploit the human error that because the default login is “login”
THREE
3: “Personal [software] fire-
W

W
shows up in the form of administrator’s and the default password is “pass- walls are a must. Some
or user’s configuration errors. These word.” Amazingly enough, these are DSL routers include firewall
W

are things like username and password often not changed. “If people don’t
.G
selections or permissions for who can administer their systems properly, it’s functionality. Some attacks can
tunnel through these. Even if
W

access which computers or data. really easy to take them over.”


iU
As Ira put it in a presentation, “All you have a DSL router that has
software has bugs; some bugs More Examples —
.R

RU
firewall functionality, you have
are security related.” Bugs can be Oldies but Goodies
exploited to gain privileges on a to make sure it’s updated
AD

system. Bugs also come in the form of “This is an old one, but I prefer regularly. Make sure your
M
information leakage, which can be older ones because, hopefully, they personal firewall is on each
iO

tapped to steal critical information. are not as vulnerable now,” Winkler


EL
computer system. Attacks can
Even Unix and Linux systems can elaborates. This one exploits early
be broken (hacked). “The way you versions of the Windows 95 operating make it through a firewall.
SC

E
take advantage is to go to a website system. With these older versions, the You don’t want to have your
.H
like www.antionline.com/index.php password was stored in clear text, firewall as a single point of
A

and just download the exploits. Sadly, right out in the open in the Windows
i2
failure,” cautions Winkler.
it’s that easy. Then you try to run them registry file.
M

against individual systems or IP With physical access, you only had

FOUR
.R
address ranges; frequently you’ll get to wait until someone was away from
4: Have a hardware firewall
AT

in,” explains Winkler. his or her computer and go into his or between the Internet
O
Another method is to ping IP her Windows registry file to see his or
connection and your internal
OR

addresses in a pingable address range. her password. You could also take a
IP addresses and ranges are numbers in look using the Internet, if the user had network.
patterns like 255.255.255.104 through shared their hard drive with the world.

FIVE
UL

255.255.255.111. Then, if you identify Each computer type and operat-


servers in that range, you can look to
see if the servers have exported hard
ing system has its own vulnerabilities.
“For the Virtual Addressing Extended
5: Stay away from malicious
websites. Stay away from
.H

drives. For example, an administrator (VAX) computers, the Virtual Memory pornography sites because
may have used a tool, like NFS System (VMS) systems, frequently you those tend to install back doors
i2

Manager, to export a hard drive. If the could walk over to a VMS computer and key capture mechanisms.
setting was to export it to the world, and type in the user id ‘field’ and the
.R

[Try using a hosts file, as at


then anyone could mount that drive password ‘service’ and that would
from an Internet connection. It’s even give you administrative privileges,” www.mvps.org/winhelp2002/
O

easier if no permissions have been set. says Winkler. hosts.htm.]


User ID (UID) and Password (PW) There are many examples for

SIX
guessing are also easy, due to nonran- exploiting default accounts. You can
dom or default UID and PW selections.
According to Ira, “most of the time, the
administrator password on Windows
get all the systems on a network by
using the Unix “hosts” command.
With the right attributes, you can type
6: Periodically check systems
to see that firewalls are up
and running.
systems is the same as the password in “hosts” at “company.com” [using
May 2007 63
Geer.qxd 3/30/2007 8:16 AM Page 64

Ira Winkler on Describes Pen Test involving


Password Sniffing.
Monkey Business intrusions. Check the Center
for Internet Security at www.
H acking is simple. Any monkey
can hack a computer given
the right training. Hacking is
cisecurity.org where you’ll
find links to “benchmarks”
(detailed hardening configu-
simply breaking into a computer. ration instructions) in the left
Anybody can break into a comput- pane. Additional hardening
er; protecting it is the hard part. instructions are available at
People learn how to break into the same location.
their own systems; that’s okay, but “The concept of harden-
it’s like a parlor trick. What’s going ing the systems means you
are taking the systems as
to teach you more is learning how
W
they come ‘out of the box,’
to protect them. If you really These are the results of the Pen Test. which are, unfortunately, pretty much
want to know the inner workings
W
insecure, and just turning features on
of your systems, you need the actual company name], “and, if and off,” Winkler explains. Turning up
W

to understand your operating


W
the firewall and network aren’t set up the right features secures systems
systems and understand how the properly, you can map the network of against known hacking methods.
W

OS can be compromised. your potential target,” Winkler details. If you use Windows, you should
.G
Read about how to prevent also use the Windows Updates tool
How to Secure Networks
W

under the start menu. It’s just a link


iU
the vulnerabilities. People look at
hackers as super geniuses. They and Pass Pen Tests that takes you to Microsoft, where
they scan your computer for needed
.R

RU
are not super geniuses; they are
Use strong passwords and change updates. You can bypass the scan and
just using the slight of hand that them often. You can start by following select the updates yourself.
AD

anyone can use if they, “pay the Microsoft’s instructions for creating You should check with your
M
money to buy the magic trick in strong passwords, found at www. software vendors to get their updates.
iO

the store,” says Winkler. microsoft.com/security/articles/pass They also have bulletins for their
EL
You need more sophistication word.asp. Changing your password software packages. These notify you
weekly can help prevent a hacker who of new patches you should install.
SC

to know how to protect yourself.


E
“You need no sophistication to sniffed your password (See PW Sniffer Installing new patches immediately
.H
figure out how to break in. I went Flow Chart) from having a chance to should keep you secure.
A

use it. This helps guard against one of Here, Winkler provides a
i2
into a company once and 70% of
the primary means of hacking — compelling example of what can
M

the passwords were the same attacking configuration weaknesses happen when you don’t apply patches
.R
as the user id. I needed zero that are due to human error. immediately:
AT

knowledge to break into that,” You can also harden your


O
commented Mr. Winkler. operating system against attacks and “The Code Red virus appeared to
OR

come out of nowhere and take over


everybody overnight. What happened
was that it really didn’t come out
UL

overnight. The fundamental vulnerabil-


ity that allowed Code Red to
propagate was announced six months
.H

prior to Code Red being released.


Code Red was more of a delivery
i2

mechanism for that vulnerability. If


people had patched that vulnerability
.R

when it was announced — six months


prior or anytime prior in that
O

six-month period — they wouldn’t


have been susceptible to Code Red.
The irony is that
This is the path a hacker might when the Nimda virus
take to gain administrative came out, Nimda wasn’t
privileges on your network in
order to use a password sniffer as big, but Nimda
to gain additional access. compromised the same
64 May 2007
Geer.qxd 3/30/2007 8:17 AM Page 65

underlying vulnerability as Code Red. It would be good to know the done. Though your anti-virus vendor
By that point, the vulnerability was channel for reporting them before the may have an update that will kill the
known for almost nine months and situation arises. bug after the fact, reporting mostly
widely reported because of Code There are also a few things not to helps others to make ready before
Red. Attacks that appear to come out do. “Many people put vulnerabilities they are hit. NV
of nowhere are, in many cases, caused up on Bugtraq, another mailing list
by vulnerabilities that are almost a
year old.”
[now archived at www.security
focus.com/archive/1]. But that gets it About the Author
out to all the bad guys sooner than the
If You Think You Have good guys and helps the bad guys
break in,” warns Mr. Winkler.
D avid Geer is a freelance
technology writer — www.geer
com.com — and sometimes
Found a New Vulnerability ... computer guru. Contact david@
Realize, too, that once you have
Contact the vendor for that been infected, the damage is already geercom.com.
software. First, go to their security and
W
vulnerability lists and try to find a
contact. If you can’t do that, then YOUR COMPLETE B ATTERY SOURCE
W
reach the Computer Emergency
Response Team (CERT) at www. 2-way Radio ● Cellular ● Digital ● Camcorder
W

Laptop ● Chargers ● Analyzers ● Cells


W
cert.org. “Try to Email them and say
you think you have found something HIGHER CAPACITY ● HUGE SAVINGS!
W

new and are not able to get through


.G
to the vendor,” Winkler advises.
Custom Assembly & Battery Rebuilding for:
W

You can also report viruses to


iU
• Handheld Radios • Laptop • Camcorder • Test Equipment
CERT, though you should report them
to the vendor of your anti-virus
.R

RU
software first. They should have an
email address or a channel through
AD

the program itself for virus reporting.


M
iO

For More Information


EL
Authorized Dealer

ONE
SC

OEM Battery Packs


E
1: Contact Ira Winkler, info@ sales@nicdlady.com 20585 Camino Del Sol Unit B, Riverside, CA 92508
.H
isag.com, for information
about his books, presentations, 5000+ Batteries Online Toll Free
A

i2
pen tests, and appearances. WWW.NICDLADY.COM 800/906-6423
M

TWO
.R
2: The book Corporate
AT

Espionage is available
O
through www.amazon.com used,
OR

and new from various private


sellers (though it’s no longer in
print, an updatedversion may be
UL

published soon).

THREE
.H

3: Microsoft is at www.micro
soft.com.
i2

FOUR
4: Unix, Linux, and VMS are
.R

open source systems with


some proprietary exceptions.
O

FIVE
5: CIS Contact www.cisecurity.
org. Select Contact CIS in the
top menu.

SIX
6: CERT Contact: www.cert.org/
contact_cert.
May 2007 65
ElectronetMay07.qxd 4/4/2007 3:14 PM 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 < < < <

Plug in the p Standard Features:


Help
o • CAN, SPI, SCI
Adap ing you
w
e • RS232
r

t • 10-bit A-to-D
of

tech to new • 32K or 128K Flash


9S

nolo • PWM
12

Adapt9S12C gy • Input Captures


!

• Output Compares
www.technologicalarts.com • 3V/5V Operation
W
W
AM/FM Broadcasters • Hobby Kits
Learnng Kits • Test Equipment
W

W
...AND LOTS OF NEAT STUFF!
W

.G
W

iU
.R

RU
AD

M
iO

EL
SC

E .H
A

i2
M

.R
AT

O
OR
UL
.H
i2
.R
O

66 May 2007
InTheSpotlight.qxd 4/5/2007 2:24 PM Page 67

An Interview with Mr. Ken Gracey of Parallax, Inc.


by Marvin Mallon

O
ne of the leading suppliers of Ken: Parallax operates in a 20,000 M: On the personal side, what other
W
programmable microcontrollers square-foot building. We have approx- interests or hobbies do you have?
is Parallax, Inc. The company imately 41 employees including a few K: Chip’s primary interest is his family.
W
is located in Rocklin, CA — a short in China and Hong Kong. He enjoys cooking for them and their
commute from Sacramento. They offer a friends when they entertain. Church
W

M: What is your principal business?


W
complete line of BASIC Stamp modules, activities are an important part of his
SX chips, and an innovative assortment K: Parallax’s main business is as a micro- family life. He gets a lot of pleasure
W

of robotics. Parallax has historically controller design company, manufactur- out of running and other physical
.G
been close to the microcontroller er, customer support, distributor, and activities. At Parallax, his principal
W

architectures, which they support. Most educator. None of these specialties can interest is chip design.
iU
recently, they have put this skill to use by exist without the others. Parallax’s R&D My primary interests are my family,
designing the Propeller processor entire- team focuses on processor design and snow sports and running, metalwork,
.R

RU
ly on their own, transistor by transistor. layout and development of boards and and working with people. Parallax is
The company remains privately owned sensors to support our core products. also a personal interest of mine,
AD

and is doing gross yearly sales of approx- An educational team shows instructors particularly the educational “Stamps in
M
imately eight and a half million dollars. (high school and college) how to use Class” program and working with our
iO

Two friends, Chip Gracey and our tutorials and microcontroller different distributors and customers.
EL
Lance Walley, founded the company in products in a classroom. The manufac-
1987. These longtime acquaintances turing capabilities in our facility include M: Finally, what else would you care
SC

E
shared a mutual interest in computers a full surface-mount and reflow to add about your organization?
.H
and anything dealing with electronics, assembly line, CNC (computerized K: From a corporate standpoint, our mis-
A

especially Apple computers and eight- numerical control) machining, kitting of sion is to provide the electronics indus-
i2
bit controllers. Lance left the organiza- educational products, and stress testing try with products that are technically
M

tion about 10 years ago and went on to characterization. The sales, marketing, innovative, unique, and economical.
.R
start other companies doing advanced and support sections of the company This also means that we serve the hob-
AT

technology design. Chip is the President manage the distribution and support of byist, educator, and commercial user all
O
of Parallax and Chief of R&D and Parallax products worldwide. at once. It’s really rewarding to obtain
OR

engineering operations in the company. feedback from our customers and put it
Ken Gracey is the 37-year-old M: What are your most popular prod- to use in our company. We strive to treat
younger brother of Chip. He is a ucts and when were they introduced? customers just like we would like to be
UL

vice-president of Parallax and is K: BASIC Stamps, which were first treated and to keep Parallax a flexible,
responsible for manufacturing, mar- released in 1993 and remain one of our interesting, and stable place to work for
keting, sales, and support. In 1988, he most popular products to this day. our team. We are particularly proud
.H

was the first employee of Parallax. His Parallax SX microcontrollers — eight-bit of our employees and recognize
duties included taking orders over the high-speed microcontrollers for which them as friends and part of the
i2

phone, building cables, and shipping we’ve provided tools since 1997, and company. Without their efforts, skills,
orders. He left to complete a science now chips. Propeller, our own custom and motivation to succeed, Parallax
.R

degree at UC Davis and returned to silicon design consisting of eight would not exist as it does today. NV
Parallax in 1997 when the company processors and a shared memory.
O

had a need for business management. This chip is our most recent prod- Chip Gracey, Parallax — exterior
President
In a recent interview with Ken, he uct and was released in 2006.
responded to the following questions:
599 Menlo Drive, Suite 100
Marvin: How large is your facility Rocklin, CA 95765
in Rocklin? How many employees Tel: 888-512-1024
do you have? Web: www.parallax.com.
May 2007 67
Marston2.qxd 3/29/2007 12:13 PM Page 68

Understanding Digital
Buffer, Gate, and Logic
IC Circuits
by Ray Marston
W
PART 2: Digital Inverter and ‘AND Gate’ Circuits
W
W

W
Ray Marston describes practical digital inverter and AND gate
logic ICs in this second installment.
W

.G
W

basic of all digital logic elements,


iU
FIGURE 1. Any NAND or
NOR gate can be used as and is sometimes called an inverting
an inverting buffer element. buffer. If you ever need only a few
.R

RU
simple inverters, one cheap way to
FIGURE 2.

L
ast month’s get them is to make them from spare
AD

Fourteen
opening article TTL or CMOS NAND or NOR ele-
M
popular
inverter ICs. explained mod- ments, connected in the basic way
iO

ern TTL and CMOS shown in Figure 1, in which the input


EL
logic gate basics and gave practical terminals of a two input NAND or
descriptions of some of the most NOR gate are shorted together to
SC

E
popular digital buffer ICs that are accept a single input and give a
.H
available. This month, we expand on single (but inverted) output signal.
A

this basic theme and take detailed Figure 2 lists basic details of some
i2
looks at some popular digital invert- popular digital inverter ICs. When
M

er and AND gate ICs. As you read using these ICs, note that all unused
.R
through this, note that some of the inverters must be disabled by tying
AT

ICs mentioned may not be available their inputs to one of the IC’s low volt-
O
via your local supplier, but should still age supply lines. In CMOS devices,
OR

be available from specialist dealers. the unused inputs can be tied directly
to either supply line, but in TTL
Practical Digital devices, it is best (for lowest quiescent
UL

current consumption) to tie all unused


Inverter Circuits inputs directly to the 0V rail. If the
The digital inverter (or NOT gate) unused inverter is a three-state type, it
.H

is the should (if it has independent controls)


< FIGURE 3. Functional m o s t be set into its normal mode via its
i2

diagram of the 7404,


74LS04, 74HC04, 74HCU04,
.R

or 4069UB Hex inverter ICs.


O

< FIGURE 4. Functional


diagram of the 74LS05 or
7406 Hex inverters with open
collector outputs.

> FIGURE 5. Functional


diagram of the 74LS14,
74HC14, or 40106B Hex
Schmitt inverter ICs.
68 May 2007
Marston2.qxd 3/29/2007 12:13 PM Page 69

FIGURE 6. A TTL Schmitt inverter FIGURE 7. TTL switch debouncer, with FIGURE 8. TTL switch debouncer, with
sine-to-square converter. logic 1 closed output. logic 0 closed output.

control input, to mini-


mize current drain.
W
Dealing now with
the individual inverter
W
ICs listed in Figure 2,
Figure 3 shows the func-
W

W
tional diagram that is
common to the popular
W

7404, 74LS04, 74HC04,


.G
74HCU04, and 4069UB
W

Hex inverter ICs. Of FIGURE 9. TTL supply switch- FIGURE 10. CMOS Schmitt FIGURE 11. CMOS supply switch-
iU
these, the 7404 is an on pulse generator. inverter sine/square converter. on pulse generator.
ancient standard TTL IC;
.R

RU
the 74LS04 is a modern LS TTL type in ple applications of the 74LS14 IC. Figure erates a brief logic 1 switch-on output
which each inverter has a fan-out of 10, 7 is a practical version of a mechanical- pulse when the circuit’s supply is first
AD

the 74HC04 is a fast CMOS type, and switch contact-bounce debouncer; it connected) by wiring it as shown in
M
the 74HCU04 and 4069UB are can be activated by a push-button (S1)
iO

unbuffered CMOS types that are suit- or toggle (S2) switch, and has an output FIGURE 12. Functional diagram of the
EL
able for use in linear applications. that goes to logic 1 when the switch is 4049UB (unbuffered) or 74HC4049
(buffered) Hex inverter IC.
Figure 4 shows the functional dia- closed. Figure 8 is a modified
SC

E
gram that is common to the 74LS05 and version of the above circuit,
.H
7406 Hex inverters with open collector with an added inverter stage,
A

(OC) outputs. The 74LS05’s OC outputs and gives a logic 0 output


i2
can handle maximum outputs of only when S1 is closed. Figure 9 is
M

5.5 volts, but those of the 7406 can han- yet another variation of the
.R
dle up to a maximum of 30 volts. basic circuit, and generates a
AT

Figure 5 shows the functional brief logic 1 switch-on output


O
diagram that is common to three of the pulse when the circuit’s supply
OR

most useful of all Hex inverter ICs — the is first connected.


74LS14 TTL and the 74HC14 and Regarding the 74HC14
40106B CMOS Schmitt types. In the and 40106B CMOS Schmitt
UL

74LS14, the output of each Schmitt inverters, these have typical


inverter is in the logic 1 state until the upper and lower threshold volt-
input rises to an upper threshold value of age values equal to 60% and
.H

1.6V, at which point the output switches 40% of the supply voltage,
to logic 0 and locks there until the input respectively. A CMOS Schmitt
i2

is reduced to a lower threshold value of inverter can thus be made to


0.8V. At this point, the output switches function as a sine-to-square
.R

and locks into the logic 1 state again, converter by connecting it as


and so on. Thus, a 74LS14 Schmitt shown in Figure 10, where RV1
O

inverter can be made to function as a is used to set the circuit to its


sine-to-square converter by connecting it maximum sensitivity point.
as shown in Figure 6, where RV1 is used A l te r n a t i ve l y,
to set the circuit to its maximum sensi- either CMOS Schmitt FIGURE 13. Functional
diagram and truth
tivity point, at which a quiescent voltage inverter can be used table of the 4502B Hex
of 1.2V is set on the inverter’s input. as a switch-on pulse three-state inverter
Figures 7 through 9 show more sim- generator (which gen- with INHIBIT control.
May 2007 69
Marston2.qxd 3/29/2007 12:28 PM Page 70

FIGURE 14. Functional


diagram and truth table
of the 74LS240 octal (dual
quad) three-state Schmitt
inverting buffer IC.
functional diagram and truth table
of the 74LS240 octal three-state Schmitt
inverting buffer IC, in which each buffer
has a fan-out of 30. This IC is actually a
dual quad device, in which inverters 1-4
are controlled via the CA terminal, and
inverters 5-8 are controlled via the CB
terminal. Each of these quads can be
FIGURE 15. Figure 11. Note in used as a set of normal Schmitt invert-
Seven popular this circuit that ers by grounding the control terminal,
AND gate ICs.
resistor R2 is used or as a ganged set of three-state Schmitt
W
to give the CMOS IC element a inverters by using its control terminals
reasonable degree of protection as shown in the truth table.
W
against damage from excessive
C1 discharge current if a short
Practical AND-Gate
W

W
circuit suddenly appears acoss the
circuit’s two supply lines. IC Circuits
W

Figure 12 shows the function-


.G
al diagram that is common to the The output of an AND gate goes
W

4049UB and 74HC4049 Hex high (to logic 1) when all of its inputs
iU
CMOS inverter ICs. The 4049UB is (A, B, and C, etc.) are high. Figure 15
an unbuffered type, suitable for lists basic details of several popular
.R

RU
use in linear applications, and the AND-gate ICs; of these, the 74LS08,
74HC4049 is a fast, fully buffered 74HC08, and 4081B (see Figures 16
AD

general-purpose device. and 17) are quad two input types; the
M
Figure 13 shows the function- 74LS11 and 4073B (see Figures 18
iO

al diagram and truth table of the and 19) are triple three-input types,
EL
4502B. This is a special-purpose, and the 74LS21 and 4082B (see
FIGURE 16. Functional diagram of the 74LS08
three-state Hex inverter in which Figures 20 and 21) are dual four
SC

E
or 74HC08 quad two-input AND gate ICs.
the outputs of all six inverters can input types.
.H
be set to the logic 0 state by driv- When using AND-gate ICs, each
A

ing the INHIBIT (pin 12) terminal unwanted gate must be disabled by
i2
high, or can be set to the high- shorting all of its inputs together and
M

impedance state by driving the tying them to one of the IC’s supply
.R
DISABLE (pin 4) terminal high. lines. In CMOS ICs, the shorted inputs
AT

The IC can be used as a conven- can be wired directly to either supply


O
tional Hex inverter by grounding line, but in TTL ICs the inputs must (to
OR

the INHIBIT and DISABLE pins, or give minimum quiescent current con-
as a normal three-state inverter by sumption with good stability) be tied to
grounding the INHIBIT pin and the positive supply rail via a single 1K
UL

applying the three-state control to resistor, as shown in Figure 22. A single


FIGURE 17. Functional diagram of the 4081B the DISABLE terminal. resistor can be used as a tie point for
quad two-input AND gate IC.
Finally, Figure 14 shows the large numbers of unwanted inputs.
.H

Sometimes, when using


three or four input AND
i2

gate ICs, you may not want


to use all of a gate’s input
.R

terminals. In this case, the


unwanted inputs can be dis-
O

abled by either tying them


high (directly in CMOS
gates, or via a 1K resistor in
TTL types) or by simply
shorting them directly to a
FIGURE 18. Functional diagram of the 74LS11 FIGURE 19. Functional diagram of the 4073B used input. Figure 23 shows
triple three-input AND gate IC. triple three-input AND gate IC. examples of three input and
70 May 2007
Marston2.qxd 3/29/2007 12:15 PM Page 71

FIGURE 20. Functional diagram of the FIGURE 21. Functional diagram of the 4082B
74LS21 dual four-input AND gate IC. dual four-input AND gate IC.

four input TTL AND gates wired for FIGURE 23. Methods of
use as two input types. Note that disabling unwanted TTL inputs, FIGURE 22.
W
the fan-in of a TTL AND gate is an to make a two-input AND gate. Method of
disabling un-
almost constant 1, irrespective of wanted TTL
W
the number of inputs used. Thus, AND gates.
CMOS or TTL AND gates can be
W

W
converted into non-inverting FIGURE 24. Methods of using
buffers by simply shorting all of TTL AND gates as simple
buffers.
W

their inputs together. Figure 24


.G
shows examples of TTL AND gates AND gates can be cascaded
W

used as simple buffers. to make three, four, or five


iU
A useful feature of AND gate ICs is input AND gates, and Figure
that their gates can be directly cascad- 26 shows three three input or
.R

RU
ed, with the output of one gate feeding two four input gates cascaded
directly into one input of another gate, to make a single seven input
AD

to make compound AND gates with AND gate. NV


M
any desired number of inputs. Figure
iO

25, for example, shows how two input


EL
www.orteches.com www.orteches.com www.orteches.com www.orteches.com www.orteches.com www.orteches.com

www.orteches.com www.orteches.com www.orteches.com www.orteches.com www.orteches.com www.orteches.com


www.orteches.com www.orteches.com www.orteches.com www.orteches.com www.orteches.com www.orteches.com
SC

FIGURE 25. Ways of using two input


Elexol 3rd Generation Low Cost
E
AND gates to make (a) three input, (b)
.H
four input, or (c) five input AND gates.
USB Data I/O Module
A

i2
Need to get data into or out of a USB port? Here’s what you need...
M

• 24 independently programmable Input/Output pins grouped into 3 ports.


.R
• Single module high-speed digital Input/Output solution.
AT

• Up to 128 modules can be connected to a single PC with capabilities of


further expansion.
O
• Easy to connect by 0.1" pitch headers to suit standard IDC connectors.
OR

• Integrated Type-B USB connector.


• On-board unique serial number in EEPROM and custom programmable
FLASH microcontroller.
• Both USB enumeration information and microcontroller can be re-
UL

programmed to suit customer needs.


• Module powered by the USB from the PC.
.H

Just some of our range of USB and MP3 modules...


i2

FIGURE 26. Ways of using (a) three


.R

input or (b) four input AND gates to


make a seven input AND gate. USB MOD3 - USB MOD4 - USB MOD5 - MP3 MOD4 -
USB Plug and Play Serial USB Plug and Play Parallel Integrated module based on the FTDI VS1001 chip. Converts
O

Development Module (2nd 8-bit FIFO Development Module FT2232C Dual Channel USB UART / clocked serial data (MP3) to
Gen). 1000k baud (RS232) and (2nd Gen). Up to 8 Million bits FIFO IC. Features two Multi-purpose stereo audio out. Suitable for
3000k baud. (RS422 / RS485) (1Megabyte) per second. controllers that can be configured in driving headphones.
several different modes.

Visit our website www.orteches.com


Ortech Education Systems
1119 - 9th Ave. S. • Moorhead, MN 56560
218.287.1379
www.orteches.com www.orteches.com www.orteches.com www.orteches.com www.orteches.com www.orteches.com

May 2007 71
Full Page.qxd 4/4/2007 3:49 PM Page 72

We search the world for time-saving,


easy-to-use state-of-the-art products!
LCD Scope Handheld Scope World’s Fastest Mixed-Signal Scope Logic Analyzer
PS5204 - 2-ch 250MHz Scope
w- W

EW

EW
EW
!
st
Te s t i n g
Lo NE

with 128 MS/s buffer and


Co

N
N
real-time sampling of 1GS/s.
Advanced triggering. 250MHz
PDS5022S - 25 or 60MHz 2- HDS1022M - 20MHz 2-ch spectrum analyzer and 125MS/s CleverScope - 100 MHz Scope, ZeroPlus - Intuitive full-featured
ch + trigger standalone bench standalone scope and DMM waveform generator. Spectrum/Logic Analyzer, & SigGen. for PCs. 16-channel with 4mb memory.
scope with USB connection with USB connection and 3.8” 4 or 8 M/samples storage! Easy A-B, Sophistcated triggering. I2C, SPI,
and 7.8” color LCD. color LCD. math, & filters! 2 ch x 10, 12 or 14-bit, and UART monitoring. Includes
PS5203 (PP376) 32MS buffer $2225
PDS5022S Sale! $349 8 dig. I/P. (Opt. 0-10 MHz SigGen.- $249) clipleads, USB cable and software.
PDS6062T Sale! $599 HDS1022M Sale! $529 PS5204(PP377) 128MS buffer $3343 CS328A from $1149 LAP-16128U $399
USB to I2C
VIST our WEBSITE
Ethernet to I2C I2C for PCs FREE COFFEE Ethernet to I2C
W
- NEW PRODUCTS ARE
W
ARRIVING EVERY DAY!
I2C

Call 1-888-7SAELIG
USB I2C/IO - Provides a simple FMod-TCP - TCP/IP server with I2C, PCI93LV: industry-standard I2C card NM7010A-LF REV 2 - Complete,
Mention Offer# SBW
for PCs. WINI2C/PCI software
www.saelig.com
W

“drop-in” solution for connecting 19 x digital I/O, 5 x 10-bit A/D hardwired TCP/IP-I2C module. Offloads
to get a free
W
gives windows-interface to develop stack for hi-speed Internet-enabling
your PC to 90kHz I2C + 20 I/O inputs, and UART serial interface. Starbucks Card
and debug I2C bus systems.
lines. Free software. Use mul- Connect I2C devices/sensors microprocessor systems. Drop-in
View our latest UCA93LV is new USB version. with your order!
W

tiple boards for more I2C/IO. to an Ethernet network! NOW - transparently monitor at While supplies last - W3100A-based board for instant
Press Releases
.G
USB I2C/IO $79 FMod-TCP from $232 400kHz! $499 not available with any other offers network speeds to 8Mbps. $22

Stepper Motor Signal Wizard USB to 24 x I/O FATfile Storage Easy LCD Touch-Sensing ICs
W

iU
.R

RU
I/O

Easy-Step 3000- Advanced stepper Signal Wizard - easy-use real-time USBI/O24R - 24 latched I/O lines Micro ALFAT-SD - Ready-made Micro LCD - Easy way to add 2” sq Quantum ICs - World’s best capacitive
AD

motor drive and control system for DSP-based filter board for audio self-powered from USB port. Ubicom way to easily add SD storage 128 x 128 color LCD to your project. sensor ICs for switching & control.
unipolar stepper motors up to bandwidth signals. Design filters SX52 allows individual pin I/O to your product. Serial data Add text/graphics/animations for Patented Adj. Key Suppression,
M
35V/3A- ideal for robots/industrial in seconds without any DSP programming. I/O control via PCs in - FATfile data out. $39.95 any micro with serial or USB. Spread-spectrum, adj. sensitivity. In
control - turns you into an knowledge! USB port. Or design-in a micro ALFAT IC Micro LCD MK II $81 use worldwide by the world’s largest
instant motor control expert! $119 Signal Wizard v2.5 $699
iO

USBI/O24R $69 for MB storage. $14 ea. Micro LCD-OLED $99 consumer/appliance mfrs $1
EL
Serial-Ethernet Cable Ethernet to Serial Ether-IO Ethernet to I2C TCP/IP IC Motion Control
Ethernet

SC

E .H
28” cable links serial devices to EG-SR-7150MJ - Ready-to-go Ether-IO - UDP/IP-controlled 24 FMod-TCP - TCP/IP server with W3150A+ - Hardwired TCP/IP stack PIC-Servo - Motion control boards
A

i2
network without a PC, providing an serial-to-Ethernet Gateway. Simple X digital I/O board. 3 x 8-bit TTL I2C, 19 x digital I/O, 5 x 10-bit A/D - cheap micros can now have with integrated power amplifiers
instant IP address. RS-232 port set-up for 10/100Mbps Ethernet ports each independently inputs, and UART serial interface. internet capabilities at full speed! for DC-servo/brushless-servo/
M

compatible with most 10/100mpbs - 230kbps serial. Ethernet/ programmable. Connects to any Connect I2C devices/sensors 10/100 Off-loads TCP/IP burden stepper-motors. Easy connection
.R
Ethernet hubs. Network your serial Internet-enable any serial part. TCP/IP Ethernet network. to an Ethernet network! for fast time-to-market. Ethernet- to std serial ports for powerful
AT

product easily! eCOV-110-P $99 EG-SR-7150MJ $35 Ether-IO 24 from $99 FMod-TCP from $232 enable almost ANYTHING! $7.20 multi-axis, mixed-motor control. $160
Bluetooth RFID Reader IC easyRADIO Wireless Controllers TinyOne Zigbee Data Modem
O
EW

EW
OR
N

N
RF

Emxys PearlBlue - 100m-Bluetooth RFID Reader Chip - Reads easyRADIO TM Transceiver Owasys - GSM/GPRS/GPS/ TinyOne ZigbeeTM - Complete RF Data Modem - USB-powered
UL

module (UART master/slave bridge). FIVE Int’l Stds ISO14443 A/B, Modules make wireless data Bluetooth/Ethernet wireless solution for fast and reliable data radio transceiver boards add
Easy connection for micro's to PCs, Tag-IT, Felica and ISO15693. transmission simple for USA controllers for M2M - for autos, transmission. Miniaturized OEM wireless RS232 to your device!
PDAs, phones, etc. IceBlue - PIC16F877 Single-chip solution. and Europe! Add wireless capability machines, etc. RS232/485/CAN/ RF module ensures fast and easy Get remote control for your
based emb. dev. system for shortest TRH031M $6.95 to your project today! A/D-I/O. product from PC USB port!
.H

integration into wireless applications.


Bluetooth development. $119 RSK-100 Eval Kit $350 ER900TRS from $35 (100) Owasys from $479 TinyOne Zigbee $55 RTM-USA $89
USB in one IC FT232R Module USBwiz Easy USB GPS Logger USB-Serial Adapter
i2
.R
USB

FT232RL - FTDI USB1.1-serial IC with UM232R - FT232RL 24-pin DIP USBwiz - Easily add USB microUSB - Tiny ready-made TrackStick - Pocket-sized logger FTDI - based serial port for
O

new "security-dongle" feature. Each module - USB-TTL serial convert- peripherals to your system. Includes USB Interface to 1 Mbps 0.7” x tracks position data for vehicles, laptops. Instantly adapts older
IC has unique ID! Internal EEPROM, er for your project. Reference cir- FATfile system for USB thumb & 0.5” based on SiLabs CP2101. personnel, etc. Records date, time, RS232 products to USB! Included
clockgen, pullups, etc. cuit for FT232R. Plug-in module external USB hard drives. No Gnd/RX/TX Suspend, Reset, & location, route and speed. Shows drivers provide virtual COM
FT232RL $4.05 adds USB1.1 instantly! USB knowledge needed. Plug-n-play! 3.3V 100mA source. data on Google maps! $239 port via 45-inch USB cable.
Check out the whole FTDI line! UM232R $19.99 IC $29.95 Demoboard $59.95 microUSB $25 PRO (vehicle powered) $249 USB-COM-S $24.95

www.saelig.com info@saelig.com
1-888-772-3544

1-888-7SAELIG 585-385-1768 fax


Fonte1.qxd 3/29/2007 11:19 AM Page 73

SONIC
REALISM W
W
PART 1
W

W
by Gerard Fonte
W

.G
The holy grail of high fidelity sound reproduction is to recreate the listening
W

iU
experience exactly. The listener shouldn’t be able to tell the reproduction
from the original. Yet even with expensive electronics and nearly distortion-
.R

RU
less components there is never a difficulty with knowing what is a recording
AD

and what is live. Why? Why can’t sound reproduction sound real?
M
I
iO

EL
t turns out that one major any sound: frequency, amplitude, and ears simultaneously (more or less). A
component of sound is not phase. These three factors completely short echo (or “reverb”) is a monaural
SC

E
reproduced with any fidelity at all. define any and all sounds. Amplitude phase example. You can hear an echo
.H
This component is phase and it is and frequency are easily measured. with either one or two ears without a
A

something that is generally ignored But phase is rarely considered in any problem. In this case, there are two
i2
and often improperly understood. In sound reproduction system. There are identical sounds that are combined but
M

order to fathom phase, we will have to frequency response specifications for offset in time. This is the type of phase
.R
examine how the human hearing receivers, amplifiers, speakers, and we will be concerned about the most.
AT

system operates. This is the first of two every stereo component. Amplitude Binaural phase refers to the time
O
parts. The second part will provide specifications are also presented on delay due to the difference in the path
OR

the designs for speaker systems and the data sheet. This is seen in output length from one ear to the other. A
techniques for recording. power, power-handling, gain, and input sound from the left strikes the left ear
values. But, where is phase detailed? earlier than the right ear. This type of
Sound as a Science
UL

At most, there is a note mention- phase is usually associated with sound


ing the proper phasing of speakers. localization. There is only one sound
Unfortunately, when it comes to However, this is just to make sure that but the ears hear it at slightly different
.H

sound reproduction there are many the speaker cones move in the same times. Obviously, both ears must par-
strongly held opinions. To that end, it is direction when the same signal is ticipate in binaural phase perception.
i2

probably worthwhile to indicate that applied. It really has very little to


my position is that of scientist/engineer. do with the concept of phase as a Basic Sound
.R

I firmly believe in observation and


measurement. I have difficulty accept-
defining characteristic of sound.
There are actually two different Perception
O

ing data as valid when blind or aspects of phase that are important. Many people think that sound
double-blind tests fail to support it. One in monaural phase (one ear) and perception is a very straightforward
However, it is not unreasonable to me the other is binaural phase (two ears). procedure. (Note: “perception” is a
to consider that the ear can be sensitive (References to the “ears” really means personal mental act.) They view the
to things that are not or cannot be eas- the whole hearing process.) Monaural ears as microphones and the brain as
ily measured. Phase is just such a thing. phase sounds are typically delayed a simple receiver. Nothing could be
There are three components to sounds that are applied to one or both further from the truth. Hearing is an
May 2007 73
Fonte1.qxd 3/29/2007 11:20 AM Page 74

T
here are three components to any sound: frequency, amplitude, and
phase. These three factors completely define any and all sounds.

extremely complicated mechanical, or threshold of hearing starting at 0 dB identical in amplitude and width
biological, and neurological process. and reaching 140 dB, where sounds (frequency components). Therefore,
This is seen when parts of this system are painful.) Most people can hear a no information could be conveyed by
are damaged. (A person may have difference if the amplitude of a sine the components of amplitude or
perfect hearing but not be able to wave changes by about 0.25 dB or frequency. (Information requires a
understand speech, for example.) about 3% under ideal conditions. This change in the medium in order to be
The best estimate is that hearing is is quite variable depending upon the transmitted. This is defined as band-
a constructive process. That is, the brain frequency and initial amplitude of the width. Any non-varying medium, like a
W
takes data and applies rules and func- sound. But 3% is a fairly large change. DC voltage, has a bandwidth of zero
tions to that data to build a representa- It is a similar story for frequency. In and cannot carry any information.)
W
tion of the sonic world. These rules and this case, most people can hear a The only parameter that varied
functions are unbelievably subtle and frequency shift of about 0.2% (also was the time interval between the
W

W
complex. Mother Nature has spent variable depending on frequency and pulses. This is defined as phase.
millions of years developing the process amplitude). This is better than the Simply, the machine took sound and
W

of hearing. Unfortunately, she didn’t amplitude sensitivity but it is still not removed all of the frequency and
.G
leave any documentation behind. (One all that impressive. amplitude parameters while retaining
W

of the more unusual aspects of hearing Binaural phase is very different. If only the phase parameter. Phase preci-
iU
is “objective tinnitus.” Tinnitus is a two clicks are presented at the same sion was controlled by adjusting the
ringing or noise heard that has no time through headphones, the sound minimum time allowable between the
.R

RU
exterior source. It’s fairly common. appears localized in the middle of the pulses. A short period between the
Objective tinnitus is a ringing or noise head. This is not surprising to anyone pulses permitted a greater possible
AD

that can actually be heard coming from who has ever used headphones. By number of pulses per second (depend-
M
the patient’s ear by a second person.) delaying one click, the sound can be ing upon the input signal) and vice
iO

Sound localization is usually made to move from side to side. This versa. The results were consistent with
EL
attributed to two factors as they apply is also not too surprising. What is the binaural phase measurements.
to both ears: phase and loudness. surprising is that if the click is delayed In this case, the intelligibility of
SC

E
Localization is poor in humans and is “by as little as 0.000012 seconds, the speech was measured to determine
.H
usually limited to a “precision” of 10 sound image moves towards the ear how much information could be car-
A

degrees of angle or more. (Note, which received the click first” (Ref 1). ried by phase. This value turned out to
i2
loudness and pitch are the perceptions This is only 12 microseconds! The fact be 100% with high pulse rates. While
M

associated with amplitude and fre- that any organic system can detect a the elimination of amplitude and
.R
quency, respectively.) Higher frequen- 12 microsecond difference is nearly frequency components distorted the
AT

cy sounds are attenuated by the head beyond belief. speech, the intelligibility was identical
O
so there is an amplitude reduction This ultra-sensitivity to phase to the control. As the pulse rate was
OR

heard by the ear that is in the sound strongly suggests that it is an important lowered, the intelligibility fell (as did
shadow. This effect starts around 100 aspect in hearing. It seems unlikely that the bandwidth). This allowed the com-
Hz and improves at higher frequencies. such a system developed by chance. parison of intelligibility to pulse rate.
UL

Phase, as noted above, is related to However, that was binaural phase The result was that there was a
the time difference of when the sound sensitivity. Is there something similar 1% change in intelligibility with a 14
reaches the ear. Localization of low- for monaural phase? Initially, the microsecond change in the phase
.H

frequency sounds is usually attributed answer seems to be no because (delay between pulses). It would seem
to binaural phase because the shadow delaying an ordinary sound by about to support the notion that phase is
i2

effect doesn’t work well at low frequen- 40 ms is not perceived as an echo. important in the hearing and speech
cies. Phase is thought to contribute Nevertheless, this initial supposition perception processes. (Note that 14
.R

little to sound localization at 10,000 Hz turns out not to be the case. microseconds corresponds to an
but it increases at lower frequencies. In 1978, for my Master’s thesis at acoustic path length of about 0.185”.
O

From about 1,000 Hz and below, most the University of Buffalo, I developed A sine wave with a period of 14
localization is associated with phase. a simple procedure that converted microseconds is equivalent to a signal
It is useful to compare the ear’s any sound into a series of pulses with a frequency of over 71,000 Hz.)
sensitivity to differences in loudness, (somewhat similar to a nerve cell).
pitch, and binaural phase. (Note that This was a monaural experiment using Speakers and Phase
normal hearing spans 16 Hz to about one small open-air speaker in place
20,000 Hz with a maximum sensitivity of headphones. The pulses were So what does all this have to do
74 May 2007
Fonte1.qxd 3/29/2007 11:20 AM Page 75

SONIC REALISM
with Hi-Fi? Quite simply, virtually all will not be considered in order to 1,000 Hz and 3,000 Hz components
the speaker systems on the market keep things as simple as possible. is reproduced. The 1,000 Hz signal is
today destroy the proper phase It is important to remember that routed to the woofer and the 3,000
relationships of the sounds that they ordinary sounds are not sine waves Hz signal goes to the tweeter. The
reproduce. The fundamental reason but complicated combinations of sine original signal is shown in Photo 1 and
for this is because of the practical waves that span many octaves. this is what is heard if both speakers
limitations of the speakers (drivers) Speech is a good example. In order are equidistant from the ear.
themselves. A single driver cannot for speech to be intelligible, the If there is a path length difference
reproduce the full range of frequen- frequencies of about 300 Hz to 3,000 between the woofer and tweeter of
cies that the ear can hear. In order to Hz must be reproduced. However, only two inches (or multiple of two
W
do so, multiple speakers are used. This few people think that a telephone inches), the ear receives significantly
is obvious. Tweeters are hopeless at produces high fidelity reproduction distorted signal that is shown in Photo
W
providing booming base and woofers of someone talking. Natural speech 2. Obviously, with signals consisting of
fade away at two or three thousand contains sound components from many frequency components and
W

W
Hertz. The requirement of multiple about 100 Hz to over 10,000 Hz. many signal paths, the reflected wave
speakers is the underlying problem. Let’s examine what happens to shapes can be vastly different from the
W

Figure 1 illustrates a typical speaker speech when it is reproduced by the original. These distortions are the direct
.G
setup. It consists of a tweeter and a speaker system in Figure 1. The speak- result of the loss of phase information.
W

woofer. For convenience, the speaker er’s cross-over directs the high frequency
iU
enclosure is placed on a support at ear components to the tweeter and the low Acoustic Peculiarities
level. In this way, the direct line distance frequency components to the woofer (if
.R

RU
from the tweeter and the woofer to the no cross-over is used, the natural One of the tell-tale indicators that
ear are the same. This means that the response curves of the drivers perform this different signal is important is seen
AD

sounds from both speakers reach the the same function but less effectively). in the common problem of stereo
M
ear at the same time. However, a typical For the direct line path, the ear hears all setup. If I stand next to one speaker I
iO

ceiling is an excellent reflector of sound. of the components at the same time and will often have difficulty in determining
EL
There is a second acoustic path from their phase relationships are maintained. if the other speaker is operating. But,
the speaker to the ear that results from However, with a typical speaker system this shouldn’t happen. If I’m talking to
SC

E
a reflection from the ceiling. So a shown in Figure 1, the high frequency one person next to me and someone
.H
reflected signal from the woofer, which sounds reflected off the ceiling are heard else 10 feet away starts talking, I cer-
A

is lower to the floor, will travel farther first with the lower sounds bringing up tainly know that. I may not be able to
i2
than a reflected signal from the tweeter, the rear. The phase relationships of the understand that person because of the
M

which is closer to the ceiling. reflected sounds are destroyed. In effect, nearby person’s voice, but I surely hear
.R
This changes the phase relation- the ear hears a different signal coming that the far person is speaking. The
AT

ships and the wave-shape (see Photos from the direction of the ceiling. Again same should be true of the far stereo
O
1 and 2). The more drivers that there refer to Photos 1 and 2. speaker. The sounds coming out of that
OR

are in the speaker system, the greater The two photos show what speaker are different from the close
this phase distortion will be. There is happens when a signal consisting of one (otherwise it wouldn’t be stereo).
also the reflection from
UL

the floor, as well as


Ceiling
from other large objects
in the room. These
.H

Longer 1 kHz path


additional reflections
3000 Hz
i2

FIGURE 1. The fundamental Shorter 3 kHz path


problem with most Tweeter
.R

speaker systems is
that multiple drivers Equal path lengths
1000 Hz
are required. This
O

separates the high and Ear


low frequencies to
different physical
locations. The result is Woofer
that reflected sounds
have different acoustic
path lengths for
different frequencies. Floor
This is phase distortion.

May 2007 75
Fonte1.qxd 3/29/2007 11:21 AM Page 76

SONIC REALISM

W
W
W

W
W

.G
W

iU
PHOTO 1. A signal that consists of 3,000 Hz and 1,000 Hz PHOTO 2. The same signal as Photo 1 except that the acoustic
sine waves. This is the “proper” signal and is what the ear path length for the 3,000 sine wave has changed by about
.R

hears if the acoustic path lengths of the tweeter and woofer two inches (about 180 degrees) relative to the 1,000 Hz sine
RU
are the same. wave. The shape is considerably different from Photo 1.
AD

This makes sense only if there is a normal speech. This level follows an
Auto-C
Correlation
M
difference between a person’s voice inverse-square relationship as the
iO

and a reproduction of a person’s distance increases. At two feet, the The reason reverb isn’t heard by
EL
voice. The only significant difference level is 50% or 6 dB down, and so people in the room is because the ear
is phase. The reflections of a person’s forth. If there is a wall four feet away apparently possesses an auto-
SC

E
voice do not suffer from phase distor- from the person speaking, then the correlation function (or its equivalent).
.H
tion because all the signals come from echo returning from the wall is about This is clearly demonstrated by the fact
A

a single point. There is no break-up of 24 dB down (excluding wall losses) that humans do not perceive short-
i2
the voice signal into multiple frequen- and delayed by about 8 mS. This is a term echos (delays of less than about
M

cy channels where each channel has a very substantial amplitude difference. 40 ms). But we certainly do perceive
.R
different physical location. However, if the microphone is four echos with delays longer than that. This
AT

Then there is the strange effect feet from the person and there is a wall seems to conflict with the demonstrat-
O
heard when recording a conversation four feet beyond the microphone, the ed sensitivity of the ear to delays of
OR

in an ordinary room. If the echo will be only 6 dB down (and about 14 µs. This is a difference by a
microphone is some distance from the delayed by 8 ms). This is not a very factor of nearly 3,000. It implies that
person speaking, it often sounds as if large volume difference when consid- something is happening to sounds that
UL

the recording was made in a tin can or ering that speech varies considerably are delayed from 14 µs to about 40 ms.
at the bottom of the well. (Police in amplitude. Thus, the reflection is Auto-correlation is a technique
undercover recordings are a typical perceived as being virtually as loud as that allows the removal of echos. (This
.H

example.) Sometimes the speech is the person speaking. This can be is an important issue with the
nearly unintelligible. However, if you compared to one person speaking telephone companies who have done
i2

were present during the recording, from four feet and another speaking a lot of work on the subject.) The con-
you didn’t notice anything odd. Why? from 12 feet. It is clear that in such a cept is fairly simple. If a delayed signal
.R

There are two factors at work in situation, both people will be heard at is identical to an earlier signal, then the
this second example: reflection and a reasonably similar loudness. So, the second signal must be an echo and
O

auto-correlation. Sound reflects well tape recording presents the speaker can be removed. The method of
from hard surfaces. Often, there is and the echo at nearly the same determining “identical” is a statistical
only about one dB or so of loss volume. That explains the tin can effect process called auto-correlation. It
(or about 90% reflection). If a micro- as a reverb. This reasoning seems compares, or correlates, different parts
phone is held about a foot from the acceptable but it doesn’t explain why of the signal, looking for similarities. If
mouth of someone speaking, the the reverb isn’t heard by people in the the different signal parts are similar,
sound level is about 65 to 70 dB for room when the recording was made. then there is a high auto-correlation.
76 May 2007
Fonte1.qxd 4/5/2007 4:43 PM Page 77

SONIC REALISM
This explains why the recording saw that the ear’s sensitivity to phase er systems will be detailed that the
sounds very different. If you were is extremely high. Finally, it was shown provide proper phase relationships
in the room, your hearing system can that common speaker systems with regardless of path length differences. A
apply many tools to clarify the more than one driver ruin the phase high-fidelity system will also be described
speech. Primarily there is binaural auto- relationships. This is because sound that produces a qualitative difference in
correlation that can be used. Then there reflections from the ceiling (or floor, sonic reality. Ordinary stereo recordings
is sound-shadowing (from your head) to etc.) do not maintain the same phase and/or stereo FM broadcasts will be used
localize the person speaking. Monaural relationships as the direct line sound. as the source material. Recording consid-
auto-correlation can be employed as In the next part, two different speak- erations will also be discussed. NV
well, since your brain “knows” that any
W
identical sound coming from a different
direction must be an echo. You have a
W
visual reference as well, which certainly
has the potential to assist in localization.
W

W
Lastly, the sonic characteristics of the
room itself can provide useable cues.
W

Auto-correlation cleans up the voic-


.G
es and makes them much more intelligi-
W

ble. It also explains why auto-correlation


iU
stops around 40 ms and echos are then
heard. This may be because the shortest
.R

RU
speech sound is also about 40 ms long.
If an auto-correlation system was longer
AD

than that, it is possible that short speech


M
sounds would be degraded because
iO

speech contains many repeated sounds.


EL
Obviously, the speech and hearing
mechanisms must be compatible in
SC

E
order for them to function properly.
.H
This finally provides a clear expla-
A

nation of why phase is so important.


i2
The auto-correlation function fails
M

with reflected multiple-driver, speaker


.R
systems because wave shape is signifi-
AT

cantly changed. Photos 1 and 2 show a


O
distinct difference in wave shape. The
OR

ear perceives this as a different sound


coming from a different direction. This
is why ordinary speaker systems do not
UL

and cannot sound like the real thing.

Conclusion
.H

This has been a very cursory


i2

examination of the human hearing


system with a focus on phase. We saw
.R

that hearing is very complicated and


employs subtle and sophisticated func-
O

tions associated with phase. We also

REFERENCES
REF 1: Normal Aspects of Speech,
Hearing and Language; Minifie,
Hixon, Williams, 1973, Prentice-Hall
May 2007 77
Full Page.qxd 4/4/2007 3:51 PM Page 78

Founding Sponsor

Premier Sponsors

Gold Sponsors

The International Business


Development Event for the
Mobile Robotics & Intelligent
W
Systems Industry
W
Corporate Sponsors & Exhibitors
May 15-16, 2007 Advanced Digital Logic
W

Hynes Convention Center Atair Aerospace


W
ATI Industrial Automation
Boston, MA Autonomous Solutions
W

.G
Axis New England
Conference Tracks Boston Engineering
■ Business Development and Investment
W

Braintech
iU
■ Technology and Standards Carnegie-Mellon University
City of Osaka
■ Applications and Products
.R

RU
Energid
■ New Markets for Industrial Robotics Foster-Miller
AD

■ Application and Products Galileo Mobility Instruments


Gears Educational Systems
M
- First Responder Robotics Global Emerging Trade Organization
- Security and Defense GOSTAI
iO

EL
Hagisonic
- Intelligent Transportation & Field Robotics Hobby Manufacturers Association
- Healthcare Robotics Hokuyo Automatic
SC

E
- Consumer Robotics Honeywell
.H
Hydroid
Now in its fourth year, the RoboBusiness Conference and InterSense
A

InTouch Health
i2
Exposition is the ‘must attend’ event for the mobile robotics
IZI Robotics
M

and intelligent systems industry. Japan External Trade Association


.R
Kumotek

AT

Two full days of sessions and keynotes in 5 tracks featuring 50+ MachineBus
world class speakers from business, government and academia
O
Magmotor
■ Expo floor featuring the latest robots and robotic technology Merlin Systems
OR

from around the world – many never seen in North America MicroInfinity
■ Special events, networking receptions, Robot Hall of Fame NeuroRobotics
luncheon, breakfast keynotes hosted by Evolution Robotics and NEXSTAR
Object Management Group
UL

Microsoft and more! OC Robotics


OceanServer Technology
REGISTER EARLY AND SAVE OLogic
.H

Register online at www.roboevent.com and use Perrone Robotics


Robosoft
Priority Code RBCD200 to save $200 off the price
i2

Robot Hall of Fame


of a full conference registration. RoboTeX
RoboTech Center
.R

Robotics Society of America


Questions? SCHUNK
O

E: info@roboticstrends.com Segway
P: 508-663-1500 x329 SolidWorks
Strategy Analytics
Valde Systems
Vecna Robotics
Virtus
Media Sponsors

www.roboevent.com
Page79.qxd 4/5/2007 7:55 PM Page 79

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
W
SpectraPLUS 5.0
W
FFT Spectral Analysis System
W

W
Download 30 day FREE trial!
W

.G
www.spectraplus.com
W

iU
Starting at $295
.R

RU
Pioneer Hill Software 360 697-3472 voice
PHS
AD

24460 Mason Rd 360 697-7717 fax


Poulsbo WA 98370 pioneer@telebyte.com
M
iO

EL
SC

E
.H
Interface a sharp LCD display to your BASIC Stamp® or other
micro-controller project with ease. No-solder wiring harnesses
A

i2
and easy mounting kits available too. See www.seetron.com today.
M

• 3.2 x 1.4 in. supertwist LCD


.R
BPI-216N
• 2400/9600 baud serial
AT

• Low (≈2mA) current draw


• Great with BASIC Stamps®
O
OR

• 3.2 x 2 in. backlit LCD


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

• Favorite for OEM applications


.H

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


• 2400/9600 baud serial
• Font and 15 screens in EEPROM
i2

• Easily draw points, lines, screens


.R

• 3 x 2 in. supertwist LCD


TRM-425L
• 1200-9600 baud serial
• ESD-protected, 4x4 keypad input
O

• 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
DesignCycle.qxd 4/4/2007 1:29 PM Page 80

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

CONFIGURATION WIZARDRY
IF YOU’RE STANDING UP, MAYBE YOU WANT TO TAKE A SEAT. Last time, we
started our indepth look at what makes the C8051F120 a premier 8051 drop-in
W
solution. That Digital Crossbar stuff we looked at seemed mighty complicated.
W
Well, after taking some time to read the C8051F120 datasheet, I fell upon a
W

thing called Configuration Wizard 2. I’m sorry to have to break this to you, but
W
the Configuration Wizard 2 application takes every bit of complication out of
W

.G
configuring any of the C8051F120’s general-purpose I/Os, peripherals, and the
Digital Crossbar. And, Configuration Wizard 2 is free as a download from the
W

iU
Silicon Laboratories website.
.R

RU
I don’t know about you, but I’ve had close encounters
AD

USING THE SILICON LABORATORIES of the third kind with lots of configuration and program
M
CONFIGURATION WIZARD 2 wizards. My best advice to you is to read their output
iO

messages and comments carefully and heed the wisdom


EL
I fired up the Configuration Wizard 2 application contained within the messages as ignoring a wizard’s sage
and selected the C8051F120 as the target device. Up advice can lead to trouble. With that, I followed the light
SC

E
popped an “untitled C8051F120” configuration window offered by the last comment in the generated initialization
.H
that contained the following text: file and opened the Configuration Wizard 2 “Peripherals”
A

menu. What I saw is what you see captured in Figure 1.


i2
M

*********************************************************
/////////////////////////////////////
CONFIGURING C8051F120
.R
// Generated Initialization File //
AT

///////////////////////////////////// GENERAL-PURPOSE I/O PINS


O
#include “C8051F120.h”
OR

I decided to go down the Configuration Wizard 2 Port


// Initialization function for device, I/O path as we already examined how to logically set up bit
// Call Init_Device() from your main program
6 of Port 1 (P1.6) for output in the previous installment of
void Init_Device(void)
UL

{ Design Cycle. Note that in Figure 2, I configured P1.6 for


} push-pull digital operation and enabled the Digital Crossbar.
If you’re having trouble finding the P1.6 configuration
.H

// Empty configuration change, follow along the Push-Pull/Open Drain row near
the bottom of Figure 2. Note also that the code to perform
i2

// Open the “Peripherals” menu and


// choose a peripheral to configure. the P1.6 configuration operation appears in the bottom
********************************************************* window of Figure 2. If you look back to the previous issue
.R

of Nuts & Volts, you’ll see the code that was generated
I took the liberty to save the raw Configuration Wizard by the Configuration Wizard 2 application here to enable
O

2 file as “.nuts_and_volts.cwg” (imagine that), which is the Digital Crossbar and set up general-purpose I/O
available on the Nuts & Volts website (www.nutsvolts.com). pin P1.6 matches the Digital Crossbar/P1.6 configuration
Keep in mind that I haven’t written a line of anybody’s code we studied in the previous Design Cycle column. This
source code at this point. The Configuration Wizard 2 is promising.
application automatically stuffed in the #include This gets better. In the Port_IO_Init function snippet that
“C8051F120.h” statement and built the Init_Device function follows, I’ve culled out the C8051F120 general-purpose I/O
skeleton you see in the previous code snippet. comments and code that we are most interested in:
80 May 2007
DesignCycle.qxd 3/29/2007 10:58 AM Page 81

THE DESIGN CYCLE

*********************************************************
void Port_IO_Init() USING CONFIGURATION WIZARD 2
{
// P1.0 - Unassigned, Open-Drain, Digital TO CONFIGURE THE C8051F120
// P1.1 - Unassigned, Open-Drain, Digital
// P1.2 - Unassigned, Open-Drain, Digital
OSCILLATOR
// P1.3 - Unassigned, Open-Drain, Digital The C8051F120 has its own internal oscillator. However,
// P1.4 - Unassigned, Open-Drain, Digital
// P1.5 - Unassigned, Open-Drain, Digital
the C8051F120 can also be clocked by an external crystal. It
// P1.6 - Unassigned, Push-Pull, Digital <--- seems that no code is generated if the C8051F120 internal
// our change oscillator is configured for its most basic operational mode.
// P1.7 - Unassigned, Open-Drain, Digital We want some action. So, I configured the C8051F120 to use
an external 22.1184 MHz crystal to supply the C8051F120’s
SFRPAGE = CONFIG_PAGE;
P1MDOUT = 0x40; SYSCLK. There’s not a lot of pretty interactive screen play as
XBR2 = 0x40; we kinda saw with the general-purpose I/O configuration.
W
} However, the results generated by the Configuration Wizard 2
********************************************************* application are indeed impressive. If you want to check the
W
Configuration Wizard 2 application’s work, you’ll find that the
It’s rather obvious in the Port_IO_Init function code OSCXCN value in the Oscillator_Init function below breaks
W

W
that not only did the Configuration Wizard 2 application down as follows. The upper nibble (0x6_) puts the
create the Port_IO_Init function, it populated the C8051F120 into crystal oscillator mode. The lower nibble of
W

Port_IO_Init function structure with the code that is OSCXCN (0x_7) is set up for a crystal frequency that is greater
.G
necessary to activate the Digital Crossbar and configure than 10 MHz and lower than 30 MHz. The most significant bit
W

general-purpose I/O pin P1.6 as a push-pull digital output. of OSCXCN is set when the crystal oscillator is stable.
iU
The generation of C8051F120 source code doesn’t stop
here. Not only did the Configuration Wizard 2 application
.R

*********************************************************
RU
generate a new general-purpose I/O function, it entered a void Oscillator_Init()
call to the newly generated Port_IO_Init function in the {
AD

int i = 0;
Init_Device function that we will eventually call from our
M
SFRPAGE = CONFIG_PAGE;
main application. I’ve pulled the newly altered Init_Device OSCXCN = 0x67;
iO

function out from the main code body for you to see in the for (i = 0; i < 3000; i++); // Wait 1ms for
EL
Init_Device function code snippet that follows: // initialization
while ((OSCXCN & 0x80) == 0);
SC

E
CLKSEL = 0x01;
********************************************************* }
.H
// Initialization function for device, *********************************************************
A

// Call Init_Device() from your main program


i2
void Init_Device(void) The least significant bit of the CLKSEL register is set to
M

{
.R
Port_IO_Init(); ■ FIGURE 2. Look closely along the Push-Pull/Open Drain
AT

} line at the bottom of this shot to see the configuration change


*********************************************************
O
I made to the P1.6 general-purpose I/O pin. Also, notice I
enabled the Digital Crossbar.
■ FIGURE 1. Wizards are usually good things. In this case, the
OR

Configuration Wizard 2 application has opened up the entire


C8051F120 peripheral and general-purpose I/O collection to us
to do with what we please.
UL
.H
i2
.R
O

May 2007 81
DesignCycle.qxd 3/29/2007 10:59 AM Page 82

■ FIGURE 3. We’re not writing code for an F-18


targeting and navigation system. So, we can do
without the failsafe services of the C8051F120’s
watchdog timer for now.
Configuration Wizard 2 application allows us to
do this by entering the Reset Sources area of the
Peripheral pull-down menu (see Figure 1). As
you can see in Figure 3, a simple check box
entry does the job of disabling the C8051F120’s
watchdog timer. Is this fly-by-wire or what?

RUN LIKE HECK


W
Now that we’ve put the dog to bed, let’s
W
configure the C8051F120’s oscillator. Everything
we do with the UART baud rate is based on the
W

W
frequency of the C8051F120 system clock. I’ll
bet that you can manipulate the Configuration
W

configure the C8051F120 to get its SYSCLK from the Wizard 2 application Oscillator Peripheral settings to
.G
external crystal oscillator. You’re a savvy Design Cycle generate the oscillator code that follows:
W

reader and I’m sure you’re beginning to follow the logic


iU
behind the Configuration Wizard 2 application. The new *********************************************************
crystal oscillator function, Oscillator_Init, is set to be called void Oscillator_Init()
.R

RU
from the Init_Device function just like the general-purpose {
int i = 0;
I/O function we generated earlier. Here’s our updated
AD

SFRPAGE = CONFIG_PAGE;
Init_Device function:
M
OSCICN = 0x83; // set internal osc
// to run at its
iO

********************************************************* // maximum frequency


EL
// Initialization function for device, CCH0CN &= ~0x20; // disable cache
// Call Init_Device() from your main program // prefetch
SC

E
void Init_Device(void) SFRPAGE = LEGACY_PAGE;
{ FLSCL = 0x10; // set flash read
.H
Port_IO_Init(); // timing for <=50MHz
Oscillator_Init(); SFRPAGE = CONFIG_PAGE;
A

i2
} CCH0CN |= 0x20; // enable cache prefetch
M

********************************************************* PLL0CN |= 0x01; // power up PLL


PLL0DIV = 0x01; // PLL pre-divider =1:1
.R
PLL0FLT = 0x21; // PLL output clock
AT

// = 30-60 MHz
STEP OUT OF THE TRUCK
O
// PLL reference clock
// = 19-30 MHz
OR

If you’re following along with your copy of PLL0MUL = 0x02; // PLL multiplier = 2X
Configuration Wizard 2, you’ll see that Timers would be the for (i = 0; i < 15; i++); // Wait 5us for init
next logical step that we would take in our journey through PLL0CN |= 0x02;
while ((PLL0CN & 0x10) == 0);
UL

the Configuration Wizard 2 application. Let’s pull off the CLKSEL = 0x02; // output = SYSCLK
road we’re on, get out of the truck, and walk a different // SYSCLK derived from
path. Instead of configuring a Timer, let’s put a working // PLL
.H

UART configuration together. A UART configuration }


*********************************************************
requires more than just setting up the UART registers. In
i2

addition to twiddling the UART configuration bits, we must


also reconfigure the C8051F120’s oscillator, prepare the An analysis of the Oscillator_Init function reveals that
.R

C8051F120’s Timer 1, and set up the UART I/O pins. Don’t we want to clock the C8051F120 using its internal
worry, the Configuration Wizard 2 application takes all oscillator. The maximum unassisted clock speed we can
O

of that into account and doesn’t miss a beat in the UART attain with the C8051F120’s internal oscillator is 24.5 MHz
initialization and setup process. (OSCICN). Ultimately, we will use the C8051F120’s PLL
(Phase Locked Loop) to double the maximum internal
oscillator frequency (PLL0MUL), which will clock the
KNOCK OUT THE DOG C8051F120 at 49 MHz. We must compensate the
Before we do anything towards our UART configura- C8051F120’s internal Flash memory read/write system to
tion, we will disable the C8051F120’s watchdog timer. The allow reliable Flash reads and writes at 49 MHz (FLSCL).
82 May 2007
DesignCycle.qxd 3/29/2007 10:59 AM Page 83

THE DESIGN CYCLE

Once the C8051F120’s Flash ■ FIGURE 4. This window


memory system is set up for our reminds me of that TV show
SYSCLK speed of 49 MHz, we can Let’s Make A Deal. There are
lots of knobs and switches
activate the PLL (PLL0CN) and behind the “doors” in this shot.
configure the PLL filters for 49 MHz
operation (PLL0FLT). The PLL needs rocket science here. The
some time to stabilize and when the baud clock for this mode of
PLLCK bit (PLL0CN register bit 4) UART operation can be pro-
transitions from low to high, the PLL vided by any of the available
has locked into the desired frequency. C8051F120 timers.
At this point, the C8051F120’s PLL is However, the most
the SYSCLK clock source. straight-forward baud clock
method uses Timer 1 in
W
Eight-Bit Timer/Counter Auto-
ACTIVATING UART0 Reload mode. As you can see
W
Okay, the stage is set for us to get in Figure 4, I selected Timer 1
one of the C8051F120’s UARTs on as the baud clock source. I
W

W
the air. Selecting the UART option also disabled the baud clock
from the Peripheral pull-down menu divider. The elimination of the
W

results in the display you see in Figure baud clock divisor (divide by
.G
4. In Figure 4, I’ve already performed 2) means that what we dial
W

all of the UART configuration steps, in as a baud rate will be


iU
which explains why the UART0 is on calculated and applied as our actual will supply a baud clock for 115200
the Digital Crossbar, Timer 1 is the baud rate. Right now, we want to get bps. The reload value (0xE5) is loaded
.R

RU
baud clock source, and the baud rate the UART0 transmitter up and have into the high byte (TH1) register of
is set for 115200 bps. Although I’ve no need to receive any data. So, I’m Timer 1 on every overflow of Timer 1.
AD

greased the skids, we can still work ignoring anything that has to do with A Timer 1 overflow occurs when
M
through the UART0 configuration setting up UART0 to receive. Timer 1 rolls over from all ones to
iO

process together. Taking the Configure TX path in zero. The low byte register (TL1) is
EL
I went down the Configure Port Figure 4 opens the window shown in always loaded with 0x00.
I/O path in Figure 4 to get to the Figure 6. As you can see, I’ve selected Lots of stuff happened while
SC

E
configuration screen shown in Figure the aforementioned Timer Mode configuring UART0. In the course of
.H
5. By selecting UART0, I attached (Eight-Bit Timer/Counter Auto- putting together the bits and pieces
A

UART0’s transmit and receive pins to Reload), identified the Timer 1 clock needed to spit bits from UART0’s trans-
i2
the C8051F120’s general-purpose I/O source as SYSCLK, and enabled Timer mit pin, Timer 1 was configured and
M

pins P0.0 and P0.1 respectively via the 1. Our baud rate of choice is 115200 enabled. Here’s the UART0-related
.R
Digital Crossbar. If you follow along (I hope that’s okay with you) and I set Timer 1 code that the Configuration
AT

the Push-Pull / Open Drain general- that up by clicking the Change Baud Wizard 2 application generated for us:
O
purpose I/O status line in Figure 5, Rate button you
OR

you’ll see that I also configured the see in Figure 6


UART0 transmit and receive pins as and entering my
push-pull. How did I know to do that? desired baud rate
UL

I read the UART0 section of the for UART0. The


C8051F120 datasheet and followed Configuration
the rules that are laid down there. I Wizard 2 applica-
.H

may not be the sharpest tool in the tion determined


shed, but I follow directions well. the reload value
i2

Since we want to be able to make for Timer 1 that


our C8051F120 UART communicate
.R

with a standard terminal emulator ■ FIGURE 5. In my


opinion, this is the
running on a personal computer or
O

coolest window that


another RS-232 equipped device, I the Configuration
selected standard eight-bit mode (see Wizard 2 application
UART Mode in Figure 4), which allows offers. At a glance,
us to use various standard baud rates we can see all
and provides for a start bit and one of the C8051F120’s
general-purpose I/O
stop bit in the asynchronous commu- and peripheral con-
nications bit stream (10 bits total). No figuration settings.
May 2007 83
DesignCycle.qxd 3/29/2007 11:00 AM Page 84

*********************************************************
SOURCES void Port_IO_Init()
{
■ Keil — An ARM Company (www.keil.com) — Keil C51 C SFRPAGE = CONFIG_PAGE; // enable access to
Compiler. // port config regs
P0MDOUT = 0x03; // push-pull on P0.0
■ Silicon Laboratories (www.silabs.com) — C8051F120; // and P0.1
C8051F120 Development Kit; USB Debug Adapter. P1MDOUT = 0x40; // push-pull on P1.6
XBR0 = 0x04; // enable UART0
XBR2 = 0x40; // Digital Crossbar
********************************************************* // enabled
void Timer_Init() }
{ *********************************************************
SFRPAGE = TIMER01_PAGE; // enable access to the
// Timer1 register set Of course, the UART0 bits were twiddled in the fray:
TCON = 0x40; // enable Timer1
TMOD = 0x22; // Timer1 to Mode 2 *********************************************************
// 8-bit Counter/Timer
W
void UART0_Init (void)
// with Auto-Reload {
CKCON = 0x10; // Timer1 uses system SFRPAGE = UART0_PAGE; // enable access to
// clock
W
// UART0 registers
TH1 = 0xE5; // Timer1 reload value SCON0 = 0x40; // UART0 serial port
// for 115200 baud
W

// mode = 8-bit Timer/


W
} // Counter Auto-Reload
********************************************************* SSTA0 = 0x10; // disable baud rate
W

If you’re wondering where the “Mode 2” wording // divide by 2


.G
TI0 = 1; // Indicate TX0 ready
came from in the Timer_Init function, it is the name that the }
W

C8051F120 datasheet uses to describe the eight-bit


iU
*********************************************************
Counter/Timer with Auto-Reload mode of operation. I’m
not going to insult your intelligence as everything you need The UART0_Init function is pretty simple. UART0 is forced
.R

RU
to know about the Timer_Init function can be found in the into Eight-bit Timer/Counter Auto-Reload mode, its baud rate
function’s comments. I already checked the Configuration divisor is disabled, and the UART0 transmit-ready bit is set.
AD

Wizard 2 application’s work and the bits generated by The final operation performed by the Configuration
M
the Configuration Wizard 2 application in the Timer_Init Wizard 2 application is to update the Init_Device function.
iO

function match the C8051F120 datasheet declarations. Here’s what the updated Init_Device function looks like now:
EL
Bringing up UART0 also required an addition to our
Port_IO_Init function code. Recall that the UART0 transmit and
SC

*********************************************************
E
receive pins needed to be configured for push-pull operation. void Init_Device(void)
.H
{
Here’s the new code that the Configuration Wizard 2 application Reset_Sources_Init(); // disable the watchdog
A

generated and pushed into the existing Port_IO_Init function: Oscillator_Init(); // set SYSCLK to 49 MHz
i2
Timer_Init(); // set 8-bit Timer/Counter
M

■ FIGURE 6. To my amazement, the Configuration Wizard 2 // Auto-Reload mode


.R
application correctly calculated the reload value. The ultimate Port_IO_Init(); // set UART0 TX and RX pins
AT

test will be to // for push-pull


UART0_Init(); // enable UART0 and set UART
see if we can
O
// mode to match Timer 1
issue a printf }
OR

statement and *********************************************************


get something
we can read in ■ FIGURE 7. This is the result of all of our hard work. I’ll
the Tera Term
UL

show you the hardware behind this in the next installment


Pro window. of Design Cycle.
.H
i2
.R
O

84 May 2007
DesignCycle.qxd 3/29/2007 11:01 AM Page 85

THE DESIGN CYCLE

C statement. I rest my case with Figure 7.


DOES IT REALLY WORK?
I sincerely hope that there was absolutely no doubt
in your mind. The Configuration Wizard 2 application can
WHERE’S THE HARDWARE?
do many wonderful things. However, it can’t write your (Yes, I was tempted to headline this section as
core application code for you. We went to a bunch of “Where’s the Beef?”) If you’ve ever taken pilot training,
trouble to configure our C8051F120 hardware to spit you know that more time is spent on the ground in
some ASCII characters out of the UART0 transmit pin. So, training than in the air when you begin the process.
I’ve put together a very simple application that sends a With that thought, you’ve done enough ground
message via the UART0 transmit pin and toggles an LED training with the C8051F120, and in the next installment
every time the message is sent. Here’s the application code of Design Cycle, we’ll jump into the cockpit of a
behind my madness: C8051F120 microcontroller. In addition to examining
the C8051F120 hardware, we’ll finish off writing some
W
********************************************************* code for the rest of the C8051F120 peripherals. In
void main() the meantime, I’ll post the C source code and
W
{ the Configuration Wizard 2 configuration file
unsigned int x,y; // declare local variables
Init_Device(); // init the microcontroller (nuts_and_volts.cwg) we discussed here on the Nuts &
W

W
SFRPAGE = UART0_PAGE; // enable UART0 access Volts website for you.
while(1){ For those of you that want to get your hands dirty
W

x = 0xFFFF; // init the kill-time values right now, you’ll need to get a demo or registered copy
.G
y = 0x007F;
do{ // kill some time of the Keil C51 C Compiler and a Silicon Laboratories
W

USB Debug Adapter to run the code I’ve presented in


iU
while(—x);
}while(—y); this Design Cycle entry. The easy way to do this is to
get yourself a Silicon Laboratories C8051F120
.R

RU
LED = ~LED; // toggled the LED on P1.6
printf(“\r\nNUTS AND VOLTS READERS ROCK!\r\n”);
Development Kit, which contains a nifty C8051F120-
equipped development board, a demo version of the
AD

}
} Keil C51 C Compiler, and a Silicon Laboratories USB
M
********************************************************* Debug Adapter. I’ll show you how to integrate and
iO

use the Keil and Silicon Laboratories tools as we put


EL
Again, no rocket science here. After declaring a the C8051F120 hardware through its paces next time
couple of integers for use by a kill-time routine, my little around. NV
SC

E
C8051F120 application calls the Init_Device function.
.H
Recall that the Init_Device function does everything
CONTACTING THE AUTHOR
A

necessary to prepare the C8051F120 peripherals and


i2
general-purpose I/O pins for pumping stuff out of UART0 ■ Peter Best can be reached via email at peter@nerdvilla.com.
M

and bit twiddling the LED, which


.R
is attached to general-purpose I/O
AT

pin P1.6. I selected the kill-time


O
delay values to toggle the LED and
The Standard for checking Locate shorted or leaky
Capacitors in-circuit components or conditions
OR

send a message once every couple


of seconds. Good enough to be the to the exact spot in-circuit
Sending a message using UART0 choice of Panasonic, Still cutting up the pcb,
Pioneer, NBC, ABC, Ford, and unsoldering every
UL

involves writing to the UART0 buffer


register SBUF0. We must load the JVC, NASA and thousands part trying to guess at
of independent service where the short is?
SFRPAGE register with the SBUF0
.H

technicians. $209
SFR page so we can address the
SBUF0 register within the SBUB0 Inexpensive enough to pay for itself in just Your DVM shows the same shorted reading all
i2

SFR page. The kill-time routine is one day’s repairs. At $209, it’s affordable. along the pcb trace. LeakSeeker 82B has the
a simple do-while loop that resolution to find the defective component.
.R

decrements the x variable from And with a 60 day trial period, satisfaction Touch pads along the trace, and LeakSeeker
0xFFFF to zero as long as the guaranteed or money-back policy, the only beeps highest in pitch at the defect’s pad. Now
O

y variable has not decremented thing you can lose is all the time you’re you can locate a shorted part only a quarter of
to zero itself. When all of the currently spending on trying to repair all an inch away from a good part. Short can be
those dogs you’ve given up on. from 0 to 150 ohms
integer variables expire to zero,
the LED is toggled and a message CapAnalyzer 88A LeakSeeker 82B
is emitted from UART0. This is all Available at your distributor, or call 561-487-6103
contained within the braces of an Electronic Design Specialists www.eds-inc.com
endless loop created by the while(1)
May 2007 85
NearSpace.qxd 3/29/2007 10:13 AM Page 86

SPACE
NEAR

APPROACHING THE FINAL FRONTIER


■ BY L. PAUL VERHAGE

THE NEAR SPACE VENTURES ■ FIGURE 1

WEBPAGE
W
NEAR SPACE VENTURES IS THE
W
WEBPAGE OF an amateur radio high
W

altitude balloon (ARHAB) and Civil Air


W
Patrol (CAP) organization named
W

.G
CAPnSPACE. CAPnSPACE has developed
W

a great website that I’d like to share


iU
with you this month. But first, let me
.R

RU
tell you how I met the Campbells, the
AD

founders of CAPnSPACE.
M
T
iO

hey were attending the Great currently maintains. Currently, the • Image Gallery is a set of folders for
EL
Plains Super Launch in 2004 — only archived articles are in each CAPnSPACE mission, project,
their first near space event — to see Announcement. That’s not surprising and workshop, containing photo
SC

E
how high altitude ballooning was since their website is fairly new and albums of all of their activities.
.H
done. Since they had nothing else to CAPnSPACE has concentrated on
A

do other than watch, I put them to developing their online applications. In the center column are links to
i2
work filling and launching my balloon. messages. They are brief but you
M

(That just goes to show that if I see • Forums takes you to a discussion may post your own comment after
.R
you hanging around very long, I’ll put board. reading them.
AT

you to work!) Since then, we’ve been My favorite part of the website is
O
good friends. • Links is currently empty, but ready to the right column. Here is where you’ll
OR

Visit the CAPnSPACE website for network with other valuable websites. find links to their two online flight
reports on their past launches, infor- prediction applications. I go here to
mation on their currently planned • Downloads is a page listing 36 near make predictions for my near space
UL

launches, and the software tools space presentations. missions, specifically, the expected
needed to make near space flight flight path and recovery zone. Even if
predictions. The part of their website I Below the top row of links are you’re not ready to launch a near
.H

like best is its selection of online pre- three columns of additional links. I’ll spacecraft, you should check out these
diction applications. Before I describe describe the important aspects of applications — they may encourage you
i2

how to use those apps, I’ll briefly each column. to launch your own near spacecraft!
introduce the rest of their website. In the left column is a series of Making a near space flight predic-
.R

The top of their website shows links to things like Mission Status, tion at CAPnSPACE is simple. You start
the following convenient links: Image Gallery, and some of the items by running the Ascent Rate Calculator
O

already described at the top of the to determine how fast the near
• Home appears throughout the homepage. spacecraft will climb. Then you run
website and it takes you back to the the Flight Track Prediction Utility to
homepage no matter where you are. • Mission Status contains information predict the flight path and recovery
on the payloads CAPnSPACE is prepar- zone of the mission. If you’re not
• Articles takes you to page that has 15 ing to launch, the frequencies they’ll happy with the predicted flight path
categories of articles that CAPnSPACE use, and the current weather report. and recovery zone, you have a few
86 May 2007
NearSpace.qxd 3/29/2007 10:30 AM Page 87

N E A R S PA C E

options. First, you can


cancel the launch and
reschedule it for next week
(I don’t like this one).
Second, you can change
the amount of helium inside
the balloon to change its
climb rate and maximum
altitude. Or third, you can
move to a new launch site.
Let’s look at each program
in more detail.
■ FIGURE 2
W
THE ASCENT Aviation Regulation 101
RATE CALCULATOR
W
(FAR 101) for the additional
requirements. You can con-
W

W
The first ascent rate calculator sult my book — Near Space
program was written by Hank Riley. (available from Parallax;
W

His program calculated the maximum www.parallax.com/html_


.G
altitude and climb rate for a balloon pages/resources/cust
W

given its type, initial fill of helium, and apps/app_nearspace.asp)


iU
payload weight (which you can find — for its chapter on FAR
at the Edge of Space Science website 101 or consult with other
.R

RU
at www.eoss.org) ARHAB groups.
When you run the CAPnSPACE The Parachute Wgt field
AD

version of the Ascent Rate Calculator, asks for the weight of the
M
you’re presented with the screen parachute in ounces.
iO

shown in Figure 2. Click the CALCULATE


EL
The Balloon Wgt field asks for the button to calculate the ■ FIGURE 3
size of the balloon. When you Estimated Ascent Rate
SC

E
purchase a weather balloon from based on your values. Remember this
WEB BASED
.H
Kaymont (www.kaymont.com), you ascent rate, because it’s one of the
BALLOON TRACK
A

order it by weight. Examples of the inputs to the next program, Balloon


i2
balloons I’ve flown in the past are Track. Just a note here — the minimum
M

300, 1,000, 1,200, 1,500, and 3,000 ascent rate I accept for a flight is 1,000 Balloon Track has a long history in
.R
grams. The weight of the balloon feet per minute. When the ascent rate the ARHAB community. It was
AT

(grams is actually a measure of mass is too low, there’s a chance the originally written by Bill Brown as a
O
and not of weight — but we’ll ignore balloon will become neutrally buoyant Basic program that ran under MS-DOS
OR

that) is an indication of the balloon’s and stop rising. In a future article, I’ll (remember that operating system?).
maximum volume and the altitude it explain how you can prevent this from Later, Rick Van Glahn of Edge of Space
can reach before bursting. ruining your near space mission. Science in Denver rewrote Balloon
UL

The Nozzle Lift field asks how


much lift the balloon will have after
being filled. The greater the lift of the
.H

balloon, the faster the balloon will


climb. At the same time that its ascent
i2

rate is greater, its maximum altitude is


lower, but only slightly. A lift of three
.R

pounds greater than the payload weight


is my minimum preferred amount of lift.
O

The Payload Wgt field asks for the


weight of the near spacecraft sans
parachute. In most cases, this won’t
be greater than 12 pounds. You can
launch a payload heavier than 12
pounds, but additional rules will apply
to your launch. Check Federal ■ FIGURE 4
May 2007 87
NearSpace.qxd 3/29/2007 10:28 AM Page 88

NOTE
The maximum altitude that a
near spacecraft will reach is
influenced by the weight of the
near spacecraft, the original volume
of helium in the balloon, and
variations in the balloon’s manufac-
ture. So the numbers I’ve given
you are just rough estimates. You
can experiment with changing lift
amounts and payload weights with a
program called LiftWin. This program
is available from the website of
W
the Edge of Space Science (www.
eoss.org) as a free download. ■ FIGURE 5
W
Track as a Windows application. Now, the planned enhancements to the elevation are usually swamped by
W

W
Troy Campbell has created an online application. inaccuracies in the predicted winds
version of the software that takes you The Launch Site section asks for aloft, precision of the balloon’s helium
W

through the entire process of making a the latitude and longitude of the fill, and manufacturing variations in
.G
flight prediction (see Figure 3). planned launch site. This information the balloon. One exception may be
W

Currently, you don’t have to enter is used to map the mission’s predicted when the balloon is launched from
iU
information in the General section. In flight path and recovery zone. The the top of a tall mountain.
the future, you’ll want to enter this elevation field is not very important The Flight Parameters section asks
.R

RU
information because of because the effects of launch for the predicted ascent rate, descent
■ FIGURE 6 rate, and burst altitude of the balloon.
AD

Here’s where you need the result from


M
the Ascent Rate Calculator. In my
iO

experience, the descent rate is between


EL
1,000 and 1,200 feet per minute. If the
parachute is larger or the payload
SC

E
lighter, the descent speed is lower. You’ll
.H
get a better feel for the proper descent
A

rate after you’ve flown a mission or two.


i2
As a rule of thumb, I expect to reach
M

50,000 feet with a 300 gram balloon,


.R
80,000 feet with a 1,000 gram balloon,
AT

85,000 feet with a 1,200 gram balloon,


O
93,000 feet with a 1,500 gram balloon,
OR

and over 100,000 with a 3,000 gram


balloon (see the note in the sidebar).
There’s one data entry field and
UL

three buttons in the Data Source sec-


tion. The Wx Station (weather station)
field asks for the station ID for the
.H

weather station closest to your launch


site. Since very few people know the
i2

three letter designation of their local


weather station, there’s an option to
.R

look it up in the Station List link. You’ll


find weather stations sorted by state
O

and listed in alphabetic order. Next to


each weather station is its three letter
designation. I discovered that the Boise
weather station has a station ID of BOI.
After entering the station’s ID,
click one of the three buttons below
■ FIGURE 7 the Wx Station field.
88 May 2007
NearSpace.qxd 3/29/2007 10:31 AM Page 89

N E A R S PAC E

Each button selects a particular weather model to use for


the flight prediction. There are lots of weather models UTC CONVERSIONS
developed by meteorologists, but the ones the ARHAB ■ In the Eastern Time zone, add five hours to the
community likes best are the GFS models. They’re based on planned launch time.
current weather observations, including data from
radiosonde launches. GFS models are updated periodically, ■ In the Central Time zone, add six hours to the planned
depending on how short-term their predictions are. launch time.
If the launch is between eight and 16 days away, then
■ In the Mountain Time zone, add seven hours to the
select the 12 hour model (as its name indicates, this model is
planned launch time.
updated every 12 hours). If the flight is between three and
eight days away, then select the six hour model. If the flight is ■ In the Pacific Time zone add eight hours to the planned
less than 3-1/2 days away, then select the three hour model. launch time.
Now click on the Submit button at the bottom of the
W
page. The next webpage to appear is from READY, a data- If you’re in a part of the country that obeys daylight
base of (perhaps all) meteorological models (see Figure 4). savings time (summer time), add one hour less (or four
W
First, update the time and date of the launch. By hours for Eastern, five hours for Central, six hours for
default, READY displays the most current time and date. So Mountain, and seven hours for Pacific).
W

W
if you forget to update this field, the predictions will be in
error. The time and date drop-down menu is located at the locations gives you a better idea of the recovery zone than a
W

top right of the page (I’ve pointed it out in my graphic). The single prediction will. If the recovery zone looks good, then
.G
time and date are given in UTC which is several hours you probably have found an ideal flight. It’s all pretty cool,
W

later than the current US time. (See the sidebar for how to isn’t it? If you’re interested in near space missions and
iU
convert your current time to UTC.) you’re located near eastern Kansas, then contact
To prevent software bots from downloading READY CAPnSPACE. They’d be pleased to help you. Be sure you
.R

RU
data so frequently that it denies the rest of us data, you tell them that Paul from Nuts & Volts Magazine sent you!
must manually verify that you’re a human by typing the Onwards and Upwards,
AD

characters displayed in the Access Code field. Now click on Your Near Space Guide NV
M
the Get Profile button and wait. The Online Balloon Track
iO

software collects the data file from READY, so you don’t


EL
have to copy the data yourself. When the READY data has
been received, Balloon Track returns back to Near Space
SC

E
Venture’s Output selection screen.
.H
Now you get to select how to display the flight prediction.
A

I recommend the Plot Track on Google Maps option. When


i2
you select this option, you get a Google Map with an overlay
M

of the near spacecraft’s predicted flight path (see Figure 6).


.R
On the map, the ascent portion of the flight is colored
AT

blue and the descent portion is red. The map is a simple


O
one showing roads, towns, lakes, and rivers. You can zoom
OR

into the map for more detail. Next, try selecting the Satellite
button at the upper right of the screen. This display is an
overlay of the near spacecraft’s flight path on an aerial
UL

image. That gives you a much better idea of the terrain your
balloon will recover in. Finally, select the Hybrid button for
a map with the roads, satellite image, and flight path of the
.H

near spacecraft (see Figure 7).


So now you have a map, what next? Take a close look
i2

at where the balloon is predicted to land. Is the recovery


zone located in or near towns, lakes, or forests? All those
.R

make for a difficult recovery. If the recovery zone looks


difficult, remember you can change the balloon’s initial
O

volume of helium or change the launch time and place. Be


sure to run the prediction again if you change something.
Now a word of warning. The prediction of a near space
flight is not an exact science. So be sure to look around the
recovery zone for areas that you want to stay out of. It’s best
if you make a few more predictions with changes in the
ascent rate and burst altitude. The collection of recovery
May 2007 89
GetStartedWithPICs.qxd 4/4/2007 3:46 PM Page 90

■ BY CHUCK HELLEBUYCK
GETTING STARTED WITH
THE LATEST IN PROGRAMMING MICROCONTROLLERS
PICs
8/14/20-PIN PIC®
MICROCONTROLLER FAMILY
W
PROGRAMMING PIC® MICROCONTROLLERS (MCUs) has been my hobby
W
and sideline for many years. In fact, I started back when there were only
W

five PIC MCUs to choose from. Now there are hundreds of different PIC MCUs.
W
I’ve helped thousands get started programming PIC MCUs through my books,
W

.G
articles, and development boards, and have enjoyed every minute of it.
W

iU
O utside of this activity, my profes-
sional electronics career (that
needed for programming, which I only
realized during the development of my
the features these parts offered. I soon
appreciated how I could build sample
.R

RU
pays the larger portion of my bills) EZPIC programmer. programs using the various parts from
has always been in the automotive I originally had an eight-pin socket, eight-, 14-, and 20-pin PIC MCUs with-
AD

electronics industry, and I’ve learned and then I changed it to a 14-pin socket out having to change the development
M
a lot about designing electronics in when I realized they could share. After board. This was the result of the
iO

this harsh environment. Change is getting feedback from a customer who common pinout between these parts.
EL
inevitable and I recently was offered had successfully programmed a 20-pin Figure 1 shows the common pin layout.
the chance to join Microchip as a Field PIC MCU by putting it in the 14-pin Notice how the 20-pin parts have
SC

E
Applications Engineer, so I made the socket, I modified the design to replace up to 12 A/D ports. There is a lot
.H
move. This should give me even more the 14-pin with a 20-pin socket. I’m just packed into these parts, so I left off
A

information to draw from for these arti- in the process of getting those boards some of the pin descriptions — such as
i2
cles, but my focus for this column is manufactured, because I had to wait the comparator pins and the T1G pin
M

and always will be to help beginners, until the previous version was sold out. designation for the Timer1 gate. This is
.R
hobbyists, and anybody else learn how a relatively new feature on PIC MCUs
AT

to get started programming PIC MCUs. that allows you to turn the internal
COMMON PINOUT
O
Before I joined Microchip, I hadn’t clock feed to Timer1 on or off, based
OR

used the 14-pin or 20-pin PIC MCUs at I did the design work on my EZPIC on an external signal. You can set it to
all. In fact, I think I only had one in my programmer before joining Microchip, allow the internal clock feed to run on
storage cabinets, which are full of PIC but never fully realized how handy a high pulse and turn off on a low
UL

MCUs. The 14-pin and 20-pin PIC having those common pinouts was until pulse. This way, you can use Timer1 to
MCUs are cousins to the eight-pin PIC I started playing with them. Because I easily measure pulse width in the back-
MCUs that help make up the full line had easy access to some of these parts ground while your program is doing
.H

of low pin count devices. They all at Microchip, I began using them with something else. This will definitely be a
share the same Vdd, Vss, Data Clock, Microchip’s PICkit™ 2 programmer, feature I’ll talk about in a future article.
i2

and MCLR connections that are which I’ve talked about here before. The My January ‘07 column on using
PICkit 2 starter kit comes the PIC12F675 as a 555 replacement
.R

with a 20-pin socketed was popular, based on email feedback.


development board. I Apparently, a lot of people like those lit-
O

began by programming tle eight-pin devices. Now I realize that


various eight-, 14-, and starting with an eight-pin PIC MCU lays
20-pin PIC MCUs to the groundwork for a smooth upgrade
better understand all of path. If you plan ahead and lay out your
circuit board for a 20-pin PIC MCU, you
■ FIGURE 1. The common
pinouts of eight-, 14-, and
can just drop in a 14-pin or eight-pin
20-pin PIC MCUs. PIC MCU in the same socket without
90 May 2007
GetStartedWithPICs.qxd 4/4/2007 3:47 PM Page 91

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

issue. You can use the extra I/O on the PIC12HV615 and ■ FIGURE 2. An example setup for the
20-pin part for functions you will only PIC16HV616 — Enhanced Capture and Compare PWM.
use occasionally. All of these parts offer which are newly
the internal oscillator plus the internal released. These are
MCLR option, so all you really need to Flash-based PIC
hook up is Vdd (2.0-5.5V) and Vss MCUs, but they
(ground) to bring the PIC MCU to life. have a built-in shunt
regulator (which is
a fancy term for a
EXTRA FEATURES zener diode). This
Some of you may be reading this means they can
and saying, “Duh, where have you been? run off of a higher
We’ve known about these parts.” Sorry voltage without
W
if I’m telling you something you already needing an external
knew, but I was surprised to find how regulator. Figure 3 shows a schematic ■ FIGURE 3. The
W
many advanced features these parts for a PIC16HV616 with the shunt regu- PIC16HV616 with built-
have. One of them is the Enhanced lator series resistance and capacitance in shunt regulator.
W

W
Capture and Compare PWM (ECCP) in place. I’m not showing the MCLR
peripheral that is great for designing a pull-up or the oscillator, since these
W

motor-control application. Figure 2 would be set to internal operation.


.G
shows a sample setup direct from the The key to using this part is setting
W

data sheet. My layout in Figure 1 doesn’t the proper series resistance and capac-
iU
show the P1A through P1D pins, but you itance. There are three formulas for
can easily find them on the data sheet. calculating those values, depending
.R

RU
I hope to cover more on this on the current and voltage range you
peripheral in the future article, as I need to work with. I’ve found that you
AD

know motor control interests a lot of either have a large voltage range or a lower end of our voltage range and
M
people. The nice thing about this large current range, but not both at the the upper end of our current range,
iO

peripheral is it handles all the timing same time. For example, I chose to use we get the following:
EL
and even the dead-time delay required, a voltage input of nine to 12 volts. This
so you don’t ever have two FETs on at limits how much current range I can Rmax = (9V – 5V)/1.05 (25ma + 4 ma)
SC

E
the same time causing a short. This can have. I limited my current variation to Rmax = 131 ohms
.H
happen when one FET is shutting down 20-25 ma. If I go above or below this,
A

slowly while the other starts up quick- the shunt regulator will be out of its Equation 2 gives us the lower limit
i2
ly, causing the temporary short. design limits. Most people can set of the series resistance.
M

These parts also have internal com- their design to a fixed voltage input,
.R
parators and even share some of the which gives you a greater current Rmin = (12V – 5V)/0.95 (20ma + 50 ma)
AT

same A/D connections, shown as all the range to work with. The equations are Rmin = 105 ohms
O
ANx pins in the layout of Figure 1. I real- listed below as Equation 1, 2, and 6,
OR

ly have to look at these parts for future which I pulled from the Microchip With this, I select a value of 120
home projects, because they have some application note AN1035 and you can ohms that falls within the two limits.
of the latest and greatest PIC MCU fea- download from www.microchip.com. But, I need to calculate the power rat-
UL

tures. They even have an LIN peripheral ing of the resistor. Since the top of the
EQUATION 1:
in some of the parts, which is a commu- resistor can see a maximum of 12V and
nication bus that is growing in populari- the bottom will see the regulated 5V,
.H

ty within the automotive world. Again, the power is found with the equation:
maybe you knew about all this but I just
i2

wanted to show that even an old-timer EQUATION 2: Rpwr = (12V – 5V)2 / 120 ohms
like me can work with PIC MCUs for Rpwr = 0.4 Watts
.R

years and still discover new stuff.


Therefore, I’ll use a 1/2 W resistor.
O

Now I have to calculate the


HIGH-VOLTAGE (HV) EQUATION 6:
capacitor. The data sheet states the
PIC MCUs capacitor needs to be larger than
0.047 µF for noise suppression, and
Through this discovery phase, I also less than the calculated capacitance
was introduced to a couple of new Equation 1 gives us the upper of Equation 6. So, putting the values in
8/14-pin family members — the limit of the series resistance. Using the the equation gives us the following:
May 2007 91
GetStartedWithPICs.qxd 4/4/2007 3:47 PM Page 92

■ FIGURE 5. Microchip’s DM164120-1


development board.
voltage line from dipping quickly when
■ FIGURE 4. A configuration for the load kicks in, possibly resetting the
W
driving high-voltage devices. PIC MCU. But, that may be easily solved
if the load is fairly clean. This does offer
W
Cmax = 42/[120 * ln (2.1/5.0)] back of the motor. This may be a great a simpler solution than trying to add a
Cmax = 0.4 µF way to make a serially controlled separate voltage regulator.
W

W
motor — similar to a serially controlled
Therefore, I chose a value of 0.1 µF — LCD module. (That also may be the
DEVELOPMENT SUPPORT
W

since it’s greater than 0.047 µF and less focus of a future article.)
.G
than 0.4 µF. We now have our PIC What I like most about these parts As I mentioned, Microchip’s
W

MCU regulator ready to go. One thing is the ability to run them off the same PICkit 2 programmer supports these
iU
to note with this type of setup is the voltage source as the outputs you may parts. So does the latest version of my
amount of current a shunt regulator be trying to drive. For example, back in PICBasic Pro compiler — except for the
.R

RU
draws without anything happening. The the November ‘06 column, I showed PIC12HV615, which has just recently
shunt regulator will draw 4 mA, even if some hardware interfaces to the PIC been released to the public. This is the
AD

the PIC MCU is in sleep mode and MCU. One of them showed how to eight-pin version of the PIC16HV616,
M
nothing else is connected. This is not an drive some high-voltage devices using a so it’s got its own set of great applica-
iO

ideal setup for battery-operated devices bipolar transistor, as shown in Figure 4. tions. Can you imagine that part in a
EL
that need long life. For those devices, I don’t specify a voltage here, but small surface-mount SOIC package
you could use the PIC16F616 version instead just state B+. What if that was 12 without the need for a regulator?
SC

E
of this same part, with an external low volts, instead? Using the resistor and I can already think of several appli-
.H
quiescent current draw regulator. capacitor values I calculated above, I cations where that could be squeezed
A

The HV parts are really handy, could control one of these outputs while into a tight sensor package. It could
i2
though, for applications that need a also powering the HV PIC MCU from use an A/D port to read the sensor
M

small component count. I’ve seen the same supply. Now, this will require element and then send the value back
.R
motors with the HV part built into the some better filtering to prevent the large via a one-wire serial connection. This
AT

O
OR

Phone: (719) 520-5323


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

USB Programmer $119.95 LAB-X Experimenter Boards BASIC Compilers for PICmicro®
Pre-Assembled Board
for PIC® MCUs Easy-To-Use BASIC Commands
.H

(with accessories)
Available for 8, 14, 18, 28, Windows 9x/Me/2K/XP Interface
and 40-pin PIC® MCUs
RoHS 2-line, 20-char LCD Module PICBASIC™ Compiler $99.95
i2

Compliant 9-pin Serial Port BASIC Stamp 1 Compatible


Sample Programs Supports most 14-bit Core PICs
Programs PIC Built-In Serial Comm Commands
Full Schematic Diagram
.R

MCUs including
low-voltage (3.3V) Pricing from $69.95 to $349.95 PICBASIC PRO™ Compiler $249.95
devices Supports All PICmicro® MCU Families
Direct Access to Internal Registers
O

Includes: PICPROTO™ Prototyping Boards Supports In-Line Assembly Language


Programmer, USB Cable, 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

92 May 2007
GetStartedWithPICs.qxd 4/5/2007 8:39 AM Page 93

could reduce the connections in a PIC MCU project. I just cannot believe by my website at www.elproducts.com.
common 12V setup to Power, Ground, how easy it is getting to create unique I am working on improving it with
and Serial Signal, and not take up items with a PIC MCU. I’m constantly more information for visitors. I’m
much space at all. Interesting, isn’t it? thinking of new applications and proj- finding all kinds of useful links as I help
Now, build up your own develop- ects, but keep running out of time to get Microchip customers solve their design
ment board with a 20-pin socket and them into a decent format for these challenges. Some of the links are just
you have a setup complete for 20-, 14-, columns. This is why I can honestly say hard to find on the Microchip website.
and eight-pin development. Better yet, more projects are coming, as they are Hopefully, I can put links to them on
check out the DM164120-1 develop- sitting on my bench half complete. If you my website so you have a one-stop
ment board package at www.micro have a particular project idea you want place to easily find what you need.
chipDIRECT.com. It’s shown in Figure me to consider, shoot me an email at Until next month, keep on having
5 and is really a great deal. You get chuck@elproducts.com, and please stop fun with those PIC MCUs. NV
one populated board and two blank
W
boards for $23.99. That’s about $8
per board, and it has the serial
W
programming port already wired in.
Another great board is the
W

W
PICPROTO20 from microEngineering
Labs (melabs.com), shown in Figure 6.
W

This board has all the circuitry set up


.G
for a voltage regulator, external crys-
W

tal, and MCLR pull-up resistor. It even


iU
includes a header that matches their
programmers for In-Circuit Serial
.R

RU
Programming™ (ICSP). They retail for
$12.95 each, so it’s not a bad way to
AD

develop with this family of PIC MCUs.


M
iO

CONCLUSION
EL
I promise more projects in the near
SC

E
future, and some of them will include
.H
these smaller PIC MCUs. I just wanted to
A

let you know what’s out there, as you


i2
gather the pieces you need for your next
M

■ FIGURE 6. The PICPROTO20 from


.R
AT

microEngineering Labs.
O
OR
UL
.H
i2
.R
O

May 2007 93
O
.R
i2 .R
O
E .H
EL i2
.H
RU
M UL
iU OR
.G AT
W A M
W SC
W iO
AD
Page 94

.R
8:40 PM

May 2007
W
4/5/2007

W
Page94.qxd

94
Page95.qxd 4/5/2007 6:53 PM Page 95

Manufacturing
Quality Products
since 1983!
Including: Oscilloscopes,
pattern generators,
function generators,
DMMs, spectrum analyzers,
frequency counters,
solder equipment
and accessories.
W
Special Price!
W
*Must reference
$ 00 source code to

139
W

receive discount
W
W

.G
W

iU
.R

RU
Part
True RMS
AD

#72-1015
M
Benchtop DMM
iO

EL
Ideal for the service
bench or classroom.
SC

E
• Measures: AC/DC voltage and current,
.H
resistance, capacitance, frequency,
transistor hFE and temperature
A

i2
• USB and RS-232 interfaces, with
cable and software
M

• Provides diode and audible


.R
continuity test
AT

• AC or battery operation
O
• 6000 count, 33⁄4 digit, backlit display
• AC or AC+DC TRMS measurement
OR

• Switchable auto/manual range

For specifications, NEW! HIDmaker FS for Full Speed FLASH PIC18F4550


visit www.tenma.com
UL

Creates complete PC and Peripheral Both PC and Peripheral programs


Distributed exclusively by MCM
programs that talk to each other over understand your data items (even odd
USB. Ready to compile and run! sized ones), and give you convenient
.H

call toll free • Large data Reports variables to handle them.


1-800-543-4330 • 64,000 bytes/sec per Interface PIC18F Compilers: PICBASIC Pro,
i2

refer to or visit • Easily creates devices with multiple MPASM, C18, Hi-Tech C.
Interfaces, even multiple Identities!
www.mcminone.com/magazine
.R

• Automatically does MULTITASKING PIC16C Compilers: PICBASIC Pro,


• Makes standard or special USB HID MPASM, Hi-Tech C, CCS C.
devices
O

NEW! “Developers Guide for USB HID PC Compilers: Delphi, C++ Builder,
Peripherals” shows you how to make Visual Basic 6.
devices for special requirements. HIDmaker FS Combo: Only $599.95

DOWNLOAD the HIDmaker FS Test Drive today!


www.TraceSystemsInc.com
Source Code: NVM59 301-262-0300

May 2007 95
ClassifiedsMay07.qxd 4/5/2007 9:48 PM Page 96

CLASSIFIEDS
COMPONENTS CONNECTORS/WIRE/CABLE
The RF Connection Call for Specials of the Month
R
T C
O
213 N. Frederick Ave., Ste. 11NV Full Line of Audio Connectors for Icom,
H
N

F
E
N
E
C
T
Gaithersburg, MD USA 20877 Kenwood, and Yaesu
I
O
N
http://www.therfc.com/ 8 Pin Mike Female $2.50
8 Pin Mike Male Panel $2.50
Complete Selection of MIL-Spec Coax, 13 Pin DIN for Kenwood $2.75
RF Connectors and Relays 8 Pin DIN for Icom $1.00
UG-21B/U N Male for RG-213/214 .$5.00 8 Pin DIN for Kenwood $1.50
UG-21D/U N Male for RG-213/214 .$3.25 Prices Do Not Include Shipping
N Connectors for 9913/Flexi4XL/9096
Floating Point Coprocessor UG-21B/9913 .....$6.00 / Pins Only......$1.50 Prices subject to change without notice.
UG-21D/9913 ..$4.00 / Extra Gasket.$0.75 Orders 800-783-2666
New UG-176/U Reducer RG-59/8X, $0.25
Info 301-840-5477
or 5/$1.00
FAX 301-869-3680
W
uM-FPU V3 UG-175/U Reducer RG-58/58A, $0.25
32-bit IEEE 754, SPI and I2C interface or 5/$1.00 SEE YOU AT THE DAYTON
10 to 70 times faster than uM-FPU V2 Silver Teflon PL-259/Gold Pin, $1.00 HAMVENTION!
W
new instructions: matrix, FFT, string, or 10/$9.00 (Booths 156-157)
12-bit A/D, Flash, EEPROM,
callable user-defined functions
W

2.7V, 3.3V or 5V, with low power mode


W
18-pin DIP or SMT, RoHS compliant
uM-FPU IDE code compiler, debugger,
user-defined function programmer
W

.G
Applications: sensors, GPS, robotics,
signal processing, embedded control
See website for full details
W

iU
www.micromegacorp.com
.R

PCB SOFTWARE
RU
PLANS/KITS/ DESIGN/ENG
SCHEMATICS SERVICES
AD

EXCLUSIVE U.S. DISTRIBUTOR


M
ROBOTICS
iO

EL
SC

E .H
A

i2
YOUR COMPLETE
M

SOLUTION!
.R
AT

• PCB Design
O
• PCB Simulation
• CAD/CAM Menu
OR

121747, Hobby Vers., $175


121743, Pro. Version, $275
www.KELVIN.com
UL

BUSINESS SERVICES
.H
i2

SATELLITE
.R

FREE Satellite TV Buyer’s Guide


O

C-band • Ku-band • 4DTV • FTA


Digital Programming Paks
LOW Prices
GREAT Selection
800-500-9275

www.skyvision.com
96 May 2007
ClassifiedsMay07.qxd 4/5/2007 11:10 PM Page 97

AMATEUR RADIO MILITARY SURPLUS AUDIO/VIDEO

W
MICROCONTROLLERS
W
W

W
W

.G
PUBLICATIONS
W

iU
CNC Book
Easy CNC
.R

RU
G-code
AD

Bit map draw programs


M
Bit map image converter
Bit map to G-code
MicroStamp11 PIC Microcontroller
iO

EL
CAD - machine drawings World’s Smallest 68HC11
CAM - DXF to G-code Microcontroller Module! Books
telemetry
z
4 Titles
SC

E
http://www.cncintro.com microrobotics
z
smart toys
z

QUARE 1
Beginner to Advanced
.H
S
SQUARE
animatronics
z
model railroading
z
home automation
z Table Of Contents
A

ELECTRONICS
i2
z tiny (1 by 1.4 in.), light-weight (0.5 oz.)
zon-board 5V reg., crystal, & reset chip Ordering Info
M

zchoice of 8K or 32K EEPROM


(208) 664-4115 z or 32K RAM + 32K EEPROM (64K version) On Web Site
.R
z SCI, SPI, Output Compare and Input
Hayden, ID USA Capture channels, timer, pulse accumulator
http://www.sq-1.com
AT

z all 14 I/O lines and 2 interrupt lines


brought out to versatile 20-pin connector
O
zprogram in BASIC, assembler, or C
zeasy code-loading with Docking Module
z Starter Packages:*
 z 8K EEPROM (#MS11SP8K).......$49
OR

HARDWARE 

z 32K EEPROM (#MS11SP32K)...$77
z 32K EE/32K RAM (MS11SP64K)$90

WANTED * includes MicroStamp11, manual, PC soft-


ware (assemblers, SBASIC compiler,
(208) 664-4115
MicroLoad utility, and sample programs), Hayden, ID USA
UL

serial cable, Docking Module, & accessories.


DEC EQUIPMENT www.technologicalarts.com
WANTED!!! Toll-free (USA & Canada):
.H

Digital Equipment Corp. 1-877-963-8996 SOLAR PRODUCTS


and compatibles. Visa • MasterCard • Discover • Amex
Buy - Sell - Trade
i2

CALL KEYWAYS 937-847-2300


or email buyer@keyways.com
.R

LCDs/DISPLAYS
O

www.nutsvolts.com
May 2007 97
BookstoreMay07.qxd 4/5/2007 8:12 PM Page 98

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


ELECTRONICS Practical Electronics Handbook:
Sixth Edition
Electronic Games for
the Evil Genius
Practical Electronics for Inventors by Ian Sinclair/John Dunton by Thomas Petruzzellis
Ian Sinclair’s Practical You can have a wicked
by Paul Scherz Electronics Handbook amount of fun on your
This intuitive, applica- combines a wealth of way to becoming a
tions-driven guide to useful day-to-day elec- game master! In
electronics for hobby- tronics information, Electronic Games for the
ists, engineers, and stu- concise explanations, Evil Genius, popular
dents doesn't overload and practical guidance how-to author Tom
readers with technical essential to anyone Petruzzellis gives you
detail. Instead, it tells involved in electronics everything you need
you — and shows you design and construc- to build 35 exciting
— what basic and
W
tion.The collection of games and gadgets.You
advanced electronics key data, fundamental get complete, easy-to-
parts and components principles, and circuit follow plans, with clear diagrams and
do, and how they
W
design basics provides an ideal reference schematics, so you know exactly what's
work. Chock-full of illustrations, Practical for a wide range of students, enthusiasts, involved before you begin. Packed with fun
Electronics for Inventors offers over 750 technicians, and practitioners of electronics projects that you'll love to build and play
W

hand-drawn images that provide clear,


W
who have progressed beyond the basics. with, this guide develops game expertise
detailed instructions that can help turn The sixth edition is updated throughout one simple step and project at a time.
theoretical ideas into real-life inventions $24.95
W

with new material on microcontrollers and


and gadgets. $39.95
.G
computer assistance, and a new chapter on
digital signal processing $39.95 Electromechanical Devices &
W

Troubleshooting
iU
Electronic Equipment Nuts & Volts of BASIC Components Illustrated
by R. S. Khandpur Stamps — Volume #6 Sourcebook
.R

by Brian Elliott
RU
From cell phones to by Jon Williams
medical instruments Nuts & Volts of BASIC Master the key
elements of
AD

to digital and micro- Stamps — Volume 6


processor based includes articles #117- electromechanical
M
equipment, this 128, written for 2005. components.
hands-on, heavily Article topics consist Essential to the
iO

design, repair, or
EL
illustrated guide of RFID Readers
operation of your
clearly explains how and Ultrasonic !
to troubleshoot, Measurement, SX/B electromechanical
NEW
SC

devices, this quick-


E
maintain, and repair and the Professional
all types of electrical Development Board, find reference
.H
equipment.The the advanced MIDI provides illustrations,
author covers all the essentials such as receiver, programming the SX microcon- descriptions, and
A

relevant calculations for 2,000 time-tested


i2
necessary tools, soldering techniques, test- troller in BASIC, mastering the MC14489
electromechanical components.
M

ing, fundamental procedures, and mechani- display driver, and more! The Nuts & Volts
cal and electrical components. $49.95 of BASIC Stamps books are a favorite $89.95
.R
Parallax technical pick and are a tremen-
AT

dous technical resource for all PBASIC


Nuts & Volts of BASIC programming projects. $14.95 PROJECTS
O
Stamps — Volume 7
Electronic Circuits —
OR

by Jon Williams 101 Outer Space Projects


!
NEW Fundamentals & Applications:
Nuts & Volts of BASIC for the Evil Genius
Stamps,Volume 7 Third Edition by Dave Prochnow
includes articles by Mike Tooley The sky is not the
UL

#129-140 from Nuts In Electronic Circuits, Mike limit! If you yearn to


& Volts Magazine. In Tooley provides all the touch the stars, 101
this 2006 collection, essential information Outer Space Projects
.H

BASIC Stamp 1, required to get to grips for the Evil Genius has
BASIC Stamp 2, with the fundamentals of everything you need
SX/B, and Propeller electronics, detailing the
i2

to explore the universe


programming are underpinning knowledge from the comfort of
explored in a series necessary to appreciate your own home.
E W!
of real-world applications.This book is
.R

the operation of a wide Whether you're a


useful for the Nuts & Volts reader, range of electronic beginner stargazer or N
newcomers to BASIC Stamp, SX, and circuits, including ampli- a more experienced
O

Propeller microcontroller projects, and fiers, logic circuits, power supplies, and astronomer, you'll find an outstanding
seasoned programmers looking for new oscillators.The third edition now offers an project to satisfy you, from model rockets
ideas. $14.95 even more extensive range of topics, with and celestial maps to space robots,
extended coverage of practical areas such GPS systems, and much, much more.
If you don’t see what you need as circuit construction and fault finding, and Full of easy-to-follow plans and clear
here, check out our online store at new topics including circuit simulation, schematics for each project, as well as
www.nutsvolts.com for a complete electronic CAD, and a brand new chapter lists of materials and tools so you know
devoted to the PIC microcontroller. exactly what's involved before you begin.
listing of the titles available. $34.95 $24.95
98 May 2007
BookstoreMay07.qxd 4/5/2007 9:36 PM Page 99

CALL 1-800-783-4624 today!


Or Order online @ www.nutsvolts.com
10 Cool LEGO Mindstorm Dark
Side Robots, Transports, and
25 Home Automation Projects
for the Evil Genius HOME COMPUTERS
Creatures by Jerri Ledford PC Mods for the Evil Genius
The Dark Side Computer technology
Developer's Kit is has caught up with by Jim Aspinwall
targeted towards the home automation, and If you yearn for the
young or novice it’s now easy and inex- coolest, most crazed
LEGO MINDSTORMS pensive to automate ‘puter around, PC Mods
designer, age 9 and up, everything in a house for the Evil Genius is the
although experienced — including lighting, key to the kingdom!
MINDSTORMS fans security, appliances, This book shows you
will appreciate the entertainment, and how to supercharge
unique possibilities environmental condi- your PC and create a
jaw-dropping system
W
offered by this kit. as tions — and here’s
well. The Dark Side Developer's Kit includes how to do it! This that cannot be pur-
special MINDSTORMS pieces that allow well-illustrated resource offers 25 com- chased off any shelf,
anywhere! You get
W
the user to create a host of Star Wars plete home automation projects that
themed robots, creatures, and vehicles. require only basic household tools and the complete, easy-to-follow plans, clear dia-
It also comes with the Micro Scout, a instructions found within its pages. grams and schematics, and lists of parts and
W

W
mini-computer with seven built-in $24.95 tools, so you know what's needed before
programs, a motor, and a light sensor that you begin. $24.95
W

brings the MINDSTORMS creations to life


.G
with a minimum of effort. $24.95
NEW 2006 CD-ROMS! MICROCONTROLLERS
W

iU
10 Cool LEGO Mindstorm Nuts & Volts CD-ROM
Robotics Invention Here’s some good
PIC Basic Projects
.R

RU
System 2 Projects news for Nuts &
Volts readers! by Dogan Ibrahim
The LEGO MIND- Covering the PIC
Along with all 24
AD

STORMS RIS 2.0 is BASIC and PIC


the core set for all issues of Nuts &
BASIC PRO compil-
M
MINDSTORMS users, Volts from the
2004 and 2005 ers, PIC Basic Projects
that lets users design provides an easy-to-
iO

calendar years,
EL
and program working use toolkit for
robots — limited only the 2006 issues
are now available, developing applica-
by their imagination. tions with PIC
SC

as well.These
E
Initially designed for BASIC. Numerous
users 12 and up, LEGO CDs include all of Volumes 25, 26, and 27,
.H
issues 1-12, for a total of 36 issues (12 on simple projects give
MINDSTORMS has clear and concrete
taken off with LEGO enthusiasts of all each CD).These CD-ROMs are PC and
A

Mac compatible.They require Adobe examples of how


i2
ages. 10 Cool LEGO MINDSTORMS RIS 2.0 PIC BASIC can be
Acrobat Reader version 6 or above. Adobe
M

Projects: Amazing Projects You Can Build in used to develop electronics applications,
Under an Hour provides step-by-step Acrobat Reader version 7 is included on
the discs. $24.95 – Buy 2 or more while larger and more advanced projects
.R
instructions and detailed illustrations for describe program operation in detail and give
AT

users of all skill levels and proficiencies. at $19.95 each


useful insights into developing more involved
$24.95
O
microcontroller applications. $29.95
SERVO CD-ROM
OR

Are you ready for


Take This Stuff and Hack It! some good news? Programming the PIC
by Dave Prochnow Along with the Microcontroller with MBASIC
Transform common first 26 issues of by Jack Smith
UL

household items into SERVO Magazine, No microcontroller is


really cool stuff.You all issues from the of any use without
don't need to be an 2006 calendar software to make it
.H

electronics genius to year are now perform useful func-


get started turning available, as well. tions.This compre-
everyday items into hensive reference
i2

These CDs
high-performing won- include all of focuses on designing
ders.With how-to Volume 1, issues 11-12,Volume 2, issues with Microchip’s mid-
.R

guru Dave 1-12,Volume 3, issues 1-12, and Volume 4, range PIC line using
Prochnow's step-by- issues 1-12, for a total of 23 issues all MBASIC, a powerful
step directions and together.These CD-ROMs are PC and Mac but easy to learn pro-
O

fully illustrated plans, even beginners can compatible.They require Adobe Acrobat gramming language. It
hack their way to a high-tech home, cooler Reader version 6 or above. Adobe Acrobat illustrates MBASICs abilities through a
toys, and less yard work. Certain to fire Reader version 7 is included on the discs. series of design examples, beginning with
your imagination and start you plotting $24.95 – Buy 2 or more at simple PIC-based projects and proceeding
new, original, and even more creative won- $19.95 each through more advanced designs. $59.95
ders you can make from ordinary house-
hold items, Take This Stuff and Hack It! is WE ACCEPT VISA, MC, AMEX, and DISCOVER Prices do not include shipping and
the perfect gift for your inner inventor.
may be subject to change. Ask about our 10% subscriber discount on selected titles.
$27.95

May 2007 99
Full Page.qxd 4/5/2007 8:56 AM Page 100

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.

MINIATURE 12VDC PUSH-TYPE MINI-PIEZ0 SIREN, 12 VDC 6-CHANNEL TRANSMITTER AND


SOLENOID One of the RECEIVER
Ledex™. 0.5" diameter x loudest, most Vex # 276-2153. Transmitter
1" long tubular annoying and receiver for remote
solenoid with 3/8" diameter piezo- control of robotics servos.
threaded bushing for mounting. 1/16" diameter electric Designed as an add-on
W
x 1/2" long plunger. 40 Ohm coil. Operates on sirens we have kit to allow two human
12 Vdc. 1" wire leads. ever heard. High-pitched,
$ 253
operators to control
CAT# SOL-102 100 db warble tone different aspects of the
W
each strongly encourages same robot, it can also
intruders to leave. Operates be used as the primary
6 VOLT, 1.3 AH BATTERY
W

on 6-12Vdc. Compact, only


W
control (see note below).
Maintenance-free, recharge- 2.27" long x 1.69" x 1.53." Metal mounting 6 channels (4 analog and

4
$ 20
able sealed lead acid battery. bracket. 6' wire leads. 2 digital). Two joysticks, each with an X and Y
W

.G
Can be used in any position and CAT# ES-9 axis, control the analog channels 1-4.
each
can be trickle charged for Momentary switches on the front and back
long periods of time. 10 for $3.90 each • 100 for $3.70 each
W

iU
operate the two digital channels. Operates on
3.85" x 2.10" x 0.98." Channel 89 (75.970MHz). Includes transmitter
0.187" qc / solder term- 10' MUSICAL INSTRUMENT and receiver with crystals for Channel 89,
.R

RU
inals. New batteries, CABLE, 1/4" PHONE PLUGS receiver antenna and sleeve holder for anten-
prepped with easily re- na and interconnect cable between RF receiv-
Flexible 10 foot
movable 2.5" wire leads with
4
$ 75
AD

musical instrument er module and microcontroller. Transmitter


qc connectors. CAT# GC-613 each cable with 1/4" phone operates on eight AA batteries or one 9.6V
M
plugs on each end. battery pack. Batteries not included.
ON-OFF LIGHTED ROCKER Cable jacket labeled "Professional OFC
iO

Note: We have been told recently that in order


EL
SWITCH, 120 VAC
S.P.S.T. Red, 120 Vac neon-
Noiseless Instrument Cable."
CAT# MCB-101 $ 503
each
to use this transmitter as a primary control, it is
necessary to use a micro controller module to
SC

lighted rocker with I / 0, on-off


E
split and amplify the received signal into six
symbols. Rated 20 Amps @ ULTRABRIGHT LEDS
2995
.H
individual channels.
125 Vac. 1.22" x 0.67" black
rectangular bezel. Snap-mounts in
Reduced Prices CAT# JS-6 $ each
A

i2
1.1" x 0.5" cutout. 0.25" qc / solder terminals. Red and Aqua (blue-green)
Ultrabright LEDs. 5mm diameter, 15MM PIEZO DISC
M

UL, CSA, VDE. CAT# LRS-133


T-13/4 size. Tape and reel..

1
$ 00 AVX # KBS-15DA-9C-31.
.R
100 for 75¢ ea. • 500 for 65¢ ea.
RED CAT# LED-94 2" pigtail leads. CAT# PE-53
AT

each 1000 or more for 50¢ each

55 ¢ 100 for 45¢ each

75 ¢ 10 for 65¢ each


O
18 AMP SOLID-STATE RELAY, each
1000 for 30¢ each 100 for 50¢ each
each
OR

3-15VDC CONTROL AQUA CAT# LED-77


Crydom # EZ240D18. 12VDC 1000MA WALL
Control Voltage: 3-15 Vdc.
Output: 18 Amps @ 240 Vac. 75 ¢ each
100 for 65¢ each
1000 for 50¢ each TRANSFORMER
UL

SCR output, low leakage solid Input: 120V 60Hz 25W.


state relay. 1.72" x 1.5" x 1.02" high including NEODYMIUM MAGNET Output: 12 Vdc 1000 mA.
0.25" QC/solder terminals. Mounting holes on Screw Terminals. UL listed.
.H

Powerful 1" dia. x 0.185" thick


2.2" centers. UL, CSA, CE. CAT# DCTX-121
10 50 neodymium disc.
CAT# SRLY-18 $ Shiny nickel-plated finish.
$ 753 $ 75 6
i2

each
10 for $9.25 each CAT# MAG-114 each each 100 for $6.00 each

www.allelectronics.com
.R

Shop ON-LINE
ORDER TOLL FREE 1-800-826-5432
O

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.
100 May 2007
TechForum.qxd 4/5/2007 10:35 PM Page 101

TECH This is a READER-TO-READER Column.


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

W
Always use common sense and good judgement!
W

.G
All questions and answers should catalog number 272-1431 and used to
>>> QUESTIONS
be sent by email to forum@nuts
W

iU
volts.com All diagrams should be be incorporated in their Science Fair
computer generated and sent with your kits — I've tried eBay but the sellers
submission as an attachment. I wish to implement a MIDI volume want too much for it!.
.R

RU
QUESTIONS control. I have not found a suitable
commercial product that does this
AD

To be considered, all questions should relate


to one or more of the following: other than very expensive digital effects
M
❶ Circuit Design modules. I wish to control the volume
iO

❷ Electronic Theory or gain of a stereo signal using MIDI


EL
❸ Problem Solving expression, which is general MIDI
❹ Other Similar Topics controller number 11. #5073 Don
SC

E
■ Be brief but include all pertinent informa- So far, I found a kit which converts via email
.H
tion. If no one knows what you're asking, you MIDI controller levels to a control I have two lead-acid batteries,
won't get any response (and we probably
A

voltage. I also found a dual voltage never used but two years old that won't
i2
won't print it either). controlled amplifier kit. But the MIDI to take a charge. I'm sure that they
M

■ Include your Name, Address, Phone Num- control voltage module responds only became sulfated from sitting in a no
.R
ber, and email. Only your Name, City, and
to controllers number 1 through 8; and charge condition. Is there a circuit I can
AT

State will be published with the question,


I need number 11. I found a MIDI construct to desulate them?
but we may need to contact you.
O
■ No questions will be accepted that offer module that would convert one #5074 Jack Riggs
OR

equipment for sale or equipment wanted to message to another (e.g., controller 11 Reno, NV
buy. to the range 1-8), but all together this is
■ Selected questions will be printed one quite an expense. I have a couple of old 7.2V battery
UL

time on a space available basis. #5071 Richard B. Ahlvin operated drills sitting around doing
■ Questions are subject to editing. Vicksburg, MS nothing and have often had a wood-
work project where I'm using a couple
.H

ANSWERS I need an instruction diagram to of bit sizes, countersink, and maybe a


■ Include in the subject line of your email, help make a photo cell dusk-to-dawn screwdriver. At such times, a few extra
i2

the question number that appears directly unit capable of a 20-1,500 watt 12-36 drills would be useful. I have just rigged
below the question you are responding to. volt DC application in a small size (8-9 up a rectified DC power supply from an
.R

■ Payment of $25.00 will be sent if your mm deep x 15 mm in diameter circular) old transformer to run them. They're a
answer is printed. Be sure to include your that I can encapsulate to make water- bit slow but it will do for now. Anyway,
O

mailing address or we cannot send payment.


proof. this might make up a simple project for
■ Only your Name, City, and State, will be
#5072 Ian Osborn N&V. My transformer is 120/6.3CT
printed, unless you say otherwise. If you
via email which gives 9Vrms at the DC end. With
want your email address included, indicate
to that effect. the drill running, I read 6.7VDC @ 1.8A
Can anyone help me locate a and loaded I read 5VDC @ 5A.
■ Comments regarding answers printed in
source for 365 Variable Capacitors I haven't bothered with the center
this column may be printed in the Reader
which RadioShack used to sell as tap of the original battery circuit
Feedback section if space allows.
May 2007 101
TechForum.qxd 4/5/2007 10:36 PM Page 102

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


although this explains why one battery 3) How can I send/receive email One viable option is available
was always going flat. The first is using my fax machine? from the Chip Factory. The Chip
always switched in, the second only Factory system has been designed to
on high speed. #1 Taken together, your self- provide an easy-to-learn 'entry level'
I used an old power cord for the described "three somewhat unusual step into the world of microcon-
cable using the green wire for the requests" raise several intriguing con- trollers. The Chip Factory is a stand-
center tap in case I add a 3.6V supply siderations and solutions given your alone unit that can be programmed
sometime. I'm wondering what I might Old Order Mennonite Church tenets: without the use of a computer. A sim-
use for a connector (having removed 1) Technically, any microcontroller ple program made up of simple Basic
the three-pin AC). I have lots of can be programmed by directly style commands is entered into the
four-pin HD connectors from my PC writing a series of 0s and 1s to its input Chip Factory memory using the on-
dissassemblies. pins while it is in program mode (as board keypad, and then programmed
#5075 David Whiteley typically set by other pins). However, into a microcontroller (which is placed
via email these "machine" instructions are usual- in a socket on the programmer).
W
ly produced by an "assembler" from Unfortunately, they are located in
>>> ANSWERS commands in the form of "low level" the UK so that may be out of reach for
W
assembly language. These days, most you. The programmer costs about
[#2071 (1-3) - February 2007] people write the program in a higher $200 and their phone number is:
W

W
I am a member of an Old Order level language such as Basic which is 01225 340563 or FAX: 01225
Mennonite Church. We do not use then compiled (normally with a 340564.
W

PCs, TVs, or the Internet, therefore, I computer) and "translated into the 2) There are lots of decades’ old
.G
have three somewhat unusual lower level language that the machine RS-232 terminals lurking around that
W

requests. "understands." While it is feasible to would be suitable for your purpose.


iU
1) Is it possible to program micro- write programs in the assembly lan- The TI Silent 700 is certainly one. It
controllers without a PC? Is any family guage appropriate for the device, even can be found for around $20 plus
.R

RU
of microcontrollers better suited for this typically is done with a computer. shipping, but in your situation they
non-PC programming? Are there any Most microprocessors are might be harder to find. Ham festivals
AD

books that would help? programmed with a fixture that has a would probably be a good source for
M
2) Is there any stand-alone RS-232-C serial interface, such as RS-232, and you and there are some scheduled
iO

Terminals available anymore? I need some of these may have an assembler regularly within your area Elmira,
EL
one to program my late 80’s Premier onboard which would make it Rochester, etc. The TI 700 uses 8-1/2
2460 phone system. Could one also be possible to program it via a "dumb thermal paper which also might be
SC

E
used to program microcontrollers? terminal." In lieu of this, another hard to find. There are other models
.H
Can someone tell me how to build microcontroller could be programmed from that era such as the DEC LA
A

one? I would prefer one that has a to perform the assembly, but then you series which use tractor feed paper,
i2
small QWERTY keyboard and an would be in a "chicken/egg" situation, but these tend to be larger than the TI.
M

alpha-numerical LCD screen. The unless there is a commercially avail- I believe you would prefer an
.R
phone manual mentions a TI Silent 700 able one or someone else is able to alphanumeric LSD screen and these
AT

programming terminal. provide one that they developed. are available too. In fact, I may have
O
OR
UL
.H
i2
.R
O

102 May 2007


TechForum.qxd 4/5/2007 10:37 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


one in my barn with a four line x 40 ments, to a Presto email address. 2) I think I have an old Televideo
or 80 character monochrome LCD There, the service converts the email terminal in unknown state in my
display and a membrane type and any attached photos into cus- storage room. I used the heck out of it
QWERTY keyboard. I work in tomizable layouts ready to print out on CP/M machines, 15 years ago.
Rochester and would be willing to give on a $150 HP A10 Printing Mailbox Recently (last couple years or so),
it to you if you contact me at: 300 (currently the only Presto-enabled I remember seeing RS-232 based
Meridian Centre Blvd., Suite 100, device). The printer receives and prints terminals using a PIC chip and an LCD
Rochester, NY 14618. I can also pro- information automatically. Because display. The TI Silent 700 was a
vide you with the dates and locations the Printing Mailbox connects to the thermal printer terminal, sort of like an
of upcoming hamfests in your area. phone line, it doesn't require an old teletype; no video display, that
3) Celery LLC (1-866-692-3537) Internet connection or a computer to sometimes had an acoustic coupler on
may have just the ticket for your email automatically check for and print con- it. I think its max speed was 300 baud,
using fax. Celery looks like ordinary tent — which it does at intervals that but could have been faster. The ones
fax machine, but it does something you schedule during setup. The Presto I used were always connected to the
W
that most fax machines don’t — it Service costs $10 per month, or $100 modem.
sends and receives email. To send an annually. Phone: 800-919-3199. 3) Most PCs can configure their
W
email, you handwrite a note and feed John Jones modem to fax mode, and some
it into the fax machine. The recipient Rochester, NY software can be used to have the fax
W

W
then receives your note as an modem work as a printer device.
attachment. As for incoming emails, #2 1) In the old days, you pro- There are fax services that will send a
W

they come through like ordinary faxes. grammed your processor from the received fax as an email attachment.
.G
One year of Celery’s black & white front panel. Switches and paper tape Yes, it is theoretically possible to use
W

service retails for $219 with the were the way things were done. For a the fax as a way to send and receive
iU
device, or $259 for the device and while, many microcontroller program- email, and not too cumbersome.
one year of color service. I haven't mers were done using identical micro- Tom Brusehaver
.R

RU
contacted them but they may have controllers to program the other one. Bloomington, MN
a plan that would work with your It can be done; a boot strap approach
AD

existing fax machine at a lower cost. would be the best. Start with maybe [#2072 - February 2007]
M
Other possible options are the something like the 1802 based ELF I'm looking for a circuit diagram
iO

"Mailbug" from Landel that uses an that was featured recently in Nuts & that will let me know the status of a
EL
integrated keyboard and mono- Volts. Build a small controller board fuse in a 12 VDC circuit and 120 VAC
chrome LSC display which connects from that to load your microcontroller circuit. It must light an LED to show
SC

E
directly to the phone line. Main: (408) code into. Then, using a serial or that the fuse has blown. It would be
.H
360-0480; Customer Support: (408) parallel programmable part (PIC, AVR, used to monitor automotive fuses and
A

360-0490; Fax: (408) 360-0499. Freescale, etc.), the elf could do the the fuses for an amateur radio station.
i2
Finally, Presto is a new online programming. Once the microcon-
M

printing service that presents an inno- trollers can be programmed, build an #1 Simply place an LED (check for
.R
vative solution: The service allows you easier programmer for them, maybe polarity) directly across the 12 VDC
AT

to send email, including photo attach- including an assembler/debugger. fuse with a 510 ohm resistor value for
O
OR
UL
.H
i2
.R
O

May 2007 103


TechForum.qxd 4/5/2007 10:37 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


12 volts. If the fuse blows, the LED will become part of the the 1K base resistor
load and glow. To monitor the 120 VAC fuse, place an appro- and the fuse.
priate 120 VAC bulb (preferably a neon bulb with 22K resis- For a 120 VAC
tor) directly across the fuse. If the fuse blows, the bulb will blown fuse indica-
light. Run the wires for the LED and AC bulb from some con- tion without a load,
venient panel for monitoring, if appropriate to your cause. use an NE-2 neon
John F. Mastromoro Figure 3 bulb without a built-
Saint Johnsville, NY in resistor (like part
#36NE002 from Mouser). Connect the bulb in-series with a
#2 The standard way to detect a blown fuse is with an 100K resistor and install that across the fuse as shown in the
indicator circuit wired across the fuse. For 120 VAC, use a first diagram. Then add a 100K 1/2 watt resistor from the
neon indicator lamp with a built-in resistor, as shown in fuse to the other side of the AC line.
Figure 1. For a 12 VDC circuit, use an LED with a resistor, Ed Schick
as shown in Figure 2. Harrison, NY
W
These indicators
require that a load Figure 1 #3 I designed
W
be connected and this circuit (Figure
turned on in order to 1) back in 1990
W

W
indicate a blown for a competition
fuse. If you want to car stereo fuse
Figure 2
W

detect a blown fuse panel. It is quite


.G
with or without such clever as it gives
W

a load, use the an instant visual


iU
circuit in Figure 3. indication of the
This circuit holds the transistor off by applying + to the base fuse condition.
.R

RU
through the diode and the 1K resistor. If the fuse blows, the GREEN means
transistor is turned on by the 27K resistor from base to GOOD and RED
AD

ground, and the LED lights. The diode from +12 to the emit- means BAD. Later, I modified it slightly, (Figure 2) for use on
M
ter compensates for the voltage drop in the diode between AC fuses. I have also used it with the new dual LEDs, super
iO

bright LEDs, and even jumbo 10 mm LEDs.


EL
The circuits
(Figure 1 and
SC

E
Figure 2) are
.H
based on
A

Kirchhoff's volt-
i2
age law where, if
M

a circuit is
.R
opened up
AT

(blown fuse,
O
open switch,
OR

etc.), the source


voltage will be seen across the open. Normal voltage
through the fuse fires LED2 (green) as long as the fuse is
UL

good. D1, a standard rectifier diode, prevents LED1 from


firing except when a fuse blows. R1, in both circuits, serves
as a current limiter for about 3.5 mA. I have also utilized this
.H

same circuit as a toggle switch on/off indicator, as well. Just


substitute a switch into the circuit where the fuse is.
i2

Note: The circuit was designed using whatever LEDs I


had laying around the shop at the time. These just happened
.R

to illuminate brightest at 3.5 mA so I used Ohm's law to


calculate 2.7K ohms as a current limiting resistor. Also, on the
O

AC circuit, since the LEDs are rectifying the signal, they will
require about 10 VAC @ 3.5 mA to Illuminate, therefore a 30K
resistor is needed for 120 VAC. You will need to adjust the
resistance values slightly for modern LEDs, especially if you
use a jumbo LED or any of the super bright LEDs.
KI4NNH - Jerry Ginn
Franklin Springs, GA
104 May 2007
IndexMay07.qxd 4/5/2007 11:32 PM Page 105

■ LOOK FOR

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

CYBERCRIME TOOLS
AD INDEX
MCM ..............................................10, 95
A & A Engineering .....................34
RADIO AND TV
Ocean Server Technology, Inc. ...........34
AND SOFTWARE Abacom Technologies ...............58
Atomic Time .........................................56
PolarisUSA Video, Inc. .........................15
The Clone Store ...................................35
MOTORS ActiveWire, Inc. .........................34
Jameco .................................................33 All Electronics Corp. ................100
Ramsey Electronics, Inc. ................16-17
DESIGN/ Atomic Time ..............................56

BATTERIES/ ENGINEERING/ OPTICS Avcom Tec, LLC ........................94

CHARGERS REPAIR SERVICES Madell Technology .............................102 Budget Robotics ........................93


Circuit Specialists, Inc. .....106-107
ExpressPCB .........................................30
A & A Engineering ................................34 Command Productions ..............31
Cunard Associates ...............................34
EZ PCB ................................................32
Front Panel Express LLC......................95 PROGRAMMERS Conitec DataSystems ................93
Ocean Server Technology, Inc. ...........34 Conitec DataSystems ..........................93
NiCd Lady Company ............................65 IMET Corporation .................................56 Cosmos .....................................45
NiCd Lady Company ............................65 Electronics123 .....................................34
CrustCrawler ...........................103
microEngineering Labs .........................92
BUSINESS
PCB Cart ..............................................56 Cunard Associates ....................34
PCB Pool .............................................65
OPPORTUNITIES Pulsar, Inc. ...........................................34 PUBLICATIONS DesignNotes.com, Inc. ...............56
Dimension Engineering ..............94
EZ PCB ................................................32 R4Systems, Inc. ..................................79 Lakeview Research .............................35
Mouser Electronics ..............................23 Earth Computer Technologies ...34
Trace Systems, Inc. .............................95
W
Electronic Design Specialists ....85
BUYING ELECTRONIC DIGITAL EVIDENCE
SURPLUS RF TRANSMITTERS/ Electronics123 ...........................34
Electronix Express ....................35
The Clone Store ...................................35
RECEIVERS
W
Earth Computer Technologies ..............34 EMAC, Inc. ................................58
George Fathauer & Assoc. ..................35
Jaycar Electronics ................................59
EDUCATION Abacom Technologies .........................58 ExpressPCB ..............................30
Linx Technologies ................................77
W

Avcom Tec, LLC ..................................94 EZ PCB .....................................32


W
Command Productions ........................31 Matco, Inc. ...........................................34 Front Panel Express LLC ...........95
CCD CAMERAS/ EMAC, Inc. ...........................................58
VIDEO ROBOTICS George Fathauer & Assoc. ........35
W

Hobby Engineering ..............................44 Hagstrom Electronics ................35


.G
Ortech Education Systems ..................71 Budget Robotics ...................................93
Circuit Specialists, Inc. ................106-107 Halted Specialties Co. ...............57
TekBots ................................................89 CrustCrawler ......................................103
Cosmos ................................................45 Hobby Engineering ....................44
Schmart Board .....................................34 Hobby Engineering ..............................44
W

Matco, Inc. ...........................................34


iU
HobbyLab .............................................34 HobbyLab ..................................34
PolarisUSA Video, Inc. ........................15 XGameStation ......................................34
Jameco .................................................33 IMET Corporation ......................56
Ramsey Electronics, Inc. ................16-17
EMBEDDED TOOLS LabJack ................................................61 Information Unlimited ................24
.R

CIRCUIT BOARDS
RU
NetBurner ...............................................7 Lemos International Co., Inc. .............104 Integrated Ideas & Tech. ...........58
Lynxmotion, Inc. ...................................94 Jameco ......................................33
Cunard Associates ...............................34
ENCLOSURES Net Media ...............................................2 Jaycar Electronics ......................59
AD

Dimension Engineering .......................94


ExpressPCB .........................................30 Integrated Ideas & Tech. ......................58 Ocean Server Technology, Inc. ...........34 LabJack .....................................61
Ortech Education Systems ..................71
M
EZ PCB ................................................32 Lakeview Research ...................35
IMET Corporation .................................56 EVENTS Pololu Robotics & Electronics ..............41
ROBO Business ...................................78
Lemos International Co., Inc. ..104
Maxstream ...........................................32 ROBO Business ...................................78
iO

Link Instruments ..........................5


EL
MeerKat Systems, Inc. .........................35 Robot Power ........................................61
PCB Cart ..............................................56 Linx Technologies .....................77
PCB Pool .............................................65 HARDDRIVE DATA SATELLITE Lynxmotion, Inc. ........................94
RECOVERY
SC

Pulsar, Inc. ...........................................34 Madell Technology ..................102


E
Lemos International Co., Inc. .............104
R4Systems, Inc. ...................................79 The Clone Store ...................................35 Matco, Inc. .................................34
SECURITY
.H
Saelig Company, Inc. ..........................72 Maxstream ................................32
Schmart Board .....................................34
IP HOME Cosmos ................................................45 MCM ....................................10, 95
A

COMMMUNICATION AUTOMATION Information Unlimited ...........................24 MeerKat Systems, Inc. ...............35


i2
Avcom Tec, LLC ..................................94 Linx Technologies ................................77 MicroAutomata ..........................44
MicroAutomata .....................................44
M

Matco, Inc. ...........................................34 Microchip ...................................11


COMPONENTS KEYBOARD
PolarisUSA Video, Inc...........................15
.R
microEngineering Labs ..............92
Mouser Electronics ....................23
AT

Electronix Express ...............................35


Front Panel Express LLC .....................95 EMULATORS TEST EQUIPMENT NetBurner ....................................7
O
Jameco .................................................33 Hagstrom Electronics ...........................35 Circuit Specialists, Inc. ................106-107 Net Media ....................................2
Lemos International Co., Inc. .............104 Conitec DataSystems ..........................93
KITS & PLANS
NiCd Lady Company ..................65
OR

Linx Technologies ................................77 DesignNotes.com, Inc...........................56


Maxstream ...........................................32 Ocean Server Technology, Inc. ..34
DesignNotes.com, Inc...........................56 Dimension Engineering ........................94
Pulsar, Inc. ...........................................34 Ortech Education Systems ........71
Earth Computer Technologies .............34 Electronic Design Specialists ...............85
Parallax, Inc. ...............Back Cover
COMPUTER Electronics123 .....................................34
EMAC, Inc. ...........................................58
HobbyLab .............................................34
PCB Cart ...................................56
UL

Jaycar Electronics ................................59


Hardware PCB Pool ...................................65
Hobby Engineering ..............................44 LabJack ................................................61
ActiveWire, Inc. ....................................34 Pico Technology Ltd. UK ...........32
Information Unlimited ...........................24 Link Instruments .....................................5
Earth Computer Technologies .............34
Jaycar Electronics ................................59 Madell Technology .............................102 Pioneer Hill Software .................79
Halted Specialties Co. ..........................57
.H

MeerKat Systems, Inc. .........................35 Pico Technology Ltd. UK .....................32 PolarisUSA Video, Inc................15
Microcontrollers / I/O Boards MicroAutomata .....................................44 Pioneer Hill Software ............................79 Pololu Robotics & Electronics ...41
Abacom Technologies .........................58 NetBurner ...............................................7 Saelig Company, Inc. ..........................72 Pulsar, Inc. ................................34
i2

Avcom Tec, LLC ..................................94 QKITS ...................................................34 Trace Systems, Inc. .............................95 QKITS ........................................34
Conitec DataSystems ..........................93 RABBIT Semiconductor .........................3 R4Systems, Inc. .........................79
EMAC, Inc. ...........................................58 Ramsey Electronics, Inc. ................16-17 TOOLS RABBIT Semiconductor ...............3
.R

HobbyLab .............................................34 Scott Edwards Electronics, Inc. .............79 Madell Technology .............................102 Ramsey Electronics, Inc. .....16-17
Microchip ..............................................11 XGameStation ......................................34 NetBurner ...............................................7 Renesas Technology Corp. .......25
microEngineering Labs ........................92
LASERS
O

Net Media ...............................................2 ROBO Business ........................78


Ortech Education Systems ..................71
Information Unlimited ...........................24 WIRE, CABLE Robot Power .............................61
Parallax, Inc. ..........................Back Cover
AND CONNECTORS Saelig Company, Inc .................72
Pololu Robotics & Electronics ..............41
R4Systems, Inc. ...................................79 LSI (micon) DesignNotes.com, Inc. .........................56 Schmart Board ..........................34
Scott Edwards Electronics, Inc. .............79 Renesas Technology Corp. .................25 Jameco .................................................33 Scott Edwards Electronics, Inc. ..79
Trace Systems, Inc. .............................95 The Clone Store ........................35
XGameStation ......................................34 MISC./SURPLUS WIRELESS TekBots .....................................89
All Electronics Corp. ...........................100
PRODUCTS
Trace Systems, Inc. ..................95
Software Front Panel Express LLC .....................95 XGameStation ...........................34
Pioneer Hill Software ............................79 Halted Specialties Co. ..........................57 MicroAutomata .....................................44

May 2007 105


Full Page.qxd 4/4/2007 11:57 AM Page 106

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

Our Premium All in One Repairing System Programmable DC Power Supplies


•All in One system. Combines the function of a Hot Air Gun, a Soldering Iron and The CSI 3600 Series
a Desoldering Gun. Programmable DC Power
•Microprocessor controlled ESD safe unit. All digital display of hot air temperature, Supplies are equipped with a
soldering iron temperature, desoldering back-lit LCD display, number
gun temperature and air pressure with
keypad and a rotary code switch
touch type panel controls.
•The desoldering tool comes with zero for ease of use & quick program-
crossing circuitry preventing electrical ming. Voltage, Current & Power can all be displayed on the LCD or com-
surges and is equipped with air cylinder puter screen (with optional RS-232 interface module). It can be operated at
type strong suction vacuum pump. constant current mode, constant voltage mode & constant power mode. It
•The 24V soldering iron is compatible with also can be set with maximum limits for current & power output. Ideal
the compound tip design by connecting the instruments for scientific research, educational labs or any application
ceramic heater, sensor, control unit and tip requiring a sophisticated DC-power source.
as one. Designed for efficiency.
Replacement of tips with easy slip in/out Model CSI3644A CSI3645A CSI3646A
method.
•Compatible with various type of air nozzles. DC Voltage 0-18V 0-36V 0-72V
•Compatible with different kinds of tips. DC Current 5A 3A 1.5A
•Full compliment of nozzles & tips are available. Item# NEW
W
CSI-9000 ITEM! Power (max) 90W 108W 108W

Only $249.00 Only $199.00 Each!


W
> Soldering Equipment & Supplies > Soldering Stations
W

Programmable
Programmable DC Electronic
Electronic Loads
www.Cir cuitSpecialists.com
W
The CSI 3700 series electronic
loads are single input program-
W

.G
mable DC electronic loads that
Circuit Specialists Soldering Station $34.95! provide a convenient way to test
w/Ceramic Element & Seperate batteries and DC power sup-
W

Solder Stand
iU
plies. It offers constant current mode, constant resistance
•Ceramic heating element for more mode and constant power mode. The backlight LCD,
accurate temp control numerical keypad and rotary knob make it much easier to
.R

RU
•Temp control knob in F(392° to 896°) & use. Up to 10 steps of program can be stored.
C(200° to 489°)
•3-prong grounded power cord/static safe tip In Business Model CSI3710A CSI3711A
AD

•Seperate heavy duty iron stand Input Voltage 0-360V DC 0-360V DC


•Replaceable iron/easy disconnect
M
Input Current 0-30A DC 0-30A DC
•Extra tips etc. shown at web site Item# Rapid Heat Up! Input Power 0-150W 0-300W
CSI-STA
CSI-STATION1A
iO

EL
CSI3710A: $349.00 CSI3711A:
CSI3711A: $499.00
Also Available w/Digital Display SMD Hot Tweezer
& MicroPr
MicroProcessor
ocessor Controller
Controller Adaptor Fits CSI
SC

E
Stations 1A & 2A,
2A, 6-1/2 Digits Digital Multimeter
and CSI906
.H
Item#
CSI-STA
Since 1971 •Stability, Speed and
CSI-STATION2A $29.00 Accuracy
A

•High Performance: 2000


i2
$49.95 Item# readings/sec
M

Details at Web Site CSITWZ-STA


CSITWZ-STATION •Multi-Point Scan
•19 Full-Featured Functions
.R
> Soldering Equipment & Supplies > Soldering Stations •Dual Displays with 3-color
AT

Annunciators
100,000 Count Programmable
Programmable Data Logging DMM
O
•Noise Immunity.
A power house DMM with 100,000 count accuracy and a •Built-in USB and GPIB
(optional) Interfaces
OR

built-in data logger that will help you find intermittant prob-
•Easy & Free PC
lems and monitor equipment while you are busy working on applications
other jobs. The D620 can record and store in it's own internal •6 1/2 Digits M3500A
memory up to 37,300 time stamped data values in all func- Specifications Compare Price & Specs with
UL

tions by simply pressing a button. •Optional Accessories the Agilent 34410A !


Special
•True RMS measurements for AC •Designed with 7-1/2 digit techniques to provide user a
•RS-232C interface with personal computer. $169.00! stable, faster and accurate
Item# PROTEK D620
.H

measurement. Item# M3500A


Details at Web Site > Test Equipment > DIGITAL MULTIMETERS •1000VDC / 750VAC
$689.00
Details at Web Site
Dual Output DC Bench Power Supplies
i2

> Test Equipment > Digital Multimeters


High stability digital read-out bench power supplies
featuring constant voltage and current outputs. Short- As Low As
.R

circuit and current limiting protection is provided. SMT $93.00!


PC boards and a built-in cooling fan help ensure reli-
able performance and long life. Triple Output Bench Power Supplies
O

with Large LCD Displays


•Source Effect: 5x10-4=2mV
•Output: 0-30VDC x 2 @ 3 or 5 Amps
•Load Effect: 5x10-4=2mV HOT & 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: $105.95 5+: $99.50
CSI3003X-5: •Input Voltage: 110VAC
CSI5003X5 0-50v/0-3amp 1-4: $114.95
CSI5003X5: $114.95 5+: $109.00 CSI3003X3 0-30VDCx2 @3A $188.00 5+: $183.00
CSI3003X3:
CSI3005X5 0-30v/0-5amp 1-4: $119.00
CSI3005X5: $119.00 5+: $114.00
$114.00 CSI3005XIII 0-30VDCx2 @5A $239.00 5+: $229.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 4/4/2007 11:36 AM Page 2

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


ESD Safe CPU Controlled
Controlled SMD Hot Air Rework Station
Station Stepper Motors
The heater and air control system are built-in Part #: Motor Frame Holding Torque: Price:
and adjusted by the simple touch of the front Size:
keypad for precise settings. Temperature 42BYGH404 NEMA 17 3.4kg.cm/47oz.in $17.95
range is from 100°C to 480°C / 212°F to 57BYGH207 NEMA 23 8kg.cm/111oz.in $24.95
896°F, and the entire unit will enter a temper- 57BYGH303 NEMA 23 15kg.cm/208oz.in $29.95
ature drop state after 15 minutes of non-use 57BYGH405 NEMA 23 20kg.cm/277oz.in $34.95
for safety and to eliminate excessive wear. 85BYGH350B-03 NEMA 34 48kg.in/665oz.in $79.95
•CPU Controlled Item# CSI825A++ 85BYGH350C-03 NEMA 34 63kg.cm/874oz.in $119.95
•Built-in Vacuum System
•Temperature Range:100°C to 480°C / 212°F to
896°F Stepper Motor Contr ollers 2 Phase Microstepping
Microstepping
•15-Minute Stand-By temperature "sleep" mode Sale Stepper Motor Driver (Bi-polar & Unipolar Motors)
•Power:110/120 VAC, 320 W maximum $149.00! Part #: Dimensions: MicroStep: Price:
Details at Web Site > Soldering Equipment & Supplies XCW220 100mm x 61mm 1(200), 1/2(400), 1/4(800), $39.95
x 19mm 1/8(1600)
CW220 99mm x 65mm 1/2(400), 1/8(1600) $49.95
Br eadboard / Power Supply / x 30mm

W
MultiFunction DMM Bundle CW230 115mm x 72mm
x 32mm
1(200), 1/2(400), 1/4(800),
1/8(1600), 1/16(3200),
$59.95
Provides the user with a quick and efficient 1/32(6400), 1/64(12800)
system for breadboarding electronic circuits. CW250 140mm x 94mm 1(200), 1/2(400), 1/8(1600) $69.95

W
Comes with three built-in regulated power x 45mm
supplies along with a deluxe, easy-to-use CW860 147mm x 97mm 1(200), 1/2(400), 1/4(800), $119.95

W
breadboard. Included is a multifunction DMM x 30mm 1/8(1600), 1/16(3200),

W
1/32(6400), 1/64(12800),
with 1000VDC, 750VAC, frequency, resist- 128(25600), 1/5(1000),
ance, diode test, audible continuity, transistor 1/10(2000), 1/25(5000),

.G
check,temperature, and capacitance. 1/50(10000), 1/125(25000),
A Super Deal! 1/250(50000)
Details at Web Site

iU
> Breadboards & Prototyping Boards
Only
Powered
Powered Breadboard
Breadboard w/out DMM: $69.00 $69.99! Protek
Protek 2.0 & 2.9GHz Field Str
Strength
ength Analyzers

.R

RU
Item#: PBB272-DMM: $69.99! •Frequency Range : 100KHz ~ 2900MHz 3290N

Powered Breadboard w/Multifunction DMM (CSIMS8264) (2060MHz for 3201N)

AD
•WFM/NFM/AM/SSB modulated signals
You Get The DMM for an Extra $.99 may be measured.

M
•Sweep Trigger Mode: Free Run, Single
Digital Storage Oscilloscope Module Run, Continuous Wave, Squelch Run

iO

EL
•Sweep Speed: 500 to 2000msec
Convert any PC with USB interface to a high •PLL tuning system for precise frequency
measurement and tuning

SC
New

E.H
performance Digital Storage Oscilloscope. This
•Built-in Frequency Counter Rev.
Rev. Now
is a sophisticated PC basedscope adaptor pro-
•RS232 interface Available
viding performance compatible to mid/high
level stand alone products costing much more!

AM
Item#’s 3290N & 3201N Special

i2
Comes with two probes.
Details at Web Site $1899.00 (for 3290N)
Details & Software Price > Test Equipment > RF Test Equipment $1374.00 (for 3201N)
Breakthrough!

.R
Download at Web Site

AT
> Test Equipment > Oscilloscopes/Outstanding Prices
PC based Digital Storage Oscilloscope, Outdoor Color Speed Dome Camera

O
200MHz 5GS/s equiv. sampling USB
interface
Item# 200DSO Only$819.00 •1/4” SONY Exview CCD Item# VC-EX861

OR
•768(H) x 494(V) effective pixels
•Horizontal Resolution: 480TV lines $899.00
•Up to 80 preset points
SONY Super HAD CCD Color SONY •Line scanning
Weatherproof
eatherproof IR Cameras

U
Super HAD •Continuous 360° horizontal rotation
•Day & Night Auto Switch CCD™ equipped •Vertical rotation: 0-100°

L.H
•Signal System: NTSC camera’s feature dra- •RS485 control interface
•Image Sensor:1/3" SONY Super HAD CCD •Min. Illumination: 0.1Lux (color) / 0.001Lux (B&W)
•Horizontal Resolution: 480TV lines matically improved
•Min. Illumination: 0Lux light sensitivity Details at Web Site Shown with optional wall mount
> Miniature Cameras(Board,Bullet,Mini’s, B/W, Color)
4 8 0n e s Item# VC-827D: $132.00

i2
i
T V oLl u t i o n
Res
SONY Super HAD CCD B/W SONY Super HAD SONY Super HAD CCD Color

.R
Weatherproof
eatherproof IR Camera CCD Color Camera Weatherproof
eatherproof IR Camera
•Day & Night Auto Switch •Weather Proof •Day & Night Auto Switch

O
•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 Item# VC-805: $53.95 •Min. Illumination: 0Lux

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
$7.00
0 5>

3
CANADA

74470 89295
$5.50
U.S.

0
Vol. 28 No. 5 NUTS & VOLTS X-10 DOGGY DISH • HACKING • SONIC REALISM • FLOOD DETECTION ALARM May 2007
O
.R
i2 .R
O
E.H i2
EL .H
RU
M UL
iU OR
.G AT
W
W AM
W SC
iO
AD
Page 108

.R
11:11 PM

W
W
4/5/2007

W
Cover.qxd

You might also like