10:59 PM
9/3/2008
Cover.qxd
Vol. 29 No. 10 NUTS & VOLTS MONSTER DETECTOR • WOOD STOVE • SMART AC CONTROLLER October 2008
Full Page.qxd 12/4/2007 4:26 PM Page 2
Full Page.qxd 6/2/2008 11:31 AM Page 3
Free
Book
with Kit
Full Page.qxd 9/3/2008 12:14 PM Page 4
Full Page.qxd 8/5/2008 5:36 PM Page 5
O C TO B E R 2 0 0 8 w w w. n u t s v o l t s. c o m
Features Projects
50 INVERTING AND 28 TEMPERATURE GAUGE
NON-INVERTING AMPLIFIER Put the heat on with
DESIGN USING OP-AMPS temperature transducers.
Simulation results will show that ■ By Jim Stewart
with the proper placement of ● ● ● ● Advanced Level
resistors, either inverting or Page
42
non-inverting amplifiers can be 34 MICROPROCESSOR
designed to trade an op-amp’s gain CONTROLLED WOOD STOVE: Part 1
and bandwidth. Keep your fire burning without having
■ By Justin Luhm and John E. Post to manually check the wood supply.
■ By Kerry Barlow
55 HOW TO DUAL BOOT ● ● ● ● Intermediate Level
XP WITH VISTA
Here’s a way to change your 42 MAKE THE SMART ROOM AIR
love/hate relationship with Vista CONDITIONER CONTROLLER
to a tolerable one so you can take Keep your cool with this PICAXE device.
advantage of its features. ■ By Tom Fox
■ By Michael Simpson ● ● ● ● Advanced Level
Departments 16 OPEN
COMMUNICATION
Constructing Robots
A robotic Peanut Butter
Monster Detector.
08 DEVELOPING 88 NV WEBSTORE The Latest in Networking
PERSPECTIVES 92 CLASSIFIEDS and Wireless Technologies 76 THE DESIGN CYCLE
The software-defined Advanced Techniques for
26 NEW PRODUCTS 94 TECH FORUM radio is real. Design Engineers
48 SHOWCASE 96 AD INDEX Roll your own WiFi
66 ELECTRO-NET 22 Q&A hotspot.
Reader Questions Answered
Here 83 PICAXE PRIMER
Nuts & Volts (ISSN 1528-9885/CDN Pub Agree #40702530) is published monthly for $24.95
per year by T & L Publications, Inc., 430 Princeland Court, Corona, CA 92879. PERIODICALS
Video motion Sharpening Your Tools of
POSTAGE PAID AT CORONA, CA AND AT ADDITIONAL MAILING OFFICES. detection, TV converter Creativity
POSTMASTER: Send address changes to Nuts & Volts, P.O. Box 15277, North Hollywood, box, night light
CA 91615 or Station A, P.O. Box 54, Windsor ON N9A 6J5; cpcreturns@nutsvolts.com.
Build the PICAXE IR
control, more. multi-board.
6 October 2008
Full Page.qxd 9/2/2008 3:04 PM Page 7
Sharing Ingenuity
W W W. S P A R K F U N . C O M
8 October 2008
DevPerspectives.qxd 9/3/2008 6:11 PM Page 9
October 2008 9
Page10.qxd 9/3/2008 6:05 PM Page 10
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
publisher@nutsvolts.com
ASSOCIATE PUBLISHER/
VP OF SALES/MARKETING
Robin Lemieux
display@nutsvolts.com
EDITOR
Bryan Bergeron
techedit-nutsvolts@yahoo.com
TECHNICAL EDITOR
Dan Danknick
dan@teamdelta.com
CONTRIBUTING EDITORS
Jeff Eckert Russ Kincaid
Vern Graner Fred Eady
Joe Pardue Ron Hackett
Lou Frenzel John Post
Justin Luhm Michael Simpson
Kerry Barlow Tom Fox
Jim Stewart
CIRCULATION DIRECTOR
Tracy Kerley
subscribe@nutsvolts.com
SHOW COORDINATOR
Audrey Lemieux
MARKETING COORDINATOR
WEBSTORE
Brian Kirkpatrick
sales@nutsvolts.com
WEB CONTENT
Michael Kaudze
website@nutsvolts.com
PRODUCTION/GRAPHICS
Shannon Lemieux
Joe Keungmanivong
ADMINISTRATIVE ASSISTANT
Debbie Stauffacher
Copyright © 2008 by T & L Publications, Inc.
All Rights Reserved
All advertising is subject to publisher’s approval. We are
not responsible for mistakes, misprints, or typographical
errors. Nuts & Volts Magazine assumes no responsibility
for the availability or condition of advertised items or for
the honesty of the advertiser. The publisher makes no
claims for the 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,
10 October 2008 CA 92879.
Full Page.qxd 9/2/2008 3:10 PM Page 11
1-800-784-0263 www.jaycar.com
Tech2008.qxd 9/2/2008 1:05 PM Page 12
TECH
2008
KNOWLEDGEY
EVENTS, ADVANCES, AND NEWS
■ BY JEFF ECKERT
ADVANCED TECHNOLOGY
FLEXIBLE SENSOR WEB design in other applications, including cancer cells, capturing them, and
MIMICS EYEBALLS a thin, conformable monitor to detect removing them from the body.
electrical signals traveling According to Gatech’s John
PHOTO COURTESY OF BECKMAN INSTITUTE, UNIVERSITY OF ILLINOIS.
across the surface of the McDonald, “This technology may be
human brain. According to of special importance in the treatment
U.I.’s Prof. John Rogers, of ovarian cancer, where the
one of the project leaders, malignancy is typically spread by
“We believe that some of free-floating cancer cells released from
the most compelling the primary tumor into the abdominal
areas of future application cavity.” The nanoparticles are
involve the intimate, modified using a small peptide that
conformal integration of allows them to target the tumor cells.
electronics with the human The technique has already been
body, in ways that are tested on mice. After staining the
■ Low-magnification scanning inconceivable using nanoparticles red and giving the
electron micrograph of silicon established technologies. We are cancer cells a fluorescent green tag,
photodetector pixels and electronics working actively with collaborators the researchers were able to simply
interconnected by arc-shaped
ribbons. to explore possibilities in advanced apply a magnet and move the green
health monitors, prosthetic devices, cells into the abdominal region for
MAGNETIC
disposal. An extra benefit is that
the more accurately you target the
malignant cells, the less likely you are
University (www.northwestern.edu) NANOPARTICLES TO to generate an undesirable immune
announced the development of a FIGHT CANCER response in the patient, so the
camera that works much more like the treatment is more promising than using
human eye than anything in current antibodies alone. The next step is to
use. The secret is the sensor array, apply the concept to survival studies.
which is hemispherical in shape rather The research team is also collaborating
than flat. This approach eliminates with other Gatech groups to see how
some of the aberrations inherent in peptide-directed gold nanoparticles
existing camera designs and improves and nanohydrogels might also be used
the quality of captured images. The in fighting cancer.
novel design replaces the traditional
flat substrate with a temporary
flexible backing, upon which they
COMPUTERS AND
place an array of pixels that are NETWORKING
interconnected by small wires. POCKET-SIZE PRINTER
The array, thus, can be formed
into a curved shape and affixed to its
permanent location on a glass lens.
The array presently incorporates only
W ith the ubiquity of laptops and
Blackberries, it’s pretty easy to
take your work on the road and keep
■ Magnetic nanoparticles capture
256 pixels, but the technology is ovarian cancer cells. in touch with customers and associ-
based on established materials and ates. But what if you need a hard
manufacturing processes, so it should
not be difficult to develop more
sophisticated, higher-density devices.
A potentially powerful cancer
treatment is emerging from the
School of Biology at Georgia Tech
copy of a contract, map, boarding
pass, brochure, or other document
and there isn’t a Kinko’s in sight?
Interestingly, the concept is (www.gatech.edu). The approach The solution might be the PRINTSTIK
not limited to imaging systems. is based on attaching magnetic PS910 from Planon Systems
Researchers are testing the same nanoparticles to non-stationary Solutions, Inc. (www.planon.com).
12 October 2008
Tech2008.qxd 9/2/2008 1:06 PM Page 13
TECHKNOWLEDGEY 20 08
USB RECHARGEABLE PHOTO COURTESY OF MOIXA ENERGY. PHOTO COURTESY OF VITALITY, INC.
BATTERIES
14 October 2008
Tech2008.qxd 9/2/2008 1:08 PM Page 15
TECHKNOWLEDGEY 20 08
the rest. Two versions are offered. The CONNECT™, which includes a emails to a family member, and issue
GlowCap SOLO is a self-contained unit wireless modem that connects to the monthly adherence reports to you
that flashes orange and plays a melody Vitality network. The cap collects data and your caregiver. Heartily endorsed
(“Lucy in the Sky with Diamonds?”) on your drug use or lack thereof so by Britney Spears, Lindsay Lohan,
when it’s time to medicate. But if you Vitality can phone you if you forget Charlie Sheen, et al., the caps should
want to fly first class, try a GlowCap to take a medication, send weekly be appearing in pharmacies soon. NV
&2/.4 0!.%,3 %.#,/352%3
#USTOMIZED FRONT PANELS CAN BE EASILY
DESIGNED WITH OUR FREE SOFTWARE
&RONT 0ANEL $ESIGNER
s #OST
EFFECTIVE PROTOTYPES
AND PRODUCTION RUNS
s 7IDE RANGE OF MATERIALS OR
CUSTOMIZATION OF PROVIDED
MATERIAL
s !UTOMATIC PRICE CALCULATION
s &ABRICATION IN OR DAYS
3AMPLE PRICE
PLUS 3(
WWWFRONTPANELEXPRESSCOM
October 2008 15
OpenComm.qxd 9/2/2008 1:50 PM Page 16
THE SOFTWARE-DEFINED
RADIO IS REAL
Trading Hardware for Software
Makes for the Ultimate in Versatility
WE ALL THINK OF A RADIO AS A PHYSICAL DEVICE. It used to be a big wooden
box with tubes in it, but the radio morphed into a small plastic box with
transistors and today it is — in most cases — a single integrated circuit.
ut now, many of the functions also be a regular PC or laptop. The two basic receiver functions
B previously performed by electronic
components and circuits are being
Many new SDRs incorporate a
programmable logic device like a
are frequency selection (or what we
also call tuning) and demodulation.
carried out by special programs field programmable gate array (FPGA). Both of these functions can be done
running on a fast digital processor or, The bottom line is the radio essentially in software. Frequency selection
in some cases, a fast programmable just becomes another electronic involves filtering, typically using some
logic device. While the radio is still product based on a micro. What sort of band pass filter to distinguish
a form of hardware, that hardware is product does NOT have an embedded one signal from another. The filter
programmable so the radio will do controller or other processor in it? selects only the one we want and
what you want. This is not just some For discussion purposes in this article, diminishes the others.
fantasy. It is just as real as the cell I am only going to cover receivers. Once the signal is selected, we
phone in your pocket. Here’s an update Transmitters are a special case. put it through a demodulation
on this hot wireless technology. So, can I just connect an antenna process to recover the originally
directly to a microcomputer and make transmitted information. If that
SDR REFRESHER a receiver with the proper software?
The answer is, almost. In fact, the
information was voice, then after
the demodulation process we have
In case you forgot, or actually simplest SDR receiver is almost just that. a file of binary data representing that
in case you never knew, a software- Since radio signals are very low level, voice. Now all we do is send that
defined radio (SDR) is considered to they almost always must be amplified data to a digital-to-analog converter
be any radio receiver or transmitter before you do any processing on (DAC) that gives us the voice in
that uses software to define some of them. So, a simple SDR would start natural analog form. Usually, the
the basic physical functions usually with an RF amplifier after the antenna. DAC output must be amplified by an
carried out by traditional circuitry. Don’t forget that radio signals are external single chip audio amplifier
(Think filtering and demodulation.) analog signals. Microcomputers are capable of driving a speaker or a
And since we are saying that software digital and process binary information. headset. The big issue in all of this is
defines the various characteristics of So, after the RF amplifier you have to how fast we can perform analog-to-
the radio, that implies the use of use an analog-to-digital converter digital conversion. To accurately
some form of microcomputer that (ADC) to translate the analog RF sig- represent the analog data, we must
executes the software. In some cases, nals into a stream of binary numbers sample it at a rate at least twice the
that micro is a special digital signal that the micro can process. With the highest frequency content. If we want
processor (DSP) or at least an digitized RF in memory, the processor to receive signal up to say 30 MHz,
embedded controller fast enough to can go to work performing all the then our ADC needs to run at least
do the functions in real time. It could remaining functions of a receiver. at 60 megasamples per second
16 October 2008
OpenComm.qxd 9/2/2008 11:49 AM Page 17
O P E N C O M M U N I C AT I O N
■ FIGURE 3.The Flex-Radio FLEX- amazing radio covers all ham bands
5000A is the ultimate SDR ham radio from 160 meters to six meters in one
for bands from 160 to six meters. box and you can buy a transverter that
The DSP is performed on a PC. The
front panel is implemented on the adds coverage of two meters, as well
PC with the PowerSDR software. as 70 cm (440 MHz). It will operate
The transmitter output is 100 watts. in any mode — CW, AM, SSB, FM, and
even RTTY (teletype) and the popular
band signal followed by a fast digital mode PSK31. The transmitter
ADC. It covers the 15 kHz to 55 puts out 100 watts of power.
MHz range. An Altera FPGA does The receiver uses direct conver-
the DSP for filtering and demodu- sion and develops the I and Q signals
lation. Another interesting SDR that go to internal ADCs and then on
receiver is called the SoftRock. to a connected PC. A fast PC does all
Perseus. It does not use the superhet It is complete on a small PC board the DSP and other signal processing.
or direct conversion methods just attached to a USB connector. The That software is called PowerSDR and
described, but directly digitizes the receiver front-end is on that board handles all receiver and transmitter
input signal. Some standard inductor- which plugs into a PC. The receiver signal processing. It also provides an
capacitor (LC) filters after the antenna produces the I and Q signals that impressive front panel display that
select the frequency band of interest. then go to the PC sound card or features the frequency spectrum display,
The signals in that band are then sent audio inputs. The sound card ADC as well as the impressive waterfall
to an RF amplifier and then to a 14- conversion is used to generate the display that shows frequency
bit 80 MS/s ADC. Next, the digitized digital data. Software that runs on the horizontally, time vertically, and
signals go to a fast FPGA where PC itself does the DSP for filtering signal strength in different colors.
further filtering is performed, as well and demodulation. The FLEX-5000A is impressive, but
as demodulation. The output then A small company called RF Space expensive. It shows that SDR is
goes to a PC for display with a front makes the SDR-IQ radio. It covers the practical — it delivers a transceiver
panel similar to that shown in Figure 2. 500 kHz to 30 MHz range. Both use whose specs are difficult to duplicate
If you want to play around with an extensive software package called with older technology. A more modest
an SDR receiver, there are several kits SpectraVue that runs on a PC to effort in ham SDR is the work of the
and packages available. One example do all the SDR functions and to High Performance SDR (HPSDR)
is the QuickSilver receiver. It uses implement the front panel complete project. This is an informal group of
direct conversion to get the base- with frequency spectrum displays. engineers, techs, programmers, and
others who work together to design
FOR MORE INFO ON SDR AMATEUR RADIO SDR and build modular SDR items. The
products are on a small PC board
FlexRadio Systems Amateur radio has generally that plugs into a back plane like that
www.flex-radio.com been slow to adopt SDR but most shown in Figure 4. One board is an
GNU Radio manufacturers have radios now with ADC, another is a PLD or FPGA for
www.gnu.com more advanced SDR products in the the DSP, and others implement the
works. Most ham transceivers at least transmit functions. There are a whole
High Performance SDR incorporate DSP for filtering and series of these boards you can buy to
www.hpsdr.org
demodulation. But there is one build an SDR receiver. Most are set
PERSEUS ompany that has gone all the way up to use Flex Radio’s PowerSDR
www.ssb.de with a SDR. That is Flex Radio. Their software which is an open source
QuickSilver FLEX-5000A is a full-blown SDR package available for free on the Flex
www.philcovington.com/QuickSilver transceiver (see Figure 3). This Radio website; check it out for more
details on the HPSDR modules.
RF Space
www.rfspace.com SDR is still complex and a bit
expensive, but it is the future of
SoftRock radio. The days of the crystal set, one
www.softrockradio.org tube radio, or transistor radio kit are
Software-Defined Radio Forum over. It is time to learn more about
www.sdrforum.org SDR with one of these products. NV
Tucson Amateur Packet Radio Corp.
■ FIGURE 4. High Performance SDR
www.tapr.org
products modularize all segments of an
WiNRadio Communications SDR receiver and transmitter allowing
www.winradio.com you to experiment, as well as mix and
match.
18 October 2008
Page19.qxd 9/3/2008 9:15 PM Page 19
Item #975
$99.95 4 AAA
batteries 30:1 micro
(not included) metal
The Pololu 3pi robot is a high-performance, compact gearmotors
mobile platform featuring:
* Two metal gearmotors * High-traction silicone tires
* Five reflectance sensors * Speeds exceeding 3 ft/sec
* 8×2 character LCD using innovative constant- optional
* Three user pushbuttons voltage motor supply power LED ISP
* Buzzer and LEDs programming
All peripherals are connected to an ATmega168 connector
microcontroller running at 20 MHz, with free C-programming push-on/push-off
tools, libraries, and support for the Arduino environment. power button
reset removable 8x2
button character LCD
user pushbuttons
robot diameter is 3π cm (~3.7 inches)
Visit www.ramseykits.com Free Giveaways and ALL the information you ever needed!
NutNVolt200810.qxd 9/2/2008 3:26 PM Page 21
Whether you use an acoustic electric, electric, or bass guitar, the PGA1 gives you This broadband radio monitors transmissions
an adjustable volume output to your favorite headphones. Unlike a lot of practice over the entire aircraft band of 118-136 MHz. The way it works is simple.
amps, the PGA1 has a special bass boost to enhance bass guitar use. One prac- Strongest man wins! The strongest signal within the pass band of the radio will
tice amp for all your guitars! If you want to practice to your favorite music, the be heard. And unlike the FM capture effect, multiple aircraft signals will be heard
PGA1 has a standard style audio input to play to your favorite music! Just plug in simultaneously with the strongest one the loudest! And that means the aircraft
your Walkman style CD player, MP3 player, or even the headphone output on your closest to you, and the towers closest to you! All without any tuning or looking
mixer board and you'll hear both your music source and your guitar in your head- up frequencies! So, where would this come in handy?
phones!
1. At an air show! Just imagine listening to all the traffic as it happens
The PGA1 uses a powerful LM386 power amplifier to provide one watt of power 2. Onboard aircraft to listen to that aircraft and associated control towers
to your headphones or even a small speaker! It gets even better...use the PGA1 as 3. Private pilots to monitor ATIS and other field traffic during preflight
a cheap and easy direct inserter box to match your guitar into an aux input of a activities (saves Hobbs time!)
stereo receiver amplifier or PA amplifier! It sounds GREAT! A standard ¼" audio 4. Commercial pilots to monitor ATIS and other field traffic as needed at
input connector is used for your guitar input, matching your standard guitar their convenience
cables. A top mounted on/off/volume control adjusts the headphone output level 5. General aircraft monitoring enthusiasts
through the full range. The small belt clip pocket size device runs on a standard
9V battery (not included). A LED indicates power-on and relative battery condi- Wait, you can't use a radio receiver onboard aircraft because they contain a local
tion. The attractive compact case measures 4.5"H x 2.7"W x 1.1"D. oscillator that could generate interfering signals! We have you covered on that
one. The ABM1 has no local oscillator, it doesn't, can't, and won't generate any
PGA1 Personal Practice Guitar Amplifier Kit $64.95 RF whatsoever! That's why our patent abstract is titled "Aircraft band radio receiv-
PGA1WT Personal Practice Guitar Amp, Factory Asmb & Tested $99.95 er which does not radi-
SPECIFICATIONS ate interfering signals".
Frequency Range: 118 MHz to 136 MHz It doesn't get any plain-
Receiver Type: Patented Passive Detector er than that!
Digital Conrolled FM IF Frequencies: None!
Stereo Transmitters Receiver Sensitivity: Even with its compact
Less than 2 uV for detectable
✔ Rock stable PLL synthesized audio design, we designed the
✔ Front panel digital control and Audio Output: 700mW, 8-24 ohms ABM1 for easy construc-
display of all parameters! Headphone Jack: 3.5mm stereo phone, stereo tion by the electronic
✔ Professional metal case earbuds included hobbyist. Thru-hole
✔ Super audio quality! External Antenna: Headphone cord coupled parts are used for all
✔ 25mW and 1W models! Power Requirement: 9VDC battery customer assembly.
Dimensions: 2.25” x 2.8” PC Board Several SMT compo-
For nearly a decade we’ve been the leader in hobbyist FM radio transmitters. nents are part of the cir-
When it became time for a new model, we started from the ground up! We told 2.5” x 4.6” x .9” Case
cuit, and they are pre-
our engineers we wanted a new technology transmitter that would provide Weight: 4 oz. with battery
installed at the factory!
FM100 series quality without the advanced mixer features. They took it as a chal- In addition, a factory
lenge and designed not one, but TWO transmitters! assembled and tested SMT version with additional shielding for adjacent channel
overloading is also available for the aircraft professional that just wants to get lis-
The FM30 is designed using through-hole technology tening quickly. Stereo earbuds are even included! If you're a private pilot, com-
and components and is available only as a do-it-your- mercial pilot, airport worker, aircraft enthusiast, attend air shows, or spend a lot of
self kit, with a 25mW output very similar to our FM25 time in airports or onboard aircraft, the ABM1 is for you!
series. Then the engineers redesigned their brand-
new design using surface mount technology (SMT) for ABM1 Passive Air Band Monitor Kit $89.95
a very special factory assembled and tested FM35WT ABM1WT Passive Air Band Monitor, Factory Assembled & Tested $159.95
version, with 1W output for our export-only market!
Both are designed around an RF tight vinyl clad metal
enclosure for noise free and interference free opera-
tion. All settings are done through the front panel dig-
ital control and LCD display and they 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
MORE than just friendly on-line ordering!
in power supply. The stylish black anodized aluminum case measures 5.55"W x Clearance Specials, Ramsey Museum, User Forums, Dealer Information, FAQ’s, FCC
6.45"D x 1.5"H. and is a great match to your other equipment. Info, Kit Building Guides, Downloads, Live Weather, Live Webcams, and much more!
(Note: After assembly of this do-it-yourself hobby kit, the user is responsible for comply-
ing 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 out-
side the continental US or valid APO/FPO addresses or valid customs brokers for end
delivery outside the continental US.)
www.ramseykits.com
FM30B Digital FM Stereo Transmitter Kit, 0-25mW, Black
FM35BWT Digital FM Stereo Transmitter, Assembled, 1W, Black
$199.95
$299.95
800-446-2295
Get The Catalog! Where ✦ Build It!
590 Fishers Station Drive Electronics ✦ Learn It!
Get the latest 2008 Ramsey Hobby
Catalog! 112 value packed pages of Victor, NY 14564 Is Always ✦ Achieve It!
(800) 446-2295
the neatest goodies around with lots of (585) 924-4560
FUN! ✦ Enjoy It!
new stuff! Order yours today on line or Prices, availability, and specifications are subject to change. Not responsible for typos, stupids,
printer’s bleed, or really weird Halloween tricks! Visit www.ramseykits.com for the latest pricing,
give us a call... Or download the PDF at specials, terms and conditions. Thanks Robin... for reminding me of this ad deadline and that
Halloween is approaching! Therefore today’s color theme is Pantone 021C Orange!
www.ramseykits.com/catalog! Copyright 2008 Ramsey Electronics, LLC...so there!
Q&A.qxd 9/2/2008 11:59 AM Page 22
Q
zero volts and black is one volt (for chip for a timer that is two hours or
Is there a simple way to tell the American market, I don’t know longer? When I write time-delay with
when a video camera sees about others). Each line is slightly for loops in C, I can’t get the delay
motion, so that a switch different so you would have to longer than a few seconds without
can be closed to start a compare line 128 of frame A with the program hanging (i.e., I have a
VCR or DVD recorder? The camera line 128 of frame B to tell if there light flash and delay the on-off with a
output is nominally one volt p-p. was a difference. We are now talking for loop). As I slowly increment the
A
about digital signal processing which for loop, there becomes a point
The short answer is no. is out of my field and is not simple. where the light doesn’t flash in a
Let me explain: The video delayed response like it should).
camera scans the scene
PIC BASIC COMPILER — Rich Bertelsen
Q A
with 500+ lines. First, it
scans all the odd lines in 1/60th of a I like your idea of using I can’t help you with the
second, then it scans all the even the PIC12F675 as a timer. code in C, but there is a
lines in 1/60th of a second, resulting What would the code be Basic compiler called
in a frame rate of 30 Hz. if written in C for the 15 PICBASIC PRO. You get
Figure 1 is an example of a minute timer in the Q&A section? I MicroCode Studio with it, which
greatly simplifies the process. You can
download a free demo version from
1 VOLT
ONE LINE OF VIDEO SIGNAL www.mecanique.co.uk/products/
DARK
compiler/pbp-demo-index.html. The
demo version has a limit of 31 lines
of code and only supports 16F84,
16F62x, and 16F87x; 12F675 is not
supported.
There is essentially no limit to
delay time; you can delay 65,535
milliseconds in one statement but if
that is not enough, you can do it
again and again. You can also put it
to sleep and use the watch dog timer
to wake it up again.
The problem with your for-next
LIGHT
loop could be in the dimension of
0 VOLT the count symbol. There are so many
63 MICRO SECONDS possibilities, your best bet is to post
■ FIGURE 1 your code on one of the forums. The
22 October 2008
Q&A.qxd 9/2/2008 11:59 AM Page 23
QU E ST I O N S & A N S W E R S
Q
I saw the article in the
July N&V about using a
PIC12F675 to power off a
circuit feeding a camera
and solar-powered fountain pump
when night falls. It is almost exactly
what I need, except I need the circuit
to power up some 120 volt lights at
dusk. Also, I would like to be able to ■ FIGURE 2
turn them off at some later time (from
two to five or six hours) and have the '****************************************************************
circuit ready for the next nightfall. '* Name : NIGHT LIGHT CONTROL.BAS *
I suppose the code would '* Author : Russ Kincaid *
'* Date : 7/11/2008 *
have to be changed somewhat, and '* Version : 1.0 *
possibly the LDR, as well. I have a '* Notes : *
'* The micro sleeps during the day and turns on a light when *
Picstart-Plus programmer, although it '* darkness falls. The light stays on for 2, 5, or 7 hours *
hasn’t been used for several years, '* depending on a 3 position switch that grounds GP1, GP2, or *
I think it will still work. Anyway, I '* GP5. you can use 12F629 which is the same device withour *
'* The A/D but remove the ANSEL statement or the compiler will *
certainly would appreciate some '* balk. GPIO.4 (pin3) is oscillator output test point. *
input about the subject. '****************************************************************
— Bert Russell REM DEVICE = 12F675
CMCON = 7 'SETS DIGITAL MODE
A
ANSEL = 0 'GPIO.0 TO GPIO.3 SET AS DIGITAL
You will need a five volt TRISIO = %00101110 'GPIO.0 AND GPIO.4 AS OUTPUT
supply and the circuit in VRCON.7 = 0 'TURN OFF VOLTAGE REFERENCE
DEFINE OSCCAL_1K 1 'TO SAVE OSCILLATOR CALIBRATION
Figure 2. I used one of OPTION_REG = 0 ' GLOBAL PULLUPS ENABLED
the large LDRs from the J VAR word
RadioShack assortment (276-1657). ' ************************************************************
START:
You will want to adjust R2 such
that the light comes on when it is IF GPIO.3 = 1 THEN START
HIGH GPIO.0 'TURN ON TRANSISTOR SWITCH
sufficiently dark. A three position IF GPIO.5 = 0 THEN TWO
switch selects the light on time to IF GPIO.2 = 0 THEN FIVE
be two, five, or seven hours. The IF GPIO.1 = 0 THEN SEVEN
opto-triac 653-G3MB-202P-DC5 TWO:
(Mouser; www.mouser.com) is good FOR J = 1 TO 120
for two amps; if you need more PAUSE 60000 '120 TIMES 1 MINUTE = 2 HOURS
NEXT J
current, you can use 881-LS24D16C- GOTO DAY
HS1 which is rated 240 volts, 16A.
The program is listed in Figure 3. FIVE:
FOR J = 1 TO 300
The program loops around the first PAUSE 60000
statement as long as it is daylight. At NEXT J
night, the program jumps to two, five, GOTO DAY
or seven hours delay, depending on SEVEN:
the SW1 position. The final delay is FOR J = 1 TO 420
PAUSE 60000
13 hours to get back to daylight and NEXT J
start over. GOTO DAY
DAY:
PARALLEL OP-AMPS
Q
LOW GPIO.0 'TURN OFF TRANSISTOR SWITCH
Can I safely parallel LM675 for j = 1 to 780
pause 60000 'PAUSE 13 HOURS, UNTIL NEXT DAY
op-amps? next j
— Craig Kendrick Sellen goto start
END ■ FIGURE 3
October 2008 23
Q&A.qxd 9/2/2008 12:00 PM Page 24
10K ■ FIGURE 4 says that their service and get cable or DirecTV?
manuals are available only — Drew
A
1K to “authorized service
dealers.” Do you know of 1) Digital TV does require a
some service like Sam’s better signal to noise ratio.
PhotoFact of years past The phase lock loop in the
0.1 where I might get service analog TV will stay locked
INPUT info for this item? even when down in the noise but the
10K OUTPUT — Len digital converter can’t tell the difference
A
between noise and signal, so has to
0.1
1K A service manual have signal well above the noise.
is available from
www.rtv-horvat- 2 and 3) I would not expect digital
dj.hr/apl/index. TV to work from rabbit ears unless
+- 10MV OFFSET htm. It will cost $10 US. the transmitter was very close. I
ADJUST
+V
recommend a roof mounted antenna
-V
TV CONVERTER with amplifier and rotator. If that is
not feasible, look into a wide band
BOX helical antenna that will fit inside.
A Q
Not directly because the I purchased a DataStream 4) Cable will provide more channels
input offsets will be different. TV converter box from and options, and will be more
Two op-amps on the same RadioShack. With rabbit reliable than the antenna, but costs
chip have the same offset, ears, a preamp, and a VHS more. The choice is up to you.
so you can do it there, but these are in series I get 10 channels across the
separate chips. Figure 4 is a way to do VHF and UHF bands. I connected the
BATTERY CHARGER
Q
it. You will lose a maximum of 0.3 volts converter just after the antenna and
of output swing, but the current capacity also tried just before the TV. Only I am a subscriber to Nuts &
will be double. In the typical case, one station came in and did so very Volts and I LOVE your Q&A
you could get away with no offset well in the latter configuration. The column. I work in a failure
trim, but you should always design other channels said weak signal. analysis lab; the reason I am
for the worst case (10 mV offset). Eliminating the preamp and VHS writing is that we will soon be getting
player did not work either. in an old battery charger (see Figure
SERVICE MANUAL Questions:
5). The charger is designed to charge
a bank of large lead-acid batteries.
FOR TV 1) Does digital TV require a stronger The batteries are in parallel and have
Q
signal? a float voltage of about 36 volts.
I have a Zenith (now LG) 2) Do I need to update my antenna? I understand the purpose of
DLP Projection TV model 3) Do you have a better T2, L2, D1, and D2 — it is a simple
Z44SZ80 that no longer will recommendation for installation? full wave rectifier. But what is the
power on (after a power 3) Should I return the converter purpose of T1, C1, and L1? Why are
surge). Before sending it to the recycle and buy another brand? they doing that? Any ideas?
bin, I would like to try to fix it, but LG 4) Or, should I scrap the converter — Michael Craft, Saint Paris, OH
QU E ST I O N S & A N S W E R S
A
Here is my thought: T1 is possible, I would
evidently a ferro-resonant like to use parts
regulating transformer, available in through-
L1 increases the source hole mounting
impedance making it look more like packages please.
a current source and limiting the (I know in your
charging current. T2 is a low April issue you
impedance standard transformer that had an article on
supplies the float voltage. I don’t building an HV ■ FIGURE 5
know why T2 was not a regulating switching power
transformer also. L2 is not needed supply, but I don’t think it would be is 1/2 the first stage. The first stage is
because batteries don’t care about efficient enough for my application.) free running at 60 kHz and triggers
being pulsed; in fact, it may be better — Matthew S. Taylor the second stage one shot. The feed-
A
than smooth DC. back pulls down the CV pin of the one
I breadboarded the circuit shot, reducing the pulse width to con-
SOLAR POWER SUPPLY in Figure 6; the efficiency
was 68% — not very good.
trol the DC output. The red LED is the
voltage reference. An LED is a better
FOR TUBE RADIO The solar panel supplies regulator than a low voltage zener.
Q
90 mA in bright sun, which is not The transformer uses a ferrite
I would like to build a enough to power the radio directly, E core from Magnetics, Inc., part
power supply that will allow but two in parallel would keep the number F-42510-EC. The bobbin part
me to run a tube-type battery charged. The battery is needed number is B2510-01. The primary is
portable radio using a solar so the radio does not die when a 10 turns #27 wire and the secondary
panel. My radio (a Motorola 56B1) cloud comes by, and it regulates the is 160 turns #36 wire. The calculated
requires 6.5V @ 50 mA to power its voltage. The solar panel will recharge secondary turns would be: 10 turns
filaments and 90V @ 8.5 mA for its a dead battery in a couple of sunny * 90 volts/6 volts = 150 turns, but
plate supply. (The radio’s total power days with the radio off. I did not put a I added 10 turns to allow for
consumption is 1.09W.) Most solar diode in series with the solar panel regulation. I had planned to operate
panels available from places like because the solar panel is a diode. I at a higher frequency, but found that
Silicon Solar have open circuit am using a panel to trickle charge 12 the transformer resonated at 65 kHz,
voltages of 8V, so that will probably volt batteries and there is no leakage so I set the frequency at 60 kHz. The
be the voltage I will have to work at night. Some low quality solar cells regulation is not great; when adjusted
with. The 90V supply is going to be may have significant leakage, so it is a for 90 volts with 10K load, the no
the hardest to create. Do you know good idea to check. The 556 dual load voltage is 100 volts. Perhaps I
of any circuits that could generate timer provides an almost 50% duty should have added 20 turns in order
these voltages? Any assistance you can cycle drive to the MOSFET, Q1, to make the regulator work harder.
provide will be greatly appreciated! If because the second stage ramp time The parts list is in Figure 7. NV
October 2008 25
OCT08 - NewProducts.qxd 9/3/2008 3:35 PM Page 26
NEW
■ HARDWARE
■ SOFTWARE
■ GADGETS
■ TOOLS
P R O D U C T S
Register Today
to Receive Exciting
Microcontroller Resources!
© 2008 Renesas Technology America, Inc. Renesas Technology America, Inc. is a wholly owned subsidiary of Renesas Technology Corp.
Stewart.qxd 9/3/2008 5:58 PM Page 28
●●●●
TEMPERATURE
GAUGE PROJECT
BY JIM STEWART
We will build a temperature gauge for the range 0°C to 50°C using a thermistor
in an analog circuit. Why use a thermistor? Two words: temperature transducers.
Along the way, we will look at various ideas such as how to linearize a thermistor,
the effect of thermistor self-heating, and zero and span adjust in a gauge.
Linearization
A linear function (Figure 2) has the equation y = mx +
b where b is the y intercept and m is the slope. Both b and
m are constants. In instrumentation terms, b is the offset
28 October 2008
Stewart.qxd 9/3/2008 5:59 PM Page 29
From Rx to Ry
The slope of a straight line is a
constant. In Figure 3, change Rx to
Ry. Fix the temperature at 25°,
which also fixes r(T), making F a
function of Ry. Using calculus, set
■ FIGURE 5
the second derivative of F with
TEMPERATURE TRANSDUCERS to move about and carry charge. As the number of loose
electrons increases, it takes less voltage to get current.
1. Thermistors That is, the resistance drops. Figure SB2 shows R vs. T for a
A thermistor is a resistor which changes value with typical NTC thermistor.
temperature. They come in two types: negative temperature NTC thermistors have a non-linear R vs. T curve
coefficient (NTC) and positive temperature coefficient (PTC). described by the Steinhart-Hart equation:
30 October 2008
Stewart.qxd 9/3/2008 6:00 PM Page 31
respect to Ry equal to zero and solve for Ry. We’ll skip the
gory details and give the result: ■ FIGURE 6
October 2008 31
Stewart.qxd 9/3/2008 8:52 PM Page 32
The Circuit
The circuit of Figure 5 provides a 0 to 5 volt output
as T goes from 0° to 50° Celsius; a span of 5 volts with
a resolution of 100 mV per °C.
IC1 is a voltage regulator. IC2 is a low-power, low-
■ FIGURE 7
drift, quad op-amp. IC2 is designed to work off a single
power-rail, so op-amp (A) is used as a “rail-splitter” to
voltage across the thermistor is E/2. For E = 10 volts, establish a virtual ground above real ground. (The split is
maximum thermistor power is P = 52/7.5K = 3.33 mW. not half; we need more “head-room” on the positive side.)
Using the dissipation constant of 4.5 mW/°C gives ΔT = IC3 provides a constant 2.5 volts to drive the thermistor.
(3.33 mW)/(4.5 mW/°C) = 0.74°C. Suppose we want an error R4 (R4A + R4B) forms a voltage divider with the
of no more than 0.1°C. To find the maximum usable E, thermistor as discussed above. The voltage across the
first find the maximum allowable power: thermistor (Figure 6a) is buffered by unity gain amplifier
(B) and appears at TP. With a 2.5V reference, TP ranges
PMAX = 4.5 mW/°C × 0.1°C = 0.45 mW from 2.05V (at T = 0°) to 0.77V (at T = 50°).
The buffered thermistor voltage goes to inverting summing
The voltage across r to get PMAX is: amplifier (D). If the thermistor voltage was simply multiplied
by -1, it would look like Figure 6b having two problems:
VMAX = sqrt(PMAX × R) = sqrt(0.45 mW × 7.5K) = • A zero-offset of negative 2.05 volts.
sqrt(3.375) = 1.84 Volts • A full-scale swing of 1.28V, not the required 5.00V.
Finally, E = 2VMAX = 3.67 volts. To fix the offset, Vref is applied to inverting amplifier
S 6
6
6
Adjustable current limiting
Temperature limiting
Three R/C inputs - serial option
Interface a sharp LCD display to your BASIC Stamp® or other
micro-controller project with ease. No-solder wiring harnesses
6 Many mixing options - Flipped Bot Input
6 Rugged extruded Aluminum case and easy mounting kits available too. See www.seetron.com today.
6 4.25" x 3.23" x 1.1”
$399
Bo • 3.2 x 1.4 in. supertwist LCD
tsIQ BPI-216N
Fav • 2400/9600 baud serial
RC Control o rite • Low (≈2mA) current draw
! • Great with BASIC Stamps®
$39.99 $104.99
$159.99 2+ price
• 3.2 x 2 in. backlit LCD
Scorpion Mini Scorpion XXL Scorpion XL • 1200-9600 baud serial ILM-216L
6 2.5A (6A pk) H-bridge 6 Dual 20A H-bridge 45A Peak! 6 Dual 13A H-bridge
6 5V - 20V 6 5V - 28V 6 5V - 28V • Advanced protocol, 4 switch inputs
6 1.6” x .625” x 0.25” 6 2.7“ x 1.6” x 0.75” 6 2.7“ x 1.6” x 0.5” • EEPROM for configuration settings
• Favorite for OEM applications
Introducing Dalf
6 Closed-loop control of two motors
6 Full PID position/velocity loop • 3.2 x 1.4 in. graphics LCD
6 Trapezoidal path generator 5 0 SGX-120L
6
6
Windows GUI for all features
Giant Servo Mode!
$2 • 2400/9600 baud serial
• Font and 15 screens in EEPROM
6 C source for routines provided
6 PIC18F6722 CPU • Easily draw points, lines, screens
See www.embeddedelectronics.net
H-bridges: Use with Dalf or with your Micro/Stamp • 3 x 2 in. supertwist LCD
TRM-425L
• 1200-9600 baud serial
Simple-H
19
Calibration
Get an accurate thermometer to
measure room temperature along
with a bottle of the red insulating
paint commonly called “Glyptal.”
Cut two 12-inch lengths of stranded,
insulated hook-up wire. Solder a wire
to each leg of the thermistor. Coat
the thermistor and exposed wire with
the Glyptal (or rubber cement) and
let it dry for an hour.
Put a bunch of ice cubes in a
bowl and add some water. Wait about
five minutes for the bath to stabilize
at 0°C. Connect an Ohm-meter to the
wires on the thermistor, and insert
the thermistor into the ice bath. Wait
until the resistance reading stabilizes;
it should be about 35.2 kW. Record
the actual resistance (call it RICE).
Attach the thermistor to the Rth
terminal block on the board. Adjust
R9 (ZERO) until Vout is 0.00 volts.
●●●●
MICROPROCESSOR
CONTROLLED
WOOD
STOVE
Part 1
BY KERRY BARLOW
Many of us burn wood for the items in mind, I decided to see if there was a way to control the
fire’s temperature using some sort of a control circuit.
numerous benefits that this fuel may An Atom 24-pin microprocessor was chosen to control the
provide. I have been burning wood for wood stove. The original design called for automatic control of
many years now and have found that the flue damper (exhaust valve) and combustion door (air input),
as well as a boost fan to quickly start a slow fire. I discovered,
anything that will lighten some of the however, that simply controlling the exhaust damper
drudgery from the work involved accomplished everything I wished and more.
with this is a distinct benefit.
System Operation and Theory
■ FIGURE 2
1) The first condition in the STABLE subroutine is a simple bypass: that the code does not try to open the damper twice within a
10-second period (possibly called by a different IF statement).
If temperature = tempold then goto StableBypass
This line opens the damper in one step increments.
Pretty much self-explanatory — bypass around the subroutine 3) The third condition is directly time based:
if the fire temperature is stable or constant.
If temperature = tempold and temperature < lowtemp
and AttemptsLow >= 6 and exhaustmovedopenbit = 0 then
2) The second condition is based upon time and temperature: AttemptsLow = 0
Gosub exhaustopen
If (tempOld - temperature) >=3 then Endif
Gosub exhaustopen
Do the above if Temperature is below lowtemp limit and has
The fire temperature is falling within the tolerance range, so also not changed for one minute (six loop iterations x 10 seconds).
action must be taken to prevent the oscillations. The temperature It is necessary to raise the temperature if it is too low. It may
has cooled three degrees in 10 seconds, so open the damper be out of wood, but until the damper is wide open, we should try
one step (remember this subroutine runs every 10 seconds). This opening it one stepper position every minute.
is a fast cooling-off period.
TEMPHIGHCHECK subroutine
3) The third condition is also time based: Please note! This code is not a direct duplicate of the
TempLowCheck subroutine. This is because the fire can increase
If (tempOldMinute - temperature) >=6 then its temperature much more quickly than decreasing it.
Gosub exhaustopen
Remember, it is more dangerous having a hot fire than a cold one.
The temperature has cooled six degrees in 60 seconds, so 1) The first state condition is a safety condition and not used in
open the exhaust damper. Note this loop runs every 10 seconds, the templowcheck subroutine:
so 6 x 10 iterations = 60.
This is a slower cooling-off period, but action is still required. If exhaustopenlimitbit = 1 then gosub exhausttohot
Notice the second state has cooled three degrees in 10 seconds The exhaustopenlimitbit is set to 1, showing us the damper is
and in this check, the temperature has cooled six degrees in 60 wide open, yet the fire is too hot over the temphigh limit. The
seconds (one degree in 10 seconds). subroutine exhausttohot will close the damper 20 steps for a
quick reduction in temperature.
4-5) The fourth and fifth conditions are the opposites of cooling
EXHAUSTTOHOT
off — they are for increasing the temperature. Exhaustopenlimitbit = 0
For I = 1 to 20
If (temperature - tempold) >=3 then Gosub exhaustclosed
gosub exhaustclosed Next
Endif Return
‘Temperature has risen 3 degrees in 10 seconds
‘ so close damper 2) The second state condition is the same as the templowcheck
If (temperature - tempOldMinute) >=6 then subroutine condition, but is based on a high temperature:
Gosub exhaustclosed
Endif
‘Temperature has risen 6 degrees in 60 seconds TEMPERATURE SENSORS AND
ADDITIONAL SOFTWARE
‘ so close damper
value of 100 to every temperature reading and then storing the was making, I noticed that sometimes disconnecting power
converted temperature. When the FIRES subroutine reads from or program restarts might corrupt the EEPROM data.
EEPROM, I subtract 100 to get the proper value to display. See
Figure 5 for an example of the display’s output. Wrap-Up
LCD Display Code As you can see, controlling the temperature of a wood
There are five different display modes that may be selected fire is not as simple as it might appear. This project is quite
with the manual switches. involved and I have only touched upon the majority of the
The default LCD mode shows: inside, outside, and fire software code. In the next article, I will go into details of
temperatures; time and date; exhaust vent stepper position and hardware design, schematics, and parts sources for actual
what mode the vent may be in; opening, closing, or stable (refer construction. NV
back to Figure 2). Note in the figures
there are two different lines
of text for the buttons. The upper line is
for the temperature mode and the lower
line is for the clock setting mode.
Pushing the right hand Daily Log
switch accesses the second mode.
This mode shows yearly low and high
temperatures, as well as daily low and
high temperatures (Figure 5).
Pushing the left or right hand lower
and raise buttons will select the fire
temperature limit display and show the
fire’s current burning time and how many
fires you have lit this year (Figure 6).
Holding either the lower or raise
button down for more than three
seconds will enable the temperature
setting subroutine. The subroutines
RaiseTempLimit and LowerTempLimit
will change the low and high limit
temperatures, and thereby change the
display output, as well.
Metal Fabrication
Quality prototype parts within 24 hours!!
Materials from 0.001” to 6.000” in
thickness.
40 October 2008
Full Page.qxd 9/2/2008 3:51 PM Page 41
4*
OPNOWLYMVYTHUJL
HKKP[PVUZ[V[OL4*7SH[MVYT
<W[V2)`[LZ-SHZO\W[V2)`[LZ9(4PU[VWPUWHJRHNL
.L[:[HY[LK;VKH`
.VVUSPULHUKYLNPZ[LY[VILLSPNPISLMVYH-9,,4*:[HY[LY2P[*
^^^HTLYPJHYLULZHZJVT9LHJO4*L
*Only available to customers in North and South America
Fox.qxd 9/2/2008 3:10 PM Page 42
●●●●
MAKE THE SMART ROOM AIR
CONDITIONER
CONTROLLER
BY TOM FOX
A Microcontroller Based
Multipurpose A/C Remote
Thermostat
Smart Thermostat’s
Design Details
■ Close-up of the air flow sensor assembly
This project uses the National mounted in the A/C’s air stream.
Semiconductor’s LM34 chip as temperature and
airflow sensors. The LM34 — a three terminal device — is compressor. Let us assume you
especially easy to use with the PICAXE. Connect +5 volts decide (like I did) to control
(up to 20 volts) to the LM34’s Vs terminal, ground to GND, the compressor directly. To do
and you get 10 mV per degree Fahrenheit at the LM34’s this, you must replace the
Vout — all with one degree (with the LM34A or LM34CA) thermostat with a power relay
accuracy! Of course, with a single power supply you can’t with contacts rated at least at ■The Smart A/C Controller
mounted on a wall. Also
measure below zero if you reference the output voltage to 15 amps at 120 volts AC. For shown is the A/C and a
ground but with most applications, that’s not a problem. the coil, I chose a relay with junction box containing
The airflow sensor makes use of the fact that a heated 24 VAC coil since this is the the transformer.
object is cooled when air flows over it. Here, we use an type normally used to control
unheated LM34 next to a LM34 heated with a 100 ohm heating and cooling equipment. Check the A/C’s power
resistor. With no airflow, the heated LM34 is roughly 25 rating. If you want to go the indirect root by heating the
degrees warmer than the unheated one. With strong air- A/C’s built-in thermostat, you will still need a suitable relay
flow, there is just a couple degrees difference. The PICAXE to control the light bulb (or other small heater).
28X1 firmware keeps an eye on this difference and if it is Now getting back to our circuit. The coil of the power
too high, it shuts off the compressor since most likely ice relay is connected (in series with a power source) to the N.O.
has built up. The ice then slowly melts since the fan is contacts of RLY1, via connector J3. This relay is controlled by
still going. After it melts, the compressor turns on and U2, which is an 8M microcontroller. Notice that the PICAXE 8M
everything — hopefully — will be copasetic. microcontroller’s Input 3 pin (terminal 4) monitors the 28X1
Once you have the information, you have to do Output 7 pin (terminal 28). The 8M program (see Listing 2
something with it. Here, the PICAXE 28X1 is used to make also on the Nuts & Volts website) makes sure that it doesn’t
sense of the information and issue all the commands to turn on the compressor unless it has been off for five (or three)
the A/C. The PICAXE 28X1 is basically a Microchip minutes. LED1 is connected to the 8M’s terminal 6 which is
PIC16F886 microcontroller with a sophisticated Basic set up as an output. This LED starts flashing immediately
interpreter built into ROM. For more
on the PICAXE, see back issues of ■ Close-up of the component side of the ■ Close-up of the foil side of the
Nuts & Volts. This PICAXE has many completed Controller’s circuit board. completed Controller’s circuit board.
features ideally suited to this project
and it is so simple to use if you are at
all acquainted with the Basic language.
The display consists of two
seven-segment common anode
LED displays, each controlled by a
75HC595 eight-bit shift register with
output latches. The firmware in the
PICAXE translates data into codes sent
to the shift registers which then lights
the LED’s segments. (See Listing 1
which is available on the Nuts & Volts
website at www.nutsvolts.com.)
The primary purpose of this
project is to intelligently control a
October 2008 43
Fox.qxd 9/2/2008 3:13 PM Page 44
after the 8M receives a “compressor on” order from the 28X1. professionally made, double-sided printed circuit boards
It then will go on steadily after the delay time is achieved and (PCBs) with plated through holes, but without
as long as the 8M continues to receive a compressor on order. silk-screening. These boards were made by expresspcb.
At this same time, the 8M issues a signal to activate RLY1. com. I also took advantage of their free schematic and
The reader may notice there are several parts listed, such layout software, both of which I can recommend.
as RLY2, RLY3, LED4, LED5, RESN, DIPSW1, and SEN4, While most parts in this design are standard size with
which are shown on the schematic (and circuit board) but .1” pin spacing, if you use the foil pattern provided with
are optional. These parts were designed into the circuit the files on the website (or purchase a PCB through
board for future expanded capabilities of the controller. www.magiclandelectronics.com), make sure you either
use the exact pushbutton switches called for in the parts
Making It list or only substitute switches that have nearly identical
terminal placements.
The prototypes of the Smart Controller use I recommend that the reset switch, the optional DIP
switch, and all the connectors (J1, J2, etc.) be mounted
INCREASED ACCURACY on the foil side and the other components on the normal
component side.
For higher potential accuracy, you can tweak the voltage If your particular case has good air circulation, SEN1
regulator so it puts out exactly 5.12 volts. Alternatively, you can
modify the program a bit. For instance, if the supply voltage is (room sensor) can be mounted directly to the board.
exactly five volts, you will want to multiply the average reading If not, it is best to attach a short three-conductor cable to
you get from the 10-bit A/D converter by 5,000 and then divide it and place the sensor outside the case, like I did.
the result by 5,120. The result is the binary number of the
temperature (in half degrees Fahrenheit). In general, multiply The air flow sensor is constructed using a tiny PCB.
the average reading by the EXACT supply voltage in millivolts Make sure the 100 ohm resistor (heater) contacts the
and then divide this by 5,120. sensor. A tiny bit of epoxy cement can be used here.
44 October 2008
Fox.qxd 9/2/2008 3:14 PM Page 45
The power supply for the controller is a standard five to power the compressor’s relay.
volt one. However, the 28X1 program treats the voltage as
if it was exactly 5.12 volts. To simplify things, I assumed a Programming the PICAXEs
voltage reference of 5.12 volts and then treated each .005
volts as .5 degrees Fahrenheit (5.12 divided by 1024 is .005). The programming port for the 28X1 is J4 and the port
I found that most five volt regulators produce an output for the 8M is J5. If your computer has an RS-232 serial
voltage of somewhere between 5.05 and 5.10 volts. Thus,
a 5.07 volt regulator should, theoretically, be 1% accurate.
Other parts needed to complete your project include:
For the power supply, I purchased a 24 VAC 5V power supply, 24 VAC transformer along with a
transformer at a hardware store. This transformer also has power relay with a 24 VAC coil (with a resistance of
8 VAC and 16 VAC outputs. I used the 8 VAC output to over 70 ohms), connectors, wire, case, and, of course,
power my +5 volt power supply and the 24 VAC output a room air conditioner.
October 2008 45
Fox.qxd 9/2/2008 3:15 PM Page 46
USB Programmer for PIC® MCUs LAB-X Experimenter Boards BASIC Compilers for PICmicro®
Pre-Assembled Board Easy-To-Use BASIC Commands
$89.95 (as shown)
Available for 8, 14, 18, 28, Windows 98/Me/2K/XP/Vista
RoHS and 40-pin PIC® MCUs
2-line, 20-char LCD Module PICBASIC™ Compiler $99.95
Compliant
9-pin Serial Port BASIC Stamp 1 Compatible
Programs PIC Sample Programs Supports most 14-bit Core PICs
MCUs including Built-In Serial Comm Commands
Full Schematic Diagram
low-voltage (3.3V)
devices Pricing from $79.95 to $349.95 PICBASIC PRO™ Compiler $249.95
Supports most PICmicro® MCU Families
Includes Direct Access to Internal Registers
Software for
Windows With Accessories for $119.95: PICPROTO™ Prototyping Boards Supports In-Line Assembly Language
98, Me, NT, Includes Programmer, Software, USB Cable, Interrupts in PICBASIC and Assembly
XP, and Vista. and Programming Adapter for 8 to 40-pin DIP.
Double-Sided with Plate-Thru Holes Built-In USB, I2C, RS-232 and More
Circuitry for Power Supply and Clock Source Level Debugging
Large Prototype Area
EPIC™ Parallel Boards Available for Most PIC® MCUs See our full range of products, including
Port Programmer Documentation and Schematic books, accessories, and components at:
starting at $59.95 Pricing from $8.95 to $19.95 www.melabs.com
46 October 2008
Fox.qxd 9/2/2008 3:17 PM Page 47
Using It
With the MODE switch in the
NORMAL position, the display shows
the temperature of the room.
When power is first applied, the
green Compressor On LED will flash
twice. Then, the red Low Airflow LED
will flash once, as will the Freeze Up
LED. This sequence indicates that
both MCUs are operating properly.
Next, the display will show the
temperature in degrees Fahrenheit.
(If you want to display Celsius, install
optional DIPSW1 and put position 1
ON.) The default compressor delay is
five minutes. If a jumper is placed at
J6, the delay is three minutes.
You can find the temperature of
the thermostat setting by momentarily
pressing either the UP or DOWN
buttons. The setting will flash for 10
seconds. While the display is flashing,
you can set the temperature using P superb laser detection
the UP and DOWN buttons. P high resistance to
With the MODE switch is in the temperature changes and
Sun interferences
P patent pending
TIPS ON SETTING UP PCT/HR2008/000015
A WALK-IN COOLER
As mentioned earlier, the Smart
A/C Controller’s original purpose was
for use in a walk-in cooler that used an
inexpensive room air conditioner as a
cooling source. If you plan on using
this project for this purpose, I have a
few tips for you. If you use an average
sized air conditioner, the room should
be less than 1/2 the size of the rating
of the air conditioner and it must be
well insulated. The best way to do this
is to use foam insulating sheeting to
partition off a room. This partitioning
job is, in fact, quite easily done. The
primary problem is the door. I used a
combination sliding insulating door
and clear plastic vertical strips. Another
tip: Don’t set the thermostat below
38°F. You want to start out at 45°F.
October 2008 47
Fox.qxd 9/2/2008 3:42 PM Page 48
AIR FLOW position, the display shows half degree Enhancing and Expanding the
differences between the heated and unheated sensors in the Smart A/C Controller
air flow module. When the air is dead calm, this reading
often reaches 45. With strong air flow, it drops below 15. This project has enormous expansion capabilities. The
The program keeps an eye on this air flow number and optional parts RLY2, RLY3, SEN4, LED4, LED5, S6, RESN,
when it rises above 18 (the default setting), it shuts off the DIPSW1, and associated parts are shown in the schematic.
compressor. The procedure to change this setting is similar The circuit board was designed to include these parts.
to changing the thermostat’s SET temperature. However, except for DIPSW1, the firmware in the 28X1
SHOWCASE
PP:KLWH
ZDWHUFOHDU
/('9
PFG
$%
VHFRQGYRLFHUHFRUGHUSOD\EDFNPRGXOH
SUHDVVHPEOHG$
7KH9HOOHPDQ3HUVRQDO6FRSH
LVDFRPSOHWH06VSRUWDEOH
oscilloscope. (HPS10) $146.
QGV
7KRXVD
WH P VRQ
PRUHL
EVLWH
RXUZH
48 October 2008
Fox.qxd 9/3/2008 1:24 PM Page 49
does not know they exist! Nonetheless, with the use of J4 comfortable indoor temperature. Since the 28X1 can
and/or J5, a computer, the PICAXE programming software, handle a 4,096 byte program and only 710 is used in the
and a bit of know-how the reader can re-program the initial design, there is plenty of room for ingenuity! NV
PICAXE for their own unique application.
One possibility is to include controls for a heater so
that the room temperature doesn’t drop below freezing.
CONTACT THE AUTHOR
Tom Fox can be reached at magiclandelectronics@gmail.com
Another possibility is to use the remote reading sensor to or at his websites at www.magiclandelectronics.com and
keep track of outside temperature for a more even and www.magiclandfarms.com.
SHOWCASE
'LVSOD\WH[WDQGJUDSKLFVIURP
\RXUPLFURFRQWUROOHURQVWDQGDUG
79PRQLWRUVZLWK%2%+
3K_ZZZGHFDGHQHWFRP
OP-AMPS
Operational amplifiers were initially
constructed using vacuum tubes and then
transistors, usually as individual circuit
boards that were wired together. With the
advent of integrated circuit technology, op-
amps were inexpensively mass-produced in
This article discusses simulation results for both inverting and several forms such as the dual-inline-pin (DIP)
non-inverting amplifiers, using the uA741 op-amp. Additionally, package. Interestingly, analog computers
the article highlights how overall amplifier performance is are now obsolete so few — if any — of the
affected by the gain and bandwidth limitations of the op-amp, millions of op-amps that are manufactured
as illustrated by PSpice simulations. The uA741 operational each year spend their days calculating
logarithms. Instead, most op-amps find their
amplifier is discussed because it is included in most versions
way into analog signal processing applica-
of PSpice, so you can easily repeat the simulations on your own. tions where they amplify, filter, or otherwise
However, the theory presented here applies to any op-amp used process many different types of waveforms.
with feedback. We’ll also discuss a simple audio amplifier that
you can build in order to validate the concepts discussed here. Open Loop Op-Amp
Characteristics
by Justin Luhm and John E. Post
Figure 1 shows how to determine
through simulation the open loop gain (ratio
■ FIGURE 1. Circuit for 0 of the output voltage to the input voltage
simulating the open loop
response of the uA741 -
without any feedback) and bandwidth, while Figure 2
operational amplifier. shows the simulation results. As they show, when used
DC = 15 without feedback, an op-amp is not a particularly useful
+
7
+ OS2
Magnitude = 1uV +
Figure 2 also shows the midband gain1 and the cutoff
AC 6
Sweep OUT frequency2 of the circuit; they allows us to determine an
Phase = 0 - 1
2 -
V important figure of merit of amplifier performance called
OS1
V-
P
rior to the development of digital computers, feedback circuits that allow trading back and forth
complex mathematical equations were solved using between gain and bandwidth. There are two basic op-amp
analog computers. An analog computer is formed feedback configurations that offer this: the inverting
by combining individual amplifiers wired to perform the amplifier and the non-inverting amplifier. As the two
50 October 2008
Post.qxd 9/3/2008 7:49 AM Page 51
with Op-Amps
National Semiconductor LF 411 4 MHz
Texas Instruments LM 324 1 MHz
SSG Thomson uA 741 1 MHz
The non-inverting amplifier, as the name implies, does ■ TABLE 1. GBW product for some low-cost op-amps.
not invert the signal polarity. This amplifier is capable of
producing voltage gains between unity and the midband gain ratio is multiplied by -1 to produce a net negative —
value as determined by the feedback network. In this set-up, thus causing the inverted polarity. The ratio of Rf to R1
the midband gain is defined as one plus the ratio of the two determines how op-amp gain and bandwidth are traded
resistors Rf and R2 (Figure 3). Additionally, the input impedance (Figure 6). If you look carefully at Figure 6, you may notice
in this configuration is essentially infinite (like an open circuit) that the inverting amplifier has lower bandwidth at low
which minimizes loading on the source. The milliampere voltage gain when compared to the non-inverting amplifier.
output current limitation of the op-amp implies resistors in This is because the inverting amplifier no longer directly
the feedback circuit are normally in the kilohm range. trades gain for bandwidth when the amplifier voltage gain
Figure 4 shows the effect of feedback on the band- falls below about 10. This effect is most dramatic in the
width and gain of the non-inverting amplifier. As Rf changes case of a unity gain (1.0) amplifier because the bandwidth
from zero (short circuit) to infinity (open circuit), the resist- of the inverting amplifier is reduced to half that of the
ance ratio Rf/R2 + 1 changes from one to infinity. Notice
that as Rf changes from zero to infinity, the feedback Rf ■ FIGURE 3. Non-inverting
increases from total feedback to no feedback, gain and amplifier configuration (power
U3 connections not shown).
bandwidth are traded, with the GBW remaining constant R2
-
for each combination. Also distinguishable is the GBW 6 vout R
limitation that the op-amp itself places on the circuit inde- Out + AMB = = 1+ f
pendent of feedback because each of the curves must + Vout vin R2
uA741 -
converge on the open loop curve as frequency increases. Vin
Inverting Amplifiers
with Op-Amps
Gain (dB)
The inverting amplifier Rf
120
October 2008 51
Post.qxd 9/3/2008 7:50 AM Page 52
U1
+ 2
- OS1
1
BWout = BW0 2 n - 1 31 kHz and there is 31.6 kHz of
4
V-
2 1 6
- OS1 0 uA741 OUT
DC = 15V
V-
6 3 5
V+
+ OS2 V
7
1 1
7
V1
+
+
1k AC
Sweep
Magnitude = 1uV 1k
2 0.64
Phase = 0
-
3 0.51
0 0 0
+ 4 0.43
V2
DC = 15 5 0.39
-
■ FIGURE 7. Cascade of
0 non-inverting amplifiers. ■ TABLE 2. BW Shrinkage.
52 October 2008
Post.qxd 9/3/2008 7:50 AM Page 53
Frequency
bandwidth is 31.9 kHz —
almost exactly what we
predicted. For the cascade, the low frequency gain is this should allow us to reach our necessary output swing
1,000 (60 dB) while the overall bandwidth is reduced to — provided we are at a midband frequency. We can check
20.7 kHz. This again is in excellent agreement with the to see if 1 kHz falls in the midband range by recalling that
value predicted by bandwidth shrinkage theory. the uA741 has a GBW of 1 MHz. Thus, a midband gain
requirement of 100 should result in a 40 kHz bandwidth.
Example Applications This provides sufficient bandwidth to avoid the gain roll-off
that occurs as we approach the amplifier cutoff frequency.
Op-amps are usually not powerful enough to take a Figure 10 displays 10 milliseconds of the output
small signal input from a microphone or head unit and waveform that results from performing a transient analysis
amplify the source sufficiently to directly drive a speaker. of the circuit when driven by a 1 kHz voltage source. The
For example, assume the signal is generated at a frequency output waveform appears to be almost perfectly sinusoidal
of 1 kHz and the speaker requires a ±1 V peak swing at without evidence of crossover distortion at the zero
the output for adequate volume. A one volt peak swing crossings of the waveform. It is easy to verify this by using
across an eight ohm speaker (typical for a small speaker) the Fast Fourier Transform (FFT) function of PSpice to
requires that the op-amp deliver a peak current of 125 mA compute the frequency spectrum of the output waveform.
(1V divided by eight ohms) — which is far in excess of the In this case, the transient simulation was run for one
uA741’s maximum rating of 25 mA. second to create 1,000 cycles of the 1 kHz output waveform
The solution to this problem is to provide additional to obtain sufficient resolution in the frequency spectrum
current amplification using the complimentary Class
AB emitter follower shown in Figure 9. In this circuit, ■ FIGURE 9. 0
resistors R3 and R4 along with diodes D1 and D2 Audio amplifier 0
-
provide base-emitter bias sufficient to set transistors formed from V2
non-inverting DC = 5V C1 100 μF
Q1 and Q2 just at the edge of conduction. This is amplifier and +
+
U1
3 5
V
+ OS2
D1N4148
which almost totally eliminates output stage distortion. uA741 OUT 6
One can observe that the resistors R1 and R2 0 R1
+
2 1
-
V-
+ OS1 D2 8 R5
in the circuit set the midband gain to about 24 V/V; 1K
D1N4148 Q2
AMPLITUDE = 42 mV
FREQUENCY = 1 kHz
Q2N3906 0
Figure 9 Parts List + V4
Transient
Analysis
■ R5 8Ω ■ Q2 2N3906 +
0
MISCELLANEOUS 0
CAPACITORS 24K
■ C1,C2 100 μF, 25V ■ 5V dual power supply
electrolytic or batteries +
■ 8 Ω speaker R2
October 2008 53
Post.qxd 9/3/2008 7:50 AM Page 54
FOOTNOTES
With the proper selection of resistors, either inverting 1 Midband gain is the ratio of the output voltage to the
input voltage at frequencies in
between the low and high rolloff
1.0V
frequencies. Because an op-amp
experiences no low frequency
rolloff, the midband gain is the
same as the gain at DC.
2 The cutoff frequency is the
1.0mV
frequency at which the voltage
gain drops to 70.7% of the
midband value. This is equivalent
to a 50% drop in power gain or a
1.0uV
reduction of 3 dB. In an op-amp
— which amplifies down to DC —
the cutoff frequency and the
bandwidth are identical.
1 2
Lack of support for many devices now deemed legacy; Some applications won’t
run on Vista; and
3 Vista requires more processing power and therefore your
applications run slower.
by Michael Simpson
V
ista requires that many system running XP, I can use the laptop. This laptop has quite a bit of
hardware manufacturers rewrite highest game setting, and it runs hardware, including both tablet and
their drivers in order for the smoothly. touch screen hardware, so locating the
hardware to run properly. Since While I have a love/hate XP versions of the drivers will present a
rewriting drivers costs time and relationship with Vista, I did not want worst case scenario.
money, many manufacturers have to completely remove it since it is I suggest you purchase an external
opted to drop support for some of supposedly the next-generation hard drive and some backup software
their older products. operating system. As Microsoft and do a complete backup of your
Let’s look at a real world example. releases more updates and computer before starting the
I recently purchased a new machine manufacturers update their drivers, its procedures I’ll be covering. USB hard
that came with Vista installed. The operation will certainly become more drives have dropped considerably in
system it is replacing is used to run my efficient. I remember when XP was price and, if you aren’t backing up
business. It has three printers and first released. It had many of the same your system, you are running on
several applications needed to perform problems as Vista does now. With the borrowed time.
its daily tasks. Two of the printers were release of the third service pack for The cheapest way to get an external
not supported nor would they ever be. XP, it has become a very stable backup drive is to purchase an external
Both printers were less than two years operating system. case. This case cost me $15 and I
old, but if I were to continue using So the question is, how do I add a placed an old IDE hard drive I had
them in my business, I would need to copy of XP to my computer and still inside. I have seen 160 GB hard drives
purchase new versions of each. keep my Vista install intact? Normally, on sale at my local computer store for
This was just the start. Several this can be done by installing XP then less than $50. For a more portable
other applications would not work and installing Vista as a second OS. solution, you can use small 2.5”
again, new versions would have to be However, this is not possible with an enclosures.
purchased. I was going to end up OEM install of Vista. You don’t get You will also need to purchase
spending more on replacement normal Vista install disks and can only some backup software. I have used
peripherals and software than I did on install Vista with a total reformat of each of the following with success:
the new machine I just purchased. your hard drive. Fortunately, there is a
So, say you’re not a business and way to install XP alongside Vista in a • Norton Ghost
you just like to play games. Vista has dual boot configuration. In this article, • Acronis True Image
been touted as being the next major I will show you step-by-step how to do • Spotmau PowerSuite
leap in gaming. Well, I’m sorry, but I just that.
have not found this to be true. Most In addition to the backup software,
new games have a very hard time Let’s Begin you will need a way to make various
running efficiently under Vista. For There are two obstacles that must changes to the partitions on the hard
example, a new game I had purchased be overcome when installing XP on a drive. For this reason, I recommend the
would only run under minimum Vista-based system. The first is the actual Spotmau PowerSuite 2008.
settings. The system I was using was install of the OS. The second is locating If your computer has an option to
a very fast gaming system with a the XP drivers for all the hardware. burn recovery disks, I recommend you
high-end graphics card. On the same I just purchased an HP tx2000z do that, as well. We will be performing
October 2008 55
Simpson.qxd 9/3/2008 5:18 PM Page 56
some risky operations so it’s important your XP install. You will still an XP boot installer that combined my
that you have some sort of back up need a legal copy of Microsoft XP, SP2, and SATA drivers in order to
strategy in place before you start. XP and a SP2 disk, though. The install XP on my HP dv9000t laptop.
As a minimum, back up your program can be found at Okay, you have all the prerequisites
important documents to a Flash drive. www.nliteos.com/index.html. and are ready to start the install. At this
• Vista Boot Pro — Vista Boot Pro point, I will only warn you one last time
Obstacle 1: Installing XP is a Vista boot manager. It ...BACK UP! BACK UP! BACK UP! With
Prerequisites makes it simple to edit or add that said, let’s get started.
Before we get started, there are a new boot entries to Vista. This Step 1: Reclaim Disk Space
few basic tasks you will need to perform: program can be found at In order to install XP, we need to
• Partition Utility — This utility is www.vistabootpro.org. make some room for it. In my case,
needed to mark your Vista boot I used the included disks and started
partition hidden and inactive. In addition to the above programs, from scratch. When you get a new PC,
This is crucial to the successful you need to test your XP boot CD/DVD it has what is referred to as bloatware.
installation of XP as a second to make sure your drive controller is Bloatware consists mostly of
partition over Vista. The Spotmau supported by the XP installer. Some Intel- introductory or demo software. Some
Powersuite 2008 software can based SATA drivers are not supported. systems will include as much as 20 GB
also be used to back up your In particular, the HP dv9000t laptops will of this stuff. If you are starting from a
original partitions. not support the base XP installer. You fresh install, you will need to go through
Visit www.spotmau.com for pricing. can do a test by booting from the XP each of the applications and decide
• Microsoft XP with SP2 — You install CD; if you make it to the partition what you want to discard. Once
will need a legal, bootable screen, you’re okay. If you get a screen decided, use the “Programs and
copy of Microsoft XP with SP2. that tells you there are no drives present, Features” in the control panel to
If you have a copy of XP but you will have to make some changes to remove the applications you don’t
no SP2, all is not lost. There your XP install. want. A good place to start is to
is a program called nLite, If you do need to make changes, remove expired trial software.
however, which makes it easy take a look at the nLite program I The next step is to clean the main
to add SP2 or other drivers to mentioned earlier. I was able to create drive. In most cases, this will be the C
drive. From the start menu, choose the
All Programs/Accessories/System
Tools/Disk Cleanup option to begin this
operation. Make sure you select “Files
from all users on this computer” and click
Continue on any security prompts, then
select the drive you want to clean. After
the computer scans the drive, you will be
prompted for a list of selections. Here, I
made sure I added the hibernation files.
This almost always removes 1-2
gigabytes. Note that it will also remove
the hibernate option from Vista. I will
show you how to get it back later.
Step 2: Resize Vista Partition
■ FIGURE 1 Open up the Disk manager
located at “Control Panel-
Administrative Tools-Computer
Management.” You will see something
that looks similar to Figure 1. I have
removed some of the side panels to
make the form easier to follow.
Our goal here is to free up enough
space so that we have room to install a
copy of XP. You have already removed
some of the unwanted applications
and cleaned the disk. This should have
■ FIGURE 2 ■ FIGURE 3 freed up some space so we can resize
the partition. Vista has a resize feature
56 October 2008
Simpson.qxd 9/3/2008 8:14 PM Page 57
H OW TO D U A L B O OT X P W I T H W I N D OW S V I S TA
■ FIGURE 11 minutes
formatting then
start the copy and
install process. On
a fast computer, it
will take 30-40
■ FIGURE 12 minutes. Near the
minutes for the XP installer to load, but end, you will be prompted for basic
eventually you will be presented with information such as Time Zones. It all
the Welcome to Setup form shown in depends on the exact hardware that is
■ FIGURE 17
Figure 10. Hit Enter to continue. Next, detected. For instance, if the installer
you have the license agreement. Read detects your network interface it will
the form, then hit F8 to continue. prompt you for network information.
You will now be presented with In my case, the drivers for the network
the Partition form shown in Figure 11. were not detected so I was not
Select the partition labeled XP using prompted. Just keep in mind the install
the cursor keys and hit Enter. If you get will vary somewhat for each computer.
a warning about the active partition, When the installation is finished,
just ignore it and hit Enter to continue. you will be placed on the XP
You will then be prompted to desktop. You need to immediately
format the partition as shown in Figure reboot and restore the hidden Vista ■ FIGURE 18
12. Select the Quick Format and hit partition. Do this by
Enter. The drive will spend a few booting up from the ■ FIGURE 19
Spotmau Power Suite CD.
Follow the same prompts
as before and enter the
Partition Genius
application.
Step 6: Unhide and
Activate the Vista Partition
Right-click on the Vista
partition (first one) and
■ FIGURE 13 select the Unhide Partition
option shown in Figure 13.
You also need to set the Vista partition Control on or off”option as shown in
to active by selecting the Set Active Figure 14.
option on the Advanced menu. Exit This will load the form shown in
the form and application menu and Figure 15. Remove the check from the
reboot the machine. Make sure you checkbox by clicking it, then hit the OK
remove the Spotmau disk. button. You will be prompted to reboot
Step 7: Tell Vista about XP the machine.
In order to perform the following Next, we need to change a few
tasks, we need to turn off the UAC options so we can see some system files.
feature in Vista. To do this, load the Start the Computer form and select
User Accounts form from the control ”Folder and Search Options” from the
■ FIGURE 14 panel and click the ”Turn User Account Organize Menu as shown in Figure 16.
Click the View tab and set the
following options (shown in Figure 17):
• Select Show hidden files and
■ FIGURE 16 folders.
• Uncheck Hide extensions for
known file types.
• Uncheck Hide protected
operation system files.
Click the OK button to make
■ FIGURE 15 the changes.
On the Computer form, double-
58 October 2008
Simpson.qxd 9/3/2008 5:22 PM Page 59
H OW TO D U A L B O OT X P W I T H W I N D OW S V I S TA
status of your drivers. My tx2000z some research, I know that the ts2000z
HP latop is missing eight. is an upgrade from the older tx1000 ■ FIGURE 26
laptop. Many of the hardware items on
Where Do I Start? the website are the same. A search for
The first place to look is your ”tx1000 drivers” yielded a few more
system’s manufacturer’s website. In my drivers, including the Broadcom
case, this is HP, so I went to wireless network driver.
www.hp.com and typed ”tx2000z I also found out that my laptop
drivers” in the search field on the main motherboard uses an Nvidia Chip set.
page. Unfortunately, only a couple Nvidia has an option where they can
drivers were located there. After doing detect your hardware. This enabled
H OW TO D U A L B O OT X P W I T H W I N D OW S V I S TA
don’t forget to back them up in case Reset Hidden Files questions on Vista or XP. I am by no
you decide to restore from one of You may want to reset your means a Vista or XP guru. The things
your backups. hidden file types so that certain files I showed you here I found by trial
Now for the clincher. Many times, are not displayed, as these can and error and by searching the web.
the order in which the drivers are show up on your desktop. Just If you run into problems, restore
installed is important. This is why I told reverse the process I showed you your backup and try again. (If you
you so many times to do a backup. back in Step 5. did not create a backup, all I can
This gives you a point to fall back on if say is, I TOLD YOU SO!) Hopefully,
you can’t get a particular driver to Last Words you will be as successful and
work. As a rule of thumb, I install the Before I end this article, I must satisfied as I have been with a dual
chipset drivers first, then the display ask that you don’t contact me with boot system. NV
drivers. Next, I install the wireless so I
can get the network up and running.
Sound drivers are next, then I just start
working through the rest of the bunch.
Also, if you get a device that does
not work, go back and take a closer look
at the System Devices form. Often, you
will find a driver that has to be reloaded
manually. This happens frequently with
the high definition audio drivers.
Final Thoughts
Hopefully, this information will get
you well on your way to creating a
dual boot configuration on your
current Vista machine. Let me close
with a few comments.
by Joe Pardue
Joe’s bo
rted
o
no w
w w .nuts
is serie
ila
Get sta k & kit are ava volts.com
s!
with th ble in our
PART 3:
websto
re at w
C Types, Operators, and Expressions
L
ast month, we wrote our first C and false.’ It’s the latter that allows us following sequence of states (leaving
Program: CylonEyes.c, built the to use bits to automate Boolean Logic out 5 through 250):
CylonEyes hardware, and watched (an ‘algebra’ for determining if a 00000000 = 0
the LED light zip back and forth. statement is true or false), and thus the 00000001 = 1
This month, we will look at AVR modern binary logic computer entered 00000010 = 2
port input and output. And we will add the world and now slaughter is so 00000011 = 3
an eight-bit DIP switch to our learning cheap, quick, and easy to compute that 00000100 = 4
platform. Remember in Workshop 1 anybody can do it. Maybe this is ...(states 5 through 250) ...
where I compared learning C and AVRs skimming the topic a bit (har!) but a full 11111011 = 251
to walking across two continents and explanation would begin with the first 11111100 = 252
said I’d give you some warnings? Well, sentence of Genesis and only hit its 11111101 = 253
prepare to have a branch smack you in stride about the time Alan Turing offed 11111110 = 254
the face. This workshop has some very himself as his unjust reward for saving 11111111 = 255
tedious facts in it. Sorry, but it can’t all For CylonEyes, what you are
be fun and games and you have to seeing is eight of the 256 possible
climb a high wall in order to get to the states being presented in a sequence
fun stuff. As Randy Pausch said in the that fools us into thinking we are see-
‘Last Lecture’ “... brick walls are there ing a back and forth scrolling motion.
for a reason. The brick walls are not Using binary numbers where the lit
there to keep us out. The brick walls LED is represented by 1 shown next to
are there to give us a chance to show the binary, hexadecimal, and decimal
how badly we want something. equivalent, what we are seeing is:
Because the brick walls are there to 00000001 = 0x01 = 1
stop the people who don’t want it 00000010 = 0x02 = 2
badly enough. They’re there to stop the 00000100 = 0x04 = 4
other people.” 00001000 = 0x08 = 8
00010000 = 0x10 = 16
Data Types and Sizes 00100000 = 0x20 = 32
01000000 = 0x40 = 64
Bits — The first computers were 10000000 = 0x80 = 128
people with quill pens who spent their In microcontroller applications, we
lives calculating tables of things like ■ FIGURE 1. Port input and output. will often be dealing with the states of
cannonball trajectories to help soldiers byte-sized ports, like port D. A micro-
more accurately slaughter their ene- the free world in WWII. And while controller port is a place where outside
mies. Later, mechanical computers with fascinating, it won’t get us blinking voltages (0V or 3V) can be read or set.
brass gears and cams were developed LEDs any quicker, so let’s move on. Experienced microcontroller program-
to make the slaughter cheaper, quicker, Each of our LEDs is connected to a mers memorize the binary equivalent
and easier. Then one day a genius microcontroller pin that can have two of hex digits and find hex numbers very
figured that you could do all this com- voltage states: ground or Vcc, which useful. For instance, given 0xA9, what
puting even easier if you used switches. can be manipulated as a data bit. would the LEDs (or the voltage states
Switches can be off or on, and the Bytes — The AVR and many other of an eight-bit register) look like? If you
fundamental datum is the ‘bit’ with microcontrollers physically handle data memorize the hex table, you come up
exactly two ‘binary’ states. We various- in eight-bit units called bytes — a data with 0xA = 1010 and 0x9 = 1001, so
ly refer to these states as ‘0 and 1’ or type that can have 256 states, 0 the LEDs (voltage states) will look
‘on and off’ or ‘clear and set’ or ‘true through 255. This is shown in the like 10101001. If you ask the same
62 October 2008
Pardue3.qxd 9/3/2008 8:06 PM Page 63
SMILEY’S WORKSHOP -
question in decimal, what will 169 look sion about the size of the Operator Name Example Defined
like on the LEDs? Well, good luck on data type we are using. [] Array element x[6] Seventh element of
array
doing that in your head.
Declarations
. Member selection PORTD.2 Bit 2 of port D
char — The name of this data type Member x of the
is short for character, and is typically -> Member selection pStruct->x structure pointed to
by pStruct
used to represent a character in the A declaration is a text
Contents of memory
ASCII character set. Originally, there statement that declares to * Indirection *p located at address p
were 127 ASCII characters used by the compiler how your & Address of &x Address of the
variable x
Teletype machines to transmit and words are to be used.
receive data. Remember that in Figure When you declare TABLE 1. Data access and size operators.
1 of Workshop 1, you saw Dennis ‘unsigned char counter = 0’ Operator Name Example Defined
Ritchie who wrote C standing next to you are telling the compiler Call wait with an
() Function wait(10) argument of 10
Ken Thompson who wrote UNIX, work- that when it encounters the
(double)x x converted to a
ing on a Teletype machine. Clunky as word ‘counter’ to consider (type) Type cast double
they were (the Teletype, not Ritchie it as data stored at some If x is not 0 evaluate
and Thompson), Teletypes were specific address with the ?: Conditional x?y:z y, otherwise
evaluate z
light-years ahead of entering data by alias name ‘counter’ that Increment x first,
, Sequential evalution x++,y++
individual switches representing each can have values from 0-255, then increment y
bit of data. Teletypes send and receive but in this case, it initially TABLE 2. Miscellaneous operators.
characters so a lot of C, especially the has a value of 0.
standard library, stdio, is character they are explained fully in later
oriented. The number of bits in a char Variable Names Workshops. Then they’ll seem even
is machine dependent, but in all stranger. You may already be familiar
machines I’ve encountered including The changeable data you are with some of these operators, and
the AVR, a char is an eight-bit byte that processing is stored in bytes of RAM rather than take space elaborating
can have 256 bit states. The computer (Random Access Memory) at specific each, we will wait to see how they are
uses this byte of data as representing a addresses. Variables are names that used in context in later Workshops.
signed value from -128 to +127. provide an alias for the address being We will save the Arithmetic
unsigned — If the modifier used. We’ll look at those gory details in operators for Workshop 4 and in
unsigned is used in the definition of a a later Workshop. Workshop 5 we will look at Logical,
char variable ‘unsigned char,’ the value Relational, and Bitwise operators.
is from 0 to 255. Many C compilers Constant Names Okay, I’m tired of all these words,
will have ‘byte’ or ‘Byte’ defined as let’s play with some hardware!
equaling unsigned char. The byte Literal constants are data that are
keyword is not part of C, but it is very not really variables but read-only values Port Input and Output
convenient, since in microcontrollers that are textually replaced on the first
we usually use a lot of numbers, but pass of compilation. The literal’s name We skimmed over a lot in
not a lot of ‘char’acters. is traditionally typed in all caps, and Workshops 1 and 2 so that we could
int — On AVR microcontrollers, int located in a header file or at the start get some LEDs blinking. Let’s now take
(short for integer) declares a 16-bit of the software module. For example, a more detailed look at I/O ports.
data variable as having values from we might want to use pi in a calcula- AVRs are available with from six to
-32768 to +32767. A variable declared tion, so we define as follows: 86 I/O pins (ATmega169 has 54 I/O
with ‘unsigned int’ will have a value #define PI 3.1415926 pins). Most of these pins are organized
from 0 to 65535. We can then use PI anywhere in into eight-bit ports. Many of the pins
The long and short of it — our software and the compiler will have more than one possible function.
Everybody else makes that dumb joke automatically substitute the numerical They can be used to input or output
at this point, so why be different? You value for it (Listing 1). digital logic data, they might be used
can declare variables as ‘short int’ and for detecting external interrupts, or for
‘long int.’ For C, the size is machine Operators analog-to-digital conversions and so on.
dependent, but on many systems a Pins can be set as either Input or
short int is the same as an int (16 bits), Note: Some of these operators Output. Pins set as outputs can be
while a long int is 32 bits. may seem strange at this point, but driven to Vcc or Gnd. Pins set as inputs
uint8_t and uint16_t — More
Listing 1
recent C standards use uint8_t for an float pieCircumference = 0.0; // we don’t know yet
float piePanRadius = 2.2; // this we measure so it can vary
eight-bit unsigned char and uint16_t for
unsigned int. This increases portability // sometimes you just gotta have PI.
between machines and lessens confu- pieCircumference = PI * ( piePanRadius * 2 );
October 2008 63
Pardue3.qxd 9/3/2008 8:06 PM Page 64
PortIO.c — as discussed in
// PortIO.c
#include <avr/io.h> Listing 2 Workshop 2 and enter the
C code shown in Listing 2.
int main (void)
{ The PortIO source code is
// Set port data direction registers also included in the
DDRB = 0x00; // PORTB set to input
DDRD = 0xFF; // PORTD set to output Workshop3.zip.
■ FIGURE 2. ATmega169. And as before, compile
PORTB = 0xFF; // enable pull up on input port and download the hex file
while(1) to the Butterfly. Remember
{
PORTD = PINB; to turn the Butterfly off
} and back on WITH THE
}
JOYSTICK PRESSED TO THE
CENTER! Then, hold down
can have a pull-up resistor enabled or of the datasheet). For example, port A the center joystick button while clicking
disabled. Each pin can be changed to has PORTA, DDRA, and PINA registers on the ‘AVR Prog…’ menu item in
either input or output without affecting each with eight bits to set up each pin. AVRStudio. Finally, after the code
the state of any other pin. This is also When used for general-purpose I/O, downloads, remember to turn the
true for changing an output pin’s drive the port DDRx (Data Direction Register) Butterfly off and back on, then click the
value or an input pin’s pull-up resistor bits must be set to 1 for output or 0 for joystick to the upper position to start
enable or disable. input. For example, to use the upper the program. DOWNLOAD THIS
The ATMEGA169 on the Butterfly four bits of PORTB as inputs and the PROGRAM TO THE BUTTERFLY
has six eight-bit and one four-bit gener- lower four bits as outputs, set the bits to BEFORE WIRING PORTB, WHICH
al-purpose I/O ports as shown in Figure 00001111, which in hex is 0x0F: INTERFERES WITH THE JOYSTICK.
2 (page 3, ATMega169 data book). DDRB = 0x0F; Using the LED wiring from the last
(You can get the data book from When a port pin is configured as an project, add the switch as in Figures 1
www.atmel.com or as part of the input, writing a 1 causes the port pin to and 3. You may refer to Figure 3 from
Workshop3.zip*). That diagram looks be connected to Vcc via a resistor. If it Workshop 1 to see where port B is
mighty complex, doesn’t it? Well, it is a is configured as an output pin, then (you can download Workshop 1 from
simplified block diagram of a circuit writing 1 drives the port high (logic 1) www.nutsvolts.com or www.smiley
that is vastly more complex. When you or writing 0 drives it low (logic 0). micros.com).
see a photomicrograph of these chips // enable pull up The LEDs will display the state of
like in Figure 2, they resemble aerial // on input port the switches. And, if you are paying
photos of a vast ancient city with PORTB = 0xFF; attention, you’ll say, ‘Hey wait a
streets laid out in a grid surrounded by If you look at the I/O-Ports section minute, these switches and lights are
a wall. The ports are like the gates to of the ATmega169 datasheet beginning reversed.’ And you’ll be wrong. PORTB
the city. Each pin in a port is config- on page 52, you will see that there is a pins are pulled up so when nothing is
ured by three individual bits in registers bit more complexity to this topic than on them they are at Vcc and the
DDRx, PORTx, and PINxn (see page 74 we covered here, but at least we have associated LED is lit. Turning the switch
enough for now to read and write ‘on’ pulls the pin to GND, thus the
■ FIGURE 3. PORTB to eight ports. One thing to remember is that associated LED turns off. Okay, you
bit DIP switch. we set a port to a value by writing to think it’s crazy that one kind of on
the PORTx, but we read a port by means off, but as we’ll see in detail
reading PINx. For example: later, we define what voltages are true
PORTD = PINB; or false or on or off any way we want
writes the value off the PORTB pins to to. A lit LED can mean either off or on,
PORTD. It is very common for new- it’s a choice not a law. Think about the
bies to forget this. In this project, we logic behind this since it isn’t nearly the
will set PORTB to input data from most confusing thing we’ll eventually
switches and PORTD to output Vcc to see. Next month, we’ll look at some
drive LEDs. We use the PINB register more C syntax and learn how to get a
to read the switches from port B and Butterfly to talk to a PC. NV
write the value to port D using the
PORTD register. Then we write an infi- Joe Pardue can be reached at
nite loop that gets the switch data www.smileymicros.com
from port B using PINB and equates it *Workshop3.zip is available from
to PORTD that will light the LEDs. Nuts & Volts (www.nutsvolts.com)
Create a new AVRStudio project — and www.smileymicros.com.
64 October 2008
Full Page.qxd 9/2/2008 3:54 PM Page 65
ALL
QUALITY Parts
FAST Shipping
ELECTRONICS
DISCOUNT Pricing
CALL, WRITE, FAX or E-MAIL
for a FREE 96 page catalog.
C O R P O R A T I O N Outside the U.S.A. send $3.00 postage.
6
$ 45
pc mounting pin on front of switch body. analog and 2 digital).
Rated 0.4 VA 20V max. CAT# PB-157 Two joysticks, control each
MANUFACTURERS - We Purchase EXCESS INVENTORIES... Call, Write, E-MAIL or Fax YOUR LIST.
October 2008 65
ElectronetOCT08.qxd 9/3/2008 3:43 PM Page 66
,
CONFERENCE&EXPO 08
NOV. 18-19, 2008
Gold Sponsor
EXCLUSIVE OFFER:
BOSTON
USE PRIORITY CODE RDNAV AND ENGINEERING™
Media Co-Sponsors
■ BY VERN GRANER
PERSONAL ROBOTICS
UNDERSTANDING, DESIGNING & CONSTRUCTING ROBOTS & ROBOTIC SYSTEMS
ith Halloween upon us, many room!” This is not a completely parents, not uncommon in their
W times kids are begging to see a
scary movie or visit a haunted house,
uncommon happening at my house,
and from what I’ve heard from other
households, as well. For many young
children, occasionally being afraid of
only to find out too late that it was a monsters is a normal part of growing
bit much for them. What was a fun up. Many kids have various “security
thrill for younger kids (with friends blankets” that they use to comfort
and family around) can become a them or dispel their monsters,
scary memory for them at bedtime. allowing them to sleep. But some
This usually manifests itself in (like my daughter) require a more
requests that lights be left on or “active” reassurance. To try and put
doors be left open. When the sun my daughter’s mind at ease (and,
goes down and the scary fun consequently allow dear ‘ol dad a bit
becomes just plain scary, the Peanut more shut-eye), I decided to take a
Butter Monster Detector may be just high-tech approach and see if I could
the ticket to a good night’s sleep for make a device to assist her in learning
your child (and you!). to manage night time fears by putting
her in charge of the solution.
WAKE UP! TIME TO CRY!
It’s 2:43 A.M. I know this because
MONSTER THEORY
I can (barely) make out the blurry After giving the problem some
numbers of the clock radio on my thought, I came up with a pretty clear
nightstand. I was awakened by tiny ice picture of what I wanted to create.
cold feet and the quiet whimpering The idea was to build something that
of my six year old daughter who has would double as both an active,
crawled into bed with me. “Daddy” she immediate anxiety reducer and then
whispers, “there’s a monster in my act as a standby reassurance system.
68 October 2008
PersonalRobotics.qxd 9/2/2008 1:23 PM Page 69
PERSONAL ROBOTICS
It would have to be something 36 oz size jar (Figure 1) has an open- microcontroller. The BASIC Stamp 1
easy enough to be operated by a child ing big enough to accommodate OEM version (Figure 4) seemed a
of five or so, even if she is frightened some pretty large parts, and the jar good match for this project because:
and in the dark. I figured a large back- itself would make a good acoustic
lit pushbutton switch should work. When case for the speaker. Some jars have • It has a built-in LM2940 5V
pressed, the unit should instantly a ridge around the top that would be regulator.
brighten the room by switching on ideal for holding the white LEDs. The • It is easy to program using the simple
high-brightness white LEDs. This physical size also is about right to sit and mature PBASIC language.
would help to immediately lower the on a night stand without taking up • It has eight I/O pins which is plenty
anxiety caused by the darkness itself. too much space. for a small project like this.
Next, the unit should act as a Once the label is removed, the • It has a large library of example
“Monster Detector” by performing some transparent nature of the jar makes it code and excellent support from
type of active scan accompanied by possible to mount all the LEDs inside the Parallax.
blinking LEDs and a “scan head” that jar without having to drill holes. This • I already had one sitting in my
can show the device is actually doing also leaves all of the circuitry visible parts bin!
something. A voice recording could while protecting small or fragile moving
narrate the activities and could be parts from damage by curious little A bit more digging and I was
accompanied by some beepy sci-fi fingers. If you prefer not to have the lucky enough to uncover all the
sound effects for good measure. circuit boards visible, a paper template things I needed to get started on my
After a scan has completed, the could be printed out and then inserted prototype (Figure 2) including a nice
unit should declare the area free of inside of the jar. When back-lit by grid-style perf board, some assorted
monsters and instruct the child to go the LEDs, any printed items would LEDs, a servo motor, a big lighted
back to sleep. It could then slowly dim become visible during the scan pushbutton switch (where I had
the white LEDs from very bright, to a process and the subsequent monitor- conveniently replaced the 24V
very low night-light level, eventually ing mode of the device. So, now that incandescent bulb with a red LED),
turning off completely. During this fade we have a cheap and useful container, a low-cost RadioShack sound
out period, I decided the device should we need the parts to go in it. recorder board, and some white LED
probably not be re-triggerable. I did Christmas lights. For a comprehensive
this to reduce the possibility that the
child would multi-trigger the device
TO THE JUNK BOX! list of everything, see the Parts List.
skipped breadboarding the circuit nice “candy stripe” look. I then hot-melt voltage external power supply.
and just started soldering the BASIC glued the servo to the perf board If you decide to build the unit
Stamp 1 onto the perf board. The (Figure 4) after checking to be sure using a standard BASIC Stamp 1, I
.100” pin spacing lined right up and that with a servo horn attached, it would suggest you add an LM2940 voltage
it was nice and solid once soldered. clear the top of the BASIC Stamp board regulator to provide the V+ as this way
I then took the servo motor and (Figure 5). I flipped the board over you won’t have to worry about
wrapped the excess lead length and added a three-pin .100” header destroying components if the wrong
around the body (Figure 3) creating a for the servo, a 90 degree, right-angle voltage level is accidentally applied.
two-pin header for the pushbutton Also, if you look closely at the solder
■ FIGURE 6. Screw terminals for and the pushbutton’s LED, and a pair side (Figure 7) you will notice I included
power and headers for of screw terminals for power input a diode in series with the power
pushbutton/LED connections. (Figure 6). To make the board easier input as insurance against improper
to mount in the jar, I added some polarity. I took these extra steps since
metal standoffs to its four corners. I knew the unit would be used around
The grid-style PCB (printed circuit children and there was a good
board) worked well for this design as chance the wrong wall wart might be
I could use the strips that go down used to power the unit by accident.
the center as a power bus; the pads
at the edges let me bring out the pins
from the Stamp 1 to the edge (Figure
MOUNT ‘EM UP!
7). As the BASIC Stamp OEM board Now that I had the PCB mostly
has a full LM2940 regulator on it, I settled, I wanted to get started on the
decided to use it to regulate power top of the enclosure. It was fairly easy
for the entire project. This way, the to use a Dremel to cut a hole for the
Detector could be powered by a pushbutton switch (Figure 8), but the
six volt battery pack or by a higher next step would require some pretty
■ FIGURE 7. Solder-side view of the ■ FIGURE 8. Lighted push- ■ FIGURE 9. Old PCB hot-melt glued
PCB with all wiring complete. button mounted in jar lid. to lid top as a drill template.
70 October 2008
PersonalRobotics.qxd 9/2/2008 1:26 PM Page 71
PERSONAL ROBOTICS
■ FIGURE 10. Dremel drill press used ■ FIGURE 11. Speaker grill after PCB ■ FIGURE 12. Speaker hot-glued to the
to drill holes for speaker grill. drill template is removed. bottom side of the jar lid.
precise drilling in order to get a nice the PCB in place to see how I was the external pushbutton switch is the
professional look. Since there was going for clearance from the servo horn to one used for recording, the playback
to be a speaker in the jar lid, there the pushbutton body (Figure 15). It fit button is located on-board (seems
would have to be holes to let the sound with room to spare! Now that I had a sorta backwards to me!). Through
out. Though I could have just randomly button and a speaker, it was time to some trial and error, I discovered that
drilled a lot of holes, I didn’t want the get the sound module working. the onboard playback pushbutton
unit to look quite that rough. So, to can be remotely operated by adding
get nice, even spacing, I took an old
piece of .100” perf board and hot-melt
SOUNDING OFF! a wire to the top resistor pad of R3
as shown circled in red in Figure 16.
glued it to the top of the jar (Figure The RadioShack 20 second When this wire is taken to ground
9). I then placed the lid on my sound module is a cute little device and then released, the unit will begin
Dremel drill press and used the perf that really lends itself to hacking. to play back its stored sound.
board to guide the bit as I punched Though the sound quality isn’t terrific, I hot-melt glued the sound module
holes to make a nice circular grid it’s usually good enough to playback to the opposite side of the servo motor
(Figure 10). When I was done, I voice quality recordings. Strangely, on the PCB and then ran the power
popped the old PCB off the top leav-
ing a nice speaker grill (Figure 11).
Next, I hot-melt glued the speaker MONSTERS DETECTED! RUN FOR YOUR LIFE!
that came with the 20 second sound Inevitably, when I’ve described the operation of the detector to friends and
module to the underside of the jar lid colleagues, someone always asks “can you set it so that once out of every three or
four activations, the unit sounds a siren and yells ‘MONSTERS IN THE CLOSET!
(Figure 12). I placed the pushbutton RUN FOR YOUR LIFE!!”
back into its hole (Figure 13) and then Though we all got a chuckle out of imagining the result of such a scan, in
did a test-fit on the top of the jar reality I have never considered actually doing this, even as a joke. Some folks also
(Figure 14). I put the main PCB with asked “Could you have the unit periodically declare a monster is present on the first
the servo on it down inside the jar pass and then, after the second pass, declare the monster has left?”
I considered the dialog very carefully and even went so far as to consult some
and marked four dots on the bottom friends in child care and child development to insure that the dialog had the
that corresponded to the locations of intended purpose. In the end, I decided that the Peanut Butter Monster Detector
the four standoffs. I drilled four holes should never detect a monster. If it ever gave a “positive” reading, that would tend
and ran in a couple of screws to hold to lend credence to the concept that imaginary monsters exist OR that the detector
could be “fooled”. If you think about it, giving a false positive leads to the question,
“Could it give a false negative?”
■ FIGURE 13. Pushbutton test-fit next For maximum reassurance, not only does the unit NOT detect a monster on the
to speaker. first pass, it then double-checks to make sure that the first pass was not mistaken.
Not only is this doubly reassuring, this also causes the unit to make sounds and
perform actions for about 20 seconds or so, helping the child focus on the device
and forget about whatever noise or feeling awoke them in the first place.
So far, this approach has worked very well to provide reassurance and to
empower my child by providing a way for her to take charge of her own fears and
learn to help herself sleep through the night.
So, if you were thinking of writing to ask me about this, no you’re not the only
person who’s thought of it.
Also along these lines, when you are recording the dialog for your detector,
make sure you are alone and that any older siblings aren’t around to see how you
do it. Recording over your reassuring words with “GIANT MONSTER DETECTED
UNDER THE BED! RUN FOR YOUR LIFE!” is just the sort of trick older siblings might
love to play on the younger ones! You have been warned!
October 2008 71
PersonalRobotics.qxd 9/2/2008 1:27 PM Page 72
leads down through the PCB to the the servo horn (Figure 20), hot-melt Instead of trying to mix two signals
center power bus. I ran the speaker glued a small tire hub from a discarded into one speaker, I placed a second
leads to a two-pin header that would toy to the top (Figure 21), and voíla! speaker coaxially mounted on top of
lead up to the speaker in the jar lid. I I had my high-tech scanner head. the first speaker! I did this by cutting
threaded the “trigger” wire from the a ring from the remains of the pill bottle
R3 pad down through the PCB and
across to the P3 pad for the BASIC
MIXING IT UP I had used earlier for the scan head, and
then hot-melt gluing it to the existing
Stamp 1 (Figure 17). I hot-melt glued When I was sketching up the speaker. I then glued a small surplus
the record pushbutton to the back of original plans for this device, I had speaker I found in my junk box to that
the servo motor (Figure 18). As a intended to have both the audio play- ring (Figure 22). This method worked
quick test, I recorded a “hello world” back from the sound recorder and very well and made the BS1 sound
message and then wrote a small the BS1 beepy sound effects both effects audible right along with the
program for the BS1 to toggle the coming from a single speaker. I figured spoken dialog from the sound module.
pin. I found a dwell of about 500 ms I could just force feed the sound This also meant that it would be
was perfect to get reliable triggering from the BS1 to the sound board’s possible to build this device with a
of the sound sample. So far, so good! speaker by loosely coupling the out- second speaker grill, maybe even
put pin from the BS1 to one of the facing in a different direction. This
JUNK BOX SCAN HEAD speaker leads using a small capacitor.
When I tried this, the volume from
way, the beeping effects could
appear to come from the scan head
So now that I had sound, I started the sound module dropped drastically while the dialog from the sound
to think about the scan head that the and became very distorted. I tried a module could come from near the
servo motor would be rotating. I dug few other methods to mix the signal main LED light source. You could
around in the junk box and came up from the sound playback board and even consider mounting the second
with an old prescription pill bottle the output from the BS1 including a speaker on the scan head itself so the
with a child proof cap. I cut around small transformer and even a couple sounds would move around as the
the bottle about 1/2” from the top op-amps to make a small mixer. The direction of the scan head changed.
with a Dremel tool and then drilled circuit was getting more complicated Of course, the path I took isn’t a
holes at four cardinal points to hold the and the results were still pretty dismal. requirement; you can construct your
LEDs (Figure 19). I used two small I decided to take a simpler approach monster detector in any container
screws to secure the pill bottle to the and create a mechanical mixer. and with any method you like. Make
■ FIGURE 17. Trigger wire from pad R3 ■ FIGURE 18. The record button ■ FIGURE 19. Scan head with LEDs
through the PCB to BS1 pin P3. hot-glued to side of servo. mounted and servo horn attached.
72 October 2008
PersonalRobotics.qxd 9/2/2008 1:28 PM Page 73
PERSONAL ROBOTICS
the “Cigar Box Monster Detector” or all the pins at the top of the program. • PIN0 – Trigger (N.O. pushbutton to
the “Cookie Tin Monster Detector” This way, I could use more human GND pulled “up”via R2)
for example. Just follow the readable code statements. I find it • PIN1 – LEDTrigger (LED inside
schematic (Figure 23) and place the much harder to understand code pushbutton)
components however you prefer. such as “IF X = Y THEN GOTO Z” as • PIN2 – Servo (servo motor)
opposed to “IF BUTTON = PUSHED • PIN3 – SoundBoard (sound
CODING IT UP THEN GOTO PLAYSOUND.” In
keeping with this idea, I allocated the
module trigger)
• PIN4 – Speaker (audio out to speaker)
Now that I had the hardware pins of the BASIC Stamp 1 with what • PIN5 – LEDWhite (white LED string)
done, it was time to pull up the BASIC I felt were useful names: • PIN6 – LEDRed (red LEDs in
Stamp programming environment and
start to construct the code. Though ■ FIGURE 23.
its considered a bit “long in the tooth” Schematic for the
by some and many other micro- Peanut Butter
controllers surpass it in speed and Monster Detector.
command set flexibility, there is still a
surprising amount of power in the
venerable BASIC Stamp 1. For exam-
ple, I was able to take advantage of
PWM output for operating the servo
motor and to fade the LEDs, use
constants to hold the servo START and
END positions, and the random num-
ber generator to create those vintage
science fiction sounds. Though the
complete source code is available on
the website (www.nutsvolts.com), I
wanted to take a moment to go over
the basic functions here so you can
better understand how the code
works and to help you modify it to
make it operate the way you want.
a few things such as for the sound effects are more truly
SCHEMATIC PARTS LEGEND turning on the LED in random and less pseudo random.
■ U1 BASIC Stamp 1 the pushbutton and Last, the loop checks to see if the
■ SR1 Sound recording module then playing a beep pushbutton has been pressed. These
■ SW1 N.O. momentary lighted button through the speaker to three tasks continue indefinitely until
■ SW2 N.O. momentary button (included let you know it has the pushbutton is detected.
w/SR1) woken up and is ready When the button is pressed, we
■ SP1 8 ohm speaker (included w/SR1) to work. Next, the drop out of the loop and do two things
■ C1 2.2 μF decoupling capacitor
system goes into a loop immediately. First, the LED in the
■ D1 Red LED (internal to SW1)
■ D2-5 White LEDs where a few things pushbutton is turned on to full bright-
■ D6-7 Green LEDs happen. First, PWM is ness; second, the white LEDs are
■ D8-9 Red LEDs used to dim the LED in turned on. Once this is accomplished,
■ R1 100K resistor the pushbutton to a low a short acknowledge sound is played
■ R2-10 330 ohm resistors level so the button does- out of the sound effect speaker by
■ J1 .100” three pin header n’t light up the room. running through a FOR loop that plays
■ J2 .100” three pin header
This setting is adjustable 32 notes for only 1 ms each. This
in the software so you makes an upward sounding “Zrrrrp!”
scan head) can modify it to taste. Second, the audio effect. After this sound effect is
• PIN7 – LEDGreen (green LEDs in loop generates a random number for played, the red and green LEDs on
scan head) each pass so that when the button is the scan head are both switched on.
pressed, a new “seed” is used making At this point, the Stamp toggles
The program starts by initializing sure that the random numbers used the sound module trigger line by
taking it LOW for 500 ms, then
■ FIGURE 24. Sami Graner fast ■ FIGURE 25. The Peanut Butter bringing it back to HIGH. This starts
asleep next to her Peanut Butter Monster Detector featured on the sound module playing back the
Monster Detector. KOOP radio in Austin, TX. narration (see sidebar for the dialog I
used in my Monster Detector). At this
point, both the red and green LEDs
on the scan head are turned off and
we drop to the first Scan routine.
Scan #1 is a FOR loop that steps
from the START position of the servo
(0 degrees) to the FINISH position for
the servo (180 degrees). The servo
should have a pulse sent to it every 20
ms in order for it to continue to move
but, rather than placing a 20 ms pause
command in the loop (as is typically
done), I drop to a subroutine that
plays random tones through the
speaker. After the subroutine returns,
I toggle the state of the red LED in the
scan head. This makes the red LED
strobe on and off as the servo pans
PARTS LIST the head to enhance the scanning
■ 1 BASIC Stamp 1 — Parallax BS1-IC
■
■
1 BASIC Stamp 1 Serial Adapter — Parallax (item code 27111)
1 Hobby servo motor — Parallax (900-00005) or Futaba (3004)
RESOURCES
■ 1 20 second sound module — RadioShack (#276-1323) ■ Parallax
■ 2 Green LEDs and 2 red LEDs — RadioShack Assorted LEDs (#276-1622) www.parallax.com
■ 1 Grid-style PC board — RadioShack (#276-150)
■ 12 330 ohm resistors — RadioShack Five-pack (#271-1315) ■ All Electronics
■ 1 100K resistor — RadioShack Five-pack (#271-1347) www.allelectronics.com
■ 1 Metal standoff with screws (four-pack) — RadioShack (#276-195)
■ 1 N.O. pushbutton switch — Happ Controls (D54-0004-20) or All Electronics ■ Video of the Peanut Butter
(LPS-1R) Monster Detector
■ 4 White LEDs — All Electronics (LED-75) www.youtube.com/VernGraner
■ 1 .100” snappable header — All Electronics (SHS-32)
■ Interview with Samantha Graner:
■ 1 Empty peanut butter jar (yum!)
www.notepad.org/SamiPBMD.mp3
74 October 2008
PersonalRobotics.qxd 9/3/2008 8:01 PM Page 75
PERSONAL ROBOTICS
October 2008 75
DesignCycle.qxd 9/3/2008 5:38 PM Page 76
THE
■ BY FRED EADY
DESIGN ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
CYCLE
he technology behind our little CompactFlash technology that was wondering if you can do other things
T device is not at all new. Everything
WLAN about our PIC peripheral is based
spawned from PCMCIA technology.
To make the Phoenix easier to put
with this CompactFlash circuit outlined in
Schematic 1, the answer is yes. In fact, an
on the 11 Mbps IEEE 802.11b wireless into service, I will provide a compatible AirDrop user donated some source code
standards. In fact, the data communica- PRISM-based CompactFlash radio card to read and write CompactFlash memory
tions device we will be assembling has for those of you that cannot obtain one cards using this hardware configuration.
roots in an earlier PIC-based WLAN through your normal distributor channels. If you’re interested in CompactFlash
device that was called the AirDrop-P. The Phoenix can operate with the memory card access, you can get the
There’s even an 802.11b book that you NetGear MA701 CompactFlash radio source code from the download area
can reference that explains every detail of card, the D-Link 660W radio card, the of the EDTP Electronics, Inc., website
the WLAN firmware driver and hardware Zonet ZCF1100 radio card, and the (www.edtp.com). Within this text, we’re
we’re about to construct. The best thing LinkSys WCF12 radio card. An Xterasys going to focus on getting the Phoenix
about this device is its cost, which is less PRISM-based CompactFlash 802.11b online with the 802.11b CompactFlash
than one half of the cost of the old card with the FCC ID of MQ4CWB1K radio card.
AirDrop-P. also works with the Phoenix.
If you search diligently, you can find
FROM THE ASHES the 802.11b CompactFlash 802.11b
radio cards I’ve mentioned from various ■ PHOTO 1. This is the Xterasys
...rises the WLAN Phoenix. The vendors on the Internet. A list of PRISM- CompactFlash card I mentioned in
WLAN Phoenix is a smaller, more based 802.11b cards can be had from the text. This card’s lineage reaches
compact version of its predecessor, the the Linux open source 802.11b pages back to PRISM-based 802.11b
EDTP AirDrop-P. Just because the WLAN also on the Internet. The PRISM chipset- CompactFlash cards offered
by Trendnet.
Phoenix is smaller, doesn’t mean it is less enabled Xterasys 802.11b CompactFlash
powerful. The Phoenix uses the same 11 802.11b radio card I am providing for
Mbps CompactFlash 802.11b radio you is shown in Photo 1.
technology that was part of the
AirDrop-P. The Phoenix firmware driver is
designed to enable any CompactFlash
WLAN PHOENIX
802.11b radio card that is based on the HARDWARE
PRISM 1, 2, or 3 chipset. The Phoenix
firmware driver will not activate PRISM With the exception of the free
GT-based CompactFlash radio cards. The PIC18LF6722 I/O lines, the PIC18LF6722
firmware driver will also enable PRISM- is dedicated to serving the CompactFlash
based PCMCIA cards, as well as socket and the serial port. If you’re
76 October 2008
+3.3VDC
ICSP CONNECTOR
DesignCycle.qxd
J1 R3
6 6 3 3
PGC 5 2 10K U1
PGD 5 2 C7 20pF
4 4 1 1
802.11b radio card.
24 RA0 OSC1 39
9/3/2008
R1 C1 23
100 RA1 Y1
22 RA2
.1 21 20MHz C8 20pF
MCLR RA3
28 40
is simple because most of
RA4 OSC2
the 802.11b heavy lifting is
done by the CompactFlash
27
■ SCHEMATIC 1. This circuit
R2 1K RA5 D00
RD0 58
D01
5:39 PM
48 RB0 RD1 55
47 54 D02
+.3.3VDC RB1 RD2 D03
46 RB2 RD3 53
45 52 D04 J4
RB3 RD4 D05
44 RB4 RD5 51
C6 43 50 D06 1 26
PGC RB5 RD6 D07 D03 GND CD1
Page 77
.1uF 42 49 2 27
U2 PGD RB6 RD7 D04 D03 D11
37 RB7 3 D04 D12 28
2 A00 D05 4 29
RX RE0 A01 D06 D05 D13 +3.3VDC
16 VDD R1OUT 12 30 RC0 RE1 1 5 D06 D14 30
RXIN 13 9 64 A02 D07 6 31
R1IN R2OUT RE2 A03 CE1 D07 D15 CE2
8 R2IN RE3 63 7 CE1 CE2 32
14 TXOUT 62 A04 A10 8 33
T1OUT RE4 A05 OE A10 VS1 IORD
10 T2IN T2OUT 7 29 RC1 RE5 61 9 OE IORD 34
TX 11 60 A06 A09 10 35 IOWR
T1IN RE6 A07 A08 A09 IOWR WE
C2- 5 RE7 59 11 A08 WE 36
1 33 +3.3VDC A07 12 37 IREQ +3.3VDC
C1+ C5 RC2 OE A07 IREQ
34 RC3 RF0 18 13 VCC VCC 38
C2 4 .1uF 35 17 IORD C14 A06 14 39 C15
.1uF C2+ RC4 RF1 REG A05 A06 CSEL
3 C1- 36 RC5 RF2 16 15 A05 VS2 40
6 31 15 WAIT .1uF A04 16 41 RESET .1uF
V- RC6 RF3 RESET A03 A04 RESET WAIT
2 V+ VSS 15 32 RC7 RF4 14 17 A03 WAIT 42
C4 13 IREQ A02 18 43
C3 .1uF RF5 WE A01 A02 INPACK REG
RF6 12 19 A01 REG 44
.1uF ST3232 11 IOWR A00 20 45
RF7 D00 A00 BVD2
21 D00 BVD1 46
3 A08 D01 22 47
RG0 A09 D02 D01 D08
RG1 4 23 D02 D09 48
5 A10 24 49
RG2 WP D10
RG3 6 25 CD2 GND 50
RG4 8
5 J2 7 MCLR
MCLR/RBG5 CF CARD CONNECTOR
9
4
8 10 +3.3VDC
VDD
3 AVDD 19
7 26 +3.3VDC J3
VDD
2 VDD 38
6 57 + C16
VDD C9 C10 C11 C12 C13 10uF R4
1
390
9 .1uF .1uF .1uF .1uF .1uF
DB9 FEMALE VSS
AVSS 20
VSS 25
41 LED1
VSS
56
October 2008
VSS
WLAN PHOENIX NOTES:
PIC18LF6722 1. R4 AND LED1 ARE OPTIONAL
080803
77
THE DESIGN CYCLE
DesignCycle.qxd 9/3/2008 5:39 PM Page 78
smart once properly enabled. Before any include a router or access point. you exercise patience, you can easily
of its WLAN circuitry can be used, it By feeding the phoenix_cfg function mount and solder all of the electronic
must be initialized. The WLAN Phoenix the right diet of bytes, we can force the components and connectors onto the
firmware performs the radio card CompactFlash 802.11b radio card to run pads you see in Screenshot 1 with
initialization with a call to the init_cf_card at 1 Mbps, 2 Mbps, 5.5 Mbps, or 11 standard soldering tools. If you decide to
function. The init_cf_card function also Mbps. We can also specify the SSID use spool solder, get the smallest
performs I/O port setup for the (Service Set Identity) of the network we diameter of solder that you can. That will
PIC18LF6722. wish to join with the desired SSID help eliminate the creation of large
Recall that the CompactFlash argument string and a call to the solder blobs on the CompactFlash
802.11b radio card must be asked phoenix_cfg function. For humans, the connector pins. I suggest using solder
certain questions to obtain answers we SSID is the ASCII name for the network. paste (like the type that is available from
need to use its feature set. CompactFlash The SSID can consist of up to 32 bytes. Stencils Unlimited) and a hot air
and PCMCIA cards contain a memory The WLAN Phoenix firmware driver soldering system for the CompactFlash
area that is made up of individual comes coded with PHOENIX_ connector and the PIC18LF6722. The
memory elements called tuples. The NETWORK as its desired SSID. hot air will give you professional-looking
init_cf_card function enters the tuple In addition to user-friendly initializa- solder joints and you will avoid the
memory area and examines each tuple tion and configuration functions, the solder blob problem. Be careful not to
and its link. All of the tuples are arranged WLAN Phoenix firmware driver also overheat the components with the hot
as a linked list of memory elements. Link contains built-in IP (Internet Protocol) air. Don’t get in a hurry and use just
tuples point to the next available data functionality that is also just a function enough heat to flow the solder paste.
tuple. The init_cf_card function flows call away. The Phoenix can converse Although I’m offering the WLAN
through the path laid out by the link using IP-based protocols such as UDP Phoenix as a complete kit of parts, some
tuples, picking up data from each (User Datagram Protocol) and TCP of you may want to build your own
relevant data tuple along the way. (Transmission Control Protocol). An WLAN Phoenix entirely from scratch
There are many types of tuples that active WLAN Phoenix also has the
provide unique information we will need ability to respond to a PING, as an ICMP
to successfully use the CompactFlash (Internet Control Message Protocol)
802.11b radio card. The idea behind echo routine is built into the driver. To
navigating the card’s tuple memory is to facilitate establishing communications
glean the address we need to issue with other network nodes, the WLAN
commands to the radio card’s PRISM Phoenix firmware driver contains a built-
controller. Once the init_cf_card function in ARP (Address Resolution Protocol)
has navigated to and retrieved the COR engine that is able to respond to and
(Configuration Option Register) address issue ARP messages.
tuples, it issues an initialization command UDP communications are the
to the CompactFlash 802.11b radio card easiest of the IP protocols to understand
by way of the COR. and implement. So, the firmware driver
Once the CompactFlash 802.11b includes an RS-232 based demo utility
radio card is successfully initialized, we that allows the user to define local and
can issue configuration commands to the remote IP addresses and UDP port
radio card’s PRISM engine. These config- numbers. The WLAN Phoenix user can
uration commands are passed via the then use the UDP demo utility to send
phoenix_cfg function. Configuration eight bytes of user-defined UDP data to
options such as what type of network the remote node.
the card will operate on, the speed in Fortunately, not every nuance of the
which it will operate, and whether or not wireless Ethernet network must be con-
to employ WEP (Wired Equivalent trolled by the WLAN Phoenix firmware
Privacy) encryption are set using the driver. For instance, all of the network link
phoenix_cfg function. management is performed automatically
The Phoenix is capable of operating by the CompactFlash 802.11b radio card.
in a standard WLAN BSS (Basic Service
Set) environment that includes a wireless
router or AP (Access Point) in the
ASSEMBLING A WLAN
network. There’s a very good chance PHOENIX
that your home WLAN is configured as
■ PHOTO 2. Twenty four easy-to-
a BSS. The Phoenix can also operate in a The ExpressPCB printed circuit mount electronic components and
peer-to-peer IBSS (Independent Basic board layout of the WLAN Phoenix is four connectors is all it takes to put
Service Set) network that does not depicted graphically in Screenshot 1. If the WLAN Phoenix on the air.
October 2008 79
DesignCycle.qxd 9/3/2008 5:41 PM Page 80
■ SCREENSHOT 2. The WLAN Phoenix firmware driver is ■ SCREENSHOT 3. When things go right, the WLAN
hard-coded to receive UDP packets via port 8088 decimal. Phoenix firmware driver collects the CompactFlash 802.11b
As you can see, I’ve entered the IP addresses and the UDP radio card’s hardware (MAC) address, as well as the remote
port numbers to allow the WLAN Phoenix to communicate node’s hardware address (which was gleaned from the
with a PC using UDP. WLAN Phoenix’s ARP request).
using a PCB and parts you purchase from format. The same 0805 0.1 μF capacitor 1206 LED that suits you may be used in
the distributors that advertise in Nuts & used to support the ST3232C is also this application.
Volts. To aid you in getting a scratch-built used in the PIC18LF6722’s MCLR
WLAN Phoenix online, I’ll provide the
ExpressPCB file with the WLAN Phoenix
circuit (C1). The 0805 form factor 0.1
μF capacitors I use in the WLAN
RUNNING THE UDP
download package, which you can get Phoenix hardware are Digi-Key part DEMO UTILITY
from the Nuts & Volts website. number PCC1812CT-ND. The 20 pF
As the assembly of the WLAN 0805-packaged capacitors that support The WLAN Phoenix firmware driver
Phoenix is rather obvious, let’s specify the 20 MHz crystal (Digi-Key that you download from the Nuts & Volts
the components you’ll need to obtain to XC581CT-ND) are 5% tolerance C0G website (www.nutsvolts.com) contains
scratch build a WLAN Phoenix. The 50- types (Mouser 80-C0805C200J5G). It’s an application that is hard-coded to trans-
pin CompactFlash connector is a Molex always a good idea to post a capacitor mit eight bytes of UDP-encapsulated data
product and is available from Digi-Key at the PCB power input when the in a user-defined interval of one to 60
(part number WM18587-ND). The 0.1 power is not generated and regulated seconds. The eight bytes of data consist
μF power supply bypass capacitors on the board itself. So, I put a 0805- of the ASCII characters 0x30, 0x31, 0x32,
(C9-C15) that support the PIC18LF6722 packaged 10 μF tantalum (Digi-Key 0x33, 0x34, 0x35, 0x36, 0x37, and 0x38.
(Digi-Key PIC18LF6722-I/PT-ND) and the 511-1447-1-ND) on guard duty behind You’ll need a wireless-capable router
CompactFlash connector are packaged the power input receptacle, J3 (Digi-Key and a laptop or desktop PC to run the
in 0603 format. I like to use X7R ceramic CP-202A). The connection to your PIC Phoenix UDP demo. Configure your
capacitors for general-purpose work. debugger/programmer is provided by a wireless router to broadcast an SSID of
So, the 0.1 μF 0603 capacitors I chose to Tyco Electronics/AMP six-pin modular PHOENIX_NETWORK. The Phoenix
use in the original WLAN Phoenix jack, which can be purchased from UDP demo is expecting to join a net-
hardware are Digi-Key part number Mouser as part #571-5520250-3. work with an IP address of
PCC1762CT-ND. Jameco provides the RS-232 female 192.168.1.xxx. So, enable your router’s
The 0.1 μF bypass and charge connector as part number 104951. DHCP server engine and configure your
pump capacitors (C2-C6) that support I always use 1% resistors in my router to issue IP addresses that begin
the STMicroelectronics ST3232C projects. However, you can substitute with 192.168.1.100.
(Mouser 511-ST3232CWR) RS-232 5% values in the Phoenix circuitry as Form your initial network with a
interface IC are packaged in 0805 the resistors are not used in critical single PC, the router, and the WLAN
circuits that Phoenix. The PC should pick up the first
require tight DHCP lease which is 192.168.1.100 and
resistance toler- your router should be set to assume the
ances. I also tend IP address of 192.168.1.1. The WLAN
to load 1206 form Phoenix does not participate in DHCP IP
factor LEDs onto address assignment. The WLAN Phoenix
my electronic UDP Demo Utility allows the user to
creations. Any specify the remote PC and local WLAN
Phoenix IP addresses and the remote
■ SCREENSHOT 4.
This should not be and local UDP ports that the Phoenix
a surprise in content UDP demo application should use.
or existence. If you’re proficient with coding PC
80 October 2008
DesignCycle.qxd 9/3/2008 6:20 PM Page 81
applications, you’ll want to whip up a on its back side. You can verify the
UDP receiver program to run on it. On remote hardware address by issuing an
the other hand, a much easier way to IPCONFIG /all command on your PC.
realize a UDP receiver on your computer The IPCONFIG results will also contain
is to download the free Microchip TCP/IP the IP address of your computer, which
stack from the Microchip website. Within should match the IP address you entered
the files of the stack package, find a file as the remote IP address. Meanwhile, as
called MCHPDetect.exe which is a you can see in Screenshot 4, UDP pack-
Windows application that captures UDP ets are clocking into the computer at a
packets sent to UDP port 30303. rate of one per second.
Once you have the router, WLAN
Phoenix, PC, and software tools in place,
start up a terminal emulator on your
GOT TO PACKET UP
computer and set the baud rate for AND GO
57600 bps. Connect its RS-232 port to
the WLAN Phoenix’s serial port and To make it easy to add the WLAN
apply power to the Phoenix. If you’ve Phoenix to your Design Cycle, I’m
done your homework, you should see a offering the WLAN Phoenix as a full kit
likeness of Screenshot 2 in your terminal and in assembled and tested form on the
emulator window. At this point, the EDTP Electronics website (www.edtp.
CompactFlash 802.11b radio card is com). I’ve provided a mobile networking
inactive until you hit the ESC key. While base that allows you to collect, process,
the WLAN Phoenix UDP demo and transfer data over a wireless Ethernet
application is in this state, you can enter link. What you bounce around your net-
the desired IP addresses and the UDP work is up to you.
port numbers just as I did in Screenshot For those of you that may want to
2. If you’re wondering where the 8088 customize the Phoenix firmware driver, it
UDP port number came from, the was written using HI-TECH PICC-18
WLAN Phoenix is hard-coded to receive PRO. As always, if you need help getting
UDP packets via port 8088 decimal. You your WLAN Phoenix online, I’m just an
can easily change the WLAN Phoenix’s email away. NV
hard-coded default port number and
default IP address in the WLAN Phoenix
firmware driver. SOURCES
Before we start up the Digi-Key
CompactFlash 802.11b radio card, we www.digikey.com
need to start the MCHPDetect applica-
tion. We want to be sure to capture any EDTP Electronics, Inc.
UDP packets that may be thrown about www.edtp.com
by the WLAN Phoenix. With the WLAN Phoenix; 802.11b
MCHPDetect application running in a CompactFlash Radio Card
Windows command prompt window, I
HI-TECH Software
activated the CompactFlash 802.11b
www.htsoft.com
radio card with a thump of the ESC key. HI-TECH PICC-18 PRO
The terminal emulator window refreshed
to reveal the hardware (MAC) addresses Jameco
of the CompactFlash 802.11b radio card www.jameco.com
plugged into the WLAN Phoenix, as well
as the hardware address of my laptop’s Microchip
Ethernet adapter, which is receiving UDP www.microchip.com
packets from the WLAN Phoenix. PIC18LF6722; MPLAB IDE; MPLAB
Note the hardware address zeroes in REAL ICE
Screenshot 2 have been replaced with a
Mouser
pair of six-byte MAC addresses in
www.mouser.com
Screenshot 3. Checking the validity of
the local hardware address is easy as
each CompactFlash 802.11b radio card ■ Fred Eady can be contacted via
has its unique hardware address printed email at fred@edtp.com.
October 2008 81
Full Page.qxd 9/2/2008 4:02 PM Page 82
PicaxePrimer.qxd 9/2/2008 1:10 PM Page 83
■ FIGURE 2
IRMB circuit. gate; in order to energize the
ITEM/DESCRIPTION IR LED, both drivers must be
■ C1/.01 μF bypass capacitor
■ D1/1N4148 diode turned on by raising the corre-
■ D2/Infrared LED sponding 08M output pin. In
■ Heat-shrink tubing to fit IR LED the next installment of the
■ IC1/Machine pin IC socket (eight pins)
■ J1/Four pin rt. angle female header Primer, we will see how we
■ PNA4602/PNA4602M IR detector can use this to our advantage
■ R1, R2/1K (1/4 W) resistor
■ R3/47 ohm (1/4 W) resistor
to implement either SIRC IR
■ R4/100K (1/4 W) resistor or serial IR output using the
■ Q1, Q2/KSP2222A NPN transistor same hardware.
PICAXE PRIMER
follow, solder all parts (from small to (like the IR-remote input A B C D E F G H I J J I H G F E D C B A
large) into their appropriate places project we are about to 1 1
and trim the leads. When you install discuss), all you need is 2 2
3 3
the IR-LED, do not insert it as far as it the PNA4602M — you
4 4
can go. Keep the bottom of the plastic can leave out the IR LED
5 5
lens about 1/4 inch above the top of and transistor driver 6 6
the stripboard. This will avoid major circuitry. By this time, 7 7
of the board, bend one lead of C1 so and the Sin and Sout lines ■ FIGURE 3. IRMB top and bottom stripboard layout.
that it makes contact with pin 1 of aren’t brought out to the
the IC socket, then solder and trim four-pin connector. The
the leads. answer is simple: We’re
3) Using a file or emery paper going to construct an
glued to a flat surface, sand the adapter for the three- or
solder joints on the bottom of the four-pin programming
board — especially those that will adapter you have already
be underneath the four-pin female been using! This adapter
right-angle header when it is installed is so simple that the
in the next step. close-up photo in Figure
4) Install the four pin female right- 5 is all you will need.
angle header on the bottom of the The stripboard I used
board and the short jumper wire that is a small piece with three
runs on the top of the board between traces containing four
I11 and H11 and then on the bottom holes each; no cuts need
of the board between H11 and G11 to be made on the
(pin 4 of the female header). Hold bottom. The board has a ■ FIGURE 4. Top and bottom views
the header in place with a small three-pin female header soldered to of completed stripboard.
spring clamp, making sure that it sits one end of each trace and three
reasonably flat against the bottom of color-coded micro-clip leads soldered (or anywhere else you can access the
the board and that the jumper wire in parallel with the header pins. The correct signal). Figure 7 shows the
makes contact with pin 4 of the traces on the board actually only need final assembly installed on my 28X1
header at G11. Solder the leads and to be two holes long, but I make them master circuit ready to be pro-
trim the excess. longer to strengthen the mechanical grammed. The first program we’ll
When you have completed the connection of each lead. I drilled out implement on the IRMB is a simple
IRMB stripboard (or constructed the the end hole of each four-hole trace one that I used to test the functionality
circuit on a breadboard), we are so that the wire leads (with insulation) of its IR reception circuitry. Similarly to
ready to move on to the software could be threaded up through the end the one we used last February, the
phase of our project. holes, with the bare ends threaded program waits for an input from an
back down and soldered on the SIRC TV remote and then displays the
IR MULTI-BOARD bottom as shown. To use the three-pin
micro-clip adapter, simply line up the
received value. However, rather that
displaying the value on LEDs as we
SOFTWARE matching colors, plug your three- or
four-pin programming adapter into it
You can use the IRMB to design, (as shown in Figure 6), and connect
develop, and debug a variety of IR each lead to the appropriate 08M pin
projects. When a project is complete
and fully tested, you have two options: ■ FIGURE 6. Close-up
use the IRMB itself in the final design complete programming
adapter.
or construct a simpler board containing
only the necessary circuitry and save
the IRMB for the development of your ■ FIGURE 5.
next IR project. For example, if your Close-up photo
project only uses IR input capabilities micro-clip adapter.
October 2008 85
PicaxePrimer.qxd 9/2/2008 1:18 PM Page 86
is because infra is already built into the qualifier), it simply creates an infinite
system and there is no need to declare loop, so in this case it serves the same
it. Infra automatically contains the most purpose as the familiar “main: … goto
recent SIRC data value received by the main” structure that we have used in
IR detector. Infra is actually assigned the past to loop “forever.”
to variable b13 so whenever you use The program is simple enough to
it in a program, never try to assign type directly into the Programming
another variable name to b13. If you Editor, so give it a try and take your
do, it won’t be flagged as an error but IRMB out for a spin. If at first it doesn’t
■ FIGURE 7. IRMB programming setup.
your program may behave erratically. function as expected, you’ll need to go
Third, the “#” symbol in the argu- through the usual debugging proce-
did then, this time we’ll send the ment of the sertxd command is crucial. dures: Check your board for unwanted
value out to the terminal window of It formats the output as ASCII decimal solder-bridges or other wiring problems
the Programming Editor software. characters rather than raw data. In (I had an unwanted solder bridge that
A couple of the features of the other words, if we had written “infra” crashed my IRMB the first time out);
program (see Figure 8) may require rather than “#infra,” pressing the try a simpler program (e.g., just create
explanation. First, the “#terminal 4800” Mute button on the remote would a simple loop to repetitively send the
directive may be new to some readers. cause the program to send the ASCII digits 0 through 9 to the Terminal
When the program is downloaded to character 21 to the terminal (remem- Window). As usual, persistence (and
the PICAXE, it automatically opens a ber, we added 1 to the actual infain2 a logical debugging strategy) is the key.
terminal window (at the specified value of 20 for Mute) and ASCII 21 is
baud rate) within the Programming
Editor software. This directive can be
not a printable character (it would
show up as a dark bar in the terminal).
TO BE CONTINUED ...
used in conjunction with the “sertxd” With the “#” included, the ASCII In the next installment of the
command, which sends serial data character 21 will be sent to the terminalPrimer, remember we’ll get into the
out through the serout programming as the two separate digits “2” and details of interfacing the IRMB with
pin. Since sertxd only functions at “1” — try the program with and our 28X1 master processor. We’ll
4800 baud, it’s necessary to set that without the “#” to see what happens. also experiment with an IR communi-
rate for the #terminal directive, as well. Incidentally, 13 and 10 are the ASCII cation link that will require two IRMB
Using these two features together characters for carriage return and line circuits (or portions thereof), so you
can be an effective means of feed; they just format the output so might want to construct a second
debugging programs. Subsequent to that each TV remote key-press is one after you get the first one up and
the initial download of the program, it printed on a new line. If you need a running. Alternatively, you can use a
may be necessary to manually open copy of the ASCII chart, just search for simple breadboard circuit for one
the terminal window by choosing it online — there are thousands of links.end of the link (battery power would
“terminal” under the “PICAXE” menu Finally, the program’s use of the be helpful if you want to do any range
of the Programming Editor. “do… loop” command may also require testing) or you might be interested in
Second, you probably noticed that clarification. Do… loop is a very the printed circuit board (PCB) version
the program uses a variable named powerful structure that can be used of the IRMB. A prototype is shown in
“infra” without having declared it — this to carry out a variety of tasks. In its Figure 9 and the final production
simplest form version should be available on my
' == IRMB_Remote.bas ========== 2008.07.26 ========= Ron Hackett == (i.e., without website by the time you are reading
an “until” or this. As you can see, in Figure 9, the
' This program runs on a PICAXE-08M processor at 4 MHz.
' It waits for a key-press from an SIRC TV remote control, “while” PCB version does include a three-pin
' encodes it & transmits it (as ASCII digits) to the female header to which you can
' Programming Editor's Terminal Window.
attach your programming adapter,
■ FIGURE 8. IRMB TV remote
' == Directives == input program. so it doesn’t require the additional
multi-clip one. In the meantime,
#com1 ' specify com port for downloads
#picaxe 08M ' specify PICAXE processor you might want to take a look at
#terminal 4800 ' open terminal window at 4800 baud Part II in the manual for the
28X1’s “hserin” and “setintflags”
' == Begin Main Program ========================================== commands. The manual’s
' Note: "infra" is a built-in variable (actually b13) discussion of the new “scratchpad”
do ' The following is an infinite loop: memory would also be helpful. If
infrain2 ' wait here for infra-red input you like a challenge, you might even
infra = infra + 1 ' add 1 so digits & data correspond
sertxd (#infra, 13, 10) ' send ASCII digits to the Terminal try to interface your IRMB to the
pause 250 ' slow it down a bit ■ FIGURE 9. IRMB 28X1 before we actually do it here.
loop ' loop forever PCB prototype. Whatever you do, have fun! NV
86 October 2008
Full Page.qxd 9/2/2008 4:09 PM Page 87
)e[8eelXc8ljk`e D8B<8ljk`eN\`i[
=I<<8;LCK;8PG8JJ
),mXcl\ n_\epfljlYjZi`Y\
kfD8B<fi:I8=K%JlYjZi`Y\
kfYfk_Xe[^\kknfgXjj\j
nnn%dXb\i]X`i\k`Zb\kj%Zfd 9LP
K@:B<KJ
FEC@E<
8knf$[Xp#]Xd`cp$]i`\e[cp\m\ekk_XkZ\c\YiXk\jXikj#ZiX]kj#]ff[#dlj`Z#
\e^`e\\i`e^#Xe[jZ`\eZ\gifa\ZkjXe[k_\;f$`k$Pflij\c];@P d`e[j\k%
=<8KLI@E>*''"D8B<IJ#@E:CL;@E>1
N <[`Yc\8ljk`e=ff[DXb\iGXm`c`feN =`i\8ikjN <\gp9`i[;`\k:fb\D\ekfj=flekX`ej
N K\jcX:f`cjN 8ljk`e9`b\QffN 8ik>fc]:flij\N C`]\$J`q\[Dflj\kiXgN K_\IfYfk>iflg
N 8ljk`e:_`c[i\eËjDlj\ldN Gldgb`eGcXp;XpN 8ck\ieXk`m\<e\i^pM\_`Zc\jN C`m\Dlj`Z
N 8iZ8kkXZbN B`e^f]=c`e^:XkXglckN 9XqXXi9`qXii\:iX]k=X`iN IfYf>Xd\jN 8ik:Xij
JGFEJFIJ1
D<;@8:FDDLE@KPJGFEJFIJ1
N 8ljk`e`jkN 8ljk`e:_`c[i\eËjDlj\ldN 8ljk`e:_ife`Zc\N 8ljk`e>i\\e8ik
N <[`Yc\8ljk`eN <Zfcf^p8Zk`fef]K\oXjN >ff[n`cc@e[ljki`\jN AG>DX^Xq`e\
JFDL:?
KFJ<<#PFL
E<<;KNF JXkli[Xp('XdÆ('gd
;8PJKFJ<<
Jle[Xp('XdÆ-gd
<ogf:\ek\i
DXb\i=X`i\%Zfd
9ifl^_kkfpflYpD8B<1Xe[:I8=K1dX^Xq`e\j
NVWebstoreOct08.qxd 9/3/2008 2:16 PM Page 88
CD-ROMS
October 2008 89
NVWebstoreOct08.qxd 9/3/2008 2:21 PM Page 90
As seen in the
May 2008
issue
As seen on the
Looking for a fun project that
April 2007 cover has a great visual effect, then
check out
The Freeze Fountain PCB &
Component Kit.
SALE! This kit has all the components you need to start amazing your
friends by creating the illusion of water drops frozen in time.
You can even show them dripping upwards!
This project blends electronics technology with hand craftsmanship. Sold as a kit, or the PCBs can be puchased separately.
The clever trick has the observer remove one or two of six pawns For more information, please check out your May 2008 issue
while you are out of the room and upon re-entering you indicate the or go to our webstore @ www.nutsvolts.com
missing pawns without ever opening the box. KIT Subscriber’s Price $98.95 Non-Subscriber’s Price $109.55
For more info go to our webstore @ www.nutsvolts.com PCBs Subscriber’s Price $34.95 Non-Subscriber’s Price $39.95
Reg. Price $47.55 Sale Price $37.95
New optional hardware avalible!
Voice Changer Kit
Switching Regulator Kit Digital LED Conversion Kit
Need to regulate your
power output? Take a look
at this new and improved
regulator. For more infor-
mation, please check out
your June 2008 issue or
go to our webstore @
www.nutsvolts.com Be Have fun with the whole family with this
Subscriber’s Price $29.95 S e l ls t 200% More Efficient
er Turn all your old style bulb project. Put your newly changed robotic
Non-Subscriber’s Price $32.95 flashlights into bright, five voice on your outgoing phone message, or
Kit includes an article reprint.
LED, energy efficient, use it on those annoying telemarketers!
PCBs can be bought separately. 4.5 VDC digital flashlights. For more information, please check
For more information, out your May 2008 issue
go to our website @
www.nutsvolts.com Subscriber’s Price $39.95
Without Flashlight Housing Non-Subscriber’s Price $45.95
$22.49 PCBs can be bought separately.
As seen on the With Flashlight Housing
February 2008 $ 20.95*
cover $25.95
Both include an article reprint. Both include an article reprint.
CLASSIFIEDS
COMPONENTS HARDWARE BOOKS
WANTED
%RRNV
DEC EQUIPMENT 3,&0LFURFRQWUROOHU
WANTED!!!
Digital Equipment Corp. VTFRP
and compatibles.
Buy - Sell - Trade 6WHSSHU0RWRUV
CALL KEYWAYS 937-847-2300 VWHSSHUVWXIIFRP
or email buyer@keyways.com
uM-FPU V3.1 &1&
Floating Point Coprocessor OSCILLOSCOPES FQFLQWURFRP
32-bit IEEE 754
SPI or I2C
DIP-18, SOIC-18 Bargain Test Gear !
Portable, benchtop 25Mhz 100MS/s
Fast – Easy to Use 2 2-ch color LCD Scope. Download
502 waveforms via USB1.1 to PC. 7.8"
Extensive floating point support, PDS 640 x 480 Color LCD 3.5lbs.
GPS input, FFT, 12-bit A/D, matrix Volt/Time Automatic Measurement
Peak-to-peak Value, Average,
operations, user-defined functions. RMS, Frequency and Cycle. FREE +D\GHQ,'86$
1x/10x probes, USB cable. Compare
www.micromegacorp.com with expensive LCD scopes!
PDS5022S $325
SPI Bus Analyzer - SPI protocol
ess exerciser and analyzer for
Xpr standard SPI and non-standard
SPI 4-wire and 3-wire serial protocol
interfaces up to 50 Mbps. PC
control via free GUI Control
Panel Software. SPI sniffer,
chip-to-chip emulation.
SOLAR CONNECTORS/WIRE/CABLE
PRODUCTS/KITS T The RF Connection
C Silver Teflon PL-259/Gold Pin, $1.00
H
E R O
N
213 N. Frederick Ave., Ste. 11NV
N or 10/$9.00
F E
C
Gaithersburg, MD USA 20877
T
I
O Call for Specials of the Month
http://www.therfc.com/
N
Full Line of Audio Connectors for Icom,
VINTAGE Complete Selection of MIL-Spec Coax, Kenwood, and Yaesu
ELECTRONICS RF Connectors and Relays 8 Pin Mike Female $2.50
UG-21B/U N Male for RG-213/214 .$5.00 8 Pin Mike Male Panel $2.50
WANTED UG-21D/U N Male for RG-213/214 .$3.25 13 Pin DIN for Kenwood $2.75
N Connectors for 9913/Flexi4XL/9096 8 Pin DIN for Icom $1.00
UG-21B/9913 .....$6.00 / Pins Only......$1.50 8 Pin DIN for Kenwood $1.50
UG-21D/9913 ..$4.00 / Extra Gasket.$0.75 Prices Do Not Include Shipping
UG-176/U Reducer RG-59/8X, $0.25 Prices subject to change without notice.
or 5/$1.00 Orders 800-783-2666
UG-175/U Reducer RG-58/58A, $0.25 Info 301-840-5477
or 5/$1.00 FAX 301-869-3680
LCDs/DISPLAYS
MISCELLANEOUS
ROBOTICS FOR SALE GADGETS
ARobot Kit from Arrick
Robotics uses the Basic Stamp
II. Quality metal construction.
Easy to assemble and
very expandable.
$235.00
www.robotics.com/arobot
92 October 2008
Classifieds Oct08.qxd 9/3/2008 3:40 PM Page 93
■ NEW PRODUCTS
MOV’N UP
AUDIO/VIDEO MICROCONTROLLERS
ov’n Up — a new
M book from Square
1 Electronics — shows
assembly language
programmers how to
easily migrate from
Microchip’s 16 series
MicroStamp11 KITS/PLANS eight-bit microcontrollers
World’s Smallest 68HC11 to the 18 series devices.
Microcontroller Module!
telemetry
z The 18 series devices
microrobotics
z
smart toys
z have some features that
animatronics
z
model railroading
z make them easier to use.
home automation
z
Program memory paging
z tiny (1 by 1.4 in.), light-weight (0.5 oz.)
zon-board 5V reg., crystal, & reset chip is gone, so tables may be
zchoice of 8K or 32K EEPROM
PCB SOFTWARE z or 32K RAM + 32K EEPROM (64K version)
z SCI, SPI, Output Compare and Input
of any length and may
Capture channels, timer, pulse accumulator
z all 14 I/O lines and 2 interrupt lines
be located anywhere.
EXCLUSIVE U.S. DISTRIBUTOR brought out to versatile 20-pin connector
zprogram in BASIC, assembler, or C
Data memory bank
zeasy code-loading with Docking Module
z Starter Packages:* selection is simplified.
z 8K EEPROM (#MS11SP8K).......$49
z 32K EEPROM (#MS11SP32K)...$77 Compare, bit toggle, and
z 32K EE/32K RAM (MS11SP64K)$90
set file instructions make
* includes MicroStamp11, manual, PC soft-
ware (assemblers, SBASIC compiler,
MicroLoad utility, and sample programs),
writing programs easier.
serial cable, Docking Module, & accessories.
Context saving on
www.technologicalarts.com
interrupt is automatic
Toll-free (USA & Canada):
1-877-963-8996
(sometimes). The newer
Visa • MasterCard • Discover • Amex application peripherals
YOUR COMPLETE (CAN bus, etc.) are
SOLUTION! included in the 18 series
DESIGN/ENG devices.
• PCB Design
SERVICES Mov’n Up will
• PCB Simulation
save readers time by
• CAD/CAM Menu
providing an explanation
121747, Hobby Vers., $175
121743, Pro. Version, $275 of the fundamental
www.KELVIN.com differences (vs. 16 series)
along with programming
examples to make the
SATELLITE transition easier. Mov’n
Up is available from
Satellite Dish Parts the publisher ($24.95
C-band t 4DTV t FTA plus s&h).
Satellite TV Is The
Hit of The Party!
For more
NEW! More Channels on C-band! information, contact:
t Bigger Packages t Better Values Square 1
FREE Online Catalog Electronics
www.skyvision.com Web: www.sq-1.com
218-739-5231
October 2008 93
Full Page.qxd 9/2/2008 4:12 PM Page 97
Microcontrollers
In a Tiny 3-lead Package!
Digital Signal
Controllers
The Microchip name and logo, the Microchip logo, and MPLAB are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. UNI/O is a trademark of Microchip Technology Incorporated in the U.S.A. and other
Serial Analog
EEPROMs
countries. All other trademarks mentioned herein are property of their respective companies. © 2008, Microchip Technology Incorporated. All Rights Reserved.
Microchip Technology’s new UNI/O serial EEPROM uses only ONE connection GET STARTED TODAY!
to the host microcontroller. This compares to two or three pins for I2C™ and
2nd line
Microchip Direct...
Purchase the MPLAB® Starter
three to six pins for Microwire or SPI buses. This new, flexible bus offers Kit for Serial Memory Products
advanced features like a status register and write protection on demand, (DV243003), which supports the
along with all I/O, data and command functions through a single pin. UNI/O family of serial EEPROM and
all other Microchip serial EEPROMs
Simplify designs & reduce system cost Device
Density Operating for $79.98 at
t Free up pins on the MCU (bits) Voltage
11AA010 1K 1.8-5.5V www.microchipDIRECT.com.
– Enhance your design by adding new features 11LC010 1K 2.5-5.5V
– Move to a smaller MCU = lower cost 11AA020 2K 1.8-5.5V
t Free up pins on your connector 11LC020 2K 2.5-5.5V
11AA040 4K 1.8-5.5V
– Smaller connector = lower cost 11LC040 4K 2.5-5.5V
t Compact: Tiny packages and no pullup resistors 11AA080 8K 1.8-5.5V
11LC080 8K 2.5-5.5V
Optimized for embedded applications 11AA160 16K 1.8-5.5V
t Software Write Protection ¼, ½, or full array 11LC160 16K 2.5-5.5V
t Flexible data rate 10 - 100 kHz set by host
t 1-million E/W cycles, 200-year data retention
t Low standby current - 1 μA
t Real EEPROM, up to 125˚C
www.microchip.com/usb
www.microchip.com/UNIO
Full Page.qxd 9/3/2008 12:11 PM Page 98
Full Page.qxd 9/2/2008 4:26 PM Page 99
CircuitSpecialists.com
FLUKE TRMS Electronic Logging Soldering Station
CircuitSpecialists.com DMM w/ TrendCapture w/Ceramic Element & Seperate
1000’s of Items Online! Solder Stand
The Fluke 287 True-rms Electronics
•Ceramic heating
1-800-528-1417 Logging Multimeter with TrendCapture
quickly documents design perform- element for more
Fax: 480-464-5824 ance and graphically displays what
happened. Its’ unique logging and
accurate temp control
•Temp control knob
Since 1971 graphing capabilities mean you no in F(392° to 896°)
& C(200° to 489°)
longer need to download logged read-
ings to a PC to detect a trend. This •3-prong grounded
item is Limited to Stock on Hand!. power cord/static safe tip Item #
•Seperate heavy duty
Item # S pecial iron stand CSI-STA
CSI-STATION1A
FLUKE 287 Purchase •Replaceable iron/easy disconnect
Limited Offer! Only $359.00! •Extra tips etc. shown at web site $39.95!
Also Available w/Digital Display &
Stepper Motors PBB-272A Powered Breadboard MicroProcessor Controller
& w/ LCD Voltage Displays
Stepper Motor Item #
Controllers Provides the user with a quick and efficient sys- CSI-STA
CSI-STATION2A
tem for breadboarding electronic circuits. Comes
with three regulated power supplies along with a SALE!
Part #: Frame Holding Torque: Price: deluxe, easy-to-use breadboard.
Size: Two LCD’s conveniently show
$44.95
42BYGH404 NEMA 17 3.4kg.cm/47oz.in $16.00 the 0-15 positive and 0-15 neg-
57BYGH207 NEMA 23 8kg.cm/111oz.in $21.50 ative outputs. ESD Safe CPU Controlled SMD
•5 Distribution Strips (500 tie
57BYGH303 NEMA 23 15kg.cm/208oz.in $25.95
points) Hot Air Rework Station
57BYGH405 NEMA 23 20kg.cm/277oz.in $28.90 •3 Terminal Strips (1890 tie The heater and air control
85BYGH450B-03 NEMA 34 48kg.in/665oz.in $68.00 points) system are built-in and
85BYGH450C-03 NEMA 34 63kg.cm/874oz.in $89.00 •4 Binding Posts adjusted by the simple touch
•One Ground of the front keypad for pre-
•One 5VDC (1 AMP) Constant Power
Part #: Dim: MicroStep: Price: •One 0 to +15VDC (500mA) Variable Power cise settings. Temperature
1(200), 1/2(400), 1/4(800), range is from 100°C to
XCW220 100 x 61
1/8(1600)
$39.95 •One 0 to -15VDC (500mA) Variable Power
x 19mm •110VAC Input Power, ± 10% 480°C / 212°F to 896°F, and
1(200), 1/2(400), 1/4(800), the entire unit will enter a
CW230 115 x 72
x 32mm 1/8(1600), 1/16(3200),
$48.50 Item # Only
1/32(6400), 1/64(12800) PBB-272A $89.00! temperature drop state after 15 minutes of non-
use for safety and to eliminate excessive wear.
CW250 140 x 94 1(200), 1/2(400), 1/8(1600) $54.90
x 45mm Dual Output DC Bench SALE! Item#
CW860 147 x 97 1(200), 1/2(400), 1/4(800), $96.00 $129.00 CSI825A++
x 30mm 1/8(1600), 1/16(3200), Power Supplies
1/32(6400), 1/64(12800),
128(25600), 1/5(1000),
High stability digital read-out bench
1/10(2000), 1/25(5000), power supplies featuring constant Our Premium All in One
voltage and current outputs. Short-
1/50(10000), 1/125(25000),
1/250(50000) circuit and current limiting protec- Repairing System
tion is provided. SMT PC boards •Combines the function of
and a built-in cooling fan help a Hot Air Gun, Soldering
ensure reliable performance and Iron and a Desoldering
Mini RF Transmitter, Receiver long life. All 3 Models have a Gun.
& Transceivers 1A/5VDC Fixed Output on the rear panel. •Microprocessor
controlled ESD safe unit
Ideal for setting up short range wireless links Item #: Price 1-4 Price 5+ with all digital display
for remote control or data acquisition! CSI3003X-5 •Desoldering tool comes
$119.00 $112.00 with zero crossing
•Transmitter Module w/Power Amplify 0-30V/0-3A circuitry preventing electrical surges and equipped
•Operating supply voltage: 5-12V Only CSI5003X5 $127.00 $119.00 with air cylinder type strong suction vacuum pump.
•Frequency: 418MHz $9.95! 0-50V/0-3A •The 24V soldering iron is compatible with the
•Frequency tolerance: ±300KHz compound tip design.
CSI3005X5 $129.00 $122.00 •Uses lead-free or standard solder.
•Modulation: ASK/OOK 0-30V/0-5A
•Controlled by SAW device
SALE! Item#
•Antenna included Item #
STPA-418H-B
STPA-418H-B $199.00 CSI-9000
•Shielded Transceivers
•Receiver Module •DATA in RF out
•Operating supply voltage: 5V •RF in DATA out
•Frequency: 418MHz •Data rate: 1.2 to
Triple Output DC Bench
•Sensitivity: -102dBm 10kbps Power Supplies
•Band wide: 3.0MHz (-3dB) •Output power: +10dBm •Output: 0-30VDC x 2 @ 3
•Sensitivity: -108dBm Only or 5 Amps & 1fixed output
Item # Only •Operating supply voltage: 5V
RXB4411S-418-RH
RXB4411S-418-RH $15.95! $19.95 @ 5VDC@3A
•Frequency: 915MHz or 2.4GHz •Stepped Current: 30mA
•Antenna included Each!
•Programmable Transceiver +/- 1mA
Only
•Operating supply voltage: $9.95!
1.8-3.6V Item #: Price 1-4 Price 5+
Item # EZ915 ( A ) 915MHz
•Frequency range: 300-928MHz and CSI3003X3 $198.00 $193.00
•Data rate: 1.2-500kbps Item # EZ2400 ( B ) 2.4GHz 0-30Vx2@3A
•Output power: -30 to +10dBm
•Programmable via SPI CSI3005XIII $259.00 $244.00
Item # 0-30Vx2@5A
•Antenna included CC1100B
CC1100B
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
backcvr.qxd 9/2/2008 1:50 PM Page 100