Nuts&Volts 2009 11

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

Vol. 30 No.

11

NUTS & VOLTS

LASER COMMUNICATION RING-A-THING SUN TRACKER DMX

November 2009

Ruggedized PDA!

Solar Science Fair Kit!

Serial WiFi Bridge

Basic Solar Cell


Array & demo parts
Includes motor,
wheels, fan, more!
Can demonstrate
series (for voltage)
or parallel (for max. amperage) circuits
Same panel as in Nuts & Volts Oct. Issue!

HSC#SOL021
Industrial-use PDA with ruggedized case!
MEZ1000 by ACEECA runs Palm O/S
16MB SDRAM, 4MB Flash RAM
Measura Software Included
160 x 160 4-bit greyscale display
USB, Serial, IrDA ports, 1900mAH Battery
Original List price $369!
Includes cable, charger, CD, stylus
New in OEM box, HSC 90-day warranty

HSC#22286

$99.00

USB Speakerphone

MV100 by MVox, talk free

over the Internet!


Compact and portable:
perfect for travel!
Powered by USB - no
batteries needed
Noise and echo canceling circuitry

HSC#22313

$9.95

12VDC Inverters
These PowerStar Products inverters change
12 VDC into 115VAC for portable AC power
anywhere! Perfect for camping, boating, field
day! Brand new units in factory boxes.

$15.95

Barcode Scanners!

Metrologic Cubit IS6520 Series Scanner


Mountable reader has 0-7 inch scan range
OEM or Retail applications, fully automatic
80 char. data read, 20 scanlines
Single cable interface to host
Scans and decodes all standard barcodes
Includes cable, manual, mounting bracket
Datasheet details available on our website
New in OEM box, HSC 90-day warranty

HSC#22283
HSC#22284

USB
Serial

$95.00
$89.00

AirborneDirect Serial Ethernet Bridge


802.11b to RS232/485 serial port
Plug & Play OEM product (no manual)
Orig. List Price of $195!
Includes AC Adaptor, mounting cradle
New in OEM box, HSC 30-day warranty

Nanoptix Spill Proof Thermal Printer


USB(mini) and Serial Ports built-in
Small Footprint! 7.5 x 5.25
203 dpi print density, 40 char. width
Windows drivers available
Includes setup guide, AC Adap.
New in OEM box, HSC 30-day warranty

HSC#22296

HSC#22295

HSC#22241

$19.50

Maxon 6VDC, 1 x 1.75


HSC#21283
$12.50

HSC#22208

Dont forget HSC!


Hey, remember us? Were still Silicon
Valleys #1 source for electronic parts, tools,
equipment, and one-of-a-kind specials!
Weve been buying and selling high-tech
hardware since 1964, and weve been the
go-to guys for technology tinkerers even
before it was called Silicon Valley. If you
are in the SF Bay Area, you owe it to yourself
to pay us a visit. See why savvy engineers
have known us as a resource for decades!

$14.95

Acer, Dell, Fujitsu, Gateway, HP, IBM,


Sony, Toshiba and more!
90 W Total - Switchable to 16 VDC,
5.62A or 19VDC, 4.74A
Factory Refurbished, 30-day warranty

HSC#84017

$29.95

$17.50

Helping Hands!

Canon 12VDC, 2.3W


1.375 x 1.375
HSC#21370
$4.50

Useful bench-top stand holds your work


Maginifier lets you see smallest details
LED Illuminator lights your way!

HSC#TLS021

$11.50

Special Bargains!!
Mueller Test Probe
to Banana (Blue)
#80912
$1.95

Ferrite Filter, Clamp-on


HSC#18370
$1.95

SMA-SMA, 11
Semi-rigid Coax
#21290 $9.50

12VDC Adapt., 3.3A


HSC#21375
$12.50

SMA-SMA, 10
Teflon Coax
#21970
$9.75

DMM Probe Set


HSC#21542
$7.95

Vactrol VTL3A47
Opto Module, 12V
#1507
$1.50

Heimann Pyrosensor
#22268
$1.95

1-Watt White LED


#LED016
$4.50

7.5 Flexy Antenna


with Mini-UHF Conn.
#18845
$7.95

Universal Laptop
Charger/Adapter!
Adapters for 10 Different Brands, Incl.

EMACS MPW-6200F Supply, 185-200W


5V @ 16A, 12V @ 7A, 3.3V@14A, also
has -5, -12 and +5VSB outputs
New, 30-day HSC Warranty

Mabuchi 5VDC Motor


Tiny! 1 long by .5 thick!
HSC#18136
$1.95

12 VDC at 8.4 Amps

HSC#22242

1U Server Supply

HSC#21474

Canon 12VDC, 1 x 1
5700rpm @ 140mA
HSC#21369
$2.50

HSC#KIT240 (Pixie 2) $9.95


HSC#80929 (xtal pack) $14.95

Compact power supply by Mean Well


Overall length 8.75, 2.5 x 1.25 high
New in manufacturer plain white box

$95.00

Fabulous selection of small DC motors (and


some AC, too!) for robotics, demonstrations,
models, anywhere you need a small motor!
This is a small sampling of our inventory:

HSC Exclusive -- Pixie2!


Tiny QRP Xcvr rig! 200-300 mW out
Kit incl. all board-mounted parts
Use walkman phones
QRP crystal pack special!

PowerStar UPG-400 for 400 Watts


11.5 x 3.125 x 3.125

$24.50

$49.00

Hobby Motors

Finally!!...80, 40, 30, 20, 17, 15 &


10 meter calling freqs.
PowerStar POW-200 for 200 Watts
Automobile Cigarette Lighter Cord built-in!

USB/Serial
Thermal Printer

Pressure Transducer
Honeywell 26PCDFS6G
#21066
$4.95

Auto Cig. Lighter Cord


#21438 $1.95

12VDC Adapt., 5A
#22285
$14.95

Palm Treo 300


CDMA Module
#22037
$2.95

DSL Line Filter


#20070
$2.95

Toroidal Transformer
120VAC - 3.7VAC
#21848
$6.50

You can get more info about any of these items on our website!

Since 1964!...

Silicon Valleys Electronic Marketplace


2 Retail/Wholesale Locations:
Main Office - Mail Orders...
3500 Ryder St. Santa Clara, CA 95051
Phones:
Santa Clara
1-408-732-1573
Rohnert Park
1-707-585-7344

Look for us on...

seller ID:
hscelectronicsupply

Order Toll-Free: 1-800-4-HALTED (442-5833)


or...ONLINE, AT: www.halted.com
Terms: Some quantities limited; all items are subject to prior sale. Minimum order:
$10.00 plus shipping. Orders under $20.00 subject to $5.00 handling fee, in addition to
shipping. All orders shipped by UPS Surface unless otherwise specified. $9.00 UPS charge
added for COD. Visit our website for detailed information on domestic and international
shipping methods.

What is
the missing
component?

Industry guru Forrest M. Mims III has created a stumper. Video game
designer Bob Wheels needed an inexpensive, counter-clockwise
rotation detector for a radio-controlled car that could withstand the
busy hands of a teenaged game player and endure lots of punishment.
Can you figure out what's missing? Go to www.Jameco.com/untangle
to see if you are correct and while you are there, sign-up for our free
full color catalog.

1-800-831-4242
4

November 2009

NOVEMBER 2009

www.nutsvolts.com

Columns
10 TechKnowledgey 20 09
Events, Advances, and News
Topics covered include tapping tree power,
a dual monitor laptop, subminiature
pushbutton switch, plus other stuff.

14 The Spin Zone


Adventures in Propeller Programming
Do it up with DMX.

20 Near Space
Approaching the Final Frontier
A near space environment chamber update.

Page 40

Projects & Features


34 Computer to Computer Link
Using Laser Pointers
Establish serial communications between
computers or microcontrollers over
low power laser beams.
By Ed Ringel

40 Phone Ring-A-Thing Control


Use your cell phone and this device as a
receiver/decoder system to perform
remote functions.
By John F. Mastromoro

28 Q & A
Reader Questions Answered Here
Fish feeder project, ferrite core search,
flashing light alarm, plus more.

49 The Design Cycle


Advanced Techniques for Design Engineers
Take an IO-Warrior into your next
embedded battle.

56 Getting Started With PICs


The Latest in Programming Microcontrollers
Eight-pin projects.

61 Personal Robotics
Understanding, Designing &
Constructing Robots
Persistence pays off when dealing
with problematic projects.

44 Experiments with
Alternative Energy
Learn the fundamentals of renewable
energy through this educational series.
This month: Build a Double Wide Sun Tracker.
By John Gavlik

67 Smileys Workshop
An AVR C Programming Series
Typing up some loose Arduino ends.

Page 44

Departments
08
32
33
66
6

DEVELOPING
PERSPECTIVES
NEW PRODUCTS
SHOWCASE
ELECTRO-NET
November 2009

Page 20
72
76
78
81

NV WEBSTORE
CLASSIFIEDS
TECH FORUM
AD INDEX

Page 10
Nuts & Volts (ISSN 1528-9885/CDN Pub Agree #40702530) is published monthly for $26.95 per
year 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 ON N9A 6J5; [email protected].

A Low Cost Solution for

Industrial Serial to Ethernet


with Digital I/O and Analog to Digital Converters

Hardware Features
t5XP55-TFSJBMQPSUT
t.CQT&UIFSOFU
t6QUPEJHJUBM*0
t'PVSCJU"%DPOWFSUFST
t0QFSBUJOHUFNQFSBUVSFUP$
t%JNFOTUJPOTwYw
tCJUQFSGPSNBODF

Software Features
t/PQSPHSBNNJOHSFRVJSFE
t5$16%15FMOFU)551NPEFT
t%)$1TUBUJD*1TVQQPSU
t8FCCBTFEDPOHVSBUJPO

w

$19.95

Qty. 1000

w

The all-new

NetBurner SBL2e
I N D U S T R I A L S E R I A L TO E T H E R N E T S O LU T I O N

A NetBurner Complete Hardware & Software Solution

Board Part Number | SBL2e-200IR


Information and Sales | [email protected]
Web | www.netburner.com
Telephone | 1-800-695-6828

DEVELOPING
by Bryan Bergeron, Editor

Speaker Break-In

lthough I like to keep up with the latest innovations in


electronics, my personal taste is toward vintage tube
amps and musical instruments. I rarely take out
the plastic for a new model of anything. However,
I was checking out a new 100W tube amp recently
and I asked for a demo. The sound was surprisingly
harsh to my ears.
The salespersons response was that this was a new
floor model and that the speakers hadnt been broken in
yet. Not only that, the speaker cables and the power cord
were new, as well. He was confident that it would take
about 30 hours of continuous use to burn in the cables,
and perhaps double that for the speaker to reach
full fidelity.
This wasnt the first time Id heard about breaking
in speakers, but it was a first for the cables and power
cord. When I expressed doubt about the speaker cables,

China PCB Supplier


(Prototype thru Production)
 1-layer up to 30-layer
 Cost and quality
 On time delivery
 Dedicated service
 Instant Online Quote & Order
. . . . . Day and Night

No minimum quantity 1 piece is welcome


Check our low price and save big $$$...
86(571)86795686
[email protected]
www.pcbcore.com
8

November 2009

PERSPECTIVES
he showed me a national audiophile magazine with ads
from companies selling pre-broken in audio cables. The
more expensive cables were broken in 100 hours or more.
According to the full page ads, both the insulation and
copper wires require breaking in, again to reach
full fidelity. I thanked the well-meaning salesperson
and headed home to do a little research.
It turns out that some but not all high-end
speaker manufacturers recommend breaking in speakers.
For example, Celestion (professional.celestion.com)
which manufactures high-end speakers for guitar
amplifiers recommends breaking in speakers. They
suggest warming up a speaker and then playing 10-15
minutes at full volume to get it up to spec in the shortest
time. Some boutique amplifier manufacturers include
burn-in as part of their production process.
Breaking in a speaker makes sense, given that its an
electromechanical device. I can understand the need to
get things moving to loosen up the cloth and other
materials. Even so, there is no universal consensus that
breaking in a speaker is needed or that it even works.
If you check the blogs, youll see that a common
perception is that the break-in period is the
manufacturers ploy to get customers used to their
speakers so they wont return them. So, as far as
speakers go, Im leaning toward the break-in side.
However, I put the concept of cable break-in
in the same category as multi-dimensional time
travel with a phone booth. Ive never seen a rational explanation for breaking in speaker cables, much less power
cords. And yet, there are businesses that
advertise on the web offering break-in services for your
high-end cables.
For only $39 per cable, you and your family can avoid
the inconvenience of breaking in your own. Or, another
company will sell you a cable cooker so that you can
break in and periodically recondition your cables in the
comfort of your own home.
I have no problem with someone trying to make a
living by offering products and services that, while
questionable, dont actively harm anyone. However, its a
disservice to well-meaning salespeople and the general
public to popularize voodoo electronics.
In pulling together the articles for Nuts & Volts, we do
our best to validate the science behind each article. But
we also rely on you, the reader, to take an active role in
commenting on our content positively or negatively.
The laws of physics wont be changed by group
consensus, but opinions and perspectives can be
shifted in the right direction. NV

Published Monthly By
T & L Publications, Inc.
430 Princeland Ct.
Corona, CA 92879-1300
(951) 371-8497
FAX (951) 371-3052
Webstore orders only 1-800-783-4624
www.nutsvolts.com

Subscriptions
Toll Free 1-877-525-2539
Outside US 1-818-487-4545
P.O. Box 15277
North Hollywood, CA 91615

FOUNDER/ASSOCIATE PUBLISHER
Jack Lemieux

PUBLISHER
Larry Lemieux
[email protected]

ASSOCIATE PUBLISHER/
VP OF SALES/MARKETING
Robin Lemieux
[email protected]

EDITOR
Bryan Bergeron
[email protected]

CONTRIBUTING EDITORS
Jeff Eckert
Vern Graner
Joe Pardue
Ed Ringel
Chuck Hellebuyck
L. Paul Verhage

Russ Kincaid
Fred Eady
John Gavlik
John Mastromoro
Jon Williams

CIRCULATION DIRECTOR
Tracy Kerley
[email protected]

SHOW COORDINATOR
Audrey Lemieux

MARKETING COORDINATOR
WEBSTORE
Brian Kirkpatrick
[email protected]

WEB CONTENT
Michael Kaudze
[email protected]

ADMINISTRATIVE ASSISTANT
Debbie Stauffacher

PRODUCTION/GRAPHICS
Shannon Christensen
Copyright 2009 by T & L Publications, Inc.
All Rights Reserved
All advertising is subject to publishers approval. We are
not responsible for mistakes, misprints, or typographical
errors. Nuts & Volts Magazine assumes no responsibility for the availability or condition of advertised items or
for the honesty of the advertiser. The publisher makes
no claims for the legality of any item advertised in Nuts
& Volts. This is the sole responsibility of the advertiser.
Advertisers and their agencies agree to indemnify and
protect the publisher from any and all claims, action, or
expense arising from advertising placed in Nuts & Volts.
Please send all editorial correspondence, UPS, overnight
mail, and artwork to: 430 Princeland Court, Corona,
CA 92879.
Printed in the USA on SFI & FSC stock.

NEW! HIDmaker FS for Full Speed FLASH PIC18F4550


Creates complete PC and Peripheral
programs that talk to each other over
USB. Ready to compile and run!
Large data Reports
64,000 bytes/sec per Interface
Easily creates devices with multiple
Interfaces, even multiple Identities!
Automatically does MULTITASKING
Makes standard or special USB HID
devices

NEW! Developers Guide for USB HID


Peripherals shows you how to make
devices for special requirements.

Both PC and Peripheral programs


understand your data items (even odd
sized ones), and give you convenient
variables to handle them.
PIC18F Compilers: PICBASIC Pro,
MPASM, C18, Hi-Tech C.
PIC16C Compilers: PICBASIC Pro,
MPASM, Hi-Tech C, CCS C.
PC Compilers: Delphi, C++ Builder,
Visual Basic 6.
HIDmaker FS Combo: Only $599.95

DOWNLOAD the HIDmaker FS Test Drive today!


www.TraceSystemsInc.com
301-262-0300

November 2009

KNOWLEDGEY

EVENTS, ADVANCES, AND NEWS

2009

TECH
BY JEFF ECKERT

ADVANCED TECHNOLOGY

PHOTO COURTESY OF PATRICK GILLOOLY.

GaN + Si HYBRID
CHIPS COMING

The hybrid chip under development


at MIT.

ts no secret that were approaching


a dead end in terms of how small
we can downsize silicon and, in fact,
some other materials offer better
performance. But the industry has
spent billions of dollars on silicon
technology and isnt overly eager to
start over with something else.
An obvious solution would be to
combine different but complementary
semiconductor materials on a single
chip, but despite decades of research
no one has been able to do it until
now. Apparently, MIT (www.mit.edu)
researchers have come up with a
solution that could help overcome
some of the size and speed barriers
faced by contemporary silicon
technology.
Whereas you can easily put a
billion transistors on a silicon chip,
the technology for similar integration
with other materials does not exist. It
turns out that perhaps only five to 10
percent of the transistors are involved
in computations and need to run at
maximum speed; speed isnt so
critical for the others, e.g., ones that
store information. So, if you could
piggy-back the faster, more exotic
materials on top of silicon, you could
have the best of both worlds.
Enter Prof. Tomas Palacios and

10

November 2009

grad student Will Chung, who have


created a silicon/gallium nitride
hybrid chip, as described in the
October issue of the IEEE journal
Electron Device Letters. Instead of
trying to grow the high performance
material on top of a silicon chip
as others have attempted, they
embedded a GaN layer into a
standard silicon substrate. This
produces a faster chip that is also
highly efficient having most of the
transistors operate at slower speeds
minimizes power consumption. Best
of all, the chips can be manufactured
using standard commercial silicon
technology.
According to one analyst,
PHOTO COURTESY OF UCLA.
the concept could enable a new
class of high performance, mixed
signal, and digitally controlled RF
circuits for use in a wide range of
Department of Defense and
commercial applications. In addition,
the technology may be applicable to
things like hybrid chips that combine
lasers and electronic components on
a single chip and energy-harvesting
devices that can use ambient
pressure and vibrations to produce
enough power to run the silicon
components. So far, the researchers
have been able to make chips that
are only about one square inch in
size, so a challenge is to find a way
to scale it up to match the eight- and
12-inch wafers used in conventional
chip manufacture. In addition, they
need to work on issues of device
reliability and thermal management
in the GaN transistors. Nevertheless,
they hope to have it ready for commercialization within about two years.

TAPPING TREE P OWER


n a development likely to make
tree huggers apoplectic, some folks
from the University of Washington
(www.washington.edu) have figured

out a way to power (very) small electronic devices from trees, according
to an article recently published in the
IEEE Transactions on Nanotechnology.
As far as we know, this is the first
peer-reviewed paper of someone
powering something entirely by
sticking electrodes into a tree, said
co-author Babak Parviz, a UW associate professor of electrical engineering.
Inspired by an earlier MIT study
revealing that plants generate up to
200 mV when one electrode is
plugged into the plant and the other
into the soil, Parviz and co-author
Carlton Himes spent the summer
poking nails in trees in search of
promising specimens. In the process,
they discovered that bigleaf maples
generate a steady stream of up to a
few hundred millivolts. The next step
was to have another co-author, Brian
Otis, build a boost converter that
stores incoming voltage until it can
be discharged at an output of 1.1V
enough to run low power sensors.
Note that the tree power
concept is not the same thing as the
potato effect, in which a current
flow is created by a chemical
reaction on two different metals.
The tree power setup uses the same
metal for both electrodes. So, how
does it work one might ask? Its not
This custom circuit collects and
stores enough power from trees
to run a low power sensor.
PHOTO COURTESY OF DUSTIN
SCHROEDER, UNIVERSITY OF
WASHINGTON.

TECHKNOWLEDGEY 20 09
exactly established where these voltages come from, admitted Parviz.
But there seems to be some signaling in trees, similar to what happens
in the human body but with slower
speed. Im interested in applying our
results as a way of investigating what
the tree is doing. When you go to
the doctor, the first thing they
measure is your pulse. We dont really
have something similar for trees. In
terms of practical applications, tree
power is unlikely to intrude into the
realm of solar power, but it provides
a low cost option for powering
sensors that monitor environmental
conditions. In fact, the concept has
already been patented by Voltree
Power LLC (www.voltreepower.com).
Their first tree-powered product is the
Early Wildfire Alert Network (EWAN),
consisting of thousands of humidity
and temperature sensor nodes
distributed over remote forests.

COMPUTERS AND
NETWORKING
DUAL MONITOR LAPTOP
ometime between now and
Christmas, a new laptop from a

new source gScreen Computer


Corp. (www.gscreencorp.com)
is scheduled to hit the market.
Based in Anchorage, the
company has been around since
2003 but is only now coming out
with its first hardware product.
This isnt the first dual screen
laptop to emerge, but it is the first
one focused primarily on the
needs of filmmakers, photographers,
video and graphics designers, and
CAD engineers. According to the
company, We do not yet know the
exact release date, price, or specs
that will be available on the first
Spacebook model. We do know the
specs that we are planning at the
current time, but those can change
and will solidify when we go into
production at the end of 2009.
Some specs are available though,
and both 16 inch and 17 inch
models will be in the initial offering,
with smaller ones to follow. Features
include an Intel Dual Core2
processor (2.53 or 2.80 GHz), the
Mobile Intel PM45 Express Chipset
ICH9M-Enhanced, NVIDIA GeForce
9800 GT graphics with 512 MB
VRAM, a 250 or 500 GB drive, an
optical drive, and various I/O ports.
No official price has been
announced, but rumor has
it that the machines will
cost you somewhere in the
range of $3,000.
The Spacebook
dualscreen laptop,
designed for high-end
graphics users.

INDUSTRY AND
THE PROFESSION
MIRACLE ROBOT
INVESTMENT
OPPORTUNITY:
STEP RIGHT UP
f youre sniffing around for a long-shot
investment, take a whiff of an offer from
Suram Robotics, an Indian firm thats
looking worldwide for investors in its plan
to build and market a miracle robot.
According to CEO and Project Chief Ashish
Sood, This is going to be one of the
unique robots in the world. He informs

us that it can (a) be remotely controlled,


e.g., functioning in the USA at the direction
of an operator in India; (b) create other
robots like itself, free of charge; (c) do all
types of household and office work; (d)
talk to any person on Earth and provide
instant answers to questions; and even (e)
look after your kids when youre away from
home. According to Sood, These robots
will not charge anything for the work you
require them to do, so you save a lot of
money. Details about the robot itself
are available at http://raj6781.google
pages.com/miraclerobot.
You can invest as little as $100 in
the project, for which you will receive a
company shareholder certificate. Investors

DUAL MONITOR,
NO LAPTOP
The EVGA
Interview dual
display.

lso geared for people who want


to see double is the EVGA
Interview Display, which features
two rotatable, thin, high-res 17 inch
displays supported by a single
desktop stand. Designed for
business presentations, researchers,
physicians, financial consultants, or
creative professionals, the units
1440 x 900 resolution screens will
flip 180 degrees on the horizontal
axis and automatically invert the
onscreen image to show it correctly
for viewers on either side of the
desk. The screens also fold 90
degrees from closed to fully open to
allow workspace flexibility. It comes
with two keyboards and mice so
viewers can work with their image
on one side while others can watch
on the other side. It also sports a
built-in 1.4 Mp webcam and a
microphone for video conferencing.
The base features three USB 2.0
ports and controls for monitor
settings, the microphone, power,
and DMS connections. MSRP is
$649.99, with Internet prices
about $25 less. For details, visit
www.evga.com/interview.

will draw an appropriate portion of the


profit when the robot goes on sale in
world markets. Sood predicts that his
aspirations (which ostensibly do not consist of a quick retirement in Brazil) can
be accomplished within three months if
sufficient investment capital is raised.
Curiously, interested investors are
directed to www.mukeshambani.com,
which doesnt seem to exist. But FYI, Mukesh
Ambani is an Indian engineer and businessman, chairman and largest shareholder of
Reliance Industries, and reputed to be the
wealthiest Indian in the world, the wealthiest
in Asia, and the seventh wealthiest in the
world. One has to wonder why he hasnt
kicked in enough to get the ball rolling.
November 2009

11

ONE TOUGH H D
PHOTO COURTESY OF
HITACHI GLOBAL STORAGE
TECHNOLOGIES.

Hitachis
SimpleTOUGH
drive, built for
rough environments.

or people who work in harsh


environments, tweet while bungee
jumping, or just get drunk and fall
down a lot, Hitachi has introduced
the SimpleTOUGH portable USB
2.0 drive. According to the
manufacturer, it is the only waterand shock-resistant external drive
available today from a global hard
drive manufacturer. Engineered to
sustain a 3 m (9.8 ft) drop and able
to withstand being run over by a
one-ton-class commercial truck, the
SimpleTOUGH drive can take a

beating thats worse than a date with


Chris Brown. It also includes a
never-lose foldaway USB cable,
ergonomic sides for easy carrying,
and a topside power status LED.
Inside is a Travelstar drive that
can withstand shocks of 400 G in
operation and 1,000 G when shut
down. SRPs are $99.99 for the
250 GB version, $119.00 for the
320 GB, and $149.99 for the 500
GB. Details are available at Hitachi
Global Storage Technologies
(www.hitachigst.com).

CIRCUITS
AND DEVICES
SWITCHER
FEATURES
NO-LOAD
CONSUMPTION
<0.5W

you might consider a new series of


switchers from CUI, Inc.s, V-Infinity
division (www.v-infinity.com).
They feature a no-load power
consumption less than 0.5W and
come in 25, 50, 75, and 100W
versions. The 25W unit (VGS-25)
measures only 3.08 x 2.00 x 1.11
in (78.2 x 50.8 x 28.2 mm).
The units are cooled by free air
convection and offer efficiency
ratings of up to 89 percent. They
are suggested for a range of
applications where energy
consumption is an issue, including
industrial controls, networks, general
automation functions, and
test and measurement
equipment.
The VGS
The
V-Infinity
VGS-25
compact
switching
power
supply.

f youre looking for an


efficient, compact power supply,

UNIQUE PRODUCTS + SUPPORT!


7 in 1 USB Scope

Mixed-Signal Scope

50 - 300MHz DSOs

2-ch 10-bit 2MHz scope/spectrumanalyzer, 3MHz 8-bit wfm gen; 16 x


I/O; Network Analyzer; Noise
Generator; PWM. Windows/Linux
/Mac compatible! USB-powered,
great for toolbox, education, etc.
CGR-101
$180

CleverScope - 100MHz Scope,


Spectrum/Logic Analyzer.for PCs. 4 or
8 M/sample storage! Easy A-B, math,
& filters! 2 ch x 10, 12 or 14-bit, 8 dig.
I/P. (Opt. 0-10 MHz SigGen. - $299)
CS328A-4 (4MS Buffer)
$1259
CS328A-8 (8MS Buffer)
$1474

60/100/200/300MHz 2 ch, 2GS/s


DSO 2000 wfm/s refresh rate. High
quality, ultra Compact Design with
small footprint. Totally new price.
DS1052E
$469
e!
Cas
thru
Free
DS1302A
$1995

Wireless Analog

Multiparameter Loggers

I2C Xpress

4-ch analog input wireless module


433/868/915MHz. Low power serial
interface. Easy configure. 24 bit ID
to avoid cross-talk. 2 digital output.
EmbedRF Module
$59
EmbedRF DevKit
$299

Mini-logger with built-in temp/humidity/


pressure/3-axis accel sensors.
Customize msmt/record parameters;
send data to PC after or during logging.
Synchronize multiple loggers.
MSR145S
from $468

Versatile USB2.0 I2C protocol exerciser/


analyzer. Ideal for all I2C bus system
development and debug, it operates on
standard I2C protocol interfaces in lowspeed (10 kbps), standard (100 kbps)
and fast (400 kbps) modes.
$699

.NET Board

EMC Spectrum Analyzers

SOMO-14D

Turn Your PC into a Real-Time


Audio Spectrum Analyzer
Features

Smallest (2.2 x2.2!) lowest cost


Microsoft's .NET Micro Framework
development system. USB host &
FAT file. Run C#; Visual Studio for
programming. SD/USB memory,
other I/F. USBizi-Devsys
$99

Handheld Palm PC-based 2.7GHz


Spectrum Analyzer. Multiple
sweep settings store wfms,
set-ups, etc. Use WiFi PC for
email, reports, calculations.
PSA2701T
$1990

14-pin Tiny Audio-Sound Module


plays back pre-stored audio files
(voice and music) from microSD card - ideal for embedded
audio output.
SOMO-14D
$25

1-888-772-3544
[email protected] www.saelig.com
12

November 2009

FFT to 1048576 pts


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

SpectraPLUS 5.0
FFT Spectral Analysis System

Download 30 day FREE trial!


www.spectraplus.com
Starting at $295

PHS

Pioneer Hill Software


24460 Mason Rd
Poulsbo WA 98370

360 697-3472 voice


360 697-7717 fax
[email protected]

TECHKNOWLEDGEY 20 09
series offers a universal input (88 to
264 Vac) and single output voltages
of 3.3, 5, 12, 15, 24, and 48 Vdc.
They also include an LED on
indicator, 105C long-life electrolytic
capacitors, and an operating
temperature range of -25 to 70C,
derating linearly from 100% load
at 50C. Theyre also protected
from short circuits, overloads,
overvoltages, and brownouts. Best
of all, you can get them in single
units from Digi-Key Electronics
(www.digikey.com) at prices starting
at $34.22.

SUBMINIATURE
PUSHBUTTON SWITCH

to existing tactile switches that


usually have a travel of only
0.25 mm and, in fact, match the
PCB layout of the knitter-switch
TSS309/TSS310 series tactile
switches. With a footprint of just 7 x
3 mm and a longer travel of 1.6 mm,
the switch is a surface-mountable
device supplied in T/R packaging for
automatic pick-and-place systems.
Available in normally open and
momentary contact versions, the

SSP 129T provides a 100,000


cycles operating life and
incorporates a gold-plated contact
plate for the reliable small-current
switching. The company offers the
switches through a network of
European distributors but doesnt
appear to have any North
American outlets. Interested
parties are advised to contact
the home website at www.knitterswitch.com. NV

The Newest Products and


Technologies are Only a Click
Away!
mouser.com

The new SSP 129T subminiature


pushbutton switch.

new subminiature pushbutton


switch has been introduced by
Knitter-Switch, a Munich-based
manufacturer of switches ranging
from toggles to membranes to tactile
switches. The SSP series is designed
specifically for use with mobile
multimedia devices, portable
medical devices, and a variety of test
and measurement instruments. The
SSP 129T is a large travel alternative

Over A Million Products Online


More Than 390 Manufacturers
Easy Online Ordering
No Minimum Order
Fast Delivery, Same-day Shipping

(800) 346-6873

The Newest Products


For Your Newest Designs

Mouser and Mouser Electronics are registered trademarks of Mouser Electronics, Inc. Other products, logos, and
company names mentioned herein, may be trademarks of their respective owners.

November 2009

13

SPIN

ZONE

ADVENTURES IN PROPELLER PROGRAMMING

BY JON WILLIAMS

DO IT UP WITH DMX
Even if youve never heard of DMX512-A (DMX), chances are youve seen it in
action. Where? At any large stage production. Concerts and plays are big users
of DMX-controlled lighting. So, what if youre not one for concerts or the
theater? Well, have you ever been to a night club with lots of crazy, dancing,
pulsating lights? Then youve seen the magic of DMX.
o, what is DMX? It is, in fact, a very simple, half-duplex
(one direction, controller to fixture) serial protocol that
runs over a standard RS-485 hardware link. The protocol
was originally designed for controlling stage lighting, but
as it is so easy to implement it has been put to use in a
variety of show control applications.
We can break down the protocol into four essential
elements:

Break (B)
Mark After Break (MAB)
Start Byte (S)
Packet of Frames (Fx)

Figure 1 visualizes these elements as seen on the


DMX RX pin of the Propeller.
The Break is what allows all receivers on the system to
synchronize themselves with the packet; this is a space (0)
on the line that lasts 88 s or longer. The Mark After Break
is a short rest with the line at idle (1); the MAB is (8 s) or
longer. The first byte that follows the MAB is called the
Start byte; it is typically zero and ignored in many systems
(though it really shouldnt be). DMX bytes are transmitted
in 8N2 (eight data bits, no parity, two stop bits) format.
After the Start byte is the Packet of channel values
called Frames (0 to 255, also 8N2) which could be up to
512 bytes.
Light fades and motion are created by a master
controller that streams the DMX data at a pretty swift clip:
250K baud. At this rate, the Break, MAB, Start byte, and
512 Frames can be transmitted every 22.7 milliseconds
FIGURE 1. DMX Signaling.

14

November 2009

(per the DMX specification).


Ive written DMX receiver code for the SX28 but it is a
challenge, especially when one needs to do brightness
control of LEDs as we intend to do here theres not a lot
of room left in the interrupt when running an RX UART VP
at 250K. With the Propeller and a dedicated DMX receiver
cog, however, its really very simple so much so that it
makes me shake my head and smile.
What were going to build this month is a generic
DMX I/O add-on for the Propeller platform with three
channels of medium current output to control devices
like 12V LED circuits and small DC lamps. This will let
us create a simple DMX lighting fixture using a high
brightness RGB LED.

DMX HARDWARE
Figure 2 shows the schematic for a generic DMX
interface yes, this circuit can transmit, as well as receive.
It would have been silly to design an add-on module for
the Propeller that couldnt transmit as well, especially
since the cost of this upgrade was a resistor and a
single I/O pin. Pretty cheap price for the flexibility, dont
you agree?
A quick note about JP1 and JP2: JP1 is used only
when the node is the master (transmitting) and only one
node will ever use JP1 (for receiver devices we leave this
out). JP2 is for the end nodes (transmit or receive) on a
DMX network; this resistor prevents reflections. So, if your
DMX project using this circuit is the last on the DMX line
then JP2 needs to be installed. For a lot of really great
information on RS-485 hardware, please see Jan Axelsons
book, Serial Port Complete.
For what its worth, my design does, in fact, violate
the DMX specification in that Im using three-pin XLR
connectors instead of the five-pin units that are normally
called for. But guess what? I have a mini DMX console
and a popular DMX lighting fixture here in my office,
and both use three-pin XLR connectors; this violation is

