9 770268 451111 October 2005 £3.70 www.elektor-electronics.co.uk 1 f r£i 1 1 ■ i e r L 1 i H Yes that's right, down town, down under in Sydney Australia. We are a bunch of electronics enthusiasts who sell a great range of goodies through our FREE 400 page catalogue! (see below) Don't be frightened! You can purchase on the Net from us 24/7/365 through our secure encrypted system. Post and packing charges are modest and you can have any of 8000 + unique products delivered to your door within 7-10 days of your order. Some specific products are shown below. Performance Electronics for Cars Book BS-5080 £6.35 + post & packing Australia's leading electronics magazine, Silicon Chip, has developed a range of projects for performance cars. There are 16 projects in total, ranging from devices for remapping fuel curves, to nitrous controllers, and more! The book includes all instructions, components lists, colour pictures, and circuit layouts. There are also chapters on engine management, advanced systems, DIY modifications, and more. Over 150 pages! All of the projects described are available in kit form, exclusively from Jaycar. Check out our website for all the details. Here are just two.... Universal Voltage Switch Kit Smart Fuel Mixture KC-5377 £8.70 + post and packing KC-5374 £8.15 + post & pac This is a universal module which can be adapted to suit This new 'smart' version has a a range of different applications. It will trip a relay when such as, auto dimming for nic a preset voltage is reached. It can be configured to trip lean-out alarm, and better circ with a rising or falling voltage, so it is suitable for a great feature, is the 'dancing' wide variety of voltage outputting devices eg., throttle when the ECU is operating i position sensor, air flow sensor, EGO sensor. It also loop means that the air/fuel ra features adjustable hysteresis (the difference between economy and emission perf< trigger on/off voltage), making it extremely versatile. with PCB and all electronic coi You could use it to trigger an extra fuel pump under * Car must be fitted with air I high boost, anti-lag wastegate shutoff, and much more. (standard on all EFI systems) Kit supplied with PCB, and all electronic components. Theremin Synthesiser Kit KC-5295 £17.50 + post & packing The Theremin is a weird musical instrument that was invented early last century but is still used today. The Beach Boys' classic hit "Good Vibrations" featured a Theremin. By moving your hand between the antenna and metal plate, you create weird sound effects like in those scary movies! Kit includes a machined, silk-screened, and pre drilled case, circuit board, all electronic components, ,and clear English instructions. 9VDC power supply required (Maplin #GS74R £9.99). hours 50MHz Frequency Meter Kit with LCD Display KC-5369 £20.30 + post & packing If you want a great value frequency meter, then this project is for you. It features autoranging operation for ease of use, switching between its three ranges. High resolution of 0.1 Hz up to 150Hz, 1Hz between 150Hz and 16MHz, and 10Hz above 16MHz. It can be powered by a 9V battery or wall adaptor (not included) and the case measures just 5 1/8" x 2 5/8" x _ 1 ". Kit includes laser cut & silk _ screened case, circuit board, electronic components, & clear English instructions. mins mins Recommended box UB2 €0.97 each hours Recommended box UB3 €0.97 each Stock Digital Fuel Mixture Display KC-5300 £18.30 + post and packaging Monitor your car's air fuel ratio in real time on a three-digit display as well as on the programmable 10-LED bargraph. The kit will indicate ratios between 11.8 & 20.6 for petrol and 12.7 & 21.5 for propane/LPG. Features include: lean and rich indication, fast 220ms update time for bargraph, 440ms update time for 3-digit display, 0-1 V display for setting up adjustments, dot or bar option for bargraph and automatic display dimming for night driving. All this in a case measuring just 3.25 x 2.12 x 1.22 in. Kit includes case with silk-screened panel, PCBs, pre-programmed PIC micro, 7-segment displays, red acrylic, hook-up wire and all electronic components. Lead Acid Battery Zapper Kit KC-5414 £11.75 + post and packing This simple circuit is designed to produce bursts of high-energy pulses to help reverse the effects of sulfation in "wet" lead acid batteries. This is particularly useful when the battery has been sitting for a period of time without use. Kit includes circuit board, case, leads, electronic components, and clear English instructions. mins Caution: Battery should be disconnected from the vehicle when using this project hours DETAILED DETAILED DETAILED DETAILED Electronic Components, Sub-Assemblies & Electronic Kits Power Products & Accessories Audio & Visual Equipment & Accessories Computer & Telecoms Accessories Burgular Alarms & Surveillance Equipment Lighting Products & Accessories DETAILED Gadgets & Unique Gifts DETAILED Log on to www.jaycarelectronics.co.uk/elektor for your FREE catalogue! 0800 032 7241 (Monday - Friday 09.00 to 17.30 GMT + 10 hours only). For those who want to write: 100 Silverwater Rd Silverwater NSW 2128 Sydney AUSTRALIA Post and Packing Charges: Page Order Value Cost £20 - £49.99 £5 lo 9ue £50 - £99.99 £10 £100- £199.99 £20 £200 - £499.99 £30 £500+ £40 Max weight 121b (5kg) - heavier parcels POA. Minimum order £20. M ikroE ektron ka MICROCONTROLLER DEVELOPMENT TOOLS from Bread boarding Systems Make PICmicro® development easy with the EasyPIC3 - only £99! The new EasyPIC3 Development Board combines a versatile development/experiment board with a built-in USB programmer. With its wealth of on-board I/O devices and support for virtually all 8, 14, 18, 28 and 40-pin PICmicro® microcontrollers in the 10F, 12F, 16F and 18F families, we’re certain you won’t find a more ver- satile high quality board at such a low price. The EasyPIC3 Development Board is supplied with USB pro- gramming/power cable, programming software and useful example programs. Also available are similar boards for the 8051 , AVR and dsPIC, each at the same great price of £99 including UK delivery and VAT — please telephone or see our website for further details. EasyPIC3 Development Board features: • High quality development/experiment board with built-in USB 2.0 high-speed programmer. • Programming software compatible with Windows operating systems including 2000 and XP. • Comes with a PIC16F877A microcontroller but compatible with virtually all 8, 14, 18, 28 and 40- pin PICmicro® devices in the 10F, 12F, 16F and 18F families. • On-board I/O devices including switches, LEDs, seven-segment displays, potentiometers and RS- 232 interface. Now also features USB and PS/2 keyboard interface connectors. • Provision for easy fitting of optional DS18S20 temperature sensor, and LCD and GLCD dis- plays. • All I/O lines available for off-board expansion. • Wide range of optional add-on boards available including ADC, DAC, EEPROM, Compact Flash, MMC/SD, Keypad, RTC, RS-485, CAN and IrDA. Additional add-ons available soon. • Powered from your PC’s USB port or optional mains adapter. • Supplied with example programs written in assembly language, BASIC, C and Pascal. • Supplied with Microchip Technology’s MPLAB development software and demonstration versions of MikroElektronika’s mikroBASIC, mikroC and mikroPascal compilers. Learn about microcontrollers with our EasyPIC3 Starter Pack - just £149! We’ve taken the EasyPIC3 Development Board and added a 16x2 character LCD display, 128x64 graphical LCD, DS18S20 temperature sensor, RS-232 serial communications cable and our own easy-to-follow microcontroller tutorial to form a complete and self-contained Starter Pack — everything you need to learn about and experiment with microcontrollers! With this pack you will quickly become proficient in microcontroller programming and interfacing. Please see our website for full list of covered topics. Make programming easy too with mikroBASIC, mikroC and mikroPascal Three incredibly easy-to-use yet powerful compilers for PICmicro® microcontrollers, each featuring a user-friendly code editor, built-in tools and routines and source-level debugger. Supplied libraries facilitate rapid development and include ADC, CAN, Compact Flash, EEPROM, Ethernet, Graphic LCD, l 2 C, LCD, 1-wire, PWM, RS-485, sound, SPI, USART, USB routines and many more. mikroBASIC and mikroPascal — £99 each, mikroC — £149. Call 0845 226 9451 or order online at www.breadboarding.co.uk All prices include UK delivery and VAT. Major credit and debit cards accepted. Secure online ordering. 10/2005 - elektor electronics 3 Input threshold: (almost) zero For some mysterious reason we get emails from readers timidly asking if they can contribute to the magazine. The answer is almost invariably, Yes, we will only be too pleased to have a look at what you are proposing in the way of an article, be it a construction project, a news item or a background story. Our Author Guidelines may be found on the Service page of our website and the word is out that we pay between 60 and 1 00 pounds per published page depending on the amount of re-engineering or editorial work. In the case of projects, once your proposal has been accepted for publication (and that may take us quite some time to decide, sorry) you will be 'handed over' to one of our in- house design engineers who will, I have noticed on several occasions, bend over backwards to turn your humble idea into a full-blown DIY pro- ject in Elektor style, possibly with a PCB and software to download. We are currently the only English-lan- guage electronics magazine in the world with a fully equipped in-house design lab and 30 years consistency in PCB design. I guess that's the rea- son why readers ask if they may con- tribute to Elektor Electronics in the first place: with the exception of Readers Circuits (which are clearly identified as such by a footer text) our articles contain circuit diagrams and PCB designs with uniform characteristics often described as 'Elektor style'. Our design engineers will happily turn an idea on the back of an envelope into an Elektor PCB and the editorial team is ready to correct, expand, restructure and generally improve your write-up to produce an article with impact and appeal to tens of thousands of readers. The only proviso is that your idea is original and not overly spe- cialised as that limits the number of readers who will be interested. A pro- totype plus a mention of what you actu- ally do with your design will consider- ably help your case. Over to you! Biometry is likely to be used in the near future for passports and many other applications related to security and identification. However, the performance of biometry for many applications is not yet good enough and a lot of research is required to obtain the necessary improvements. In this article we provide some insight into the technol- ogy used and we not only discuss how and why biometry works but also why the systems sometimes fail. 20 Fingerprint as Password Passwords have not shown themselves to be a foolproof form of identification, and the trend is now towards biometric methods, including fingerprints, becoming more widely used. We look at how fingerprint sensors work and at the advantages and disadvantages of the various techniques. Jan Buiting Editor CONTENTS There is another use for cryptography, which has more to do with keeping things in the open. This other use, which rightly belongs in this issue on All Things Security, is data authentication: techniques for verifying that data has not been tampered with. 28 48 In this article, we work through the entire design process for a CPLD project from start to finish using a practical example. The result is a handy 27C51 2 EPROM emulator that is useful for debugging microcontroller systems. 6 8 9 10 82 84 77 78 Volume 31 October 2005 no. 347 know-how Biometrical Imaging Fingerprint as Password WiMAX Primer hands-on Colossus Jr. 27C51 2 Emulator Remote Control Operator Mini Project: Flash Lock for PCs Labtalk: the noiseless PC Design Tips Cascode stage Pot as interrupt generator technology Fingerprint Sensors Delphi for Electronic Engineers (8) TIRIS RFID Reader info & market Colophon Mailbox Corrections & Updates News & New Products Elektor SHOP Sneak Preview infotainment Retronics: Elektor Time Standard (1988) Quizz'away (13) inJ 2 is is unique: Mtul-tim? audiy-u^m yl -j tiUlicm . Ie a UiF uni! Euy|jj kind of (9 ter. Oju ckin't rtg^rij IrJEZ jv/ri|a|id arid r y :.- :-j : m fjurturi ivl I;i r" \ r j . iri / -jf l i r j r i and Ujj [ r j -ii filters in ilaiin, ivjci Tvj-jIwj sairijjl* from 4ti %Af| ploE mid -^ipon or isripulsa ^nrJ r Jit-\ iri^ (iUprop eJj ri for vt sm* rites. J liiuluctei; board, CD, po'^ar supply mid nil linri ui iiiiisrfa^ii op^ruiiiigiU l J§„2 fcild iivtUd {aLMu^rstestet Full detaija and ordering information at: www. or more information mail: info iSsaeliy. com om/Suppliais/ tfftr Windows Sfl'and-lte flh Cheb i ^ :;1{Jw an a I y z^r wJflh ^dpSa cap jmfgrosacondB to t .Seconds t channel ] Des Si E B p ^ ~ L Jwj ■ J. m F ■. Uiy.j ! • riL »■ | ■ ■ ■ i p"‘ «■ B Hwj 1 ^ i" J*iff diq ■ 1 . 1 1 f 1 L*“J Ell i * JT E3BT rl[1^Tc_d ■ W lektor lectronics Volume 3 1 , Number 347, October 2005 ISSN 0268/45 1 9 Elektor Electronics aims at inspiring people to master electronics at any person- al level by presenting construction projects and spotting developments in elec- tronics and information technology. Publishers: Elektor Electronics (Publishing), PO. Box 190, Tunbridge Wells TN5 7WY England. Tel.: (+44) (0)1580 200657, fax: (+44) (0)1580 200616. www.elektor-electronics.co.uk. The magazine is available from newsagents, bookshops and electronics retail outlets, or on sub- scription. Elektor Eectronics is published I I times a year with a double issue for July & August. Under the name Elektor and Elektuur, the magazine is also published in French, German and Dutch. Together with franchised editions the magazine is on circulation in more than 50 countries. International Editor: Mat Heffels (m.heffels@segment.nl) Editor: Jan Buiting (editor@elektor-electronics.co.uk) International editorial staff: Harry Baggen, Thijs Beckers, Ernst Krempelsauer, Jens Nickel, Guy Raedersdorf. Design staff: David Daamen (head of design), Ton Giesberts, Paul Goossens, Luc Lemmens, Karel Walraven Editorial secretariat: Hedwig Hennekens (secretariaat@segment.nl) Graphic design / DTP: Ton Gulikers, Giel Dols Managing Director / Publisher: Paul Snakkers Marketing: Margriet Debeij (m.debeij@segment.nl) Subscriptions: Worldwide Subscription Service Ltd., Unit 4, Gibbs Reed Farm, Pashley Road, TicehurstTN5 7HE, England. Telephone: (+44) (0) 1 580 200657, Fax: (+44) (0) 1 580 2006 1 6 Email: admin@worldwidesubscriptions.com Rates and terms are given on the Subscription Order Form Head Office: Segment b.v. RO. Box 75 NL-6I90-AB Beek The Netherlands Telephone: (+31)46 4389444, Fax: (+31)46 4370161 Distribution: Seymour, 86 Newman Street, London Wl P 3LD, England UK Advertising: Huson International Media, Cambridge House, Gogmore Lane, Chertsey, Surrey KTI6 9AR England. Telephone: +44 (0) I 932 564999, Fax: +44 (0) 1 932 564998 Email: r.elgar@husonmedia.com Internet: www.husonmedia.com Advertising rates and terms available on request. International Advertising: Klaas Caldenhoven, address as Head Office Email: advertenties@elektuur.nl Advertising rates and terms available on request. Copyright Notice The circuits described in this magazine are for domestic use only. All drawings, photographs, printed circuit board layouts, programmed integrated circuits, disks, CD-ROMs, software carriers and article texts pub- lished in our books and magazines (other than third-party advertisements) are copyright Segment, b.v. and may not be reproduced or transmitted in any form or by any means, including photocopying, scanning an recording, in whole or in part without prior written permission from the Publishers. Such written permis- sion must also be obtained before any part of this publication is stored in a retrieval system of any nature. Patent protection may exist in respect of circuits, devices, components etc. described in this magazine. The Publisher does not accept responsibility for failing to identify such patents) or other protection. The submission of designs or articles implies permission to the Publishers to alter the text and design, and to use the contents in other Segment publications and activities. The Publishers cannot guarantee to return any material submitted to them. Disclaimer Prices and descriptions of publication-related items subject to change. Errors and omissions excluded. © Segment b.v. 2005 Printed in the Netherlands 6 elektor electronics - 10/2005 NETCOM Ethernet- Serial Servers NalCein nro In cl si rln I slr&relK, ndw&ffe dasca serial device Mrvers f Of connoCtirg RS 232. RS422 and RS4&5 serial devices dlrcclly to a Iti/lOOMbps Ethernet rtetwork running TCP/iP Neiocm can control 1 nr i unite shiirI rlErvinns hnnlR-rl virhjnly HiiywhoFR (win Hhpmfil or Intern nl). Mol Com ran hs cAnflgurart ever Driver Panftfe , WE- El Browser. Serial Port, Tetml or SNMP and serves as a trams paronl serial channel wfihautplalfbmn arid distance ItoiilaSiari Housed in a sEurtiy mfital an closure Inducing DIN rail nlouril, one Id Eight port inorinb: hid KVRiiRblte. mrir-mrajnl vnmnns with inlamnS RwitrJi morifl HGU nFin also hs SufifjIFted priced from £85 ( HciCom 111 } USB Instruments - PC Oscilloscopes & Logic Analysers Our ranga or F t: instruments may he budge*! prtcftfl hi* have a weahh cf feature! normally enly found In more evponslvo insIruiniDPlallon Our DS1M12 and P34GM1Q oscilloscopes have sophi Plicated digilal triggering including n slays c cimebeise and come with our hJssvSr.R(>fi ns c ill her rips } sfhpdjiinn nnfilyzer t YrdtR-gR and irndiiionny display appllralirvn jtnriwnra am nur hasyl nggnf data Pegging software We also pfOYtde Windows DLLs and ceae examples far 3rd party software Fni effacing to our scopes. Our ANTS and ANT^G Logic Analyzers feature 8/tS capture channels rA rrIr aI a blfizirg fsOOMS/S swmplfi ralfi in r nrympari Rnrlnsum prlcadfrem £125 { DS1M12 A ANTS ) 1 to IB port USB tn Serial Adapters Wilh over 16 differeni monels av nibble, wo probably slock the widesl range of USE Serial Ann pis re avaitablE anywhere, We- niter rainvfirtrr rahln-R, mulli-pnri fmnlnsujRi F-lyl n model?. in metal ami plastic. also rack mount units =.i.r.h as the ustl lfitvoM KM cpp&slle Serial Interfaces supported InclLdo RS262, RS422 ana R34S5 Wo also supply cplo isdatoa RS422 and RSI 65 versions lor rslalbte lorg disEance caTimunicaliors. All our US6 SetbiI produces nrn liPSERd nn tha prniininn. KhipEHtE wnd drivteFE Irnm UK ornnpEiny l- |]3l Tor superior cempallMEHy, pnrtnrmamfl. and terJir'l-.al support across Windows. fotAC OS and Linux plalfomis priced from £20 ( US232G-LC laptop Companion, ] PCI Serial Cards Discover our groat value for money range of multi porl PCI serial cards Supporting Irom Iwo to eighl ports, I ho range includes RS232, K-5422, RS485 ard oplo -Isolated versions . Our 4 port and 5 porl morinfe n Fin mnnarJ Ihmugh FuclBrnal r^htRS, or ths Innovnlivs wrIP niiM irllr g CO MB OX EasySync Ltd 373Sce1land Stnecl. Glasgow G5 SOB, linHod Krngdcni Td . 0141 413 0131 f Fax . 0141 41 3 0110 Web . hllp.j'/www. Esayiync.ca.uk E Mail, sal ts@casys.yn c.co.uk * Pf ce r sh Dwn n:tr:iuriR PP Rnri WAT whRFft app!ifrahlH USB- 16 C 0 M-RM Pan [ ,ff5R Grria !tarvr!rRi?Jf Mounlwilh rdterm PSU NETC 0 M-B 13 S Pert RS232/RS422.'RS435 nwdel £ "J C A 0 S 1 Ml 2 Oscilloscope / Datalogger r J I MS:*, ErnliE ChRiviftls * w.wfifQrnii f\t nsrarnr output £125 lW15.fl ■: rir fllftrlriiffiis, 7 INFO & MARKET MAILBOX GPS Receiver on USB Dear Jan — I have to admit I became quite excited at the prospect of building my own GPS receiver for a reasonable cost (com- plete kit available) (June 2005, Ed.}. I have wanted to experiment with GPS aided navigation for a while now. So this project was very appealing to me. Before purchasing the kit though, I started looking at Route Planning Software with GPS support, such as those suggested in the article. Oh dear, what a disappointment I was faced with... I looked on the amazon.co.uk web- site for what was currently avail- able, particularly the two programs mentioned in the article, namely MS AutoRoute 2005 & Route 66. To my dismay, both these programs were reviewed by pur- chasers and were given extremely low scores. There were complaints concerning the maps not being up to date, roads missing entirely, and most of Ireland not existing! Europe coverage was said to be worse than previous ver- sions, and some comments about the earlier editions being marginally better, such as new roads that have been in serv- ice for around 3 years not included in the latest versions, nor the M 6 toll road which is also missing as well as changed road layouts that have been in force since the earlier issues. Some of this software is priced at up to £50 - a lot to pay to be disillusioned. All of this has really messed up my enthusiasm now. A poten- tially good and useful Elektor project being let down by possi- bly poor commercial software. I would hope that no one else falls into the same trap and builds a project that has a poor support. I would be interested in any comments from the authors of the article as to their opinions of these reviews, and suggestions of any alternate software with up to date UK & Europe cover- age and updates / plug-ins for other countries. Patrick Redway (UK) Many thanks for your useful comments. I have copied this email to the project designer ; Mr. Paul Goossens. Your claim that our project is ' supported ' by commercial software (of whatever quality according to reviews) is , of course, doubtful as we only published hardware that's open for connection to soft- ware from third parties we are not commercially linked to, and over which we have absolutely no control. The USB GPS kit and the associated article in the June 2005 issue have met with wide acclaim from an impressive number of read- ers. None the less, let's hope the quality of the software packages you mention does improve , or that there are simply better prod- ucts available. Possibly the alleged poor support of MS Autoroute and Route 66 only applies to UK and Eire maps, we are not aware of similar problems for the countries we did our testing in (Holland and Germany). Other readers may have recommenda- tions for alternative software ? Elektor software on 45 rpm vinyl records In response to my call for 45 rpm vinyl records originally supplied through our Read- ers Ser- vices as part of the for- mer Elek- tor Soft- ware Ser- vice (ESS) (see Retronics, April 2005), Rolf Meier of Freiamt, Germany, responded not only by informing us that he has mint copies of all ESS discs including sleeves, but also by emailing a scanned image of ESS record # 005, once a hit, now a Golden Oldie! OBD-2 Analyser success story From correspondence with indi- vidual readers and input to our international website forums we have been able to extract a list of car makes and types Elektor readers have used the OBD-2 Analyser with (status: mid-July 2005). Please use the Elektor OBD-2 Analyser topic in our online Forum to contribute to the list, exchange ideas and help other readers. Succesfully tested Mini CooperS 2002 (ISO-91 41) Opel Corsa 2003 CDTI (KWP2000) Citroen c3 1.4i 2004 (KWP2000) Citroen Berlingo 1 .9d 2003 (KPW2000) Toyota Prius VW GolfTDI 130hp 2002 (ISO-91 41 -2) Renault Scenic 2001 VWTouran 2005 (KWP2000) Mercedes A1 60 2004 Volvo V70 D5 2003 (ISO-9141) Peugeot Expert HDI 2001 (KWP2000) VW Passat TDM 994 (ISO-91 41 -2-ish) VW Passat 2.0 petrol 2001 VW Golf 1.9 TDI 2000 Land Rover Discovery 2004 diesel (CAN) Toyota Camry CE Canadian 1997 Toyota Corolla 1 .4 2005 VW Passat Diesel 2005 Suzuki Grand Vitara Diesel 2001 (KWP200 slow init) Volvo 850 Petrol 1996 8 elektor electronics - 10/2005 Corrections & Updates Programmer for DCC Model Railway Control May 2005, p. 46, 040422-1 The article states that the microprocessor fuse bits have to be set to the defaults of the Pony programmer software. Because the Pony defaults are different from the microproces- sor's factory defaults, they are repeated here: none of the 1 6 bits must be programmed (they must be left at '1 '), except SPIEN. SPIEN (serial program enable) should be left at the factory default, i.e., programmed ('0'). The factory defaults will cause the chip to operate at the 1-MHz internal oscillator instead of the 8- M Hz external quartz clock. You can easily verify that the chip is running on the external quartz clock. Connect a DVM in DC voltmeter mode to pin 19 of the processor. The level measured should be between 0.5 V and 1 .5 V. If not, ICs supplied through our Readers Services (item code 040422- 41 ) should be returned to our software service department for free reprogramming. Code Lock with one Button July/ August 2005, p. 90, 040481-1 The circuit diagram should be modified to show a common- cathode (CC) display in posi- tion LD1 . A suggested type is the LITE-ON LSHD-5503. Sup- ply decoupling capacitor Cl is not shown on the component overlay and may be fitted at the underside of the board. OBD-2 Analyser July/ August 2005, p. 18, 050092-1 In certain cases the reset pulse is too short, causing the red LED to light only and the green and yellow LED to remain off all the time. Contrary to what is men- tioned in the article text, it is better to fit IC7 and C7. A sol- der spot is available for the negative terminal of the elec- trolytic capacitor, while the pos- itive terminal is connected to the centre pin of IC7. Precision Ba rometer/ Alti meter September 2005, p. 54, 040313-1 Due to a change in the control software, a few small modifi- cations are required on PCB no. 0403 1 3-1 . PCBs already supplied through Readers Ser- vices, or made at home using the artwork originally sup- plied, may be modified as detailed below. The two PCB tracks leading to pin 1 (MCLR) of IC2 are cut as close as possible to the 1C pin and then connected to each Toyota Yaris Verso petrol 2002 Peugeot 206 petrol 2002 (KWP2000 fast init) Toyota Corolla CE 2004 (North American) Toyota Camry CE 1997 (North American) Mazda Protege 2000 (North American) No success (yet) / undetermined Ford Scorpio 2.3 1997 Ford Scorpio 2.3 1997 (ECU: EEC-V) Toyota Landcruiser 2004 Audi A8 Quattro 2.8 1997. Citroen Xsara coupe 1 .8i 1 6V VTS 1 999 Peugeot 307SW diesel 2003. Landrover Defender 110 DCPU Volvo V70 -05 and -03 Nissan Sentra GE 1.8 2001 USA Summer Circuits 2005 edition is a download Dear Jan — a quick note to say thank you for making the com- plete July/August 2005 issue available online. I hope it was successful enough to make it a permanent option. Terry Mowles (UK) Thanks for the feedback , Terry (and others who have responded through the Contact Form on our website). The experiment was suc- cessful enough to convince our Publisher to put the September 2005 issue online , too , this time at about 15% less than the UK cover price! I believe we are now well on our way towards the online subscrip- tion to your favourite magazine. A bare bones PC Dear Editor — recently I stripped my old Pentium system from everything useful like memory cards and storage media. In exchange for a few pounds I got my hands on a second-hand ATX case with mainboard and a Pentium-2 processor. I filled this case with the useful bits from my ancient PC. A fine 17-inch CRT monitor was picked up at a carboot sale for 20 pounds. I would like to suggest this method to other readers. Many of the latest PCs are overdimen- sioned in respect of speed and storage capacity. If you are happy with just Internet access, e-mail, playing the odd music CD, word processing, a bit of speadsheeting and so on, a P2 at 266 MHz and a 5-1 0 GB hard disk is wholly adequate. Gert Baars (Netherlands) I agree Gert ; my own hobby PC at home is also a 300-ish MHz P2 with a 17-inch CRT. Still run- ning Windows 98SE this relic gives me great satisfaction and no worries of blowing up expen- sive bits or messing with the fam- ily's programs and email. These are safe , I hope , on a 3-GHz multimedia PC installed in the liv- ing room and linked to a wireless another only, using a small piece of wire. The track between pin 4 (RA2) of IC2 and junction R7/S1 is cut in the vicinity of pin 4. Next, the interrupted track coming from R7/S1 is connected to pin 1 of IC2. Noise Suppression for R/C Receivers July/ August 2005, p. 104, 054018-1 In the circuit diagram and on the PCB, pins 1 and 2 of con- nectors K9 through K16 have been transposed. The PCB may be modified to prevent reworking (ready-made) servo cables. On the PCB, swap connec- tions 1 and 4 of inductor L9. Disconnect the tracks to both pins, then solder a piece of light-duty wire between pin 1 of the inductor and pin 1 of K17. Next, solder a second piece of wire between inductor pin 4 and pin 2 of K1 7. network. Other readers having ideas on recycling old PCs and an article or two about the subject are invited to respond! MailBox Terms - Publication of reader’s correspon- dence is at the discretion of the Editor. - Viewpoints expressed by corres- pondents are not necessarily those of the Editor or Publisher. - Correspondence may be translated or edited for length, clarity and style. -When replying to Mailbox correspondence, please quote Issue number. - Please send your MailBox correspondence to: editor@elektor-electronics.co.uk or Elektor Electronics, The Editor, RO. Box 190, Tunbridge Wells TN5 7WY, England. 10/2005 - elektor electronics 9 INFO & MARKET NEWS & NEW PRODUCTS Humidiprobe® temperature and humidity data logger Pico Technology has announced the immediate availability of the HumidiProbe, a combined envi- ronmental probe, analogue-to- digital converter and data log- ger in a slim, lightweight case. HumidiProbe simply plugs in to the USB port to give instant, highly accurate measurements of temperature and humidity. Up to 4 HumidiProbes can be con- nected to one PC, allowing you to accurately monitor the temper- ature and humidity in multiple locations at once. HumidiProbe can measure tem- peratures over the range 0°C to +70°C with an accuracy of ±0.5°C, a resolution of 0.01 °C and a response time of 5 to 30 seconds. It measures relative humidity over the range 0% to 1 00% with an accuracy of ±2%, a resolution of 0.03% and a response time of 4 seconds. The conversion time for both sensors is 2 seconds. HumidiProbe is com- patible with all USB 1 .1 and USB 2.0 ports, making port selection and configuration automatic and reliable. There is no need for batteries or a separate power supply, as the probe takes its power from the USB port. HumidiProbe is supplied with the easy-to-use PicoLog® software, which is a powerful and flexible program used to collect, display and analyse data. Measure- ments can be viewed in graph, spreadsheet and text formats, saved to a file or replayed for off-line analysis. In addition, soft- ware alarms can be configured to give a warning when either temperature or humidity meas- urements go out of a specified range. Free updates to the soft- ware are available on the com- pany's website. HumidiProbe is available immedi- ately direct from Pico Technology or one of its authorised distribu- tors at a cost of £ 1 49 + VAT. Fur- ther information can be obtained from the Pico Technology website at www.picotech.com or by call- ing +44 (0) 1480 396 395. (057146-1) 40A out synchronous buck converter International Rectifier recently introduced the iPOWIR™ iP2003A, a fully-optimized power "building block" solution for high current, multiphase syn- chronous buck converters with a 3V to 13.2 V input voltage range. The new building block is designed specifically for low volt- age power rails in servers, desk- tops and data communication systems. As part of the iPOWIR family, the iP2003A integrates silicon and passive components into a single, compact land grid array (LGA) package. The integrated silicon includes a synchronous gate driver, high side and low side power MOSFETs, and a synchronous Schottky rectifier for reduced deadtime losses. The device is capable of 1 MHz operation with an output current rating of 40 A continuous with no de-rating up to a 1 00°C case temperature. Together with a standard multi- phase PWM controller, a four phase converter using four iP2003A devices can deliver 160 A output current with a 55 % board space savings com- pared to an equivalent solution using thermally-enhanced SO-8 power MOSFETs. In addition, since the iP2003A integrates the critical power and passive components required for each phase of the converter, design complexity and layout time are greatly reduced versus a standard discrete solution. An external PWM controller, input plus output capacitors, and out- put inductors are the only addi- tional components required to realize a complete solution. The iP2003A uses a patent- pending package technology which enables dual-sided cool- ing capability via very low junc- tion-to-case and junction-to-PCB thermal resistance for maximum current handling. International Rectifier, www.irf.com, Tel. (+44) (0)20 8645 8003 (057146-2) 10 elektor electronics - 10/2005 Maplin's 2005/2006 catalogue One of the UK's leading retailers and distributors of components, accessories and equipment, Maplin Electronics Ltd is now mailing copies of their brand new 2005/06 catalogue. The famous Maplin catalogue is hot of the press with over 1 8,000 new lines including, audio, video, electronic, com- puter products, components and accessories. It's designed to provide you with a clear guide to Maplin's massive and ever-growing range of special- ist electronic products and con- tains a wealth of information allowing you to make informed purchases. Priced at just £3.99 this indus- try bible for electronics is jam packed full of the very latest affordable innovative electronic products with great new fea- tures including a brand new 'Free to Air Satellite' category, which includes DVB and all associated accessories, our broadened GPS range with the new lower cost TOM TOM GO, Garmin Quest and the StreetPi- lot 320 and a number of new products for voice communica- tion over the Internet. You can save even more money with over £200 worth of special offer vouchers and discounts inside - to order your complete catalogue for electronics call the Maplin order hotline now for quick and efficient service and get yours delivered to your door on 0870 429 6000 - UK Prod- uct Code CA27, Ireland Product Code 027 - No delivery charge included With such a depth of product range make Maplin your first stop for any electronics and technology! Maplin Electronics has a net- work of over 100 branches across the UK and Ireland. www.maplin.co.uk (057146-8) ELECTRONICS where the future comes to ^3 l 1 vrc Turn your PDA into a measurement device Engineers and scientists can now turn standard PDAs into cus- tomised, portable measurement tools with the new National Instruments CompactFlash data acquisition (DAQ) device. The Nl CF-6004 device - which is slightly larger than a standard passport photo - plugs into any PDA with a CompactFlash slot to create a handheld instrument with the processing and wireless communication capabilities of the latest PDA devices. The Nl CF-6004 is a 14-bit mul- tifunction data acquisition device that plugs directly into a PDA CompactFlash slot to provide up to 200 kS/s single-channel sam- pling on four analogue input channels in a handheld form fac- tor. It also offers four lines of dig- ital I/O for controlling and meas- uring LVTTL or LVCMOS signals. Engineers can use the Nl Lab- VIEW graphical programming environment for Pocket PC to acquire, analyse and view the data on their PDAs. The flexibility and mobility of the Nl CF-6004 make it ideal for applications such as wear- able computing, field monitor- ing and field diagnostics, as well as in laboratory and edu- cational settings. Compared to buying several traditional, handheld instruments, engineers can save valuable space by using a single PDA with Lab- VIEW and the Nl CF-6004 DAQ device. Because engineers can define their own unique instruments in LabVIEW and then easily deploy them to their handheld devices, they can also change and redeploy these applications to repurpose their PDAs for new measurements. In addition, because PDAs are typically less expensive than laptops, PDA-based data acqui- sition is a cost-effective option for handheld, portable instru- ments. National Instruments UK & Ireland, www.ni.com/uk, Tel. (+44) (0)1635 523545. (057146-6) 10/2005 - elektor electronics 1 INFO & MARKET NEWS & NEW PRODUCTS 60V microelectronic relay Ultra-compact transducer for very high AC & DC currents International Rectifier recently introduced the PVG61 2A series of microelectronic relays (MER) that have as much as 40% more current handling capability and up to 50% better on-resistance than similar competing devices. Packaged in a six-pin DIP, the PVG61 2A is used in a vast vari- ety of switching applications, including programmable logic controllers, audio equipment, computers and peripherals, power supplies, load distribution to displays, indicators and indus- trial automation. The PVG612A is a single-pole, normally open solid-state relay. It utilizes an integrated circuit photo- voltaic generator and IR HEXFET® power MOSFET transistors as the output switch. The switch is con- trolled by radiation from a light- emitting diode that is optically iso- lated from the generator. The PVG61 2A is rated at 60V, with 3 A AC or 6 A DC maxi- mum load current, and features an input drive of 5 mA, making the new PVG61 2A fully TTL com- patible. The device is offered in through-hole, surface mount and tape and reel package options. Further information from IRF's European Regional Centre, tel. (+44) 20 8645 8003, or www.irfcom. LEM has introduced a family of current transducers that com- bines Hall-effect technology and a signal conditioner in a compact case to offer dramatic savings in size (up to 75% compared to other current transducers) for measuring nominal currents up to 1 000 A true RMS. These new transduc- ers measure only 90 x 70 x 34 mm. The DHR series has been designed to measure DC sig- nals as well as distorted current waveforms such as variable fre- quency drive (VFD) outputs. Additional features include the choice of primary current meas- uring ranges from 1 00 A to 1000 A, choice of output options (4-20 mA, 0-5 V or 0- 10 V), a wide power supply range (24 to 50 VDC) and a large sensing aperture (32 mm) for non-contact measurement. The new transducers provide an absolute accuracy of better than 1 percent of the nominal current over a broad range of inputs. This, coupled with a wide bandwidth from DC to 6 kHz, an operating range of- 40 to +70°C and a true RMS computation for non-linear loads or 'noisy' environments, makes them an excellent choice for industrial system designers, system integrators and automa- tion distributors looking for accurate and cost-effective AC or DC current transducers. LEM UK Ltd, www.lem.com, Tel: (+44) (0)1695 720777. (057146-5 Low-cost PIC development programmer and starter kit Microchip has announced the PICkit™ 2 Starter Kit, which enables engineers, students and anyone with an interest, to easily begin development and experi- mentation with PIC microcon- trollers. The PICkit 2 follows the very successful PICkit 1 offering improved ease of use, faster pro- gramming and greater flexibility. The PICkit 2 Starter Kit connects to any personal computer via full- speed USB 2.0, which allows firmware upgradeability, and requires no additional power supply for the programmer or tar- get application board. The PICkit 2 comes with a set of easy-to- understand tutorials that allow users to learn at their own pace. In addition, the PICkit 2 can eas- ily plug into development boards via In Circuit Serial Program- ming™ (ICSP™) technology. The PICkit 2 Microcontroller Pro- grammer (PG1 641 20) is expected to be available in August for $34.99 USD, and comes with a USB cable. The PICkit 2 Starter Kit (DV 1 64 1 20) is also planned for August for $49.99 USD, and includes the programmer, USB cable, CDs and an 8/14/20-pin evaluation board. Initially, the pro- grammer supports 33 different low pin count, Flash PIC microcon- trollers. For additional information visit the Microchip Web site at www.microchip.com/tools or call European Headquarters on (+44) (0)118 921 5869 (057146-3) 12 elektor electronics - 10/2005 New B 2 Spice Version 5 has all the power and functions you expect from a professional Spice package, but without the high cost: • Real design flexibility with over 30,000 models, unlimited circuit size and a huge range of new virtual instruments • New Circuit Wizard saves time by auto-generating many designs for you • Sweep all parameters for any component and simulation type with the powerful new Scenario Editor • Live Circuit feature allows values to be adjusted while simulations are running, displaying the results in real time Professional standard Spice simulation for just £229 + VAT. Plus educational and multi-user licence discounts available and FREE comprehensive telephone technical support. Try the full version completely free for 30 days. www.spice-software.com Tel: 01603 872331 Research House, Norwich Road, Eastgate Norwich. NR10 4HA. Fax: 01603 879010 Email info@looking.co.uk I t) Research KNOW-HOW BIOMETRICAL IMAGING Biometrical Imaging The thin line between science and electronics Dr. ir. Asker M. Bazen University of Twente, The Netherlands s l 7W--TV rarj ■■j 1 m §1 51 1 ;■■■■/ ill ;■ -l' 1 ' 3 & '■>£ Brag* h ,-^^Vv A Ar Biometry or biometrics is currently in the limelight, largely because this technology is likely to be used in the near future for passports and many other applications related to security and identification. However, biometry has not reached the end of development yet. The performance for many applications is not yet good enough and a lot of research is required to obtain the necessary improvements. In this article we provide some insight into the technology used and we not only discuss how and why biometry works but also why the systems sometimes fail. 14 elektor electronics - 10/2005 Biometry or biometrics is the automatic recognition of people based on measured body characteristics or behaviour. The most familiar examples of biometry are fingerprint recognition, face recognition and iris scans. Furthermore, hand geometry, speech recognition, writing and signature recognition and gait (the characteristic way of walking) are examples of other methods that are used and being researched. A different, and relatively new form, of biometry, is recognition of handprints. Experiments are currently being carried out using this technique in prototype pistols, in order to secure them against unauthorised use, without hampering the shooter. A pistol into which you have to enter a code is not all that useful in an emergency. Face recognition and finger print recognition are perhaps the best well-known methods of biometry. However, that does not necessarily mean that they are the simplest methods. With these forms of biometry as well, there are two annoyingly recurring problems. When two biometric measurements are mode on a person, the results will never be exactly the same. At the same time, biometric measurements from different people can have strong simi- larities. For example, on two different photographs of someone's face the angle of illumination or the facial expression can be different. On the other hand, photo- graphs of brothers or sisters can be very similar. In order to recognise a person despite these differences and simi- larities between measurements, the biometric system needs a clever method to determine if th ere is sufficient correspondence between two measurements. This is done by using the characteristic features of a measurement, the so-called feature vectors. The big challenge when devel- oping the algorithms for biometric recognition is finding suitable feature vectors, which represent just those char- acteristics that give the greatest difference. Face recognition An attractive method of identifying people is face recog- nition. In principle this could even take place transpar- ently, that is, without explicit cooperation of the individ- ual to be recognised. In practice this technique has not yet advanced to the point that this works reliably. The big problem for face recognition is the large variation between different pictures of the same face. There are two types of variations. Intrinsic variations are caused by actual changes in the face, such as facial expression, hairstyle, beard, etc. Extrinsic varia- tions are caused by, or during, the recording process: variations in illumination, pose, resolution, partial obscuration, etc. The photographs in Figure 1 are good examples of these. Depending on the context, ageing can also play a role. If a system is used frequently, the stored data can easily be amended to account for the differences caused by age- ing. But when used in a biometric passport that should last at least five years, the false rejection rate (FRR), that is, the percentage of wrongful rejections can increase to more than 50%. You can read more about FRR and other statistical biometric measurements in the inset. Different pictures of the same face can be very different but also be very similar. The most obvious example is identical twins (whose fingerprints are, by the way, always different). But also other members of the family or even totally unrelated people can be strikingly similar. An example of this is Figure 2. The question here is: are these three different ladies, three different photos of the same lady or some other combination. The solution appears at the end of this article. Features There are two types of features or characteristics that can be used for face recognition. The first type makes direct use of the grey-scale values (texture) of the image, refer to the top row of images in Figure 3. Here a matching- score is determined by using a type of weighted sum of the difference of grey-scale values between different pic- tures. The second feature type is based on geometry (shape) of the face, which makes use of standard facial features such as eyes, nose and mouth (bottom row in Figure 3). The first step is searching for the characteris- tics in the image. From this a graph is constructed, which is then compared to the reference data. For better recog- nition it is possible to combine both these methods in one algorithm. A new development in face recognition is the 10/2005 - elektor electronics 15 KNOW-HOW BIOMETRICAL IMAGING Figure 1. Variations in a face: expression, lighting and pose. use of 3-dimenional scans. An advantage of 3D face recognition is that it is less sensitive to illumination and pose, but research on how 3D scans can be optimally used for recognition has only just started. Because face recognition at this stage is not sufficiently robust for large- scale application, the only viable application is low-secu- rity access control with small groups of users. Fingerprints These days, fingerprints are usually recorded digitally. This is typically done by making an optical or capacitive meas- urement of the surface of the fingertip. This generally leads to an 8-bit grey-scale image of about 500 by 500 pixels. The tip of the finger has so-called ridges and valleys. In a fingerprint these are visible as parallel running curved black and white line structures. A global description of the shape of the print is given by the orientation field: the direction of the lines in every part of the print. There are a few major classes, which are called the Henry classifica- tion. Figure 4 shows three of these basic forms. Within each class there are several possible variations. The second level of detail is provided by the minutiae. These are the division and endpoints of the lines that describe the local details of the fingerprint. Minutiae are the characteristics that are used most often for automatic fingerprint recognition. In addition, some systems also use the original grey-scale image, which contains the greatest amount of detail. The orientation field and the minutiae are visible in Figure 5. Just as with other methods of biometry, the biggest prob- lem with fingerprint recognition is that two prints of the same finger are never exactly the same. One of the causes is image quality. There can be dirt and (tempo- rary) scratches on the finger, there is measurement noise in the sensor, and the weather can cause poor prints. In addition, some people have poor fingerprints in any case, for example because of wear, or caused by (genetically) shallow crevices. In such cases it is even for an expert a most impossible to indicate where the lines exactly go. In an automated system this leads to false, missed or displaced minutiae. A second cause is that the finger is positioned ever so slightly different each time it Figure 2. Similar faces: three different ladies or three the same? 16 elektor electronics - 10/2005 Mis match! person Figure B. Chance density of matching-scores from real and false attempts. acqui sition image 'i r feature extraction live features matching matching score decision Figure A. Block diagram of biometrical recognition. The process of biometric recognition is described in the block diagram of Figure A. Here the characteristics of a person (features) are compared with characteristics stored earlier. This comparison results in a matching score. A threshold determines whether a score is high enough to determine a per- son 'recognised'. However clever the 'feature extraction' is, there will always be situations where two feature vectors of the same person are sufficiently different to result in a low matching score. Also, two measurements from different people can be very similar, which results in a high matching score. This means the matching scores cannot be simply separated by a threshold. Refer Figure B. Here the chance density of the matching scores real and false attempts are displayed. The light-grey area left of the threshold is the false rejection rate (FRR): the chance that a real user will be reject- ed because their matching score is below the threshold. The dark-grey area right of the threshold is the false acceptance rate (FAR): the chance that an intruder will be accepted because their matching score is above the threshold. By adjusting the threshold, the chance of error can be tuned to the application. A high threshold requires a high degree of similarity between the live measurement and the information stored in the database. Because the FAR becomes lower, the setting is suitable for high security applications. A disadvantage is the FRR (the chance that the real user has to try again to be recognised) has increased. On the other hand, a lower threshold can be selected, so that the FRR will be reduced. This setting is appropriate if user convenience rather than high security is the most important requirement. A disad- vantage of this setting is the FAR is now higher, which means that there is a significant chance that unauthorised per- sons are admitted. To give a better insight on the relationship between FRR and FAR, they can be plotted as a function of the thresh- old. This graph is called the receiver operating curve (ROC), refer Figure C. reference features database -► identity 050041 - 1 1 Figure C. Receiver operating curve (ROC). is placed on the sensor, so that a slightly different part of the print is recorded. This may result in only partially overlapping prints. Thirdly, the system has to deal with rotation, translation and scaling of the prints. The last problem is the non-linear distortion between two prints. These are caused by the recording process itself. During this process, the elastic, 3-dimensional surface of the fin- ger is flattened against the sensor. This flattening is slightly different each time, depending on, for example, the pressure applied and sliding and rotating of the fin- ger while recording. This 3D to 2D mapping of the skin on the finger causes non-linear distortion, particularly when there are forces that are not perpendicular to the sensor surface. This is often the case when uncoopera- tive users deliberately apply a lot of force to prevent recognition. Because of the aforementioned problems, pictures of fin- gerprints cannot be compared directly, but use is made of characteristics that are less sensitive to distortion such as the orientation field and minutiae. In identification systems in particular, the orientation field is used, i.e., the global form. The Henry classification is determined for every print in the database. When a par- ticular fingerprint needs to be matched, only that part of the database with the corresponding classification is searched in order to obtain the highest possible search- ing efficiency. This method however, has two disadvan- tages. Firstly, there are only five classes and 90% of all fingerprints fall into only three classes. This means that on average 30% of the database still has to be searched through, which is not that much of a reduction. Secondly there is the risk if incorrect classification, which means that the wrong part of the database will be searched and it is very unlikely that the right fingerprint will be found. An alternative, of course, is to compare prints without first dividing them into discrete classes. The chances of errors with fingerprint recognition, by the way, are much smaller than those for face recognition. In particular, a very low false acceptance rate (roughly, FAR 10/2005 - elektor electronics 17 KNOW-HOW BIOMETRICAL IMAGING Figure 3. Characteristics of a face: texture and geometry. = 0.01%) is easily obtainable. It is however, still a chal- lenge to have a low false rejection rate in poor circum- stances. Multi-mode biometry In order to improve the biometric recognition scores it is possible to make use of multi-modal biometry. Here the recognition is made based on a combination of different biometric measurements. Many different types of meas- urement can be combined, for example fingerprint and face recognition, such as is used in biometric passports. By combining the matching scores in this way, the chance that both the face as well as the fingerprint of an intruder has sufficient likeness to an authorised person is much smaller than each system on its own. In addition, the multi-modal system is much more robust against false rejection. Furthermore, multi-modal biometry can play an important role with identification and watch-list systems. Firstly, low error rates are the most important considera- tion. In addition, one biometric measurement (for exam- ple the face) can be used for an initial rough filtering. This can speed up the database search and only patterns that exceed a certain threshold continue through to the next phase where a more complicated and accurate com- parison (for example minutiae of a fingerprint) takes place. As the requirements for biometric recognition increase, multi-mode biometry will play an increasingly important role. ( 050041 - 1 ) • UOSJSd jUQJQjjip D UUOJJ SI OlOLjd IjQj QLjJ QjlLjM UOS -Jdd QUIDS QLjl UJOJJ QJD lijBlJ QLfl UO SOJOLjd OMJ QLfl jDLjJ QQS jjlM noA 'sjiDjop qlji id AjQsojD Ajqa yjooj noA jj ajnBij o\ uoijn/op Figure 4. Henry-classification: whorl, right loop and arch. 18 elektor electronics - 10/2005 • / * / / / /////^ SSSSNSWW \ 'NV / / ////"* .NSWWWW \ \ » ///////' till////" .vvwwwwwv 11///////' *n\\\\WW\\\ 1 / 111 / 11 / ' «'NN\ \ WWW \ \ ' / / / / / / / / / ✓--VSWWWWWN III// I I # / ✓ •» — WWWWWW / / / l i I I I / / fV WWWWWW // 1 i i i i i i i V^' wwwwww //I I I I I 1MIIWWWWWSW //II I I M\\\\\\WW\\W\SS // / I I I »\\\WW\WWWW\N ///ii i\\wwwwww\\ssn t // I I l \ \\ W\WW\\WWSNV / / / /A' ' " \ WWW \ \ S\SN\s ' / / / / V s\n\sn\\snsnsss\w» /// /--SS\N\SSNSSSS\SSSNN. / / / /^'^SNSNSNS\S\S\S\^SN « / / / ✓ ^ ^ ^ ^ ^ ^ - % S V S S SNS^^ * ■ | * - ■ - ■■IMB t t ♦ # ^ ^ ^ •>• ^ a* - # / / / *» ** - • \ S\ ♦ Figure 5. Orientation field and minutiae of a fingerprint. Types of system In principle, biometry can be used in three different ways, namely verifica- tion, identification and as a watch-list system. In all these cases there is first an 'enrolment' procedure where the reference data of registered users are stored. Verification, which is also called one-to-one matching, is the simplest form of biometric recognition. The user first indicates who they are, for example by supplying a smart card or username. This information is used to retrieve the reference data from the database. Then, a new biometric measurement is made of the user, which is used to verify the identity by comparing with the reference data. In a verification system the reference data can be stored in a central database or, for example, smartcards that users carry with them (distributed database). This last solution is preferable from privacy consider- ations: the biometric data is only available when the user agrees. In an identification system, also called one-to-many matching, the user does not need to claim any identity. In this case, the system makes a biometric measurement and this measurement is compared with all information in the database. As soon as a record has been found that matches, the user has been identified. An advantage of identification is the user-friendliness; users need not carry around a card or have to type in a username. The problem however, is that recognition is a much more complicated task for the biometric system. Using present day techniques this method is not suitable for applications such as access control. A watch-list system contains a list of biometric characteristics of persons that have to be recognised. This could be people who do not have access to a certain area or service. In most situations these people will not announce themselves, so the system has to work on the basis of identification. You can also not assume that the persons of interest will cooperate with the system when making a good biometric measurement, which makes the application of the system rather complicated. In addition, the role of the error chance has been reversed. Now a missed detection (FRR) leads to a security risk, while a false alarm (FAR) leads to inconvenience. The focus is therefore a low FRR, while the users themselves will try their best to obtain an FRR as high as possible. An even more complicated variation is watch-list surveillance. This application is even more diffi- cult than a standard watch-list, because fingerprints cannot be used, but only images taken from a distance. Biometric surveillance is currently not quite achievable, unless use is made of extremely well controlled circumstances. 10/2005 - elektor electronics 19 KNOW-HOW FINGERPRINT AUTHENTICATION Helmuth Lemme Electronics comes to the rescue again: is the per- son using a machine really who they say they are? Passwords have not shown themselves to be a foolproof form of identification, and the trend is now towards biometric methods, including fingerprints, becoming more widely used. We look at how fingerprint sensors work and at the advantages and disadvan- tages of the various techniques. Falsification of e-mails, attacks from viruses, theft of lap- tops and mobile phones: these are some of the less desir- able consequences of the growth in information technol- ogy. PINs and passwords give some protection, but remembering and keeping track of a different code for each machine is a problem in itself. Little better are smart cards: if you lose your card, you can almost cease to be a member of society. It would be logical, then, to use some identifier that can- not be lost, changed or falsified. Biometric techniques take advantage of the fact that the characteristics of the human body are unique and fixed. Facial features, the pattern of the iris, handwriting, fingerprints and others are used: even including DNA. For day-to-day use we need to look at what is practical and cost-effective. The most popular technique is the use of fingerprints. In the past, an ink pad and paper were used, the print then being laboriously compared with tem- plates by eye. The first research into electronic methods began in the 1970s, and the techniques came into practi- cal use in the 1 990s. The first systems were not particu- larly reliable and were easily deceived. The more mod- ern sensors are much better. There are already millions in Fingerprint-based authentication: how it works 20 Figure 1. The earliest technique for capturing fingerprints is this optical arrangement with an image sensor. (Source: Parrain/Tima) use, and thanks to falling prices, they are continuously finding application in new devices. The probability that an impostor will be accepted (false acceptance rate, or FAR) is exceptionally low; the probability that the true user will not be recognised and thus denied access (false rejection rate, or FRR) is also low. The requirements for this type of sensor are as follows: • minimal FAR and FRR; • secure against deception; • physical size as small as possible for use in portable devices; • minimal current consumption; • robust and durable; • capable of economic mass production. Silicon chip-based sensors satisfy most of these require- ments. A wide range of techniques There are so many developments in this field that it is hard to summarise them all. The sensors can be grouped according to a few different operating principles: we will look at the most important. Reflective optical sensors: This is the oldest tech- nique. The finger is placed on a glass plate or a prism and illuminated by a LED. Where the ridges of the finger touch the surface, the light is absorbed; in between there is total reflection. The resulting light and dark areas are registered on an image sensor (CCD or CMOS): see Fig- ure 1 . In practice there are difficulties with this tech- nique: the images obtained with wet and dry fingers are very different, and furthermore, the system is sensitive to dirt on the surface. The unit is large in size, unreliable and expensive. It is also easy to deceive: see the text box. If the skin is worn or damaged the print is often not recognised well. Recognition of the fingerprints of older people is also difficult, since the skin is not elastic enough. In some circumstances this can result in false recognition. If the template print is taken with less force, false acceptances can occur. Transmissive optical sensors: This technique oper- ates without direct contact between the finger and the surface of the sensor. In one device made by Mitsubishi light is shone though the finger from the nail side, and 21 KNOW-HOW FINGERPRINT AUTHENTICATION Figure 2. Illumination through the finger makes the system harder to defeat. (Source: Mitsubishi) Figure 3. How a capacitive sensor works: the feedback capacitance is different under ridges and valleys. (Source: Upek) 050193 - 14 LED I@n3 image sensor a camera takes a direct image of the fingertip (Figure 2). Moisture does not cause any difficulties. Lumidigm uses a more sophisticated approach: meas- urements are taken using different wavelengths of light. The sensor sees through the surface of the skin into the deeper tissue and produces a multispectral image. The use of different wavelengths to generate images brings out different subcutaneous structures: a good indication that the object in question is a genuine finger! The use of orthogonal polarising filters ensures that only light that has undergone scattering under the skin is passed, and directly reflected light from the surface is blocked. Only very accurate artificial fingers would have a chance against this sensor. Capacitive sensors: The sensor is a silicon chip whose surface is covered by a large number of transducer ele- ments (or pixels), with a resolution of typically 500 dpi. Each element contains two adjacent metal electrodes. The capacitance between these electrodes, which forms a feedback path for an inverting amplifier, reduces when a finger is applied: more so where there are ridges, and less so in betweenjFigure 3). Manufacturers include UPEK and Veridicom (Infineon has withdrawn from this market). There are a few disadvantages to this technique: since the electric field between the electrodes falls off rapidly, the protective layer on the surface must be very thin. The sensor is therefore susceptible to electrostatic discharges. These sensors only work with normal healthy skin; they are not reliable when used on skin with hard areas, calluses or scars. Moisture, grease and dirt can also affect operation. Reliability against deception using artificial copies of fingers is relatively high: the sensor can accurately distinguish the dielectric properties of gen- uine skin from those of artificial imitations. High frequency sensors: This is a variation of the capacitive technique described above. Each pixel con- tains only a single electrode. The finger itself acts as the other electrode: more precisely, the electrode is the sub- cutaneous layer which is a good conductor, and unaf- fected by grease, drying out, calluses and so on. An outer contact ring couples a weak HF signal into the fin- ger. The amplitude of the signal at each electrode is then proportional to the local coupling capacitance: higher where there is a ridge and lower in the valleys in between. An amplifier with a high input impedance sits directly underneath each electrode (Figure 4). In con- trast to previous capacitive sensors this technique can detect the ridges and valleys in the living cell layer beneath dead surface skin cells. The voltage and fre- quency of the HF signal can be adjusted to obtain the best image. It is possible to make these sensors very tiny, which means that they are suitable for use in portable devices such as mobile phones. A further advantage is that because of the approximately uniform electric field the protective layer can be thicker, improving immunity to electrostatic discharge. Dirt is less of a problem too, as the air gap between finger and sensor surface is almost irrelevant. Manufacturers include AuthenTec, Fingerprint Cards, Topaz/IDGem and Toshiba. Mechanical: This type of sensor is in the more general class of MEMS (Micro Electro-Mechanical System) devices. In one version developed by the French research institute LETI, tens of thousands of tiny pressure transduc- ers are arranged on the sensor surface (Figures 5 and 6 ). An alternative design uses switches which are 22 elektor electronics - 10/2005 closed when pressed down by a ridge, but remain open when under a valley. This gives only one bit of informa- tion per pixel, rather than a grey scale. Alps is one man- ufacturer of this type of sensor. Thermal: In this case the sensor detects the heat con- ducted from the finger, which is greater where there is a ridge than where there is a valley. A leader in this tech- nology is Atmel, who have developed a silicon device with a matrix of pixels (called 'FingerChip'), each cov- ered with a layer of pyroelectric material in which a change in temperature results in a change in surface charge distribution (Figure 7). Each pixel is equipped with an amplifier which takes the signal to the readout circuitry. A grey scale image is produced which has ade- quate quality even with worn, dirty, greasy of moist fin- gers. The sensor has a robust protective layer and can give dynamic output. Dynamic output: Many of the sensors described have been subverted in the past (see text box). To avoid this, a new mode of operation is added. Rather than simply placing the finger statically on the sensor, it is slowly dragged across it. The sensor has only a narrow sensitive area (Figure 8), and generates an entire sequence of images, which the processor can then reassemble into a complete picture (Figure 9). Reliability is greatly improved, and any residual grease is guaranteed to be removed. Several manufacturers produce such sensors, including UPEK and Fingerprints. Feature extraction The story, however, does not end at the sensor. Initially the captured image will be in a raw format; little can be done with this as it stands, as it requires a lot of memory to store it. Comparing a print with many other images on this basis would require a lot of computing power. Instead, we extract some features from the image. Let us look more closely at a fingerprint: the basic classification is into the arch, the loop and the whorl. Particular fea- tures within the pattern include ridge ends, bifurcations, crossovers, lakes and dots — collectively called 'minu- tiae' in the jargon. Obtaining the orientation and position of these is enough to give a clear characterisation (Fig- ure 10). About 10 to 20 minutiae suffice to make a reli- able decision. The reduced data set (or 'template') is many orders of magnitude smaller than the original data, and generally less than one kilobyte. It is only this data set that the computer must compare, and so a large num- ber of comparisons can be carried out quickly. The pro- cessing also removes the effect of translations and rota- tions of the image. Much software has been developed for this task: an almost innumerable range of different approaches have been taken. A flood of applications The most important application area is in access control for computers. This is especially important for laptops and PDAs, which are frequently stolen. For example, the iPAQ hx2750 from HP, the Acer Travelmate 739TLV and the IBM T42 ThinkPad all offer built-in fingerprint sensors. Thanks to falling prices more and more devices are being fitted with sensors, in particular mobile phones including models from NTT Docomo, Fujitsu, Pantech and LG. Some models can distinguish between up to ten different fingerprints, so that the device can be used by several Figure 6. The integrated pressure sensor under the microscope. The external diameter of the sensor elements is 45 pm, and the diameter of the elastic membrane is 25 pm. (Source: Rey/LETI) Figure 7. Principle of a thermal fingerprint sensor. The electric charge on the pyroelectric element in each pixel changes with temperature. (Source: Parrain/Tima) Figure 8. The dynamic technique, where the finger is dragged over the sensor, can use a very narrow sensor area. (Source: Atmel) Figure 9. A dynamic sensor produces a sequence of individual sub-images which the processor can reassemble into a complete image. (Source: Parrain/Tima) Figure 10. The so-called Minutiae' are particular points on the finger ridges such as bifurcations and crossovers. To compare prints it is sufficient to record the position and orientation of each. (Source: Fidelica) 10/2005 - elektor electronics 23 KNOW-HOW FINGERPRINT AUTHENTICATION Can the systems be outwitted? In the early days of this technology defeating the system was relatively easy. The earliest idea was to reactivate the traces of grease left behind on the sensor surface by a genuine user. By breathing on the surface, fine droplets of moisture remain which make the print clearer. Some sensors using optical principles have been defeated in this way. The dynamic technique was introduced to combat this: the finger is not left statically on the sensor, but dragged slowly across it. This ensures that old traces of grease are removed. A second approach is to apply a copy of the fingerprint. As is known, people leave fingerprints behind everywhere. Taking copies of these is a well-known process used by the police. Fine graphite powder sticks to the traces of grease and these can be lifted off using adhesive tape and photographed or scanned into a computer. They can then be printed onto paper or transparency film using a laser printer. This can be used to defeat an optical sensor: even a dynamic one. Capacitive sensors can also be defeated in this way if the toner film is thick enough. A third technique is to construct an artificial finger with the lines of a real one. Using silicone rubber it is possible to mould objects with exceptional precision and capture precise details. Sensor manufacturers are of course wise to these tricks, and have taken countermeasures against them. Optical sensors capture images under illumination of various different wave- lengths; capacitive sensors accurately analyse the dielectric properties of the object on the sensor surface, and high frequen- cy sensors analyse the structure of the deeper subcutaneous layers. The software is also becoming more and more reliable. A wide-ranging study conducted by the German Federal Office for Information Security in 2004 found that the systems gave good security. different people. The Pantech model includes 'secret fin- ger dial' where up to ten short codes can be dialled by putting the appropriate finger against the sensor. Other devices with built-in fingerprint sensors include USB hard drives (from LaCie), USB memory sticks (from Dr Fehr GmbH and RiTech International Ltd) and card readers (from Comix). These allow data to be stored securely. Securable mice (the Cherry M-4000D ID Mouse Professional) and keyboards (Key Source Interna- tional) are also available. The sensors will increasingly be used for securing finan- cial transactions at cash machines and for on-line bank- ing. In the future the fingerprint of the owner will be securely stored in identity cards and credit cards, and they will also be used for authenticating e-mails using digital signatures. Direct physical access to rooms and devices can be ensured by coupling fingerprint sensors with door open- ers. Departure terminals in airports will be able to process passengers more rapidly. Cars, construction machinery, boats and aircraft will also be protected against theft. The long-term view The market is growing rapidly. In a few years the fin- gerprint systems market will be worth billions. Data protection advocates warn of a Big Brother society, but this is already with us: the widespread use of fin- gerprint sensors will not make the overall situation sig- nificantly worse. The minutiae of the fingerprint cannot be regarded as being as private as the details of one's bank account or medical record. If the minutiae should fall into the wrong hands, the recipient suffers from the immediate disadvantage that it is not possi- ble to reconstruct the entire fingerprint from them. In any case this technology will do more to make crimi- nals' lives harder than it will cause inconvenience to their honest fellow citizens. ( 050193 -) A combination of fingerprint sensor and smart card can give even greater security. It is very hard to analyse what is going on in the processor. (Source: Upek) A fingerprint sensor next to a door can be used to control access. 24 elektor electronics - 10/2005 EASY Very LOW Cost! Extremely FAST Turnaround! Layout Software DOWNLOAD our free CAD software DESIGN your two or four layer PC boards SEND us your design with just a click RECEIVE top quality boards in just days exfcresspcb.com -rule mam.*. Control The Ajulomalian PIC Tedmolfr^ Standard Modules Cult m Design^ Build PICIKF432 CPU, 24CJC23D EEPROM and demo Web Server HKByta FLASH, I S3* Byics $R \MmA 32Kby*» E E PROM Web Scncr itscs aborn half the tvaiAablt I- FPROM memory ^ heiipK of a (NHV left fin mOom wdi pjiiv^ 1 Server ba^L'd on the CKeelknl MsLToehip TCP SIulL. 13 user prugiiimmabjc I t) pins, 3 can be An.doi! Inputs. 1 1 □"& imlicaie Peww, t uHision i inlt, Rx.’f.'ameh i l Huertas vi* 3 put connector w Fa* tl End eoitiKtlor E .i hlL IhlIulLlI lin L'nhiieeiiLiii i» Pt or ON His -in If 5P i In Circuit Soml Pnegriimmin^ i ewincctot 1 Lill T cl hmed „nid ProLif.Lmnnnu [kciuncntilion Pll il A thill l tilt tl t( ontrallFr 41 i luttmlmfl k 11 www, totai-leiem a tics, con Thousands of OBD cables and connectors in stock Custom cable design and manufacturing Lowest prices * Online ordering * Ship worldwide Contact us online: www, OBDCables.com - sales@obd2cables.com Your price conscious PCB supplier Verified EURO Online Price calculation Online Ordering Online Order tracking Online 24/24H and 7/7D pooling for prototypes and small series from 1 till 1.000 pieces from 4 working days onwards up to 6 layers a la carte - wide range of technological capabilities - up to 20 layers - from 1 piece onwards - from 2 working days onwards www.eurocircuits.com MEGApool - pooling for series - 250, 500 or 1.000 pieces - medium series at prices of MEGA series 10/2005 - elektor electronics 25 Forest Electronics - PIC and A VR C Compiler Products FED's ANSI C Compiler for PIC or AVR processors * Fully integ rated editor with syntax highlighting, mulftple pages etc. * Full project support - include and manage multiple source files, simulator, as&E-mMftr files- and nnt$$/Oornrrents wiftiin One project * Felly integ rased simulator and waveform analyser step from C Fine to C line, or examine code in assembler term. View device pins using 3 logic analyser application. ■ Simulator supports LCD modules, keypad, buttons, LED s, displays, analogue mpuls, serial and asynchronous data and more. ■ Design ed 10 ANSI C standards * PlC - Supports ISxxx, IGjwk, ISxxx series 1-3 and IS bil core processors * AVR - Supports standard and MEGA core processors * Generates MFLAB/AVR Studio- projects and source files and completely standard hex output files. WfZ-C / AVtDiCY Drag and Drop rapid application development using ANSI C for PIC and A VR * Rapid Application Development lor Jhe FUC or AVR miorooonl roller using tee C language {W1Z- C For the PIC, AVIDICV for the AVR) * Drag and drop your software component selections on to your design * Included oomponents support timers, serial interfaces. I2C, LCD, 7 Seg displays, k&ypads, switches, pod controls, many bus interfaces including liG and Dallas aButtOn, AVR/PIC Hardware, and more. * Connect software components to MCU pins by point S die*: + Parameters set from drop down list boxes* check boxes, or text entry + Links your code automatteally into library events (e.g. Button Pressed, Byte Received: etc.) • Automatically generates your base application including full initialisation, inlerrupi handling and main program loop * The oompE&to C Compiler and AVR Simulator programs are Integrated inlo AVID ICY - Icial editing l compilation V assembly / simulation supped in one program * Also includes the Element Editor to enable you to create your own components with ease. * Demonstration available from our web site Prices from £45.00 * details & demo from www.fored.co.uk Forest Electronic Developments 01 590-681 51 1 (Voice/Fax) email : inf o@fo.red, co.uk www.fored.co.uk Also programmers, ICE, & development systems Elektor Electronics (Publishing) P.O. Box 190 Tunbridge Wells TN5 7WY ENGLAND Telephone +44 (0) 1580 200 657 Fax +44 (0) 1580 200 616 Email: sales@elektor-electronics.co.uk ELEKTOR AUDIO BOOKS 3 must-haves for all audio-enthusiasts! lektor lectronics Order now using the Order Form in the Readers Services section in this issue . Build your own Modern High-end Audio Valve Amplifiers Valve Amplifiers Build your own High-End Audio Equipment To many people, the thermionic valve or electron tube is history. However, whether it is nostalgia, interest in the technical parameters, the appeal of a gleaming amplifier chassis with softly glowing valves or perhaps the firm con- viction that the sound of a valve cannot be bettered, it is a fact that the valve is making a come-back. This book con- tains, apart from construction projects for preamplifiers, power amplifiers, and amplifiers for musical instru- ments, information on the operation of electron tubes, while the first chapter gives a short history of the valve. ISBN 0 905705 39 4 253 Pages £15.55 (US$31.00) Valve amplifiers are regarded by many to be the ne plus ultra when it comes to processing audio signals. The com- bination of classical technology and modern components has resulted in a revival of the valve amplifier. The use of toroidal-core output transformers, developed by the author over the past 15 years, has contributed to this revi- val. This book explains the whys and wherefores of toroidal output transfor- mers at various tech- nical levels and offers innovative solutions for achieving perfect audio quality. ISBN 0 905705 63 7 264 Pages 25.95 (US$52.00) The name high-end equipment is a good indication of the prices charged for it. For those who cannot, or will not, pay these high prices, there is a solution offered in this book: build your own at considerable cost savings. This book is aimed not only at this sector of the market, but also at the many enthusiasts who want to be able to experiment and to make their own modifications to their high-end equipment. Contents include solid-state and valve preamplifiers and power amplifiers, active cross- over filters, an active subwoofer, a headphone amplifier and more. ISBN 0 905705 40 8 262 Pages £15.55 (US$31.00) L_ 26 elektor electronics - 10/2005 PC Oscilloscopes <& Analyzers BitScope 100MHz Digital Oscilloscope Dual Channel Digital Scope using industry standard BNC probes or analog inputs on the POD. 40MS/s Logic Analyzer 8 logic, External Trigger and special purpose inputs to capture digital signals down to 25nS. Mixed Signal Oscilloscope True MSO to capture analog waveforms time-aligned with logic using sophisticated cross-triggering on any input. Real-Time Spectrum Analyzer See spectra and waveforms in real-time displayed simultaneously Waveform Generator Load up to 128K arbitrary waveform and replay via BNC B. Capture circuit response simultaneously on BNC A Get the full picture with BitScope Mixed Signal Oscilloscopes Turn your PC into a powerful Digital Storage Oscilloscope! See inside your circuit with simultaneous analog, logic and spectrum displays to make tracking down those elusive real-time bugs much easier. BitScope combines a high speed synchronized storage scope and logic analyzer with a programmable waveform generator and spectrum analyzer. With "Smart POD" connected active probes and multiple software options you've got the perfect low cost high performance test and debug solution! Standard 1 M/20pF BNC Inputs 200uV-20V/div with xIO probe S/W select AC/DC coupling Switchable 50ohm termination Arbitrary Waveform Generator BitScope Smart POD probe connector 8 logic channels, cross-triggering Dual channel analog inputs Async serial I/O for external control Supports active probes USB 2.0 or Ethernet Connectivity Single cable to PC or switch Compressed data transmission Ethernet option uses UDP/IP Internet addressable device Expandable and Programmable Simple ASCII Protocol BitScope Scripting Language Add active probes and devices Supplies up to 500mA via POD BitScope and your PC provide an array of Virtual Instruments BitScope DSO software for Windows and Linux BitScope's integrated design uses standard oscilloscope probes and a growing range of custom probes to provide functionality equal to instruments many times the price. BitScope plugs into third party software tools and has an open API for user programming and custom data acquisition. www . bitscope . com v 10/2005 - elektor electronics 27 TECHNOLOGY FINGERPRINT SENSORS The article on fingerprint authentication elsewhere in this issue describes the wide array of different incarnations and applications of these interesting devices. We now look at whether it is possible in practice to for an enthusiast to use one in a project. What devices are available for purchase, and how difficult are they to use? The catalogues of the major elec- tronic component suppliers are gen- erally silent on the subject of finger- print identification. A Google search on the Internet gives rather different results, however: there is a large amount of documentation and other resources and there is a splendid array of suppliers of starter kits, SDKs (software development kits) and other support for developers. There are also various products which include fingerprint sensors, such as door openers and closers (from around £ 300), keyboards and mice with built-in fingertip sensors (from about £ 30). However it is diffi- cult to find the individual sensors themselves for use as a component in a project. One one-off price we did manage to obtain for the Fujitsu MBF sensor was in the region of £ 50. Experimentation The cheapest way of obtaining a fin- gerprint sensor is therefore to get hold 28 elektor electronics - 10/2005 applications of a ready-made fingerprint scanner for use with a PC. A typical example of such a device is the Microsoft finger- print reader with a USB connection, available for around £ 40. For a few pounds more the reader can be obtained in combination with a PC- compatible mouse and keyboard. As the photo (Figure 1) shows, we apparently have an optical fingerprint sensor. The sensor surface is illumi- nated from the side by red LEDs and although it is fully transparent, it is not hard and shiny like perspex but rather elastic and matt like silicone rubber or soft PVC, so that the finger leaves no visible print behind. This should not necessarily be interpreted as a security measure by the manu- facturer, as Microsoft warns in the installation manual that the sensor is intended to be used to simplify the logging-in process rather than to increase security. The fingerprint reader is used in conjunction with the supplied (Windows XP-compatible) software (‘DigitalPersona Password Manager’) to provide the password when starting Windows XP and other programs, as well as when logging on to web sites. Microsoft recommends that the reader is not used to control access to company networks or to protect sensitive data. Before using the fingerprint reader the software must be installed and the tips of at least two fingers must be regis- tered as a reference. This involves scanning each fingertip four times. Figure 2 shows the fingerprint regis- tration wizard after two fingers have been registered. In practice the fingerprint reader was found to be surprisingly reliable, despite the security warnings of the manufacturer. The registered finger- tips were recognised without notice- able delay. Non-registered fingertips were rejected almost as quickly. There were no false rejections or acceptances. The fingerprint reader is thus entirely suitable for the purposes suggested by the manufacturer. Could it also be useful in other appli- cations (which, considering its price, would be interesting)? The answer seems to be no. The reader connects over a standard USB interface, but there is no documentation accompa- nying the software and reverse engi- neering it looks like a tough proposi- tion. If, on the other hand, we use the supplied software, we need a com- plete PC running Windows XP in order to carry out some function such as opening a door. We also have to bear in mind that Microsoft claims that the product is not secure. Development As can clearly be seen in the arena of mobile phones, powerful technology can be manufactured cheaply if the quantities are great enough. This goes for fingerprint sensors too. For low-vol- ume applications it is not only the sen- sor elements that are costly: the same goes for the accompanying software and hardware required. Processing and, more importantly, evaluating the sensor output requires a relatively high level of processing power. Even in stand-alone applications such as for example a ‘simple’ door lock we need a high-end microcontroller (a 32-bit RISC such as an ARM7 or ARM9, or a DSP) in order to detect fingerprints reli- ably. The software development is also a complex process, and the cost of this is built into the prices for SDKs and licences. A development kit is not suit- able for our first steps, since it will cost at least a few hundred pounds. In Table 1 we give a (surely incomplete) overview of the kits available for stand-alone applications. The Atmel and Fujitsu kits include modules which appear to be suitable for real applications rather than just for development. The Atmel module is available to order without the kit (but including licensed recognition soft- ware), whereas the Fujitsu module is not available separately. Instead, it can be used as a reference design as part of a dedicated application, and the fin- gerprint recognition software can then be licensed separately. The FS Forth-Systeme GmbH kit is based on a standard development board; the TI Development Tool takes the form of a daughter card for a DSP board (from a DSP starter kit). TI has a range of four such daughter cards with fingerprint sensors from Atmel, AuthenTec and Fingerprint Cards. The compatible DSP boards are shown in the table. A closer look We will now take a closer look at the Fujitsu starter kit: we would like to thank the distributors Glyn for supply- ing us with a sample. The MDFP200- EDK ‘Embedded Fingerprint Develop- ment Kit’ includes a complete develop- ment environment and software library for autonomous fingerprint verification. The software is delivered on the MDFP200-EDK support CD (version 1.2). The hardware consists of a mod- ule and three printed circuit boards stacked on top of each other (Figure 3). The top printed circuit board is fitted with an MBF200 large area sensor. This is a very thin capacitive sensor (just 1.4 mm high) manufactured in CMOS technology. The array is 256 by 300 pixels, giving a scan resolution of 500 dpi. Below this board is a Fujitsu FR-series MB91302 32-bit RISC micro- controller with 8 MB of SDRAM and 10/2005 - elektor electronics 29 TECHNOLOGY FINGERPRINT SENSORS Figure 1 . The Microsoft fingerprint reader, with USB interface, uses an optical sensor. 2 MB of flash memory. A mains adap- tor is also supplied, along with two cables for connecting the two RS-232 interfaces of the module with the serial ports of a PC. The module also offers a relay output which can be used, for example, to operate a door opener. A buzzer and LEDs are available to indi- cate the results of the verification process, and buttons and a switch allow the user to control the functions of the unit. The hardware documentation on the kit CD supports the use of the hardware as a reference design for dedicated applications. Data sheets for the individual components as well as printed circuit board layouts, circuit diagrams and parts lists for the mod- ule are also included. Fingerprint starter kits for stand-alone applications Manufacturer /distributor Part number Sensor Processor Software Atmel AT77SM01 01 BCB02VKE biometric module Atmel AT77C1 01 B-CB02V ARM9 (AT91RM920) Linux/lkendi Fujitsu/Glyn MDFP200-EDK Fujitsu MBF-200 Fujitsu MB91302 (32-bit RISC) C/lkendi FS FORTH-SYSTEME Developer's Kit IKENDI for LxNETES Fujitsu MBF-200 (option: Authentec) ARM7TDMI Linux/lkendi Texas Instruments FADT Atmel/ Authentec/ FPC TMS320C551 0/ TMS320C6713 (DSPs) FPC/Bioscrypt Figure 2. The fingerprint registration wizard after the prints of two fingers have been registered. The applications software includes a driver library for setting up and con- trolling the sensor and for reading in fingerprint data. A software library from Ikendi is available to verify a fin- gerprint by comparison with tem- plates, based on minutiae analysis. The licence is restricted to use with the starter kit. A flash utility allows new applications software and a boot- strap program to be downloaded. The software CD also includes Fujitsu’s Softune Workbench, a com- plete development toolchain for the microcontroller including compiler, assembler and linker. On-line registra- tion is required before it can be used. When the CD is inserted a web browser starts up at an HTML con- tents page that allows access to the various options. If Windows XP with service pack 2 is used, there will be a warning regarding web pages contain- ing active content. Particularly pleasing is how quick it is to set the module up. A short demon- stration programme allows an immedi- ate test of the fingerprint sensor, which works without problems and which even tolerates fingertips presented at angles of up to 45 degrees. Comparison The same Fujitsu MBF200 sensor is used in the SPF200-USB-Eva kit from Fujitsu that we have included in our tests for comparison. This test kit (Figure 4) includes a ready-to-use USB fingerprint module type SPF200- USB and a demonstration version of the myMinutia verification software, which offers various interesting pos- 30 elektor electronics - 10/2005 sibilities. For example, ‘live video’ can be fed from the sensor directly to the screen and the comparison algorithm can be watched in action (Figure 5). A few program examples are avail- able on the CD to help in the develop- ment of dedicated PC software, but further software (for example Microsoft Visual C/C + + 5.0, along with header and library files and run- time DLLs for Veridicom’s SDK) is required to compile it. It was interesting to compare this device with the MDFP200-EDK devel- opment kit described above, which used the same sensor but with differ- ent software and hardware. The same sensor in the USB module was much more sensitive to residual grease from previous fingerprints. It also had some difficulties in scanning, being unable to generate reference templates for some fingertips. Turning the fingertip when applying it to the sensor was not tolerated. As we can see, the quality of the results depends substantially on the software and on how the device is set up and adjusted. Conclusion Anyone interested in stand-alone applications for fingerprint sensors can get results relatively quickly using a starter kit. There are considerable technical complications, and for low- volume applications costs can also be significant. The price of the Fujitsu development kit we tested here is around £ 300 plus VAT. ( 050193 - 2 ) With thanks to Michael Ehlert at Glyn, Andreas Riedenauer at INELTEK Mitte GmbH and Dr. Klaus Sander at Sander Electronic for their support and for supplying documentation. Reference : Davide Maltoni et al., « Handbook of Fingerprint Recognition », Springer, Berlin 2003 (includes DVD). Figure 3. Fingerprint module from Fujitsu with powerful 32-bit microcontroller for autonomous applications. Figure 4. Evaluation kit with USB fingerprint module. Figure 5. The myMinutia software compares the reference template (left) with the print being verified (right). 10/2005 - elektor electronics 31 HANDS-ON FILE SECURITY Mike Simpson Cryptography is usually thought of as concerned only with keeping secrets, but there is another use for cryptog- raphy, which has more to do with keeping things in the open. This other use, which rightly belongs in this issue on All Things Security, is data authenti- cation: techniques for verifying that data has not been tampered with. Where financial decisions depend on recorded data, there is an incentive to falsify it. Falsification of data may dis- guise an embarrassing oversight or just make a report more readable; it may gain a lucrative contract or hide a fatal error. Keeping data secret is a poor choice, as it may be needed to make day to day or even minute by minute decision in the field. The device presented in this article is a data authenticator. It takes data which has been gathered by a data log- ger and checks an authentication code which was generated by the logger in order to verify that the data has not been changed. A typical system that would benefit from data authentication is shown in Figure 1. Changing or moving a single character will give a different code, which can not be generated without knowing a key- code that is inaccessibly hidden on the logger and the authenticator. The authenticator is called “Colossus Jr.” in honour of Tommy Flowers and the oth- ers at Dollis Hill GPO Research Labs who during WW2 built an early digital computer of that name to crack the Nazi cryptographic codes used on, among others, Lorenz cipher machines (includ- ing several versions of the Enigma). 60+ years on... PIC time! To build our Colossus Jr., it wasn’t necessary to use a large or powerful microcontroller: there are only two out- puts and one input, while the code fits into less than 1000 words of program. The only consideration that is not found in the basement level microcon- trollers is that an interrupt was needed in order to allow it to read more data while chewing over the last batch. The Microchip PIC12F675 was chosen for this task as it can run at the needed speed while drawing no more current than the DTR terminal on a standard RS232 can afford. Nor are the parts costly or hard to come by — apart from the supporting chips used, just three transistors and a few pas- sive components. 32 elektor electronics - 10/2005 psst....DES encryption The encryption routines and the actual data authentication implemented in Colossus Jr. are in accordance with the United States National Bureau of Standards Data Encryption Standard, DES. These were written in the late 1 970s, partly with the assistance of the spooks of the National Security Agency. The details of how DES works have been a closely guarded secret until recently. I could have told you how they work — but then..... In sharp contrast to the previous secrecy, the details of their operation are now available on the web, not least on the National Bureau of Standards as Federal Information Processing Standards Publications FIPS PUB 46-3. Although the DES code can be cracked for encryption if you have large enough "known" and "encrypted" versions of the same data, lots of time and a Very Big Computer, the same doesn't apply to data authentication. Finding a key which works for the data set may be possible but it will only be 1 of 2 24 (16,777,216) keys which work for that set of data, out of 2 56 or a whopping 72,057,594,037,927,936 possible keys. Finding one key that works for the orig- inal data does not mean it can be used to validate changed data. For a description of the convolutions used in the encryption engine and for the use of this in data authorization we will leave you to the references at the end of this article. A good in-depth description of the operation of the DES is found in [1], 'The DES Algorithm Illustrated' by J. Orlin Grabbe. Time 1 Time 2 Timen-1 Time n A mini Colossus The encryption engine code in the authenticator adheres fairly rigor- ously to the DES standard (see inset). We say ‘fairly’ because one of the tables, known as ‘Permuted Choice V can be omitted, although the con- volutions per- formed by this will still need to be done, they can be done externally on the original 56-bit key code to gen- erate an internal 64-bit key. The extension of the DES for purposes of data authentication is covered in FIPS PUB 113, the algorithm is known as the Digital Authentication Algo- rithm, or DAA Each input block is Exclusive- ORed (XORed) with the out- put of the last block, the result of this being sent through the DES encryption engine to give rise to the next output block. The last input block is padded if necessary with null characters (Hex 00) to fill the block and the Data Authentication Code (DAC) is selected from the most significant bits of the final output block. Our implementation of the DAA differs from FIPS PUB 113 only in that the 0’th output is a string of eight null charac- ters and the initial data block is XORed with that. This is functionally identical with FIPS 113, but is done to make for a more symmetrical subroutine. The final selection of bits to make up the Data Authentication Code (DAC) is the most significant 32 bits of the final block (see the example in Figure 2). Practical circuit and use The circuit diagram of Colossus Jr. shown in Figure 3 is a far cry from the heavily classi- fied ‘blueprints’ of its famous ances- tor originally designed more than 60 years ago, weighing tonnes and built from relays and thermionic valves. By the way, did you know Colos- sus has been rebuilt by volunteers and can be seen working at Bletchley Park Museum? See reference [5]. Today, we’re dealing with an 8-pin PIC microcontroller weighing next to noth- ing in just another black-box configu- ration, i.e. , minimum hardware, maxi- mum software. a microcontroller without on-silicon serial support can still communicate at high speed through 'bit-bang' techniques 10/2005 - elektor electronics 33 HANDS-ON FILE SECURITY Figure 1 . Example of a system that would benefit from data authentication as files are being transferred at least three times between equipment. The PIC employs its on-board oscilla- tor in combination with an 8-MHz ceramic resonator, RES1. The circuit supply voltage is stolen, via a 7805 reg- ulator, from the DTR line of the PC’s RS232 port. The inactive level of DTR (Windows default) is logic ‘0’ or a level between about + 10 V and + 12 V. In operation the device is connected to an RS232 serial port on a computer via K1 and the file to be verified is sent to the authenticator. A stop character will acknowledge each block of eight characters received on the PIC unless they have a parity error or a framing error responded to by a ‘P’ or ‘F’ respectively. The end of the data file must be marked by an ESC (‘escape’) >!D Cycle: 005 Set: 1 0:04 Saturday 09 November 02 V Facs: 0.03694, 6833, 0.01 4, 1 002 BFacs: 0.01715,67 Local: Well No. 9, +8. 00m Start: 1 0:30 Saturday 09 November 02 Period: 00 Hours 30 Minutes 06452, 03524, +12 06452, 03524, +12 06452, 03524, +12 06452. 03523, +12 06452. 03524, +12 06487, 03577, +09 06487, 03578, +09 06487, 03578, +09 06488, 03578, +09 06487, 03578, +09 Readings: 1 71 3 Figure 2. Example of an authentication cycle with the DAC (data authentication code) being the 'final word'. character, after which the authentication code must be sent. This is eight hex dig- its, 0-9 and A-F that represent a 4-byte code. The circuit will respond to the code with either ‘Verified’ or ‘Rejected’ depending on the match. Building it... ... should also differ vastly from the colossal effort that went into con- structing the original deciphering machine during WW2. Figure 4 shows the tiny PCB designed for the Colossus Junior. Construction is straightforward as no special parts or techniques are used. The 7805 voltage regulator, IC2, can make do without a heatsink. The PIC programming interface is a 5-way single-in-line pinheader; the PC inter- face, a 9-way sub-D socket for PCB edge mounting. The PIC micro is seated in an 8-way DIL socket. Con- nect Colossus Jr. to the serial port on your PC by way of a non-crossed RS232 cable. The communication pro- gram on the PC (like HyperTerminal) should be set to 9600 baud, even par- ity, 8 data bits, 1 stop bit (9600, E, 8,1). Customizing your Colossus Jr. You will have to think up your own ‘pri- vate key’ and insert it into the soft- ware. To do this you will need to open and edit the PIC source code file as detailed below using the well-known MPLAB utility from Microchip (free download from www.microchip.com). The circuit is capable of either adding a signature to a data file, or check if a certain file has been changed using this signature. You, the user, select between these two functions. Now, fol- low these steps: Key customizing Open the file ‘des.mcp’ using MPLAB. You will probably get two error reports which can safely be ignored, so just click on ‘OK’. To be able to modify the source code you’ll need to open the files ‘pl.inc’ and ‘des.asm’ (see also inset). Authorize/ Verify selection Selectt the function of Colossus Jr. in lines 17 and 18 of the file ‘des.asm’. For the Authorize (file transmit) function a signature is added by this text: #define Authorize ; #define Validate The other function, data authentication (file reception) is selected by comment- ing out line 17, so: ; #define Authorize #define Validate Changing the key You can find the key in lines 15 and 16 of the ‘pl.inc’ file. Initially this will read PassKeyL = 0x13345779 PassKeyR = 0x9BBCDFFl so the actual key used is: 133457799BBCDFF1 The key needs to be split like this because it’s the only way MPLAB can handle 32-bit values. Compiling and programming Once the files have been edited to your requirements, you are ready to create a programmer file. In the MPLAB menu, pick ‘Project’ from the menu and then click on ‘Build’. An object code file called ‘des.hex’ will be created in the 34 elektor electronics - 10/2005 The Windows XP FIFO Buffer With Colossus Jr. connected to a Windows XP PC you'll find that the RTS/CTS handshaking on the RS232 port will not work very well in combination with the FIFO buffer activity. For proper handshaking with Colossus Jr. this activity has to be minimised or, even better, turned off completely. Here's how to do it. From the Start button, select Control Panels, then System -> Hardware — » Device Manager -> Ports. Right-click on the serial port concerned (e.g., COM1), then select Port Settings. Click on the Advanced button and in the window that opens, uncheck 'Use FIFO buffers' to disable the buffer function altogether. RfifWI PtJ © ^>0 e-i t TTf*r: ” | fcim trf iij: U crnJ i irmtei 1 HdKi :rrvfl: fcrcj ■* wt^nci! |3wT 3 Ujg LH I M I ! COMPONENTS LIST ! Resistors: R1 / R4 / R6 / R7 = 22ka R2 = 1 oka R3,R5 = 2ka2 R8 = 2700 Capacitors: Cl = lOOnF C2 = 22|jF 16V radial C3,C4 = 1 OpF 16V radial Semiconductors: D1 = 1N4148 T1J2 = BC557B T3 = BC547B IC1 = PIC1 2F675-C/P, programmed. Publishers order code 040267 - 41 * IC2 = 7805CP Miscellaneous: K1 = 9-way sub-D socket (female), PCB edge mounting K2 = 5-way SIL pinheader Resl = 8.000MHz ceramic resonator 8-way 1C socket RS232 serial cable (non-crossed) PCB, ref. 040267-1 from The PCBShop Disk, PIC source code files, order code 040267-1 1 * or Free Download * see Elektor SHOP page or www.elektor-electronics.co.uk Figure 3. Circuit diagram of Colossus Jr.: a PIC with some I/O hardware strewn around it. Note that the circuit is powered off the PC's (inactive) DTR line, which is normally at about +10 V. Figure 4. PCB copper track layout and component mounting plan. 10/2005 - elektor electronics 35 HANDS-ON FILE SECURITY current folder. A PIC programmer supporting the 12F675 is required to transfer the object code file to the actual 8-pin chip. The circuit has a SIL pinheader, K2, containing all signals required for in- circuit (!) programming of the PIC. More on the microcontroller software The microcontroller code being avail- able as a free download from our web- site (040267-11. zip), you have a great opportunity to learn a bit (pun intended) about cryptography and data authentication at PIC assembly code level — excellent reading for a rainy afternoon! The code is divided into three parts, the operating core which receives data and authentication codes, the interrupt service routine which allows data to be received in the background while the microcontroller is working on pre- viously received data, and the encryp- tion engine which takes blocks of data and converts them into an encrypted version. The serial input and output routines are what is known as ‘bit-bangers’ in that they don’t need any supporting silicon on the microcontroller but use direct manipulation of general purpose input and output ports. The input routine is interrupt driven and is designed to receive data in the background, much if not all of the encryption can be done in the time that it takes to read a batch of eight characters. Output is also inter- rupt driven, but works in the fore- ground as little data has to be output; only the block acknowledgements and the “Verified” or “Rejected” messages. ( 040267 - 1 ) Reference and web pointers http:// csrc.nist.gov/ publications/ fips/fips46-3/fips46-3.pdf http://www.itl.nist.gov/fipspubs/ fipll3.htm http://www.aci.net/kalliste/ des.htm [4] http://www.microchip.com/ download/ appnote/ appspec/1 6cxx/ 00555c.pdf [5] www.bletchleyparkheritage.org.uk/ index.htm Check & double-check: the DES routine (code will not run on the Bletchley Park Colossus Rebuild...) Processor PIC12F675 EXPAND list n=76, c=97, b-12, st=off, t=on, p=PIC12F675 Errorlevel 0,-302 ; Don’t tell us about being in wrong page ; Configure brown out detection enabled ; no code protection ; power on timer enabled ; watchdog timer disabled ; HS oscillator CONFIG _BODEN_ON&_CP_OFF &_PWRTE_ON&_WDT_OFF &_HS_OSC ; Select the task to be assembled for by un-commenting the appropriate line below. #define Authorize ; #define Validate ; All timings for the RS232 are based on an 8.00MHz resonator and a serial bit rate of ; 9600bps. Although only 7 bits of data are used, the byte size is 8 bits with an ; additional parity bit - the parity is even. #include “P12F675.inc” ; Microchip supplied defs #include “des675.inc” ; This file does a convolution of the cryptographic key using the MPLAB assemblers itself ; to replace the “Permuted Choice 1” convolution. * * * ***** EDIT THIS FILE TO CHANGE THE KEY ***** * * * Note that the listing of this file has been switched off to reduce clutter. #include “PCI. INC” org 0000 goto init org 0004 #include “intser.asm” ; Table contains the key in the first 8 bytes, it additionally has status and ; judgement strings. Table addwf PCL,F nop DT PCI 0, PCI 1, PCI 2, PCI 3, PCI 4, PCI 5, PCI 6, PCI 7 Verify DT “Pass”, 0 Reject DT “Fail”, 0 Ready DT “Ready”, 0 init bsf STATUS, RP0 movlw b’ 11 111 100’ ; bit 0 is busy, 1 is tx data movwf TRISIO clrf ANSEL bcf STATUS, RP0 movlw 7 movwf CMCON ; switch off comparators 36 elektor electronics - 10/2005 PicoScope 3000 Series PC Oscilloscopes The PicoScope 3000 series oscilloscopes arc the latest offerings from the market leader in PC oscilloscopes combining high bandwidths with large buffer memories. Using the latest advances in electronics, the oscilloscopes connect to the USB port of any modern PC, making full use of the PCs’ processing capabilities, large screens and familiar graphical user interfaces. • High performance: IOCS ■ iampling rate & 200MHz bandwidth • 1MB buffer memory • High speed USB 2.0 interface • Advanced display & trigger modes • Compact & portable • Supplied with PicoScope & PicoLog software Baaatatiaai ' act*r«y ■ kit a f IS »«•••• I IOOwV ta !»0V PC CaiMctiM U*» O HJ9B1 1 Tel: 01480 396395 www.picotech.com/scope297 PtciAc^« >904 MOB 39»■ | rata iMapla otua.1 M)MS« lOOMtt* Cfcaaada ff .( at ir»ppar • «l4 paa »«(a i« n rbi OM*aaci»a itm+mm* kttta «a ilaakv ta bOata latta ta bOtt. mn« M*a- OlatftMHi 0 ta MMHi Ota tOOMHr |)yiv ■•■ary sib j%mcu lUtl fl 01 Number One Systems The world beating PCB design software Easy- for Windows . ■ * S I ■- % ■ ■’ Easy-PC version 9 just gets better Winning accolades the world over, Easy-PC for Windows V9 is another major milestone in the evolution of this extremely popular software tool. Try a demonstration copy of Easy-PC and prepare to be amazed at the power, versatility and remarkable value for money. ft. J T it ■ ft -r H-l- Version 9 fetaures .Jr ■ 3D Board View ■ New Win XP User Interface ■ Reverse Engineer SCM from PCB ■ Track Fattening ■ Interactive Schematic Routing ■ New Sliding Toolbars ■ Component Clearance Checks H Alphanumeric Pin Names Plus many more exciting features tlTp 4® A ‘ | Fully integrated Schematics & PCB layout in a single application complete with forward and back annotation. Design and rules checks at all stages ensure integrity at all times. Professional manufacturing outputs allow you to finish the design process with ease. Stop press... Stop press... Stop press... Stop press... Easy-PC imports Eagle files as well asTsien Boardmaker 2 files call for a brochure, prices & CD on +44 (0) 1 684 773662 or e-mail sales@numberone.com you can also download a demo from www.numberone.com Number One Systems - Oak Lane - Bredon - Tewkesbury - Glos - United Kingdom - GL20 7LR UK Microsoft® Windows®XP, 2000, ME, 98, Windows NT® 10/2005 - elektor electronics 37 HANDS-ON 27C512 EMULATOR 27C512 Emulator Florent Simonnot More and more electronics hobbyists and professionals are using CPLDs to implement circuits. In this article, we work through the entire design process for a CPLD project from start to finish using a practical example. The result is a handy 27C512 EPROM emulator that is useful for debugging microcontroller systems. T his article shows you how to design an EPROM emulator with a minimum of ‘glue chips’. Various types of CPLD and FPGA devices have already been used in several projects published in Elektor Electronics, so many readers already know how easy it is to use these components to develop digital circuitry Altera EPM7064 We selected the EPM7064S EPLD from the Altera CPLD family for this project because it allows a handful of chips to be eliminated from the design. The separate buffers, bidirectional ports, multiplexers and latches that would normally be required are no longer nec- essary if a CPLD is used. That makes the circuit board layout considerably smaller and simpler. If you’ve been fol- lowing our recent series of articles about CPLDs, you can now put your knowledge to practical use with this project. CPLD size It’s a good idea to draft a list of the desired CPLD properties before select- ing a particular device. On the one hand, there’s no point in purchasing an expensive CPLD if only ten percent of its capacity will be used, while on the other hand, if the selected CPLD is too small you will be forced to use every trick you know to squeeze the design into the available space. As every EPROM emulator must have a RAM capacity that is at least as large as that of the EPROM to be emulated, you already know several important parameters, particularly with regard to the required number of inputs and out- puts (I/O pins). The calculation is straightforward: a27C512is organised as 64 KB x 8 bits, so you will need to have 16 address lines and 8 data lines available to emulate it. As the RAM in the emulator must have at least the same capacity, it will also require at least the same number of I/O lines. That gives a total of 48 I/O lines (16 x 2 + 8 x 2). If you add around ten control lines for enabling the tri-state (high-impedance) mode and control- ling other registers, you already end up with around 60 pins. It’s clear that a 44-pin or 64-pin pack- age won’t meet your requirements, particularly if you consider that CPLDs generally require supply connections on all sides of the package and some- times even require several different supply voltages, because the voltage required by the core logic (V ccint ) is usually different from the voltage required by the I/O logic (V ccio ). The net result in this case is that you’re looking at a PLCC84 package. It’s more difficult to estimate how much circuit capacity you will need. A good technique is to count the number of flip-flops you will need for functions such as registers and counters. For instance, if you want to implement a (rather) large counter composed of 40 JK flip-flops, a device such as the EPM7032 is totally unsuitable because 38 elektor electronics - 10/2005 it has only 32 macrocells (as indicated by the type designation) that can be configured in the desired manner. Counting registers As can be seen from the block diagram in Figure 1, the microcontroller must perform its tasks using a link to the CPLD consisting of only 8 bits (from port A) and 3 control lines (from port C). Two sets of eight D-type flip-flops are needed to form a storage register for the 16 address bits of the RAM, and Key features • emulates a 27C512 EPROM • file download via a serial port using three leads (Tx, Rx & GND) at a speed of 1 9,200 baud • compatible with Intel hex format • expansion connector for synchronisation with another emulator or system • CPLD programmable in AHDL using the MAXPLUS II BASELINE freeware development environment (or QUARTUS) • AVRGCC C compiler under GNU licence implementing this logic requires 16 macrocells. It must be possible to put the data bus in a high-impedance state in order to isolate the emulator from the target system, and that costs 8 macrocells in the CPLD. Another 16 single-bit multiplexers are needed to drive the data bus of the RAM, which receives its data from the target sys- tem or the D register - that’s another 16 cells. A total of 40 macrocells (16 + 8 + 16) are thus necessary, not including the control lines, which also require space in the peripheral interconnect matrix of the CPLD. An EPM70674S should be able to meet these requirements. TDF vs. 6DF You might expect to see these letters on the rear of a sports car, but in this case they stand for ‘Text Design Files’ and ‘Graphic Design Files’. Although it would certainly be possible to describe the design using a sort of schematic diagram, here we use Altera’ s native hardware description language (AHDL) instead, for two principal reasons. The first reason is that above a certain level of complexity it is essential to be able to use a language that describes the design, since otherwise it’s nearly impossible to reliably distinguish a particular signal line among countless other signal lines in a schematic dia- gram displayed on a computer monitor with limited dimensions. The second reason is that a hardware description language, regardless of whether it is VHDL, Verilog or AHDL, is both flexible and powerful. For instance, the width of a bus can be enlarged in a wink, while performing the same task at the graphic level quickly turns into slave labour. Although this approach may seem somewhat confusing at first, it is cer- tainly worth the effort. Now it’s time to get down to work! You can grasp the bull by the horns by studying the AHDL listing for the EPM7064S (a portion of which is shown in the screen shot in Figure 2). The simplicity of this design has the addi- tional advantage that there is no hier- archical structure - the ‘top level’ is always defined by the actual level. The first section of the description after ‘subdesign’ defines the ports and their directions. You can immediately recog- nise the RAM address and data busses and the emulator probe bus. For instance, D[7..0] describes the eight signals originating from the microcon- troller. They are inputs to the Altera IC and have thus been quite logically assigned the description ‘input’. Things are a bit more complicated in the case of DEO [7-0] , which form the actual data bus for the emulator probe. As it must be possible to put these lines in a high-impedance state while the RAM is being loaded, they must be connected using a bidirectional buffer. This sort of I/O would normally be han- dled using a bidirectional bus, but here open-drain outputs are used instead. To briefly return to the difference between graphic input (using a graphic design file, or GDF) and input in AHDL (using a text design file, or TDF), just imagine how much less time it takes to type these few lines of text than to select and position all sorts of graphic symbols using a mouse. Now we come to the ‘variable* section of the design description. That’s where things such as the flip-flops, nodes and machine states necessary for the design must be declared. Only the address latches for the RAM address bus have to be declared for the emula- tor. They are 16 simple D-type flip-flops (DFFs), appropriately named ‘adress- latch’. The purpose of the next line 10/2005 - elektor electronics 39 HANDS-ON 27C512 EMULATOR Figure 1 . Block diagram of the versatile EPROM emulator. may be somewhat unclear at first glance. That’s where the tristate buffer connected to the bidirectional port (DE0[7-0]) is declared (‘DE’ stands for ‘data emulation’). The third and final section contains the actual design description. If you’re new to writing design descriptions using a hardware description lan- guage, you may not know that the order of the statements in the descrip- tion is not important. The language is a ‘parallel’ language, which means that any given statement can be located before or after any other state- ment; the actual order doesn’t matter. Here the description starts with assigning the inputs of the D-type flip- flops according to the block diagram, which means connecting bus D[7..0] to inputs [7..0] and [15. .8]. The clock inputs of the first group are connected to the lbyte signal so the lower 8 bits of the address bus can be latched. The clock inputs of the second group of flip- flops are connected to hbyte so the upper eight bits can be latched on the rising edge. The implementation of the multi- plexer logic for the RAM address bus follows after the first four lines. The RAM address bus is connected to either the address latch or the emula- tor probe, depending on whether the emulator is operating in load mode or emulation mode The bidirectional ports (DE[7-00]) are implemented using the ‘tri’ routine. It has a data input (‘in’), an enable input (‘oe’) for switching the output to a high-impedance state, and an output (‘out’) that must be connected to a bidirectional port. The ‘in’ input of this routine should not be confused with a physical input on an I/O pin of the CPLD. A comment is in order here regarding the RESET and RESET signals. They are open-drain signals, so their ports are declared as bidirectional (‘bidir’) and a routine named ‘opndrn’ must be used. It is similar to the ‘tri’ routine, but it doesn’t have an ‘oe’ input. That completes the process of entering the definition file, but there’s still more to do. First, you have to inform the MAXPLUS program that it must regard the file you just entered as the highest- order file (even if it’s the only file avail- able). You can do that via File> Pro- ject > Set project to current file or by typing Ctrl J. After this, you must specify which type of component to use for implementing the project. Assign> Device brings up a dialogue window in which you can specify your choice. In this case you must select ‘EPM7064STC 100-10’. Now you’re ready to make your first attempt at compiling the design, which you can do by clicking on the icon with the ‘factory’ symbol. If everything goes well (see the screen shot in Figure 3), only a couple of warnings will appear: A16 is stuck at ground and the compo- nent has less than 20% free pins. But you’re still not finished. Although the compilation ran without any errors, it also created a layout, or ‘floorplan’, on its on initiative. The current layout can be seen by examining the floorplan via MAXPLUSII> Floorplan editor. It’s not exactly what you want, so you have to suggest a different arrangement to the compiler. That requires making a back- annotation to the project, which you can do by selecting Assign>Back- annotate project in the current floor- plan. Among other things, that copies the compilation results (selected device, assignment of the ports to the pins, etc.) to an ‘assignment & config- uration file’(. acf file). Now you can select Layout> Current assignment in the floorplan editor to display the CPLD in a separate window (Figure 4), labelled with the names of the pins to which the ports have been assigned. The compiler made the assignments that it found most convenient. Now you have to convince it do things more the way you want them. That involves using the mouse to rearrange the port assignments by dragging the ports to the proper pins until they match the electrical schematic forming the basis for the design After this operation is finished, you have to recompile the design. The result of the new compila- tion can be used directly in the actual circuit. It’s interesting to note that with a com- plicated design, it’s quite possible that the compiler will be unable to comply with the desired floorplan (‘fit failed’). That means that no paths were found in the CPLD, or worse yet, the pro- posed internal routing would cause the timing to adversely affect the perform- ance. However, that’s not a problem with our design, which is truly very simple. The ability to select the pinout for a desired design makes it possible to considerably simplify the layout of the circuit board used in the final design. Some of the more powerful CAD programs route the FPGA and the PCB layers at the same time to prevent the fine track pattern from becoming too complex. If don’t have such a pow- erful (and expensive) program, you can work by switching back and forth between the various CAD programs. Simulation Before programming the CPLD, you can test the design using a simulation (even though the design is quite simple). 40 elektor electronics - 10/2005 WrilKl J-ri is HUICr *.i"**tv m (trips ■ ■pul llHir •m t>rrL t* Flu PLftS Pin Ul Lrpimr 1 . SL ur +rm IIW«J LlTIEIh i« IT u fii H i ■Hiiw Plus] ft tn tv M T^-l 1 “ y Figure 2. A portion of the emu.tdf file Figure 3. It's always nice to receive only one error message! in the text editor prior to compilation. r . [T£1 ■l, ■ J H I- j.-“ ks> * Mi K*“ *■ # ■■ ‘ »■ z l cm * .-i 1 .is | 7 M J“ i™ h-fe LT“- U^*-* fc 1 I* ■ — «* ^ II ■ D*Q - , .+ + 1 H , " ■ ; -L-. ■ ■ ■ " • Figure 4. Example of the floorplan before the implementation. Figure 5. Tools like this show the power of modern development tools such as MAX+PLUS II. Start with creating a simulation file by clicking on File>New and selecting Waveform editor file. An empty page will be displayed, and the first thing you should do is to save it with the same name as the project (which is ‘emu’ in this case). The recommended method involves entering vectors based on the simulator netlist (. snf ) file, which includes timing information for the design. The screen dump shown in Figure 5 should help clarify all of this. Start by entering the RAM address and data ports (D[7. .0] and A[ 16..0]) by right-clicking with the mouse and selecting Insert nodes from SNF. After that you can enter other signals, such the signals from the emulator probe (DE [7-0]), the data bus (EA [15-0]), cee data, oe data, RESET and RESET. Bear in mind that DE0[7-0] can be placed in the high-impedance state, for which reason there are two units for simulating the bus: in (i) and out (o). Finally, add the ports for the signals that control loading the registers (hbyte, lbyte and ene_a). Here you can freely choose the values for the group of bus signals and the three possible values of the binary ports. If you’re wondering how a binary port can have three different values, just remember that you can select 1, 0, or Z (high impedance) for many of the signals, such as the lines of the data bus on the board. A high impedance is represented in the .scf file by a dash, or by a ‘z’ in case of a bus. After the values of the vectors have been entered, you can subject the design to a practical test by starting the simulator via MAXPLUSII> Simula- tor. First check to see whether the val- ues 0x55 and OxAA appear succes- sively on data bus D [7-0] and are latched by the rising edges of the lbyte and hbyte signals, respectively, to gen- erate the value 0xAA55 on the RAM A[ 16-0] bus. Then check whether the emulator becomes active when the e_emu signal goes high after the reset signals of the emulator probe are set to the high-impedance (open drain) state or to 0. In that state, all the values on the address bus of the target board are copied to the address bus of the RAM with a delay due to the propagation time of the EPLD. The data from the RAM is similarly copied to the data bus of the target board. An important aspect of the simulation is the propa- gation delay between the inputs and 10/2005 - elektor electronics 41 HANDS-ON 27C512 EMULATOR +5V© ^C15 J^16^|ci7^C18 100n 100n™ "oOn^p J L — +5V © C12 MOOn \A9 \A1Q \ All \A12 \A13 \ A14 \A15 22 21 20 18 17 16 15 \^L 12 \A5_ 11 \A6 10 \ A4 \A! \A2 \A1 \ AO A8 24 \A0 SAL \A2 \A3 \ A4 13 \A5 14 \A6 15 \A7 16 \A8 17 \A9 18 \ A10 19 S. All 20 \A12 21 \A13 29 \A14 30 t A15 31 32 ©© IC3 RAM AO A1 A2 A3 A4 A5 A6 A7 A8 A9 CY7 C1019B A1 ° -15VC All A12 A13 A14 A15 A16 DO D1 D2 D3 D4 D5 D6 D7 9 25 6 DO 7 D1 ' 10 D2 ' 11 D3 ' 22 D4 ' 23 D5 ' 26 D6 ' 27 D7 ' D3 / / / / / / s +5V © K1 C4 ^ JoQn 10 O Q o o- o --o o-- o a jcKy jDoy jMsy TDI / JTAG Interface +5V © C23 ^ToOn K2 MISO SCK O Q O O O O O Q O O- MOSI / 6 RESET UC / 10 D4 D2 D1 D5 DO D6 D7 34 33 31 30 29 28 27 25_ 24 LBYTE 83 1 _ ENA A 84 HBYTE 43 ^C19 ^C20^C21 ^OOn^ToOn^Jc C22 OOn^OOn 13 26 38 53 66 78 A1 - A2 A3 A4 A5 A6 A7 A9 A10 All A12 A13 A14 A15 ©© ©©©©©© INT INT 10 10 10 10 10 10 r C33 - LAB A 4 A16 - 41 B17 -■ 40_ B18 39_ B19 37_ B20 36_ B21 35 B22 IC2 EPM7064SLC84 B23 B24 - LAB B B25 B26 B27 B28 B29 B30 B31 - 1 GCLK1 GCLRn OE1 OE2/GCLK2 C34 C35 C36 C37 C38 C39 LAB B - C40 C41 C42 C43 C44 C45 C46 L C47 r D49 D50 D51 D52 D53 D54 D55 LAB D H D57 D58 D59 D60 D61 D62 D63 L- D64 TDI TMS TCK TDO 19 32 42 47 r 59 72 44 DE3y 45 _DE4/ 46 DE2y 48 _DEiy 49 DE5y 50 DEoy 51 _DE6/ 52 54 DE7 . +5Vext © +5V JPl EAO 55 EA1 56 CE E 57 58 60 61 63 OE E 64 A 65 67 68 69 70 73 74 75 76 77 79 80 LEDLOAD 81 LEDEMU 14 TDI 23 TMS 62 TCK 71 TDO \ \ \ \ \ \ 82 EA2 EA3 EA10 EA4 \ Z _EA5y EA11/ EA6 / EAT/ EA12 y EA15 y EMy EA13 / EA14 y EA8 . / -fo EAO 10 'eai 9 EA2 8 'EA3 7 r EA4 6 'EA5 5 EA6 4 'eA7 3 'EA8 25 EA9 24 ^EAIO 21 ^EAII 23 ^EA12 2 EA13 26 r EA14 27 EA15 1 28 AO A1 A2 A3 A4 A5 A6 A7 A8 © K6 DO D1 D2 D3 D4 to target A9 D5 EPROM A10 D6 All A12 A13 A14 A15 CS D7 i OE/VPP RESET RESET +5V X R7 D3 R6 D4 green 3 2[ 21* 5n red z z 20^4 .Z 11 D m o s 12 PEI, 13 CM Lii a 15 DE3. 16 •V LU a 17 DE5 / 18 DE6. 19 D m 22 JP2 RESET I K ■oj reset _L K5 * 10k R1 10k R2 <► — (+) +5V +5V © R3 +5V © 1 8x 10k jLiiruu \22_( ► S21 \D2 \D3 \D4 \D5_ \D6 l -*\D7_ 39 38 37 36 35 34 33 32 ENA A 29 30 21 _ 22 _ 23_ 24 LBYTE 25 \ HBYTE 26 S, WE 27 SOI 28 ^■ 14 pt)0n 40 © PAO(ADO) PBO(TO) PAI(ADI) PB1(T1) PA2(AD2) PB2(AIN0) PA3(AD3) PB3 PA4(AD4) PB4(SS) PA5(AD5) PB5(MOSI) PA6(AD6) PB6(MISO) PA7(AD7) PB7(SCK) OC1B IC4 RESET ALE AT90S8515 ICP PC0(A8) PDO(RXD) PC1(A9) PDI(TXD) PC2(A10) PD2(INT0) PC3(A11) PD3(INT1) PC4(A12) PD4 PC5(A13) PD5(OC1 A) PC6(A14) PD6(WR) PC7(A15) PD7(RD) XI X2 20 Cl 19 XI I I MOSI / MISO / _scKy 9 RESET UC. IC5 K4 +8V...+12V r /\© -o +5V © R5 CIO C11 ~D2 ± ± ±t lOOn 10u 1 Ojj. 16V C5 iS 31 10 in 16V 12 11 12 13 14 15 _16 17 11 10 C6 ts in 16V — ur~ „ 16V 2 V+ C1 + © IC1 Cl- RIOUT RUN R20UT R2IN T1IN T10UT T2IN T20UT C2+ MAX232 C2- V C8 18 C2 22p XI = 3.6864MHz 030444 - 1 1 Figure 6. Despite the high pin counts of the principal components, the schematic diagram of the EPROM emulator is easy to understand. 42 elektor electronics - 10/2005 outputs of the CPLD, which it is deter- mined based on theoretical data in the .snf file. The delay must be added to the access time of the RAM in order to obtain an idea of the timing perform- ance of the emulator. EPROMs are relatively slow, with access times ranging from 45 ns for fast types to 200 ns for slow types. The propagation delay is approximately 10 ns, which means you have a consid- erable margin given the 15-ns access time of the Cypress CY7C1019B-15VC RAM IC used in this design. You can thus expect a total access time T aa of 35 ns (RAM access time plus two prop- agation delays through the CPLD for the round trip to and from the RAM). If that’s not fast enough, you will have to use the -5 version of the same RAM type (5 ns access time). T aa can be reduced even further by using the -5 version of the EPM7064. In that case you can expect T aa to be approxi- mately 15 ns. This concludes the ‘logical’ portion of the project. However, we have a bit more to say here. You can easily use the QUARTUS II program from Altera instead of MAX Plus II. Altera recom- mends using the former program because no new release of the latter one will be issued. If you don’t already have a licence for either one of these programs, you can download a ‘web edition’ or ‘student version’ from the Altera website after filling in a form. You will receive the necessary license.dat file by email. Hardware A glance at the schematic diagram in Figure 6 shows that it contains few secrets and closely matches the block diagram in Figure 1. Power is supplied by a mains adapter, but it can also be tapped off from the target system via the supply pins of the EPROM being emulated. In the latter case, you should verify that the quality of the available 5-V supply is adequate and fit a jumper at JP1. The sole purpose of diode D1 is to protect against a reverse polarity connection, which is always a possibil- ity when you’re working on the bench. An interface IC in the form of a MAX232 (IC1) converts the RS232 sig- nals to TTL levels. The microcontroller (IC4) is an Atmel AT90S8515 with flash memory. It can be programmed in sys- tem via ISP connector K2, which feeds out the signal from the SP1 line and the reset signal. If you don’t want to pro- gram the microcontroller yourself, you can obtain a pre-programmed version from Readers Services (order number 030444 - 41 ). The board can be reset using a push- button switch in case of a crash. The CPLD (IC2) is connected to Kl, which makes its JTAG signals available to the external world so it can be pro- grammed using a suitable device. A pre-programmed version of this IC is also available (Readers Services order number 030444 - 21 ). Note: in order to save space, the required resistors for the JTAG inter- face have been placed in the JTAG adapter cable. Also note the very large decoupling capacitors around the CPLD. They are necessary to ensure the quality of the supply voltage by absorbing current peaks that can cause EMI radiation. The RAM (IC3) has a capacity of 128 KB and a very short access time of only 15 ns, which is reason enough to use an SMD type. The RAM sees all the busses con- nected to the Altera IC, but the control lines for writing data and enabling the outputs are driven by the microcon- troller. The power supply requires little com- ment. An adapter with an output volt- age in the range of 8-12 V can be used. It is connected to I<4. The 7805 regula- tor provides the 5-V supply voltage required by the emulator. LED D2 indi- cates that the supply voltage is present. Software The program was written in C using the freeware GNU C compiler. That means that anyone who makes any changes to the program is obliged to disclose that fact and make the source code available. The main task of the program is to provide a bridge between ASCII data received from a PC (via the RS232 line) and the core of the emulator. The program revolves around the follow- ing files: • main.c This is the starting point of every C program, and here it is very short because it only initialises the UART for RS232 communications, enables interrupts, and determines the sequence of task execution. The end- less loop for (;;) contains: A call to the function TreatFrame Task() to check whether a complete frame has been received. Two subsequent if statements that verify the CRC and initiate conversion of the frame by the function Parse- Frame(), which is also responsible for writing the received data to the RAM. Any frame with an incorrect CRC is rejected. A set of three if statements that respectively handle requests to read out the content of the RAM, fill the RAM with ‘0x00’, and fill the RAM with ‘OxFF’ (very handy during the emula- tor development stage). • uart.c Contains all the routines for receiving and transmitting characters, including the access points for the interrupt services. These service rou- tines can be easily recognised by their names: ‘SIGNAL’ followed by the vec- tor number (replaced by a more user- friendly label). The SIGNAL(SIG UART RECV) routine is called each time a character is received via the RS232 line. It sets con- trol flags in the order of reception (‘switch case’ is self-explanatory). If at least one frame has been sent, it is stored in a buffer in binary form. There is a pair of routines that can be used to send a message from the flash memory (PrintSerial) or store a mes- sage in RAM (UartSend). The SetMode function defines the con- trol lines for the RAM and CPLD. Finally, there are routines to fill the RAM (ClearRam) , read out the RAM contents (ReadBackRam) , and gener- ate a hex dump. • utility. c Contains utility routines and routines that are often used in projects for ASCII-to-binary and binary-to-ASCII conversion. • system.h Contains all the # define statements belonging to the project and the hardware environment on the board. The frequency of the clock crys- tal is also specified here. The syn- onyms used to improve the readability of the code (such as ‘checksumok’ for ‘2’) are also located here. In addition , there are a large number of #define statements that allow several C macros to be replaced by labels (such as TRI_STATE_DATABUS) to make it easy to set bits on the port that con- trols the RAM and the CPLD. 10/2005 - elektor electronics 43 HANDS-ON 27C512 EMULATOR Figure 7. Component layout of the circuit board designed for the emulator. Pdf file of copper track layouts (top and underside) available as free download (030444-1. zip). COMPONENTS LIST Resistors: R1,R2,R4 = lOkfl R3 = 1 0 kD 8-way SIL array R5,R6,R7 = lkfl Capacitors: Cl ,C2 = 22pF C3 / C5-C8 = IjiF 16V radial 04,09,010,023 = lOOnF C 12-022 = lOOnF, SMD, shape 1210 011=1 OjLiF 16V radial Semiconductors: D1 = 1N4001 D2, D4 = LED 3mm red D3 = LED 3 mm green 101= MAX232N (Maxim) IC2 = EPM7064SLC84-1 5 PLCC, programmed, Publishers order code 030444-3 1 IC3 = CY7C1 01 9B-1 5VC (Cypress) 104 = AT90S85 1 5-4PC DIP 44 pins, programmed, Publishers order code 030444-41 IC5 = 7805CP Miscellaneous: JP1 = 2-way SIL pinheader with jumper JP2 = 3-way SIL pinheader with jumper K1 ,K2 = 1 O-way boxheader K3 = 9-way sub-D socket (female), PCB mount K4 = DC adaptor socket K5 = 2-way SIL pinheader K6 = length of 28-way Rateable with DIP IDC connector SI = pushbutton, 1 make contact XI = 3. 6864MHz quartz crystal 84-way PLCC socket PCB, ref. 030444-1 from the PCBShop Enclosure, e.g, Hammond type 591-D Disk, project software, Publishers order code 030444-1 1 or Free Download. The makefile file is probably a bit strange for beginners. It contains infor- mation for the linker to tell it which files must be linked to other files. It also includes information about the mutual relationships of the various files, so the amount of recompilation can be kept to a minimum if only small changes are made. The author used Microsoft Visual C + + as an editor to simplify writing the source code, which explains the presence of the .dsw file. A simple word processor could also be used for that task. Construction Construction of the emulator is practi- cally child’s play thanks to the double- sided, plated-through PCB, whose board layouts is shown in Figure 7. However, there are a few points that require special attention. The SMD components used in the cir- cuit must be fitted first. In particular, a fine-tipped soldering iron is required for the SMD capacitors on the solder side of the board (C12-C14) and the decoupling capacitors for the CPLD (C15-C22), and extra flux may be nec- essary. These components can be fit- ted quite easily. All it takes is a tiny bit of solder at each end. Resistors R1 and R2 are fitted under the DIP connector. Soldering the RAM (IC3) requires a certain amount of care. Start by plac- ing it precisely on top of the solder lands. Then solder two pins at the extreme corners. If the IC is properly positioned, you can continue with sol- dering the other pins, making sure to allow the IC enough time to cool down. It’s good practice to inspect the solder joints with a loupe after you’re finished. If there are any shorts between the pins, the excess solder can be removed using finely stranded wire with liquid flux. 44 elektor electronics - 10/2005 Figure 8. Fully assembled emulator prototype. It differs slightly from the final PCB supplied by us. Note the especially small dimensions of some of the capacitors (including the 1 -jliF types). Use the same procedure for the PLCC socket with its 84 pins. Pin 1 of the socket can be recognised by the bev- elled corner. Checking your soldering with a loupe is a good idea in this case as well, in light of the pin spacing of 0.1 inch. Fit the small components next, such as the crystal and the capacitors, diodes, LEDs and resistors. Pay attention to the polarity of the elec- trolytic capacitors, LEDs, diodes and the like. The orientation of resistor net- work R3 is also important. Finally, fit the various headers and PCB -mount connectors. The shell of the Sub-D connector is secured using two tabs that fit into openings in the PCB. The microcontroller should prefer- ably be fitted in a good-quality IC socket. After you finish the final inspection of your work, but before you fit the two most important ICs, it’s probably a good idea to connect the supply volt- age and check whether it is present at a number of critical locations: pins 8 and 24 of IC3, pin 40 of IC4, and pins 3, 13, 26, etc. of the socket for IC2 (refer to the schematic). Switch off the sup- ply voltage after this test has been successfully completed. Now it’s time to fit the EPM7064 in its socket. Note that pin 1 is located to the left of the bevelled edge of the component. Now you can connect the supply volt- age again. D2 (close to the voltage regulator) should light up to indicate that the supply voltage is present. Operation The emulator communicates with the PC using Hyperterminal or a similar program. To initiate a dialogue, config- ure the program for a baud rate of 19,200, no handshake (neither hard- ware nor software), and ASCII-only dialogue. If the RS232 link is properly configured, the terminal window will display a welcome message after the supply voltage is switched on, along with a list of available instructions. To check whether everything is OK, you can make a simple test by pressing the ‘r’ key to read out the RAM. The content of the RAM will be arbitrary. Next, use the ‘c’ command to set the content of the RAM to ‘0x00’, and check this by reading out the RAM again. The ‘s’ key loads ‘OxFF’ into the memory. Type an T on the PC to download a hex file and transfer it in text format. After the file has been loaded, you can type ‘e’ to read out the memory again and switch to emulation mode. You can reinitiate the process when- ever you wish (such as after a crash or if the firmware detects an error in the transmitted data) by typing ‘R’. There is no timeout for entering com- mands or downloading hex files. That means you can also enter Intel hex code manually without any problems. Each CRC error or other error is indi- cated by an error message. You can easily transfer several files in succes- sion to the emulator. They will be placed at the specified addresses with- out erasing or corrupting the data already present. It is also possible to make changes manually. Than can be handy when you want to modify a few values with- out recompiling and downloading the entire program. MAX+PLUS II vs. QUARTUS As already mentioned, Altera provides two different integrated development environments (IDEs) for its products: MAX+PLUS II and QUARTUS II. The author used the first of these IDEs, while the Elektor Electronics lab used the second one. You can download both versions and make your own choice, and they are also available from Readers Services on diskette (order number 030444 - 11 ). The project file also includes a folder named ‘jliC ’ that contains the source and hex code for the microcontroller. Altera also provides an explanation of 10/2005 - elektor electronics 45 HANDS-ON 27C512 EMULATOR Prototypes Putting a project like this on the rails doesn't always go as smoothly as originally expected - not even if the author has provided an outstand- ing design on paper and has already built several different examples of the circuit, all of which work just fine. We tried various approaches to converting this emulator into a 'general purpose' design. We ultimately settled on using a modern RAM 1C, in part for timing reasons. It comes in a 32-pin TSOP32 package with straight pins. As can be seen from the photo, the initial prototypes had a few creative features. After all operational problems in the emulator design were eliminated, the Elektor Electronics lab designed the final ver- sion that is described in this article. how to make the transition from MAX+PLUS II to QUARTUS II (see the Internet addresses at the end of the article). To make migration to QUAR- TUS II painless for experienced MAX+PLUS II users, QUARTUS II has a ‘look & feel’ option that gives users the feeling of working with MAX+PLUS II while actually using QUARTUS II. Final remarks This is clearly a project that can be modified according to your particular ideas and wishes. It is an ‘open’ project in the sense that all of the source code is freely available from the moment that it is published, in accordance with the conditions of the GNU licence. ( 030444 - 1 ) References 'EPROM Emulator', Elektor Electronics , November 2002 Internet Version 10.2 of MAX+PLUS II: www.altera.com/ products/ software/ products/legacy/ max/ sof-emax_baseline.html Version 4.2 of QUARTUS II (several dozen MB!): www.altera.com/ support/ software/ download/ altera_design/ quartus we/ dnl-quartus we.jsp Migrating from MAX+PLUS II to QUARTUS II: www.altera.com / products / software / switching/ maxplus2 / qts-mp2_user.html All about the MAX 7000 family: www.altera.com / products / devices / max7k / m7k-index.html MAX 7000 datasheet: www.altera.com/literature/ds/m7000.pdf CYC1019B datasheet: www.cypress-japan.co.jp/ products/ datasheet.php?partnum=CY7C 1 0 1 9B&familyid=36 GNU compiler, a large number of links to private Internet sites for SPI programmers, and a fantastic forum: www.avrfreaks.org About the author Regular readers of Elektor Electronics will probably recognise Florent Simonnot as the designer of the Mini Test Pattern Generator published in the June 2003 issue. After obtaining a DESS degree in microelectronics in Bordeaux, Florent worked for two years in a compa- ny that develops cameras for industrial and surveillance applications, followed by three years in a company that built flight simulators. As a result of the crisis in the air transport industry, he was forced to move to an inter- national group that is active in the automotive electron- ics area, where he presently holds the position of proj- ect manager for electronics. In keeping with his first formal degree, a technician's diploma to which he likes to add the qualification 'developer & hobbyist', Florent always keeps his sol- dering iron within handy reach. 46 elektor electronics - 10/2005 Lichfield Online Shop: www.LichfieldElectronics.co.uk Line Tracking Mouse Using three IR Photo interrupters this mouse will follow a black line using sight alone. £24.99 I Hi Infrared Remote Control Kit ** sg ' A kit that plays music on command sent by infrared. “ ' Could be used to control other devices. £14.99 Metal Detector Kit Find out how a metal detector works with this simple to assemble kit. £9.99 10 LED flasher Using 2 transistors, 2 capacitors and 6 Resistors this kit generates an eye catching display. Lots More Kits Available. stors this £4.99 = Components Resistors: CR25 & 0805 (All values) CR12, MR25 (Popular values) Capacitors: Electrolic, Polyester, Mylar & Ceramic. (Radial) And More: DC Regulators, 74 & 4K logic, transistors, sockets. Nixie tubes, etc. m A small selection of the tools we sell. Aoyue 909 with temperature controlled iron, Hot air gun and 0-15V 1.5 A PSU. £99.99 Aoyue 936 temperature controlled 35 W soldering iron comes with stand. (200C - 480C) £24.99 Aoyue 398 0-1 5V 1.5 A PSU & Work station. £28 Open:9 am - 5 pm Mon-Sat Tel: (01543) 256684 The Corn Exchange, Conduit St, Lichfield, Staffs. WS13 6JU Our range provides:- • The fastest 68000 based Core up to 66 Mhz. • Extensive I/O:- Serial, IrDA, SPI, l 2 C, Analogue, Timers/Counters, RTC, etc. • Large Memory Capacity: Flash, SRAM, DRAM. •Supports:- Mono & Colour LCD's, Touch Panels & Keypads, Very Low Power. DEVELOPMENT ■ Target easily & quickly. ■I Full ANSI ‘C’ compiler, assembler & linker all Windows32 based. ■J m Source Level Debug. ■ Full Driver Support with Libraries. r Real Time Multitasking OS with a free run time licence. i FREE Unlimited email support. www. cms. uk. com see our web site for full details CAMBRIDGE MICROPROCESSOR SYSTEMS LTD Unit 17-18 Zone 'D' Chelmsford Rd. Ind. Est. Great Dunmow, Essex CM6 1XG Telephone: 01371 875644 email: sales@cms.uk.com 10/2005 - elektor electronics CO Electronic Engineers Part 8: the Delphi Stamp Detlef Overbeek, Anton Vogelaar and Siegfried Zuhr With the summer holidays behind us, it's time for most people to get back to work so this Delphi course goes back into full swing as well. This month we take a look at the Delphi Stamp, a universal hardware controller with an onboard BIOS. This controller can function on a stand-alone basis or it can be controlled via a PC. It has several standard hardware interfaces and it is of course possible to add your own interface to the module. The Delphi Stamp is a fast and universal miniature plug-in controller with a large amount of memory and many input and output capabilities. The firmware is developed in Delphi. The onboard BIOS is used to run this on a stand-alone basis in the Delphi Stamp. It is also possible for an application on a PC, written in Delphi, to control another application that runs on the Delphi Stamp. The ATMegal 28 used here is a RISC processor with a clock frequency of 14.7456 MHz. Most of its instructions are executed in a single clock cycle (about 68 ns). The program code is stored in Flash memory. Since the instructions, with the exception of JMP, LDS and STS, occupy two bytes, it is possible to store up to around 60,000 assembler instructions in the Flash memory. The final 8 kB is protected and contains the BIOS. The BIOS consists of four modules: the loader, the M485 server, the resident drivers and the interface server (see Figure 1). The loader is used to receive the object code via the RS232 link and store it into the Flash memory. The communications between the Delphi Stamp and PC use the M485 protocol. The loader is part of the M485 server. This server can be used to inspect the RAM, Flash, EEPROM, registers and I/O registers, which is very use- ful during the debugging of programs. The server is also used to communicate with an external GUI (Graphical User Interface). The resident drivers take care of the onboard LEDs and jumpers, a 16-character display, a bipolar stepper motor, a push button, seven LEDs in a dice configuration and a potentiometer. The interface server also makes use of the resident drivers. This interface server makes sure that the state of the connected hardware corresponds to the state specified in a data record in RAM. This process happens 20 times per second. There is a DLL available that can be used by a Delphi application to communicate with this record (M485.dll). In this way the Delphi Stamp can be used as an interface. 48 elektor electronics - 10/2005 Figure 1. Structure of the different functional units inside the Delphi Stamp. Hardware configurations To make it easier to start using the Delphi Stamp we have designed standard hardware configurations for each of the I/O capabilities (see Figure 2). As long as compatible external hardware is connected, you can make use of the interface server, the standard drivers and an I/O test program. Specifications • ATMegal 28: 1 28 kB Flash — 4 kB RAM — 4 kB EEPROM - 4 timers - 1 0 bit AD-converter with 1 5 ksamples/sec - Analogue comparator - Sleep mode - 2 UARTS for RS232 and RS485 - l 2 C - 25 digital inputs/outputs - JTAG and ISP interface • Supply voltage 6-9 VDC (onboard regulator; not suitable for powering external loads) • Current consumption in sleep mode: 1 0 mA • Digital I/O specs: 30 mA source @ 1 V drop, 40 mA sink @ 1 V drop • The data sheet is at www.atmel.com/dyn/resources/prod_documents/doc2467.pdf • A document that gives detailed descriptions of all instructions can be found at: www.atmel.com / dyn / resources / prod documents / doc0856.pdf Figure 2. The different I/O capabilities of the Delphi Stamp. With the help of the standard drivers it is easy to interface to this hardware. 10/2005 - elektor electronics 49 Figure 3. PDemo.prj is the container with all files that are in the Delphi simulation project. For example, you can connect a bipolar stepper motor having 1 .8° steps and use it in half-step mode (giving 400 steps per revolution). You can also read the position of a potentiometer (voltage between 0 and 2.56 V) and 7 LEDs can be driven. The RS485 connection can be used to implement a network with a maximum cable length of 1000 metres, which can have a maximum of 1 28 devices connected to it. An LC display (LCD) can be attached with a 1 6-character display. Delphi Stamp as a controller When the Delphi Stamp is used as a controller there is normally no link to the PC. To be certain that the con- troller works reliably it is a good idea to develop and simulate the controller software on a PC first. A Delphi form with visual components emulates the external hard- ware. All driver routines are written in separate units. When the simulation works satisfactorily the driver units are converted by the cross-compiler PosAvr into a binary hex file, which contains the object code for the Delphi Stamp. The program Mon485, included with the Delphi Stamp kit, writes this hex file into the Flash memory of the Delphi Stamp, after which the program is started. The controller now functions independently and the link to the PC is no longer required. Simulation PDemo.prj is de container for all files in the Delphi simu- lation project (see Figure 3). DMain.pas is a data module and can only include non- visual components such as the TTimer. This module simu- lates the power-on vector and other interrupts through the use of Delphi events. FGUl.pos is of type TForm, which can contain visual com- ponents. These visual components replace the external hardware of the controller, such as switches, LEDs, LCD, motor, etc. UDrivers.pos contains the drivers to control FGUl.pas. UControl.pos contains the driver routines and is compati- ble with the PasAvr cross compiler. Cross-compilation and uploading Demo.prj is de container file for the remaining files in the demo controller project for the Delphi Stamp (see Figure 4). UMain.pas contains the power-on code and all interrupt vectors. This unit is identical in virtually all Delphi Stamp applications and is included as a template with the kit. Drivers. pos is functionally the same as UDrivers.pas, which we used in the simulation program. However, the implementation is different since it now has to drive real hardware. For the standard hardware you can use the resident drivers from the BIOS. UControl.pos holds the functionality for the controller and is copied from UControl.pas from the simulator. PasAvr is the cross compiler included with the kit. PasAvr.exe converts the project Demo.prj to the file Demo. hex. The program has no restrictions in how long it can be used for or in the size of the generated hex file. PasAvr has its own IDE and simulator for writing pro- grams in Pascal and Assembler outside of Delphi. Demo. hex contains the generated object code for the ATMegal28 controller in Intel-hex format. The monitor program Mon485 is used to communicate with the loader on the Delphi Stamp. This takes care of programming the received object code into the Flash memory. The Delphi Stamp program can be started using Mon485 or by resetting the Delphi Stamp. Delphi Stamp as interface We start by describing the different parts of this project. To control a stepper motor we need a form on the PC that Figure 4. Demo.prj is the container file for the rest of the files in the demo controller project. 50 elektor electronics - 10/2005 functions as a console. The motor is connected to the Del- phi Stamp via a driver. There is a slider control on the form that is used to set the angle of the motor from 0 to 360 degrees, as well as three buttons that are used to quickly set the position to 0, 1 80 or 360 degrees. There is also an LCD connected to the Delphi Stamp, which dis- plays the angle. The control programs runs on the PC and is written in Delphi. An interface server runs on the Delphi Stamp that synchronises the connected hardware with the parame- ters sent to the Delphi Stamp by the PC. To reduce the possibility of errors in complex programs it is recommended that they are split up into smaller, logical blocks. Delphi has several different types of module, which are the unit, library, form, and data module. The Delphi project Plnfl .dpr is divided into five parts (see Figure 5). - The data module DMain.pas is, apart from a unit in its own right, also a container for non-visual components, such as timers. This data module provides a power-on event and a timer, which transmits updated information to the Delphi Stamp every 200 ms. - The form UCUl.pas is a unit that can contain visual components. This form has a slider TTrackBar and three TButtons. The buttons are combined with the slider to quickly go to an angle of 0, 1 80 or 360 degrees. - The unit UControl.pos holds the functionality of the application. The procedure Controllnit initialises all hard- ware at power-on. The procedure Control Exe refreshes the interface server on the Delphi Stamp every 200 ms. For communications with the Delphi Stamp and the GUI we use the drivers in unit UDrivers.pas. - The unit UDrivers.pas holds the basic driver routines for the GUI and the Delphi Stamp. Since this unit is rarely modified it lends itself to reuse in many applications. The CDROM included with the kit contains a standard unit for communicating with all standard hardware. Figure 5. The Delphi project Plnfl. dpr consists of five parts. - M485.DLL is a library unit that can also be used by other applications. This library is supplied with the kit and contains the software for the communications with the Delphi Stamp. It uses an RS232 port on the PC. Implementation in Delphi As usual, we start a new project from the Delphi IDE via: File->New-> Application and we save it on the hard drive by: File->Save->all UGUl.pas and Plnfl .dpr Place the following on the form: Standard I label Win32 I Trackbar Standard I Button (three times) Figure 6. We add a Label, a Trackbar and three Buttons to the form Figure 7. Using the Object Inspector we change the properties according to Table 1 . Table 1 . Properties of the form for the interface with the potentiometer. Object Property Value Notes Forml Name FGUI Use descriptive names Caption Demo #1 Labell Name LbPos Caption 0.0 Font.Size 18 Text height is 18 pixels Font.Style.fsBold True Bold text Font.Color dRed Red font colour Trackbar! Name TbrPos Max 400 ! revolution has 400 steps Frequency 10 Scale divisions are every 10 steps Button! Name BtnO Caption 0 Button2 Name Btnl 80 Caption 180 Tag 200 1 80 degrees are 200 steps Button3 Name Btn360 Caption 360 Tag 400 360 degrees are 400 steps 10/2005 - elektor electronics 51 The form now looks like the one in Figure 6. Using the object inspector we change the properties as shown in Table 1 . The form should now look like the one in Figure 7. The OnClick event of BtnO has to be implemented next. The OnClick events of Btnl 80 and Btn360 are the same as that of BtnO. In the Object Inspector of Btnl 80 and Btn360 we can choose BtnOClick from the dropdown list of the OnClick event. In the OnClick event the slider is set to the value of Tag, which is either 0, 200 or 400. Procedure TFGUI . BtnOClick (Sender : TObject); (* User setting to 0, 180 or 360 degrees *) Begin TbrPos . Position := (Sender As TComponent ) . Tag ; Ref reshLabel End; The Format function is used to show the angle of the step- per motor on the label component. The format-string '%. 1 P specifies that the result has a fixed single decimal place. The value to be show is between the right-angled brackets [...]. The calculation "* 360/400" converts the motor steps into degrees. Procedure TFGUI . Ref reshLabel ; (* Update position label conform trackbar position *) Begin LbPos . Caption := Format ('%.lf', [TbrPos . Position * 360 / 400]) End; The Data Module UMain implements the power-on event as soon as DMain is created. The On T/mer event should call the procedure ControlExe once every 200 ms. This is done by setting the Interval property of Timerl to 200. The unit UDrivers takes care of the basic communications between the user interface and the hardware. The func- tion GetSetpoint returns the position of the slider in UGUI in units of motor steps. Function GetSetpoint : Integer; (* Provide slider position from UGUI *) Begin Result := FGUI . TbrPos . Position; End; The procedure lolnit creates a connection with the Delphi Stamp. There can be circumstances where this can fail, for example if there is no Com port or if it is already used by another process. The Try ... Except construction traps this exception, shows an error message and halts the pro- gram. Procedure lolnit; (* Energize stepper motor and clear LCD *) Begin Try DS485_Open (ComPort); // Open a con- nection with the Delphi Stamp Except ShowMessage ('Error. Unable to connect to Delphi Stamp'); Application . Terminate End; InfDta.MotorSts := $81; // Energize motor DS485_Wr (1, Word ( @PInfDta.MotorSts ) , InfDta.MotorSts ) End; The 1 6-character LCD consists of two 8-character lines, which are mounted next to each other. These two 8-char- acter lines are sent separately to the interface server. The lines are only sent when their contents have changed. This is checked for by the statement SLcd <> LcdStrl (2) in the code below. Begin SLcd := LeftStr (S, 8); // Left half of S If SLcd <> LcdStrl Then // If left sec- tion changed Begin LcdStrl := SLcd; LcdStrl [0] := Char (Byte (LcdStrl [0]) Or $80); // Set write request DS485_Wr (9, Word ( @PInfDta . LcdStrl ) , Inf Dta. LcdStrl [ 0 ] ) ; LcdSl := SLcd; End; SLcd := RightStr (S, 8); // Right half of S If SLcd <> LcdStr2 Then // If right sec- tion changed Begin LcdStr2 := SLcd; LcdStr2 [0] := Char (Byte (LcdStr2 [0]) Or $80); // Set write request DS485_Wr (9, Word ( @PInf Dta . LcdStr2 ) , Inf Dta . LcdStr2 ) ; LcdS2 := SLcd End; End The unit UControl contains the functionality of the pro- gram. After this program has been compiled, the Delphi Stamp is reset using the onboard switches and the inter- face server is started. Once the program has started the stepper motor can be controlled. Other applications During the design of a prototype of a controller the con- struction of an instrument panel takes up a lot of time. This involves a number of mechanical operations, such as drilling and deburring the mounting holes for meters, switches, lights, etc. There is an easier alternative, how- ever: the design of a console as a GUI (Graphical User Interface) in Delphi. Usually the same GUI from the previ- ously built simulator can be used. By starting the M485 server in the firmware, as we did in 'Delphi Stamp as a controller', we can inspect and mod- ify all memory locations via the RS232 port and the M485.dll library. With these facilities it isn't difficult to implement a remotely controlled application. The connection between the PC with the console applica- tion and the controller can be made wireless through the use of RS232 radio modules. More information on the Delphi Stamp may be found at www.vogelaar-electronics.com and www.learningdelphi.info. All source code can be down- loaded free of charge from the publishers website: http:// www.elektor-electronics.co.uk/. ( 040240 - 7 ) 52 elektor electronics - 10/2005 DON'T LOSE YOUR TEMPER Before phoning us - if you are looking for a hard-to-find part. We have over 20,000 items in stock - including obsolete and up-to-date parts. WHY NOT VISIT OUR WEBSITE www.cricklewoodelectronics.com 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 BFT BFX BFY BLY BLX BS BR BRX BRY BS BSS BSV BSW BSX BT BTABTB BRWBU BUK BUT BUV BUW BUX BUY BUZ CA CD CX CXA DAC DG DM DS DTA DTC GL GM HA HCF HD HEF ICL ICM IRF J KA RIAL LA LB LC LD LF LM M M5M MA MAB MAX MB MC MDAJ MJE MJF MM MN MPS MPSA MPSH MPSU MRF NJM NE OM OP PA PAL PIC PN RC S SAA 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 TIPL TEA TL TLC TMP TMS TPU U UA UAA UC UDN ULN UM UPA UPC UPD VNXXRZZN ZTX + many others We accept Mail, telephone & email orders. Callers welcome. Opening hours Mon-Sat 9:30 - 6:00 Connect L J Cricklewood Electronics Ltd 40-42 Cricklewood Broadway London NW2 3ET Tel: 020 8452 0161 Fax: 020 8208 1441 sales @ cricklewoodelectronics.com A y/F&searcti USB has never been so simple. USB to TIL Serin! Cable * &rnp« tfH? w-Sy to firve USB wjpptiil to ywr » C■1 mr teLLfcA iH| i A 1 iij» . j- • >i i me i j j ■ h»J- III huLTHl W hnrM-l 1 i 5r a i» t% buii n? 1 ui.tiuv-i M i a. Ui ! 7 La l |2I. hpjvi r 4 VL buiL “ J i ■ 5 i 1 * ■ ■ PL t"Jii ifl UV bull -4 j -E 1 L 1. Im‘1'1 i«i -“j f DL fim L L KLU ODFMA frame structure. The operation in the uplink is similar to that of the downlink. The base station dictates to each terminal in which location (in terms of OFDMA symbol numbers and subchannels) it is allowed to start a transmission, together with the modulation method to be used. From the physical layer point of view, a number of actual payload bytes transmitted in a burst is given by the size of the burst (in terms of subchannels and OFDMA symbols) and by the encoding type (which fixes the amount of redundant information added to the payload before transmission). 6) sectors, providing GbE and optional TDM interfaces towards the network carrying data and voice traffic with optional uplink QoS in the form of MPLS or DiffServ. Second, in a single sector base station, the MAC CS and MAC CPS can be run on the same physical device in order to keep the cost low. To push the demands even further in the low end: from a technical perspective, it is possible to re-use the base sta- tion design for development of high end customer prem- ises equipment — such as super access points — which require a low-cost, low-power and highly integrated sili- con solution that provides flexibility to add new features and functions through field software upgrades as market demands dictate in the future. ( 050131 - 1 ) Wim Rouwet, (Freescale Semiconductor) wim.rouwet@freescale.com 62 elektor electronics - 10/2005 lectromcs Microcontroller Basics Burkhard Kainka Microcontroller Basics ISBN 0-905705-67-X 230 Pages £18.70 / US$ 33.70 Microcontrollers have become an indispensable part of modern electronics. They make things possible that vastly exceed what could be done previously. Innumerable applications show that almost nothing is impossible. There’s thus every reason to learn more about them, but that raises the question of where to find a good introduction to this fascinating technology. The answer is easy: this Microcontroller Basics book, combined with the 89S8252 Flash Board project published by Elektor Electronics. This book clearly explains the technology using various microcontroller circuits and programs written in several different programming languages. In the course of the book, the reader gradually develops increased competence in converting his or her ideas into microcontroller circuitry. Step into the fascinating world of microcontrollers Order now using the Order Form in the Readers Services section in this issue. Elektor Electronics (Publishing) P.O. Box 190 Tunbridge Wells TN5 7WY England Telephone +44 (0) 1580 200 657 Fax +44 (0) 1580 200 616 See also www.elektor-electronics.co.uk Step into the fascinating world of micro- controllers with the Elektor Electronics Flash Microcontroller Starter Kit. Order now the ready-assembled PCB incl. software, cable, adapter & related articles. Step into the fascinating world of microcontrollers Order now using the Order Form in the Readers Services section in this issue. Contents of Starter Kit: • 89S8252 Flash Microcontroller board (ready-assembled and tested PCB) • 300-mA mains adapter • Serial cable for COM port • Software bundle on CD-ROM •Article compilation on CD-ROM Elektor Electronics (Publishing) P.O. Box 190 Tunbridge Wells TN5 7WY England Telephone +44 (0) 1580 200 657 Fax +44 (0) 1580 200 616 See also www.elektor-electronics.co.uk leading the way lectromcs £69.00 /US$112.50 (plus postage) Flash Microcontroller Starter Kit Elektor Hardware & Software 10/2005 - elektor electronics 63 TECHNOLOGY RFID The TIRIS family of RFIDs from Texas Instruments can be found in many consumer applications ranging from vehicle security to logging marathon runner times. The two simple designs described here are able to read these passive RF tags whilst using the absolute minimum of hardware. There is already an enormous market for contact-less Radio Frequency Iden- tification (RFID) tags. One of the mar- ket leaders is the Texas Instruments Registration and Identification System (TIRIS). Each tag is a transponder i.e. a reader unit in close proximity trans- mits a signal to the tag and it responds by sending back a signal containing its unique identification code. The RFIDs that we have used here are encapsu- lated passive mini tags available in many different outlines ranging from a chip card to a pet ID implant. A small selection of the devices can be seen in 64 elektor electronics - 10/2005 Figure 1. The author would like to thank Texas Instruments for supplying the components. The purpose of our original investigation was to build a device that could read the low fre- quency (134.2 kHz) TIRIS family of tags while using the minimum possible hardware outlay (and hence cost). The two circuits described here are the results of this investigation. A circuit for minimalists: A System on a Chip The first reader circuit shown in Figure 2 is about as simple as it gets and con- sists of little more than a microcon- troller together with a transmit/receive coil. The coil connections to the micro- controller in Figure 3 make use of the input/output programmability of the port pins. The reader software initially configures the pins to output mode and then drives the coil at 134.2 kHz to ‘charge up’ any tags within range. After this charging period the pins are switched to high impedance mode, effectively disconnecting them from the coil. The coil is now in receive mode and picks-up any return signal from a tag in range. The signal passes to an on-board analogue comparator with resistors R2 and R3 providing the DC reference voltage. Capacitor Cl performs low pass filtering. The trade-off for this minimal hardware approach is that the software has more work to do and is correspondingly more complex. An overview of all the software routines is shown in Figure 5. Transmitting and receiving The microcontroller uses a 12 MHz crystal oscillator. The charging signal sent to the RFID is a alternating field at a frequency of 134.2 kHz and this cannot be divided down from the 12 MHz microcontroller clock very eas- ily. A ‘software oscillator’ technique is borrowed from the field of Direct Digital Synthesis (DDS) whereby a clock is produced by counting alternatively 89 and 90 periods of the 12 MHz source so that we arrive at an average division factor of 89.418. . . The spectral purity of the resultant signal is sufficient to ensure good energy transfer to the tag. When sufficient charge has been stored in the tag reservoir capacitor a stream of data is transmitted contain- ing a identity ‘key’ unique to the tag. The digital information is sent using frequency modulation where 134.2 kHz represents a ‘0’ and 123.2 kHz a T. Figure 1. TIRIS tags come in many variants. +5V © R3 LI: 75 turns 0.25 mm ECW 40 mm ins. dia. aprox. 400|xH LI R1 100 Q Cl In 19 18 _ 17_ 16 _ 15 _ 14_ 13 12 ^ToOn 20 @ nRST PB7 PDO PB6 IC1 PD1 PB5 PD2 PB4 PD3 PB3 PD4 PB2 PD5 PB1 PD6 PB0 AT90S1 200 JL XTAL1 XTAL2 R2 10 C2 XI I I 22^ IT* " C3 XI = 12MHz ^22p D1 R4 R5 _9 11 to SUB D9 050174-11 Figure 2. The simplest TIRIS reader. Each bit length occupies 16 periods of the modulation frequency. The signal is picked up by the reader coil and fed to an internal comparator to generate an interrupt for each period of the sig- nal. An internal counter is then used to measure the time between each inter- rupt. Measurements from several peri- ods are then averaged to provide some low pass filtering. For the purposes of testing these counter values are also Figure 3. Bi-directional coil to microcomputer connections. 10/2005 - elektor electronics 65 TECHNOLOGY RFID upper trace shows the RF field detected by a test coil placed close to the transponder. The (delayed) trigger point is chosen when the reader stops sending its ‘charging’ signal on the left of the screen after this point we see the modulated tag signal which has a characteristic diminishing amplitude, reducing as the stored energy is used up. The lower trace shows the recov- ered data from this signal. Each bit read in the interrupt routine after the valid START bits is reassembled into bytes and stored. A TIRIS tag sends eight bytes of data followed by a two- byte checksum or CRC (Cyclic Redun- dancy Check). The checksum is veri- fied by software along with the termi- Figure 4. Layout of the minimal version. output on the highest six bits of port B of the processor. It is a simple job to connect a D/A converter to these pins and display the resulting analogue out- put signal on an oscilloscope. This pro- vides a convenient and useful indica- tion of the proper function of the receiver as shown in Figure 6. The interrupt routine comparator Interrupt main program L read timer period length Timer = 0 I progressive average of 4 values generate bit clock BITs i analogue output 050174 - 13 interrupts off generate j TX frequency | i interrupts on wait for I synchronisation j detect I START byte \ 1 collect 1 8 data bytes [ collect 1 2 CRC bytes | ♦ test 1 STOP bit f I CRC check | error drive OK LED output serial data t Figure 5. The software structure. Figure 6. The RF signal and recovered data. nating STOP byte. If no error is detected the OK LED lights and the receive data is sent out from the RS232 port at a rate of 9600 bits/s. If an error is detected the OK LED remains off and a question mark character is sent out from the RS232 port. With all the functions built into the software this basic reader circuit is a good starting point for many useful applications but the tag needs to be quite close to the reader to ensure reli- able reading. If more range is required then a slightly more sophisticated cir- cuit is necessary. Boosting the range The minimalist circuit diagram has been expanded slightly (Figure 7) to incorporate a better coil driver stage together with a signal amplifier in the receive path. The coil switching config- uration is shown in Figure 8. When the reader transmits, transis- tors T1 and T2 operate in push-pull mode to drive the series resonant cir- cuit formed by Cl and LI. The circuit has a Q (quality) factor of around 10 and is defined largely by the ON impedance of the P-channel BS250 66 elektor electronics - 10/2005 C7 In R8 T +5V © © IC2 © R3 <» 1 □ ^ IC2 = NE5532 R9 ~ <10k I — R6 — OE i9 _ i8 _ 17_ 16 _ 15_ 14_ 13 12 ICS I- f D1 20 1 @ nRST PB7 PD0 PB6 IC1 PD1 PB5 PD2 PB4 PD3 PB3 PD4 PB2 PD5 PB1 PD6 PB0 AT90S1 200 JL XTAL1 XTAL2 R2 10 C4 XI 1^1 K1 _9 11 C3 R5 {k. 22 T T 2p ~ ^ X1=12MHz 1 2 O J 7 r\ 3_ 8 pi 4 9 r\ 5 -Pi SUB D9 +5V © D2 5k BAT43 R1 -EH +5V LI: © 20 turns 0.5 mm ECW |j2 100 mm ins. dia. aprox. 90(iH f ^ T Clb 1-1 C2 HI In D3 BAT43 Cla II BS250 see text ! I BS170 050174-14 Figure 7. A driver stage and receive amplifier boost the range. MOSFET. In receive mode T1 conducts and the coil now becomes part of a parallel resonant circuit tuned to the receive frequency. The received signal is amplified through the dual op amp IC2. During transmit with the coil in resonance the signal level can reach 100 V so it is important to add protec- tion (Schottky diodes D2 and D3) to ensure that this signal does not go beyond the op amp supply rails and destroy the input stage. This circuit easily achieves a range of about 15 cm. It is important to ensure that the capacitors Cla and Clb are chosen so that the circuit is in reso- nance at 130 kHz. In the prototype a combined capacitance (Cla + Clb) of 1.6 nF was optimal but it depends on the coil properties so you may need to adjust this value to achieve best results. There is a good opportunity here to experiment with different coils to try to improve the range. Coils wound on ferrite rod also produce good results. Applications All the software source code for this project is freely available and can be modified or adapted to suit any appli- cation that you have in mind. The files TIRIS1.ASM and TIRIS2.ASM for the ATMEL AVR assembler are available free of charge from the Elektor Elec- tronics website at www.elektor-elec- tronics.co.uk; look for file number 050174-11. zip under month of publica- tion. A list of distributors of TIRIS com- ponents is available from www.ti.com/tiris/docs/ customerSer vice/distributors . shtml Code lock The reader circuit can be easily adapted to operate as a door entry sys- tem. The reader LED indicator can be replaced by a relay (with diode protec- tion across the coil and possibly with an additional transistor driver). The relay can now be used to energise a standard electric strike mechanism to release a door latch. Additional secu- rity will be provided if the short-range reader is used and the reader coil is hidden behind a non-conductive panel near the door entrance. It will not be obvious to the uninitiated how the door can be opened or where the elec- tronic reader is situated. The reader software can be modified so that it will only respond to an indi- vidual or group of TIRIS tags. In this case the ID code of each tag will need to be known before hand or alterna- tively the reader will require a ‘Teach-in’ mode to record the tag signature dur- ing system set-up. Computer security Both circuits shown in this article can form the basis of a PC security device to prevent unauthorised access. With the RS232 port connected to a PC or microcontroller serial port, software routines can be written that use the tag identity information to grant or block access to the computer. Addi- tional security measures will be neces- sary to fully secure both the hardware and software and prevent hacking. Home security The simplicity of this design means that several reader units can be built quite cheaply to control entry points around the house with outputs fed back to a central controlling PC or microcontroller where each door latch can be activated and provide access control. ( 050174 - 1 ) Figure 8. Resonant circuit coil switching. 10/2005 - elektor electronics 67 HANDS-ON This system was designed to eradicate the anarchy that reigned on a school's computers. Conventional password protection could not be utilized and the old key lock was too easily tampered with and bypassed. Highly objectionable information was being downloaded from the Internet and files being deleted all the time. To no avail, the guilty party was always conveniently dead or in hyperspace! A failsafe physical lock was urgently needed with total control and hence the Flash PC Lock was born! The PC Flash Lock device should have a lot of applications. For example, the author implemented this lock at a friend’s Internet cafe. Also, a small software company employs this versa- tile lock together with an OCX incorpo- rated into their software to prevent pirating and multiple software instal- lations. The author himself employs it on his PC’s to prevent his children from giving him heart failure when they “accidentally” destroy valuable source code. The software controlling the Flash Lock is a resident utility, hiding in the root of the operating system and waking up on startup. It also interfaces with the Flash Lock hardware via the serial port, exchanging data every sec- ond. For the person that is fanatical about security of his or her files, this is a cost effective solution. After an error, the system will shut- down (if that option was selected) allowing you 60 seconds to attempt to solve the problem. Instead of shutting your PC down, you can merely remove the Flash Lock. The device works on Windows XP machines only. How does it work? By using your computer, an open serial port and the Flash Lock software, writ- ten with Visual Basic 6 there are vari- ous options at your disposal. The circuit is very basic and will fit into a standard 9-pin serial port plas- tic housing. A hole can be made in the plastic housing and the Flash Lock fit- ted to a key ring. As you may have guessed at this point, the power behind the circuit is the software. Hardly hardware The circuit diagram of the PC Flash Lock, Figure 1, is down to a micro- processor, some passive parts and diodes. The supply voltage to the microprocessor is limited to about 5.6 V by zener diode D2. As the RS232 port is specified to supply an internally limited maximum 20 mA of line cur- rent, no series resistor is required to keep the zener diode and the (PIC) from harm. The other diode in the cir- cuit, Dl, prevents the PIC supply volt- age from becoming negative. The PIC I/O pins being used by the software are protected by 1-kfl resistors. Admit- tedly that’s close to what a PIC can take for abuse but then the circuit has toe remain as simple and cheap as possible. Knowing from the PIC datasheets that the pins can sink or source up to 20 mA each, we get 12 V/1,000 Q = 12 mA under worst case conditions so it’s cheeky but still within spec. This excess current will flow from the Vdd or the GND pin, the zener diode acting as a sink. The oscillator inside the PIC16F628A- SO chip operates at the frequency gov- erned by an external 4-MHz ceramic resonator, XI. Construction — wick it! The tiny printed circuit board designed for the Flash Lock is shown in Figure 2. With some force and possibly some strong words it can be pushed between the pins of a 9-way sub-D socket (yes that’s the female version). Check if the case fits around the tiny board and if necessary trim the sides by filing. If you hate SMDs, you should know that the PIC chip also exists in a DIP case, hence the circuit may also be built on a piece of veroboard. You will, however, have a hard time fitting the lot in a 9-way sub-D connector shell. A lot has been said and written on the subject of soldering SMD parts and some advice is repeated here for the benefit of beginners. Absolute requirements for success in the SMD department include good quality tools, a clean desk and a steady 68 elektor electronics - 10/2005 I- |~R 5 DSR RXD RTS 5V6 0W5 CD R4 TXD 8 CTS DTR 22k Ik 22k R1 R3 R2 GND D1 X 1N4148 +5V © 17 18 14 © MCLR RBO IC1 RBI RB2 RAO RB3 RA1 RB4 PIC16F628 RA2 A-SO RB5 RA3 RB6 RA4 RB7 OSC1 OSC2 16 XI hUh 15 ft' 4MHz 050107-11 6 _ 7_ _ 8 _ _9_ j_o ii_ 11 13 1 Figure 1. What, it's that simple? Circuit diagram of the PC Flash Lock. hand. We’ll shortlist some more aspects below. Use a low-power solder iron with a tip diameter of 1 mm maximum. Alter- natively, use a larger tip and wind 1- mm solid copper wire around it. • The same applies to the solder tin — use the thinnest you can get — 0.6 mm or 0.5 mm is recommended. Precision tweezers from specialised pharmacists — much smaller and accurate than the ‘pair of tongues’ you normally get at Woolworth’s. Desoldering braid (a.k.a. wick), if necessary with it its suction power boosted by a bit of colophonium. • Fit the 0805-case components by first generously tinning one PCB pad. Using the tweezers and the solder iron, position the part and secure one end by pushing it into the solder. No extra tin is required at this point. Next, sol- der the other end. If necessary, reflow the solder at the first end. The IC is first aligned on its foot- print, then secured by soldering one corner pin. Check the alignment of the other pins. If ok, solder the pin at the other side of the chip, and so on. Do not panic if adjacent pins get intercon- nected by excess solder — remove the solder by applying a length of fresh wick. Finally, inspect your work using a mag- nifying glass. Tell your friends about it. The software The simplicity of the PC Flash Lock hardware belies the sheer power and complexity of the associated software developed by the author. Figure 2. Copper track layout and component mounting plan of the miniature PCB designed for the PC Code Lock. 10/2005 - elektor electronics 69 HANDS-ON MINI PROJECT Figure 3. The first option in the PC software (device manager) allows you to read or change your username and password. This password is written to the EEPROM using "write to device". Figure 4. The fourth option (application manager) allows you to manage individual rights. The fourth option (application manager) allows you to manage individual rights. Figure 5. After software installation, the Elektor Toolbar will be installed in the top of the screen. Left or right clicking on the icon will display the Accounts menu. The complete Software Guide available for this project comes as a free down- load (no. 050107-12.zip). It is 21 pages in all, and comprehensive by any stan- dard, covering not only everyday use COMPONENTS LIST Resistors: (all SMD, 5%, case shape 0805) Rl,R2 = 22kD R3,R4,R5 = lkft Semiconductors: D 1 = 1 N41 48, SMD, case shape 0805 D2 = zener diode 5.6V 500mW, SMD, MiniMelf case IC1 = PIC1 6F628A-I/SO, SOI 8 case, programmed, Publishers order code 050107-41 * Miscellaneous: K1 = 9-way sub-D socket (female), straight pins 9-way sub-D connector shell case PCB, ref. 050107-1 from The PCBShop CD-ROM, PIC source and hex code files, PC resident software, Publishers order code 050107-81 * or free download (approx. 20 MB) Flash PC Lock Software Guide, free download # 050107-12.zip * See Elektor SHOP pages or www.elektor-electronics.co.uk but also advanced items like URL his- tory storage and File Encryption. The Software Guide comes as a page- indexed Word document. What’s conveniently called ‘software’ here actually consists of two compo- nents: (1) PIC -resident software and (2) PC-resident software. The PIC software is available as an .asm or .hex file. Provided you have a programmer for SOIC PICs you can burn your own device at home or at school. If not, you will have to rely on our Readers Services by ordering a ready-programmed PIC (order code 050107-41. The PIC configuration bits, so often a source of confusion to our readers, are given in the inset. This software allows the PC to check, at 1- second intervals, for the presence of the Flash Lock dongle, or, more accu- rately, for the right code in the PIC’s EEPROM memory. The PC software is a massive 20 MB of tools and an installation program sup- plied on a CD-ROM, order code 050107-81. Alternatively, if you’re on broadband Internet, the PC software may also be downloaded from our website. An impression of the PC Flash Lock software in action is given by Figures 3, 4 and 5. As you can see, there are lots of options to enable you to adapt this project to your specific needs. Once installed on the PC, the resident Flash Lock utility will display a small, semi-transparent toolbar at the top of the screen. This will give access to all functions including accounts manage- ment and passwords. The software has a 10-digit ASCII password, 10-digit user name, 10-digit guest password and a 2 0-digit password hint. The dongle may be plugged into the COM1 or COM2 RS232 serial port on your PC and is automatically found by the software. In some cases, however, you will need to use the ‘scan ports’ option to locate the RS232 port with the dongle on it. The program provides a one-time offer to create a rescue disk and produce hard copy of essential data. Famous last words Finally, a word of caution: we sincerely recommend installing and using the Flash Lock device and control software on a ‘scrap’ Windows XP PC that’s not essential to serious work. By no means install the device on a PC that’s required for daily use, as even a small mistake in the PC Lock configuration will permanently bar you from access to all your files and programs! Yes, it happened to us while engineering this project towards publication. Fore- warned is forearmed! ( 050107 - 1 ) PIC bit options The PIC1 6F628A-SO to be used in this project needs to have its configuration bits programmed as shown below. 0 FOSCO: 1 xt oscillator 1 F0SC1 0 xt oscillator 2 WDTE 0 watchdog disabled 3 PWRTE/ 0 powerup timer enabled 4 F0SC2 0 xt oscillator 5 MCLRE 0 memory prot off 6 BOREN 1 brownout enabled 7 LVP 1 low voltage program enabled 8 CPD/ 1 data memory protection off 9 10 11 12 13 CP/ 1 code memory protection off 70 elektor electronics - 10/2005 Quasar ESecI ran ics Limited! PO So* 6935. Bithops StortRwd CM23 4WP, Untied Kingdom Teh WJO 246 192S Fa t: CKSTO 4«Q 1G45 E-maiEl sa3eB@q ua sa retectronics .cChTi Web: WWw. Qu a SOI E te£( rd [iitfi.Cum Postage £ Packing Options (Up ic 2Kg g~DG& weigh:) UK Standard 3-7 Day Delivery -£3 95 UK Mainland Next Day Deli wry- £fc *5 Europe (£U]-£4&5 Rest cf World - CB.9S A «t V m M W* accept aH mojor smetirtfdebii cards, Mnke ctaques/PO's pmaHv 10- Quasar Electronic*, Pritvt lucludo 17.3% VAT. Cal now for our free catalogue with dibits qFowt 3qd kits, projects, nxdufies add publications. Discounts for bulk quantities, QUASAR electron ics 0871 CREDIT CARD SALES 1 7 Motor Dnvi*rVfConlPollvrv Here ere just s few of our controller and driver mnduEe* far AC. DC. unipolurfittpolar a'epper inaiof& and servo motors. See we base for foil Mala **€¥& Bidirectional DC Motor Controller * Controls the speed of most common DC t motors (rated up to l f" 32VDC/5A} in bom tfie forward end re- verse direction. The ran^e of control Is from fully OFF to fully DM in both dkectfcoft& The direction and speed are controlled using 9 single potentiometer. Screw terminal block for connections. Kit Order Code. 3166KT - £14 .96 Assembled Order Code; AS31^ EMM DC Motor Spaed Controller (6 A/lMVj Control the spaed of almost any common DC motor rated up to 1 0OVfSA, Pulse width modulation output Tor maxi mum motor torque at all speeds Supply. 5-1 5VDC El on sup- plied. Dimensions (mm). 60V\fo100Lx6QH Kit Order Code: 3067KT - £11 Ji Assembled Order Code: A £3067 - £19 L 96 NtWPCf Standalone Unipolar Stepper Motor Driver Drives any £ 6 or $-tead unipolar stepper motet rated up to 6 Amps max. Provides speed and direc- tion comroi Operates in tmi itone or PC- controlled made Up to Six 3179 driver boards can be connected Lo s single parallel port. Supply: 9V DC. PCB ©0x50mm. Ki Order Code: 317SKT - E9.95 Assembled Order Code: AS3179 - £11 .36 Assembled Order Code: AS31 13 - £24.36 VW! Bi -Pater Stepper Motor Driver Drive any bi-polar steppe' motor using externally sup- plied $V levels for stepp n p and direction control, These usually oome from software running on a computer. Supply: S-30VDC. PCB: 7$*S§mm- Kit Oder Code" 315BKT - £12.95 Assembled Order Code: A 531 53- £26 JS Mott items are available in kit form (KT suffix) or assembled and ready ter use {AS prefix). Controller* & Logger* He re ire just a few of the controller a nd data acquisition and control units we have. See website lor full details. Suitable PSu For all unite- Order Cade PSU44S £3.9$ Rolling Code 4 -Channel UHF Remote State-of-the-Ait High security. 4 channels. Momentary or latching relay output. Range upto4flm Up to 13 Tjr'6 cafi be learnt by one Rx (k4 in- cludes one Tx but more avails able separately). 4 Indicator LED Rx. PCS 77xSamrn h i2VDC^6mA (sstarbdby) Two add few tfimnol ve^sfojis ateo aveftebte , Kit Order Code: 31 ©OKI - £41. 95 Assembled Order Code. A 531 SO - £43 .95 Computer Temperature Data Logger 4-ehamel temperature log- ger ter serial port. *C or *F. Continuously logs up to 4 separate sensors located 2Q0m+ from board. Wide ra nge of free software a pplF cations ter slonng.'u&irtg data. PCB |ust 3Bx3©mm. Powered by PC. includes one DS1320 sensor and four header cables. Kit Order Code: 31 45KT - £19 .35 Assembled Order Code: AS31 45 - £28.95 Additional DS1 B23 Sensors - £3.95 each *JEn* DTMF Telephone Relay Switcher Cali your phone number using a DTMF pfrOTW from any where in She world and remotely turn onfall any of the 4 relays as desired. User settable Security Password. Anti- Tamper, Rings to Answer, Auto Hang-up and Lockout. Includes plastic case Not BT ap- proved 130x1 1(k 3Dm m, Power: l£VDC r Kit Order Code: 31 4QKT - £33 .35 Assembled Order Code: AS3140 - £43 J6 Serial Isolated l r O Module Computer control led &- channel relay board $A maine rated relay outputs 4 isolated digital inpiris Useful in a variety of control and ■mini . upptomoRfc Co n t ra F ed via serial port for programming (using our new Win- dows Interface . toiminat emulator or dalch files). Includes plastic ease 1 30* 1 00x30m m . Power Supply: l3VDC^500tnA. Kit Order Code: 31 06KT - £64.35 Assembled. Order Code: AS3106 * £34.35 p. ■ J,B ■ ! ■ IIJJN J infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control unit. Toggle or monnenlary. 1 $m+ rtngfr. 11 del 22mm. $upp*y 12 vDC/0,Sa K it Qrde r Cwte ; 31 42 KT - £4 1.99 Assembled Order Cod# AS31 42 - £51.35 PMC A ATMBL Pt^grafTimof* We have a wide range of low cost PIC and ATM EL Programmers. Complete range and documenteifian available from our web site Programmer Accessories; 49-pin wide Z3F socket (ZIF40W) Cis co 1BV DC Power supply |PSU010) £19.95 Lsads: Parallel {LDC135) £4.95 / Serial [LDC441) £4.9 S t USB (LDC344) £2.35 II UB 3 Afl-Ftesfl B PlC Proqranrtwr use PIC programmer for all Tte9h r devices. No external power supply making it truly portable. Suppled with box and Windows Software. 2 IF Socket and U$B Plug A-B tead not inci. Kit Omer Code: 312WCT- £34,93 Assembled Order Code: AS31 2B ~ £44.95 Eflhancerf_^PIC ALL * ISP frlG PrOgr turner Win progiBm virtually ALL $ to 40 pin PiCs plus a range of ATI4EL AVR, SCENIX SX and EEPROM 24C de- vices Also supports In Sys- tem Programming jjSPj for PIC and ATMEL AVRs. Free software. Blank chip auto detect for super test bulk programming. Available in assembled format with ZIF socket only. Assembled Order Code' AS31 44ZIF - £54.96 ATMEL 59i&nx Programmer Uses serial port and any standard terminal comma program, 4 LED s display Ihe states. ZIF sockets nol included. Supply; 16-1BVDC. Kit Order Code: 3123KT - £29.96 Assembled Order Code: AS31 23 - £34.96 w- ml USB 4 Serial Port PIC Prografniner USS/Senal connection. Header cable for ICSP, Free Endows software See website for PI Cs pporled ZIF SockeBUSB Plug A-B lead extra Supply: 1-8VDC. Kit Order Code: 3149CKT £34.93 Assembled Order Cade: AS31 49C ■ £49. 95 W- ii I www.quasarelectronics.com 10/2005 - elektor electronics 71 INFOTAINMENT LABTALK It's great that PCs are becoming faster all the time but on the downside they're also producing more heat and noise. Several solutions have been devised to keep the innards of a PC as cool as possible, the sim- plest method being air flow cooling. How- ever, from the noise produced it sometimes seems as if the PC is on a runway ready to take to the skies! Water cooling is a lot qui- eter but what if the system springs a leak? So what about oil cooling? It looks like the perfect workaround, but then... Thijs Beckers Triggered by a message somewhere on the Internet we had a look at Markus Leonhardt's website [1]. Markus had the wherewithal to immerse his PC system (excluding case) is an aquarium-size container filled with vegetable oil from the supermarket. The PC works! Oil does not conduct, so no short-circuits are created. According to Markus, the PC is now totally quiet. He left the fans in place; they are still running albeit much slower than in air. This of course helps the relevant components to trans- fer heat to the oil. The power supply has also been sunk in the oil bath — quite risky but no fatal events so far. The hard disk and CD/DVD drives are running outside of the oil bath. In the case of the CD/DVD drive we can understand why, but why not drop the hard disk into the bath, too? After all, most of today's hard disks are fairly noisy as well as running quite hot so oil cooling would seem ideal. Still, we had our doubts. There was only one way to find out what would happen if... After some deliberation in the lab we gathered some computer junk and started testing. The first guinea pig was an old Seagate 1 00 MB hard disk. Normally a fairly noisy disk, the veteran could hardly be heard once immersed in our oil bath. The disk remained active all day, apparently without problems. However, the next day, on starting the system, it soon transpired that the hard disk had 'drowned', the PC's BIOS faithfully report- ing a fatal error in the hard disk department! Even after allowing the excess oil to leak from the drive, the little motor was no longer capable of spinning the data discs at the required speed. This, in turn, causes the heads to scrape across the disc surface, which is of course a 'ter- minal' fault condition — it's goodbye to ye olde Seagate 100 MB. On opening the disk drive the problem was soon discov- ered: oil! It must have crept in along a minuscule opening around the flatcable connecting the control board to the heads. Another 'suggested cause of malfunction' was oil having soaked the foam sealing protecting the disc com- partment and eventually leaking through. This, at the end of the day, is causing the problems. After all, the hard disc requires air to make the heads hover just above the disk surface [2]. Once the disk surface is contaminated with an oil fi m, the disk is slowed down by friction, caus- ing the air gap between the head and the disk to disap- pear, so eventually, the head touches the disk surface. This of course spells the end of the hard disc. The second hard disk to be tried was a Quantum with a once impressive 1 28 MB of storage space. It still worked after a week or two in the oil bath. The one conclusion to draw from this lab experiment is not to immerse your hard disk is an oil bath if you are keen on keeping the data on it. The risk is too high — it may fail, or not (as in the case of the Quantum HD). In any case, there is no guarantee that the hard disk will remain functional. 72 elektor electronics - 10/2005 Drastic measures: PC in an oil bath It is just possible to think of a system that precludes direct contact between the disk and the oil, but still allows vibra- tions produced by the hard disk to be damped by the liquid. Ideally, the heat should also be dissipated properly. During an editorial meeting, when this article was discussed, some really wild ideas were sug- gested involving engine oil and special constructions. In the forum of the website at [3] the suggestions include cov- ering the PC electronics in sili- cone mastic and fitting a huge heatsink. One intrepid forum reader even asked the IBM helpdesk for advice on whether or not a vent hole could be taped off, and, if not, how much air would be required to keep the disk going. Although I it was said that the operation of the hard disk would be compro- mised by sealing off the hole, IBM kindly stated that about 0.5 cm I * 3 of air was sufficient for sustained operation. Alternative solutions proposed include the use of drinking straws, little tubes etc. allowing the disk to breathe air from above the oil. A lot of tinkering with great risks of a leak somewhere in the piping. Internet sites ! [1] www.markusleonhardt.de/oelrechner.html | [2] www.pctechguide.com/04disks_SIVlART.htm * [3] www.markusleonhardt.de/forum/ ■ What do computer builders think of the idea? At the HP helpdesk, a sudden silence and perplexed staff. After a lot of searching, one staff member was finally found will- ing to forward our query to several departments. Unfortu- nately no answers came in before our deadlines. No conclusive answers either from PC motherboard man- ufacturers, like, for example, MSI whom we approached through their distributors. Apparently no one was able to tell if continuous contact with oil would affect various components and/or materials used on the board (like the motherboard plastic or the ICs). If this idea for enhanced PC cooling spreads as fast as we noticed these past few weeks, it will not be long before the first Pentium-4 EE with Geforce 6800 Ultra in SLI configuration will find its way into a bath of Tesco's vegetable oil. Quite possibly, oil-sealed enclosures will become available, made of transparent Plexiglass, of course, so the lot can be illuminated with colourful lights. Td like an oil filter for my PC, please." ( 050171 - 1 ) One hard disk did not survive. The traces of the oil bath are clearly visible. 10/2005 - elektor electronics 73 HANDS-ON DESIGN TIPS Cascode stage or "collector follower" Jean-Paul Brodier All microprocessors from the 8051 family have inputs and outputs that are 'quasi-bidirectional'. This means that when power is first applied, the ports behave as inputs with a logic high level and a weak pull-up. +Vcc +Vnr Figure 1. An NPN transistor drives a load. Glitch When driving a relay or some other load such as an optocou- pler or LED, there is a problem at power on: the NPN transistor in the common emitter connec- tion (Figure 1) causes an unde- sirable excitation of the load from the moment power is applied until the microprocessor has had the chance to turn the output low. In addition, logic high outputs are seldom able to deliver enough current to drive the transistor into saturation because they have been designed to be active low. To solve both of these problems in one hit, we have to make the active level logic low. This can be done in three different ways: use an emitter follower as a buffer stage (Figure 2a), an inverter in a common emit- ter circuit (Figure 2b) or an inverter/open collector circuit (Figure 2c). The disadvantage of solution 2a is the fact that the voltage to the load is reduced. In the case of a relay with a 5-V coil there is the risk that the resulting voltage is too low. The disadvantage of examples 2b and 2c is that they require more parts. Collector follower That leaves the open collector buffer in the form of an 1C type 7404. This solution, however, also has a few disadvantages. You do not always need all of the 6 buffers in one 1C. Also, the SMD version can only handle 1 2 V. This is too low and dan- gerous if we happen to supply the load from an unregulated voltage. The solution presented here com- bines in one transistor the advan- tages of the emitter follower (inactive when power is first applied) and open collector (higher power supply voltage, lower current). This circuit has been known since the valve era by the name cascode (drive via the cathode). The goal was to reduce the Miller-effect of the internal (parasitic) capacitances. Not having the option of reduc- ing the capacitance between the internal electrodes, a lower volt- age was used instead. The cas- code circuit is often used in pow- erful transmitters (tens of kW) to minimise the Miller-effect. This circuit was also used to limit tran- sistor conduction and to keep the dissipation within bounds, which increased the life of bipolar tran- sistors. This was in the IGBT and VMOS era. The transistor conducts only when the output from the micro- processor is low (refer Fig- ure 3). The base current is lim- ited by resistor R. This current is determined by the current flow- ing through the load. When the _ + v cc © © T1 V PNP R1 D1 RE1 X E2 1N4148 Figure 2. Power stages without unwanted behaviour at power on. a) Emitter follower, b) Inverter stage with common emitter, c) Inverter and open collector. 74 elektor electronics - 10/2005 Figure 3. Cascode driver stage with discrete transistor. power is switched on, both the base and emitter see the same potential, V^c, so the transistor remains blocked. One thing we have to keep in mind: we may not exceed the current rating of the microprocessor output because it has to cope with all the current flowing in the emitter of the transistor. In the case of the quite common 80C5 1 , this maximum current is typically 3.2 mA (two LS TTL loads). This is sufficient to drive an LED without overloading the 5-V regulator, or for driving a PNP power stage at the high side (Figure 3b). The parallel Philips PCF88574 l 2 C interfaces can handle 25 mA. For the Atmel AT89Cx051 as well as for the Philips P89LPC9xx the limit is 20 mA. For the latter type the cascode circuit or 'collector fol- lower' is even more interesting when the outputs are configured as open-drain because the nom- inal voltage is only 3.6 V. In all cases we have to make sure that the maximum dissipation of the package is not exceeded. Should this be the case, then the number of open collectors required will probably justify resorting to a 7404. A current of around 20 mA at 24 V is sufficient to energise a half Watt relay coil, which in turn can drive a load of 1 6 A at 230 V. For loads driven from the positive side, the voltage and current lim- its are determined by the power PNP (or VMOS) transistor. The cascode transistor can be a 'digital' type with integrated base and emitter resistors. ( 050087 - 1 ) Pot as interrupt generator Eric Vanderseypen In battery-powered, microcon- troller driven circuits, as well as with microcontrollers operating in cars, it is desirable to switch the micro into power-down mode once a task has been completed. An interrupt request is then required to wake up the micro. This circuit allows an interrupt to be generated in a simple way using a common potentiometer. In the example circuit, the pot may also copy its spindle position to the ADC. This enables the pot to be used for continuously variable settings (like volume) as well for getting the micro out of its power- down mode. 1C 1 A is configured as a differen- tiator with R3 preventing oscillation by keeping the gain down to 1 0 times. Because the opamp oper- ates off a single-rail supply voltage, an 18k/ 10k potential divider (R 1 /R2) is able to create a virtual ground level at +1 .75 V. This can be done because the LM358 can handle input levels of up to 3.5 V when supplied at 5.0 volts. IC1 A supplies a brief High pulse at a falling input voltage, and a similar Low pulse when the input voltage rises. In order to get a High pulse when the potentiome- ter spindle is turned cw or ccw, IC1 B is set up as an inverter. Next, each opamp output drives the base of a BC547 transistor. The 5 V-to-0 V transitions at both collector outputs are shaped and combined into a usable interrupt pulse by three NOR gates IC2A, IC2B and IC2C. If the potentiometer spindle is turned very slowly, it is possible that the circuit does not respond. That is why an LED has been added that lights briefly when a pulse is generated. Finally, a tip: a 100-pF capacitor may be connected in parallel with R5 for additional suppres- sion of self-oscillation. ( 050121 - 1 ) 10/2005 - elektor electronics 75 Visit our website | THE ORIGINAL SURPLUS WONDERLAND! www.distel.co.ukl TH/S 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 feLfli pMtowsp mabkm l*. to brtog to joy turna G WNT t snrrcrt - ■ - ■ - . - . pfcOflThfl ■ nr.tfW:* | hp* 1 rdidng Kin hunto, cigf&i docks, . nwH: rlir+rp rtr Aa IMc Lrfc ju a o U ' B^pid I 4S»*30 GpOTto *Ifn1?YDC. V P*TT3ti \*to arfmit. n*iy*. ftC to PQ may tO m X ■>' £■ OTltal Wflfc. IT r nj‘\:>!-C>7Ti (jrfc fcut-Tj Til-p fi.w/ i “i TT'i.iy 44 ^tJ-. dctfijri For #n OfV prafleal i*fri*„ no the May issue of 'Everyday & Practical Electronics’ magazine. Ideal School / College con- struction project. Supplied in good RFE condition, complete with data shrrt Less than 30% of makers price ! Only £29.95(b) or 4 / £99.0G|D) Order RW44 Order PH26 THE AMAZING TELEBOX TV SOUND & VIDEO TUNER CABLE COMPATIBLE * Convara your colour monitor Into a QUALITY DOLOUR Wl! Hw TF1 FFlfTH to m totowtt* L*r £*«*) mains powered iflU Ctofcflng all toitoiu rrudy b tom ifc a lulof viftio monitors or AV FKjt^arwi which to * iHd b outgxOftd wteOdr SCART input. The compOIH vdtQ Output wl Hn pM> AKtly rto m«B irapbon of TV not normafy luhtoto on mad UMior mcatovw' i'ELE- KW K*J Pufi tifln d£r HA m hr tori md afcw rmrtcn to B fully taTOCfc dr LTF Mto to BfewKn dWMkTELEBOJC MB COrtrt virtu- aly 4 WWHJi VH2= qrd LFF mdtdlfl f“ HDTOSWID as uud by mil itoto TV DperulEn. ftad br rWfc *y canputar vUh sys- tems & PIP (pAn n [Ebnl fa* ca ift p dto QUVtoUly - *ven for monitors witlrkl .Mind -to i inQdl 4 wto OTpVto and low M Mi Fi audio output are pfDrtfed ® SBnctoG Braid rw ■ *jy gjanrtonfL TELEBOX ST lb* ujutpudba vUk? nf*i( Bypft r .16.95 TELEBOX BTL Si 5T hJl rtrrsd wKi frmrto ^nitor £39.50 TELEBOX M 0 Murtfiard VHFrtJHF.CtobwHKMr1iand Lliw £G9.95 For oversea PAL vnretam ste It -5. ft to 0 mHz KHiOd BPKfllGtdbn. *For cable F hypw bftto d tog Ml nHpUto TolabQx M.l jinx M t* con- nected to a nflbln- Tptj itnrtg* Shpptig on ol TofafacnX end* (&J OBSOLETE - SHORT SUPPLY - BULK 10,000,000 items EX STOCK For MAJOR SAVINGS CALL or see web site www.distel.co.uk COMPUTER MONITOR SPECIALS Legacy products High spec genuine multysync. CGA, EGA. VGA. SVGA UfeultilN FA341 5ETTKL 14' SVGA MtAttfTK iXApiK ranter with fine QTB-ai ;Act\ Ltrt arc- rncMcri d ^ 7S8. A vari- toy to nub tobwD nmoflii ta a heto d computers IBM PCV ir CCA, EGA. VGA & SVGA OWaOdfiE i^fUdrg Amiga 1200), and APPLE. Many features: Etched taxt iwitching and LOW RADIATION MPR Ip«d!f48£to1 Fully guaranteed, in EXCELLENT little ip*d^ndd» Tilt & Swivel Base £4.75 Only £129 (E) °cg73 S External cables for other types of computers available - CALL 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. 15” £69.00 order TG21 Supplied in good used condition. Shipping code (D) VIDEO MONITORS 51l4i UP Ififr tol PAL PUK l pari WT rv lurar module with ^^umpol^U IV PS A NIC AM ?i fi wtaiwa scmnd outputs. Micro Btadronlcs al Wi trfW AmtV PCfl triv 7S 1 160 x 52 mm endbte Ul ur "ii tttfrjfoi vut s Unvk 3- tolrv link m an IBM pc oompulto Staled □^rnpJnm wet slrnpln #041^ program and dccumnr-baijam koq ji^s- * 12 1 / A * 5V DC tfi Mtovd. BRAND NEW - Qrdw ii MYM. Only ffl> See www.dlstel.co.uk/data_myOO.Titm for picture + tun details HARD DISK DRIVES 2 V," - 14 2/2' 2y 2 2/2 1 2/2 1 272 3X2' 3X 2 ' 3X2' 3X2' 3X2' 5X4 5X4' 5X 4 ' 5X4' 5X4' 8 " 8 " 8 " TOSHIBA MK1002MAV 1.1Gb laptop(12.5 mm H) New £59.95 TOSHIBA MK4313MAT 4.3Gb laptop (8.2 mm H) A/ew£105.00 TOSHIBA WK64G9MAV 6.1Gb laptop -'12.7 mm H) New £96.00 TOSHIBA W K1 SHGAV 16 Gb Jl3 rtort M) /Vew£14J,tS to 3X2" WiWSfWn K4 for PCt. Will connectors £15.95 COMPAQ 31 TOtoliB ob ULT.-SC--SJ3 New £199. DO FUJI FK-S08-K Jftnb MF^ l.'F RF£ CONNER 20 IDE UF {W RFE CONNER CP3W 40 r* IDE OF far RFE QUANTUM 4tt Prodrtvt 42mb SCSI IT, M*w RFE MINISCRIB E W2520frfc MFM VF {W totpirY.) RFE SEAGATE 5T.Z30R 30m|?fiLL 14= CDC 94306-11 4Dmb HH MFM LT- Hffc taslud HP 9734B 650 Mb SCSI RFC I eh La- j HP C3010 2 Gbyte SCS-f diffwwAtlat RFE tested NEC D2246 85 Mb SAID ^Itofflfie. New FUJITSU M2322K 15WfeSMD LF RFE tested FUJITSU M2392K 2 Gb SMC l/F RFE tested Many other floppy & H drtvvt r IBE, SCSI. ESDI etc from stock, see website for full stotk Hit, STttfiping on all drives is code (C) £50.95 £59.95 £6a,E» £49.04 £49.95 £69,95 £69.95 £99.04 £195.00 £99.00 £195.00 £345.00 l-Wto- OCKV ^ eulto «rtfi ft MBytiP NcW VOLATILE toAd 4U * 'Cm OP 1 RAW3I3X Syslm-io™™! Ji«*iy3i&(P^i;44?£ac wrth 4dM34z AU 3AA&X j, 73 p - SIIULM sHL with 16 M SIMM. AMI BIOS btofiory twdudup rod 6m* ckKk. 2 K fl pin D 1W50 uriai skiria. EPP^ECP prinLto pen, mirt Oiw k4/tK#m nocbif , npppy port, ipe port M nurd UrtiWfl 141 Id 52ft iMBylB capacity, mlEndog Lenar and PC/104 bus socket. The 8 MByte solid $t&M- 'dirt Ud 4 dim' hai -is own BIOS, and can be fdisked, formatted 5 bOOtMl. S-J4p*4d BRAND NEW fully tested and guar- anteed. For [Li cdln ua fulund item on website. Order as QG36 IDO's of applications me: firowaH. rwj.ors, rofcofics etc Only £99.00 (D) TEST EQUIPMENT & SPECIAL INTEREST ITEMS tfiLs BKtion are pre owned. MITSUBUSHI FA3445ETKL 14” Ind. spec SVGA monitors FARNELL 0-60V DC @ 50 Amps, bench Power Supplies FARNELL AP3080 0-30V DC @ 80 Amps, bench Suppy KINGSHILL CZ40G/1 0-50V ® DC 200 Amp* -NEW IkWto 400 m - 4W H* 5 perwto - m stock IBM 8230 Type 1 , Tflkjjn mg bou unit dnvnr Wayne Kerr RA234 Audio ^-oqucricy moponoa analyser INFODEC 111. 2^ ptol, : #TH93 3COM 1 667® 1 ? fW FLhunxH I- Jh - R>*5 cflmqtfors #LD97 3COM 1 667H 24 Pot I Ethemat hub - Ftiih CDmadors 3COM 16700 6 Port EtWiNM huti - RJ45 MfndCttos NEW IBM 53F5501 T. ji&r. R ^ ICS *1 p^UtomodlMs IBM MAU Tgtoar toiq c Jtnbtd^n p^nrU ftZ2H~23-lO50N AIM 501 Lowdb^tHx^OBGftatDrStolz ta 220Kkz, kzEE I/O ALLGON 8JW.1 1M5-1 BS0 MHlh^brtJftow^r^wnbiners Trend DSA ZT4 Analyser with G703(2M) 64 i/o Marconi 63111ft Progrnirnable 2 to 22 GHz sweep generator Marconi 2022C IflKHrHGHz RF signal generator HP1650B LfldC^AlftohHr HP3781A FMInm generator & HP3782A Error Detector HP6621A DutoPlmefcmiable GPIB PSU 0-7 V 160 watts HP6264 Rack mount variable Q-2QTV i@ 2UA nurtured PSU HP54121 A DC to 22 GHz foyrchanj^J HP8130A opt 020 300 MHjipyLW HP Al, A0 8 pen HPGL tugh HP DRAFTMASTER 1 8 EG+G Brookdeal 9503J TukL M-l 0F10 etc » from drum HP DRAFTMASTER 1 8 mr-hfgh apood alaltDr 55C PrtftoXirt QiM (ft Keithley 594 CV t wpfeifiU nnalyser Racal ICR40 dual 40 chinnc- vdcd recorder system Fiskers 45KVA 3 ph Oft Lbd UPS - New batteries Emerson API » f 5KVA Imj-jtlrl^ *f>ec.UPS Mann Tally tff|45 l-9gh npood Rnop-inter Intel SBC 444UU&SE MLitibui 466 system. 8Mb Ram £245 £995 £1850 £3B50 £POA £TftO £2340 E49 Ebj £89 £39 £POA £45 £550 £250 £POA £4500 £1550 £3750 £POA £1800 £475 £POA £7900 £550 £750 £1800 £POA £3750 £4500 £1499 £2200 £945 HP6034A 0-201W DC @ 17 Amp* bonch pe^er supply £1950 Intel $BC 4W125C08 Enhanced Mgbbui [MSA) New £1 1 50 Nikon HRt-1 1 fEphiphot) exposuna Dorilrd unit £1450 PH'-LI®3 PMftftlt to© TV Eigiirt JdAtottaf £1250 VUE SVI 6 OtoT^QiitoTtl List. SAE / CALL £POA vdc Llnodr, matqi^d iC amp bcmch PSU. New Fulhau H3641 R 600 LPM high raced band printer Fk.]htoi M3W1 U 600 LmM ErtfKtorwiti Wf-Otk interface &lgm*fi* KA*0ft04Kdt® lAOUItPtobu* hrgtt/ser Perkin Elmar 296 Bi IrVared ipcctnjjphaLDTwter Perkin BnarH7 Inlrtorcl ap fc j e p fe towto r VG Eltetaenle* IMS TELETEXT D«^z characlDrtrtl: toil sat R&S FTOZ Dual BnJftd mill R&S aOU#-E1 VtUFi nxJdrUBtar WILTRQH 124 i SOOHi RF sweep generator TEK 2444 1 50 MHt 4 Btjcd oociloscope TEK 2*fti "300 MhZ 300 MHz oscilloscope rack mount TEK TQ33S4 4D0MNz <6grtal r^ltime + disk drive, FFT etc TEK TDS524A 50GMhz iHfnq ■* -OftiftEto pto HP3585A Opt 907 20HZ » 40 Mhz *£»cdrimi analyaor PHILIPS PW1 730/1 ftMWV XHAY gtokHKH A &c4dt*4rtOS VARIACS - Large ranga hem iiu*A - *ftB Of Hto OIP w*bsite CLAUDE LYONS 12AZ40V ainjJc- phau 3Lta ytot fogs £325 CLAUDE LYONS 100A 2W41 5V 3 phaso sub mil, mgs £2900 £550 £1950 £1250 £2950 £500 £3500 £3250 £495 £1995 £300 £750 £1450 £75 £5650 £990 £POA £650 £775 £5750 £1250 £1955 £2900 £5100 £3950 £POA 19" RACK CABINETS Europe’s Largest Stocks of quality rack cabinets, Vfr enclosures and accessories. Over 1000 Racks from stock This month’s special 33 / 42 / 47 U- High Quality All steel Rack Cabinets K**0" Made by Eurocraft Enclosures Ltd to th* bio-ha M pos- sible spec, rack features all steel constirudturi removable side, front and back doors. Frperi amf back doors are hinged for easy access and -ok loefeabta vnin m twrii 9 tovar btmH ImAi T b* frw 1 dwr 4* «n*(nBi*6 pf stool wrth b 'dnlgnar alyl*' smewod ac^bc J Tnl part* I C 0 iftfibl* aLaLu* iodiutbrA le t* thffluflh if n pin* I. y«l r*rnaln undtFrviN*. IntniTiBly IPin ruck fiip-Lffln 1i2ly Eloltid to -n forowd vftrtifiAl [tang momtarA ta trt» Ihi hotovt- esc pr 19T Tno '.wO IWvAM* vgrttwJ fusing 5 try I* f*xtm an p«* punch*d fbr cLni'dord cuga nL*i' A min diK- trlbulkm pan** MdCrtAly PlduhlM ta Ifrt KCHrf. rear. pr^¥44*6 X l£C 3' [W itod WOkatl ord 1 1 3 vnp 3 pin iwtttoiod ulirity Ec-ck*l. Lvonl tion ib pravidtid by fijly tauvornd back Poor and doLCHa Biunnod tap section lop ord Aid# tauvm. The i>? ptRM mty fa* PtoMt i¥*d for fattmg pi 1 ntagril fjii* to 1h« *Jjbpl«l* Vi 4- Ottlto fultots indixlo. rrtlDd adon ■nd floor ta-.-rHarv pmpbncnod utilAy fume: at lower rear For tabte 1 001 irteefw a ccess etc. Suppfied in exteWent, slightly used condition with keys. Colour Royal blue, some grey available - CALL - Can be supplied in many other configurations. PHILIPS HCS35 (same style as CM8833) attractively styled 14” i^Qflpyr Frontier wtm frptft ftdfl ond pbanuard eamptMlIa Khz video Inpirta via SCART aackot and jopomto phono |acha- i ftopTi! oifJ o pvwm imp and ap* A 4.* f kjr all audio vlaual u»#o wfl ig Afriffl* Atari BBC «ppwM kR»i Kk bii vldoa vnonllDifaig t ucurlty a^?!ca6ona with dtiraet oonr^odJon to moat colour cwnoru High ouallty wrth many features such as Nbnl HrtGMM n AO CbHlfibll, VCfl, CWTKiion button etc. Good ^ tu^iHtoi -tHWTiHd Onl\/ PQQ nn □knondoia- Wl4'x H12W' x \5'A m D. Un iy tyy.UU (D) PHILIPS HCE31 Jttr* oqirfiato f eoloiir video monitor with stan- dard enmpostto 15.425 Khz vldoo mpul via SCART socket. Ideal tor all monitoring 1 security applications. High quality, ex-equipment fully tested & guaranteed (possible minor screen burns). In attrac- tive square black plastic case measuring W10" x H10" x 13X-" D. 240 V AC mains powered. Only £79 00 (D) INDUSTRIAL COMPUTERS Tiny Shoebox sized industrial 40 Mhz 386 PC lyotum mamairra .."!>■ ;mm) 266 w X 88 h X 272 d. Ideal for dedhaWK! Oil: t*l u(K.i ijIj^is running DOS, Linux or even Windows 1 $l**l nst ftOrt- Eaton 35 to 265 V AC 50 / 60 hz 70 Watt PSU, el 3 akrt ISA pnsaiva btodtplane and a Rocky 318 (PCI 04) standard, tiftfl to brtdra Otofa- 33U Order as BC44 External dimensions trm=1625H x 635D x 003 W. (64” H x 25” [] 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 47U Order as RV36 External dimensions mm=2235H x 635D x 603 W. (88” H x 25” D x 23%” W ) Only £410 Call for shipping quotation COLOUR CCD CAMERAS I coni Undoubtedly a miracle of modern technology & our special buying power ! A quality product fea-, turing a fully cased COLOUR CCD camera at a give away price ! Unit featum* ful bi/e 4 ^ht sensing for u** ipi Idw Isght & high light appllcallana A ip Him fluoit toqua vw do angle Iona gives excel la it fo-cus and ra pdI ulion rorr tAtom Up 1b long ratiffA- Tn * ttonpcrfft* vid*o ixrtpui will oorviocl ta any compcn^j] mc-irtcr or TV (.vl a SCART rockot} and maaL video rACrtrd*rt. Unfa fun* from 13V DC fro kJ**l Tor iAcurlty ft portabl* appllca- l lf ' ftofia whom nalns powir not aval able. Overall dmanslona- 66 mnr ^r-dn x 1 17 'Jeep jC A3 high. Supplied BRAND NEW A My puaref^nd tortft b«to m ft, IPPl- Of ifons including Security, Home Video, Web TV, Web Cams etc, etc. Order as LK33 ONL Y £79. 00 OT 2 for £149. 00 (B) SOFTWARE SPECIALS NT4 Workstation complete with service pack 3 and ilcerwa - OEM packsg^. ONLY £89.00 (B) EN CARTA » - DPRDM, Nat Ihfl la boat ■ but at this price ! £7.95 DOS fi.6 di JYT dibits w.m cdigiso teaks c/w QBasic . £14.95 Windowi for Workgroup* 3.1 1 *■ Dw 022 on 3.5" disks £55.00 windm«5CMOMOfdy-MoLk*rw- £19.95 WordPerfect 6 for DOS supplied on VA" disks with manual £24.95 shipping charges for software is code B SOLID STATE LASERS Visible red, 670nm laser diode assembly. Unit runs from 5 V DC at appras SO rrA Ortgn* y mate h>- dqtTtudui uso .n -duairjd tMU- COdo KAiViAf*, 1H* lAAto to rnu^j ilod h • Mid Skfl^iurtl block. Which turvukvii as a hn.mnk und vUd opW mwrf Dton* *f block am 50 w x 50 d x 1 6 -h mm Intog. al naturae indu^o mar tan- paratura shutdown cur-Bnl cxsdtfdt, tosor OK wpul and gaMd TTL ON t OFF. M*n tf utn ftr *>p*rlm*ntM Opttei. mwifl b Bgh3*OW* etc. Supplied complete with data sheet. Order as TD91 ONLY £24.95 (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. t RELAYS - 200,000 FROM STOCK Sirt ££££■* fry {AOQ&fQ your next relay from our Massive Stocks ccnwing types such os IlWrary, Octal, Cradle, Hermetically Sealed, CooSvieriflJ. ContorioiT, Time Delay, Reed, Mercury Wetted, Solid State. JWr ihtocf Cirtryt UtbU/iting etc. , CALL or see our web site www, 4taMT.eto.il A 1 *3? Information. Many obsolete types from stock Sovw £j£££"j: • •• • •• ••• •••• • • • • • • • • • • ••• •••• • • • • • •• • •••• • •• • •• • •• -ELSCieonics- © 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 I Stocvrv- Ordering, Pictures, Information vti.%n www.distel.co.uk amii | f ° ijtafaMiMco. uk SecuioEfeto ALL ^ ENQUIRIES 0208 653 3333 FAX 0208 653 8888 Est. 26 Years All prices for UK Mainland. UK customer Gdd 175% VAT ti TCnAI EanrMJPi! Mr*rvn Order £10. Bona Fide account orders accepted from Government, Schools, Universities and Local Authorities - minimui ocaxrt ertex £10ft. Chqja {Mr £’Lt> an jpi^x] fc7 working days clearance. Carriage charges (A)=£3.50, (B)=£6.50, (C)=£10, (D)=£15.00, (E)=£18.00, (F)=CALL. Allow ^ 4 jlu 3 ikiyn fcr ^ppA-g->tefer CALL Al geexfc; supplod to our Standard Conditio ns of Sale which can be viewed at our website and unless stated guaranteed for 90 days. All guarantees on a return to base basis. All rights reserved to change prices / specifications without prior notice. Orders subject to stock. Discounts for volume. Top CASH prices paid for surplus goods. All trademarks, tradenames etc acknowledged. © Display Electronics 2002. E&OE.. 76 elekfor electronics - 10/2005 RETRONICS INFOTAINMENT Jan Buiting The Elektor Time Standard and associated Slave Unit were spin- offs of another hugely successful project, the DCF77 Receiver / Locked Frequency Standard. The receiver was published in the January 1988 issue, the Time Standard and Slave display in the next two issues. All units were housed in then very fash- ionable and (expensive!) Ver- obox two-part ABS enclosures which had also been used for a number of Elektor test instrument designs published between 1984 and 1987. The Time Standard box was designed to process seconds pulses received from the VLF (77.5 kHz) DCF77 time standard transmitter in Mainflingen, Ger- many, and display time (with atomic accuracy) and date on an LC display. The circuit was based on then extremely popular 8052AH-BASIC microcontroller from Intel, a device, we can safely claim, that made it to fame & glory thanks to Elektor Electron- ics. The 40-way DIL chip con- tained a BASIC interpreter capa- ble of executing 'tokenised' code from an external EPROM. This, we were told by our resident designer Peter Theunissen, made writing the DCF77 time signal decoding routines 'a doddle' using his specially adapted BASIC computer and interpreter. For example, when concerns were raised (by myself) that not all of Europe was in the time zone served by DCF77 (i.e., CET or GMT+1 h), a menu option was quickly added to allow users to select between UTC and GMT+1 h. As a relative novelty, a ready-made self-adhesive front panel foil with built-in membrane keys was designed into the proj- ect. This expensive item had been produced specially for Elektor. However, when the article went into print (using a rather glum page layout and black & white print), there were yet other con- cerns regarding the range of the DCF77 transmitter. This is offi- cially claimed as "approximately 1 ,000 km by groundwave propa- gation". A quick use of a com- pass and a map of Europe sug- gested that the signal would only cover the south-eastern part of the UK, possibly including Greater London. For a couple of months we waited with baited breath for readers' responses, only to receive two enthusiastic reception reports, one from the East coast of Ireland and another from Riyadh, Saudi Arabia! The latter report came from a reader work- ing at a chemical laboratory. I remember he wrote that DCF77 could be received for a few min- utes a day only, synchronising the clock, usually around nightfall despite heavy 'static'. A huge wire antenna was used (nothing like the 1-inch ferrite rods we used in our lab, which is less than 1 00 km away from Mainflingen). Although the BASIC program list- in the form of ASCII character strings for other (intelligent) equip- ment to use, for example, a timer or switching clock. Although sales figures of the PCB and EPROM were in the hundreds, I never heard from anyone actually hav- ing enjoyed the wonders of the ASCII output so extensively described in the article. The Slave unit published in March 1 988 was connected to the Time Standard via screened (micro- phone) cable, the idea being that one or more Slave units could be installed on walls in rooms at some distance from the main clock unit. Central timekeeping deluxe for offices, labs, schools and workshops, but at what an expense and design effort! Not too many PCBs were sold for this extension of the Time Standard. ( 055062 - 1 ) ing for the Time Standard was freely distributed to interested readers (on paper, in an enve- lope, by snail mail!), only very advanced readers were able to compile the program into tokenised code and burn it into an EPROM. Most other readers had to rely on a ready-pro- grammed 27C64 supplied through our Readers Services. Apart from displaying time and date at atomic accuracy, the Time Standard was also capable of outputting time/date information Retronics is a monthly column covering vintage electronics including legendary Elektor designs. Contributions, suggestions and requests are welcomed; please send an email to editor@elektor-electronics.co.uk, subject: Retronics EE. 10/2005 - elektor electronics 77 INFOTAINMENT quizz'away Martin Ohsmann is a Professor of Electrical Engineering and Information Technology at FH Aachen and a long-time contributor to Elektor Electronics. Through Quizz'away he aims at stimulating thought , speculation , construction and simulation as well as raise interesting questions. Please send your answer to this month's Quizz'away problem, by email, fax or letter to: Quizz'away, Elektor Electronics, PO Box 1 90, Tunbridge Wells TN5 7WY, England. Fax (+44) (0)1580 200616. Email: editor@elektor-electronics.co.uk, subject: 'quizzaway 10-05'. The closing date is 31 October 2005 (solution published in the December 2005 issue). The outcome of the quiz is final. The quiz is not open to employees of Segment b.v., its busi- ness partners and/or associated pub- lishing houses. Vanishing voltage This month we invite you all to look at the operational amplifier circuit depicted in Figure 1 . A voltage source supplies an input voltage L/j, which is amplified by a factor R2/R1 = 1 0 by opamp OPla. Opamp OP2b amplifies the (vanishing?) input voltage U m from OPla. Capacitors Cl and C2 each have a value that nullifies their effect. A dual opamp type TL082, NE5532, MCI 458 or similar is used. The Figure 1 . Opamp circuit. Solution to the July/ August (p. 1 34; 'AF signal finds an impossible path') A close look at the internal circuit of the TL431 1C as shown in Figure 3 reveals that the chip actu- ally behaves like an npn transistor with a base-emitter voltage of 2.5 volts and very high gain ( o p e n - 1 o o p gain of the opamp multi- plied by the steepness of the transistor). The 'base cur- rent' of this device is negli- gible. Armed with this knowledge we can redraw the circuit diagram of the amplifier as shown in Figure 4. Transistor T2 now replaces 1C 1 , while decoupling capacitor Cl (between point A and ground) has been omitted for the moment. Those of you familiar with two-transis- tor circuits will recognise the configura- tion as a classic cascade circuit. Transis- tor T2 (or IC1 for that matter) sees a constant base voltage fixed by poten- tial divider R4/R5. Conse- quently the volt- age at the emit- ter of T2, i.e., point A, is also constant. Using the TL43 1 as a 'transistor' the voltage at point A is held extremely con- stant. However, when the volt- age at point A does not change, conse- quently it makes no difference if a capacitor is connected between A and ground. After all, the capacitor charge is not reversed in operation. Transistor T1 works in the usual way, albeit with a constant collector-emitter voltage. For small-signal behaviour, its collector cur- rent is proportional with the input volt- age and the resulting collector current is K o I.K Vref *J C1 < O X vk 2V5 ) OpAmp Vr 1 040272- 11 - 12 6 Figure 3. Internal diagram of the TL431. 78 elektor electronics - 10/2005 As of the September 2004 issue Quizz'away is a regular feature in Elektor Electronics . The problems to solve are supplied by Professor Martin Ohsmann of Aachen Technical University. input voltage l/j is a sinewave with an rms (effective) value of about 0.25 V and a frequency of 1 kHz. Here are this month's questions: (a) What is the phase relation of the output voltage U a relative to U^? (b) What opamp parameter defines the amplitude of U a ? Note that qualitative answers are required. If you want to solve the prob- lem by measuring, the circuit is quickly built on a piece of perfboard (Figure 2). Figure 2. Experimental construction on a piece of veroboard. 2005 problem Quizz'away and win! the emitter current of T2. Since the base current of T2 is negligible, this current is also the collector current of T2, with R1 converting the current changes into proportional volt- ages. So, the decisive factor is that the AF sig- nal finds its way from T1 to T2 as a current rather than a voltage. The high open- loop gain of the TL43 1 guaran- tees better results than one, real, transistor. Even closer examination is required if you want to calcu- late real-life val- ues. The 'steep- ness' of the TL43 1 is about 1/0.2 £1. With a volt- age of 2 Vpp at its output, the alternat- ing current into point A amounts to 2 mApp while the internal resistance of point A against ground equals the impedance of the TL43 1 , i.e., about 0.2 a We should be able to measure about 0.5 mV at point A. In prac- tice, however, a residual level of about 2.5 mV exists. This is caused by the refer- ence voltage V r inside the TL431 being slightly dependent on the anode- cathode volt- age. Taking this into account we get an actual impedance of about 1 £2 between point A and ground. The conclusion is that point A represents a very low i m peda nee. Next, we con- nect capacitor Cl (22 pF). At a fre- quency of 1 kHz, it represents a reactance of about 7 £1. This being significant with respect to point A, it hardly has any effect. Send in the best answer to this month's Quizz'away question and win an Elektor 89S8252 Flash Micro Board, ready assembled and tested. Prize sponsored by AK MODUL BUS Computer GmbH (www.ak-modul- bus.com) with a value of about £60. All answers are processed by Martin Ohs- mann in co-operation with Elektor editorial staff. Results are not open to discussion or correspondence and a lucky winner is drawn in case of several correct answers. 10/2005 - elektor electronics 79 ELEKTOR SHOWCASE To book your showcase space contact Huson International Media Tel. (0) 1 932 564999 Fax 0044 (0) 1 932 564998 ALLGOOD TECHNOLOGY www.allgoodtechnology.com Low-medium volume sub-contract assembly. SMT specialist since 1990. Customers include military, aerospace etc. 0402 to BGA capabilities, automatic assembly and hand built prototypes. AUDIOXPRESS www.audioXpress.com The premier do-it-yourself audio magazine for 35 years. • Hands-on projects • Helpful articles • Expert advice • New technologies Full range of books, back issues on CD 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 manufacturer’s prices. BURN TECHNOLOGY LTD http://www.burntec.com Test & Measurement Equipment Distributors • Anemometers • Clamp Meters • Light Meters • LCR Meters • Sound Meters • Multimeters • Device Programmers Burn Technology Limited, Winfrith Technology Centre, Dorchester, Dorset, DT2 8DH Tel: (01305) 852090 Fax: (01929) 463214 COMPUCUT http://www.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://www.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 RFI protection. DANBURY ELECTRONICS ILP ELECTRONICS LIMITED http://www.livinginthepast.demon.co.uk Here you will find our mains and output transformers in Mike Holme’s range of valve/tube amplifiers (PP & SE). Also circuits, parts lists, chassis, advice. http://www.ilpelectronics.com ILP has been in the audio industry for over 30 years primarily manufacturing both standard and custom audio modules and pre-amplifiers. 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. 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 • reliable HW • once a months new SW release • three years warranty for most programmers IPEVA LIMITED http://www.ipeva.com IPEVA sell low cost USB FPGA development boards. IPEVA provide Design Consultancy for Embedded Systems, OpenCores-IP, FPGA, ASIC, HDL translation and migration. Tel. 0870 080 2340. JLB ELECTRONICS www.jlbelectronics.com Suppliers of electrical / electronic parts and consumables. Including: • Cable ties / bases • Tools / hardware • Bootlace ferrules • Connectors • Solvent sprays & cleaners • PVC Tape • Heat Sink compound FUTURLEC http://www.futurlec.com 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://www.ftdichip.com FTDI designs and sells j USB-UART and USB-FIFO interface i.c.’s. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB LONDON ELECTRONICS COLLEGE http://www.lec.org.uk Vocational training and education for national qualifications in Electronics Engineering and Information Technology (BTEC First National, Higher National NVQs, GCSEs and Advanced Qualifications). Also Technical Management and Languages. 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 80 elektor electronics - 10/2005 products and services directory NEW WAVE CONCEPTS www.new-wave-concepts.com Software for hobbyists: • Livewire circuit simulation software, only £34.99 • PCB Wizard circuit design software, only £34.99 Available from all Maplin Electronics stores and www.maplin.co.uk. PCB WORLD http://www.pcbworld.org.uk World-class site: Your magazine project or prototype PCB from the artwork of your choice for less. Call Lee on 07946 846159 for details. Prompt service. PICDOS™ http://www.picdos.com Hard disk, DOS & files on PIC16F877. SmartMediaTM based. No complex hardware just wires. Run-Debug existing PIC code & interrupts. Free schematics, software, debugger QUASAR ELECTRONICS www.QuasarElectronics.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@QuasarElectronics.com QUASAR altetronici ROBOT ELECTRONICS http://www.robot-electronics.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 tUXlk SHOWCASE YOUR COMPANY HERE Elektor Electronics has a feature to help customers promote their business, Showcase - a permanent feature of the magazine where you will be able to showcase your products and services. • For just £220 + VAT (£20 per issue for eleven issues) Elektor will publish your company name, website adress and a 30-word description • For £330 + VAT for the year (£30 per issue for eleven issues) we will publish the above plus run a 3cm deep full colour image - e.g. a product shot, a screen shot from your site, a company logo - your choice Places are limited and spaces will go on a strictly first come, first served basis. So please fax back your order today! I wish to promote my company, please book my space: • Text insertion only for £220 + VAT • Text and photo for £330 + VAT NAME: ORGANISATION: JOB TITLE: ADDRESS: .TEL: PLEASE COMPLETE COUPON BELOW AND FAX BACK TO 00-44-(0)1932 564998 COMPANY NAME WEB ADDRESS 30- WORD DESCRIPTION SYTR0NIC TECHNOLOGY LTD www.m2mtelemetry.com Supplier of wireless modules and accessories for remote monitoring M2M applications. •GSM/GPRS TCP/IP modules • Embedded GSM/GPRS modem • Development Kits • GPS modules • GSM/GPS antennas a • Adapter cables Online ordering facilities. Tel (01 394) 210911 ULTRALEDS UJ f - rsl * http://www.ultraleds.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. USB INSTRUMENTS http://www.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.viewcom.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 West, Plaistow, London El 3 9LT VIRTINS TECHNOLOGY http://www.virtins.com PC based virtual instrument for electronics enthusiasts, students and professionals, including full-fledged sound card real time Oscilloscope, Spectrum, Analyzer and Signal, Generator, Downloader and try. ELECTRONIC ENTHUSIASTS Only one magazine tests its projects and circuits in its own lab before publication ELEKTOR ELECTRONICS THE ELECTRONICS & COMPUTER MAGAZINE Sms Contact: Worldwide Subscription Service Ltd, Unit 4 Gibbs Reed Farm, Pashley Road, Ticehurst TN5 7HE Telephone: 01580 200657 Fax: 01580 200616 www.elektor-electronics.co.uk 10/2005 - elektor electronics 81 lektor Order o www.elektor-el Order now using the Order Form in the Readers Services section in this issue. CD-ROM Elektor 2004 This CD-ROM contains all editorial articles, with the exception of New Products items, published in Elektor Electronics magazine Volume 2004. Using the supplied Acrobat Reader program, articles are presented in the same layout as originally found in the magazine. The DiskMirror utility on this CD-ROM allows your earlier Elektor year volume CD-ROMs (1997-2003) to be added to a large archive on hard disk for fast access and easy reference. A built-in search function allows you to find refe- rences in any article from the archive on hard disk, or from individual year volume CD-ROMs you have available. £16.25 (US$ 28.75) Audio Collection 2 A unique CD-ROM for the true audio lover, containing no fewer than 75 audio designs from the past five year volumes of Elektor Electronics magazine. The articles on the CD-ROM cover test & measurement equip- ment, amplifiers, digital audio and loudspeaker technology. Highlights include the Crescendo Millennium Edition, Audio-DAC 2000, Audio- ADC 2000 and the IR-S/PDIF Transmitter and Receiver. Using the included Acrobat Reader you are able to browse the articles on your computer, as well as print texts, circuit diagrams and PCB layouts. £12.05 (US$ 21.25) ECD Elektor’s Components Data- base gives you easy access to design data for over 5,700 ICs, more than 35,000 transistors, FETs, thyristors and triacs, just under 25,000 diodes and 1 ,800 optocou- plers. All databank applications are fully interactive, allowing the user to add, edit and complete component data. £12.95 (US$22.90) More information on www.elektor-electronics.co.uk PC-Interfaces under Windows PC Interfaces can be used for more than just the printer, mouse, modem and joy- stick! While it was relatively easy to directly access PC interfaces using a DOS com- puter, under Windows things are not all that simple. This book (CD-ROM incl.) shows you how it can be done. The authors describe the DIY construction and programming of a number of highly interesting circuits. ISBN 0-905705-65-3 • 265 pages • £25.95 Handbook for sound 1 Handbook for sound technicians This book contains chapters on basic the- ory; microphones and musical instruments; various types of amplifier; loudspeakers; effects equipment; recording techniques; lighting equipment; the rehearsal room; and faultfinding and small repairs. It also contains a useful glossary of terms used in sound engineering and a list of adjectives describing sound colouring. ISBN 0-905705-48-3 • 276 pages • £20.75 BESTSELLING BOOKS Top-5 i) 308 Circuits ISBN 0-905705-66-1 £18.20 PC-Interfaces under Windows ISBN 0-905705-65-3 £25.95 Modern High-end Valve Amplifiers ISBN 0-905705-63-7 £25.95 Lasers: Theory and Practice ISBN 0-905705-52-1 £20.75 g \ Dictionary of Monitor Technology ISBN 0-905705-64-5 £25.95 More information on www.elektor-electronics.co.uk nline at ectronics.co.uk Due to practical constraints, final illustrations and specifications may differ from published designs. Prices subject to change. See www.elektor-electronics.co.uk for up to date information. ESR/C Meter Elektor Electronics (Publishing) P.0. Box 1 90 Tunbridge Wells TN5 7WY ENGLAND Telephone +44 (0) 1580 200 657 Fax +44(0) 1580 200 616 Email: sales@elektor-electronics.co.uk Kits & Modules (September 2005) Kit of parts including PCB, default LCD module, 2x16 characters and programmed controllers. Enclosure not included. 040259-71 £63.99/$ 119.95 Matching enclosing 040259-72 £6.99/$ 12.95 OBD-2 Analyser (July/August 2005) Kit of parts including PCB, programmed controller, compo- nents (including IC7 ; IC3 = PCA82C250, 12 V), enclosure and RS232 cable. OBD cable not included. 050092-71 £52 .50/ $96.95 OBD cable 050092-72 £27.55/ $51 .95 Complete kit (not inclu- ding IC3) with Lassen iQ-receiver and extra long cable, CD with software and water- proof antenna case. 040264-71 £77.65/$ 146.25 GPS Receiver on USB (June 2005) LPC210x ARMee Development System (Elektor Electronics April 2005) • Processor board, ready-built and tested 040444-91 £ 25.50 $ 48.05 • Motherboard (bare, without components) 040444-2 £ 11.70 $ 22.05 Further products from Elektor Electronics: READY-BUILT PROJECTS £ $ ClariTy 300-W Class-T Amplifier 030217-91 Amplifier board with SMDs pre-fitted; cores for LI & L2 34-50 55.70 Flash Microcontroller Starter Kit 010208-91 ready-assembled PCB incl. software, cable, adapter & related articles 69-00 112.50 Gameboy Digital Sampling Oscilloscope (GBDSO) 990082-91 ready-assembled board, incl. the PC software and related articles 103-00 183.00 Micro Webserver with MSC1210 Board 030060-91 Microprocessor Board, ready-assembled 75-90 142.95 044026-91 Network Extension Board, ready-assembled 44-50 83.95 044026-92 Combined package (030060-91 & 044026-91 & related articles) 117-50 220.95 No. 347 OCTOBER 2005 27C512 Emulator 030444-1 1 Disk, project software 030444-31 EPM7064SLC84-15, programmed 030444-41 AT90S8515-4PC, programmed Colossus Jr. 040267-1 1 Disk, PIC source code 040267-41 PIC12F675-C/P, programmed Flash Lock for PCs 050107-41 PIC1 6F628A-I/SO, programmed 050107-81 CD-ROM, project software No. 346 SEPTEMBER 2005 ESR/C Meter 040259-1 PCB, bare 040259-1 1 Disk, PIC source & hex codes 040259-41 PIC16F877-20/P, programmed 040259-42 PIC1 6F84A-20/P, programmed 040259-71 kit of parts without enclosure 040259-72 matching enclosure Hitting the High Note 040015-41 ATmega8-16PC, programmed 040015-1 1 Disk, project software 12-40 23.35 5-20 9.75 15-50 29.25 10-30 19.45 63-99 119.95 6-99 12.95 15-50 29.25 5-20 9.75 5-20 9.75 27-50 51.95 15-10 28.35 5-20 9.75 4-10 5.35 5-00 9.45 6-90 12.95 Precision Barometer/Altimeter 04031 3-1 1 Disk, project software 5-20 9.75 040313-41 PIC16F876, programmed 16-55 31.15 040313-1 PCB 7-55 14.25 Racetrack Timer 040395-41 AT89C2051-24PI 6-85 12.95 040395-81 CDROM, project software 5-15 9.75 No. 345 JULY/AUGUST 2005 1 MHz Frequency Counter 030045-1 1 Disk, project software 5-20 9.75 030045-41 AT90S231 3-1 OPI, programmed 5-50 10.35 Code Lock with One Button 040481-1 1 Disk, source & hex files 5-20 9.75 040481-41 PIC16F84, programmed 6-85 12.95 Digital VU Meter 0501 1 8-1 1 Disk, Attiny software 5-20 9.75 050118-41 Attiny 15L, programmed 3-40 6.45 DIL/SOIC/TSSOP Adapter Boards 040289-1 PCB, for 20-way DIL 1C 6-75 12.70 040289-2 PCB, for 20-way SOIC 1C 6-75 12.70 040289-3 PCB, for 20-way TSSOP 1C 6-75 12.70 MP3 Adaptor for TV 054035-1 PCB, bare 3-95 7.50 054035-1 1 Disk, project software 5-20 9.75 054035-31 EPM7064SLC44-10, programmed 27-55 51.95 OBD-2 Analyser 050092-1 PCB, bare 8-95 16.85 050092-41 T89C51CC02UA, programmed 26-20 49.40 050092-71 Kit of parts without cable 52-50 96.95 Products for older projects (if available) may be found on our website www.elektor-electronics.co.uk home construction = fun and added value INFO & MARKET SNEAK PREVIEW Electronics Software Free CAD software with the November issue. Software for electronics designers is gaining momentum. Drawing circuit diagrams, simulating them and designing a PCB, it's all done on a PC these days. CAD software that's of interest to the electron- ics engineer usually covers the complete design cycle from schematics entry right up to circuit board design. The November 2005 issue allows you to delve into the subject. Besides a few articles about E-CAD we also offer you a plethora of software packages (demos and trial ver- sions but also fully functional software) to experiment with to your heart's content. Do not miss this special issue! Modular Design with E-Blocks A lot is changing in electronics. In the old days, designers were busy wielding a solder iron and discrete compo- nents by the cartload. By contrast, today's designs consist mostly of software, the hardware being reduced to a few standard building blocks used in lots of applications. By introducing the E-Blocks modular electronics design system Elektor Electronics presents an extensive and affordable series of hardware and software mod- ules with extremely high educational value. Writing E-Blocks software is a breeze thanks to Flowcode which also works with modular blocks. Next month we will introduce the system. Theme Plan for 2005 January Power Supplies February . . . .Wireless March Sound April Microcontrollers May Sensors June Environment July/August . .Summer Circuits September . . .Test & Measurement October Security November .CAD Soi December . . .Optoelectronics RESERVE YOUR COPY NOW! The November 2005 issue goes on sale on Saturday 22 October 2005 (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 Name: Address: Post code: Telephone: Date: Signature: lektor lectronics leading t he w a y 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 Allgood Technology, Showcase www.allgoodtechnology.com 80 Audioxpress, Showcase www.audioxpress.com 80 Avit Research www.avitresearch.co.uk 53 Beta Layout, Showcase www.pcb-pool.com 47, 80 Bitscope Designs www.bitscope.com 27 Breadboarding Systems www.breadboarding.co.uk 3 Burn Technology LTD, Showcase www.burntec.com 80 CMS www.cms.uk.com 47 Compucut, Showcase www.compucutters.com 80 Conford Electronics, Showcase www.confordelec.co.uk 80 Cricklewood www.cricklewoodelectronics.com 53 Danbury, Showcase www.livinginthepast.demon.co.uk 80 Display Electronics www.distel.co.uk 76 Easysync, Showcase www.easysync.co.uk 7, 80 Elnec, Showcase www.elnec.com 80 Eurocircuits www.thepcbshop.com 25 ExpressPCB www.expresspcb.com 25 Fast Components www.fastcomponents.co.uk 53 Forest www.fored.co.uk 26 Future Technology Devices, Showcase . . .www.ftdichip.com 80 Futurlec, Showcase www.futurlec.com 80 ILP Electronics Limited, Showcase www.ilpelectronics.com 80 Ipeva Limited, Showcase www.ipeva.com 80 Jaycar Electronics www.jaycarelectronics.co.uk 2 JLB Electronics, Showcase www.jlbelectronics.com 80 Labcenter www.labcenter.co.uk 88 Lichfield Electronics www.lichfieldelectronics.co.uk 47 London Electronics College, Showcase . .www.lec.org.uk 80 MQP Electronics, Showcase www.mgpelectronics.co.uk 80 New Wave Concepts, Showcase www.new-wave-concepts.com 81 Number One Systems Nurve Networks PCB World, Showcase Picdos, Showcase Pico Quasar Electronics, Showcase . RD Research Robot Electronics, Showcase . . ScanTool Showcase Sytronic Technology, Showcase Total Telematics Ultraleds, Showcase University of Manchester USB Instruments, Showcase . . Viewcom, Showcase Virtins Technology, Showcase . www.numberone.com 37 www.xgamestation.com 53 www.pcbworld.org.uk 81 www.picdos.com 81 www.picotech.com 37 www.guasarelectronics.com 71, 81 www.spice-software. com 13 www.robot-electronics.co.uk 81 www.obdcables.com 25 80, 81 www.m2mtelemetry.com 81 www.total-telematics.com 25 www.ultraleds.co.uk 81 www.saelig.com 6 www.usb-instruments.com 81 www.viewcom.f9.co.uk 81 www.virtins.com 81 Advertising space for the issue of 15 November 2005 may be reserved not later than 18 October 2005 with Huson International Media - Cambridge House - Gogmore Lane - Chertsey, Surrey KT 1 6 9AP - England - Telephone 01 932 564 999 - Fax 01 932 564998 - e-mail: r.elaar@husonmedia.com to whom all correspondence, copy instructions and artwork should be addressed. 84 elektor electronics - 10/2005 Please supply the following. For PCBs, 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. Description Price each Qty. Total Order Code Microcontroller Basics dLfll £ 18.70 W ' 1 Flash Microcontroller Starter Kit £ 69.00 0 BD- 2 -Analyser: Kit of parts £ 52.50 DB 9 to OBD adapter cable £ 27.55 ESR/C Meter: Kit of parts £ 63.99 Matching enclosure £ 6.99 Prices and item descriptions subject to change. The publishers reserve the right to change prices without prior notification. Prices and item descriptions shown here supersede those in previous issues. E. & O.E SWITCH only: issue number: Sub-total P&P Total paid Name 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) Giro transfer (our account no. 34 152 3801) Postal/money order i r Expiry date: Please send this order form to * (see reverse for conditions) Elektor Electronics (Publishing) P.O. Box 1 90 Tunbridge Wells TN5 7WY ENGLAND Address Post code Tel. Fax Email Date - - 2005 Signature ELIO Yes, I am taking out an annual subscription to elektor electronics and receive a free 1 W Luxeon LED Torchlight. I would like: Standard Subscription (11 issues) Subscription-Plus (11 issues plus the Elektor Volume 2005 CD-ROM) * Offer available to Subscribers who have not held a Subscription to Elektor Electronics in the last 12 Months. Offer Subject to Availability. See reverse for rates and conditions. Title (Dr/Mr/Mrs/Ms*) Initials Surname Name Address Post code Email Date - - 2005 Signature * cross out what is not applicable ELIO Tel.: (+44) (0)1580 200 657 Fax: (+44) (0)1580 200 616 Internet: www.elektor-electronics.co.uk *USA and Canada residents may (but are not obliged to) use $ prices, and send the order form to: Old Colony Sound Lab P.O. Box 876, Peterborough NH 03458-0876. Tel. (603) 924-6371, 924-6526, Fax: (603) 924-9467 Email: custserv@audioXpress.com 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) □ Giro transfer (our account no. 34 152 3801) □ Postal/money order □ Expiry date: Please send this order form to Worldwide Subscription Service Ltd. Unit 4, Gibbs Reed Farm Pashley Road Ticehurst, nr. Wadhurst East Sussex ENGLAND TN5 7HE Tel. (+44) (0)1580 200657 Fax (+44) (0)1 580 20061 6 Email admin @ worldwidesubscriptions.com ORDERING INSTRUCTIONS, P&P CHARGES 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: £4.00 Europe: £5.00 (Standard) or £7.00 (Priority) Outside Europe: £8.00 (Standard) or £12.00 (Priority) HOWTO 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-152-3801 by completing and sending to the National Giro Centre, in a National Giro post- age 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’ ster- ling 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 3512 5225, Sorting Code 60-22-15. IBAN code: GB40 NWB K6 022 15 3512 5225 BIC code: NWB KGB 2L COMPONENTS 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, devi- ces, 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 carriers 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 permis- sion 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 per- mission. 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 2005 SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION United Kingdom Standard £39.50 Plus £46.00 Economy Mail Rest of the World (excluding Europe) £51 .30 £57.80 Priority Airmail Europe & Eire £51 .30 £57.80 Outside Europe £65.00 £71 .50 Airfreight USA & Canada only US$88.00 US$98.00 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); • US$ 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 3512 5225, Sorting Code 60-22-15. IBAN code: GB40 NWB K6 022 15 3512 5225 BIC code: NWB KGB 2L • 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 2005 Straight from the heart of electronics each month This Issue: SECURITY Personal, PC and the hom< Select your own annual subscription and receive a free 1 W Luxeon LED Torchlight Available options: • Elektor Electronics annual subscription (standard) You receive 1 1 issues, including the July/August double issue. • Elektor Electronics annual subscription-PLUS You receive 1 1 issues, including the July/August double issue, plus a copy of the Elektor Electronics Volume 2005 CD-ROM (normal price £16.25). Your saving: approx. £10.00! Please fill out the Order Form with this issue. Subscription rates and conditions may be found at the back of this issue. Schematic & PCB Layout JLU ! JL J ■ a 1 • I E i Mm Schematic i f jf i V 1 ■ 1 u I 1,1 ■! .1 » * i, m i jf CFU Wodeff Auto Routing naMptufufti ^ Virtual System Modelling New Features £-4 in Version 6.8 Interactive Design Rule Check, Mitring / Unmitring. Enhanced track editing. The Complete Electronics Design System 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. Mixed Mode SPICE Circuit Simulation • Struct/Array expansion. • ELF/DWARF file loader. • 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. • Expanded model libraries. Call Now for Upgrade Pricing Proteus VSM - Co-simulation and debugging for popular Micro-controllers Supports PIC, AVR, 8051, ARM7 and BASIC STAMP 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. Compatible with popular compilers and assemblers from Microchip, Crownhill, IAR, Keil, and others. Electronics 53-55 Main Street, Grassington. BD23 5AA Tel: 01756 753440 Fax: 01756 752857 Contact us for Free Demo CD ARM/LPC2000 MODELS FOR PROTEUS VSM NOW AVAILABLE www.labcenter.co.uk info@labcenter.co.uk