Upload
dario-iglesias
View
107
Download
2
Tags:
Embed Size (px)
Citation preview
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 1/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 2/76
EDITORb ’ N KCEBus on the Ragged Edge
Watching the beginning of an industry bears strong resemblance to watching a downhill ski race. Thelayers move at high speed and strain to convince themselves and their spectators that they are in control of theroceedings. A champion’s run lifts those who watch to dream of exhilaration and glory. A crash reminds everyonef the risks accompanying the adrenaline rush.
Building automation is not really a new industry. Companies and individuals have been automating commercialnd residential buildings for over ten years now. Until very recently, though, most automated buildings havebeen the
omains of affluent individuals or firms looking for the prestige, convenience, or very long-term overall energy savingshat automation can provide. Current developments promise to open broad new markets to automation. Larger
markets, and the major corporate attention they attract, can take home automation away from the exclusivity of theearly adopters” into a major industry.
As we put this issue together, we looked at the growing industry and saw signs both encouraging and dismaying.On the positive side, the technology behind CEBus, and the planning which has gone into the proposed standard before
s implementation, should speed its acceptance among the general public. In addition to relatively new companieswhich have sprung up to work with CEBus, many of the respected names in building automation and electrical supplyre looking seriously at CEBus to open new markets for their products. In the negative column CEBus is still a proposedtandard. No one expects sweeping changes between the current proposal and the final specification, but cautiousompanies are waiting to see the final standard before committing development money.
Regardless of whether or not it ever truly takes off, CEBus is the best thing to happen in home automation in a long
me. As a matter of fact, CEBus has been so beneficial to the industry, that if no CEBus products were ever released,CEBus would still be counted as a Good Thing. How can I make such an outrageous statement? I feel that CEBus hastimulated progress in the two areas where it is most lacking: public opinion and large-company interest.
The popular press has jumped on the news flowing from the CEBus camp and displayed home automation as aechnology which will smooth our way into the new millennium. Whether CEBus is up to the task remains to be seen,ut the public (read: potential customer) has been given the notion that an automated home is a present possibility forhe average family. There are still thousands of individuals who are taxed in trying to program a VCR, so designingutomation products which are easily used will be a challenge. The perceived size of the potential market will be theeciding factor in whether the challenge is worth taking up.
Potential market size will also decide who will play the game. We live in a consumer society in which brandecognition is paramount. The effect of companies such as General Electric and Matsushita entering the homeutomation market will be similar to that of IBM entering the personal computer market. While the big companies willapture significant market share, their presence will legitimize the field,increasing the size and value of the total market..
Major companiesareinterested inCEBus. After slogging through theVCRcompatibility battlefield they know thevaluef a single standard to which all products attain. Whether CEBus becomes that standard or not, the companies areharing ideas on standards which will benefit both consumers and producers. No matter what it is called, there mostertainly will be a Home Automation Standard.
I am excited by much of what I’ve seen in the last few months, and I wish that I could write an uncompromisinglyptimistic editorial on the future of home automation. There is tremendous potential, but we live in a complicatedociety where success for any technical endeavor is far from assured. More homes will be automated-I’m sure of that.
We simply won’t know the system to be used until all the racers have had a chance at the mountain.
Curtis Franklin, Jr.
Editor-in-Chief
August/September I989 1
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 3/76
FOUNDER/EDITORIAL DIRECTORSteve Ciarcia
PUBLISHERDaniel Rodrigues
EDITOR-in-CHIEFCurt is Fra nklin, Jr.
ASSOCIATEPUBLISHERJohn Haye s
ENGINEERING STAFFKen Da vid son Jef f Bachiochi Ed w a rd Nisle y
CONTRIBUTINGEDITORSThom a s Ca ntrell
Jac k Ga nssie
CONSULTINGEDITORSMa rk Dahmke La rry Loeb
CIRCULATIONCOORDINATORRose Manse l la
CIRCULATIONCONSULTANT
Gregory Spi t z faden
ART DIRECTORTric ia Dzie d zinski
PRODUCTIONASSISTANTLisa Hebe r t
BUSINESSMANAGERJeannette Walters
STAFF RESEARCHERS
NortheastEric AlbertWilliam C u r / e w
Richard Sawyer Robert Stek
MidwestJon E/sonTim McDonough
West CoastFrank Kuechmann Mark Voorhees
Cover Illustrationby Robert Tinney
Cincui-CE
Chl
AR I N K
05
Tracking Sovieby Mark Dahmke
It Television Satellites
An Intelligent SCSI Data Acquisition Systemfor the Apple MacintoshPart 2-M a c in tosh Prog ra mm ing the Ea sy Wa y
by John Eng
Macintosh Programming has a bad reputation but you can write useuble Macintosh software w ithout d iv ing into sc reen reg ions and m ouse events.
Editor’s INK CEBuson the Ragged Edgeby Curtis Franklin, Jr.
1
Reader’s INK-Letiersto the Ed itor 5
NEW Product News 8
Visible INK-Levers to the INK Re se a rc h Sta ff 12
Silicon UpdateBeyond ASlCs 57New-Genera t ion PLDs’ Co st a nd Fle xib ility Bene fits by Tom Cantrell
Firmware FurnaceExposing the Unseeable Peering deep in to code wiih the he/p of u single strutegic b it
by Ed Nisley
62
2 C / KU/ T C f.LM R NK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 4/76
THE COMPUTER APPLICATIONS J OURNAL
I I
A Network for Distributed Control
ItI- Part 1
- Build ina a n RS-485 Netw o rk for
Contro ‘ i le isby Ed Nisley
040
054
Networks are m oving out of of fice s into c ontro l
en vironm en ts. In the first artic le o f a series, Ed
Nisle y presents networking ba sics.
CEBus: A New Standard inHome AutomationThe First In-Dep th Te c hnic a l De sc ription by Ken Davidson
The E/A ’s standa rd for hom e a utom at ion show s great
prom ise for revo lutionizing the hom e a utom at ion f ie ld.
In this first tec hnic al loo k, Ken Dav idson loo ks at the
de ta i ls of the prop osed stand ard.
Circuit Cellar INK Design Contest Winners
Advertiser’s index 65
From the Bench To Participate is to Win
by Jeff Bachiochi
69
Software by DesignSignal SmoothingTa king the Rough Edges off of Rea l-World Da ta
73
ClRCUlT CELLAR INK
(ISSN 08968985) is pub-lished bimonthly by CircuitCellar Incorporated.4ParkStree t.Suite20,Vernon.CT36066 (203) 875275 1.
Second-class postageoaid at Vernon, CT andadditional offices. One-year (6 issues) subscription,ate U.S.A. and possessionsS 14.95, Canada S 17.95, allother countries $26.95. Allsubscription orders pay-able in U.S. funds only, vianternational postal
noney order or checkdrawn on U.S. bank. Di-‘ect subscription orders toCircuit Cellar INK, Subscrip-‘ions, P.O. Box 2099, Ma -iopac. NY 10541 or call:203) 875-2 199.
by J ac k Ganssie POSTMASTER: Please
onnec Time--Excerpts f ro m the C irc uit Ce lla r BBS Conducted by Ken Davidson
;end address changes toCircuit Cellar INK, Circula-ton Dept., P.O. Box 2099,vlahopac. NY 10541.
Steve’s Own INK
Don’t Mess with Mother Natureby Steve Ciarcia 80
Entire contents copy-ight 1989 by Circuit Cellarncorporated. All rightsre-rerved. Reproduction of .his publication in whole>r in part without written:onsent from C ircuit Cel-or Inc. is prohibited.
Circuit Cellar BBS-24Hrs. 300/ 1200/2400 bps,8bits. no parity, 1 stop bit.(203) 871-1988.
The schematics pro-vided in Circuit Cellar INK are drawn using Schemafrom Omation inc. All pro-grams and schematics inCircuit Cellar INK havebeen carefully reviewed
to ensure that their per-formance is in accor-dance with the specifica-tions described, and pro-grams are posted on theCircuit Cellar BBS for elec-tronic transfer bysubscrib-ers.
Circuit Cellar INK makes no warranties andassumes no responsibilityor liability of any kind forerrors in these programs orschematics or for the con-sequences of any sucherrors. Furthermore, be-cause of the possible vari-ation in the quality andcondition of materials andworkmanship of reader-assembled projects, Cir-cuit Cellar INK disclaimsany responsiblity for thesafe and proper functionof reader-assembled proj-ects based upon or fromplans, descriptions, or in-formation published inCircuit Cellar INK.
August /Septem ber I989 3
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 5/76
READER’S ’ N K Let te rs to the Edi to r
NEURAL NETWORKS
Let me say that the neural network articles were fan-tastic! In my opinion, [Issue #9] was your best issue yet(they keep getting better). I know that it might not be easy
to get regular articles about AI and neural nets, but if pos-sible feel free to get another one printed.Would it be possible to include additional reference
books at the end of an article as a sort of “For more infor-mation.. .“? I think that could help guide readers in aspecific direction if they are interested in the topic dis-cussed.
Mark Balch(From the Circuit Cellar BBS)
We are planning to publish more articles concerning artifi-
cial intelligence. There are a number of problems that can besolved using Al techniques, and we plan to present thesepower-ul tools to our readers.
You’re right, a section coveringfurther information wouldbe useful on many of our articles, and we plan to include more of this type of information in the future. To get started, check out“Experiment in Artificial Neural Networks” by Ed Rietman,published in 1988 by Tab Books USBN O-8306-9337-8). Thisbook covers neural networks from a hardware point of view, andincludes both theoretical and hands-on sections. Edi tor .
I have a suggestion for CCINK. Consider a column orseries on the engineering process itself. Something like“Advice from the Oracle.” Topics could include: 1) Select-ing a CAD system-what features to look for, what “fea-tures” to avoid, etc. 2) Using a CAD system-techniques,tips, and tricks. 3) Designing and fabricating a PCB. 4)Selecting various test equipment. 5) Various hardwaredesign topics (e.g., designing a high-speed memory sys-tem or designing a basic text video display). Such a serieswould benefit a wide range of readers from beginners to
seasoned engineers.
P.S. The article on neural nets was great. I’ve heard alot of babbling about neural nets in other periodicals and
books, but Chris Ciarcia’s article clearly explained howthey worked, not just what they could do.
James O’Sullivan(From the Circuit Cellar BBS)
Thanks for the suggestions. We have been looking atvarious ways of presenting information such as you suggest ina way that won’t duplicate the articles available in other maga-zines. Other readers have given us suggestions, and we’realways happy to hear about ways we can make C IRCUIT CELLAR
INKfit readers’ needs more completely.Our goal is to present articles that help readers with the
challenges theyface in the real world-not articles on theo y, buton how to apply theory. We’re glad that the neural network articles worked in that catego y.
MORE ON LCDS
In the enjoyable LCD article (C IRCUIT CELLAR INK #8)
by Ed Nisley, he mentions the Hitachi H2570 1 x 16 unitsavailable from Timeline. However, as the Timeline ad inthat issue shows, they are now selling a similar unit, theDMC16106A, from Optrex, at the same price--$10. Likethe unit mentioned in the article, the Optrex module isbased on the Hitachi HD44780 and even has the sameconnector pinout.
The major difference is that the newly offered Optrexunit includeselectroluminescent backlighting. The ‘back-light!’ consists of a thin (1.5mm) layer of organic materialunderneath the LCD which emits a bluish-colored light,providing high contrast for the black characters. This isgreat, since LCDs suffer from notoriously bad readabilityin all but direct light.
I ordered the Optrex and tried it out. Connecting the
14-pin edge connector as described in the article producedcharacters on the display but no backlight. Unfortunately,the data sheet I ordered along with the Optrex LCDs hadabsolutely nothing to say about backlighting, so I checked
Aug ust /Sep temb er I989 5
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 6/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 7/76
8097 Single-board
Computer
The MATE97 is a newsingle-board computer basedon Inters 8097 microcon-troller. The MATE97 is a 6.1”x 3.6” controller that providesup to 32K of static RAM, 16Kor 32K EPROM, and a 12-
MHz 8097 along with a single50-pin header for I/O. Withits simple I/O interfacing andthoroughly tested hardware,the MATE97 has beendesigned to provide a solidfoundation for hardwaredevelopment and software prototyping.
The MATE97 DevelopersKit includes the MATE97computer and MON97system monitor firmware.With the addition of a
terminal (or PC with terminalemulation software), the en-gineer has a complete
development system.MON97 allows devel-
opers to develop pro-grams in RAM, interrogate I/0 ports, and debug code with
breakpoints and singlestepping. If large projectsrequire more programming,an in-line assembler, cuss-assembler, and C compiler are available for developmenton IBM PCs.
MATE97 Developer StarterKits are available for $495.
The C96 cross-assembler andC compiler for the PC areavailable for $250 each.
B. G. Associates, Inc.P. 0. Box 66
Bowie, MD 20715(301) 262-5567
Data at 100 MHz
Demanding applications have forced designers and engi-neers to sample data at ever higher frequencies and band-widths. In response to the needs of applications such as spec-trum analysis, video processing, radar, and image processing,Signatec has released the DASPlOO, a single-board loo-MHzdata acquisition and signal processing system. The DASPlOOis a standard ISA bus board designed to work in any AT-
bus-compatible computer with EGA graphics adapter.The DASPlOO samples data at 100 megasamples per
second at 8 bits of resolution. The board has 256K of signalmemory, which can be expanded to 2 megabytes, and up to32K of processor memory. The user may select between anumber of operation and control modes including switched-gain linear amplifier and wide-range compression amplifier,and continuous, pretrigger, and burst data acquisition modes.
The DASPlOO is designed for use in single- or multi- processor applications with up to three boards residing in asingle host computer. The DA%‘100 uses the TMS320C25DSP, with a peak rate of 10 MIPS. DASPlOO systems areavailable starting at $5780, with delivery from in stock to 30days.
Signatec, Inc.357 Sheridan St., Suite 119
Corona, CA 91720(714) 734-3001
8 C / / ?CU /T CELLAR INK
Single-Chip Measurement System
A single-chip devicecombining an analog-to-digital converter, a logic
probe, a frequency counter,and an LCD driver has beenintroduced by TeledyneSemiconductor. The TSC820
has a resolution and displaydriver of 3 and 3/4 digits(maximum count 39991, andincludes functions for decimal point drivers, low-
battery detector, buzzer output driver, and peak reading hold along with itsmeasuring and conversioncapabilities.
The TSC820’s A/Dconverter provides guaran-
teed zero reading and a zero-integrator cycle as well as alOO+V resolution up to 400
mV. The internal voltagereference has a typical drift of 35 ppm “C.
The frequency counter isautoranging over four decades and operates at up to4 MHz with accuracy limited
by the host circuit’s oscillator crystal.
The logic probe inputs of
the TSC820 are tied toexternal level shifter permit-ting adjustment for most
logic families. The chipsignals logic level low byturning on a buzzer.
The peak reading holdretains the highest readingfrom the A/D converter or frequency counter. Thedigital display register valuewill hold a true reading over time, immune from the biascurrent leakage that cancause “droop“ in analog
peak-reading circuits.The TSC820 is available
in 40-pin DIP, 44-pin PLCC,and 44-pin plastic flat
packages. All packages arecertified for both commercial(O”C-70°C) and extended
(-4O”C*“C) temperatureranges.
Pricing for the TSC820 begins at $6.00, quantity 100.
Teledyne Semiconductor1300 Terra Bella Avenue
Mountain View, CA94039-7267(415) 968-9241
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 8/76
NewCross-DevelopmentSoftware for the
Macintosh
Embedded systemsdevelopers using Macintoshdevelopment systems nowhave the same powerful arrayof high-performance CIDSS-
development tools that havelong been available on other popular developmentsystems. INTROL recentlyported its entire line of IN-TROL-C Cross-Compiler
INTROL’s
ful timean d co s t - e f f ec t i v esoftware development envi-ronment.
Target processorssupported by INTROL’sfamily of cross-developmenttools include the 6301/6303,6801/6803,6804,6805,6809,6811c11,68000/68010,
68020/68030,
Milwaukee,W I 5 3 2 0 4(414) 276-2937
NTSC/PAL Input Frame Grabber Board forIBM PC/XT/AT/Compatibles
Low-cost, real-time image capturefrom NTSC, PAL, VTR, or VCR sources is
possible with MetraByte’s MV-NTSC
Frame Grabber Board. It performs al1
analog signal conditioning and synchroni-zation in producing a digitized imagewhich can be viewed on a standard VGAor multisync analog monitor in the 320 x200,256-color mode. Monochrome moni- Itors with 16 gray levels and 640 x 480resolution are also supported.
The board was specifically designed to economically digitize three-dimensional objects or documents too large for conventional desktop scanners. Live video images can be displayed ata three-frame/second rate on a standard color TV/monitor or multisync monitor connected tothe MV-NTSC as a secondary display. Real-time images are captured at a l/30-second acquisi-tion time.
The $999 board includes menu-driven software to control the operation of all features in-cluding: image acquisition; image storage and recall; board set up, configuration, and control.Programs that convert a captured image to popular desktop publishing and graphics formatssuch as PageMaker, Ventura publisher, Dr. Halo, and PC Paintbrush, are also included.
MetraByte Corporation440 Miles Standish Blvd.Taunton, MA 02780(508) 880-3000
Low-Cost 68008 Multiprocessor for PC/AT
A complete 68000 basedcomputer system that plugsinto a PC, AT, or compatiblehas been announced by MicroResources. The MISTER-8 isa full-length board that uses a68008 microprocessor with an~-MHZ clock. The 68008 iscode compatible with the 16/32-bit 68000, but has an 8-bitexternal data bus. The boardcontains 64K of static RAM, provision for 128K of ROM, a
monitor EPROM, and a Zilog8038 128-byte FIFO buffer tothe PC’s I/O channel. Aserial port is also provided.Development time is im-
proved since users get
instant feedback when run-ning and debugging pro-grams with Motorola’sTUTOR monitor. Complex projects can be simplified byusing the familiar PC editor and cross-assembler tools towrite and document pro-grams. The MISTER-8 moni-tor contains system-callroutines to allow quick development in C or assem-
bly language. It also sup-
ports Ready Systems VRTX32real-time executive and can
be used to develop embed-ded multitasking applica-tions.
Two or more MIgER-8 boards can be installed in aPC to develop parallel-
processing techniques and programs. Operator controlis through a FIFO buffer toallow fast transfer of codeand data from the PC.Programs can be downloadedto each individual board, or optional application pro-grams can be installed di-
rectly on the 68008 board.The boards can also be usedas intelligent, dedicatedinstruments within the PC.Its serial port, for example,can be connected to a varietyof remote devices for measurement and control.
The $345 board is basedon the book “68000 Micro-computer Systems: Designingand Troubleshooting,” byAlan D. Wilcox, Prentice-
Hall, 1987.Micro Resources Company60 South Eighth StreetLewisburg, PA 17837(717) 524-7390
Aug ust/Sep tem b er 1989 9
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 9/76
linking CAD andDesktop Publishing
Omation has released thenewest version of SCHEMA,a schematic capture programfor electrical engineers. Thenew version, SCHEMA II+
version 2.2, allows users toexport files to other CAD programs and work withmany of today’s popular desktop publishing systems.
The most noticeablechanges to SCHEMA in thenewest version are theadditions to its roster of output formats. In additionto the plotters and printerstraditionally supported byCAD packages, SCHEMA II+
2.2 will serve up output inPostscript, TIFF, DXF, WKS,DBF, SDF, PCX, Delimited,and PSpice format files. Thecombination of outputformats allows SCHEMA II+2.2 to provide electrical engi-neering CAD drawings for inclusion in documents
prepared by PageMaker, PCPaint, Publishetis Paintbrush,Ventura Publisher, and other major DTP and paint
programs.Engineers from officeswith multiple CAD packages
may be more impressed withSCHEMA II+ 2.2’s ability toexchange complex files withAutoCAD. Unlike many DXFexchange features which onlywork to transfer relatively
simple files, the DXF transfer feature of SCHEMA II+ 2.2 isdesigned to include blocks,
polylines, attributes, hiddenattributes, arcs, circles, andother advanced shapes andsegments.
SCHEMA II+ 2.2 runs onPC, PC/AT, 80386, PS/2, and
PC-compatible computers.The list price of the packageis $495 with same day ship
ment and 30-day money back guarantee. A free evaluationkit and demo disk areavailable upon request.
Omation, Inc.801 Presidential DriveRichardson, TX 75081(800) 553-9199 or
(214) 231-5167
Micro Channel Interface on a Chip
Designing an interface product for the IBM PS/2 MicroChannel bus has been greatly simplified with ONE CHIPPLUS, the 88COl Micro Channel Interface Chip from CapitalEquipment Corp. It provides complete Micro Channel inter-face compatibility plus the decoding and logic functions re-
quired for memory, I/O, and multifunction adapter cards.Features of the 84-pin PLCC chip include Direct Memory
Access (DMA) arbitration and burst mode DMA, program-mable memory and I/O timing to accommodate wide accesstimes on memory and peripheral chips, user-definable Pro-grammable Option Select (POS) registers, and a program-mable Micro Channel board ID. In addition, multiplexedmemory address lines allow direct connection to lM-bitDRAMS.
A unique user configuration capability permits adjustingthe characteristics and pinout of the chip to specific designneeds. Some of these characteristics include: enabling ex-
panded and extended memory, data width for each chipselect, I/O access time, ROM size, and Micro Channel IDnumber. Over 20 user configuration features can be set with a
configuration PROM.A development kit provides complete support for the
Micro Channel interface design and includes a prototype board with a working memory adapter circuit, breadboardingarea, and connections for a logic analyzer. Interactive 88COl
configuration software, EPROM-based code for memory add-
in cards, design utilities, and a DOS expanded memory driver meeting EMM 4.0 are also provided.
Acquisition Engine software, which provides backgroundor foreground data acquisition, general-purpose I/O control,and graphics is also included. Customized software modulescan be added for specific products.
Documentation includes specifications, schematics,application notes, recommended PC layout, and CAE partslibraries.
The entry-level development kit is $495 with a 30%discount to CIRCUIT CELLAR INK readers.
Capital Equipment Corporation99 South Bedford StreetBurlington, MA 01803
(617) 273-1818
10 C/KU/T CELLAR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 10/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 11/76
Chl
VISIBLE ’ N K Let t ers t o t he INK Research Stafl
Answers; Clear and Simple
EPROM/PAL PROGRAMMER ON THE CHEAP PROGRAMMABLE THERMOSTAT SEARCH
I’ve been looking for an EPROM/PAL programmer pin-driver circuit for a while now without much luck. I
think Elantec offers a monolithic one, but they’re expen-sive if you want to buy 40! Do you know of a reasonablycompact circuit which will handle programmable voltage,slew, sink, source,and tristatenecessary for a good-quality
programmer?
Ralph UrsoleoEugene, OR
EPROM/PAL programmer designs conform to the oldcliche that “there’s more than one way to skin a cat.” Because of
thediffering requirements of EPROMs and various PALS , truly“universal” designsareall but impossible. “Dumb”seria1 inter-
faces, such as the UART-based design described in the Februa y‘85 “Ciarcia’s Circuit Cellar”(in BYTE,alsoin VolumeVIof thecollected articles, available from both CCI and Micromint)represent one extreme. This type of design is based on easy-to-
find components readily found from sources like JDR Microde-vices, Jameco Electronics, and traditional industrial supplierslike Hamilton-Avnet. The later 8052-based SEP is a “smart,”upgraded implementation of the same basic idea. Both designsare specifically tailored to fhe programming needs of EPROMs
rather than PALS and cannot be readily modified to accommo-date the latter.The article titled “A PAL Programmer“ by Robert A.
Freedman in the Janus y 1987 issue of BYTE gives details for adesign based on the Sprague UCN5810A, UCN5821A, andUCN5895A chips. None of these chips does everything needed,but in combination with the rest of the circuitry in the design,they together can be made to do everything necessa y for pro-
gramming PALs. Making modifications to Freedman’s designto use a processor like an 8052 instead of a host PC would giveasmarterstand-aloneunit. TheseSpraguechipsareprobably theclosest you’llget to reasonablypriced components that meet your
needs.
Is there a relatively inexpensive digital thermostatthat would provide true binary-data feedback to a control-
ler and thus to a central HVAC unit? I feel certain that sucha unit must be available off-the-shelf (probably manufac-tured by Johnson, Honeywell, or Barber-Coleman) but Iam unable to locate or even identify one. I should think itwould be thermistor based, but I can’t see that I shouldhave to design the thing myself if one is available commer-cially.
Michael NewellArlington, TX
Industrial “thermostat” temperature monitor/controllersare available in many types and sizes (check out the currentOmega Engineering “Temperature Measurement Handbookand Encyclopedia” for some of the possibilities) with sensorsrangingfrom thermistors to thermocouples to platinum RTDs.
Some consist mostly of a heavy case with a minimum of delicatecomponents, others use microprocessors for the “brains.” Older mechanical types are being rapidly and more cost-effectivelysupplanted by systems using analog-to-digital converters withsolid-state temperaturesensors and op-ampsignal conditioners. An op-amp, a thermistor or LM335, a potentiometer, and a few
additional componentssuchasanoutput relay,can becombined for a ve y simple, relatively accurate thermostat with a variableswitching point (set point) that is much more cost-flective andrepeatable than the bimetallic typeit can replace. Thesolid-statesensors are currently more cost-effective than most other types,including thermistors, for home control applications. The Na-tional Semiconductor LM334 is a popular sensor, but there areothers such as the LM335, LM34, LM35, and the AnalogDevices AD590 (second-sourced by Intersil as theAD5901). Anordina y transistor or diode can be used as a temperaturesensor whengreatprecision isn’t needed; theforward voltageofasilicondiodevaries quite linearly with temperature, especially with the
very limited temperature ranges usually encountered in homecon fro1 applications.
12 CK’CUT CELLAR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 12/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 13/76
EXPRESS CIRCUITS
MANUFACTURERS OF PROTOTYPE PRINTED CIRCUITS FROM YOUR CAD DESIGNS
TURN AROUND TIMES AVAILABLE FROM 24 HRS - 2 WEEKS
Special Support For:
l TANGO.PCB
l TANGO SERIES II
l PROTEL AUTOTRAX
l smARTWORK
l HiWIRE-Plus
l EE DESIGNER I
l FULL TIME MODEM
l GERBER PHOTO PLOTTING
l CAMERA REDUCTIONS
Expressl EE DESIGNER III
l OTHER PACKAGES ARE
NOW BEING ADDED
Circuits
314 Cothren St., PO. Box 58Wilkesboro, NC 28697
Quotes:l-800-426-5396
Phone: (919) 667-2100Fax: (919) 667-0487
Circle No. 133 on Reader Service C ard
14 C/KU/T CELLAR INK
TILE-CONTROLLER PROGRAMMABLE
BY IBM COMPATIBLE PC36 I/OS, 8 timers, 3 elk. signals stack architecture,supports two user files. Internal variables, inputsfor push on/off circuits. Integrated full screeneditor. English like commands, very easy to
program. US $149.00Manual only, 5.25” diskette $3.00
FOR APPLICATION NOTES WITH MANY
INTERESTING AUTOMATION PROJECTSPLEASE SEND $5.00
L.S. ELECTRONIC SYSTEMS DESIGN2280 Camilla Road,Mississauga, Ont. L5A 2J8 Canada
(416) 277-4893
: H obbyists, exper iment er s, R & D groups! II
. I
1 8031 pController Module 1I
II
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Our 8031 uController Module forms the core of ;
a complete prototype or one-of-a-kind device.
We include a high quality, silk screenedI
printed circuit board populated with an 8031I
microprocessor, 11.059 MHz crystal, 74LS373I
Address Latch, capacitors, communications I
and I/O headers and a 2764 EPROM with Idemonstration software. The module also I
contains a socket for a MAX232 level converter Ito provide an industry accepted serial Icommunications port if your project requires it. INeed development software? We carry I
cross-assemblers, simulators and disassem- I
blers from Pseudocode for the 8051 family. I
II
ISend $39.95plus $3.00 S&Hper pController module
Illinois Residents Add 6.25% Sales Tax
I
I Cottage Resources I
I Suite 3-672,1405 Stevenson DriveI
ISpringfield, I ll inois 62703 I
*.--mm (217) 529-76791111 11-11-1 JC irc leyoy 13 on Reader Service C ard
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 14/76
An Intelligent SCSI Data AcquisitionSystem for the Apple Macintosh
PART 2by John Eng Ma c in to sh Pro g ra m m ing The Ea xy
I n the feud between IBM PC/ATand Apple Macintosh proponents, theMacintosh side has been disadvan-taged by the notion that the Macin-tosh is extremely difficult to program.
Generally speaking, this notion is nottrue. Standard implementations of avarietyofprogramminglanguagesareavailable for the Macintosh. There-fore, writing a Turbo Pascal programon the Macintosh should be no moredifficult than writing the same pro-gram using Turbo Pascal on a PC.
Macintosh programming be-comes substantially more difficult if the programmer decides to implementa mouse-driven, Macintosh-style user
interface instead of a conventionalTTY-style, keyboard-oriented inter-face. With menus, windows, and
buttons, a well-written Macintosh-style user interface provides more in-tuitive control over the application
program than does the TTY method.Since there are no program subsec-tions to enter before performing aspecific action, the user interface issaid to be modeless. Not surprisingly,the flexibility and graphical appear-ance of a Macintosh-style user inter-face require a significant amount of additional program code.
Although Macintosh purists maydisagree, the programcode to providea Macintosh-style user interface isentirely optional. In fact, most Macin-tosh compilers provide standard I/O
procedures for a TI’Y interface tomaintain compatibility with standardlanguage definitions. For a Macin-
tosh hardware designer who needs a program to test a new project, it isreasonable to ignore the Macintoshuser interface and write the driver
program using the standard TTY I/O procedures supplied with the com- piler. As the program becomes a full-scale Macintosh application, the pro-grammer may then put in the extras
for the Macintosh-style user interface.There are a number of software
tools available for implementing aMacintosh-style user interface. At thelowest software level, the MacintoshROM and operating system provide awide variety of system-level subrou-tines known collectively as the Macin-tosh Toolbox. Toolbox routines arecallable from most high-level lan-guages, and such calls are supported by most Macintosh compilers. In ad-
dition to an extensive collection of routines related to the Macintosh user interface, the Toolbox contains rou-tines for memory management, de-vice drivers, sound synthesis, andmore. (The complete Toolbox docu-mentation covers over four volumes.)
Even with the Toolbox, imple-menting a Macintosh user interface istime consuming at best. A number of high-level software tools areavailableto simplify the creation of Macintoshuserinterfaces:mostnotableareProto-
typer fromSmethersBarnes, Program-mer’s Extender from Invention Soft-ware, and MacApp from Apple Com- pu ter. Prototyper generates high-levelsource code for a Macintosh-style user interface according to a programmer’sspecification. In contrast to Proto-typer, which is an application, Pro-grammef s Extender and MacApp arehigh-level subroutine libraries. Pro-
grammer’s Extender subroutines arecallable from a number of Macintoshcompilers, while MacApp requires theMacintosh Programmer’s Workshop,
Apple’s exhaustive programmingenvironment for the Macintosh.
SCSI AND THE DAQ3000
The DAQ3000 SCSI Data Acquisi-tion Device relies heavily on the SCSIinterface to achieve its 28-kHz sam- pling rate. The SCSI standard, asdefined by the American NationalStandards Institute (ANSI), specifiesthe sequence and timing of 18 TTL-
level signal lines. Figure 1 is a sche-matic diagram of SCSI bus timing. InSCSI terminology, the Macintoshalways acts as the initiator device,while the DAQ3000 operates as a tar-get device. Other SCSI devices on the
bus, such as hard disks, also operateas target devices. Communicationover the SCSI bus is divided into sev-eral bus phases. During the first phase,the selection phase, the Macintosh (asthe initiator) asserts SEL\ and DBn\,where n is the DAQ30OO’s SCSI targetID number (O-7). The currentDAQ3000 software assumes a target
ID number of 4. When the DAQ3000detects the SEL\ signal along with theappropriate DBn\ signal, it responds
by asserting BSY \. The Macintosh
A u g u st / Se p t e m b e r I989 15
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 15/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 16/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 17/76
Read Command
Byte 0 $03
1 MSB-------_
2 Number of 16bit words to transfer from ADC.- - - - - - - -
1
If 0 or 1, then send 256 zeros (al boot lime).
3 LSB4 (unused)-----_-_
5 (unused)
Wife Command
Number of 16-bit words to transfer to DAC.If 0, then download as a 6502 program.
pGj$z--l’_ Length of download program (t 256).
Request Sense Command
Byte 0
1 tYzz--l
2 L (unused)----_-
Format Unit Command
Byte 0 $04
1 (unused)-----_-_
2 (unused)- - - - - - - -
3 (unused)-----_-_
4 (unused)-----_-_
5 (unused)
Figure 2-DAQ3coO SCSI c o mm and d e sc r ip t o r b lo c k s
the unit’s reset button. The address ofthe monitor program ($3800) is storedthree times in the EEI’ROM’s last sixbytes, where the 6502 microprocessorexpects to find the addresses for inter-rupt, reset, and break routines. Afterinitializing the system I/O (68B21) and
theSCSI(5380) chips, the monitor pollsthe SCSI controller for detection of aSCSI bus selection phase directedtoward the DAQ3000. Upon detect-
18 C/ RCU/ TCEUAR INK
ing a valid selection phase, the moni-tor asserts the command phase andbegins to read the command descrip-tor block. The first byte of the com-mand descriptor block determineswhich of the monitor’s commandhandling routines is called. The
DAQ3000 monitor contains subrou-tine handlers for performing the read,write, and request sense commands.(The format unit command is consid-
ered an error.) The monitor also con-tains utility routines for reading andwriting SCSI data blocks using theprogrammed I/O and pseudo-DMAmodes. For debugging purposesduringSCS1 command processing, theDAQ3000 displays simple status codes
on the unit’s eight front-panel LEDs,roughly indicating what part of themonitor program is being executed.
SCSIMOVER-A MACINTOSHAPPLICATION
The second DAQ3000 softwarecomponent,SCSIMover,iSarelativelysimple Macintosh application pro-gram that fulfills the Macintosh’s roleas the SCSI initiator for the DAQ3000.
[Editor’s Note: Software for this articleis available for downloading from theCircuit Cellar BBS or on C I R CU I T C E L L A R
I NK Software On Disk ##lo. For down-loadingand orderinginformation,seepage78.1 SCSIMover was developed inLightspeed Pascal. For simplicity andfor portability to other MacintoshRascal compilers, SCSIMover usesstandard Pascal TTY-style I/O as itsuser interface. The current skeletonversion of SCS IMover supports fOUr
commands: (1) receive digitized datafrom the DAQ3000 into MacintoshRAM; (2) send digitized data fromMacintosh RAM to the DAQ3000; (3)download 6502 machine code to theDAQ3000 from a Macintosh text file;and (4) reset the SCSI bus.
SCS IMover callsSCS1 routinesinthe Toolbox to perform the selection,command, status, and message-inphases. For the command phase,SCSIMovercreatescommanddescrip-tor blocks according to Figure 2. Theremaining phases, data-in and data-out, are handled by two external 68000assembly language procedures,SCSIRFast and SCSIwFast, whichcomprise the third component of theDAQ3000 software. These externalprocedures are necessary because thehigh-speed data transfers during theDAQ300O’s data-in and data-outphases require the uninterrupted at-
tention of the Macintosh’s 68000 mi-croprocessor. The standard SCSI readand write routines in the Toolboxcannot be used here because these
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 18/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 19/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 20/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 21/76
Tracking Soviet Television Satellitesby Mark Dahmke
I n recent years, due to lower costand greater availability of satellitereceiver technology, it has become
possible to watch television programsfrom many other countries in this
hemisphere. I’ve always had an inter-est in Europe and the Soviet Unionand wanted to monitor their televi-sion, but due to the curvature of theEarth and the use of focused spot
beams, there are limits to what can beseen from central North America.
In 1985 I learned that the SovietUnion operates a system of satellitesin polar orbit which are used to broad-cast television to northern Siberia.Because of their unusual orbits, they
are visible to most of the northernhemisphere. I also discovered, to mysurprise, that the technology to re-ceive and track these satellites wasdeveloped in Omaha, Nebraska-amere one-hour drive from my homein Lincoln. Fr. Lee Lubbers of Scala onthe Creighton University pioneeredtheautomatictrackingsystemandhasinstalled many satellite systems for collegesand universities. With the helpof Fr. Lubbers, Dan Pike, and Francis
Lajba, I learned enough about the tech-nology and methods of tracking So-viet satellites to build a receiver usinga 2.4-meter dish in my back yard.
SIBERIAN LIGHTNING
In the mid-1960s, the Soviet Un-ion needed a way to broadcast to thenorthern and eastern regions of Sibe-ria. In theunited States, we have beenusing geostationary “Clarke” orbits(named for Arthur C. Clarke, the in-ventor of the communications satel-lite) for such a long time that it’s hard
to think in terms of any other kind of orbit for broadcast television. Themain advantage of a satellite in geo-stationary orbit is that you can point adish at the satellite and never have tomove it again. The trouble is that geo-stationary satellites aren’t very usefulfor receiving sites above 70 degreesnorth latitude, and in the mid-60s theSoviet Union didn’t have the capabil-ity to launch a large payload into a
Photo 1 --The au thor’s eight-foo t a lum inum d ish with mo d if ied p olar mou nt. A stan-da rdp o la r mount can b e mo di fied to p ro- vide d ua l-axis c ontrol of the d ish. The ele- vat ion a djustme nt is co ntro l led by a sec - ond ac tua to r a n d j a c k so the d ish m ay b e mo ved from a 45-degree angle up to and p a st 90 d eg ree s. The norm a l ea st-we st m ot ion is con t r o l ed by an ac tuator ]us t a s on a normal d ish m ount . Note that the pe de stal leg on the lef t side of the m ount in this p ic ture p oints 20 d eg ree s ea st of
nor th .
22 C/RCU /T CELLAR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 22/76
geostationary orbit anyway. TheSoviets had other requirements, andhave always been good at using avail-able technology to meet their needs.
The Molniya orbit (pronouncedMoln-ya, meaning “lightning” inRussian) has several unique proper-
ties. First, it is a polar orbit, inclined 63to 65 degrees with respect to the equa-tor. Two periodsare possible: one justunder12 hoursand theother justunder 24 hours. The Soviets chose the 12-
hour orbit for their system. The eccen-tricityis0.74whichmeans thatit is highly elliptical. Figure 1shows the properties of thisorbit from a stationary pointof view out in space. Theorbit’s apogee (high point) is
at about 40,000 km and the perigee (low point) is 600 km.
While remarkable interms of conventional geosta-tionary satellites, there areadditional unusual features.Since the orbit has a period of 12 hours, the satellite willappear to be at its apogee over Hudson Bay, Canada duringone orbit, then, because theEarth has revolved through
180 degrees underneath it, the nextapogee will be over central Siberia.The effect of this combination of satel-lite motion and the Earth’s rotation
means that the satellite will repeat itsground trackvery accuratelyeachday.Only a limited number of stableground tracks exist in this configura-tion, and the Soviets chose an ascend-ing node of approximately 113 de-grees West. Figure 2 shows the appar-
ent ground track of this orbit.From a location in the centralUnited States, the satellite wouldappear to rise above the southernhorizon, rapidly traverse the sky fromalmost due south to the zenith, thenmove into the northern sky. As itreached its apogee, it would appear tomove more slowly and almost cometo a stop, and generally never dropbelow60degreesaltitudein thenorth-em sky. As it started to fall from its
maximum altitude, it would movefaster and begin to move back towardthe zenith, eventually moving into thesouthern sky and dropping below thehorizon. Figure 3 shows its apparent
position in the northern sky. A satel-lite would repeat this track once per day because its next climb to apogeewould be over Siberia and wouldn’t
be visible to us in North America(actually, it would be visible but bevery low on the northern horizon).
During the Canadian active loop,the satellite would appear to an ob-server in Siberia (or Moscow) to popup from the northern horizon for afew hours, rise to about 30 or 40 de-grees in elevation, then drop downand disappear until the next day. The“visibility window” for a given satel-lite may be up to eight hours. To solvethis problem, the Soviet Union usesfour satellites spaced six hours apart
in nearly identical orbits, allowing for almost continuous coverage. Wheneach satellite rises above the horizon,itisswitchedonandusedforsixhours,until control is handed off to the nextsatellite. The question most peopleask is: why do they use the Canadianactive loop, not the Siberian loop?There are two obvious answers: one isthat both are used but since the Sibe-
rianloopisdifficult toreceivehere,noone has really investigated this possi-
bility. The second answer is that totrack a satellite that is almost over-head means that the dish will collect alot of snow and ice. A dish pointing at
A u g u st / Se p t e m b e r 1 9 8 9 2 3
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 23/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 24/76
Menu-driven software tomonitor, display, and controlyour home or production systemfrom the site or from a Remotelocation.
ucontrol Features
o Display:up to 16 analog inputsup to 32 discrete inputsup to 32 discrete outputs
o Sample Rate:update all within 1 sec.
o AlarmsSwitch Discrete Output on:
analog threshold‘trip’ of discrete line
o Password Protection4 Priorities
Price: $150.
uControl-Remote ADDSo Dial up from remote to
access all featureso Automatic dial-out on
Fault ConditionPrice: $100. (requires uCONTROL)
uControl-History ADDSo MS-Windows base d display
customization protram.o Historical Plotting of any
input or output vs. time.Price: $150. (requires uCONTROL)
Requirements:uControl. IBM PC/XT/AT (compatible)system with 512k memory; compatibledata acquisition card(inquire aboutboards and systems supported.)-Remote. also Hayes compatible
modems at each end.-History. MS Windows Release 2.1 or later.
10 h-!W~ 1:11:11
30-day money-back guarantee
(617) 861-0181FAX (617) 861-1850
Unke l So f twa re nc .62 Bridge Street. Lex ing ton . MA 02173
Circle No. 153 on Reader Service Card
bEEsr
Figure J--The Moln iya orbi t as see n f rom
the miciwest. The d ark p art of the c urve
show s the ac t ive p ort ion o f the o rbi t- the
pe r iod used to broa dc ast te lev ision.
which the TV audio was added as a pulse next to the horizontal sync ineach scan line. This “sound in sync”method wasadopted before there wereany standards for the transmission of audio on an FM subcarrier. The oldmethodusedpulse-widthmodulationand required a decoder circuit thatwould extract the audio using sample-hold techniques and then reconstructa normal SECAM sync pulse for themonitor. Fortunately this technique
has been phased out, greatly simplify-ing reception of Molniya broadcasts.
The signal strength from thesesatellites is quite high, comparable tothe powerful transponders of GalaxyI. I’ve received marginal quality pic-tures using a mere six-foot dish and135-degree LNA (Low-Noise Ampli-fier). My standard setup, shown inPhoto 1, is an eight-foot (2.4-meter)solid aluminum dish with a 60-degree
LNA (the noise temperature in Kelvinof an LNA rates its ability to amplifysignals above the noise in the ampli-fieritself, thebackground radiationof the Earth, and from outer space). Afewyearsago,goodquality,low-tem-
perature LNAs were extremely ex- pensive, so the only option was tomove to a larger diameter dish. Now,a 60-degree LNA costs less than ahundred dollars.
TRACKING A MOVING SATELLITE
Now comes the fun part. It is possible to manually locate and track
the Molniya satellites, and I’ve doneso many times. But to really make thisa fun project, and to set up an auto-mated receiving station that a non-techie can use, we need some com-
puter-controlled motors and analog-to-digital converters.
When planning to build a Molniyareceiver, your location should be takeninto account. In the central UnitedStates an eight-foot dish will work well, but if you live farther south, aten- or twelve-foot dish would beadvisable. A sixteen-foot dish mayberequired at or near the visibility limitshown in Figure 2.
DISH POSITIONING
The dish you use must be steer-able with two degrees of freedom.Several axis arrangements are pos-sible: A simple azimuth-elevationmount will work, with rotation (azi-muth) and elevation (altitude). Thedisadvantage of this approach is thatthe satellite often must be followedacross the zenith point, which alsohappens to be on the rotational axis of the dish mount, resulting in a singu-larity. That is, you would be pointing
straight up with the ability to rotatethe dish around the azimuth axis, butit would always point to the samespot. A better arrangement is to havethe rotational axis offset to someother
part of the sky. Such an offset is easilyaccomplished by taking a standard
polar mount (where the axis of rota-tion points to the north celestial pole)and swing it around 180 degrees, withthe polar axis pointing due south. A
standard dish mount with an actuator (a DC motor with worm drive) canthen position the dish to the east andwest, while an additional actuator isused to raise and lower the dish inaltitude (see Photo 3). Any number of dish configurations are possible de-
pending on the available hardwareand dish mounts. The only require-ment is that the dish be able to movefreely through about 45 degrees of al-titude and 45 degrees of azimuth. The
actual center point of this “window of visibility” is dependent on your loca-tion with respect to Hudson Bay,Canada.
26 C lRCUlT CELLAR NK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 25/76
remember
exactly what position the arrnis in, or recalibrate each time. The circuit in
Figure 4 shows the complete control-ler. This design is used with a low-costPC/XTclonemotherboard,aCGA
display, and one floppy disk drive, but provides all the necessary func-tions to track satellites.
If you don’t know where the cur-rently active satellite is, you will haveto hunt for it manually. This can bedone by hand with momentaryswitches connected to the controllingrelays or by computer control in a
scanning pattern. The position of anactivesatellitecanonlybedctcrmined
by looking at RF signal strength, and by watching for a TV picture or listen-ing for the audio at 7.4-MHz.
My house happens to be directlyin the path of a strong terrestrial mi-crowave signal which causes false trig-gering and often shows a high RFsignal strength when in fact no satel-lite signal is present. For this reason,a fully automated tracking program
doesn’t work well. If you live in anarea that is free of microwave interfer-ence, you will be able to track eachsatellite and automatically hand off tothe next one with little difficulty. Inspite of the microwave interference, Idon’t have much trouble with auto-mated tracking once I manually locatethe satellite and lock onto it, but if the position of the satellite happens to benext to a strong terrestrial source, thetracking program can become con-
fused and be dragged off into the mi-crowave noise. Also, due to these hotspots in the sky, I can’t run an auto-mated X-Y scanning procedure tolocate the active satellite. At SCOLA’ssite in Omaha, and at Lincoln HighSchool where I have helped to install asystem, the microwave interference isnot a problem and the automatedtracking and scanning software work as they should.
At first, finding thesatellitecanbe
very frustrating, but some simpleguidelines will help. First, check amap to find the bearing from your location to the north end of HudsonBay, Canada. Specifically, theapogee
SAVE Developmentand Debugging lime
of EmbeddedMicroprocessor Systems!
l INTROL-C Cross-Compilersl INTROL-Modula-2 C ross-
Compilersl INTROL Relocating Macro
Cross-Assemblers
COMPILER PACKAGES INCLUDE:Compiler l Assembler l Linkerl Runtime library, includinga multi-tasking executive l
Support utilities l Full year’smaintenance
TARGETS SUPPORTED:6301~03~6ao~~o3~ 6809.6BHC ll .68000/08/ 10/12.
6ao2oJo3ojaai/a5i l 32ooof32/ai/a2
AVAIlABLE FOR FOLLOWINGHOSTS: VAX and MicroVAX;
Apollo; SUN; Hewlett-Packard;Macintosh; Gould Power-Node; IBM-PC , XT, AT, andcompatibles
INTROL C ROSS-DMLOPMENTSYSTEMS are proven, acceptedand will save you time, money,and effort with your development. All INTROL products arebacked by full,meaningful,technical support.CALL or WRITEfor facts NOW!
INTRO1C O RPO RA TI O N
647 W. Virginia StMilwaukee, WI53204
4141276-2937 FAX: 414/276-7026Quality Software Since 1979
Photo J -Close-up v iew of the modified polar mount.
Circle No. 130 on Reader Service C ard )
Aug ust /Sep tem be r 7 989 27
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 26/76
is always near 80 degrees West Longi-tude and 63 degrees North Latitude.Position thedish to the midpoint of itseast-west actuator range. Find theoffset from true north to the apogeelocationandaim thedishat that point.For the continental U.S., set the mid-
point of the dish elevation range to beyour latitude plus 30 degrees. InEurope, set the midpoint to be aboutthe same as your latitude. Manuallypan the dish, scanning through theentire “window” in four-degree in-crements or bands. With the receiverset to transponder 9 and audio subcar-rier at 7.4 MHz, you should encounterat least a distorted picture and somesound. After finding maximum sig-nal strength, you can adjust the re-
ceiving frequency and other parame-ters on the receiver for a clear picture.
One of the best ways to learn howthe satellites move is to manually track
them through one or moreactive loops.If thesatelliteisnearapogee, you won’thave to readjust thedishpositionmorethan once every fifteen minutes or so,butifthesatelliteisstartingbackdowntoward perigee (moving higher in thesky), it will be accelerating and will
require adjustment at least every fouror five minutes. After you have deter-mined the optimum range of pointingangles for your dish, you can adjustthe actuator mounting brackets to al-low for the optimum range of motion.Remember that each satellite will bein a slightly different orbit, so theywon’t always appear in the same placein the sky as another satellite.
One other complication: due tothe parameters of the Molniya orbit,
these satellites recede in their orbitsby about 4.5 minutes per day. Thismeans that if you found the satellite ata certain point today, you would find
it at that exact same point 4.5 minutesearlier tomorrow. Assuming that youare tracking the satellites automati-cally each day and every day, the prac-tical effect is that the hand-off times(when control is transferred to thenext upcoming satellite) will be four
and a half minutes earlier every day.Since this is a small change on a dailybasis, thesoftware will takeitinstride,but if you happen to skip a few daysora week or two, you’ll probably have togo satellite hunting again (unless youhave a really good memory). I use mysystem a couple of times a week, andwith a bi t of practice, I have found thatit takes me less than two minutes tofind the currently active satellite, andin the worst case, perhaps five min-
utes.If you follow Molniya satellites
for months or years, you will alsodiscover that sometimes their orbits
Figure 4--The d ish c on trol ler c irc uit or use w it h a PC-comp a t ib l e . The ADC0809 B-cha nnel ana log -to-d ig i ta l chip w as used to r e adbo t hX- a nd Y-axis volta g es wh ic h p rovide fe ed b a c k ab ou t dish p osit ion . a nd to rea d th e RF sig na l streng th w hich is fed from the sa tel lite rece iver. Four output l ines feed relay co ntro ls which a re c om bined to p rod uce X and Y ac tuato r m otor voltag es. The DC mot ors a re reve rsib le d ep end ing on p olar ity of the 3 2 - v o / t input .
28 C lRCUlT CELLAR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 27/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 28/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 29/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 30/76
PART I
A Network for Distributed ControlBuild ing a n RS-485 Ne tw o rk fo r C o n tro lle rs
by Ed Nisley
Around theCircuit Cellar,
hardware designsfrequently occur
after someonethrows down the
gauntlet.
1 hat someone is often Steve, whoneeds “just a few things” for his next
project. The recent RTC boards are anexample: myriad functions in a formfactor you can’t pass up at a price youcan’t ignore. He needed somethinglike that for his No Sparrow Shall Fallhome security system, of course.
But, having gotten Jeff started onthe RTC hardware, Steve slappeddown the other glove. He figuredthere was no reason why the RTC
boards couldn’t talk to each other;what he really wanted was a network of controllers to distribute data collec-tion and analysis functions through-out his system. Talk of expensivecommunication controllers was ver-
boten, as Jeff had already included anRS-485 transceiver on the board. Therest was just software.. .
This two-part article describes the
result: INKnet, an RS-485 network designed for microcontrollers. Thefirstpartcoversnetworkperformanceand access protocols, while the sec-
RS-232 lin- Motor
Controller
PhotoSensor
ond part will explore INKnet mes-sages and the firmware required tomove them around the network.
THE OLD STANDBY
Most controllers include an RS-
232 port, probably set up as shown inFigure 1. The controller connects,through a “standard” RS-232 cable, toany terminal or PC. The data rate canexceed 100,000 bits/second and thecable can grow beyond 50 feet, as longas you don’t stretchboth limits simul-taneously. Best of all, everyone un-derstands how to program RS-232communication routines!
However, that ubiquitous RS-232standard defines just the connection
between Data Terminal Equipment (aterminal or computer) and Data Com-munication Equipment (a modem).
The RS-232 electrical spec implicitlyassumes the cable connects one driver to one receiver. Although you canwireseveral receivers toa singledriver,
there is no practical way to use severaldrivers with a single (or multiple)receiver without ugly and nonstan-dard circuitry.
RS-232 requires a separate serial port for each connection, so systemswith even a few controllers begin tosprout a raYs nest of cables. If eachcontroller communicates with theoutside world the situation is evenworse, because the setup begins tolook like the bridge of the Enterprise.Figure 2 shows a system with threecontrollers; obviously unworkableunless you thinka deskcrowded withPCs is a status symbol.
A separate controller can handleall serial communication with theoutside world, but this doesn’t reducethe confusion of ports and software inthe system. Worse, the communica-tions controller must somehow mesh
all of the traffic with the PC’s screenand keyboard. You can imagine howdifficult it is to expand this type of system with another controller.
32 CIRCUIT CELLAR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 31/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 32/76
PC withnetwork interface
klgure +-use orI?S2.32 reduc es mul t ip le c onne c t ions to a single twisted- pa i r wi re.
will ignore any signal that appears on both its inputs.
You can use any pair of wires, butthe best noise immunity is gainedwhen the wires are twisted a few times
per foot. Zip cord will work for desk-top connections, but don’t try runningit down the hall! For particularly longruns you should match the character-istic impedance of the cable with the
terminating resistors.Because the twisted pair estab-lishes a metallic connection betweenall nodes, it may carry ground current
between nodes in addition to the de-sired signal. If a severe ground volt-age imbalance exists between twonodes, this current can destroy theinterface circuitry. All nodes must beeither isolated from ground orbondedto the same ground point to eliminateany danger from potential ground
loops.Perhaps this goes without saying,
but all nodes must use the same bitrate, number of data bits, parity bits,and stop bits. RS485 offers no magicresolution to this familiar RS-232 prob-lem.
The RTC52 schematic in “FromThe Bench” in CIRCUIT CELLAR INK #8shows that a complete RS485 inter-face can be a single 75176 IC with a
jumper for the 100-ohm termination
resistor. The 8052 (or 8031) handlesdata input and output through thestandard on-chip serial port.
BASIC BANDWIDTH
Networking does not eliminateall communication problemsina singlestroke. As with all engineering deci-sions, choosing to network your embedded controllers is a tradeoff be-tween two sets of problems and op
portunities. Make sure your applica-tion is amenable to a networked solu-
tion because there is nothing to begained by force-fitting the wronganswer to the right problem!
Evaluating a network requiresthinking about your control programsa little differently. Instead of lookingat raw computer power, you mustevaluate how to divide the controlalgorithm between multiple proces-sors, what information flowsbetweenthe processors, and whether there areany timingrequirements for that data.
All of these issues boil down to mak-ing sure that the network will deliver enough information in a timely man-ner.
More often than not, the limitingfactor will be the speed of the net-work-no matter how fast it is, youwill always need more speed! Unfor-tunately, determining whether a net-work can handle your project is notsimple. You must take into accountnot only the network’s capacity, but
how your program will use the net-work; everything is related to every-thing else.
The fundamental limitationof any
communication system is the totalamount of data it can handle in a giventime, which is usually measured in
bytes/second or messages/second.Those of you familiar with informa-tion theory will recall Claude Shan-non’s seminal work defining informa-tion transfer through noisy channels.The bottom line is simple: regardless
of how bright you are, you cannottransmit more information than thesystem can handle!
There are clever encoding andcompression techniques that give theappearance of stuffing more datathrough a wire than seems physically
possible. These tricks simply make better use of the available bandwidth.The “bandwidth” of a communica-tion system is simply the highest datatransfer rate for the particular encod-
ing scheme being used.For our purposes, the network
bandwidth is the maximum number of bits per second appearing on thewires. In the case of an RS485 or R!S-232 connection this is the transmitter data rate. For example, if the nodestransmit at 5000 bits/second, the net-work can handle 5000 bits every sec-ond. This conclusion may not soundearthshaking, but if your applicationmust exchange 1 million bps there is
an obvious data rate mismatch andthe network won’t solve your prob-lem.
34 C lRC UlT C ELLA R INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 33/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 34/76
PACKAGED DATA
An RS-232 link between two CPUsallows no question about who is send-ing data to whom: there is one senderand one receiver. With an RS-485 net-work, however, all receivers “hear”every message sent on the network.
The messages must include someaddress information to specify whichnode should act on the data.
Each message should also includethe address of the node sending themessage, so the receiver can tell wherethe data originated. In some cases thiswill make no difference, as with anLCD panel that simply displays what-ever text comes along, but some nodesmust know who sent the message tomake sense of the contents.
Each message must include someindication of when it’s complete. Thiscan be accomplished with a uniqueterminating character or a lengthcount. A terminating character isuseful only if that value cannot occurin the data, but most networks carrybinary data which can include allpossible byte values. Including thelength of the message is unambiguousand requires very little overhead, so it
is the most common method.Because different nodes send dif-ferent types of data, the message mustinclude an indication of what the restof the data “looks like.” This codedistinguishesBASICsourcecodestate-ments, binary sensor values, lines ofASCII text, and so forth. The receivingsoftware will treat these messagesdifferently; recall what happens whenyou display binary data on your PC’sscreen for an example of what hap-
pens when a program processes inap-propriate data.Because these “overhead” codes
are required regardless of the actualmessage data, it makes sense to gatherthem into a header that precedes thedata. The combination of header anddata bytes is sent and received as aunit by the network firmware, but theapplication programs are responsiblefor creating and consuming the databytes.
Figure 4 shows the header formessages sent over the INKnet RS-485network. Thesebytesprovideenough
The first 10 bytes of each message are reserved for use bythe network control software. These bytes are:
The length byte indicates the total number of bytes in themessage. The minimum value is 10 decimal, which willoccur when the message has no additional data bytes.
The checksum is the negative sum of the other bytes
treated in pairs as16-bit quantities: even numbered bytesare high-order, odd numbered bytes are low-order.
Figure I-INKne t me ssag e head er
Node 1 - LMMMM ~ LMMMM
Node 2 LllhlMM M - LMJ J LLLMMMM
Node 3 LMJJ LUMMMM _L =Usten for net activityM = Message transmission
J = J am dnnal after collision
Figure &C SMA / C D netw ork ac t iv ity
information to route the message, en-sure that there are no transmissionerrors, and keep all nodes informedabout the net firmware’s status. I willexplain more about the header in thenext article, but the key point for nowisthattheshortestnetworkmessageisten bytes of header with no data bytes.
The header information requiresnetwork bandwidth, of course. Con-tinuing the example from above, theheader requires 2% (10/500) of the
bandwidth for each message per sec-ond. If the messages contain no addi-tional data, a 5000-bps network can
handle up to 50 ten-byte messages persecond.Because the network bandwidth
is fixed by the serial port data rate, thenetwork can handle fewer messagesas they become longer. A line of BASICcode may contain 20 characters, so thecomplete message has 30 bytes andwill occupy 6% of the bandwidth persecond. This implies that the net canhandle about 17 such messages eachsecond, regardless of their source.
Longer messages use the networkbandwidth more efficiently becausethe ratio of header bytes to message
36 ClRCUlT CK!AR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 35/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 36/76
THE INTERCHANGE”Bi-directional DataMigration Facilityfor IBM PS/2, AT, PC, PORTABLEand Compatibles _
Features:*Parallel port to parallel port.*Economical method of file transfer.*Bi-Directional file transfer easilyachieved.
*Supports all PS/2 systems(Models 30, 50, 60, and 80).
*Supports IBM PC, XT, AT, Portableand 100% compatibles.
*Supports 3 I/2 inch and 5 l/4 inch disktransfers.
*Supports hard disk transfers.*Supports RAMdisk file transfers.*The SMT 3 Year Warranty.
ONLY $39.95
FastTrap’”The pointing device of the future iaiere!
*Two and threeaxia pointing capability.
*High resolutiontrackball for X and Y axir input.
‘High resolution flngerwheel for 2 axisinput.
*Use with IBM@PC’s, XT’s, AT’s andcompatibles.
*Three input buttons.*Full hardware emulation of Microsoft @
Mouse.*Standard RS-232 serial interface.*Includes graphics drivers and menugenerator.
*Easy installation.“1 year warranty.*Made in U.S.A.
ONLY $149.00
LTS/C Corp.167 North Limestone StreetLexington, Kentucky 40507Tel: (606) 233-4156
C)rders (800) 872-7279Data (606)252-8968 [S/12/2400 8-N-11VISA, Mastercard, Discover Card,TeleCheck
Circle No. 134 on Reader Service Card
38 C lRCUlT CEL!AR NK
Inherent in the collision detectionstrategy of a CSMA/CD network is a
performance decrease as the number of messages increases. A simplethought experiment illustrates the
problem.Assume that the nodes use 75% of
the bandwidth for messages. A node
thus has a 75% chance of detecting amessage in progress when it wants tosend; it can start transmitting only25% of the time. Under these condi-tions, several nodes will begin listen-ing to the network during each mes-sage. The odds of a collision immedi-ately after that message are quite high because all listening nodes start trans-mitting at once; all those nodes mustdelay and retry later.
The collisions and jams occupynetwork bandwid th, so as the number of collisions increases, the bandwidthavailable for messages decreases.Under extremely heavy loading, aCSMA/CD network can degenerateto a brawl allowing no useful datatransmission at all.
In the simplest example, there isno way to ensure that a node will everget a chance to send its message. Itcould collide every time it starts to
transmit and lose every random back-off. This problem only crops up under heavy loading, but that is preciselythe time when a controller will at-tempt to send a critical error messagesthat absolutely must get through!
In any event, the key conclusion isthat CSMA/CD does not use network
bandwidth particularly well under heavy loading conditions. Unfortu-nately an RS-485 network will almostalways be heavily loaded because the
total bandwidth is limited to standardserial data rates. As we saw above, 1730-byte messages were enough to fill a5000-bps network to capacity withoutworrying about contention for net-work access, the resulting collisions,and the inherent loss of capacity.
But if CSMA/CDisn’t theanswer, perhaps we must rephrase the ques-tion:
WHO’S ON NEXT?
Another method of avoiding col-lisions is to allow a node to transmit
only when it receives a message fromanother node containing explicit per-mission. This type of control is called“token passing” because the nodemust have a “token” before beinggranted admission to the network.Unlike the New York City subways,there is only one token available, so
only one node may transmit at anytime.
Contrary to popular belief, a“token passing” network is not syn-onymous with a “token ring” network.A “ring” network arranges the nodesin a circular daisy chain with the lastnode connected to the first. Each nodetransmits to the next node in the chainand listens to thepreviousnode. WhileI won’t describe ring networks anyfurther, it is worth noting that the ringdepends on all the nodes; one deadnode disables the entire network.
Al though token-passing networkseliminate collisions, they use band-width to transfer the token from onenode to the next. There are basicallytwo ways to control the token: bydecentralized control distributedamong all the nodes, or from a central-ized network master node.
Decentralized control simply
means that the node holding the tokendecides where to send it next. A simplealgorithm might send it to the nexthighest numbered node; the last node(the one with the highest node num-
ber) sends it to the first node, and soon. More complex algorithms wouldtakeintoaccountnodepriorities,usage
patterns, and so forth.The most significant problem with
decentralized control occurs when thetoken disappears during a node fail-
ure or a noise burst. Because none of the remaining nodes have permissionto transmit, recovery requires decid-ing which of the remaining nodesshould create a new token and restartthe network.
Centralized control implies that asingle master node is responsible for shepherding the token among theactive nodes. Although it may seemthat the node with the token must re-turn it to the master, an easier method
is to restrict the active node to a singlemessage (or a few messages) after receiving the token. The token “dis-
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 37/76
appears” after the node transmits itsmessage and the master creates a newone to give the next node permissionto transmit.
The advantage of this method isthat the master node can maintain atable of active nodes and decide howto schedule future token activity. The
disadvantage, of course, is that if themaster node fails the network willstop running.
Figure 6 shows the traffic for anetwork using centralized control.Notice that Node 3 does not respondto the token, so the master sends a newtoken to Node 1 immediately after itdetermines Node 3 is inactive or miss-ing.
These token-passing schemes do
not match the familiar IEEE and IBMToken Ring network protocols. Thereason is simple: Token Ring nodesrequire a full-length PC card with aseparate processor, several VLSI net-work control chips, and a goodly dol-lop of RAM to manage the interfaceindependently of the host PC. Whilethis provides a high-level interfaceanda high-speed network, it is not rele-vant for simpler controller network-ing problems.
PACKET PERFORMANCE
Although network bandwidthdetermines the theoretical upper limitfor data transfer, the actual limit isoften imposed by the nodes. You maybe surprised to find out how littleinformation your programs canhandle!
For example, suppose that an8052-BASIC board is receiving 250-
byte messages and storing them forlater use. Moving data from one partof external memory to another is notone of the 8052’s strong points, eventhough it runs at about 1 MIPS, so thenode cannot accept another packet forabout 4 milliseconds.
Application processing may beeven slower. While the BASIC-52language is well suited for controllerapplications, it executes only about
1000 statements per second. If yourapplication requires 100 instructionsto process a message, it can handleabout 10 messages each second.
The secret to effective networkuse is to reduce the amount of infor-mation by processing it within theoriginating node. If a node is collect-ing data, report only the minimumand maximum values every minuteinstead of sending a torrent of rawdata. Rather than sending a statusmessage ten times a second, send itonly when a change occurs.
Further, your program must re-spond quickly to incoming messages,because the network cannot deliveranother message until your codehandles the previous one. You canimagine the throughput effect of a lO-second delay loop embedded in yourcode.. .
NETWORKING FUTURES
Nowthatthebackgroundisoutofthe way, the next article will describeINKnet itself. INKnet is an RS-485network running at 19,200 bps, de-signed to handle the normal commu-nications load of small control sys-tems using 8052 controllers. A com-panion program for IBM ATs pro-
vides BASIC consoles, supports filetransfers, and displays network de-bugging information.
INKnet uses the centralized con-trol model described above, so a singlenode is designated the “net master”and handles all of the token logic. Thefirmware handles all of the networkfunctions, so you can run a normaldata collection program on that node;the net does not require a dedicatednode for network control. +
Downloadable files for INKnet will beavailable on the Circuit Cellar BBSwhen the next article appears.
Ed Nisley is a member of the Circuit Cellar INK engineering staff and enjoys making
gizmos do strange and wonderous things. Heis, by turns, a beekeeper, bicyclist, RegisteredProfessional Engineer, and amateur racon-teur.
IRS210 Very Useful2 I 1 Moderately Useful212 Not Useful
Heathkit A leader in quality electronics for thetechnically sophisticated customer.
When you need kit or assembledelectronic products for work, home or hobby, you can be sure Heathkit products
E
PrecisionTest
are designed to perform reliably and Instruments
effectively...year after year.See what we have to offer. To get your
FREE Heathkit Cataloa, fill out and mailthe coupon below or callicll-freetoday!
I-800-44-HEATH(l-800-444-3284)
-----------$ ‘ES ! :%~~z~~&~~~ ‘Opy
I Send To: Heath Company, Dept. 026-774Benton Harbor, Michigan 49022
I Home Entertainment
I Products
Name i
I
Skill
and Trainers
I-
Circle No. 126 on Reader Service Card
Aug ust /Sep temb er I989 39
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 38/76
CEBus: A New Standard inHome Automation by Ken Davidson
The First In-Dep th Te c hn ic a l De sc rip t io n
Wenever the media orpopular press write about home con-trol, the story always reads the same.“John is awakened at 630 A . M . to thesound of a pleasant voice remindinghim of the day’s events. The coffeehas started brewing and the heat isbeing turned up in the rest of thehouse. After a leisurely breakfast,
Johnleavesfor theofficeand thehomeautomatically arms the security sys-tem.. .”
Then the article goes on to extolthe wonders of home control, that itwill be the panacea for stoves left on,groping in the dark for light switches,and high heating bills, without eversaying anything useful about what’savailable or how it works.
Little has actually appeared in thehome control arena to make the life ofthe typical homeowner easier. True,numerous stand-alone devices haveshown up to control isolated aspectsof home life, and there have alwaysbeen the custom installations done forthe rich and esoteric that make thehouse resemble the starship Enter-prise, but nothing has appeared geared
to the masses for affordable whole-house control. What’s needed is astandard to unify all the appliances,consumer electronics, and securitydevicesin the house so they can talk toone another economically.
The EIA (Electronic IndustriesAssociation) has taken the lead withthe development of CEBus, the Con-sumer Electronics Bus. With a com-mittee made up of such major playersas Sony, Philips, Panasonic, General
Instrument, AT&T, Texas Instru-ments, Mitsubishi, RCA, and JohnsonControls, a standard has been devel-
oped to allow all home appliances tocommunicate over various media.
Even though this article containstechnical details of CEBus that, up tonow, have been available only tocommittee members and individualsclosely tied to the development of thestandard, one bit of warningisin orderto those who think the informationhere is the final word: The CEBusspecification is still under develop-ment and hasn’t been formally re-leased. While, at the time of this writ-ing, EIA plans to formally release thespecification in November, they arestill free to make changes up to thattime. The information in this articlewill help you become familiar withthe details of CEBus, but shouldn’t beused as the basis of designs.
buzz phrase of the
eighties. There’s
been a lot of hype
promising HAL-like
CEBUS
In 1984, EIA formed the CEBuscommittee to develop a standard tofacilitate communications betweenvarioushomeautomationdevicesandappliances. They started out working
on unifying infrared hand-heldcon-
trollersinaneffort to reduce the jungleof remotes found in many entertain-ment rooms, but quickly discoveredthat it made sense to extend the stan-dard to whole-house communicationsover assorted media.
At the time, General Electric wasdeveloping their HomeNet system toallow power line communication inthe home. (HomeNet is different fromGE’s X-lO-based HomeMinder.) The
committee used the protocols devel-oped for HomeNet as the basis fortheir early standards work.
computers taking
control of every as-pect of our home
life, from wake-up
to bedtime, making
our life just a little .
“Home Autom
tion” has been
.
less traumat
40 C/KU/T CELLAR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 39/76
According to EIA documents, thecommittee had five primary goals forCEBus: It would be retrofittable, usedistributed intelligence (have no cen-tral computer in order to operate), benon-product specific, have an openarchitecture, and be expandable. Asyou’ll see from the details that follow,they’ve beenable to achieve these goalsquite adequately.
CEBus isn’t actually a bus, but anetwork specification. It follows theISO/OSI seven-layer network model,which defines the physical, data link,network, transport, session, presenta-tion, and application layers (Figure 1) .
Each layer is responsible for one as-pect of network communication, witheach layer only able to talk to the
layersdirectlyaboveandbelowit. Forexample, the physical layer is onlyconcerned with getting bits from onenode to another, without regard forwhat the bits mean or even whetherthey make it from one node to the nexterror free (error detection and correc-tion are handled by the data link layer,which is one level higher).
By breaking the model into well-defined pieces, implementation andsupport are greatly simplified. It’s
also possible for one company toimplement specific layers, with an-othercompanyimplementingtherest.The two implementations talk to eachother through a well-defined bound-ary that exists between the layers.
PHYSICAL LAYER
At the lowest level is the physicallayer. This is where CEBus’s greateststrengths lie since several differentmedia are defined in the specification,with the choice of which medium touse up to the appliance designer. Allthe layers above the physical layer areidentical regardless of medium, so thenetwork is medium independent.
Signaling is done on most of themedia by switching between a “supe-rior” state and an “inferior” state.Times between changes determine theinformation being conveyed. “One”
bits last one “Unit Symbol Time”WST), “zero” bits last two USTs, end-of-field markers last three USTs, andend-of-packet markerslast four USTs.
Aug ust /Sep temb er 7989 4 1
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 40/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 41/76
indicate a transition from superior toinferior and from inferior to superior.By using just short pulses, the hand-held remote’s battery life is extended.
RFBus
Currently used predominantly inthe security industry, RF is anothermedium that would work well in retro-fits. FCCregulationslimitthestrengthof RF transmissions, so whole-housecoverage may be possible withoutinterfering with the neighbors’ CEBusappliances, Environmental interfer-ence and limited range could hamperthe usefulness of the medium.
Little has been published regard-ing the technical aspects of RFBus, so
there is little to tell here. Presumably,the details will be worked out by thetime the specification is formally re-leased, though EIA may opt to delayformalizing the RFBus portion.
TPBus
TPBus promises to be the mostuseful high-speed medium in themajority of installations. While mosthouses don’t have an abundance of
spare twisted-pair wire runningroomto room, some may have extra tele-phonepairsthatcouldbeusedinretro-fits. Twisted pair is cheap enough thatmany home builders may opt to in-stall it from room to room along withthe AC and telephone wiring at thetime of construction.
TPBus runs at a data rate of 10,000one bits per second and uses a +125-mV peak-to-peak signal. While such asmall signal amplitude may seemprone to picking up noise, the com-mittee was concerned about prevent-ing noise from being radiated ontoaudio lines that may be run next to thecontrol lines. Similar to SRBus, TPBususes 50-ps pulses to indicate transi-tions from superior to inferior andvice versa. Pulses alternate betweengoing from ground to +125 mV andfrom ground to -125 mV.
CXBus
With the spread of cable TV, manyexisting homes and more and more
newly constructed homes are beingwired with coax cable for televisiondistribution. Since, within thecontextof the house, the TV signal isn’t usingtheentirebandwidthofthecable, thereis plenty of room for adding controlinformation plus high-quality audioand video to the same cable.
CXBus consists of a pair of coaxcables, one for upstream feeds andone for downstream feeds. Thedown-stream signal is used to feed the in-puts of devices and uses active taps toextract the signal. The outputs fromdevicesare passively combined on theupstream line. The upstream signalfeeds into CXBus node 0, where it iscombined with any incoming cableTV or off-air signals and is used to
drive the downstream line. Node 0also contains a CX/TP bridge.
The frequency allocation forCXBus is shown in Figure 2. Thespecification will eventually haveprovisions tomodulatein-house videosignals onto unused TV channels forreception by TVs on the downstreamside. UHF channels 62-69 will proba-bly be used for this purpose.
CXBus uses the same pulse-widthmodulationused by PLBus, but witha
UST of 100 ps, providing a data rate of10,000 one bits per second.
FOBus
Fiber optics are becoming themedium of choice where high datatransmission rates and low noisepickup are important. While someprovisions have been made for thismedium in the CEBus protocol defini-
tions, very little work has beendone
CXBus Upstream Frequencies
O-O.2 MHz Control Channel5-47 MHz Analog Data54-88 MHz In-House-Generated
Video
CXBus Downstream Frequencies
O-O.2 MHz Power 5-47 MHz Analog Data54-88 MHz In-House-Generated
Video88-100 MHz FM108-216 MHz Off Air
igure 2-CX&~smixesconfro/, ana log, and video on the sam e ca ble.
CONTROL!The Gencor Control Package is acomputer package that enablesyour computer to control anyX-l 0 module using a PL513Power Line Interface Moduleconnected to your printer port.
Features:l Runs as standalone or
background TSR fullycompatible with all major
software packages.
l Control up to 48 moduleswith 12 events per modulewith the standard configura-tion. Larger configurationsavailable upon request.
l Automatic or manuallyactivated events include:- Module on- Module off - Dim module- Brighten module- All units off - All units on- All lights off - All lights on- All appliances off - All appliances on
* Pop up screens include:
- Schedule screen- System message screen- System status screen- Context sensitive help- Context sensitive errors
l Printer logging of all events.
’ Easy installation -automatically configures
itself for the specificmachine upon execution.
* Use with XT’s, AT’s and 386’s
running DOS 3.0 or greater.
Dealer Inquiries Welcome.Call Today!
b
GeneonSoftware
P.O. Box 2635
Sarnia, Ontario, CanadaN7T 7VB
[519] 542-8863
Circle No. 123 on Reader Service Card
A u g u st / Se p t e m b e r 1 9 8 9 4 3
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 42/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 43/76
possible to have several independentnetworks using the same media byassigning different house codes todifferent groups of devices. It’s alsouseful for avoiding conflicts withneighbors (especially in the context ofPLBus and RFBus).
Both destination and source ad-dresses are sent so the receiving node
7,6,5,4,3,2,1,0
1 St?N 1 Priv 1 Priority 1 Packet Type
Service Class0 Basic Service1 Extended Service
Priviledge0 Nonprivileged LPDU1 Priviledged LPDU
Priority
00 Deferred01 Low10 High
Packet Type000 Local Data Unacknowledged001 Local Data Acknowledged010 Acknowledge Response011100
Nonlocal Data UnacknowledgedNonlocal Data Acknowledged
101 Failure Response
Figure J --The LPDU describes several low-level character ist ics of the packet.
knows the sender’s address. For ex-
ample, there may be several TVs anda single VCR connected to the sameCXBus. One of the TVs may send arequest to a VCR to start playing atape, but the VCR must first send acommand back to the TV to change tochannel 4. Knowing the address of theTV which sent the play command, it’spossible for the VCR to tell the correctTV to change channel.
After the packet addressing is thepacket information. The information
comes from the higher network levelsand will be discussed in more detail ina moment.
The final field contains the FrameCheck Sequence. It is simply an 8-bitchecksum of all the bits in the packetexcluding the preamble.
NETWORK LAYER
The network layer is responsiblefor determining which media are toreceive the packet and for breakingapart packets which would end upbeing larger than the 32-byte limit.
The Network Protocol Data Unit(NPDU) is added to the front of theinformation field passed down by theupper levels and is shown in Figure 4.There are six bit fields which deter-mine which media are to receive thepacket. Setting a bit in the field results
in the corresponding medium receiv-ing the packet (assuming the properbridge is present to transfer packetsacrossmedia). Thelast two bitsdeter-mine whether the packet is to be sentusing flood routing, directory rout-ing, or directory routing with a re-quest for a return ID, and whether it isbeing segmented.
In flood routing, the packet is sentto every medium specified in the rest
7,6,5,4,3,2,1,0
Type RF SR FO CX TP PL
NPDU Type11 Flood Routing, Unsegmented10 Directory Routing, Unsegmented01 Direectory Routing, Return ID,
Unsegmented00 Segemented Variable Header
Figure 4-The NPDLJ determines which me-d ia are to rec eive cop ies of the pa ck et.
of the field. In directory routing, the
packet is only sent to the mediumwhich hosts the destination node. Forexample, if a packet is specified forcoax, power line, and twisted pair,and is to be sent to node 3, the packetwill only be sent to the PLBus if direc-tory routing is used and node 3 isconnected to thePLBus. Suchaschemerelies on the presence of routing tablesin the bridges. Should directoryrout-ing be requested, but a bridge nothaveanentryfor thedestinationnode,
the bridge will change the packet torequest that an ID be sent by the des-tination node. Upon receipt, the des-tination node sends out an ID so thatbridgescan update their routing tablesfor future reference.
TRANSPORT, SESSION, and PRESEN-
TATION LAYERS
Since theOS1 seven-layer network
model was designed to be useful in just about any application, there isbound to be some fat that can betrimmed while implementing appli-
cations that don’t require all the facili-ties or segmentation defined in themodel. Such is the case in the defini-tion of CEBus. The functions of thetransport, session, and presentationlayers as defined in the OS1 model arehandled by the application, network,
and data link layers in the CEBusdefinition. This doesn’t mean that theOS1 model isn’t being followed or thatcorners are being cut; there are merelycertain facilities found in larger net-works that just don’t exist in a simplecontrol network.
APPLICATION LAYER
The highest level is the applica-tion layer and is responsible for what
the end user ultimately sees. In thecase of CEBus, the highest level de-fined isn’t what the end user will see(because, in many cases,operation willbe transparent or part of a device’sexisting functionality), but what theprogrammer sees. EIA has definedCAL, Common Application Lan-guage, to allow devices to communi-cate intelligently with each other.
Before getting into CAL, though,there is a header similar to those found
in the lower layers that is added to thefront of the CAL command beforebeing passed along called the Appli-cation Protocol Data Unit (APDU).The APDU may be up to 3,810 byteslong, but only the first two bytes havebeen defined at present (Figure 5).The first byte contains the mode infor-mation and type identifier. The modespecifies the service class, header type,and data filed length for the commandwhich follows. The service class maybe either basic or privileged, thoughmost commands in use at this time arebasic. The header may be either fixedor variable in length, with fixed-lengthheaders being the norm. Finally, thecommand length may be either short(up to 32 bytes), long (up to 3,808bytes), or huge (up to 1,638,375 bytes).
The type identifier determineswhether command is implicit or ex-plicit, and defines the response codes
for an explicit the command. Animplicit command doesn’t require aresponse, so is simpler to programand faster to send, but is subject to
Aug ust / Sep tem b e r 1989 45
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 44/76
Call forManuscripts
C IRCUIT CELLAR INK is looking
for quality manuscripts on
software for embedded
control, software applica-
t ions, advanced algo-
rithms, software method-
ology, and tutorials
tools and techniques
developing software.
on
for
These manuscripts will beconsidered for publication
in C IRCUIT C ELLAR INK, TH E
COMPUTER APPLICATIONS J OUR
NAL, and in a planned se-
ries of books to be pub-
lished by Circuit Cellar INK.
C IRC UIT C ELLAR INK offers
writers and engineers a
technically sophisticated
audience and profes-
sional editorial guidance.
The C IRCUIT C ELLAR INK Au-
thor’s Guide is available
for downloading from the
C irc uit Ce lla r BBS. Pro-
spect ive authors may
send mail to ‘Curt Fran-klin’ on the C ircuit Cellar
BBS, or send proposals for
manuscripts and requests
for Author’s Guides to:
Curtis Franklin, Jr.Editor in Chief
Circuit Cellar INK 4 Park Street
Vernon, CT 06066
7 ,6,5,4,3 ,2,1 ,O
Mode Type Identifier
7 ,6,5,4,3 ,2,1 ,O
Cper ClaSS Command Reference
ModeOooBasic service, Fixed header, Short data001 Priviledged servic+. fixed header, Short data
010 Basic service, Vanable header, Long data011 Priviledged service, Variable header, Long data100Basic service, Vanableheader, Huge data
Type ID01011 Explicit Association Invoke01100 Reject01101 Error 01110 Result01111 Implicit Association Invoke
Operation0 Asynchronous Transmission1 Synchronous Transmission
Class00 No response requested01 Error or Rejected requested
10 Result requested11 Result, Error, or Reject requested
Command FiefUser-definable codes (except 00000)
ig u re5 -7he APDUisused toc on ve ye r ro r
in form a t ion a s we l l a s typ e o f serv ic e a nd
c ommun i c a t i o n .
errors since thedestinationnodenevergives a response. An explicit com-mand requires a response from thedestination node, with the responseeither a result, reject, or error code.
The second byte in the APDUdetermines whether transmission willbe synchronous or asynchronous, andwhat kind of response isdesired in thecase of an explicit command.
CAL is made up of three sections,with each section more precisely de-finingjust what thefinalactionshouldbe. The first section is the context anddefines general categories for devices.For example, there are categories al-
ready defined for an audio process(amplifiers, loudspeakers, equalizers,etc.), video monitor, communicationcontrol system (telephone, radio, etc.),time service element (real-time clock,timer start and stop times, etc.), envi-ronment management system, light-ing system, and the list goes on.
The second section is the SpecificApplication Service Element,or SASE.The SASE defines the primary func-tion of the command sequence. Each
context has a list of SASEs defined,and are often similar or identical acrossdifferentcontexts. ExamplesofSASEsfor, say, an audio process are primary
mode switch (power), source switch(radio, CD, or tape), feature switch(noise reduction, surround sound),and level controls (volume, bass,treble, balance).
Finally the Common ApplicationService Element (CASE) defines justwhatthefinalactionshouldbe. CASES
are thesameforallcontextsandSASEs.Example CASES include true, false,add, subtract, and load.
Using the context, SASE, andCASE, it’s possible to create commandsto do just about any function you canthink of. EIA has tables of predefinedcontexts, SASEs, and CASES, so mostof the time it’s just necessary to lookup a command in the table and use it.Manufacturers who want to add
commands can follow the rules forCAL and develop new commands.Escape codes have been put in place toallow unlimited extension of CALcommands should the main tables everfill up. EIA presumably will haveultimate control over the tables andthe commands that go in them. Possi-bilities exist for manufacturers to im-plement proprietary command se-quences, but it’s unlikely such a prod-uct would win any sort of officialCEBus-compatible approval.
Figure 6 shows a sample of whathas been defined for CAL so far. As an
example, suppose you want to turn aTV on. The context would be 38 hex toselect a video monitor, theSASE wouldbe DO hex for primary switch, and theCASE would be 81 hex for true, or on.The final command would be 38H,DOH, 81H.
HARDWARE
Even though the CEBus specifica-tion isn’t slated for formal release untilNovember, several companies sittingon the committee have started workonhardwareforimplementingCEBusfunctions on single chips to makemanufacturers’ jobs easier when add-ing CEBus support to their products.
CyberLYNX Computer Products,working with Texas Instruments, is
developing a single-chip CEBus inter-face that will handle all the details ofCEBus communications. Though thechip is still in its early stages, Cyber-
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 45/76
3) Context Hex Value
Audio Process 30
Video Monitor 38
Tuning System 40
Appliance Control System 60
Environment Sensors 69
Security System 74
Lighting System 78
Examples
Amplifiers, equalizers,noise reduction, etc.
TV sets and computer monitors
Radio, TV, VCR, cable box, etc.
Dishwashers, washing machines, etc.
Temperature, humidity, pressure, etc.
Sensors, alarms, etc.
Lights of all kinds
3) SASE Hex Value Description
Primary Mode Switch DO Main functions such as power
Source Switch Dl Input selection
Z) CASE Hex Value
ADD 86
NOT 93
TRUE 81
Description
Add values together
Toggle item
Turn item on
Figure 6-Examples of contexts (al, SASEs (bl. and CASE S (13 show the potential CA L ho lds for assembling comprehensive commands.
LYNX has a CEBus evaluation board tually shipping early versions of their
that implements many of the CEBus chip on evaluation boards (Figure 8)functions in firmware. It also includes alongwithsomenice-lookingsoftwarea power l ineinterface so sev-eral boards cancommunicate. A
block diagram isin Figure 7.
Thefunction-ality of the firm-w a r e o n theevaluation board
is on the primi-tive side, and thedocumentationissparse, but the
board allows adeveloper to tryout CEBus withminimal effort.
Also work-ing on a single-ChipCEBusinter-face is AISI Re-
and documentation. The AISI CEBusimplementation is dubbed SPIRIT andtakes the idea of CEBus control onestep further than most would peoplewould think. Rather than provide achip that only handles low-level net-work details (similar to the way the
NCR5380 provides a low-level inter-face to SCSI), the SPIRIT chip actuallycontains some intelligence and iscapable of being trained and can oper-ate stand-alone without additional
processor power.TheSPIRIT chip has eight discrete
inputs, eight outputs, microprocessor control lines, and the requisite CEBusinput and output connections. Eventhough development of the actual 40-
pin chip hasn’t been completed, AISI
has developed an intermediate 18-pincustom chip that handles all the net-work timing and has put it on a small
board with a processor and a 40-pinheader that emulates the final 40-pinchip. They have put this emulator
board on top of one of their power linemodem boards to create a development kit that provides hardware func-tionality identical to what will beavail-able when the final 40-pin chip is fin-ished.
In its simplest configuraGon, thechip is capable of monitoring network
communicationsand changingoutputbitsbasedupon receivedcommands, andmonitoring input
bits and sendingout commands
based on thoseinputs. The chip
contains severalhundred bytes of EEPROM and istrained beforehand with whichCAL commandsto watch for,what outputs tochange upon re-ceipt of thosecommands, whatinputs to watch
search Corp. AtPhoto l-C/o&wise from the low er righ t
fo;, and whatthis time, they appear to have a jump a re A ISl’s po we r line c om pute r interfac e, commands to send out in response toon CyberLYNX/TI since they are ac- CE200 mo du le , and CyberLYNX’s SEMZQO. those inputs. Once trained, the chip
A u g u st / Se p t em b e r 1 98 9 4 7
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 46/76
Figure 7-The CyberLVNXSEM200 imp lem ents a l l CEBus funct ions n i rmwale rather than
ha rdwa re . As a resu lt , func t iona l upda tes ma y be ma de qu i c k l y and ea si ly a s the CEBus
spe c i fica t ion is fine-tuned .
plus any interface circuitry will oper- off when the light goes off. It’s pos-ate stand-alone. For example, you can sible to train the chip so that it verifiestrain the chip to turn an output bit on that the light goes on when it’s sup-upon receipt of a “Light On” com- posed to and similarly goes off whenmand and turn the bit off upon receipt it’s supposed to and sends out either aof a “Light Off” command. Addition- confirmationoranerrormessage. Putally, you might add some interface the chip and interface circuitry into acircuitry so that an input bit goes on small module and it will operate with-whenever the light is on and that goes out any additional smarts.
,
A rugged CABEGE CASE? lined withplenty ot foam for your equipment can
TAKE A LOAD OFF YOUR MINDwhen you’ve got to travel.
TAKE A LOAD OFF YOUR BACKwith our exclusive tilt-wheels
and extension handle option.
UNLOAD ON US!Call or write to tell us about your
shipping or carrying problems
WE HAVE SOLUTIONS!CABBAGE CASES, INC.1166-C STEELWOOD ROADCOLUMBUS, OHIO 43212-1356(614) 486-2495 (600) 686-2495
Circle No. 107 on Reader Service Car’
ClRCUlT CELLAR INK
In cases where additional proces-sor power is necessary, the chip canalso be connected serially, or right tothe microprocessor’s data bus. Thechip’s hardware has been designed toallow numerous modes of operationdepending on how it is hooked up.
Preliminary software to allowtraining of the chip is fully menudriven. AISI’s current developmentkit contains two stand-alone moduleswith PLBus interface and one moduleforconnectinganIBMPCtothepowerline. DIP switches set each module’snode address and all training is donewith the IBM PC through the powerline (no direct connection is ever madebetween computer and modules). Atest mode allows the operator to send
commands to each module and dis-plays responses so training may bechecked out.
Since the CyberLYNX and AISIevaluation boards purport to be validCEBusimplementationandbothhavepower line interfaces, the natural nextstep was to connect them both to thepower line to see if they would talk toeach other. The CyberLYNX board
Still BlastinROMs?Develop and testROM code in minuteswithout leaving your keyboard -with the GE1 ROMemulator.
‘dais format5 ---A
Ask us about faster (than 150x)ROMemulators and custom cables for most non-27xxx ROM sizes.
aimmmar EliI Grammar Engine, Inc
Lng-3314 Morse Road
ImColumbus, Ohio 43231614/471-1113
“,?a, an* Maslercud Accepted In Pacific and Mountain timezones:
Circle No. 124 on Reader Service Card48
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 47/76
klgure (I-AISrs SPIN// interfac e c onsists of a c ustom c hip for CEBus timing with amicrocon-troller to supervise. All the CEBusinterface circuitry wi l l eventually be c ontainedin a single40-p in ch ip .
an excellent means for someone to getfamiliar with CEBus in preparationfor final releases.
RETROFITOR NEW CONSTRUCTION?
A question often raised whendealing with home control issues iswhether the specification is designed
has a mode in which it will monitorthe power line and report back statis-tics such as number of valid packets,partial packets, bad packets, packetsmeant for other nodes, and so on, thatis has received. It will also count thenumber of fragments it receives.Putting it into this monitor mode anddoing some activity between the AISImodules should result in the count ofvalid packets received by the Cyber-
LYNX board to go up. However, theonly count to ever change was thenumber of fragments received, whichindicated that the CyberLYNX boardsaw the activity, but couldn’t inter-pret it as valid CEBus code; it onlypicked up bits and pieces.
Now before you condemn eithercompany, realize that such problemsaren’t really a bad thing. The CEBusspecification is still in its infancy and
the evaluation boards may well bebased on different, and slightly in-compatible, stages of development.Both boards are identical at the upperlevels of the network model, which iswhere most, if not all, developers areconcerned. Andsinceeachcompany’sboards work with other boards fromthe same company, that should besufficient for early development work.As the CEBus specification is refinedand finalized, the low-level details of
the two companies’ boards shouldbecome better aligned and completecompatibility should fall into place.For the moment, both boards provide
for use in retrofitting existing housesor is meant for new construction only.Retrofitting existing houses is by farthe largest market for such devicesand certainly can’t be ignored. In-deed, the success of the X-10 systemhas been its perfect match to retrofit
applications since no new wiring mustbe installed.
When defining CEBus, the retro-fit market certainly hasn’t been ig-nored. Since no wires are needed forSRBus and RFBus, both lend them-selves to easy inclusion in any retrofitproject. And since just about any housecontainsAC wiring,PLBus will proba-bly be the most popular medium forretrofits. EIA does recommend theinstallation of a bridging capacitorbetween the two 1lOV legs found inmost houses to allow house-widetransmission, but people have beendoing that for years in X-10 installa-tions.
While some houses may haveextra telephone wire or coax (for cableTV) in place, TPBus and CXBus instal-lations are best done in new construc-tion. Obviously, the other media may
TM
The DA/MA Low Cost Data Acquisition System
l 8-A/D Channels, 8-Digital I/O Channels, l-Counter/Timer.
l Runs on 12 to 24 VDC.
l 15 Systems or 255 points per RS232/RS485 CommunicationsPort.
l Connect to Sensors that output 0-4.59V, 0-5V, 0-1OV or 4-20Maor add optional onboard amplifiers for lower signal levels.
DA/M 100-O
DA/M 100-l
DA/M 100-2
DA/M 100-3
DA/M 100-5
DA/M 100-7
DA/M 100-8
DA/M 100-9
DA/M System
RS232-RS485 Converter Cable
ROM/RAM Piggy Back Card
RS232-RS485 Converter Unit
Screw Terminal Prototype Card
Isolator/Relay Card
Opto-22 Interface Card
RAM/ROM/Real Time Clock Card
$200.00$20.00$50.00
$100. 00
$100. 00
$160. 00
$140. 00
$180. 00
Circle No. 118 on Reader Service Card
Aug ust /Sep tem be r 1989 19
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 48/76
CEBus and X- 10: Harmony or Discord?
Since its introduction in the late seventies, the X-10 power line control system has become the de facto standardin carriercurrent communications. All successful home
control systems marketed in the last few years have hadsome degree of X-10 compatibility. Sears, Radio Shack, andLeviton have been selling X-lO-compatible products for quite a while, and Heath and Stanley have recently jumpedon the wagon. Now that CEBus has come along with amethod of communicating over the same power line, wheredoes X-10 fit in?
Bluntly stated, CEBus’s PLBus and X-10 are completelyincompatiblesystemsand actuallyinterferewitheachother’soperation. Future home control systems will have to choose
between the two methods if reliable, consistent operation isdesired. The incompatibilities arise from differences in both physical and functional operation.
X-10 relies heavily on the zero crossings of the 60-I% AC
power signal. At each zero crossing, a bit is transmitted, with a burst of 120~kHz denoting a one bit and the lack of a burst denot-
ing a zero bit. While there are 120 zero crossings per second, theX-10 protocol states that each bit shall be sent twice for error checking purposes, with the second copy a complemented ver-sion of the original, so the effective bit rate is 60 bits per second.
CEBus uses a stream of bits that have no relation to the 60-
Hz AC signal, and will actually work without AC present (unlessthe device trying to send the message is relying on that same ACfor its power), with a maxImum bit rate of 1000 one bits per second. The issue of interfering with oneanother arises from thefact that bothX-10 and CEBususebursts of 120 kHz for signaling.Sincedevicescompatiblewithoneortheotheraresensitiveto120kHz, transmissions by one system will interfere with those of theother.
A CEBus Demonstration
CEBus. Yea, we’ve heard all the hype. How it is goingto revolutionize the home by standardizing the interface
between appliances in the home. But we here at C IRCUIT
CELLAR INK tend not to believe the marketing hype until wecan see something concrete, preferably in hand. So whenAISI sent us all the information on their CEBus interface
products, it was met by a bit of skepticism. Sounds good on
paper, but when are we going to see something real?About the time that we gave up on seeing something
work in the flesh, we got a call from AISI about an upcom-ing meeting of CABA, the Canadian Association of BuildingAutomation. During the course of the meeting, representa-tives from several Canadian companies involved in build-
ingautomation were tom t to discuss standards and devel-opments in the indus-try, and the hands-on
portion of the meetingwas to be a live CEBusdemonstration.
Ludo first explained that the entire demonstration would becontrolled by a hand-held infrared remote control. (The remotecontrol he was using was the same ONE FOR ALL used with theX-10 IRS43 gateway described in the June/July ‘89 issue of CIR -CUIT CELLAR INK.) The IR remote would send out all the com-mands to the Sony TV located across the room, which wouldrelay them onto the coax cable delivering the cable signals to the
TV. Other devices on the same coax would receive the signalsdirectly, while it would be up to bridges located on the coax toroute the signals to the other media.
He fist sent the usual commands to the TV, such as channelchanging, volume control, and muting. He then turned on the
power to the VCR sitting below the TV. While it may not seem
like much to turn on the VCR power remotely, realize that thecommand to turn the
power on was sent bythe IR remote to theTV, then through thecoax cable to the VCR.
Not wanting to
pass up such an oppor-tunity, Curt and I
jumped in the car for the trek to Montreal.
Next he told the
VCR to start playingthe tape. All the usualVCR commandscould be sent by theIRremoteandrelayed
by the TV to the VCR via the coax.
After some open-ing formalities, wewere introduced toLudo Bertsch, head of research and develop-ment at AISI and re-sponsiblefor thedevel-o p m en t o f AISI’s
(Rsmale)
SPIRIT chip, who con-ducted the demonstration. Figure A shows a diagram of how the equipment was connected for the demonstration.
press of a button on the IR remote brought up a line of text on the
(No, he didn’t have a hot water heater or dishwasher. The bottom of theTV screen telIing us that the current room tempera-
devices were simulated, but the communication was real.)
ture was 68degrees. A coax-to-power-line bridge tookcareof re-lavinp: commands between the coax cable and the power line.
Ludo then pro- posed a scenario inwhich we’re watchingthe tape and decidethe room temperature
is a bit too cool. A
50 ClRCUlT CELLAR I/W
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 49/76
Another issue is the overall functionality. The X-10 system CEBus, on the other hand, is a completely closed-loopwas designed for one-way communication. The homeowner has system, with all nodes capable of either transmitting or re-a control console next to his chair which he uses to send com- ceiving, and protocols firmly in place that allow ac-
mands onto the power line. The remote modules listen to the knowledgements and status reporting. Using CEBus, it’s power line for commands and respond when spoken to. The possible for a lamp to report back to whomever is trying toremote modules have no means of sending their own messages turn it on that the bulb is burned out and the light reallyonto the power line for acknowledgements or reporting status, didn’t go on as requested. Using X-10, the controller wouldand the command consoles have no way to listen to the power have to assume the light went on, without ever knowing if line. it actually did or not.
With the recent introduction of the TW523 two-way com- puter interface, a computer now has the capability to listen to X-10 activity on the power line as well as initiate it, but since the re-mote modules still have no way to report back errors or currentstatus, the two-way capability is of limited use. X-10, for allintents and purposes, is a one-way, open-loop system withlimited potential for intelligent home control.
X-10 will likely be around for a number of years untilmore manufacturers begin to incorporate CEBus interfacesinto their products and the economies of scale get the pricesdown. However, because of its faster data rates and trueclosed-loop operation, CEBus stands to eventually takeover the power line control market.
The Johnson HVAC controller was plugged into the power line to hope that nothing went wrong, we got feedback indicat-and received the temperature request from the television. The ing whether or not it locked correctly.controller polled the thermostat located in the room in which we Another example of closed-loop intelligence is a lightwerewatchingTVandsentareplytotheTV,whichdisplayed the controller that can sense how much current is flowing throughtemperature on the screen. The entire request/response time the bulb’s filament and will return an error should it decidewas less than a second. that the light bulb is burned out.
Remarking that the temperature was too low, Ludo decided Ludo also had both a water sensor and a door sensor set
to check the current thermostat setpoint. A press of a button on up. When either sensor was tripped, a system-wide messagethe IR remote resulted in thecur- was sent out so that everything in the houserent setpoint being displayed on keyed to respond tosuch urgent messages wouldthe TV screen. respond. For example, an audible alarm might
Pressing another button on sound, while the TV might turn itself on andthe IR remote let Ludo bump the display the alarm condition.setpointupafewdegrees. Within Ludo continued by explaining that CEBusa few seconds, the reading on the doesn’t just make being at home easier. With athermostat on the wall next to us telephone interface, control of all “CEButized”changed to the new setpoint. appliances in the house can be done over the
Proposing another scenario, phone lines. Ludo proceeded to make a phoneLudo mentioned that the sun call to the telephone interface located in thecoming in through the windows same room. Upon answering, a voice asked for
was a bit too bright and that they a security code. Once punched in, the interfacewould be better closed. Pressing yet another button on the IR allowed complete access to the whole house. Ludo was ableremote resulted in the drapes closing. Similar to the HVAC unit, to turn lights on and off, check current temperatures andthe drape control unit was plugged into the power line. The setpoints, and start the VCR, all with voice confirmation atcommand was relayed by the television onto the coax cable, completion. The telephone interface was connected to thewhich was bridged to the power line. in-house twisted-pair bus, so a twisted-pair-to-power-line
On to the door leading out of the room. Ludo first requested bridge provided thelinktomostofthedevicesconnected for the status of the door lock, resulting in a line of text on the bottom the demonstration.of the TV screen telling us it wasn’t locked. He then sent another At the completion of the demo, most of the CABAcommand to lock the door, with a confirmation being displayed members went back to their meeting while Curt and Ion the TV when it had been positively locked. remained with Ludo to ask more questions. While the
Inordertoillustratetheclosed-loopbenefitsofCEBus,Ludo hardware is still in the development stages (as is the soft- proceeded to disconnect the wire running from the door lockcon- ware and, indeed, the EIA specification itself), final develop-troller to the lock itself, then tried to unlock the door. He was still ment kits should ultimately provide manufacturers of con-able to talk to the controller over the power line, but the controller sumer electronics, appliances, and security systems withwas smart enough to sense that the lock wasn’t working, so sent powerful and easy-to-use tools for incorporating CEBus in-an error message back to the TV screen. Rather than our having terfaces into most of their products with minimum fuss.
August/September 1989 5 1
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 50/76
also be used, but at the loss of through-put. When installing wire for TPBus(and telephones), EIA recommendsthe use of 24-AWG copper 8-conduc-tor wire,arranged in four twisted pairs,with one wire run for telephone andanother run for TPBus. While loop
wiring could be used, they recom-mend running separate wires fromeach room to a single distributionpanel, presumably located in the base-ment or an attached garage and closeto an AC outlet for main power sup-ply and for easy connection to a TP/PL bridge.
Similarly, a pair of coax cablesshould be run throughout the house(one for upstream connection and onefor downstream). A loop configura-tion may be used, or separate wiresmay be run from each room to a distri-bution point for added flexibility. The
EIA recommendation mentions thatone of the wires may be used for con-ventional cable TV signal distributionuntil a true CXBus implementation isput in place.
Remember that since the spec isstillbeingdeveloped,thesewiringrec-ommendations should be taken as
Tether-line: a simple, economical system of control and report for Home and Industry.
d Get Rid of Communication Buaaboos.It’s all handled in the background, with error
correction and NO INTERRUPTS !
d Suonorts X-IO POWERHOUSEhardware and communications standards,for one-way and two-way devices.
d No Comouter Lanauaae Barriers.Data bits are main system memory locations,
constantly reported and readable at any time.Control bits are simply written to memory.WHAT COULD BE EASIER?
d Tetherline Exoands
to handle the largest applications.
d Fully Opto-Isolated
from your main computer and
from the controlled devices.
d Reliable With Built-in Diaanostics.
@ Call lnfinico Todav!Manufacturer of Tetherlme and X-l 0 Powerhouse dealer.
Jim Kurma 435 Main Street(6071 798-9700 Johnson City, NY 13790
52Circle NO . 126 on I<eaaer service Lar(
suggestions only. EIA cautions not to“incur additional costs in relianceupon this nonfinal standard.”
JUST THE BEGINNING
One stumbling block to world-
wide use of CEBusis that the Japaneseand the Europeans are both workingon home automation standards (HBSin Japan and D2B in Europe). A com-mittee has been formed with mem-bers representing all three standardsto work out a combination of the threefor a true worldwide home automa-tion standard. Such a goal is certainlyadmirable, and if enough work is donebefore any of the standards have beenset in concrete, it may actually be at-
tainable. It remains to be seen whetherthe goal is realistic, though.
In any case, CEBus promises tomake home control as popular as tele-visions and dish washers, while as af-fordable as the current crop of X-10modules and devices. %&
Special thanks to Tom Mockat EIA, LudoBertsch at AlSI,and Les Larsonat Cyber-LYNX for their contributions to this ar-ticle.
Electronic Industries Association2001 Eye Street, N.W.Washington, DC 20006(202) 457-4900
AISI Research Corporation2010 Crow Canyon Place, Suite 202San Ramon, CA 94583(415) 866-2222
CyberLYNXComputerProducts,Inc.2885 E. Aurora Ave., Suite 13Boulder, CO 80303(303) 444-7733
Ken Davidson is the managing editor and amember of the CIRCUIT C E L L A R INKengineer-ing staff. He holds a B.S. in computer engi-neeringand an M.S. in computer science fromRensselaer Polytechnic Institute.
IRS 2 13 Very Useful214 Moderately Useful2 15 Not Useful
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 51/76
c61fYo& e interested in
Home Automation
talk to the World Leader w
The hottest category in Consumer Electronics today isHome Automation. X-10 has been the leader in HomeAutomation for the past 11 years! We manufacture
products under the X-10 @ POWERHOUSE y brand andunder many private labels.
Our product line is extensive and includes:
The MT522 Timer which lets you control lights andappliances by remote control, dim and brighten lightsand set lights and appliances to turn on and off whenyou’re away, to give your home a lived-in appearance.
The CR51 2 Clock Radio/Timer has all the features of the MT522 Timer as well as an AM/FM clock radio.
The CP290 Home Automation Interface is set up from acomputer. It can then be disconnected and will run your whole house automatically. It comes complete withsoftware and connecting cable for IBM, Macintosh,
Apple IIe/IIc or Commodore 64/l 28.
The RC5000 lets you remotely control lights andappliances from inside or outside your home. You’llnever have to enter a dark house again.
These are just a few of the types of controllersavailable. All X-10 controllers transmit signals over existing house wiring to control lights and appliancesconnected to X-10 Modules. Many types of Modulesare available including the Lamp Module, ApplianceModules, Wall Switch Module, 3-Way Wall Switch,
Wall Receptacle Module, Heavy Duty 220V Air Conditioner Modules, and Dry Contact Module, etc.
Many major corporations market X-10 compatible products which use our protocol and transmit to X-10Modules manufactured and supplied by us.
We can supply X-10 products in any color, under any brand name, or develop completely new products to suityour needs. We also offer a range of interfaces whichallow the O.E.M. to develop controllers for specificapplications. This lets an O.E.M. take advantage of thelarge installed base of X-10 Modules. Our Power LineInterface, model PL513, enables any O.E.M. product tocouple X-10 signals onto the AC power line withouthaving to bring 120V anywhere near the O.E.M.
product. A 2-Way version (model TW523) whichallows an O.E.M. to transmit and receive X-10 signalsis also available. We also have products which interfaceto the growing number of unified infrared audio/video
products. This lets you control lights and appliancesfrom an audio/video IR remote control.
The X-10 POWERHOUSE System is considered bymany to be the “De Facto” standard for Power LineCarrier Transmission. So if you would like to add toyour product - any product, the capability of controllinglights and appliances over existing house wiring, or theability to receive signals from remote sensors, or if youwould like to interface to an I.R. product:
Please call (201) 784-9700 and ask for extension 100.
House Wiring
I - 1
@I
rI’ II : LampModule
Power Line InterfacesAn optically-isolated zero crossingdetect is provided and the O.E.M.generates X-10 code synchronized tothis. The X-10 code “envelope” isapplied to the optically-isolated inputof the PL513 which modulates it with12OKhz and couples it onto the AC
power line. The TW523 also receivesX-10 codes allowing implementationof a two-way system.
House WiringIX+POWERHOUSE
To find out how you can add X-10 compatibility to enhanceyour product, call (201) 784-9700 and ask for extension 100.
NUMBER ONE IN HOME AUTOMATION X-10 (USA) Inc., 185A LeGrand Ave., Northvale, NJ 07647.
ircle No. 155 on Reader Service Card August /Septem ber 1989 53
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 52/76
Here’s tothe Winners
The votes have been counted, the dust cleared, and thewinners recognized in the First C IRCUIT C ELLAR I NK Design
Contest. W e received 26 entries and found each of them to showthe kind of creativity and expertise we’ve come to expect in CIRCUT
C ELLAR INK readers. As you will recall, there were two categories in the contest:
General CoteQory
Third Prbe,
c o & w e c t l v e co tego /y
First Prize, General Category-Mitee Mouse ThreeDavid Otten, Newton MA
The Mitee Mouse Three is a self-contained robot designed to first navigate and map a maze, then traverse the mazein the shortest possible time. The judges were impressed by the skill of the design and execution, and by the advancedcapabilities (including the ability to directly negotiate diagonals) of the robot.
First Prize, Cost-Effective Category-Portable DRAM Tester J ohn M. Wet-troth, San Diego CA
This portable DRAM Tester, based on the Intel 87C51, caught the judges’ eyes for its simple design, functionality, andpracticality. The tester checks 64K, 256K, and 1M DRAMS for access speed, data integrity, and pin functionality.
Second Prize, General Category-A Personal Computer-controlled Pipe OrganNorman C. J arosik, Princeton NJ
Take one standard theatrical pipe organ. Add an IBM PC-based controller (using three 8031 controllers) communi-cating with the organ over fiber-optic links. Shake with a liberal dose of software and you have the project with the highest“gee-whiz” factor in the contest.
Second Prize, Cost-Effective Category-An LED-Based Name BadgeMichael L. Ardai, Allston MA
Michael Ardai used an 8748 to drive a Hewlett-Packard HDSP21115x7dot matrix LED display and thus created a verysnappy-looking electronic name badge. The battery pack tends to make a breast pocket droop just a bit, but the creativityshown in addressing a simple problem was sufficient to garner second prize honors.
54 C lRCUlT CELLAR NK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 53/76
eneral and Cost Effective. We instituted the two categories
ame in hundyfor letting us recognize more fypes of designs andhilosophies. And now, to the winners.. .
Third Prize, General Category-8031 Analog Input ModuleRick Vaughn, Santa Fe TX
Analog input circuits are at the heart of most data acquisition and control systems. This design features an8OC31
microcontroller, a lo-bit A/D converter, and a 2-line x 16-character LCD to show readings for inputs, board address, andtatus and error messages.
Third Prize, Cost-Effective Category-Ruxpin ‘RiterMichael Eck, Martinsville NJ
If you have a child, you’re familiar with Teddy Ruxpin, the robotic, story-telling bear. This project allows the user tomake cassettes for T.R. These cassettes hold not only the audio portion of the story, but the motion control codes that
perate T.R.‘s mouth.
Honorable Mention, General Category-Digital Temperature-Indicating Controller (not pictured)
Francis Lyn, Rexdale OntarioAn 8031 microcontroller is the intelligence in this controller for baseboard electrical heaters. The design uses a
esonant temperature transducer for input, and drives a high-current solid-state relay over a ten-second cycle as output.
Honorable Mention,Cost-Effective Category-Infrared Printer Interface
J ohn Runciman, Seat-He WAThe HP82240A is a 24character thermal printer which receives input via infrared signals. This80C31-based interface
onverts standard RS-232 signals into the infrared required by the printer.
Congrafulations to the winners.ew months.
You till be seeing complete details of most of the winners in C IRCUIT CELLAR INK over the nextWe are also in the planning stages of a book containing the winning projects and worthy projects that we couldn’t
ecognize here.We were so pleased by the response to this contest that we are planning the Second C IRCUIT C ELLAR INK Design Contest.
Complete rules will be published in an upcoming issue, but if’s not too early to get your pencil sharpened and your soldering ironwarmed up for your next chance to show of f your application design skills!
August/September 1989 5 5
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 54/76
56
The CIRCUIT CELLAR INK Bound ReprintDue to popular demand, we are providing bound volumes of offset reprints ofthe first six issues of CIRCUIT CELLAR INK. These bound reprints include everypage of every issue from CIRCUIT CELLAR INK’s first year of publication.
Single copies of most of these issues are long sold out, making this offset re-print book the only way for new readers to obtain the complete set of CIRCUITCELLAR INK issues.
Every printing of the CIRCUIT CELLAR INK Bound Reprint Book has been asellout. Don’t miss out on the current printing of this popular technical re-
of the Bound Offset Reprin
0 (check or credit card nuCircuit Cellar INKFirst Year Reprint
4 Park StreetVernon, CT 06066
Micromint now makes affordable Video Digitizing evenbetter with ImageWise/PCTM
The company that made video digitizing affordable now makes affordable digitizing even better withImageWise/PC. Bring your reports, graphics, security system, or video application up to the newstandard in cost-effective gray scale video digitizing with the new ImageWise/ PC .
l Digitize any NTSC, PAL, or SECAM video source! ImageWise/PCl Up to 256x255 resolution with 2564evel gray scale! an affordable* True frame grabber-digitizes in l/60 second!l Digitizes 30 frames per second!l Composite video output!
E545* Can display digitized pictures on EGA or VGA1
Price subject to “Exchange rates”
* Advanced overlay and split-screen capabilities! To order call:* Digitized images compatible with paint and desktop publishing J.B. DESIGNS 81 TECHNOLOGIES LTD.
programs! 15 Market Place* Modify, enhance, display, and print images using sophisticated Cirenc ester, Glos. GL7 2PBZIP Software included with every ImageWise/PC! England
TEL: 0285658 122FAX: 0285-658859
Circle No. 131 on Reader Service Card
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 55/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 56/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 57/76
eludes almost all semiconductorcompanies, with the notable absenceof the top Japanese suppliers.
The first brand new beyond-PALchip, the Xilinx LCA (Logic Cell Army)features two major innovations. First,thearchitecture,insteadofbeingbased
on the PAL’s array of AND/OR gates,utilizes an array of higher-functional-ity logic cells and I/O blocks (Figure3). Second, the programmability is inthe form of RAM, so it is not only“erasable” like EEPROM, but is“dynamically reprogrammable.”
Upping the ante from AND/ORgates to logic cells (called CLBs forConfigurable Logic Blocks) and I/Oblocks (IOBs.1 allows an LCA to handlesurprisingly complex logic: from 1200equivalent gates (about the same as aPAL) to 9000 (about the same as amidrange gate array). These corre-spond to combinations of 64 CLBs/58IOBs all the way to 320 CLBs/144IOBs. A single CLB can performcombinatorial and clocked logic op-erations with multiple inputs andoutputs. The IOBs allow inputs to belatched or direct, and outputs to bethree-stated.
However, overall LCA perform-ance depends on the cleverness of therouting scheme that connects signalsbetween the cells; each “stage” of sig-nal switching introduces delays. Xil-inx uses a 3-level hierarchy of on-chipbuses-udjacenf, general purpose, andlong lines-to optimize the tradeoffbetween speed and flexibility. If yourapplication is relatively simple and/or low performance, you won’t haveto worry about routing. Otherwise,
you must “tweak” your design toavoid critical path delays.
Meanwhile, the fact that the LCAis based on RAM is both problem andpotential. The problem is the LCARAM needs to be “initialized” eachtime the system is powered on. Xilinx
eases the pain as much as possible byoffering various initializationschemes. For example, the LCA canoverride your pin definitions to im-plement a parallel bus at power-upwhich a host MPU can then use toaccess the LCA like any other periph-eral chip. Alternatively, if an MPUisn’t present, a standard EPROM canbe used to boot the LCA. Multi-LCAinitialization is handled with a “daisy-chain” mode in which initialization
shipping a new ROM or disk, insteadof laying out a new circuit board!
A similar PLD architecture is theFPGA (Field-Programmable Gafe Array)by Actel. Like the LCA, the FPGAfeatures logic and I/O modules whichare programmably interconnected to
determine the chip’s overall function.Thanks to the use of “antifuse”
technology-the preprogrammedstate is “open’‘-the FPGAs, thoughnot erasable, are highly testable. Fur-ther, two pins can act as probes pro-viding access to internal signals (Fig-ure 5)-a real plus for debugging.
Using hundreds of thousands ofantifuses, Actel features an automaticplace-and-route scheme that is simi-lar to that of a channeled gate array
Figure 4- Thanks to RAM, the Xilinx LCA c an be dyna mica lly reprogramme db ut a lso m ust
be in it ia l ized at e ac h p owe r up. One o f the many ini tial ization mod es offe red u ses a serial
da isy-c hain to loa d mu lt ip le LCAs whi le req uiring a minimum of b oa rd trac es and pins.
data moves along the chain from thefirst to the last LCA (Figure 4).
The potential of RAM-basing,underrated in my opinion, is “soft”hardware. Using one or more LCAs,you could design a system with func-tionality largely determined by codeloaded at power-up. A neat by-prod-uct of such a design strategy is thathardware fixes might be as simple as
Figure SActionprobes areaunique fea tu re of the Ac te l FPGA (Field-Programmable Ga te Array) t i ic h al lowreal-t ime in-circuit debugging by
p r og r ammab l y connec t i ng internal (‘b uried ’) signa ls to external pins.
ASIC. The result is flexible intercon-nection and 85-95% gate utilization.
FPGAs are available in densitiesfrom 1200 to 6000 gates. Noting that atypical TI’LMSI-equivalent function-such as a decoder, counter, or shiftregister-only consumes about 50gates gives you an idea of just howpowerful FPGAs are.
TOOLS ARE KEY
It’s been said that programmablelogic withou t good programming toolsis useless. The good news is that toolscontinue to improve and PLD devel-opment is easier than ever.
Old and new PAL-type devicesare now supported by popular third-party development tools running onPCs and workstations. Leading con-tenders, such as Data I/O’s ABEL and
Logical Devices’ CUPL, allow you toenter, compile, and “bum” (programthe PLD) your design. Add-ons bringschematic entry (supplementing the
60 C lRCUlT CELLAR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 58/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 59/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 60/76
Photo 1 -When the head er from o ne b yte (in this c ase ID 1 7 h ) is direc tly a djac ent to the trailer of the prece ding b yte, /t ’s crucial that hea de rs and trailers be of different du rations
Photo 2-An oscillosc op e screen showing the results of the c od e In Listing2. The de lay in the loop shows up as a55qs gap between trailer and he ad er,
ShowWait callsincludesall of the code in Listing2as well as part of the
BASIC interpreter, thereis about 55 u..s betweeneach trailer and the fol-lowing header.
Also visible in Photo2 are faint backgroundpulses. These are due tointerruptsfromthe8052’sTimer 1, which providesa5-msheartbeatpulseforthe net firmware. EachTimer 1 interrupt needs
about 20 its, which isabout twodivisionsat thescale shown in Photo 2.
Sending an ID num-ber through a single pinis most useful for detect-ing “frozen” loops in thefirmware and is lesshandy for tracking downlong execution se-quences. A logic analyzer hitched to
the pin may be able to record enoughinformation to decode a string of IDS,
but the aggravation coefficient goesup rapidly after a while.
listing 2-An example of ShowWai t in use.Cons/n (a k eystroke fetch routine) ca l ls
ShowWait with ID byte 03h.
The to tal de lay betwee n trailer and head er is ab out 55 p s.
PRECISE SPEEDINGYou do not have to send a com-
plete byte if you monitor only a fewroutines. Perhaps four bits is a morereasonablenumberformostcases;thiswill reduce the time spent in the out-put routine by about a third.
Incidentally, should your projecthave very relaxed timing require-
ments, you can slow the individualbits down to eyeball speed and readthem off an LED. I’ve only had to usethis trick once, but it was a lifesaver!
Once your code is running relia-bly, you can convert your telltale bitinto a measurement tool to reportwhen a routine gets control and howlong it takes to finish. Instead of send-ing an ID number, your code simplyturns on the output bit when it starts
and turns it off when complete. Mi-crocontrollers cando suchbit manipu-lations in one instruction, so the trac-ing has almost no effect on the execu-
tion time of the remain-ing code.
Used in this manner,
one output bit is re-stricted to monitoring asingle routine. If yourhardware has theluxuryofafewmoreoutputbits,you can trace severalroutines at the same time.Otherwise, you will needto reassemble the codeto choose which routinecontrols the single out-put bit.
For IBM PC firm-ware, a parallel printerport is a fruitful sourceof output bits. Mostsystems have at least oneprinter port and it is easyto add a second portdedicated to debugging.
Listing 3 shows theSetTrace assembly
kIqy.IagemaCrOfOrPCS. The-Trace-
Port variable holds the printer portbase address, which may be zero todisable tracing. The leading under-score in the variable name is man-dated by the C code that initializesTracePort,soyoumayomititifyouare using another language. The AXand DX registers must be saved dur-ing the trace code, although you coulddispense with this if you were careful.The remaining instructions read theexisting printer port data from the
output latch, set or clear the desiredbit, and write the data back again.
Notice the difference between thetests on _TracePort and SetBit.
A u g u st / Se p t e m b e r 1 9 89 63
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 61/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 62/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 63/76
Listing 4-When Tracer is installed, the eight interrupt vectors from lowmemory are copiedto the save loc ations show n he re. Whe n the ad d resses of Trac er’s inte rrup t hamYers a re inserted , an y interrup t w i ll invoke Trac er.
The width of these pulses indi-cates that most characters require
roughly 60 ps. I counted about 45instructionsbetweensettingandclear-ing the bit, so the AT takes 1.3 ps perinstruction. Averages like this can bedangerous, but for this stretch of codethe AT is clocking 0.75 MIPS!
The INKnet code also speeds theAT’s hardware Timer 0 up by a factorof 10 times the normal rate, so timerinterrupts occur every 5.5 ms and theBIOS Time-of-Day clock interrupt iscalled every tenth timer tick. Set -
Trace in the new timer interrupt han-dler showed 40 p for the first nine
66 C lRCUlT CELLAR INK
interrupts followed by a 175-J,I~ hit forthe BIOS code link in the tenth inter-rupt.
PROBE PULSES
The first thing you learn about anoscilloscope is that it needs a trigger-a rising or a falling voltage-to startthe beam across the screen. The sec-ond thing you’ll learn is that a goodtrigger is hard to find.
Our lone output pin can serve yetanother function: firmware can pro-
duce a scope sync pulse at any inter-esting point in the code. In fact, a few
lines of firmware can produce anoutput pulse for the most unlikelycombination of events; just the situ-ation you need to monitor.
While you can buy some of thiscapability in a full-blown logic ana-lyzer, a few lines of firmware are con-
siderably cheaper and easier to con-trol. Because the code can use “hid-den” variables that don’t appear onthe processor bus, software can pro-videtriggeringcapabilitiesfarbeyondthose of any hardware analyzer.
The requisite code for ATs is simi-lar to Se tTra c e , but it must set andclear the selected bit in quick succes-sion. This will produce a two- orthree-microsecond pulse (on an 8-MHz AT ) that is entirely adequate for
scope triggering. If your scope needsa longer pulse, it is easy enough to adda short delay between the set and clearinstructions.
The INKnet program producessync pulses just before sending a pollto node 0 and just before sending anydata packets. For example, the triggerfor Photo 3 came from the pulse occur-ring just before the node 0 poll. Thatpulse went into the external triggerinput, while the two vertical channels
show the bus data and interruptmonitor pin. The “A” sweep coveredthe poll and response messages. The‘2” sweep and delay picked out justthe response message from Node 0.
One reminder: you can’t predictthe future. There are some thingsfirmware just cannot do, and one isgeneratinga pulse just beforean eventthat the code doesn’t control. Wewould all like a “sync pulse” just be-fore the next stock market crash, but(to the best of my knowledge) there isno firmware controlling that function.
PRACTICAL PULSES
Adding traces, timing blips, andsync points is easy if you control thesource code. Sometimes, however,you need to measure existing soft-warethatcan’tbechanged. OnPCs,atleast, this is reasonably simple as longas the event you want to measure useseither a hardware or software inter-
rupt; write a TSR to hook the interruptinto your code, then proceed as above.
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 64/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 65/76
passes control directly to the old han-dler.
The registers must be returnedunchanged to the interrupting rou-tine, too. This includes the Flags reg-ister, which has such vital informa-tion as the Carry and Zero flags.
TR ACER must copy the Flags into theappropriate stack location so thatwhen it performs an IRET, the CPUwill restore the flags automatically.
Software interrupts also disablethe hardware interrupt bit, so TR ACER
need not worry about interrupts whilesetting and clearing the DOS trace bit.
Watching the DOS bit on a scopeis an education, because even thesimplest program results in a blizzardof DOS activity. It is futile to measure
“the time spent in DOS” for most programs, but it’s fun to watch!TRACER can monitor Only inter-
rupt handlers installed before it; if yourun a program that captures an inter-rupt vector and does not pass controlalong to TR ACER , that output bit willremain low. As with most TSR programs, TR ACER must be loadedlast to keep control over its interrupts.
68 C lRCUlT CELLAR INK
Some TSR programs actively stealtheir interrupt vectors back from anyother program at every timer tick;TR ACER will not fight back againstsuch a TSR. You will get best results ina more-or-less vanilla system.
EXTRA-CREDIT PROJECTS
When you run TR ACER you willsee all the hardware trace bits pulsehigh when their interrupt is in effect.The DOS interrupt line, however, ishigh when the PC is sitting at the DOScommand line waiting for keyboardinput. This makes sense until youremember that the last program endedwith a DOS call that TR ACER filteredout, so the bit should be low. Right?
As an exercise, modifyTRACER.ASMsothatitoutputstheDOSfunction number (stored in AH whenTR ACER gets control) through the
printer port. That way you can see thelast DOS call made to TR ACER andfigure out why the trace bit remainshigh.
Hint: DOS calls itself using bothdocumented and (somewhat) undocu-
mentedINT21hfunctions. Whichcallnever returns?
You can also trace specific DOSfunctionsonseparateoutputbits. Each bit would then reflect the use of thecalls you were interested in timing.This would reduce the blizzard of
activity on TR ACER 'S single DOS bit tosomething more manageable (andmeaningful!) on several bits.
In any event, you should now beable to get your code running, thenmeasure its performance to a gnat’swhisker. In an upcoming column Iwill use these techniques to spelunk some instruction executionspeeds. ..and perhaps gore a fewsacred cows in the process. q
Ed Nisley is a member of the Circuit Cellar INK engineering staff and enjoys making
gizmos do strange and wondrous things. Heis, by turns, a beekeeper, bicyclist, RegisteredProfessional Engineer, and amateur racon-teur.
IRS2 19 Very Useful220 Moderately Useful221 Not Useful
Files Lost in the Z-Environment?NSURVEY’“is the file name cataloging programfor the Z-System where a fiie can be in any of 32directories.
NSURVEY keeps a database of file name, disk iden-tification, directory, length and CRC for every file.NSLJRVEY allows searching the database ori anyfield; wild card characters permitted.
NSURVEY edits the database to allow removing olddisks.
NSURVEY allows alist of exclusion names to specify
what files, or class of files, are not added to database. NSURVEY can operate from a control file to allowautomating unique-to-the-directory operations.
NSURVEY comes with 24k of documentation in both print and .HLP formats.
NSURVEY combines all updating, searching, andediting functions into one program that totally man-ages the file name database.
For CP/M 2.2, CP/M 3,ZCPR3, Z-Systems.$28.95 + $4.00 S+H
Circle No. 149 on Reader Service Card
Put a complete 68000 computer into your PC
An exciting 68000 development platform that gets your software out!
l Actually runs a 68008-no simulations required to testyour code.
l Real-time embedded multitasking applications can bedeveloped using VRTX32 and RTscope.
. Familiar tools (editor, cross-assembler) can be used onthe PC to write and document programs.
l Downloading to the system is fast: on-board monitor provides direct communication with the PC throughthe I/O channel.
PLUS you can develop multiprocessing techniques andprograms by installing two or more boards in the PC.
Features of the MISTER-8l Low cost: operates in any PC, AT, or clone. l Two or moreboards can be installed to do multiprocessing. l Communicateusing the PC’s serial port and your favorite modem program
or directly through the FIFO. l 128K ROM in three appli-cation sockets; 64K SAM.
MISTER-8 with monitor EPROM . . . . . . . . . . . . . . . . . . . . . . . $495
II
HMmowwe Rmm 717-524-7390 *r
60 SOUTH EI GHTH STREET. LEWI SBURG, PA 1783 7 717-523 -0777
Circle No. 136 on Reader Service Card
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 66/76
FROM THE BENCH
To Participate is to Winby J eff Bachiochi
I dislike contests in which there are winners and los-ers! Yes, competition often brings out the best in people,but we tend to give all the praise to the few who ‘bringhome the gold” and forget the balance. The CIRCUIT CELLAR
INK Design Contest brought out the best in many of our
readers. Every entry had something to contribute nomatter how big or small. Hundreds of hours were spent onthe concepts, designs, and construction of the projects en-tered. In addition, the judges have given many hours toeach of the 26 entries submitted.
This month I would like to feature parts of a fewentries. These entries did not place in the design contest,but that doesn’t mean they are not winners! Every entryhad a spark of genius.
PRINTER PORT COMMANDS PROPORTIONALCONTROLLER
Often, a problem’s simple solution will beg for con-struction whether it is designed specifically for a productor just internal use. Metal Analysis Inc. required totaltemperature control and logging of electric furnaces in theheat treating and strength testing of steel and other alloys.Mel Borchardt, a metallurgist for the company, deter-mined that digital pulse-width-modulated solid-state re-lays would provide O-100% control of the furnaces. Hedesigned a proportional controller linking the PC used forcontrol and data loggers from all furnaces, and wrote a
simple command language to interface the PC to the 6502-based furnace controller. The controller interprets com-mands from the PC and regulates the power to eachfurnace by adjusting the power-on duty cycle for each.
Most programmable micros require a specially de-signed programming module to be programmed by astandard EPROM programmer. This expensive approachwas avoided by Lawrence E. Wickliffe in his 68701 pro-grammer design. External code, hand assembled byLawrence and run at power-up, waits for serial transmis-sions from a host computer. Four-byte packets follow thesame configuration as in the “Simple Serial EPROM Pro-grammer” article by Steve Ciarcia in the February 1985issue of BYTE. A high address byte (containing a read/write flag as the most-significant bit), a low address byte,a data byte, and a dummy byte acquired through the serialport of the 68701 initiatesa DTR\ (data terminal no t ready)to halt communication. The appropriate address is pro-grammed within the micro and DTR is again floppedsignaling “ready for another packet.” This loop is repeatedfor each address to be programmed.
The PC’s parallel port, normally not associated withcontrolling anything more than a printer, is the communi-cations channel between computer and controller. In thiscase, a five-byte command is sent via the printer port to thecontroller. The first four bytes are ASCII characters fol-lowed by a Carriage Return (fifth byte). The first byte (@,A, B, C, D, E, F, or G) designates which furnace ( 0, 1,2,3,4,5, 6, or 7) will be affected by the following three duty
cycle characters. The duty cycle characters (000-999)indicate the percentage of on time (e.g., OOO=OO.O% on,528=52.8% on, and 999=100.0% on). The controller usesthe printer port error line to signal the PC that an invalid
The software used in the original article can be usedwith two minor modifications. The first is that the 68701’s
erased state is 00 hex and not FF hex as in EPROMs. Theother is that the actual addresses do not start at 0000 hexbut in the upper end of the 64K space within the program-mable micro (Figure 11. Five chips, not counting the powersupply, support the programming of the 68701: 1488 and1489 level shifters, an address latch, an EPROM holdingthe external code, and one 74LSO0 for glue. Combined,they create an inexpensive circuit for experimenting withprogrammable micros.
LAYOUT DESIGN ELIMINATES NEED FORDOUBLE-SIDED BOARD
Lower costs can be the result of many design changes.The parts used, quantity of the parts bought, and even thetrade-offs of performing a function in software or hard-
code has been received. The PC can clear the error bytransmitting a “?” to the controller. Since the commandsare all printable characters, a printed audit trail is easilyread without any translation. This low-parts-count designincluding unique use of a PC’s printer port equals success
in any language.
MICROCOMPUTER/CONTROllER PROGRAMS SELF
A u g u st / Se p t e m b e r 1 9 8 9 69
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 67/76
Figure I -A ded ic ate d p rog ram ming de vic e isn ‘ f nec essary whe n the p roc essing po we r of the 6870 1 is used to p rog ram itself.
ware can affect the cost of a project. Tom Williams’ tricks log all incoming and outgoing calls. The 1802 was the firstsaved the price of a double-sided printed circuit board. CMOS micro ever marketed! Customarily, interconnec-
Tom chose to use the CDP1802 microprocessor in his tions between the micro and its memory cause a rat’s nestdesign of a telephone security system used to monitor and of considerable proportions. By paying attention to con-
STOCKS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .OPTIONS a...................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .FUTURES
Turn your PC into a
MARKET QUOTATION MONITORNew book covers complete information on financial newsand market quotes for your PC from satellite and FM radio.Topics include:
- Data Encryption- Password Methods- Receiver Unit Design
Covers quotation processing and data broadcasting fromthe trading floor to the desktop, $19 plus $2 S/H (includesdemo diskette).
Send for FREE catalog of - DATA RECEIVER KITS- QUOTE DISPLAY SOFTWARE- DESCRAMBLING UTILITIES
CALL - (303) 223-2120 (anytime)
DATArx111 E. Drake Rd., Suite 7041Fort Collins, CO 80525
70 ClRCUlr CELLAR INKLircie IUO. I I I on
Reader Service Card
$249,TERMINAL
Featuring l Standard RS-232 Serial Asynchronous ASCII Communicationsl 48 Character LCD Drsplay (2 Lines of 24 each)l 24 Key Membrane Keyboard wdh embossed graphics.l Ten key numeric array plus 8 programmable function keys.l Four-wire mulbdrop protocol mode.l Keyboard selectable SET-UP features-baud rates, parity, etc.l Size (5.625” W x 6.9” D x 1.75” H), Weight 1.25 Ibs.l 5x 7 Dot Matrix font with underline cursor l Displays 96 Character ASCII Set (upper and lower case)Options-backlrghtlng for oisplay. FE-422 I / O 20 Ma current loop 110,
302 N. Winchester l Olathe, KS 66062 l 913-629-0600 l 800-255-3739
Circle No. 112 on Reader Service Car
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 68/76
trol and higher address lines first, the subsequent addresslines are connected to whichever address pins make thelayout flow well as a single-sided layout design. A pro-gram doesn’t care which actual cells are used, so the scram-bling of address lines, or data for that matter, is unimpor-tant. When it comes to external EPROMs, however, itmakes a lot of difference. In order to overcome this, Tomprescrambled the data within the EPROM to match theaddressingof thecircuit layout. This also has the side effectof protecting one’s code from disassembly.
In order to save additional board space, the RAM andEPROM were piggy-backed (Illustration 1). All but pins 1and 20 on both devices have identical parallel pinouts.These two pinson the EPROM are wired separately to padson the circuit board, with all others are soldered directly tothe RAM, effectively reducing the circuit board size by twosquare inches. This method is notpractical for production boards be-cause the hand labor costs outweighthe circuit board cost savings. (Iused this technique in the late 70s onmy Radio Shack Model I to expandits memory from 16K to 32K bytes.)
MECHANICAL ADVANTAGESPEAKS FOR ITSELF
Consumers have rejected mostappliances which include vocal feed-back. We don’t like inanimate ob-
jects reminding us to change the oil(in our auto) or keep ou t of the refrig-eratorin between meals. Despite theresistance, digitized speech isbecom-
Illustration 2-Most ba f h -room sca les use a disc fhaf
Illustration 1-Oneoffhe
ea siest wa ys to conserve boa rd space in one-o f -a-k ind projec ts is to
p iggy-back static RAM and EPROM.
ing part of our culture. Ma Bell has been
using digitized speech providing cannedmessages and information for yearsnow. Keeping in step with this technol-ogy, Michael Eck designed a “personal-ized talking scale.” Not only does thescale vocalize weight, it decides whichmember of the family it’s weighing andgives personalized encouragement.
Open up a typical low-cost bath-room scale and you’ll find a large discthat rotates when any weight on thescale counteracts the internal spring (Il-
lustration 2). This disc is numbered incrementally and theappropriate weight spins into view through a small win-dow atop the scale. This mechanical apparatus takes theplace of a “load cell” which produces an electrical outputproportional to the weight applied. (Load cells are gener-ally expensive and used mostly in industrial applications.)By placing an optical chopper wheel (clear disc with blackspokes applied) on the scale’s rotating disc, two inter-rupter-type photodetector pairs can sense both directionand amount of rotation of the disc. A counter keeps trackof the the spokes as they interrupt the light passed throughthe rotating clear disc. The number of spokes on the discdetermines the resolution of the scale (number of spokesper pound). The biggest advantage of using this system isitbecomesautozeroing, whichpreventscheating. Whetherby mistake or preplanned, the user can’t misadjust the
rotates when a w eight p l a c e d on the scale.
August /Septem ber 1989 7 1
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 69/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 70/76
SOFTWAREby DESIGN
Signal SmoothingTa king the Ro ug h Ed g e s o ff o f Re a l-Wo rld Da ta by Jack Garde
Measuring low-level signals requires either veryquiet (noise-free) electronics or clever signal averaging tosmooth out the inevitable perturbations. Even if the elec-tronics were perfectly quiet, quantization errors and reso-lution will always induce undesired signal characteristics
that must be filtered out. Clever software algorithms areneeded to extract meaning from what often appears to belittle more than noise.
SIGNAL TYPES
Radio and TV receivers are astonishing devices. Wedigital people go nearly insane trying to remove a fewmillivolts of noise from our latest widget, while the radioplays a crystal-clear rendition of Mendelssohn’s Octet.Often the station’s signal is only a few microvolts at theantenna, buried in many millivolts of noise and rock ‘n roll.
Why must we fight so hard when digitizing nearly DCdata, when a receiver works so well with three orders ofmagnitude less signal?
The music we hear is modulated on the station’scarrier frequency. Marvelously designed RF filters caneasily notch out virtually everything that is not at almostexactly the carrier’s center frequency. The noise is distrib-uted over a huge bandwidth; the filters remove all but atiny portion of that bandwidth, including the noise.
Radios are a special case. Most signals presented to adigital system are at a much lower frequency. Indeed,most are nonperiodic, nearly DC voltages. With no carrier,
all of the “bandwidth” carries important information.The simplest example is the slowly varying output of
a potentiometer (perhaps mounted at a robot’s elbow joint). The signal changes slowly with time-for all intentsit is DC. This is the hardest sort of signal to smooth.
Oscilloscopes display signals similar to those found inmany digital instruments (indeed, many scopes are nowentirely digital). The waveform is a swept signal, with oneaxis being time and the other voltage. Usually, each sweepis almost identical to the previous one; the waveformchanges slowly in comparison to the sweep frequency.
Obviously, this sort of data can be filtered by averag-ing lots of successive sweeps. Perhaps not so obviously,the data can be smoothed on any one sweep along theimplicit axis (the axis implied by array position-time for
an oscilloscope, frequency for a spectrum analyzer or spec-
trophotometer).This discussion is limited to data that is continuous
along the implicit axis. This means there are no sharp dis-continuities from one point to the next. In other words, for
any point i, point i+Z will be approximately the same valueor will be generally changing in the same way the previousone was. Even a plot of the Dow Jones average versus timesatisfies this condition, since the Dow does have a slighttendency to continue going up if it is on a rise, or to headdown if its last change was bearish.
AVERAGING TECHNlQUES
A digital instrument reading simple DC-like voltages(asin thecaseof therobotarmpot) willmost likely averagemultiple A/D readings in order to minimize the effect of
noise. Little else is possible.Of course, you must pick an intelligent averaging tech-
nique. Most programmers opt for a running average, alsoknownasaboxcar. Only thelatest N readingsareincludedin the average, so very old data can’t skew the results. Nis chosen large enough to generate quiet data, but must besmall compared to the data’s rate of change.
For a running average, as each sample is collected theoldest is dropped and the new one added. A circularbuffer is often used to store the readings. Once the buffer
1.0
0. 6
0. 6
0. 4
0. 2
0. 0 +i
Figure 1 --In a convoiution. the input w av eform is m ult ip l ied b y a unit step function, and the results at e ac h p oint are summ ed . lh enumb er of po in ts in eac h averag e m ust be c hosen to avo id b oth
smearing the data and simply reproducing the input.
August/September I985 73
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 71/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 72/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 73/76
CONNECTIME Excerpt s from t he Ci rcuit Cel l ar BBS
THE CIRCUIT CELLAR BBS300/l 200/2400 bps
24 hours/7 days a week(203) 87 1-1988 - 4 incoming linesVernon, Connecticut
Conducted Lr L.cI1 uayIuJvII
hnco n f th o P;ur r , ; t f -o l lnv RRC ;n nn,, , n, ,n ; lnh loThe messageon disk. See,
We’re a bit short on space this issue, so I’ll dispense withthe usual ramblings and get right into the messages.
In the last issue, a group of BBS users discussed the goodand bad points of various techniques for building the
circuitryof a
project (with special emphasis on wire-wrapping). Often the only difference between an experi-menter’s project and a professionally manufactured prod-uct is in the final presentation. A good-looking front panelcan do wonders f or first (and lasting) impressions, and anumber of techniques for creating such panels are dis-cussed in this first thread.
Msg#:18819From: KEN RATKEVICH To: ALL USERS
I work in the Electronics Shop for a pharmaceutical company.
One of my functions is to design and build miscellaneous cir-cuitry for our scientific staff. One of my personal guidelines inthis area is to provide devices that have a professional appear-ance to them. In other words, I want my creations to look likequality, off-the-shelf equipment. However, I run into greatdifficulty with the labeling of the controls, connectors, and indi-cators since I haven’t found an in-house alternative to dry trans-fers. Things get really tough when I have to make labels oneletter at a time. I am very interested in learning about any alternativein-house methods for labeling that give professional results.
Msg#:18824
From: BOB DAMATO To: KEN RATKEVICH
Kroy has a lettering system out which gives real professionalresults. I have one at work, and it’s fantastic. I can’t find theaddress right now, but if you’re interested 1’11 find it for you.
you paste them on a panel (even after you spray the panel witha clear plastic protective spray). There’s another machine thatcuts the letters out of plastic tape. You can use the letters directly,orusethetapebackingasa stencil. l’lllookforthecompanyname
and number tomorrow.
The easiest way I’ve found is to lay the panel out in MacDraw or a similar Mac program and print it on clear adhesive paper on aLaser-writer. You then peel the backing off, and stick the sheet tothe panel. This works great, as long as your panel is no more than8.5” x 14” in size. You can also spray Clearspray on it to protectthe lettering, but even without a protective coat, the lettering willlast a long time. Other than the size limitation, the only problemI’ve encountered is with accidentally trapping dust and air
bubbles.
Msg#:18848From: STEVE CIARCIA To: KEN RATKEVICH
We often use a method similar to that described by Frank (thefully drawn adhesive-backed template. To get around the 8.5” x14” limit, however we use a stat camera instead of a laser printer.That allows us 3’ x 3’!
Msg#:18852From: JEFF BACHIOCHI To: KEN RATKEVICH
If you have access to a plotter and a program like AutoCAD, trydesigning the label with AutoCAD and then plotting the labelmirror image on a piece of matte mylar. The design will not ruboff because it’s on the inside of the label and the outside will havea nice finish. Spraying the inside with a contrasting color willgive it a nice appearance. Plotting to a file will allow other programs to use the file and plot to a laser printer.
MS@:18837From: FRANK HENRIQUEZ To: KEN RATKEVICH
Msg#:18868From: BOB DAMATO To: FRANK HENRIQUEZ
I think Jeff has the right Idea. I do most of my highly detailedMy old boss insisted that a project that looked great but worked faceplates on AutoCAD then plot it out on the plotter. So far Iso-so was far better than a project that worked great but looked haven’t had an E-size faceplate! You can then plot it out mirror
so-so. imaged on “chartpak,” an adhesive mylar, or actually, not mir-rored image. This way you can have many colors as well. YouThe Kroy lettering machine works great, but the letters rub off. then stick it on the faceplate, and if need be, you can clear sprayAnd since they are on a clear plastic tape, the tape shows when it.
76 ClRCUlT CELLAR INK
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 74/76
Msg#:19267From: GREG BELL To: JEFF BACHIOCHI
I find that cases/labels/faceplates for projects are sometimes themost difficult aspect of a project. I would love to see an articledealing with some of the more mechanical aspects of a project.
One example of a neat idea I’ve heard of but not seriously usedis this: For a case, use plexiglass. Paint the insideof the plexiglasswith a flat black paint. Neat appearance. Where you need to havean LED show through or a display, you place paper or tape of theappropriate shape on the inside before painting. That way, theface of the case is nice and flat.
Msg#:19273
From: JEFF BACHIOCHI To: GREG BELL
Sounds like we have the makings of an interesting messagethread here!
Often times it seems as though the outside is more time consum-ing than the inside. Everyone likes function, but function issometimes ugly! A nice wrapper can hide that ugliness and turnit into a work of art. :-)
Msg#:19309
From: FRANK HENRIQUEZ To: JEFF BACHIOCHI
Yea! I always feel that the case takes a disproportionate amountof time compared to the circuit. I wish someone would come outwith good-looking cases (not those ugly gray aluminum boxes,or PC cases) that are somewhat expandable (I always find that a
case is either too big or too small for the PC board). I wishsomeone would come out with a paper or plastic sheet that can
be run through a laser printer and generate letters that can berubbed off easily.
Msg#:19813
From: PELLERVO KASKINEN To: KEN RATKEVICH
I noticed there were no references to one very handy panelmaking system in the answers, so here‘s what I know:
We havebeen using for years something we keepcallingScotchca1
according to the original release by 3M Company, even though itnow is made by Letraset and called Dynamark Photomask. Thematerials are available in coated aluminum, plastic, and in or-ange-coated film that can be used to reverse the image from
positive to negative.
The processing is simple if you have a blueprint machine or other similar source of ultraviolet light. Make a taped pattern on clear acetate film in 1:l size. You can also use the Kroy text maker mentioned in other messages or rub-on letters. Then just stack the photomask material of your choice (and color), the master,and another clear acetate film for protection and feed the combi-
nation through the exposure. Takes 20 to 60 seconds on typical blueprint machines. Get the photomask material out. Theexposed part has been polymerized (hardened) by the UV light.
Gently rub the surface with a special solvent and soft cotton padsand the unexposed coating comes off.
With this process, if you start with color-coated aluminum mate-rial, you end up having a negative image (i.e., the aluminumshines through as the text). If you want a positive, you need to usethe orange film at first in the same fashion. Then use the preparednegative as the new master for a second exposure.
You can coat the resulting panel with some spray lacquer, but notall lacquers produce good results. Submitting the ready panel toadditional baking may make it more durable and, in general, wehave not had many problems.
The actual box panel should have all the holes drilled before youapply the overlay, because any drilling will damage the looks.Instead, you just use a sharp knife through the holes to carve outthe overlay where necessary. The aluminum panels are quitegood against twisting when you tighten nuts. The same does notapply to the plastic overlays, where you need to be extra careful.Also, the corners of the overlays should be rounded, because any
sharp corner tends to work loose in time. About a half-inchradius is enough.
Hope this helps you and other people in need of occasional neat prototypes!
A major component in any robotics application is the maindrive motor (or motors). Finding such motors can be a
problem unless one uses some ingenuity, as wefind out inthe following thread.
Msg#:13384
From: EDWARD WOOD To: ALL USERS
Does anyone out there have a source for some rather large DCmotors for use as main drive motors in a robot? I’ve lookedthrough the American Design Components catalogue but can’tsee anything with enough torque to do the job even with gearingdown high-RPM ones. Any ideas?
Msg#:13423
From: JIM NELSON To: EDWARD WOOD
Well you don’t exactly give any details on the torque you need, but you might give B&B a call: 800/638-7808.
A company called Magnetic Technology makes a brushless DCmotor used in CAT scanners. I happen to have the catalog here:Peak torque is 1650 lb-ft. The unit’s outer diameter is about 45inches, and the inner bore is 28 inches. The unit resembles a ring,and is driven with three amplifiers phased 120 degrees apart.818/887-7700
Have you ever read “Direct Drive Robots” by Asada & Youcef-Toumi? It covers the use of torque motors and brushless torquemotors in great detail. No gearing in sight in their robots!
August /September 1989 77
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 75/76
7/16/2019 Circuit.cellar.010.Aug Sep.1989
http://slidepdf.com/reader/full/circuitcellar010aug-sep1989 76/76
STEVE’S OWN ’ N KDon’t MessWith Mother Nature
B T..
he theme of this issue is among my favorite topics. Unfortunately, somebody may be trying to tell me that,like the Edsel, I’m a little ahead of my time. Let me explain.
For the last few months, I have been revising my home control system. The original HCS, designed and describedin 1985, has been joined by a variety of new electronics including ROVER (see Gscurr CELLAR INK issue #5), a video-camera-based motion detection system, modulated lasers, and a multitude of distributed controllers. The originalautomatic lighting scheme is evolving into an AI environment where the “computer” can know who, what, where,when, and how much the inhabitants are doing. Of course, I haven’t decided what to do with all this knowledge, butthe sheer engineering challenge has been enough incentive to keep me stringing wires.
The central component of my latest home control adventure is a distributed control system which relies heavily onRTC52s (CIRCUIT CELLAR INK issue #8) and Ed Nisley’s network software. During the past few months, I have beenstringing low-voltage RS-485 cable and other signal wires among the house and two garages. This month I had hopedto be describing the control installation in an article, but Mother Nature intervened.
One of the continuing sagas of my life in the Circuit Cellar has been dealing with lightning. If you had told me thathere in Connecticut, which averages barely 20 days per year of thunderstorms, that I’d have a lightning problem, I wouldhave laughed. A hurricane or two every 50 years, but lightning?
Last week I was sitting on the deck sipping a cool drink. It was dark out and the floodlights had come on just as
it started raining. There was even a bit of thunder, but it seemed far away and quite natural for a summer shower.Because I had installed a canopy over the greenhouse and deck, we could even sit outside in heavy rain without gettingwet. As I tipped my glass to takeanother sip, I instinctively glanced toward my 15-foot satellite dish as abolt of lightningwent through the trees, around the lightning rod at the top of the dish, and hit directly on the LNA. BLAM! Openmouthed, I wiped the ice cubes from my lastrike. All I could think was here we go, BP
and stared at the dish as a large cloud of steam rose from the area of theown Up Again!
After running around the house inspecting the damage I came to the conclusion that the hard-wired control systemwasn’t going to hack it any more. Even though signal connections between systems were optoisolated, this strike didn’tgo through theAC power system(now quiteruggedized) likeall prior hits, it “jumped” across to the low-voltage controland signal lines. ZAP! Trash one house-full of electronics!
Rather than continue stringing more “lightning paths,” I’ve decided to look harder at the connections between theremote units and the central HCS. Perhaps I have to go to fiber optics or build optoisolators with 200-kV isolation beforeI can use my new networked controllers.
The ultimate answer may be CEBus. My entire control system is predicated on the concept of closed-loop controland redundancy. Until now I have had no real commercial alternative, and the only option has been to think of the homeas a process-control environment and adapt everything to it. Custom configurations are neither easily explained normodified.
CEBus offers a common control medium where the designers of appliances and the designers of controllers cancommunicate intelligently. There is no need to stay in a hazardous “copper environment” when CEBus offers