Nuts&Volts 2009 11
Nuts&Volts 2009 11
Nuts&Volts 2009 11
11
November 2009
Ruggedized PDA!
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
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!
HSC#22283
HSC#22284
USB
Serial
$95.00
$89.00
HSC#22296
HSC#22295
HSC#22241
$19.50
HSC#22208
$14.95
HSC#84017
$29.95
$17.50
Helping Hands!
HSC#TLS021
$11.50
Special Bargains!!
Mueller Test Probe
to Banana (Blue)
#80912
$1.95
SMA-SMA, 11
Semi-rigid Coax
#21290 $9.50
SMA-SMA, 10
Teflon Coax
#21970
$9.75
Vactrol VTL3A47
Opto Module, 12V
#1507
$1.50
Heimann Pyrosensor
#22268
$1.95
Universal Laptop
Charger/Adapter!
Adapters for 10 Different Brands, Incl.
HSC#22242
1U Server Supply
HSC#21474
Canon 12VDC, 1 x 1
5700rpm @ 140mA
HSC#21369
$2.50
$95.00
$24.50
$49.00
Hobby Motors
USB/Serial
Thermal Printer
Pressure Transducer
Honeywell 26PCDFS6G
#21066
$4.95
12VDC Adapt., 5A
#22285
$14.95
Toroidal Transformer
120VAC - 3.7VAC
#21848
$6.50
You can get more info about any of these items on our website!
Since 1964!...
seller ID:
hscelectronicsupply
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.
20 Near Space
Approaching the Final Frontier
A near space environment chamber update.
Page 40
28 Q & A
Reader Questions Answered Here
Fish feeder project, ferrite core search,
flashing light alarm, plus more.
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].
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
DEVELOPING
by Bryan Bergeron, Editor
Speaker Break-In
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.
November 2009
KNOWLEDGEY
2009
TECH
BY JEFF ECKERT
ADVANCED TECHNOLOGY
GaN + Si HYBRID
CHIPS COMING
10
November 2009
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
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
DUAL MONITOR,
NO LAPTOP
The EVGA
Interview dual
display.
11
ONE TOUGH H D
PHOTO COURTESY OF
HITACHI GLOBAL STORAGE
TECHNOLOGIES.
Hitachis
SimpleTOUGH
drive, built for
rough environments.
CIRCUITS
AND DEVICES
SWITCHER
FEATURES
NO-LOAD
CONSUMPTION
<0.5W
Mixed-Signal Scope
50 - 300MHz DSOs
Wireless Analog
Multiparameter Loggers
I2C Xpress
.NET Board
SOMO-14D
1-888-772-3544
[email protected] www.saelig.com
12
November 2009
SpectraPLUS 5.0
FFT Spectral Analysis System
PHS
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
(800) 346-6873
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
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)
14
November 2009
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
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
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
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
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
jmp
jmp
#bamloop
#getlevels
FIGURE 4. BAM
Bit Weight Timing.
FIGURE 5.
BAM Output OA.
November 2009
17
FIGURE 8.
TIP125 Schematic.
18
November 2009
SPIN ZONE
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
.PWFUPUIFGSPOUPGUIFFNQMPZNFOUMJOFJO3BEJo -TV,
$PNNVOJDBUJPOT
"WJPOJDT
3BEBS
.BSJUJNFBOENPSFy
FWFOTUBSUZPVSPXOCVTJOFTT Send to: COMMAND PRODUCTIONS
1-800-932-4268
ext. 209
:PVNBZGBYZPVSSFRVFTUUP15-332-1901
November 2009
19
SPACE
NEAR
BY L. PAUL VERHAGE
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
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
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.
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
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.
November 2009
23
Oregon Scientific
Smart Globes make
learning fun
Starting at $20
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!
November 2009
TA8080K DC motor
Controller IC
Only $2.00
TA8261AH 40 watt
4 channel audio amp
chip $2.00
Perf Boards
From .50 to $2
LCD Displays
Graphic and Character
USB to IDE/SATA
adaptor with power
supply for easy backup
of any hard drive.
Only $20
www.SurplusGizmos.com
503-439-1249
November 2009
25
Mini-Kits...
Holiday Themes!
LED Animated Santa
Passive Aircraft Monitor
Practice in peace!
LEDS1C
PGA1
$89.95
Plasma Generator
$64.95
HV Ion Generator
$16.95
Generate 2 sparks!
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.
ECG1C
PG13
IG7
MK142
ECG/EKG Kit
$44.95
$64.95
$64.95
$10.95
$9.95
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.
BS2C
SG7
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
$14.95
Wheel Of Fortune
Find that transmitter quick!
40 watts of stereo in 2!
DDF1
SM100
$169.95
Visit www.ramseykits.com
Free Giveaways and ALL the
information you ever needed!
$7.95
FM Broadcasters
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.
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
(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.)
FM30B
Digital FM Stereo Transmitter Kit, 0-25mW, Black
FM35BWT Digital FM Stereo Transmitter, Assembled, 1W, Black
$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
www.ramseykits.com
800-446-2295
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:
Fish Feeder
Bat Detector
Q&[email protected]
Frank Lemon
TRANSISTOR QUESTION
FLASHING LIGHT
ALARM
November 2009
CYLINDER HEAD
TEMPERATURE
MEASUREMENT
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
29
FIGURE 2
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
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
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
31
NEW
P
CONTROLLER
WITH FEEDBACK
Pololu Corporation
Email: [email protected]
Web: www.pololu.com
HARDWARE
SOFTWARE
GADGETS
TOOLS
NEW INNOVATION
EZP-01
EDSYN
Web: www.edsyn.com
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
www.technologicalarts.com
'LVSOD\WH[WDQGJUDSKLFVIURP
\RXUPLFURFRQWUROOHURQVWDQGDUG
79PRQLWRUVZLWK%2%+
Frequency
Counters
since 1988
made in USA
3K_ZZZGHFDGHQHWFRP
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.
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.
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
36
November 2009
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));
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
November 2009
37
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 ()
{
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
* Quick
* Affordable
* Precise
* No Minimums
24 hour turn time based on quantity and finish requirements
38
November 2009
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
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
(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
PARTS
LIST
41
AC Cord Assembly.
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
BATTERY
ZAPPER MKIII
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
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
Extra transmitter
kit: KC-5474
$13.50
Cost
$7.50
$20
$40
$60
$75
1-800-784-0263
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
Experiments with
Alternative Energy
Part 4 - Build a Double Wide
Sun Tracker
Figure 1
Double Wide
Solar Tracker.
44
November 2009
Mechanical
Electronics
Figure 4
Counter Balance
Weight on Back
of Solar Panel.
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
Battery Charging
November 2009
45
Figure 7
Sun Tracker
Firmware
Flow Diagram.
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
46
November 2009
Battery Charging
Solid on battery is charging.
Slow flashing battery voltage is
below minimum while charging.
Data Output
November 2009
47
48
November 2009
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.
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
DESIGN
CYCLE
BY FRED EADY
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
THE IO-WARRIOR 24
STARTER KIT
50
November 2009
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.
November 2009
= _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();
}
= _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();
}
53
$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.
SOURCES
IO-Warrior 24 Starter Kit
Saelig
www.saelig.com
November 2009
EPIC Parallel
Port Programmer
starting at $59.95
54
SOLDIER ON
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.
$249.95
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
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
N-CHANNEL MOSFET,
55V 22A 0.06 OHM
CAT# BUZ101S
55
CAT# SAW-3
each
$ 00
each
10 for 50 each
100 for 35 each
each
50
$ 40
each
CAT# RLY-532
each
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.
CAT# LVT-2
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
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
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
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 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
NEXT STEPS
SOFTWARE
ANSEL = 0
HIGH GPIO.1
PAUSE 1000
LOW GPIO.1
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
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
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
Define ADC_SAMPLEUS
50
var
byte
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
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.
59
FIGURE 7. Light
Sensor Project
Schematic.
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/.4 0!.%,3 %.#,/352%3
#USTOMIZED FRONT PANELS CAN BE EASILY
DESIGNED WITH OUR FREE SOFTWARE
&RONT 0ANEL $ESIGNER
s