9410 BBCWS Ram 5975 T-Systeir i0 RNW Flevo 95 RTL Junglinstei )W Weitachtal 15440 DWRim '•Wico 9 770268 45 Multifunction Frequency Meter The leaders in PIC development EASE OF USE AUTOMATION ♦ All you need to get started with PIC ♦ Industry standard/quality board ♦ Open the box and get coding ♦ Available with C compiler or_ use our PicScript to write programs using simple commands... NO ASSEMBLER, NO COMPILER, JUST WRITE AND RUN SCRIPTABILITY PicDev Board with PicScript £ 99.00 (plus p+p) This is a complete development suite for the novice or non programmer. It is shipped with: . PicDev Board . PicShell and PicScript software . Breakout board . Cables . Example scripts Both items require Xu order: • PC with serial port available • Power supply adapter www.pagm.co.uk PicDev Board with C Compiler £ 165.00 (plus p+p) This is a complete development suite for the more advanced programmer. It is shipped with: . PicDev Board . PicShell and PicScript software . C compiler . Breakout board • Cables . Example scripts . ICD1 sales@pagm.co.uk Tel: -44(0)1792 891927 The Volume 2003 CD-ROM is automatically sent to you when published (February 2004) Hands-on I Mo-230 V I Power larctitr Digital Mlmrm do •IF If fllMlMlj TomihComtrolled The choice is yours! Fill out the Subscription Order Form in this maga- zine or on our website and post it today! Your welcome gift will be sent to you as soon as possible after receipt of your subscription pay- If you take out an annual subscription to ELEKTOR ELEC- TRONICS you may choose between two types of sub- scription. www.elektor- electronics.co.uk O PICK TOUR mu SUBSCRIPTION TYPE AND RECEIVE THIS SURVIVAL KIT' This survival kit consists of a collapsible compass with various functions, a lightweight but robust torchlight (batteries included) and a 9-piece stainless steel pair of pliers with 1 4 functions. Elektor Electronics Subscription-PLUS priced at £45.50 (UK). You receive 1 1 issues (includes July/August double issue) plus a copy ot the Volume 2003 CD-ROM. This CD-ROM contains the complete Volume 2003 of Elektor Electronics, including diagrams, PCB layouts and an extensive search function. The normal price is £16.25 (plus P&P). However on choosing Subscription Plus the Volume 2003 CD-ROM is included in the price, and you do not pay postage. Your saving: £10.00! Elektor Electronics annual subscription priced at £39.50 (UK). You receive 1 1 issues (includes July/August double issue). A standard annual subscription costs £39.50 in the United Kingdom; ECONOMY MAIL: £51.30 in the rest ot the world: PRIORITY AIRMAIL: £52.30 in Europe and Eire. £64.00 in the Middle East. Africa. Southwest Asia, Central & South America, £66.00 in Australia. Far East & Pacific Territories; AIRFREIGHT: USS88.00 in USA & Canada only. Subscription-PLUS prices may be found on the reverse of the Subscription Order form, and on our website. KHOR THE ELECTRONICS & COMPUTER MAGAZINE 0nty appiicab'e if tire new subscriber did not sub- scribe to Elektor Electrons in the past 12 months. Otter subject to availability. THE ELECTRONICS & COMPUTER MAGAZINE Vbfeme 30. Number 330. March 2004 5SN 0268*519 ftadaed 2nd px«isred by E-r*:.r r*ecircrics (r\jc4snng. PO Ben 1 50 Tr -rdge V.fefe TN5 7WY England tero-e..-- Gfl 530 200657. fee I t S^C 2CG616 intemfit waw dcxmr-efeetrorxx co iA £rr.=it sctes^teticr-cfegrcncs co tA Editor pe\ B»jtng Emai cdtaf5@efei^€fec3rariiamdt Labcrascry Staff *arai V^ira-.en. Ten Gesberte ? 2 tJ Goosed Lx Lsmrre-^ ?«** V^rtoosej (PC8 ossf. EjraJt t*chQepv3seOT»artrt IntemahoroJ Secrearat H ; v. £ He-rrci _r.; Mire Jej-rxmr* Em**: 5«retjra2@^rrert-ri Pubfaher. PSere Kerssretefs EmalL {xl 2 j^em 2 i£Js@se^naTLrJ UK Adverosng &er-.= d f*xo ire 3 Descent Vk« Chsteriam G150 3 PE Errand T^ot( 4 44)(0)I2425I0760. fee ( + 44) (0)1 242 226626 Errur ten^rthjbKsr6i2-jii^iireco ci rC.rftang rrs 2nd tSTT— ^ 2,2i±ur cr» request Intfirratxjnal Advertising fC Qfcerhoiw. address as Head Ofice EmEi ad.erterties\T'e4s« tux n’ AA»L>ng cels ard terns a/atebte tr. rsqjeg. Suhscnpoon WartJwde SuDsaipton Sente Ltd. Un« 4. Geos Retd Farm. Pas-fey Road. Tenure TN5 7H£. Errand «f«r< ;+44)(0)lSS02C0657. Fax <^44)(0)lS60 2f»6l6 Ernst w.vss «w.ss demcn co u» R^es arc terms are g'.en on the Subscriber) Oder Form Head OfTce Segmerfi b.v PO 5cm 75 NV6 i 9&AB Tr>? Netrertands L'ecfxre ( -3 ! ) 46 4339444. F £ . (+31)46 437016 1 Drsmfcudoo Seigneur c 6 Mss.rra n Street. London W IP 3 LD. Engfanb Copynght rcocc The ortute dcKrbed n ths maga^ne are for domeec use or*/. AI Ocs.vrgi prct^r^fis, ported crcut board c/OJt5 and sec? texts pxu'“e-e r the eotcr^ section cf the m agae re are c npy r gfc Sepnert b.v andmayixjCDercprodjiedcrtransrr.csdnsTyfcfmorcyan/ means rdbdng phatocopyng. scs-nrg an reccrdng. r. whole cr n oart without p rcr ..c-nen aenresen frem re f\X3ferers. Sum wtest. penrisson mes aso De cccared before 2 f*. partcjftnspubicstcnG acred n a nsne^i syssm cf any r\£ure. Paert prtfsacn m*y end n re-cecl of ertute. de.xe*. c o rr ocn e rtt etc des er b ed r. ths mapLne- The HUsher does no? accept rgspons * - bsty forfeTirg to ce“h sum parerr s ; cr other protector. Tre axmsscn af cesgns or artces replies penm&on to re FLbisrv en to i*rtr tre te«T and dtsgn. ard to use die artsrts n other Seg- ment pubscaiors ard act/.bes- The ftiishm carrct guarantee to r esun any mstenai ftjfamced U> them. TechnxaJ Q-er-es We can or. , s^.s-er pues ters cr re m ar ta cf g= rera rterea to olt resrers concern r.r grebes ret c&Ssr ran two years erd pubfereo n Eecor Eect-no In k -e.-. re arout of post received, its rot pcs- sefe to arswer ai; csteTespondens. and we are Lracfe to respond to rdstid wshes and regjt® fcr mod/cacrs to cr aoto-a rtfcr- msicyt about L<*.~rr fc’.mo cropeds- 1> frd anxe tves «d tautps^t references, pfese use or 0T (Besdor ten racer) vyhch s ’.-aiffife cn foppy dsi (see Readers Services) V.fe co ret s xp • -sfertie projects deserbed n ms rr^girre CXr 5X0 " f cmgr c irrsedsoPCBs. GD-PCMs. gs**l=s prefr^nmed mcroccndc.fe-s. Gris. ? Aix FPG5s and EPRC’^.s. AI ocre' oats fcr bJong olt prohects shc*Jkl be pLrdesed Jrcm laxcrrponert suppfers ad.erxrg n ths nsasene. Overseas Etfcdocs B=fcrr a sco c*.o : crec r The * .-fL«£ro"CS German , ms-ce Fran- msed edCKTs acceo r n SAede - "r-arcl Greece hda Poarc fbt.. gi and Span Pease Gorect Heac GSs for arcress ribmscn 9 Segret b.v 20C4 Printed nth? Nehertands £;•::• £.:::*:* :: - - . : ; TFe rr ^ me «s astsfe from neA-s^sr^s. booiahe^s and eectrancs f eL' oxes cr or. suosenmor . www.elektor-electronics.co.uk CONSTRUCTION PROjECTS Build Your Own DRM Receiver One again Elektor Electronics makes its competitors take a very distant back seat by publishing the world’s first homebuilt DRM receiver for digital (MP4-quality) broadcasts in the medium and shortwave bands. The receiver is of a surprisingly simple design and supplies a 12-kHz output signal for easy connection to your PC’s soundcard which handles the demodulation and MPEG decoding. Multifunction Frequency Meter Despite its surprisingly simple hardware design and construction, the superb frequency meter / event counter described in this article couples ease of use to a plethora of measurement options. The successful combination is mainly due to the use of a microcontroller running some really ingenious software. The keywords in the general design of the instrument were noise immunity, reliability and functionality. 20 ELEKTOR ELECTRONICS VOLUME 30 MARCH 2004 CONTENTS Code Lock Most code locks or electronic entry systems need a 1 0-way keypad to enter a code number sequence. This design performs the same function but takes a more circular route... Wind Power The UK Government recently announced the world’s biggest ever expansion in wind energy. So how realistic is this scheme? What are the pitfalls, technical and otherwise, and how viable is it economically? It’s time to look at wind generation in the round. INFORMATIVE ARTICLES 56 Blackfin DSP Development Kit Experimenting with DSPs is a fascinating pastime, but it can be difficult to find a good place to start. Generally speaking, DSP circuits use very high frequencies, which makes the PCB layout quite critical. In addition, DIY soldering of these components is almost impossible, because they are packaged in so-called Ball Grid Arrays (BGAs). How then, can we overcome these difficulties? Construction Projects 12 Build Your Own DRM Receiver 20 Multifunction Frequency Meter 28 Hands-on CPLDs (2) 36 Multichannel Failsafe for Radio Controlled Models 46 Data Storage on Compact Flash Cards 50 Voltage & Continuity Tester 52 Code Lock Informative Articles 40 Application Note: AVR450 Battery Charger 56 Wind Power 60 Blackfin DSP Development Kit 64 500 Links on Microcontrollers Regulars 1 1 New Products 67 Readers Services 74 Sneak Preview 74 Index of Advertisers QUASAR electronics Quasar Electronics Limited PO Box 6935, Bishops Stortford, CM23 4WP Tel: 0870 246 1826 Fax: 0870 460 1045 E-mail: sales@quasarelectronics.com Add £2.00 P&P to all UK orders. 1st Class Recorded -£4. Next day (insured £250) - £7. Europe -£5. Rest of World -£10. We accept all major credit/debit cards. Make chequesJPO's payable to Quasar Electronics Limited. Prices include 17.5% VAT. MAIL ORDER ONLY. Call now for our FREE CATALOGUE containing details of over 300 electronic kits, projects and modules. E2ED 0871 CREDIT CARD SALES 717 T Iti Motor Drivers/Controllers Here are just a few of our controller and driver modules for AC, DC, unipolar/bipolar stepper motors and servo motors. See website for full details. Controllers & Loggers Here are just a few of the controller and data acquisition and control units we have. See website for full details. Suitable PSU for all units: Order Code PSU203 £9.95 DC Motor Speed Controller (5A/100V) Control the speed of almost any common DC motor rated up to 100V/5A. Pulse width modulation output for maximum motor torque at all speeds. Supply: 5-15VDC. Box sup- plied. Dimensions (mm): 60Wx100Lx60H. Kit Order Code: 3067KT - £12.95 Assembled Order Code: AS3067 - £19.95 NEW! PC / Standalone Unipolar Stepper Motor Driver Drives any 5, 6 or 8-!ead unipolar stepper motor rated up to 6 Amps max. Provides speed and direc- tion control. Operates in stand-alone or PC- controlled mode. Up to six 3179 driver boards can be connected to a single parallel port. Supply: 9V DC. PCB: 80x50mm. Kit Order Code: 3179KT - £9.95 Assembled Order Code: AS3179 - £16.95 PC Controlled Dual Stepper Motor Driver Independently control two unipolar stepper motors (each rated up to 3 Amps max.) using PC parallel port and soft- ware interface provided. Four digital inputs available for monitoring external switches and other inputs. Software provides three run modes and will half-step, single-step or man- ual-step motors. Complete unit neatly housed in an extended D-shell case. All components, case, documentation and software are sup- plied (stepper motors are NOT provided). Dimensions (mm): 55Wx70Lx15H. Kit Order Code: 31 13KT - £15.95 Assembled Order Code: AS31 1 3 - £24.95 Rolling Code 4-Channel UHF Remote State-of-the-Art. High security. 4 channels. Momentary or latching relay output. Range up to 40m. Up to 15 Tx's can be learnt by one Rx (kit in- cludes one Tx but more avail- able separately). 4 indicator LED 's. Fix: PCB 77x85mm, 12VDC/6mA (standby). Two and Ten channel versions also available. Kit Order Code: 3180KT - £41.95 Assembled Order Code: AS3180 - £49.95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port. °C or C F. Continuously logs up to 4 separate sensors located 200m+ from board. Wide range of free software appli- cations for storing/using data. PCB just 38x38mm. Powered by PC. Includes one DS1820 sensor and four header cables. Kit Order Code: 3145KT - £22.95 Assembled Order Code: AS3145 - £29.95 Additional DS1820 Sensors - £3.95 each NEW! DTMF Telephone Relay Switcher Call your phone number using a DTMF phone from anywhere in the world and remotely turn on/off any of the 4 relays as desired. User settable Security Password, Anti- Tamper, Rings to Answer, Auto Hang-up and Lockout. Includes plastic case. 130x110x30mm. Power 12VDC. Kit Order Code: 3140KT - £39.95 Assembled Order Code: AS3140 - £59.95 NEW! Bi-Polar Stepper Motor Driver Drive any bi-polar stepper motor using externally sup- plied 5V levels for stepping and direction control. These usually come from software running on a computer. Supply: 8-30V DC. PCB: 75x85mm. Kit Order Code: 3158KT - £12.95 Assembled Order Code: AS3158 - £26.95 Most items are available in kit form (KT suffix) or assembled and ready for use (AS prefix). Serial Isolated I/O Module PC controlled 8-Relay Board. 115/250V relay outputs and 4 isolated digital inputs. Useful in a variety of control and sensing applications. Uses PC serial port for programming (using our new Windows interface or batch files). Once programmed unit can operate without PC. Includes plastic case 130x100x30mm. Power: 12VDC/500mA. Kit Order Code: 3108KT - £54.95 Assembled Order Code: AS3108 - £64.95 Infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control uniL Toggle or momentary. 15m+ ' range. 112x122mm. Supply: 12VDC/0.5A Kit Order Code: 3142KT - £41.95 Assembled Order Code: AS3142 - £59.95 PIC & ATMEL Programmers We have a wide range of low cost PIC and ATMEL Programmers. Complete range and documentation available from our web site. Programmer Accessories: 40-pin Wide ZIF socket (ZIF40W) £15.00 18V DC Power supply (PSU201) £5.95 Leads: Parallel (LEAD108) £4.95 / Serial (LEAD76) £4.95 / USB (LEADUAA) £4.95 NEW! USB ’All-Flash’ PIC USB PIC programmer for all ’Flash’ devices. No external power supply making it truly portable. Supplied complete with 40-pin wide-slot ZIF socket, box and Windows Software. Kit Order Code: 3128KT - £49.95 Assembled Order Code: AS3128 - £54.95 Enhanc ed “P ICALL” ISP PIC Programmer Will program virtually ALL 8 to 40 pin PICs plus a range of ATMEL AVR, SCENIX SX and EEPROM 24C de- vices. Also supports In Sys- tem Programming (ISP) for PIC and ATMEL AVRs. Free software. Blank chip auto detect for super fast bulk programming. Requires a 40-pin wide ZIF socket (not included). Kit Order Code: 3144KT - £54.95 Assembled Order Code: AS3144 - £59.95 ATMEL 89xxxx Programmer Uses serial port and any standard terminal comms program. 4 LED’s display the status. 23F sockets not included. Supply: 16-18VDC. Kit Order Code: 3123KT - £29.95 Assembled Order Code: AS3123 - £34.95 NEW! USB & Serial Port PIC Programmer USB/Serial connection. Ideal for ! field use. Header cable for ICSP. [Free Windows software. See f website for PICs supported. ZIF "U * — — socket not incl. Supply: 18VDC. Kit Order Code: 3149KT - £29.95 Assembled Order Code: AS3149 - £44.95 H www.quasarelectronics.com H Secure Online Ordering Facilities Full Product Listing. Descriptions & Photos Kit Documentation & Software Downloads 6 Elektor Electronics 3 2004 Easy- from High performance Windows based PCB Design Capture > * e97 Simulation and Layout software at prices you'd expect from your local computer store! NEW! in Easy-PC 7 • Library Databook Step and repeat plotting Swap Connection Mode Dimensioning Copy to Metafile plus much more Stop press... by customer demand, now with Tsien Boardmaker 2 design import... Desgrea fcr UcfD5©*« Vfladows*XP ve VWndon NT- - t?g- Number One Systems delivers true 32 bit Windows software applications including features that a few short years ago would only have been available in software tools priced in the thousands! Test drive Easy-PC and Easy-Spice for yourself and be prepared to be amazed at the super value... Call for a brochure, price list and demo CD on +44 (0)1684 773662 or email sales@numberone.com Number One Systems I*” N umber One Systems j. United Kingdom or download from www.numberone.com CD ELEKTO VOLUME 2003 ON J -] D OU ■ZD-JiLlj 'A NEW ELEKTOR CD-ROMS RRP £16.25 (US$28.75) The CD-Elektuur/Elektor 2003 CD-ROM contains all articles, with the exception of the news columns, published in Eleldor Electronics volume 2003. Using the supplied Acrobat Reader program, articles are presented in the same page layout as in Elektor Electronics magazine. To find expressions, the extensive search system on this CD-ROM allows you to scan previously published Elektor AnnualCD-ROMs. • print PCB layouts with up to 600 dpi resolution; • adapt PCB layouts with a drawing program; • quickly find articles, components, subjects, and so on, from monthly contents lists, the year index (on subject basis), or on the basis of titles, words, and components; • transfer diagrams, illustrations, PCB layouts, and text, to other pro- grams. • HTML overview for MacOS and Linux users • New! Now includes DiskMirror to run multiple year volumes from hard disk. Order now using the Order Form in the Readers Services section in this issue Elektor Electronics (Publishing) • P.0. Box 190 • Tunbridge Wells TN5 7WY • England. Telephone +44 (0) 1580 200 657 • Fax +44 (0) 1580 200 616 = l-j 0_t2U: See also HU aL+vTTt+K’Tc Sf www.elektor- THE ELICTBONIC5 & COMPUTER MAGAZINE electronics.co.uk 3 2004 Elektor Electronics 7 V 8o5i,ARM7,TriCoTe, ®Ci6x/STio,MPC5xx/8xx MPC 82 X)^III,Sc 52 Hitex BigChip 8, 16 or 32-bit microcontroller modules are the easiest way to increase the performance of your embedded designV By concentrating the CPU /memory sub-system into a low-cost, high density BigChip, there’s more time for getting your 10 hardware and application software riqht first time. Their small size and guaranteed low EMC will get your project into great shape fast. Hitex (UK) Ltd. Tel: 024 76692066 Fax: 024 76692131 EmaihsalestFhitex.co.uk Web: www.hitex.co.uk/bigchip A tf-Wri m lAh£ To components - Microcontrollers ■ and more — Allows users with no programming skills to design complex electronic systems or contact us for a full colour brochure LULU email: saIes8matrumul!imedia.co.*jk mStfiX tel: 0870 700 1831 fax: 0870 700 1832 multimedia • Allows you to program PICmicros and test your programs • Designed for education, hobbyists and industry • Supports low cost Rash programmable PICmicro devices • Fully featured displays including 2 line LCD and quad 7-segment LED • Programs most 8, 18, 28, 40 pin devices - including those with ADC capabilities • Free download software provides seamless send and verify function • 3 CD ROM courses in C, assembly code, and flowchart programming are available for full specification see: www.matrixmultimedia.co.uk im 8 Elektor Electronics 3 2004 4 Handyscope HS3 2 cn Resolution Menu - 12, 14 or 16bits Sample Rates - 5,10,25,50,100 Ms/s models / Oscilloscope / Spectrum Analyzer / Voltmeter plus! / Transient Recorder / Arbitrary Waveform / Two hi-z probes 1:1-1:10 / USB 1.1 or 2.0 / Windows OS- all iTp Ltd 28 Stephenson Road, Industrial Estate. St Ives, Cambs. Pe27 3VVJ Telephone: 01480 300695 Fax: 01480 461654 info@itp101.com www.itp101.com www.tiepie.com • C compiler supplied • Compatible with most development tools • In-system programmable • Free Atmel debug simulator available Peripheral drivers and libraries supplied • Increasing range of expansion modules • Full web site support If!' mP A QUANTUM LEAP IN prc aim f DEVELOPMENT X •I ■ Target easily & quickly. \ uII'AnsI C ; compiler, assembler : linker all Windows32 based. y^WSource Level Debug. Full Driver Support with I • Libraries. =lMITime Multitasking OS with ! a free run time licence. =R|E Unlimited email support./ p 9 • The fastest 68000 bas /{j • Extensive 1/0:- Serial, I IrDA, SPI, l 2 C, Analogue, I i Timers/Counters, RTC, etc. f • Large Memory Capacity: Flash, SRAM, DRAM. ■ r •Supports:- 1-Lt Mono & Colour LCD's, i Touch Panels & Keypads, Very Low Power. LOW COST www. cms. uk. com Check out Flexlt at www.ennovi.co.uk see our web site for full details enqovijtd 0 +44 ( 0)1435 478884 salesSennovi.co.uk Precision measurement Embedded control Intrinsic safety Internet embedded systems USB interface CAMBRIDGE MICROPROCESSOR SYSTEMS LTD Unit 17-18 Zone 'D' Chelmsford Rd. Ind. Est. Great Dunmow, Essex CM6 1XG Telephone: 01 371 875644 email: sales@cms.uk.com 3 2004 Elektor Electronics DrDAQ Data Output — Resistance ~Jj/oltage Light level Temperature Microphone External sensors: Humidity Temperature 02 In Air Reed Switch • Low cost^under £60 • Built in sensors^for light, temperature and sound (level and waveforms) • Use DrDAQ to capture fast signals • Outputs for control experiments • Supplied with both PicoScope (oscilloscope) and PicoLog (data logging) software For more information on DrDAQ, please visit: www.picotech.com/drdaq87 Scope and spectrum analyser functions A fraction of the cost, of benchtop scope Save multiple setup)/ for ease of use Save, print and e-mail your traces FREE technical support for life ~ FREE software and upgrades f Automated measurements l AVe-2/2 Virtual Instrument For more information on our scopes, please visit: www.picotech.com/scope1 56 Tel: 01480 396395 Fax: 01480 396296 E-mail: sales@picotech.com i» -- - T-e 1553GE3 > do*. -\tm -|;t» -| ; cm -|;o« d ■J 7 echnology Li mi led N 'PRODUCTS Long-wave Time Oki Electric has developed a long-wave time code receiver, the ML6190A, based on SOIC- MOS (silicon-on-insulator com- plementary-metal-oxide-semi- conductor) technology, an industry first. By using fully depleted SOI-CMOS technol- ogy, the chip provides highly sensitive radio reception func- tionality, together with a one- third or better reduction in power consumption compared to existing time code receivers. Oki has already started ship- ping sample shipment, and expects volume shipments to commence December 2003. The ML6190A uses fully depleted SOI-CMOS technol- ogy, which involves forming CMOS on an SOI substrate in which an insulated film is buried, instead of a silicon substrate. As transistors are created on an insulation film the chip consumes quite a low current, which in turn, decreases the concomitant Code Receiver 1C thermal noise. Noise transmit- ted from the substrate is also decreased, as transistors are completely isolated from the substrate by the insulation film. This construction has very high sensitivity. As current consumption is one- third or better compared with existing time code receivers, the new ML6190A is ideal for small, portable devices. It can also be used for time correction applications in audiovisual equipment, home appliances, PCs and car clocks. SOI-CMOS technology excels in the level of integration of digital and analogue circuits into a chip, because the tran- sistors are completely isolated from the substrate by an insu- lated film, which reduces the noise transmitted to analogue circuits from digital circuits via the substrate. Based on this technology, Oki plans to inte- grate a receiver circuit with a decoder circuit, a driver circuit. or a watch LSI, so further e n h an cing its product line-up The ML6190A is an RF receiver for time code signals transmitted over long-wave frequencies ranging from 40 kHz to 100 kHz. Voltage sensitivity is 0.7 pVrms and the input voltage range is from 0.7 p Vrms to 100 mVrms. Cur- rent consumption is 17 pA, which is from one-third to one- tenth of that of bipolar devices. By using two connected crys- tals, the ML6190A is able to receive two different radio fre- quencies. The LSI comes in a particular small package ver- sion 20-pin SSOP with dimen- sions of 6.5 mm length, 4.4 mm widths and 1.45 mm height. Operating temperature range is -40 °C to +85 °C. OKI Semiconductor (UK) Ltd., 3 Elongate, Windsor Road, Slough, Berkshire SL1 2JA. Tel: +44-1753-787700, fax: +44-1753-517195. Web: www.oki.com ( 047012 - 7 ) mmum Internet www.elektor- elettronits.to.uk £12.05 (USS 21.25) PER VOLUME Free & Shareware 2000-2003 This series contains hundreds of freeware and shareware programs related to electronics. Interest fields include audio, components, test and measurement, development tools, simulation, CAD and RF systems. Applications vary from schematic capture including digital and ana- logue simulation right up to PCB design, complete with calculation tools and microcontroller develop- ment tools. Depending on their ori- gins the programs run under Win- dows, DOS and'or Linux. Each CD- ROM (except Volume 2000) contains a PDF file with a clear overview of programs on the CD-ROM. The EIT retails at £ 8-25 (US$9.50) Mnraun compute caprao*: K3S6/484/pe3t«joi; si least 4 HI UK; Woton 3.1 At 1/95/91; at least 2 HI free sp«e on lad isle. The new Elektor item Tracer (EIT) is now available! EIT contains the digital con- tents list of all articles (except news columns) pub- lished in the magazine over the period 1985-2003. EIT 1985-2003 is a user-friendly program supplied on a 3.5- inch diskette, running under Windows and offering an attractive graphics interface. The program allows searching for various keywords or combinations, such as name of article: name of component; classification (audio, computers, etc); special components; order number of PCB or software item. EIT prints hard copy via the Windows printer driver. OrDK HOW USING THt ODDER FORM IN THE READERS SERVICES SECTION, OR WRITE TO P.0. Box 190 • TsoEridgt Writs TH5 7WT • bgM TriabffiK +44 (0) 1580 200 657 • Fez +44 (0) 1580 200 616 Internet www.elektor-eleqronics.co.uk - t rmiLUDLLCSE twi rucTJos cs & cojoum uxr-xi ■.= 3/2004 Elektor Electronics 11 RF&CQMMS Build Your Own DRM Receiver A digital radio for 500 kHz to 22 MHz Design by B. Kainka One again Elektor Elec- tronics makes its com- petitors take a very dis- tant back seat by pub- lishing the world’s first homebuilt DRM receiver for digital (MP4-quality) broadcasts in the medium and shortwave bands. The receiver is of a surprisingly simple design and supplies a 1 2- kHz output signal for easy connection to your PC’s soundcard which handles the demodula- tion and MPEG decod- ing. The receiver is also tuned by the PC via an RS232 link. 12 Elektor Electronics 32004 RF&COMMS On 15 December 2003, DRM (Digital Radio Mondial) entered a new phase on the shortwave and medium-wave bands. The encoding was changed to MP4 in order to improve the qual- ity of the received audio signals even further. The unique receiver described in this article was devel- oped for all readers interested in lis- tening to DRM broadcasts at a mod- est investment. One of the targets set for the design was good receiver perfor- mance without any adjustment points. No special inductors or t unin g capacitors are used in this project, just off-the-shelf fixed inductors. This, we hope, encourages those readers with more experience in digital elec- tronics than RF design and construc- tion. There’s no adjustment to worry about and no need for special test equipment. A very simple software- driven alignment is sufficient to illu- minate tolerances in the oscillator fre- quencies used in the circuit. The basic operation of DRM and in particular its signal encoding and transmission method was described in Elektor Electronics December 2002 [Ij. Exactly one year later, in the December 2003 issue [2| we ran an article describing how DRM signals could be picked up and turned into audio using an experimental receiver based on our DDS RF Signal Genera- tor and a PC or notebook. The pre- sent DRM receiver also contains a DDS (direct digital synthesis) chip. The two articles mentioned above provide a good technical background to the workings of DRM and were published at a time when none of our competitors was able to come up with technical specifications on DRM let alone an experimental yet repro- ducible receiver. The publication of this article is sure to increase the distance. A DRM interface It is perfectly possible to view the receiver as a DRM interface for the PC. As illustrated in Figure la, the DRM receiver has two links to the PC. By way of an RS232 connection, it gets digital control information for timing the DDS to the desired DRM broadcast station. As opposed to a normal radio or 3/2004 Elektor Electronics . general coverage receiver the DRM receiver does not supply an audio signal you can make audible using analogue means like headphones, a loudspeaker or an audio amplifier. Internally, the DRM receiver mixes the signal received from the DRM station down to an IF (intermediate frequency) of 12 kHz. Its output therefore supplies a mix of modu- lated carriers that together convey the audio signal in the form of a dig- ital datastream. This DRM spectrum, a m i x of various frequencies covering a bandwidth of 10 kHz, is connected to the Line input of the PC sound- card. Alternatively the Microphone input may be used if the signal is rather weak. The DRM signal is digi- tised by the soundcard, while a spe- cial DRM receiver program looks after the demodulating of the DRM signal as well as the decoding of the MP4 datastream. Again, all demod- ulation and decoding is done in soft- ware. The resulting hi-fi stereo audio signal is then available at the output of the soundcard for reproducing by a (PC) loudspeaker or headphones. Double-conversion As you can see from the block dia- gram (Figure lb), the signal received from the DRM station is mixed two 030365-1 -12J Figure I a. The DRM receiver has two connections to the PC: a serial link for the receiver tuning and a connection feeding an MPEG datastream to the Line or Microphone input on ffie soundcard. All decoding and demodulation is done in software. times — first, a variable oscillator frequency is used to mix it down to a fixed intermediate frequency (IF) if 455 kHz. This provides the station tuning on the receiver. The second heterodyning operation is against a fixed 467 kHz signal in order to mix the 455-kHz signal down to 12 kHz. Using receiver termi- nology, the DRM receiver is a ‘double-conver- sion’ or ‘super-heterodyne’ type. The first injection signal is obtained from a synthe- G3Q365-1 -1S> Figure i b. The block diagram of the DRM receiver reveals a double-conversion ('super- heterodyne') design with intermediate frequencies at 455 kHz and 1 2 kHz. 13 RFftPOMMS sised oscillator supplying an output fre- quency that's programmable by means of control data generated on the PC and sent to the receiver over the RS232 link . The second injection signal at 467 kHz originates from a ceramic resonator. Practical circuit The block diagram is easily found back in the circuit diagram shown in Figure 2. The DDS oscillator based around IC2 supplies an output signal to the first mixer (MIX1) via a buffer stage, Tl. In case you’ve never seen such a beast, MIX1 is a wideband double- balanced diode ring mixer. The IF signal at 455 kHz is taken through a steep ceramic filter (Fll) with 12-kHz bandwidth. An IF amplifier stage around T2 raises the level by about 20 dB before the signal is applied to the second mixer comprising (pas- sive) FET T4, a type BF245. The sec- ond injection oscillator is frequency- stabilised by a CSB470 ceramic res- onator (XI) whose nominal output frequency is pulled down by 3 kHz to arrive at 467 kHz. The 12-kHz IF sig- nal at the drain of T4 goes through a Figure 2 . The practical circuit of the DRM receiver is marked by PC-driven tuning of a DDS oscillator and two large-signal resistant mixers. 14 Elektor Electronics 3 2004 RF&COMMS Figure 3. The PCB is double-sided and through-plated. All parts in the RF sections have to be soldered with the shortest possible lead lengths. COMPONENTS LIST Resistors: Rl = 3kD9 R2 = 68012 R3 = 330Q R4 = 1 801 > RS = 39GG R6.RI3 = I00kl2 R7.R9 = I00t) R8.RI0 = 2kl22 Rl I = 220kl2 RI2 = Ikl2 R 1 4 = 3kfi3 RI5.RI6 = S60kt2 RI7 = 27kl2 RI8 = 220kfi Capacitors: CI-C4 = lOOnF, SMD, case shape 1208 C5.C6 = I5 P F C7.C8.CI I ,C 1 4.C 1 7.C23.C24.C25 = lOOnF, lead pitch 5mm C9 = I nF8, lead pitch 5mm CIO = 3nF3, lead pitch 5mm CI2.CI3.C2I = 4uF7 16V radial CI5.CI6 = 470pF C 1 8.C 1 9 = I nF. lead pitch 5mm C20 = 4nF7. lead pitch 5mm C22 = 470nF Inductors LI = 3uH3 L2 = IOpH L3 = lOOjrH Semiconductors: Dl = IN400I TI.T2 = BF494 T3 = BC548C, BC549C or BC550C T4 = BF245C 1C I = MCI489N IC2 = AD9835 BRU (Analog Devices) IC3 = LM358N IC4 = 7805 IC5 = 50MHz oscillator module in 8- way or 1 4-way DIP case Miscellaneous: Kl = 9-way sub-D socket (female), angled pins, PCB mount K2 = 2 solder pins K3 = mains adapter socket K4 = cable with 3.5-mm mono or stereo jack plug MIXI = TUF-1 (Mini Circuits) FLI = CFW455F (455kHz ceramic filter, bandwidth 1 2kHz) (Murata) X I = CSB470 (470kHz ceramic resonator) (Murata) RS232 cable with I : I pin connections, plug and socket, no zero-modem or crossed wire cable. PCB. order code 030365- 1 * Disk, PC software DRM.exe. order code 030365- 1 1 * or Free Download * see Readers Services page or visit www.elektor-electronics.co.uk Suggested component/ kit suppliers: - Geist Electronic (www.geist-electronic.dei - Segor electronics ( www.segor.de ). - AK Modul Bus ( www.ak-modul-bus.de ) simple bandpass filter before it is buffered and amplified for another 20 dB by two opamps, IC3.A and IC3.B. The output of the second opamp supplies the MPEG datas- tream to the PC soundcard input via coupling capacitor C22. The nitty-gritty of DRM reception is not stability or even spectral purity but extremely low phase noise of the injection oscillator. In this respect the DDS VFO gets full marks because it fully meets this require- ment, hence our DIY DRM receiver is an excellent performer.' Another important design consideration, large-signal response, is fully covered by the passive double-bal- anced mixer used. The results obtained from our prototype were impressive, to say the least: with a simple wire antenna connected to the receiver input, the DRM software achieves 30 dB quieting, a value only matched by expensive receivers. Because a couple of characteristics that are crucial in the context of AM reception are less important with DRM, the circuit is able to achieve such excellent results despite the heavily simplified and alignment-free realisa- tion. The joint dynamic range of the DRM soft- ware and the PC soundcard is sufficient to cope with signal variations of up to 30 dB, which are not uncommon on SW and MW. This conveniently saves on an ALC (auto- matic loudness control) circuit. High receiver sensitivity is not an issue for DRM. Very weak DRM signals (say, below 10 pV) do not improve by increasing the receiver gain because the actual signal to noise ratio is insufficient at a large bandwidth lik e 10 kHz. A nu m ber of practical tests proved that the receiver can make do without a tuned front- end. For one, the image frequencies at a dis- tance of 910 kHz (2 x 455 kHz) will nearly always fall outside the neighbouring broad- cast bands. On the other hand, the DRM soft- ware is remarkably tolerant of interference thrown at it. Of course, the above considerations should not keep you from using a preselector and a matching antenna if you have a fine combi- nation available. If not, rest assured that a 3- 10 m long free-hanging wire is sufficient for direct connection to the mixer RF input. Details The antenna input directly on the double-bal- anced TUF-1 mixer has an impedance of 50 £2. The mixer does the frequency conversion to 455 kHz at a low impedance. The TUF-1 is designed for a frequency range of 2-600 MHz. However, it may operate below 2 MHz with some reduction in the input impedance and 3 2004 Elektor Electronics 15 RF&COMNS the occurrence of a strong inductive compo- nent. In practice, however, the receiver was found to work satisfactorily even down to 500 kHz in the MW range. The output of the ring mixer is connected to a wideband matching network for 455 kHz. The impedance is stepped up using a reso- nant circuit with a 1:10 ratio capacitive tap. The result is an impedance of about 1 kfl to suit the CFW455F ceramic filter. High accu- racy is not an issue here because the actual antenna impedance will typically be higher than 50 C2. The resonant circuit employs a fixed 100-pH inductor with a low Q factor (<10), ensuring a bandwidth greater than about 50 kHz yet avoiding component toler- ance issues. Consequently, no alignment is required on the inductor while the step-up matching circuit still adds to the remote signal rejection of the IF filter. The CWF455F has a bandwidth of 10 kHz, with 10 kHz being occupied by DRM and the remaining 2 kHz, well, harmless. Actually, a little more bandwidth is important to have as it provides a way of compensating frequency deviations of the second injection oscillator. For example, if the oscillator runs at 467.5 kHz instead of 467.0 kHz, the first IF is automati- cally shifted up to 455.5 kHz, which may be countered by the software retuning the DDS 500 Hz ‘up’. After all, a nominal frequency of 12 kHz must be maintained at the output of the receiver. The slightly shifted IF will eas- ily fit in the bandpass of the IF filter, allowing us to omit an expensive second oscillator and design one around a cheap ceramic resonator type CSB470. Due to the large capacitance presented by the oscillator (C15 and C16), the resonator is pulled down 3 kHz with a toler- ance of about 1 kHz. The IF signal is raised by about 20 dB by a single transistor stage (T2). Overdriving is unlikely to occur because the signal levels are relatively small due to the slight attenuation by the IF filter and the absence of prestage or mixer gain. JFET T4 operates as a passive mixer, that is, a switch for RF signals, being opened and closed by the 467-kHz local oscillator signal. Besides utter simplicity, the main advantage of a passive FET mixer is its large dynamic range — signal levels up to 100 mV are han- dled without problems. DDS tuning The DDS VFO based on an AD9835 from Ana- log Devices is controlled almost directly from the PC's serial port. An MC1489 RS232 receiver chip (IC1) takes care of the swing conversion. Although the DDS clock signal of 50 MHz would allow a highest receiver fre- © © r*> ® o o ® O CD CD CD GD CD Q CD a cd GD CD a cd 0 0 □ O 0 G oo O O 000 V/ QQO 08 Q §°o Gpp O °oo°o o © 0 Figure 4. Component mounting plan of the board tested and approved by the Elektor design laboratory. The large copper plane allows short ground connections. 16 Elektor Electronics 3 2004 RF&COMMS Rgure 5. The DDS 1C (only available in an SMD case) is soldered to the underside of the board, together with four SMD capacitors. quency of 25 MHz, the output sig- nals near this frequency become too weak and 24 MHz should be regarded as the absolute limit. A simple low-pass filter (C5, LI, C6) with a roll-off at about 24 MHz pro- vides sufficient rejection of harmon- ics. Likewise, an additional amplifier, Tl, ensures sufficient LO drive for the mixer. Analog Devices offers a wide range of DDS integrated circuits including a few with a higher clock frequency. The AD9835 was chosen for its relatively low cost and easy availability (Segor Electronics, Geist Electronics, Barend Hendriksen). The low intermediate frequency of 455 kHz causes a VFO frequency that's only a little above the received signal. The upper limit of the VFO frequency range is not sharply defined — the VFO output level will simply drop gradually above 20 MHz or so. As an aside, this allowed us to receive the Deutsche Welle DRM broadcast from Trincomalee, Sri Lanka, without too much of an effort. The receiver is tuned by a program called DRM.exe, which makes provision for the receiver calibration. The inset ‘Step-by-Step' tells you how to start using the receiver. When DRM.exe is first started, it needs to be told which COM port you want to use. The program default is COM1 which may be changed into COM2, for example. By clicking on ‘Save Setup' the COM port selection is saved in a file called ‘init.txt’, along with a few other salient parameters for easy retrieval the next time the program is used. As soon as the serial connection’ is successfully estab- lished, the slider (at the top in Figure 6) may be used to time the receiver with 1-kHz reso- lution. The arrows at the edges cause 1-kHz steps, a click in the areas beside the slider, a step of 10 kHz. Calibration Frequency calibration is required because the two local oscillators in the receiver are sub- ject to a certain tolerance for which no hard- ware adjustments are available. First, the software needs to know the exact frequency of the 467-kHz oscillator. Adjust the receiver fre- quency to 0.00 (slider to leftmost position) and start the DRM software. (Note: in the fol- lowing description is it assumed that the pro- gram 'DRM Software Radio' from Fraunhofer IIS is used — however, it is also possible to employ ‘Dream’ (see ‘Decoder Software’ inset). No antenna should be connected at this point. The spectrum (Figure 7) will show a straight line caused by the first oscillator being tuned to the intermediate frequency. (Note: if the receiver were switched on after Step-by-step The following sequence is suggested when connecting the receiver to a PC. 1 . Connect the I : I RS232 cable to the PC and the receiver. 2. Connect the receiver output to the Line input of your soundcard by means of a screened audio cable. 3. Switch on the receiver, 4. Launch the DRM software on the PC; select soundcard as target and source. 5. Double-click on the loudspeaker symbol in the right-hand bottom corner of the Windows desktop (or via Programs - Accessories - Entertainment - Vol- ume Control) to open the volume control window (the one with the slide controls). 6. Select Properties, then Options and check the box Adjust volume for: Recording. 7. Check the box for the soundcard input you want to use (Line or Microphone) and click OK. 8. In the window that pops up. adjust the volume of the desired input. 9. Return to Options - Properties and now select Playback. Disable all inputs (remove the check mark) except for the one you’re using for the receiver (normally Wave). Use the two slide controls at the left-hand side to control the volume on the PC loudspeakers. 10. Launch DRM.exe to tune the receiver to a DRM station. Rgure 6. Windows program DRM.exe for the receiver tuning in action. 3 2004 Elektor Electronics 17 RF&COMNS launching the software, the line does not become visible after you Ve moved the slider a little. If the line still does not appear, the receiver's output signal may be too small for the Line input — change to the microphone input and try again. Receiver noise should be just visible in the lower part of the screen. Pos- sibly, the line falls outside the screen area — adjust the slider until the line appears). Next, the upper slider in the Setup Range has to be adjusted for the line to appear exactly in the centre of the spectrum. If that is achieved, the Spectrum Status Qts.i u. CD •O! -20 J -40 - -60 ■ -SO ■ -100 ^ Audio £ Data O Sync . . Figure 7. Illustrating IF calibration, here using the program DRM Software Radio (v. LiSting I 2 034) VB code snippets Const XTAL = 40000 Const IF1 = 454.3 Private Sub output (Data) TXD 0 Delay 0 . 1 DTR 1 ' CE Delay 0 . 1 BitValue = &H8000& For n = 0 To 15 If (Data And BitValue) > 0 Then RTS 0 Else RTS 1 Delay 0.1 TXD 1 ' clock Delay 0.1 TXD 0 Delay 0.1 Delay 0.1 BitValue = BitValue \ 2 ttext n Delay 0.1 DTR 0 Delay 0.1 End Sub Private Sub LO(freq) HScrolll .Value = freq Label 1. Caption = Str$(freq) + " kHz" Dim frg As Long Dim freqLo As Long Dim freqHi As Long Dim Daten As Long freq=f req+IFl ‘add IF1 f rg=Int ( f req/XTAL* 4294967296 #) freqHi=frg\SH10000 freqLo=frg-freqHi*SH10000 freqLoL=freqLo And &HFF freqLoH freqLo\SH100 freqHiL=freqHi And &HFF freqHiH=f reqHi \ &H100 output SHF800& 'Reset ‘4 Bytes to FREQ0 output (SH3000S + freqLoL) output (&H2100& + freqLoH) output) &H3200& + freqHiL) output) SH2300S + freqHiH) output SH8000& 'Sync output SHC000S ‘Reset end End Sub receiver supplies an output signal of exactly 12 kHz. On our prototype, the setting was found to correspond to a frequency of 466.4 kHz from which we can conclude that the second oscillator had an error of 600 Hz. This error, then, is compensated by the software offsetting the DDS oscilla- tor by the same amount. The adjust- ment range of the calibration is ±2 kHz. The second step is to eliminate the error in the DDS clock oscillator frequency. The 50.000-MHz quartz crystal oscillator has a basic toler- ance of ±100 ppm or 100 Hz per MHz, so that a final error of up to 5kHz may occur at 50 MHz. Conse- quently, the error would be 1 kHz for a receive frequency of 10 MHz. The calibration begins by connecting the antenna to the receiver input and tuning to a strong AM station in the shortwave range (tune using the top slider in DRM.exe). The vast major- ity of SW broadcast stations can be used as frequency standards, their station frequencies complying with high stability standards and a 5 -kHz raster. Figure 8 shows the spectrum of an AM transmitter at 6805 kHz. The lower slider has to be adjusted for the carrier to occur exactly in the centre. Theoretically, a this point you would have to repeat the first cali- bration step, then the second and so on. In practice, that is not necessary because the small error in the clock oscillator frequency amounts to no more than 1% in the IF range. With an error of 1 kHz at 50 MHz estab- lished, the error at 455 kHz is an insignificant 10 Hz. The DRM soft- ware we propose to use requires an absolute accuracy of ‘just’ ±500 Hz. When you are done calibrating the oscillators, do not forget to save the setup data to make them quickly available again the next time the receiver is switched on. By the way, more data is saved, including the current station frequency. Station buttons may be linked to your pre- Spectrum Status Figure 8. Using an AM broadcast station carrier as a frequency reference. 18 Elekior Electronics 3 2004 RF&coms Decoder software In addition to the tuning program DRM.exe (supplied by Elektor on disk or as a Free Download) you will require DRM demodulation/decoding software that works in combination with your PC soundcard. Two products are available on the market. DRM Software Radio produced by the German Fraunhofer IIS (currently ver- sion 2.034) may be obtained at a cost of 60 Euros (approx. £43) from an online shop facility at www.drmrx.org. Payment for your order is by credit card. The download information and a software key arrive by email. The latest version sup- ports the new MP4-based DRM standard introduced on 15 December 2003. Nearly all DRM stations now broadcast in stereo and achieve excellent sound quality using the new format. The DREAM open-source project from Volkert Fischer and Alexander Kurpiers (a former Elektor author) of the Darmstadt University Institute for Communica- tions Technology is currently available as version 1 .0. The program is only sup- plied in the form of a C++ source code file because the authors have employed third-party modules that have to be obtained from the respective owners. The DREAM code itself may be found at http://sourceforge.net/projects/drm/ The project may be compiled for Windows as well as Linux. If you are less than conversant with a C++ compiler, ask around for assistance with the creation of the files. DREAM_VI .0 has evolved into a serious alternative to the DRM Soft- ware Radio package. The program is stable and now presents less of a CPU load than before. Meanwhile, the reception of pictures has become possible and the program is also capable of writing a log file containing reception reports. DREAM is very tol- erant in respect of the exact frequency of the DRM baseband and will faithfully scan the complete range from 0 to 24 kHz. AM reception has been added as an extra mode, allowing the DRM receiver to be used for classic broadcast reception on the long- medium and shortwave bands. In a future issue we will return to the DRM software decoder in greater detail. The DRM programs mentioned above are compatible with Windows 98 and up (i.e., 98, 2000. NT and XP). Figure 9. GUI produced by the Visual BASIC example program written for the receiver tuning and station preselect functions. ferred frequencies and they to are saved in the setup file. The file is editable using a word processor. So, if you (against sound advice) decide to overclock your DDS at 60 MHz, the new frequencies may be entered here. Control using Visual BASIC The PC-controlled tuning of the DRM receiver opens a lot of potential, including, for instance, labelled preselect buttons for your favourite stations, or timer-driven tuning to certain scheduled broadcasts. Moreover, the DDS may be used for measurement purposes. To give all readers maximum freedom in fur- ther experiments, the DDS control is explained here using a small example. The user interface produced by the example pro- gram is shown in Figure 9. The program employs one slider control, quick tuning but- tons and two boxes for free tuning. Calibra- tion facilities are not provided for the end user, the calibration being performed by con- stants hidden in the program. The two decisive procedures of the pro- gram are shown in Listing 1. Using output (Data), 16 bits are shifted into a register inside the AD9835. The procedure LO com- putes the frequency and the required register contents of the DDS component. The output frequency is adjusted through a 32-bit value, the step size being 50 MHz/2 32 = 0.01164 MHz. The allocation of thee regsisters and their addressing in the upper part of the 16-bit control word is detailed in the AD9835 datasheet. The program example shows the seven essential register contents needed to actually set the DDS frequency. A frequency ‘word’ is divided into four bytes conveyed to four partial registers. Near the top of the source code you'll find two constants that have to be adapted to enable te frequency to be calibrated. The nec- essary data are taken from the ready-made user program for the receiver. XTAL = 50000 stands for the exact clock oscillator frequency, while IF1 = 455 defines the intermediate fre- quency. At a frequency of 466.3 kHz the IF becomes 466.3 kHz - 12 kHz = 454.3 kHz. The software controlling the RS232 traffic is a BAS module already described in [3j. (D3G36S-I) For further reading: [1] 'Digital Radio Mondial'. Elektor Electronics December 2002. [2] ‘An Experimental DRM Receiver'. Elektor Electronics December 2003 [3] PC Serial Peripheral Design, parts I -7. Elektor Electronics September 2000 - March 200 1 3 2004 Elektor Electronics 19 TKT & MFASLJRFMFNT Multifunction Frequency Meter For all time-related measurements Design by R. Zenzinger Despite its surprisingly simple hardware design and construction, the superb frequency meter / event counter described in this article couples ease of use to a plethora of measurement options. The successful combination is mainly due to the use of a microcontroller running some really ingenious software. The keywords in the general design of the instrument were noise immunity, reliability and functionality. 20 Elektor Electronics 3 2004 TEST&MFASl JRFMFNT Main Specifications and Functions - Frequency measurement using 3 gate times - Period duration measurement in milliseconds and microseconds - Pulse duration measurement of positive and negative half cycles in milliseconds and microseconds - Event counter up to 1 0 7 events - Stopwatch v/ith lap time function: resolution 1 0 ms - 8-digit 7-segment LED readout - Selectable pause of I -5 s or manual restart - Resolution 0. 1 microsecond or 0. 1 second - 4 MHz maximum input frequency - I microsecond minimum pulse length - 1 ,000 s maximum pulse length - 1 0 mV - 5 V input voltage range protected up to 30 V (higher swings possible by adding an external voltage divider) - Overflow indication; leading-zero suppression; measurement error signalling - Tried, tested and approved by the Elektor design laboratory A frequency meter / event counter is an indis- pensable instrument on the electronics labo- ratory workbench. In general, the basic cir- cuit of the instrument is not particularly com- plex. Digital integrated circuits have been available for quite some time that are capa- ble of performing frequency and time mea- surements, as well as pulse counting. The same ICs also cheerfully handle the job of dis- playing measurement results on an LC or LED display. These days, counters are just ‘add-ons' to function generators and get the matching amount of attention! So what should a multi-purpose frequency meter be capable of doing for you? Absolute priority, we feel, should be given to the mea- surement accuracy, which you should be able to rely on for many years (‘long-term stabil- ity'). Of course, a wide frequency range is desirable, without breaking the bank! Also, the instrument should be suitable for a good Figure I . Grcuit diagram of the Multifunction Frequency Meter designed around an Al 90S microcontroller. 3 2004 Elektor Electronics 21 TEST&MFASl JRFMFNT many measurement functions while being easy to control. Add to that the sensitivity and noise immunity issues, and you'll appre- ciate that it will be hard, if not impossible, for all these requirements to be fulfilled without the odd compromise. So what does our instrument have to offer? To begin with, we have a frequency range of DC to 4 MHz. This may look a bit measly, but it does strike a good compromise. On the one hand, higher frequencies should not occur that often (unless your are into radio ama- teurism or RF design in general). On the other hand, a measurement range extending into the megahertz or even gigahertz ranges poses considerable problems in the design and realisation of preamplifier and prescaler units which serve to shape and reduce (i.e., divide) the measured frequency down to val- ues that can be handled by a microcontroller like the one we’ve in mind. The same design effort could be used to implement high mea- surement accuracy for our instrument. The measurement error is ±100 ppm ±1 digit. The description 'multi-function' would be misleading if our instrument were able to measure just frequencies. In fact, it is capa- ble of capturing pulses with a minimum dura- tion of 1 /vs and pulse / period durations of up to 1,000 seconds. The input signal level may lie between 10 mV and 5 V. In order to mea- sure larger signals, external voltage dividers may be added to your requirements. Like- wise, the frequency range of the instrument may be extended by the addition of an exter- nal prescaler. The measurement function is selected using a 16-position BCD rotary switch, and the measurement result appears on a bright 8-digit LED display. A complete overview of all functions offered by the instru- ment may be found in the Table. Microcontroller and peripheral circuitry A block diagram of the multifunction fre- quency meter would be superfluous at this point. After all, the functional elements that make up the circuit — microcontroller, read- out, mode switch, signal conditioning and voltage supply — are easily spotted in the actual circuit diagram shown in Figure 1. Let's have a look at the practical realisation of each of these blocks before discussing the available measurement modes and the asso- ciated software. The heart of the circuit is an AT90S2313 microcontroller from Atmel. The micro is clocked at a frequency of 10 MHz and offers no fewer than 15 configurable I/O lines divided across two ports. The lines in Port B are all programmed as outputs, driving the individual segments of the 7-seg- ment displays. By contrast, the lines in Port B have different functions, acting as inputs or outputs. Only PD0 and PD4 are invariably output lines with their internal pull-up resistor (approx. 50 kO) activated. PD.l, PD. 2 and PD. 3 are only active after a reset or when a different measurement mode is selected on the rotary switch. During operation, output mode is selected in order to drive the display. Port lines PD.5 are configured without internal pull-up resistors. However, with an open-circuited input these lines should be at ‘O'. This is achieved with the aid of R9. Inputs PD.5 and PD.6 are effectively connected in parallel through decou- pling resistors R15/R12. This is nec- essary because PD.5 has a special function in directly driving the inter- nal timer/counter, without m akin g use of the cyclic program. This is particularly useful in the case of rel- atively high frequencies. PD.6 trig- gers an interrupt routine and responds immediately to the input signal. This is essential for period / pulse measurements on very short- lived signals. In Clock mode, when PD.5 and PD.6 are configured as out- puts, resistors R12 and R15 limit the current to a safe level. Signal conditioning A 14-way pinheader, K2, carries the link between the measurement sig- nal as well as the signals to and from the external control elements. The measurement signal arrives at the measurement amplifier input by way of K2.6. Resistor Rll ensures a sta- ble Low level when the input is open-circuited. R13 and fast Schot- tky diodes D5/D6 protect the input against damage caused by voltages exceeding about 30 volts. A zener diode in this position would cause too much attenuation of high fre- quencies, or rounding off of fast pulse edges. The measurement signal is now ready to be taken to pins 9 and 11 of the microcontroller, via jumper JP1. This is particularly useful when you are dealing with TTL signals having a swing of 0/5 V, whose frequency is too high for conditioning by the com- parator. The circuit around compara- 22 tor IC3.A only acts when the jumper is in the other position, when the signal is fed to the non-inverting input of the LM393 via R19 and R21. The inverting input is held at a fixed level (threshold) of 2 V by R17/R18. If the input voltage at pin 3 exceeds this level, the comparator toggles and with it the logic state of port lines PD.5 and PD.6. By the addition of R22, the comparator is given some hysteresis to prevent slow pulse edges causing spurious oscillation. So far, we have assumed that nei- ther jumpers JP2, JP3 or JP4 are fit- ted, nor connections have been made to pins K2.8-K2.13. Jumper JP4 actuates voltage divider R16/P1/R14. These resistors are clearly smaller than R17/R18, pre- venting the voltage divider from hav- ing an effect on the adjustable threshold set at the inverting com- parator input by means of PI. The potentiometer, by the way, may be relocated to the instrument front panel. In that case, preset PI is omit- ted from the board and pins K2.9, K2.10 and K2.ll are used to connect the potentiometer through wires. With the values shown in the circuit diagram, tire span ranges from about 10 mV to 3.7 V, which nicely matches the realistic operating range of an LM339 opamp at a supply of 5 V. Jumper JP2 (or an external con- nection of K2.12 to ground) brings R13+R19/R20 into circuit, causing the measurement voltage to be halved. As a matter of course, an external voltage divider will allow higher voltage swings to be accom- modated. Jumper JP3 (or a link to ground via K2.13), finally, actuates damp- ing capacitor C8, whose effect is beneficial if you're faced with noisy signals or when driving the input by a contact. Besides the measurement input, there are two more connections from K2 to the microcontroller. K2.3 is a digital control input leading to PDA. The input protected by R10 and zener diode D4 may be used for additional functions. C7, finally, serves to debounce signals supplied by an external contact. Pushbutton SI is the Reset or Start control. Debouncing and damp- ing is effected by R1 and CIO. R3 protect the sensitive contacts on SI. Elektor Electronics 3/2004 TEST&MFASI IRFMFKfT Optionally, a second pushbutton may be connected to pin K2.1. This connection is protected up to 30 V by means of R2/D3. The instrument mode is selected by the user on rotary BCD switch S2. The four BCD lines A-D are taken to microcontroller port lines PD.0- PD.3 by way of R4-R7. Port lines PD.l, PD. 2 and PD. 3 have double functions In operation, these lines are configured as outputs, multi- plexing the displays. This is also the reason for the presence of current limiters R4-R7, which prevent dam- age caused by short-circuits. The readout A 74HCT42 IC decodes the three BCD lines required for an 8-digit readout to decimal format. Transis- tors T1-T8 enable all display digits in succession at a refresh rate of about 80 Hz, each transistor carrying a cur- rent of about 160 mA when switched on. The display tum-off delay should be as short as possible (less than 1 microsecond) to prevent overlap in the display-enable signals occurring and causing undesirable visual effects on the readout. In this circuit, this effect is eliminated by software, allowing ‘not too fast’ transistors to be used. All identically named segments of the 8-digit readout are taken together and driven directly via Port B. The current limiting needed for the LED segments is realised by resistors R40-R47. Power supply The 8-12 VDC supply voltage for the instrument is applied via PCB termi- nal block Kl, with diode D1 acting as a reverse polarity protection. The voltage regulator, a 7805 (for 1 A) is fitted with a small heatsink if it is to handle rather high input voltages (up to 15 V). If a much lower voltage is used, then the PCB ground plane will pro- vide sufficient cooling. Capacitors Cl, C2 and C3 are the usual reservoir and decoupling components. Zener diode D2 limits the circuit supply voltage to a maximum level of about 5.6 V in case too much current flows into the supply circuit as a result of the input over- voltage protection. In addition, all integrated circuits are locally decoupled with 100-nF caps (C4, C5, C6). On the board, the supply tracks to the dis- play are routed separately to prevent noise owing to the multiplex signals. After all, a pulsed current of about 160 mA flows through these tracks. Depending on the ripple voltage on Kl two more electrolytic caps, C13 and C14 may be fitted on the board. Operation Despite the low overall cost of the compo- nents used, the instrument offers a comfort- able, simple operation employing the 8-digit 7-segment display. As shown in Table 2, eleven modes are available and three auxil- iary functions (settings, really). Any one of LED readout 7 6 5 4 3 2 1 0 Mode/Function 0 — — — — — — — — None (spare) 1 8. 8. 8. 8. 8. 8. 8. 8. All segments and DP on (display test) 2 n V6 V5 V4 V3 V2. VI “ Pulse duration of positive half cycle in microseconds 3 n V6 V5 V4 V3 V2. VI — Pulse duration of positive half cycle in milliseconds 4 u V6 V5 V4 V3 V2. VI Pulse duration of negative half cycle in microseconds 5 u V6 V5 V4 V3 V2. VI — Pulse duration of negative half cycle in milliseconds 6 b V6 V5 V4 V3 V2. VI Period duration in microseconds 7 h V6 V5 V4 V3 V2. VI — Period duration in milliseconds 8 F V6 V5 V4 V3 V2 VI 0 Frequency, gate time 0. 1 s 9 F V6 V5 V4 V3 V2 VI Frequency, gate time 1 .0 s 10 F V6 V5 V4 V3 V2. VI Frequency, gate time 1 0.0 s 1 1 C V6 V5 V4 V3 V2 VI • 7-digit Event Counter 12 0 V6 V5 V4 V3. V2 VI ■ Stopwatch with lap time function, resolution 0.0 1 s 13 — — — — — — — — None (spare) 14 C F C — I..5 Pause before next measurement ( 1 -5 s) manual restart 15 c F c — Select positive / negative pulse edge V6-VI : value or count. When the measured value or count exceeds 6 digits, digit 7 is automatically added. The instrument function is then no longer displayed. Digit 7 flashes during measurements. Decimal point in digit 7 indicates overflow / limit value. 3 2004 Elektor Electronics 23 TEST&MFASl JRFMFNT Iff LD8 Cl 4 JP5 B B 6 9 0 B 0 0 9 6 B 8 B 9 0 B 8 B 9 0 0 B B 9 0 BBB£0 L f a / / / / / / / / i-i / / f 1 1 07 oooo T3 T2 C5 O ,0 0 Q 0 0 Q Q Ju ICZ To 000 00 r? goo ooq □ Ai® 1 ® OOP C12™*° IC1 OOP PI R9 IP J P1 Q q dj ii p o P I R23 I p SlQAQQ RIO I P R2 IP a R22 o c R19 o c R21 0 c R18 o >C9 o6 a [os) M JP4 JP2 |0 0j | P Oj JP3 JPPPP foppppppppppopFI ^Qj-aiL] 0 fopppooppppoopol ^oClIDo Figure 2. This double-sided board allows the versatile instrument to be built in a very compact way. these may be selected at any time with BCD switch S2. At power-on, a number of default set- tings are loaded (e.g., pause = 3 s; count edge = positive). If necessary, these set- tings may be modified via switch positions C0NFIG1 and CONFIG2. Simply select the CONFIG you want to change and press the reset key until the desired setting appears on the display. Next, determine the desired mode of operation. Each time the instrument function is changed or switched on, a new measurement cycle is launched. The displays will flash dur- ing the delay leading up to the trigger instant, as well as during the actual mea- surement. When the measurement is finished, the decimal point of digit 0 (DP.O) fights briefly. This is a valuable indication about the status of the measurement process, particu- larly in the case of short measurements and 'display refresh on end of measurement’. Depending on the values entered into CON- FIG1 a new measurement is automatically started after a fixed delay, allowing you to read the value from the display. This pause can be anything between 1 and 5 seconds in length, while it is also possible to select man- ual starting. The separate gating input (K2.3 or PDA) allows various functions to be realised for example, intermediate value displaying while in frequency meter or event counter mode. When the gating input is pulled Low, the readout will be frozen. If it is perma- nently Low, the measured value is only refreshed at the end of the mea- surement cycle, in other words, it remains visible during the entire measurement. The gating input allows a start/stop/reset facility to be realised in Stopwatch mode. Overflow is indicated by the dec- imal point in digit 7. Normally, the measured value will be displayed across display digits 1-6. When digit 6 overflows, the measured value also appears on digit 7, instead of the function indicator. When digit 7 over- flows, too, the condition is flagged by the decimal point coming on and the digit starting to flash. The over- flow indicator is also actuated with pulse duration measurements if you are applying pulses with a duration less than 1.6 microseconds, or a fre- quency greater them 300 kHz. In these cases, the display will act as a warning device. The circuit features automatic leading-zero suppression. Only in ‘refresh at end of measurement’ mode, the zeroes will appear on the display in accordance with the progress of the measurement. When the measurement is finished, the readout is refreshed. The zeroes are retained when subsequent measure- COMPONENTS LIST Resistors: RI.R23 = 33kf2 R2.RI0.RI3 = Ikfl8 R3.R 1 2,RI 5.R40-R47 = I50£2 R4-R8 = Ikf25 R9.RI7 = lOOkfi Rl I.RI8 = 68kG RI4.R30-R37 = 3k£23 RI6 = 2200 RI9.R2I = 8kf22 R20 = lOkD R22 = IMG P I = 1 0 kf 2 preset H (with spindle, see text) Capacitors: Cl = I OpF 25V radial (optionally tantalum) C3 = I OuF 16V radial (optionally tantalum) C2.C4.C5.C6 = lOOnF C7-CI0 = .47uF 16V radial optionally tantalum) Cl I.CI2 = 22pF Cl 3.0 4 = lOpF 16V radial optionally tantalum) (only if required) Semiconductors: Dl = IN400I D2.D3 = zener diode 5V6, 500 mW D4 — zener diode 4V7, 500 mW D5.D6 = BAT46 TI-T8 = BC327-25 1C I = AT90S23I3-I0PC, programmed, order code 030136-41 IC2 = 74HCT42 or 74HC42 IC3 = LM393 (8-pi DIP) IC4 = 7805 Miscellaneous: JPI = 3-way jumper JP2-JP5 = 2-way jumper Kl = 2-way PCB terminal bock, lead pitch 5mm K2.K2A = 14-way SIL pinheader 5 1 = pushbutton, I make contact (small model) 52 = BCD switch ( 1 6 positions) X I = 1 0MHz quartz crystal LDI-8 = SA52-I ISRWA (Kingbright) 1C sockets: 6-way, 8-way, 1 6-way, 20-way Heatsink for IC4 (U25, 30K/W) PCB, order code 030 1 36- 1 Disk, project software, order code 030136-1 1 or Free Download 24 Elektor Electronics 3 2004 TEST&MFASl JRFMFNT ments yield smaller values (clearing is possible by means of a RESET). With intermediate results on the readout (display refresh halted by separate input) the leading zeroes will be visible on the display as the counting operation progresses. After re-enabling the gate, the display (showing, for example, the stop- watch or the event counter) is imme- diately refreshed. Functions The function Pulse/Period Mea- surement is self-evident. As you can see on the photograph, the three horizontal segments in digit 0 are switched to indicate ps, ms or Hz units. Also on the photograph, the symbol for the actual function appears in digit 7. The decimal point appears in position 2. When the measurement is started, the instru- ment is triggered by the next (and, depending on the setting) valid pulse edge. With period measure- ments, triggering always takes place on a positive pulse edge. Optionally, a trigger threshold may be set using a comparator. This will be needed particularly with pulse duration measurements on non-rec- tangular signals. In Frequency Meter mode you have gate times of 0.1 s, 1 s and 10 s to choose from. The lower horizontal segment for ‘Hz’ will be indicated by digit 0, and an ‘F’ (for 'frequency') will appear on digit 7. The decimal point only appears on digit 2 when 10-s gating has been selected. With the other gate times, display digits 0 or 1 will show a fixed 0. In Event Counter mode the deci- mal point will light in display digit 0, while digit 7 indicates if positive or negative pulse edges are used to increment the counter. The selection is made using CONFIG2 (the default is ‘positive’). Pulses with a frequency of up to 4 MHz are counted and dis- played. Intermediate result viewing is possible by pulling the counter gate input low, which is flagged by DEO starting to flash. The Stopwatch has an accuracy of 0.01 s. Its control, (start, interme- diate value display, reset) only takes place via the separate pushbutton or input K2.3. The stopwatch defaults to the value ‘0.00 ms’ on the display. In digit 0, the central horizontal seg- ment for ‘ms’ lights and a ‘C’ (for ‘clock’) will appear in digit 7. DEO is switched off. The stopwatch is started when the pushbutton is briefly pressed. The elapsed time will be displayed and DEO will light continuously. Intermediate (lap) and finish times may be requested by briefly pressing the pushbutton again. The display will freeze and DEO flashes to indicate the ongoing measurement. When you actuate the pushbutton again, the display will be refreshed and DP.O lights again. This sequence may be repeated as many times as you like. The stopwatch is reset by keeping the pushbutton depressed longer than about 2 seconds, or by pressing the Reset switch. Figure 2 shows the double-sided printed cir- cuit board designed for the Multifunction fre- quency Meter. Despite its small size there are no dreaded SMD components to fit — all com- Construction 25 32004 Elektor Electronics TEST & MFASl JRFMFNT DIY Programming The microcontroller used in this circuit is available ready-programmed through our Readers Services. If you have the means and wherewithal to do your own programming, there’s nothing to stop you as the HEX and source code files for this project may be obtained as Free Downloads from our website. Simply look for file number 030 1 36- 1 1 under month of publication or order a disk with the same number. DIY programmers should know that LB I = I (unprogrammed) LB2 = I (unprogrammed) SPIEN = 0 (default, serial programming allowed) FSRT = I (default) ponents are of the normal ‘leaded’ type. Con- struction on a ready-made PCB obtained through our Readers Services (order code 030136-1) is not expected to cause problems if you work carefully. While populating the board, guidance on the positioning of polar- ized components is obtained from the com- ponent overlay. All DIL ICs may be fitted in good-quality sockets. With the soldering work on the board fin- ished, we suggest running a visual inspec- tion on all solder work, if necessary using a magnifying glass. Without the ICs and dis- plays mounted on the board, apply a supply voltage of about 8 V, preferably using a bench supply with current limiting. Check if the sup- ply voltage arrives on all relevant points in the circuit. At this stage the overvoltage pro- tection at the input may also be subjected to a quick test. When everything seems to work so far, you may start fitting the displays onto the board. It is suggested to use two wires for a test of all individual segments. One wire is used to connect pins 1-7 and 9 of display position IC2 to ground. The other wire is used to switch IC3 pins 12-19 to ground. This will enable every individual segment to be tested. If this test is also successful, the dis- plays and the associated transistor drivers can be assumed to work properly, which means that all ICs may be fitted in their sock- ets (observing their orientation, of course). Finally, all functions may be checked. The accuracy of the instrument is totally depen- dent on the drift and tolerance of the crystal oscillator. If necessary and provided high- end test equipment is available, the oscilla- tor may be calibrated by making small changes to Cll and C12. Well before starting your solder work on the board you should make up your mind which enclosure will be used to house the instrument. But even without a case, the board should be very much alive and ready for use with just four PCB spacers secured to the comers — just hook up an 8- 12 VDC/0.3 A mains adapter to K1 and away you go. When the instrument is built into a stylish ABS enclosure, its controls should be moved from the board to the front panel. A case with a trans- parent cover, for example a Teko type P3 or P4, saves a lot of tooling as no clearance has to be cut and trimmed for the LED display — all you have to do is mount the displays in stacked sockets. Basically, the same applies when a case with a normal (non- transparent) lid is used — the dis- plays may be positioned at the cor- rect height above the board by using wire-wrap sockets whose pins are cut to length. The board is secured to the inside of the front panel using four small PCB spacers. Although the actuator spindle of S2 may simply protrude from the panel, the hole for Reset switch SI requires a much larger hole to make sure the cap is easily accessible. The functions of jumpers JP2, JP3 and JP4 have been discussed above. If you want to use switches instead, do rummage around in your junkbox in search for miniature pushbuttons that, with some luck, can be fitted onto the board at (more or less) the right position. If you're unlucky, you can still connect the switch of your choice to the relevant pins on K2 and K2a, which have identical pinouts. The same goes for the potentiome- ter it is not necessary to mount one onto the front panel and wire it to the board if you can find an equiva- lent type that fits on the board and comes with a removable spindle. Alternatively, a preset may be mounted on the board and a hole drilled in the front panel to allow a small screwdriver to pass. The counter gating input is realised by a pushbutton switching to ground and a two-way socket in parallel with ' it. These elements allow the gating input to be oper- ated manually or electronically (by an external circuit). The measure- ment input should be a BNC socket. Noise immunity The input circuit has been laid out to represent a relatively high imped- ance. Depending on the jumper set- tings the input impedance will be between 15 and 65 kf>. When long, open measurement wires are used, or the measurement is performed in an electrically noisy environment, strong 50-Hz signals may stray into the instrument (for instance, ema- nating from a phase angle control circuit). Although it is great to see that the mains frequency can be measured without an (unsafe) elec- trical connection, it is better to stick to defined conditions. Since the instrument should be suitable for frequencies up to 4 MHz, damping (parallel) capacitors at the input are inappropriate. The follow- ing rules of thumb should be observed in this respect: (1) the sig- nals sources should exhibit a low impedance and (2) long measure- ment cables should be screened. If necessary, a termination resistor (< 10 kfl) should be connected to the measurement input. (Q30135-1) 26 Elektor Electronics 3 2004 Visit our website I www.distel.co.ukl THE ORIGINAL SURPLUS WONDERLAND! THIS MONTH'S SELECTION FROM OUR VAST EVER CHANGING STOCKS Surplus always wanted for cash! GIANT 10” 7 SEGMENT DISPLA YS I IC's -TRANSISTORS - DIODES A b - X fxsmasa enables us to bring to you those GsAKT 7 segmert dgtaj dspe,s s: a now aftortiabte priced The 10 s character size grass ocectcra read- ab&y at erg dstonces and cradles a hes d appfca- lions fadLdng, score boards, dgfcal docks, coun- ters, event timers etc. As the tints are a sjmpte etocronxchanicai dE?.ice ard op e ra te hem 12 V DC, simpto svvxhng swrhes ratays, RC or PC may bo uBod to area' snge or nuipte eiges Unfcs faetre rtogral Toro Power memoy which groaiy srnpfncs dostgiv For an excellent DfY practical article, soe the ’.tey issue of Everyday & Practical Beetroots’ magazine Ideal School / College con- struction project Scppted n good RFE ccrdocn. ccmpies wth cssa sheet Less than 30% Only £29.95:bi or 4 / £99.00(0) of makers pn.ee! C ^rR,VA4 CniiPK26 THE AMAZING TELEBOX Converts your colour monitor Into a QUALITY COLOUR TV!! Tne TELEBOX e an Edract-^ Uy cased mans po.scrzd ini. oertanro al eecrortcs ready to piug into a host of video mentore or AV equipment y.tich are feed vrth a oompoeta video or SCART rpu The ccrnpccta voeo ols-ij*. wl aso pfog dreed/ nto most \toeo recorders, akxving reception c' TV channels not noonaJy recarraUe on most television receivers* (TELE* - TofBtfly OBSOLETE - SHORT SUPPLY - BULK 10,000,000 items EX STOCK Fcr MAJOR SAVINGS CALL or see web site www.distel.co.uk COMPUTER MONITOR SPECIALS Legacy products High spec genuine multysync. CGA, EGA, VGA, SVGA MlSubfcN FA3415ETKL 14' SVGA Muttfaync mtour nrrfcr win fire 028 dot pfen titoe anc resdLCar of 1 024 x 7cc A v=r- ety cf rpus afcws arrectoi to a host of ccmpusrs taeUto IBM PC*s in CGA, EGA, VGA & SVGA modes B 80. COMMOOORE froudna Ami a 12001 ARCH WED ES APPLE. Many featores Etohed tecepis 2 23d SA-toftng and LOW RADIATION MPR specrfcajcn FuPy ctesrarteed. in EXCELLENT tele used aondfcn. Tit & Swivel Base £4.75 VGA cabte for IBM PC kiductecL 0n | y£129(E) ~ Exismsi cables for other types of computers avsSabte - CALL BOX 1.6) Push button cargos on toe hart 9 Wai aiow 3Uy I ■ iwrto- a fy al vste.tE. on ‘reatences WF and UfF todutfing the HYPERBANT) 2 s used by most cable TV operator*, toed fcr desktop computer video sys- tems i PP (pictra n peure) setups. For complete comoaabfl-/ - men fcr manners wrout soltP - an rJa gr a 4 wad audo arrpfer and on rt R aj3ooutpaarepro,idedasstenOarTl Brand new -IJyguarErCBeci. TELEBOX ST for composite video input type mongers £36.95 TELEBOX STL as ST but fitted with ntegrai speaker £39.50 TELEBOX MB Mulbband VHF/UHFA^*Hyperband tuner £63.95 For overseas PAL versions state 5 5 or 6 mHz sound specfoabca •Few cable l hyperband signal reception Tetefeox M3 should be con- nected to a cab's type service. Shipping on all Te'-e box’s, code (B) State of the art PAL (UK spec) UHF TV tuner module with composite IV pp video & NIC AM hi fi stereo sound outputs. Micro electronics a! on one small FCQ only 73 x 160 x 52 mm enable futl tuning control via a simple 3 wire link to an IBM pc type computer. Suppled ccmp!ste vr.th simple working program and documentation. Requires +12V & ♦ 5V DC to operate. BRAND NEW - Order as MYOO. Only £39. 95 code (B) See www. distel.co.u K'da tamyOO. h tm for picture + full details Generic LOW COST SVGA Monitors We choose the make, which includes Compaq. Mitsubushi, IBM. etc. Supplied ready to run with all cables, Standard RTB 90 day guarantee. 14” 15” 17” £59.00 £69.00 £79.00 order TD84 order TG21 order TJ66 Supplied in good used condition. Shipping code (D) ^P^outpi HARD DISK DRIVES 2%" - 14" 2::-* TOSHIBA MK1002MAV 1.1Gb tapiop<12-5 mm H) New £59.95 27/ TOSHIBA UK4313MAT 4 2Gb laptop <8.2 mm H) Wew£105.00 279* TOSHIBA MK640SMAV 6.1Gb laptop (12.7 nvn H) New £98.00 2 %* TOSHIBA MK1B14GAV 18 Gb laptop (12 mm H) Newt 149.95 27i* to 37/ conversion lot for Pc's, complete with connectors £15.95 3' / COMPAQ 313706-621 (IBM) 9 gb ULT/SCSI3 New £199.00 37/ FUJI FK-309-26 20rrb MFM RrE 3' / CONNER CP3024 20 mb IDE t/F (or equiv.) RFt 37/ CONNER CP3044 40 mb IDE l/F (or equrv.) RFE 3' / QUANTUM 40S Prodrive 42mb SCSI IT. Nffr. RFE 5! MINISCRIBE 3425 20mb MFM Ur (or eqxv.) RFE 57/ SEAGATE ST-238R 30 mb RLL l/F Refurb 5* / CDC 94205-51 40mb HH MFM VF RFE tested SI ** HP 97548 650 Mb SCSI RFE tested 5’ / HP C3010 2 Gbyte SCSI differential RFE tested 6* NEC D2246 65 Mb SMD interface New FUJITSU M2322K 160Mb SMD IF RFE tested FUJITSU M2392K 2 Gb SMD IF RFE tested Many other floppy £ H drives, IDE SCSI. ESDI etc from stock . see website for full stock list Shipping on all drives is code (C) 6 ' £59.95 £59.95 £69.00 £49.00 £49.95 £69.95 £69.95 £99.00 £195.00 £99.00 £195.00 £345.00 INDUSTRIAL COMPUTERS Tiny shoebox sized mdustnal 40 Mhz 386 PC system messurtog only (mm) 266 w X 88 h X 272 d. Ideal fo dedicated control epp£- cabons running DOS. Linux or even Yfindows I Steel case con- tains 85 to 265 V AC 50 / 60 hz 70 Watt PSU, a 3 slot ISA passive backp are and a Rocky 318 (PC 104) standard, sing'-e beard com- puter wttl 8 MByte NON VOLATILE sold state 'Disk On Chip’ RAM DISK. System compnses: Rocky 318 (PC104) SBC ISA card wth 4GMHz ALi 386SX CPU. 72 pin S MM sfot v*7th 16 Mbyte SIMM. AMI BIOS, battery backed up real time dock. 2 x 9 pin D 16550 serial ports. EPP/ECP printer pert, mint DIN keyboard con- nector, floppy pert. IDE port fcr hard drives up to 528 M3yte cacadty, watchdog timer and PC ; 104 bus socket The 8 MByte so‘d state 'cSsk cn a chip' has its cati BIOS, and can be fdsked, feematted & booted. Supplied BRAND NEW fufcy tested and guar- anteed. For ful date see featured tern on websrte. Order as OG36 100's of applications inc: firewa l, routers robotics etc Only £99.00 idj TEST EQUIPMENT & SPECIAL INTEREST ITEMS M1TSUBUSHI FA3445ETKL 14* Ind. spec SVGA monilws £245 FARNELL 0-60V DC @ 50 Amps, bench Power Suppl es £995 FARNELL AP3-3S0 0-30V DC © 80 Amps, bench Suppy £1850 KJNGSHILL CZ403/1 0-50V © DC 200 Amps - NE.7 £3950 1 kW to 400 kW • 400 Hz 3 phase power source® -ax stock £POA IBM 8230 Typo 1, Token ring base unii driver £760 Wayne Kerr RA200 Audio frequency response ana yser £2500 INFO DEC 1U. 24 port, RJ45 network patohpanes. =TH93 £49 3COM 16570 12 Port Ethernet hub - RJ45 connected »LD97 £69 3COM 16671 24 Fort Ethernet hub - RJ45 cocwectc's £69 3COM 16700 8 Port Ethernet hub - RJ45 connectors NEW £39 IBM 53F5501 Token Ring ICS 20 port tobe modules £POA IBM MAU Token ring distrirxrfcn panof 8 228-23- 5G5CN £45 AIM 501 Lew cftstortfcn Osdfator 9Hz to 330Khz, IEEE I/O £550 ALLGON 8360.11805-1880 MHz hybrid power comb r.ars £250 Trend DSA 274 Date Ar a , sa' :n G703(2f.l) 64 i'o £POA Marconi 6310 Programmatte 2 to 22 GHz sweep Generator £4500 Marconi 2022C 10KHz-1GHz RF s3gnai Generator £1550 HP1650B Ltog'c Analyser £3750 HP3781 A Pattern generate-' 6 HP3782A Error Detector £POA HP6621A Dual Programrr sbie GPIB PSU 0-7 V 160 watts £1800 HP6264 Rack mour: variable 0-20V © 2QA rretered PSU £475 HP54121A DC to 22 GHz four channel test set £POA HP8130A opt 020 300 MHz pulse generator. GPIB sic £7900 HP Al . A0 8 pen HPGL high speed drum pteitera - from £550 HP DRAFTMASTER 1 3 pen high speed pfctte-' £750 EG+G Brookdeal 95035C PrecBion lode In amp £1600 Keithley 590 CV capacrtor / voltage analyser £POA Racal ICR40dual 40 channel vok» recorder system £3750 Rskers 45KVA 3 ph On Line UPS - Ne.v banertes £4500 Emerson AP130 2.5XVA indiathal spec UPS £1499 Mann Tally MT645 High speed Ene printer £2200 Intel SBC 486/133SE Mubtbus 486 system BMb Ram £945 HP6O30A 0-200V DC @ 17 Amps bench pewer supply £1950 Intel SBC 486/1 25C08 Enhanced Mu’rbus (MSA) New £1150 Nikon HFX-11 (Eph phot) exposure contod unt £1450 PHILIPS PM5518 pro TV signal generator £1250 Motorola VME Bus Beards & Components List SAE / CALL £POA £550 £1950 £1250 £2950 £500 £3500 £3250 19" RACK CABINETS Europe’s Largest Stocks of — curope s Ldiyesi oiours oi quality rack cabinets, \fr enclosures and accessories. Over 1000 Racks from stock This month’s special 33 / 42 / 47 U- High Quality All steel Rack Cabinets Mace by Eurocraft Enclosures Ltd to toe highest pos- sible spec, rack features all steel construction with remo.cbte s>de. front and back doors. Front and back doors are hinged for easy access and afi teckab’e with frv6 secure 5 lever barrel locks The front door is constructed of double waled steel with a 'designer style* smoked acryic front panel to enable status indicators to be seen through the panel, yet remain unobtrusive. Internally the rack features fully slotted rein- forced vertical fixing members to take the heavi- est of 19" rack equipment The two movable vertical fixing struts (extras available) are pre P .inched for standard cage nuts’. A mains dis- tribution panel intemaly mounted to the bottom rear, provides 8 x IEC 3 ph Euro sockets and 1 x 13 amp 3 pin switched utility socket OveraJ venBa- lon is provided by fully louvered back door and douttfe skinned top section wtii top and side louvres. The top panel may be removed for fitting of integral fans to the sub p'ate etc. Other features iT-dude: fitted castors aid floor tev&'ers, prepunched toity panel a: \cwer rear for cabte ' cen-ector access etc Supped in excellent, sljghtiy used condition with keys Colour Royal blue some grey VIDEO MONITORS PHILIPS HCS35 (same sttte as CMS833) attractive:/ styted 14* colour monitor with both RGB and standard com posits 15.625 Khz video Inputs via SCART socket and separate phono jacks. Integral audio power amp and speaker for all audio visual uses. WU corned cSrect to Amiga and Atari BBC computers Ideal feral video monitoring I security appfeattors with direct connection to most colour cameras Hgh quality with many features such as front concealed flap controls, VCR cornea cn button etc Good used condtion - futiy tested - guaranteed A n |i, CQQ DD Dimensions: W14* x H125/ x 157^* D. UHiy Lbti.UU (D) PHILIPS HCS31 U.Tra compact 9* cokxa- video monitor with stan- dard composite 15.625 Khz video input via SCART socket Ideal for al morvtoring / security applications- High quafoy. ex-equrpment fufry tested & guaranteed (pcsstre rrenor screen bums). In attrac- tive square black piastc case measuring W10* x H1Q* x 1374* D 240 V AC mans powred- Only £79.00 ID) 33U Order as BC44 External dimensions rnm=1625H x 635D x 603 W (64 T H x 25* D x 23%’ W ) Only £245 42U Order as DT20 External dimensions mm=2019H x 635D x 603 W. (79.5* H x 25* D x 23%’ W ) Only £345 47 U Order as RV36 ^ 2T;",5 : 'j mm=2235H x 635D x 603 W. (88* H x 25’ D x 23%’ V/ ) Only £410 Call for shipping quotation COLOUR CCD CAMERAS A)/ Undoubtedly a miracle of modern technology & jf 1 our specs’' buy ng power ! A quality product Tea- turing a fully cased COLOUR CCD camera at a ^ give away price ! Uni features ful autoigfo sensing for Trio 0-18 vdc Br.ear, metered 30 amp bench PSU. New Fujitsu M3041R 600 LPM hch speed band printer Fujitsu M3041D 600 LPM punter with network interface Siemens K44C0 64Kb to 140f.to demux anal>ser Perkin Elmer 299 B Infrared spoctroprictcmete* Perkin Elmer 597 Infrared spoaroprictemete' VG Electronics 1035 T ELE TEXT Decoding Msrg n Meter LightBand 60 output high spec 2u rack mount Video VDA's £495 Sekonlc SD 150H 18 dtennel tfgital Hybrid chart recorder £1995 B&K 2633 Microphone pre amp £300 Taylor Hobson i alysurf ampifier / recorder £750 ADC SS200 Carbon dioxide gas detector / monitor £1450 BBC AM2Q'3 PPM Meter (Ernest Timer) + drr.e etectron.cs £75 ANRITSU 9654A Optical DC-ZSGb waveform moretor £5650 ANRITSU ML92A optical power meter £990 ANRI TSU Fibre optic characteristic test set £POA R&S FTDZ Dual sound unit £650 R&S SBUF-E1 Vision modufator £775 V/1LTRON 6630 B 1 2.4 / 20GHz RF svreep generator £5750 TEK 2445 1 50 MHz 4 trace oscicscope £1 250 TEK 2465 300 Mhz 300 MHz esc tescope rack mount £1955 TEK TBS 380 4GCMhz tfgitaJ rea : me ♦ disk tfrr.e. FFT etc £2900 TEK TDS524A SSOMhz tfglte! reateme + colour display etc £5100 HP3585A Opt 907 20Hz to 40 Mhz spectrum analyser £3950 PHILIPS PW1730'10 60 KV XRAY generator & accessories £POA VARIACS - Large range from stock - call or see our website CLAUDE LYONS 12A 240V sfocle phase auto, vofo regs £325 CLAUDE LYONS 100A240/415V * applications. A 10 mm fixed focus .'ride angle lens gives excellent focus > and resolution frem dose up to long range. The composite video output w. ' connect to any composite monitor or TV (via SCART socket) and most video recorders. Unit runs from 12V DC sc ideal for security & portable applica- tions where mains power net avalable Overail dimensions 68 mm wide x 117 deep x 43 h)gh. Supplied BRAND NEW & fully guaranteed wdh user data, 100‘s of app'ica- tions including Security. Home Video. Web TV. Web Cams etc. etc Order as LK33 ONLY £79.00 or 2 for £149.00 1 B) SOFTWARE SPECIALS NT4 Workstation, complete with service pack 3 and licence - OEM packaged. ONLY £89.00 mi ESC ART A 95 - CDROM, Not the latest ■ but at this price I £7.95 DOS 5.0 on 374* asks with concise books c l w QBasra . £14.95 Windows for Workgroups 3.1 1* Dos 6.22 on 3.5" disks £55.00 Windows 95 CDROM Only - No Licence - £19.95 Wordperfect 6 for DOS suppled on 3'/ disks with manual £24.95 shipping charges for software is code B SOLID STATE LASERS Vsto'e red. 670nm laser diode assembly. Urvl runs from 5 V DC at approx 50 mA Originally made for continuous use in industrial bar- code scanners, the laser Is mounted in a removable so d akjmfnkxn fade, which functions as a heatsink and rigid optical mount Dims of block are50wx50dx15h mm. Integral matures include over tem- perature shutdown, current control, laser OK cupuL end gated TTL ON / OFF. Many uses for experimental optics, comms & Bght sh ow s etc. Suppte-d complete with data sheet. Ofder as TD9t ONL Y £24.95 1 A) DC POWER SUPPLIES Virtually every type of power supply you can imagine. Over 10,000 Power Supplies Ex Stock - Call or see our web site. RELAYS - 200,000 FROM STOCK Save ££££s by choosing your next relay from ou r Massive Stocks covering types such as MZSary. Octal. Cradle. Hermebcafy Seated Continental. Contactors. Tm Delay. Reed. Mercury Wetted SoSd Stats. Printed Circuit Mounting etc CALL or see our web site www.distal.co.uk for more information Marry obsolete types from 3 phase auto. vofL regs £2900 stock. Save ££££*s • • • ■ • • • • • • • •• - ELECTRONICS - ALL MAIL TO Dept EK, 29 / 35 Osborne Rd | Thornton Heath Surrey CR7 8PD, UK Open Mon - Fri 9.00 - 5:30 18 Million Items On Line Now ! Secure Ordering, Pictures, lnformation\ v&isign www.distel.co.uk Secure Ste „ . , ^ „ email = admfn@distel.co.uk ALL ^ ENQUIRIES 0208 653 3333 FAX 0208 653 8888 26 AI pxes fcr UK Mainland- UK customers add 17-5% VAT to TOTAL order amourt Mrmn arter £10. Bcna Fite accourt enters acoeptod fcom Ge.^mmert Scrcos Urr.-ersites and Loc^ AuChortes - mnrrum acaxxt odor £100. Cheques c w £100 are sucpcl to 7 working da>s osrsrce Carriage criarass i A)=£350. (B^CG 50. (C)=£10. lD)=£ 1 5 CO. (E)=£ 1 8 CO (F;=CALL AJc.v apprex 3 cfeys far shfapfag - testor CALL AI goods slop tec to cur Ssrxterd Ccrcwo ns cr Sate wriito can be .tewed a 1 else { ti»er_2ag =0; } if (fail_int) { fail = 1; fail_int = 0; Figure 4. A close-up of our finished and tested prototype. As you can see, we soldered the servo wires directly to the board. available on diskette (order code 020382-11) or a Ffee Download from our website (same number, see month of publication). Those of you without access to an assembler or a pro- grammer for the Atmel AT series can buy the microcontroller ready-programmed through our Readers Services under order code 020382-41. The source code has been extensively commented. The main parts of the code are the input sequencing and pulse width mea- surement functions. The latter is illustrated by the code snippet in Figure 3. Lex tells us that some innovative techniques have been developed to achieve correct framing of the input signals. By making the software freely accessible. Lex and Elektor Electronics jointly encourage readers to modify and extend the code. BB322-1! Free Downloads Microcontroller source code. File number: 020382-1 1 .zip. PCB layout in PDF format. File number 020382-1. zip. www.elektor-electronics.co.uk/dl/dl.htm . select month of publication. 3 2004 Elektor Electronics 39 APPLICATION NOTF The content of this note is based on information received from manufacturers in the electrical and electronics industries or representatives and dees r.c: imply prartirai experience by Elekto: Electronics . :ts ; r.s .ItantS- AVR450 Battery Charger Multi-standard battery charging By A. Riedenauer Atmel’s AVR450 reference board described in this article has just about everything you would expect from a high-end multi-standard battery charger. With suitable programming of the microcontroller, one and the same board and hardware allow you to implement a wide range of charger systems. Another unique feature of the circuit is its compatibility with Li-ion, NiMH, NiCd as well as lead-acid batteries. Features — Comprehensive charging system — Modular C source code and extremely compact assembly code — Inexpensive — Support for all current battery technolo- gies — Fast charging algorithm — I O-bit A-DC for high measurement accu- racy — Optional serial interface — Simple adaptation to different charging parameters — EEPROM for storage of battery character- istics The AVR450 board introduced by Atmel con- tains two independent charger circuits, one built around the AT90S4433 and the other, around the much cheaper 8-pin ATtinyl5. However, other AVR microcontrollers may be used, to, provided they have an A-D con- verter, a PWM output and enough program memory to hold the desired charging algo- rithms. Ongoing research and development in bat- tery technology constantly requires improved algorithms to enable batteries to be charged quickly and safely. While guarding the charg- ing process, a higher accuracy is needed in order to reduce charging time while always exploiting the maximum cell capacity without causing damage to the cells. Atmel’s AVR microcontrollers are efficient 8-bit RISC machines offering Flash, EEPROM and a 10-bit A-D converter, all on one chip. The EEP- ROM memory is perfect for storage of calibration data and battery charge/discharge characteristics. Besides, the EEPROM allows the charge history of the cells to be per- manently stored, hence their capacity to be fully exploited. The 10-bit A/D converter ensures excellent resolu- tion during the measurements, enabling the charge response to be matched exactly to the cells while obviating the need for an external oparnp acting as a voltage compara- tor. Another great thing about these 8-bit microcontrollers is that they have been designed for compatibil- ity with higher programming lan- guages such as industry standard ‘O'. Not surprisingly, the software for the complete AT90S4433 is supplied in the form of ‘C’ code. The reference design for the ATtinyl5 was written in assembly language to make sure the highest possible code density could be achieved. Both charger circuits are, of course, rather different when looking at their specifications. For example, the AT90S4433 may be used for volt- age and temperature monitoring using a UART PC interface for the data logging function. The ATtinyl5 design, on the other hand, has an advantage in being one of the heav- iest integrated and at the same time cheapest battery charger circuits on the market today. The main differ- ences between the two reference cir- cuits are listed in Table 1. Different battery types Most portable equipment for the consumer market employs one of four battery technologies: Lithium- ion (Li-ion), Nickel Metal Hydride (NiMH). Nickel-Cadmium (NiCd) or sealed lead-acid (Pb). Although these four battery types have widely different charging algo- rithms, for safe and complete charg- ing of a cell, without the risk of over- charging or damage, it is a require- 40 Elekior Electronics 3 2004 Table 1 . Differences between the charger circuits. AT90S4433 ATtinylS Programming language C Assembly Code size approx. 1 .5 kBytes < 350 bytes Current measurement external opamp internal difference amp PWM frequency 1 4 kHz. 8-bit resolution 100 kHz, 8-bit resolution Clock external 7.3 MHz quartz crystal internal 1.6 MHz oscillator Serial interface yes no In-system programming yes yes APPUCA1 IL« M2E V (voltage) Charging is ended when the cell voltage rises above a certain value. This is often applied when charging with a constant current. In the case of Pb cells, the maximum value is defined as just above the charging voltage, resulting in constant charging. With Li-ion cells, this method is used to interrupt fast charging at a certain instant and then continue with a safe (much smaller) current to ‘top up’ the cells to 100% capacity. Also suitable as an extra safety precaution with NiCd and NiMH cells. ment for modem fast chargers (charge tome less than 3 hours) to feature at least accurate measure- ment of the cell voltage, cell current and cell temperature. The four battery technologies are briefly discussed below. Pb cells are charged with a con- stant voltage, with a current limiter ‘in the wings’ to protect against over- heating during the first phase of the charge cycle. In principle, Pb batteries may be left on charge indefinitely provided the cell voltage does not rise above the value specified by the manufacturer (usually 2.20 V). NiCd cells are charged with a constant current. When discharging a battery pack it may happen that one of the series connected cells in the cluster is reverse polarized. To prevent damage, the cell voltage needs to be watched accurately and the load on the battery discon- nected when the cell voltage drops below 1.0 V. NiMH cells appear to be the most frequently used these days, possibly because of the higher energy density as compared with their predecessors the NiCd cells. Just like NiCd cells, NiMH cells are charged with a con- stant current. They are, however, sensitive to overcharging and that is why the cell voltage needs to be monitored closely during the entire charging process. NiMH cells, too, can be damaged by accidental reverse polarisation. Li-ion cells have the higher energy density and resemble Pb cells in that they are charged with a constant voltage. Charging is halted the instant the charging current drops below a certain value. Li-ion cells are sensitive to overcharging and may even explode under adverse conditions. Elektor Electronics Charging methods Without exception, the charging cur- rent is dependent on the capacity (C) of the battery in question. The value of C is stated by the battery manu- facturer. If a battery is charged with a current equal to 1C (i.e., one time the nominal capacity in mAh) then it will be fully charged in one hour. Trickle charging is often done at a (safe) current if C/40, that is, the bat- tery capacity divided by 40. We have to take into account that once the battery is fully charged, all further charging current is turned into heat (thermal energy). With a fast charger, rapid heating of the battery may cause irreversible damage if the charging current is not interrupted in time. Hence tem- perature monitoring is crucial to battery life. Depending on the type of cell and its application, there are several methods of determining when a cell is fully charged, or the charging cur- rent has to be cut for any reason whatsoever. In the case of the AVR450 the first criterion used is the familiar voltage drop that occurs at the end of the charging cycle (-dV/dt), while battery temperature and absolute cell voltage are treated as secondary criteria. None the less, the hardware supports all four meth- ods discussed below. T (time) One of the simplest methods to stop the charging process in time. With fast chargers, a timer is often used as an extra safety measure. With normal chargers (14 to 16 horns charging time), this is the most com- monly used method. Applicable to all battery types. -dV/dt (voltage droop) Use is made of the slight decrease in cell volt- age that occurs when the cell is fully charged. This method is applied in combination with a constant charging current in the case of NiCd and NiMH batteries and cells, although the latter should see their charge current discon- nected when the voltage is no longer ‘on the rise’ (see dV/dt = 0). I (current) When charging with a constant voltage, the process is often stopped if the charging cur- rent drops below certain value. With Li-ion cells, the second charging phase after fast charging is ended in this way. T (temperature) Switching off the charging current above a certain critical (absolute) cell voltage is usually applied as a protection and not, as you might expect, as a primary criterion. dT/dt (temperature rise) With fast chargers the rise in cell temperature as a function of time may serve as a switch- off condition. The temperature rise will differ from battery to battery, but in general will be around 1 degree Celsius per minute for NiCd batteries. Suitable for use with NiCd and NiMH cells and batteries. dT (temperature above ambient temperature) This is generally more reliable than the absolute temperature measurement, particu- larly in relatively cold environments. Usually, ambient temperature is measured by the same sensor as the one used for the cell tem- perature, and the measurement is performed at the start of the charging cycle. Applicable with NiCd and Pb cells and batteries as a pri- mary criterion or a safety precaution. dV/dt (delta zero voltage) Much like the -dV/dt method, with the only difference that the charger is switched off when the cell voltage is no longer rising. Suit- able for NiCd and particularly for NiMH cells. 41 3 2004 APPUCA1 NQE Hardware As already said, the reference board contains two complete battery chargers. Functionally, the printed circuit board may be divided in three main sections as illustrated in Figure 1. The large section at the left comprises a number of discrete components like LEDs, switches, a power supply, a reference voltage source and the PC interface. The power sup- ply is a run of the mill 5-volt regulator built around an LM7805. The voltage source con- sists of another old faithful, the TL431 plus a couple of resistors. The PC interface is con- nected to the UART interface on the AT90S4433 and may be used to log battery data during the charging cycle. These data may fill a spreadsheet that allows you to examine the charge characteristic on a PC display. By the way, the AT90S4433 may dou- ble as a datalogger when the ATtinyl5 charger is being used. The sections at the right in Figure 1 reflect the two processors whose PWM outputs are connected to a Buck converter, creating (in both cases) the actual charging circuits. The ATtinyl5 sports an internal current amplifier capable of raising the voltage difference that exists between the two A/D channels. The AT90S4433 has an extra opamp for the same purpose. Moreover, the charger circuit is designed such that all battery types can be handled, while it may be adapted to suit all charging algorithms thrown at it. Buck converter The Buck converters used in the two charger circuits are largely similar in design, SWITCH ON INDUCTOR CAPACITOR O GND Q30425 - 123 SWITCH OFF inductor Figure 2. The main ingredients of a Buck converter are a switch, an inductor and a capacitor. Powersupply, Switches, LED and Analog reference AT90S4433 and 14 kHz Buck converter v -I nz wcc A VCC _ AREF _ LSX) < LED1 < L£D2 < LED3 < smew HZ : H! \ H 2 CD SWITCH? SWfTCfj ~ AGND [ GNOl LEDO CD LED' _■ L£D2 j LEDO ■ VJN » vcc ) A VCC > AftEF > SYflTCHO > SWfTCHt > switch? i SWTTCH3 _ • 3NC I BC2_I4K.SCH ATtiny15 and 100 kHz buck converter 7 Wi VCC j AQN£> I GKO EC2 PSU SCH BC2_t00V.SCH Figure I . The three functional blocks that make up the AVR450. comprising a p-channel MOSFET as the switching element driven by an n-p-n bipolar transistor which, in turn, is controlled by a micro- processor port line. The switching transistor is connected to an induc- tor, a diode and a capacitor (see Figure 2). A further diode prevents current flowing back into the bat- tery when the supply voltage is switched off. When the switching transistor is driven into conduction, current will flow as sketched in Figure 2a. The capacitor is charged by the input voltage by way of the inductor. When the switch is opened (Fig- ure 2b) the inductor will attempt to maintain the current flow by induc- ing a voltage. By way of the diode and the inductor, the resulting cur- rent charges the capacitor to a higher voltage. The higher the duty cycle of the switching signal, the higher the output voltage. The max- imum output voltage equals Vjj, + 0.6 V. The converter efficiency peaks at a duty cycle of 50%. TheAT90S4433 charger The complete circuit diagram of the AT90S4433 charger may be seen in Figure 3. At the left you find the processor, at the right, the Buck converter. The serial interface is the sub-circuit in the lower part of the drawing. The charger voltage is monitored by opamp U1B, whose inputs have been connected in parallel with the battery to be charged. Before the measurement for the opamp can be selected, the system will first have to determine the number of cells in the battery, as well as the battery type. Next, a suitable input voltage may be selected and resistors dimensioned to suit. Resistor R1 acts as a sensor for the amount of charging current. The voltage drop across this resistor is amplified by opamp U1A in order to improve the measurement accuracy before the voltage is fed to the micro- controller’s A/D converter. The calculations required for the voltage and current measurement 42 Elektor Electronics 3 2004 APPLICATION NOTF Fgure 3. Circuit diagram of the AT90S4433 charger circuit employing a 1 4-kHz Buck converter. Table 2. ‘C’ source code files Name Description Size lo4333.h Header containing symbolic names (for AT90S4333) cstartup.s90 Start-up files for C compiler LnkOt.xcl Command file for linker, specially for AT90S4433 Bdef.h Defines cell type, cell voltage, cell capacity and voltage steps Bc.h Header for bc.h, constants and macro definitions Bc.c Main program, identical for all cell types 474 bytes SLAh Header for lead-acid cells, charger parameters and function descriptions SLA.c Source code for lead-acid cells 446 bytes NiCd.h Header for NiCd cells, charger parameters and function descriptions NiCd.c Source code for NiCd cells 548 bytes NiMh.h Header for NiMH cells, charger parameters and function descriptions NiMh.c Source code for NiMH cells 5 1 4 bytes Liion.h Header for Li-ion cells, charger parameters and function descriptions Liion.c Source code for Li-ion cells 690 bytes are discussed at length in the AVR450 datasheet published by Atmel. The ATtinyl5 charger The hardware for this charger circuit being the spitting image of the one for the AT90S4433, we decided not to print it in this article. The oscillator frequency, 25.6 MHz, is generated by an on-chip PLL clocked by a 1.6-MHz signal supplied by an internal RC oscillator. A noticeable difference with the other charger circuit is the absence of the opamps in the Buck circuit — they have been replaced by two resistor ladder networks, one across the battery and the other across the shunt resistor. The necessary resistors are not part of the AVR450 board, but may be dimen- sioned to your requirements, depending on the battery voltage and the desired charging circuit. The voltage difference measured across the battery or cell also supplies the necessary information on the charging voltage, and the resulting voltage is raised by the microcon- troller’s on-chip 20x amplifier. For the charge current information, the same happens to the 32004 Elektor Electronics 43 APPUCA1 IX* KSL Table 3. Assembly code files Name Description Size bc.inc Include file for register definitions, A/D channel definitions and global constants tnl5def.inc Include file for ATtinyl5 NiCd.inc Include file for NiCd-cells, charger parameters NiCd.asm Source code for NiCd cells 324 bytes NiMh.inc Include file for NiMH cells, charger parameters NiMh.asm Source code for NiMH cells 328 bytes Liion.inc Include file for Li-ion cells, charger parameters Liion.asm Source code for Li-ion cells 340 bytes voltage drop developed across the shunt resistor connected in series with the battery. Software Not surprisingly, everything to do with the charging protocols is handled in software. In this respect, nearly all options you can think of are possible. Table 2 provides a list of the rel- evant 'C' source code files and Table 3, of the assembly code files. The software may be adapted to support the charging of one or more cells. This is eas- iest done by charging cells alternately. Lead- acid and Li-ion batteries may be connected in parallel during charging, provided the packs consist of an equal number of cells! Both the charging current and the charge voltage per cell are limited for each battery. The header 'Battery Characteristics' (h char.h) contains definitions of all values together with the associated scaling factors. These values are defined in the Include files, calculated during compilation and subse- quently used as constants when the program is executed. All measurement values supplied by the A/D converter may be instantly com- pared with these constants, hence no time is wasted on recalculating values while the pro- gram is being executed. Arguably, this AT90S4433 Discontinued Just before this issue was printed, we learned that Atmel have discontinued their AT90S4433 micro. The pin-compatible fol- low-up type is called ATMEGA 8. The Application Note describing the change from the AT90S4433 to the ATMEGA 8 is enti- tled 'AVR 08 1 ' and may be found at http://www.atmel.com/dvn/resources/ prod documents/doc25l5,pdf approach saves time and memory capacity. With NiCd batteries, the charg- ing current is started only when the battery temperature is within the range designated 'safe' by the man- ufacturer. Charging is ended if an error report indicates that either the temperature exceeds the maxi- mum value, the maximum cell volt- age is exceeded, or the maximum time allowed for fast charging is reached. The standard way of establishing whether or not a battery is fully charged is to employ the above men- tioned dT/dt or dV/dt methods. This is achieved by taking a temperature sample every minute, and a voltage sample every second. The values of these samples are constantly com- pared with those of previous sam- ples. When the battery is fully charged, the charging mode auto- matically changes to trickle charg- ing, all under control of software (i.e., the microcontroller program). Fig- ure 4 shows a simplified flow dia- gram of a regular charging function. In trickle charge mode, the pro- gram executes a loop structure, checking changes in the charging status and temperature while also keeping a close eye on the mea- sured charge voltage and current. In case the maximum temperature or battery voltage is exceeded, an error flag is set and the relevant function is terminated. With no errors pro- duced by the system, or the charg- ing status changed by the user, trickle charging will continue indef- initely (in principle). There is far more to say about the Atmel AVR450 battery charger sys- tem than can be fitted within the pages reserved for this Application Note. Readers interested in all the ins and outs are referred to the extensive Application Note no. 1659B-AVR- 1 1/02 that may he downloaded free of charge from the Atmel website. In the not too distant future we hope to pub- lish a practical battery charger based on the AVR450 This may take a while, however, so don't hold your breath. (oOM2S.ll Figure 4. Row diagram of the charger’s main function. 44 Elektor Electronics 3 2004 ELEKTOR ELEKTRONICS IS STAGING ITS FIRST SEMINAR FOR ELECTRONIC PROFESSIONALS.... So book this date in your diary now FRIDAY MAY 7 VENUE: THE UNIVERSITY OF WARWICK. COVENTRY KEYNOTE TALK: THE FUTURE OF THE MICROELECTRONICS INDUSTRY IN EUROPE 3 2004 Elektor Electronics 45 MicRomrmoi i fr Data Storage on CompactFlash (CF) Cards using BASCOM AVR By F.-J. Vogel In this article we show you how BASCOM AVR enables the Compact Flash Interface for our 89S8252 Flash Micro Board to be employed for DOS-compatible data storage in systems based on AVR microcontrollers. The author’s aim was to be able to use the Compact Flash Interface on an Atmel devel- opment board (RIBU ATMEGA103 Test Board) as well as in combination with BASCOM-AVR software, taking into account that the Atmel Test Board does have a lot of port lines, but no CPU-ish pins like RD, WR and ALE which are normally needed to connect external RAM. ATMEL Elektor AVR CPU CF-Interface 1 n •3 5 5 7 _ 8 6 4 2 -3 -3 “3 4 13 3 15 2 30 1 32 0 34 7 19 6 21 5 23 4 25 3 27 2 29 1 31 0 33 030169 - 11 GKO G,\D vcc vcc A12 A13 A14 A15 WR RD A2 A1 AO D7 D6 D5 CM 03 D2 D1 DO Figure I . Connecting the Eiektor O Interface to an AVR microcontroller system. Compact Flash interface As shown in Figure 1, the hardware- wise connection to a microcontroller is possible without ‘major surgery’. The eight datelines DO through D7 are taken to a controller port. The remaining control lines occupy six pins of a further port. Address lines AO. A1 and A2 are connected to pins 0, 1 and 2. The WR (write) and RD (read) lines are connected to pins 3 and 4 of the control port. The chip enable input of the CompactFlash card is addressed by way of an address decoder, which pulls CE1 low when an address within the range F000 - FFFF is applied in external RAM mode. However, using the solution pro- posed here, the CE1 input will have to be activated by a dedicated out- put pin. To this end, pin 5 of the con- trol port is taken to A12 (an input of the NAND gate). The remaining the inputs A13, A14 and A15 of the NAND gate are tied to V cc , so that outputting a High level at CE causes the output of the NAND gate to change from High to Low, thereby activating the CF card. The process as outlined above requires a total of 14 CPU I/O pins. Because the CF card is only activated through the CE input, at least a part of the other 'occupied' pins is available for use in combination with additional periph- erals like an LCD. Compact Flash drivers A software driver for a Compact- Flash card should be able to read and write sectors of 512 bytes each, as well as initialise all required I/O pins (port lines). In as far as the interface is not capable of perform- ing its own Power-On Reset, the dri- ver should look after the resetting of the CF card. Also, the software should be able to establish whether the CF card in the system is avail- able or not. Summarizing, the dri- ver's functionality for a CF card or another storage medium (Smart- Card, MultiMedia card) boils down to these routines: DriveReadSector Read a sector. Drive WriteSector Write a sector. DriveReset Reset a storage device. Drivelnit Initialise the CPU peripherals including a reset for the storage device. DriveCheck Check if the storage device is available fand ready for access. 46 Elektor Electronics 3 2004 MICROCONfTROI I FR Application reads and writes individual sectors of CF card 030169- 12 figure 2. The application reads and writes individual CF card sectors. DriveGetldentify Read the CF card’s internal parame- ter blocks. The names printed in bold type are the labels of the functions imple- mented in the current version of BASCOM-AVR. Explanations of the call parameters as well as exact function descriptions may be found in the Help file [1], which may be downloaded free of charge from the MCS Electronics website. Prices of CF cards having plummeted these past few months (a 128 MB card will now set you back less than 35 pounds), these software functions allow you to add an enormous amount of storage capacity to your microcontroller system. If the data are to be copied onto a PC system for processing at a later time, the question arises how it should be organised on the Flash card to ensure compatibility between the microcontroller and the PC. If the MCU continuously writes data into the card's sectors, the PC program is forced to read the card sector by sector and by way of an adapter, interpreting the data all the time. Another possibility is to use the PC to write a largish file containing nothing but blank data to a freshly formatted CF card. This would require the microcontroller to write its data line by line in ASCII format Application reads and writes DOS files on CF card 030169-13 figure 3. The application reads and writes DOS files. into the occupied sectors. Once the data storage process is finished, the PC would be able to read the data under the previously given file name, using, for example. Excel. In any case, special programs would not be required. The third and by far most elegant method is represented by a DOS sys- tem for BASCOM-AVR. Such a sys- tem puts all functions like creating, opening, reading and writing files in ASCII as well as binary format at the disposal of the microcontroller sys- tem, using a DOS formatted CF card. DOS File System The development of a DOS file sys- tem for BASCOM-AVR first started with an Internet search for informa- tion describing the way DOS and Windows manage files on a hard disk. A few very extensive and graphically weE-presented websites were found [2]. In some cases, how- ever, the information presented on the sites did not reflect personal experience, while in other cases dis- crepancies were found between cer- tain bits of information. At the end of the day, the author found Microsoft's Extensible Firmware Initiative, FAT32 File System Specification [3] the most authoritative source. The document not only originates from the inventors of the DOS file system, but also was also found to contain valuable information on data formats for use in embedded systems. Despite the document's title, FAT12 and FAT16 are also covered in depth. During the further development of the pro- ject, the following essential points were noted: DOS FAT 16 File System DOS FAT16 is the standard file system for storage volumes from 32 MB up to 512 MB, the theoretical limits ranging from 2 MB to 4 GB, covering the complete range of cur- rently available CF cards. FAT 12 and FAT32 pose heavier demands in terms of cluster management within the FAT. Short DOS names (8.3 format) Broadly spea kin g, a microcontroUer system wiU not have the resources (i.e., input/output devices) to enable long file names to be han- dled with ease. Consequently a restriction to short file names only is unlikely to cause major problems, if you know that existing long file names may be addressed by means of their alias. Files in Root Directory only Using the standard formatting method, the Root directory is able to manage 512 files. This, we feel, should be sufficient for most, if not aU, microcontroEer systems, even reaEy big ones. On the CF card, files may be stored in subdirectories, although they cannot be opened from there. Sector size 512 bytes Because the CF card can only transfer data on a sector-by-sector basis, and the sector size is a direct factor in the SRAM size require- ments, AVR-DOS was designed for the stan- dard sector size of 512 bytes, although other sizes like 1 kB, 2 kB, 4 kB and so on are sup- ported by the Microsoft operating systems. LBA sector addressing The sector addressing on the CF card employs LBA Mode (Logical Block Address), which means that each sector is assigned a unique, linear address. The C/H/S (Cylin- der/Head/Sector) method used in the early days of the hard disk is not supported. The file system was entirely written in AVR assembly code. Configuration options The DOS system is configurable with regard to the number of files that can be open at the same time. The open files are managed using file handle buffers. Besides the actual sector buffer, these contain the file number, directory 47 3 2004 Elektor Electronics MICROCQNTRQLI FR pointer and cluster number, and have a size of 534 bytes each. The number of possible file handles thus depends on the available RAM space and may be extended (if necessary) with external RAM. The DOS system contains measures to ensure a file can be opened mul- tiple times in read mode (INPUT) only. Attempts at opening file several times over in read or write mode are signalled and rejected. One further configuration option concerns the way the directory and FAT information is processed. This information may be saved either in a common buffer (saving RAM space and allowing faster file handling), or is sepa- rate buffers. In the second case, the sector is already saved in RAM when access is changed from FAT to Directory or the other way around, obviating the need to reload data from the CF card. Implementation in BASCOM-AVR The routines developed were integrated into the latest version of BASCOM-AVR in such a way that they can be called from an applica- tion using the syntax familiar from QBA- SIC/VBA/VB when it comes to file han dlin g. This allows data input/output routines writ- ten in one of these dialects of BASIC to be copied and used without too many problems. The implemented commands listed in the Table show that size largely exceeds the min- imum requirements for data logging Unfortunately, a detailed discussion of all commands is beyond the scope of this article, although we should hasten to add that all you might want to know on the subject of com- mand functionality may be found in the Help file |lj. Two simple examples should help to pro- vide insight into the workings of the AVR- DOS system. Example 1 shows how the val- ues at three A/D inputs are logged over a period of about ten hours. First, the file sys- tem is initialised. Only if BASCOM-AVR was able to read the file system, the program returns ‘O' as an Error Code. The value 'O' generally indicates that the DOS routine was able to complete its function as expected. In Example 2, five command lines are used to read the ‘contents page'. All files with the extension ‘DAT' are looked up and then- file names, dates, modification dates and file lengths get copied to the serial output line using the PRINT command. Simulation The BASCOM package contains an easy to use Simulator which allows a newly written program to be run on the PC before flashing Figure 4. Screendump showing Example 2 being run in the AVR Simulator. Example I . Recording the values supplied by A/D converters Dim bError as Byte Dim wValuel as Word , wValue2 as Word , wValuel as Word Dim wsecond as Word ■ initialise file system bError = InitFileSystem) 1) If bError <> 0 then Print "Ko valid file system found" End End If • Configure and start AD converter Config ADC = Single , Prescaler = Auto Start ADC ■ Create file to write Open “ADl.txt" For Output As #10 For wSecond = 1 to 36000 ' seconds counter for 10 hours wValuel = GetADC(l) ‘ 1. read analogue value wValue2 = GetADCf 2 ) * 2. read analogue value wValue3 = GetADC ( 3 ) * 3. read analogue value * use seconds counter to write values into file Write #10 , wSecond , wValuel , wValue2 , wValue3 Wait 1 ‘ wait 1 second iiext Close #1Q End Example 2. Contents page of a CF card. Dim strFiletiame as String * 12 strFiletiane = Dir(“*.dat") * 1. Find file While strFilelJame <> "" * File found? Print strFileName ; " " ; FileDate() ; " " ; FileTimef) ; " * ; FileLen() strFileliame = Dir( ) ‘ find next file WEnd 48 Elektor Electronics 3 2004 MKaocmmoi i fr [1] BASCOM-AVR Help file www.mcselec.com/download/avr/betabashtml.ziD [2] Information on DOS FAT www.beginningtoseethelight.org/fat 1 6/index.ohp wvAv.win.tue.nl/~aeb/linux/smartmedia/ SmartMedia Format.pdf [3] Microsoft Extensible Firmware Initiative, FAT32 File System Specification http://www.micro5oft.com/hwdev/download/h3rdware/FATGEN 1 03. doc it. The CF card also allows this to be done — in a way. This was achieved with the aid of a driver simulating a CF card (admittedly with just 59 kB and a largest directory size of just 16 files) in the AVR’s extended RAM range. To this end, a so-called XRAM Driver is linked instead of the normal CF card driver. Here, too, the modular driver concept pays off because it allows storage media to be swapped by changing a single statement. This not only allows the behaviour of application software in a DOS environment to be tested, but also the actual data storage on a storage medium in the external RAM range. According to the Microsoft recom- mendations, a disk size of 59 kB should be managed using FAT 12 (up to 4 MB) and not FAT16. However, as this ‘partition’ is virtual only and intended for test purposes, this departure from the rules rem ains without negative consequences. | 033163 - 1 | Table I. Command List • GetFileSystem • DISKSIZE • DISKFREE • KILL • DIR([J) • FILELEN([]) • FILEDATETIME([]) • FILEDATE •)([]) • FILETIME •)([]) Reads required data from Master Boot Record (MBR) and Partition Boot Record (PBR) of the CF card in order to initialise the file system (not contained in QBA- SIG'VBA'VB syntax). Overall CF card storage capacity in bytes. Available CF card storage capacity in bytes. Wipes a file from CF card. Searches for the first or second matching file name on the CF card. Size of a file in the Root directory matching file name or file last found using DIR. Date and time of a file in the Root directory matching file name or file last found using DIR. Date of a file in the Root directory matching file name or file last found using DIR. Time of a file in the Root directory matching file name or file last found using DIR File creation, opening, writing and reading • Open FOR INPUT/OUTPUT/APPEND/BINARY AS # Opens/creates a file at INPUT in read mode, at OUT- PUT/APPEND in write mode, at BINARY in read/write mode. • FREEFILEO Returns a free file number, this may be used for the OPEN functions. • CLOSE Closes a file and releases the file handle. • FLUSH [] • PRINT # , Variablel ; Variable2; ... Writes the current data buffer(s) into RAM on the CF card and updates the con- tents (not contained in QBASIOVBA'VB syntax). Writes data in text format into a text file that was opened with OUTPUT or Append • WRITE # , Variablel , Variab!e2, ... • INPUT # , Variablel , Variable2, ... • LINE INPUT #, StringVariable • GET #, [, Position] • PUT #, [, Position] • SEEK# [, allows the position to be changed with files in binary mode also. Status information on opened files • EOF # • LOC # • LOF # • FILEATTR # Returns the status End of File. Indicates the file position of the last read/write access. Indicates the file length. Returns file opening mode. Miscellaneous • BLOAD , Writes the contents of a microcontroller RAM range, starting at SRAM address. • BSAVE , , Saves a microcontroller RAM range into a file. 32004 Elektor Electronics 49 MINI PROJECT Voltage & Continuity Tester for direct and alternating voltages up to 60 V Design by B. Kainka Unless it reaches really high levels, what we refer to as ‘voltage’ is totally invisible, so test and measurement equipment is a must in every electronics lab. However, in many cases you’ll just want to know if a voltage is present at or not a certain point. The tester described as this month’s Mini Project is an unusual one because it can work with just one test lead — all you have to do is use the single probe to touch the point you want to check. So where's the other test lead connected to, after all, a voltage always exists between two points? The answer is: the voltage is mea- sured against ‘ground’ connected to the metal enclosure of the test instrument. In this way, it is defined by the person holding the test probe in his/her hand. With each voltage test, a safe current of just a few micro- amperes flows through the person’s body. The tester will amplify this current to a level where it can be indicated by an LED. Construction and principle The narrow PCB (Figure 1) has been designed to fit into a metal tube together with two miniature batter- ies. If you do not object to a slightly larger construction, you may want to use two AA (penlight) batteries. The diameter of the metal tube depends on the width of the battery holder used for the project. The isolated probe tip is then mounted at the front side of the tube. A so-called low-current LED should be used to ensure as little power as possible is wasted in the indication, yet making it sufficiently bright. An on/off switch is not required because the tester does not consume power when it is not used. Thanks to their low self-discharge current, a pair of alkaline batteries should last for many years. The tester's principle of operation should be familiar to most of you, as it is also used for those screwdriver- type voltage testers you can use to check if the 230-VAC voltage is pre- sent on the ‘L’ (live) line of a mains socket. Most of these tools contain a small glow lamp and series resistor. A metal cap at the end of the screw- driver handle acts as the ground ter- minal, establishing the connection with the user's body. Unfortunately, glow discharge lamps do not work at voltages below about 100 V. With electrical safety in mind, the instrument described in this article must never be connected to a mains voltage or any point that can be expected to be directly con- 50 Elektor Electronics 3 2004 MINI PROJFCT O oQOo“ ; f c^oOOo'^ l 020056 Rgure I . The narrow board and the two miniature batteries together fit into a metal tube to make a probe-like enclosure for the tester. nected to mains supply. For this purpose, use approved testers only, for example the screwdriver type described above. The tester described in this arti- cle is intended for low voltages up to 60 V. As a bonus, it will also func- tion as a continuity tester and an audio signal tracer. The circuit The circuit diagram in Figure 2 shows a simple Darlington amplifier based around two BC548C transis- tors. Each of these offers a current gain of at least 420 times, so the Darlington configuration is good for a gain of 420 2 or about 170,000 times! The maximum collector cur- rent is reached at just 1 mA already. Consequently an input current of less than 0.01 mA or 10 nano- amperes is sufficient to make the LED light. An added passive piezo sounder (transducer) enables the circuit to act as a tracer for audio signals. When an alternating volt- age is applied to the input, the LED will also light and the signal is audi- ble through the transducer. In practice, there are two ways of defining the ground connection: Ground (case) to negative battery terminal The tester is suitable as a ‘voltage present’ indicator for input voltages from +1 V, which makes it ideal for faultfinding in circuits. Simply hold the tester in one hand and use the other to touch the ground rail of the circuit under investigation. By touch- ing the measurement point with the probe tip, you can find out for sure if a voltage greater than about 1 Volt is present. Our little instrument is also suitable for use as a simple battery tester or polarity tester simply by moving the free hand to the other battery terminal. Besides, alternat- ing voltages with a peak level greater than 1 V are reliably indi- cated as well as reproduced by the piezo sounder. Ground (case) to positive battery terminal The test instrument is tuned into a continuity tester , where ‘continuity’ should be taken to mean ‘very high impedance connection'. A connec- tion with a resistance as high as 1 Mil is already seen as an electrical conductor! Also, small capacitances with just a few 100 pF may be tested by noticing their charge and leakage currents. The use of the tester can be extended to burnt out bulbs and fuses, where it is especially convenient because you only have to touch the ‘other connection’. The circuit diagram shows a changeover switch (a small slide or rocker switch) that allows you to select between the above two modes of operation. When only one mode is required or envisaged, the switch is super- fluous and the metal case of the instrument is connected directly to the desired battery terminal of the equipment under test. More applications The extreme sensitivity of the tester opens up possibilities for rather special applications. For example, the tester may be used as a locating aid for mains wiring in conduit buried in walls. At just a few centimetres dis- tance from the invisible Live (L) wire, suffi- cient capacitive coupling is obtained to make the LED light up. The little instrument is also great for prov- ing the presence of static charges. Simply hold the tester in your hand at some distance from your body, and walk over a synthetic carpet wearing shoes with rubber soles. The LED will light brightly with each step. Other applications will exist for the instru- ment and we leave it up to your imagination to find out. If you do, tell us about it! 102066 -!! Figure 2. The circuit consists essentially of a Darlington stage with very high currer gain. COMPONENTS LIST Resistors: Rl = IMO R2 = IkO Semiconductors: D I = LED. low current, red TI.T2 = BC547C, BC548C or BC549C Miscellaneous: BZ I = miniature piezo transducer (passive) Kl = 2-way pinheader. lead pitch 2.5mm (0. 1 in) or two solder pins SI = single-pole changeover switch (optional, see text) Battery holder for two LR03 (AAA) or LR6 (AA) batteries Enclosure: suitable metal tube (see text) PCB, available from The PCBShop 3 2004 Elektor Electronics 51 MINI PROJFCT O oQOo“ ; f c^oOOo'^ l 020056 Rgure I . The narrow board and the two miniature batteries together fit into a metal tube to make a probe-like enclosure for the tester. nected to mains supply. For this purpose, use approved testers only, for example the screwdriver type described above. The tester described in this arti- cle is intended for low voltages up to 60 V. As a bonus, it will also func- tion as a continuity tester and an audio signal tracer. The circuit The circuit diagram in Figure 2 shows a simple Darlington amplifier based around two BC548C transis- tors. Each of these offers a current gain of at least 420 times, so the Darlington configuration is good for a gain of 420 2 or about 170,000 times! The maximum collector cur- rent is reached at just 1 mA already. Consequently an input current of less than 0.01 mA or 10 nano- amperes is sufficient to make the LED light. An added passive piezo sounder (transducer) enables the circuit to act as a tracer for audio signals. When an alternating volt- age is applied to the input, the LED will also light and the signal is audi- ble through the transducer. In practice, there are two ways of defining the ground connection: Ground (case) to negative battery terminal The tester is suitable as a ‘voltage present’ indicator for input voltages from +1 V, which makes it ideal for faultfinding in circuits. Simply hold the tester in one hand and use the other to touch the ground rail of the circuit under investigation. By touch- ing the measurement point with the probe tip, you can find out for sure if a voltage greater than about 1 Volt is present. Our little instrument is also suitable for use as a simple battery tester or polarity tester simply by moving the free hand to the other battery terminal. Besides, alternat- ing voltages with a peak level greater than 1 V are reliably indi- cated as well as reproduced by the piezo sounder. Ground (case) to positive battery terminal The test instrument is tuned into a continuity tester , where ‘continuity’ should be taken to mean ‘very high impedance connection'. A connec- tion with a resistance as high as 1 Mil is already seen as an electrical conductor! Also, small capacitances with just a few 100 pF may be tested by noticing their charge and leakage currents. The use of the tester can be extended to burnt out bulbs and fuses, where it is especially convenient because you only have to touch the ‘other connection’. The circuit diagram shows a changeover switch (a small slide or rocker switch) that allows you to select between the above two modes of operation. When only one mode is required or envisaged, the switch is super- fluous and the metal case of the instrument is connected directly to the desired battery terminal of the equipment under test. More applications The extreme sensitivity of the tester opens up possibilities for rather special applications. For example, the tester may be used as a locating aid for mains wiring in conduit buried in walls. At just a few centimetres dis- tance from the invisible Live (L) wire, suffi- cient capacitive coupling is obtained to make the LED light up. The little instrument is also great for prov- ing the presence of static charges. Simply hold the tester in your hand at some distance from your body, and walk over a synthetic carpet wearing shoes with rubber soles. The LED will light brightly with each step. Other applications will exist for the instru- ment and we leave it up to your imagination to find out. If you do, tell us about it! 102066 -!! Figure 2. The circuit consists essentially of a Darlington stage with very high currer gain. COMPONENTS LIST Resistors: Rl = IMO R2 = IkO Semiconductors: D I = LED. low current, red TI.T2 = BC547C, BC548C or BC549C Miscellaneous: BZ I = miniature piezo transducer (passive) Kl = 2-way pinheader. lead pitch 2.5mm (0. 1 in) or two solder pins SI = single-pole changeover switch (optional, see text) Battery holder for two LR03 (AAA) or LR6 (AA) batteries Enclosure: suitable metal tube (see text) PCB, available from The PCBShop 3 2004 Elektor Electronics 51 GENERALINTFRFST causes incrementing or decrement- ing numbers (0 to 9) to scroll across the display depending on the direc- tion of rotation. The dial is pressed to select the number on the display and the number now scrolls downwards. Once the correct code sequence is entered a relay is activated for a few seconds. The code sequence can be changed by keeping the dial pressed down when the last number of the current code is entered. The display now flashes to indicate that a new four- digit code can be entered. Once again when the last digit is entered, the dial is held down to signal the end of the new code sequence. The display now shows the code again. Should you forget the code it can be displayed by shorting out the pins of JP1 and resetting the circuit. The code sequence will now be shown and the display will be switched off after about one minute of no switch activity. The controller The circuit diagram in Figure 2 shows the PIC16F84 as the central component of the circuit. The encoder push button contact is con- nected to RBO while the encoder contacts A and B are connected to pins RBI and RB2. These pins are configured as inputs and the neces- sary pull-up resistors are integrated on-chip. Port pin RB3 is only used during reset to read the value of jumper JP1. Pins RB4, RB5 and RB6 are con- figured as outputs and drive the demultiplexer IC1. This device has open-collector outputs and drives the matrix display rows via transis- tors T1 to T7. The five columns of the display matrix are driven directly from port pins RAO to RA4 via cur- rent limiting resistors R15 to R19. Port pin RB7 switches the relay via transistor T8. Diode D1 is necessary to prevent back-emf from destroying T8 when the relay is switched off. The relay specified does not have mains rated contacts and is only suitable for switching 125 VAC with a maximum load of 1 A. The circuit draws 12 mA quies- cent current rising to around 50 mA when the display is active and 180 mA with the relay pulled in. A 78L05 (IC3) voltage regulator is included on board to produce 5 V for ©©©(?)©© WMM-T2 Figure I . Output waveform of the rotary encoder. the circuit. To avoid excessive dissipation the input supply voltage should not be any greater than 12 V. Component placement The circuit components all fit on a single- sided PCB. The majority of the resistors are mounted upright to save space. Ensure that the 12 V power supply leads are correctly connected to the *+* and ‘O' pads on the PCB. IC2 should be fitted to the PCB via a socket to ensure that it can easily be removed for reprogramming if a software update is Figure 2.The code lock circuit diagram. 3 2004 Elektor Electronics 53 GENERALINTTFRFST Figure 3. The single-sided PCB is quite tightly packed and does not use any SMD components. required in the future. Once all the components have been fitted and the board has been given a thorough inspection the 12 V input supply can be con- nected. The circuit should take around 50 mA and the number 'O' should be displayed if everything is in order. If the circuit does not seem to be working it will be necessary to investigate a little further. Disconnect the power source and remove IC2 from its socket. Reconnect power and test the display multi- plex circuitry by using a wire link to connect pins RAO through RA4 one after another to ground (pin 5 on IC2 socket) while linking pins RB4, RB5 and RB6 to ground in a binary Free Downloads PIC software. File number 020434- 1 1 .zip, contains: - CODELOCK.HEX Hex code for the PIC - CODELOCKASM Source code (Assembler) - DISPLAYASM Source code (Character set) PCB layout in PDF format. File number: 020434-1. zip www.elektor-electronics.co.uk/dl/dl-htm . select month of publication. sequence, this will illuminate and test each individual LED in the dis- play. The voltage level at the reset input MCLR should be 5 V and finally the crystal oscillator can be checked with an oscilloscope. Software All the software was written in assembler using MPASM. Tire com- plete software development envi- ronment can be downloaded freely from the Microchip website. The software for this project consists of two source files: Display. asm contains the dis- play character generator for the numbers 0 to 9. Codelock, asm The main code- lock program. These can be either freely down- loaded from the Elektor Electronics website or supplied on a diskette (see Readers Services). At reset the microcontroller checks if it is the first time that the circuit has been used by reading the first memory location in EEPROM. The microcontrollers EEPROM is always supplied from the factory with OxFF written to COMPONENTS LIST Resistors: RI-R7 = 47kl2 R8-RI4.R20.R2I = 4k07 RI5-RI9 = 1 5052 Capacitors: CI.C2 = 33pF C3 = luF 16V C4.C5 = lOOnF C6.C7 = IOuF 16V radial Semiconductors: 1C I = 74LS 1 56 or 74HC(T) 1 56 IC2 = PICI6F84 or PICI6C84A- 4/R programmed, order code 020434-41 IC3 = 78L05 Di = IN4I48 TI-T7 = BC557B T8 = BC547B Miscellaneous: X I = 4MHz quartz crystal LD I = 5x7 matrix display (Conrad Electronics # 1 60490) S I = Rotary encoder type 427 (small model) (Conrad Electronics # 705594) RE I = FRSIB-S. 12V, I x changeover (Conrad Electronics # 505196) JPI = 2-way PCB terminal block with jumper Kl = 3-way PCB terminal block, lead pitch 5mm 2 solder pins PCB. order code 020434- 1 Disk, source and hex code, order code 020434-1 1 or Free Download each memory location. Whenever the unlock code sequence is changed the value 0x3D is written to t h is first byte. If this value is not present the microcontroller knows that it is the first time the circuit has been used and will write the default code sequence 1234 into its EEPROM. When initialisation is complete the program enters its main loop where it takes care of display multi- plexing and reading the input port. The contents of the bit-variable MODE indicate display scroll direc- tion, input switch debounce period, relay switching time and new code is entry. (0S5434-SI 54 Elektor Electronics 3 2004 Parallax BASIC Stamps - still the easy way to get your project up and running! Serial Alphanumeric and Graphic Displays/ Mini-Terminals and Bezel kits Robotic models for both the beginner and the advanced hobbyist Servo Drivers Motor Drivers On-Screen Displays DMX Protocol U/Sound Ranging Animatronics and Specialist Interface-Control Modules Quadravox Sensorylnc Parallax Tech-Tools MP3 & Speech Systems Voice Recognition Ubicom Tool Kits PIC & Rom Emulators BASICMicro PIC BASIC Compilers Development Tools Milford Instruments Limited Tel 01977 683665, Fax 01977 681465, sales@milinst.com GENERAL INTFREST Wind Power Wise move or waste of time? By Gregg Grant greg@grantg52.fsnet.co.uk The UK Government recently announced the world’s biggest ever expansion in wind energy. So how realistic is this scheme? What are the pitfalls, technical and otherwise, and how viable is it economically? It’s time to look at wind generation in the round. Wind is simply air in motion, with mass and energy. It has been used for centuries, the most obvious example being windmills. In 1850 the American Daniel Halliday deve- loped the ‘multi-bladed' farm wind- mill, a relatively simple device that inspired the first attempts to convert wind into a form of energy that could be either stored for future use, or applied elsewhere. As electrification gradually spread to rural areas in both Europe and America, windmill-driven generators became fairly common in the more remote areas of both continents. By 1890 Denmark — a nation without natural energy resources such as coal or waterfalls — had some 7000 of these windmill genera- tors in operation, they delivering aro- und a quarter of the country’s power requirements. Consequently, the Danish government of the day deci- ded to further develop wind-powe- red electric generators. By the turn of the last century, some 72 generators, the first of their kind, had been built. They comprised a 25-metre high tower, which sup- ported a four-bladed rotor some 22 metres in diameter, which was cou- pled by a drive system to a ground- based generator. These wind driven devices continued to feed power into the Danish national grid system until 1968, when the last working machine was shut down, for econo- mic reasons. In America meanwhile, on-going wind power developments were mainly a matter of manufacturing and marketing what was termed ‘wind chargers.’ These were two- occasionally three-bladed propellers, some four metres in diameter, capa- ble of supplying sufficient electricity to power a couple of fights, a radio and (perhaps) a washing machine or refrigerator. Some 500,000 of these power sources were delivering power across the Midwest until, in 1960, the Rural Electrification Administra- tion, the REA, finally connected the region to the national grid. In Europe too a number of engineers and inventors were attempting to discover efficient ways of harnessing the energy of the wind. In 1922, the Finnish engineer Sigurd Savonius developed the rotor named after him. It comprised semi- circular blades, built from two sec- 56 Elektor Electronics 3 2004 Figure I . UK windforce distribution chart tions of an oil drum, cut in half along its vertical axis, and welded together with an offset from the axis to form an ‘S' shape. In the 1970s, a modem version of this wind device was set to work in America, it gene- rating some 5 kW of electricity in a 12-metre/second wind. Nine years after Savonius, the French power engineer Georges Dar- rieus patented a wind turbine design whose blades were manufac- tured from twisted metal strips, which were attached to the top and bottom of the shaft and bowed out in the middle, rather like the blades of a food processor. This device howe- ver had a drawback: it was not self- starting. Nevertheless an example of this arrangement, with aluminium blades, was built at the Sandia National Laboratory in America and, during trials, generated around 60 kW of electricity in a wind blowing at slightly more than 12 metres/second. However, the most effective wind generators appeared to be those based on the classic ‘Dutch’ propel- ler, for it was the Dutch who carried out much of the early technical inve- stigation into wind power. Indeed it was just such a system that the Americans opted for when they crea- ted their first major wind generator project in 1939. Palmer Puttnam, the engineer in charge, chose a windswept hill in Vermont as the location for the gene- rator, which was driven by two, eight-ton stainless steel blades, some 53 metres in diameter. Com- pleted in 1941, this generator began to feed some 1500 kW into the natio- nal grid. Four years later however disaster struck when one of the bla- des flew off the shaft and ended up in a crumpled mess, some 240 met- res away. The project was later abandoned. The technological advances of the last half-century however have made wind power a viable alternative to fossil fuels and by the mid 1990s, a number of designs were being investigated in the United States (US), Europe and the United Kingdom (UK). Wind Generation There are three factors governing the conver- sion of wind into electrical power. They are wind speed, the conversion factor and the form and size of the turbine blades. Wind Speed The UK is in an enviable position where wind speed is concerned, as a glance at Figure 1 illustrates. The highest winds occur along the Atlantic-facing coasts of the British Isles, giving the UK some 40% of Europe’s total rea- lisable wind energy potential. Wind power is related to the cube of the wind's speed or, put another way, if winds- peed doubles, wind power increases eight- fold. In fact during gale or storm force winds, windspeed can be as much as five times greater than the average windspeed for which the turbine was designed. This means that the stress acting on it rises way beyond the standard operating value. Conversion Factor The faster the wind, the speedier the move- ment of the turbine and therefore the greater the electrical energy generated. In short, power output increases with windspeed, alt- hough there is obviously no power delivered when the wind is too low. The majority of commercial devices begin to provide a small output in windspeeds of about four metres/second. As the windspeed increases, so also does the power delivered until the rated power output is reached. Turbine Form and Size Two-bladed turbines are more common as they produce a higher maximum speed, alt- hough the three-bladed design of Figure 2 makes for greater stability and so more vibra- tion-free operations. The power produced is proportional to the square of the blade dia- meter which means that - for a standard hori- zontal axis turbine - doubling the area of the circle traced by the rotating blade tip, doubles the power generating potential. Currently, blade manufacture is much infl uenced by aeronautical technology in particular sailplane wings. Blades are arran- ged so that the forces generated thrust the rotor around in a circular path, thus achie- ving a balance between maximum lift and 57 32004 Elektor Electronics 030370- 13 figure 2. Basic design of a 3-blade turbine. minimum drag. Presently, modem turbine blades rotate around 10 times faster than the basic windspeed. The Equipment Current turbine designs are twice as effi- cient as the designs of 20 years ago and the cost of these machines has been reduced by a factor of three over the same period. Pre- sently, some designs are rated in hundreds of kilowatts, and shortly larger devices — some- times referred to as aerogenerators — capa- ble of delivering 20 megawatts and with tur- bine blades some 50 metres in diameter are coming on-stream. In Figure 2, the three-blade turbine (1) can have the attitude of its blades altered. By changing the pitch (2) the blades can operate at maximum efficiency in changing wind con- ditions. As the entire rotor assembly (3) moves into the wind, the blades turn the prop shaft (4), which is coupled to the generator (5) via the gearbox (6). The three-blade, variable pitch arrangement has proved to be the most effi- cient design and the largest wind farms com- prise thousands of such turbines, linked together, and capable of generating as much electricity as a fossil fuel power station. The UK's first commercial wind farm, made up of ten Danish wind turbines rated at 400 kW each and able to supply electricity to some 3000 homes, was connected to a part of the national grid in Decem- ber 1991. At the same time, some 500 Megawatts of power were being generated on the continent, the majority of it in Denmark. By far the largest rise in wind power generation took place in the US, throughout the 1980s. Generous federal tax incentives created around 1500 megawatts of installed capa- city; again much of it generated on Danish machines. The Danes are one of the few nations with a viable wind generator manufacturing industry, which exports its products world- wide. During the upturn in wind power generation in the US, the Danes were earning some £130 mil- lion per annum in export sales. Although there is enough wind circulating day and night to supply the entire planet’s energy require- ments — despite the fact that only some 2% of the sunlight falling on the Earth is converted into wind energy — this potential power is spread thinly. That said, wind power is expanding at 20% per annum and has been for the last decade. Indeed as a growth industry it has few rivals, not even gas or oil. In the US for example, the states of Texas and North and South Dakota have suffi- cient usable wind to meet the pre- sent electrical power requirements of America as a whole. Drawbacks Firstly there is the no small matter of constancy, secondly the interference wind turbines cause to radar and thirdly, no one has yet produced a cost-effective method of storing the excess energy that builds up when the wind does blow. Finally, one of the more astonishing drawbacks is the objection of the environmental lobby. They - it seems - have four prin- cipal gripes firstly excessive noise, secondly the detrimental effect on the landscape, thirdly the impact on local flora and fauna and finally the huge amount of land taken up by wind farms. Noise is the least of the above concerns as Figure 3 illustrates. For example, a person standing some 43 meters from a wind turbine would experience a noise level no greater than that she or he would be subjec- ted to in an average house through- out a normal day. Furthermore a wind farm of 30, 300-kW turbines produces only 45 dB of noise, some 500 meters from the nearest turbine. This is little more than half of the figure considered damaging to the human ear i.e. 80 dB. Even in terms of the detriment to the landscape the environmental lobby are hardly on solid ground. Wind turbines are no more unsightly than electricity pylons, structures that have long been accepted, even by the eco lobby. Once set up, aro- und 98% of the land used for a wind farm can return to its natural state, thus encouraging (perhaps) a wider variety of flora and fauna to the area than had been there formerly. As to their effect on wildlife, the environ- mentalists do have a point. Wind tur- bines, for obvious reasons, are loca- ted in open areas, frequently on high moorland, exactly the sort of terri- tory birds of prey frequently hunt in. The radar problem is something else again and is one of the biggest hurdles faced by the industry, accor- ding to the British Wind Energy Association. The Ministry of Defence, the MOD, for example opposes some 34% of all new propo- 58 Elektor Electronics 3 2004 GENERAL1NTEREST sals for wind farms. Turbines can be as high as 180 metres which, coupled with their method of rotation, means that radar signals reflected by them can be as much as 1000 times stronger than those reflected from a light aircraft. They are also difficult to filter out, since a radar can pick up different blades with successive scans, inter- fering with the echoes from aircraft flying above the wind farm. The problem can be reduced by manufacturing blades that are vir- tually invisible to radar, thus redu- cing the signal strength such that it can be filtered out in the same way as echoes from a building for exam- ple. The trick is to do this without either increasing manufacturing costs or reducing the strength of the blades. The Costs Involved Table 1 gives a comparison - for the early 1990s - of the cost of electricity generated from wind power compa- red to the three other major energy- generating technologies. Since that time of course, technology shares — and hence profits and finances gene- rally — have taken a battering. However, from April through to July this year, technology stocks have been doing moderately well, those that survived the crisis that is. Yet they only attracted £9 million in new money in March, compared with the massive £879 million they pulled in during March 2000. Given the above, what convinced the UK government and to a certain extent the City, that wind power was the way ahead in terms of energy? Furthermore, what should we read into the fact that the gover- nment has actually put up money for investment and support of wind power development? Two things: the UK's commitment to the Kyoto Protocol, in which the planet's industrialised nations have agreed to cut carbon dioxide emissi- ons by 10% by 2010, and the govern- ment's idea that wind power is capable of providing electricity to one in every six British homes. Fgure 3. Noise footprint of a typical 3-b!ade wind turbine. Table 1 : Power Generation Costs. Technology Cost (Pence/ kilowatt/hour) Coal 3.5 to 4.0 pence Gas 2.3 to 2.8 pence Nuclear Power 5.0 to 7.5 pence Wind Power 2.9 to 5.2 pence Whilst the government may be enthusia- stic about wind power, the City remains cau- tious, for the subject involves what money men term 'early-stage' investment, which makes forecasting the return on capital expenditure problematical to say the least. They also perceive a technological risk for although wind energy, both on-shore and off- shore, has a considerable amount of research and development behind it, no one has done it before on the scale the government's plan- ning. The question for the City is this: will offshore wind generators deliver over the long haul? Presently, the two biggest organisations providing wind-generated power in the UK are Power Gen Renewables and National Wind Power. The former generates some 120 Megawatts (MW) from its 16-unit Bowbeat Hill wind farm near Peebles. Currently the UK’s largest such installation, it provides half the power required by homes in the Borders region. National Wind Power has 14 on-shore units generating around 160 MW. However, the perceived detrimental effect of such installations on the landscape - tou- ched on earlier - has led to the industry moving off-shore, and National Wind Power is scheduled to complete the UK's first off- shore wind farm on the North Wales coast, later this year. Power Gen Renewables too has opted to move offshore, and its new installation off Great Yarmouth is due to go on-line in autumn 2004. The UK government regards offshore wind power generation as capable of providing electricity to one in every six British homes. This is one aspect of its £6bn plan to make the UK the world’s largest offshore wind farm developer. If this seems a great deal of money it's not surprising, for offshore wind farms are some 30% to 40% more costly to operate than on-shore ones. Nevertheless, both companies are of the view that offshore installations will enable the UK to meet its commitments under the Kyoto agreement. Whether they will be able to deliver sufficient power to one sixth of the nation's homes at a competitive price, is ano- ther matter entirely. ( 030370 - 3 ) 3 2004 Elektor Electronics 59 DEVELOPMENT KIT IBIackfin DSP Development Kit Messing about with DSPs By Paul Goossens Experimenting with DSPs is a fascinating pastime, but it can be difficult to find a good place to start. Generally speaking, DSP circuits use very high frequencies, which makes the PCB layout quite critical. In addition, DIY soldering of these components is almost impossible, because they are packaged in so-called Ball Grid Arrays (BGAs). How then, can we overcome these difficulties? ADSP-BF533 EZ-KIT Lite Evaluation System Manual CROSSCORE Dev' V * &<>>L9V \ A • \Y CROSS ‘ A large number of problems can be avoided by using a ready-built devel- opment kit. An additional advantage is that these kits are usually sup- plied with a comprehensive devel- opment environment and plenty of examples. There is currently ample choice in DSP development kits. In this article we will take a close look at one such board and introduce it to you: the ADSP-BF533-EZ-KIT Lite from Ana- log Devices. Contents of the kit The kit contains the following items: -PCB - CD-ROM with the development environment Visual DSP+ + (demo) including examples and documen- tation - System manual - Power supply - USB cable At the heart of the PCB is a DSP type ADSP-533. This DSP is a member of the Blackfin family of devices from 60 Elektor Electronics 3 2004 IENTK1T I* rn*»,c>sr- - BFec* fj *JI 12» J- {P/ayxt: ixrpca Ksorf ^ j .rctx D fir a “5 3 *a f - e 1 , T ♦J4 *5 £ - 4 fc ti o* if u < Jur I : Cja Qlrfn -as he aj - _J : in ’"fa D =rfc_*a*si J STt^cun J a:— j J ZafJCWmm P **»-«« J r j B X CT J nKga-. a - JKrrisfk. J tcf _rJHC‘ 3 **Lcfc - JUwfe 22 i£r5 > 2££23 4£ - - * - 9«acCf A-m - : 1 - r ?I?0I » ssysjz. ?:l «' *>Ss w Mlletr v«i btessl r: i * .-7 lr-T-.zj *--£L»eki lx. E-l: ' fi Bfiiiii hi i iirmr Analog Devices. In addition, the PCB is abundantly provided with relevant I/O and memory chips. As such, there is a 32 MB SDRAM (16 M x 16 bit), two Flash memories, each con- taining 1 MB primary and 64 kB sec- ondary Flash memory, 32 kB SRAM and 256 bytes of configuration regis- ters. These chips (PSD4256 from ST) really deserve an article by them- selves, considering how versatile they are; in fact, we will return to this PSD family in detail in a future issue. Concerning the audio interfaces, this board is provided with four ana- logue inputs and six analogue out- puts. These can be driven with a codec that can simultaneously drive all these connections at 48 kHz. If you choose to use only half the number of inputs and outputs then a sample rate of 96 kHz can be obtained. The DSP used here is powerful enough for video processing to fall within its capabilities. This is the reason that this board has a video interface as well. The video interface consists of three analogue inputs and three analogue outputs. This video interface will be described in detail a little further on. A programming interface is indis- pensable on a development kit. This kit gives you the option of a JTAG interface or — and this is very inter- esting — a USB connection. This USB connection is not only used for programming but for real-time debugging as well! Finally, we should mention the RS232 interface, as well as the four pushbuttons (debounced!) plus six LEDs controlled from the I/O. This board is also complete with a power supply, which generates the neces- sary voltages from the adapter con- nection. On the back of the circuit board all the relevant signals are accessible for expansion purposes. Software Every development kit succeeds or fails depending on the included soft- ware. The Windows software in this kit is very comprehensive. It has to be noted that this software is a ‘Lite' version containing a n umb er of limi- tations compared to its larger sib- ling. These limitations are not too much of an issue in practice, how- ever. For example, the maximum size of the program is limited to 20 kBytes and the simulator and emulator sessions are not accessible. In addition, this version allows only one DSP board to be connected at a time. And finally, the software will run only when the kit is connected to the PC and is powered on. The supported programming lan- guages are assembler, C and C++. These last two in particular are very interesting in order to quickly test the functionality of your own algo- rithms. If need be, the algorithm can then be re-programmed in assembler to obtain the best possible performance. An important consideration here is that the assembler syntax is very clear and that pro- gramming in assembler is a lot less cryptic than with DSPs from other manufacturers. This is not only a significant advantage for the beginner, but even advanced program- mers will appreciate the clear syntax. The development environment is very complete and contains all the relevant com- ponents to enable you to write your own soft- ware, debug and upload it to the DSP board. A number of useful tools are integrated, such as a picture viewer, which can display an image (or a frame from the video signal) in the DSP memory. The contents of the internal regis- ters of the DSP as well as the external memory can be viewed and modified too, of course. The DSP The DSP that has been used here has many on-board peripherals. That is obvious from the datasheet that amounts to 936 pages and which details the hardware aspects of the DSP We will only summarise the salient points. As a result of all the built-in peripherals, the instruction set is quite remarkable for a DSP. This chip contains alongside the usual DSP instructions a complete set of ‘normal’ CPU instructions such as simple bit manipu- lation etc., which makes the move from micro- controller to DSP much easier from the pro- gramming perspective. This is not to say that an experienced DSP programmer won't appreciate these instructions either. . . With a DSP, the calculating abilities are ultimately the most important. As with most other DSPs, this DSP also contains two very optimised arithmetic units, which will carry out one calculation per clock cycle, irrespec- tive of whether this is a multiplication, an addition or a shift. At an internal clock fre- quency of 600 MHz this results in a comput- ing power of 1.2 GMACs! This should be more than enough for most existing multimedia applications. The operating speed can be increased by another factor when only 8-bit video instruc- tions are used. We can hear you think already: 8 bits, that is now ancient history, isn't it? But nothing is further from the truth, because most video algorithms (such as the MPEG standard) make frequent use of 8-bit data. The data stream Such computing power is very nice, but it is only useful if data can be provided fast enough. Here is where the DAGs (Data Address Generators) come into play. They 61 3/2004 Elektor Electronics BJTKir can be considered as pointers that can be programmed with an offset, automatic incre- ment/decrement and optionally generate bit- reverse-addressing (for the connoisseur: very helpful when doing an FFT analysis). These functions require a fast connection to the memory. In addition to the internal LI- and L2 cache memory, the DSP is also fitted with an SDRAM controller, which allows up to 128 MB of SDRAM to be addressed, without any addi- tional components. Other types of memory can also be addressed. This requires the programmer to indicate which type of memory is being used and how fast this memory can be accessed. This allows the use of standard memory devices. There is provision, in addition to SDRAM, for SRAM, Flash and ROM to be con- trolled, without the need for external logic. To enable a smooth flow of the data, there is a 12- channel (!) DMA controller, which is connected to the various interfaces. This makes it possible to move large amounts of data while the processor just continues to calculate. Several interesting interfaces As if all of this is not enough, the DSP also contains a USB controller. Using this, an inter- face to an external computer can easily be realised. For the more advanced among us it is interesting to know that the DSP also con- tains an actual PCI interface on board, which can function both as host and as slave in a PCI system! Finally, we would like to mention the PPL This is a very comprehensive parallel inter- face, which is capable, on its own, to trans- mit or receive video images and generate all the necessary synchronising signals, if required. Examples It goes without saying that the development kit is supplied with a number of examples, which work straight off on the evaluation board. These examples can form the basis for your own applications. One example con- cerns the generation of a test pattern with the aid of the video encoder. This example, unfortunately, generates an NTSC signal while PAL is the standard in most European countries. However, modem TV sets happily handle either signal. Nevertheless, we found this to be an annoying limitation so we decided to adapt the example so that it would generate a PAL signal instead. At the same time, this is a very good exercise to familiarise yourself with the DSP and video encoder. The datasheet for the video encoder informed us that the chip a uiSBSBSL 3 D ss a 3 3 •J j » % & o sa ckwj •; i H»fr1l='SSC a as m »’ tf ■* S’ e a \ D "ida t 3 ’«**« ^3 S«c -I Fviim in: jHMSfk. _J Tdtwjjf.- 2j LrimFhs rescript is* Tij* ;t cslleC i ti*e a cc*?l=ie »aho fji m*-Zss tii be f= :• i-e.y gsooeca tfi*mrl tie! t&xt iCh&zza •- ; >bs respect I t ::d F T ore.ss_ Dau( ~.i ) : — — 1 Zlai t Pst • iCiaateMlsitla. ia*rre::h}i« 05 t • sOtSMlOij&tli ■.CLuisllntitCct • *. :xcs: l« mTm itil.-q i:* 1 x*a 3 'C. rrociu laaa =»? iete has to be configured via the I 2 C interface, so we first wrote a few simple I 2 C routines. At the back of the datasheet is a list with the con- figurations for the various TV stan- dards. Unfortunately our modifica- tion didn’t work immediately, because we had overlooked some min or details. In the list with Re- registers and corresponding values, two registers are missing that are intended for future versions of the chip. When you are configuring the video encoder yourself for your own application, keep in mind that in the list the two registers at sub-address 5 and 6 are not mentioned. You have to either write zero to these registers or (even better) just skip them. So look out when just sending the pub- lished list to the chip! Our example for generating a PAL video signal can be downloaded, free of charge, from the Elektor Elec- tronics website at www.elektor-elec- tronics.co.uk, the file number is 030439-11. Expansion In the event that the on-board peripherals fail to satisfy all you needs, it is always possible to expand the hardware using the three connectors on the back of the board. All the necessary signals can be found on these connectors. In addition. Analog Devices sup- ply a number of ready-made expan- sion boards for this kit, so that those who would prefer not to design and build their own hardware can still expand the capabilities of this kit. These expansion boards are along the lines of an external camera con- nection, fast A/D and D/A convert- ers, etc. Typical I/O for a DSP, in other words. Finally The processor, as mentioned previ- ously, is equipped with many fea- tures that cannot all be described here in detail. Otherwise, this issue would no longer fit in your mailbox! The I/O chips on the board are also certainly worth a closer look. This kit is unfortunately not all that cheap ($245 ex factory), but the price is still reasonably attractive, certainly considering the options it offers. After an extensive introduction with the ADSP-BF533-EZ-K1T Lite’ we come to the conclusion that this is a very powerful design, with not too complex programming. Of course, this kit is not intended for beginners, but you do not need to be a DSP expert either, in order to suc- cessfully realise a whole bunch of nice projects. This kit is certainly rec- ommended to the curious boffins! t03W39-i> 62 Elektor Electronics 3;2004 FRUSTRATED! Looking for ICs TRANSISTORS? A phone call lo us could get a result. We offer an extensive range and with a world- wide database at our fingertips, we are able to source even more. We specialise in devices with the following prefix (to name but a few). 2N 2SA 2SB 2SC 2SD 2P 2SJ 2SK 3N 3SK 4N 6N 17 40 AD ADC AN AM AY BA BC BD BDT BDV BDW BDX BF BFR BFS BFr BFX BFY BLY BLX BS BR BRX BRY BS BSS BSV BSW BSX BT BTABTB BRWBU BUK BLT BUV BL'W BUX BUY BUZ CA CD CX CXA DAC DG DM DS DTA DTC GL GM HA HCF HD HEF 1C1. 1CM IRF J KA KIA L LA LB LC LD LF LM M M5M MA MAB MAX \1B MC MDAJ MJE MJF MM MN MPS MPSA MPSH MPSU MRF NJM NE OM OP PA PAL PIC PN RC S SAX SAB SAD SAJ SAS SDA SG SI SL SN SO STA STK STR STRD STRM STRS SV1 T TA TAA TAG TBA TC TCA TDA TDB TEA TIC TIP T1PL TEA TL TLC TMP TMS TPU U UA UAA UC UDN ULN UM UPA UPC LTD VN X XR Z ZN ZTS + many others We can also offer equivalents (at customers’ risk) We also stock a full range of other electronic components Mail, phone. Fax Credit Card orders and callers welcome VISA Cricklewood Electronics Ltd 40-42 Cricklewood Broadway London NW2 3ET Tel: 020 8452 0161 Fax': 020 8208 1441 Connect JIBHMXDQJ Servicing Your Complete Prototype Needs O Prototypes at a fraction of tne cost O Industry standard quafity O Tooling and setup included O Any contour O Fr4 1.6mm, 35pm Cu f . m&EViflL ! EUROCARD urn + Tooling + Ptioloplols t + VAT O Follow up series n ms O CAM / CAD consulting ZZ £29.89* 'S&rZng msy \^ry Free = €*9 FREE V. •ssuanniifo Fer+aamutitu UUt 0®«® Simply send your files and order 0NUHL WWW.PC8-POOl.COM 1 mm £ oread ^ B Software TOO Volume 2 SOFtWAM OSS3 /MaXLM I UfUIUVi(k±:j; !-wi l !-»n Fir I LI I LM I I5)ifchmlh««*ni v| 1 nMallQClfaeWBCT 1 MsUSCillkrUi £12.05 (US$21.25) ISBN 90-5381-171-1 NEW 33 The second Toolbox CD-ROM again contains a vast collection of carefully selected software fools for the electronics enthusiast. In your profession or hobby, how often did you experience that your project failed to reach the target in time because essential information was missing? Toolbox 2 offers new inroads to obtain information you just can't do without. This new CD-ROM contains software tools for, and information about, microcontrollers. However, just being aware of the existence of a microcontroller is often not sufficient — available data often needs to be extended with facts and figures about the right memory devices and com- munication channels. That's why this CD-ROM gives specific attention to technical documentation (specifications, application notes, standards) about protocols (DiSEqC — Digital Satellite Equipment Control), field buses (including LON and HART), as well as modern information carriers (Smart Media, CompactFlash, SD card, etc.) which find increasing use. The hardware side of things is not forgotten either — Toolbox 2 contains data on connec- tors, cables and adapters (audio/ video, GSM, memory, networks, parallel, serial, key- board/mouse). The CD-ROM also contains a large number of useful Internet addresses. Order now using the Order Form in the Readers Services section in this issue Eiektor Electronics (Publishing) • P.0. Box 190 • Tunbridge Wells TN5 7WY • England. Telephone +44 (0) 1580 200 657 • Fax +44 (0) 1580 200 616 wm 1 -03.0.12 U_ 1 OTEcrrLCaiCLk-a THI IUCTRON1C5 A COMPUTE* MAGAZINE See also www.elektor- electronics.co.uk 3 2004 Eiektor Electronics 63 ELECTRONICSONI INF 500 Links on Microcontrollers Datasheets and applications By Harry Baggen Microcontrollers have become firmly established in modern electronic circuits. These multi-legged beasts use programs to do all sorts of things. Depending on signal levels presented to them, micros are capable of taking decisions and controlling entire processes. A micro, then, offers a good way to add intelligence to your circuit. But where do you start picking the right type? . £> £dr !'«« fie £«* fnl- © O 0 O <4> Q |% Kg hmtuim rftrifa cry | |^S— dh~j Over the past few decades we've witnessed the increasing dominance of microcontrollers in electronics in general. These days, it is almost impossible (and a waste of time and money) to design new digital cir- cuitry of some complexity without incorporating a microcontroller. In the past, designers when faced with complex logic did not hesitate to throw in dozens of TTL or CMOS integrated circuits resulting in a monstrous, current devouring circuit whose reliability was often inversely proportional to the number of parts on the board(s). That has changed dramatically, today's designers searching for a controller with suffi- cient 'power', I/O resources and a bunch of integrated extra functions. Having added some external hard- ware to the micro, the circuit design will typically continue on a com- puter, which is logical because the PC allows the software for the micro to be developed, too, and it's the software that determines the final functionality of the circuit. A wide range of microcontrollers is currently on the market. Over the years, various manufacturers have designed their own ‘families', always extending processor capabil- ities by introducing better and larger follow-up types. It is fair to say that the microcontroller has evolved from a sluggish liveryman to a really fast 64 Elektor Electronics 3 2004 ELECTRONICS ONI INF calculation wonder chip offering lots of possibilities. Today, the user is offered a daz- zling number of options to choose from, including the number of I/O pins, memory size, Flash or conven- tional memory for program code and non-volatile data, speed compro- mised by power economy — you mention it, the silicon industry has it all. Nearly all microprocessor manu- facturers boast a number of types with extra functionality as compared with other, lesser, family members. These functions may include A/D and D/A converters, various commu- nication interfaces (like I 2 C and RS232), extra connections for hook- ing up an LCD and even in-built sen- sors to measure, say, temperature. Not surprisingly, microcontroller manufacturers were among the first in the entire electronics industry to employ the Internet as a medium to offer not only complete datasheets but also application notes on their products, all free of charge. Today, the Internet is the first resource to dive into if you're after detailed infor- mation on a certain micro. Fair enough, but in addition to these sites there's such an overwhelming number of others containing, ‘less official’ but equally useful informa- tion you’re soon lost and can't see the wood for the trees. The two websites discussed in this month's instalment of Electron- ics Online put 500 links to microcon- troller-related information literally at your fingertips. The links come prop- erly grouped and sorted by the kind and bright souls that put these web pages together. The main orientation is by controller family, with further sub-classification according to the type of information offered in the case of extremely popular controllers. The first website we'd like to tell you about is ePanaorama [1], an electronics portal site offering a mas- sive number of linked neatly organ- ised in categories. That makes ePanorama a great resource for ‘all things electronic’, that is, not just microcontrollers, and we feel it deserves a place in your browser’s Favourites folder! A click on the sub- ject ‘microcontrollers' takes you to an index page showing sub-topics like general information, software and microcontrollers. The last subject is - D® jjs Isa* Vinto- £*c _ Q o Q o 0 0 ii ■ ZI3 i^*—**! ’^o 0 . S. 3 **«I -ore = j 3 c 53 \rsace www.mikrocontroller.net Hon* AVR Tueort* AVR-GCC LCD A.toE5 (german) Projects (kt-.j-.) Date sheets Cooks (gentian) Lrfcs Forun (gsmn) Home E-V.s- : Sabsoribe as A VR Tutorial etjrsmrg r* ».*? ncnccrtrafer* r mmMr (cn#r r* ncr. ioon>) AVR-GCC ■;‘i h‘.:- -trj^rs *'3fAOfc?ratrSttc/-Cil4f MROCC LCD rtr.Kicr i ly tc i y d na v. LCD kt* PC p rn w® DCS IdVirf Books RWM rfrr: OtC rtD» KM ft f*r —. V Links 3^3 b-kibccrtt ru-t nr-; -iritis OS f 2 03 U5FGCC Un*i S3 Qx. j-v.v>v ft nr; * »^ri 07 0SC3U5PGCC '.*• vr.+n * t cohj rcm VIZ -TT AV-IO-I if, 1201 23 USPGCC O tt uyyrg -nr. OCO (\Jr*rtJ rx*$ 05 03 23 USPGCC A rrm ■erar-t ~ . I tar T*i :*:•»;* ir»^ rattans rs srH-v* rjiujft 17 tl 02 USPGCC £ Is: ~T C*CsV I ft* : M *•*!* Era»S« ~:o ,*ET. *f- USPGCC rtn-cr WT. rtjflr r .TTMJ 22 09 C2 USPGCC Nf» urtcn. ftcw jc: 32 23 07 02 U5PGCC Q507C2U$P4» rofi Mbrrascn i/tc •£ Q2Q7 Q2 M*w wtit 444*4 S« l*« Bd 22 OS 02 ISP-Pio jt jmi3*i lit 13 OS 22 USPGCC A -v.-r-t fl-iqi cf W3?0CC H a>x*»9 Or * •wj m grtatrssnvcrj :Mt:M o 1304 02PCB* *•» 'f-P-.'sJftM OP rugiai...4ibaM u ::ia 1 3 E-Jt * s*rrc r.; -Crstf a 1 O/n Dw n 05 weal again divided to reflect today's most popular controller types: PICs Intel 8051/8052 x86 processors Basic Stamp Motorola 68HC I I Scenix microcontrollers SGS-Thomson microcontrollers ARM PowerPC Atmel microcontrollers Hitachi Zilog Picaxe Rabbit controllers Each family is given a general intro- duction followed by a number of finks complete with short descrip- tions of what to expect at the page you’ll end up by following the hyper- link! The second website we’d like to mention is called Mikrocontroller.net (no typo) [2]. It is available in two lan- guages, German and English. Unfortunately some parts have not yet been translated into English but that is unlikely to be a problem for most finks on the site. A click on the 'Links' button takes you to an overview of more than 300 links, all neatly arranged by controller family: 805 1 & compatible types AVR PIC 68HCxxZ80 MSP430 MI6C Various controllers Next, there's a number of links to allied sub- jects like prototyping, soldering, FPGA, CPLD, GAL, DSP and ARM. Although the descriptions with the finks are limited, most of them succeed in making clear what to expect on the hyperlinked pages. A smart addition to the website, national flag symbols indicate the language(s) in which the information is presented. Internet addresses [1] ePanorama: www.ebanorama.nel/index.php [2] Mikrocontroller.net: www.mikfocontroller.nel/index.en.htm 3 2004 Elektor Electronics 65 § a> 0 0 X= 0 O) £ 0 CO 111 3 O a) o ■ Hi > a> (/) CD o CL co ■ ■ 0) 0 CD O £ CD CO CD 0 0 0 =5 111 .22 CO > c 0 C 0 i § S o 3 0 0 CO -c CL 0 > o O O 0 s_ >— 3 HI CO 0 0 a a 0 o c: c 0 ,i n o (D 0 x: h- 0 >, 0 > 0 0 ■g 0 o -Q -4— ' ’3 o a "D 0 Q. >4 0 3 cr x: CT> x: 0 CD c 0 0 > 0 CL 0 e c v> D If) c • o ® £ -C 3 3 TD © C — Cl— E <0 © *- o © ^ Vfc _ «> > © © 5|U a £ — '£> O CL CO 3 « O O ", o £ E 0 £ CM c O O^O Is 01 -C (fi o H _ o 5 «> > 5 ® 5 2 sis S H i S c © u cr G JZ 00—00 IA © >* © • — w © o rv- T3 v_ O § U) u*. © a *-» o CP E L. O © o >hO © • j /S I l/l H CL : U O CL 3 Hi u o CL 3 HJ 1 A a: uj : < O <3 ; ~ h- < : Q H : ^ UJ w ; 2 _j Hi V \ 66 U i < £ (0 : HI CL : Q. O £ 10 tn © a E o o d. o B m 3 o § H 5 Q. <: V) c O Q. 3 0 § "oi e UJ ► — z in 3 U < K Z o u ► in z £* UJ H ' ► Z C/1 52m * 5 < ►* CL z o u Ul a UO 3 u < u Eurocircuits offers you up to 6-layer Printed Circuit Boards from 1 to 1000 pieces. The web site handles all communication: calculate your own quotes by just clicking on the price calculator, place or track orders after you have activated your login. Eurocircuits Eurocircuits is available, on your desk, 24 hours a day and minimizes administrative actions. Our standardized service allows us to economize on production means and costs. The benefits of our lean business process are shared with you through our attractive prices. READERSSFMTS Please Hole SoSr.va.-e ams mated @ are avaJa (He from tte Free Down'cads page of Die PuMskers weas-te si • Dteve-es are suppled for the corwenct of readers :-emei atcess. FVFRRRFFUR £ US 5 Elektor Electronics Help Disk 965022-1 Disk. Windows version 8-15 14.45 Elektor Electronics Item Tracer 1985-2002 036003-1 1 contorts defabase (disk. Windows vasion) 815 14.35 Medium power HEXFET amplilier (December 1993) 930102-1 PCB 10-90 19.25 Universal Prototyping Boards UPB5-1 PCB 245 430 UPBS-2 2 PC 8s 4-10 7.25 UPBS-4 4 PCBs 6*55 1155 Build Your Own DRM Receiver @ 030365-1 PCB 9-10 16.10 @ 030365-1 1 [fell. DRM a* program 4-90 8.65 Code Lock @ 020434-1 PC8 9-60 16.95 3 020134-11 Dsk. source & ha code fifes 4-90 8 65 020434-41 Pacl6F84A-4R programma! 14-70 26 00 Multichannel Failsafe lor Radio Controlled Models @ 020382-11 Dev source code fife 4-90 8.65 020332-41 AI89C52-24JI. programmed 8-70 15.40 Multifunction Frequency Meter @ 030136-1 PCB 9-35 1655 @ 030136-11 Dale, prelect software 4-90 8.65 030136-41 AT90S2313-10PC. programme 7-95 14.05 Digital Alarm Clock @ 030096-11 D.sk PfC source and he* c«3e 4-90 8.55 030096-41 P1C16f84*04p. programmed 15-20 26.90 {Access @ 020163-11 Disk set. source code and control software 7-50 13.30 020163-41 A18SS6252-12PC. programmed 13-90 24.60 Simple 12-to-230V Power Inverter © 020435-1 PC3 8-50 1505 Touch-controlled Switch @ 030214-11 Disk. PIC source cede 4-90 865 030214-41 RC1 2C503A04 S03. programmed 6-15 10.90 64-K 80C552 Flash Board @ 030042-1 PCB 9-35 1655 @ 030012-1 1 Disk. msc. project software 490 8.65 030042-21 29f01Q. programmed HHM 17.70 030012-31 GAL 16V6D15GP programmed 6-10 10.60 Climate Logger © 030076-1 PCB 7-75 13 70 @ 030076-11 Disk. Windows software 4-90 8.65 FMS Flight Simulator Encoder @ 030066-1 PCB 1020 18.05 030066-11 B7LPC767BJI. programmed 17-05 30.15 LED Roulette @ 030163-1 PCB 17-90 31.60 @ 030163-11 Ds'l source and tec ffes 490 8.65 030168-11 89C2051-12PC. programmed 8-05 1425 Multi-event Alarm Clock @ 020301-11 Disk. C (source) ter Res 4-S0 8 65 020301-41 AT89C2051-12PC. programmed 610 1060 Stepper Molars Uncovered 020127-41 HC16F873-20SP 19-10 33 80 Nn 327 RFRFMRFR P/7/)? FM Remote Control Transmitter & Receiver @ 034044-1 PCB 10-20 18.05 LED Christmas Decoration •@ 030157-1 PCS 7-55 1135 P87LPC76x Programmer ® 030313-11 D-sk. preset software 4-90 8.65 Project Timekeeper @ 020350-11 IXsV. source & object code flies 4-90 865 020350-41 PIC 1 6f 84- 1 0P programmed 13-15 23-25 Stepper Motors Uncovered (2) @ 0201 27-1 1 Disk. source code Re 4-90 8.65 Universal Clock Generator @ 020395-11 Disk, source code fie 490 8.65 Wireless RS232 Link @ 030204-1 PCB 8-70 15.40 No. 326 NOVEMBER 2003 - - Rev Counter lor R'C Models S 024111-1 PCB 17-50 31.00 024111-11 DvsSc source and hex code 4-90 8.65 • r uss 024111-41 89C2051-12PC. programmed 8-S5 1555 Running Text Display @ 020407-11 Disk, source and te code 4-90 8.65 USB Analogue Converter @ 020374-1 PCS 7-65 13.50 @ 020374-1 1 Dssk. te code and Windows software 4-90 665 020374-41 PJC16C765. programmed 13-25 23 45 DDS RF Signal Generator @ 020299-1 PCB. gene?r.or 11-60 2055 @ 020299-2 PCB. control suppfy 12-10 21.45 020299-11 AT90S8515 8PC. programmed 3D 55 54.05 Minimalist Induction-Balance Melal Detector @ 020290-1 PCS 8-95 1585 Xillnx PROM Programmer @ 010109-11 Software 4-90 8.65 ATV Picture Generator @ 020295-1 1 Dsk, source 4 he» code ftes 490 8.65 02029-5-11 AT90S8515-8PC. prograrmfed 15-20 26 90 020295-12 AT90S1 200-1 2PC. programmed 1390 24.60 DTMF Remote Telephone Switch @ 020291-1 PCS 11-65 20.60 @ 020294-11 Disk, project software 490 8.65 020294-41 P»Cl6f84A-20P programmed 14-70 2600 LC Display with l?C Bus @ 030060-2 PCB 7-35 1300 PICProg 2003 @ 010202-1 PC9 905 1600 @ 01 0202-1 1 Disk. Windows software 4-90 8.65 010202-41 PfCl6f 874-20 P programmed 2355 41.65 Polyphonic Doorbell @ 020354-11 Disk, project software 4-90 8.65 020354-41 RC16F84A*1DR programmed 14-45 25 55 Precision Measurement Central 030060-91 ReeSy-assembfed & tested board 6DGQ 112.50 Valve Preamplitier (1) @ 020383-1 PCB. ampHSer board 11-55 20.40 @ 020383-2 FCB. p^Aer supply board 11-40 20.20 @ 020383-3 PCB. It) board Nn ??? //// Y!A linn cr 2/7/7? 1D10 17.80 Add a Sparkle @ 020293-1 1 Disk. HEX and source fi ts 4-90 8.65 020293-41 PC12C509A-04 SM. programmed 7-40 1310 AT90S2313 Programmer @ 034036-1 PCB 905 1690 Hard Disk Selector @ 034050-1 PCB 9-45 16.75 Mini Running Text Display @ 020365-11 Disk. source c«te fie 4 90 8.65 Mini Test Chart Generator @ 020403-11 Dsk. F*SC source code 490 8.65 Programming Tool for ATliny15 @ 030030-1 PCB 7-55 13.35 @ 030030-11 Disk, project software 490 6.65 Quad Bridge Car Amp @ 034039-1 PCB 8-70 15.35 Remote Light Control with Dimmer @ 020337-11 Disfc, HEX and source Res 4-90 8.65 020337-41 AT89C2051-12. programmed Nn ??? IIIUP onm 6-25 11.05 AVR TV Tennis @ 030026-1 Man PCB 8-70 15.40 @ 030026-2 PushbuBon PCB 8-60 15.25 @ 030026-11 D.<< AVR source code 4-90 8.65 030026-41 AT908515. programmEd 15-20 26.90 32004 Elektor Electronics 67 READERSSFRVlCES Electronic Knotted Handkerchief £ USS @ 020308-11 Oss*. PC and car w&fer software 4-90 8.65 020308-11 ArgOS2313-10PC. programmed Low-Cost LCD Controller (2) 1260 22.39 @ 020114-1 PCB 8-7Q 1535 @ 020114-11 Disk, project software Night Light Control 4-50 8.65 ® 020115-11 Disk, hex and source code 4-80 865 020115-41 AT90S2313-10PC. programmed Universal XA Development Board 1285 22.75 @ 010103-1 PCB 13-20 23 35 @010103-11 Dsk. GAL code. EPROM hex files. XADEV 4-90 8.65 010103-21 EPROM ICS. 27C256-90. programmed 1900 17.70 010103-22 BTOMKS.27C255-90, programmed 1900 17.70 010103-31 GAL 16V8. programmed 4-80 850 No. 321 MAY 2003 Countdown Timer @ 020296-11 Dsk. source and hex cede 4-90 8.65 020296-11 AT90S1200. programmed 13-90 24.6Q USB Audio Recorder @ 012013*11 Disk. EPROM he* code 4-90 8.65 012013-21 EPROM 27C512. prtwrarrrred 12-60 22.30 Valve Final Amp (2) @ 920071-1 Ajr^i'.^er board (one ctenr^l 15-10 26.75 @ 020071-2 Power syppfy board 1905 17.75 No. 320 APRIL 2003 8-Channel Disco Light Controller @ 010131-1 PCB 13-10 23.15 010131-41 67C750 or 87C71. programmed Pico PLC 23-00 40.70 @ 010053-1 PCB 18-70 33.10 @ 010059-11 Dsk. lesi program Single-Chip Tone Control 4-90 8.65 3 020054-4 PCB Switched-Oullet Power Bar with RS232 Control 1990 1930 @ 020293-1 PCB 1980 1910 @ 020293-11 Disk, project software Temperature Indicator lor the PC 4-90 8.65 @ 020380-11 Dusk, source and compeed carte 4-90 665 020380-41 AT89C2051. programmed 1925 1815 No. 319 MARCH 2003 17 V / 10 A Switch-Mode Power Supply @ 020054-3 PCB 945 1665 Add-on Switch unit for R C Models @ 020126-1 PCS 8-95 15 85 @ 020126-1 1 Dcs*. ha and score ffes 4-S0 8.65 020126-41 PSC16C712-041 SO. programmed 15-20 26-90 AVRee Development System @ 020351-1 PCB 13 20 23.35 @ 020351-11 Bisk, example programs 490 865 Guitar Effects Switchbox @ 020181-1 PCB 13-15 2330 Intelligent Fan Timer @ 0201 791 1 Disk, preset software 4-90 865 02017041 MSP43W 11 21. programmed 11-30 2900 SAA3049 Replacement @ 020085-1 PCB 1305 23.10 @ 020035-11 ftsk. source and hex code 4-90 8.65 020085-41 87LPC764BN. programmed 9-90 17.55 Two-Colour Running Light S> 010134-1 PCS. cortrcVer Doan) 8-25 14.60 @ 010134-2 PCB. LED board 1085 18.80 @ 010134-11 Disk, project software 4-90 8.65 010134-41 AT89C2051-12PC. 7-15 1265 20/40 MHz Logic Analyser @ 020032-1 PCB 15-20 2885 @ 020032-11 Disk, demo program 4-90 8.65 020032-41 AT50S8515-SPC. pfOgrsnvTCd 15-10 26 70 Active Loudspeaker System (2) @ 020054-2 PCB 7 95 14.05 Autoranging Capacitance Meter @ 020144-1 PCS 7-35 13.00 @ 0201 44. it sa-rr^ h n f Us *4-90 865 020144-41 F£16?84A-29R programmed 15-20 26.90 Dimmer with 0-10 V Control Input g 010125-1 control PCB 960 17.00 @ 010125-2 4mm* t PC 3 895 15.85 Electronic Hourglass @ 0200391 PCB 18-55 32.85 @ 020C3911 Disk. project software 4-SO 8.® 020035-41 PiC1£f 84-04 P programmed 15-20 2650 Optimise your PC Soundcard @ 029184-11 Dsk. Ercei spreadsheet 490 665 £ USS Active Loudspeaker System (1) @ 020054-1 PCB 990 1220 Electronic RPG Dice Roller @ 020005-1 PCS 1905 17.75 @ 020005-1 1 Dsk. source code fie 4-90 865 020005-41 AT9054433-8PC. programmed 30-80 54.50 Rodent Deterrent @ 020110-1 PCB 1265 2130 SMS-Controlled Mains Sockets @ 020157-1 PCB 12-90 2285 No. 316 DECEMBER 2002 DCI PLC @ 010113-1 PCS. convener- bserd 8-40 14.85 @ 010113-2 PCB. termns toant 12-50 22.10 @ 010113-11 Disk. pro.ecl software 4 source code 4-90 8.65 010113-41 AT90S8515-6PC. programmed 21-20 3735 Port Line and ADC Extension @ 020307-11 Disk. BASCOM-51 programs 4-90 8.65 Programmable Dial-Out Blocking Device @ 020106-1 PCB 12-20 2185 @ 020106-11 ask. prefect software 4-90 8.65 020106-41 AT69C2051-1. programmed 6-50 11.50 USB Audio Codec with S/PDIF @ 020178-1 PCB ii. uni/CMMDCD OrtflO 11-10 1960 NO. 375 NUVtmbtH 2UU2 Audio Level Check for Line Input @ 020189-1 PCB 925 1635 EPROM Emulator @ 024066-1 PCB 935 16.50 @ 024066-11 Disk. GAL JEDEC tstng 4-90 6.65 024066-31 GAL16VS9. programmed 5-00 865 LED Torch @ 01 201 9-1 1 Disk, prosed software 490 865 012019-41 PtC12C672-04SM. programmed 1940 18.40 Stand-Alone EEDTS Pro @ 020125-1 PCB Telephone Baby Monitor 15-35 27.15 @ 012016-1 PCB 1900 17.70 @012016-11 Disk, source and hex fies 490 8.65 012016-41 AT90S1313-10PC. programmed Vehicle Diagnostics Adapter 1940 18.40 @ 020138-1 PCB No. 314 OCTOBER 2002 AT90S8535 Programmer 925 1635 905 16.05 @ 024051-1 PCB Digital RF Wattmeter @ 020026-1 PCB 12-85 22.70 @ 020026-11 Disk, souree code ties 4-90 865 02CO2641 PSC16F876-04SP 1990 35.20 Motorcycle Theft Alarm m 000191-1 PCB 990 17.50 @ 000191-11 Disk, source cafe fes 4-90 865 000191-41 RC16F84-04SO 19-90 3520 000191-12 PSC16F84-04P 14-70 26 05 Sound Pressure Level Meter @ 020122-1 PCB No. 313 SEPTEMBER 2002 20-Metres Band Receiver 1970 34.85 14-30 25.30 @ 010097-1 PCB Capacitor ESR Tester @ 012022-1 PCB Continuity Tester 1815 23.60 @ 020002-1 PCS EEDTS Pro Super Loco Oecoder Upgrade 4-60 8.10 020094-11 PIC for super loco decoder 1990 3525 02009541 PIC lor rehjm sgnaJer 17-25 30.55 Firmware Update lor EPROM Emulator @ 024107-11 Disk, hex He 4-90 8.65 024107-41 ATS9C2051-12P programmed 7-95 14.10 High-Speed Controller Board @ oroior- r res Parallel JTAG Interface 11*5 2US @ 020008-1 PCS No. 312 JULY/AUDUST 2002 4-Bit Decimal Display 8-75 15.45 024072-31 GAL22V10D-25LR programmed 890 12.20 Products for older projects (if available) may be found on our web site http://www.elektor-electronics.co.uk 68 Elektor Elecironics 32004 % ; I Please send this order form to ' ; (see reverse for conditions) Elektor Electronics (Publishing) ! P.O. Box 190 Tunbridge Wells TN5 7WY I ENGLAND ; Tel.: (+44) (0)1580 200 657 Fax:(+44) (0)1580 200 616 ! Internet www.elektor-electronics. co.uk | *USA snd Carate rzsrteftts miy (but are oa ofcSged to) use S pnees and send tfte j order fern r 3 OW Cotony Sound Lab. P.O Box 876. Peterborough. NH 03456*0376. . TeL (603) 924-6371. 924-6526. Fax: (603) 924-9467 Email: J cust$cnr@au& oXprcss ccm ORDER FORM 3/2004 ! t VAT No.GB 454 135 463 ! Please supply the following. For PCEs. front panel foils, EPROMs. PALs. GALs, microcontrollers and diskettes, state the part number and description: for books, state the full title; for photocopies of articles, state full name of article and month and year of publication. Please use block capitals. Qty. Order Code Description Price each Total NEW Item Tracer 1985 - 2003 £8.25 NEW CD-ROM ELEKTOR 2003 £.16,25 cd-rom Freeware & Shareware 2003 £ 12.05 cd-rom Toolbox - 2 £12.05 Method of payment (see reverse before ticking as appropriate) Note: cheques not made out in sterling must be increased by the equivalent of £15.00 □ Bank draft □ Cheque (payable to Elektor Electronics Publishing) Prices i-,j fern desertions sub, id to c tenge Tre publishers reserve the r;;-t to change prices w-rcut prior rctcaten. Prices and ten descriptions shown here supersede those in previous issues. E & 0 E Sub-total P&P Total paid —I Giro transfer (our account no. 34 152 3801) * Reduced price for subscribers. □ Postal/money order Expiry dale: subscription number is: SWTTCH only: issue number Signature: SUBSCRIPTION ORDER FORM Please send this order form to Worldwide Subscription Service Ltd. Unil 4, Gibbs Reed Farm Pashley Road Ticehurst. nr. Wadhurst East Sussex ENGLAND TN5 7HE Tel. (+44) (0)1580 200657 Fax (+44) (0)1580 200616 Email wwss@wwss.demon.co.uk Please enter my subscription to Elektor Electronics, type □ Subscription-Plus (incl.CD-ROM Volume 2003) or □ standard subscription. Subscription rates and conditions are given on the reverse of this form. Please send me, free of charge the SURVIVAL KIT Title (Dr/Mr/Mrs/Ms)* Address: email: * cross out what is not applicable Initials: Surname: Postcode: Date: Method of payment (see reverse before ticking as appropriate) Note: cheques not made out in sterling must be increased by the equivalent of Cl 5.00 □ Bank draft □ Cheque (payable to Elektor Electronics) □ Giro transfer □ Bank transfer □ Postal'money order Signature: SWITCH only: issue number: Expiry date: m 32004 Elektor Electronics 69 ORDERING INSTRUCTIONS, P&P CHARGES COMPONENTS Except in the USA and Canada, all orders, except for subscriptions (for which see below), must be sent BY POST or FAX to our Tunbridge Wells address using the Order Form overleaf. On-line ordering: http://www.elektor-electronics.co.uk Readers in the USA and Canada may (but are not obliged to) send orders, except for subscriptions (for which see below), to the USA address given on the order form. Please apply to Old Colony Sound for applicable P&P charges. Please allow 4-6 weeks for delivery. Orders placed on our Tunbridge Wells office must include P&P charges (Priority or Standard) as follows: UK: £3.50 Europe: £5.00 (Standard) or £7.00 (Priority) Outside Europe: £8.00 (Standard) or £12.00 (Priority) HOW TO PAY Unless you have an approved credit account with us. all orders must be accompanied by the full payment, including postage and packing charges as stated above. Payment may be made by cheque drawn on a London clearing bank (but see para. 4 below), postal order, VISA, Access, MasterCard or EuroCard (when paying by credit card, the order must go the cardholder's address). Do not send cash through the mail. Cheques and postal orders should be crossed and made payable to ‘Elektor Electronics (Publishing)'. Payment may also be made by direct transfer from a private or business Giro account to our Giro account No. 34 1 52 3801 by completing and sending to the National Giro Centre, in a National Giro postage paid envelope, a National Giro transfer/deposit form. Do not send Giro transfers direct to us, as this will delay your order. If you live outside the UK, payment may also be made by Bankers’ sterling draft drawn on a London clearing bank, Eurocheque made out in pounds sterling (with holder's guarantee card number written on the back), or US or Canadian dollar cheque drawn on a US or Canadian bank. If you pay by Bankers' sterling draft, make clear to the issuing bank that your full name and address MUST be communicated to the London clearing bank. Our bankers are NAT WEST PLC, 1 St James's Square, Wadhurst, East Sussex TN5 6BH, England. Our account number is 351 2 5225, Sorting Code 60-22-15. IBAN code : GB40 NWB K6 022 15 3512 5225 BIC code : NWB KGB 2L Components for projects appearing in Elektor Electronics are usually available from certain advertisers in this magazine. If difficulties in the supply of components are envisaged, a source will normally be advised in the article. Note, however, that the source(s) given is (are) not exclusive. TERMS OF BUSINESS Delivery Although every effort will be made to dispatch your order within 2-3 weeks from receipt of your instructions, we can not guarantee this time scale for all orders. Returns Faulty goods or goods sent in error may be returned for replacement or refund, but not before obtaining our consent All goods returned should be packed securely in a padded bag or box, enclosing a covering letter stating the dispatch note number. If the goods are returned because of a mistake on our part, we will refund the return postage. Damaged goods Claims for damaged goods must be received at our Tunbridge Wells office within 10 days (UK): 14 days (Europe) or 21 days (all other countries). Cancelled orders All cancelled orders will be subject to a 10% handling charge with a minimum charge of £5-00. Patents Patent protection may exist in respect of circuits, devices, components, and so on, described in our books and magazines. Elektor Electronics (Publishing) does not accept responsibility or liability for failing to identify such patent or other protection. Copyright All drawings, photographs, articles, printed circuit boards, programmed integrated circuits, diskettes and software earners published in our books and magazines (other than in third-party advertisements) are copyright and may not be reproduced or transmitted in any form or by any means, including photocopying and recording, in whole or in part, without the prior permission of Elektor Electronics (Publishing) in writing. Such written permission must also be obtained before any part of these publications is stored in a retrieval system of any nature. Notwithstanding the above, printed-circuit boards may be produced for private and personal use without prior permission. Limitation of liability Elektor Electronics (Publishing) shall not be liable in contract, tort, or otherwise, for any loss or damage suffered by the purchaser whatsoever or howsoever arising out of, or in connexion with, the supply of goods or services by Elektor Electronics (Publishing) other than to supply goods as described or, at the option of Elektor Electronics (Publishing), to refund the purchaser any money paid in respect of the goods. Law Any question relating to the supply of goods and services by Elektor Electronics (Publishing) shall be determined in all respects by the laws of England. January 2004 Subscription rates from January 2004 issue Standard Plus United Kingdom £39.50 .. £45.50 Economy Mail Rest of the World (excluding Europe) £51.30 .. £57.30 Priority Airmail Europe & Eire £52.50 .. £58.50 Middle East. Africa, Southwest Asia. Central & South America £64.00 .. £70.00 Australia, New Zealand, Far East & Pacific Territories £66.00 .. £72.00 Airfreight USA & Canada only . . . .USS88.00 . . . . .USS96.50 Payment should be made by: • Cheque or bankers’ draft in sterling drawn on a London clearing bank (except in the USA and Canada — see below): Eurocheques must have the holders guarantee card number written on the back. • USS cheques drawn on a US or Canadian bank — only by subscribers in the USA or Canada. • Direct transfer to our bank (NAT WEST PLC, 1 St James's Square. Wadhurst, East Sussex TN5 6BH, England). Our account number is 351 2 5225, Sorting Code 60-22-1 5. • Postal order. • Credit card: VISA, ACCESS, Euro/MasterCard. JCB Electron or Switch. • Transfer to our Giro Account number 34 1 52 3801 . Giro transfers should be made by completing and sending the appropriate transfer/deposit form to the National Giro Centre (UK) or to your national Giro Centre. Cheques and postal orders should be made payable to Elektor Electronics (Publishing). Do not send cash through the mail. Subscription conditions The standard subscription order period is twelve months. If a permanent change of address during the subscription period means that copies have to be despatched by a more expensive service, no extra charge will be made. Conversely, no refund will be made, nor expiry date extended, if a change of address allows the use of a cheaper service. Student applications, which qualify for a 20% (twenty per cent) reduction in current rates, must be supported by evidence of studentship signed by the head of the college, school or university faculty. A standard Student Subscription costs £31.60. a Student Subscription-Plus costs £37.60 (UK only). Please note that new subscriptions take about four weeks from receipt of order to become effective. Cancelled subscriptions will be subject to a charge of 25% (twenty-five per cent) of the full subscription price or £7.50, whichever is the higher, plus the cost of any issues already dispatched. Subsciptions cannot be cancelled after they have run for six months or more. January 2004 70 Elektor Electronics 3 2004 Electronics Books from Elektor Electronics Audio & Video 308 Circuits Summer Circuits compilation 2003. 2001, 2002 £16.20 VSS 37.00 302 Circuits Summer Circuits compilation 1982. 1983. 1984 £10.35 VSS 21.00 304 Circuits Summer Circuits completion 1938. 1959. 1990 £ 13.45USS 27.00 305 Circuits Summer Circuits compilation 1991. 1992. 1993 £ 15.55, USS 31.00 307 Circuits Summer Circuits completion 1997. 1993. 1999 £ 18.20 VSS 37.00 Lasers: Theory and Practice A valuable boo* on Hie practical use of lasers. £20. 75/VSS 42. 00 Build your own Electronic Test Instruments For good reasons (cost chaltenge) many researchers enltiusiasis. and orpenmenters like to build test instruments themselves £16.60 VSS 33.00 Electronic test instruments Build your own Audio Valve Amplifiers Ties book pro.es that the thermionic valve is making a come-baci. £15.55 VSS 31.00 Designing Audio Circuits How does speech, music, or, indeed, any sound get from the record. CO. or cassette tape to the loud- speaker? This book endeavours to giro a comprehensible answer. £ 20.75.VSS 42.00 Handbook for Sound Technicians A book on the technical aspects of the recording studio. £20.75 VSS 42.00 Build your own High- End Audio Equipment For those v.ho cannot pay tegh prices for high end equipment. 2 solution offered in this book budd your own at cons-derat-ie cost savings. £ 15.S5.VSS 31.00 Modern High-end Valve Amplifiers VaT.e ampijfsis based on toroidal output transformers combine of ctasscal technology and modem components. The result Qcefe-t sonic quasiy and a revf.al of the valve ampli- fier. f 25.95VSS52.00 Microcontrollers Order now using the Order Form in the Readers Services section in this issue Matchbox Basic Computer This books describes a miniature controfier system us ng a pro- gramming language ca’led MBL (MatchBox Language), which has its origins in BASIC and Pascal. £25.95 VSS 52.00 ST62 Microcontroller Practical programming of the ST62 series of microcontrollers from SGS Thomson. £24.95 VSS 50.00 PICs in Practice The PIC16C5x family ts a senes of rrucrocon- trok’if fs that lend them- seh-es to a broad wri- ery of app&cabons. £ 24.95 USS 50.00 Short Course 8051/8032 Microcontrollers A course describing the futtfnaie and software (assembler code) to make a coroptete micro- controller system based on an MCS-51 controller. £ 9.9SVSS 20.00 Computers See also www.elektor-elecfronics.co.uk Dictionary ol Monitor Technology A pioneering book of unsur- passed range which ctea/ty documents ail aspects of tbs davc&prrejrt of computer monitors. £25.95 VSS 52.00 faultfinding in Computers and Digital Circuits Faultfinding in Computers and Digital Circuits This book covers faultfind- ing not just m microproces- sor systems, microeon- troaers and industrial PCs. but also in consumer items such as personal computers, multimedia devices, digital telev.sion and so on. £31. 15 VSS 63.00 The I2C Bus Tins book deals eitensrreFy with the technical specifica- tions of the I2C bus. £ 25. 95. VSS 52.00 PC Service and Repair This book provides the information you need to be able to deal wfth computer system faults whenever they occur. £31. 15 VSS 63.00 SCSI Tms book comes with a CD- ROM and mi prove invalu- able when you want to sort out a problem in a SCSI sys- tem. £ 24.95 VSS 50.00 PC Interfaces under Windows Measurement and control using standard ports PC Interfaces can be used for mote titan f jst tha prin- ter. mouse, modem and joy- stick! £25.95 VSS 52.00 Elektor Electronics (Publishing) -1 H P.O. Box 1 90 • Tunbridge Wells TN5 7WY • England. Telephone +44 (0) 1580 200 657 Fax +44 (0) 1580 200 616 vAwv.elekior-electronics.co.uk 1L D i K i To book your website space contact Bernard Hubbard Tel 22 44 (0)1242 510760 Fax: 0044 (0)1242 226626 BETA LAYOUT www.pcb-pool.com Beta layout Ltd Award- winning site in both English and German offers prototype PCBs at a fraction of the cost of the usual manufacturers' prices. BURN TECHNOLOGY LTD http://www.burntec.com Distributors of a wide range of device programmers, package adaptors, test and soldering equipment Order online and get free delivery on all orders over £30.00. COMPUCUT http://vAWv.compucutters.com Computer Numerical Control from your home PC. Great for tricky jobs, and accurate repetitive work. We supply: - Software - Interface - Manual - Support Price £250 plus postage. CONFORD ELECTRONICS http://wvAv.confordelec.co.uk Lightweight portable battery/mains audio units offering the highest technical performance. Microphone, Phantom Power and Headphone Amplifiers. Balanced/unbalanced signal lines with extensive RF1 protection. CROWNHILL ASSOCIATES LTD http:/Awvw.cro wnhill.co.uk tel 01353 666709 fax 01353 666/ • Manufacturers of production quality device praogrammers • PIC Programmers • PIC Development tools • Manufacturers of Smart Cards • Smart Card Programmers • Design & Development Services Crownhill Associates Limited 32 Broad Street Ely, Cambridge CB7 4 AH Tel: 01 353 666709 Fax: 01 353 66671 0 DANBURY ELECTRONICS http://www.mc-h.demon,co,uk/tiansformers.html Here you will find our mains and output transformers in Mike Holme's range of valve/tube amplifiers (PP & SB). Also circuits, parts lists, chassis, advice. DEBUG INNOVATIONS UK http://www.debuginnovations.com Introducing hassle free prototyping • RE / Analogue • High speed digital • Surface mount • 0.1" grid • Power planes • Unique patch architecture Forget custom PCBs, start your project now! m ss EASYSYNC http://www.easysync.co.uk EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and RS485 converters at competitive prices. ELM ELECTRONICS http:/Awvw.elme!ectronics.com Offering a variety of unique and low cost integrated circuits for the experimenter. Secure ordering via the web site with worldwide shipping. ELNEC www.elnec.com ^ • device programmer manufacturer • selling through contracted distributors all over the world • universal and dedicated device programmers • excellent support and after sale support • free SW updates • once a months new SW release • reliable HW • three years warranty for most programmers ERVAN INTERNATIONAL Co. http://www.ervan-int.com Power Electronics and Solar Energy Design and Consultants. Also offers; Discount prices of: • Ultra Bright LEDs • PCB LED Cluster Kits • Laser Pointers • Solar Modules • Batteries FOREST ELECTRONIC DEVELOPMENT http://www.fored.co.uk FED supply PIC programmers, Basic modules, and development software including a PIC C Compiler, Prog 'n Drop Visual Development and a well featured debugging environment FUTURLEC http://vAvw.futuriec.corn Save up to 60% on • Electronic Components • Microcontrollers, PIC, Atmel • Development Boards, Programmers Huge range of products available on-line for immediate delivery, at very competitive prices. FUTURE TECHNOLOGY DEVICES http://wvAV.fidichip.com FTDI designs and sells USB-UART and USB-F1F0 interface i.c.’s. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB HAMMOND ELECTRONICS http/ AWAV.hammcndmfg.com. sa!es@hammond- electronics.co.uk tel: 01256 812812. Small die-cast, plastic and metal enclosures for the hobbyist and professional. Widely available from major distributors. MQP ELECTRONICS http://www.mqpelectronics.co.uk Leaders in Device Programming Solutions. • Online shop • Low Cost Adapters for all Programmers • Single Site and Gang Programmers • Support for virtually any Programmable Device NEW WAVE CONCEPTS http/Aw.w.n8w-wave-concepts.com Software for hobbyists: • Livewire circuit simulation software, only £29.36 - — • PCB Wizard circuit design software, only £29.36 Available from all Maplin Electronics stores and www.maplin.co.uk PEAK ELECTRONIC DESIGN LIMITED www.peakelec.co.uk Cool component test gear for your passives and semis. Instant identification, measurement and validation. Connect anyway round. The Peak Atlas family starts from £59. PICBASIC http://vnyw.picbasic.co.uk • Pic basic & Pic Basic Pro • Fast efficient powerful compilers • Parallax stamp compatible code • Write in basic-compile to hex • 12c, 14c, 16c(f) and 17c pic’s POND ELECTRONICS http://YA7W.pond.ie tel +353-1-821-5060 fax +353-1-820-9384 Innovative systems for PIC development & embedded applications. • pFlash876 • PIC C Compilers & Programmers • MicroStack • Basic Stamp • Custom development Service 72 Elektor Electronics 3 2004 QUASAR ELECTRONICS vAW.QuasarBecironics.com Over 300 electronic kits, projects and ready built units for hobby, education and industrial applications including PIC/ATMEL programming solutions. Online ordering facilities. Tel: +44 (0) 870 246 1826 Fax: +44 (0) 870 460 1045 Email: sales@OuasarElecironics.com ROBOT ELECTRONICS http://www.robot- eiectronics.co.uk • Ultrasonic rangefinders • Motor H-Bridge controllers • Magnetic Compasses • RC servos and controllers • PIC programmers and components • Electronic Design/Development and Manufacturer to industry SPICEAGE AND SPICYCLE http://v, vrw.spiceage.com Spicycle circuit design program (schematic drawing, well-featured PCB drawing, SpiceAge simulation). SuperFilter digital and analogue filter synthesis and optimisation. Download a free working evaluation and enjoy software renowned for its high quality at prices that make it seem like Christmas all year round. Make contact with Those Engineers (020 8906 0155), real engineers, who will understand your needs. TECHNOBOTS http://vvAv.techriobots.co.uk Welcome to Technobots - the one stop shop especially for the remote operated robot builder, radio control and engineering hobbyist. TELNET http://www.telnet.uk.com The site shows graphical) Telnets wide range of quality second-user test and measurement equipment, including oscilloscopes and spectrum analysers. ULTRALEDS http: vAvw.uiiraleds.co.uk tel: 0871 7110413 Large range of low cost Ultra bright leds and Led related lighting products. Major credit cards taken online with same day depatch. The World is getting onto Spicycle MM" link s USB INSTRUMENTS http://wvAV.usb-instruments.com USB Instruments specialises in PC based instrumentation products and software such as Oscilloscopes. Data Loggers, Logic Analaysers which interface to your PC via USB. VIEWCOM http://www.vfewcom.f9.co.uk tel: 020 8471 9338 fax: 020 8552 0946 • Mail Order supplier of: • Integrated Circuits and Components. • Kit and parts for Elektor projects. • Transistors, FETs, Capacitors, Resistors, Crystals, etc and hard to find devices. Viewcom Electronics, 77 Upperton Road WesL Plaistow, London El 3 9LT PROMOTE YOUR WEBSITE HERE Elektor Electronics have a teaiure to help customers to promote their websites. Net Links - a permanent feature ot the magazine where you will be able to highlight your site on a regular basis. • For just £120 + VAT (£10.90 per issue for eleven issues) Elektor w ill publish your company name, a 25-word description and your website address. • For £300 + VAT for the year (£27.27 per issue for eleven issues) we will publish die above plus run a 3cm deep full colour screen shot from your site. Places are limited and spaces will go on a strictly first come, first served basis, please fax back vour order today! I w ish to promote my company, please book my space: • Text insertion only for £120 + VAT • Text and photo for £300 + VAT NAME: ORGANISATION: JOB TITLE: ADDRESS: TEL: PLEASE COMPLETE COUPON BELOW AND F.AX BACK TO 00-4440)1242 226626 COMPANY NAME WEB .ADDRESS 25-WORD DESCRIPTION ELECTRONIC ENTHUSIASTS! Only one magazine tests its projects and circuits' in its own lab beforepublication - Si® if, f ELECTRONICS THE ELECTRONICS & COMPUTER MAGAZINE Contact: Worldwide Subscription Service Ltd, Unit 4 Gibbs Reed Farm, Pashiey Road, Ticehurst TN5 7HE Telephone: (+44) (0) 1580 200657 Fax: (+44) (OJ 1580 200616 Or visit our Website: www.elektor-eIectronics.co.uk 32004 Elektor Electronics 73 SNEAK PRB/IB/V Next month in Elector Electronics Digitally Controlled Preamp Sme, there are many designs for high-end preamplifiers but these ate almost invariably marked by complex and expensive circuits when you look at the volume control section. This project closes the gap, offering not only a good many functions but also an oppor- tunity to adapt these functions to personal requirements. Using technical idiom, you're look- ing at a super-accurate volume and balance control based around the PGA2311 analogue opamp operating under digital control of a PIC micro. VHF-Low Explorer The radio frequency range between 68 and 87 MHz is usu- ally referred to as the 'VHF-low' or 'Four-Metres’ Band It is home to lots of services including (government) PMR and radio amateurs, the latter being active between 70.000 MHz and 70.500 MHz (in the UK). Met ami Smm, The April 2004 issue of Elektor Electronics will be marked by a major makeover including - restyled magazine cover and masthead (logo) - restyled article layouts - new columns and regulars including Mews & New Products, iTech, eTech, Inside Out, Mailbox and Reviews. Curious? Order your copy now! RESERVE YOUR COPY NOW! The March 2004 issue goes on sale on Friday 26 March 2004 (UK distribution only). UK subscribers will receive the magazine a few days before this date. Article titles and magazine contents subject to change. NEWSAGENTS ORDER FORM SHOP SAVE / HOME DELIVERY Please save / deliver one copy of Elektor Electronics magazine for me each month LH CTOR THE ELECTRONICS & COMPUTER MAGAZINE Name: Address: Post code: Telephone: Date: Signature: Please cut out or photocopy this form, com- plete details and hand to your newsagent. Elektor Electronics is published on the third Friday of each month, except in July. Distribution S.O.R. by Seymour (NS). Index of Advertisers Beta Layout Net Links jvmv. pcb-pool.com 63. 72 Bum Technology LTD. Net Links jrwvwbumtec.com 72 CMS www.cmsuk.com 9 Compucut Net Links jYww.compucuners.com 72 Contort Electronics. Net Links jYww.confordetec.co.uk 72 Cricklewood 63 CrownhiO, Net Links jmvw.craimtiiB.co.uk 72 Danbury, Net Links jYww/nc-h demoa.auik 72 Debug Innovations, Net Links jww.deixr 5 iww 1 arJans.com 72 Display Electronics mw.rBsteLcotuk 27 Easysync. Net Links jrww.easysyrK.ca.uk 72 ELM Electronics Net Links mw.elmetectmacs.com 72 Elnec. Net Links jmw.etnec.com 72 Ennovi wmteimi.co.uk 9 Ervan. Net Links www.emn-int.com 72 Eurocircuits jmw.thepcbshop.com 66 Foresl Net Links www.foreii.coMk 80 Future Technology Devices. Net Links . . jvm.ttaichip.coni 72 futurtec. Net Links twwwJuturiec.com 72 Hammond Electronics. Net Links w ww.hemmondmtg.com 72 ffitexvrww.hitexco.uk'bigchip 8 itp www.apiot.com 9 Labcenter jwwJabcenter.co.uk 76 Matrix Multimedia Ltd jrwwjnatnmuStmediaM.ui 8 Milford Instruments www.rmBnsLdemon.coM 55 MOP Electronics. Net Links Net Links New Wave Concepts. Net Links . Number One Systems Observant Electronics PA6M Peak Electronic, Net Links Picb3Sic. Net Links Pico Pond Electronics, Net Links — Quasar Bectronics. Net Links . . Robot Electronics. Net Links . . . Spiceage and Spicycte. Net Links Stewart of Reading Technobots, Net Links Telnel Net Links Ultraleds, Net Links USB Instruments. Net Links Viewcom. Net Links wwwmpqetectroncs.co.uk 72 72 . 73 wwwww-rrave-conceBts.com 72 www.numberone.com 7 jy,yw. obser\’anhvodd. com 75 wwwpagm.co.uk 2 jYww.peakstec.co.uk 72 y, ww.ordjasic.co.uk 72 jYww.drdag.com 10 jvwwpondie 72 jYww.cuasaretectmntcs.com 6 . 73 jYww.robot-etectiorkcs.co.uk 73 www.spiceage.com 73 www.stewart-of-reeding.co.uk 45 jjww.teclmbots.co.uk 73 srww.tetneLuk.com 73 www.uttraieds.co.uk 73 www.usb-instnments.com 73 www.tiwcom.i9.co.uk 73 ADVERTISING SPACE for the issue of 20 Ari 2004 m3y be reserved no! later than 24 March 2004 wish Elektor Electronics (PubSshing) Advertisement Office - 3 Crescent Terrace - Cheltenham GL50 3PE - England - Telephone 01242 510 760 - Fax 01242 226 626 - e-maS: r-- nafehEg&»nigbker'-:e cc - A to whom all correspondence. copy instructions and artwork should be addressed. 74 Elektor Electronics 32004 Powerful & flexible schematic capture. Auto-component placement and rip-up/retry PCB routing Polygonal gridless ground planes. Libraries of over 8000 schematic and 1000 PCB parts. Bill of materials, DRC reports and much more. The Contplete Electronics Design System Simulation Virtual System Modelling Models Schematic & PCB Layout New Features in Version 6 • Drag and drop toolbars. • Visual PCB packaging tool. • Improved route editing. Schematic PCB Capture Layout 'Tu»mxiu*iuu_J Mixed Mode SPICE Circuit Simulation • Berkeley SPICE3F5 simulator with custom extensions for true mixed mode and interactive simulation. • 6 virtual instruments and 14 graph based analysis types. • 6000 models including TTL, CMOS and PLD digital parts. • Fully compatible with manufacturers’ SPICE models. • Point and click DRC report. • Multiple design rules (per net). • Multiple undo/redo. Call Now for Upgrade Pricing Proteus VSM - Co-simulation and debugging for popular Micro-controllers Supports PIC, AVR, 8051, HC11 and ARM micro-controllers. Co-simulate target firmware with your hardware design. Includes interactive peripheral models for LED and LCD displays, switches, keypads, virtual terminal and much, much more. Provides source level debugging for popular compilers and assemblers from Crownhill, IAR, Keil, and others. Tel: 01756 753440 Fax: 01756 752857 Contact us for Free Demo CD Electronics 53-55 Main Street, Grassington. BD23 5AA www.labeenterxo.uli info@labeenterxo.uli Data Station The universal I/O solution DataStation's 16 configurable channels provide 391 different I/O configurations and >500 samples per second, allowing it to adapt to virtually any application. With up to: • 6 Analogue Inputs • Selectable ADC resolution • 2 PWM Outputs • 1 6 Digital Inputs • 1 6 Digital Outputs • RS-232 interface Typical Applications: • Machine control • Industrial automation • Environmental monitoring • Robotics This unrivalled flexibility allows designers to meet the needs of most applications with just one product, reducing development costs and time-to-market significantly. £89.00 plus VAT (OEM pricing available) To find out more or buy online servant Electronics Limited visit: www.ObservantWorld.com Unit F2b, Avonside Business Park, New Broughton Road, Melksham, Wiltshire. SN12 8BS. U.K. Telephone: 01225 704631 Facsimile: 01225 708618 www.ObservantWorld.com Email: enquiries@ObservantWorld.com