9 770268 451128 SEPTEMBER 2006 £3.80 www.elektor-electronics.co.uk Your circui hoi on! 0800 032 7241 Log on to www.jaycarelectronics.co.uk/catalogue for your FREE catalogue! (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 Pommy Want a Cracke r? A cracker of a catalogue that is! a K (It's t Pa ® e ° f ° Ur vn ^iav? Cker ' ) lo 9 or, I" 0 '* A *trai ia ' A " prices £ Stg alo< Starship Enterprise Door Sound Simulator KC-5423 £11.75 + post & packing This easy to build kit emulates the unique noise made when the cabin doors on the Starship Enterprise open and close. The 'shut' noise is also duplicated. The sound emulator can be triggered by switch contacts (normally open), which means you can use a reed magnet switch, IR beam or PIR detector. Kit includes a machined silkscreened, and pre-drilled case, speaker and all electronics components with clear English instructions. • Requires 9-12VDC power T1 linear ■*“*** * hemr - Two-Way SPDIF/Toslink Digital Audio Converter Kit KC-5425 £7.25 + post and packing This kit converts coaxial digital audio signals into optical or vice-versa. Use this bit stream converter in situations where one piece of equipment has an optical audio input and the other a coaxial digital output. Kit includes Toslink optical modules, PCB with overlay, case with screen printed lid, all electronic components and clear English instructions. POST AND PACKING CHARGES: Order Value £20 - £49.99 £5 £50 - £99.99 £10 £100 -£199.99 £20 Max weight 121b (5kg). Heavier parcels POA. Minimum order £20. Order Value £200 - £499.99 £30 £500+ £40 Theremin Synthesiser Kit KC-5295 £14.75 + post and packing The Theremin is a musical instrument that was invented * last century. By moving your hand between the antenna and the metal plate, you create strange sound effects. Kit includes a machined, silkscreened and pre-drilled case, circuit board, all electronics components and clear English instructions. l 7 / x As used in 'X- the Beach Boys classic hit "Good Z__ Vibrations' ^ \ N ^ For all you Trekkie fans - Battery Zapper Mkll KC-5427 £29.00 + post & packing This kit attacks a common cause of failure in wet lead acid cell batteries: sulphation. The circuit produces short bursts of high level energy to reverse the damaging sulphation effect. This improved unit features a battery health checker with LED indicator, new circuit protection against badly sulphated batteries, test points for a DMM and connection for a battery charger. Kit includes case with screen printed lid, PCB with overlay, all electronic components and clear English instructions. Suitable for 6, 12 and 24V batteries • Powered by the battery itself Requires 9-12VDC wall adaptor (Maplin #JC91Y £14.99) High Requires 9VDC wall adaptor (Maplin #GSR74R £9.99) Performance Electronic Projects for Cars Book J^We stock an extensive range^ of quality automotive kits _ BS-5080 £7.00 + 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. The book includes all instructions, components lists, colour pictures, and circuit layouts. There are also chapters on engine management, advanced systems and DIY modifications. Over 150 pages! All the projects are available in kit form, exclusively to Jaycar. Check out our website for all the details. Hand Controller for Digital Adjusters KC-5386 £25.95 + post & packing This hand controller is used for mapping/programming the independent electronic boost controller Kit (shown below). It features a two line LCD, and easy to use push buttons. It can be used to program the adjusters then removed, or left permanently connected to display the adjuster s operation. It is designed as an interface and display, and is not __ required for general adjuster functions after they have been programmed. Kit supplied with silkscreened and machined case, PCB, LCD, and all electronic components. Smart Fuel Mixture Display KC-5374 £8.95 + post & packing This kit features auto dimming for night driving, emergency lean-out alarm, better circuit protection, and a 'dancing' display which operates when the ECU is operating in closed loop. Kit supplied with PCB and all electronic components. • Car must be fitted with air flow and EGO sensors (standard on all EFI systems) for full functionality. Independent Electronic Boost Controller KC-5387 £25.95 + post & packing Superb control over your turbo boost curve. It can be used in cars fitted with factory electronic boost control using the factory control solenoid, or cars without electronic boost control using a solenoid from a wrecker etc. This is ideal for switching between say, a race/street mode, or a performance/wet weather mode. Boost curve selection is via a dashboard switch, and is all programmed using the handheld digital controller KC-5386 (shown above). Kit supplied with PCB, machined case, and all electronic components. Suitable for EFI and engine management systems only Recommended box UB3 (HB-6014) £1.40ea Picture shows Spray Controller fitted to the Display Kit. Add on Intercooler Water Spray Controller for Fuel Mixture Display Kit KC-5422 £3.00 + post & packing Simply add these few components to the Smart Fuel Mixture Display Kit (KC-5374) shown above and reduce water consumption by up to two-thirds. M ikroE ektron ka MICROCONTROLLER DEVELOPMENT TOOLS Make PIC development easy with the EasyPIC3 Starter Pack - only £99! A development system designed to make developing and experimenting with PIC microcontrollers easy and ideally suited to beginners. • High quality development/experiment board with built-in USB 2.0 pro- grammer and useful I/O devices. • Can be powered from your PC’s USB port or optional mains adapter. • Compatible with Windows 98/ME/NT4/2000/XP. • Supports virtually all 8, 14, 18, 28 and 40-pin PICmicro® devices in the 10F, 12F, 16F and 18F families. • Built-in I/O devices include switches, LEDs, seven-segment displays, potentiometers and RS-232 interface. • Connectors for character and graphic LCD modules, DS1820 tempera- ture sensor, and USB and PS/2 interfaces. • All I/O lines available for off-board expansion. • Useful add-on boards available separately (see below). • BASIC, C and Pascal compilers available separately (see below). • Starter Pack includes PIC16F877A microcontroller, DS1820 tempera- ture sensor, 16x2 character LCD, 128x64 pixel graphic LCD, RS-232 data cable, and USB programming cable for just £99. EasyPIC3 Add-on Boards - from £4.95 A range of add-on boards for use with the EasyPIC3 or in conjunction with your own designs. • DAC (12-bit D/A with SPI interface) - £9.95 • ADC (4-channel 12-bit A/D with SPI interface) £13.95 • ACCEL (2-axis accelerometer) - £1 1 .95 • 485 (RS-485 interface) - £10.95 • CAN1 (CAN transceiver for CAN-enabled PICs) - £10.95 • CAN2 (CAN transceiver with SPI CAN controller) - £12.95 • KEYPAD (4x4 matrix keypad) - £4.95 • IRDA1 (IrDA transmitter/receiver) - £13.95 • IRDA2 (wireless RS-232 communications) - £13.95 • ETHERNET (SPI serial Ethernet controller) - available soon • RTC (battery-backed real-time clock) - £10.95 • CF (Compact Flash card reader) - £10.95 • MMC (MMC/SD card reader) - £10.95 • EEPROM (I2C EEPROM) - £4.95 mikroBASIC, mikroC and mikroPascal compilers - save 30% Three easy to use yet powerful compilers for PIC microcontrollers, ideal for beginners and experienced programmers alike. • Support for PIC12, PIC16 and PIC18 devices. • User-friendly integrated development environment (IDE), compatible with Windows 98/ME/NT4/2000/XP. • Highly adaptable code editor with useful features. • Useful tools include USART terminal, 7-segment display decode and ASCII chart. • Built-in routines support all EasyPIC3 I/O devices and add-on boards 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. • 30% discount for customers purchasing EasyPIC3. • mikroBASIC - £85 (£59.50 with discount) • mikroC — £145 (£101.50 with discount) • mikroPascal - £85 (£59.50 with discount) Call 0845 226 9451 or order online at www.breadboarding.co.uk All prices exclude UK delivery (£5 normal/£10 next-day) and VAT. Major credit and debit cards accepted. Secure online ordering. 9/2006 - elektor electronics 3 Say, one hundred and twenty-five thousand cards Here at Elektor we're never stuck for ideas, enthusiasm, inspiration and gusto when it comes to publishing a high quality magazine on electronics. And that's despite the onslaught, in the UK newsstands, on specialist and trade magazines like ours in favour of publications carefully described as 'having a wider appeal to the general public'. Fortunately, over the past few months sales of Elektor Electronics magazine have increased to the extent that we're on the verge of re-entering the infamous 'Top-1000' of magazine titles sold through WH Smith — thank you all for your persistence in looking for our magazine! We get a lot of inspiration from you, our readers, but also from profession- als in the industry we speak to from time to time (in various languages). To cut a long story short, the result of talk- ing to just a few people (best described as being in the right place as well as fully aware of Elektor's potential) is attached to this very copy of the magazine: a free RFID card con- taining a unique hexadecimal number string. Although RFID gets a lot of attention these days and the associated industry is used to handling really tall orders, our contact persons at Philips and ACG took a deep breath when told them we needed 1 25,000 cards to go with the full European print run of the magazine. After some more sighing and moaning from the printers, binders and the odd local distributor, everyone agreed that Elektor's Giant RFID Card Quest went to prove that there may be some truth after all in the byline 'leading the way' we print with our masthead and logo. As far as I know, no other magazine has ever supplied free RFID cards in such great numbers as we're about to do with this September 2006 issue. It's a milestone and I' m sure the results of giving away a really useful item with the magazine will provide us with yet more inspira- tion and zest — they're catalysts really in the publication process we run every month for you. Jan Buiting, Editor ding th w V Ulel! i jor With this issue we're offering a free RFID card and description of a professional RFID reader for your own applications. The design described here can both read from and write to all types of RFID card that are compatible with the MIFARE and ISO 14443-A interna tional standards. 1 4 RFID Chips Greet the Future RFID labels can be used to mark racing horses as well as containers, scooters and perfume packages. Pass- ports and sporting- event tickets can also be fitted with RFID chips. The underlying technology is just as varied ; the potential applications. 70 USB/DMX5 12 Converter Here is a project that will make some on the dance floors very happy... a DMX converter that will set you back just a few pounds. CONTENTS G&* '“h* Z ,oes ' Hfi, , ' ' - de 'TOf/ / uuh f f Viti ! Wu \1 m , Ihtt ttojr / 'AS*** 7 ~™'* r *w*:7 3! / / i "if Mm \ JJj J/M y m \ \ \ ~ ■ - s * 1 1 WsEzZvl ^ — Ready-built PCB available! Volume 32 September 2006 no. 357 know-how 40 Cubesats into Free Orbit hands-on The Elektor Electronics RFID Card 26 Elektor RFID Reader 34 Experimental RFID Reader 46 DiSEqC Monitor 6 ( FPGA Course (4) 64 Electronic Stamping USB/DMX51 2 Converter 76 Design Tips Miniature tweezers for SMDs technology 1 4 RFID Chips Greet the Future E-blocks Easy ARM Pack 56 Upgrade for Flash Microcontroller Board Cubesats into Free Orbit The Delfi-C3 satellite designed by undergraduates offers its transponder and even asks amateurs to actively participate in its space mission. Taking your own pictures from space will soon be possible with the Compass- 1 , another amateur satellite. But can we shoot our own satellite into space? info & market 6 Colophon 8 Mailbox News & New Products 81 Elektor SHOP 84 Sneak Preview infotainment 20 RFID Card Quest 75 Retronics: Pontavi-Thomson Bridge Hexadoku lektor lectronics Volume 32, Number 357, September 2006 ISSN 0268/45 1 9 Elektor Electronics aims at inspiring people to master electronics at any personal level by presenting construction projects and spotting developments in electronics and information technology. Publishers: Elektor Electronics (Publishing), Regus Brentford, 1000 Great West Road, Brentford TW8 9HH, England. Tel. (+44) (0) 208 261 4509, fax: (+44) (0) 208 261 4447 www.elektor-electronics.co.uk. The magazine is available from newsagents, bookshops and electronics retail outlets, or on subscription. Elektor Electronics 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: 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: Carlo van Nistelrooy Customer Services: Margriet Debeij (m.debeij@segment.nl) Subscriptions: Elektor Electronics (Publishing), Regus Brentford, 1000 Great West Road, Brentford TvV8 9HH, England. Tel. (+44) (0) 208 26 1 4509, fax: (+44) (0) 208 26 1 4447 Internet: www.elektor-electronics. co.uk Email: subscriptions@elektor-electronics.co.uk Rates and terms are given on the Subscription Order Form Head Office: Segment b.v. PO. Box 75 NL-6I90-AB Beek The Netherlands Telephone: (+31)46 4389444, Fax: (+31)46 4370161 Distribution: Seymour, 2 East Poultry Street, London EC I A, England Telephone: +44 (0)207 429 4073 UK Advertising: Huson International Media, Cambridge House, Gogmore Lane, Chertsey, Surrey KTI 6 9AR England. Telephone: +44 (0) 1 932 564999, Fax: +44 (0) I 932 564998 Email: r.elgar@husonmedia.com Internet: www.husonmedia.com Advertising rates and terms available on request. International Advertising: Frank van de Raadt, 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 published 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 pho- tocopying, scanning an recording, in whole or in part without prior written permission from the Publishers. Such written permission 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, compo- nents etc. described in this magazine. The Publisher does not accept responsibility for failing to identi- fy 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 activ- ities. 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. 2006 Printed in the Netherlands www.ElmScan5.com/epe • Diagnose any car with EOBD • Based on the ELM327 1C • Supports all EOBD and OBD-II protocols s ISO 1 5765-4 (CAN) S ISO 1 4230-4 (Keyword 2000) s IS09 141-2 s JI850 VPW s J 1 850 PWM • 9600 or 38400 baud • Supported by more software than any other OBD interface, including free and open source software • Inexpensive • Automatic protocol detection • Package includes cables, software CD, and Quick Start Guide • Buy from your local UK distributors! ClmScan 5 Scon Tool Your price conscious PCB supplier Online price calculation Online ordering Online order tracking Online 24/24H and 7/7D a la carte Interested? Contact us: +32 15 28 16 30 E-mail: euro@eurocircuits.com www.eurocircuits.com pooling for standard boards up to 6 layers from 1 to 1000 pieces from 4 working days onwards - technology at the right price - up to 8 layers - from 1 to 1000 pieces - from 3 working days onwards your board, our challenge up to 20 layers from 1 piece onwards from 2 working days onwards 6 elektor electronics - 9/2006 BitScope Pocket Analyzer 8 Channel 40MS/s Logic Analyzer Capture digital signals down to 25nS with arbitrary trigger patterns. USB Oscilloscope <& Logic Analyzer The new generation Scope for the age of microelectronics. 3 Input 100MHz Analog DSO Classic Analog Scope using a standard xl/xlO BNC probe. Additional inputs on the POD for dual channel operation. 8 + 1 Mixed Signal Scope True MSO to capture an analog waveform time-synchronized with an 8 channel logic pattern triggered from any source. Real-Time Spectrum Analyzer See the spectrum and waveform of analog signals simultaneously and in real-time Waveform Generator ( Load up to 32K arbitrary waveform and replay via the onboard DAC (lOMS/s) or a digital pattern from the POD (40MS/s) Turn your PC or NoteBook into a powerful Scope and Logic Analyzer! See inside your circuit in the analog and digital domains at the same time to make tracking down those elusive real-time bugs much easier. Pocket Analyzer combines a high speed sample-synchronized storage scope and logic analyzer with a programmable waveform and logic pattern generator. Also included is an integrated real-time spectrum analyzer and powered "Smart POD" expansion interface so you've got all bases covered! About the same size and weight as a Pocket PC, this USB powered BitScope needs no bulky accessories. It's the perfect low cost "go anywhere" test and debug solution. Standard 1M/20pF BNC Input 200uV-20V/div with xIO probe S/W select AC/DC coupling S/W select 50ohm termination Arbitrary Waveform Generator BitScope "Smart POD" Connector 8 logic channels, 2 analog channels Dual channel capture from POD A/B Async serial I/O for external control Logic Pattern generator 32K 40MS/s BUS Powered USB 2.0 Device Single USB cable to your PC Compressed data transmission Simple ASCII control protocol BitScope Scripting Language External/Passthru Power Supply Auto senses an external supply - removes power load from USB for use with unpowered hubs. Supplies up to 500mA via POD BitScope and your PC provide an array of Virtual Instruments • R&D • Education • Robotics • Lab Scope • Fast DAQ BitScope DSO 1.2 software for Windows and Linux BitScope Pocket Analyzer uses highly integrated Surface Mount technology to provide functionality you would expect from scopes many times the size and price. Its programmable Virtual Machine architecture means new functionality can be added via software. For custom Data Acquisition, export directly to your spreadsheet. www . bitscope . com 9/2006 - elektor electronics 7 INFO & MARKET MAILBOX Brushless Motor Controller Dear Elektor people — I'm definitely interested in your brushless motor controller (February 2006) but have run into a few problems while studying the design in some detail. 1 . In Figure 5 (control mod- ule schematic), the connec- tion to +5 V on K3 (channel from/to transmitter) is miss- ing. On the PCB this connec- tion is present. 2. The pdf file supplied free of charge by the author men- tions a 'buzzer mode'. Also, it says that the configuration may be followed by means of 'beeps' from a 'buzzer' which I con no find any- where in the design. How do I proceed? I would like to use this con- troller with a modified power stage in a model car that def- initely requires active brak- ing. The default settings men- tioned in the pdf do not agree with those in the mag- azine... I gues the pdf and the controller are not too well matched. 214820 (by email) We confirm that the circuit dia- gram in Figure 5 fails to show that the centre pin of K3 is at +5 V, and that all +5 V points in the diagram are connected to this pin. The PCB however has all the right connections. This may be the cause of some confusion for which we apologise. The 'buzzer' in the pdf document is the motor itself ; which will pro- duce a buzzing sound when repeatedly reversed at a high rate. Useful if your model car careers into the undergrowth! The default settings are best taken from the pdf document. We hope you will get your model car on the asphalt soon! Old PCB numbers Dear Jan — while rummag- ing around on my loft I found an old Elektor printed circuit board numbered 'EPS 9860' I cannot remember anything about. The centre of the board has an LM324, two presets, diodes and a couple of electrolytics. Is this some kind of tone control or ampli- fier? Tanglung (Singapore) The EPS number 9860 is for a Peak Programme Meter from the January 1 978 issue. The number may be confusing in this day and age because of the fist two digits '98'. In the old days (we're talk- ing about almost 30 years ago) a different PCB numbering system was used. Starting with the July/August 1 978 double edition , a 5 -digit PCB production number was adopted , for example , 78003, but only for Summer Cir- cuits projects. The first two digits then indicate the year in which the project was first filed for pub- lication. By November 1 978 all articles got the 5-digit code, the first number issued being 7900 1 . In January 1 988 the system num- bering was expanded to six digits , with the third digit (e.g., '4') indi- cating a Summer Circuits article (e.g., 884056). From March 2000 on, any software and other article-related items followed this number system by means of an extension. Before this change, software items were consecutively numbered, independently of the article number. Elektor production number extensions -1 though -9 are reserved for PCBs; - 1 1 through -19 for floppy disks and downloads ; -41 through -49 for controllers and -91 through -99 for modules, kits and the like. A special Forum topic is available on our website to help readers find articles from Elektor issues published before 1 995. Provided an EPS number and/or an exact article title can be supplied, any article since 1 975 can be sup- plied as a photocopy and sent by post. We are however unable to find old articles based on vague or incorrect information. FPGA, Colossus New & Old Dear Jan — I am reading your FPGA Course articles with interest. This is (coincidentally) in par- allel with finding out more about the secret UK code breaking electronic computer of 1943 - 'Colossus' — which has been rebuilt and Bill Tutte's amazing statistical analysis of the German High Command Lorenz machi ne messages on which it was based. I have sent you a card showing the original (card reproduced here cour- tesy of Bletchly Park Trust Ltd, Ed.). I was intrigued by the links between the two (Colossus was a switch programmed gate array computer with an architecture based on the derived structure of the Lorenz machine wheels) and saw that Mike Simpson ('Colossus Jr', Elektor Electronics October 2005) is obviously very familiar with this work. I think it should be possible to build fast versions of Tunny (the electronic valve emulator of Lorenz) and Colossus with an FPGA, using a gate layout a bit like the original archi- tectures. Do you or Mike Simpson know if anyone has been inclined to try? The 800-MHz Pentium emula- tor of Colossus runs slower than the valve and paper tape original, but it is of course a series emulation using software modulo-2 addition rather than using hard wired five bit parallel 0.5-MHz XOR adders like the original. It would be interesting to see how fast a 50-MHz FPGA emulator could run, though the subject is probably far too specialised to interest the general reader! Robert Cochrane (UK) Thank for the interesting email and the nice postcard Robert! I have copied your message to Paul Goossens, our in-house FPGA pundit and await his response to the challenge. £20 Sweex Router turned Webserver Dear Jan — referring to the February 2006 Modding & Tweaking pages, I can now send strings from a web page to the second serial port and there is no "terminal chatter" to mess things up. See www.sunspot.co.uk/Projects/ SWEEX/ second_rs23 2 . html and www.sunspot.co.uk/Projects/ Sweex.htm 8 elektor electronics - 9/2006 I am trying to persuade the 'Linux Gods' to let hardware enthusiasts use their product as an 'Embedded Linux Distro' — one is working well enough to be of use and can be downloaded. They seem to modify Linux for its own sake — I want a tool to control hardware — hence my website. Please keep the Jeroen Domburg projects coming — but support a proper 'distro' tool for use of those of us who solder. The files on the USB stick can be modified without needing to change the router firmware from that published by Elektor. Your author Jeroen Domburg led me into a new world of embedded Linux — trouble is they are all experts out there and there is almost no basic tutorial for an absolute begin- ner like me. You should have printed a health warning ! But then I may not have jumped and I am glad I did. I only think a few of us did though. I would love to see such a tutorial in Elektor. At below £20 all in the Sweex etc. are fantastic plat- forms compared to the aver- age micro board. Pay Jeroen to build an Embedded Linux "distro" that addresses all the ports and is easy to customise — avail- able from your site(?) Graham (by email and on EE Forum) Glad to see that the article spurred you into learning a bit about embedded Linux , Graham. The monthly Modding & Tweak- ing pages supplied by Jeroen are currently among the most popu- lar in our magazine. See also ' Electroshack ' in the July August Corrections & Updates 2006 issue for a better appraisal of Jeroen's "general approach" to electronics. ARMed for IDE, and more Dear Jan — In the April 2005 issue you asked for details of practical applica- tions for the Elektor Electronics ARMee Development System. I use my board as a test bed for embedded code development and to test other hardware. I do a lot of long term tests logging the results over sever- FPGA Prototyping Board March 2006, ref. 050370-1 A small number of FPGA Prototyping Boards from the first production batch have six SMD electrolytic capacitors fitted the wrong way around: C5, C6, C 7, Cl 3, Cl 4 and Cl 5. The dash on these capacitors has to be at the side of the connectors. If they are at the side of the LCD, there are two options: 1 . you remove the capacitors and refit them with the correct orientation; 2. you return the FPGA board to us and we will do the above free of charge. In any case, do not apply the supply voltage before it has been ascertained that the six electrolytics are fitted the right way around. al hours or days. To this end, I designed an IDE interface board inspired by a couple of similar designs in Elektor (see photo). I can connect one or more hard disks, a CDROM drive and a CF card. I wrote FAT and ISO fil- ing system drivers — all in all a very useful little system. I designed it in a way that allows more than one card to be plugged into the expan- sion connector at the same time (using a simple parallel bus) so my setup actually consists of an ARMee board connected to a 4-slot back- plane. Then each card plugs into the backplane. However, I haven't yet got round to making any other types of boards, though I do have a paper design for an I/O card with A/D, D/A, relays, more digital I/O etc. I also thought of designing a completely new system with an ARM9 core on a board that plugs into the backplane. This would be a much more flexible, modular system which could be expanded easily. Just a thought. Please can you pass this info on to the designer. Dave (UK) Good to see Dave that our arti- cles , boards and software have enabled you to actually build such an impressive system. This sort of information is very rewarding not only for the respec- tive authors but also for us editors and designers working in a pub- lishing company. AA cells fully charged? Dear Editor — several of my colleagues and myself have built this useful piece of equipment (Simple Rechargeable AA Cell Characteriser, April 2006, Ed.) and have found that not only does it check the quality of an AA cell but it also checks the amount of charge that different chargers put into the cells. I get between 98% and 103% of the rated capacity from my cells but one col- league was only getting 70% or so and blamed his cells. A quick swap of cells and charging on my charger pro- duced in excess of 95%. The result is that this tester is a good way of checking that your charger is doing what it is required to do. It is point- less getting higher and high- er capacity cells if your charger is not fully charging them. Geoff Moore (UK) The article produced a good response and other readers have informed that it has enabled them to once and for all sort out ongo- ing problems in the ' battery department '. 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, 1000 Great West Road, Brentford TW8 9HH, England. 9/2006 - elektor electronics INFO & MARKET NEWS & NEW PRODUCTS Compact varifocal camera deView has launched its new Var- ifocal Day/Night IR Bullet camera to meet the demand for high per- formance compact cameras. Claimed an excellent choice for active monitoring and surveil- lance programs, the varifocal Sony 1 /3-inch CCD compact camera features built in infra-red LED with automatic backlight compensation. The 480 TV line colour camera is equipped to operate in various light condi- tions, automatically switching from colour images to high sen- sitivity monochrome-mode in low light environments. Designed for discreet surveil- lance and easy installation, the bullet camera has an attractive alu- minium weatherproof housing together with slide-on sun shield and optional adjustable mount- ing bracket. This aesthetically pleasing product can be installed internally and exter- nally. Ideal for industrial and domestic property, commercial buildings and public buildings such as hospitals, schools, air- ports, ports etc. www.deview.com. (067 1 I I - 1 0) New generation Dataman universal USB programmers Dataman has launched a new range of truly universal pro- grammers built to meet the demands to support all device technologies. The new pro- grammers all have a USB2 interface, which will particu- larly suit the needs of those engineers who prefer to use a laptop for program develop- ment. The Dataman-40Pro is a small, fast and portable pro- grammer with a 40 pin socket designed to support a wide range of memory and logic devices, including the latest low voltage chips. It is ideal for the engineer on-the-move who needs to set up his working environment quickly in a small space. The Data man -48 Pro is for engineers who want the best programming speeds and need to cover the widest possible range of memory and logic parts. It supports over 25,000 devices, from 5 volts down to 1 .5 volts. Large quantities of chips can be programmed more quickly by connecting multiple 48Pro pro- grammers to the same PC. This setup will work either as a gang programmer or to program chips with different data simultane- ously. The Dataman-40Pro and Data- man-48Pro both have an In Sys- tem Programming (ISP) connec- tor with a JTAG interface, which programs chips whilst still inside the end target system. The Data man -448 Pro is built to meet the demands of high vol- ume production programming with minimal operator effort. The Dataman-448Pro features four independent universal program- ming modules with support for over 22,000 devices. The new programmers are operated from an easy to use Windows interface. Software to cover new chips is released every 2-3 weeks and may be freely downloaded from Data- man's website. To show their confidence in these new products Dataman is covering them for a 3 year warranty period. (067 1 92- 1 www.dataman.com New searchable listing of European technology events Tech Event Guide Ltd announces a new searchable online data- base which aims to become the definitive free listing of technol- ogy events throughout Europe. Unlike other listings, the online Tech Event Guide (ww w. tec heventgu ide.com) includes information on key industry shows and conferences as well as company-specific sem- inars and training days provided by manufacturers and distribu- tors. Registration to the site is free and l*T"^ IVIII-l h.4. iluRi. electronics engineers can browse a continually updated list of events by date, name or loca- tion, or make a selective search for events by location and key products areas such as Ana- logue, RF and Microwave, FPGAs, ASICs, & Logic, Power and Power Supplies, Processors, Microcontrollers and DSC or industry sectors such as Automo- tive & Transport, Aerospace and Defence, Communications & Networking, Control & Automa- tion or EDA/Design Tools. 10 elektor electronics - 9/2006 Users can download registration forms and event literature directly from the Tech Event Guide website or to click a link through to the event's own web- site for additional information. Once registered, users can cre- ate their own 'My Tech Event Guide' profile so that they can monitor every opportunity to improve their skills and industry knowledge within their chosen locations, product groups and industry sectors. Companies can add details of their own seminars and training days to the site by completing the free registration and upload- ing their event information either as a free listing or as an enhanced listing. Mike May- nard, Director of Tech Event Guide explained, "Although Event Diaries are already avail- able, they typically focus prima- rily on major events and rarely include company-specific events. By giving registered companies the ability to upload details of their own seminars and training days, the database aims to build into a definitive listing of technol- ogy events, and a valuable resource for electronics engi- neers, in every country through- out Europe." (067 1 92-3) www.techeventguide.com Network cable analyser gets an intelligence boost Peak Electronic Design Limited have launched an enhanced version of their Network Cable Analyser the Atlas IT (model UTP05), desiqned and made in the UK. The Atlas IT has always had the unique ability to analyse many types of RJ45 based network cabling, including Ethernet, Token Ring, Patch cables and Crossover Cables. The connec- tion pattern of the cables is auto- matically recognised and dis- played on the unit's display as well as confirmation of the full connection pattern. Now the Atlas IT has been enhanced with cable defintions of 8 more cable types, including Cisco terminal cables, Linn Audio network cables, Ethernet Economisers, 4 line crossovers, voice/data cables and many more. Additionally, for the first time ever, the Atlas IT can now recognise the cable type even if there are connection faults (such as missing connections, swapped lines or other errors). It will dis- play the cable type and highlight any lines that have errors. The Atlas IT hardware has had a boost too, now it can cope with connection to live comms sys- tems and even withstand the high telephone ring voltages (upto 80 V) associated with mixed voice and data cabling. Using the Atlas IT could not be easier, connect the main unit at one end of your cable run and the miniature (18mm cube) ter- minator at the other end. For socket testing you can use the supplied mini patch leads too. Press the test button and after a few seconds the results of the analysis are displayed on the clear alphanumeric display. If you use the unique Identified Ter- minators, the Atlas IT will iden- tify the cable run for you too, allowing the easy testing and identification of many cable runs (upto 24) without having to make lots of trips to swap ter- minators. The Atlas IT will 1 automati- cally power down after a period of inactivity, so you'll never for- get to switch it off. Measuring just 103mm x 70mm x 20mm, the Atlas IT fits in the palm of your hand or could even happily dangle from a net- work socket! When it's not in use, it can be stored safe and sound in the supplied custom machined carry case along with your accessories, terminators, cables and a spare battery. The Atlas IT is available from many distributors including Far- nell and Maplin as well as directly from the manufacturer i^oy.uu fully inclusive of UK delivery and VAT. (067192-2) Peak Electronic Design Limited, Atlas House, Harpur Hill Business Park, Buxton, Derbyshire SKI 7 9JL. Tel. 01298 70012, Fax. 01298 70046. email: sales@peakelec.co.uk web: www.peakelec.co.uk Single-chip GPS receiver with highest sensitivity and low power consumption Atmel® Corporation and u-blox AG, recently announced the availability of their latest weak- signal tracking GPS technology in an ultra-small form factor. The new single-chip ATR0635 meas- ures just 7x10 mm, and inte- grates a complete ANTARIS® 4 GPS receiver including ROM- based SuperSense® software in a 96-pin BGA package. The small size plus the extremely low power consumption (62 mW in continuous power mode) make the ROM-based ATR0635 an excellent fit for handheld and mobile applications such as mobile phones, PDAs, smart- phones, after-market naviga- tional products, and recreational consumer products. Other products such as GPS 'plug-in' accessories for PCs, small GPS mice, Bluetooth® GPS devices, and other accessories equipped with GPS functionality will also enjoy the single chip's advantages in terms of small size, reduced power needs, and built-in features such as the ANTARIS 4 USB port. Its high tracking sensi- tivity of -158 dBm allows for weak-signal tracking in urban canyons and even indoors. The 96-pin, ball-grid-array single chip has an excellent cost-per- formance ratio due to needing only a few external components. The ATR0635 also brings bene- fits such as simplified chipset integration which accelerates design projects for ANTARIS 4- based products. ATR0635 samples in 7 x 10-mm 96-pin BGA packages are avail- able now. Atmel and u-blox offer a complete evaluation kit including ultra-small footprint example design which helps to dramatically shorten development cycle times. Further information may be found at www.u-blox.com/products/ atr0635.html . (067 1 92-5) 9/2006 - elektor electronics 11 ByVac Electronics 16*2 Ltr^. 11 Cool Blue 16x2 LCD illuminated white lettering can be seen in full daylight. Makes projects stand out from the rest £9.95 Cool Blue 16x2 LCD fitted with the serial interface, simple text commands can scroll display, turn back light on off etc. Very powerful. £22.90 Serial LCD controller, will control any HD44780 compatible displays, 1,2 or 4 lines up to 180 total characters, fully software configurable auto- matic Baud rate etc. Works from RS232 port, USB to serial converter or directly from a microcontroller. Simple two character text commands for full control. Very small will fit behind the display. Scrolling text, macro facility, and much more. £11.00 Only 40mm x 19mm Serial Analogue board, 10 bit, 3 analogue inputs, 2 digital I/O, all serially controlled using simple 2 letter text commands. Analogue as percentage or absolute 10 bit value. £12.50 General purpose Digital-Analogue input/output. Con- verts serial text commands into digi- tal I/O, 4 digital I/O and 4 analogue input channels. £11.00 Control hardware using simple text commands see www.byvac.co.uk RS232 Serial Lead £4,50 Power Regulator £4.95 MONEY BACK GUARANTEE If you are not completely satisfied, return the goods within 30 days for a full refund. Purchase Options: On-Line at www.byvac.co.uk • Telephone 07905 734 348 • email sales@byvac.com • Cheque or Postal Order to: ByVac, PO BOX 4049, Penistone, SHEFFIELD, S36 6WP Post and packing UK £2.50 World Wide £3.50 10% discount code for online orders use ELK6 L\W]ViJ peFlk-d?C: CO ii Tef. D12H8 7D012 pkji C'ttiipnr'E r^ni'g" i m i. J» tfcTiftJin 'nip r*i r l-ill Bin mm Far* Bi .rum IKir«JL UK "jfTk'i ifif nHirffri aAfitiuux ittatr} bivrjujrtjv CiJfTxlrati&r'i bs/ich CH flit qflQfdtibk prict - " Re* Dohhs.PWMagajlne LCR anafyser ■ Altes LCR40 » Automatically idenlily and rnaasura inductors. Capac tors and Resistors * Aromatic lest frequency selection » IrHluclors from 1 pH lo 1 0H p C 3 DJCiEors from 1 pF Eo 1 0. 000^ * Resistors from Hilo 2 MU ■ t% Basic accuracy ^ Mr* in (M UK Star Pack 0*frr - tJuy belli subVsb's lot El 3D ■ift^ ytl * Inw £ur r # caw afill * fffl piastre jwzvz’sq* eif S&rrjfCOnduClQr A nat/se? - Atlas DCA$$ * Automatically anaryse men 2 and 3 leaded senm'a iransjslQFE. MOSFETs, JFET&. dwdss. LEDs etc. 4 Automatically id^oiify ai loads Coor^ci any way! i Measures lota ol parameters too. such as qa\n, PN characterr&tics MDSFET gala Ihreshclds leakage currenl 1 1 £*$irpim JttMnWfr aad much more N o1 Number One Systems The World Beating PCB design software o ci#_ for easy-ru Windows Wrm St 'L L *st Version 1 0 features ■ Intelligent Gerber Import option ■ TraclM[ dillcrmr ■■ wri n PC. High tech white gloss endasur# &lue UED TX dnd fi>S traffic msficatni^ Gold Plated U5B and DB^ cciinectDis Suppihed m f«tsd p^ckagiftg wdih. driver CD tommunicaliDn rales from iou baud to 1M baud IDcm tan c length, f im version bvaiIiIPI’o at £ 14. SB | UC23 2R-10 Econorvy US 9 RS232 Cable b 10.50 ICKJIT VAMJSr * Mart hniAhp nicely s-zutpied white oiastrE: enebiurp * Sofrpii^d periled ia an enb-etitit hag ■ Wide range pr drivers tlawntDedable from FTDI web nie - Conmitriisisiicn taxes from. 1QD baud to 230k baud ■ 10cm cable length ( im anailabte to special rcaues I only) VcJoiipc L>->: :umI> ik m i M .1 Chip Slop FTDI ^ WAMW Tnees shown entludc a- Nip p^-g DL VAT Over 50 different USB Interface products in stoch at www.ftdichip.com/shop htm TECHNOLOGY RFID An employee of the Metro trading firm pulls a pallet of diapers through an RFID reader gate, which rapidly reads the data from the chips. The antennas of the RFID reader are located to the left and right (visible on the right side), (photos: Philips) Renke Bienert RFID labels can be used to mark racing horses as well as containers, scooters and perfume packages. Passports and sporting-event tickets can also be fitted with RFID chips. The underlying tech- nology is just as varied as the potential applications. Inanimate objects, as well as animals and in principle people, can be identified automatically without direct contact if they are fitted with small radio-frequency identi- fication (RFID) responders. This technology is poised for a breakthrough this year in many sectors. In the near future, RFID labels will be so cheap that they can be used to mark even relatively low-priced goods. The route taken by every milk jug, aspirin package or newspaper from production to selling (and possibly even further) could then be tracked electronically. Logistics spe- cialists welcome the new technology because it promises to yield considerable cost and time savings in transport and storage, but many consumer associations and more than a few champions of privacy are worried about the potential for Transparent customers'. Curse or blessing? The mood among the general public is equally contradic- tory, as was already shown by our brief international RFID survey on the Elektor Electronics website. For instance, 80% of the participating readers assumed that RFID tags will make their everyday lives easier, but an equally large percentage thought that personal privacy and data protection are 'threatened'. Perhaps the high level of insecurity arises from the fact that radio-based identification cannot be seen or heard, just like 'electros- mog'. The possibility that an RFID responder that you may be carrying, whether or not you are aware of it, could be read out by a government authority, a company or an avid hacker is thus a fear that must be confronted by the manufacturers of this technology. This fear is also fed by horror stories, such as the story that a security company ordered its employees to have RFID chips implanted under their skin. However, as with nearly all innovations the entire technol- ogy should not be condemned based on a few particular applications. Besides that, there is certainly more than one form of RFID. Consequently, the simultaneous appearance of media reports on RFID viruses and 2006 World Cup tickets or passports fitted with RFID chips does not necessarily mean malicious programs will spread via your passport or admission ticket that in the future (see also the web links at the end of this article). RFID in a nutshell First, a brief explanation of the terminology: the 'RF' in 'RFID' stands for using radio frequencies to transmit data and possibly also energy. The term 'ID' can refer to a variety of applications, ranging from simply reading num- bers to encrypted data exchange or complicated compu- tations for verifying the authenticity of an identification document. A RFID system normally consists of a trans- ceiver (or 'reader') and a number of RFID responders, which are sometimes called 'tags', 'transponders' (a 14 elektor electronics - 9/2006 A brief overview of RFID devices wrong use of the term) or simply 'cards'. It's also necessary to make a distinction between active and passive responders. Active responders are powered by batteries, while passive responders take their operat- ing power from the field emitted by the transceiver. Here we limit our attention to passive responders, because they are smaller and cheaper than active responders and thus far more significant for everyday applications. Coupling methods Three different types of coupling can be used for data transmission between the responder and the reader: capacitive, inductive, and electromagnetic, with the latter being important at relatively high frequencies. Capacitive coupling employs the electrical field and is limited to a small transfer range. It is thus rather insignifi- cant in practice. Inductive coupling uses a magnetic field to transfer energy and data, with a coil being used as an antenna (Figure 1). Systems operating at 125 or 1 35 kHz, as well as at 1 3.56 MHz, are in widespread use. The choice of these specific frequencies has nothing to do with the technology, but is instead based on legisla- tion that makes these frequencies available for RFID applications. Applications using inductive coupling are already quite common. At high frequencies such as 434 MHz, 862-956 MHz and 2.45 GHz, the coupling is no longer purely induc- tive or capacitive because the wavelength is small rela- tive to the size of the components. In this case, propaga- tion of electromagnetic fields through space is used to transmit energy and data. Tagging A basic distinction is made between 'object-related' and 'personal' applications. In the former case, the responder takes the form of a label attached to an object (see Fig- ures 2 and 3). Such responders attached to goods are often called RFID tags or RFID labels. Logistics specialists may want to know when an object is at a certain location. Using RFID tags, data for all deliv- ered pallets and cartons can be acquired automatically when the goods are delivered. That makes it easier to keep track of inventory, helps reduce shrinkage due to theft, and facilitates distinguishing genuine goods from counterfeits. The largest possible reading range and easy operation are important factors in such applications. They do not require complex computational operations in the RFID tags or large data volumes, but they do require large numbers of tags to be read quasi-concurrently. Reading several hundred or even a thousand tags per second at a range of tens of centimetres to a few metres (extending to more than 5 m) is readily possible. That is offset by small data volumes (several bytes) and a data rate of a few kilobits per second. The tag usually holds only a number that can be linked to product char- acteristics in a database. In many cases, the database can be accessed via the Internet, which means it can be consulted from Beijing just as easily as from San Fran- cisco. The new Electronic Product Code (EPC) standard Figure 1. RFID label with antenna and chip. Figure 2. Label inlays on a roll. An inlay consists of a chip, an antenna coil and a substrate (paper or film). Figure 3. Manufacturing RFID labels. If you look closely at the bottom surface behind the roll, you can see the antenna coils shining through the base layer. 9/2006 - elektor electronics 15 TECHNOLOGY RFID Frequencies for RFID tags 100- 150 kHz 13.56 MHz UHF 2.45 GHz Influence of water and humidity Low Low High Very high Influence of metals Low High High* High* Responder design Simple Simple Complex Very complex Range Short Medium Large Large Number of readable responders Small Large Large Large * This can be minimised with a suitable tag design. Contactless interface as specified by ISO/IEC 14443 Analogue portion Mifare technology uses a contactless interface that complies with the ISO/IEC 14443 standard. A carrier frequency of 13.56 MHz is used for energy transfer and data transfer between the reader and the card. The read/write range is limited to a distance of less than 10 cm. As shown in the illustration, the contactless interface can be explained in simplified terms using the operating principle of a transformer. The antenna coil of the reader generates an alternating magnetic field at 13.56 MHz. In simplified terms, the reader antenna can be regarded as the primary winding of a loosely coupled transformer. The card antenna acts as a secondary winding that picks up part of the generated mag- netic field. This provides the card chip with the necessary energy. (The terms 'PCD' and 'PICC 7 used in the figure come from the ISO standard and are explained in the glossary.) The magnetic field is amplitude modulated by the reader to transfer data from the reader to the card, in this case using a Miller-coded data stream and binary 100% modulation in accordance with ISO/IEC 14443A. Load modulation is used to transfer data in the opposite direc- tion (from the card back to the reader). Th is means the card uses the modulating data signal to switch a load in or out. The variations in the load on the 'secondary 7 side of the transformer are detected by the reader on the 'pri- mary 7 side. The data rate is 1 06 kbit/s in both directions (optionally as high as 847.5 kbit/s). The energy provided by the reader is sufficient to operate a microcontroller. As it is basically impossible to say in advance whether more than one card is within the operating range of the reader, card selection must occur before the actual communication session in order to ensure that only one card is addressed (collision protection). Digital portion Data (including user data) can be transferred after the card has been selected. The following rules apply: • 'Reader talks first 7 : the transceiver always transmits first and the card replies. • The card always replies within an agreed time, while the transceiver can take its time. In the simplest case (as with the Mifare Ultralight card used in our RFID reader project), this is accomplished by direct use of suitable card commands ('Read 7 and 'Write 7 in the case of the Mifare Ultralight card). This means there is only a simple, rigid protocol, and errors cause termination of the communi- cation session. This is naturally impractical for relatively complex applica- tions, so there is also a flexible transmission protocol for microcontroller smart cards. It is specified in Part 4 of the ISO/IEC 14443 stan- dard. This protocol: • allows different sizes of data blocks (depending on the buffer size of the card or reader) • defines an error handling procedure (error detection and correction) • permits chaining of data blocks to transfer relatively large data volumes • supports flexible tim- ing (which means the card can request extra time for execution of a command) PHPMP5 Power PCD HCG im MHj CfrTfcr in ili i -mi 1 1 m i B, || MlllJlt!i : i!i!!! : l mifera* Trsnsfiflsvfl Frinmpifi Transmit Data Mil l.l >1 1 111,1 1 Receive Data I K =■□0 P1CC I. tf-n-i.- IT ■rfjiHA'-hn DAI A JL1 J.lllillFRIlIt III, Trnr T ib « t r im m arm ■ PSO. PftMhr tty { tiiTt'') HHJE PinithRlY Uiig CimL ( .rjJfl | 16 elektor electronics - 9/2006 guarantees internationally unique product numbers, which represent a sort of electronic barcode. Smart cards 'Personal' responders impose different technical require- ments. In this case the responders are generally referred to as 'smart cards' instead of 'tags'. With a smart card, the user must always actively initiate a read/write process by bringing the card close to a transceiver. A large operating range is not only unnecessary in this case, it is also undesirable. Unauthorised reading of the data can be prevented by design by keeping the operat- ing range as small as possible. The standardized inter- face for contactless smart cards (ISO/IEC 14443) thus defines the technical parameters such that the maximum possible range is limited to 10 cm (see inset). However, it may be necessary to exchange relatively large amounts of data in this case (up to several kilo- bytes), and suitable data security is naturally required as well. The contactless interface is designed to supply energy to suitable microcontrollers embedded in smart cards and transfer relative large data volumes at rates up to several hundred kilobits per second. Sample applica- tions include the new electronic passport (see the web links) and electronic tickets for local public transport sys- tems, like Oyster on the London Underground. Which frequency for what? Contactless smart cards generally operate at 1 3.56 MHz and typically employ the ISO/IEC 14443 standard (see inset). The Mifare technology described in the RFID reader project in this issue is the most widely used tech- nology worldwide for smart card RFID applications. Selecting the right frequency is more complicated for tag- ging applications. As indicated in the table, various fac- tors come into play at different frequencies. The influence of water is negligible at very low frequencies, but it increases at high frequencies. As water absorbs a lot of energy at 2.45 GHz, for example, it is better to choose 1 35 kHz for systems that must work under conditions of high relative humidity. In a metallic environment, such as with an RFID tag on a beer keg, it is better to select a low frequency or design a UHF tag with a suitable antenna. Antenna design for tags that use inductive coupling is easier than for high-frequency tags. On the other hand, UHF tags have a larger theoretical range, which is essen- tially limited only by statutory provisions. Naturally, the number of tags that can be read per second is higher at relatively high frequencies due to the greater available bandwidth. Security System security and data security must be given adequate attention before the system is put into service. Of course, the requirements depend on the specific application. In a system with object-related RFID tags, which in the simplest case only replace barcode labels, it is basically not necessary to have any more security than when bar- codes are used (but also no less!). The data is stored in compliance with a standard and can be write-protected. However, everyone who has access to the tag can read and copy the stored data, just as with a barcode. In contrast to barcode systems, it is relatively easy to increase the functionality and security of RFID tags. The first step is to protect the data against copying. One way j Preventing replay A typical application for contactless smart cards is an access control system, such | as for a company. Every employee with access authorisation carries a badge con- taining a smart card. The employee holds the card in front of a reader before entering a secure area. That causes access to be granted or the door to open automatically. Of course, the authorisation data is transmitted between the card and the reader in encrypted form. However, a 'session key' is needed to prevent an attacker I from recording the transmitted data and then simply using it again (a 'replay attack'). I In the '3-pass mutual authorisation' method, the correctness of the secret key is verified and a session key is generated. This works as follows: 1 ) The card generates a random number RndB, which is encrypted using a secret key and then sent to the reader. 2) Decryption in the reader then yields the same random number RndB if the read- er uses the same secret key. The decrypted number is permutated to form the number RndB*. The two numbers RndB* and RndA are then encrypted and | sent back to the card. 3) The card recovers the two received random numbers by decryption and revers- es the permutation of RndB*. If the result is the same as the number RndB previ- ously generated by the card, the keys used by the card and the reader must be the same. In this way, the card recognises that the reader is authentic. The card then permutes RndA to generate RndA*, encrypts RndA*, and sends this num- I ber back to the reader. 4) Now the reader can decrypt RndA* and convert it back to RndA to test the cor- rectness of the key that was used. If the test is successful, the reader has recog- nised that the card is genuine. After this authentication both sides know that they are using the same key, even though the key never left the card or the reader. A temporary session key can now be generated from the random numbers, which are known only to the reader | and the card because they were transmitted in encrypted form. The session key is then used for data encryption during the rest of the communication session. The advantage of such a session key is that it is based on random numbers, which means a new key is used in each session. That effectively defends against replay attacks. to do this is to assign each RFID tag a unique identifica- tion number (UID). The UID is stored in unalterable form in the memory of the RFID by the chip manufacturer and thus provides a basic form of protection against copying. Secret keys The next step is to us this method to protect writeable (or rewriteable) memory areas against misuse. Here the UID i Web links | RFID card applications everywhere in the world: www.mifare.net/ news/#press World Cup ticket with RFID chips: www.elektor-electronics.co. uk/Default.aspx?tabid=27&art=53048&PN=On Technical details of electronic passports: www.elektor-electronics.co. uk/Default.aspx?tabid=27&art=53049&PN=On RFID viruses: www.elektor-electronics.co. uk/Default.aspx?tabid=27&art=53050&PN=On Explanation of DES and Triple DES: en.wikipedia.org/wiki/Triple_DES 9/2006 - elektor electronics 17 TECHNOLOGY RFID Figure 4. The advantages of RFID technology come to the fore with perishable goods, since it saves time in transport. is used to generate a chip-specific secret key that is used to encrypt the data. The user requires the following to evaluate the data stored in such a tag: • the UID • a secret key • knowledge of the encryption method that is used Other ways to protect data include password functions and true encryption processes in the tag to encrypt the transmitted data as well. Although many things are tech- nically possible, complex methods are usually not used in simple systems for cost reasons. Data safe Smart cards typically require a relatively high level of security because personal data (such as with a passport) or relatively large monetary values (such as with an elec- tronic ticket) are often stored in them. The same security requirements can fundamentally be fulfilled with contact- less smart cards as with contact cards. Naturally, the first step is to encrypt the transmitted data. There are various standards for this purpose, with the degree of security typically being stated in the form of the length of the key. In simplified terms, the length of the key corresponds to the statistical number of incorrect attempts to guess an unknown key. In the case of a DES algorithm with an 8-byte key, of which only 56 bits are actually used for the key, the single correct key must be found from among 72,000,000 billion possible keys. This sounds like a very large number, but in an era of net- worked computers there are many applications for which it does not provide adequate security. One option is to use a longer key, such as 1 1 2 bits with Triple DES, or a different encryption method. Here again, effort and cost must be weighed against the required security, and for that reason many different con- cepts are available. However, the security of a system consisting of several components is only as good as the security of the weakest link in the system. There is thus lit- tle point in encrypting the data in the card if it is possible to eavesdrop on a communication session and then simu- late a new session. However, effective methods for pro- tecting against this form of attack and several other forms of attack are available (see the 'Replay' inset). ( 060204 - 1 ) RFID glossary Tagging Capturing tags (including RFID tags) UHF Ultra High Frequency; in this case ISO International Organization for Standardization frequencies in the 862-956 kHz band IEC International Electrotechnical Commission Eavesdropping Undesirable listening in on RFID com- munications ISO/IEC 14443 International standard for a contact- less smart card interface with a maxi- Skimming Undesirable use of an RFID label or contactless smart card mum range of 1 0 cm and an operat- ing frequency of 1 3.56 MHz Replay attack An unauthorised transaction generat- ed by repeating a previous transmis- PCD Proximity Coupling Device: a trans- sion obtained by eavesdropping ceiver for contactless smart cards (complaint with ISO/IEC 14443) Modified Miller coding Pulse position coding scheme in which specific pulses are omitted PICC Proximity Chip Card: a contactless to save energy smart card (complaint with ISO/IEC 14443) DES Data Encryption Standard: a symmet- ric encryption method for 8-byte data blocks with a key lenqth of 56 bits (8 ISO/IEC 15693 International standard for a contact- less label interface with a maximum bytes without parity bits). See the web links. range of 1 .5 m at 1 3.56 MHz 3-DES, Triple DES A standardized encryption method ISO/IEC 18000-6 International standard for a contact- less label interface with a maximum range of 3-7 m, operating in the UHF band and/or at 2.45 GHz consisting of three DES loops for increased security, with a key length of 1 1 2 bits or 1 68 bits (see web links) 18 elektor electronics - 9/2006 L ichfietd f. I ecpro Hies The Com Exchange, Con da ip Sp, Lichfield Spaffs. \VSl5 6 lid TeL 0l54$ J.566Q4 E-Mail saies®iichf ieldelecpronics.co.nl LED Flashing Kits Arrow Chasing Light 2 1 LED A simple but fun kit to build an LED pointing Arrow, ideal for near exits or as an indicator? £9 99 2.9”x2.2”, 9- 12V 6 program 4 channel DC chasing light. 12V 100W. (FK144) £15.99 Electronic Windmill 25 LED adjustable speed. (FK153) £9.99 4 way traffic light. 12 LED. Flow do they work? (FK148) £9.99 Two Way Chasing Light 35 dot. Uses LED display. (FK151) £7.99 240V flasher. 2CH 1400W, adjustable speed. (FK144) £7.99 Two way V.U. Meter. 10 LED. Displays volume (FK102) £4.99 Telephone kits Build Your Own Telephone This great kit lets you build a tone/pulse phone With mic and ear piece, no batteries required. A great kit to build and use. Telephone In Use indicator. Requires phone lead (FK3 18) £2.99 Telephone Interceptor: Listen in on phone calls. (FK306) £8.99 Telephone Radio Transmitter (FM 88-108 Mhz) (FK320) £8.99 10W Telephone Ringer, drives bell or speaker not inc(FK305)£9.99 Phone Ring Signal 500W Flash a lamp when the phone rings£12.99 Dual Station Intercom with speakers (FK3 13) £10.99 Switch and control kits Infrared Remote Relay Control 1 10A Mains device by infrared Remote control. Range: 25ft. (on/off) £18.99 2ch 50ft version also available Light Dimmer 500W: uses a Triac. With LED Light Sensor with 5A 250V relay. With LED Touch Switch 10A 240V Touch on/touch off Voice control switch 7A 240V, clap on/clap off Water Pump Level Control with 7A 240V relay. Electronic Code Switch & relay. 7A 240V 4 digit. (FK415) £5.99 (21-053) £6.99 (FK405) £8.99 (FK409) £9.99 (FK425) £9.99 (FK422) £14.99 Postage Order Value P&P Cost £4.99-12.99 £2.00 £13.00-22.99 £3.00 £23.00-49.99 £8.00 £50-£150 £10.00 Above prices UK Only. Phone or e-mail for Ireland . Payment by cheque, card or P/O K/Pb in spockj!! Power Supply kits 0-3 0V 3 A Variable Regulator Build a high quality variable voltage regulator Using this simple to assemble kit. £15.99 30VDC or 2x1 2 VAC required 0-30V 1 A Variable Regulator, as above but 1A. (FK808) £7.99 Variable DC Regulator 0-12V from 12V. 500mA. (FK807) £4.99 DC Down Converter. 12v to 6 or 9V. Uses 7806 (FK805) £3.99 Power Supply 6-9-12V OJA. Inc transformer (FK801) £8.99 Mini Emergency Light. When mains fails, it lights(FK802) £5.99 12V Low battery alarm. Suit car or boat. (FK915) £6.99 Power Amp Power Amp Power Amp Power Amp Power Amp Power Amp Power Amplifier Kits 15+15W Power Amp This quality kit uses 2X TDA200SR IC’s, Includes heat syncs and full instructions. . Requires only a 12V power source. £24.99 (FK608) OTL. 30W Mono Rl%: Req 50VDC (FK656) £14.99 BTL. 1 5W Mono. Req 12VDC (FK607) £14.99 IC 8 + 8 W Stereo. 12VDC TDA200SR (FK605) £13.99 IC 8 W Mono. 12VDC TDA2030 (FK604) £8.99 2+2W Stereo 3- 12V DC TBA820M (FK603) £9.99 2W Mono 3- 12V DC TBA820M (FK602) £5.99 Our Shop Located in the city centre of Lichfield IWe are within easy reach from Birming- ham. All stock is carried on site and is on display. If you have any questions our staff would be be happy to help. Open Mon-Tue & Thur-Sat: 9:15-5:00 Closed Wed & Sunday Intruder Alarms 31 Magnetic Switch Alarm Make a digital burglar alarm with this great Kit, simply attach the magnet to a door and the switch to the surround, hide the control £16.99 board, arm it and wait. Passive Infrared Sensor & relay 5A 250V delay off (FK510) £27.99 Infrared Burglar Alarm/relay. Make an IR tripwire. (FK505)£24.99 Intruder Alarm with delay function & speaker. (FK501) £9.99 Visitor Chime with speaker. Ding Dong. Req switch (FK502) £7.99 Radio kits Shortwave Radio Reciever A great kit to make a short wave reciever for 2.2 - 7Mhz. Easy to build. Uses the 4007 IC. £Q gg 9V (21-020) Walky Talky Kit, pair. 27Mhz. 150mW to 1W (FK71 1) £34.99 Advanced AM/FM Radio & case. Req Freq Gen (2 1-027A)£16.99 Simple FM Radio 88-108Mhz. Uses TDA7000 (FK707) £14.99 Advanced AM Radio & case. Req freq generator (21-028A) £13.99 FM Wireless Mic: Very simple transmitter. 9V (FK702) £6.99 Pocket Transistor Radio: Uses MK484 clone IC (21-001) £9.99 Everything Else Aoyue 909 Hot air gun, soldering iron & 0-15V PSU. £99.99 Aoyue 850C Hot Air Rework station for SMD Components £54.99 Aoyue 936 Temp controlled soldering iron with stand. £24.99 DIY Digital Multimeter: with transistor checker. (03-150K) £16.99 Stereo Simulator: Splits source based on frequency. (FK651) £14.99 Video Amplifier 1 to 4 ch. Adjustable gain. 12V (FK655) £12.99 Human to Robot Voice Changer with speaker. Rat and Cockroach Banisher circuit with speaker Bass Booster. Mono. (Audio) 12V DC Electric Shock Machine. Low Power. 9V Two tone door bell with speaker. Police Siren with speaker. (FK930) £12.99 (FK929) £8.99 (FK642) £6.99 (FK901) £5.99 (FK238) £5.99 (FK234) £5.99 And phis is only 50 of our pips See Phe weh sipe for phe ,^»>www. lichfieldelectronics.co.uk PicoScope 3000 Series PC Oscilloscopes Ttic PrcoScapa 3000 series usailloscopus era the latest offerings from the market leader In PC □ seiIIdsgdpl-s combining high himduriilths with large buffer memprits. 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: 1 DC S a sampling race S 2O0MH? bandwidth * 1M0 buffer m Lmory ■ High speed U56 3*0 interface * Advanced display G trigger modes * Compact G portable ■ Supplied with PicoScope & Pico Leg software Tel: 01480 396395 www. picotech .com/scope3 5 3 17H □ana □ KB lUOMi'i lll—fc raa li H >wJ ft a Lt imhu SkKif -*| rmi l3F|i| vb! irxtMsi i jiyaji.. t •!* l i->n-— ■ H "LB 1 FiflHpr >p till K U Hit fiV In# 1-libdWAfi lHt £ < RF-Interface Digital Control Unit Anticollision Command Interpreter EEPROM- Interface EEPROM 060132 - 20 and anti-collision logic. The article on the Elektor Electron- ics RFID Reader elsewhere in this issue gives information on building a contactless interface for connecting to the reader unit. Memory layout Figure 2 shows the memory diagram of the 5 1 2-bit EEP- ROM read/write memory, which is organised in 1 6 pages of four bytes each. Each card has its own unique 7-byte serial number (the UID or Unique Identifica- tion Number), programmed by the chip manufacturer into pages 0 and 1 . Philips guarantees that this number will never occur more than once worldwide. For security rea- sons this serial number is protected and cannot be altered by the user. Page 3 is the 32-bit OTP (one-time programmable) area, where each individual bit can be programmed irre- versibly from logic state 0 (preset at production stage) to a 1 . This means the bits cannot be reset back to 0 after- wards. A sample use for the OTP area would be reduc- ing the number of trips remaining on a multi-ride ticket by one after each journey. Pages 4 to 15 constitute the 384-bit application data memory, also preset to all zeros at the time of manufac- Figure. 1. Block diagram of the Philips Mifare Ultralight RFID 1C. 22 elektor electronics - 9/2006 ture. This memory can be both read and written to by the reader. Two lock bytes, LockO and Lockl , enable individ- ual pages of the application data memory and OTP Page to be frozen, with the data still readable but no longer capable of alteration. Command set and card activation The command set of the Mifare Ultralight card is fully compatible with standard Mifare cards; the latter, how- ever, are equipped with larger EEPROM memories (1 kByte or 4 kBytes) and additional crypto functionality. For this reason standard Mifare cards employ extra instructions for card authentification and special com- mands for EEPROM memory operations. Fundamentally the command set of Mifare cards divides into two groups, commands for activating the card and commands for memory manipulation (see inset). The process of card activation follows the ISO 14443-3 stan- dard. When a compatible card comes within range of the reader unit, the first task is to establish communication between the card and the reader. During the process the command set takes regard of the fact that more than one card may be in range of the reader simultaneously or Figure 2. Layout of the EEPROM memory in the Mifare Ultralight 1C. Characteristics of the Mifare Ultralight 1C • 100% MIFARE compatible • Supports anti-collisions process specified in ISO/IEC standard 14443-3 A • Read/write range up to 10 cm • 106 kbit/s data speed • Each card chip has its own unique 7-byte serial number for anti-cloning sup- port • High data integrity: 1 6-bit CRC, parity, bit coding, bit counting • 512-bit EEPROM, organised in 16 pages of 4 bytes each • 32 bits user-definable OTP (one-time programmable) area • 384 bits User Area (read/write memory) • EEPROM READ-ONLY function programmable by the reader unit • Supports DESFire SAM (Secure Access Module) security system Command set of the Mifare Ultralight 1C For card activation (compatible with ISO/IEC Standard 14443-3A): REQA WUPA ANTICOLLISION of Cascade Level 1 SELECT of Cascade Level 1 ANTICOLLISION of Cascade Level2 SELECT of Cascade Level2 HALT For memory manipulation: READ WRITE COMPATIBILITY WRITE Byte Number 0 1 2 3 Page Serial Number SN0 SN1 SN2 BCC0 0 Serial Number SN3 SN4 SN5 SN6 1 Internal / Lock BCC1 Internal LockO Lockl 2 OTP OTPO OTP1 OTP2 OTP3 3 Data Read/Write DataO Datal Data2 Data3 4 Data Read/Write Data4 Data5 Data6 Data7 5 Data Read/Write Data8 Data9 Datal 0 Datal 1 6 Data Read/Write Data12 Datal 3 Datal 4 Datal 5 7 Data Read/Write Datal 6 Datal 7 Datal 8 Datal 9 8 Data Read/Write Data20 Data21 Data22 Data23 9 Data Read/Write Data24 Data25 Data26 Data27 10 Data Read/Write Data28 Data29 Data30 Data31 11 Data Read/Write Data32 Data33 Data34 Data35 12 Data Read/Write Data36 Data37 Data38 Data39 13 Data Read/Write Data40 Data41 Data42 Data43 14 Data Read/Write Data44 Data45 Data46 Data47 15 060132 -21 9/2006 - elektor electronics 23 HANDS-ON MICROCONTROLLERS that communication may be in progress already with another card. As soon as a card has picked up sufficient energy from the RF field of the reader it assumes a quies- cent or idle state. In this condition the card will respond only to the commands REQA (Request) or WUPA (Wakellp), to avoid disturbing any communication between the reader and another card. A valid REQA or WUPA command causes the card to respond with the ATQA Block (Answer to Request) and enter the READY 1 state. All the time that a reader unit has not received an ATQA Block it sends a REQA or WUPA command every 5 ms as it searches ('polls') for new cards in its reader field. When the reader picks up an ATQA Block, it begins the anti-collision process by sending the first ANTI- COLLISON1 command, ensuring that each card within range of the reader is handled individually without data corruption for other transactions in progress. A more detailed description of this ingenious operation can be found in the Philips product description at http://www.semiconductors.philips.com/acrobat_down- load/other/identification/M028630.pdf. For further information on the Mifare RFID family visit the Philips website www.semiconductors.philips.com/ products/iden- tification/mifare/ and the open Mifare Forum http://mifare.net. ( 060132 - 2 ) RFID chip card with printed antenna Up to now techniques used for implementing antennas on RFID chip cards have had serious shortcomings from a manu- facturing point of view. The antennas themselves employ either wound or inlaid wires or else are etched in copper. Both processes impose limits on production throughput and require additional production equipment. Opportunities for cost reduction using this approach are difficult to find since the process itself is relatively static. The RFID card given away with this issue of Elektor Electronics (who else?) is produced by German company ACG using an entirely new technology: the printed antenna. In this application the antenna layout is imprinted onto a PVC carrier film in a special silver paste, using standard screen-printing techniques. The special silver paste is a viscous (printable) base carrier containing metallic silver particles that remain conductive once the paste has solidified and allow electric currents to pass through this layer. A similar process is used in the automotive industry for applying electric heater ele- ments onto rear window glass. A patented technology enables the contacts and terminals to be connected to the chip module. The print layout of the antenna can be varied for each type of chip and module and is easily adapted. The only redesign necessary is to the silk-screen print material. Contact is made to the chip module and the finalised card is laminated using holding strips and a plastic overlay foil. The printed antenna offers many advantages. Speed of production is far higher than with wire-wound antennas. Several different printed antenna types can be manufactured simulta- neously, raising production throughput significantly. Printed antennas also avoid the environmental disadvan- tages of etching with the vari- ety of chemicals (some highly toxic) involved in that process. This new printing technology is still in its early stages of development and offers great potential for further optimisa- tion and cost reduction. Crucial to this is the print materials used. Intensive research is already under way to substitute lower-cost copper particles for the expensive sil- ver used at present. Printed antennas can be applied to all current mod- ules in the 13.56-MFtz arena. The RFID cards with printed antennas manufac- tured in-house by ACG are subjected to constant quality checks and production can be adapted very flexibly to end-users' requirements. 24 elektor electronics - 9/2006 Tel: 01635 40347 «-nuU: CHurisCnrtftkry.LDafTi.La.ul Nuwtujy ElisthWiC* Lid r?i>np p R-wi wwn bit np riscfe brnci.c4.uk YOUR IDEAL IDENTIFICATION TECHNOLOGY PARTNER ► Reader ICs ► Reader Modules ► Desktop Readers ► Transponder ICs ► Smart Cards / Tickets & Transponders Official Distribution Partner for Philips RFID Products Simply send your files A/> t% 7% ft ft § f*ftAA and order ONLINE: rlf 0 “ rVl/C« V %Jiwi 9/2006 - elektor electronics 25 HANDS-ON MICROCONTROLLERS For MIFARE® and ISO 14443-A cards RFID cards are becoming increasingly popular in many fields where previously barcodes and chip cards were used. They open up many new possibilities, such as applications in travel cards or even banknotes. As befits a premier electronics magazine, Elektor Electronics is offering its readers with this issue not only a free RFID card but also a professional RFID reader for your own applications. The design described here can both read from and write to all types of RFID card that are compatible with the MIFARE and ISO 1 4443-A international standards. Gerhard H. Schalk In developing the Elektor Electronics RFID reader we have aimed to make the device as universal as possible. So, for example, the reader can be used in conjunction with a PC over a USB con- nection, or in stand-alone mode using its liquid crystal display. It is very sim- ple to use the free PC -based program ‘MIFARE Magic’ to read and write all kinds of MIFARE cards without installing special software in the reader. 26 elektor electronics - 9/2006 Specifications Elektor Electronics RFID reader: • Near-field reader for 13.56 MHz RFID cards • Compatible with MIFARE and ISO 14443-A cards • Allows both reading and writing • USB interface for connection to PC • Ready for immediate use without programming • Free PC-based software available • Stand-alone (including portable) operation using LCD module • Dedicated MF RC522 reader 1C • Dedicated microcontroller on reader board • SPI and l 2 C interfaces • Spare 8-bit microcontroller port • Buffered switching output • Available as ready populated and tested SMD circuit board • Can be modified for user applications • Programming tools available MF RC522 reader 1C: • Hiqhly-inteqrated sinqle-chip reader for ISO 14443-A and MIFARE cards • Supports contactless data transmission at 106 kbit/s, 212 kbit/s and 424 kbit/s • 50 mm approx, read/write range (depending on antenna) • Integrated MIFARE Classic cryptography • Programmable over UART, l 2 C or SPI • 64 byte transmit and receive FIFO buffer • Programmable reset and power-down modes • Programmable timer • Internal oscillator allows direct connection of 27.12 MHz crystal MIFARE Magic directly supports a range of contactless 13.56 MHz MIFARE cards, including the Philips MIFARE UltraLight, MIFARE IK and MIFARE 4K. The MIFARE Magic win- dow (Figure 1) also offers the facility to send individual commands to the card with a click of the mouse. This allows you to determine the character- istics of different cards very easily. Examples of compatible cards include the MIFARE UltraLight RFID card sup- plied with this issue, and described in more detail in a separate article, and smart cards used on many public transport systems all over the world — for example, the London Underground Oyster card In stand-alone operation, for example in an access control application, the reader can be used directly with the firmware we have developed. On switch-on the reader immediately looks for cards within the range of the antenna (a few centimetres) and reads any cards it finds in that area. The LCD (if connected) then shows the card type along with its serial number, and the switching output of the reader is activated. The reader is constructed around the newest Philips reader IC type MF RC522 and a type LPC936 micro- controller. Since the reader IC is only available in an HVQFN32 package, we have decided to solve the problems of mounting and soldering by making available ready populated and tested reader boards fitted with pre-pro- grammed microcontrollers. The Elektor Electronics RFID reader is naturally ideal for experimenting with the free MIFARE UltraLight card. The system includes a powerful microcon- troller and I 2 C, SPI, UART and USB interfaces, and free development tools are available. This makes it suitable for developing dedicated applications such as door and gate openers, mem- bership card systems, storing pass- words and configuration data, pay- ment systems, security for domestic appliances such as televisions, video recorders and PCs, monitoring battery Figure 1. The MIFARE Magic program developed for the Elektor Electronics RFID reader allows MIFARE and ISO 1 4443-A RFID cards to be read, written and programmed. 9/2006 - elektor electronics 27 HANDS-ON MICROCONTROLLERS RFID Reader LCD I/O l 2 C 1- 1 H - ro o’ i| 3 <2 MF RC522 l 2 C TIFT (iC / Philips LPC 935 i i RS232 Voltage FT232R ^ N Regulator USB / UART N k USB Optional Power Supply 5V 060132 - 13 Figure 2. Block diagram of the Elektor Electronics RFID reader. packs and much more besides. The combination of secure identity, data storage and contactless interface opens up many opportunities for novel applications. Reader hardware Figure 2 shows the block diagram of the reader. The basic reader functions, including the creation of the HF mag- netic field, modulation and demodula- tion, and the generation of the ISO 14443 data stream, are carried out in the MF RC522. It is simplest to think of the MF RC522 as a contactless UART driven directly by the microcon- troller. In the Elektor Electronics reader we have used an 8051-compatible LPC936 microcontroller from Philips. The CPU takes only two cycles per instruction and is clocked at 16 MHz. This speed and the 16 kbyte Flash memory are sufficient for an enormous range of possible applications. Pro- grams for the microcontroller can be simply written using any 8051 com- piler. Communications with the PC are handled by an FT232R USB/RS232 interface chip from our friends at Future Technology Devices (FTDI). The full circuit diagram is shown in Figure 3. When connected to a PC, power is taken from the USB via mini- connector Kl. The FT232R USB inter- face chip is configured to report the reader as a high-power device when the bus is initialised (during ‘enumer- ation’). As a bus-powered device the reader can then draw a current of up to 500 mA. When enumeration is com- plete the /PWRNEN signal on pin 11 of IC1 changes state, making P-channel MOSFET T2 conduct. The 5 V supply is then passed through to voltage regula- tor IC5. The output of the LM2937 pro- vides the 3.3 V supply for the LPC microcontroller (IC3) and the MF RC522 (IC4). Red LED D6 shows when the 3.3 V supply is present. If 5 V power is not provided via the USB con- nector Schottky diode D4 allows an external power supply to take over automatically. Either four AA-size cells (the enclosure suggested in the parts list will accept these) or a 5 V mains supply capable of delivering at least 300 mA can be used. Figure 4 shows an overview of the internal functions of the MF RC522 reader IC in the form of a (greatly sim- plified) block diagram. The output driv- ers of the device allow direct connec- tion of transmit and receive antennas without external active amplification circuitry. A few passive components provide the essential matching to the antenna characteristics. The analogue interface handles demodulation and decoding of the reply data sent by the card. The digital block is responsible for constructing the ISO 14443A or MIFARE protocol frames and accompa- nying error detection (parity and CRC). The FIFO buffer allows 64-byte blocks to be sent and received in ISO 14443 mode (‘T=CL’ protocol). In MIFARE mode the largest data blocks exchanged are at most 16 bytes long, and so there is no need for the micro- controller to split up the command packets. The registers of the MF RC522 can be programmed over the SPI, asyn- chronous serial or I 2 C interfaces. Since the LPC936 microcontroller only has one asynchronous serial interface, and this is required for communications with the PC, the I 2 C interface is used to talk to the MF RC522. If desired an LCD module can be con- nected to port P0 of the LPC936 via connector K2. PO.O is buffered by a transistor and provides a switched out- put, and the SPI and I 2 C interfaces of the microcontroller afford plenty of opportunities to expand the reader by adding extra hardware. For example, a real-time clock could easily be added to allow for time monitoring, and the switched output could control a door opener; see also the pages about the RFID reader on the Elektor Electronics website. Get started The double-sided printed circuit board for the Elektor Electronics RFID reader is shown in Figure 5. It is only possi- ble to reflow solder the reader IC, and so we are making the board available Figure 4. Block diagram of the Philips MF RC522 reader IC. 28 elektor electronics - 9/2006 Figure 3. Complete circuit diagram of the reader, which can operate either in stand-alone mode, using the LCD module, or in conjunction with a PC using the USB interface. 9/2006 - elektor electronics 29 HANDS-ON MICROCONTROLLERS co o U01>G13 (0) V-ZZ 1-090 o o o O ooi ■ <*? % 1/ ® 3 n' a? oo OQ ® 0000000000000000 1 10 10 O G==0 (i ® G 0 ® Figure 5. The double-sided printed circuit board incorporates the antenna. The reader 1C is not suitable for hand soldering and so the board is available ready populated and tested. ready populated and tested. Instruc- tions are also provided for building the unit into the suggested enclosure, which we can also supply. The two jumpers on the reader board (JP1 and JP2) are not fitted for normal operation. Assuming the LCD module is connected to the reader board, the unit is ready for operation as soon as power is applied, and the serial num- ber of any RFID card within range of the reader’s antenna will appear on the display. If the display appears blank, the contrast should be adjusted using PI. To use the reader with a USB connec- tion to a PC, the free CMD-FDTI-USB driver must be downloaded from the Elektor Electronics website. This par- ticular driver is required because the FT232R contains the Elektor Electron- ics Vendor ID and Product ID. When the RFID reader is connected to the PC using the supplied USB cable Windows will automatically detect the new USB device. The freshly-down- loaded driver should be selected for the unit. If problems arise, the ‘Instal- lation Guide’ on the FTDI website (www.ftdichip.com) can be consulted for assistance: this guide is also appli- cable to the modified driver. Installing the CMD-FTDI driver installs both the ‘D2XX’ (direct) and ‘VCP’ (vir- tual COM port) drivers. The VCP driver allows the USB link to be treated from the point of view both of the PC and of the microcontroller as an ordinary RS232 connection. The D2XX driver is required if it is desired to modify the unit in a way that requires changes to the internal configuration data stored in EEPROM in the FT232R. This can be done using the PC-based program MPROG, avail- able as a free download from the FDTI website: MPROG will work only with the D2XX driver. MIFARE Magic Once the driver has been installed, MIFARE Magic, a specially- written PC- based program for the Elektor Elec- tronics RFID reader, can be run. This is also available as a free download, from www.elektor-electronics.co.uk. After downloading the program the contents of the ZIP file must be copied into a subdirectory of your choice. Start the program with a double-click on MifareMagic.exe, with the reader already connected to the USB port. This allows MIFARE Magic to find the reader automatically. There is no need 30 elektor electronics - 9/2006 COMPONENTS LIST Resistors (all SMD case 0805, 5%) R1 ,R2,R6,R1 2,R1 5,R1 7 = lkft R3,R4,R5 = 4kn7 R7 = 2kQ7 R8,R9 = 4Q7 RIO = 270ft R1 1 = ion R 1 3 = lOOkft R 1 4,R 1 6 = lOkft PI = lOkft-preset, SMD, 4 mm SQ Capacitors (all SMD case 0805, 16 V, ceramic) Cl ,C2 = 47pF NP0 C3,C4,C5,C6,C9,C 1 0,C 1 1 ,C 1 2,C 1 6, C31 = lOOnF C7,C8,C1 3,C14 = 1 2pF NP0 Cl 5 = InF NPO Cl 7,C1 9 = 220 p NPO Cl 8,C20 = not fitted C21 ,C23 = 27pF NPO C22,C24 = not fitted C25,C27 = 68pF NPO C26,C28 = not fitted C29,C30, C32 = 2pF2 Semiconductors D1 = SMD LED (0805) green, low-current D2 = SMD LED (0805) yellow, low-current D3,D6,D7 = SMD LED (0805), red, low-current D4 = BAS 19 (200 mA; SOT23) D5 = BAT54S (30V / 300 mA; SOT23) T1,T2 = 6402 (p-channel MOSFET, 20V / 3.7A; SOT23) T3 = BC517 (npn Darlington; T092 case) IC1 = FT232RQFN (QFN32 case, FTDI) IC2 = 74HC02 (TSSOP14 case; NOR gate) IC3 = P89LPC936FDH-S (SSOP28 case; Philips) IC4 = MFRC52201 HN1 (HVQFN32case; Philips) IC5 = LM2937 (low-drop, 3V3, SOT223 case) Miscellaneous XI = 1 6MHz quartz crystal (1 8pF parallel capacitance; 5-3. 2mm) X2 = 27. 1 2MHz quartz crystal (1 8pF parallel capacitance; 5-3. 2mm) K1 = miniature USB-B socket, SMD, 5-way LI = SMD ferrite (1 .5 A; 0805 case) L2,L3 = 560nH SMD inductor (0805 case) JP1,JP2 = 0.1 -in. jumper (see text) LCD1 = LCD module with 2x16 characters and backlight Enclosure, dim. 146x91x33 mm with LCD window and battery compartment for 4 AA bateries PCB, order code 060132-91 (populated and tested, including USB cable; see Elektor SHOP pages and www.elektor.com) Compatible LC display (see Elektor SHOP pages and www.elektor.com) 89LPC936 source & hex code files; free download from www.elektor.com Mifare Magic PC software inch source code; free download from www.elektor.com 9/2006 - elektor electronics 31 HANDS-ON MICROCONTROLLERS Figure 6. The terminal' view of MIFARE Magic shows all the characters sent by the reader over the USB interface. Figure 7. The 'MIFARE UltraLight' and 'Mifare Standard 7 windows allow simple programming of the RFID card. Figure 8. The free PC-based Flash Magic program can program the LPC microcontroller over the USB interface of the Elektor Electronics RFID reader. to select a COM port, as MIFARE Magic uses the D2XX driver internally. Figure 6 shows the ‘Terminal’ view of MIFARE Magic. This mode emulates a VT100 terminal and displays all the characters sent by the LPC microcon- troller over the FTDI interface. The firmware in the LPC microcon- troller defaults to ‘terminal’ mode on power-up. As soon as the reader detects a new card within its field it activates the card. The reader deter- mines whether the card is a MIFARE UltraLight, MIFARE IK or MIFARE 4K. The entire memory contents of the card are read out and displayed on the MIFARE Magic terminal. For MIFARE IK and 4K cards the standard MIFARE key is used. If the card uses a different key the data stored in certain sectors will not be readable. To use a different terminal program instead of MIFARE Magic (such as HyperTerminal or the built-in terminal in the LPC Flash Magic programming tool), the VCP driver must be used and the terminal program must be told the number of the relevant COM port. The parame- ters for the port are as follows: 115200 baud, no parity, 8 data bits and one stop bit. The ‘Window’ menu allows MIFARE Magic to be switched between the ‘Terminal’ view, the ‘MIFARE Ultra- Light’ and the ‘Show All Cards’ views. The ‘MIFARE UltraLight’ window (see Figure 7) allows various card com- mands to be executed with a click of the mouse. This makes it easy to pro- gram a MIFARE UltraLight card, such as the sample supplied free with this issue. When this window is opened the firmware in the LPC microcon- troller on the reader board switches from terminal mode into PC reader mode. Here the microcontroller waits for a card command from the PC and calls the corresponding function in its software. This mode is useful when developing applications on the PC. The ‘Show All Cards’ window displays the serial numbers of all cards cur- rently detected by the reader. This is useful for testing reader range and the capacity of the reader to deal with mul- tiple cards simultaneously. Program-it-yourself For dedicated applications it is possi- ble to modify or completely rewrite both the firmware in the LPC 936 and the software running on the PC. Any updates to the reader firmware will also require reprogramming the 32 elektor electronics - 9/2006 LPC936. The most up-to-date software will always be available on the Elektor Electronics website for free download. Updates will be reported on the news pages of the website and in the maga- zine under ‘Corrections and Updates’. The LPC on the reader board can be programmed directly over the USB port using the free PC program ‘Flash Magic’ (see Figure 8). This program, from Embedded Systems Academy (www.esacademy.com) and sponsored by Philips (www.semiconductors.com) supports a range of Philips microcon- trollers. Both jumpers JP1 and JP2 must be fit- ted on the reader board before the LPC microcontroller can be programmed. Interested readers will find a detailed discussion of how to program the device on the Elektor Electronics web- site along with a list of all the MIFARE UltraLight reader and card commands. The reader firmware was developed using the Keil mVision3 C compiler for the LPC microcontroller. All the com- mands necessary for developing dedi- cated applications are made available as functions and so it is not necessary to deal directly with the individual reg- isters of the MF RC522. The listing shows the code necessary to activate a MIFARE UltraLight card and read a data block. The data will be transmitted using the serial interface of the microcontroller. As mentioned above, the PC reader mode of the LPC firmware allows a PC appli- cation to invoke card func- tions. Using this mode function invoca- tion is done using a very sim- ple serial protocol to communicate with the program running in the microcontroller. When the function has been executed the response is returned to the PC. The naming and parame- ters of the functions are identi- cal in the PC software and in the microcontroller firmware. The source code for the PC-based MIFARE Magic program and for the microcontroller software can be downloaded for free from the Elektor Electronics website. ( 060132 - 1 ) Listing while ( 1 ) { status = IS014443_Request (WUPA, &bATQ) ; if (status ! = STATUS_SUCCESS ) continue; status = IS014443_Anticoll (Levell , 0, &abSNR [ 0 ] ) ; if (status ! = STATUS_SUCCESS ) continue; status = IS014443_Select (Levell , &abSNR[0], &bSAK) ; if (status ! = STATUS_SUCCESS ) continue; // Check if UID is complete if ( (bSAK & 0x04) == 0x04) { // UID not complete status = IS014443_Anticoll (Level2, 0, &abSNR [ 4 ] ) ; if (status ! = STATUS_SUCCESS ) continue; status = IS014443_Select (Level2 , &abSNR[4], &bSAK) ; if (status ! = STATUS_SUCCESS ) continue; // Read UltraLight Block 0..3 status = Read ( 0 , abDataBuf fer ) ; 9/2006 - elektor electronics 33 HANDS-ON RFID Martin Ossmann After the first sample Mifare cards were received in our editorial office, there was a lively discussion about whether any information could be extracted from these RFID cards using simple resources. Hardly anyone could imagine that a reader could be built without using a special reader 1C. But it can be done, and with a commonly available microcontroller to boot! This article describes the protocols and coding in detail. The software for this project is thus quite suitable for use in your own designs. The readily available Atmel ATmegal6 is used as the processing unit. It is easy to program via the ISP interface using public-domain tools, such as the AVR Studio development environment, the WinAVR compiler and the PonyProg programming adapter (refer to the ‘Mini ATmega Board’ article in the May 2006 issue of Elektor Electron- ics). The experimental reader described here can also be upgraded to read ISO 15693 cards. Such cards are frequently used for applications such as product identification. (Un)available information The first question is how to obtain the information you need to design your own reader. The definitive reference is of course the ISO standard, but it is not exactly cheap. However, ISO docu- ments pass through the public ‘Final Committee Draft’ (FCD) stage before being designated as official standards, with the result that they are partially available on the Internet. It also helps a lot if you have an operating reader available for making measurements. Here the author would like to express his special thanks to Mr Schalk at Philips for his active support. Addi- tional information is also available from manufacturers of ISO 14443 cards and reader ICs. Combined with a good deal of software for coding and decoding the protocols, that ultimately leads to a successful result. Test transmitter If you examine the data sheet of the Mifare Ultralight card, you will see that the simplest response of the card is a reply to a Request Command Type A (REQA command) after a power-on reset (POR). Once you have attained this first objective, you can examine the reply from the card and try to decode it. Of course, you have to understand how commands are sent to the card before you can actually send the command. The ISO 14443 standard describes how the commands are coded as bit sequences and sent to the card. The card is powered by a mag- netic field generated by a coil. The nominal carrier frequency (f c ) of the field is 13.56 MHz. This carrier is mod- ulated with 100% amplitude modula- tion to transfer data to the card. Fig- ure 1 shows the simple circuit we used for our first test. The carrier frequency f c is generated by a crystal oscillator, and this signal is also used as the clock for the micro- controller (in this case an ATtiny2313). One port pin acts in conjunction with a NAND gate (74F00) as a simple amplitude modulator. The 74F00 can ig /F=r7T - I-Jj vj . i ■ supply sufficient current to energise a Mifare card using a simple transmitter coil (note that a 74H00 can’t manage this). Figure 2 shows the assembled circuit in the test setup. The bits sent from the reader to the card are transferred using a bit inter- val for each bit of t bit = 128 -r f c = 9.439 /is. This yields a bit rate of 13.56 MHz + 128 = 105.9375 kbit/s. That is close to 100 kbit/s, or 100 microseconds per bit. Figure 3 shows how the individual bits are arranged. Bit coding The bit interval t bit can be imagined to be divided into four equal intervals of approximately 2.5 /is. There are three possible waveforms within each bit interval, which are designed X, Y and Z. With waveform X, the carrier is briefly keyed off starting at the middle of the bit interval. With Y the carrier is not keyed off, and with form Z it is keyed off at the start of the bit inter- val. A logic 1 is indicated by waveform X. The first zero of a sequence of logic 0 bits is coded using the Y wave- 34 elektor electronics - 9/2006 form, and the successive zeros are coded using the Z waveform. A series of bits always starts with Z (as the start sequence) and ends with a zero bit followed by Y (the details are given in the standard). The REQA command con- sists of 7 bits and has the value 025H in hexadecimal notation. The bits of each byte are transmitted with the least significant bit first. That yields the waveform shown in Figure 3. Here the carrier is keyed off for approximately one quarter of the bit inter- val, which means around 2.5 jL/s. The standard specifies the form of the pulses more precisely. The chosen trans- mission protocol fulfils sev- eral requirements. First, the carrier is keyed off only briefly to ensure that the card continues to receive suffi- cient energy on average. In addition, the bit clock can be recovered easily from the signal. Now it’s interesting to take a closer look at the waveform at the moment when the carrier is keyed off. For this purpose, we placed a card under the transmit coil and used a ‘sniffer coil’ (described in more detail below) to view the waveform on an oscilloscope (see Figure 2 and Figure 4). As our transmit coil is not accompanied by a capacitor to form a resonant circuit, it can be keyed without generating overshoots or undershoots. However, an overshoot is clearly visible after the carrier is switched off (left cursor line in Figure 4) when the transmit coil is close to the card. This over- shoot is generated by the resonant circuit in the card. Figure 1 . A simple Mifare test transmitter. Figure 2. Transmitter circuit with Mifare card and sniffer coil. Response If the REQA command is sent correctly and with sufficient power, the card must naturally send a sequence of two bytes in reply. Load modulation is used to send data back to the reader. The card generates this modulation by intentionally increasing the load on the reader field. The modulation frequency used for this purpose is f m = f c 16 = 847.5 kHz. The bit inter- val is again (in the simplest case) t bit = 128 H- f c = 9.439 ms. Here a ‘1’ is encoded by applying load modulation during the first half of the bit interval (the first half-bit). A ‘0’ is coded by applying load modulation during the second half of the bit interval. The load modulation can be observed readily using the sniffer probe. The signal from the sniffer probe is shown in more detail in Figure 5. The 9/2006 - elektor electronics 35 HANDS-ON RFID upper trace shows a relatively long portion of the signal. The seven carrier keying pulses of the REQA command can be seen at the left. The load modu- lation is faintly visible at the far right end of the upper trace. It is shown magnified in the lower trace. The first bit of the reply from the card is visible between the cursor lines. The first half (approximately 5 /is) is modulated with exactly four cycles of f m . This is fol- lowed by the unmodulated half-bit of the T bit. As you can see, the T bit is followed by two ‘0’ bits. Figure 4. Sniffer probe signal with carrier keying. M29.0UL& Trlgx i A : 2 &. GmV •l 2. &0niV 1 1 1 ill 1 1 1 ]0efcl+E |«: 106 Hr nil mi mi I 0.Q V 1 Z -LOCUS ftCfUZIO/ 2.0 1V 3$G K Q I'Vr ft Hill 200- I 9: 34:2 K I Figure 5. Sniffer probe signal with load modulation. Reader design After this observation session, we had a clear idea of how to build a sim- ple reader. The transmitter could remain almost as is, but the output stage had to be somewhat more pow- erful to ensure reliable card reading. Here we used a second coil to enable load modulation to be detected prop- erly. The card is inserted between the two coils. The load modulation is detected by amplitude demodulation of the signal picked up by the second coil. The design of the analogue por- tion is thus easier to explain than the digital components, which consist of a suitable microcontroller and a good deal of software. Which microcontroller? The microcontroller must be able to not only generate the transmit signal, but also receive and evaluate the response signal from the card. That requires a fast microcontroller, and not just for transmitting. The received bits arrive at a rate of approximately 100 kbit/s. The amplitude of the mod- ulation signal should be sampled at least four times for each bit to enable proper detection of ‘0’ and T bits. It helps that we know exactly when the card transmits and that it does not transmit an especially large number of bits. That means the detected signals can first be collected in memory and then evaluated later. A microcontroller with sufficient memory is thus useful. As the protocols include niceties such as parity bits, block checksums and CRC checksums, pure assembly-lan- guage programming would be rather laborious. It is thus better to generate most of the code in C. We decided on an Atmel ATmegal6, which has everything we need: sufficient pro- cessing power, ready availability, free software (WinAVR), and a simple pro- 36 elektor electronics - 9/2006 +5V Figure 6. Clock generator and transmitter portion of the experimental reader. gramming interface. That should cer- tainly be enough! We thus arrived at the overall design of our complete DIY RFID reader, which consists of three subcircuits. Transmitter circuit As you can see from Figure 6, the transmit portion is still simple. IC1 generates the 13.56-MHz clock, and the microcontroller modulates (keys) this signal using the MOD signal (port B.O pin). The 13.56-MHz signal provided by the 74HC00 passes through a push-pull stage formed by two simple, small MOSFETS (T1 and T2). It then arrives at the series-reso- nant circuit L1/C4. R2 damps the reso- nant circuit to reduce the duration of overshoots when the carrier is keyed off. Here we can remark that the reader does not necessarily have to be oper- ated at 13.56 MHz. Experiments showed that the Mifare cards will accept any signal between 12 MHz and 16 MHz. However, as the micro- controller in our reader also derives the baud rate from the clock frequency, the serial communication routines in the software must be reconfigured if you use a non-standard frequency, which means the program has to be recom- piled. Receiver circuit The receiver circuit (Figure 7) has to demodulate the load modulation and provide the result to the microcon- troller as a digital signal. Coil L3 receives the load-modulated signal, which is rectified by Dl. Reso- nant circuit L4/C6 has a resonant fre- quency of approximately 847 MHz, which matches f m . It is important that the bandwidth of this resonant circuit is sufficiently large to pass the modu- lation signal, which has a bit rate of approximately 100 kHz. This is achieved by damping it with resistor R6. Transistor T3 amplifies the signal, and resonant circuit L5/C7/R8 pro- vides additional filtering. The modu- lation present on the signal can then be detected by a rectifier (diode D2). The rectifier is followed by a three- stage RC low-pass filter and a com- parator. The reference level is set using R13. The digital signal at the output is provided to the microcon- troller for evaluation in the form of the DEMOD signal. The internal compara- tor of the ATmegal6 could have been used instead of comparator IC2, but using an external comparator makes it easier to examine the signal with an oscilloscope when the circuit is first put into service and check that the it is operating properly. Digital portion The digital portion of the circuit, as shown in Figure 8, does not have any unusual circuitry. A MAX232 supports an RS232 interface. A two-line LC dis- play enables the data from the card to be displayed for stand-alone operation. A simple voltage regulator circuit with a diode for protection against reverse polarity allows the circuit to be pow- ered by a simple AC adapter. Switch SI acts as a reset switch, and connec- tor I<2 provides access to the ISP port for in-system programming. Construction and coils The prototype (see the photo at the head of the article) was constructed on a piece of Vector board. Note that the portions of the circuit that process RF signals must be adequately decoupled with capacitors. The two rectangular coils (50 mm x 65 mm) spaced 30 mm apart, each consisting of 5 turns of 1- mm enamelled copper wire, are a spe- cial feature. The Mifare card should be placed between the two coils. The optimum position can be determined experimentally. Other configurations are also worth trying. It may be neces- sary to adjust the trimmer accordingly. Software and initial operation The software for the microcontroller can be downloaded from the Elektor Electronics website (www.elektor-elec- tronics.co.uk). You will find the appro- priate file and all supplementary infor- mation on the project page for this arti- cle, which you can access via the issue table of contents on the Elektor Elec- tronics website or our RFID summary page at www.elektor.com/rfid. The software is accompanied by a compre- hensive PDF document that addresses the following topics: • programming the Atmel microcon- troller • building a sniffer probe for field strength measurements • transmitter alignment and functional checks • receiver alignment • software tools and tips • security method • collision detection ISO 1 5693 RFID devices Besides ISO 14443, ISO 15693 is the most commonly used standard for RFID devices operating at 13.56 MHz. Although both standards use the same frequency, they differ considerably in other regards. ISO 14443 defines a con- tactless interface for smart cards with a range of at most 10 cm, while ISO 15693 defines a contactless label interface with a range of up to 1.5 m. 9/2006 - elektor electronics 37 HANDS-ON RFID In other words, you will find ISO 15963 on the products in your shopping bas- ket once barcode scanners at cash points have been replaced by RFID scanners, while you may already have ISO 14443 in your customer card. Our initial experiments indicated that the experimental reader could also be upgraded to read ISO 16963 RFID labels. As these labels use a different auxiliary carrier frequency, LC circuits L4/C6 and L5/C7 would have to be modified. It would also be necessary to use completely different software, as the modulation and coding methods are significantly different from those used for ISO 14443. However, the dif- ferent auxiliary carrier frequency and bit rates also make it possible to build a selective reader with a wider range, and possibly also with collision detec- tion. If our efforts to develop an ISO- 15693 version are successful, you will hear about it in a future issue of the magazine and via the Elektor Electron- ics newsletter. ( 060221 - 1 ) D3 1N4007 +5V © SUB D9 LCD C19 +5V © f— r\ 2 \ r\ 3 , 8 4 9 5 >< 1 5 3 8 ©7 13_ 14 4 ±3 5 i V + C1 + © IC3 Cl- R2IN R20UT T20UT T2IN RUN RIOUT TIOUT T11N C2+ MAX232 C2- V 16 GND VCC VO RS RW E DO D1 D2 D3 D4 D5 D6 D7 10 12 11 15 C18 1 o-- \ R16 X JA JB JC JD JE JF +5V © X 2 29_ 28 27 26 25 24 23 22 14 15 o- o- o- o- o- o- 16 17 18 19 20 21 10 30 32 I VCC AVCC AREF (TOSC2)PC7 PB0(XCK/T0) (TOSC1)PC6 (TDI)PC5 (TDO)PC4 (TMS)PC3 (TCK)PC2 (SDA) PCI (SCL) PCO PB1(T1) PB2(INT2/AIN0) PB3(OCO/AIN1) PB4(SS) PB5(MOSI) PB6(MISO) PB7(SCK) IC5 RESET ATmega16-16 PDO(RXD) PDI(TXD) PD2(INT0) PD3(INT1) PD4(OC1B) PD5(OC1 A) PD6(ICP1) PD7(OC2) GND GND (ADCO)PAO (ADCI)PAI (ADC2)PA2 (ADC3)PA3 (ADC4)PA4 (ADC5)PA5 (ADC6)PA6 (ADC7)PA7 XTAL1 XTAL2 11 X 31 13 12 MOD -Otpi-trig -OTP2 -OTP3-SAMPLE 0~*> DEMOD 40 39 38 37 36 35 34 33 K2 +5V © o a a o a o a o a 10 R19 -► CLK1 060221 - 15 Figure 8 . Digital portion with RS232 and LCD. 38 elektor electronics - 9/2006 '*i* Cyclone economics just got more economical. C pt feun» " Cyclone fell The lowest-cost FPGAs ever. Building on the success of the original Cyclone ™ family, the 90-nm Cyclone II family gives designers more density, more features, and more speed than ever before, all at a lower price. Cyclone II devices are the lowest-cost FPGAs ever, making them ideal for a wide range of volume-driven applications and creating a compelling alternative to ASICs for high- volume designs. When you need a company to rely on, Altera delivers. For high performance, more capabilities, fast time-to-market, and a price that will blow you away, contact us today at www.altera.com/cyclone2. Supported by QUART US’ 1 1 • Densities up to 3.5x the original Cyclone family • Dedicated DSP circuitry • Average of 60% faster than the competition • 90-nm devices shipping in volume Distributors Arrow Electronics (UK) Ltd: 01279 626777 EBV Elektronik UK: 01793 849933 The Programmable Solutions Company® www.altera.com/cyclone2 Copyright © 2005 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company, the stylised Altera logo, specific device designations, and all other words and logos that are identified as trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of Altera Corporation in the U.S. and other countries. All other product or service names are the property of their respective holders. Altera products are protected under numerous U.S. and foreign patents and pending applications, mask work rights, and copyrights. Leading tftrougPf innovation. 9/2006 - elektor electronics 39 TECHNOLOGY Communicating with America on the 70-cm and 2-m bands? This is only possible if you use a satellite or the moon. The first Dutch amateur satellite, Delfi-C 3 , offers its transponder and even asks amateurs to actively participate in its space mission. Taking your own pictures from space will soon be possible with the Compass-1, another ama- teur satellite. But can we shoot our own satellite into space? How would that be, your very own satellite in space? Not likely, you say? A number of university students and staff are making this a reality. They are busy developing their Delfi-C 3 satellite [1] intended to be to be launched next year. Launching may be overstating it — the satellite actually hitches a ride on a Russian SS-1 8 rocket. How- ever, a lot has to be done yet, because preparing the electronics for the rough journey is a big job. Fortunately the team members are very motivated and they can rely on support from Technical University Delft, The Nether- lands and others. Project The Delfi-C 3 project began in 2004 as a final year proj- ect in the faculty of Air and Space Technology at TU Delft. The Delfi-C 3 Cubesat is a predecessor of the research program MISAT, which aims to implement and test new developments for use in space travel. This proved an excellent method for university graduates to gain experience in the actual work involved. In addition, it allowed TUDelft to flex its muscles. Delfi-C 3 is, after ANS (1974), IRAS (1983), YES (1997) and Sloshsat (2005) actually the fifth Dutch satellite and the very first student/university satellite to go into space. Delfi-C 3 is a very small satellite, which measures only 34x10x10 cm and involves three separate research proj- ects. In addition to the home-grown linear frequency transponder, it contains a solar sensor from TNO and a new type of thin-film solar cell from Dutch Space. The offi- cial project names are: 'Advanced radio transceiver (Delfi-C 3 ), 'Autonomous, wireless solar sensor' (TNO and 'Thin film solar cells' (Dutch Space). All three stil have to prove their functionality in a vacuum. Unfortu- 40 elektor electronics - 9/2006 The three units of Deifi- ed ore jam-packed with electronics, as can be seen in this CAD drawing. nately the three research projects will never come back in one piece. The Cubesat will burn up on re-entry in the atmosphere. Depending on the altitude, it could actually take quite a while before this happens. At an orbit height of 500 km, for example, the satellite can be expected to be in space for about 25 years. At a height of 1 000 km, it could even be hundreds of years before the satellite returns. Overview The ground station for Delfi-C^ is located on the top of the 22-storey tower building of the faculty of Electrotech- nical Engineering of TU Delft. The base station, jointly built by the faculties of Air and Space Travel, Electrotech- nical Engineering, Mathematics and Computer Science, allows students and staff to gain experience with satellite communications to their hearts content. The system can, among other things, autonomously track Low Earth Orbit (LEO satellites that operate in the VHF, UHF and S bands. In addition, the system can decode telemetry data from these satellites. The team will use their base station to send commands to the Delfi-C^ and receive telemetry information. The transceiver developed by Delfi-C^ will receive control commands from the Delfi ground station and return telemetry data back to earth. About once a second, Cubesat sends a data word to earth, which contains all the information regarding the housekeeping of the satellite. The data word contains the 9/2006 - elektor electronics 41 TECHNOLOGY MINI SATELLITES All the PCBs are modelled on the computer in advance. This is a view of the bottom PCB. Close-up view of the positioning of the antennas in the Delfi-C 3 satellite. From left to right: skeleton of the 3 unit Delfi-C 3 Cubesat, early prototype of the internals and on the right a model of the final version. The satellite is very small indeed!. The one euro coin gives a good impression of the size. on-board voltage, the on-board temperature, the various currents that flow and all the information from the other two projects. In this way, for example, it is possible to determine the temperature and the very important l/V curve of the solar cells. The satellite has no data storage capability on board, so all data is immediately transmitted down to earth. The transceiver uses amateur radio frequencies for this pur- pose, which are also permitted for use with amateur satellite traffic (145 MHz and 435 MHz). The satellite is compatible with AMSAT standards and its linear transponder is available for radio amateurs, allowing them to make cross-continent contacts, for example between Europe and North America, when the satellite flies above the Atlantic Ocean. In exchange for this, the Delfi-C 3 crew ask all radio amateurs to send received data from Delfi-C 3 to the base station in Delft. Work is currently in progress on software that allows radio amateurs to process the data at home. In this way, data can be collected when the satellite is out of range of the ground station. The research project of TNO is a new type of solar sen- sor with a wireless interface. This is an important experi- ment for size critical applications because there will be no need for wires running through the satellite. The solar cells from Dutch Space are also new types, which have to be tested in the tough environment of space. Delfi-C 3 is a great opportunity for both companies to test the theories of the drawing table in practice. Technology Nanosatellites have little opportunity for energy genera- tion. There is very little room for batteries and scarcely any surface area for solar cells. That is why the on-board electronics has to be very extremely thrifty with energy. The transceiver that is being developed by the Delfi-C 3 team has an antenna amplifier which operates with inte- grated transformers in the negative feedback loop. This allows the efficiency of the amplifier to be increased while trading off linearity. This non-linearity is then cor- rected with negative feedback. In this way an antenna amplifier has been created that has both greater effi- ciency and better linearity. This improved linearity is very important in satellites, because multiple frequency bands are often used for the data traffic allowing more data to be transmitted. Many of the electronic parts used are standard compo- nents. Everything works well by using these parts in clever ways. The antennas, for example, are made from the same material as that used for a tape measure. A few things to take into account are operating temperature range, operation in a vacuum and radiation hardness. For example, electrolytic capacitors cannot be used in space, tantalum capacitors have to be used instead. Cos- mic radiation can also have a significant influence. It is therefore necessary to add additional screening. For this you need to consider the desired operating life time and the total dose of radiation that the component will have to endure over a certain period. Delfi-C 3 has been designed for an operating life of three months. Testing of this design target is done with simulation software, calcu- lations and various radiation sources in a test enclosure. Incidentally, the use of standard components has been proven by a previous successful implementation. OSCAR- 7 (an amateur satellite which was launched in 1974) was built with the first generation of CMOS ICs and is still functioning. 42 elektor electronics - 9/2006 Construction handbook DIY satellite • Think of a technical design subject or a circuit with which you would like to carry out experiments in space. • Establish a business. Only if you are in business can you apply for a subsidy at the NIVR. You will get a 75% sub- sidy for industrial research for space technology. • Look for a wealthy sponsor who is prepared to provide the remainder of the finance. • Many hands make light work, so look for multiple partici- pants, preferable those with the means to contribute finan- cially as well. • Buy a Cubesat, costs about € 5000. For that you get an aluminium box that has undergone special treatment and has a Teflon coating on the outside. The structure is quali- fied and has been tested for launch. • Solar cells for power generation cost a few hundred euro per cell and are not all that expensive for such a crucial element. • The internal electronics you buy from the local electronics shop, that works well and is also cheap. • Printed circuit boards can be made with FR4 substrate. They work well with a little treatment. • The greatest expense by far is labour. Keep this in mind when you cannot complete the task by yourself and start to employ other people. Of course, you can also look for help at various organisations. There you can always find enthusiasts who will only be too happy to give you a hand in their spare time. Cold Space? Another problem that you certainly wouldn't pause to think about in the first instance, is the dissipation of heat. The satellite generates about 2.5 W, of which about 0.4 W is the radio signal transmitted from the antenna. So about 2 watts have to be dissipated as heat some- where. Since convection does not take place in a vac- uum, heat can only be dissipated via radiation and (inter- nal) conduction. And then, 2 W is suddenly quite a lot. In addition there is heating from the sun (some 1000 W/m2). The only possibility to control the temperature is to choose the surface material of the satellite just right (for example, consider the reflectivity of a surface). The thor- ough simulation of what comprises the best configuration and the location of where an isolating or radiating sur- face should be is so complex that it was the thesis for a student from the Delfi-C^ group. Not the only one The group from Delft is not unique. In Aachen (Germany) there is also a project which uses a Cubesat. Using the name COMPASS-1 the Fachhochschule Aachen will launch a satellite that besides taking pictures of the earth will also test a new bus system for space vehicles [2]. The equipment on the Compass-1 comprises a GPS, a camera, an energy backup source, a 3-axis magnetome- ter, five solar cells, some 1 2 temperature sensors (five of which are on the outside, one near the battery pack and the others integrated in ICs), current and voltage sensors, and a fieldstrength meter. The latter is used to measure the received signal strength of the uplink signal. The ori- entation of the satellite is adjustable with air coils which act on the earth's magnetic field. The coils are custom manufactured. The insulation material of the wire consists of polyurethane that melts at a temperature of about 1 80 °C. By melting the polyurethane the windings can be held in place without making a short circuit, a techni- cal tour de force. Technology 2 Compass-1 also operates at 145 and 435 MHz. Just as with Delfi-C^, this satellite is also allocated its own fre- quencies within the 70-cm and 2-m bands by AMSAT [5]. The uplink of the Compass-1 is in the 2-m band. There are two downlink channels in the 70-cm band. FSK (fre- quency-shift keying) modulation and the AX20 protocol are used on one channel for sending large data packets, such as photos, to earth. The other channel is available for a CW signal (Morse code). GPS is used to determine the exact location of the satel- lite. The other sensors collect telemetry data which is sent to earth for analysis. After a few months, once the Compass team has com- pleted all their measurements and experiments, they will make the satellite available for use by anyone. That means that any licensed radio amateur can, for example, instruct the satellite to take a picture and receive the data. In Practice Before you can even start to think about building a satel- lite you will have to put a design together, including all the specifications of all the subsystems (what does the sys- tem have to do, how does it do it, with what perform- ance, etcetera). You then progress through a sequence of steps where you will closely examine the design concept, validation, breadboard prototype, engineering model and the flight model. Once the entire sequence has been completed, the original specification then serves as the final checklist. All systems have to be tested on the ground. Every possi- ble fault situation has to be simulated including the envi- ronmental tests (that is, thermal tests, vacuum tests, radia- tion tests, shock, g-force and vibration tests related to the launch, etc.). Before the launch you will need to take into account the altitude it which the satellite will be placed. The main payload satellite determines the altitude. You therefore have to be able to make last-minute adjustments to tune the satellite for the altitude. Hitching a ride on a launch usually costs between 20,000 and 50,000 dollars. But sometimes, if you're lucky, you can go along with another satellite for free. JAXA (the Japanese space agency), for example, offers a number of free piggyback launches with their H-2A. From 2008 this GOSAT satellite, sponsored by the govern- 9/2006 - elektor electronics 43 NOLOGY MINI SATELLITES ntest •, • with ”‘'n«o pes»9 n r- t\eVc» or °A design »n« s ke ’ * ,he spring •» '**•*?££ * nded ititude ot <>' ch ° n ° be disco* v,tt need b * h< 0F H Eiektor « n d bo«*n 9 ot V ; ^ ent ll o^ eor r ° i same v * 1 c f the* e \ comb, ° a l v/i* E ' eVct ° r I eratmn design 1 t l p v/»nn»ny \ ^ , y/hirir « >"’ e ' \ r°* e ' ^-,11 reo fo ,.her derads merit, will search for greenhouse gas concentrations in the atmosphere. The German Compass-1 group is sponsored by the DLR (Deutsches Zentrum fur Luft- und Raumfahrt). In addition, the FachHochschule Aachen also provides a helping hand. The remainder of the money has to be gathered by the boys themselves, from sponsors. In Delft, the TNO, Dutch Space and TUDelft pay for all the costs of the project. ( 060227 - 1 ) With thanks to W.J. Ubbels from ISIS [4] (Delfi-C3 team), Jeroen Brinkman from NERO and de COMPASS- 1 group from the FH-Aachen. Weblinks [1] www.delfic3.nl [2]www. raumfahrt. fh-aachen.de/ [3] www.amsat.org [4] www.isispace.nl Professional amateurs In addition to the activity in Delft, there are other projects in the Netherlands related to cheap space travel. From Leiden, the company Delta-Utec has already worked for 1 0 years with students from all around Europe, building (and launch- ing) satellites. At this moment a second Young Engineers' Satellite (abbreviated to YES2) is being built. The object of this satellite is to show that a wire (tether) can be used to return a satellite back to earth. This works as follows. In a classical balance between gravity and centrifugal force the satellites move in circular orbits, distant satellites move slower than near ones. On the same principle it takes the moon one month to complete one orbit, but the Space shuttle takes only an hour and a half. If you now lower, on a wire, a light satellite from a heavier one, the lower, lighter satellite, because of the wire, will move at the same speed as the higher, heavier satellite. If you now cut this wire, then the lighter satellite has actually too little speed to maintain its orbit around the earth and will therefore fall back to earth. For this purpose, the YES2 has a thirty kilometres long Dyneema line on board, which will be used in 2007 to accu- rately return a small capsule back to earth. This capsule, called Fotino, weighs only 5 kg and is probably the smallest return capsule ever. It is also the first return capsule built by students. Fotino contains scientific instrumentation to measure all the details of the unique return. At a late stage it was decided that a parachute system had to be fitted to the Fotino to ensure a soft landing. To make a running start possible a search was made in the Netherlands for expertise in the area of building light parachute systems. This was found quickly at the Netherlands Organisation for Rocket Research (NERO), the pre-eminent Dutch organisation for rocket amateurs. In this organisation there appeared to be plenty of expertise in the area of designing and qualifying of parachute systems. The connections with suppliers and test facilities were also invaluable. For the amateur rocket enthusiasts from NERO the opportuni- ty to cooperate with real space projects is obviously fantastic. A multi-disciplinary project team has been formed that is sup- ported by Delta-Utec with the design and qualification of the parachute. This system had to be designed and tested according to the requirements of the ESA, in only a few months of available time. That showed that the working pro- cedures of the professional space industry and those of the NERO do not differ all that much. Where the professional space industry does more calculations and simulations, the amateurs do more testing. But the end result is the same: working and qualified systems. And in this way hobbyist and professionals complement each other. More information: www.yes2.info www. n e ro roc kets . o rg 44 elektor electronics - 9/2006 she electronics Quasar Electronics Limited PO Box 6935, Bishops Stortford CM23 4WP, United Kingdom Tel: 0870 246 1826 Fax: 0870 460 1045 E-mail: sales@quasarelectronics.com Web: www.QuasarElectronics.com Postage & Packing Options (Up to 2Kg gross weight): UK Standard 3-7 Day Delivery - £3.95; UK Mainland Next Day Delivery - £8.95; Europe (EU) - £6.95; Rest of World - £9.95 (up to 0.5Kg) lOrder online for reduced price UK Postage! We accept all major credit/debit cards. Make cheques/PO’s payable to Quasar Electronics. Prices include 17.5% VAT. Call now for our FREE CATALOGUE with details of over 300 kits, projects, modules and publications. Discounts for bulk quantities. r VISA — IN — T'n 08717 Credit Card 1 77 1 68 Get Plugged In! Motor Drivers/Controllers Here are just a few of our controller and driver modules for AC, DC, unipolar/bipolar stepper motors and servo motors. See website for full details. NEW! PC / Standalone Unipolar Stepper Motor Driver Drives any 5, 6 or 8-lead unipolar stepper motor rated up to 6 Amps max. Provides speed and direc- tion control. Operates in stand-alone or PC- controlled mode. Up to six 3179 driver boards can be connected to a single parallel port. Supply: 9Vdc. PCB: 80x50mm. Kit Order Code: 31 79KT - £1 1 .95 Assembled Order Code: AS3179 - £19.95 NEW! Bi-Polar Stepper Motor Driver Drive any bi-polar stepper motor using externally sup- plied 5V levels for stepping and direction control. These usually come from software running on a computer. Supply: 8-30Vdc. PCB: 75x85mm. Kit Order Code: 3158KT - £15.95 Assembled Order Code: AS3158 - £29.95 NEW! Bidirectional DC Motor Controller Controls the speed of most common DC motors (rated up to 16Vdc/5A) in both the forward and reverse direction. The range of control is from fully OFF to fully ON in both directions. The direction and speed are con- trolled using a single potentiometer. Screw terminal block for connections. Kit Order Code: 3166KT - £16.95 Assembled Order Code: AS3166 - £25.95 DC Motor Speed Controller (100V/7.5A) Control the speed of almost any common DC motor rated up to 100V/7.5A. Pulse width modulation output for maximum motor torque at all speeds. Supply: 5-15Vdc. Box supplied. Dimensions (mm): 60Wx100Lx60H. Kit Order Code: 3067KT - £13.95 Assembled Order Code: AS3067 - £20.95 Most items are available in kit form (KT suffix) or assembled and ready for use (AS prefix). Controllers & Loggers Here are just a few of the controller and data acquisition and control units we have. See website for full details. Suitable PSU for all units: Order Code PSU445 £8.95 Serial Isolated I/O Relay Module Computer controlled 8- channel relay board. 5A mains rated relay outputs. 4 isolated digital inputs. Useful in a variety of con- trol and sensing applica- tions. Controlled via serial port for programming (using our new Windows interface, terminal emulator or batch files). Includes plastic case 130x100x30mm. Supply: 12Vdc/500mA. Kit Order Code: 3108KT - £54.95 Assembled Order Code: AS3108 - £64.95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port. °C or °F. Continuously logs up to 4 separate sensors located 200m+ from board. Wide range of free software appli- cations for storing/using data. PCB just 38x38mm. Powered by PC. Includes one DS1820 sensor and four header cables. Kit Order Code: 3145KT - £18.95 Assembled Order Code: AS3145 - £25.95 Additional DS1820 Sensors - £3.95 each Rolling Code 4-Channel UHF Remote State-of-the-Art. High security. 4 channels. Momentary or latching relay output. Range up to 40m. Up to 15 Tx’s can be learnt by one Rx (kit in- cludes one Tx but more avail- able separately). 4 indicator LED ’s. Rx: PCB 77x85mm, 12Vdc/6mA (standby). Two and Ten channel versions also available. Kit Order Code: 3180KT - £44.95 Assembled Order Code: AS3180 - £51.95 NEW! DTMF Telephone Relay Switcher Call your phone number using a DTMF phone from anywhere in the world and remotely turn on/off any of the 4 relays as desired. User settable Security Password, Anti- Tamper, Rings to Answer, Auto Hang-up and Lockout. Includes plastic case. Not BT ap- proved. 130x110x30mm. Power: 12Vdc. Kit Order Code: 3140KT - £46.95 Assembled Order Code: AS3140 - £64.95 Infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control unit. Toggle or momentary. 15m+ range. 112x122mm. Supply: 12Vdc/0.5A Kit Order Code: 3142KT - £47.95 Assembled Order Code: AS3142 - £66.95 PIC & ATMEL Programmers We have a wide range of low cost PIC and ATMEL Programmers. Complete range and documentation available from our web site. Programmer Accessories: 40-pin Wide ZIF socket (ZIF40W) £15.00 18Vdc Power supply (PSU010) £19.95 Leads: Parallel (LDC136) £4.95 / Serial (LDC441) £4.95 / USB (LDC644) £2.95 NEW! USB & Serial Port PIC Programmer USB/Serial connection. Header cable for ICSP. Free Windows XP software. Wide range of supported PICs - see website for complete listing. ZIF Socket/USB lead not included. Supply: 16-18Vdc. Kit Order Code: 3149EKT - £37.95 Assembled Order Code: AS3149E - £52.95 NEW! USB 'All-Flash' PIC Programmer USB PIC programmer for all ‘Flash’ devices. No external power supply making it truly portable. Supplied with box and Windows Software. ZIF Socket and USB lead not included. Assembled Order Code: AS3128 - £44.95 “PICALL” PIC Programmer “PICALL” will program virtu- al ally all 8 to 40 pin serial-mode AND parallel-mode (PIC16C5x family) pro- grammed PIC micro controllers. Free fully functional software. Blank chip auto detect for super fast bulk programming. Parallel port connection. Supply: 16-18Vdc. Assembled Order Code: AS31 17 - £24.95 ATMEL 89xxxx Programmer Uses serial port and any standard terminal comms program. Program/ Read/ Verify Code Data, Write Fuse/Lock Bits, Erase and Blank Check. 4 LED’s display the status. ZIF sockets not included. Supply: 16-18Vdc. Kit Order Code: 3123KT - £24.95 Assembled Order Code: AS3123 - £34.95 www. QuasarElectronics. com Secure Online Ordering Facilities • Full Product Listing, Descriptions & Photos • Kit Documentation & Software Downloads 9/2006 - elektor electronics 45 HANDS-ON INSTRUMENTATION Wilfried Wcitzig DiSEqC™ (Digital Satellite Equipment Control) is a way of controlling satellite receiver equipment and accessories. Many problems that occur in input switching systems can be tracked down to failures in DiSEqC communications with the receiver. This DiSEqC monitor allows commands on the control bus to be analysed as a first step on the way to finding the fault. 46 elektor electronics - 9/2006 IC2 +5V (±> 78L05 4 R9 h x V r^r 10k R8 J - ! +5V «H±) H 22 Q | — |OOOOOOOOOOOOOOj LCD1 tttttttttttttt QQQQQQQQ I^DC^QW DC > > / \ LC DISPLAY V J 040398 - 1 1 Figure 1. Circuit diagram of the DiSEqC monitor: the PIC microcontroller (or rather its software) is responsible for most of the functions. In outline a satellite television receiver consists of two parts: • an outdoor unit with dish and LNB (low noise block converter); and • the receiver itself. The two are linked by a coaxial cable which also carries power to the LNB. The LNB acts as a frequency downcon- verter for the two frequency bands used for satellite TV transmissions: • low band, approximately 10.7 GHz to 11.8 GHz; and • high band, approximately 11.7 GHz to 12.75 GHz. The LNB amplifies the signals received from the satellite and shifts them to a frequency band between 0.95 GHz to 2.15 GHz for the receiver. As is explained in more detail elsewhere in this issue, the polarisation plane of the LNB is set by switching its supply volt- age between 14 V (for vertical polari- sation) and 18 V (for horizontal). With more than one LNB a switchable 22- kHz signal is superimposed on the supply voltage. If this signal is not present, LNB1 (for example) is selected; if the signal is present, LNB2 is selected. With the introduction of digital satellite television the opportu- nity was taken to bring all the control functions together into a single bus, operating over the coaxial cable. This avoids the need for extra control cables, for example in the case of a motorised dish mount. The cable there- fore carries: • power for all the devices (LNB, switch, positioner etc.); • control functions using the 22 kHz signal; and • last but not least, the satellite signal down-converted to the 0.95 GHz to 2.15 GHz band. In order to broaden the possibilities for using multiple satellites and LNBs a 9/2006 - elektor electronics 47 HANDS-ON INSTRUMENTATION INTERRUPT f shift bit-value into data-byte T datacnt + = 1 return from INTERRUPT reset TIMER cnttimer = 0 cntint + = 1 ► | cntint = 32 -►I cnttimer = 16 no 22 kHz-signal permanent 22 kHz-signal datacnt = 0 cntint = 0 ^ set bit "O'" -H set bit "1" set flag: "byte is complete" 040398-12 Figure 2. Simplified flowchart of the interrupt routine. digital control system for the various devices was developed. The so-called DiSEqC system transmits data using amplitude modulation of the 22 kHz signal. Version 2.0 of the protocol was laid down by Eutelsat in 1998 [2]. In theory The DiSEqC monitor couples a micro- controller to the control bus using a design based on an application circuit provided by Eutelsat [1]. The PIC16F628 is also connected to an LCD module with two rows of 16 charac- ters, which displays the DiSEqC com- mands. The circuit is inserted in line with the coaxial cable connecting the satellite equipment and draws power from the bus. The PIC microcontroller eavesdrops on the bus, listening for control com- mands which it records in its RAM. Up to 20 DiSEqC commands (80 bytes) can be stored. When recording is over the display shows the individual com- mands either in hexadecimal or in the abbreviated form given in [2]. The DiSEqC monitor is useful for test- ing and tracking down control prob- lems. The circuit allows you to check whether the receiver is controlling satellite equipment such as a DiSEqC switch or LNB correctly. Hardware The simplicity of the circuit in Figure 1 is a consequence of the fact that most of the functions of the unit are carried out in software by the PIC. The few external components are responsible for the following functions: • coupling of the signals of interest from the control bus (coaxial cable); • suppressing unwanted HF signals; • user interface (display and buttons); • clock generation (quartz crystal). The connection to the control bus is via the two coaxial F-connectors K1 and K2. Since these are connected directly together, and because the low-pass fil- ter formed by LI, L2 and Cl presents a high impedance, attenuation of the passed-through HF signal is negligible. The filter also removes the HF compo- nent from the signal seen by the DiS- EqC monitor. The DC voltage of 14 V or 18 V present on the cable, used to sup- ply the LNB, passes through the low- pass filter to voltage regulator IC2, which produces the 5 V supply for the monitor circuit. The LNB supply volt- age of 14 V or 18 V is also checked by the PIC microcontroller and the status shown on LED D6. The potential divider formed by R1 and R2 scales the 14 V or 18 V to 2.3 V or 3.0 V for the comparator input RAO on pin 17. Out- put RA3 (pin 2) drives LED D6, which lights if the voltage on the coaxial cable is 18 V. Half the supply voltage, or 2.5 V, appears on RA2, the reference output of the comparators (pin 1). The poten- tial divider formed by R4 and R3 reduces this to 2.34 V at the input to comparator 2 (RA1, pin 18). The 22 kHz signal is also coupled to this input via capacitor C5. When a 22 kHz signal is present output RA4 (pin 3) drives LED D5, as well as generating an interrupt on every rising edge via the connection to input RB0 (pin 6). The LCD module is driven in 4-bit mode using data outputs RB4 to RB7 and control signals on RB2 and RB3. Buttons SI to S4 are read in multi- plexed fashion using input RBI and the LCD data lines, with diodes D1 to D4 preventing operation of the buttons from interfering with the display. Quartz crystal XI may be replaced by 48 elektor electronics - 9/2006 Figure 3. The compact printed circuit board mostly employs SMD components. a 4 MHz ceramic resonator if desired; in this case C9 and CIO may be dis- pensed with. Bits and bytes As already noted, the 22 kHz signal, which has a nominal amplitude of 0.65 V pp , is amplitude modulated to encode DiSEqC commands. A data bit on the bus is formed as follows: ‘0’ bit: 1.0 ms 22 kHz signal followed by 0.5 ms pause; T bit: 0.5 ms 22 kHz signal followed by 1.0 ms pause. Each data bit thus lasts 1.5 ms. A data byte consists of eight data bits and one parity bit R and therefore has a duration of 9 _ 1.5 ms = 13.5 ms. The format of the DiSEqC commands is shown in Table 1. Essentially the satellite receiver behaves as the bus master. The address byte selects between the var- ious slave devices (LNBs, polarisers, positioners, switches etc.) and the command byte gives the command. In version 2.0 of DiSEqC the slave devices can also reply to requests from the master. Some examples of com- mands from the DiSEqC specification [2] are also given in Table 1. PIC software The program in the PIC16F628 can be divided into three functional blocks: • interrupt handling; • loop for displaying bytes read and for reading the buttons; • routines to output values and strings. The 22 kHz signal generates an exter- nal interrupt every 45 /is via input bit 0 of PORTB. A continuous 22 kHz tone is recognised when more than 32 con- secutive pulses of the 22 kHz signal are received. TIMER0 counts the duration of the pauses, generating an interrupt every 110 /is. If more than 16 pause inter- rupts occur (16 x 110 /is = 1760 /is), this is recognised as a continuous pause in the signal. A ‘0’ data bit consists of 22 signal pulses and four gaps, while a ‘1’ data bit consists of 11 pulses and eight gaps. The bit values are packed into a byte and checked against the parity bit. Figure 2 shows a simplified flowchart of the interrupt routine. We will now look briefly at two important parts of the code. • The main loop makes periodic checks to see if a byte has been read or if a button has been pressed. If a byte has been read it is then output on the display. If one of the buttons SI to S4 has been pressed, control passes to the corresponding routine. • The output routines convert the byte value into hexadecimal form and, depending on the function, into a command in abbreviated form with four characters (as described in [2]). For example, the command # 7 might be displayed as #7 E01038F4 (in hexadecimal mode) or as M LNBs wrN0:F4 (in abbreviated form). This stands for ‘master (E0) to LNBs (10), write to port group 0 (38), with data F4’, meaning that the master (satellite receiver) is instructing all LNBs and switches to ‘clear all flags’ (nibble F) and ‘set flag 2’ (nibble 4). In the case of a switch, this command would select an input. 9/2006 - elektor electronics 49 HANDS-ON INSTRUMENTATION Figure 4. Our assembled prototype board. Printed circuit board and construction The printed circuit board (Figure 3) is very compact and so there should be no difficulty in finding a suitable enclo- sure. A further feature of the layout is that the F-type sockets can be mounted at angles of 0, 90 or 180 degrees to one another. The four but- tons are arranged on a strip of board that can be detached, allowing other i COMPONENTS LIST Resistors (all SMD case 0805 except PI) R1 = 15kft R2 = 3k£20 R3 = IMG R4 = 39kn R5 = 680^ R6 = 560£l R 7 = 39ka R8 = 22Q R9 = 47kn PI = 1 Okfl preset Capacitors (all SMD case 0805 except C8) Cl = lOOpF C2 = InF C3 / C4 / C6 / C7 = lOOnF C5 = 220pF C8 = 1 0|jF 16V (SMD case B) C9,CW = 27pF Inductors L1,L2 = 27 nH (f^ > 2GHz) SMD case 0603 (e.g., Epcos B82496A3270J; Farnell # 158-604) Semiconductors D1-D4 = 1N4148, SMD case 0805 (e.g. TS4148, Farnell # 815-0206) D5 = LED, 3mm, green D6 = LED, 3mm, red IC1 = PIC1 6F628A-20/P, programmed, order code 040398-41 IC2 = 78L05 Miscellaneous K1,K2 = F socket, angled, 75fl, for PCB mounting (Amphenol; Farnell #1111 377) S1-S4 = 6-mm pushbutton, 1 make contact, PCB mount (bounce time < 4ms) XI = 4MHz quartz crystal LCD1 = LCD module, 2x16 characters, general purpose 2 14-way pinheader and mating socket for LCD connection (optional, see text) PCB, ref. 040398-1 from The PCBShop) PIC source and hex files, file # 040398-1 1, free download from www.elektor-electronics.co.uk 50 elektor electronics - 9/2006 Table 1 . Format of DiSEqC commands types of button to be used, hand- wired if necessary. The LEDs can of course also be mounted on a front panel and hand- wired. The resonant frequency of the two coils LI and L2 should lie above the output frequency of the LNB (or LNBs). The EPCOS types specified in the parts list are suitable. The cathode of the SMD diodes D1 to D4 is marked on the component over- lay by a thicker line. F-type connectors are made by vari- ous manufacturers, but unfortunately in diverse pinout arrangements. For this reason we have allowed extra space in the layout. This means that if you use the types specified in the parts list, you should take care when soldering to ensure that they are sym- metrically fitted. The display is connected via 14-way headers (and possibly also a ribbon cable). This allows the display to be easily mounted at a suitable place in the chosen enclosure. Unfortunately not all display modules have the same pinout. It is not possible to use the backlight (if the display has one) as the current drawn from the coaxial cable (and thence from the satellite receiver), and which flows through the 78L05, must be kept to a minimum. The total current consumption of the DiSEqC monitor, including the LCD module (but not its backlight) is only approximately 12 mA. It is of course possible to dispense with the 78L05 and connect a regulated 5 V supply across C4 to avoid loading the satellite control bus. A display backlight could then be used. Operation On power-up the monitor is reset by R7 and C7. It initialises itself and shows the message DiSEqC-Monitor Elektor V. 05/06 If nothing appears on the display, try adjusting the contrast with PI. The unit then enters data recording mode with the display showing: DiSEqC raw data A character indicates that the bus is active and that the transmitted bytes are stored as raw data in the microcontroller’s RAM. They are simul- taneously displayed on the LCD in Master Command: FRAMING IPI ADDRESS IPI COMMAND IPI DATA IPI Byte 1 : framing byte 'EO' to 'E3' = master Byte 2: address byte upper nibble: family (LNB, positioner, etc.) lower nibble: sub-type Byte 3: command byte standardised command Byte 4: data byte command-dependent data Byte 5: data byte command-dependent data Slave reply: FRAMING IPI DATA IPI DATA IPI Byte 1 : framing byte 'E4' to 'E7' = slave Byte 2: data byte command-dependent reply data Byte 3: data byte command-dependent reply data Examples: Byte Command name Meaning 20 Set Lo LNB: select low frequency band 24 Set Hi LNB: select high frequency band 21 Set VR LNB: vertical polarisation 25 Set HL LNB: horizontal polarisation 38 Write NO Switches: set four signals 'WXYZ' Subsequent data byte: upper nibble: clear 'WXYZ' lower nibble: set 'WXYZ' hexadecimal form. When the RAM buffer becomes full the device auto- matically exits recording mode. Button SI allows recording to be stopped and restarted. In display mode (when recording is complete) the individual DiSEqC commands, each beginning with the ‘EO’ framing byte, can be displayed in sequence either in forwards (button S2) or reverse (button S3) order. Button S4 selects whether the commands are displayed in abbre- viated form. Further information on satellite reception and DiSEqC com- mands can be found on the Eutelsat website. ( 040398 - 1 ) References and downloads [1] Application Information for Using a TIC' Microcontroller in DiSEqC™ LNB and Simple Switcher Applications (1999), PDF available from www.eutelsat.com [2] DiSEqC Bus Functional Specification V. 4.2 (1998), PDF available from www.eutelsat.com [3] Source and object files for the PIC16F628: free download from www.elektor- electronics.co.uk 9/2006 - elektor electronics 51 TECHNOLOGY E-BLOCKS ARM RM John Dobson With the introduction of an ARM-based development board, there are now three E-blocks processor platforms to choose from: PIC, AVR and ARM. The latter is a class of its own due to speed and raw processing power. When explaining what a microcon- troller is to those who have some elec- tronics experience but who don’t actually use microcontrollers I often explain it like this: if you remember back to when you had a Z80 or 6502 processor, connected to a serial I/O chip, EPROM chips, RAM chips and assorted glue logic on a double sided Eurocard: well a microcontroller per- forms the same function as the whole card but it is contained on just one chip. With the arrival of the Atmel ARM7 the word ‘microcontroller’ just took on a whole new meaning so I am going to have to think of a new metaphor. Something like: ‘remember the first ‘386 motherboards? Well now you have the equivalent of a complete motherboard on one chip.’ would be a closer approximation to describing this device. Let me explain. Table 1. AT91SAM7S128 quick features list • 1 28 k flash ROM • 32 k RAM • 80 MHz internal clock speed • 2 USARTs • USB programming and communications interface • 32 I/O lines • 4-channel 16-bit PWM outputs • 32-bit processor • 8 x 300-kHz 1 0- bit A/D converters The AT91SAM7 Until recently the ARM has still been out of reach of the non- specialist micro- controller programmer but a number of changes mean that a low cost solution to developing projects with ARM cores in is now open to everyone. In this respect, the Elektor Electronics ARMee Development Sytem [1] based on the Philips LPC210x ARM CPU was a ground breaking publication. 52 elektor electronics - 9/2006 ack C compiler included — it's a beast! Firstly, developments in higher reso- lution semiconductor masks have meant that it is now possible to squeeze more transistors onto a given area of silicon. Users of integrated cir- cuits effectively pay for the cost of the silicon inside the device and the pack- aging: so a smaller area of silicon used means lower cost. The ARM device detailed here costs only £6.50, or around 10 euros each. There is a down side here: squeezing more tran- sistors into a given area means that the available power dissipation of the device reduces: cleverly the ARM designers have compensated for this by reducing the internal operating voltage down to 1.8 V, which means that the transistors in the chip use only an eighth of the power of a simi- lar 5 V device. To help you along a lit- tle the device has peripheral circuitry that presents the i/o lines at a level of 3.3 V at the point where they interface to the outside world, and these i/o lines are 5 V tolerant (inputs to the micro are compatible with existing circuitry, but the output lines will only give 3.3 V). Secondly, Atmel have released a series of devices which have built in USB 2.0 support. As a result, you don’t need an expensive programmer — although if you have a JTAG programmer the device can also be programmed that way. With an appropriate shell pro- gram inside the device you can simply connect the ARM to your PC and download your program. This also allows engineers to add USB function- ality to Atmel AT91SAM7 projects. USB is not the only trick up Atmel’ s sleeve — in fact the (greatly) abbreviated fea- tures list reads like something from an engineer’s letter to Santa Clause - see Table 1! If you are used to programming PIC micros, 8051 cores, or other Atmel 8-bit devices then you will agree that the AT91SAM7S128 is a real beast! Unfor- tunately for us, Atmel are only making these devices available in high density surface mounted packages - in this case the dreaded ‘64-pin LQFP’ pack- 1 . Screw terminals 2. Power connector 3. USB connector 4. Power selector link block 5. Port E I/O 6. Reset switch 7. Port A I/O 8. Port B I/O 9. Port C I/O 10. Port DI/0 1 1 . JTAG interface 1 2. Power switch 13. ARM daughter board 1 4. Programming selector link block 1 5. Programming switch 1 6. Recovery selector link block Figure 1. The ARM mother and daughter board age. On this package, the pins are so close together that manual soldering is a bit of a lottery which brings us to our next point: The third change here is that a low cost development platform has been developed for the E-blocks range of products. This solves a few problems: the hardware solution contains two printed circuit boards: the device itself is placed on a daughter board which sits on top of a mother board — see Figure 1. The daughter board has 9/2006 - elekor electronics 53 TECHNOLOGY E-BLOCKS ARM P* I. Li Ml. 'I .1 J - ‘ ir ■■ p 1 1 4i -i—y mb •mM Ifofl tAlv |ksb in p m3 bbI ha pniin fc& ibt MT y Kb f Jw *■ pifn k « r *'■ Figure 2. A screen image of the course showing the virtual ARM. int main (void) { /* Set all of PORTA as an output */ AT91F_PI0_Cf gOutput ( AT91C_BASE_PI0A, PORTA ) ; while ( 1 ) { /* Set pin 0 of PORTA high */ AT91F_PI0_Set0utput ( AT91C_BASE_PI0A, PORTAO ) ; /* Set pin 0 of PORTA low */ AT91F_PI0_Clear0utput ( AT91C_BASE_PI0A, PORTAO ); Figure 3. A simple LED flasher routine on pin 'AO'. ARMed with some history The AT91SAM7 series of devices from Atmel is based on the ARM7TDMI core developed by ARM (Advanced RISC Machines Ltd.) in England. ARM, based in Cambridge, is one of the UK's greatest technology success stories of the last decade. Spun off from a company that was an original competitor of the IBM PC and Apple back in the early 80's — Acorn Computers — the ARM team of devel- opers has become one of the world's leading designers of microprocessor cores. Unlike its competitors ARM does not manufacture any devices itself. Instead it develops the designs of microprocessors which it then licences to other 1C manu- facturers - including Philips, Texas Instruments and, in this case, Atmel. This busi- ness model has made ARM amazingly successful. Virtually every major semicon- ductor company has taken out a licence for an ARM core and many millions of ARM processors are now in use. The mobile phone industry in particular has adopted the ARM as a near de facto standard for use in mobile devices because of the ARM's ultra-low power consumption and huge processing power, and you will find ARM cores in your iPod and Gameboy Advanced. several rows of standard PCB headers with 0.1-inch pin spacing so that it can be placed on to project boards and effectively used as a component in its own right, making the technology readily usable in a range of projects. The Atmel AT91SAM7S128 on the daughter board is programmed with a custom made bootloader program and a Windows application which allows you to easily download binary files into the device via USB onto the mother- board. The E -blocks motherboard has five E-blocks ports presenting the I/O lines on the rugged 9-way sub-D type connectors, a power supply input and a USB connector. The connections on these ports are optimised so that users can take advantage of the 25+ E- blocks downstream boards which con- tain a range of peripherals from simple LED boards to more complex system modules like Bluetooth, IrDA, and CAN bus. All E -blocks and related products may be found in the SHOP section of www. elektor-electronics .co.uk. Learning ARM programming Finally, a new CD ROM called ‘C Pro- gramming for ARM Microcontrollers’ has been developed which provides you with a C compiler, an Integrated Development Environment and an on- screen full course on programming the ARM device. The course is a key ele- ment of this package which is part tutorial and part off-the-shelf design elements you can use. The on-screen course also includes a number of vir- tual ARM simulations which will allow you to more easily understand the pro- gramming concepts involved. This is illustrated in Figure 2. The CD-ROM based course also links seamlessly to a compiler and IDE which are supplied along with a num- ber of C code examples that show you how to develop a range of programs for the ARM. These range from very simple tasks, starting with lighting a LED on a single output pin, through to tasks of medium complexity, such as programs to control LCDs using serial communications. The C compiler is based on the open source GNU com- piler and it is possible to add other licence free GNU code libraries to this. An added bonus here is that the float- ing point library is already included in the compiler set up and the system is able to execute full floating point arithmetic. 54 elektor electronics - 9/2006 Great strides: from 8 bit to 32 bit The ARM is a 32-bit core which means greater processing power and support for a larger variable range and advanced mathematical operations, floating point etc. But when you just want to control eight bits on a port then writing and reading 32 bit words to memory addresses can become a lit- tle unwieldy. To get round this the CD ROM also has an ‘include’ file and a range of pre-written functions that allow you to use the I/O pins on the ARM like a more simple 8-bit device with ports A to E — a little like a PIC micro. These routines give you a good head start in using the ARM and also mean that your current 8 bit programs and routines can be easily ported to the ARM platform. To give you an example of this, in Fig- ure 3 you can see a sample of a rou- tine to flash a LED on port A. This is the entire program as all memory loca- tion addresses and functions are defined for you in a separate file. If you are an 8-bit user you will notice that some of the strings used here, for example ‘AT91F_PIO_SetOutput’, seem a little long winded, and you might think a simple ‘SetOutput’ would do. However the CD-ROM’s authors, Rob and David Miles, have kept the syntax of the basic functions and variables in the same style as Atmel’s own code libraries. Whilst this may take you a lit- tle longer to get used to it means that what you learn in taking the course is immediately transferable to any of the Atmel ARM devices as they all share similar configurations. Easy ARM pack To help you get started with the ARM we have produced an Easy ARM Kit that is now available. It contains a USB lead, ARM motherboard, ARM daugh- ter board, LED board, Switch board, and LCD board as well as a ‘C Pro- gramming for ARM microcontrollers’ CD ROM. For price and ordering details, please visit the SHOP section of the Publishers’ website. Conclusion The low-cost and high processing power of the ARM core is making it one of the most popular processors in industry today. Whilst many hobbyists and small companies have yet to start using ARMs, the ATMEL device dis- cussed here has so many benefits to offer, that we think it will not be long before ARMs are one of the most popu- lar processors for our readers too. ( 065069 - 1 ) Reference [1]. ARM Development System, Elektor Electronics April and May 2005. Advertisement Ciiv Tg PHI SYSTEM . 4 COLOUR CAMERAS + DVR PACKAGE FtAWfWl LA! ($7 JPG IMPll* JWfi MW r MFPS * CD# SYSTEM 4G3, 4 COLOUR CAMERAS + DUH PACKAGE Htfltpivi; UJiSJ JPG Df OSC1/ CLKIN OSC2/ CLKOUT Timing Generation x4 PLL 33> Powe r-up Timer Oscillator Start-up Timer Powe r-on Reset Watchdog Timer Brown-out Reset a / STATUS reg MUX ALU £ W reg MCLR Vdd, Vss Parallel Slave Port (2> PORTC RCO/TIOSO/TICKI RC1/T10SI/CCP2 RC2/CCP1 RC6/TX/CK RC7/RX/DT PORTD RD3:0/PSP3:0 (2) 3 RD4/PSP4< 2 > RD5/PSP5 (2) RD6/PSP6 (2 > RD7/PSP7 (2 > PORTE 3 RE0/AN5/RD (2) RE1/AN6/WR (2) RE2/AN7/CS (2) <33 xcvr VUSB D- D+ Note 1 : Higher order bits are from the STATUS register. 2: Not available on PIC16C745. 060012 - 12 Figure 1. PIC16C745 architecture. 10 - 20 - 30 - 40 - +5V D- D+ GND R1 C2 220n £sv) 15 16 14 -13 12 11 XI 10 ^^50 n 20 © MCLR W RC7 RC6 D- IC2 D+ RB7 RB6 RB5 RB4 VUSB RB3 RC2 RB2 RC1 RBI RC0 RB0 PIC16C745SO RA5 RA4 OSC1 RA3 RA2 RA1 OSC2 RAO 19 18 17 28 27 26 25 24 23 22 21 IC1 © r 6 DO -06 7 DO -07 05 GND DMX DS75176BM 060012 - 11 Figure 2. The circuit diagram of our converter is limited, in fact, to a PIC micro and an RS485 bus driver. 9/2006 - elektor electronics 71 HANDS-ON DMX512 Figure 3. Not for the faint-hearted... Figure 4. The PIC occupies almost all space at one of the board sides. This double-sided board is through-plated. COMPONENTS LIST Resistors R1 = lk^5 0.25W 5% (0805) Capacitors Cl = 150nF ceramic (0603) C2 = 220nF ceramic (0603) Semiconductors IC1 = DS75176BM (National Semiconductor) IC2 = PIC1 6C745-I/SO, programmed, order code 060012-41 Miscellaneous XI = 6MHz resonator, Murata CSTCR6M00G53-R0 XLR connector, Cannon type 10HC089 (e.g. www.distrelec.com, # 1 1 2242)USB A-A cable, 1 .8m, standard PCB, ref. 060012-1 from The PCBshop Project software, free download # 060012-1 1. zip from www.elektor- electronics.co.uk directionally, in case you would like to modify the firmware of the PIC to use it as a DMX512 input. The non- inverting buffer output of the RS485 driver is connected to pin 3 of the XLR connector and the inverter out- put is connected to pin 2, since pin 1 is connected to ground. As far as the USB cable and connector are con- cerned, this is a moulded cable sold in retail stores or the one with your old mouse (USB, of course!). It has four wires plus shielding: a pair of untwisted, fairly thick wires for the 5 V power supply voltage and two thinner wires, twisted as pair, for data transmission. XLR connectors are supplied by many manufacturers. Here, a, Cannon type 10HC089 is used. It is important to use this XLR connector because a standard Neu- trik connector does not have enough space to hold the circuit. Programming the PIC The PIC 16C745 micro has to be pro- grammed before soldering it onto the board. If you’re a home programmer, make sure you have a suitable DIL-to- SOIC adaptor with your programmer. Alternatively, as we did in our tests (see the photo in Figure 3), you can make one yourself using a DIL carrier, a piece of Rateable and a test clip for SOIC circuits. The hex (object code) file to burn into the PIC is called firmware\usb2dmx.hex. It is con- tained in archive file 060012-11. zip which may be downloaded free of charge from our website. The PIC may also be purchased ready-programmed from the Elektor SHOP Heat up your soldering irons! Populating the board requires some skills handling SMD parts but should not cause dramatic problems. Fortu- nately, the components used for this project are not as difficult to solder as, for example, an ARM processor in a BGA package with 278 balls, sized 14 mm x 14 mm! The printed circuit board of which the top and bottom side artwork is shown in Figure 4 is without doubt, one of the smallest we have ever published in Elektor Electronics. You need to use a soldering iron with a fine tip and thin gauge solder. Start by soldering the PIC micro, IC2, into place (be careful to observe the correct polar- 72 elektor electronics - 9/2006 ity), which then constitutes a base plane in order to solder the compo- nents on the other side of the circuit. The best option, so as to perfectly align the integrated circuit on the board, is to apply a bit of solder to two pads for corner pins of the device. Next, place the PIC and reheat the two solder terminals in order to create an initial attachment point for the compo- nent. If the component is perfectly positioned, the only thing left to do is to solder the remaining 26 pins. If not, reheat the corner pins and carefully re- align the chip. Next, solder R1 and C2 on this side by pre-tinning a pad, then placing the component with tweezers while keep- ing the pad at fusion temperature. Next, solder the other connection of the component. Use the same tech- nique to solder the remaining compo- nents (IC1, Cl, XI) on the other side of the board. XI is the component that requires the most attention because it is more usually soldered using the ‘reflow’ technique. Microsurgery Next, we cut a USB type ‘A- A’ cable in half and strip it. The black wire is sol- dered to the 0 V pad (terminal 4), the red wire to the + 5V pad (terminal 1), the green wire to the D + pad (termi- nal 3) and finally the white wire to the D- pad (terminal 2). You’ll find that this bit of the construction requires some dexterity in handling the solder iron, Figure 5. If you ore used to installing USB peripherals, this type of screen should look familiar. Figure 6. The 'test cpp.exe' program is used for quick testing of our USB/DMX512 converter. Figure 7. The purpose of the oGenlnt.sys driver function is to shape the 'requests' sent by the USB bus. Figure 8. Settings screen in FreeStyler. 9/2006 - elektor electronics 73 HANDS-ON DMX512 Figure 9. The number of functions available in FreeStyler makes it quasi-professional. since there are no holes in the printed circuit. The cable shielding is soldered to the connector strip. The next step is to solder the circuit to the XLR connec- tor, from which the rubber cable guide has been cut. Terminal 5 should be sol- dered to pin 1 of the XLR connector, terminal 6 to pin 3, and finally termi- nal 7 to pin 2. Before applying a little glue to keep the USB cable in place and to close the XLR connector again, test the set- up by connecting it to your computer. When the new USB device is inserted for the first time, you will be asked to install the drivers provided in the .zip file 060012-11. zip (Figure 5). Once the drivers are installed, connect the XLR plug to your DMX512 equipment and launch the program cpp_test\bin\test_cpp.exe which is found in the same archive file. There you have it! Software environment PIC firmware The assembly code of the PIC is derived from version 1.25 of the firmware provided on Microchip’s website, the manufacturer of the PIC16C745. We used version 1.25 because version 2.00 did not seem to function with the erasable PICs we had available. The file usbjnain.asm contains an endless loop reading batches of data sent by the computer. These data are utilised in the dmx512.asm file that synchro- nises the USB reception with the trans- mission on the serial DMX512 bus. Also in this file we find the code that serves to generate the pause required at the end of each DMX field. The test_cpp.exe program This program, shown in action in Fig- Internet links : Author's website: http://www.oksidizer.com http:// membres.lycos.fr/ epatix/dmx_5 1 2.htm http://users.pandora.be/freestylerdmx/ http://www.beyondlogic.org/usbnutshell/ http://ogloton.free.fr/dmx_5 1 2/index. html ure 6, is used to quickly test the oper- ation of the USB/DMX512 converter. Its source code demonstrates the way to use the unique function exported from DLL DasHard.dll. The really important bits happen in the test_cppDlg.cpp file. More specif- ically, the CTest_cppDlg::OnVScroll function copies the value of the cur- sors in the OutDmx output buffer. And the CTest_cppDlg::OnTimer function, called on at regular inter- vals, loads the DLL and obtains a pointer on the OksidCommand func- tion during its first call. During the fol- lowing calls, it simply passes the out- put buffer to the OksidCommand function. The DLL DasHard.dll This one links it all to the driver and, provided a converter is connected to the computer, opens a data stream with it. This stream is fed by a specific thread that loops as long as the DLL is used. Refer to the source code for more details. The oGenilnt.sys driver The driver (see the screenshot in Fig- ure 7), of which the source code is regrettably not available, is in charge of shaping Control-type requests trav- elling on the USB bus. The OGENINT.INF file makes the driver installation possible. It creates the association between the driver with our USB module, thanks to the Vendor ID and Product ID identifiers that are specific to our application. FreeStyler, free DMX512 driver software. FreeStyler is software written in Visual Basic that makes it possible to drive DMX512 equipment by indifferently using an impressive variety of convert- ers for the parallel, USB, or Ethernet port. As shown in the screenshot in Figure 8, the latest version also func- tions with our circuit using the refer- ence ‘Oksidizer USB2DMX’. FreeStyler is available as a free download from the website run by the author of the program. It comes with a complete user manual. The screen copy in Figure 9 shows that FreeStyler offers a range of func- tions that may disconcert a beginner but will be welcomed as very useful by (DMX512-)enlightened amateurs and professionals. ( 060012 - 1 ) 74 elektor electronics - 9/2006 RETRONICS INFOTAINMENT Pontavi-Thomson Bridge Rolf Blipeven A bakelite box with rounded cor- ners, two large knobs on top and a nice small meter. Still in perfect condition, with proper Test Termi- nals. It was waiting to be thrown away when some colleagues were tidying up a cupboard, since the device was no longer used. 'The Rx Resistor' we called it, and it was used to measure the values of resistors used in manu- facturing gas analysers. Because I found it heartbreaking to see such a magnificent piece of equipment disappear in the skip they let me take it home. Admittedly, it stayed in the loft for the first few years. But when I finally needed it one day, it was easy to understand the Ger- man instruction manual. Its oper- ation and application turned out to be child's play. The Pontavi- Thomson made by Hartmann & Braun is a bridge that can accu- rately measure low-value resis- tors (Rx). The measurement range is from 0.0001 £1 up to 2.1 £1, and the measurement error is less than 5%. Rx is connected directly to the ter- minals on the left-hand side and also to the terminals at the top via two leads — see Figure 1 . At the right you have to connect a power source with a voltage of 2 V and capable of sourcing sev- eral amps. We're now ready to take a measurement. With the switch set to 1 Ohm, you momen- tarily press down button T, which is on the top-right. If the meter deflects to the left, you should turn the big dial to the right. If the meter doesn't move with the dial turned all the way it follows that the value of the resistor is greater than 2.4 £1 or so, which is too large to be measured by this instrument. If the meter instead deflects to the right, you can set the switch to a tenth, a hundredth or a thousandth of an Ohm. In one of those settings you'll find that you can set the dial such that the pointer is absolutely central. The scale has been provided with a mirror to avoid errors caused by the parallax effect — when the pointer is no longer visible in the mirror (i.e. when your eye is straight above the needle) you have removed any parallax error. The value of Rx is then calculated by multiplying the position of the dial by the setting of the switch. A piece of cake, really. Finding out about the theory of operation (which should be included in a descriptive article like this) turned out to be less easy. The manual casually men- tions 'the well-known Thomson cir- cuit'. This may have been well- known in the sixties, but I had cer- tainly never heard of it. Much to my surprise, a search on the Inter- net led me to a more modern ver- sion of the Pontavi-Thomson [1], but I still couldn't find an easy to understand description. I did dis- cover that Pontavi wasn't, as I thought at first, an Italian col- league of Mr. Thomson, but rather a descriptive term used by Hartmann & Braun: there was also a 'Kapavi' for capacitors ('Kapazitaten'), and an Inkavi for inductors ('Induktionen') [2]. I finally found the answer in a library book in the college, in a chapter we were allowed to skip for our exams (that's why!). The operation comes down to the following (Figure 2): the resistors on either side of the ammeter have such a large value that little or no current flows through the terminals at Xe. Their contact resistance and that of the leads can therefore be ignored. The series resistance between the wiper and the negative side of the supply reduces the voltage across the bridge but doesn't influence its balance. The same applies to the resistor in the posi- tive supply side. The bridge is bal- anced when the ratio of resistor S to the left of the wiper and Rx is the same as the ratio of the resis- tors 'below' and 'above' the wiper of W. In that state the posi- tion of W in combination with that of S returns the value of Rx. It's a marvel of simplicity and ingenuity. Inside we can see the wirewound resistors connected to decade switch W (right-hand photo). It all imparts a sense of reliability and craftsmanship; we can almost see the electrons rush round with the naked eye. It's all very different from the latest SMD boards made by robots. The old cliche has to be said at this point: they don't make them like this any more! Is there still a place in the world of modern electronics for an instrument such as this? The principle is still in use, but with servo circuits that determine the resistance automatically. There is probably a niche for this instru- ment in high-end audio: owners of ultra-pure platinum doped cop- per loudspeaker cables can make sure that the resistance of the left and right hand cables is identical, giving an even better stereo reproduction. I'll be using it for my own projects, which I can't tell you about just yet. ( 065062 - 1 ) Web links and literature [1] www. alte-messtechnik. de [2] www.jogis-roehrenbude.de 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. 9/2006 - elektor electronics 75 HANDS-ON DESIGN TIPS Battery discharger 1 LI T1 BT1 £ NiCd 1V2 BC237 R1 BC237 D1 T- 1N4001 R2 R3 T T see text 060160-11 Gerard Guilhem The circuit shown in Figure 1 allows NiCd type LR03 (AAA) and LR6 (AA) rechargeable cells to be discharged in a controlled manner. The discharging (load) current is about 500 mA. The LED indicates the progress of the dis- charging process — it goes out when the battery is completely discharged. The current becomes zero at a battery voltage of about 0.6 V, which is perfectly accept- able for most NiCd cells. The 2.2- ohm resistors R2 and R3 are the components taking the battery current and turning it into heat. The diagram in Figure 2 closely resembles the first one. Here we suggest using an npn power tran- sistor, T3, as the power dissipat- ing component. The (pulsed) dis- charging current is determined by the value of resistor R1 . Discharging NiMH (nickel metal hydride) batteries is not a prob- lem either, since the terminal volt- age is the same as NiCd cells — the only difference is the usually higher capacity compared with NiCd cells. The crucial parameter here is the deep discharge (or 'end') volt- age. Again, 0.6 V is acceptable for NiCd as well as NiMH cells. Accidental polarity reversal is a real danger, but then, only one cell is 'treated' at a time so no great losses will be suffered. The LED goes out when the cell volt- age approaches 0.9 V and that's when the battery should be discon- nected. Transistors T1 and T2 of the first schematic may be just about any small-signal npn from the BCxxx series, like BC237, BC337, BC547 and so on. Resistor R1 determines the current consump- tion of the circuit, as well as the current stored in choke LI and consequently, the LED brightness. It can take a value of between 15 £2 and 47 £2, where the lower value results in higher brightness and maximum current consumption. The inductance of the choke is not critical and may be between 1 0 |jH and 1 00 piH — you'll find that only the fre- quency of operation will change. This will be about 200 kHz with a 20 pi H choke and will vary a little due to the stray base-collector capacitance of the transistor you're using. To prevent parasitic radiation of the circuit, it is recommended to fit a 100-nF (0. 1 -piF) decoupling capacitor across the battery ter- minals. The author employs a quadruple version of this battery discharger. ( 060160 - 1 ) Miniature tweezers for SMDs Luc Lemmens Fitting SMD parts onto a circuit board is sure to tax your patience, eyesight and precision to a degree. In this magazine we've often described the tech- niques for positioning and solder- ing of tiny parts like SMDs and will continue to share our tips and experience with you. These days, it seems you can't go round SMD parts anymore. Although many implements and methods are available when it comes to picking up SMDs and positioning them on a board, the humble pair of tweezers is proba- bly one of the most frequently used tools when you're down to picking and placing SMDs manually. Tweezers come in many shapes and sizes. However, despite their variety, they have at least one common feature: a relatively large force is required to keep the ends firmly pressed against each other. We're not talking about the physical force exerted by your fin- gers to close the arms, but the fact that a normal pair of tweez- ers will easily launch' a tiny part like an SMD if it is not perfectly straight in the clamps, or if you accidentally hit something while moving the part from container or reel onto the circuit board. In nearly all cases, the SMD part then becomes an easy prey for the missus' vacuum cleaner. Very annoying, and a shame to lose the part. Fortunately, there exists a type of tweezers that's perfect for us. Besides, it's cheap and widely available. Its small size, low spring load and flat jaws make it the tool for manual fitting of SMD parts. To cap it all, you may have already this perfect pair of tweez- ers — and here's a secret: it is one of the tools contained in the well-known Victorinox Swiss Army Knife! If you want one, the good news is that you do not necessarily have to buy an SAK. The tweez- ers are also available as a spare part from hardware stores or out- door sports shops. Still, choosing a tool for a certain job is subject to personal taste — what's perfect for you may be a disaster for someone else. Some of you may argue that the SAK mini tweezers are far too small but then the price of about £2.50 each can't be a real objection if you want to give it a try. ( 060229 - 1 ) 76 elektor electronics - 9/2006 PUZZLE INFOTAINMENT Hexadoku Puzzle with an electronic touch Following the super complex Alphadoku in last month's edition it's time to revert back to the 'standard' level of difficulty, which is the well-known Hexadoku. This electronics-oriented variation of Sudoku is guaranteed to give you a few hours of puzzling fun. Enter the competition for a chance to win one of several fantastic prizes. The instructions for the puzzle are straightforward. In the diagram composed of 16x16 boxes, enter numbers in such a way that all hexadecimal numbers 0 through F (that's 0- 9 and A-F) occur once in every row, once in every col- umn, and in every one of the 4x4 boxes (marked by the thicker black lines). A number of clues are given in the puz- zle and these determine the start situation. Your solution may win a prize and requires only the num- bers in the grey boxes to be sent to us (see below). The puzzle is also available as a free download from our website (Magazine — » 2006 — » September). ( 065070 - 1 ) Entering the competition Please send the numbers in the grey boxes by email, fax or post to Elektor Electronics Hexadoku Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom. Fax (+44) (0)208 2614447 Email: editor@elektor-electronics.co.uk Subject: hexadoku 09-2006. The closing date is 1 October 2006. Competition not open to employees of Segment b.v., its business partners and/or associated publishing houses. Prize winners The solution of the June 2006 Hexadoku is: 1A6DC. The E-blocks Starter Kit Professional goes to: JohnHoughton (Richmond). An Elektor SHOP Voucher worth £35.00 goes to: Ian K. Rolfe (Newbury), Luciano Poretti (Arconate, I) and Richard Mansfield (Eastbourne). Well done everybody! 2 C B 6 4 8 5 6 4 5 A 8 0 D 3 B 1 E C 7 0 F 9 0 1 7 4 D C 6 7 E B D 2 4 0 3 8 2 F 9 C 5 7 B 7 5 3 C 4 A 1 E 1 C 5 0 8 F D C 8 D A E F 5 B 4 7 8 3 0 8 D E 9 B 6 B A 6 9 5 4 7 C 3 8 2 5 8 F B 7 7 D 0 5 3 2 3 B 4 2 A D F 7 F C 2 4 6 Solve Hexadoku and win! Correct solutions enter a prize draw for an E-blocks Starter Kit Professional worth £248.55 and three Elektor Electronics Shop Vouchers worth £35 each. We believe these prizes should encourage all our readers to participate! 9/2006 - elektor electronics 77 ELEKTOR SHOWCASE To book your showcase space contact Huson International Media Tel. (0) 1 932 564999 Fax 0044 (0) 1 932 564998 ATC SEMITEC LTD www.atcsemitec.co.uk Thermal and current-sensitive components for temperature control and circuit protection; • NTC Thermistors • Current Diodes • Thermostats • Re-settable Fuses • Thermal Fuses • Temperature Sensors Call today for free samples and pricing Tel: 0870 901 0777 Fax: 0870 901 0888 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. DESIGN GATEWAY www.design-gateway.com PalmLogic II .... US$ 399.00 • Compact Logic Analyzer (L1 1 6mm x W73.3mm x T3mm) • High sampling rate (400 MHz/ 8ch, 200 MHz/1 6ch, 100 MHz/32ch)(g| • USB 2.0 high speed mode • 8MB memory storage • Bus Analyzer function • Multiple waveform windows • Waveform save/restore DESIGN GATEWAY www.design-gateway.com True PCI Starter Kit .... US$135.00 • PCI Development Kit • Based on 200,000 gates FPGA • Extension connectors for 72 pin I/O true po • Configuration support for JTAG and slave serial • Free PCI Core for Target Mode ■ ■ ip ■ DESIGN GATEWAY www.design-gateway.com Ethernet 10 .... US$115.00 • 8 bits embedded network microcontroller • 6 channels available for 10 bits ADC • Ethernet 1 0 BASE T 1 0 Mb • UART port RS232/RS485, Max Speed atl 1 5200bps • 35 bits general purpose I/O • 500 bytes user area flash memory DESIGN GATEWAY www.design-gateway.com VariClock... US$163.00 • Adjustable clock signal synthesizer • 3 rotary switches for frequency setting • Standard DIP pin arrangement • Support both 3V/5V by on-board regulator VC250M14P Frequency range : 25-400 MHz Frequency setting : 1 MHz step VC1 00M1 4P Frequency range : 25-1 00 MHz Frequency setting : 1 00 kHz step for 25- 50 MHz : 200 kHz step for more than 50 MHz AVIT RESEARCH www.avitresearch.co.uk USB has never been so simple... with our USB to Microcontroller Interface cable. Appears just like a serial port to both PC and Microcontroller, for really easy USB connection to your projects, or replacement of existing RS232 interfaces. See our webpage for more details. Only £29.99 inc vat. BAEC http://baec.tripod.com "The British Amateur Electronics Club Archive Website. Archiving extracts from 140+ Newsletters from 1966- 2002. Currently have interesting and useful selected articles from 12 Newsletters. Also a section about built electronics projects with schematics and photos. Plus useful info., downloads and links. NO ADVERTS!" COMPULOGIC LTD www.compulogic.co.uk Internet Remote Control Starter Kit £139.99 Create a simple web based remote control interface for many applications • Miniature Web Server Module •Analogue/Digital Module •PSU • Manuals, software, example HTML code 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 http://www.DanburyElectronics.co.uk Transformer manufacturers since 1 983. Visit our new site! Also link directly to Mike Holme’s Valve/- Tube DIY amplifier site, featuring our standard Audio Transformers (Mains, Output, Chokes, PP, SE, etc). EAGLEPICS http://www.eaglepics.co.uk Embedded Internet Solutions • Stand alone TCP/IP module • Platform independent • Simple "AT-like" command set • GPRS or modem connection • E-Mail, FTP, HTTP, UDP • Development board available • Free development utilities • Free UDP-only stack EASYSYNC http ://www. easysy n c . co . u k 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 FIRST TECHNOLOGY TRANSFER LTD. http://www.ftt.co.uk/PICProTrng.html Microchip Professional C and Assembly Programming Courses. The future is embedded. Microchip Consultant /Training Partner developed courses: • Distance learning / instructor led • Assembly / C-Programming of PIC1 6, PIC1 8, PIC24, dsPIC microcontrollers • Foundation / Intermediate FUTURE TECHNOLOGY DEVICES http://www.ftdichip.com FTDI designs and sells 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 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. HEROS TECHNOLOGY LTD www.herostechnology.co.uk Introducing Modular Concept for microcontrollers. Suitable for Developers, Pre-production, Educational and Hobby applications. • WinPIC2006 USB full speed programmer. • CPU microcontroller modules. • Peripheral modules for all microcontrollers. lifS* iWfenaAogf rra^ir I*.* 78 elektor electronics - 9/2006 products and services directory 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 KMK TECHNOLOGIES Ltd. http://www.kmk.com.hk Low Cost DIY Robotic Kits and Computer Controller Boards. 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 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. OLD COLONY SOUND LAB www.audioXpress.com Premier source for DIY audio for 35 years! New catalog features: • Books •CDs •Test & Measurement • Kits Full range of products and magazines for the DIY audio enthusiast! 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. 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 ROBOT ELECTRONICS http://www.robot-electronics.co.uk Advanced Sensors and Electronics for Robotics • Ultrasonic Range Finders • Compass modules • Infra-Red Thermal sensors • Motor Controllers • Vision Systems • Wireless Telemetry Links • Embedded Controllers SK PANG ELECTRONICS http://www.skpang.co.uk • ELM OBDII 1C • VAG-COM Interface • OBDII connector and cable • Modtronix Micro X board • Embedded Ethernet Controller • PIC Microcontroller, CAN Bus driver Major credit cards taken online. UJ trarlecfe. ■. - . ULTRALEDS v 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. VIRTINS TECHNOLOGY www.virtins.com PC and Pocket PC based virtual instrument for electronics enthusiasts, students, professionals and scientists, including sound card real time oscilloscope, spectrum analyzer, and signal generator. Free to download and try. ELECTRONIC ENTHUSIASTS Only one magazine tests its projects and circuits in its own lab before publication ELEKTOR ELECTRONICS THE ELECTRONICS & COMPUTER MAGAZINE iZgf;?! 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 9/2006 - elektor electronics 79 E-bloaks J v I m si r Free downloads available on www.elektor-electronics.co.uk/eblocks ! C for AVR microcontrollers single user £ 1 1 8.00 E-blocks AVR multiprogrammer E-blocks LED board E-blocks LCD board E-blocks Switch board Total value: ^ ocks Easy Internet Kit Flowcode Professional E-blocks LED board E-blocks LCD board E-blocks USB Multiprogrammer E-blocks Switch board E-blocks Internet board PIC16F877 Ethernet ‘crossover’ cable Total value: Flowcode student/home: USB Multiprogrammer: Total value: 59.90 77.30 137.20 Flowcode professional USB Multiprogrammer E-blocks LED board E-blocks Switch board E-blocks LCD board Total value: E-blocks Easy CAN Flowcode Professional E-blocks LED board E-blocks Switch board 2 x E-blocks LCD board 2 x E-block USB Multiprogrammer 2 x E-blocks CAN board 2 x PIC16F877 Total value: Special Offer: lektor Order now using the Order Form in the Readers Services section in this issue. CD-ROM Home Automation This CD-ROM provides an overview of what manufactu- rers offer today in the field of Home Networking, both wired and wireless. The CD-ROM contains specifications, stan- dards and protocols of com- mercially available bus and network systems. For develo- pers, there are datasheets of specific components and various items with application data. End-users and hobbyists will find ready-made applications that can be used immediately. £12.95 (US$ 22.90) ECD Edition 3 Elektor’s Components Database gives you easy access to design data for over 5,000 ICs, more than 35,000 transistors, FETs, thyristors and triacs, just under 25,000 diodes and 1 ,800 optocouplers. All data- bank applications are fully interactive, allowing the user to add, edit and complete component data. £14.95 (US$ 26.50) Robotics A large collection of data- sheets, software tools, tips, tricks and Internet links to assorted robot constructions and general technical infor- mation. All aspects of modern robotics are covered, from sensors to motors, mechanical parts to microcontrollers, not forgetting matching programming tools and libraries for signal processing. £12.05 (US$21.25) Elektor Electronics (Publishing) Reg us Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Telephone +44 (0) 208 261 4509 Fax +44 (0) 208 261 4447 Email: sales@elektor-electronics.co.uk More information on www.elektor-electronics.co.uk Microcontroller Basics 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. This book offers more than just a basic introduction. It 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. Visual Basic for Electronics Engineering Applications This book is targeted towards those people that want to control existing or home made hardware from their computer. After familiarizing yourself with Visual Basic, its development environment and the toolset it offers are discussed in detail. Each topic is accompanied by clear, ready to run code, and where necessary, schematics are provided that will get your projects up to speed in no time. MKIMONniOlUR Basics '*1 W ISBN 0-905705-67-X 230 Pages £18.70 (US$ 33.70) I lc ctri Hici itiVianrrraM ISBN 0-905705-68-8 476 Pages £27.50 (US$ 51.50) BESTSELLING BOOKS Top-5 Visual Basic for Electronics Engineering Applications ISBN 0-905705-68-8 £27.50 (US$ 51.50) Microcontroller Basics ISBN 0-905705-67-X £18.70 (US$ 33.70) PC-Interfaces under Windows ISBN 0-905705-65-3 £25.95 (US$ 22.90) Modern High-end Valve Amplifiers ISBN 0-905705-63-7 £25.95 (US$ 52.00) 308 Circuits ISBN 0-905705-66-1 £18.20 (US$ 37.00) More information on www.elektor-electronics.co.uk lektor © Order now using the Order Form in the Readers Services section in this issue. Order o www.elektor-el GameBoy Programmable Logic Controller Ready-built PCB and I/O Extension (July/August 2006) Turn your Gameboy games console into a powerful home automation controller with Elektor’s GBPLC Module and the associated I/O Board. Save £££’s Reserve a set and beat the price! The more reservation we get, he lower the price. Go to Quick Service on www.elektor-electronics.co.uk, click on Gameboy PLC and reserve your set. You can save tens of pounds! The Elektor website will indicate the current price, so you instantly see your discount! GameBoy Programmable Logic Controller Ready-assembled and tested GBPLC Module and Programming Interface 050190-91 GBPLC l 2 C I/O Box Ready assembled and tested board 060098-91 Elektor RFID-reader (September 2006) Ready-built and tested PCB with USB port for connection to the PC. Including USB cable; not including display and enclosure. 060132-91 £ 41 . 50 / $ 77.95 LC-display 030451-72 £ 7 . 25 /$ 13.65 Matching enclosure 060132-71 £ 8 . 90 /$ 16.85 CD-ROM (all project software) 060132-81 £ 5 . 20 / $ 9.75 - Read and write 13.56 MHz RFID cards - Ml FARE and ISO 14443-A compatible - Programmable MORE READY-BUILT PROJECTS £ $1 ClariTy 300-W Class-T Amplifier 030217-91 Amplifier board with SMDs pre-fitted; cores for LI & L2 34-50 55.70 Electrosmog Tester 050008-91 PCB, ready built and tested 50-00 94.25 050008-71 Matching enclosure 10-25 19.30 Flash Microcontroller Starter Kit 010208-91 Ready-assembled PCB incl. software, cable, adapter & related articles 69-00 1 1 2.50 Gameboy Digital Sampling Oscilloscope (GBDSO) 990082-91 Ready-assembled board, incl. the PC software and related articles 103-00 183.00 LPC210x ARMee Development System 040444-91 Processor board, ready-made and tested 25-50 48.05 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. 358 SEPTEMBER 2006 Elektor RFID Reader 060132-91 PCB, ready assembled & tested, with USB cable 030451-72 Standard back-lit LC display 060132-71 Matching enclosure 060132-81 CD-ROM, all project software Experimental RFID Reader 060221 -1 1 Disk, all project software 060221-41 ATmega16, programmed DiSEqC Monitor 040398-1 1 Disk, PIC source & hex code 040398-41 PIC1 6F628A-20/P, programmed 41.50 77.95 7.25 13.65 8.90 16.85 5.20 9.75 5.20 9.75 8.90 16.85 5.20 9.75 5.50 10.35 USB/DMX512 Converter 060012-11 Disk, all project software 5.20 9.75 060012-41 PIC16C745, programmed 6.90 12.95 NO. 356/357 JULY/AUGUST 2006 RC Servo Tester/Exerciser 040172-11 Disk, project software 5.20 9.75 040172-41 PIC16F84(A), programmed 10.30 19.40 040172-71 Kit, incl. PCB, controller, all parts 22.70 42.85 LED Thermometer 0301 90-1 1 Disk, project software 030190-41 PIC16F873-20/SP, programmed Toothbrush Timer 0501 46-1 1 Disk, project software 050146-41 AT90S2313-10PC, programmed Easy Home Control 050233-1 1 Disk, project software 050233-41 PIC16F84, programmed Universal LCD Module 050259-1 1 Disk, project software 050259-41 AT90S2313, programmed 1 -Wire Thermometer with LCD 060090-1 1 Disk, project software 060090-41 PIC16F84A-04CP, programmed GBPLC - Gameboy PLC 050190-1+2 PCBs, bare, GBPLC Module & Programming Interface 050190-51 Programmed PAL, EEPROM and Flash 1C 050190-91 Ready-built and tested GBPLC Module and Programming Interface GBPLC - I2C I/O Box 060098-1 PCB, bare 060098-91 Ready-built and tested board Binary Clock 020390-1 1 disk, project software 020390-41 PIC6C54-04/P, programmed 5.20 16.50 9.75 31.00 5.20 6.90 9.75 12.95 5.20 10.30 9.75 19.40 5.20 6.90 9.75 12.95 5.20 10.30 9.75 19.40 11.70 11.00 22.00 20.75 17.90 33.75 5.20 8.05 9.75 15.10 NO. 355 JUNE 2006 FM Stereo Test Transmitter 050268-1 PCB 1170 22.00 Network Cable Analyser 050302-1 PCB 050302-1 1 Disk, PIC source code 050302-41 PIC1 6F874-20/P 8-20 15.55 5-20 9.75 16-90 31.85 NO. 354 MAY 2006 Onboard OBD-2 Analyser 050176-72 Kit of parts, incl. 050176-1, 050176-2, 050176-42, all components, excl. LCD and Case 24.80 46.70 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. Onboard OBD-2 Analyser Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 (0) 208 261 4509 Fax: +44 (0) 208 261 4447 Email: sales@elektor-electronics.co.uk Kits & Modules (May 2006) Kit of parts including ATMega board, pro- gramming adapter board, preprogrammed ATMega microcontrol- ler and all compo- nents, but excluding LC display and Case. 050176-72 £ 24.80 / $ 46.70 OBD-2 Analyser 050092-71 £52.50/$ 96.95 OBD cable 050092-72 £27.55/ $51 .95 (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. LC-display 4 x 20 characters, 60 x 98 mm, with background lighting 050176-73 £ 28.80 / $ 54.50 Case, Bopla Unimas 160 with Perspex cover and mounting plate 050176-74 £ 15.80/$ 29.90 RC Servo Tester / Exerciser (July/August 2006) Kit of parts including PCB, programmed con- troller and all compo- nents. 040259-71 £ 22.70 / $ 42.85 050176-73 LCD, 4x20 characters with backlight 050176-74 Case, Bopla Unimas 160 with Perspex cover and mounting plate 050176-42 ATmega16, programmed 050092-71 OBD-2 Analyser: Kit of parts without cable 050092-72 OBD-2 Analyser: DB9 to OBD adapter cable Mini ATMega Board 050176-1 PCB, includes adapter PCB 050176-2 Brushless Motor Controller 050157-41 ST7MC1, programmed A 16-bit Tom Thumb 050179-91 R8C Starter Kit 0501 79-C5 Set of 5 pcs. R8C1 3 microcontroller only 28.80 54.50 15.80 29.90 10-30 19.45 52-50 96.95 27-55 51.95 8-95 16.85 NO. 353 APRIL 2006 Simple recharable A Cell Analyser 050394-1 PCB, bare 4-80 9.04 050394-1 1 Disk, PC Software 5-18 9.75 Universal SPI Box 050198-41 AT89C2051-24PC, Programmed 7-25 13.65 NO. 352 MARCH 2006 Application Board for R8C/13 050179-92 Ready-assembled board 48-27 90.94 050179-1 PCB 13-77 25.94 030451-72 LCD with backlight 7-25 13.65 030451-73 Poly-LED display 25-50 48.05 FPGA-Prototyping board 050370-91 Ready assembled board For subscribers 181.80 333.50 For non-subscribers 216-30 398.50 Telephone Eavesdropper 030379-1 PCB 9-05 17.05 Versatile FPGA Module 040477-91 Ready assembled plug-on module For subscribers 181-80 333.50 For non-subscribers 216-30 398.50 NO. 351 FEBRUARY 2006 3-80 7.15 8-30 15.60 20.70 39.00 NO. 350 JANUARY 2006 95-watt Laptop PSU Adaptor 050029-1 PCB 4-80 9.05 Automatic Attic Window Controller 0501 39-1 1 Disk, PIC source & hex code 5-20 9.75 050139-41 PIC16F84A-20I/P, programmed 13-10 24.65 030451-72 LCD Modue 2x16 characters 7-25 13.65 030451-73 PLED Module 2x16 characters 25-50 48.05 SMD Reflow Soldering Oven 05031 9-1 1 Disk, source and hex code 5-20 9.75 050319-41 AT89C52/24JI, programmed 7-60 14.25 030451-72 LCD Modue 2x16 characters 7-25 13.65 030451-73 PLED Module 2x16 characters 25-50 48.05 Timer Switch for Washing Machine 050058-1 PCB 8-90 16.70 050058-1 1 Disk, PIC source & hex code 5-20 9.75 050058-41 PIC16F84, programmed 13-10 24.65 NO. 349 DECEMBER 2005 From A to D via USB 050222-1 PCB 050222-41 IOW24-P, programmed Telephone Supervisor 050039-41 PIC1 6F628-20/P, programmed 050039-81 CD-ROM, PIC hex & source codes, LCM First Server NO. 348 NOVEMBER 2005 Remote Control by Mobile Phone 040415-1 PCB 04041 5-1 1 Disk, PIC source & hex files 040415-41 PIC16F84A-20/P, programmed 6-20 11.65 5-20 9.75 10-30 19.50 7- 95 14.95 9-40 17.75 8- 20 15.55 6-90 12.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 Free! -1 UJ 1 T." Si * ;-i «i ■. i "tr . ■■ y !T_P L- Electronics Every copy of the October 2006 issue of Elektor Electronics will come with a free electronics simulation software DVD. Be sure to get your copy! Software — i iHi-ifli - 3 — 1 ■«. A. H| M h. J _ & Rather than building prototype after prototype, companies developing electronic products now almost invariably use software simulating the end result. E-simulation not only saves time and money in the design phase but also allows a good idea to be obtained about the operation, look and feel of the final product. The October 2006 issue of Elektor Elec- tronics comes with a free DVD on which we've compiled an impressive collection of E-Simulation software — not just demos, trials and limited versions but also fully functional programs specially designed to simulate (and in some case also design) electronic circuits. GBECG - Gameboy Electrocardioscope We know from reader correspondence that many of you would like to see a piece of equipment (for home construction, of course) that enables an electrocardiogram (EGG) to be written on the spot. The reasons are mixed: out of technical curiosity; personal interest; to surprise one's cardiologist or the desire to step into medical proceedings in a well prepared manner. Our EGG writer is a plug-in unit for the famous Gameboy games console, type Classic, Pocket, Color or Advance. PIC In-Circuit Debugger/Programmer * Also... Theme Plan for 2006 January Recycling / Reverse Engineering February Motors / Propulsion March Development/ Microcontrollers April Power Supplies / Safety May Soldering / Etching June Test & Measurement July/ August . . . .Summer Circuits September RFID / Satellites October E-Simulation November Chipcards / Security December Electromechanical / Enclosures PIC micros from the 8-bit 1 6F and 1 8F series are found in lots of equipment and the devices are very popular among Elektor readers as they allow interesting applications to be built using almost no hardware. Our PIC ICD/Programmer is largely compatible with Microchip's ICD2 module. Programmable Laser Lightshow; Wireless Key*; Universal USB Driver; Zigbee with Xbee; FPGA Course (5); Hexadoku. * due to lack of space these articles could not be accommodated in the current issue. RESERVE YOUR COPY NOW! The October 2006 issue goes on sale on Thursday 21 September 2006 (UK distribution only). UK mainland subscribers will receive the magazine between 16 and 20 September 2006. Article titles and magazine contents subject to change, please check our website. 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 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). www.elektor-electronics.co.uk www.elektor-electronics.co.uk www.elektor-electronics Elektor Electronics on the web All magazine articles back to volume 2000 are available online in pdf format. The article summary and parts list (if applicable) can be instantly viewed to help you positively identify an article. Article related items are also shown, including software downloads, cir- cuit boards, programmed ICs and corrections and updates if applicable. Complete magazine issues may also be downloaded. In the Elektor Electronics Shop you'll find all other products sold by the pub- lishers, like CD-ROMs, kits and books. A powerful search function allows you to search for items and references across the entire website. Also on the Elektor Electronics website • Electronics news and Elektor announcements • Readers Forum, • PCB, software and e-magazine downloads • Surveys and polls • FAQ, Author Guidelines and Contact 84 elektor electronics - 9/2006 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 Visual Basic for Electronics Engineering Applications ITT321 £ 27,50 CD-ROM USB Toolbox £ 18.95 CD-ROM Home Automation £ 12.95 E-blocks Easy ARM Kit £ 171.80 METHOD OF PAYMENT (see reverse before ticking as appropriate) Bank transfer Cheque (UK-resident customers ONLY) Giro transfer Expiry date: Verification code: SWITCH ONLY: Start date: 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. Sub-total P&P Total paid Name Issue number: Please send this order form to * (see reverse for conditions) Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Address + Post code Tel.: (+44) (0) 208 261 4509 Fax: (+44) (0) 208 261 4447 Internet: www.elektor-electronics.co.uk sales@elektor-electronics.co.uk Tel. Email Date - - 2006 Signature EL09 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 2006 CD-ROM) * Offer available to Subscribers who have not held a subscription to Elektor Electronics during the last 12 months. Offer subject to availability. See reverse for rates and conditions. Name Address + Post code Tel. Email -Q CO Date * cross out what is not applicable EL09 - 2006 Signature *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) Bank transfer Cheque (UK-resident customers ONLY) Giro transfer Expiry date: Verification code: SWITCH ONLY: Start date: Issue number: .... Please send this order form to Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: (+44) (0) 208 261 4509 Fax: (+44) (0) 208 261 4447 Internet: www.elektor-electronics.co.uk subscriptions@elektor-electronics.co.uk 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 Brentford 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 Brentford 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 All orders must be accompanied by the full payment, including postage and packing charges as stated above or advised by Customer Services staff. Bank transfer into account no. 40209520 held by Elektor Electronics (Publishing) / Segment b.v. with ABN-AMRO Bank, London. IBAN: GB35 ABNA 4050 3040 2095 20. BIC: ABNAGB2L. Currency: sterling (UKP). Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Elektor Electronics (Publishing) / Segment b.v.. We can only accept sterling cheques and bank drafts from UK-resident customers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. Giro transfer into account no. 34-152-3801, held by Elektor Electronics (Publishing) / Segment b.v. Please do not send giro transfer/deposit forms directly to us, but instead use the National Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA, Access, MasterCard, JCBCard and Switch cards can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL-protected for your security. 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 Brentford office within 10-days (UK); 14-days (Europe) or 21 -days (all other countries). Cancelled orders All cancelled orders will be subject to a 10% handling charge with a minimum charge of £5-00. Patents Patent protection may exist in respect of circuits, devices, components, and so on, described in our books and magazines. Elektor Electronics (Publishing) does not accept responsibility or liability for failing to identify such patent or other protection. Copyright All drawings, photographs, articles, printed circuit boards, programmed integrated circuits, diskettes and software 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 permission of Elektor Electronics (Publishing) in writing. Such written permission must also be obtained before any part of these publications is stored in a retrieval system of any nature. Notwithstanding the above, printed-circuit boards may be produced for private and personal use without prior permission. Limitation of liability Elektor Electronics (Publishing) shall not be liable in contract, tort, or otherwise, for any loss or damage suffered by the purchaser whatsoever or howsoever arising out of, or in connexion with, the supply of goods or services by Elektor Electronics (Publishing) other than to supply goods as described or, at the option of Elektor Electronics (Publishing), to refund the purchaser any money paid in respect of the goods. Law Any question relating to the supply of goods and services by Elektor Electronics (Publishing) shall be determined in all respects by the laws Of England. January 2006 SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION Standard Plus United Kingdom £41 .90 £48.80 Surface Mail Rest of the World £54.50 £61.40 USA & Canada US$ 95.50 US$106.50 Airmail Rest of the World £68.90 £75.80 USA & Canada US$120.00 US$131.00 HOWTO PAY Bank transfer into account no. 40209520 held by Elektor Electronics (Publishing) / Segment b.v. with ABN-AMRO Bank, London. IBAN: GB35 ABNA 4050 3040 2095 20. BIC: ABNAGB2L. Currency: sterling (UKP). Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Elektor Electronics (Publishing) / Segment b.v.. We can only accept sterling cheques and bank drafts from UK-resident customers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. Giro transfer into account no. 34-152-3801, held by Elektor Electronics (Publishing) / Segment b.v. Please do not send giro transfer/ deposit forms directly to us, but instead use the National Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA, Access, MasterCard, JCBCard and Switch cards can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL-protected for your security. SUBSCRIPTION CONDITIONS The standard subscription order period is twelve months. If a perma- nent 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) reduc- tion 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 £33.50, a Student Subscription- Plus costs £40.40 (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 2006 Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel. +44 (0) 208 261 4509 See also www.elektor-electronics.co.uk Order now using the Order Form in the Readers Services section in this issue. This CD-ROM contains technical data about the USB interface. It also includes a large collection of data sheets for specific USB components from a wide range of manufacturers. There are two ways to incorporate a USB interface in a microcontroller circuit: add a USB controller to an existing circuit, or use a microcontroller with an integrated USB inter- face. Included on this CD-ROM are USB Basic Facts, several useful design tools for hardware and software, and all Elektor Electronics articles on the subject of USB. Hrwi ISBN 90-5381-212-1 £18.95 /US$34.95 Embedded USB Know How leading the way lectromcs CD-ROM USB TOOLBOX Index of Advertisers ACG Identification Technologies www.acg.de 25 Altera www.altera.com 39 ATC Semitec Ltd, Showcase www.atcsemitec.co.uk 78 Audioxpress, Showcase www.audioxpress.com 78 Avit Research, Showcase www.avitresearch.co.uk 78 BAEC, Showcase http://baec.tripod.com 78 Beta Layout, Showcase www.pcb-pooi.com 25, 78 Bitscope Designs www.bitscope.com 7 Breadboarding Systems www.breadboarding.co.uk 3 ByVac www.byvac.co.uk 12 Compulogic, Showcase www.compulogic.co.uk 78 Conford Electronics, Showcase www.confordelec.co.uk 78 Cricklewood www.cctvcentre.co.uk 55 Danbury, Showcase www.DanburyElectronics.co.uk 78 Design Gateway, Showcase www.design-gateway.com 78 Eaglepics, Showcase www.eaglepics.co.uk 78 Easysync, Showcase www.easysync.co.uk 78 Elnec, Showcase www.elnec.com 78 Euro circuits www.thepcbshop.com 6 First Technology Transfer Ltd, Showcase .www.ftt.co.uk 78 Forest www.fored.co.uk 59 Future Technology Devices, Showcase . . .www.ftdichip.com 13, 78 Futurlec, Showcase www.futurlec.com 78 Heros Technology, Showcase www.herostechnology.co.uk 78 Jaycar Electronics www.jaycarelectronics.co.uk 2 JLB Electronics, Showcase www.jibeiectronics.com 79 KMK Technologies Ltd, Showcase . . . Labcenter Lichfield Electronics London Electronics College, Showcase MQP Electronics, Showcase New Wave Concepts, Showcase Newbury Electronics Number One Systems Nurve Networks PCB World, Showcase Peak Electronic Design Pico Quasar Electronics Robot Electronics, Showcase Scantool Showcase SK Pang Electronics, Showcase Ultraleds, Showcase University of Derby USB Instruments, Showcase Virtins Technology, Showcase .www.kmk.com.hk 79 .www.labcenter.co.uk 88 . www. lichfieldelectronics. co.uk 19 .www.lec.org.uk 79 .www.mgpelectronics.co.uk 79 .www.new-wave-concepts.com 79 . www. ne wburyelectronics. co.uk 25 .www.numberone.com 12 .www.xgamestation.com 25 . www. pcb world, org. uk 79 . www. peakeiec. co.uk 12 .www.picotech.com 19 .www.guasareiectronics.com 45 . www. robot-electronics, co.uk 79 .www.ElmScan5.com/epe 6 78, 79 .www.skpang.co.uk 79 .www.ultraleds.co.uk 79 . www. vertigo, derby, ac.uk 55 .www.usb-instruments.com 79 .www.virtins.com 79 Advertising space for the issue of 17 October 2006 may be reserved not later than 19 September 2006 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: aerrvb@husonmedia.com to whom all correspondence, copy instructions and artwork should be addressed. 9/2006 - elektor electronics 87 ELECTRONIC DESIGN r*-T FROM O m. TO CO LETION 14 PII Hh J J HLIhJ J ILh 1 VMII Mill II ■sIVIULAl IUU F'L El 111 SIEiPt Iblh 5LHEMAT1C CAPTURE A powerful capture package tailored for todays engineer and designed to allow rapid entry of complex schematics for simulation and PCB Layout. khu^ce mxin modi simluhqh^ A customised implementation off the Industry standard Berkeley SPICE 3F5 engine with extensive optimisations and enhancements for true mixed mode simulation and circuit animation. VE*\I VIHTLAL SYSTEM %tDllELLlMG The worlds first and best schematic based microcontroller co-simulation software. Proteus V$M allows you to simulate the interaction between software running on a microcontroller and any analog or digital electronics connected to Jt, This streamlines the project lifecycle and obviates the need for expensive hardware analysis tools* ARES PER DF'ilE’V A modern and professional layout package which seamlessly integrates with the ISIS capture software. Features such as autoplacement and autorouting s interactive DRC and an Intuitive interface all serve to maximise productivity and reduce time to market* M ARfTVirtt n rrmimni k i in A technology pioneer in the EPA industry since 1900* Technical support direct from the program authors. Flexible packages and pricing tailored to customer requirements. CONTACT US NOW to discuss requirements or request a FREE evaluation copy. labcenterAM, mvw.laEicenter.co.uk Electronics Tel: 01756 753440 Fax: 01756 752857 Email; info 1 ™! iibriinter.co.uk La beenter Electronics Ltd., 33-55 Via in Street, Gmssmgtnn P North Yorks, BDS3 SAA. Registered in England 4E9R454