CC_1995_i0063.pdf

(8354 KB) Pobierz
377395093 UNPDF
377395093.169.png
THE COMPUTER APPLICATIONS IOURNAL
hile there are quite a few robot contests around
FOUNDER/EDITORIAL DIRECTOR
PUBLISHER
Steve Ciarcia
Daniel Rodrigues
competition held all over the world), we have a yearly
EDITOR-IN-CHIEF
PUBLISHER’S ASSISTANT
Ken Davidson
Sue Hodge
contest that takes place just down the road from our editorial offices and is
growing in popularity. The goal of the Fire-Fighting Home-Robot Contest is
for a robot to seek out and extinguish a flame located in a “home.” Judging is
done on how quickly the robot accomplishes its task, whether the robot is
tethered or autonomous, and whether it can deal with “furniture” obstacles.
Our first article this month looks at one of the entries in this years
contest. It’s not the fastest beast, but it’s one of only four from a field of
dozens to even finish. The designers have come up with some unique
solutions to common problems, so be sure to check it out.
When it comes to building a robot, you don’t necessarily need to start
from scratch. Having an off-the-shelf base on which to build the eyes and
brains of the robot can save a lot of time. In our next article, the author
retrofits a kid’s toy with enough smarts to make Fido jealous.
Although a human adds the brains to a race car, the engine still needs
some internal smarts to squeeze the most performance from each piston
stroke. In the second of a three-part series, our next feature article describes
the ignition electronics and shielding in the Engine Control System.
Finally, we check out an often-overlooked mode of the popular
M68HCll processor: bootstrap mode. It can be used to enable the chip to
test itself with no external memory.
In Home Automation & Building Control this month, we start by looking
at what it takes to detect deadly carbon monoxide in the home. Next, we
continue our detective work with the X-10 Spy. Finally you can see just what
is being transmitted onto the power lines. In the last two features, we cover
even more sensors: one for measuring atmospheric pressure, and another
for measuring temperature (but this one sends the results back to a standard
serial port).
In our columns, Ed continues his look at Virtual-86 mode on the
‘386SX, Jeff adds position sensing to his motor control module, and Tom
TECHNICAL EDITOR
CIRCULATION MANAGER
Janice Marinelli
Rose Mansella
EDITORIAL ASSISTANT
CIRCULATION ASSISTANT
ENGINEERING STAFF
CIRCULATION CONSULTANT
Jeff Bachiochi & Ed Nisley
Gregory Spitzfaden
WEST COAST EDITOR
BUSINESS MANAGER
CONTRIBUTING EDITORS
Rick Lehrbaum
Russ Reiss
ADVERTISING COORDINATOR
Dan Gorsky
NEW PRODUCTS EDITOR
Harv Weiner
CIRCUIT CELLAR INP, THE COMPUTER APPLICA-
TIONS JOURNAL (ISSN 0696-6965) IS published
monthly by Circuit Cellar Incorporated. 4 Park Street.
Suite 20, Vernon, CT 06066 (660) 675.2751. Second
~IasspostagepaidatVernon. CTandaddltlonaloffices.
One-year (12 issues) subscnption rate U.S.A. and pas-
sessions$21.95,Canad~exico$31 95,allothercoun-
tnes $49.95. All subscription orders payable in U.S.
funds only, via intematlonal postal money order or
check drawn on U.S. bank. Direct subscription orders
and subscription related questions to Crrcurt Cellar INK
ART DIRECTOR
Lisa Ferry
PRODUCTION STAFF
John Gorsky
James Soussounis
_.
JOtI tlSOR
Tim McDonough
Frank Kuechmann
Pellervo Kaskinen
Subscriptions, P.O. Box 696, Holmes, PA 19043.9613
01 call (6001269-6301.
POSTMASTER. Please send address changes to Cir-
cultCellarlNK,CirculationDepl., P 0. Bnx696,Holmes,
PA 19043.9613
Cover photography by Barbara Swenson
PRINTED IN THE UNITED STATES
For information on authorized reprints of articles,
contact Jeannette Walters (860) 875-2199.
HAJAR ASSOCIATES NATIONAL ADVERTISING REPRESENTATIVES
NORTHEAST &
MID-ATLANTIC
Barbara Best
(908) 741-7744
SOUTHEAST MIDWEST WEST COAST
Christa Collins Nanette Traetow Barbara Jones
(305) 966-3939 (708) 357-0010 & Shelley Rainey
Fax: (305) 985-8457 Fax(706) 357-0452 (714) 540-3554
Fax:(906)741-6623
Fax:(714)540-710:
CircuitCellarBB.%24Hrs.30011200/2400/9600/14.4kbps,
6 bits,noparity 1 stop bit, (660)671-1968;2400/
9600 bps Courier HST, (660) 671.0549
All programs and schematics in Circuit CellarlNlcBhave been carefully reviewedto ensure their performance
isinaccordancewiththespeclflcatlonsdescdbed,andprogramsarepostedontheClrcuitCellarBBSforelectronic
transfer by subscribers.
CircuifCellarlN~makesnowarrant~esandassumesnoresponsibilityorliabil~tyofany kmdtorerrorsin these
programs or schematics or for the consequences ot any such errors. Furthermore, because of possible wabon
in the quality and condition of materials and workmanship ot reader-assembled protects, Circuit Cellar INP
disclaims any responsiblity tar the safe and proper fun&n ot reader-assembled projects based upon or from
plans, descriptions, or inlormatlon published in Circuit Cellar INIP
Enbre contents copyright 0 1995 by Circuit Cellar Incorporated. All rights reserved. Circuit Cellar INK IS a
registered trademark of Circuit Cellar Inc. Reproduction of this publication in whole or in part without wrttten
consent from Circuit Cellar Inc. IS prohibited.
explores the latest in digital television support chips.
2
Issue #63 October 1995
Circuit Cellar INK@
Beth Andrix
Barbara Maleski
Tom Cantrell
Jeannette Walters
CONTRIBUTORS:
377395093.180.png 377395093.191.png 377395093.202.png 377395093.001.png 377395093.012.png 377395093.023.png 377395093.034.png 377395093.045.png 377395093.056.png 377395093.067.png 377395093.078.png 377395093.089.png 377395093.100.png 377395093.111.png 377395093.122.png 377395093.131.png 377395093.132.png 377395093.133.png 377395093.134.png 377395093.135.png 377395093.136.png 377395093.137.png 377395093.138.png 377395093.139.png 377395093.140.png 377395093.141.png 377395093.142.png 377395093.143.png 377395093.144.png 377395093.145.png 377395093.146.png 377395093.147.png 377395093.148.png 377395093.149.png 377395093.150.png 377395093.151.png 377395093.152.png 377395093.153.png 377395093.154.png 377395093.155.png 377395093.156.png 377395093.157.png 377395093.158.png 377395093.159.png 377395093.160.png 377395093.161.png 377395093.162.png 377395093.163.png 377395093.164.png 377395093.165.png 377395093.166.png
14
A Robot Firefighter
by Matthew Linder e4 Kent Harris-Warren
24
Turning Toys into Tools
by Chuck McManis
36
Developing an Engine Control System
Part 2: Ignition Subsystems
by Ed Lansinger
42
Self-Testing the M68HCll
by Maurizio Ferrari
OUR SPECIAL SECTION HOME AUTOMATION d BUILDING CONTROL
BEGINS ON PAGE 47
76
Firmware Furnace
Journey to the Protected Land: Looking at the Virtual-86 Monitor
Ed Nisley
84
From the Bench
Creating the Smart-MD
Part 2: Quadrature Decoding for the Motor Driver
leff Bachiochi
90
Silicon Update
I Want My DTV
Philips Chips Bring Digital TV One Step Closer
Tom Cantrell
Editor’s INK
Ken Davidson
ISSUE
ConnecTime
Excerpts from
the Circuit Cellar BBS
conducted by
Ken Davidson
Birth of the Firebot
Reader’s INK
Letters to the Editor
Steve’s Own INK
Now it’s Lollipops
New Product News
edited by Harv Weiner
Advertiser’s Index
Circuit Cellar INK@
Issue 463 October 1995
3
377395093.167.png 377395093.168.png 377395093.170.png 377395093.171.png 377395093.172.png 377395093.173.png 377395093.174.png 377395093.175.png 377395093.176.png 377395093.177.png 377395093.178.png 377395093.179.png 377395093.181.png 377395093.182.png 377395093.183.png 377395093.184.png 377395093.185.png 377395093.186.png 377395093.187.png 377395093.188.png
CIRCUIT ANALYSIS SOLVED
(((vpeak - vd) + iv1 - v211 + (Vpeak - vd))cr
In INK 61’s ConnecTime, Rich Vitucci presented a
problem he was having with a capacitor tilt sensor.
Although James Meyer and Pellervo Kaskinen suggested
solutions, Rob Mock has already solved this problem.
Rob’s solution is for a square-wave excitation and
neglects a few things, so it is a first approximation.
The quad-diode
from v,h to vll coinciding with II, and
i((v,eak - vd) + iv1 - v2)) + (Vpeak - vd))c,
from vph to ~~1 coinciding with Ia.
12
I-
capacitance sensing cir-
cuit is pictured in the
first figure. As you can
see, VI and VP are the DC
values for the AC signals
v1 and va. The reduced
The effective currents from this pulsing charge are
I1 = ((2(v,eak - vd) + 2(v1 - v21) + 2(v,eak - Vd))C,f
12 = ((2(v,eak - vd) - 2(v1 - v21) + 2(v,cak - Vd))C,f
where f is the signal frequency.
Y
signals adjacent to v1 and
I1 _
VP do not represent actual
Equating the currents and solving for the potential
difference between VI and V,,
signals but are used here
to depict the high and
low values of vp and v,,
’ “2
T C,
@iv,c,k - vd) + 2(vl - V2))Crf = @(v,eak - vd) - 4vI - V2))C,f
(2iv,e,k - vd) + (VI - v21)c, = i2(v,ak - vd) - (VI - v2)1c,
iv1 - v21c, + (v, - v2)c, = 2(v,eak - vd)c, - 2(v,cak - vd)cr
iv, - v2) = 2(vpe_,k - vd)(c, - cr)/(c, + cr)
iv, - v21 = (v,, - 2vd)(c, - cr)/ic, + cr)
Y
which are different from
vl and v2 by the voltage
drop across a diode (Vd).
Because the circuit
is bounded by capacitors
and the noninverting input to an op-amp on one side,
These equations neglect differences in individual
and a capacitor and ground on the other side, we assume
that no net current traverses the circuit. However, cur-
diode drops, diode-stored currents and leakage, load cur-
rents, and pulse duty cycle and rise times. In properly
designed circuits, these effects should be negligible.
rent circulates inside the subcircuit itself (i.e., I~ = I~).
The anticipated voltage signals for vl and v2 are
shown in the second figure. The resulting charge passed
on each positive voltage transition would be
Edward LaBudde
Westlake, CA
(((v,eak - vd) + (VI -vZ)) + lVpeak - vd))cr
from vll to v,h coinciding with II, and
PIC PENCHANT?
What is it with your writers’ infatuations with PIC
processors? I keep reading about using a PIC, and find
myself wondering why the author didn’t use something
else and save money. Previously one author used two
PICs when I would have used one 68705, at the same or
lower cost. “A PIC-based Motor Speed Controller” by
Chuck McManis (INK 60) takes the cake. He uses a PIC
to replace a 70c servo amp!
(i(vpeak - vd) + (VI - VZ)) + (Vpeak - vd))c,
from vpl to vph coinciding with 12.
The corresponding charge for each negative transi-
tion is
V peak
Had he checked things
out, he would have found
that the NE544 servo amp
from Signetics does every-
thing his PIC does plus it has
exponential or linear rates,
adjustable deadband, and a
500-mA drive built in. It is
6
Issue #63 October 1995 Circuit Cellar INK@
377395093.189.png 377395093.190.png 377395093.192.png 377395093.193.png 377395093.194.png 377395093.195.png 377395093.196.png 377395093.197.png 377395093.198.png 377395093.199.png 377395093.200.png 377395093.201.png 377395093.203.png 377395093.204.png 377395093.205.png 377395093.206.png 377395093.207.png 377395093.208.png 377395093.209.png 377395093.210.png 377395093.211.png 377395093.212.png 377395093.002.png 377395093.003.png 377395093.004.png 377395093.005.png 377395093.006.png 377395093.007.png 377395093.008.png 377395093.009.png 377395093.010.png 377395093.011.png 377395093.013.png 377395093.014.png 377395093.015.png 377395093.016.png 377395093.017.png 377395093.018.png 377395093.019.png 377395093.020.png 377395093.021.png 377395093.022.png 377395093.024.png 377395093.025.png 377395093.026.png 377395093.027.png 377395093.028.png 377395093.029.png 377395093.030.png 377395093.031.png 377395093.032.png 377395093.033.png 377395093.035.png 377395093.036.png 377395093.037.png 377395093.038.png 377395093.039.png 377395093.040.png 377395093.041.png 377395093.042.png 377395093.043.png 377395093.044.png 377395093.046.png 377395093.047.png 377395093.048.png 377395093.049.png 377395093.050.png 377395093.051.png 377395093.052.png
also capable of driving external transistors for more
Contacting Circuit Cellar
current drive. Many of the current R/C servos on the
We at Circuit Cellar INKencourage communication between
market use this part.
our readers and our staff, so have made every effort to make
So why PIC and program when you can buy a part
contacting us easy. We prefer electronic communications, but
off the shelf that does the job?
feel free to use any of the following:
Robert LaMoreaux
Mail: Letters to the Editor may be sent to: Editor, Circuit Cellar
Ann Arbor, MI
INK, 4 Park St., Vernon, CT 06066.
Phone: Direct all subscription inquiries to (800) 269-6301.
Actually, if you do a survey of fhe processors used in projects here,
Contact our editorial offices at (860) 875-2199.
you’ll find a pretty even mixture. For example, in this issue, we have
Fax: All faxes may be sent to (860) 872-2204.
projects using the 80386, 68HC705, 68HC11, 68HC16, and two PICs.
BBS: All of our editors and regular authors frequent the Circuit
One of the attractive features of the P/C is ifs availabilify. Jeff
Cellar BBS and are available to answer questions. Call
started using the WC05 in several of his projecfs until he found he
(860) 871-1988 with your modem (300-14.4k bps, 8Nl).
couldn’t get any parts from anyone. He’s since used PlCs for a number
Internet: Electronic mail may also be sent to our editors and
of projects because you can even get them from Digi-Key.
regular authors via the Internet. To determine a particular
As for using a P/C (or any other processor) in place of a dedicated
person’s Internet address, use their name as it appears in
part, keep in mind that the processor may also be used to perform
the masthead or by-line, insert a period between their first
many other functions as well, so if’s not necessarily an apples-to-apples
and last names, and append “@circellar.com” to the end.
comparison. You have to assess the project as a whole to determine
For example, to send Internet E-mail to Jeff Bachiochi.
when to use a dedicafedparf and when to use a processor.
address it to jeff.bachiochi@circeIlar.com. For more
-Editor
information, send E-mail to info@circellar.com.
A Serious Imaging Solution
The SmartCore’” is a shortcut to a
custom-designed controller. It is a
C-programmable microprocessor
core with memory, supervisor,
DMA , and clock built in. All you do
is add interface and control logic.
Call our AutoFAx 916-753-0618 from
your
IMPACT Professional 15 a complete nnge analysts system that ~nciudes a broad range of cmss-
d,sclplu,e tools grouped ,n,o eight separate processing envwmnents These modules cnclude
FAX . Ask for data sheet #34.
1724 Picasso Ave.
Davis, CA 95616
916.757.3737
916.753.5141 FAX
SYSTEM REQUIREMENTS: PC’AT or compattk 386,486 or Pentium, with at least
16 MB ol RAMandahard disk DOS 3 1 or higher Usesa~atmemorymodelwimitS~exlenderand
Wrtual Memory Manager capable of addrewng 3 $:gabyles of memory A super VGA video card
TARDIS Systems
PO Bo\ IYI
FREE DEMO ph;~:;~:~:~;:;:;~
LOZ .JJamo~. SM 8751-1 V.S.A.
Technical Suppos (Soil 66;-5623
#104
HO5
8
Issue #63 October 1995
Circuit Cellar INK@
377395093.053.png 377395093.054.png 377395093.055.png 377395093.057.png 377395093.058.png 377395093.059.png 377395093.060.png 377395093.061.png 377395093.062.png 377395093.063.png 377395093.064.png 377395093.065.png 377395093.066.png 377395093.068.png 377395093.069.png 377395093.070.png 377395093.071.png 377395093.072.png 377395093.073.png 377395093.074.png 377395093.075.png 377395093.076.png 377395093.077.png 377395093.079.png 377395093.080.png 377395093.081.png 377395093.082.png 377395093.083.png 377395093.084.png 377395093.085.png 377395093.086.png 377395093.087.png 377395093.088.png 377395093.090.png 377395093.091.png 377395093.092.png 377395093.093.png 377395093.094.png 377395093.095.png 377395093.096.png 377395093.097.png 377395093.098.png 377395093.099.png 377395093.101.png 377395093.102.png 377395093.103.png 377395093.104.png 377395093.105.png 377395093.106.png 377395093.107.png 377395093.108.png 377395093.109.png 377395093.110.png 377395093.112.png 377395093.113.png 377395093.114.png 377395093.115.png 377395093.116.png 377395093.117.png 377395093.118.png 377395093.119.png 377395093.120.png 377395093.121.png 377395093.123.png 377395093.124.png 377395093.125.png 377395093.126.png 377395093.127.png 377395093.128.png 377395093.129.png 377395093.130.png
Zgłoś jeśli naruszono regulamin