SPIN ZONE
pretty commonplace.
The circuit is a standard,
half-duplex RS-485 interface that
defaults to RX mode by pulling
the /RE and DE lines low through
resistor R4. You may be wondering
why I went with a 5V device when
a 3.3V device is available. Cost.
There is a 5V supply on the
Propeller platform and the cost of
the 5V ST485BN plus resistor R3 is
about half of the 3.3V device. R3
limits the current into the RX2 pin
(DMX RX input) of the Propeller. R2
holds the line high (idle state) when
FIGURE 2.
DMX I/O Circuit.
the ST485BN is set to transmit
mode and the RO output goes Hi-Z
(this resistor is required for projects that will do
bi-directional comms). Finally, we dont have to worry
about direct control of the TXE line with the Propeller as
the minimum VIH level of the ST485BN is 2.0 volts.
Okay, lets have a look at the code. The heart of the
object will, of course, run in its own cog, happily receiving
DMX data on the assigned pin and writing it to an array
that we can read from our top-level application. Ive also
added an activity output LED; this lights when receiving
a frame byte so we know the line is active.
From the top, heres the setup and code that monitors
the DMX RX line for the Break period.
dmxin

andn
mov

outa, ledmask
dira, ledmask

mov
add
mov

ctra, NEG_DETECT
ctra, rxpin
frqa, #1

waitbreak

waitpeq
mov
waitpne

rxmask, rxmask
phsa, #0
rxmask, rxmask

shortpacket

waitpeq
cmp
jmp

rxmask, rxmask
BREAK, phsa
#waitbreak

if_ae

wc

On entry, we make the LED pin an output and off,


and then set up ctra to count (at the system clock rate)
whenever the DMX RX pin goes low (negative detect
mode). This is an easy way to use the counter for pulse
width timing; we simply check or reset the counter
whenever the RX pin is high.
At waitbreak, we begin by waiting for the RX line to
go high using waitpeq. When it does, we reset the ctra
accumulator (phsa) and then wait for the RX line to go
low. After it goes high again (so weve seen a high, low,
then high), we can compare (cmp) the value in the
counters accumulator with the minimum timing for a
break. If the pulse was short, i.e., not a valid break, the
program will loop back to waitbreak and try again. Why
would we have a short Break? We wouldnt, but we could
power on in the middle of the Packet and we dont want
to move unsynchronized values into our array. By waiting

for the next Break, we can get into sync with the
DMX stream.
After weve detected a valid break, we set up to
receive up to 513 serial bytes. The first is the Start byte
and will usually be zero. Still, we shouldnt ignore this
byte; we should make it available to the application
to check.
For review, a serial byte will have a start bit, eight data
bits, and one or more stop bits; in DMX512-A, each byte
has two stop bits. Figure 3 shows the signal going into the
DMX RX pin of the Propeller. The idle state of the line is
high, a start bit is low (0), the data bits arrive LSB first and
are read directly from the line. The stop bits are at the
lines idle state (1). The value in the diagram is $CF.
Another task to deal with is handling a short packet,
that is, less than 512 frame bytes. A typical DMX controller will transmit the Start byte plus 512 frames, but it
doesnt have to. For example, I have a mini, six-channel
controller that sends the Start byte plus six frames, at a
very low rate (every 100 ms). What Im getting at is well
have to smarten-up our serial receive code to detect a
new break, even when we dont expect one.
getpacket

mov
mov

bufpntr, buf0
count, PACKET

rxbyte

mov
mov
mov
mov

phsa, #0
rxwork, #0
rxcount, #8
rxtimer, US_006

waitpne
add
or

rxmask, rxmask
rxtimer, cnt
outa, ledmask

waitcnt
test
mov
shr
muxc
djnz

rxtimer, US_004
rxmask, ina
wc
phsa, #0
rxwork, #1
rxwork, #%1000_0000
rxcount, #rxbit

rxbit
if_c

FIGURE 3. DMX512-A Byte Format.


November 2009

15

breakcheck

if_z

waitcnt
test
andn

rxtimer, #0
rxmask, ina
outa, ledmask

jmp

#shortpacket

wrbyte
add
djnz

rxwork, bufpntr
bufpntr, #1
count, #rxbyte

jmp

#waitbreak

wz

At the top, we set bufpntr to the hub address of the


array that will hold the DMX data and count to the
number of bytes to receive (513). At rxbyte, the Break
timer (ctra) is reset and we prep for receiving a serial byte
that has a bit timing of 4 s (250K baud). The bit timer is
initially set to 6 s (1.5 bits) so that we can position the bit
sampling in the middle of the first bit; this timer will be
activated (via syncing with cnt) on detection of the start
bit. Note, too, that when the start bit is detected the LED
is turned on to indicate DMX activity.
The bulk of serial receive code is at rxbit. After the bit
timer expires, the DMX RX line is sampled with test and
the RX bit value is moved into the C flag. If the C flag is
set (1), then we can restart the Break timer remember
this is set up to auto-increment whenever the DMX RX line
is low. After the Break timer is dealt with, the output value
in rxwork is shifted right by one bit and we move the new
bit from C into bit7 using muxc. If there are more bits to
receive, then the code loops back to rxbit; otherwise, it
will drop through to breakcheck.
The program waits one more bit period (4 s) and
then samples the line again, saving the result into the Z
flag. At this point, we should be sampling a stop bit which
is high. If, however, we have a new Break period then the
line will be low (0) and the Z flag is set. When this happens,
the program jumps back to shortpacket which completes
and validates the timing of the new Break period.
Most of the time, though, we have a valid byte which
is moved into the DMX array using wrbyte. Once the
entire DMX packet has been received, the program
Description
0.1 F
XLR-3M
XLR-3F
0.1 M-STRT
3 mm Green
2N3904
TIP125
120
4.7K
470
1K
330
10K x 9
DIP x 9
5 mm Term Block
ST485BN
0.1 M-STRT

Supplier/Part No.
Mouser 80-C315C104M5U
Mouser 523-AC3MAH-AU-B
Mouser 523-AC3FAH-AU-B
Mouser 517-6111TG
Mouser 517-950-00
Mouser 859-LTL-4231
Mouser 863-2N3904G
Mouser 512-TIP125
Mouser 293-120-RC
Mouser 291-4.7K-RC
Mouser 291-470-RC
Mouser 291-1K-RC
Mouser 291-330-RC
Mouser 71-CSC10A01-10K
Mouser 611-BD09
Mouser 571-2828362
Mouser 511-ST485BN
Mouser 517-6111TG

BILL OF MATERIALS

Item
C1
J1
J2
JP1-JP2
Jumpers
LED1
Q1-Q3
Q4-Q6
R1
R2-R4
R5-R7
R8-R10
R11
RN1
SW1
TB1-TB3
U1
X1-X4

jumps back to waitbreak and starts all over.


So, there you have it, a DMX receiver engine in under
40 [working] lines of code. Of course, there is an interface
in Spin which lets us set the RX and LED pins, and takes
care of setting all the timing parameters to match the
system clock. After the init() method, well use the read()
method to grab a byte from the DMX stream. Remember,
byte 0 will be the DMX Start byte; bytes 1 through 512
will be the DMX frames.
Before moving on, let me point out that there is a
DMX object in the Propeller Object Exchange by Tim
Swieter (www.brilldea.com) that is very advanced,
providing all kinds of interesting statistics about the DMX
stream (e.g., the length of the break, length of MAB, actual
number of frames transmitted, etc.). If youre feeling brave,
please have a look youre sure to learn some new
Propeller tricks. Tims code will, of course, work on the
P/P DMX I/O board, and is very useful for creating a
DMX diagnostics device.

LED MODULATION WITH BAM


So, what is BAM? Its a Bit Angle Modulation that is a
modulation strategy that uses a bits position within a value
as the basis for the timing of that position. For example, bit
0 is output and then we wait one period. Next, we output
bit 1 and hold for two periods. After that, we output bit 2
and wait four periods. You should start to see the pattern:
The timing for a given bit is 2bit# periods. Following this
pattern, the final bit in a byte, bit 7, has a timing value of
128 periods. In the end, the complete timing for one byte
will be 255 periods, but we only had to deal with eight
cycles (one per bit). The fact that we only have to deal
with eight cycles (versus 256 with traditional PWM) is the
source of most of the hoopla youll find surrounding BAM.
Figure 4 shows the weighted timing in a four-bit BAM
value. As you can see, bit 3 gets eight timing periods, bit 2
gets four periods, etc. In Figure 5, you can see what the
output looks like when the BAM value is set to 10. I think
its the asymmetrical output (for most values) that helps
BAM get around the LED PWM patent. (Yes, there is a
patent for this.)
Most of the code youll find on the Internet shows
how to set up a variably-timed interrupt to handle the bit
timing. The Propeller doesnt have or use interrupts so
were going to take another route one that turns out to
be deceptively easy. Heres my implementation of BAM
for the Propeller.
bamrgb

dira, rmask
dira, gmask
dira, bmask

min

TIX_001, #121
bitmask, #%0000_0001
bitperiod, TIX_001
bittimer, bitperiod
bittimer, cnt
tmp1, #0

PCB

GadgetGangster.com
ExpressPCB.com

mov
mov
mov
add

Parts Kit

GadgetGangster.com

mov

16

November 2009

bamstart

or
or
or

SPIN ZONE
getlevels

rdbyte
rdbyte
rdbyte

rlevel, rpntr
glevel, gpntr
blevel, bpntr

bamloop

test
muxc
test
muxc
test
muxc
mov

rlevel, bitmask wc
tmp1, rmask
glevel, bitmask wc
tmp1, gmask
blevel, bitmask wc
tmp1, bmask
outa, tmp1

shl
and
shl
mov
mov

bitmask, #1
bitmask, #$FF
wz
bitperiod, #1
bitmask, #%0000_0001
bitperiod, TIX_001

if_nz
if_z
if_z

waitcnt bittimer, bitperiod


if_nz

jmp
jmp

#bamloop
#getlevels

On entry, we make the RGB pins outputs and do a


quick check to ensure that the timing period is long
enough to get the work done. Youll recall that using
waitcnt is easy and convenient, but if we are short of the
value and get a rollover, we end up waiting nearly a
minute not what we want to have happen here. The
min instruction takes care of fixing a value that the user
may have mismanaged in the interface section. I found
the value of 121 estimating (counting cycles) and then
empirical testing until it broke.
At bamstart, we create a mask for bit 0, set the timing
for bit 0 (one period), start a timer, and initialize a value
that will hold the new outputs for each cycle.
The real work begins at getlevels where we read the
RGB values from the hub. At bamloop, we test each color
value against bitmask, writing the current bit value to the
C flag. Using muxc and the channel mask for the color,
the bit value is written to tmp1 which is finally moved
to the outputs. By using tmp1, all outputs are
simultaneously updated.
The bit-under-test mask is then shifted left and anded
with $FF if the result of the and operation is zero, then
were done with the loop; all eight bits have been
processed which means we can reset the test mask and
the bit period. Until this happens, we shift the value of
bitperiod left by one which doubles its value; this is
exactly what we need for the next higher bit.
After the timer expires, it is reset with bittimer and we
jump back to bamloop for the next bit or to getlevels if its
time to start a new cycle. Done! Of course, you can add
channels if you like. Just be sure to update the minimum
timing for a bit period so that you can get all the work
done within the cycle.

FIGURE 4. BAM
Bit Weight Timing.

switch which corresponds to the first of our three channels


Figure 6 shows a nine-position DIP switch wired to
P0..P8 of the Propeller. No need to worry about the reverse
bit order (which was done for PCB layout convenience);
Spin has a neat trick which will take care of this for us.
For my first project, I wanted to drive a 1W RGB LED
that a friend gave me, but I also wanted to run small DC
lamps for other projects. In order to accommodate both,
the circuit uses a moderate-current, high-side driver
(Figure 7) on each output. Some of you will quickly point
out that the final output transistor is missing a pull-up to
Vin. Not so. This transistor is actually a TIP125 Darlington
and, as you can see in Figure 8, the base has an internal
8.12K path to the emitter were covered, and with the
TIP125 we can control plenty of current.
Okay, heres the code for the three-channel
DMX fixture.
pub main | dmxstart, chan, level
dmx.init(24, 16)
rgb.init(9, 10, 11)
repeat
chan := ina[0..8]
if (chan > 0) & (dmx.read(0) == 0)
level := dmx.read(chan++)
rgb.setred(rgb.ezlog(level))
level := dmx.read(chan++)
rgb.setgreen(rgb.ezlog(level))
level := dmx.read(chan)
rgb.setblue(rgb.ezlog(level))
else
rgb.setall(0)

Im not kidding, thats all we need to knit the DMX


receiver and BAM output objects together to create a
DMX-compatible lighting fixture.
We start by initializing the DMX and BAM objects,
and then drop into a repeat loop. The first line in the loop
is really cool. What this does is read bits 0 through 8 of
the inputs, masking off the others, and flipping their order
(bit 0 to bit 8, bit 8 to bit 0). In one fell swoop, weve read
the switch bits and put them into the correct order, giving
us the current channel setting. Come on, youve got to
think thats cool! Just so were clear, we know that the bit

A SIMPLE DMX RGB


LIGHTING FIXTURE
With the hard work (which really wasnt very hard)
out of the way, we can create a simple, three-channel
DMX lighting fixture. For this, well need a device address

FIGURE 5.
BAM Output OA.
November 2009

17

FIGURE 6. DMX Channel Switch.

FIGURE 7. Channel Output.

FIGURE 8.
TIP125 Schematic.

order is reversed because the LSB (0) is in the MSB


position within the brackets. Another bonus that the
switch could have used any set of I/O pins; so long as
the group was contiguous. The only pins read are those
defined within the brackets, and the result bits are flipped
and shifted (to zero-align) if required. We can use this
technique to read any parallel inputs and get a value that
is immediately usable.
If the channel switch is valid (not zero) and the DMX

18

November 2009

Start byte is valid (zero),


then we read the channel
values from the DMX
array and move them to
the outputs using BAM to
handle the brightness
modulation. You can see
that Spin borrows heavily
from C in that we can use
the post-increment operator (++) on chan; this lets us read
the current channel and then update that variable before
moving on.
Visually, LEDs can seem a little harsh when using
straight linear values as wed get from the DMX stream.

SPIN ZONE

FIGURE 9. DMX I/O Board.

A friend showed me a cute trick that creates a logarithmic


curve: you simply square the value and then divide it by
256. Doing this makes the LED brightness output much
more appealing. The math for this trick is wrapped up in a
method called .ezlog() that is part of the BAM object. For
you advanced users, there is also a method to read a
value from a table which allows you to map the DMX
input value to an output value as desired.

IF THREE IS GOOD,
FOUR MUST BE BETTER!
My original design (see the
prototype in Figure 9) was oriented
toward RGB lighting control and
as I was building it, a post in the
Propeller forum vis--vis stepper
motors got me thinking: If I added
one more channel, I could control a
unipolar stepper motor with the
TIP125 outputs. Then, I thought:
Why not add servo headers on the
outputs, as well? So, for those of you
who purchase the PCB or kit through
Gadget Gangster (recommended;
see BOM), youll get the four-channel
version which gives you more
options for outputs. Of course, if you
want to roll you own Ive included
the four-channel files in the PCB
download at www.nutsvolts.com so
you can use them as you please.
Okay, then, how about adding a
little DMX to your holiday lighting
arsenal? It could be a lot of fun and
really make the neighbors jealous!
Until next time and next year!
heres to spinning and winning with
the Propeller. NV

EARN MORE MONEY!


Be an FCC Licensed
Wireless Technician!
Make $100,000 a year
with NO college degree
Get your FCC Commercial Radiotelephone
License with our proven Home-Study Course!
t/POFFEUPRVJUZPVSKPCPSHPUPTDIPPM
t5IJTDPVSTFJTFBTZ GBTUBOEMPXDPTU
t/PQSFWJPVTFYQFSJFODFOFFEFE
t-FBSOBUIPNFJOZPVSTQBSFUJNF

.PWFUPUIFGSPOUPGUIFFNQMPZNFOUMJOFJO3BEJo -TV,
$PNNVOJDBUJPOT "WJPOJDT 3BEBS .BSJUJNFBOENPSFy
FWFOTUBSUZPVSPXOCVTJOFTT Send to: COMMAND PRODUCTIONS

Call now for FREE info:

1-800-932-4268
ext. 209

[email protected]

Or, email us:


[email protected]

Warren Weagants FCC License Training


P0#09 %&15t4"64"-*50 $"94966

Please rush FREE info kit today!


NAME:
ADDRESS:
CITY/STATE/ZIP:

:PVNBZGBYZPVSSFRVFTUUP15-332-1901

November 2009

19

SPACE

NEAR

APPROACHING THE FINAL FRONTIER

BY L. PAUL VERHAGE

A NEAR SPACE ENVIRONMENT


CHAMBER UPDATE
Sometimes its difficult to leave things well enough alone. Occasionally, this
is to my detriment as I can makes things worse off than they were originally.
Other times though, I end up with something better than when I started.
This is the case with the near space environmental test chamber from my
September column. Along with the improvements discussed in this months
column, youll also find the results of a near space environmental test and
a new vacuum pump I discovered.

BEEFING UP THE LID


During the original construction
of the environmental test chamber, I
experimented with three variations of
vacuum chambers. They all worked
except that their lids appeared to be
weak. Therefore, instead of using
these three chambers as they were,
I settled on beefing up the lid of my
largest canister. Not wanting to waste
my other canisters, I later asked Dale
at the Washburn Institute of
Technology if he or his machining
I was concerned that this flour
canisters orginal thin lid would implode
under vacuum. Dale, the machining
instructor, made sure Id have one
that wouldnt implode even if a truck
ran over it. Best of all, its clear and
well polished. So, I can safely watch
my tests under vacuum conditions.

class could create a new lid for my


smallest stainless steel flour canister.
Boy, did he the new lid is one inch
thick plastic. This is one serious lid.
Since its machined to the same
diameter as the original wimpy lid, it
uses the canisters original silicone
gasket. The new lid is heavy enough
that it must be held against the test
chamber for a few seconds while the
vacuum pump gets started.

DUAL USE
The first canister I tested when I
built the environmental test chamber
was a clear plastic flour canister with
1/8 inch thick walls. The cylindrical
body appears to be strong enough to
safely withstand a vacuum, but its
thinner flat lid developed fine cracks

under vacuum. Dale recommended I


use the same lid he machined for the
small stainless steel chamber for this
chamber. The new lid sits flat on the
table and the plastic flour canister sits
on top of it like a bell jar. Since this
vacuum chamber is made entirely of
plastic, its not safe to chill with dry
ice. Because of that, this vacuum
chamber only performs vacuum tests
at room temperature. However, since
its entirely clear, its a great chamber
for observing vacuum effects. After a
dozen tests, I have yet to see cracks
forming in the plastic, so I suspect its
safe. Just to be sure though, I wont
let anyone stand next to it without
wearing safety glasses.

NO MORE
SWITCHING HOSES
Hose barbs are designed to
prevent hoses from pulling loose. So,
I can push a hose on a barb with
very little difficulty, but man, its so
tough to pull the hose off that I have
to resort to cutting the hose off in
The plastic bell jar with the thick lid
as a base. The cylindrical shape of this
canister makes it pretty resistant to
atmospheric pressure.

20

November 2009

N E A R S PA C E
tiny little pieces. Rather
Using brass plumbing parts from Ace, I was able to
than waste good fuel hose
design this manifold with the parts listed in the diagram.
every time I switch vacuum The manifold connects three hoses from three vacuum
chambers to a single vacuum pump. The CarQuest vacuum
chambers, I decided to
gauge monitors the air pressure in any of the tanks.
make a manifold. All the
brass threads were
wrapped in Teflon tape
before screwing them
together with a wrench
(I dont plan to take this
manifold apart). Since the
manifold connects several
vacuum chambers to a
single vacuum pump, I just
have to open and close the
valves to evacuate the
proper chamber.
To use the manifold, I
turn two of the three
needle valves clockwise to close off
stay warm if the satellite is to properly
Ive often used the same kind of
function for 10 years or more. To
their chambers and turn the third
insulation for my near spacecraft.
needle valve counter-clockwise to
maintain the proper temperature,
Rather than using aerospace rated
open up its chamber. After completing
satellites use electric heaters and
materials though, I use plastic
the experiment, I shut off the vacuum
wedding veil material for the scrim
insulation in the form of alternating
pump and open the fourth needle
and a space blanket for the aluminized
layers of aluminized Mylar and
valve on the very right to bleed air
Mylar. Typically, I wrap three layers
scrim. This alternating sandwich of
back into the system.
around an airframe and then tape it
aluminized Mylar and scrim is called
down with a little packaging tape. I
multilayer insulation (MLI) and it acts
have discovered that the layers of
like a lightweight thermos bottle. The
space blanket and wedding veil
design of MLI helps keep the satellite
material are tough enough that I can
warm in three ways.
sew them together in a blanket that I
First, the scrim sheets minimize
Organizing the three environmental
can wrap about the airframe.
contact between the Mylar sheets so
three test chambers into a compact
MLI works in outer space with its
very little heat flows from the warm
and easy to carry apparatus requires
extreme vacuum to protect satellites
satellite interior to the cold vacuum
the Masonite, plywood, and pine rig
and it works on earth to insulate
of space. Second, the vacuum of
you see in the photo. The vacuum
cryogenic lines and containers.
space removes air from between the
stand has a base consisting of two
However, I want to know if it really
layers to prevent heat flow via the
sheets of Masonite pegboard separatworks well in near space where the
movement of air. Finally, the thin
ed with 3/4 inch thick pine. Two
vacuum isnt quite as high and the
coating of aluminum on the Mylar
diagonal pine boards keep the pegsheets reflects infrared radiation
Two nearly identical cubes ready
board backboard perpendicular to
back into the satellite (and it keeps
for their test. The one on the left is
the base and create convenient grips
the intense heat of sunlight out of
covered in three layers of MLI, while
for hauling it around. The manifold is
the satellite).
the one on the right is just covered
in green tape.
nylon zip-tied to the backboard
where its easy to operate it
and monitor the pressure.

PUTTING IT ALL
TOGETHER

MY FIRST
ENGINEERING TEST
Satellite electronics need to
The base and backboard of
this vacuum stand creates a
unified environmental test
chamber from lots of loose
parts Have vacuum will travel.
November 2009

21

On the first run, both Hobo dataloggers recorded nearly


the same temperature changes. So, it appears that the MLI
is a waste of time and materials for near space experiments.

temperatures are not quite as low. To


find out, I did a little experiment with
my new environmental test chamber.
For this experiment, I built two
identical cubes from 1/2 inch thick
Styrofoam. One cube has a wrapping
of green tape and the second a
wrapping of three layers of MLI.
The cubes were hollow, so a Hobo
datalogger could sit inside and record
the interior temperature. After
loading the Hobos, the cubes
were tightly taped shut. The big
environmental chamber was then
loaded up with dry ice and allowed
to chill in preparation for the test.
Both cubes were loaded inside the
chamber, the door was closed, and
the chamber pumped down. The test
ran for about 30 minutes before the
cubes were removed.
Because of the possibility that
the dataloggers wouldnt record the
same temperature under identical
conditions, the cubes were allowed
to warm up and the dataloggers were
switched between cubes. The

But then again, maybe its not a wasted effort. This chart
shows that the MLI covered cube is nine degrees warmer
after 35 minutes in the environmental test chamber.

process was run a second time for


about 30 minutes. Afterwards, the
Hobos were removed and their data
downloaded. You can see from the
charts that it was a good thing my
classroom ran the experiment a
second time.
Looking at these results, I suspect
the Hobos are not calibrated quite the
same. Perhaps it would be appropriate
to average the two tests and claim
the MLI covered cube remains four
to five degrees warmer than a cube
without MLI. Id like to think this is
the case because of the amount of
time I spent covering my airframes in
MLI. Before I try this test again, Ill set
the Hobos out and verify that they
record the same temperatures.
The only problem I ran into during
this experiment is that the lid on the
large environmental chamber is loose
enough that air pressure outside can
shift it just enough to the side to break
its seal. Eventually, Ill have to have a
new lid machined for the large chamber
that fits a bit more snuggly.

THE
HANDI-VAC
I was out grocery
shopping when I saw
Running a test on
the Handi-Vac vacuum
chamber. Inside the
sealed zip lock bag is the
Rubbermaid container
with a pressure sensor.
22

November 2009

Reynolds (maker of aluminum foil)


developed what might be a
convenient vacuum pump. HandiVac is a food storage system. Food
is loaded into a zip-lock storage
bag and then a battery-operated
handheld pump evacuates the air
inside. So, I thought this would make
a great vacuum pump for science
experiments. I purchased one and
an extra set of bags in the name
of science.
The Handi-Vac pump has a
rubber seal in its nose (its called the
suction tip) thats placed in contact
with a specific region marked on the
zip-lock bags. This area has a series
of tiny openings that allow air to be
pulled out, but seal when air tries to
flow back in.
Now, Ive observed vacuum
bagging before. After removing the
air, the contents inside the bag are
crushed by atmospheric pressure.
This is good when you need to
apply pressure all around an object,
like when curing a composite set-up.
But the crush is a disaster for the
experiments I want to perform. To
prevent the crush, I purchased some
large Rubbermaid cube shaped
plastic storage containers. The
vacuum bag cant crush a storage
container inside of them, but
experiments inside the container
will still experience a vacuum if holes
are drilled through the container
and its lid. I selected roughly cube
shaped storage containers to

N E A R S PA C E

THE TRANSFER OF
THERMAL ENERGY
Thermodynamics is a big and
complex science subject. A small
part of this big science that the
near space community is interested
in is how to keep our experiments
warm during a mission. We want to
keep our near spacecraft warm
using lightweight, passive methods
as opposed to using batteries and
heaters. As this article alludes to,
there are three ways to transfer
thermal energy in a system and
MLI helps to minimize all three.
Conduction is the net flow of
heat by the physical contact of two
substances that are at different
temperatures. When you pour cold
water in a warm cup, heat flows
out of the warm cup and into the
cold water. The result is that the
cup cools down as the water
warms up. Note that energy is
really flowing in both directions
between them. Its just that a lot
more heat flows into the cold water
than the warm cup. It actually gets
a little more complicated because
different substances require
different amounts of thermal energy
to change their temperature. So,
just because a metal cup and the
water inside are at the same
temperature, it doesnt mean
theres an equal amount of energy
flowing between them to maintain
their equal temperatures.
Convection occurs when
matter carries energy from a hot
volume into a cold volume. A good
example occurs when you open
the door of a hot oven. The hot
air inside the oven carries some of
the heat from inside the oven into
the kitchen.
Radiation is like convection,
but instead of the moving thermal
energy by the movement of matter,
thermal energy moves by the
movement of photons (light). If
youve ever placed your hand near
an incandescent bulb (like a heat
lamp), your hand has experienced
heating due to radiation.
Theres a lot more to heat flow
and events like a phase change
add additional complications.
However, you dont need a
Bachelor of Science in engineering
to limit the amount of cooling your
near spacecraft experiences on a
mission. You just need to insulate
it properly.

maximize the volume I would have


for experiments.
To test the effectiveness of the
Handi-Vac, I loaded a pressure sensor
inside the container, sealed the lid
over the container, placed it inside
the storage bag, sealed the zip lock
bag, and pumped it down. Heres
the result.
The Handi-Vac pumped the zip
lock bag down to just under half an
atmosphere. Thats not bad for a $20

vacuum pump. However, a pressure


of 500 mb is only equivalent to an
altitude of 18,000 feet, so this
vacuum chamber can only reach the
mid to low 20,000 feet.
Therefore, I can see someone
testing a rocket flight computer
with the Handi-Vac. The pump
removes the air, simulating the
ascent of the rocket. After reaching
peak altitude, the bag is opened
slightly to let the air back inside,

November 2009

23

This is one really sweet unit.


Amplified output for a pressure swing
from 0 to 1,000 mb an entire near
space mission.

The NearSys Weather Station. Its


PCB measures one by two inches
and the kit doesnt cost much more
than the pressure did originally.

simulating the descent. The bag is


clear, so if the container is also
clear, you can observe the
experiment during the test. Events
like the firing of an ejection charge
can be observed if the charge is

replaced with an LED indicator.

THE PRESSURE SENSOR


I used a Silicon Microstructures
(www.si-micro.com) SM5812 pressure sensor for my vacuum chamber
tests and near space experiments.
The sensor operates over a pressure
range of zero to just over 1,000
millibars (mb), or
from vacuum to
the average pressure at mean sea
level. The output
voltage swings
from 0.5 volts to
4.5 volts (a four
volt swing) over
The pressure
sensor experienced
a minimum of 450
mb of pressure after
pumping it down.
Thats over half
way to a vacuum.

this pressure range, so the SM5812


needs no amplification. This is one
of the few pressure sensors I have
ever found capable of producing an
output over the entire range of a
near space flight. Almost everything
else operates over a smaller pressure
range or needs amplification.
Alas, the SM5812 is at the end
of its life because SMS no longer
manufactures them. I managed to
pick up the remaining units and have
developed a near space weather station kit with this sensor. The weather
station provides measurements of
relative humidity, temperature, and
pressure as voltage levels. Combine
the weather station with a datalogger
with three ADCs and youve got
yourself a small, stowable, weather
station. If youre interested in the
weather station, the complete kit is
available from NearSys for $40 plus
$4 shipping and handling. Check
NearSys.com/catalog for details and
assembly directions.
Onwards and Upwards,
Your near space guide NV
You can watch a video on the
updated environmental test
chamber on my YouTube channel
at www.youtube.com/nearsys.

GIZMOS THAT BRING YOUR DREAMS TO LIFE!


1000s of LEDs in stock
1.8mm, 3mm, 5mm,
and 10mm from $.40
1/2 watt $.95
1 watt Stars $3.60
RGB $1.50
UV, IR, Surface Mount

Oregon Scientific
Smart Globes make
learning fun
Starting at $20

Robot wheel with 12v


gear motor $9
Hobby motors
starting at $2

Weather Stations
starting at $20
Sensors and parts $2

Lego Flashlights
Keychain $7.95
Head Lamp $11.95
7inch Lamp $19.95
Dynamo Lamp $21.95
Let that light shine in the
next generation!

5797 NW Cornelius Pass Road


Hillsboro Oregon 97124
24

November 2009

TA8080K DC motor
Controller IC
Only $2.00
TA8261AH 40 watt
4 channel audio amp
chip $2.00

830 point solderless


breadboard $8.50
Jumper wires $6.25
4in medical grade casters
260lb capacity $2.50
Foam robot
wheels starting at $.80
4in plastic wheels $.50

NIMH Battery Packs


8.4V 2000mAH $2.50
Coin cell 3V batteries
Starting at $1

Perf Boards
From .50 to $2

RGB LED Strips


12v LED Bars

LCD Displays
Graphic and Character

To see the best deals join our online


mailing list or stop by our retail store!

USB to IDE/SATA
adaptor with power
supply for easy backup
of any hard drive.
Only $20

Lighted switch $3.25


Micro-reed switches only $3.00
Limit switches starting at $2.00
Reset switches $.80
Aircraft toggle covers $1.80
Arcade game buttons in many
colors $2.25

www.SurplusGizmos.com
503-439-1249

November 2009

25

Mini-Kits...
Holiday Themes!
LED Animated Santa
Passive Aircraft Monitor

High Power LED Strobe

Personal Guitar Amp

Animated Santa and reindeer


display has 126 dazzling colored
LEDs! Makes a great holiday
sign! Animated motion makes it come alive.
Runs on standard 9V battery or external power
supply.
MK116
LED Santa Kit
$16.95

LED Christmas Tree


Most popular new kit ever!

Super bright LEDs!

Practice in peace!

Our patented circuit monitors the


entire aircraft band without any
tuning! Passive design has no
radiation, no interference, for use
onboard aircraft to listen to air to
ground! Great for air shows to
listen to the active planes!

The fragile glass Xenon tube is


gone, replaced with high intensity
LEDs! Variable flash rate and
built-in audio trigger input to sync
to your audio. Optional display
boards available. Runs on 12VDC
or use our AC125 PS.

The new PGA1 allows you to


practice both your regular and
base guitars in peace! Also works
as a great DI to feed your home
stereo amplifier! CD/MP3 input
allows you to play to your favorite
music. Includes case shown!

ABM1 Airband Rcvr Kit

LEDS1C

PGA1

$89.95

LED Strobe Kit $44.95

Plasma Generator

ECG Heart Monitor

Guitar Amp Kit

$64.95

HV Ion Generator

Electronic Christmas tree features 134 bright


colored LEDs in the shape of a tree with 18
random flashing blinking candles! Runs on
a 9V battery or PS.
MK117
LED Christmas Tree Kit
$18.95

LED Animated Bell


This holiday bell is animated to simulate swinging back and forth! 84
bright colored LEDs will dazzle you
with holiday cheer! Includes an
on/off switch. Runs on 9V.
MK122
LED Bell Display Kit

$16.95

3D LED Christmas Tree


Not your average LED display! 4 branch sections give this tree a 3D look! 16 red LEDs
light it up with yellow LEDs for you to customize your tree! 9V battery base.
MK130
3D LED Tree Kit
$7.95

Check your own heart!

Generate 2 sparks!

Make a blast of fresh air!

Provides a visible and audible display of your heart rhythm!


Variable gain, bright beat LED,
and monitor output for display on
your scope. Just like the lab! Reusable sensors are included.
Runs on a safe 9VDC battery.

Produces a stunning and shocking


25kV at 20kHz from a solid state
circuit! Build your own plasma
bulbs, light fluorescent tubes
without wires and more! A great
learning kit. Runs on 16VAC,
order our PS21 power supply.

Generates a steady state DC voltage at constant non-pulsed current at 7.5kV DC negative, 400uA.
Thats a LOT of ions! Learn how
modern spacecraft use ions to
accelerate through space. Runs
on 12VDC or our AC125 PS.

Build this subminiature Christmas tree


and learn SMT at the same time. Small
enough to wear as a badge or pendant!
Extra SMT parts are included so you
cant go wrong! Runs on Li-Ion cell.

ECG1C

PG13

IG7

MK142

ECG/EKG Kit

$44.95

20W SubMini Audio Amp

Plasma Gen Kit

