NOVEMBER 2006 £3.80 www.elektor.com R8C Design Contest: the winners! Theremin Synthesiser MKII KC-5426 £43.50 + post & packing By moving your hand between the metal antennae, create unusual sound effects! The Theremin Mkll improves on its predecessor by allowing adjustments to the tonal quality by providing a better waveform. With a multitude of controls, this instrument's musical potential is only limited by the skill and imagination of its player. Kit includes stand, PCB with overlay, machined case with silkscreen printed lid, loudspeaker, pitch antennae, all specified electronic components and clear English instructions. for’06 for’06 '^Proved ; loc/e/ - ■-% *+, - , Requires 9-12VDC wall adaptor (Maplin #JC91Y £14.99) Battery Zapper MKII 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 new 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 for’06 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 x "For all you wall adaptor ^ Trekkie (Maplin #JC91Y £14.99) ^7 f ans Two-Way SPDIF/Toslink Digital Audio Converter Kit KC-5425 £7.25 + post & 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. for’06 Requires 9-12VDC wall adaptor (Maplin #JC91 Y £14.99) Universal High Energy Ignition Kit KC-5419 £27.75 + post & packing A high energy 0.9ms spark burns fuel faster and more efficiently to give you more power! This versatile kit can be connected to conventional points, twin points or reluctor ignition systems. Kit supplied with die-cast case, PCB and all electronic components. f NEW’, FOR 1 . / 7 1 We stock an extensive range of quality >.idnyt; ui igudiiiy. automotive _ I—* kits — \ £20 - £49.99 £5 £50 - £99.99 £10 £100 - £199.99 £20 Max weight 121b (5kg). Heavier parcels POA. Minimum order £20. Galactic Voice Kit KC-5431 £13.25 + post & packing Be the envy of everyone at the next Interplanetary Conference for Evil Beings with this galactic voice simulator kit. Effect and depth controls allow you to vary the effect to simulate everything from the metallically-challenged C-3PO, to the hysterical ranting of Daleks hell-bent on exterminating anything not nailed down. The kit includes PCB with overlay, enclosure, speaker and all components. For those who really need to get out of the house a lot more. Take me to your leader. • Requires 9V battery Remote Control Extender Kit KC-5209 £7.50 + post & packing This kit will let you control a DVD or Hi-Fi system using a remote control from another room. It picks up the signal from the remote control and sends it via a 2-wire cable to an infrared LED located close to the DVD or IR receiving equipment. The kit is a breeze to construct and will work with virtually any remote control system. The Jaycar kit comes complete with case with silkscreened front panel, PCB, hardware and all electronic components with clear English instructions. • 2 wire cable required Requires 9VDC wall adaptor (Maplin #GS74R £9.99) Voltage Monitor Kit KC-5424 £6.00 + post & packing This versatile kit will allow you to monitor the battery voltage, the airflow meter or oxygen sensor in your vehicle. The kit features 10 LEDs that light up in response to the measured voltage, preset 9-16V, 0-5V or 0-1 V ranges complete with a fast response time, high input impedance and auto dimming for night driving. Kit includes PCB with overlay, LEDs, all electronic components and clear English instructions. • Requires 12VDC power ^ -j Recommended box UB5 (HB-6015) £0.83 each for’06 Log on to www.jaycarelectronics.co.uk/catalogue for your FREE catalogue! 0800 032 7241 ^ All prices in £ Stg (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 Free 410+ page ^7 Catalogue lnycnr BifScope 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 Wc Waveform Generator h 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 1 M/20pF BNC Input 200uV-20V/div with xl 0 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 32 K 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 K 'ix A 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 Balancing act I answer about 250 readers' queries per month. In your correspondence, many of you first tell me that you like our magazine for its 'wide range of interesting subjects' (as it's often described) and then go on to ask ques- tions of a technical nature. When reply- ing with the information desperately needed at the other end of the post, telephone line or email server, I am always curious to know my correspon- dent's preferences in electronics as well as his or her interpretation of 'wide'. The few readers having taken the trou- ble to inform me typically wish to have a magazine that covers simple as well as complex, theory as well as practice, expensive as well as cheap, SMD as well as leaded, kit as well as DIY, PIC as well as AVR, and so on. In this respect, I think Elektor Electronics is doing a reasonable job. As an exam- ple, last month we were criticised for our ready-made GBECG module by a few readers complaining that there was little fun in getting a fully assembled and working PCB in the post. Well, kindly note that a completely home- spun alternative is printed a few pages on in the same issue. "Just want to use it'": go to page xx — "Want to do it all by myself": page xx+10. You decide how you wish to experience electronics and we do our best to cater for your needs. The same with last September's articles covering RFID, we describe a ready-built Reader unit cheerfully alongside an experimental design that can be built cheaply and programmed to your heart's content. The same balancing act is applied, to an extent, in this November 2006 issue: Smartcard theory (page 28) duly fol- lowed by a hands-on construction pro- ject (page 34). Also, a professionally designed and finished USB stick inter- face for microcontrollers (page 42) bal- anced by Brainiac-like electronics from the junkbox (pages 60). To run smoothly, an engine needs proper bal- ancing in various places. fading the way 1 4 Grand Prix R8C The soldering iron is a key element of every electronics workstation and an essential tool for working on circuitry. Our professional test panel put several popular soldering sta- tions through their paces, enabling you to find out ** whether that expensive model you have your on is really worth the price.... m In the last few months we've received four dozen entries from seven countries, putting the interna- tional jury in quite a sweat. The quality of the contributions was amazing, making the decision a truly tough choice. We're at the final stage now — deciding the first prize — and we need your help! 34 A Tale of Two Smartcards /* Basic Card Any application for Smartcards requires what's commonly referred to as a 'card reader'. Until now, a variety of card readers was required. In this article we present two reader/writer designs that together cover most smartcards, whether 'Gold', 'Silver' 'Purple, 'Phoenix', etcetera, or the more advance< Open OS cards. Jan Buiting, Editor CONTENTS Volume 32 November 2006 no. 359 42 USB Stick with ARM and RS232 know-how 28 Smartcards 64 Zigbee with Xbee hands-on 34 A Tale of Two Smartcard Readers 42 USB Stick with ARM and RS232 56 FPGA Course (6) 60 Spot-welding with Capacitors 68 E-blocks link VB to USB 72 Design Tips USB-controlled socket for WLAN router power supply PR4401 LED driver technology 50 The Multi-Talented R8C info & market 6 Colophon 8 Mailbox This neat stand-alone memory stick can store or transfer data from a microcontroller system in the field to a PC using its built-in USB and RS232 ports. Add to that an LCD and the simple to use datalogging mode is just the icing on the cake! News & New Products 1 4 Grand Prix R8C Hotheads! 81 ElektorSHOP 84 Sneak Preview infotainment 73 Emergency Recovery 75 Philips SDR31 4 manpack mobile (1953) Hexadoku e lektor_±" InctronicK lektor lectronics Volume 32, Number 359, November 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, Christiaan Vossen Editorial secretariat: Hedwig Hennekens (secretariaat@segment.nl) Graphic design / DTP: 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 TW8 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. RO. 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 IGM 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: Klaas Caldenhoven, address as Head Office Email: advertenties@elektuur.nl Advertising rates and terms available on request. Copyright Notice The circuits described in this magazine are for domestic use only. All drawings, photographs, printed circuit board layouts, programmed integrated circuits, disks, CD-ROMs, software carriers and article texts 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 mscious PCB supplier Online price calculation Online ordering Online order tracking e 24/24H and 7/7D 2088 167 005 .eurocircuit5.com - pooling for standard boards - up to 6 layers - from 1 to 1000 pieces - from 3 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 • Diagnose any car with EOBD • Based on the ELM327 1C • Supports all EOBD and OBD-II protocols >4 ISO 1 5765-4 (CAN) S ISO 1 4230-4 (Keyword 2000) S IS09 141-2 SJI850VPW S JI850 PWM • 9600 or 38400 baud • Supported by more software than any other OBD interface • Inexpensive • Full Speed USB I . I • Automatic protocol detection • Package includes cables, software CD, and Quick Start Guide • Buy from your local UK distributors! ClmScon 5 USB Scon Tool www.ElmScan5.com/elekfor 6 elektor electronics - 11/2006 tf| "Mi I I Jr , ijJ -i i ' 1 * ■ I l #, H '■iMMi [JJ# fc f +■ I'r fi 1 ■« s * ,• 1 »'■ If 1 f **r\ I I i < » ft i \|i h * iM ^ f 1 1 r# Pf# f ( NT i I Pi J 1 F^b , iti«< ■ ■ ■ r u m I r* ' * * 4 1 i* PI 1 J J * I i 4 Cool, Smart, ^ ^ r ! p r ^ I Atlas DCA Semiconduc tor Analyser £55 y Atlas LCR Passive Component Analyser £79 Atlas ESR Capacitance and ESR Meter £89 Atlas SCR Triac /Thyristor Analvser £109 \ r b 1 ■! y Prices include UK deliver and VAT 1 C mi d held INFO & MARKET MAILBOX Cool, that CDP1 802 Our Retronics piece on the history of the CDP1802 'Cosmoc' processor triggered worm response from a number of rea- ders having suddenly realised that 30 years have passed since this oddball CMOS processor first appeared on the market. We congratulate not only the Cosmac ELF computer on its 30th birthday but also Nuts & Volts magazine for put- ting a remake of Joe Weisbecker's DIY computer on the front cover of their August 2006 issue. It is fair to say that it was the ELF computer that brought fame and glory to the 1802, in other wards, hobbyists gave the manufacturer, RCA, a free ride towards product acceptance by the industry. That rarely happens today, with the industry more usually dictating what crumbs are left for hobbyists to feed on. The photos printed here show a number of rare and less rare members of the Cosmac COP series of integrated circuits, as well as a collection of extension cards for the Cosmicos com- puter discussed in the October 2006 issue. The cards inclu- de pixel graphics for Chip-8 games, PPI (I/O), 48 k dynamic RAM, SD/DD floppy disk interface and a hex keyboard. An active group of ELF/Cosmac followers may be found on the internet at http://www.cosmacelf.com/ i Hybrid headphone amp Dear Jan — Many thanks for publishing Jeff Macaulay's Headphone amplifier (July/ August 2006, Ed.) which has been well incorporated as part of my stereo Hi-Fi system. I have made some minor improvements to it which some of your readers might be interested to know as well as a double-sided PCB lay- out, which if anyone is interested can contact me re- ally impres- sed with the quality of the sound on my Sennheiser HD555, Cambridge Audio Azer CD player, utilizing only the preamp part of my main Rega Mira power Amp. The low voltage PSU and low-V, low noise ECC82 front end really set this Headphone Amp apart from a lot of such circuits I have seen, not to mention that I have built the unit for less than the cost of two CDs! During my recent visit to Germany, I have recently upgraded to the high end Austrian made AKG model K601 which has a 1 20 ohm impe- dance. Unfortunately on returning home I found that the impedance mismatch caused a significant loss of dynamic range which de- graded the higher quality of my new headphones. I am still working on a solution at this stage, perhaps Jeff might like to comment. Thanks to Jeff especially and may more low-V hybrids be born into this world! Tuck Choy (UK) Old PCB numbers (2) Dear Editor — I noticed the response to Tanglung (Singapore) on page 8, (Mailbox, September 2006), concerning the 'Peak Programme Meter'. This re- minded me of all the fun I had in the 1970s building projects from the Elektor magazine. In fact, my first audio recording suite was built largely from projects in Elektor. Audio mixers, peak LED meters, audio compressors, and amplifiers all graced my room. I let my subscription lapse in the mid 80's due to work changes, but since co- ming back to Elektor I still get excited when the magazine shows up each month. Fred Vobbe (USA) Thanks Fred, we sincerely hope the magazine continues to be a pleasure to read as well as a source of inspiration. Fiendish Alphadoku Dear Editor — I'd like to enter the competition with the ans- wer "it is impossible to solve a 25x25 Alphadoku within two months" as I suspect the competition is a cruel joke ;) Renne (Finland) Dear Jan — just to say that the Alphadoku puzzle you ran in the July/August 2006 issue is proving a hard nut to crack. After weeks of attemp- ting to find the solution I can only say: this one cannot be solved! I get stuck over and over again despite several se- rious attempts and even used Excel to record my 'procee- dings' — in vain. If this Alphadoku monster can be solved at all, I would claim that it has several correct solutions. Today I cheated using a pro- gram supposed to be able to crack the puzzle but unfortu- nately it tells me there is no solution. Michael Hanly (UK) Dear Jan — the Alphadoku in the Summer Circuits issue was announced as incredibly difficult, so I was triggered to write an Excel program to solve it. I ended up with a 8 elektor electronics - 11/2006 program capable of solving normal Sudokus. Unfortunately, when confron- ted with your Alphadoku, my program hangs after a while because no solution can be found. Is it possible that se- veral correct solutions exist? Frank Travally (UK) Renne , Michael ', Frank and eve- ryone else who wrote in on the mighty Alphadoku, we con con- firm that this puzzle was quite a challenge. Nonetheless, lots of readers gave it a try, some the old fashioned way using pencil and rubber, others writing pro- grams hoping their PC would find the solution. We cannot quite rule out that our puzzle has several correct soluti- ons, which may be the reason the PC programs to crash, hong or fail to exit properly. However, none of the participants sent us a copy of a completed Alphadoku with a solution different from ours. Consequently we only accept 'IDRFBV' as the correct solution. The total number of correct solu- tions received was 75, including entries from readers having suc- cessfully cracked the puzzle with homemade computer programs. Our compliments! Elektorscope Hi Jan — many thanks for your 'Retronics' page on the Elektorscope in the June 2006 issue. It reminded me that I still have that wonderful piece of test equipment in my loft. After rummaging around and opening a few boxes it not only greeted me but also proved fully functional (see photograph). I should add that that I have been out of touch with electronics for quite some time. I bought this scope as a second hand item in 1983 or 1984 (can't remember). It had a faulty transformer but I solved that with a home-made coil winding aid (second picture). The tensioned coil slowly turned on two wood blocks, with a motor and a mi- croswitch on one of the sides supplying pulses to a counter. In this way I was able to count the number of turns of the stripped transformer as well as on the refurbished one. I used the scope for a number of years until electronics disappeared in the back- ground. Now I am picking up the hobby again and may be tempted to use the Elektorscope again. I will cherish it in any case. Jan Huijs (The Netherlands) To which we can only say: wel- come back to a great hobby! MailBox Terms •Publication of reader’s correspondence 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. 11/2006 - elektor electronics 9 INFO & MARKET NEWS & NEW PRODUCTS Top Brass New Zealand based DIY ampli- fier component specialist, Design Build Listen has released a range of solid brass knobs to help DIY enthusiasts give the ultimate fin- ish to their amplifier projects. The knobs are machined from solid brass and are available in 30 mm (~l"l/8) or 50 mm (~2") diameters. The 50-mm knob weighs in at a hefty 320 g or nearly _ lbs in old money! Both knobs are available with central inserts in either black or stainless steel. These knobs are designed to complement Design Build Listens ezChassis® pre- punched cabinets. www.designbuildlisten.com (067193-1) Close-proximity wireless technology set to improve the management of diabetes Cambridge Consultants today recently revealed an innovative medical device concept for man- aging diabetes that uses NFC, the close-proximity wireless com- munications standard, to inte- grate glucometers and insulin pumps. The prototype device, developed in conjunction with Philips, demonstrates how NFC can be exploited to simplify treat- ment for millions of diabetics worldwide, and could be the first of a new generation of med- ical devices that use close-prox- imity wireless communications. According to the World Health Organisation (WHO), diabetes is officially classified as a world- wide epidemic with the number of people with the disease to double to 366m by 2030. To tackle this growing global problem, the Cambridge Consul- tants concept device uses the unique characteristics of NFC to streamline treatment, by wire- lessly linking a glucometer with an insulin pump. The glucometer records the blood sugar reading and then recommends a bolus dose of insulin. If the patient accepts the dose, then they sim- ply swipe the glucometer against the insulin pump, which could be located beneath clothing, and the drug is delivered. This confir- mation feature, which Cam- bridge Consultants dubs 'patient- in-the-loop dosing', enhances confidence and security, and allows the user to modify dosage calculations for lifestyle reasons. Cambridge Consultants believes that NFC adds genuine user- friendly characteristics that would inspire confidence in med- ical applications like this. These include a more ergonomic process with a simple user inter- action, improved accuracy of dosing, data logging for compli- ance monitoring, and the ability to make devices much more dis- creet — with a major reduction in the need to handle or disturb the device. Such features benefit patients and health professionals alike, enhancing the reliability and integrity of treatment. Cambridge Consultants selected Philips' NFC technology as an ideal platform for improving the efficiency and security of human interaction with frequently-used medical equipment. These two important attributes stem from the intrinsic nature of NFC, which has a working range of just 1 0 cm, differentiating it from most other wireless technologies which typically operate over dis- tances measured in metres. Unlike Bluetooth for example, a user must intentionally bring NFC devices into close proxim- ity to make a connection, trans- fer information and then trigger the process. A further advantage for medical device OEMs is the low cost of adding NFC wireless technology to products. One half of the wireless system can be designed to operate passively, drawing its power 'over the air' from the active terminal and avoiding bulky and costly batteries — and battery charging. This means that equipment may be wireless- enabled using an extremely low bill of materials, and with little or no impact on size. www.CambridgeConsultants.com www.westtechresearch.com (067193-3) 10 elektor electronics - 11/2006 1 I All revved up — and somewhere to go If you are looking for a new proj- ect that combines the elements of electronics design, programming and building then the annual ROBOtic Event at the Univer- sity of Central England could be worth a visit. This annual event is aimed at robot and electron- ics enthusiasts who are inter- ested in getting involved in robot building and maze solving. The event, held on 25^ November 2006, is a relaxed opportunity to find out about Micromouse competitions and - if you already have a Micromouse - to test your designs on one of the standard mazes. There are a variety of events including maze solvers, wall followers and a Drag Race: that's a robot speed event, it does not mean you have to wear ladies clothes, unless you want to (although we do welcome anyone). Bring the kids for a day out - its free! Here we show some of the mice built by competitors in the June 2006 event. There is a great variety of robots at these events which are more about encourag- ing people to get involved than competing. A few examples: Photo A shows a prototype total maze solver, by Mark Lumb. It uses a dsPICmicro and stepper motors as a main con- troller. Processing power and flexibility are the keys to this design and Mark hopes to test the robot for the first time in a maze at ROBOtic06. Photo B shows Ken Hewitt's lat- est design - ultra light, dsPIC controlled, with Lithium batteries on the underside of the PCB for optimum centre of gravity, and breathtakingly expensive DC motors incorporating precision distance encoders. The assembly shown in Photo C is a very clever robot designed by Peter Harriaon, who built it around an ATmega device and stepper motors. It employs a hacked LCD display from a mobile phone to show a graphic of the maze as the robot finds its way around - this looks a little like a PACman game. At Micro- mouse 06 this was not the fastest mouse - but the LCD is a really neat feature showing the maze solving algorithm in action. For further details see: www.tic.ac.uk/ micromouse/ (067216-1) Advertisement Tel: 01 635 40347 Newbury Electronics Ltd Fax: 01 635 36143 Faraday Road Newbury Certs RDN 2AD e-mail: circuite@newbu ry.teom.eo.uk www.newb uryd«tra«n m irr iiwh Lnnrr> iajlmf cnwjiniL ri DmijV !►* rri* Atari «JD/2GDQ P SndUrZX Spectrum HD/26M, Slndali ZX Spectrum ■ ■{** **■ ‘ ^ I A. I mi umlr.r li I" JL 'f ✓ t r . jff* P ji.il jp i 5 K” . ['im ■ f nvr /O: _r f \ — w _ ( i..-T ■ K llrniin it V. l.r -i I I Mufanlll ■ ITwClti toLean DiKtlnii ^niin -FhiI* i r-i ■ I : ■ i M r- i Ml it I!tI| ■liaiir!': *i p UnHipoirrrl in P ■ r&w+ c-r hs Cewfta ' Cable* md Fcwp p St cry ■pc’tiiDfHr -// . •jt. « 3^j Jr th e&tK>k I dUIuhJeuI CJr.pIrifT ptI Inti tatnirirlD H H WWW.XBAMESTATION.COM ~*m*™«*““* Phi: 9ES.736-2nga ■a 3S C*MIMD ASH7DY1} WtET BUPPOHr¥@ISIUHVE.NiErr DANVILLE, CA USA 11/2006 - elektor electronics 11 The Vinculum famify ol USB Host Controller not only handles the USB Host interface and data transfer functions, but owing to the inbuilt processor core and embedded Flash memory, Vinculum encapsulates the USB device classes as well. When interfacing to mass storage devices such as USB Flash drive, digital camera, or PDA. Vinculum atso transparently handles the FAT Fite structure communicating via UART, SPI or parallel FIFO interfaces via a simple to implement command set. Vinculum provides a new cost effective solution for providing USB Host capability into products that previously did not have the hardware resources available. CONNECTS WITH 1 USB Dri« Gamin USB PORT 1 USB PORT 2 CRYSTAL _C— I USB HOST/ SLAVE SIE 1 USB HOST/ SLAVE SiE 2 12MHz osc RESET# PROG# TEST PLL FILTER G4k X a FLASH MEMORY VINCULUM GORE I W 33-bit NPU Dual DMA CONTROLLER AOBUS 0-7 I ► FIFO ACBUS 0*7 1/F * ► BOBUS 0-7 4 * 1 4k x 8 SRAM ID PORTS BC0U5 D-3 4 ► e US6 Dit R14 SUB D9 ? +5V © © IC3 © !==□ 10|i 16V t 10(i 16V V + C1 + © IC2 Cl- TIOUT Tl IN T20UT T2IN RUN RIOUT R2IN R20UT C2+ MAX232 C2- V 16 M 1 i R4 R3 11 10 12 15 C5 10|u 16V A 11 & 12 R17 IC3.D IC3 = 74HC00 13 R15 ■GQ IC3.B & XI 1 1 C14 22pT_ 3.579MHz K5 - fo Q Of Cl 3 Cl 5 R16 H 1M H IC3.A & X2 I I R18 6MHz ¥ «- •— -• » IC1 R5 R2 0 0 0 D5 D1 2 C6 lOOn LED2 S5 BAT82 K2 Card Connector VCC GND “ * 1 1 RST VPP -1=1 CLK I/O “ * 1 1 RFU RFU D6 7805 4 4 02 C2 C3 7Z ± ^ 10n 10|u 16V D4 Presence “ R11 Ik V mix V- O O IC3.C 10 & +5V © v8 HE K4 EH LED3 R6 \RES RESET R9 D8 K T-3 1N4148 r ©+sv S4 \ S3 \S2 \ SI Phoenix V- V V- \- - - J DM 00 00 OO (j> o D1, D2, D4, D6 = 1N4148 2 C4 220n T1 K3 1N4001 BC327 R8 K 10k IH R7 RIO H 47h H D3 ©’ ft 25 V BC557 R12 oX- 15V € T3 D7 V — L. CIO )?T- 13V BC547 +5V © R22 +5V © '1 \22p 22p\ : r Hr C16 22p K6 - fo 6 of - R21 R1 LED1 optional see text T4 PWR \ <■ ♦ red [ r^’ PS1 Jfi 11 6 Cm "Ton I RESET Cl 2 47p R20 CLOCK Q) 1 -► -► J green LX 1N4148 L — ! GROUND — O -L 050237-14 Figure 5. Schematic of a reader/programmer for Phoenix, SmartMouse and JDM Smartcards. Mouse, Low. So the reset signal can be inverted if needed, using jumpers on K4. In addition, you can reset manu- ally using switch PS1, with D8 afford- ing short-circuit protection for gate IC3c. The reader section power supply is 5 volts, stabilised by a 7805 (IC1). The detector/switch will close when you put a card into the reader. It then turns on T2, which enables the power supply via Tl. We do need an external power source for the circuit, capable of providing about 15 volts unregulated DC, the reason be- ing that we need 13 volts for program- ming the Smartcard. A bicolour LED in- dicates when power is on: depending on the position of SI, it will be green for Phoenix mode, or yellow (green and red together) for JDM mode. Things are simpler in JDM mode: both the clock input and the I/O line on the Smartcard are controlled directly from the PC’s serial port. When programming Gold and Silver Smartcards, these two are also being utilised. They then cor- respond to RB6 and RB7 (see also the schematics in the article elsewhere in this issue). PICs nowadays can be pro- grammed with 5 volts. The older 16F84 and 16F876 you’ll find on Gold and Silver Smartcards, how- ever, require 13 volts to the Reset pin in order to be programmed. An early version of the circuit comprised a volt- age multiplier on the COM port power supply. However, on more recent PCs and laptops it turned out that the cur- rent you can source in this way is too small. So instead we tapped the 15- volt supply. Zener diode D7 steps the level down to 13 volts, and this can be turned on and off as desired with T3, which in turn is under control from software, via the serial port. Excepting LED1 which we’ve already discussed, all other LEDs in the circuit serve as an aid when using software of which the particular Smartcard liaison is un- known, or software that you’re not yet familiar with. LED3 will come on when the Smartcard is being reset. LED2 will be on when there’s traffic between card and PC in Phoenix or SmartMouse mode. If, at the same time, the 13-V reset is active, then the circuit is in JDM mode, i.e., pro- gramming mode. As already mentioned, never remove the card from the reader while it’s being programmed. 38 elektor electronics - 11/2006 Figure 6. PCB layout for the circuit in Figure 5. 11/2006 - elektor electronics 39 HANDS-ON SMARTCARDS Figure 7. IC-Prog configured for the JDM programmer. Figure 8. Using CorWinPhoenix you can access the external EEPROJVl on Gold Smartcards. Building the reader/programmer All components will fit on one PCB, of which the track layout and component mounting plan are given in Figure 6. If you follow the parts list and the compo- nent overlay, assembly should be piece of cake. Software and practical use Once again, we point out the excellent IC-Prog, configured this time as shown in Figure 7. Select 16F84 when program- ming a Gold card, or 16F876 if it’s a Sil- ver card. The full functionality of IC-Prog is then available, for programming both Programming in Visual Basic Using software from others is a good thing, but developing your own is even better! Once you've started, you'll soon find yourself wanting to be able to control the Smartcard from your PC. Using the devices discussed in this article, you'll soon discover that this is not as complicat- ed as it may seem at first: signals to and from the Smartcard correspond to those on a stand- ard asynchronous serial port (see Figure 1 in the introduction to Smartcards elsewhere in this issue). However, a higher programming language is by no means the best tool for manipulat- ing COM port registers on a PC, so we recommend that you download Phoenix UC for this purpose, (www.cartesapuce.fr). The program was developed by someone operating under the pseudonym Phelix, probably because its use might be somewhat dubious. Nevertheless, it's an excellent piece of software! The file PhoenixUC.RAR contains various modules for use in a Visual Basic environment, and thus will give you a fully functional Phoenix compatible interface. It's easy to learn, and pro- gramming is very fast. Plus, you can also manipulate non-standard Smartcards with it. The figure shows a simple example: the card has sent an Answer To Reset (ATR) and the full message is displayed on-screen. Full documentation is provided in the RAR file, and getting your first program to work will be a matter of minutes. Example of a program in Visual Basic, made with PhoenixUC. ■■ Snwi I Card A l"R Header the PIC data EEPROM and the one for its firmware. With a jumper on pin 2-3 of K4, the circuit is a JDM programmer. The other jumpers are ‘don’t care’ in that case. However, you can’t ac- cess the card’s external EEPROM directly, due to the way it is connected to the PIC. You can only program that by means of a load- er, which is a small piece of software programmed into the PIC, giving the user ‘trans- parent’ access to the external EEPROM. In IC-Prog, this function is called assistant Smartcard, but this doesn’t always work well, as its maker also confirms on his website. For this reason, we recommend that you upload the loader into the PIC using IC- Prog, and then load the external EEPROM with different software. For Gold cards, you could use WinPhoenix or CorWinPhoenix (only available in French). Both are available for down- loading from the web links at the end of this article. In both instances, you’ll need to switch the reader from Phoenix 40 elektor electronics - 11/2006 n COMPONENTS LIST Phoenix / SmartMouse / JDM reader/programmer Resistors: R1 ,R2,R9,R1 1 ,R1 9,R22 = IkQ R3,R1 2 = 4kQ7 R4 / R6 / R7 / R8 = ]0kQ R5 = 1 OQ RIO = 47kQ R13 = 22kQ R14 = lk^5 R1 5,R1 6 = 1MQ R1 7,R1 8 = 2kQ2 R20 = ~\50Q R21 = 220Q L Capacitors: Cl ,C3,C5,C7,C8 = lOfjF 16V radial C2,C1 1 = lOnF ceramic C4 = 220nF MKT C6 = lOOnFMKT C9 = 470 jjF 25V radial CIO = 1 nF MKT Cl 2 = 47pF ceramic C13-C16 = 22pF ceramic Semiconductors IC1 = 7805 IC2 = MAX232 IC3 = 74HC00 T1 = BC327 T2 = BC557 T3 = BC547 T4 = 2N2369A 01,02,04,06,08,09 = 1N4148 D3 = 1 N4004 D5 = BAT82 D7 = zener diode 1 3V 0.4 W LED1 = LED, bicolour, 5 mm, with separate anodes LED2 = LED, red, 3mm LED3— LED, yellow, 3mm Miscellaneous XI = 3. 579MHz quartz crystal, HC1 8/U ■ case X2 = 6MHz quartz crystal, HC18/U case K1 = 9-way sub-D socket (female), right an- gle pins, PCB mount K2 = standard chip card connector (e.g., . Selectronic no. 60.9292) | K3 = mains adapter socket, PCB mount PS1 = switch, square, type D6 (ITT) I SI -S4 = 4-way DIP switch block (ASE42FN, Tyco/Alcoswitch) or 4 3-way SIL pinhead- ers with jumpers S5 = 2-way SIL pinheader with jumper K4, K5, K6 = 3-way SIL pinheaders with jumper * PCB, ref. 050237-2 from The PCBShop to JDM mode. Figure 8 shows an exam- ple of reading the external EEPROM on a Gold card using CorWinPhoenix. Many other loaders can be found on the Internet, both for Gold and Sil- ver Smartcards. An example of both can be found on the author’s website (www. cartesapuce.fr), but it has to be said that many varieties exist. Some software like Win- Phoe- nix replace your application on the card by their own loader, and thus give access to the external EEPROM. Quite handy, once you know how it works. You can find an overview of all jumper settings in Table 1 , to assist you when configuring the circuit. When in doubt, watch LED3: if this stays on, the card is being reset by the software, which ef- fectively inhibits communication with the card. Swapping the jumper on K4 will remedy the situation. Conclusion There is a lot more to say about reading and programming Smartcards - we’ve hardly spoken about PC/SC cards, for example - but that may be the subject of a different article. For now, we’ve con- centrated on Gold, Silver, Pink and Pur- ple Smartcards, and you’ll be able to put them to full use with the two circuits de- scribed in this article. ( 050237 - 1 ) Web links www.elektor.com www.cartesapuce.fr (author's site on Smartcards) www.tavernier-c.com (author's general website) Table 1. Jumper settings | Fun Card programmer | Ffeader Position Function Y A 1 external supply by parallel port l\4 2 supply by mains adaptor Phoenix/SmartMouse programmer Header JDM Phoenix SI 1-2 2-3 S2 1-2 2-3 S3 1-2 2-3 S4 1-2 2-3 | (Numbering from bevelled side) | S5 fitted normal card detection S5 absent card always inserted Header Position Function K4 1-2 direct Reset K4 2-3 inverted Reset K5 1-2 6 MHz K5 2-3 3.579 MHz K6 1-2 internal clock K6 2-3 external clock 11/2006 - elektor electronics 41 HANDS-ON MICROCONTROLLERS Gigabyte Flash drive for microcontroller Ursula Engelmann-Schrader and Jurgen Engelmann This neat stand-alone memory stick can store or transfer data from a microcontroller system in the field to a PC using its built-in USB and RS232 ports. Add to that an LCD and the simple to use datalogging mode is just the icing on the cake! Some electronic systems are of necessity sited at remote locations where they may be collecting data from natural events such as wind strength or solar powered installations where measurements are per- formed and stored on site in the memory of a microcontroller system. Occasionally the data requires transferring to a PC whe- re they can be fully evaluated and archi- ved. Without the luxury of a radio link or telephone line to transfer the data it would seem a good solution to use a versatile memory stick which can both plug into a serial port of a microcontroller system and a USB port on a PC, well there is no need to look any further, that's exactly the func- tion of the device described here! A Janus memory When the design for this 'microcontroller USB stick' was first sketched out on the back of an envelope it was decided not to use hard-wired memory chips for data storage but instead provide a slot for an MMC or SD-Card (FAT1 6 format). The fle- xibility of this approach means that your choice of memory for the card is not con- fined to just one supplier and allows you to take advantage of the falling cost and increased (gigabyte) capacity of the most recent memory cards. Just like the Roman god Janus, the USB flash drive presents two faces to the world: On the USB side it looks like a Windows and Linux compatible USB memory stick. Once plugged into a PC all files stored in the flash card can be viewed or edited on the screen. The PC user is free to begin work interpreting the data stored in the card previously by a microcontroller sy- stem (which may also still be attached). The second face of the drive allows data stored in the memory by a PC to be read by a microcontroller system. The on-board ARM processor together with its firmware enables an external microcontroller sy- stem connected to the RS232 port to have simple read/write access to the flash me- mory. An illustration at the end of the ar- ticle shows the USB Flashdrive connected to the ATmega controller board (0501 76- 71) which was featured in the May 2006 edition of Elektor Electronics. Access to the memory card by the micro- controller is performed by a driver which interprets a set of predefined instructions. The instructions are simple commands such as FileOpen, FileRead, FileWrite, FileClose, etc. The driver is contained in the software and not only controls access to the memory but also interprets com- mands for control of peripherals such as the LCD. The C source code for the drivers together with a few examples of code suitable for 8051 compatible controllers are included in the free software download available at the Elektor Electronics website [1 ]. A num- ber of additional Pascal files are also in- cluded for information — these were writ- ten for an earlier application of the unit. From the DOS point of view the memory card is treated just like an external drive connected to the serial interface. A Win- dows program ('Testsuite') is also included along with the other files and can be used to test the PCB. The flash memory card is also extremely easy to use in data logging mode (see text box). The ARM7 Controller The heart of the circuit shown in Figure 1 is the ARM7 Controller AT91SAM7S64 (IC1). It is a 32-bit controller with a RISC core. The CPU instruction set includes in- structions which allow switching between 16 or 32-bit instructions to enable opti- mum use of the processor for each appli- cation. The processor has a 64 kB Flash memory and 1 6 kB RAM. An on-board PLL multiplies the 1 2 MHz crystal frequency up to 48 MHz used by the processor. The ARM7 controller is equipped with a 42 elektor electronics - 11/2006 Main Features Memory media: MMC or SD card up to 2 GB File system: FAT1 6 (A maximum of four files may be open at the same time) Interfaces: 1 x USB (2.0 and 1.1), 2 x RS232 USB Data rate: 1 2 Mbit/s RS232 Data rate: 9600 bit/s to 230 kbit/s Power supply: 5 V derived from the USB connector or external mains adapter. Current consumption: 50 mA (approx). Options: LCD connector, TTL level serial interface. Dimensions (approx): 41 mm x 77 mm x 1 8 mm (including connectors and memory card) whole range of additional features inclu- ding a complete USB port integrated on- board so it is only necessary to connect to the D- and D+ signals on the USB port. Resistors R9 and RIO form a potential di- vider network which the controller uses to determine if a device is plugged into a USB port. A brief overview of the ARM7 microcontroller features are shown in the text box. Those of you who would like to delve de- eper into the workings of the ARM7 con- troller can use either a GNU compiler or any of the other available compilers. ARM technology was discussed in several arti- cles in Elektor Electronics. The interfaces The USB interface (ST2) has a raw bit rate of 1 2 Mbit/s and can be used with either a USB 1 .1 or USB 2.0 compliant USB port on a PC. High-speed operation is indica- ted by the PC via R1 1 on D + . The RS232 interface is quite conventio- nal, using a MAX232 (IC1 1) to perform the necessary level shifting for signals on the 9-way Sub-D connector CON2 provi- ding ±12 V nominal on the RS232 side and TTL levels on the ARM controller side. A second serial interface is available on JP2. The RS232 interface can handle data rates ranging from 9.6 up to 230 kbit/s. On reset the communications rate is set to 9600 bit/s (Default). The serial receive and transmit signals are also available on pins 2 and 3 of JP1 at TTL levels. When this option is used it is necessary to remo- ve solder jumper SJ1 to prevent any pos- sible contention in the signal levels produ- ced by the received data on CON2. A 21 -way pin header connector, JP3, pro- vides connection for a standard LCD dis- play using the HD44780 or compatible controller. Support is provided for displays using one, two or four lines of text up to 1 6 or 20 characters long. Power is deri- ved directly from the USB bus. If an LCD display is fitted it will be necessary to fit the SMD preset R1 to allow control of the contrast. The display uses 1 1 pins on JP3; eight are for data, one for Register Select (RS), one for Read/Write (R/W) and one for Enable (E). With no display fitted, PA7 to PA20 can be used as general I/O pins. The ARM controller also has an SPI in- terface for connection of a Flash memo- ry card; the following paragraph looks at this interface in more depth. 11/2006 - elektor electronics 43 HANDS-ON MICROCONTROLLERS UBUS ©- ST2 USB-AGF O SI S2 o M LB-201 209-008 0AI ^ R9 +5V 2 D- 3 D+ GND C20 15p C21 flH 15p R7 +3V3 © I I LI 140mA I I ST RIO | R11 +3V3 © ^C3 ^C9 ^C' ^OOn^U lOOn 100n i^^Oi R8 C19 15p C18 15p ST3 O g I C12 lOn R6 59 56 57 33 39 49 50 51 53 55 63 40 C13 In Cl C2 ^?p3 ^?n3 18 45 58 1 ^ToOn^ToOn^ToOn^ OOn 64 12 24 54 2 2 2 Z. •“ Q D Q Q q ODD > > > ADVREF VDDFLASH Q Q > Q Q > J 111 HI m ^ OC DC 1C o o o o Q Q Q Q > > Q Q > O O Q Q > DDM DDP IC1 TDI NRST TDO JTAGSEL TMS TCK ERASE PLLRC TST AD4 AD5 AD6 AD7 PAO/PWMO/TIOAO PA1/PWM1/TIOBO PA2/PWM2/SCK0 PA3/TWD/NPCS3 PA4/TWCK/TCLK0 PA5/RXD0/NPCS3 PA6/TXD0/PCK0 PA7/RTS0/PWM3 PA8/CTS0/ADTRG PA9/DRXO/NPCS1 PA1 0/DTXO/NPCS2 PA1 1/NPCS0/PWM0 PA12/MISO/PWM1 PA13/MOS1/PWM2 PA14/SPCK/PWM3 PA15/TF/TIOA1 PA16/TK/TIOB1 PA17/TD/PCK1/AD0 PA1 8/RD/PCK2/AD1 PA19/RK/FIQ/AD2 PA20/RF/IRQ0/AD3 PA21/RXD1/PCK1 PA22/TXD1/NPCS3 PA23/SCK1/PWM0 AT91SAM7S64 PA24/RTS1/PWM1 PA25/CTS1/PWM2 PA26/DCD1/TIOA2 PA27/DTR1/TIOB2 PA28/DSR1/TCLK1 PA29/RI1/TCLK2 PA30/IRQ1/NPCS2 PA31/NPCS1/PCK2 Q Q Q □ 2 Z Z Z a o o a XI N/ PGMCK XOUT 17 46 60 C14 15p 62 XI ii 12MHz 61 48 47 44 _43 36 35 34 32 31 30 29 28 27 22 21 20 19 10 13 16 11 14 15 23 25 26 37 38 41 42 52 C15 15p _PA0_/ PM_y PAS / PA6 / PA7_y _PA8_/ PA9 / PA10 / PAH / PA12 / _PA13_/ PA14 / PAIS / _PA16_/ _PA17y PA18 / PA19 / PA20 / PA21 / PA22 / PA23 / PA24 / PA25 / PA26 / PA27 / PA28 / PA29 / PA30 / PA31 / A y PA30 PA5 PA6 y PA18 V PA17 SJ1 PA5 JP1 o' C23 |3u3 lOOn I • • l> 'C2 LP2985-3.3 EN BYP ■ I 4 |C22 2 JE. +3V3 © C25 lOOn i— — ( i — i 1 ( i— < i— < DO o a < CsJ z z z z z tr dc DC DC DC \ PA29 R/W V PA28 E V PA27 DO \ PA4 D1 v PA16 D2 V PA24 D3 \ PA25 D4 V PA26 D5 V PA7 D6 \ PA20 D7 V PA23 V PA19 DISPLAY 03^^" 1 3 V PA22 11 V PA6 10 \ PA21 12 C35 1M C38 II II 2 * V+ C1 + © IC11 Cl- T1IN TIOUT T2IN T20UT RIOUT RUN R20UT R2IN C2+ MAX232 C2- V +5V © 16 14 13 15 C36 ft -© +3V3 CONI V PA1 1 T1 i V PA13 2 V PA14 5 ^ PA12 7 ^ PA15 8 \ PA10 9 \PA9 , CD \ PA8 WP WPT SI S2 <> • I/O I/O - 30 I/O - 29 I/O - 28 I/O - 27 I/O - 04 1/0-16 I/O - 24 I/O - 25 I/O - 26 I/O - 07 I/O - 20 I/O - 23 1/0-19 1/0-18 JP2 o 1/0-17 RX2 TX2 GND CON2 060006-11 Figure 1. The core of the unit is an ARM7 controller which contains an integrated USB interface. Its firmware allows a microcontroller connected to the RS232 port read/write access to data in the flash memory. The memory card The Flash card connector on the PCB (CONI) can accommodate both MMC and SD cards despite their differing thick- ness. Both types of card are used for many other commercial applications such as digital cameras, palm tops etc. they are competitively priced and offer good me- mory capacity. The circuit supports cards with a capacity up to 2 GB. Flash memory does have a limited num- ber of erase cycles (which obviously limits the write cycles also). This 'endurance' figure is largely dependant on the type of technology used by the card (NOR or NAND Flash). Standard MMC and SD cards (NOR Flash) quote an endurance figure of 100,000 write cycles while in- dustrial grade variants boast 400,000 cycles with an extended operating tem- perature range. When a card is inserted into the connec- tor the controller determines the status of the write protection switch. The card me- mory space is organised in sectors of 51 2 bytes, this is also the size of memory which can be read or written to in one step. The file system used is the industry standard FAT1 6 format so the card can also be re- 44 elektor electronics - 11/2006 ARM7 Controller Main features of the AT91SAM7S64 32-bit RISC Architecture • 64 l 700) mtcoop (vf2) ; else { pi = pi A 0x08; mtdelay ( tvf , vfl); } Finally, as if it were not enough that PLAY and VF run simultaneously and harmoniously, we add considerably to the demand on the processor with tasks SIMU, SCAN and COPY. These ensure that the scheduler has some- thing to do on each timer interrupt. The job of SCAN is to measure a frequency. It is provided with an input of 500 Hz by SIMU in the form of a changing byte ('sim'), obviating the need for an external frequency generator. SCAN waits alternately for a rising and a falling edge on bit 0 of the byte sim. It signals its result to the COPY task using semaphore SCANSEM, which displays it on an LED. Correct operation can most easily be verified using an oscillo- scope. These three tasks demonstrate that a program can continue to run smoothly even when the processor is under considerable load. // SIMU: simulate input for SCAN in sim at 500 Hz char sim = 0; void simul () { sim = sim A OxFF; // alternate between sim = 0 and sim = OxFF mtdelay ( 1 , simul ) ; txmr =1; // pulse output mode on pin 8 for Timer X tx = 142-1; // 125 kHz / 1 4 2 = 880 Hz, corresponding to note at 440 Hz prex = 20-1; // 2.5 MHz / 20 = 125 kHz txck0= 1; // 20 MHz / 8 = 2.5 MHz txckl= 0; txs =0; // Timer X stop asm( "FSET I"); // enable interrupt start (PLAY, 1, playl); // SIMU, SCAN, COPY start (SIMU, 1, simul); start (SCAN, 1, scanl); start (COPY, 1, copyl) ; // VF start (VF, 1, vfl); } The final part of all mt programs is the same. The arrays tlist (data for the mt kernel) and semalist (for semaphore storage) are defined here. Then comes the interrupt handler for Timer Y, which detects timer expiry and bit changes using mtint_handler(). It is essential to overwrite the dummy entry for vector 23 in the R8C variable vector table (file sect30. inc) with _timer_y, and make it global in scope. .gib timer y .lword timer_y ; vector 23 Function mainQ switches the CPU clock to 20 MHz and initialises Timer Y. The two final calls in mainQ must be startmt() and schedule)). Function schedule!) is the 'engine' of the program, calling task functions as neces- sary and executing an empty loop when no functions are ready to run. /* Code from here on is identical for all mt programs */ tlisttype tlist [TLSIZE] ; semalisttype semalist [SLSIZE] = { 0 }; fpragma interrupt timer_y void timer_y (void) { mtint handler ( ) ; } // SCAN: scan bit 0 of sim and signal result using SCANSEM void scan2 (); void scan3 () { signal (SCANSEM) ; mtbitup ( &sim, 0, scan2) ; } void scan2 () { signal (SCANSEM) ; mtbitdown ( &sim, 0, scan3) ; } void scanl () { mtbitup ( &sim, 0, scan2) ; } // COPY: wait for SCANSEM and copy SCAN result to pl_2 void copyl () { pi = pi A 0x04; mtwait ( SCANSEM, copyl) ; After the tasks we define the function startmt(). This carries out any ini- tialisation required by the tasks and then starts them. void startmt (void) { // initialise and start tasks pdl = pdl | OxOC; // pl_2 used by COPY, pl_3 by VF //PLAY asm( "FCLR I"); // disable interrupt void main ( ) { asm ( "FCLR I"); main clock // change on-chip oscillator clock to prcO = 1; // protect off cml3 = 1; // Xin, Xout cml5 = 1; bit: HIGH // XCIN, XCOUT drive capacity select cm05 = 0; / / Xin on cml6 = 0; cml7 = 0; // main clock = no division mode cm06 = 0; // CM16 and CM17 enable asm ("nop"); asm(" nop"); asm("nop"); asm("nop"); ocd2 = 0; / / main clock change prcO = 0; // protect on tymodO = 0; // timer mode for Timer Y tysc = 0; typr = 250-1; // 250 kHz / 250 = 1 kHz prey = 10-1; // 2.5 MHz / 10 = 250 kHz tyckO = 1; tyckl = 0; // 20 MHz / 8 = 2.5 MHz tyic = 7; tywc = 0; ir tyic = 0; // interrupt level tys =1; // timer on asm ( "FSET I"); startmt ( ) ; schedule (); / / enable interrupt 54 elektor electronics - 11/2006 DON'T LOSE YOUR TEMPER Before phoning us - if you are looking for a hard-to-find part. We have over 20,000 items in stock - including obsolete and up-to-date parts. WHY NOT VISIT OUR WEBSITE www.cricklewoodelectronics.com 2N 2SA 2SB 2SC 2SD 2P 2SJ 2SK 3N 3SK 4N 6N 17 40 AD ADC AN AM AY BA BC BD BDT BDV BDW BDX BF BFR BFS BFT BFX BFY BLY BLX BS BR BRX BRY BS BSS BSV BSW BSX BT BTABTB BRWBU BUK BUT BUV BUW BUX BUY BUZ CA CD CX CXA DAC DG DM DS DTA DTC GL GM HA HCF HD HEF ICL ICM IRF J KA KIAL LA LB LC LD LF LM M M5M MA MAB MAX MB MC MDAJ MJE MJF MM MN MPS MPSA MPSH MPSU MRF NJM NE OM OP PA PAL PIC PN RC S SAA SAB SAD SAJ SAS SDA SG SI SL SN SO STA STK STR STRD STRM STRS SV1 T TA TAA TAG TBA TC TCA TDA TDB TEA TIC TIP TIPL TEA TL TLC TMP TMS TPU U UA UAA UC UDN ULN UM UPA UPC UPD VN X XR Z ZN ZTX + many others We accept Mail, telephone & email orders. Callers welcome. Opening hours Mon-Sat 9:30-6:00 VISA ■■■ Connect Cricklewood Electronics Ltd 40-42 Cricklewood Broadway London NW2 3ET Tel: 020 8452 0161 Fax: 020 8208 1441 sales @ cricklewoodelectronics.com MoU n-p rwrptu iqi-s strip J*: LViy -D tlHi M+Tht* liral rcnwniTTlft. LtJD Jt dp! OF CWWWlHii. nwfltTT, kvnndk iID rnakn dftptavi. >1 cficoucti by wts ■: zrr*z w v» TH«i K JltU « VTUll WfrflKrt VtiH L r Hi iwfl HI* *€>* hMi llpt jnl i«rr¥-;rtrn4LfT Kryp*d twHFO b life |BtY ttltTP Ruw, LI^IFn'i ■LLI , ' d i|"JlilllT Lwl N; hM4id fevluflfl T*y I44*C l> PHT-p pBMg £ 11.00 MkSWenlroGIff (14.*! JUl L-h.EO PtfeT 1 UC*. i mr-jTt ini-i ViH h’i-t ta' 1 . 1,1 '-v . Purchase Options: OnTinp at www.byvae^cD.uk *■ Telephone 079D5 73^ Hfl * smart saL«3@T£pc F »m * Cheque or P«taL Order no: &yV-w, P0 BOX AM, PfrrtlSlOd^ SHEFFIELD, 6WP Post and packing- UK E2.M Wwtd Wide £3.56 VfWW, liyviiL-cri. uSc Srarilnf Tt.- bkni> bo w*l £if4iy uhbii,, ChHrci Mtf I H" A Up to 4 lines by rt rbaracteri lU ii LCDDlifll** £22.90 LCD Con trailer En.oo B 1 1 R Ccf>jr IW'tim Bpftamis turtscl Lh« i^l nrttil pqlCtinft S^iicEh cw r ipeto j . electronics Q T £ d d WORKBENCH a .iterijidi.lUt 11/2006 - elektor electronics 59 HANDS-ON MODDING & TWEAKING A truly (lashing lab aid Jeroen Domburg & Thijs Beckers 6 ^c\j Repairing the connection between two cells in a battery pack actually requires spe- cialised welding equipment. Alas, that kind of gear is expensive, and soldering is not an option either. So we cook up another solution, in this case using dead common elec- trolytic capacitors, conveniently abusing their ability to deliver brief, high current pulses for none other purpose than... welding! Short circuiting a charged electrolytic capacitor results in nice sparks. Admit it — you, too have done or seen this on occasions, either accidentally or on purpose. The fol- lowing is true: the higher the voltage and the larger the capacitance, the bigger the spark will be. Apart from a high entertainment value, this effect has other conse- quences. Every now and then the terminals of the poor capacitor will end up secured to the piece of metal that's used to short-circuit them. But hey, sometimes that's quite a robust connection! We can put this welding effect to very good use. What are we going to do? Battery packs are usually made by attaching metal strips with small spot-welds to the individual cells. The equip- ment that makes these kinds of spot-welds is unfortunately rather pricey, if not totally unavailable for personal use. In these types of situations the hobbyist with a broken battery pack is likely to reach (out of necessity) for the soldering iron. Soldering is actually a very bad and, what's more, dangerous method to interconnect batteries without solder tags. The worst-case scenario is that the over-pressure valves will open and the battery explodes if it becomes too hot. Welding is therefore a safer solution. Because only a very small area of metal is heated for a short time, not much happens to the rest of the battery. Electrolytic capacitors are perfect for the currents that are required for this type of welding operation. In order to make the welding more controlled than the brute and awkward short-circuiting of the capacitor terminals, we designed a circuit that (kind of) controls the welding process. By obtaining the energy for the welding from a set of capac- itors instead of from the mains voltage, the whole arrangement is also reasonably safe. How are we going to do it? The circuit consists of four parts: the power supply, the array of capacitors, the power stage and the 'ignition'. The capacitors form the heart and are probably the largest physical part of the circuit. They deliver the cur- rent surge required to spot weld. Eight capacitors of 10,000 |jF each is enough, in principle, but more or big- ger capacitors may be better in some cases. The main part: the capacitor. This is a 10,0 00 pF-version. Eight of these are tied together with thick loudspeaker cable (the battery is an AA penlite, for reference) Like this. The loudspeaker cable has been stripped and well tinned at the places where the capacitors are soldered to it. 60 elektor electronics - 11/2006 IM ?x IClCC u F For the power supply, a benchtop power supply is best. This has as the advantage that the welding power can be adjusted to some extent by changing the voltage. The cur- rent that the power supply will deliver can also be lim- ited. As an alternative, a short-circuit proof transformer followed by a rectifier will also work reasonably. The power stage consists of a number of BUZ1 1 MOS- FETs connected in parallel. These MOSFETS can usually be bought for relatively little money, yet can cope with 30 A. Determining the number of FETs required for the job is a bit of a wild stab in the dark. Afrter all, the amount of current that will flow depends on a number of factors that are not easily determined. Start with five or so MOSFETs. Should one burn out then you can come to the conclusion that you did not have enough of them. Because MOSFETs are voltage controlled components, adding more FETs does not require any other changes to the circuit. The BUZ1 1 FETs need to be driven with a voltage on the gates. They will conduct harder as the gate-drain voltage increases. To make optimum use of this effect, the MOS- FETs are not connected directly to the ignition circuit but via a transistor stage. In this way the MOSFETS are sup- plied with a higher voltage and are turned on harder. A microcontroller controls the 'ignition'. It measures the voltage at the welding electrode which is connected to the MOSFETs (via a voltage divider, because 30 V is a little too high for its input). When this voltage goes high (that is, when the two electrodes are touching each other , the microcontroller will wait one second and then turn the MOSFETs on. This way there is enough time to put the electrodes in the right position and perhaps brace yourself for the 'bang'. Although the logic in the microcontroller doesn't amount to much (a comparator and a couple of monostables could do the same job), we still chose an ATTinyl 3. Should a future application require it, a specific trigger or ignition pattern could then be programmed in the microcontroller. There is also a 5-volt power supply included in the circuit, for the sole benefit of the microcontroller. The output volt- age is quite well filtered and has some buffer capacitors to rely on, because the other parts of the circuit generate quite a few current and voltage surges. The biggest is a peak of more than one hundred amps while welding. The MOSFETs. We had no need for blown up PCBs, so we built the prototype on top of the capacitors 'in the air'. Here is the transistor driving stage (bottom left), the 5 -V power supply (top right) and the microcontroller (on wires) mounted with it. 11/2006 - elektor electronics 61 HANDS-ON MODDING & TWEAKING The first test: drawing sparks! It appears that the capacitor array can get rid of its power fast. Be aware of small pieces of metal shooting away. How do we use this to join two batteries to each other? First the items we need for this: the batteries and a little strip of metal for the 'solder tag (a piece from a tin can or such works well). IC2 It helps to tin the metal well where is will be joined to the battery. Solder melts easier than the strip of metal or the metal end of the battery. Attach the tag to one welding electrode and gently push it against the battery. Then push the other electrode firmly against the metal next to the tag and brace yourself for the flash. 62 elektor electronics - 11/2006 Notes The current that will flow through the weld depends on four things: the power supply voltage, the total capaci- tance of the capacitor array, the internal resistance of the capacitors and the resistance lurking in other parts of the circuit. The voltage is easily controlled. By using a trans- former with a different turns ratio, or in the case of a lab PSU, by twirling the voltage knob, the welding current can be adjusted in a simple manner. The resistance in the current path needs to be as low as is possible. That is why it is important to make the con- nections in the path electrode-capacitors-MOSFETs-elec- trode with as thick a wire as is practicable. To keep the total internal resistance of the capacitor array low, it is better to connect multiple capacitors in parallel instead of just one single large one. Low-ESR electrolytics are ideal for this application, but ordinary capacitors are much cheaper and also work well. For the welding electrodes we used a pair of old, sturdy multimeter probes, but a thick piece of wire will do as just as well. About the author: Jeroen Domburg is a student at the Saxion Technical University in Enschede, the Netherlands. Jeroen is an enthusi- astic hobbyist, with interests in microcontrollers, electronics and computers. In this column he displays his personal handiwork, modifica- tions and other interesting circuits, which do not necessarily have to be useful. In most cases they are not likely to win a beauty contest and safety is generally taken with a grain of salt. But that doesn't concern the author at all. As long as the circuit does what it was intended for then all is well. You have been warned! The source code for the microcontroller can be down- loaded free of charge from the publisher's or the author's website. Warning Although the relatively low power of the capacitor welder makes it safer than a 'normal' welder, it is still very wise to take note of a few safety rules: • Make sure that while building the circuit the capacitors are connected up with the correct polarity. • Wear eye protection when welding. Even though it may not happen very often that small pieces of metal fly around, it will be very painful if debris gets into your eye. • Discharge the circuit after use. This will at least avoid a sudden fright if the electrodes touch each other while you're putting the circuit away. ( 065119 - 1 ) Web links m www.elektor.com [2] sprite.student.utwente.nl/ ~jeroen/ projects/capwelder/ The second weld is done the same way. And in the end, the two batteries are firmly connected to each other. 11/2006 - elektor electronics 63 KNOW-HOW WIRELESS Fabrice Andre Just about everybody realises that 'wire- less' has become a fact of everyday life. If you look around you, you will see that you are surrounded by innumerable wire- less devices, such as mobile telephones, alarm systems, garage door openers, key- boards, mice, and so on. That tangled nest of cables has to go - or at least this seems to be the current trend. The demand for wireless technology just keeps on growing. Under the sponsorship of major manufacturers, several standards for wireless data transmission have already arisen - such as Blue- Tooth and Wi-Fi, which presently seem to be set to con- quer the world. But everything seems to be rather compli- cated, even for an experienced electronics hobbyist whose hands are just itching to build some sort of wire- less project. How can you tackle something like this? Numerous semiconductor manufacturers make ICs that can be used for wireless communication according to some commonly used technology or another. There are even microcontrollers that can do this trick, although most of them are rather costly and often not available from retail merchants. The Chipcon CFC2440 is a good example. Even if you manage to overcome the usual design prob- lems, as a designer you know in advance that at some point in time a completely different sort of problem will arise: you need an RF output stage with a suitable antenna. This output stage is full of pitfalls. No matter how carefully you pay attention to parasitic inductances, they can still make your life miserable, and the perform- ance of your design depends on them! Of course, elec- tronics manufacturers are aware of this problem, so ready-made 'RF solutions' are now available. Here we examine a module of this sort, and in particular one that support the ZigBee protocol. ZigBee at a glance ZigBee is the name given to a standard for wireless com- munication that was essentially developed for industrial applications. From a historical per- spective, ZigBee is a refinement of a previous standard called 'Home RF'. That standard had rather rosy prospects at first, but with the success of the competitive Wireless Fidelity (Wi-Fi) standard it lapsed into disuse. The relatively short lifetime of Home RF is at least some- thing that provides food for thought, and possibly even somewhat worrisome. You can rightly wonder whether history will repeat itself. However, we can assure you that this worry is unfounded, since ZigBee is supported by major players such as Freescale (a spinoff of Motorola), Honeywell, Philips, Microchip and Mitsubishi, who have joined with around a hundred other manufac- turers to form a consortium called the 'ZigBee Alliance'. This consortium also enjoys the support of Paul Allen, one of the founders of Microsoft, who recently invested sev- eral million dollars in it. ZigBee is originally based on the IEEE 902.15.4 stan- dard and uses the same frequency band as Wi-Fi (2.4 GHz). It has 1 6 separate channels, which means that up to 1 6 networks can be present in a single location with- out interfering with each other. The maximum data trans- mission rate is 250 Kb/s, with a range of 100 m. The data rate is rather low compared with the 54 Mb/s of Wi-Fi or the 1 MB/s of BlueTooth, and it can be regarded as the weak point of ZigBee. But as already mentioned, this protocol is intended to be used for indus- trial applications, for which speed is not a paramount consideration. ZigBee was developed to satisfy the need for low current consumption and above all low cost. Table 1 presents a comparative overview of the three above-mentioned wireless communication options. 64 elektor electronics - 11/2006 XBee modules MaxStream, a well-known manufacturer of components for wireless communication, has just added a product to its line with the quite fitting name XBee (pronounced ex- bee), which makes its own modest contribution to the already quite thick blanket of electrosmog surrounding us. XBee is a tiny but nevertheless complete ZigBee trans- ceiver (transmitter/receiver). It is bi-directional in the sense that it can transmit or receive data alternately (half- duplex mode). Two versions are available from MaxStream: XBee and XBee PRO. Both versions are functionally identical and pin compatible (which accounts for the designation 'inter- changeable' in Figure 1). The only difference is the transmit power, which is 1 mW maximum for the XBee and 63 mW maximum for the XBee PRO. Of course, transmit power is an important factor because the range of the ultimate product depends on it, but it is certainly not the only thing you have to take into account. Another consideration that is at least as important is that higher transmit power means higher current consumption. A transmit power of 1 mW already costs around 45 mA, while 63 mW from the antenna translates into a tidy 270 mA from the power source. That means you can forget about using batteries to power the circuit - just when what you wanted was a wireless module! A further consideration is compliance with legal require- ments. The maximum radiated power is regulated by law, and in Europe the applicable limit is 10 mW. To make it possible to comply with this requirement, MaxStream has implemented a configuration parameter in the XBee that can be used to set the transmit power. Careful examination of the photos accompanying this article shows that the XBee is available with three differ- ent types of antenna (Figure 2): 1 . Integrated into the chip. In this case the radiated energy is practically non-directional. 2. With an antenna connector for attaching an external antenna. 3. With an integrated vertical (whip) antenna, which gives better directional characteristics than option 1 . Software This low-cost module can be interfaced quite easily via a standard serial port, such is commonly found with micro- controllers (UART) or the COM port of a PC (RS232), at maximum rate of 1 15,200 baud. However, the XBee is powered from a 3.3-V supply instead a 5-V supply like most digital circuits, as you can see from the block dia- gram in Figure 3. This means you cannot simply apply 'normal' digital signals to the XBee input, so a direct con- nection between the two types of logic is not possible. We'll have more to say about this later. Other than that, you don't need to have any specific knowledge to use the module, so you don't have to delve into the ZigBee protocol before you start. The module does everything for you. It is an 'intelligent' system, which means the module contains control logic that can accept commands from the user. These commands are specified by the manufacturer. If you're starting to fear that things are getting compli- cated again, we can set your mind at ease: it's not at all complicated in actual practice. Anyone who has a rea- sonable amount of experience with programming micro- controllers won't bat an eye here. The commands are actually just ASCII codes (character strings), just like you see with modems. You send commands to the XBee the same way as data, and there is a bit of software that tells the two apart. This works as follows. Before you can send a command, you have to put the XBee in the 'wait for command' state. To do so, you send it a string of three + characters (hex 2B), or literally '+++'. After this, the XBee expects to receive a command in Hayes format, which always starts with 'AT' (which stands for 'attention') in ASCII code, followed immedi- ately by the actual command and any command parame- ters that may be necessary. The command string is termi- nated by a Carriage Return (CR) character. Figure 4 shows an example of all this. The XBee module executes the command and then reports whether the command was processed successfully. If everything went the way it should, the XBee returns 'OK', while otherwise you will receive an error string from the module. MaxStream also provides a handy little program called X-CTU to make things even more convenient. It can be downloaded free of charge from the MaxStream website, and you can use it to configure all the parameters of the XBee module with a few mouse clicks. However, the XBee module must first be connected to a COM port of your 11/2006 - elektor electronics KNOW-HOW WIRELESS Figure 1 . MaxStream uses a special logo to emphasise the interchangeability of the modules. Figure 2. There are three different antenna options: on the surface of the chip, external via a connector, and external integrated. Figure 3. Block diagram of a data transmission system using two XBee modules. PC (via an adapter due to the different signal levels). You can also use X-CTU to test and upgrade the modules. Software buffers A wireless link is always half-duplex. You can transmit or receive with a single antenna, but not both at the same time. However, your application can transmit and receive at the same time (full-duplex mode) via a serial link to the UART at your end of the interface. This is made possible by two software buffers. The principle is revealed in Figure 5. There is a transmit buffer and a receive buffer, and each buffer provides a temporary parking place for 100 bytes. Data can arrive from both directions at the same time - the data to be transmitted coming from the UART, and the data received by the antenna from the RF link. When the antenna is receiving data, it cannot transmit data at the same time. For this reason, the data to be transmitted is parked in the transmit buffer for a while, and the received data is stacked up in the receive buffer. As soon as the data stream from the RF end stops, the XBee mod- ule switches the antenna from receive to transmit and empties the transmit buffer by sending its content out on the ether. At the same time, the UART empties the receive buffer by sending the data in it to your application. This is an ingenious system, but it's not entirely perfect. An application with a large amount of data to send can easily overload the transmit buffer. MaxStream provides a 'full' alarm to deal with this problem. As soon as the application has filled all but the last 1 7 bytes of the trans- mit buffer (which means 83 bytes are waiting to be trans- mitted), pin 1 2 goes high to signal to the system that it has to stop filling the buffer for a while. Pin 1 2 goes low again after the content of the transmit buffer has been reduced to 66 bytes. This can be regarded as a sort of software hysteresis. XBee in practice Now it's time to talk about circuitry. A cautious designer generally starts with a bit of preliminary investigation for his circuit, and most designers are more than willing to be inspired by a schematic diagram of something that already works. A bit of nosing around on the manufacturer's website turns up a wealth of well-organised information. You can look for ideas here to your heart's content or look for answers to any questions you may have: www.maxstream.net/support/knowledgebase/full-list.php Figure 6 shows the internal block diagram of the mod- ule, which forms the core of a specific application. The XBee module has 20 leads, which may remind you of the DIL packages used for digital ICs, but there you're mis- taken. Due to the very compact dimensions of the mod- ule, the pins are separated by only 2 millimetres, so they won't fit in an 1C socket. Fortunately for anyone who wants to keep the module replaceable, suitable PCB con- nectors are available from Radiospares under item num- ber 1 3 1 .9872 (they are often used in PC mice). For good measure, we'd like to remind you again that the maximum supply voltage is 3.3 V. Anything more than this will unavoidably result in the premature death of your treasured module. The supply voltage must be decoupled by a 1 00-nF capacitor located as close as possible to pins 1 and 10. Communication is provided by pins 2 and 3, and the direction is indicated by arrows. Some of the pins are marked with an asterisk (*). These pins are reserved for certain functions that are not yet available from the manu- facturer. When they are available, you can download them from the MaxStream website and upgrade your XBee by flashing the firmware into the module. Up until then, you can simply leave them unconnected. The same applies to the pins marked NC ('not connected'). Pin 5 is more important: a logic 1 here (3.3 V) enables the module, while a logic 0 disables it. A 1 0-k£2 pull-up resistor from pin 5 to pin 1 ensures that the module will be enabled as soon as the supply voltage is applied. You have a choice of several functions for pin 9. An internal parameter determines which of them is active. The most important function is the sleep state. The module remains 66 elektor electronics - 11/2006 in deep sleep as long as the internal SM register is not at logic 0. Pin 7 provides a pulse-width modulated (PWM) signal proportional to the most recently received RF signal. It has a period of 8.32 ms, which corresponds to 1 20 Hz. Fans of LED bars and other light effects can convert it into an analogue signal and use it as a signal strength indicator (all you need is an RC network and an LM3914). This can also be done using software, since the strength of the most recently received signal is stored in the internal DB parameter. As the name suggests, this quantity is given in units of dBm RF (decibels relative to 1 mW). You can use the following formula to convert between dBm RF and milliwatts (P): dBm =10 log P [dB] or in the other direction P=10(dBm/10) [ m W] For example: 0 dBm = 1 mW, 10 dBm = 10 mW, 20 dBm = 100 mW, and 30 dBm = 1 W. All exam- ples for RF. "AT" ASCII Space Parameter Carriage Prefix + Command (Optional) (Optional, HEX) Return Example: ATDL 1F Figure 4. AT command structure. XBee modules recognise such commands. Figure 5. Internal block diagram of the XBee module. Conclusion The XBee module is very easy to use, and the interface is based on a simple dialogue with a serial port, which can be easily handled by a microcontroller or a PC. As it's not possible to present everything you have to say in a single article, the author is working on a follow-up article describing a specific application for these modules. You can look forward to seeing it in a future issue. Additional information is available on the manufacturer's website: www.maxstream.net X-CTU can be downloaded from: www.maxstream. net/ support/ downloads. php?PHPSES- SID=575749e0e95a4454cd0780d36f486fc7 ( 060063 - 1 ) Figure 6. All this fits in a package measuring less than 7 square centimetres. Comparison of the three most com imonly used wireless technologies Wi-Fi Bluetooth ZigBee Frequency band 2.4 GHz 2.4 GHz 2.4 GHz, 868 or 915 MHz Protocol stack ca. 1 Mbits ca. 1 Mbits ca. 20 kbits Data rate 1 1 Mb/s 1 1 Mb/s 250 kb/s (2.4 GHz) 40 kb/s (915 MHz) 20 kb/s (868 MHz) Number of channels 11-14 79 16 (2.4 GHz) 10 (915 MHz) 1 (868 MHz) Signal type Digital Digital & audio Digital & key-value Point-to-point range 100 m 10- 100 m 1 0 - 1 00 m Number of systems 32 8 255 or 65 535 Power consumption Moderate: several hours with one battery Moderate: several days with one battery Very low: several years with one battery Market share Large Moderate Tiny Network topology Star Star Star, tree or cluster Used for Internet inside buildings PC and telephone peripherals Low-cost monitoring and control 11/2006 - elektor electronics 67 HANDS-ON E-BLOCKS Waraporn Supmak, John Dobson Figure 1. Block schematic of display system. E-blocks are like Lego bricks — you can piece them together to make all different kinds of shapes and structures. The modules are perfect for marrying standards too — in this article we use E-blocks and Flowcode to control hardware over USB, via RS232, while making clever use of Visual Basic. Great stuff for your own applications. I was recently asked by a friend of mine how he could develop a small window display which gave instructions to cou- riers on where to leave parcels when he was not in the office. The brief here was that he wanted to enter a text script (a neighbour’s ad- dress) into a PC based application and have the message displayed in the Window. Now we could have an- other monitor which was visible from the outside of his house but that seems like overkill. Using a small LCD based circuit and a microcontroller would be much more appropriate. The es- sence of the task here is how to get a PC to communicate to a microcontrol- ler based system. This happens to be a question that has been raised by a number of Elektor readers so I thought it would make a good project. The concept Figure 1 shows you the basic diagram of the final system we need. In terms of hardware, the display system we want needs a central microcontroller (in this case a PIC micro), a USB inter- face (from FTDI) and an LCD display. For good measure I have also included some LEDs and switches. The switch- es will allow us to make a standard display from one of several messag- es, and the LEDs might come in handy later. I happened to have a spare ‘rats tail’ power supply which gives 18 V output. A standard 7805 voltage reg- ulator will provide the 5 V power rail the system needs. Get out some E-blocks My first action was to develop a proto- type system from E -blocks. The result is shown in Figure 2. Most readers will by now be familiar with the E -blocks boards we have used here: a PICmicro microcontroller Multiprogrammer, LED board, Switchboard and LCD board. An overview of currently available E- blocks may be found in the SHOP sec- tion at www.elektor.com. A PIC 16F877A is used as the core mi- crocontroller. Sure, this is a bit of over- kill but I reasoned that I can always use a smaller PICmicro device later on. One E-blocks board that may not be too familiar to you is the USB232 mod- ule shown in Figure 3. This is based on the highly successful USB to RS 232 interface supplied by a great Scottish company called FTDI. How the inter- face works internally is beyond the scope of this article — as far as using the device is concerned, the FTDI de- vice converts a USB signal to an RS232 signal and the board is supplied with 68 elektor electronics - 11/2006 Communicating to your hardware using USB a set of virtual COM drivers which al- low you to communicate with it using standard Windows software — in this case Visual Basic! Let's do it 'virtual' first For a test jig I set up a Visual Basic program that did more than the over- all brief. I designed a screen with a display area, eight switches and eight LEDs. The status of the eight switch- es on port D of the Multiprogrammer is monitored by the eight LEDs inside the Visual Basic application. Correspondingly the LEDs on port A of the E -blocks Multiprogrammer re- flect the status of the switches in my Visual Basic application. These were really useful during the initial design phase of my program just to allow me to check that I could transfer data to and from the PICmicro device, and I left them in the software application as they might come in handy for fur- ther projects. From virtual to real In the final program to display a mes- sage on the LCD I simply type the mes- sage into the PC application’s text box which updates the LCD display on port B of the Multiprogrammer imme- diately. The clear button allows me to wipe the display. The host application is written in Visual Basic of which the result is shown in Figure 5. 1 think it is a little beyond the scope of this short article to delve deeper into how the code in the Visual Basic program works — but those of you who are interested can download the source files from the Elektor web site at www.elektor.com (you will need VB to view them). The archive file number is 065087-11. zip and you will find it on the elektor.com website under magazine, then select month of publication. And then — Flowcode For the PICmicro microcontroller I de- veloped a program in Flowcode ver- sion 3, which includes a handy RS232 icon that allows communication to the FTDI device. Almost the entire program is shown in the Flowcode printout in Figure 4. Those of you who do not have a copy of Flowcode can also download a 30-day demonstration version (which allows you to see how this program works). The url to the demo version will be posted on the project page for this article. On the elektor.com web- site, follow magazine > volumes > 2006 > november > E -blocks Link VB to USB. Conclusion The FTDI device is great for making the task of connecting to USB easier - we managed to create the whole ap- plication in less than a day and the re- Figure 2. E-blocks prototyping system - note the short 9-way ribbon cable on the LCD. Figure 3. US6232 E-blocks board. 11/2006 - elektor electronics 69 HANDS-ON E-BLOCKS ^ BEGIN ^ Start u p the LCD LCDDisp. Start / Display Welcome on LCD y / LCDDisp... ^ PrintASC... _J / Delay 2 s j Clear the LCD LCDDisp... i Clear 0 Connection Point Reset port B LEDs / 0 / /-► PORT B / ^ While ^ Start of Main Program Z PORT A -►/ INPA / Get data from port A Send port A inputs + send RS232 message Input switch subroutine Call Macro CHECK ... Figure 4. Flowcode 3 program. suits are great for a first prototype. The cost of the E-blocks involved was under £ 120 (ap- prox. € 155) which meant that it was not even worth making a PCB — in the end we just used the prototype system shown in Figure 2 e with a 60-cm long IDC ca- liL 1 ble to the LCD display. It worked fine. ( 065087 - 1 ) BOARD OJEAfl D O Check for RS232 message / RS232(0) 2 CHR=Re... If there is a message Display character on LCD Clear LCD n LCDDisp... '/ Clear ^ Get next RS232 byte ^ RS232(0) ^ ^ CHR=Re... ^ Goto Connection Point 0 Set port B on depending o... PORTB = P... / PORTB / /-►PORTB/ Send output to port B Character is '>' ^ RS232(0) £ '/ CHR=Re... ^ 0 0 Get next RS232 byte Set port B off depending o. PORTB = P.. / PORTB / /-►PORTB/ Send output to port B Start of Main Program 1 ri»~) 065087-12 Figure 5. Visual Basic application. A word or two on the 1 6F877A program If you examine the Flowcode chart in Figure 4 you can see how the PICmicro program works. First we start up the LCD and show a welcome message. In the main program we get the inputs from the Port A switches — if any switches are pressed we send the data back to the PC using the input switch subroutine (not shown in detail). Then we check for an incoming message on the RS232 pins — if there isn't, i.e. '255' is returned from the subroutine, then round the loop we go again! The VB program sends characters '<' and '>' as instructions for Port B outputs ('<' = pin output On and '>' = pin output Off). So, if there is a mes- sage then the next decision box checks the mes- sage is not a port B output message — otherwise the incoming character is displayed on the LCD. The second decision box detects a line feed char- acter generated by the CLEAR button in the VB ap- plication. If one of these is received, the program clears the display and sends the program back to point A. The next decision box detects a '<' char- acter and if one is received gets the subsequent RS232 character, containing pin information, and pulls the appropriate pin on port B High. The last decision box detects a '>' character and if one is received gets the subsequent RS232 character and puts the appropriate pin on port B Low. Those of you who know a bit about LCDs will be aware of the fact that a 1 6-character display actu- ally has 32 internal characters, so this program might appear not to work - in practice the VB pro- gram takes care of the extra spaces. 70 elektor electronics - 11/2006 Number One Systems Easy-PC for Windows The World Beating PCB design software Jttu _ Easy-PC version 10 sets another milestone Winning accolades che wor ld over, Easy-FC for Windows V I Q is another major milestone in the evolution of this extremely popular software tool. Try a demonstration copy of Easy -PC and prepare to be amazed at the power, versatility and remarkable va ue for money. Version I 0 features P IntdUgut Gerber Import option P TracltfShape 'Hug" Mode Routing ■ Test Callouts P Uyt rJi Via Stack Previews P Blind S, Buried! Via Support S Teardrop -Pa ds P Dr^W Sp:i Ceng CEWtllCS P Spiral Tracks & Shapes Plus many more exciting rojiCLires...... - Fully integrated Scheme) tics A iPCB layout in a single application complete wtrh toward and back annotation. Design and rules checks at alt stages ensure integrity at all times. Profess jonal manufacturing outputs allow you to finish the design process w*th ease. Stop press,.. Stop press.,. Stop press,,. Stop press,. Easy- PC imports Eagle files as well asTsien Board maker 2 files call For a brochure, prices £ CD on *44 (0) 1 634 773662 or e-mail isEes@numberone.eom you cm also download a demo from www.numberone.com n . r ir Oik Lane. Bredon Tewkesbury Glos. GL20 7LR United Kmgdom The PicoScope 3Q00 series oscilloscopes are the latest offerings from the market Feeder in PC esc iilc scopes combining high band widths with large buffer onemorhas. Using the latest advances I « electronics, the oscilloscopes connect to the USB port of any modern PC making full use cl the PCs' processing capabilities, targe screens end familiar graphical user Interfaces. * High performance: TUG &/ 5 sampling rate Bl 200MHz bandwidth ■jP"1Sk " www.picotech .com/scope369 Technology Limited * 1M8 buffer memory * High speed USB E>0 interface * Advanced display £ trigger modes * Compact & portable * Supplied Mich PicnScnpe £ Pico Lag software Tel: 01480 396395 J- + CU In,,. ^-•J- i. .is i iiiiy YVJrtT| HjUWUr , r [ . am w^jii h-, frad* i* M>- ■j MMI'J 2006 > November). Prize winners The solution of the September 2006 Hexadoku is: OEBAD. The E-blocks Starter Kit Professional goes to: Rob Quinn (Kirkcudbrightshire). An Elektor SHOP voucher worth £35.00 goes to: Hugh McCarry (Ballymacaw, IRL), Leo Hallback (Malax, FIN), Jonathan Gudgeon (Milton Keynes). Well done everybody! A F 0 3 5 6 7 4 D 1 F 5 C 3 7 E C 9 1 4 F 6 2 D 8 0 9 E 5 3 A F D 6 2 B C 7 C B 1 3 2 A 6 4 E A F 2 A F 6 7 D B 9 4 9 2 A 7 8 3 4 6 0 F 3 B 1 5 4 D C 7 4 9 D F A 0 9 B E 5 D 3 4 D 6 A 5 9 E C F 7 3 2 E 0 9 8 1 B 3 D F C D 3 0 A 6 E 8 5 6 C 2 F Solve Hexadoku and win! Correct solutions received enter a prize draw for an E-blocks Starter Kit Professional worth £248.55 and three Elektor Electronics SHOP Vouchers worth £35.00 each. We believe these prizes should encourage all our readers to participate! 11/2006 - elektor electronics 77 ELEKTOR SHOWCASE To book your showcase space contact Huson International Media Tel. 0044 (0) 1 932 564999 Fax 0044 (0) 1 932 564998 ATC SEMITEC LTD www. atcse m itec . co . u k 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. SATEtUAV 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) • USB 2.0 high speed mode • 8MB memory storage • Bus Analyzer function • Multiple waveform windows • Waveform save/restore m (5ATEIUAV 7^ C5 ATEtilAV to 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 DESIGN GATEWAY www.design-gateway.com Ethernet 10 .... US$115.00 • 8 bits embedded network microcontroller • 6 channels available for 10 bits ADC • Ethernet 10 BASET 10 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 VC100M14P Frequency range : 25-100 MHz Frequency setting : 100 kHz step for 25- 50 MHz : 200 kHz step for more than 50 MHz tSATEUJAV c ■ ■ * i T7TTT77 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 1 2 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 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.easysync.co.uk EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and RS485 converters at competitive prices. / ELNEC www.elnec.com - • device programmer manufacturer • selling through contracted distributors all over the world • universal and dedicated device programmers • excellent support and after sale support • free SW updates • reliable HW • once a months new SW release • three years warranty for most programmers 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 Tlrsl Technology Transfer 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. 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 78 elektor electronics - 11/2006 products and services directory 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. MODular ElecTRONics www.modetron.com • Plug and Program • FREE application s/w • Hobbyist ease-of-use • Professional finish with enclosure and LEXAN faceplate • We will design and brand your custom application • Growing range of PSU’s, i/o modules, displays and microcontrollers 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 - PCB design software, only £34.99 • Circuit Wizard - circuit, PCB and breadboard design software, only £59.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. 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 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 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 i Major credit cards taken online. SOURCEBOOST TECHNOLOGIES http://www.sourceboost.com Next generation C compiler and development products at highly affordable prices: • C, C++, and Basic compilers for PIC1 2, PIC1 6, PIC18 • Modern IDE, with PIC simulator, source level debugger and virtual devices. • RTOS for PICmicro. • PIC based controller and Development boards. • Download and try for Free from http://www.sourceboost.com SYTRONIC TECHNOLOGY LTD www.m2mtelemetry.com Supplier of wireless modules and accessories for remote monitoring M2M applications. •GSM/GPRS TCP/IP modules • Embedded GSM/GPRS modem • Development Kits • GPS modules • GSM/GPS antennas • Adapter cables Online ordering facilities. Tel (01 394) 210911 ULTRALEDS ( pi 1 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. 11/2006 - elektor electronics 79 C for AVR microcontrollers single user £ E-blocks AVR multiprogrammer £ E-blocks LED board £ E-blocks LCD board £ E-blocks Switch board £ Total value: f £ 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: 49! Flowcode student/home USB Multiprogrammer: Total value: C for ARM microcontrollers single user E-blocks ARM programmer E-blocks LED board E-blocks LCD board E-blocks Switch board Total value Flowcode professional USB Multiprogrammer E-blocks LED board E-blocks Switch board E-blocks LCD board Total value: a Extra: PIC16F877 microcontroller Flowcode Professional E-blocks LED board E-blocks Switch board 2 x E-blocks LCD board Free downloads available on www.elektor-electronics.co.uk/eblocks ! E-blocks AVR-Kit E-blocks Easy Internet Kit Special Offer Special Offer: E-blocks Starter Kit Basic Special Offer: Special Offer Special Offer E-blocks Easy CAN Kit For more information, visit f 5 1 X i 1 A ] E-blocks will be shipped after receipt of payment. Prices are exclusive of postage. 2 x E-block USB Multiprogrammer 2 x E-blocks CAN board 2 x PIC16F877 Total value: Special Offer: £ £ £ £ 154.60 67.00 21.00 428.50 £ 299. ^blocks lektor Order now using the Order Form in the Readers Services section in this issue. CD-ROM USB TOOLBOX This CD-ROM contains tech- nical data about the USB interface. It also includes a large collection of data sheets for specific USB components from a wide range of manu- facturers. 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. £18.95 (US$ 34.95) 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) 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) HOME &UTQN1W 0 * f jl S % ^DOMOT'QUE OOMOTtCA OOMOtiK Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Telephone +44 (0) 208 261 4509 Brentford TW8 9HH Fax +44 (0) 208 261 4447 United Kingdom 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. Mkbwiqnduhub’ Basics T LI) ISBN 0-905705-67-X 230 Pages £18.70 (US$ 33.70) Build your own Audio Valve Amplifiers To many people, the thermionic valve or electron tube is history. However, whether it is nostalgia, interest in the technical parameters, the appeal of a gleaming amplifier chassis with softly glowing valves or perhaps the firm conviction that the sound of a valve cannot be bettered, it is a fact that the valve is making a come-back. This book contains, apart from construction projects for preamplifiers, power ampli- fiers, and amplifiers for musical instruments, infor- mation on the operation of electron tubes, while the first chapter gives a short history of the valve. ISBN 0 905705 39 4 253 Pages £15.55 (US$31.00) 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) Build your own Audio Valve Amplifiers ISBN 0-905705-39-4 £15.55 (US$ 31.00) PC-Interfaces under Windows ISBN 0-905705-65-3 £25.95 (US$ 22.90) Handbook for sound technicians ISBN 0-905705-48-3 £ 20.75 (US$ 42.00) More information on www.elektor-electronics.co.uk lektor Order o www.elektor-el Order now using the Order Form in the Readers Services section in this issue. Elektor RFID-reader GameBoy Programmable Logic Controller (September 2006) (July/August 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 / $ 1 6.85 CD-ROM (all project software) 060132-81 £ 5.20 / $ 9.75 - Read and write 13.56 MHz RFID cards - MIFARE and ISO 14443-A compatible - Programmable GBPLC Module Ready-assembled and tested GBPLC Module and Programming Interface 050190-91 c 1 £ 84.95 / $ 1 59.95 Combined package GBPLC Module and I/O Extension £ 1 49.80 / $ 279.00 GBPLC l 2 C I/O Box Ready assembled and tested board 060098-91 £ 84.95 / $ 1 59.95 MORE READY-BUILT PROJECTS £ $ ClariTy 300-W Class-T Amplifier 030217-91 Amplifier board with SMDs pre-fitted; cores for LI & L2 34.50 55.70 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 01 0208-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. 360 NOVEMBER 2006 USB Stick with ARM and RS232 060006-1 PCB, bare 060006-41 AT91SAM7S64, programmed 060006-91 assembled & tested board 060006-81 CD-ROM, all project software NO. 359 OCTOBER 2006 PIC In-Circuit Debugger/Programmer 050348-1 PCB 050348-41 PIC16F877, programmed 050348-71 Kit, incl. PCB, controller, all parts GBECG - Gameboy ElectroCardioGraph 050280-91 PCB, ready built and tested ECG using a Sound Card 040479-1 PCB 040479-81 CD-ROM, all project software NO. 358 SEPTEMBER 2006 Elektor RFID Reader 060132-91 PCB, ready assembled & tested, with USB cable 41.50 77.95 5.20 9.75 17.90 33.75 34.50 64.95 55.20 103.95 5.20 9.75 5.20 9.75 11.00 20.75 27.60 51.95 79.90 149.95 5.20 9.75 030451-72 Standard back-lit LC display 060132-71 Matching enclosure 060132-81 CD-ROM, all project software Experimental RFID Reader 060221-11 Disk, all project software 060221-41 ATmegal 6, programmed DiSEqC Monitor 040398-1 1 Disk, PIC source & hex code 040398-41 PIC16F628A-20/P, programmed USB/DMX512 Converter 06001 2-1 1 Disk, all project software 060012-41 PIC16C745, programmed 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 5.20 9.75 6.90 12.95 NO. 356/357 JULY/AUGUST 2006 RC Servo Tester/Exerciser 040172-11 Disk, project software 040172-41 PIC1 6F84(A), programmed 040172-71 Kit, incl. PCB, controller, all parts LED Thermometer 030190-11 Disk, project software 030190-41 PIC16F873-20/SP, programmed Toothbrush Timer 050146-11 Disk, project software 050146-41 AT90S2313-10PC, programmed Easy Home Control 050233-11 Disk, project software 050233-41 PIC16F84, programmed Universal LCD Module 050259-11 Disk, project software 050259-41 AT90S2313, programmed 1-Wire Thermometer with LCD 060090-11 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 5.20 9.75 10.30 19.40 22.70 42.85 5.20 9.75 16.50 31.00 5.20 9.75 6.90 12.95 5.20 9.75 10.30 19.40 5.20 9.75 6.90 12.95 5.20 9.75 10.30 19.40 11.70 22.00 11.00 20.75 84.95 159.95 Elektor Electronics (Publishing) ^ j. Regus Brentford M M lie St t 1000 Great West Road ectronics.co.uk Due to practical constraints, final illustrations and specifications Brentford TW8 9HH United Kingdom Tel.: +44 (0) 208 261 4509 Fax: +44 (0) 208 261 4447 Email: sales@elektor-electronics.co.uk may differ from published designs. Prices subject to change. See www.elektor-electronics.co.uk for up to date information. PIC In-Circuit Debugger/Programmer (October 2006) Kit of parts including PCB, programmed controller and all components. 050348-71 £ 34.50 / $ 64.95 Kits & Modules RC Servo Tester / Exerciser (July/August 2006) Kit of parts including PCB, programmed controller and all components. 040259-71 £ 22.70 / $ 42.85 GameBoy ElectroCardioGraph (October 2006) PCB, ready built and tested 050280-91 £ 55.20 / $ 1 03.95 A 16 -bit Tom Thumb (February 2006) R8C Starter Kit comprising CD- ROM and R8C/13 microcontroller board with SIL pinheaders supplied separately. 050179-91 £ 8 , 30 /$ 15.60 GBPLC - I2C I/O Box 060098-1 PCB, bare 17.90 33.75 060098-91 Ready-built and tested board 84.95 159.95 Binary Clock 020390-1 1 disk, project software 5.20 9.75 020390-41 PIC6C54-04/P, programmed 8.05 15.10 No. 355 JUNE 2006 FM Stereo Test Transmitter 050268-1 PCB 11.70 22.00 Network Cable Analyser 050302-1 PCB 8.20 15.55 050302-1 1 Disk, PIC source code 5.20 9.75 050302-41 PIC1 6F874-20/P 16.90 31.85 NO. 354 MAY 2006 Onboard OBD-2 Analyser 0501 76-72 Kit of parts, incl. 0501 76-1 , 0501 76-2, 0501 76-42, all components, excl. LCD and Case 24.80 46.70 050176-73 LCD, 4x20 characters with backlight 28.80 54.50 050176-74 Case, Bopla Unimas 160 with Perspex cover and mounting plate 15.80 29.90 050176-42 ATmegal 6, programmed 10.30 19.45 050092-71 OBD-2 Analyser: Kit of parts without cable 52.50 96.95 050092-72 OBD-2 Analyser: DB9 to OBD adapter cable 27.55 51.95 Mini ATMega Board 0501 76-1 PCB, includes adapter PCB 0501 76-2 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 Brushless Motor Controller 050157-41 ST7MC1, programmed 3.80 7.15 A 16-bit Tom Thumb 050179-91 R8C Starter Kit 8.30 15.60 050179-C5 Set of 5 pcs. R8C13 microcontroller only 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 2x1 6 characters 7.25 13.65 030451 -73 PLED Module 2x1 6 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 2x1 6 characters 7.25 13.65 030451 -73 PLED Module 2x1 6 characters 25.50 48.05 Timer Switch for Washing Machine 050058-1 PCB 8.90 16.70 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 DDS Shortwave Receiver We present a general-coverage (150 kHz - 30 MHz) AM/FM/SSB receiver with some nifty features like a DDS chip for the VFO section and a DRM output for connection to your computer. The receiver is controlled by an 8-bit Atmel ARM micro. Other salient features of the receiver include 10-Hz resolution for fine tuning, an internal active antenna switch and three switchable bandwidths to match AM, FM, USB, LSB or DRM transmissions. WLAN Antennas in Practice Wireless networks 'rule' in most homes with two or more computers, and nobody seems to do cabling work anymore. The antennas on most off the shelf WLAN products are unsuitable for covering distances greater than a few metres, so our lab set out to test the claims for greater distances made for two 2.4-GHz directional antennas. You can read about the results in the December 2006 issue. Free 'e-TRIXX' Supplement The December 2006 issue comes with a free 24-page supplement stapled into the centre of the magazine: the e-TRIXX Collection. e-TRIXX stands for 'Elektor tricks (of the trade)'. Supplied by our in-house lab workers, e-TRIXX ore short articles describing small circuits that con be slapped together from cheap, off the shelf parts. To help you through the Christmas holidays we have compiled 20-odd of the best e-TRIXX items into a free booklet that can be taken out of the magazine for easy reference, or to give to a fellow enthusiast as a Christmas present. 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 Also... Spy Numbers Stations; Spread Spectrum for R/C Models; E-Blocks Flowcode v. 3 Review; Electronic Gadgets for Christmas; FPGA Course (7); Hexadoku. RESERVE YOUR COPY NOW! The December 2006 issue goes on sale on Thursday 16 November 2006 (UK distribution only). UK mainland subscribers will receive the magazine between 11 and 14 November 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 leading *•-»«! w y Please cut out or photocopy this form, com- plete details and hand to your newsagent. Elektor Electronics is published on the third Thursday 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. iietlv. ill 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 tm Pv Lsrrlr- km ■ . mm “ i 1 Irkf.iur ; •TOOT I M "ilOT WKi *r a m -Tb « ji-u jbu. i J j u- an* Him FWW p>. • r-i Hr-»« « ;■ < ,-uwmi hrh WCi-lii hPteUw IfAtH 'idri Pt* P< — HHH l- 'i L +■*“' H hi M -» ■ -« f— t- -)P ■»-# ‘•■11 1 1 •Ch'W -— i ■ l««M W M. - — I. — . U E SU.U 'w-jp* a. "a —I j Ifc ■-■an « jm i m ai * in Par H E :.-j L.ni |. . 1 *|Uarf £ **[£ I j J gl| 4 P 1 . 1 -! w* N» I. -w urn*** i-ii HrQ HMP lOTrf-* l ift In ■ .ft. j ■ a m nai t-.f» 1 » 1 1 f** ' " ■ja^lr*ll>Y' !<_-» Till. H£nl Pwrifr f*n*"arbin n rtn irllwitw 84 elektor electronics - 11/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 CD-ROM Home Automation £ 12.95 Visual Basic for Electronics Engineering Applications £ 27.50 Elektor RFID Reader £ 41.50 Matching enclosure £ 8.90 METHOD OF PAYMENT (see reverse before ticking as appropriate) □ □ □ □ Bank transfer Cheque (UK-resident customers ONLY) Giro transfer cunociue^i iWdtfBffard m 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 Expiry date: Verification code: SWITCH ONLY: Start date: Issue number: Please send this order form to * (see reverse for conditions) Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9 HH United Kingdom Address + Post code Tel. Email Date - - 2006 Signature EL1 1 Tel.: (+44) (0) 208 261 4509 Fax: (+44) (0) 208 261 4447 Internet: www.elektor-electronics.co.uk sales@elektor-electronics.co.uk *USA and Canada residents may (but are not obliged to) use $ prices, and send the order form to: Old Colony Sound Lab P.O. Box 876, Peterborough NH 03458-0876. Tel. (603) 924-6371, 924-6526, Fax: (603) 924-9467 Email: custserv@audioXpress.com Yes, I am taking out an annual subscription to Elektor Electronics and receive a free 1 W Luxeon LED Torchlight. I would like: I I 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 METHOD OF PAYMENT (see reverse before ticking as appropriate) □ □ □ □ Bank transfer Cheque (UK-resident customers ONLY) Giro transfer EUnDCAKD iV.jsiP/fjrri Expiry date: Verification code: SWITCH ONLY: Start date: Issue number: Address + Post code Please send this order form to Tel. Email Date - - 2006 Signature * cross out what is not applicable EL1 1 Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9 HH 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-1 52-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 lectronics ISBN 0-905705-68-8 476 pages £27.50 / US$ 51.50 Visual Basic for Electronics Engineering Applications This book is targeted towards those people that want to control exis- ting or home made hardware from their computer. After familiarizing yourself with Visual Basic, its development environment and the toolset it offers, items such as serial communications, printer ports, bitban- ging, ISA, USB and Ethernet interfacing and the remote control of test equipment over the GPIB bus are covered in great detail. Each topic is accompanied by clear, ready to run code. Where necessary, schema- tics are provided that will get your projects up to speed in no time. This book discusses tools like Debug to find hardware addresses, setting up remote communication using TCP/IP and UDP sockets, writing your own internet servers and even connecting your own block of hardware over USB or Ethernet and controlling it from Visual Basic. All examples are ready to compile using Visual Basic 5.0, 6.0, NET or 2005. Extensive coverage is given on the differences between what could be called Visual Basic Classic and Visual basic .NET / 2005. Vince-nT li 'nfw for Electronics Order now using the Order Form in the Readers Services section in this issue. 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 Index of Advertisers ATC Semitec Ltd, Showcase www.atcsemitec.co.uk 78 Audioxpress, Showcase www.audioxpress.com 79 Avit Research, Showcase www.avitresearch.co.uk 78 BAEC, Showcase http://baec.tripod.com 78 Beta Layout, Showcase www.pcb-pool.com 59, 78 Bitscope Designs www.bitscope.com 3 ByVac www.byvac.co.uk 55 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.eurocircuits.com 6 First Technology Transfer Ltd, Showcase .www.ftt.co.uk 78 Forest www.fored.co.uk 55 Future Technology Devices, Showcase . . .www.ftdichip.com 12, 13, 78 Futurlec, Showcase www.futurlec.com 78 FHeros Technology, Showcase www.herostechnology.co.uk 78 Jaycar Electronics www.jaycarelectronics.co.uk 2 JB Systems, Showcase www.modetron.com 79 JLB Electronics, Showcase www.jlbelectronics.com 78 KMK Technologies Ltd, Showcase www.kmk.com.hk 79 Labcenter www.labcenter.co.uk 88 Lichfield Electronics www.lichfieldelectronics.co.uk 59 London Electronics College, Showcase . .www.iec.org.uk 79 Microchip www.microchip.com 49 MQP Electronics, Showcase www.mgpelectronics.co.uk 79 New Wave Concepts, Showcase www.new-wave-concepts.com 79 Newbury Electronics www.newburyelectronics.co.uk 11 Number One Systems www.numberone.com 71 Nurve Networks www.xgamestation.com 11 PCB World, Showcase www.pcbworld.org.uk 79 Peak Electronic Design www.peakelec.co.uk 7 Pico www.picotech.com 71 Quasar Electronics www.guasarelectronics.com 74 Robot Electronics, Showcase www.robot-electronics.co.uk 79 Scantool www.ElmScan5.com/elektor 6 Showcase 78, 79 SK Pang Electronics, Showcase www.skpang.co.uk 79 SourceBoost Technologies, Showcase . . .www.sourceboost.com 79 Sytronic Technology Ltd, Showcase www.m2mtelemetry.com 79 Ultraleds, Showcase www.ultraleds.co.uk 79 USB Instruments, Showcase www.usb-instruments.com 79 Virtins Technology, Showcase www.virtins.com 79 Advertising space for the issue of 20 December 2006 may be reserved not later than 21 November 2006 with Huson International Media - Cambridge Flouse - 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. 11/2006 - elektor electronics 87 ISIS SCHEMATIC CAPTURE A powerful capture package tailored for todays engineer and designed to allow rapid entry of complex schematics for simulation and PCB Layout. r_ PHo 5 PICE MIXED MODE SIMULATOR A customised implementation of the industry standard Berkeley SPICE 3F5 engine with extensive optimisations and enhancements for true mixed mode simulation and circuit animation. VSM VIRTUAL SYSTEM MODELLING The worlds first and host schematic based microcontroller co-simulation software. Proteus VSM allows you to simulate the Interaction between software running on a microcontroller and any analog cr digital electronics connected to it. This streamlines the project lifecycle and obviates the need for expensive hardware analysis tools, iin ■■ 14 ii iii A modern and professional layout package which seamlessly integrates with the 1SI$ capture software. Features such as outplacement and auto routing, interactive DRC and an Intuitive Interface all serve to maximise productivity and reduce time to market, CONTACT US NOW ELECTRONIC DESIGN i t- : i," H i ■ J Si?' \ X ' JJU i 1 ! U LI J 1 a . i ' " . 1,1 * r ‘