$64.95

Digital Voice Storage

Ion Gen Kit

$64.95

Speed Radar Gun

SMT LED Christmas Tree

SMT LED Tree Kit

$10.95

SMT LED Smiley Face


This is a great attention grabber and
also teaches you the basics of SMT construction! Display your smiley as a pin
or badge! Extra parts included!
MK141
SMT LED Smily Kit

$9.95

LED Traffic Signal


20 watts and no heat!

Multiple message storage!

Now YOU can be the cop!

Delivers a super clean 20W output from one SMT package! Ultra
efficient class D design produces
no heat. PCB can be snapped
into a small circle for special
applications. Runs on 18VDC for
rated output, use our SPS18 PS.

The Bullshooter-II provides up to


8 minutes of digital voice storage
that can be broken down into 8
separate stored messages! Great
for announcements, etc. Built-in
mic plus external input. Runs on
12VDC or our AC125 PS.

Our famous Speedy radar gun


teaches you doppler effect the
fun way! Digital readout displays
in MPH, KPH, or FPS. 1/8th mile
range is typical. You supply two
coffee cans! Runs on 12VDC or
our AC125 power supply.

UAM2 20W SMT Amp Kit $34.95

BS2C

SG7

Doppler Direction Finder

Bullshooter-II Kit $69.95

40W Stereo Micro-Amp

Speedy Radar Kit $69.95

Signal Magnet Antenna

Impress your friends with this neat 4-way traffic signal! Operates just like a standard signal,
and features adjustable delay. Red, yellow,
and green LEDs are used just like the real
thing! Runs on 9V battery.
MK131
LED Traffic Signal Kit
$7.95

LED Switcher Blinky


Run a 3V LED from 1.5V! Learn
power supply switching and end up
with a super bright blue Telux LED
blinking at 140kHz! Runs on a single
AA battery not included.
LSW1
LED Switcher Blinky Kit

$14.95

Wheel Of Fortune
Find that transmitter quick!

40 watts of stereo in 2!

Pulls in distant stations!

Track down jammers and hidden


transmitters with ease! 22.5
degree bearing indicator with
adjustable damping, phase inversion, scan and more. Includes 5
piece antenna kit. Runs on
12VDC vehicle or battery power.

The big brother to the UAM2, it


delivers 40W of crisp clear stereo
power all in a 2 board! One
single SMT device operating 87%
efficient creates virtually no heat!
Selectable gain, pop filter and a
lot more! Runs on 10-18VDC.

Super Hi-Q ferrite rod antenna


with Faraday shield eliminates
noise from power lines, dimmers,
static and more! Great results
from 500kHz to 15MHz. Super
for AM broadcast band! Includes
power supply.

DDF1

UAM4 40W SMT Amp Kit $69.95

SM100

Dir. Finder Kit

$169.95

Did You Know...


The Solution!

Sig Magnet Kit $89.95

Its impossible to give you full specs on these products


in a 1 space!
A lot of our kits are also available factory assembled
and tested, if you dont want to build it!
We have over 350 products currently available, and
all those dont fit here!

Visit www.ramseykits.com
Free Giveaways and ALL the
information you ever needed!

Just like the casino game! Just push


the button and the LEDs rotate and
slowly come to a stop, displaying the
winner! Push it again to start over.
Runs on 9V battery.
MK152

Wheel Of Fortune Kit

$7.95

Cable Polarity Checker


You get a home theatre system for the holidays, you run cables throughout the
house, how do you identify polarity? Its
easy with the MK132!
MK132
Cable Polarity Checker Kit
$8.95

Water Sensor Alarm


The sump pump quits, the snow melts, the
basement floods! Dont let it happen with
the simple water sensor alarm. 9V battery
operation with remote sensor.
MK108
Water Sensor Alarm Kit
$6.95

FM Broadcasters

AM/FM IC Radio Training Lab


Learn all about AM and FM
radio theory and circuits!!
Build an IC based radio with
great reception!
Step-by-step assembly & test
procedures!

Fun Stuff For The Holidays!


Digital Controlled FM
Stereo Transmitters

These Superhet AM and AM/FM radio kits give you a great introduction to how
AM and FM radios actually work! Plus, they are designed using integrated circuits
rather than standard discrete components.

Rock stable PLL synthesized


Front panel digital control and
display of all parameters!
Professional metal case
Super audio quality!
25mW and 1W export models!
For nearly a decade weve been the leader in hobbyist FM radio transmitters.
When it became time for a new model, we started from the ground up! We told
our engineers we wanted a new technology transmitter that would provide
FM100 series quality without the advanced mixer features. They took it as a challenge and designed not one, but TWO transmitters!
The FM30 is designed using through-hole technology and components and is available only as a do-ityourself kit, with a 25mW output very similar to our
FM25 series. Then the engineers redesigned their
brand-new design using surface mount technology
(SMT) for a very special factory assembled and tested FM35WT version, with 1W output for our exportonly market! Both are designed around an RF tight
vinyl clad metal enclosure for noise free and interference free operation. All settings are done
through the front panel digital control and LCD display! All settings are stored in non-volatile memory
for future use. Both the FM30 and FM35WT operate on 13.8 to 16VDC and include a 15VDC 110/220VAC plug in power supply.
The stylish black anodized aluminum case measures 5.55"W x 6.45"D x 1.5"H.
and is a great match to your other equipment.

The unique design includes an integrated circuit (IC), 9 transistors, 4 diodes, and
other related resistors, capacitors, coils, and misc. parts. Learn all about IC design,
theory, and troubleshooting! And when youre done you have an AM or an
AM/FM radio that has really great reception...that you made yourself! ICs, transistors, resistors, capacitors, coils and other parts are easily identified, and described
in theory. The comprehensive manual includes step-by-step assembly and test
procedures, and complete theory. The final alignment section is also provided to
make sure you have a great sounding receiver! 9V battery required.
AMFM108K
AM/FM Integrated Circuit Radio Learning Kit
$34.95

Surface Mount Soldering Course & Kit


Learn SMT soldering the easy way!
Learn all about those tiny parts!
End up with a neat Decision Maker!
Youre going to have to go there some day, so it might as
well be now! Virtually all electronic designs have gone to
Surface Mount Technology. SMT components are small, at times the size of a pin
head, and require very special skills to assemble and solder. This kit takes you
through all that, including soldering, desoldering, removing, and component
placement. hen youre done, you have a neat electronic Decision Maker!
SM200K

SMT Practical Soldering Course & Kit

Electronic Learning Labs

(Note: After assembly of this do-it-yourself hobby kit, the user is responsible for complying with
all FCC rules & regulations within the US, or any regulations of their respective governing body.
FM35BWT is for export use and can only be shipped to locations outside the continental US or
valid APO/FPO addresses or valid customs brokers for end delivery outside the continental US.)

Learn and build!


130, 200, 300, and 500 in one!
Super comprehensive training
manuals!

FM30B
Digital FM Stereo Transmitter Kit, 0-25mW, Black
FM35BWT Digital FM Stereo Transmitter, Assembled, 1W, Black

Whether you want to learn the basics


of electricity, the theory of electronics,
or advanced digital technology, our lab
kits are for you! Starting with our
PL130, we give you 130 different electronic projects, together with a comprehensive 162 page learning manual. A great
start for the kids...young and old!

$199.95
$299.95

Professional Synthesized
Stereo FM Transmitter
Built-in audio mixer!
2 line inputs, auto mic ducking!
Dual LED bar graph meters
Drift-free synthesized operation
Precision brick wall audio filter!
25mW and 1W export models!
Professional metal case!

130 in 1

200 in 1

300 in 1
500 in 1

For the latest lab, check out the PL200! Its unique design has an integral front panel that includes controls, meter, display and more for full control of
your projects!

The true professional workhorse of our FM Stereo transmitter line, the FM100B
has become the transmitter of choice for both amateurs and professionals around
the world. From the serious hobbyist to churches, drive-in theaters, colleges and
schools, it continues to be the leader. Not just a transmitter, the FM100B is a fully
functional radio station and provides everything but the audio input and antenna
system.
This professional synthesized transmitter is adjustable directly from the front panel
with a large LED digital readout of the operating frequency. Just enter the setup
mode and set your frequency. Once selected and locked you are assured of a
rock stable carrier with zero drift. The power output is continuously adjustable
throughout the power range of the model selected. Audio quality is equally
impressive. A precision active low-pass brick wall audio filter and peak level limiters give your signal maximum punch while preventing overmodulation.
Two sets of stereo line level inputs are provided with front panel level control for
both. Dual front panel LED bargraph meters provide left and right channel audio
level metering. In addition to the line level inputs, there is a separate microphone
input with a built-in mic mixer to control the level.
Not enough? How about unattended microphone ducking! When enabled, the
presence of mic audio automatically reduces and overrides the line level input!
Just like the professional units at a fraction of the cost. The FM100B is truly a
complete radio station!
(Note: After assembly of this do-it-yourself hobby kit, the user is responsible for complying with
all FCC rules & regulations within the US, or any regulations of their respective governing body.
FM100BWT is for export use and can only be shipped to locations outside the continental US or
valid APO/FPO addresses or valid customs brokers for end delivery outside the continental US.)

FM100B
Super-Pro FM Stereo Radio Station Kit, 5uW-25mW
FM100BEX High Power Version Kit, 5uW-1Watt Output
FM100BWT Export Only Transmitter, 5uW-1Watt, Assembled

$22.95

$269.95
$349.95
$429.95

Not enough? Next is our PL300, which gives you 300 separate electronic projects
along with a 165 page learning and theory manual. The PL300 walks you through
the learning phase of digital electronics.
If youre looking for the ultimate lab kit check out our PL500. Includes a whopping 500 separate projects, a 152 page starter course manual, a 78 page
advanced course manual, a hinged easy to carry case, and a 140 page programming course manual! The PL500 covers everything from the basics to digital programming! Learn about electronics and digital technology the fun way and build
some neat projects! Whichever one you choose, you will have hours of enjoyment!
PL130
130 In One Learning Lab Kit
$49.95
PL200
200 In Super Fun Learning Lab Kit
$69.95
PL300
300 In One Complete Learning Lab Kit
$89.95
PL500
500 In One Advanced Learning Lab Kit
$219.95

MORE than just friendly on-line ordering!


Clearance Specials, Ramsey Museum, User Forums, Dealer Information, FAQs, FCC
Info, Kit Building Guides, Downloads, Live Weather, Live Webcams, and much more!

www.ramseykits.com
800-446-2295

Get The Catalog!


Get the latest 2009 Ramsey Hobby
Catalog! 96 value packed pages of
the neatest goodies around with lots of
new stuff! Order yours today on line
or give us a call... Or download the PDF at
www.ramseykits.com/catalog!

590 Fishers Station Drive


Victor, NY 14564
(800) 446-2295
(585) 924-4560

Where
Electronics
Always Means
Holiday Fun!

Build It!
Learn It!
Achieve It!
Enjoy It!

Prices, availability, and specifications are subject to change. According to Robin, were not
responsible for typos, mistakes, stupids, and tryptophan sleep comas from the turkey, and she
writes the rules! Visit www.ramseykits.com for the latest pricing, specials, terms and conditions.
Copyright 2009 Ramsey Electronics, LLC... so there!

QA
&

WHATS UP:
Join us as we delve into the
basics of electronics as applied
to every day problems, like:

WITH RUSSELL KINCAID

Fish Feeder

Ferrite Core Search

Bat Detector

In this column, I answer questions about all


aspects of electronics, including computer
hardware, software, circuits, electronic theory,
troubleshooting, and anything else of interest
to the hobbyist. Feel free to participate with
your questions, comments, or suggestions.
Send all questions and comments to:

Q&[email protected]
Frank Lemon

TRANSISTOR QUESTION

I was curious about basic


semiconductors like diodes,
rectifiers, and transistors.
I knew that a switching
transistor was an NPN junction and
that diodes are PN. I was wondering
if you could make an NPN transistor
out of two diodes (NP-PN)? This
should make a NPPN junction which
would be the same as NPN.
A. Lingenfelter

I am sure that what you


really want to know is why
that does not work. Here is
why: The P region has to be
very narrow so electrons can transit
across it. Current from the emitter (N)
to the base (P) enables a greater
current from the emitter (N) to the
collector (N).

FLASHING LIGHT
ALARM

Would you please tell me


how to change a digital
alarm clock from the
existing piezo electric
buzzer to a flashing 60 watt bulb?
We are very hard of hearing and our
existing KEN-TECH clock quit. It used
to flash a screw-in bulb. New clocks
weve seen dont have an outlet for a
bulb. Thanks for any help you can give.
28

November 2009

Opening the clock and


finding the switch that turns
on the buzzer might be
difficult, so I think the best
solution is a microphone sensor to
operate the bulb. A VOX kit from
Ramsey Electronics will do the job
but you will also need a power
supply, power socket, and relay. If you
have a 12 VDC, 200 mA wall wart in
your junk box, that will do, and you
may find the power socket and relay
at RadioShack. Otherwise, the parts
list below will work.
VOX kit $9.95 part no. VS1
www.ramseyelectronics.com
Wall wart $13.89
418-TR1512-01-12 (2.5 MM plug)
Power socket $0.87
16PJ221 (2.5 MM)
Relay $3.58
817-FTR-MYAA012D
www.mouser.com

CYLINDER HEAD
TEMPERATURE
MEASUREMENT

Several years ago, I read an


article on how to use a
silicone diode attached to
an airplane engine cylinder
head for temperature measurements.
I cant remember what publication I
read the article, or what year it was,

and Google doesnt find any


information.
Do you have any ideas on how
a standard diode could be used to
measure temperature while it is
physically attached to a cylinder
head? I always enjoyed the Q&A
section by TJ Byers, and you are
doing a fine job following his lead.
Please keep up the good work!
Larry Kraemer

A silicon diode has a


temperature coefficient of
about -2 mV per degree C.
For best accuracy, you
would measure the diode voltage at
several temperatures and draw a
curve or use a lookup table.
Another option is to use an
LM34 (10 mV per degree F) or LM35
(10 mV per degree C) temperature
to voltage sensor. You can read the
temperature directly on a DVM.
The operating range is -50 to +300
degrees F.

FISH FEEDER PROJECT

I have to build an automatic


fish feeder for my final
project. I am using an 8051
microcontroller, seven
segment to display the time,
pushbutton to set the time, toggle
switch for on-off, and a DC motor.
I am now confused to build the
circuit and hope you can help me.
Naim Romero

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

The 8051
FIGURE 1
is a 40-pin
DIP with
four 8-bit
ports; you will have
plenty of outputs
for your project. The
circuit is no problem,
the program is what
will take time and
study; I cant help
you with that. You
only want to feed
the fish once per
day and the fish
dont care what time
it is, so I dont see
the need for a display.
However, if it is part
of the project, you
could use a 7447
BCD to seven
segment decoder/
driver or code the
driver in software.
The pushbutton
could advance the time in hour
increments until you get to the desired
time to start the feeder. You will need
two digits for a 24 hour display. How
you drive the motor will depend on
the means of delivering the food. I
would expect the motor to only turn
once to dump a load, so a cam and
microswitch could signal that the motor
should stop. A gear reduction motor
that turns very slowly is indicated.
A possible circuit diagram is
Figure 1. I show two 7447s assuming
you will code the two seven
segments separately rather than
multiplex them because there are
plenty of ports. I show inputs to port
0 because my limited perusal of the
datasheet indicates that port 0 can

MAILBAG
Dear Russell:
Re: Antenna Question, September,
09, page 30. The answer given to the
question about passive AM antenna
(boosters) kind-of strayed from the mark!
What the originator was doubtless
referring to was the large coil/tuning
capacitor in a box that you place next to
an AM table or portable radio.
This is simply a re-radiating,
resonant, L/C circuit where the large coil
can intercept more signal off the air than

be an input. Q1 is a 100V, 10A logic


level MOSFET (overkill but cheap).
Your program will have to acknowledge that S3 (the microswitch) is
closed and wait for it to open and
close. There is an Intel forum that
may be helpful, and the 8051 code
set can be found here: www.atmel.
com/dyn/resources/prod_documents/
doc0509.pdf.
Good luck on your project.

FERRITE CORE SEARCH

I am looking for Philips


ferrite core, part number
RM8RA250-3B9. Could you
please help me find a

a small radios internal loopstick.


Inductive coupling sends this larger
signal into the radio. Tuning the capacitor
in the booster peaks the desired stations
signal. The comments about a quarter
wave dipole (non-existent) made me
grin. The answers about digi and high
tech stuff are usually right on point, but
antenna and RF basics???
Respectfully,
John W. Davidson
Certified Wireless Technician
ETA International CET
Amateur Extra Class Ham

source to get that core or a


replacement?
S. Karas

Philips ferrite operations


were bought by Yageo
which also owns
Ferroxcube, so I queried
Juan Carlos Gardea of Ferroxcube.
He says the RM8R number is not
good and 3B9 material is obsolete.
Juan suggests that RM8/I-3H3-A250
or RM6R-3H3-A250 would be
equivalent. Apparently, 250 is the
Al in nH per turn and 3H3 is the
material which is low loss and good
for filter applications below 2 MHz.
Unfortunately, there is no distributor
for small quantities but you may be
Response: Thanks for writing. I admit
my answer did not answer the question;
I had never run across such a thing as
a passive signal booster and doubted
that it would work. After reading your
message, I built one to try it. I wound 20
turns #24 insulated hookup wire on an
oatmeal box (five inches diameter). The
tuning capacitor was a variable, 65 to 650
pF. I put the coil (horizontal) next to my
portable radio and tuned in a weak
station near 1400 kHz. Surprise! It works!
I got a noticeable increase in signal by
tuning the variable capacitor.
November 2009

29

FIGURE 2

able to get a few from your local


sales rep; see www.ferroxcube.com/
cont/nasals.htm.

BAT DETECTOR

Im trying to build an
ultrasound bat detector.
Ive located a reasonably
priced electrostatic
transducer (SensComp 600 series;
www.senscomp.com) with good
frequency response and sensitivity.
What I havent been able to find is
a suitable bias circuit (manufacturer
recommends 200V) and preamp.
I want to use a limiter and 16:1
frequency divider to bring the
received calls down to audible
range. This will be a portable detector
with a 12V battery so power use

30

November 2009

FIGURE 3

BAT DETECTOR PARTS LIST


PART
R1 R11
R10
C1, C2, C3
C7
C8, C9
Q1, Q2
IC1
IC2

DESCRIPTION
CARBON FILM, 5%, W
10K AUDIO TAPER
0.01 F, 50V, 10%
0.10 F, 50V, 10%
100 F, 16V
NPN, HI GAIN, 2N5089
HEX INVERTING BUFFER
CD4024 seven STAGE COUNTER

should be minimal.
Richard Duncan

I built an ultrasound
detector many years ago
but it used a mixer to beat
the frequency down to
audible range. Dividing by 16
provides a wider audible frequency
range but you lose some of the
characteristics of the original sound.
The electrostatic transducer output
will be proportional to the bias

PART #
291-(value)-RC
313-1510F-10K
80-C322C103K1R
80-C3220C104K5R
871-B41827A4107M000
512-2N5089TF
512-CD4069UBCN
595-CD4024BE

voltage and should be adequate at


12 volts. I built the circuit of Figure 2
using nine volt battery power (a
separate battery for the transducer
bias) but did not have time to test it.
I had to tweak the value of R1 to get
the DC voltage at the Q2 collector
in a linear range (3 to 5 volts). I
looked for the proximity detector
lamp that I used for the deer scaring
circuit but did not find it. I planned
to remove the sensor and use it in
this circuit.
The electrostatic transducer is a
current source so a current amplifier
is indicated. The preamp is a cascode
circuit because the low input
impedance gives minimum noise
and the gain-bandwidth is better
than a single transistor. I expect the
signal at the Q2 collector to be 10
millivolts with the lowest amplitude
input. The CD4069 is a simple
inverter that is stable with feedback
and makes a good, low noise
op-amp. I paralleled three of the
inverters to provide more drive to
the output. Each inverter is only
guaranteed to drive one TTL load. I
expect you will use high impedance
earphones, 8 ohm earphones;
wont work very well. The parts list is
Figure 3 (all Mouser part numbers).
The circuit I built was all surfacemount but the parts list is all through
hole parts.

QU E ST I O N S & A N S W E R S
a frequency trim to compensate for
component tolerance.

SIGNAL ATTENUATION

FIGURE 5

FIGURE 4

SQUARE WAVE
GENERATOR

I have a question: How do


I generate a square waveform with 24V (not pk-pk),
15 Hz by using an op-amp?
I have used an op-amp push-pull
amplifier, but the frequency response
of IC741 is limited. What to do?
Anonymous

symmetrical square wave. The


MC33202 has rail to rail output so
the R5 trim is minimum, but if an
LM358 or UA741 is used, more
trimming of R5 will be needed. R6 is

I would appreciate your


assistance with my problem
in using a Sennheiser
TR130 wireless headphone
with a Philips DVD Micro Theatre
MCD708 set which does not have a
headphone outlet. The problem is in
attenuating the output from the
speaker outlet to the normal level for
headphones. The volume control is
inadequate for this purpose. Ideally, I
need a self-regulating circuit for use
between the speaker outlet and the
headphone transmitter.
Bert Williams

I suggest a volume control


between the amplifier
output and the wireless
transmitter (Mouser part
#31VJ301-F); see Figure 5. NV

The frequency response


of the 741 is not limited at
15 Hz unless you are trying
for very high gain. The 741
is no doubt slew rate limited at 24
volts amplitude. I assume you want
zero to 24 volts signal which will
require a VCC/2 DC reference as in
Figure 4. The IC1A circuit is a square
wave generator. If the op-amp output
is positive, C1 charges through R2
until it reaches the bias voltage on
pin 3. When the charge on C1
reaches the bias voltage on pin 3,
the op-amp output goes negative and
the positive feedback through R7
pulls the bias voltage lower. C1 now
charges down to the bias voltage on
pin 3 at which point the op-amp
output switches high. The high and
low of the op-amp output has to be
symmetrical about the bias voltage
set by R5 in order to have a
November 2009

31

NEW
P

JRK USB MOTOR

CONTROLLER
WITH FEEDBACK

ololu announces the release


of the jrk line of USB motor
controllers: highly configurable,
versatile devices that make it
easy to add open- or closedloop control of brushed DC
motors to your computer- or
microcontroller-based project. The jrk
supports four interface modes: USB
for PC-based control; logic-level (TTL)
serial for use with embedded systems;
analog voltage for simple potentiometers and joysticks; and RC pulse for
radio control systems. It can perform
open-loop speed control, closed-loop
position control with analog voltage
feedback to make your own servos,
and closed-loop speed control with
frequency feedback from a tachometer. The jrk 21v3 the smaller of the
two units currently available has an
operating range of 5-28V and can
deliver 3A continuous output (5A

peak). The jrk 12v12 the more


powerful of the two has an
operating range of 6-16V
and can deliver a
continuous output of 12A (30A
peak). Both
devices can
handle transients
of up to 40V. A
free configuration
program (Windows XP and
Vista compatible) is available for calibrating your system. Real-time plots of
variables such as control input, feedback, motor output, and current draw
make it easy to fine-tune settings such
as PID constants, acceleration, and
current limit for your application.
The unit price is $49.95 for the
jrk 21v3 (item #1392) and $99.95 for
the jrk 12v12 (item #1393).
For more information, contact:

Pololu Corporation
Email: [email protected]
Web: www.pololu.com

HARDWARE
SOFTWARE
GADGETS
TOOLS

NEW INNOVATION

EZP-01

dsyn Hummerworks newest


innovation the EZP01 easy
probe tweezer all-in-one test
probe/tweezer that can plug directly
into a meter. Made of 301 stainless
steel, the EZP01 has a very unique
working surface, as well as:
Dual pickup points like a normal
tweezer.
Surface ground to handle the very
smallest components on one edge.
A wide edge for handling larger
components with stability.
A spacing wheel that allows the
user to set a defined gap that
reduces squeeze travel and can
hold parts from the inside or
outside.
In addition, a clear retaining cap
in the back slides off easily to allow
the user to separate the tweezers
into a pair of independent probes.
This is done without the need to
remove the probes. Moreover, the
spacing wheel allows the user to set
a gap to a specific point so repetitive
tests on multiple boards are made
much easier and accurately perfect
for calibration or monitoring jobs.

For more information, contact:

EDSYN
Web: www.edsyn.com

If you have a new product, please


email a short description and a
photo of your product to:

[email protected]
32

November 2009

SHOWCASE
Adapt9S12DP512
Our most popular board ever!
* University Programs/Senior Projects
* Flexible Modular Design
* Robotics/Mechatronics
* Free online resources
* RTOS-capable

$99
or le
ss*
Program in BASIC,
C, Assembler or Forth
* Educational discounts available

Evaluate * Educate * Embed

www.technologicalarts.com

'LVSOD\WH[WDQGJUDSKLFVIURP
\RXUPLFURFRQWUROOHURQVWDQGDUG
79PRQLWRUVZLWK%2%+
Frequency
Counters
since 1988
made in USA
3K_ZZZGHFDGHQHWFRP

www. STAR TEK-USA .com

COMPUTER TO
COMPUTER LINK USING

BY ED RINGEL

LASER POINTERS
Readers of this magazine know that broken stuff can sometimes be an
inspiration, not necessarily a disappointment. So it was with a giveaway
laser pointer from a drug company. The plastic housing broke, leaving the
laser module and a primitive switch mechanism. Hmmm
t turns out that it is extraordinarily easy to establish serial
communication between computers (or microcontrollers)
over the low power red laser modules used for pointers,
carpenters levels, and the like. It is also very inexpensive.
Easily sacrificed, the modules from these pointers can be
readily extracted and used for this purpose.
Aside from the laser module, each half of the
communication module requires only three bipolar
transistors, a phototransistor, a few resistors, one
pushbutton switch, and a cheap mainstream IC.

This is a fun project, but be safe!


As with all laser projects, a word of caution is in order.
The modules used are classified as Class IIIa lasers, with
output fixed at < 5 mW. These are pretty safe as lasers go.
Nonetheless, misuse can cause injury to the eye and can
be illegal. Staring at the beam can cause retinal injury.
Never, ever further focus the beam using optics unless
you really know what you are doing. Shining a laser at an
airplane is illegal and aiming a laser at a car is stupid.
Safety goggles are appropriate. Enough said.

What do we need to know


before we start?
Laser modules consist of the laser diode, power
regulating circuitry, optics, and the casing. Laser diodes
are operated at the extremes of the thermal and power
curves for the semiconductor. There is usually a
photodiode in the unit that monitors the output of the
laser and provides feedback to the power regulation
circuitry to prevent runaway. Optics collimate the beam
(usually just a cheap plastic lens), and the metal casing
dissipates heat. My initial concern in this experiment was
that the on/off time for the laser unit would be too long,
but it is possible to achieve 4800 baud communication.
All that internal output regulation occurs very, very rapidly.
34

November 2009

The unit stays cool, and the waveforms are sharp enough
to meet serial port encoding standards.
The other piece of background has to do with phototransistors. This class of semiconductor develops current
with illumination. Illumination of a phototransistor with a
red laser produces a very robust response which under
my experimental conditions dropped effective resistance
by at least a factor of 10 (and sometimes more) in room
light. This is more than enough of a change to be easily
detected by a comparator. The rise time and fall time
of current across the semiconductor junction with
application of light is fast and can meet serial port
encoding standards with the correct choice of parts.

The Basic Layout


I chose to implement communication using the
conventional serial port/RS-232 encoding protocol. There
were several reasons for this. First, both computers and
microcontrollers have extensive hardware and software for
this protocol and I would not need to reinvent the wheel.
Second, speed of transmission was easily varied; if there
were difficulties with maintenance of communication I could
simply slow down the speed of transmission. Third, it was
binary. The protocol requires no analog modulation of the
signal (amateur radio types no frequency modulation or
phase modulation a la PSK-31, and much, much faster),
improving reliability and ability to detect a low level signal.
I also chose to route the communication through
microcontrollers. There were three major reasons for this.
The first was protection of the computer. If I bungled this,
Id trash the Arduino, not the Dell. The second was extensibility. If I could establish communication between the
microcontrollers, there would be a general solution that
could be applied to both microcontrollers and computers.
Third, use of the microcontroller permits addition of some
extra functions that would require significant additional
programming on a computer. These extra functions

(discussed below) simplify alignment of the


units and initiation of communication.

Data flow is shown in Figure 1. Using a
terminal program on the PC, the information



is communicated through a true or virtual
serial port to the microcontroller. Data is
 
handed over within the microcontroller from



the UART serial port in communication




 


 


 
with the PC to the UART serial port in




communication with the laser. The TX pin is
connected to a simple bipolar transistor. I
 
used a 2N3904 which is appropriate for

 
radio frequency, low level signals; it certainly
could handle this task. The transistor is
essentially slammed on and off producing
FIGURE 1. Data flow diagram between

computer, Arduino, laser, and detector.
current flow which, in turn, drives the laser
module. A second transistor is configured as
Why Arduino? Several reasons. First, I really have
a discrete components inverter. This reduces the duty cycle
no objection to C and its derivatives. Folks dont like
of the laser considerably. No other circuitry is required for
C because hot dog programmers can write
transmission. TX/RX signals go high (zero) to low (one).
incomprehensible code if they want to. However, if the
Thus, the quiescent state of the laser is on which uses
author so chooses, it is possible to write code in C that
energy and increases the likelihood of misadventure with
is as clear as a Pascal program written by Nicklaus Wirth.
the beam. By placing an inverter in the signal path, the
Second, people dont like C because it is associated with
quiescent state of the laser is off, and a logical one is high.
down and dirty coding; if you are writing in C you must
Reception is somewhat more complicated. The
be manipulating data bit by bit.
phototransistor acts as the sensor. The phototransistor is in
The Arduino environment provides a very high level of
series with a resistor, effectively creating a light modulated
abstraction that permits the programmer to complete the
voltage divider. The voltage is monitored by a comparator:
task rather than code. Second, there is a huge open
an LM311. The LM311 has ample bandwidth. The output
source community that shares code, tips, and tricks. It is
of the LM311 is a TTL level signal that is fed to another
a very rich environment. I have learned a lot of both
discrete components inverter to reverse the effect of the
transmitting inverter.
The signal is then fed
to the RX pin of the
R1
+5 Volts
10K
receiving microcontroller. Information is
R2
handed over to the
S1
10K
UART serial port in
Q2
communication with
Q1
J1
R6
the computer and
1
10K
R3
relayed to the terminal
2
24
3
program on the PC.
R5
3
2.7K
Obviously, all
4
D1
forms of information
5
LASER
R4
can be relayed; the
10K
application is not limited
5
Q4
to a terminal program.
Q3
2
U1
7
Additionally, there is
3
+
LM311
no requirement for a
6
R7
computer. The two
1K
microcontrollers can
Q1, Q2, Q3 are 2N3904
Q4 is 1/2 of CNY65, hacked. See text
easily just talk to each
S1 pushbutton switch
LASER is laser module
other. Figure 2 is a
On U1, strobe and balance (5&6) are tied together. Vcc is pin ! . Pins 1 & 4 are tied to ground
schematic of one half
Connectors!
1 to +5V source on Arduino
of a communication
2 to pin 2 on both Duemilanove and Mega
3 to pin 5 on Duemilanove, 1! on Mega
link using an Arduino
4 to pin 4 on Duemilanove, 19 on Mega
FIGURE 2. Schematic for transceiver.
5 to ground on Arduino
Two are required for communication.
board.
November 2009

35

In Practice

FIGURE 3. The transceiver board. The transceiver circuitry


is in the middle, mounted above the Arduino. Wiring
rather than pins and headers was used to maintain
greatest flexibility possible. On the left is the laser, mounted
in a showerhead and secured to the transceiver board
with wire. On the right is the photodetector, mounted with
electrical tape. See text for other mounting options.

practical and theoretical information from this very friendly,


extended family. Finally, from a practical level, the Arduino
uses a USB virtual serial port with an FT-232RL chip to
provide the serial translation. A full featured USB port on
a computer guarantees five volts, 500 mA to an attached
device for the devices own use. This project uses much,
much less power than that so no other power source
is required.
Some may be concerned that the original Arduino
boards only have one hardware serial port. This project
requires two serial ports and an older soft serial library
didnt work well. While this is true, a newer software
based serial port (NewSoftSerial) is very robust. Code is
provided online at www.nutsvolts.com for the original
Arduino (one hardware, one software port) and the
Arduino Mega (two hardware ports).
FIGURE 4. Close-up of laser mounted in showerhead.
The showerhead articulates in a ball and socket fashion.
This particular model of showerhead had a gasket which
permitted a press fit of the laser unit without further
modification. Other heads may require glue or creation
of a sleeve around the laser to allow a press fit. Wires
follow the water path.

36

November 2009

If you are not familiar with the Arduino, check out


Smileys Workshop that runs in NV each month. It will
introduce you to this system. To use the communicator
without further modification, build the board, install the
Arduino software, let Windows install the virtual serial port,
and choose the target board. Hook up the target board.
Copy or enter the code, press compile, and then press
download to board. Software setup is less than 30 minutes.
The system requires two adjustments in order to
function. The first and by far the most difficult is
aiming the laser to hit the phototransistor square on. I do
not have a foolproof method for doing this. I mounted
my communication units on some scrap lumber (Figure
3), then I mounted the laser unit within a ball joint type
plastic shower head for even more control (Figure 4).
Consideration could be given to mounting the unit on a
camera tripod for even greater aiming control.
The other adjustment is setting an offset for the
comparator. Depending upon ambient light, the baseline
current of the phototransistor may vary considerably, and
depending upon the distance from the laser to the detector,
excitation may vary considerably. The negative input of
the comparator is attached to a potentiometer which
permits setting the comparison voltage, which enables
extraction of the data. This is a simple adjustment.

Building It
The electronics are easy. I recommend point-to-point
wiring on a piece of perf board. The component count is
so small that the work involved does not justify a printed
circuit. If you wish to be particularly careful (which I heartily
recommend), attach a five volt source to Vcc and Vgnd
and sniff for smoke before hooking up the Arduino. Apply
a five volt signal to the base of Q1 and make sure the
laser is working. If you have a multimeter, set the negative
input of the comparator at approximately 1-1.5 volts. Even
with the laser on, total current draw should be well under
FIGURE 5. Close-up of photodetector consisting of hacked
CNY65 optocoupler. With chip text correctly oriented for
reading, as you face the chip the left side of center houses
the emitter and the right side contains the detector. Using a
tiny burr or milling tip, carefully start on the
left of center of the chip and remove the black
plastic until a white matrix is identified. On the
left side of the matrix, continue to remove
material until a small translucent cube is
identified. This is the emitter. The detector
looks almost exactly the same. Now that you
know what to look for, carefully remove as
much white matrix from around the detector
as possible without destroying the detector
plastic. This is actually quite easy, and the
end result should be similar to the photo
here. Only the two right side pins need to be
connected. The upper right pin is high. Other
optocoupler chips likely have a similar
mechanical construction, but I cannot confirm
that (follow schematic for appropriate hookup).

LASER SERIAL
ARDUINO MEGA.TXT
// Use with Arduino Mega and other Arduino
types that have multiple hardware serial ports
//used for receving/sending characters
int scratchByte;

}
// if data from LED available, pass to computer
if (Serial1.available() > 0){
scratchByte = Serial1.read();
Serial.print(char(scratchByte));
}
}
void Align(){
pinMode(2,INPUT);
while (true)
{
Serial1.println(ABCDE);
Serial1.println(FGHIJ);
Serial1.println(KLMNO);
Serial1.println(PQRST);
Serial1.println(UVWXY);
Serial1.println(01234);
Serial1.println(56789);
if (digitalRead(2)==HIGH)
break;
}

void setup () {
//Initialize Arduino<->Computer port
Serial.begin(9600);
// Intialize Arduino <-> Arduino port
Serial1.begin(4800);
// Attach interrupt routine to Interrupt 0 on pin 2
attachInterrupt(0, Align, CHANGE); // this is pin
2; use 4.7k pullup resistor
}
void loop () {
// if data from computer available, pass to laser
if (Serial.available() > 0){
scratchByte = Serial.read();
Serial1.print(char(scratchByte));

50 mA. The Arduino board has clearly marked Vgnd and


+5 volt sources and they should be connected appropriately.
Output of the comparator should go to your RX pin
via Q3, and Q1 should be connected to Q2 which, in turn,
should be connected to the TX pin. Specific pins may vary
depending upon the Arduino (or your favorite microcontroller)
and how you configure your software serial port. I
deliberately did not construct this unit as a shield because
of the wide variety of board formats now available.
When I thought of this project, I did not have a
phototransistor on hand. However, I did have a couple of
optocoupler ICs left from another project. Careful work
with a Dremel tool permitted me to remove the plastic
and I was able to expose the semiconductor; it took all of
about five minutes to do and worked very well (Figure 5).
I also completed the project using a conventional
phototransistor. Interestingly, the hacked optocoupler
(CNY65) was much easier to adjust, and was my ultimate
sensor. After reviewing product specs, I concluded that
the key design parameter is rise/fall time. The hacked
optocoupler is a digital, high speed device, whereas the
phototransistor is a sensor. Faster is better.
Mechanical construction is a bit more challenging. If
you are just going to do this over a tabletop, aiming and
aligning the two units is not a big deal. If you are going to
try this over several hundred feet, you need to be able to
aim your laser with some precision. I suggest attaching
the Arduino board and your communication board to a
photo tripod. The laser itself is mounted in a plastic
showerhead. This permits further manipulation of the
beam independent of the tripod which may be necessary
for the best signal. Depending upon the laser unit you
use, some ingenuity will be necessary to provide firm
mounting while retaining the ability to aim. Other ideas
I entertained included a pair of helping hands.

Using It
Once you have built the two units, place them so that
they are aligned as best as possible without turning the
units on. If you are doing this over a distance, you may
want a friend to help, and you may want to use a cell
phone or short range radio to communicate with the
friends. Binoculars can also be helpful. Dont look at a
laser beam coming at you using binoculars; use them only
for locating the laser spot in relation to the phototransistor.
Once manually aligned, attach the Arduino to the
computer and the communication board to the Arduino.
Start the terminal program of your choice and establish
communication through the virtual serial port with the
Arduino at 9600 baud. Now, press the button you labeled
FIGURE 6. This is an alternative front end for the
photodetector. Use a conventional, low luminance
non-diffused LED (can be colored, but clear) that emits the
same color as the laser. The LED when illuminated with
the laser produces a very robust voltage but miniscule
current. A 2.3 megohm resistor provides enough connection
to ground so that the LED is not floating. A very high input
impedance FET front end op-amp buffers the signal which
is then passed along to the comparator. I used an LM353
for this purpose. While this is a very robust detector, it is
even more sensitive than the phototransistor, so it requires
a precise direct hit of the beam an all or nothing affair.
3
D1

2
R1 2.3M

U1a
+

1
LM353

To Comparator

D1 is conventional (low brightness) LED


with non-diffused bulb

November 2009

37

align on the communication board. This causes the Arduino


to send 35 characters to the laser: the first 25 letters of
the alphabet and number characters 0 through 9. Every
five characters a new line command is issued, as well.
The laser will appear to be continuously on. Aim the
laser at the phototransistor of the far unit so that you see

LASER SERIAL
ARDUINO DUE.TXT
//Use for Arduino Duemilanove
//NewSoftSerial Library available as a
download from the Arduino website
#include <NewSoftSerial.h>
//Instantiate a new instance of the NewSoftSerial Object
NewSoftSerial LaserSerial(4,5);
//used for receiving characters
int scratchByte;
void setup ()
{

the phototransistor clearly and brightly illuminated.


At that point, the receiving computer should receive the
character stream. If it shows nothing or gibberish, adjust
the potentiometer and send another character stream.
You may need to do this several times.
If difficulty persists, you need to troubleshoot. Issues

//Initialize Hardware serial port


Serial.begin(9600);
//Initialize Software serial port
LaserSerial.begin(4800);
//Attaches the interrupt routine below to
Interrupt 0, on pin 2
//There is now no need to poll for button
activity. If the switch is pressed (voltage
goes to zero)
//And then released, the interrupt routine is
invoked with no further programming on
your part.
attachInterrupt(0, Align, CHANGE);
// this is pin 2; use 4.7k pullup resistor
}

computer
if (LaserSerial.available() > 0){
scratchByte = LaserSerial.read();
Serial.print(char(scratchByte));
}
}
void Align(){
pinMode(2,INPUT);
while (true){
LaserSerial.println(ABCDE);
LaserSerial.println(FGHIJ);
LaserSerial.println(KLMNO);
LaserSerial.println(PQRST);
LaserSerial.println(UVWXY);
LaserSerial.println(01234);
LaserSerial.println(56789);
if (digitalRead(2) == HIGH)
break;
}

void loop ()
{
// if data from computer available, pass to
laser
if (Serial.available() > 0)
{ scratchByte = Serial.read();
LaserSerial.print(char(scratchByte)); }
// if data from LED available, pass to

Complete Fabrication Center


tio
istra
Reg ss
100
e
AS 9 In Proc

Quality prototype parts within 24 hours!!

Precision Laser, Waterjet, Plasma, Machining,


Micro-Machining, Forming, and Welding Capabilities
Parts from practically any material and
from 0.001 to 6.000 in thickness.
Finishes such as powder coat, paint,
plating, anodizing, silk screen, and
more!

* Quick
* Affordable
* Precise
* No Minimums
24 hour turn time based on quantity and finish requirements
38

November 2009

Fabricated, silkscreened and


shipped in 2 business days
with no expedite charges!
Integrated Ideas & Technologies, Inc.
6164 W. Seltice Way Post Falls, ID 83854 USA
Ph (208) 262-7200 Fax (208) 262-7177
www.iitmetalfab.com

can include misalignment of the laser (shine the laser on the


other units receiver at close range at least once so you can
see what the phototransistor looks like when it is getting
properly excited by the laser), electronic malfunction, or
distance is too great. Most likely, a back and forth between
alignment and comparator adjustment will give you a signal
if the two units are less than 100 meters apart. Once
aligned, the unit is simply ready to accept serial input data.
The default speed of the lasers is set in the code is 4800 baud.
Remember that Arduinos do not detect communications
settings and both units have to have the laser ports set at
the same speed. I have no idea how
far apart these things will work.

over which this system can be used?


Can the electronics be refined to increase sensitivity?
Can the mechanics be improved to ease alignment
procedures?
What is the maximum data transfer speed?
Would an array of phototransistors work better
(increase target area)?
Is analog signal modulation possible?
Just remember the whole point of this project is
to have fun!! NV

Code
Code is very, very simple. I used
the interrupt feature of the Arduino
to detect the button press. This is
appropriate for a situation where
button presses will be infrequent. For
efficiency, I did not want the main loop
looking for a state change on the
buttons pin upon every iteration when
activation would be so infrequent.
As indicated previously, there are two
versions of code: one for the Arduino
Mega with multiple hardware ports;
and one for the Duemilanove which
uses a hardware UART and a
software serial port created by the
NewSoftSerial library (available by
download from the Arduino site).

Areas of Further
Investigation
One early experiment was to use
an LED as the sensor. Excitation of a
conventional (i.e., low) brightness red
LED with a red laser beam created a
~1.3 volt potential. From the standpoint
of electronics, it worked quite well,
requiring a high impedance amplifier
to buffer the voltage generated
(current generated was tiny). The
signal when present was quite
robust, and once buffered was easy
to pass to the comparator (Figure 6).
However, from a use/construction
standpoint, the LED required a
direct hit from the laser to generate
a voltage. Revisiting this design may
be of interest to some builders.
Other ideas to expand on include:
What is the maximum distance
November 2009

39

PHONE RING-A-THING

CONTROL

BY JOHN MASTROMORO

Several years ago, a friend asked me about the


possibility of having a light turn on at his dock site
when coming in from night fishing on Lake Ontario. He
mentioned using a preset timer but ideally preferred a
remote-controlled device and, since he always carried a
cell phone, the idea of using that medium for infinite transmission and range was
certainly ideal. The question now was providing an appropriate receiver/decoder.
aving a phone installed at his site allowed for the
installation of a touch-tone decoder, but this would
be over-kill since it was only necessary to turn a light on
and/or off. The method I chose was to provide a ring
detection device that simply counts the number of rings to
perform the on and off functions. The project discussed
here has really worked quite well. It simply dials the phone
number at the dock site and immediately hangs up as per
the ring numbers selected (with #N: on and #F: off).
Take a look at the schematic in Figure 1. It indicates
the jumpered selected numbers as one ring on and four
rings off. Basically, you let the phone ring once for the #N
time, hang up immediately, then approximately 12 seconds
later, the light turns on. To turn the light off, let the phone
ring for the #F number selected (four, then in this case),
immediately hang up. Again, approximately 12 seconds
later, the light will turn off. All other ring input counts are

9


32:(5
386+212))


6:

%
9


 '

5
.

,&D





5
0

&
)

/

5,1*$7+,1*

5($'<

3+21(
:$//
-$&.

),*

*5((1


1(
5-
3/8*

3&

 '

5
.





5
0

&
)

5
.



,&E

5('




,&G

ignored and will not change the pre-existing condition.


A neon bulb (NE1) provides excellent isolation
between the circuitry and the phone line because of its high
impedance across the ring and tip (red and green) wires
within the phone wall socket. However, it makes no difference
which wire is connected to either side of the neon bulb for
it to light when the pulsating higher voltage ring signal is present.
The neon bulb is soldered to the circuit board, directly
connected to the phone line jack via a phone cord having
an RJ-11 phone plug on one end and two stripped wire
ends soldered to the board on the other end.
Since this project only needs to monitor ring signals (not
requiring any data or audio transmissions for it to function), it
presents no problem with line loading, which would otherwise be
necessary to contend with by using properly designed impedance-matching transformers or opto input circuit configurations.
The photocell (PC1) is placed close to the neon bulb
on the circuit board. Each one is
soldered in place and formed to face
,&E
each other so that the photocell

,&F




receives
proper light reception from


the
neon
bulb when the phone
6:
rings.
Black
tape can be used to
567

wrap
the
two
elements together to
,&G

ensure the best reception.


(1

>,@












,&
%



 5












1


 

)
VHHWH[W

5

.
1

FIGURE 1.
Ring-A-Thing Circuit.
40

November 2009

U4

6
4

MOC3010

5
220

5

0

VHHWH[W
RSWLRQDO
$&5HOD\

&
)

5/

L1




T1 

YDF

6:

How It Works

,&D

 

9




'

,&F

To 120VAC
Wall
Outlet

When the phone rings, a


pulsating voltage of approximately
60 to 80 volts is present which is
sufficient enough to light the neon
bulb. The photocell will respond
directly to the bulb output, causing a
positive pulsating voltage to pass
through the anodes of diodes D1
and D2 into their associated
timing circuit networks, which
are configured with a resistor,

Inside the Ring-A-Thing.

capacitor, and NAND gate segment.


Each network is wired to provide a time delay as per
the values of the resistors and capacitors. As the positive
voltage pulses pass through the anodes of D1 and D2,
they are dampened and a positive voltage is stored by the
capacitors. The diodes now prevent the positive voltage
charge from discharging back through their cathodes.
The input impedance of each NAND gate is so high that
voltage leaks in this manner are not considered. The only
convenient discharge path for the stored positive voltage
in the capacitors is through the resistors to ground.
The amount of charge that the capacitors can hold
combined with the resistance values determines the
discharge rate of the positive voltage to ground. Use the
formula R x C x .67 = T for your timing requirements.
The component values of R1/C1 will provide approximately
12 seconds and 1.5 seconds for R2/C2 but depending on the
4093 IC manufacturer and tolerance values of the components
used it could be slightly different. Since there are no critical
timing considerations for circuit operation to be concerned
with, the values indicated should be sufficient with any phone
service provider as long as the timing cycle of IC1a is longer
than one ring cycle to the next, or at least eight seconds.
With a positive voltage applied to each NAND gate
timing network (IC1a and IC1b), their normal high-state
output pins go low, and remain so during the entire input
charging time. Immediately following the absence of an
input ring pulse, the capacitors will start to discharge and,
when sufficiently discharged through their respective resistors to a ground potential, their output pins go high, indicating the completion of their intended time delay cycle.
Timing circuit IC1b has output pin 4 connected directly
IC1-IC2

CMOS 4093 Quad two-input NAND Schmitt-Trigger


[13400]
IC3
CMOS 4017 1-of-10 Output Counter [12749]
IC4
MOC3010 Triac Driver
[26278]
T1
Triac TO-220 400V/2.5A
[1165690]
D1-D2-D3
1N4148
[36038]
L1
Yellow LED Indicator
[34825]
R1
8.2M
[691796]
R2-R
1M
[691585]
R
100K
[691340]
R4-R
1K
[690865]
R
47K
[691260]
R8
220
[661343]
C1-C2
2.2 f
[93731]
C3
1 f
[29831]
Battery Snap
[109154]
NE1
Neon Bulb
[210315]
PC1
Cadium Sulfide Photocell
[202403]
RJ11
Phone Line Plug on Wire Lead; Strip Wire Ends
[196227]
SW1
Push On/Push Off Power Switch
[315492]
SW2
SPST PushButton Switch
[174414]
SW3
SPDT two-position Switch
[75969]
All items show Jameco part numbers; www.jameco.com.

PARTS
LIST

Misc: Nine-volt Duracell or Lithium battery; circuit board; IC


sockets and terminal strip (optional); 120 VAC light bulb/socket;
AC cord/plug; AC relay [see text]; wire; assembling hardware;
soldering equipment; appropriate sized enclosure. I do have a
number of pre-drilled circuit boards on hand for those interested.
Email me at [email protected] for info.

to clock input pin 14 of IC3 a 4017 1-of-10 output decoder.


With the values shown (approximately 1.5 seconds in
duration), ample time is provided to allow one input pulse to
IC3 per each complete ring cycle; in this instance, causing
#1 output pin 2 to go and remain high. At this exact
instance, the timing network of IC1a is being charged and
configured to discharge approximately 12 seconds later if
no more ring signals were input while discharging.
The IC1a time cycle provides two functions: output pin 3
is directly wired to input pin 5 of IC2b and IC3 output pin 2 (#1)
is wired to input pin 6. When both input pins to IC2b are high,
then output pin 4 goes low and immediately sets the IC2c/
IC2d NAND gate flip-flop at input pin 8. This causes IC2c
output pin 10 and input pin 12 of IC2d to go high. Output pin 3
is also wired to input pin 15 of IC3, resetting IC3 to a normal
off state immediately after the IC2c/IC2d flip-flop has been
set. This turns the light on.
With input pin 2 of IC2a high and switch SW3 in the S
position, the light will have a steady glow. If SW3 is in the F
position, then the bulb will continually flash since IC2a is
wired as a feedback oscillator in this position. Oscillation
is determined as per the R6/C3 values. Once the flip-flop
is set, the light will remain on until reset. This action can be
done in one of two ways. Pressing reset switch SW2 places
a low voltage on input pin 13 of IC2d, resetting the flip-flop.
Diode D3 prevents the low voltage from appearing at IC1c
output pin 10 while lighting the ready indicator, LED L1.
Switch SW2 provides another function of indicating if the
device is powered on. If power switch SW1 is in the on
position, it can be verified by simply pressing switch SW2,
which will light LED L1 while pressed. Otherwise, LED L1
does not light with the power off.
The other option of resetting the flip-flop is to allow
exactly four rings to be entered into IC3, in which case output pin 10 of IC3 (#4) goes high, is inverted to low by IC1c,
is passed through the cathode of D3 to pin 13 of IC2d,
which resets the flip-flop and lights the ready indicator LED
L1 during the reset time period. (Whew!)
Thats about it. The ring input counts used here have
worked out pretty well. You can select any number of rings
you like (from one to nine for either on/off activation), but
using a lower number for on and a higher number for off
seems to be more practical. Pin 13 (I) of IC3 should be
November 2009

41

AC Cord Assembly.

jumpered to the next highest unused output pin number to


prevent excessive and unwanted ring input counts to IC3. If
you have a fax or phone answering machine connected to
the phone line, make sure the highest ring number you
select is lower than the turn-on ring number for either of
the latter devices. Please note that the Ring-A-Thing project
shown in the photo was assembled with an earlier circuit
board layout but the circuit and circuit board design
described here are identical in operation and dimension,
respectfully. It is assumed that the reader has knowledge
of working with AC power.

Construction
The enclosure used is 6 x 4 x 2 which provides ample
room to house all the components and battery. Although
wires to the switches and LED can be soldered directly to
the circuit board, I chose to use a terminal strip between

42

November 2009

the outside world phone line and AC cords


to the circuit board. I joined the neon bulb
and photocell together with black tape
(as mentioned previously), and used a glue
gun to seal them and to cover the terminal
connections. Wiring is straightforward;
and 20 gauge stranded wire throughout
will work fine, but solid wire for the three
jumper wires is recommended. Recheck
all soldering connections especially to the IC pins
because any cold solder joints can cause irratic
circuit behavior.
Follow the diagram included here for AC cord assembly
and installation. This project is not recommended for use in a
busy phone environment. Its better for remote environments,
such as camp sites. Using a land-line cordless phone will
let you use your Ring-A-Thing locally and remotely. If your
phone service allows you to dial your own phone number,
hang up immediately and you can receive call back ringing.
By replacing the light bulb with an AC relay, the Ring-AThing can be used in higher-wattage devices such as air
conditioners, heaters, or even swimming pool equipment,
as well as smaller appliances such as a window fan, coffee
pot, radio, TV, garage door, etc. Using a nine-volt Duracell
or Lithium battery has provided long, dependable
operation but a regulated nine-volt DC power supply
can also be substituted for permanent installation. NV

UHF ROLLING CODE


REMOTE SWITCH

BATTERY
ZAPPER MKIII

KC-5483 $58.00 plus postage & packing

KC-5479 $46.50 plus postage & packing

High-security rolling code 3-channel remote control that


can be used for keyless entry and control of garage doors
and lights. Up to 16 transmitters may be used with the one
receiver so it's suitable for small-scale commercial
applications. The transmitter kit includes a three button key
fob case and runs on a 12V remote control battery.

Prolongs the life of your lead acid batteries. Like the original
2005 project, this circuit produces short high level bursts of
energy to reverse the sulfation effect. The battery condition
checker is no longer included and the
circuit has been updated and revamped to
provide more reliable, long-term operation.
It still includes test points for a DMM and
binding posts for a battery charger. Not
recommended for use with gel batteries.

Additional UHF
Rolling Code
Transmitter Kit
KC-5484 $23.25

PCB with soldermask, overlay


components included
Screen printed machined case
6, 12 & 24VDC

SD CARD SPEECH
RECORDER & PLAYER
KC-5481 $43.50 plus postage & packing
Use this kit to store your WAV files on MMC/SD/SDHC cards.
It can be used as a jukebox,
a sound effects player or an
expandable digital voice
recorder. You can use it as a
free-standing recorder or in
conjunction with any
Windows, Mac or Linux PC.
Short form kit includes
overlay PCB, SD card socket
and electronic components.

STEREO DIGITAL TO
ANALOG CONVERTER
KC-5487 $80.75 plus postage & packing
Listen to CDs through a DVD player with this DAC kit to get
sound quality equal to the best high-end CD players. With stereo
RCA outputs, it has one coaxial S/PDIF input and two Toslink
inputs. Requires SMD soldering.
Short form kit with I/O,
DAC and switch
PCB and on-board
components only
Requires PSU
KC-5418 $11.75
Requires toroidal
transformer

SLA BATTERY
HEALTH CHECKER
KC-5482 $46.50 plus postage & packing
Checks the health of your SLA
batteries prior to charging or zapping
with a simple LED condition indication
of fair, poor, good etc. An ideal
companion to our Battery Zapper MKIII.
Overlay PCB and
electronic components
Silk-screened front panel and
machined case included

FUEL/AIR MIXTURE
DISPLAY
KC-5485 $35.00 plus postage & packing
Displays your car's air-fuel ratio as you drive. Designed to
monitor a wideband oxygen sensor and its associated
wideband controller. Alternatively it can be used to monitor a
narrowband oxygen sensor or for monitoring other types of
engine sensors.

12VDC
Double-sided plated PCB
Programmed PIC
Electronic components
Case with machined
and screen printed lid

THEREMIN
SYNTHESIZER KIT MKII
KC-5475 $43.50 plus postage & packing

MULTIFUNCTION ACTIVE
FILTER MODULE

433MHZ REMOTE
SWITCH

KC-5480 $14.50 plus postage & packing


A versatile active filter module that can be used either as an
active crossover, a low pass filter, or a high or band pass
filter in a speaker project simply by changing a couple of
jumper links. Short form kit only with PCB, overlay and all
common components. Requires power supply (see specs),
amplifiers, and additional components for configuration to
PSU and operation frequency.

KC-5473 $26.25 plus postage & packing

Input impedance: 47k


Power supply: dual rail
15-60VDC; single rail
12-30VDC or 11-43VAC
Current: 40mA max
S/N ratio: >100dB @ 1V
22Hz-22kHz filter

Extra transmitter
kit: KC-5474
$13.50

POST & PACKING CHARGES


Order Value
$25 - $49.99
$50 - $99.99
$100 - $199.99
$200 - $499.99
$500+

Cost
$7.50
$20
$40
$60
$75

Max weight 12lb (5kg).


Heavier parcels POA.
Minimum order $25.

Note: Products are despatched from Australia,


so local customs duty & taxes may apply.
Prices valid till 31/12/09

1-800-784-0263

Suitable for remote control of practically anything up to a


range of 200m. The receiver has momentary or toggle output
with adjustable momentary period. Up to five receivers can be
used in the same vicinity. Short-form kit contains two PCBs
and all specified components.

Create your own eerie science


fiction sound effects! Updated
features to one of our most popular kits
include extra test points, change to AC to avoid
switchmode plugpack interference, and a
new skew control to vary audio
tone. Contains PCB with
overlay, pre-machined case and
all specified components.

FREE CATALOG
Checkout Jaycars
extensive range

HOW TO ORDER
ORDER ON-LINE: www.jaycar.com
PHONE:
1-800-784-0263
FAX:
+61 2 8832 3118*
EMAIL:
[email protected]
POST: P.O. Box 107, Rydalmere NSW 2116 Australia
ALL PRICING IN US DOLLARS
MINIMUM ORDER ONLY $25
*Australian Eastern Standard Time (Monday - Friday
09.00 to 17.30 GMT + 10 hours only)
Expect 10-14 days for air parcel delivery

www.jaycar.com

We have kits & electronic


projects for use in:
Audio & Video
Car & Automotive
Computer
Lighting
Power
Test & Meters
Learning & Educational
General Electronics Projects
Gifts, Gadgets & Just for fun!
For your FREE catalog logon to
www.jaycar.com/catalog
or check out the range at
www.jaycar.com

Experiments with
Alternative Energy
Part 4 - Build a Double Wide
Sun Tracker

By John Gavlik, WA6ZOK

This time, the subject of


alternative energy is on Sun
Trackers: the mechanical
devices that keep solar panels
pointed at the sun all day. Ill
show you how to build one with
one or two solar panels along
with a low voltage DC geared
motor that is controlled by
either the Parallax BS2 or
PICAXE 28X2 microcontrollers.
You already know from our past
articles and from common
sense that maximum power
can only be obtained if the
solar panels are constantly
pointed at the sun from sunrise
to sunset; thus the need for a
Sun Tracker. While the concept
of mechanical sun tracking
is fundamentally simple,
there are many factors to be
considered in achieving it. This
article and the one that follows
next month describe how its
done and how you can do some
very interesting experiments.

Figure 1
Double Wide
Solar Tracker.

44

November 2009

Sun Tracker Design


Our Sun Tracker design can be
expressed in the following general
categories:
Mechanical
Electronics
Firmware

steps involved. Due to the limited


space for everything else I want to
cover here, you can find complete
details for assembling everything on
my website at www.learnonline.com
Experimenter Kits BS2 or 28X2
Build a Double Wide Sun Tracker.
A Parts List is included here.

Mechanical

Electronics

Mechanically, the Sun Tracker


consists of one or two solar panels
(your choice) coupled to a 12 inch
threaded rod attached to a geared DC
motor thats all mounted on a custom
mounting bracket (Figure 1). The solar
panels are attached to the threaded
rod using two small angle brackets
that are, in turn, secured by #8 screws,
washers, and nuts (Figure 2). The
threaded rod is then coupled to the
shaft of a geared DC motor with a
standard shaft coupler (Figure 3).
To help balance the weight of the
cantilevered solar panels, a counterbalance consisting of a straight bracket
and some washers is attached to the
threaded rod in the center of the back
of the solar panel (Figure 4). The
counter-balance makes it much easier
for the small geared motor to rotate
the solar panels. The motor and solar
panel wires are routed to the BS2 or
PICAXE test bed boards where they
connect into the proper holes on the
solderless breadboard.
The mechanical assembly of the
Sun Tracker is straightforward.
However, there are many detailed

Our Sun Tracker is controlled by


either a Parallax BS2 or PICAXE 28X2
microcontroller (your choice) mounted
on its solderless breadboard alongside
the Sun Tracker mounting bracket
(Figure 5). Also included are the
NiMH battery and battery charger
circuit from Part 3 and a new H-bridge
circuit to control the DC motor which
is powered by the rechargeable
battery. The H-bridge circuit is the
interface between the micro and the
motor. It uses a PWM (Pulse Width
Modulated) technique created in the
firmware to control the motors
rotational travel and, thus, the solar
panels degree of movement. We want
to keep the motors travel fairly short
in order to track the [relatively] slow
movement of the sun, hence the
PWM technique that pulses the motor
in short east-west movements. By
using the rechargeable battery, we
take the load off the solar panel to
power the motor directly. You may
configure the solar panels in any
series-parallel arrangement you desire.
Our versatile solar panels are really
three solar modules in one housing,

Figure 4
Counter Balance
Weight on Back
of Solar Panel.

so with two panels you have six solar


modules that you can arrange in a
variety of voltage-current output
configurations. Just make sure that the
total open circuit voltage does not
exceed five volts as it will swamp the
A/D converter inputs.
Hook up the solar panels, motor
wires, battery, and other jumpers as
described in the detailed instructions.
This includes the H-bridge circuit on
the solderless breadboard, as well as
the NiMH battery. Refer to Figure 6
for a combination Block Diagram/
Schematic of the hookup. As you can
see, there is a lot going on here, and
Ill go into how the firmware handles
all of this hardware next.

Firmware
The firmware is subdivided into
four basic functions:
Sun Tracking
Battery Charging
Data Logging
Data Output to Computer
Each major function is serviced by
the micro in a round-robin manner
that repeats from top to bottom, over
and over again. A flow diagram of the
firmware functions can be seen in
Figure 7. Refer to it in order to better
understand the following discussion.

Sun Tracking
When first powered up or after
you push the reset button (on the
Parallax BOE or Homework board),
the firmware doesnt know where the
sun is yet so it goes into Search Mode.
In Search Mode, a sample of the solar
panels voltage is taken then the

Figure 3 Threaded Rod


Attached to Motor with
Shaft Coupler.

Figure 2 Solar Panel Attached


to Threaded Rod.

such movement. Most commercial sun


firmware causes the motor to move
slightly to the east and a new voltage
trackers do essentially the same thing
sample is taken. If the new voltage
because the sun is quite predictable.
sample is more than the last sample
(called lastVolts in the code), the
firmware moves the solar panels east
again. However, if the new voltage
As I said earlier, the NiMH battery
sample is less than the last sample, it
is used to power the geared motor
means that we have overshot the suns
through the H-bridge circuit, so it
position. When this happens, the
stands to reason that since we have
firmware enters the Track Mode.
solar panels at our disposal we should
Figure 8 illustrates these actions.
use them to charge the battery. Ive
The Track Mode is
designed to ensure that the
solar panels are always facing
the sun as it travels in a
westerly direction during the
day. Each time through the
Track Mode loop, the firmware
takes a sample of the solar
panels voltage and compares
Figure 5
Board of
that sample to lastVolts. If the
Education
sample and lastVolts are the
Alongside
same, nothing happens and
Sun Tracker.
the solar panels are not
moved. Otherwise, the solar
panels are moved slightly west,
then another voltage sample is
taken. If the new voltage
sample is less than the last
voltage sample, that means
that weve overshot the suns
position again, so the firmware
activates the H-bridge circuit
and causes the panels to move
back east again. Figure 9
shows how this works.
After the Search Mode
has located the suns position,
the Track Mode is invoked
each time through the Main
firmware loop, so the solar
Figure 6 Sun
panels are constantly moving
Tracker Block
slightly west to follow the sun
Diagram/
Schematic.
if the voltage samples warrant

Battery Charging

November 2009

45

Figure 7
Sun Tracker
Firmware
Flow Diagram.

NiMH battery voltage is sampled. If it


is at an acceptable voltage level, the
firmware returns to the Main loop.
However, if the battery voltage falls
below a minimum voltage level which
you set as a firmware constant called
fullDischargeVolts, the battery begins
its energy loop charging cycle.
In the Charge_Battery routine, the
energy loop turns transistor Q1 ON
which delivers the solar panels voltage and current into the battery. The
LED is also solidly illuminated at this
point. The firmware monitors the
batterys voltage and current, and
keeps Q1 and the LED ON until the
accumulated current level called
minEnergy in the code is achieved.
This puts about 1/20 C of charge into
the NiMH battery. That should keep it
turning the motor for quite a while. Of
course, the battery still powers the
geared motor even when it is being
charged. Again, if you want to know
more about the details of how the
battery charging algorithm works, refer
to Part 3 and/or go to www.learnon
line.com Experimenter Kits BS2
or 28X2 Build an On Demand Solar
Powered Battery Charger.

Data Logging
used the same circuitry and basically
the same firmware as described in Part
3 with some firmware modifications
that allow it to fit into the Main
round-robin loop. In the Test_Battery_
Voltage routine, the rechargeable

Figure 8 Search Mode.

46

November 2009

Most sun trackers do not do data


logging of the solar panel voltage,
current, and power. However, since
our theme is on experimentation, I felt
that it would be important to actually
measure and save the electrical output
of the solar panels as they gathered
sunlight during the day. With this

Figure 9 Track Mode.

data, you can compare the added


performance of the Sun Trackers
ability to gather solar energy against
a fixed solar panels output. Data
logging of the solar panels voltage,
current, power, and load resistance
values are done as follows:
Approximately once every two
minutes, the firmware takes a snapshot
of the solar panels voltage and
current readings. This consists of two
bytes each for voltage and current
making the total data record four
bytes. With this process, we are
essentially taking a snapshot of the
suns condition every two minutes as
it appears to travel across the sky
including all the voltage and current
dips created by interference from
clouds, haze, and other natural
obstructions. Since a normal day
consists of about eight useful hours of
sunlight and our sample rate is once
every two minutes, this translates to
240 samples per day (8 hrs x 30
samples / hr = 240 samples).
Multiplying 240 samples times four
bytes per sample gives us 960 bytes
required for one day of storage. Both
the BS2 and 28X2 have at least this
much storage available where the
program actually uses 1024 bytes for
slightly more data logging time.

Data Logging Pointers


To handle reading, writing, and
displaying the logged data the
firmware maintains two pointers to
the data logged memory area: a Data
Log Pointer and a Display Pointer.
Refer to Figure 10 to follow along.
The following description involves the
EEPROM memory of the Parallax BS2.
The PICAXE 28X2 operates the same
way with scratchpad RAM, but the
actual memory address locations are
different. At the beginning of the data
log cycle and when the data log
memory is cleared (well get to this in
a moment), the data log pointer is set
to the bottom address of the data log
memory area. Each time a data log
event takes place, the solar panels
voltage and current both two byte
variables are written into memory.
The Data Log Pointer is then
incremented by four bytes to the next

data record memory location. The


process continues until all 256 data
records (1024 bytes of data) have
been written. At this point, the
firmware detects the fact that the Data
Log Pointer is at its maximum value
and data logging is discontinued. The
Data Log Pointer remains fixed at
address $0400 until the data log
memory is cleared. While this is
happening, the Display Pointer is
incremented on every pass through
the Main loop (about once a second),
then cycles back and restarts at the
first data logged event again. This
permits you to view the logged data
as it is being accumulated or after the
data log memory is full. The Display
Pointer cycles from address $0000 to
address $03FC in four-byte increments, and then back to address
$0000 on a continuous, once per
second round-robin basis. You can
reset it to $0000 at power on or when
the reset button is pressed to restart
the display of logged data.

Data Logging Activity


To help you know whats happening during the data logging sequence,
the LED briefly flashes every time
through the Main loop to indicate that
data logging is taking place. This is like
a one-second heartbeat that lets
you know that all is well with the data
logging activity. Approximately once
every two minutes, when a data log
sample is taken the LED will flash with
a longer duration (about one second)
to let you know that a snapshot was
taken and stored in the data log
memory. When the data log memory
becomes full, i.e., when all 1024 bytes
Figure 11 Plot of Partially
Logged Data.

(256 data records) are stored, the


LED flashes four times for each pass
through the Main loop. This flashing
will let you know that the data log
memory is full and that
further data logging has ceased.
You are able to enable and
disable the data logging feature with
the Data Log Select signal a resistor-jumper on the test bed (Figure
6). Based on this jumper setting, the
Main routine directs the firmware to
either clear the data log memory
and cease data logging, or continue
with data logging until the data log
memory becomes full. For example,
if you previously recoded a set of data
and now want to record another set,
simply move the jumper from Vcc to
ground and the logged memory will
be erased the next time through the
Main loop. The LED ceases to flash
when data logging is disabled, which
is another state that lets you know
whats happening. Move the resistorjumper back to Vcc when you want to
resume data logging. I use a 470 ohm
resistor instead of just a wire jumper to
limit the current into the micros input
port when its connected to Vcc. The
LED flash sequences for data logging
are listed next including those for the
battery charging cycle, as well:

Figure 10 Data Logging Pointers.

Battery Charging
Solid on battery is charging.
Slow flashing battery voltage is
below minimum while charging.

Data Output

LED Flash Sequences


Data Logging
Once a second data logging
in progress short flash.
Once every two minutes log
event longer one second flash.
Four rapid flashes data log
memory full.
No flashing data logging
disabled data log memory erased.

There are two ways to view the


solar panel data on the computer: in
real time and while data logging is
taking place; or when the data log
memory is full. This is also handled by
a resistor - jumper. Real time data is
displayed on the computer when the
Display Select jumper (another 470
ohm resistor) is applied to ground.
Logged data is displayed when its
attached to Vcc (refer to Figure 6
again). The ability to switch between
real time and logged data display
is quite powerful in terms of
experimenting with the Sun Tracker.
For example, you can study the
effects of the suns activities in real
time while data logging continues in
the background. Or, you can witness
the display of the logged data as it
occurs. Just configure the Display

Figure 12 - Plot of Logged Data


with Fixed Solar Panel.

Figure 13 - Plot of Logged Data


with Tracking Solar Panel.

November 2009

47

Select jumper accordingly. When


viewing logged data, the firmware
increments the Display Pointer every
time through the Main loop.
Therefore, the firmware steps through
the logged data one data record at a
time. If the data logging sequence is in
progress and the data log memory is
not full, the computer will display all
the recorded logged data up to that
point followed by all zero data for
the data log memory that is yet to be
recorded (Figure 11). Since there is no
real indication of where the logged
events are relative to the displayed
data, you can restart the display
process from memory address $0000
by pressing the reset button or cycling
power to the micro. This action resets
the Display Pointer to address $0000.

Orienting the Tracker


for Best Results
The Sun Trackers east-west motor
movements are designed with the
geared motor facing due south. This
will allow the solar panels to acquire
and track the sun as it travels from
east to west. Another consideration is
ensuring that the solar panels have an
unobstructed view of the sun all
day long without the possibility of
shadows from trees, buildings, or other
fixed obstructions. This may not be
possible if youre inside and trying to
track the sun through a window as
would normally be the case in very
cold or inclement weather.
Nevertheless, proper orientation is
key to acquiring the optimum amount
of sunlight during the day.
Besides the standard south
orientation, you may want to also
consider angling the entire mounting
mechanism from horizontal to align
with the suns height above the
horizon. You learned in Part 2 that the
suns apparent angle is dependent on
the time of year and your latitude, so
its best to angle the entire mounting
bracket mechanism in a Polar Mount
fashion for best results (refer to the
sidebar on Single Axis Sun Trackers).

Data Log Example


Heres what you can expect from

48

November 2009

the actions of the Sun Tracker. For


Figure 12, I used a stationary solar
panel without any tracking. I placed it
facing due south and recorded its output for one day. Right beside it, I used
another panel attached to the Sun
Tracker and recorded the same sun
data as shown in Figure 13. As you
can see, the plot of the suns voltage is
much narrower for the stationary
panel as compared with the panel on
the tracker. The wider plot indicates
the increased power and energy
captured with the Sun Tracker in
operation. This is the real function of
the Sun Tracker; that is, to capture the
maximum amount of sunlight and
resultant electrical power and energy
possible. Refer to Figure 6 in order to
set the Data Log Select and Display
Select jumpers for data logging.

Summary
As you can see, our Sun Tracker is
quite a versatile experimental tool. I
felt that just doing a mechanical sun
tracker function wasnt enough given
the power of our microcontrollers;
they should be used to their fullest
capability in every way possible to
make the project and experiments
more interesting. Its always nice to
add more firmware functions mainly
because theyre free and dont cost
any more than the microcontroller
hardware that supports them. Always
be aware, though, of feature creep
that can overcomplicate things and
destroy the best of designs.

An important point to note about


the Sun Tracker is that all of the energy to move the motor comes from the
NiMH rechargeable battery, which is
trickle-charged during the day as necessary. This frees up the solar panel to
power a load without the periodic
heavy current drain of turning the
motor every second or so. Another
equally important design element is
the ability to data log and display the
sunlight data in real time or logged
mode. I didnt have enough space left
to go into the details of the H-bridge
circuit, more firmware programming
details, single axis versus dual axis sun
trackers, or more of the data logging
experiments that you can do with the
double wide Sun Tracker, so thats
what well do in the next installment.
In the meantime, conserve energy and
stay green. NV
Qty
1
1
1
1
2
4
2
18
18
18
1
4
2
8

Description
Mounting Bracket
Geared Motor
12 Threaded Rod (#8)
Shaft Coupler
Solar Panels
3/4 Machine Screw (#8)
1/2 Machine Screw (#8)
Hex Nut (#8)
Flat Washer (#8)
Lock Washer (#8)
Acorn Nut (#8)
Parts
Small Angle Bracket
List
Straight Bracket
Flat Washer (1)

The Double Wide Sun Tracker is available


as a Nuts & Volts exclusive kit. For kit
details, go to http://store.nutsvolts.com
or page 74 in this issue.

Single Axis Sun Trackers:


Horizontal, Vertical, and Polar Mountings
A horizontal sun tracker is like the one we built
here. As its name implies, the main axis is aligned
parallel to the ground. When the rod that holds the
panels is faced due south, the panels will track the
sun from east to west. A vertical tracker is like
vertical window blinds where the axis is aligned
perpendicular to the ground. Here the panels rotate
in a vertical plane to follow the sun. A polar tracker
is like a vertical tracker that is tilted, generally at the
angle the earth turns on its axis. In so doing, it is
able to capture more of the suns energy. If the
tilt angle is further
Horizontal manually adjusted to
Mount Solar account for the additional
Panels tilt due to the latitude
and seasons of the year,
then even more of the
suns energy can be
captured. Photos courtesy
of Wikipedia.

Vertical Mount Solar Panels

Polar Mount Solar Panels

THE

DESIGN

CYCLE

ADVANCED TECHNIQUES FOR DESIGN ENGINEERS

BY FRED EADY

TAKE AN IO-WARRIOR INTO YOUR


NEXT EMBEDDED BATTLE
We are all used to stuffing code into a microcontroller to enable our embedded
applications.This month, the tables are turned.The microcontroller work has been
done for us and we must perform some Bill Gates C++ coding to force bits back
and forth across the USB pipe.The folks at Code Mercenaries have assembled a
microcontroller package that embeds a fully compliant, low speed USB HID device. All
we have to do to access the IO-Warriors I/O subsystem is plug the IO-Warrior into a USB
port and perform the IO-Warrior API calls required to implement our application.

CODE MERCENARIES IO-WARRIOR


The IO-Warrior family (available through Saelig; see
Resources) consists of the IO-Warrior 24, the IO-Warrior
40, the IO-Warrior 56, and the IO-Warrior 24 Power Vampire.
The numbers in the IO-Warrior monikers represent the
number of actual pins that make up the host microcontroller
package. The 24-pin IO-Warrior 24 exposes 16 I/O pins
to the programmer while the IO-Warrior 40 provides the
programmer with 32 I/O pins. Fifty of the IO-Warrior 56s
pins are available to the user. The IO-Warrior 24 Power
Vampire is a specialized variant that is designed to power
source from the USB portal. All of the IO-Warriors are low
speed USB devices with the exception of the IO-Warrior 56,
which is a full speed device. The IO-Warrior 24 you see in
Photo 1 is the one well be working with. The IO-Warrior
24 is coded to include limited I2C master support, an
HD44780 LCD driver, incoming RC5 IR command support,
and SPI master mode support. There is also a special function
mode that allows the IO-Warrior 24 to drive an 8 x 32
LED matrix
with a little
help from
some external
shift registers.

The basis of the IO-Warrior 24 is an OTP (One Time


Programmable) Cypress CY7C63743C-PXC enCoRe
USB combination low speed USB and PS/2 peripheral
controller which you can see sans the IO-Warrior version
label in Photo 2. The CY7C63743C-PXCs claim to fame is
its ability to automatically operate in USB or PS/2 mode
with a minimum of external supporting components.
For you younguns, a PS/2 is (was) an IBM personal
computer that replaced the venerable IBM XT and AT personal
computers. The PS is short for Personal System. USB
overtook the clocked PC PS/2 interfaces in the 1990s.
To eliminate the more commonly used microcontroller
support components, the CY7C63743C-PXCs internal oscillator
can be used in lieu of an external ceramic resonator, while a 3.3
volt internal regulator provides voltage for the USB pull-up
resistor. The CY7C63743C-PXC isnt very good at sourcing
current on its I/O pins (2 mA max). However, it makes up for
the weakness by being able to sink up to 50 mA on a single
GPIO pin. Otherwise, as you can see in Figure 1, the PXC is a
typical USB-enabled microcontroller. A pinout diagram of it and
PHOTO 2. The veteran Cypress CY7C63743C-PXC enCoRe
USB combination low speed USB and PS/2 peripheral
controller take on the IO-Warrior 24 USB mission.

PHOTO 1.The
IO-Warrior 24
comes as a kit.
The Design
Cycle version
is shown here.
I added the
solderless
breadboard
and the 2 x 16
Lumex LCD.
November 2009

49

FIGURE 1.The CY7C63743C-PXC hangs its hat


on the reduced component count hook. No
external clock source or voltage regulator is
needed for this part to operate in USB mode.

nonconcurrent as some of the LCD data


pins are used to drive the LEDs. A separate
IO-Warrior 24 application note describes
the implementation of an LED matrix.

THE IO-WARRIOR 24
STARTER KIT

its associated IO-Warrior 24 pinout are given to you in Figure 2.


Note that the IO-Warrior 24 configuration does not
allow the use of an external clock source of any kind. Instead,
the XTALIN pin is used as an input to select the power mode.
The IO-Warrior 24 power pin is checked at power-up and
bus reset only. When the power pin is pulled logically high,
the USB power mode is set to high. In high power mode,
the IO-Warrior 24 will request 500 mA from the USB power
bus. A low on the Power pin will result in the IO-Warrior 24
settling for 100 mA max from the USB portal. The Vreg output
is intended to power the USB D pull-up resistor and that is all.
The special SPI, I2C, and LCD functions take precedence
over the normal GPIO pin logic. The PXC GPIO speeds are
too slow to physically implement the I2C clocking via the I/O
pins. So, the I2C protocol is handled internally to the IO-Warrior
24 to improve the data throughput. The IO-Warrior 24 can only
participate in an I2C network as the one and only master node.
Due to the IO-Warriors lack of a stable hardware I2C clock, it
may not be the best I2C master for some I2C slave devices.
SPI and LCD support on the IO-Warrior are mutually
exclusive. This is due to the fact that the LCD E signal is
multiplexed with the SPI SCK signal and the SPI data I/O pins
(MOSI and MISO) are shared with the remaining LCD control
signals RS and R/W. The IO-Warrior 24 SPI portal is capable
of clocking at 2 MHz. However, the USB interface bandwidth is limited and the full bandwidth of the SPI channel
cannot be utilized. LCD and LED matrix support are also

The IO-Warrior 24 Starter Kit comes


out of the box in kit form. My assembled
IO-Warrior is shown in Photo 1. As you
can see, putting one of these together
is a snap. I took the liberty of adding the solderless
breadboard and the LCM-S01602DTR/M LCD. You can
get an idea of how the starter kit is laid out by matching
up the components you see in Photo 1 with their
graphical counterparts in Schematic 1.
The LCM-S01602DTR/M LCDs I/O pinout is
compatible with the layout you see in Schematic 1 with
the exception of pins 15 and 16 which do nothing on the
LCD as it has no backlight. Note the use of a PNP transistor
backlight switch. Recall that the CY7C63743C-PXC
doesnt like to source current and grounding (sinking)
the BC307s base is right down the PXCs alley.

ARMING THE IO-WARRIOR 24


All of the major PC operating systems support USB. In
addition, those operating systems natively support HID (Human
Interface Device) class devices such as keyboards, joysticks,
and mice. A major advantage to HID class devices is that they
can be accessed from the application level. The IO-Warrior
24 is internally coded to act as a USB HID class device.
The CY7C63743C-PXC USB subsystem consists of
three USB endpoints. Thus, the IO-Warrior 24 inherits that
trio of endpoints. To get data to and from device resources,
USB endpoints can be assigned to interfaces which provide
a path to the devices functions. In the case of the
IO-Warrior 24, interface 0 is the direct path to the GPIO
pins. The special mode functions
available via the IO-Warrior 24
firmware are spoken to via
interface 1. If you recall your
USB 101 training, endpoint 0 is
common to all USB devices.
FIGURE 2. You can clearly see the
native CY7C63743C-PXC multiplexed
GPIO pin functions in this figure. The
XTALIN and XTALOUT expect to see
a 6 MHz ceramic resonator when the
external clock option is selected. P2.0
and P2.1 are alternate inputs. Firmware
forces the CY7C63743C-PXC to suit
up with the IO-Warrior 24 armor.

50

November 2009

THE DESIGN CYCLE


Endpoint 0 is used to
interrogate and configure
a downstream USB device.
Also, endpoint 0 can be used
to send data to a downstream
USB devices functions. The
IO-Warrior 24 USB driver
firmware employs endpoint 0
for output data (host to IOWarrior 24) and as a vehicle
for the host to send commands
to the IO-Warriors special
mode functions. The path used
to set the logical state of the
IO-Warrior 24 GPIO pins flows
through endpoint 0 and
interface 0. The commands
destined for the special mode
functions also enter the IOWarrior 24 via endpoint 0 but
flow through to interface 1.
The IO-Warrior 24 can
only report the state of the
GPIO pins when it is asked
to do so by the host. Endpoint
1 is used for this purpose.
SCHEMATIC 1. Nothing you cant handle
here. The TSOP1736 is the 36 kHz variant of a
When logic states on the IOline of IR remote control receiver modules.
Warrior 24s GPIO pins change,
The Lumex LCD I used for this discussion is a
the new data is transferred
pin-for-pin match to the schematic LCD pinout.
on the next host request.
Thus, when the state of the GPIO pins change, a report is
interrupt-in endpoints. In this case, interrupt means that data is
generated and flows from the GPIO function through
transferred only when there is new data to pass along. The
interface 0 and out to the host via endpoint 1. Replies from
host determines when the new data is transferred which
the special mode functions pass from interface 1 through
(due to the USB protocol) is once every 8 to 10 mS.
endpoint 2 to the host. Endpoints 1 and 2 are called
SCREENSHOT 1.Theres no need to get fancy and complicated.
All we want to do is display the results of the IO-Warrior
API calls. Visual C++ is easy to learn and allows you to
associate the IO-Warrior API calls with buttons and controls.

IO-WARRIOR 24 FIRE CONTROL


Weve already discussed more USB concepts than
SCREENSHOT 2.Things just dont work well in the compilation
and link processes without including this library into the
mix.The library is included with the IO-Warrior Software
Development Kit which is part of the IO-Warrior 24 Starter
Kit. This window can be found in the Project pull-down menu.

November 2009

51

SCREENSHOT 3.
Visual C++ is carrying
the work load behind
this visual. This
message box was
generated with a couple
of lines of Visual C++
code. If the IO-Warrior
24 is not connected to
the host USB portal, this
little box will pop up.

you need to know in order to


code an IO-Warrior 24 application. The idea behind the
IO-Warrior is to allow a programmer with absolutely no USB
knowledge to apply USB technology in a microcontroller
application. To this end, the Code Mercenaries folks have
preloaded a CY7C63743C-PXC with HID firmware and
supplied a USB-laden API for the host PC. The Windows API
is housed in a DLL called iowkit and the Linux library is called
libiowkit.so. The API encompasses all of the functionality for
every IO-Warrior variant and is designed to be used with any
Windows or Linux programming language. Ive chosen to
exercise the IO-Warrior 24 resources using Visual C++ which
is one of the Windows programming languages available within
Microsofts Visual Studio 2008. Ill demonstrate the capabilities of the IO-Warrior API with the help of a Visual C++
dialog based MFC application. Screenshot 1 which is one of
the MFC Application Wizard configuration windows backs
up my previous declaration. The only additional step we need
to take outside of the MFC Application Wizard is to include the
iowkit.lib in the link process. Ive done this in Screenshot 2.
Like Visual Basic, Visual C++ is an event driven
programming language. In a normal Visual C++
application, we would place much of the code were
about to write behind a button or control. For simplicity,
well code everything we can inside of the Visual C++
initialization function which is defined as follows:
BOOL CnviowarriorDlg::OnInitDialog()

Our initial goal is to discover an IO-Warrior 24 at the other


end of the USB cable. This is done with this API call which
returns a unique handle for the first IO-Warrior detected:
IOWKIT_HANDLE ioHandle_1;
ioHandle_1 = IowKitOpenDevice();

The handle is actually a value that we will use to identify


the detected IO-Warrior 24 to other API functions. The Visual
C++ debug watch window revealed that a value of 0x00B60014
was assigned to the variable ioHandle_1. If the
IowKitOpenDevice API function returns a NULL value, no
IO-Warrior 24 was sensed. So, we will need to code an if-else
segment to
handle the
SCREENSHOT
4. So far, so
good. Once
again, Visual
C++ and the
IO-Warrior API
are doing most
of the work
here.
52

November 2009

possibility of not finding an IO-Warrior waiting in the wings:


CString msgCHECKCONN

= _T(Check IOWarrior
Connection);
CString msgNOTDETECTED = _T(No IOWarrior
Detected);
if(ioHandle_1 != NULL)
{
//Continue on our way..
}
else
{
IowKitCloseDevice(ioHandle_1);
MessageBox(msgCHECKCONN,msgNOTDETECTED,0);
OnOK();
}

In the previous code snippet, we assume that the


IO-Warrior device open failed as there is only code for
the else (failure) branch of the if-else segment. So, upon
receiving a NULL ioHandle value, we close all IO-Warrior
devices and post a device-not-detected message like the
one you see in Screenshot 3. Lets code a positive
response to the IowKitOpenDevice API call that will
retrieve the detected IO-Warrior 24s serial number and
display it on the LCD and in the application dialog box:
CString msgCHECKCONN
CString msgNOTDETECTED

= _T(Check IOWarrior
Connection);
= _T(No IOWarrior
Detected);

WCHAR SerialNumber[10];
CString SNtext;
UCHAR nextline;
nextline = 0;
if(ioHandle_1 != NULL)
{
// Get Serialnumber
IowKitGetSerialNumber(ioHandle_1,
SerialNumber);
// Display Serial Number
SNtext.Format(_T(IOWarrior 24 Attached
with Serial Number = %s),
SerialNumber);
m_DisplayWindow.InsertString(nextline++,
SNtext);
}
else
{
IowKitCloseDevice(ioHandle_1);
MessageBox(msgCHECKCONN,msgNOTDETECTED,0);
OnOK();
}

Note the use of the ioHandle_1 value in the


IowKitGetSerialNumber API call, which returns the eight
word IO-Warrior 24 serial number in the SerialNumber
array. Once we have the IO-Warriors serial number,
we can format a message and display it as shown in
Screenshot 4. Just in case youre wondering, the _Ts
provide Unicode support for the message box strings.
We can also use the IO-Warrior API functionality to
send the serial number information to the LCD. However,
before we write that bit of code I need to clue you in on
the data structure behind the bytes were about to push
towards the LCDs HD44780 controller. I also need to
show you the data structure that the IO-Warrior 24 uses
to control its GPIO pins. Recall that the IO-Warrior
operates in the HID class. That means that the IO-Warrior
24 communicates using reports which are actually data

THE DESIGN CYCLE


structures like the one shown here:
typedef struct _IOWKIT24_IO_REPORT
{
UCHAR ReportID;
union
{
WORD Value;
BYTE Bytes[2];
};
}
IOWKIT24_IO_REPORT, *PIOWKIT24_IO_REPORT;

Each report is prefixed by a ReportID byte. The report


ID is associated with a pipe. A pipe (in this case) is
synonymous to an interface. So, Pipe 0 is used to talk to
the IO-Warrior 24s GPIO pins just as Pipe 1 is used to
communicate with the special mode functions. The IOWarrior 24 report data structure contains a report ID and
three bytes of payload. Pipe 0 is always used to interface
to the GPIO pins. So, the ReportID value for GPIO access
is always 0. A ReportID value would not be necessary in
any case of GPIO access but Windows requires that a
report ID byte be present. With that, heres how we write
a 0xAA to the IO-Warrior 24s P0 GPIO pin set and 0x55
to its P1 GPIO pin set:
IOWKIT24_IO_REPORT report24;
ULONG rc32;
DWORD BitsRead;
CString BITStext;
CString RCtext;
#define IOW_PIPE_IO_PINS
0
#define IOWKIT24_IO_REPORT_SIZE
sizeof(IOWKIT24_IO_REPORT)
// Write 0x55AA to GPIO
IowKitSetWriteTimeout(ioHandle_1, 2000);
memset(&report24, 0, IOWKIT24_IO_REPORT_SIZE);
report24.ReportID = 0;
report24.Value = 0x55AA; //0x55 to P1-0xAA to P0
rc32=IowKitWrite(ioHandle_1,IOW_PIPE_IO_PINS,(cha
r*)&report24,IOWKIT24_IO_REPORT_SIZE);
// Display number of bytes written (rc32)
RCtext.Format(_T(%X Bytes Written), rc32);
m_DisplayWindow.InsertString(nextline++, RCtext);
// Read and display states of all 16 IO-Warrior
24 GPIO pins
IowKitReadImmediate(ioHandle_1,&BitsRead);
BITStext.Format(_T(P0 = 0x%X), (BitsRead &
0x000000FF));
m_DisplayWindow.InsertString(nextline++,
BITStext);
BITStext.Format(_T(P1 = 0x%X), ((BitsRead &
0x0000FF00)>> 8));
m_DisplayWindow.InsertString(nextline++,
BITStext);

The pair of #define statements can be found in the


iowkit.h file, which is part of the IO-Warrior SDK. To be
safe, I added the IowKitSetWriteTimeout API call to force a
timeout of two seconds if the IowKitWrite function failed.
Thats not likely, but the insurance is there to keep the
program from locking up on a GPIO write failure. The
memset function simply clears the report24 data structure
to zero. Adding the GPIO read-write-display code to our
existing serial number code results in the display shown
in Screenshot 5. Weve got the hang of putting human
readable things into the dialog box display window.
Lets get just as good with the LCD. We must use
the eight-byte special report ID data structure to

communicate with the LCDs HD44780:


typedef struct _IOWKIT_SPECIAL_REPORT
{
UCHAR ReportID;
UCHAR Bytes[7];
}
IOWKIT_SPECIAL_REPORT,
*PIOWKIT_SPECIAL_REPORT;

You already know how to assemble and transmit a


report. So, the language within the enable LCD API
special function call should not be foreign:
IOWKIT_SPECIAL_REPORT reportLCD;
// These are found in the iowkit.h file
#define IOWKIT_SPECIAL_REPORT_SIZE sizeof
(IOWKIT_SPECIAL_REPORT)
#define IOW_PIPE_SPECIAL_MODE 1
// Enable LCD
memset(&reportLCD, 0,
IOWKIT_SPECIAL_REPORT_SIZE);
reportLCD.ReportID = 0x04; //ReportID for
//LCD-Mode
reportLCD.Bytes[0] = 0x01; // enable LCD Special
// Function
IowKitWrite(ioHandle_1, IOW_PIPE_SPECIAL_MODE,
(char *) &reportLCD,
IOWKIT_SPECIAL_REPORT_SIZE);

Upon receiving the enable LCD report, the IO-Warrior


24 will initialize the attached LCD and display the cursor
at the home position. If the LCD has a backlight, the
backlight is illuminated at this time, as well as via the
active-low ON GPIO pin (P0.4). The LCD is now active
and configurable. Notice that we used a ReportID value
of 0x04 to enable the LCD and well use a ReportID value
of 0x05 to configure the display:
// Configure LCD
// Reference page 43 of HD44780 data sheet
memset(&reportLCD, 0,
IOWKIT_SPECIAL_REPORT_SIZE);
reportLCD.ReportID = 0x05; //ReportID for
//LCD-Mode write
reportLCD.Bytes[0] = 0x04; //R/S mode=0 / Send
//bytes
reportLCD.Bytes[1] = 0x38; //function 8-Bit
//mode
reportLCD.Bytes[2] = 0x0E; //function display
//on-no blink
reportLCD.Bytes[3] = 0x06; //function entry
//mode set
reportLCD.Bytes[4] = 0x01; // function CLEAR
//DISPLAY
IowKitWrite(ioHandle_1, IOW_PIPE_SPECIAL_MODE,
(char *) &reportLCD,
IOWKIT_SPECIAL_REPORT_SIZE);

If you go to the HD44780 datasheet page I reference


in the codes comments, youll be able to easily pick out
and identify the bit patterns used in the reportLCD bytes.
With the LCD initialized and configured, were ready to
send it a message to display:
WCHAR SerialNumber[10];
// Send Serial Number to LCD
memset(&reportLCD, 0,
IOWKIT_SPECIAL_REPORT_SIZE);
reportLCD.ReportID = 0x05; //ReportID for
//LCD-Mode
November 2009

53

SCREENSHOT 5.Note that I changed the


CANCEL button to an EXIT button. You can
see what I did to support that in the Visual
C++ source code. The neat thing about Visual
C++ is that in Debug mode you can see the
strings and values before they are officially
displayed in the dialog box. As you can see
here, things worked as designed.

PHOTO 3. What we have here is a


single-IC USB interface for any
HD44780-compatible LCD.

reportLCD.Bytes[0] = 0x85; //write 5 bytes to


//LCD command register
reportLCD.Bytes[1] = S; //send character to
//LCD
reportLCD.Bytes[2] = N; //send character to
//LCD
reportLCD.Bytes[3] = ; //send character to
//LCD
reportLCD.Bytes[4] = =; //send character to
//LCD
reportLCD.Bytes[5] = ; //send character to
//LCD
IowKitWrite(ioHandle_1, IOW_PIPE_SPECIAL_MODE,
(char *) &reportLCD,
IOWKIT_SPECIAL_REPORT_SIZE);
memset(&reportLCD, 0,
IOWKIT_SPECIAL_REPORT_SIZE);
for(i=0;i<8;++i)
{
reportLCD.ReportID = 0x05; //ReportID for
//LCD-Mode
reportLCD.Bytes[0] = 0x81; //write 1 byte to
//LCD command register
reportLCD.Bytes[1] = (char) SerialNumber[i];
//send character to
//LCD
IowKitWrite(ioHandle_1, IOW_PIPE_SPECIAL_MODE,
(char *) &reportLCD,
IOWKIT_SPECIAL_REPORT_SIZE);
}

Order online at:


www.melabs.com

$89.95

(as shown)

RoHS
Compliant
Programs PIC
MCUs including
low-voltage (3.3V)
devices
Includes
Software for
Windows
98, Me, NT,
XP, and Vista.

Ive supplied the Visual C++ source code you need to


duplicate the IO-Warrior 24 efforts youve just read about
in the download package available at www.nutsvolts.com.
If Visual C++ is not your strength, the IO-Warrior SDK also
includes sample code for Java, Delphi, Visual Basic, and C.
Theres also IO-Warrior support for Linux and MAC. No
matter which programming language or operating system
platform you choose to use, you can add the IO-Warrior
to your Design Cycle. NV

SOURCES
IO-Warrior 24 Starter Kit
Saelig
www.saelig.com

With Accessories for $119.95:


Includes Programmer, Software, USB Cable,
and Programming Adapter for 8 to 40-pin DIP.

November 2009

Visual Studio 2008


Microsoft
www.microsoft.com

Fred Eady can be contacted via email at [email protected].

Development Tools for PIC MCUs

LAB-X Experimenter Boards


Pre-Assembled Board
Available for 8, 14, 18, 28,
and 40-pin PIC MCUs
2-line, 20-char LCD Module
9-pin Serial Port
Sample Programs
Full Schematic Diagram

Pricing from $79.95 to $349.95

EPIC Parallel
Port Programmer
starting at $59.95
54

SOLDIER ON

microEngineering Labs, Inc.

USB Programmer for PIC MCUs

When addressing an
LCD, the report ID and LCD
command byte must always
be sent. So, the maximum
number of data bytes we
can send to the LCD in a
single report is six. That
works out well with the
SN = character string.
However, the IO-Warrior 24
serial number is eight bytes
long. No problem. Since we
have the IO-Warrior 24 serial
number coralled in an array,
we can send the LCD data
one byte at a time. Just as
we did in Photo 3.

PICPROTO Prototyping Boards


Double-Sided with Plate-Thru Holes
Circuitry for Power Supply and Clock
Large Prototype Area
Boards Available for Most PIC MCUs
Documentation and Schematic

Pricing from $8.95 to $19.95

Phone: (719) 520-5323


Fax: (719) 520-1867
Box 60039
Colorado Springs, CO 80960

BASIC Compilers for PICmicro


Easy-To-Use BASIC Commands
Windows 98/Me/2K/XP/Vista
PICBASIC Compiler $99.95
BASIC Stamp 1 Compatible
Supports most 14-bit Core PICs
Built-In Serial Comm Commands

PICBASIC PRO Compiler

$249.95

Supports most PICmicro MCU Families


Direct Access to Internal Registers
Supports In-Line Assembly Language
Interrupts in PICBASIC and Assembly
Built-In USB, I2C, RS-232 and More
Source Level Debugging

See our full range of products, including


books, accessories, and components at:

www.melabs.com

ALL
ELECTRONICS
C

RECHARGEABLE
LITHIUM-ION
BATTERY
iomega P/N 31021100. Lithium-Ion prismatic
battery. 4.2 Vdc max. 900 mAh min. 54mm x
34mm x 7mm. 23mm leads with 2-contact
female connector (2mm centers).

50

CAT# LBAT-60

each

LARGE, SURFACE-MOUNT
PUSHBUTTON

CAT# PS-12151

5 VDC DPDT MINI


SIGNAL RELAY, 2A

S.P.S.T., on-off, 12V


lighted rocker switch
four interchangeable
lenses, red, yellow, blue
and green. Illuminated
when switch is on. For
accessories up to 25 Amps (300W).
Snap-mounts in 0.94" diameter hole.
0.25"qc / solder terminals.

NEC# EC2-5NJ. D.P.D.T.


sub-miniature pc mount relay.
Contacts rated 2A @ 30Vdc, 178 Ohm coil.
15 x 7.5 x 8.5mm high. Sealed.
PC leads. UL, CSA.

95

each

CAT# CB-461

50

25

each

11

each

Shop ON-LINE

PADDED MINI-POUCH
Ballistic nylon mini-pouch
with keyring. Zipper
closure. Interior elastic
strap. Carry and store
small items like removable
memory cards, thumbdrives, stereo in-ear earphones,
plug and jack adapters. A tough, well-crafted
mini-carrying case. 3" x 2.5" x 0.9" Large
quantity available.

50

CAT# CSE-83

each

50 for 40 each 100 for 35 each

N-CHANNEL MOSFET,
55V 22A 0.06 OHM

SAW III DIGITAL


VOICE RECORDER

N-channel SIPMOS Power


Transistor Vds. 55V, 22A, 0.06 Ohms

30 second voice recorder.


5.50" high. Operates on
2 AAA batteries (included).

CAT# BUZ101S

55

CAT# SAW-3

each

$ 00
each

10 for 50 each
100 for 35 each

24VDC 6.5A POWER SUPPLY

10 for $1.85 each

each

50

$ 40
each

CAT# RLY-532

each

12 VDC 1.5 A SWITCHING


POWER SUPPLY

12V LIGHTED ROCKER


SWITCH, 4-LENSES

10 for $1.00 each

Outside the U.S.A. send $3.00 postage.

75

NuTone # RCDT900.
Convenient test
light for 5-30 Volts
AC or DC. Marketed as a
Door Chime Diagnostic Tool,
consists of an enclosed light
bulb with two test leads.
Light glows, brightness varying with voltage,
when power is present. Leads snap into back
of unit for compact storage.

Input: 100-120Vac,
50/60Hz.
Output: 12Vdc 1.5A.
6' cord. 2.1mm coax
power plug.
Center positive. UL.

3.5mm stereo phone


plugs on each end.
Cable consists of
two shielded single
conductor cables. Great for ipods and other
mini-audio players.

LOW VOLTAGE TESTER

CAT# LVT-2

CALL, WRITE, FAX or E-MAIL


for a FREE 96 page catalog.

24" DUAL-SHIELDED CABLE


W/ 3.5MM PHONE PLUGS

CAT# LRS-143

S.P.S.T., normally-open,
momentary pushbutton
switch. 1.6" diameter metal
body with mounting flanges,
holes on 2.3" centers.
Originally for automotive horn application.
0.84" diameter black push-button,
0.95" overall height. Packaged
with 2 mounting screws.

CAT# PB-156

QUALITY Parts
FAST Shipping
DISCOUNT Pricing

SOLAR CELL
Output: approximately 3 Volts
@ 40 mA. 60mm square x
2.5mm thick epoxy-encapsulated silicon photovoltaic cell.
Solid, almost-unbreakable module with solderable foil strips on backside. Ideal for solarpowered battery chargers and other projects.

CAT# SPL-61
100 for $3.25 each

$ 75
each

Potrans #FS-15024-1M
ITE Power Supply
Input: 100-120V 4A
200-240V 2.3A
Output: 24Vdc 6.5A
150W switching
power supply. Enclosed
metal vented case. 7.875" x
4.35" x 1.96". Over voltage, over current and
temperature protected. LED output indicator.
Adjustable voltage output.
UL, CE, TUV.

CAT# PS-6524

2495

each

www.allelectronics.com

ORDER TOLL FREE


MAIL ORDERS TO:
ALL ELECTRONICS CORP.
14928 OXNARD ST., VAN NUYS, CA 91411-2610

1-800-826-5432
FAX (818) 781-2653 INFO (818) 904-0524

E-MAIL [email protected]

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.
November 2009

55

PICs

GETTING STARTED WITH

THE LATEST IN PROGRAMMING MICROCONTROLLERS

BY CHUCK HELLEBUYCK

EIGHT-PIN PROJECTS
I often receive great article suggestions and sometimes I receive pre-released
products for review. I recently received a development setup that I found
quite interesting, as its targeted at my favorite audiencethe beginner
market. It is called the CHIPAXE system (see Figure 1) and it is designed to
be an open source-style development tool initially based on the PICBASIC
PRO compiler from microEngineering Labs. However, it can also be used
with Assembly or C programming languages. Because the system is open
source, you dont need to purchase a pre-programmed chip. It comes
with a blank, eight-pin PIC12F683 eight-bit microcontroller from Microchip
Technology. You can purchase this part just about anywhere, including from
many of the advertisers in this magazine.
he board is not dependent upon a custom bootloader,
as some open source systems require. The package
relies on an interesting programmer/cable which is actually
a clone of the Microchip PICkit 2 programmer; however,
this isnt the only option. The board can also be used with
an actual PICkit 2 or the latest PICkit 3 programmer, if you
prefer. Ill update you on those programmers a little later.
A breadboard version of the CHIPAXE development board
is also available, and it gave me a great setup to revisit
how to program an eight-pin microcontroller. Many
beginners find it more comfortable to start with a
smaller-sized and less intimidating microcontroller.
The CHIPAXE system uses In-Circuit Serial

FIGURE 1. CHIPAXE Starter Package.

FIGURE 2. Final LED


Traffic Light Project.

Programming technology to program the chip and the


board is powered from the programmer connection, so
you dont need an external power connection. Figure 2
shows the breadboard module wired up to LEDs. I wanted
to create a few simple projects for anyone just starting out
with the PIC12F683. I initially created a traffic light project
using the CHIPAXE board and the sample version of
PICBASIC PRO. This is a great project to show a kid since
a traffic light is something they immediately understand
and it may get them interested in what you can do with a
microcontroller. I will show you the traffic light project and
then a few other sample projects for this small eight-pin chip.

LED TRAFFIC LIGHT


This project reproduces a traffic light with red,
yellow, and green LEDs. The timing of each LED is
separately controlled which allows you to control how
long each color is lit. The project also shows how to
control multiple LEDs from one microcontroller. The
completed project is shown in Figure 2.

HARDWARE
This breadboard is available from All Electronics
(www.allelectronics.com). It has letters designating columns
and numbers indicating rows. This helps me in explaining
the connections for those just getting started with building
electronics. The connection table for this project is
shown next and the schematic is shown in Figure 3.
56

November 2009

G E T T I N G S TA R T E D W I T H P I C s
it turns off. The yellow is connected to the GP1 pin.

Connection Table
Micro
Vdd Jumper
Vss Jumper
Green Jumper
330 ohm
Red LED
Green Jumper
330 ohm
Yellow LED
Blue Jumper
330 ohm
Green LED

Pin 1 at C6
a6 to +rail
j6 to -rail
j7 to j12
i12 to i18
Anode j18, Cathode -rail
i8 to i13
i13 to i20
Anode j20, Cathode -rail
f9 to f15
g15 to g23
Anode j23, Cathode -rail

The software is quite simple because it uses some of


the commands that make PICBASIC PRO easier to use
than many other compilers. The first steps involve making
the I/O digital. When the PIC12F683 is first powered up,
the I/O defaults to analog mode. The I/O pins share a
connection to both analog and digital features. The ANSEL
= 0 command line sets all the I/O pins to digital mode.
Set I/O to digital

The PIC12F683 also has an internal comparator which


can be shut down with the CMCON0 = 7 line.
CMCON0 = 7 Comparator off

The main program loop begins with the label main


followed by a colon. We will use this as a marker in a
future GOTO command line.
main:

The I/O pins on the PIC12F683 are referred to as generalpurpose I/O pins, or GPIO. The internal register that controls
these pins individually is also called the GPIO register. These
can be controlled by writing to the GPIO register directly,
but we would also need to set up the TRISIO register inside
the PIC12F683. The TRISIO determines whether the pins
are digital-input or digital-output pins. Both of these are
automatically controlled with the HIGH or LOW command.
The GPIO.0 is the nickname for the GP0 pin. The
software uses the HIGH command to place a high signal
on that pin. This will light the LED. The PICBASIC PRO
compiler doesnt care if you use capitals or lower case
letters for the commands. The red LED is lit first for two
seconds and then shut off to create the stoplight portion
of the traffic light. All actions are on the GP0 pin which is
connected to the red LED.
HIGH GPIO.0
PAUSE 2000
LOW GPIO.0

Yellow LED on
Delay 1 second
Yellow LED off

The final step is to loop back to the main label to light


the red LED and repeat the process.
GOTO main

Loop Back to Red LED

NEXT STEPS

SOFTWARE

ANSEL = 0

HIGH GPIO.1
PAUSE 1000
LOW GPIO.1

Light Red LED


Delay 2 second
Red LED off

The logical next step is to change the delays to make


the traffic light fit your application. If you wanted to make
a real traffic light from a project like this, then the delays
need to be a lot longer. There are three unused I/O pins, so
adding three more LEDs for another crossing lane of traffic
would be an option. Unfortunately, the GP3 pin is an inputonly pin and cannot drive an LED. This is an example of
where a larger-pin microcontroller might be a better choice.

SENSING A SWITCH
Many projects require some kind of human interface
to control the operation. A momentary pushbutton switch
is a very common way to do this. It can start and stop
the operation, or speed up or slow down what the
microcontroller is controlling. In order to do this,
however, the software needs to recognize that a switch
was pressed. This project shows a simple method of
sensing a momentary pushbutton switch.
The software must monitor the switch continuously as
part of the main loop of code, and then respond. In this
project, the software lights an LED until the switch is
pressed, at which point the LED shuts off. As long as the
switch is pressed, the LED will stay off. As soon as the
switch is released, the LED will once again light up. The
completed project is shown in Figure 4.

HARDWARE
The hardware uses the same red LED connections as
the traffic light project. The addition of the switch is
shown in the schematic in Figure 5. The switch is wired
as a low-side switch which means the circuit has a pull-up
FIGURE 3. LED Traffic
Light Schematic.

The green LED is next and it is lit for the same amount of
time as the red LED. The green LED is connected to the GP2 pin.
HIGH GPIO.2
PAUSE 2000
LOW GPIO.2

Green LED on
Delay 2 second
Green LED off

Finally, the yellow LED is lit for a short time and then
November 2009

57

resistor to five volts so the input to the micro is high when


the switch is not pressed and low when the switch is
pressed. If the parts were reversed where the switch was
connected to five volts and the resistor to ground, then it
would be a high-side switch.
The software will test the input pin GP4 to see if it
changes to low, indicating the switch has been pressed.
The GP4 pin will be configured as an input pin in the
software, so all we need from the hardware is a known
idle state which is determined by the pull-up resistor. The
connection table for the breadboard is as follows:
Connection Table
Micro
Yellow Jumper
Yellow Jumper
Green Jumper
330 ohm
Red LED
Yellow Jumper
Orange Jumper
Orange Jumper
White Jumper
10k ohm
Switch

Pin 1 at C6
a6 to +rail
j6 to -rail
j7 to j12
i12 to i18
Anode j18, Cathode -rail
j22 to -rail
f22 to e22
b22 to b19
b8 to b17
a17 to +rail
d17 to d19

SOFTWARE
The software starts with the same I/O setup, but now
adds a new line to make the GP4 pin an input for the
switch. This command acts on the internal TRISIO register
of the PIC12F683. That register determines whether the
I/O pin is an input or output. Each bit of that eight-bit
register represents a pin. A 1 in the GP4 slot makes it an
input and a 0 makes it an output. The INPUT GPIO 4
command line sets the GP4 pin to a 1 for input mode.
ANSEL = 0 Set I/O to digital
CMCON0 = 7 Comparator off
INPUT GPIO.4

The main label starts us off again, followed by an


IF-THEN-ELSE command from the PICBASIC PRO compiler.
This command will test the equation after the IF, to
determine whether it is true or false. If the equation is
true, then the command
FIGURE 4. Final Switch
following the IF command line
Sensing Project.
will be executed. If it is not
true, then the command
FIGURE 5.
Switch Sensing
Schematic.

following the ELSE line will be executed. In this case, if the


GP4 pin is high meaning the switch is not pressed
then the red LED is lit. If instead the GP4 pin is low
meaning the switch is pressed then the LED is shut off.
main:
If GPIO.4 = 1 then
HIGH GPIO.0
Light Red LED
Else
LOW GPIO.0
Red LED off
ENDIF

A GOTO statement completes the loop and sends


control back to the main label, so the switch can be
tested again.
GOTO main

Loop Back to Red LED

NEXT STEPS
You could add the extra LEDs from the traffic light
project and change to red, yellow, or green with the push
of a button. You could also create a speech timer where
the green indicates time is okay, yellow means time is
running out, and red means time is up. The switch starts
the process. You could also just reverse the logic and have
the LED light when the switch is pressed. This is a very
simple change that Ill let you figure out.
The thing to remember is that the switch represents
several different options. A Sharp GP2D15 obstacledetection sensor can easily replace the switch for robotic
applications. A magnetic reed switch could replace the
switch to create a simple alarm system. Any device that
has a simple open-collector output and a digital on/off
output state can replace the switch.

SENSING LIGHT
The PIC12F683 has a built-in analog-to-digital converter
(ADC), so Ill use that to read a cadmium sulfide (CdS) cell.
A CdS cell or photoresistor is a resistor whose resistance
decreases with increased light exposure. It can also be referred
to as a light-dependent resistor or photoconductor. You can get
a pack of them from RadioShack under part number 276-1657.
The PICBASIC PRO compiler has an ADCIN command
to make this another easy task to complete. I used an eightbit resolution result that worked perfectly. As the light
changes, I have the ADC value
tested. If the result is a high
value (high resistance), then it is
dark out and the LED lights up.
Figure 6 shows the final setup.

HARDWARE
The schematic is very
similar to the switch schematic,
except the switch is replaced by
the CdS cell. The pull-up resistor
is also lower, but it could easily
58

November 2009

G E T T I N G S TA R T E D W I T H P I C s
be replaced by a potentiometer so you have some
sensitivity adjustment. The connection table is shown
below, along with the schematic.
Connection Table
Micro
Yellow Jumper
Yellow Jumper
Green Jumper
330 ohm
Read LED
Yellow Jumper
Orange Jumper
Yellow Jumper
White Jumper
1k ohm
CdS Cell

Pin 1 at C6
- a6 to +rail
- j6 to -rail
- j7 to j12
- i12 to i18
- Anode j18, Cathode -rail
- j22 to -rail
- f22 to e22
- b22 to b18
- b8 to b17
- a17 to +rail
- d17 to d18

SOFTWARE
The start of the software requires a different setup since
we will be using the GP4 pin as an analog input. Using the
binary designation in the PICBASIC PRO compiler allows me
to easily set the AN4 bit of the ANSEL register making it analog,
while the rest of the I/O pins are zero or set to digital mode.
ANSEL = %00001000

Set I/O to digital except


AN3/GP4 is Analog

Once again, the comparators are shut down.


CMCON0 = 7 Comparator off

The state of GP4 has to be set to input mode using


the TRISIO register which can also set the remaining I/O
pins to outputs. GP3 is always an input.
TRISIO = %00011000 GP4 input, GP2 thru GP0
outputs

The ADCIN command requires some setup


parameters to be established such as ADC resolution,
ADC clock source, and sampling time. These are easily
done with DEFINE statements.
Define ADCIN parameters
Define ADC_BITS
8
Define ADC_CLOCK

Define ADC_SAMPLEUS

50

Set number of bits


in result
Set clock source
(3=rc)
Set sampling time
in uS

A variable is established to store the ADCIN result.


adval

var

byte

Create adval variable


to store result

The main label establishes the main loop, followed by


the ADCIN command line where the CdS cell is read.
main:
ADCIN 3, adval

Read channel AN3 to adval

After the value of the CdS cell is stored in the adval


variable, it is compared to the value 150. If it is less than
150, then the LED is off. If the value is greater than 150,

then it is dark and the LED is lit using the HIGH command.
If adval > 150 then
High GPIO.0
ELSE
LOW GPIO.0
ENDIF

Light LED if in the dark


Light all LEDs

Another GOTO statement completes the main loop.


goto main

Loop Back to test


potentiometer

NEXT STEPS
Changing the threshold value from 150 to something
higher or lower will determine how dark it has to be to light
the LED. The limit is 0 to 255 since we used an eight-bit
result. As with the switch project, other sensors can replace
the light sensor. For example, a thermistor could replace the
light sensor to measure temperature. A potentiometer could
be used to create a manual interface. If you remove the pullup resistor, then a Sharp GP2D12 object-detection sensor
that produces a variable output voltage can be directly read
by the analog pin for more accurate robotic obstacle detection.
I would like to create more projects using this great
eight-pin setup, but Im running out of time and space, as
I wanted to cover some news that has happened since my
last article. Give this little eight-pin part a try in your own
setup and see what you can come up with.

PICBASIC PRO COMPILER


In a previous article, I mentioned that you needed to
use Microchips MPLAB IDE version 8.15 or earlier with
microEngineering Labs PICBASIC PRO compiler. This is no
longer the case because microEngineering Labs recently
released a new version of the compiler that works with the
latest version of the MPLAB IDE. The setup instructions are
slightly different from the previous method of getting the
PICBASIC PRO compiler to work within the MPLAB IDE.
Full details are available at http://melabs.com/
support/mplab.htm.
Along with this update comes expanded chip support in
the sample version of the
PICBASIC PRO compiler.
What is really great is that
microEngineering Labs added
the PIC16F88X parts to the
supported microcontroller
list. This allows you to use
eight- to 40-pin parts without
the need for external MCLR
pull-up or crystals/oscillators
in order to test the compiler.
After you use this compiler
for a while, youll find the
full-priced version of it
FIGURE 6. Final Light
Sensor Project.
November 2009

59

available on future parts. These parts will be easily identified


by the four-digit number after the letter F, starting with a 1. More
details are available at www.microchip.com/enhanced.

FIGURE 7. Light
Sensor Project
Schematic.

MICROCHIP DEVELOPMENT TOOLS


Microchip recently released the PICkit 3 Debug
Express and MPLAB ICD 3 tools which offer much higher
programming speeds and better debugging capabilities
than previous versions. There is also a higher-end MPLAB
REAL ICE tool. As new products are released, you will
need the PICkit 3 or MPLAB ICD 3, as the PICkit 2 and
MPLAB ICD 2 will not support PIC16F193X parts.
to be well worth the investment.

MICROCHIPS PIC16F1
MICROCONTROLLER FAMILY
Microchip recently released a new series of PIC16F parts
called the PIC16F193X family. Featuring the companys enhanced
mid-range eight-bit core, these parts offer many more features
than the previous PIC16F family such as higher program memory
(up to 32K), a faster internal oscillator (16 MHz), and a lot more
RAM (up to 4K). This allows these new microcontrollers to offer
more peripherals such as additional timers and PWM
channels. More communication channels are expected to be

&2/.40!.%,3%.#,/352%3
#USTOMIZEDFRONTPANELSCANBEEASILY
DESIGNEDWITHOURFREESOFTWARE
&RONT0ANEL$ESIGNER

s

s


s
s

#OST EFFECTIVEPROTOTYPES
ANDPRODUCTIONRUNS
7IDERANGEOFMATERIALSOR
CUSTOMIZATIONOFPROVIDED
MATERIAL
!UTOMATICPRICECALCULATION
&ABRICATIONIN ORDAYS
3AMPLEPRICE
PLUS3(

WWWFRONTPANELEXPRESSCOM
  
60

November 2009

CONCLUSION
I hope you enjoy the topics Ive covered, but feel free
to let me know your thoughts either way by emailing me
at [email protected]. Ive also started a free
newsletter at www.elproducts.com, so be sure to sign
up for it. As this is my last column before the holidays,
be safe and I hope you have a happy one. NV
Complete code listings are available at www.nutsvolts.com.
NOTE: The Microchip name, logo, MPLAB, and PIC are registered trademarks
of Microchip Technology, Inc., in the USA and other countries. In-Circuit Serial
Programming, PICkit, and REAL ICE are trademarks of Microchip Technology, Inc.,
in the USA and other countries. All other trademarks mentioned herein are
property of their respective companies.

ROBOTICS

PERSONAL

UNDERSTANDING, DESIGNING & CONSTRUCTING ROBOTS & ROBOTIC SYSTEMS

BY VERN GRANER

TRY, TRY AGAIN


I have not failed. Ive just found 10,000 ways that wont work.
Thomas Alva Edison
IF AT FIRST YOU DON'T SUCCEED ... DON'T TAKE UP SKYDIVING! Yes, I
know "try again" has to be one of the oldest work-related clichs. However,
many times if you turn over a dusty old clich, you find a kernel of truth
nestled under it. In this particular case, that kernel is persistence pays. My
direct experience has taught me that nothing is ever as easy as it looks.
Experience has also taught me that when things get complicated, a
methodical and consistent approach is typically the best course of action.
Problems seem to be a natural part of development, so encountering them
should come as no surprise and you certainly shouldn't let possible
(or actual) problems stop you from building. If you've started building, it
means you have something to work on, something to improve.

YOU MAY ASK YOURSELF


HOW DID THIS GET HERE?
Sometimes, when we see a finished project, we can
only picture it in its finished form. It seems as if it sprung
fully-formed from the mind of the creator directly into being.
In my career, this has never been the case. I have to design,
then prototype, then test (lather, rinse, repeat!). I evaluate
what works in the prototype and what doesn't. I then revisit
the design and make changes. Sometimes the creation and
testing of a prototype reveals better ways that the idea might
be implemented. Other times, things just don't work no matter
how the diagrams, datasheets, and experts insist it should!
In this month's article, I'm going to give you a behind
the scenes tour of the more notable projects I've been involved
with and the hidden problems we encountered along the way.
I hope to document how these projects would never have come
to fruition if not for many people's tenacity in overcoming
problems and improvising solutions. I'll begin with one of the
single biggest projects upon which I've worked, The Ponginator.

THE PONGINATOR MK-I


Back in the December 07 issue of Nuts & Volts, I
introduced The Ponginator MK-I, a 20 foot tall smoke-spewing,
light-flashing, music-playing, siren-wailing robot with quad-barrel

pneumatic ping pong ball cannons. It was the centerpiece of The


Robot Group's presentation for the very first Maker Faire in Austin,
TX. In the days leading up to that event, we had struggled with
various issues including multiple prototype ping pong ball propulsion systems, leaky air lines, and a stripped cannon pan motor.
In spite of those challenges, the Ponginator was assembled
on-site the day before Maker Faire opened and performed
much more smoothly than anyone could have imagined. The
Ponginator was an unmitigated success. It operated amazingly
well for something that, in only 30 days, went from a pencil
sketch to towering over the arena floor. This was just the beginning of the Ponginator's career, and more problems would present
themselves as we tried to adapt it to changing requirements.

THE PONGINATOR MK-II


When it came time for the next event, we figured it would
be easy to just bring out the Ponginator and set him right
back up. Unfortunately, when we visited the proposed site, we
discovered that we would be in an outdoor area. In the original
design, we hadn't considered the challenges an outdoor venue
would pose. For starters, the MK-I used a two-story construction
scaffolding as a frame and was wrapped with a tarp. There
was concern over how we would keep the whole thing from
toppling over if the wind picked up. To be safe, we needed
to redesign the frame and find something fairly substantial
to use as an anchor. Time to put on the thinking caps!
November 2009

61

FIGURE 1. The Ponginator MK-II


frame test-fit on the van.

FIGURE 2. Testing the pneumatic


cannons on the new frame.

As we would need transportation to and from the


event anyway, we decided my full-sized Ford van could act
as both the frame and the anchor. We fabricated a new
PVC-pipe frame from scratch that mounted to the top of
the van (Figure 1). We then mounted the crossbar and
hung the pneumatic cannons to make sure they could still
move properly (Figure 2). Though we still had the original
Ponginator "skin," we discovered we would need to make
a new one as the old one had both a hole cut for a video
display (not practical in the MK-II design) and was also
about five feet too big for the new frame.
In spite of having to do a thorough retrofit, on the day
of the show we managed to assemble the Ponginator for the
first time in downtown Austin without any major issues. The
MK-II was a smash hit, thrilling crowds with his siren wail and
catchy dance tunes. This event also saw the unveiling of the
Ping Pong Printer, which didn't exactly go as planned either
(are you seeing a trend here?), but we'll touch on that in a bit.

THE PONGINATOR MK-III


After this last show was done, the Ponginator again
went into a storage shed until the next big event: Maker
FIGURE 4. The Ponginator
MK-III towering 30 feet up
in the air.

FIGURE 5. The Ping Pong


Printer with plastic water
jug hopper.

FIGURE 3. Test-fitting the Ponginator


MK-III on the new bucket lift.

Faire Austin 2008. By the time this event rolled around,


I had sold the van so we no longer had our "base."
However, as luck would have it, my brother Walt had
recently purchased a 30 foot hydraulic bucket-lift for his
construction company and was happy to let us use it.
We brought all the parts out of storage and mounted
them on the lift bucket (Figure 3). After fabricating new brackets,
adding shelves for the speakers, and mounting the air compressor,
we towed the lift out from under the trees and extended it
to its full height of 30 feet (Figure 4). It looked AMAZING!
When it was time for the event, we trucked the lift out
to the Maker Faire show but on the way, one of the gear motors
that positions the cannons stripped due to stresses on the
mounts created by the movement of the trailer while being
towed. We had to quickly swap motors out on the show floor
when we arrived. As before, we put all the new electronics
and pneumatics together for the first time right there at the
show. Once again, the Ponginator lived up to its reputation, not
only earning us another Maker Faire "Editors Choice" Blue Ribbon,
but also being immortalized on a MAKE poster, and then to
headlining on the GeeksAreSexy.com website, among others.
This is a perfect example of how a project can still
enjoy continuous success in spite of changing circumstances if the people involved persist. Which brings us to
the Ping Pong Printer a rather problem-plagued device
that grew out of the Ponginator project.

PING PONG PRINTER PROBLEMS


The Ping Pong Printer was featured in my February 08
column and was basically a solution to an economic problem.
Turns out the Ponginator uses up lots of ping pong balls when
it's in operation. As we wanted the ping pong balls to be souvenirs
(and not just trash), we had some custom-printed ping pong
balls created for the MK-I. Though these worked fine, they turned
out to be very expensive (on the order of about .60 cents each!).
The Ping Pong Printer was designed to allow us to
create our own "ordnance" for the Ponginator. It was built
by a team of folks from The Robot Group including myself
(programming), Rick Abbott (metal/plastic fabrication),
and Marvin Niebuhr (carpentry).

THAT JAMMED JUG!


When I first designed the Ping Pong Printer, a five
62

November 2009

PERSONAL ROBOTICS

DER
MAGNETFELDER
DETEKTOR: DAS
BLINKENBOARD!
by Nyssa Hughes and
James Delaney
As promised, we continue our series on new uses for Das
BlinkenBoard. This month, we feature an amazing and simple mod
from the "UnfocusedBrains" of James Delaney and Nyssa Hughes.
By adding a Hall-effect sensor and a 2K resistor, they have turned
the mild mannered Das BlinkenBoard into a magnetic field
detector! It uses the LEDs as a bar-graph to display both relative
field strength and magnetic pole polarity of magnets held near the
sensor. In their own words, here's how James and Nyssa did it:
Because our home laboratory was without a way to measure
relative magnetic field strength, we figured it was time to build a
simple Gauss meter. Turns out it was really easy! We started by
reading a few datasheets, then settling on a Honeywell SS49
analog position sensor (which is a type of Hall-effect sensor). By
connecting the part to a voltmeter, we were able to detect magnetic fields from various magnets and read voltage levels from the
SS49 to determine the
field's relative strength.
Not wanting to stop
there, we decided to
build a steam-punk
inspired "prop" version of
a magnet detector.
Fortunately, we had a
Das BlinkenBoard on
hand, so James built a
cable to connect the
SS49 to the BlinkenBoard
(FIGURE A). When it
came time to program
the microprocessor on
FIGURE A. Schematic showing how
to connect the SS49 to the
the BlinkenBoard, James
ran into some challenges Das BlinkenBoard.
when he discovered that
the datasheet for the SS49 sensor was very confusing. Our friend
Paul Atkinson came to the rescue (he always seems to be helping
us out!). He read the datasheet and told James that a 2K ohm
"load" resistor would be needed to make the SS49 work according
to specifications. We simply added the resistor and Der
Magnetfelder Detektor (DMD) was born.
Now that we had the unit working, the final step was to build
a snazzy case in which to place the electronics. Since this is a prop
version of a magnet detector, we decided to build it as a piece of
foam covered in an ink jet
color-printed "skin." Nyssa cut
two pieces of foam into a 3" x
5" rectangle to make the case
deep enough. She then cut a
BlinkenBoard-sized hole in
both pieces. As James
designed the custom graphics
FIGURE B. The printed cover for
Der Magnetfelder Detektor.

gallon water jug was sitting on a cooler by the kitchen


table where I was sketching. I envisioned the jug filled
with ping pong balls (like a gumball machine) and a motor
"stirring" the balls to make sure they flowed down the bottle
neck to the printer. I figured that would make a simple
and easy "hopper" to feed blank ping pong balls into the
printer. It looked good on paper and once built, it worked
fine with a handful of ping pong balls. However, once we

FIGURE C. The Das


BlinkenBoard mounted in
the foam enclosure.

for the skin, Nyssa glued the


two pieces of foam together.
The graphic was printed,
sprayed with a layer of
protective acrylic, and cut
out (FIGURE B). The SS49
sensor was taped to the back
of the paper, with the sensor facing up (FIGURE C).
Next, Nyssa stuffed the BlinkenBoard into the foam frame
with the circuit. This allowed room to run all the cables for the
LEDs in the space beneath the circuit board. She pushed the SS49
sensor cable into a gap between the circuit board and the foam,
and plugged it into the circuit board.
Then, it was time to glue the graphic to the foam and drill the
holes. The graphic was glued only to the face of the DMD. Using a
drill press made quick work of the eight holes. With the holes
drilled, Nyssa was about to stuff the LEDs through, but first
needed to figure out which LED was "South." The first LED in the
series is the one that goes into the South hole. The eighth LED is
the one that goes into the North hole.
The LEDs were poked through the holes in sequential order.
After some adjustments, the LED cables got organized, plugged in,
and taped down. Nyssa poked a hole into the side of the papercovered foam through
which to run the power.
She glued the sides of the
DMD and added some
foam feet (FIGURE D).
Now it was time to
play with magnets! By
holding a magnet to the
DMD's printed button, you
can determine the general
strength (i.e., one LED
FIGURE D. The Cables and foam feet
versus eight LEDs) and the
on the bottom of the foam case.
alignment of the magnet.
If the bar graph starts on
the North side, you are holding the North pole of the magnet to
the sensor and vice-versa.
Please let us know if you configure your Das BlinkenBoard as
Der Magnetfelder Detektor. Also, please let us know if you do
something fun and interesting with your own Das BlinkenBoard.
You can send your emails to [email protected].

DER
MAGNETFELDER
DETEKTOR
RESOURCES
Honeywell SS49 Sensor
from Mouser
www.mouser.com/Product
Detail/Honeywell/SS49/?qs=
sGAEpiMZZMvhQj7WZhFIA
LYB7HV1zJHHKzTnhQJMM%
252bM%3d

James Delaneys Blog


www.unfocusedbrain.com/
Nyssa Hughes Blog
www.nyssa.com/
http://en.wikipedia.org/
wiki/Hall_effect
Das BlinkenBoard Web Page
www.DasBlinkenBoard.com
Source Code
www.nutsvolts.com/index.php?
/magazine/downloads/

filled up the entire water jug, the first problem appeared.


At the beginning of the print cycle, the stirring rod
system would activate as designed but, instead of the balls
mixing around, they would "stack up" and stick to each
other. This would cause the stirring rods to bind and
resulted in the motor attempting to back spin, twisting
and eventually tearing up the motor wires.
Upon closer inspection, we discovered that unlike
November 2009

63

the smooth-surfaced gumballs I used for inspiration ping


pong balls are created with an abrasive surface so they can
get traction on the ping pong paddle and table. Unfortunately,
this extra friction caused the balls to stick together in the
jug, jamming the stirring rods. The only way to un-jam the
system was to fill the jug to less than 10% of its capacity
(Figure 5) which really defeated the purpose of the jug
itself. This was about the time we noticed a second
problem with the design (insert deep sigh here).
It seems that rotating the ping pong balls inside the plastic
jug caused them to build up a static electric charge! This
would cause the ping pong balls to cling tenaciously to the
sides of the jug making the stacking/jamming problem worse
and, of course, stopping them from dropping down through
the indexer to the print pedestal (insert second deep sigh here).

DOES SIZE REALLY MATTER?


As we were pondering what to do about the sticking,
stacking, and static problems, our bulk-order of blank white
ping pong balls arrived. We were excited by this good news
and dumped a bunch of these new balls right into the jug
in the hopes they would be smoother and might alleviate
the jamming. No such luck. These new balls jammed the
exact same way. We weren't getting off that easy! We then
dumped out the jug and put just a handful of these new balls
back in for testing. We activated the printer and the first ball
dropped right onto the pedestal for printing as expected
(Figure 6). When the printing was done, the "indexer"
(Figure 7) started to cycle, then jammed without releasing
the second ball. We removed the jammed ball and tried
again. Same thing, the indexer was stuck and would not
release the second ball. A lot of head scratching later, we
discovered the root cause of the indexer jams.
It turns out that there are two "types" of ping pong balls.
The first type is "professional" 40 mm balls and the second
type are "hobby" ping pong balls that are 38 mm. We had
started buying the test balls from local sporting goods stores
and they were of the 40 mm variety. Subsequently, when
Rick had machined the parts, he had used 40 mm as his
reference size. When the indexer would try to cycle, it would
bump into the bottom edge of the next ball in line to be
printed and stall without completing the cycle. Rick took the
FIGURE 6. A ping pong ball on the
print pedestal after printing.

64

November 2009

printer back to his shop and reworked the indexer pushbars to accommodate the 38 mm balls. Once this was
done, the bulk purchased balls worked fine but we still
had the existing multiple water jug issues to contend with.

CHANGE TO CHAIN DRIVE


When Rick had the Ping Pong Printer at his shop to
re-engineer it for the 38 mm balls, he also took time to
look at the plastic jug and try to come up with a new way
to serve ping pong balls to the printer. After a few different
designs were tossed around, he settled on an ingenious
chain drive belt-scoop feed system which he then fabricated
from aluminum, polycarbonate plastic, and steel (Figure 8).
This new system would ferry the balls up to the top of the
Ping Pong Printer, then let them roll down a ramp and drop
into the indexer. This new design solved both the static
problem as well as the stacking/sticking problem, but at the
cost of a bit more software complexity. I had to figure out
how to sense when to run the motor and more importantly
when to stop it. To deal with this, I added an IR beambreak detector to determine when a ball was rolling down
the ramp. A bit of coding had the software turning on the
belt drive motor, waiting for a ball to occlude the sensor,
then switching the motor off. With these modifications, the
new and improved Ping Pong Printer was all ready to go.
Since then, we've used the Ping Pong Printer not just
to make "ammo" for the Ponginator, but to create souvenirs
for many events such as movie premieres (Figure 9), South
By South West Austin, and multiple Dorkbot events. Around
this time, the video of the Ping Pong Printer in action (with
its original water jug) was picked up by a number of tech-blogs
and ended up with over 30,000 views (and counting)!

NOTHING EVER GOES AS PLANNED


The point I'm trying to make with all this detail on what
went wrong and how it was overcome is that we have yet
to encounter a problem that could not be bested with the
proper amount of perseverance. As the above examples
show, given the right motivation and the right people, you
can overcome just about any engineering challenge. Just
expect that Murphy is alive and well and living in your

FIGURE 7. The indexer stage that


controls the fall of balls into the printer.

FIGURE 8. The new chain-drive


ping pong ball hopper.

PERSONAL ROBOTICS

RESOURCES
Maker Faire Austin
http://makerfaire.com/pub/e/2097
Ponginator in Nuts & Volts:
http://nutsvolts.texterity.com/
nutsvolts/200712#pg84

FIGURE 9. The Ping Pong Printer at a movie


premier in Austin, TX.

projects, but with the right team, and/or the right attitude,
he can be evicted. You just have to learn to manage the stress.

HOW DO YOU SPELL SUCCESS?


For many of us (me included!), success is spelled
"S-T-R-E-S-S." When a deadline is looming, you're staring
down the throat of a killer problem, and you have no idea
of how to solve it, it's time to try and regain perspective.
Take a deep breath and a step back. Look at what you're
doing, what you've accomplished, and envision how you
would like things to come out. Remember the bottom line:
Making things is supposed to be fun! Unfortunately, the
price of this type of fun is sometimes a bit of stress
(okay, sometimes more than a bit!). Being nervous, feeling
pressure, getting headaches, lack of sleep, worrying, and
then worrying some more, then worrying about worrying
... The point is to "keep your eye on the prize."
Bear with me as I wax a bit philosophical here; projects
like these are supposed to be the events that when you
look back on your life clearly stand out as landmarks along
the twisted path of this mortal coil (hmm ... I wonder how
many uH a mortal coil has ... but I digress ...). I don't know
about you, but when I turn around and examine my life
there are long gray blurs of continuous, monotonous, "work."
Swaths of the regular "nine to five" stuff that consumes much
of my life. Honestly, I can't tell you what I was doing at
this time and date exactly 10 years ago, or even 10 months
ago! However, I can tell you all about my first Maker Faire
in San Mateo, CA and going out to San Francisco to
attend RoboGames. I can tell you about the first First
Night Austin, and the second First Night Austin, and I can
also tell you all about the first Robot Group meeting I
attended. I can tell you all about the first article I had
published in this magazine (yes, writing can be a project!).
For me, these projects really stand out when I look
back on my life. I can also tell you that each and every
one of these memorable events was surrounded by stress.
It was the price of admission. The interesting part is that
each of us gets to set that ticket price. If we choose to
relax, take the long view, and realize this isn't rocket

FYHywJw
The Ponginator featured on
GeeksAreSexy.com:
www.geeksaresexy.com/2009/02/
10/feature-the-ponginator-arobotic-combination-of-kingkong-and-ping-pong/

The Robot Group


www.TheRobotGroup.org

The Original Ping Pong


Printer Video:
www.youtube.com/watch?
v=8Ep5OC3E02I

The Ping Pong Printer in


Nuts & Volts
http://nutsvolts.texterity.com/
nutsvolts/200802#pg14

The Ping Pong Printer on the net:


http://tinyurl.com/161

The Original Ponginator Video:


www.youtube.com/watch?v=iPSo

The Creation of the Thereping


http://nutsvolts.texterity.com/
nutsvolts/200604#pg50

science (well ... maybe in some cases it is), it might help


to reduce that price.
Remember: ELECTRONICS IS SUPPOSED TO BE
FUN! Treat it accordingly. Build a project, draw a drawing,
create a monster, find a team, form a team, do something
that challenges you. Take some chances. But for cryin' out
loud, HAVE FUN with it! And please, PLEASE take care of
yourself so you can be healthy and ready to PLAY! If you
have questions, comments, or would like to share your
project experiences, feel free to drop me an email. As
always, I can be reached at [email protected]. NV

November 2009

65

ELECTRONET
AM/FM Broadcasters Hobby Kits
Learnng Kits Test Equipment
...AND LOTS OF NEAT STUFF!

Y
Perfect for
Solde our
rless School & Hobby
Bread
projects!
board

www.technologicalarts.ca

Just Adapt9S12C
plug
it
Into

Electronic Parts & Supplies


Since 1967
66

November 2009

SPI, SCI
CAN, RS232
10-bit A-to-D
Hardware PWM
Input Captures
Output Compares
32K or 128K Flash
3V/5V Operation
Asm, BASIC or C

For the ElectroNet online, go to


www.nutsvolts.com and click Electro-Net

#16

series!
g with this
our
Follow alon
available in
re
a
s
it
k
&
volts.com
Joes book
t www.nuts
webstore a

Arduino, Some
Loose Ends

by Joe Pardue

e are nearing the end of our Workshops that


introduce the Arduino Projects Kit (available from
Nuts & Volts and Smiley Micros). This month,
we will look at several seemingly unrelated topics that we
will need to understand before next months article on
simple motor speed control. We will learn about external
interrupts, using the Arduino IDE Serial Monitor to get real
data from the PC serial port to the Arduino board, and
optical isolation of voltages.

Using External Interrupts


To Detect Edges
One of the things you might want a microcontroller to
do is perform a service only when a certain external event
occurs. For instance, you could put an IR laser beam across
a door and have the microcontroller monitor the beam so
that when someone passes through the door breaking the
beam, the microcontroller turns on the lights (or drops a
bucket of water on the intruders head or some such action).
If this is the only thing the microcontroller has to do, then

it can be dedicated to polling the sensor full time in the loop()


function where it would repeatedly run an isItTrippedYet()
function that checks the sensor. Polling would drive a person
nuts (think of driving kids who are yelling: are we there
yet, are we there yet, are we there yet) but fortunately
microcontrollers dont (yet) care what they are doing, so
dont feel sorry for them if you give them a really boring
task. Anyway, its not like they can retaliate (yet).
Consider the case where a system has lots of other tasks
to perform (maybe its monitoring dozens of doors and the
water levels in all the drop buckets). If it is polling each
sensor, then someone could enter the room and be beyond
the drop zone before the system even knows they are there.
It is very common to conceptually divide up a microcontrollers
work into two
groups: one group FIGURE 1. Optoisolation Test Layout.
of routine tasks
that can be done
any old time and
another group of
special tasks that
FIGURE 2. Edge
Detection Schematic.

November 2009

67

must be done immediately when an external event occurs.


It is so common, in fact, that most microcontrollers have
built-in interrupt peripheral circuitry to accomplish the task.
This circuitry monitors a pin voltage and when a
certain condition happens such as was high, now low, it
generates an interrupt that causes the main program flow
to halt, store what it was doing in memory, and then
the system runs the function that was assigned to the
interrupt. When that function finishes, the system state is
restored and the main program runs again.
You mainly deal with interrupts in one of two ways. If
a simple task is all that is required and the rest of the program
doesnt need to know about it, then the interrupt service
routine can sneak in, handle it, then sneak back out without
the main code ever knowing. If, however, a complex task
that takes a lot of time away from the main program (yes,
it is all relative) needs to be performed, then the interrupt
routine should set a flag (change the value of a variable
that both it and the main program can see) so that the main
program can check that flag as part of the loop() and deal
with the consequences of the interrupt when it gets time.
The Arduino library function attachInterrupt(interrupt,
function, mode) simplifies the chore of setting up and using
an external interrupt. The interrupt parameter is either 0 or
1 (for the Arduino digital pin 2 and 3, respectively). The
function parameter is the name of the function you want
to call when the interrupt occurs (the interrupt service
routine). The mode parameter is one of four constants to
tell the interrupt when it should be triggered:
LOW: Trigger when the pin is low.
CHANGE: Trigger when the pin changes value.
RISING: Trigger when the pin rises from low to high.
FALLING: Trigger when the pin falls from high to low.

Hopefully, you still have your IR detector set up on the


breadboard from before (see Workshop 15; Figures 7, 8, and
9). All you need to do in the hardware is move the signal wire
from the Arduino Analog pin 0 to the Digital pin 2 as shown
in Figure 2, then run the Edge_Detect_Interrupt software. In the
former setup, we used the ADC to measure an analog voltage,
but this time all we will sense is that the voltage is high enough to
represent a digital ON or low enough to represent a digital OFF.
Run the Edge_Detect_Interrupt software and waggle
your finger in front of the sensor to get a count like shown
in Figure 3. Next month, we will use this concept to
detect the passing of black and white stripes on a motor
FIGURE 3. Edge Detect Interrupt Counter.

68

November 2009

encoder wheel to control the speed of that motor.


Edge Detect Interrupt Software
// Edge_Detect_Interrupt
// Joe Pardue 6/28/09
volatile int count = 0;
void setup()
{
// setup the serial port
Serial.begin(9600);
// say hello
Serial.println(Edge Detect Interrupt);
// attach interrupt 0 (pin 2) to the
// edgeDetect function
// run function on falling edge interrupt
attachInterrupt(0,edgeDetect, FALLING);
}
void loop()
{
// do nothing
}
// on each interrupt
// increment and show the count
void edgeDetect()
{
count++;
Serial.print(count);
Serial.println();
}

Getting Real With Serial Input


The Arduino IDE provides a simple Serial Monitor (PC
side serial terminal program) and some serial communications
functions that allow you communicate with the Arduino
board. These functions do a good job in sending serial
text from the Arduino to the PC, but (IMHO) not such
a hot job of receiving data from the PC. The Serial.
available() function tells you when there is a character
available on the serial port, and the Serial.read() function
will fetch that character for you. However, the Arduino does
not provide (that I know of) any Arduino-like simplified way
to deal with those characters once youve got them.
I contrast this weakness of sorts to a real strength of
the C programming language: The C Standard Libraries contain
a wealth of functions for dealing with data input over a serial
port. I want to emphasize that you can use those C libraries
with the Arduino IDE, but that kind-of defeats the purpose
of Arduino. I touched on this a bit in an earlier article where
I differentiated between TAW (The Arduino Way) and ACW
(A C Way), so my approach will be to show what you can
do with TAW and save the C libraries for later discussion of
ACW. I will present an Arduino program that uses logic that
mimics one of those C library functions atoi() (ascii to
integer) that will allow us to input a sequence of numeric
characters using the Arduino Serial Monitor and then convert
those characters to an integer data value from 0 to 65535.
This will be used next month to set the motor speed.
In Workshop 13, we built a Number_Commander that
allowed us to pick a tune to play by entering a numeric

SMILEYS WORKSHOP
character in the Arduino
IDE Serial Monitor. While
that was cool, it limited us
to 10 choices based on input
of the characters from 0
to 9. We werent actually
looking at the numbers
0 to 9, but the ASCII
character code that
represents those numbers.
This is an important
distinction because the
FIGURE 5. QRD1114 and 4N25 schematic symbols.
numeric characters are
coded with values that
int myNum[6];
are not the same as what
int myCount = 0;
FIGURE 4. 4N25 Optically
int i = 0;
we would normally think
Coupled Isolator.
int n = 0;
of as the value of that
character. The character 0 is not coded with a value of 0,
void setup()
{
but with an ASCII code value of 48. Each subsequent
Serial.begin(9600);
numeric character (1 to 9) is coded as 49 to 57. The ASCII
Serial.println(ASCII_To_Integer);
}
values of 0 to 9 are codes for the communication device
(for instance, the ASCII code 7 was used to ring a bell;
void loop()
other low numbered codes were used to do things like
{
// get characters until receiving !
advance printer paper or return the print head to the left).
while( myInput != ! ) getNum();
There are historic reasons for this coding scheme, but for
now just look at an ASCII chart (www.asciitable.com) and
// convert end-of-number character ! to 0
myInput = 0;
accept that when doing serial communications, sending
myNum[myCount] = 0;
numbers from 0 to 127 actually represents the characters
// convert ASCII string to integer
or actions shown in the chart.
ATOI();
The Arduino IDE Serial Monitor allows you to send characters
from your PC keyboard, but if you want to send a real number,
// clean up and do it all again
clearAll();
say 127, then we have to have some way of receiving the
}
characters 1, 2, and 7, and some end-of-number character
// Put serial characters in a character array
such as ! so that the software can know that number
void getNum()
sequence has ended. We write a program on the Arduino
{
that stores numeric characters until it sees a !, then converts
if(Serial.available())
{
those characters to the number they represent. For instance,
myInput = Serial.read();
we could send six characters (42356!) and then convert those
// put the character in the array
characters to an integer with a numeric value of 42,356.
myNum[myCount++] = myInput;
}
Rather than spend a lot of space with further explana}
tions, well just look at the program ASCII_To_Integer.
void ATOI()
Please be aware that this program can be easily spoofed
{
with bad input, but for learning purposes it will suffice.
// algorithm from atoi() in C standard library
If you want a real computer programming moment,
n = 0;
for(i = 0; myNum[i] >= 0 && myNum[i] <= 9;
first think about how you would collect a sequence of
++i)
numeric characters and convert them to a number. Then,
n = 10 * n + (myNum[i] - 0);
walk through this code with a pencil and piece of paper
// show the number
especially the ATOI algorithm that extracts the number
Serial.print(You sent: );
from the character string. The guys that came up with stuff
Serial.println((unsigned int)n,DEC);
}
like this were not only clever, they wrote some amazingly
efficient code.
void clearAll()
//
//
//
//
//
//

ASCII_To_Integer 8/1/09 Joe Pardue


Duplicates (somewhat) the C Standard Library
function atoi() algorithm using Arduino.
Note that there is no filtering of the input
so if you enter something other than an integer
value from 0! to 65535!, well, good luck.

int myInput = 0;

{
myCount = 0;
for(i = 0; i < 6; i++)
{
myNum[i] = 0;
}
Serial.flush();
}
November 2009

69

You can find the source code and supplements for this article in Workshop16.zip at www.nutsvolts.com.

FIGURE 6.
Optoisolator
Test Circuit.

Optical Isolation of Voltage


Have you ever had an EKG and noticed that those
wires patched to your chest on either side of your heart
go to a machine that is plugged directly into a wall socket
capable of providing mains voltage? You might even have
gotten so excited about the prospect of being electrocuted
in the doctors office that you were able to make the EKG
go wild with all kinds of crazy beeps.
There are many ways to assure that voltages stay
separated. The two main ones are electromagnetic

The Arduino Projects Kit


Smiley Micros and Nuts & Volts are selling a
special kit: The Arduino Projects Kit. Beginning with
Workshop 9, we started learning simple ways to use
these components, and in later Workshops we will
use them to drill down into the deeper concepts of C
programming, AVR microcontroller architecture, and
embedded systems principles.
With the components in this kit you can:
Blink eight LEDs (Cylon Eyes)
Read a pushbutton and eight-bit DIP switch
Sense voltage, light, and temperature
Make music on a piezo element
Detect objects, edges and gray levels
Optically isolate voltages
Fade LED with PWM
Control motor speed
And more
A final note: The USB serial port on the Arduino
uses the FTDI FT232R chip that was discussed in detail
in the article The Serial Port is Dead, Long Live the
Serial Port by yours truly in the June 2008 issue of
Nuts & Volts. You can also get the book Virtual Serial
Programming Cookbook (also by yours truly) and
associated projects kit from either Nuts & Volts or
Smiley Micros.
70

November 2009

isolation with transformers and optical


isolation with LED/phototransistor
pairs. We will look at the latter as a
way to connect a signal between a
microcontroller at five volts to a motor
at nine volts so that we can prevent the
digital equivalent of a coronary in our
microcontroller.
Figure 4 provides a drawing and
schematic symbol for our optical isolator.
You can see that the QRD1114 IR
Reflective Object Sensor we looked at in
Workshop 15 and the 4N25 Optically
Coupled Isolator that we are about to look
at have similar schematic symbols (see
Figure 5). Note that the main difference
is that the QRD1114 shows a dark bar
between the LED (emitter) and the phototransistor
(detector) subcomponents. These parts are nearly identical
from an electronic perspective. The primary difference is
the packaging.
The QRD1114 detector is shielded from the emitter
and can only see the IR if it is reflected back to the device.
The 4N25 emitter shines directly onto the detector. The
QRD1114 detector will pass a current proportional to the
reflected IR, thus the signal level is dependent on the
external reflective object, while the 4N25 directly
responds to the amount of IR coming from the emitter
it can produce a current through pins 5 and 6 directly
proportional to a current through pins 1 and 2. If you did
something really dumb like connect a wire from a wall
socket to pin 1 on the 4N25, youd fry the LED. However,
none of that voltage would pass through to the device
connected to pins 4 or 5. This gives us a way to transfer
the information in a signal from one circuit to another
using light and without having any electrical connection
between those circuits.
In next months Workshop, we will use this device to
isolate a PWM signal at one voltage level, five volts from
our Arduino, and scale it to another voltage level (nine
volts) for our motor driver.

Optical Isolation Component,


Schematic, and Layout
Our hardware demonstration of these concepts uses a
five volt signal from the Arduino pin 9 on the emitter side
that is converted by the 4N25 to a nine volt signal on the
detector side. Wire this up as shown in the schematic in
Figure 6, and the drawing in Figure 1.

Optical Isolation Source Code


To test this with software, use the ASCII_To_Integer
program shown earlier and add just three lines of code.
The first two you should add at the top of the file in the
variables list are:

SMILEYS WORKSHOP
int value = 0;

//
//
int ledpin = 9; //
//

variable to keep the actual


value
light connected to digital
pin 9

Add the third line shown below between the ATOI()


and clearAll() functions in the loop() function. The full
code is in PWM_Test in this months source code
download on the Nuts & Volts website.
// convert ASCII string to integer
ATOI();

resistor. The isolated LED is driven by +9 volts through a


1K ohm resistor to pin 5 of the 4N25, through the
phototransistor, out pin 4 to the LED.
And thats it for loose ends. Next month, we tie this
all together and control the speed of a DC motor. NV

Did you know that if youre a paid subscriber to Nuts & Volts,
you can get the online version for FREE?

Go to

// control the brightness of an LED


analogWrite(ledpin, n);
// clean up and do
// it all again
clearAll();

The integer received


from the PC (n) is
convertedto a PWM
signal on the Arduino
pin 9. The PWM will
cause the LED
brightness to be
proportional to the
input value (within
limits). We will discuss
PWM in moredetail
next month when we
use it to control the
speed of a DC motor.
The LED on the left
is directly driven by the
Arduino pin 9 through
a 1K ohm resistor and
that pin also drives
the IR LED in the 4N25
through a 150 ohm

www.nutsvolts.com

Give a Gift.
Gift,
GET a Gift!
Give a one year (12 issues)
subscription to a friend and receive
a FREE one year subscription for
another friend or yourself!

Go to

www.nutsvolts.com
to enter your gift order!
Be sure to use promotion code Y9WXMS when ordering.

U.S. Price

Subscribe online or call:

1 Yr $26.95

877-525-2539 (toll free) / 818-487-4545 (outside US)

6ISIT/UR
7
HTTPWW EBSITE!T
WELEXPC
OM

-(:37%%0
&5.#4)/.'%.%2!4/23
7AVEFORM&UNCTIONS )NT%XT
#OUNTER LINLOGSWEEP
-/$%,&' 
-/$%,&' 
.O$IGITAL$ISPLAY
$IGIT$ISPLAY










$# 0/7%2 3500,)%3


/3#),,/3#/0% -/$%, (9 n $)')4!, $)30,!9





-/$%,'/3 

6ARIABLEOUTPUT  6$#  !MP

$UAL#HANNEL
n -(:

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



4WO 6$#  !MPVARIABLEOUTPUTS 


).#,5$%3 02/"%3 PLUS6!lXED$IGITAL$ISPLAY

3/,$%2).' 34!4)/.



 "%34 3%,,).' 


34!4)/.
7,#

!,,)'!4/2 ,%!$3

-/$%,$-2

2ANGESn $IGIT
 
-/$%,-9 


3%4/&  





!#$#6OLT#URRENT 2ES#AP
&REQUENCY2UBBER(OLSTER)NCLUDED

   


37)4#(%3
  0/4%.4)/-%4%23
#ERMET 3433ERIES `` `
0/3$)0 6$)033  
4OGGLE-INI30$4 4/'3$ -  
4OGGLE-INI$0$44/'$$ -  

-ULTITURN -443ERIES `` `


0ANEL-OUNT 0-!3ERIES ` `
3TANDARD6ALUES!VAILABLE

()'( 0%2&/2-!.#%
 7)2% )2/.
 

2EVERSES
DIRECTION
WHENEVERIT
DETECTSNOISE
ORTOUCHESAN  
OBSTACLE




3/5.$ 3%.3/2 #!2


2%15)2%33/,$%2).'



$2

$)')4!, -5,4)-%4%2

6ARIABLESPEEDTOOL 
20- WITHACCESSORYKITINA
HARDPLASTICCARRYCASE

-/$%,7,#

"%.#( $-- 7)4( 23 ).4%2&!#%


4RUE2-3 DIGITALANDBAR
GRAPHDISPLAY !#$##AP 2ES
FREQUENCYFUNCTIONS)NCLUDES
SOFTWARE !#OR$#OPERATION

2/4!294//,+)4

$)')4!,

-5,4)-%4%2  


350%2
%#/./-9



-/$%,"
   

$-"

-/2%
,OW 0RICED
)TEMS)N/UR

&2%%

 0AGE
#ATALOG

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

 "LAIR 2OADs!VENEL .* 


)N .*   
&!8
  
  

HTTPWWWELEXPCOM
EMAIL ELECTRON ELEXPCOM


November 2009

71

We hav e ov e r 170 r elat e d t i tles in our webs tor e!!

The Nuts & Volts WEBSTORE


CD-ROMS SPECIALS
The Amateur Scientist 3.0
The Complete Collection
by Bright Science, LLC
There are 1,000
projects on this CD,
not to mention the
additional technical
info and bonus
features. It doesnt
matter if youre a
complete novice
looking to do your
first science fair
project or a super tech-head gadget freak;
there are enough projects on the single
CD-ROM to keep you and 50 of your
friends busy for a lifetime!
Reg $26.99
Sale Price $23.95

ELECTRONICS
Beginners Guide to Embedded C
Programming Volume 2
by Chuck Hellebuyck
In this Volume 2,
Chuck takes the
reader to the next
level by introducing
how to drive
displays, how to use
interrupts, how to
use serial communication, and how to
use the internal
hardware peripherals
of the PIC16F690
microcontroller such
as SPI, PWM, and timers.
When you have finished reading this book
and completed the projects, youll be well
beyond the title of Beginner!
$39.95
The components that are added to the
PICKit 2 that Chuck uses in his new book
can also be purchased through the Nuts &
Volts Webstore.
$12.95

Running Small Motors with PIC


Microcontrollers
by Harprit Singh Sandhu
The only comprehensive guide to
using PIC microcontrollers to drive
small motors.
Running Small
Motors with
PIC Microcontrollers
contains more than
2,000 lines of
PICBASICPro code and
dozens of circuit
diagrams with the focus
on controlling motors.
Hands-on tutorials,
program listings, and resources are
included. $29.95
72

November 2009

Build Your Own Electronics


Workshop
by Thomas Petruzzellis
YOUR DREAM ELECTRONICS LAB
IS WAITING INSIDE!
This value-packed
resource provides
everything needed to
put together a fully
functioning home
electronics workshop!
From finding space to
stocking it with components to putting the
shop into action
building, testing, and
troubleshooting systems popular electronics author Tom Petruzzellis Build Your
Own Electronics Workshop has it all! And the
best part is, this book will save you money,
big time!
Reg $29.95 Sale Price $24.95

Op Amps for Everyone,


Third Edition
by Bruce Carter and Ron Mancini
OP AMPS
FOR EVERYONE
provides the theoretical
tools and practical
know-how to get the
most from these
versatile devices - this
new edition substantially
updates coverage for low-speed and
high-speed applications, and provides step
by step walkthroughs for design and
selection of op amps and circuits.
$79.95*

Encyclopedia of Electronic
Circuits, Volume 7
by Rudolf F. Graf / William Sheets
NEW IN THE BESTSELLING SERIES!
ONE THOUSAND MORE LEADINGEDGE CIRCUIT DESIGNS!
Designed for quick
reference and
on-the-job use, the
Encyclopedia of Electronic
Circuits,Volume 7, puts
over 1,000 state-of-theart electronic and
integrated circuit
designs at your
fingertips. Organized
alphabetically by
circuit type, this all-new collection includes
the latest designs from industry giants such
as Advanced Micro Devices, Motorola,
Teledyne, General Electric, and others.
$39.95

Haywired
by Mike Rigsby
Construct a no-battery electric car toy that
uses a super capacitor, or a flashlight that
can be charged in
minutes, then shines for
24 hours.Written for
budding electronics
hobbyists, author Mike
Rigsby offers helpful
hints on soldering, wire
wrapping, and
multimeter use. Each
project is described in
step-by-step detail with
photographs and circuit
diagrams. Includes websites listing,
suppliers and part numbers.
$16.95

Order online @ www.nutsvolts.com


Or CALL 1-800-783-4624 today!
BOOK & KIT COMBOS

THE EVIL GENIUS SERIES

From the
Smiley Workshop
C Programming for
Microcontrollers
by Joe Pardue
Kit $66.95
Book $44.95
Do you want a low cost way to learn C programming for
microcontrollers? This 300 page book and software CD show you
how to use ATMELs AVR Butterfly board and the FREE WinAVR C
compiler to make a veryinexpensive system for using C to develop
microcontroller projects.
Combo Price $99.95 Plus S/H

Virtual Serial Port Cookbook


by Joe Pardue
As talked about in the
Nuts & Volts June issue,
Long Live The Serial Port
Kit $69.95
Book $44.95
This is a cookbook for communicating between a PC and a microcontroller using the FTDI FT232R USB UART IC.The book has lots of
software and hardware examples.The code is in C# and Visual Basic
Express allowing you to build graphical user interfaces and add serial
port functions to create communications programs.

The Virtual Serial Port Parts Kit and CD


( also available, above right )
Reg. Price $ 114.90
Subscriber Price $109.95 Plus S/H

The Getting Started Combo includes: Getting Started in Electronics by


author Forrest Mims and the DIY Electronics Kit. In his book, Mims
teaches you the basics and takes you on a tour of analog and digital
components. He explains how they work and shows you how they can
be combined for various applications.The DIY Electronics Kit allows
for the hands-on experience of putting circuits together the kit has
over 130 parts! No soldering is required and it includes its own 32
page illustrated manual. Combo Price $62.95 Plus S/H

CD-ROMS

November 2009

73

CALL 1-800-783-4624 today!


Or Order online @ www.nutsvolts.com
PROJECTS
Double WideSun Tracker Kit

Arch-Ball Clock PCB & MCU

The microprosessor controlled Xmas Tree


comes with eight preprogrammed light
display sequences. All you need is a soldering iron, a couple of batteries, and youll be
ready to show off your electronic tree!
To see a demo video please
visit www.nutsvolts.com
Subscribers Price $38.95
Non-Subscribers Price $41.95

The Double Wide Sun Tracker is one of the


great projects from the new series of
articles by John Gavlik, Experimenting with
Alternative Energy, In Parts 4 and 5, he
teaches you how to get the most out of
your PVs within the full day of sunlight.
For kit details, please view our webstore.
Subscribers Price $94.95
Non-Subscribers Price $99.95
A Nuts & Volts exclusive kit.

This unique clock allows the hobbyist to


be involved with a little wood working, as
well as the electronics side of the project.
We just supply you with the custom
shaped printed circuit board and the
programmed MCU.Youll have to go
digging in your workshop for the other
components and wood.
Subscribers Price $25.75
Non-Subscribers Price $28.25
Arch templates can be downloaded from the
Nuts & Volts website.

NixieNeon Clock Kit

Transistor Clock Kit

Christmas Tree Kit


an .
t
des
Incu e reprin
l
artic

e!
Sal

Using Neon and Nixie bulbs, this clock displays the precision movement of time and
is programmable to display Time Chaos
at different intervals.The NixieNeon Clock
then resets itself to the correct time in an
eye-catching ballet of luminosity.
The PCB is 7.25"x 7.25" and consists of
over 400 components.
Subscribers Price $186.00
Non-Subscribers Price $195.95
PCBs can be bought separately.

Nixie Tube Clock Kit

October 2006

Nixie tube clocks fuse the spirit, drama,


and eerie beauty of cold war technology
with modern inner works to create
uncommon handcrafted timepieces.
Now with optional case choices!
Get more info @
www.nutsvolts.com
Subscribers Price $146.95
Non-Subscribers Price $159.95

Kit includes article reprint, complete instructions


and parts list.

74

November 2009

8 Bit PIC Microcontroller


Development SchmartModule A

If you like electronic puzzles, then this kit


is for you! There are no integrated circuits;
all functionality is achieved using discrete
transistor-diode logic.The PCB is 10x11
and harbors more than 1,250 components!
For more info, see page 42, this issue.
Reg $225.95
Sale Price $199.95
PCBs can be bought separately.

This PIC Microcontroller Development


board supports 116 different 8 bit SOIC
PIC Microcontrollers.This board is fully
populated except for the PIC.You handsolder the PIC using the "EZ" technology
from Schmart Board, configure the jumpers
for your PIC part number, and
start programming.
For more on EZ technology, please see
this product in our webstore. $14.95

Das BlinkenBoard Kit

Retro Game Kit

This kit includes a preprogrammed


ATtiny84 microcontroller that sports eight
software PWM channels to control motor
speed and light brightness. Jumper
selectable patterns can be used to operate
motors, solenoid valves, relays. Expand your
board with GNU/GPL software updates to
be featured in upcoming NV articles.

Subscribers Price $32.45


Non-Subscribers Price $35.95
PCBs can be bought separately.

Sale
!
Build your own
BLAST from the Past!
This is sure to be a hit for all ages! Easy to
build in an evening and will give you many
more fun filled evenings mastering the
Retro Rover or Retris games.
Games come preprogrammed on
individual MCUs
Reg $44.95 Sale Price $29.95
Limited Time Offer

WE ACCEPT VISA, MC, AMEX, and DISCOVER. Prices do not include shipping and may be subject to change.

At t en t ion Subsc r ibe r s ask abou t your discoun t on pr ic es mar ke d wi t h an *

The Nuts & Volts WEBSTORE


ALTERNATIVE ENERGY
SECTION
The Complete Idiots Guide to
Solar Power for Your Home
by Dan Ramsey / David Hughes

Renewable Energies for


Your Home
by Russel Gehrke
Simple and Inexpensive Renewable
Energy Solutions for Your Home.

The perfect
source for solar
power fully
illustrated.This
book helps
readers understand the basics of
solar power and
other renewable
energy sources,
explore whether
solar power
makes sense for
them, what their options are, and whats
involved with installing various on- and
off-grid systems. $19.95

It's not always easy


being green, and
sometimes it costs
more than you'd
expect to get an
eco-friendly home
improvement project up and running.
Renewable Energies
for Your Home gives
you sustainable
home energy solutions that won't drain
your wallet or the power grid. Filled with
step-by-step instructions and helpful photos and illustrations. $24.95

Build Your Own Plug-In Hybrid


Electric Vehicle
by Seth Leitman
A Step-by-Step Guide to Building a
Plug-In Hybrid Electric Vehicle
from the ground up
Build Your Own Plug-In
Hybrid Electric Vehicle
puts you in the
driver's seat when it
comes to hitting the
road in a reliable,
economical, and
environmentally
friendly ride.
Inside, you'll find
complete details on the hybrid powertrain and all the required components,
including the motor, battery, and chassis.
$24.95

Build Your Own


Electric Motorcycle
by Carl Vogel
A practical guide for building an
electric motorcycle from the ground up.
Complete with
hundreds of
step-by-step pictures,
charts, and graphs for
the latest and most
efficient technologies,
this new TAB Green
Guru Guide shows you
how to build an electric motorcycle from
scratch. Written by an electric vehicle
expert, Build Your Own Electric Motorcycle
provides current data on all required
materials, components, and
specifications. $24.95

$39.95*

SPECIAL OFFER
Making PIC Microcontroller
Instruments and Controllers
by Harprit Sandhu
Harness the power of
the PIC microcontroller unit with
practical, commonsense instruction from
an engineering expert.
Through eight
real-world projects,
clear illustrations, and
detailed schematics,
Making PIC Microcontroller Instruments and
Controllers shows you step-by-step how to
design and build versatile PIC-based
devices. Reg $49.95
Sale Price $42.95
November 2009

75

CLASSIFIEDS
SURPLUS

BOOKS

SOLAR
PRODUCTS/KITS

%RRNV
3,&0LFURFRQWUROOHU
VTFRP

6WHSSHU0RWRUV
VWHSSHUVWXIIFRP

COMPONENTS

&1&

LCDs/DISPLAYS

FQFLQWURFRP

 
+D\GHQ,'86$

Nixie Power

MICROCONTROLLERS

2-16V In, 4-8W / 150-200VDC Out


0.95" x 0.95" x 0.35"
$9.95 (Shipping included)

www.tayloredge.com/nixie

(+&3
 

)*+,-./!0, 1#
2$/!0,

 
 
    
 !"
#$%  & 
   '& 

www.servomagazine.com

KITS/PLANS

(' 4$5



MicroStamp11
Worlds Smallest 68HC11
Microcontroller Module!

50 MHz auto ranging frequency


Counter.
Counter. Pic microprocessor.
microprocessor.
V iewing from 1Hz-50MHz
Complete kit
$49.95 + $5.95 S&H
Order:
www.Invent-Electronics.com
www.Invent-Electronics.com
Or: 304-203-5957

z telemetry
z smart toys
z animatronics
z microrobotics
z model
railroading
z home
automation
Ideal for college
and hobby projects!

z tiny, light-weight module


z choice of 8K or 32K EEPROM
z SCI, SPI, pulse accumulator
z generate pulses, PWM, etc.
z measure time, frequency, etc.
z 14 digital I/O lines + interrupts
z use Assembler, BASIC, or C
z lots of code examples/tutorials
z easy Windows code-loading
z Starter Packages from $49

www.MicroStamp11.com

www.nutsvolts.com
76

November 2009

THE OWNERSHIP, MANAGEMENT,


AND CIRCULATION STATEMENT OF
NUTS
&
VOLTS
MAGAZINE,
Publication Number: 1528-9885 is
published monthly. Subscription price
is $26.95. 7. The complete mailing
address of known office of Publication
is T&L Publications, Inc., 430
Princeland Ct., Corona,Riverside
County, CA 92879-1300. Contact
Person: Tracy Kerley. Telephone:
(951) 371-8497. 8. Complete Mailing
address of Headquarters or General
Business Office of Publisher is T&L
Publications, Inc., 430 Princeland Ct,
Corona, CA 92879. 9. The names and
addresses of the Publisher, and
Associate Publisher are: Publisher,
Larry Lemieux, 430 Princeland Ct.,
Corona, CA. 92879; Associate
Publisher, Robin Lemieux, 430
Princeland Ct., Corona, CA 92879.
10. The names and addresses of
stockholders holding one percent or
more of the total amount of stock are:
Jack Lemieux, 430 Princeland Ct.,
Corona, CA 92879; Larry Lemieux,
430 Princeland Ct., Corona, CA
92879;
Audrey
Lemieux,
430
Princeland Ct., Corona, CA 92879. 11.
Known Bondholders, Morgagees, and
other security holders: None. 12. Tax
Status: Has not changed during preceding 12 months. 13. Publication
Title: Nuts and Volts 14. Issue Date for
Circulation Data: October 2008September 2009. 15. The average
number of copies of each issue during
the proceeding twelve months is: A)
Total number of copies printed (net
press run); 48,512 B) Paid/Requested
Circulation (1) Mailed Outside County
subscriptions: 34,638 (2) Mailed InCounty subscriptions: 0 (3) Paid
Distribution Outside the Mail including
Sales through dealers and carriers,
street vendor, and counter sales and
other paid distribution outside USPS:
6,361 (4) Paid Distribution by other
classes of mail through the USPS: 0;
C) Total Paid Distribution: 40,999; D)
Free or Nominal Rate Distribution by
mail and outside the mail (1) Free or
Nominal Rate Outside-County Copies:
0 (2) Free or Nominal Rate In-County
Copies: 0 (3) Free or Nominal Rate
Copies Mailed at other classes through
the USPS: 0 (4) Free or Nominal Rate
Distribution Outside the mail: 358; E)
Total Free or Nominal Rate
Distribution: 358; F) Total Distribution:
41,357; G) Copies not distributed:
7,155; H) Total: 48,512; Percent paid
circulation: 99.13%. Actual number of
copies of the single issue published
nearest the filing date is September
2009; A) Total number of copies printed (net press run) 44,297; B)
Paid/Requested Circulation (1) Mailed
Outside County subscriptions: 32,204
(2) Mailed In-County subscriptions: 0
(3) Paid Distribution Outside the Mail
including Sales through dealers and
carriers, street vendor, and counter
sales and other paid distribution outside USPS: 6,007 (4) Paid Distribution
by other classes of mail through the
USPS: 0; C) Total Paid Distribution:
38,211; D) Free or Nominal Rate
Distribution by mail and outside the
mail (1) Free or Nominal Rate OutsideCounty Copies: 0 (2) Free or Nominal
Rate In-County Copies: 0 (3) Free or
Nominal Rate Copies Mailed at other
classes through the USPS: 0 (4) Free
or Nominal Rate Distribution Outside
the mail: 0; E) Total Free or Nominal
Rate
Distribution: 0;
F) Total
Distribution: 38,211; G) Copies not distributed: 6,086; H)
Total: 44,297;
Percent paid circulation: 100.0%. I certify that these statements are correct
and complete. Larry Lemieux,
Publisher - 9/29/09.

Did you know that if youre a paid


subscriber to Nuts & Volts,
you can get the online version
for FREE? Go to

www.nutsvolts.com.

CLASSIFIEDS
HARDWARE
WANTED

DESIGN/ENG
SERVICES

PCB SOFTWARE
EXCLUSIVE U.S. DISTRIBUTOR

DEC EQUIPMENT
WANTED!!!
Digital Equipment Corp.
and compatibles.
Buy - Sell - Trade
CALL KEYWAYS 937-847-2300
or email [email protected]

YOUR COMPLETE
SOLUTION!
PCB Design
PCB Simulation
CAD/CAM Menu

PROFESSIONAL
SERVICES

121747, Hobby Vers., $175


121743, Pro. Version, $275

www.KELVIN.com

GADGETS
AUDIO/VIDEO

MISCELLANEOUS
FOR SALE

ROBOTICS

Give a Gift.
Gift,
GET a Gift!
Give a one year (12 issues)
subscription to a friend and receive
a FREE one year subscription for
another friend or yourself!

Go to

www.nutsvolts.com
to enter your gift order!
Be sure to use promotion code Y9WXMS when ordering.

U.S. Price
1 Yr $26.95

Subscribe online or call:


877-525-2539 (toll free) / 818-487-4545 (outside US)

November 2009

77

TECH

FORUM

This is a READER-TO-READER Column.

All questions AND answers are submitted by Nuts & Volts readers and are intended to promote the exchange of ideas and provide assistance
for solving problems of a technical nature. Questions are subject to editing and will be published on a space available basis if deemed suitable
by the publisher. Answers are submitted by readers and NO GUARANTEES WHATSOEVER are made by the publisher. The implementation of
any answer printed in this column may require varying degrees of technical experience and should only be attempted by qualified individuals.
Always use common sense and good judgement!
All questions and answers should
be sent by email to forum@nuts
volts.com All diagrams should be
computer generated and sent with your
submission as an attachment.
QUESTIONS
To be considered, all questions should relate
to one or more of the following:
Circuit Design
Electronic Theory
Problem Solving
Other Similar Topics
Be brief but include all pertinent
information. If no one knows what you're
asking, you won't get any response (and we
probably won't print it either).
Include your Name, Address, Phone
Number, and email. Only your Name, City,
and State will be published with the
question, but we may need to contact you.
No questions will be accepted that offer
equipment for sale or equipment wanted to
buy.
Selected questions will be printed one
time on a space available basis.
Questions are subject to editing.
ANSWERS
Include in the subject line of your email,
the question number that appears directly
below the question you are responding to.
Payment of $25.00 will be sent if your
answer is printed. Be sure to include your
mailing address or we cannot send payment.
Only your Name, City, and State, will be
printed, unless you say otherwise. If you
want your email address included, indicate
to that effect.
Comments regarding answers printed in
this column may be printed in the Reader
Feedback section if space allows.
78

November 2009

>>> QUESTIONS
Power Supply
I am designing a project where
weight is at a premium. I need some
help designing a transformerless power
supply that can deliver 12-14 volts
at three amps. It needs to be auto
switching 110/220 VAC. I designed a
few projects in the past but they always
had a transformer. I see things like
laptop power supplies that don't have
transformers. They put out three or four
amps. How do they do it?
#11091
Patrick
Ogden, UT
FM Receiver
Im looking for an FM circuit with
these features:
Fixed digital 95.5 MHz
Mono
Earbud output
Battery powered
Small as possible
#11092
Don Bartelson
Merritt Island, FL
Bridge Rectifier Voltage Readings
Why, when I read the open circuit
DC voltage with both sides of the
output disconnected from the rectifier,
I read the input voltage 10%?
However, if I reconnect the load a 90
VDC brake and have the output
switching device open, the measured
DC output voltage at the rectifier is

approximately 30% greater than the


disconnected output voltage.
#11093
John Coonis
Los Angeles, CA
Vehicle ECU Programming
I would like to know what kind of
programming is used in a car ECU. Is it
C, C++, Visual Basic, or something else?
#11094
Mohahamd
Kuwait
DC-to-DC Step-Up Transformer
I need to locate a DC-to-DC stepup transformer that goes from 120 to
around 330 volts. It is for a DC-to-DC
converter that will drive a laser diode
and can be low wattage.
#11095
Thomas Wagner
Coldwater, MI
Wireless HVAC Fan Controller
I want to install a duct fan in my
HVAC system to help regulate the
temperature of a specific room. But the
duct where the fan will go is in the attic
and the main airhandler is in the
basement. The fan runs on 120 VAC
and pulls 2A. I need an affordable
wireless system that would turn the
duct fan on and off when the main
airhandler turns on and off.
#11096
Eric Peters
Martinsburg,WV
Power Outage Monitor
From time to time, I experience

> > > R E A D E R - TO - R E A D E R


power outages when I am not at
home. I would like to either build or
purchase a device which connects to
the AC power line and begins timing
when the AC power drops and stops
timing when the AC power is restored.
The readout must indicate the time
elapsed during the outage.
#11097
Corby Grubb
Alpha Audio Associates
Labeling Items
Can someone recommend the
best way to put professional-looking
text labels on a project enclosure, at a
hobbyist price point? I've been using
Brother P-Touch labels; while cheap,
they don't have the visual impact that
I'd like to have and don't work well in
constrained spaces.
#11098
W.Walker
Swansea, Il
Performance of Battery and Super
Capacitor
Im working on an electric go-kart
and need help predicting the performance of a combined battery and super
capacitor. I need a formula that would
show the current output of a small
battery and a large capacitor. Id want
two battery types (lead acid, LiFePo4,
etc.), so the formula needs to have
variables for different battery
characteristics. The new supercaps are
in the range of 35-100 Farads.
There is one manufacturer that
makes a 50 AH lead acid combined in
parallel with a large (maybe) 35 Farad
capacitor.
Ultimately, I want to know what
will happen if I put this in my kart and
accelerate for six or even 10 seconds.
#11099
Cary Z
Indianapolis, IN

Q U E S T I O N S

short periods of time (two to five


seconds) and on for about a minute at
a time.
#1 Nuts & Volts advertiser All
Electronics (www.allelectronics.com)
has two suitable solid-state relays
(SSR) for less than $5: SRLY-19 and
SRLY-31. These parts have a 5 VDC
compatible input, and an optically
isolated triac output for switching the
AC load.
The SRLY-19 input is 3-8 VDC and
the output 24-140 VAC @ 1A. Wire
the pins as follows: pin 4(-) to Stamp
gnd; pin 3(+) to Stamp output; pin 2
(~) to AC; and pin 1(~) to lamp. The
other side of the lamp goes to the
other AC line. See the online catalog
for a picture of the SSR. The SRLY-31
input is 4-10 VDC and the output
24-280 VAC @ 1.5A. Wire the pins as
follows: (-) to Stamp gnd; (+) to Stamp
output; (~) to AC; and (~) to lamp.
For controlling a heavier load,
consider the three amp SRLY-20.
Dennis Crunkilton
Abilene,TX
#2 Figure 1 is a fairly straightforward solution taken right from the
MOC3010 datasheet. The MOC3010
will keep your microcontroller optically
isolated from mains. R1 will limit the
current through the MOC3010 input
diode and what your microcontroller
sinks to approximately 13 mA. R2 limits
the current through the output triac of
the MOC3010 per the datasheet.
The T801-600G is an eight amp triac
capable of about a 900 watt load
provided it is heatsunk properly.
Exercise caution when working with

A N D

A N S W E R S

mains voltages and consider installing


a fuse between the AC line and your
incandescent lamp for safety. Both
parts can be found at Mouser where
you can also get the datasheets;
www.mouser.com.
Mike Bernath
Denver, NC
[#6096 - June 2009]

24 Hour Counter
I need to build a 24 hour, batteryoperated counter with a 2" readout
that will have the capability to be manually adjusted up/down and reset to 0.
I have a small kitchen timer that
will do what you ask. It can be set up
to 99 hours, 59 minutes, and 59
seconds. It will count up and down,
has four timer settings for program
timing, a clock, and alarm. The
manufacturer is Component Design
Northwest, Inc., in Portland, OR. You
can search for the above on the
Internet. Click for Retailer, then click
Timers. Click for Digital Hour/Minute
/Second. Click for model PT1A.
I have had it for about 10 years,
and other than changing the LR44
battery about every three years, it has
not failed me yet.
John Lippert
Menomonee Falls,WI
[#7091 - July 2009]

Wind Speed Controller


I need a circuit for several
applications that need to be switched
on/off (open/closed) by relay, depending on wind speed.
The circuit needs to be able to set
a minimum wind speed to activate and

>>> ANSWERS
[#6095 - June 2009]

Triac Controlled Light Switch


Im looking for a circuit to run a
low wattage 120 volt incandescent
light. The source will be a Parallax
BASIC Stamp II microcontroller (5V @
30 mA per I/O) and the circuit needs
to be opti isolated. Id like to use a triac
if possible. The light will be off for

Figure 1
November 2009

79

> > > R E A D E R - TO - R E A D E R


a maximum wind speed to deactivate.
Also, it needs variable activate and
deactivate timers (about 30 seconds to
five minutes) so that wind gusts will
not activate/deactivate the circuit
too rapidly.
There are several stand-alone wind
speed devices on the market, as well as
included in complete weather stations.
They all seem to be wireless in nature
and talk to some type of receiver
monitor or computer. A stand-alone
"wired" wind speed device to
controller circuit would be preferred.
#1 A stand-alone wired wind speed
alarm can be found at inspeed.com
under "windswitch." You can add an
external time delay relay like Ramsey
Electronics #K2579 (www.ramsey
kits.com) if the built-in delay is
not enough.
Bob Lindstrom
Broomfield, CO
#2 The easiest way to solve this is

probably with a hot-wire anemometer.


A mass flow sensor in a modern
vehicle uses the same principle. Linear
Technology (www.linear.com) has an
application circuit for the LT1014
using a #328 bulb with the glass
envelope removed as a wind speed
sensor. A couple of comparators
connected to this circuit should give
you the desired result (look for
window comparator circuits and timer
circuits in the LM339 datasheet). You
can use Linear Technologies LTspice
IV to model the circuit.
Walter Heissenberger
Hancock, NH
[#7092 - July 2009]

Inventory Tracking
We have been trying to find a
better way to keep track of thousands
of inventory items we have on campus.
We would like to do this the cheapest
and most effective way. Our budget
right now is not that large. We have
looked at a few applications from
iTunes App store, but most of them are
web based "Info already on the
web." I was wondering if RFID chips
could do this sort of thing? We want to
put the serial number, item name, and
model number into either a barcode or
80

November 2009

Q U E S T I O N S

chip that can be stuck to the item. Is


the RFID system able to do this or very
inexpensive barcode software?
#1 RFID is practical and costeffective. For the campus inventory
system, tags which are about the
size of a postage stamp and about as
thick (there's a little bump where the
chip is located) are available that
could store a few bytes up to 3,000
bytes for less than $1 each.
These tags can be written, read,
and re-written over the life of the asset.
The tags are "passive" meaning that
they have no internal power supply.
Portable reader/writers are available.
Tag data can be security protected.
I am personally working on a
prototype, portable reader which
should cost less than $100.
John Higgins
via email
#2 A cheap and effective way to
keep track of your inventory would be
to label the inventory with barcodes.
You can do this for free by downloading a barcode font from the several
offered on the web. A search for
"barcode font free" will locate these.
Use any word processor with a label
printing function to generate the
inventory labels with your data, using
the special barcode font for the barcodes. You can read the barcodes
with a laser barcode scanner and
"keyboard wedge," which you can find
online by searching for "keyboard
wedge barcode scanner." A "keyboard
wedge" allows you to connect a
barcode scanner inline with your
keyboard. When a barcode is read,
the wedge inserts the characters read
into your inventory software, as if you
had manually typed the characters on
your keyboard. To use a keyboard
wedge with a portable computer, use
a "USB keyboard wedge scanner." You
may use any inventory software that
you wish, including free or shareware
programs offered online, as no
modifications need be made to the
inventory software to use a wedge
scanner. I looked at a few that might
work for you that are freeware on
ZDNet and download.com, simply
searching for "inventory software." The

A N D

A N S W E R S

website at www.taltech.com/products/
interface.htm has a good overview of
complete barcode reading systems.
Howard Krausse
Willow Creek, CA
[#7093 - July 2009]

Simple Low Frequency


Transmitter
How would I build a low frequency
(say 512 Hz), battery operated sine
wave transmitter that was small enough
to fit inside 1" PVC pipe? I'm not sure if
a resistor, capacitor, or crystal is the
best; how do you wind a coil antenna
to match the frequency?
I sell a programmable Quad DDS
chip that is very accurate in the audio
range (512.00 Hz) and four outputs. It
has a square wave output, but can
be converted to triangle, then filtered
to sine.
A 555 timer chip and a few other
parts would be cheaper, but the freq
will drift with temp change.
As far as the antenna goes, at that
freq, just about any coil will work.
If you need a strong field, you can
drive the coil with a cheap audio amp
chip, like the LM386.
I can email you plans for most of
this stuff; [email protected]
Steve
Tucson, AZ
[#8097 - August 2009]

Need LCD Datasheets


Im looking for datasheets or
advice on how to use an LCD unit
salvaged from a mid 1980's medical
device. The PCB is labeled "PWB641CCEM, OPTREX." There are 19 pins, two
of which are "A" and "K" which I
believe to be power for the backlight.
The chips are "HD44105H" and two
"HD44102CH."
Anyone can type ANY CHIP ID
directly into any search engine and get
information from many sources.
The 'link' below will give you the
'HD44102CH' chip.
http://pdf1.alldatasheet.co.kr/da
tasheet-pdf/view/169419/HITACHI/
HD44102CH.html
John Mastromoro
Saint Johnsville, NY

LOOK FOR

SEARCH FOR

FIND

Find your favorite advertisers here!


AMATEUR
RADIO AND TV
Ramsey Electronics, Inc. ................26-27
Startek International .............................33

BATTERIES/
CHARGERS
Cunard Associates ...............................33

BUYING ELECTRONIC
SURPLUS
Earth Computer Technologies ..............33
HSC Electronic Supply ...........................3
Jaycar Electronics .................................43

AD INDEX

Parallax, Inc. ..........................Back Cover

Futurlec ................................................65

Pololu Robotics & Electronics ...............42

microEngineering Labs .........................54

Trace Systems, Inc. ...............................9

RF TRANSMITTERS/
RECEIVERS

XGameStation ......................................33

Abacom Technologies .........................18

Technological Arts ...............................33

Linx Technologies ................................25

DESIGN/
ENGINEERING/
REPAIR SERVICES
Cana Kit Corp. .....................................31
Edsyn ...................................................23
ExpressPCB .........................................39

Cunard Associates ....................33

Fun Gizmos ..........................................33

Decade Engineering ..................33

HobbyLab .............................................33

DesignNotes.com, Inc. ...............33

Jameco ..................................................4

Dimension Engineering ..............30

Lemos International Co., Inc. ...............19

Earth Computer Technologies ...33

Pololu Robotics & Electronics ...............42

Edsyn ........................................23
Electronix Express ....................71
ExpressPCB ..............................39

Solarbotics/HVW ....................................9
Front Panel Express LLC ...........60

Ramsey Electronics, Inc. ................26-27

CIRCUIT BOARDS

Cana Kit Corp. ...........................31

Budget Robotics ...................................32

Net Media ...............................................2

LearnOnLine, Inc. .................................23

Budget Robotics ........................32

Command Productions ..............19

Trace Systems, Inc. ...............................9

Command Productions ........................19

AP Circuits ................................60

ROBOTICS

Front Panel Express LLC ......................60

EDUCATION

All Electronics Corp. ..................55

Circuit Specialists, Inc. .........82-83

Lynxmotion, Inc. ...................................25

Circuit Specialists, Inc. ....................82-83

ActiveWire, Inc. .........................33

Solarbotics/HVW ....................................9

PCB Pool .............................................25

CCD CAMERAS/
VIDEO

Abacom Technologies ...............18

PAiA .....................................................18

SATELLITE

Technological Arts ...............................33

Lemos International Co., Inc. ...............19

Fun Gizmos ...............................33


Futurlec .....................................65
HobbyLab ..................................33

AP Circuits ...........................................60
XGameStation ......................................33
Cunard Associates ...............................33
Dimension Engineering .........................30
ExpressPCB .........................................39
Futurlec ................................................65

EMBEDDED TOOLS

Saelig Company, Inc. ...........................12

COMPONENTS
Cana Kit Corp. .....................................31
Electronix Express ...............................71
Front Panel Express LLC ......................60
Fun Gizmos ..........................................33
Futurlec ................................................65
HSC Electronic Supply ...........................3
Jameco ..................................................4
Linx Technologies ................................25
Mouser Electronics ..............................13

HSC Electronic Supply ................3

Technological Arts ...............................33

Integrated Ideas & Tech. ...........38


Jameco ........................................4

Mouser Electronics ..............................13


NetBurner ...............................................7

PCB Core ...............................................8


PCB Pool .............................................25

SECURITY

SOLAR ENERGY

Jaycar Electronics ......................43

LearnOnLine, Inc. .................................23

LearnOnLine, Inc........................23

ENCLOSURES

LeCroy..........................................5

Integrated Ideas & Tech. ......................38

TEST EQUIPMENT

Lemos International Co., Inc. ....19

Front Panel Express LLC ......................60

Circuit Specialists, Inc. ....................82-83

Linx Technologies .....................25

DesignNotes.com, Inc. ..........................33

KITS & PLANS

Dimension Engineering .........................30

Cana Kit Corp. .....................................31

Edsyn ...................................................23

DesignNotes.com, Inc. ..........................33

HobbyLab .............................................33

Earth Computer Technologies ..............33


Jaycar Electronics .................................43
NetBurner ...............................................7
PAiA .....................................................18
QKITS ...................................................33
Ramsey Electronics, Inc. ................26-27

XGameStation ......................................33

microEngineering Labs ..............54


Mouser Electronics ....................13
NetBurner ....................................7

Jaycar Electronics .................................43


LeCroy ....................................................5
Pioneer Hill Software ...........................12
Saelig Company, Inc. ...........................12

Net Media ....................................2


PAiA ..........................................18
Parallax, Inc. ...............Back Cover

Startek International .............................33

PCB Core ....................................8

Trace Systems, Inc. ...............................9

PCB Pool ...................................25

Solarbotics/HVW ....................................9

COMPUTER

Lynxmotion, Inc. ........................25

Pioneer Hill Software .................12

Hardware

TOOLS

Pololu Robotics & Electronics ....42

ActiveWire, Inc. ....................................33

Edsyn ...................................................23

QKITS ........................................33

NetBurner ...............................................7

Ramsey Electronics, Inc. .....26-27

Earth Computer Technologies ..............33

MISC./SURPLUS
All Electronics Corp. .............................55
Front Panel Express LLC ......................60

Microcontrollers / I/O Boards

HSC Electronic Supply ...........................3

Abacom Technologies .........................18

Surplus Gizmos ....................................24

Saelig Company, Inc. ................12

VIDEO DISPLAY
Decade Engineering ............................33

Fun Gizmos ..........................................33


HobbyLab .............................................33

MOTORS

microEngineering Labs .........................54

Jameco ..................................................4

DesignNotes.com, Inc. ..........................33

Mouser Electronics ..............................13


Net Media ...............................................2

WIRE, CABLE
AND CONNECTORS

PROGRAMMERS

Jameco ..................................................4

Solarbotics/HVW .........................9
Startek International ..................33
Surplus Gizmos .........................24
Technological Arts .....................33
Trace Systems, Inc. ....................9
XGameStation ...........................33

November 2009

81

CircuitSpecialists.com

1000s of Items Online! 1-800-528-1417 Fax: 480-464-5824 Since 1971

ESD Safe SMD & Thru-Hole


Rework St
Station

Aardvark

A GREAT VALUE on an
SMD/solder station combo
INCLUDES THREE NOZZLES !
An SMT rework station & soldering station in one handy unit!
Perfect for shops & labs dealing
with todays SMT board
designs.O.E.M. manufactured
just for Circuit Specialists Inc.,
so we can offer the best price
possible ! This multi-purpose station is perfect for all your surface
mount and thru-hole requirements. The ESD safe soldering iron uses
a ceramic heating element for fast heat up & stable temperature control. A seperate aluminum constructed soldering iron holder is included (not shown in picture) The comfort grip handle make it easy to use
all day, while the easy-off conector make it convenient to move out
of the way when not using, or easy to replace if needed. The temperature is controlled by a centrally located knob. The hot air soldering
is controlled by two adjustable knobs which allow you to achieve a
temperature range from 100C to 500C / 212F to 932F. One knob
is for air flow, the other for the temperature. Comes complete with 3
hot air nozzles.
You get A
2.5mm,(straight single, item #
A1124 ) 4.4mm (straight single,
item # A1130 ), and a 9.0mm nozzle (straight single, item # A1197).
This is a fantastic value !

Item #

CSI906

Wireless Inspection Camera


With Color 3.5" LCD Recordable Monitor

Your Extended Eyes & Hands!


RECORDS
Still Pictures
& Video

See It!
Clearly in narrow spots,
even in total darkness or
underwater.

Find It!
Fast. No more struggling
with a mirror & flash light.

Solve It!

$99.00

Easily, speed up the solution


with extended accessories.

ESD Safe, CPU Controlled, SMD Hot


Air Rework St
Station

What every shop or lab needs to deal with todays SMD


designed circuit boards. OEM manufactured just for
Circuit Specialists Inc., so we can offer the best price possible! A multi-technology assembly and repair station. A
wide selection of nozzles are also available.

CPU Controlled
Built-in vacuum parts handling wand
Air Pump: Diaphragm special-purpose lathe pump
Capability: 23L/min (Max)
Temperature Range:
100C~480C/212F~896F
15-Minute Stand-By temperature "sleep" mode
Power:110/120 VAC, 320 W maximum

COLOR

Record It!
With the 3.5" LCD recordable monitor, you can
capture pictures or record
video for documentation.
Full specifications at
www.CircuitSpecialists.com

The Aardvark Wireless Inspection Camera is a video borescope with a 3.5 inch color LCD monitor and a
3ft flexible shaft. The flexible shaft makes the Aardvark great for inspecting hard to reach or confined
areas like sink drains, AC Vents, engine compartments or anywhere space is limited. The monitor is wireless and may be separated from the main unit for ease of operation. Still pictures or video can also be
recorded and stored on a 2GB MicroSD card (included). The Aardvark comes with attachable mirror, magnet and hook accessories to make seeing or retrieving small items easier. The Aardvarks monitor also has
connections for composite video output for a larger monitor/recorder and USB interface for computer connection. Also included is an AC adapter/charger, video cable and USB cable. Optional 3 ft flexible extensions are available to extend the Aardvarks reach (Up to 5 may be added for a total reach of 18 feet!)

Item #

AARDVARK

Item #

$229.00

3ft Extension AARDVARK-EXT $24.95

CSI825A++

60MHz Hand Held Scopemeter


with Oscilloscope & DMM Functions

$99.00

Who Says
you cant take it with you?

One Dollar Upgrade !!

With the DSO1060 YOU CAN!

Wow! Now thats a lot for only a Dollar more!!

The 45-1 case


is ideal for
transporting
small electronics & other delicate items.
Regular Price $29.00
$88.00 if purchased Seperatly!
Save $28.00!!!

Item# CSI2205D-BUNDLE

$60.00

The CSI5034 is a sophisticated,


portable, and easy-to-use 500MHz, 34channel logic analyzer equipped with
features found only in more expensive bench type instruments.
Using advanced large-scale integrated circuits, integrated USB 2.0,
CPLD, FPGA, high-frequency digital
circuitry, embedded systems, and
other advanced technology, make
the CSI5034 your best choice in pcbased logic analyzers The CSI5034
is suitable for electronic measurement engineers, college students in
scientific research and development and teaching assistants.

You get both a 60 MHz


Oscilloscope and a multi
function digital multimeter, all
in one convenient lightweight
rechargeable battery powered package. This power
packed package comes complete with scopemeter, test
leeds, two scope probes, 34 input channels capable of simultaneously monitoring data and
information, and is capable of capturing narrow pulses
charger, PC software, USB control
and glitches that may be missed by other test equipment.
cable and a convenient nylon Delay feature provides the ability to capture data around the
carrying case.
waveform, both before and after the desired trigger signal. This

You get the CSI2205D DMM prefitted into our 45-1 Protective Case
for only one dollar more than the price of the CSI2205D alone.
The CSI2205D Micro Control Unit auto-ranging DMM is
designed for measuring resistance, capacitance, DC &
True RMS AC
voltage, DC &
True RMS AC
current, frequency, duty
cycle and temperature,
along with the ability to
test diodes, transistors
and continuity.
Regular Price $59.00

34 Channel USB Logic Analyzer

60MHz Handheld Digital Scopemeter with integrated


Digital Multimeter Support
60MHz Bandwidth with 2 Channels
150MSa/s Real-Time Sampling Rate
50Gsa/s Equivalent-Time Sampling Rate
6,000-Count DMM resolution with AC/DC at 600V/800V, 10A
Large 5.7 inch TFT Color LCD Display
USB Host/Device 2.0 full-speed interface connectivity
Multi Language Support
Battery Power Operation (Installed)

Item #

DSO1060

$549.00

allows the operator to view the data at multiple points in the data
stream
Memory feature stores multiple data points for error analysis of
the unit under test and to aid in locating defective components.
Intuitive and flexible viewing screens to facilitate analysis of the
system under test. Data can de displayed as binary, decimal, or
hexadecimal values.
Can be triggered in a variety of ways (rising edge, falling, edge
or both) , and also has an advanced trigger function that allows
logic operations to be performed on the data before a trigger is
generated. This provides the ability to trigger on a specific data
byte or word from any of the monitored channels.

Item #

CSI5034

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
P h o n e : 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

$329.00

CircuitSpecialists.com

1000s of Items Online! 1-800-528-1417 Fax: 480-464-5824 Since 1971


Premium All-In-One Repairing Solder System
The BlackJack SolderWerks BK6000
Repairing System is a digital multipurpose
reworking system that incorporates a HotAir Gun, Soldering Iron, (compatible with
leaded solder or lead free solder), with integrated smoke absorber and a desoldering
Gun.
Item#

BK6000

$199.00

Hot Air System w Soldering Iron & Mechanical Arm


The BK5000 from BlackJack SolderWerks
provides a very convenient combination of
hot air & soldering in one compact package. The hot air gun is equipped with a hot
air protection system providing system cool
down & overheat protection.

Item#

BK5000

$119.00

Hot Air with Vacuum I.C. handler & Mechanical Arm


The BlackJack SolderWerks BK4050
is designed to easily repair surface
mount devices. Its digital display &
tactile buttons allows easy operation &
adjustments. The BK4050 includes a
hot air gun and a vacuum style I.C.
handler.
Item#

BK4050

$119.00

Thermostatically controlled desoldering station


The BlackJack SolderWerks BK4000 is a
thermostatically controlled desoldering station that provides low cost and solid performance to fit the needs of the hobbyist
and light duty user. Comes with a lightweight desoldering gun.
Item#

BK4000

BK3000LF

$74.95

Compact Digital Display Solder Station


The BK2000+ is a compact unit that
provides reliable soldering performance featuring microprocessor control
and digital LED temperature display. A
wide range of replacement tips are
available.
Item#

BK2000+

$56.95

Compact Soldering Station


The BlackJack SolderWerks BK2000 is a
compact unit that provides reliable soldering
performance with a very low price. Similar
units from other manufacturers can cost
twice as much. A wide range of replacement tips are available.
Item#

BK2000

The HHL3000 Reflow Oven is a


highly versatile tool used for
reflowing and preheating different surface Mount technology
(SMT) components and printed
circuit boards (PCB's). The system utilizes a microcontroller to
effectively amd efficently manage the working temperature
while facilitating the duration of the heating process. A bright LED
display clearly displays the time and temperature along with a fully
digital control panel for ease of use and monitoring.

Featuring spot-on, dual-laser


aiming, the TN01U close-focus,
non-contact IR thermometer
measures the temperature of
electronic components as small as
0.1-in. with pin-point accuracy.
Compact and lightweight, the
instrument provides a large LCD
and a bright dual-laser aiming
system that allows for accurate
aiming. Features include a
measurement spot size of 2.5-mm
in diameter at distances up to 18
mm, measurement range from 55C to +220C,(-67-428 deg F)
an accuracy of 2% of reading or
2C whichever is greater, a
repeatability of 0.2C, display
resolution of 0.1C, and a
response time of 1s. Operating
with two AAA batteries providing
18 hours of continuous use, the
instrument measures. This is
the most advanced infrared
thermometer manufactured today
providing fast, accurate, noncontact component temperature
measurements for hardware
designers, Test, QA and Service
professionals.

The HHL3000 makes use of infrared (IR) heat wave technology to


distribute heat evenly on the component and PCB. Included is an
integrated temperature sensor that allows positioning in such a way
that the measurement of the actual temperature of PCB and components can be obtained. This minimizes damage to the PCB and
its components due to thermal shock or low level temperature conditions.
FUNCTIONS and FEATURES
* Microprocessor-controlled equipment.
* Direct PCB temperature measurement, improves accuracy and lessens damage or distortion.
* Five (5) temperature and time control points with automatic slope adjustment. Configurable to suit different
solder paste and circuit boards.
* Two (2) default profiles suitable with most common solder paste specifications.
* Quick and easy resetting of control points for precise tuning of reflow profiles.
* Built-in safety feature of industry standard 0.01C/s to 3C/s rising slope.
* Fully digital panel controls and read-out of time and temperature for monitoring and ease of use.
* Highly compatible with lead-free applications.

$36.95

$949.00

Item# HHL3000

3 in 1 FOCUSED Infrared
Soldering/Repair
Soldering/Repair System

Item #

TN01U

The CSI720 Three in One


Focused Infrared Welding
System generates heat
through a concentrated
infrared heat wave, providing precise soldering
without movement of surrounding components.

$129.00

$119.00

Digital Display Solder Station for Lead Free Solder


The BK3000LF is a compact unit designed
to be used with lead free solder that provides reliable performance featuring microprocessor control and digital LED temperature display. A wide range of replacement
tips are available.
Item#

Temprature Controlled Reflow Oven

CircuitSpecialists.com

1000s of Items Online!


1-800-528-1417
Fax: 480-464-5824
Since 1971

ESD Safe, Focused Infrared


Welding Station For reworking
BGAs, micro BGAs, QFPs, PLCCs, SOICs, small SMD and other circuit
board components. Unit produces a concentrated infrared heat wave, for precision soldering. Infrared soldering eliminates movement of surrounding components, and marks on reworked PCB's, both associated with standard hot
air gun reworking.
3 in 1 Repairing System Combines the function of an Infrared Welding Tool,
Soldering Iron and Pre-heater.
Full Digital Control with LED Displays Allows precision setting of welding
temperature & time, soldering iron and pre-heating temperatures.
Closed loop temperature control For instant and precise process adjustments.
Adjustable Infrared Tool Post Stable and adjustable Infrared welding tool
holder for increased precision soldering and hands free operation.
Adjustable Eye shield & Welding Goggles To protect users from harmful
light rays.
Uses infrared heat wave technology instead of the conventional hot air, effectively solves the major problem being encountered when using the hot air
gun, which is the movement of surrounding components while reworking.

Dual Output DC Bench Power Supplies


High stability digital read-out bench
power supplies featuring constant
voltage & current outputs. Short-circuit
& current limiting protection is provided.
SMT PC boards and a built-in cooling
fan help ensure reliable performance &
long life. All 3 Models have a 1A/5VDC
Fixed Output on the rear panel.
Item #:
CSI3003X-5
0-30V/0-3A
CSI5003X5
0-50V/0-3A
CSI3005X5
0-30V/0-5A

Item #

CSI720

$1,399.99

Triple Output DC Bench


Power Supplies
Output: 0-30VDC x 2 @ 3
or 5 Amps & 1fixed output
@ 5VDC@3A
Stepped Current:
30mA +/- 1mA

Price 1-4

Price 5+

$119.00

$112.00

Item #:

Price 1-4

Price 5+

$127.00

$119.00

CSI3003X3
0-30Vx2@3A

$198.00

$193.00

$129.00

$122.00

CSI3005XIII
0-30Vx2@5A

$259.00

$244.00

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
P h o n e : 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

You might also like