9 ‘770268 451111 1 r i r j j. — 31 n m QQj 1 1 i EH 0 i i j nil i j (Qttt/jQT i | (A I L * * i 3 \ i ... wj M ftijn / 1 * I , [i r " r ' ? gjhl liJ M ihu INTELLIGENT ELECTRONICS START WITH MICROCHIP The Simple Way to Learn About Microchip Analogue Products and PIC® Microcontrollers bate: Location: 19th April Thames Valley 20th April 21st April tAandnesier Learn from the experts! Microchip is again offering engineers the chance to attend its exciting seminars in a location near you. Two seminars will be offered each day. The morning session is designed for those new to Microchip, the afternoon session is suited for those who are familiar with Microchip or who have attended the morning session. The morning embedded control design session will present a typical application: temperature sensing. It demonstrates how simply designers that are new to Microchip's products can add intelligence, an LCD display and simple connectivity using a PIC microcontroller and analogue devices from Microchip. Various easy-to-use development tools and starter kits will be used to demonstrate the concepts. The afternoon begins where the morning seminar left off. It provides more advanced training, showing how to incorporate the latest connectivity solutions such as USB. ZigBee " and Ethernet your embedded control designs by using high-end PIC microcontrollers. A free development kit will be presented to all attendees of each course, and there is even a discount for people attending both sessions! r Costs Morning beginners' session: £20.00 •irsc : udes PICK if’ i Flash Starter Kit i Afternoon advanced connectivity session: £60.00 (includes a PICDEM " HPC demonstration boarti.) Both sessions: £70.00- Save £10.00! (includes both development kits) Become an Expert the Easy Way Don’t miss the chance to develop your knowledge and skills. Register now at www.microchip.com/seminars Microchip jjyg. fiii pn-r^ ua-Ers ---"^rt; :- r a:ea srz s^b'ect. to cr-zrze The name ard fotjpr PiC. PJCmsfQ. dsPiCsrei WrLAE ate =' M-crochp Tscftnascgy ,r and Ffpk 8 S' 2 = £Eev i-c- 1 I M : j :-:r p logy Inc. m th3 US.-, a ' £ z:-s' ceemiries. ZigBee is 3 tr&fcawk oft re IrErrA dnce. AL zad marts arig : : = 2 ^ _ -:e 2015 V C'OCT a T 5 ■ ■ r:z A rese.-.ed VR'EEErp :2.£i l-c. fn the USA ar-d s‘-f perty Ol Joed respective Get Your FREE UK Pounds Sterling Priced Catalogue - all 4Q( Just fill out the catalogue request form at Lvmvjaycarelectro riles. co Check our website! I ■ All of our 6,00 0-E- products with search facilities. * 128-blt secure on-line ordering - safe & secure. * Over 3,500 product datasheets & application notes. * And we're from Australia, so you can trust us l - - J " Postage and Packing includes airmail to the UK. ^TTofG t H !0 ? vj.Vir.iajDarsSEiliun^-s.co-Ul I Radio Frequency identity (RFID) Triggered Relay Kit KC-5393 £26-25 -l- post and packing RFID systems can operate much like a conventional lock and key but wireless. The RFID tag' transmits a unique code when energised by the receiver's magnetic field As long as the tag has been pre-programmed into the receiver, access is granted This project provides a normally open and a normally dosed electrically switched output triggered by a tag. Kit includes circuit board, one JUST ONE OF OUR MANY GREAT PRE-BU1LT & TESTED CONSUMER PRODUCTS! Store Your Video Memories Forever XC-4a00 £41.75 Measures ! 3/1 6 (W) x 1 9/16 jc 3 /16(H) Measures 3 5/1&CW) x 2 5/3ZIH) x 1/16iT) Measures 13/16tOIa)x 1/1607” Dual 12V Battery Controller Kit KA-1702 £14.50 - post and packing This project connects an auxiliary battery in an SUV to the charging system when your engine is running, then disconnects it when switched off. This prevents your main vehicle battery from going flat. You can safely leave Inverters, fridges etc. running / overnight with no problems in the morning. { it can handle around 1GD amps of current at T2VDC. Kit indudes circuit board, a weatherproof diecast aluminum case, heavy - duty battery binding ports, electronic components, and clear English instructions. Get the Video Quality You Paid For With Our Doctor Video Kit (a > KC-5390 £29. OD £ post and packing Copy protection ts pot in place on videos and DVDs for a good reason, but this robs you of the true high quality reproduction that it Is capable of. Get the quality you paid for and strip out these annoying signals! It supports composite and S-video signals and can be configured for NTSC or PAL format. Kit includes case, circuit board, all electronic components, and clear English — instructions. Note: Some SMD soldering required. Caution: During signal condrrjonrng this unit removes \ J’ 1 ’"' - copyright protection. Piracy is a \G^4 ^^7 crime. & Jaycar Electronics lakes no W responsibility tor its potential for unlawful use. ' " post and packing Transfer all of your Beta max, VHS, and camcorder tapes to DVD using your computer s DVD writer. It includes powerful editing software to add colour and transitional effects, as well as sound tracks if desired. The box measures just 1 3/flOV) x 3 3/4 (HI X 9/1 G(D) and supports S-Video and composite inputs from ___ NTSC or L PAL sources. — — - ''ft. JArpivvix epi J Universal High Energy Ignition Kit KC-5247 £15.4Q - post and packing ? ^ Get better fuel efficiency and /gQ \ " performance from your carl It produces \T/[J a very intense 0,9ms spark which results in^ more complete fuel burning, lower emissions, and increased perfomiance. It works with points, twin points, and reluctor ignition systems. Kit supplied with weatherproof die cast aluminium case, circuit board, and all electronic components. ■ Works great on points ignition tie. older cars). Can be used on newer cars with Hall-effect sensor. We S OCk 3 Stage FM Transmitter Kit KJ-S75Q £5. SO t post and packing The circuit board may measure just 2”(U x 11/IGiWJ , but ft can transmit signals over half a mile in the open. It has flexible power requirements, with 6 to 12VDC input voltage (so a 9V battery would be suitable). It is quick to build, and fun to use. Kit supplied with circuit board, electronic components, and dear English instructions. Log on to www.jaycarelectronics.co.uk/catalogue for your FREE catalogue! 0800 032 7241 (Monday - Friday 09.00 to 17,30 GMT + 10 hours only) For those that want to write: 100 Silverwater Rd Sjfverwater NSW 2128 Sydney Australia Audio & Video Equipment & Accessories . T 1 < UMl rein ayu vi y.L h . j ? le ,UJi ’ f ) MI i m i . i 1 1 t — - 9 \ * ■ ■ J; J Jrfvj L ’j” — - t — ^ Alj —J .T, ,iv - u- : Y ■u r 1 D u£Ti i iTTi r i , +s s i ‘rTTi ' 7] 1 .& S '■ [ L^L-ilfey^ 1 ill j.J DrDAQ Output Temperature Microphone » Low cost - under £60 • Built in sensdrs for light, temperature and sound (level and waveforms) • Use DrDAQ to capture fast signals ® Outputs for control experiments • Supplied with both PicoScope (oscilloscope) and PicoLog (data logging) software External sensors: Humidity Temperatun 02 In Air Reed Switc i For more information on DrDAQ, please visit: \ www.picotech.com/drdaq1 16 Hoscopes Scope and spectrum analyser functions A fraction of the cost of benchtop scope Save multiple setups, for ease of use Save, print and e-mail your traces FREE technical support for life FREE software and upgrades / Automated measurements l jpes/e Virtual instrument For more information on our scopes, please visit: www.picotech.com/Scope256 Tel: 01480 396395 Fax: 01480 396296 E-mail: sales@picotech.com That's mIPS, not MIPS This issue has o focus on microcontroller technology which has been a major subject in Elekror Electronics for 20-odd years already, not forgetting, of course, test and measurement, audio, RF, power sup- plies and what have you. With so much of 'all the latest technology" being pushed on,, across [and eventually off) my desk all the time, it is good to take a deep breath at times and reflect a moment on where it all came from. In this very issue we present 'ARMee', our first 32-bit microcontroller development system and it is no coinci- dence that this beast is solidly based on □ pleihora of support tools, some free, some commercial, but always just a few dicks away. What a contrast with the SC/MP ('scamp': Computer sprawling across the grim looking pages of Elektor in ] 978, Youngsters will laugh their heads off: jokes about milli-instructlons per second (mIPs); programming an 8-bit micro bit-by-bit, yes that's flipping eight minia- ture rocker switches to, say, 0101 0] I \ in order to prepare one byte ■57' tor storage in memory, while also knowing what the associated opcode' like MOVX or similar gibberish is supposed to do. Error reports, FAQs r whad ye mean? No wonder older programmers are still able, beer in hand, day or night, to tell you the bit configuration far any hexadecimal word you care to throw at them. With today s explosion of computing power, it all looks like futile knowledge. And yet, I doubt if those readers back in 1978 diligently assembling and programming their SC/MPs 'the hard way got less tun and satisfaction from their project than anyone in the Internet age capable of pushing a few PC keyboard buttons and flashing a credit card. There is a microcontroller heritage and the investment of 27 years ago did not go to waste. Jan Suiting - Editor Icktor lectronics Subscrlpticr-ii V&f&JiMtfe Stibscftp&Qn E--. ge ild Gtci -e.e - z - ~ - it. T :e Wt ~ - arte : (■ + 44 ) ( 0 ) J S ED 103=57 :: — ■ 1 ro?. . r Rate mi terms are gN £-. ofi the S*=b stnffl&or* O nfer for Volume 31, Number 342. April 2005 iSSi . 0265 19 Elektor Electronics aims at inspiring people to master electronics at any personal level by presenting construction projects and spotting developments in electronics and infor- mation technology. B?*™? Ete&rttfks is orodiKad put&sfced i?/ Bekicr Bsatcscks (fWsftr-g), RO. Bax 190, Turbridgs - $ TN5 7WC E 1= ,: i —44) (0)1580 20Gc: 7 fec(-^44)(0)l5&0 20C6lo. Emi - - ~ - - s :: The majpzhs fe sgfafe f-cm r = boofehnps md efecfrixiferfita — - J -- ' ■ i _i i’ ed 1 1 tirnes a visir v*iih * doulsfe ee ue !Uv & Under ir^neirie Bdt*ur arid Etektmsr, the mas --- m §sd t>jidh T Together wfth frarsdfcsed -- t: r 51 3 Zrr,e pybesJveti vi trench. t: : : " e v ^ - i~-z ~ ~ i !■" : - ^ Haad Office .7&J9&-.AS Bgeic fre f iffthrerisrEEs ierr=r-. : , - - : Tcfeohera: CfTl} 46 4359444 fee -5 -- - ■ ■■ - Distribution: $*syfnOt£ nfc Street Lender W I P 2L — (0) UK Idverti sing Husnr -r:- = Hefe Ci dg z_ ■ : - - Tdq£re®« —44 (Q) 1-932 $&4997_ Fe> - . : : • ^ -7— E~c ^.a ±L:-r on International Advertising Ate ite 3 ?x 3 e . 1 : eJ 3 *s on r^z.z r. ; - : _ - - ■ 7 -7 I - International Editor '-‘e: ■ - -- Editor: =-'5_/i rT g : ; :: r - ---3 - international editorial staff: - e- figr:- — GG'Ge ■ ^ - 7 - — z~r. G-j> -z=z---Z’Z~ Design staff: ■ ^e Aii,-- - _ --';=e::--j "e_ Co-ssre.'-i --- - Editorial secretariat: Hec.vg HsS^ehs (seo^tlriaat I segr - entri Graphic design DTP: _ 2_ - - Ce Gee M anaging Director Publisher: “te_ E- ---^- Cop /right Ho lice Crcufation Control: '-'Er£- -’ Ct7t - EtE - '^” :"t D. , : j '\einer^d5 1 2Q95-e!;‘d0f rS=flTcnf(s 5 lectroriics <3 * t-m In the design stage for microcontroller circuits, pro- fessional and amateur designers often wrestle with the question of which microcontroller to use, since thousands of different types ore commercially avail- able. This article is intended to help guide you through the selection maze. Bored with PICs, AVRs and 8051s everyone else is doing? Last month we covered 32-bit ARM microcontrollers and the undeniable star From all the devices discussed in that article was the Philips LPC21Gx. This month the real thing is upon us: enter ARMee, an incredibly powerful ARM development board you can build and pro’ gram yourself. Informative Articles Regulars 12 MadetoMeosure Processing Power 5 Foreword & Colophon 42 Working with 32-bit Micros 8 Mailbox (Keil ARM review) 10 News: Mac Mini 44 Delphi For Electronic Engineers (4) 67 New Products 52 Super Lithium Batteries 78 Quizz'away 70 E-Online: Pick your Micro 82 Readers Services 72 New Road Toll Systems 84 Sneak Preview 77 retronics: Elektor SC/MP Computer (1978) 84 Index of Advertisers Volume 3 1 April 2005 no. 342 SIIH v .,-] a softie Ilium ion ■dargeabie ■I-rTERY hfHr-650Hf, ilfflSHlW ELECi.lic * - — r pana^oi Lithium tt j Recharge J BATT£ R , BAT >USHl''A EiF- If Mmosf every electronic circuit con- □Sns bipolar transistors, FETs or liodes. Most electronics hobbyists iave a supply of such components amoved from old circuit boards. A =$ter that can be used to sort out the 3ads and measure the characteristics j thus a handy tool. Modern mobile electronic gadgets demand ever more portable and powerful energy storage devices. Research by battery manu- facturers all over the world moves on apace; new developments supplant old technologies, and are themselves almost instantly superseded by even newer tech- nologies. The field is in a state of constant Flux with new surprises every day. Germany's sophisticated new network using GPS, GSM and infrared technology has only been up and running since the beginning of the year but the Department of Transport and UK Customs and Excise are watching closely and have announced their intention to introduce a similar sys- tern in the UK, Construction Projects 20 LPC210x 'ARMee' Development System (2) 34 SC Analyser 2005 50 Brachion Detector 60 Simple LiPo Battery Charger 68 start here: Spark Transmitter - Flashing Light with Dimmer - Rev Counter for Mopeds STOP PRESS... Does alcohol cause violent behaviour? Brachion Detector - page 50 mailbox — „ ^vaile^e'- .v/^oods of lwM *i «* r .,ee do"”*;- - cv«s 4* *g2**» t,» ^ • * n J£. co ° , bs i» eo" s * rudK ^_, nubW^ed m On to® re , . a( Aic\es azine u "' b e v ' eD Tpr& \oyoW ML? f B b(U ar V , to on Vi\e s °VF JJ cfesSSS- "ML efted,. * e W ter P^ ed ijSS^^^d^B ^ ^. ing ;\ab\ e ^ee QV ° % v br any ' nCt " ss^edW p u bVi5Her „ u i «-««-''• 21 1 liektors for sale (2) Further fo an item in Mailbox, February f 2005 r Mr Mike Pear- son kindly advised as “Fat flis complete collection or magazines has been sold. We congratulate Mike cn the sale and the buyer an obtaining a massive amount of information . We advise readers wishing to c da r the T s took of old m ago z Inez or cooks fo do so using Market- o i ace cn our webs ile . [Edi to r j anyone has under- taken any tests fo see what the difference in ERP is under these conditions. Maybe the effects on health would be less if the areas around high numbers or handsets were served with good reception, Martin Bushnell (UK) Interesting thoughts Marlin, lets hear what other readers hove to soy about the subject This discus- sion may be continued in the Forum on our website. Mobile telephone masts Dear Editor, here's an alierna- five rhought about the installa- tion of mobile telephone mosts near schools. As I understand it, the ERP (effec- tive radiated power] of □ handset is directly related to she signal reception quality. For example in □ poor signal area the output power of the handset increases and con- versely in a high signal strength area the output power is reduced. This is not just while a call is being made but all of the time that the network is handshaking'. This is why the battery runs down quicker when the hand- set Es located in poor recep- tion areas. That being the case and considering that any adverse effects on a Childs health is likely to be caused by the close proximity of the handset to the head, it might be worth considering that a mast dose to a school would cause the handsets within that area to be produc- ing less radiation. \ wonder if Copybif Killer Dear Jan — in an earlier instalment of Mailbox (can't remember which one exactly) I saw a reference fo the January 1996Copybit Inverter project, with an edito- rial remark saying Shot that particular design worked best. My Elekfor year volume CD- ROMs tell that since 1 996, two similar designs were published (In 1997 and 2002], so I wonder what your advice would be today, Frank Budde (Netherlands) The design from the June 2C02 issue has more potential than the previous ones and is new recom- mended. You may download the DASP 2002 article from our v. eh site. NiCd battery advantages (2} Dear Editor ■ — In your February 2005 edition Mr. Mark Vermeulen of the Netherlands has many favourable words about NiCd batteries for cordless tools and PC models, tn my country (Denmark) it is very hard to find cordless tools without NiMH batteries, as there is a high penalty fax on NiCd cells. Stack is kept for existing equipment, but the mainstream is NiMH, That goes for radio controlled airplanes and ship models too, whereas racing cor mod- ellers still seem ro want the 1 00-3- Amp capability of the NiCd cells far half a minute or so. The conclusion is that the battery manufacturers — under sufficient pressure — are able fo make reliable and long-lasting batteries and rather cheap too. Our discount chain stores sell 1 8-volt cordless drills for as little as 129 DKK, that is about £ 12 or 17 Euros. Paul Barge Pedersen (Denmark) Foil owing this interesting view- point from Pec Barge and in the interest at our environment t am again Inviting other readers tc join the discussion,, which may he continued In the Forum on our webs be. USB/I^C Interface (2) Dear Elektor — your 'USB/I 2 C Interface 1 , EE December 2004. employs the same USB controller (TU5B34 1 0) as the 'MultiPrcgrammer on U5B from the June 2004 issue. In the first article, the chip is connected to a 3.3-V supply, while o 5-V supply is used in the MultiProgrammer. Considering that an LC ver- sion of the EE PROM is used, and having seen the maxi- mum permissible values in the TU5B3410 datasheets [max. voltage an I/O pins - Vcc -r 0.3 V], I believe your design is flawed. Incidentally, I found that the EEPROM on the MultiProgrammer beard Is connected to 5 V. Rainer Bittendorf (Germany) Correct, but supplying the EEF- ROM from 5 V Is not a oroblem because the pull-up resistors will limit the current sufficiently. The same method is a iso see~ in e. j as In s i tu men ts ' app ica 1 1 c n n ores. VOX AC-30 query Dear Jan — I've recently pulled a VOX AC-30 tube amplifier schematic off the internet, and was wondering if someone could answer a question for me. All the AC- 30 amplifier schematics that t've come up with hove EL 84 tubes in the output position, however this particular schematic has EL34 s in the output position. Is this a mis- take, or has someone taken liberty to upgrade the schematic? Any help would be appreciated, thanks. Greg (by email) The VOX AC~ 30 amplifier is leg- endary' tor its unique sound. Tl is a collector's item and used by a surprising number of guitar play ■ ers young and old. fra m N. E/R.D to Col dp! ay and New Order. I m informed there are even DSP - 8 rkklQT tkdroTUH - 4/2005 Is [Access awoke? Dear Eleklor staff — I built the (Access system (February 2004, Ed.] but I've no idea what should happen when I switch if an? For example, how do I know the microcon- troller is actually running? Diefmar Terhorst (Project Engineer Electronics, OPEL Germany} • i r, „ autnor/ designer fixe Joostens replies: At power-on or after o r th s ji r rr ’> '■ ore pu II s PO. 2 (p in 57} o n thi s processo r !c w for aha y t 0. 1 second. This should happen even without an LC display mcd- UiS conneci^j. h o buzzer is connected to Bz I on the printed circuit hoard, you will hear a short beep since if is connected to F0.2. if you warn *o measure the level on F0.2 with a voltmeter without a buzzer being present, you need to connect a resistor or about 1 k between the 5-V supply voltage and FD.2 since port 0 of the proces- sor has no Internal pull-ups. it P0.2 does not go low tor a shod time after reset or power-on, there is likely to be a problem with C3 , C4. XI or id is not. or nor properly programmed with the firmware (IC1 might a/so be detective}. Be sure o mount crystal A j ocauf 0 . Omm above the printed circuit board to prevent its metal case touching the solder pads on the com- P ' s fit side, ii necessa ry r . using o n osc ; : Has cop e yo u m a y check th e p.i e^nce or tne clock signal on pin 1 S (X !AL2} of the controller, in the past, i noticed that the program Micro flash necessary to pro- gram me controller with the firmware does not always function prop- erty, Sometimes the controller gets partially programmed or even remains blank without any warning message from Microflash. If you use At rcro flash. / would recommend programming ihe con- troller again using the AlMEUSP software which is a much better program. You can download It here: hftp://wwwjtronk$- d es ign . b e/ do wnlca ds/a tm e lls a . zip Select ’he right COM port in the Parameter menu and DK7J0 ’ hr hardware compatibility, there info can be bund in the Atmel ISP help file. F'nally. I'd like to mention that if you used a 7ALS126 instead of o / -bC 1 2o or a Z4HCTJ 2o for (CIO, the controller m ay remain in a reset condition after power up. In that case f you won't be able to program the firmware either Please check the level at pin 9 (RESET) °l the controller, it should be lov, during normal operation. based VOX AC- 30 simulators but P e rs on ally p refer th e rea I th ingf Anyone able to help Greg? High- In d Preamp Dear Elektor — I have just started to gather components for the High-End Preamplifier [ found in the April 2004 issue. Unfortunately I om unable to find a mail-order supplier for the rectifier diode you state in ihe ports list Do you know of a source for the BY500, or failing that, on alternative? Wim Oldemans (Netherlands) With ihe availability of cur new website, this type or question is best asked in the Forum as other readers may have valuable infor- mation they 'would like to share on this topic . /Aeanw hile. you may use just about any diode re tea a- 100 ■' 3 A. tor example the ubiquitous < N54GS which happens fo have rhe same dimen- sions as the BY 500. Corruptions St Updates Genera! Readers ore advised that the quickest way to check for cor- rections /updates for a proj- ect they have built is now by way of aur svebsife at www. elekior-eEecironics.co.uk. In ihe Magazine section of the website, correcfions/updates will be included with other article information. You con find the article by month/year of pub- lication, title or production number. Cuk Converter January 2005, p. 26-32 030346-1 Customers having received o PCB no. 030346-1 from The PCBShop are advised not to commence construction of the board because it contains several design errors. The faulty board may be identi- fied by the absence of posi- tion C35 next to 1C 3. Customers affected by this error are kindly requested to send an email stating order and invoice number to sales@elektor- electranics.co.uk. Eurocircuits / The PCSShop currently hove the carreci PCB design file and will send a free replacement board to cus- tomers having reported to the above email address. MctllBox Terms - Pupation of reaasr '5 canescsr- dsrsse Is si the discretion of the Editor. - Viewpoints expressed by corres- pondents are nsi n&zssssf- . ^ 55 o' tii * Ed it c; cr Pud s n e - CcfrsspDr.cence may oc- trans arse zr 5Z-:ec J c- e~zm CMC, and 5 tv i 8 . - dren mr. , r,g Vv d: * ::r . r e- sponcance. pleas e quote Issue number - P ess c sen d your Ma:iB c x ccrre- spontiance to: £d - ~ ' ■ :■ _ - z : neezocn t . - : - Etsklor Electronics. The Editor, HO. Bey. Tunbridge ,ir 5 “’.5 TMf. Znz'.ar.d L : 20415 - c!4:I-:r cf-tlrc‘Jts news & new produ :ts Mac mini Wmzc Dlnl €D Wymi Dr. Thomas Scherer Apple has managed to slim down the Mac to make a fully-featured computer that fits in an incredibly small box. So what is this micro' [in the fullest sense of the word!) computer capable of? What can we use it for? At such an attractive price, this Mac OS X machine could easily win over even the most hardened PC user. Figure / . The Mac Mini ss en from ihe front A typical Apple, design: noth- ina to ses except an indicator tiqhi a dot for optical media, and the Aoais ioac. i k _ Msasurmg just 165 mm (w) by 165 mm (d) by 50 mm (hj — □bout the same size as a pile of five CD cases — and weighing tn at just 1 .3 kg, the Mac Mini might at first glance be mistaken far a plinth for a vase or perhaps a designer feed warmer. In real* ity it is actually a fully-fledged PC (and not much use as a food warmer: even under full load the Mac mini remains coal). In typi- cal use under partial load it is almost inaudible and in standby mode it is completely silent. All about it All ih e interfaces are broucht cut to the rear of the enclosure [Fig- ure 2), as is perhaps ralher less conveniently, the power switch. The row of slots forms the outlet vent for the ran, which draws in air from under the enclosure at the front, and at the left and right sides. The Mac Mini should therefore net be left on a soft surface, since this can block the air inlets. Not only is the enclosure aston- ishingly small it is also pleosing to look at and beautifully made. There are two main par is: an alu- minium frame around 4 mm thick with a white plastic lid and a base plate which carries all the innards of the machine including the connectors Figure 3]. The two parts are held together by a large number or plastic hooks attached to the base plate. which lock into recesses in the aluminium frame. Opening ihe case requires rather more than just a screwdriver, and Apple has certainly not designed the Mac Mini with the case-moddmq and homebrew fraternities in mind. The machine is dearly designed as c ready-iogo solution with a good on t-of-th e-box experience as the first priority. For the name user its idea! for downloading to your iPod or for use as a multime- dia workhorse ond it includes everything you need for these applications — and nothing more. Expansion and modifica- tions are intended to be done by the manufacturer; alternatively the machine can be ordered with the desired expansion options, such as extra RAM r a DVD writer, and integrated WLAN ana Bluetooth, already installed. Elektor Electronics readers need not be put oft, however: it's pas- sible to save a Few pounds by,, for example, expanding the RAM yourself. A spatula with a tine edge will open the case: more detailed instructions and advice on this can be found on the Internet, What lies within As you can see tram Figure 3 Apple is not in the business of selling fresh air. The design of this u I Ira-compact computer takes advantage of techniques used in the manufacture or notebook computers. The external power supply, which is oboui a quarter of the size of the Mac mini itself can deliver up to 85 W, although in normal office-style use measure- ments show the complete com- i p uter only takes less than 20 W. The centrifugal fan also helps make this a very quiet and green" computer. The CPU, mode by Freescaie Semiconduc- tor (formerly Motorola) plays a significant part in this too: under full load, iis typical power con- sumption is only 1 8 W. The dock rate of 1 ,25 GHz might seem rather modest in compari- son with the clack rates typically found on Intel processors, but It is deceptive: she processor has, tor example an unusually short pipeline, just seven stages long. Like the Pentium M series, this makes it particularly efficient when compared to current Pen- tium 4 devices with their 31- stage pipeline. The CPU also sports a scrolled 'Altivee 5IMD unit, which gives practically unparalleled performance in mul- timedia dare processing applica- tions. Further speed-ups are achieved using Quartz extreme a technology which moves as much as possible of the work involved m producing ihe graph- ical user interface into ihe graph- ics processor. In terms of raw processing power the system probably ranks at around 2.2 GHz to 2.8 GHz in AMD- style T4 equivalent units depending on the model chosen. Not the very peak or Technology but then the competition has nothing remotely comparable to offer in as small an enclosure. Also included is iLife a software package that includes several programs: iPhaio. far enhancing and organising images; iMovieHD for creating high-def- inition video dips; iDVD, for cre- ating and burning DVDs; GarageBand, an incredibly powerful teal tar creating and experimenting with music; and a free version of Junes, tor down- loading and managing music files in MP3 and AAC formats. Also included is Apple Works, an older pro gram for word process- ing, spreadsheet calculations and vector drawing. Whai else? It is amazing that Apple can sell the machine or the price they do. Indeed subtract the price of the operating system (£99] and the iLife multimedia package (£49) bath of which are included, and Apple is selling the 1 .25 GHz version of the hardware for only £191! At this price, the keyboard and mouse are not included and must be purchased separately. However, any keyboard ond mouse with USB connectors will do: you might prefer Ihe Apple keyboard over one you can buy elsewhere,, however as the Apple layout is slightly different. 10 fQ.tyJ clidf&SjfS ■ 4 ‘ i U U 0 -I Figure 2, The Mac MM seen from the war. From left to right: power switch and inlet, network socket modem socket DVH socket two USb 2.0 interfaces 6 -pin FireWire connector, 3.3 mm audio outout and iff i f ® an ov.j 1 stcf tor a tic. c h ing a Ke nsing tor lock . Figure 3 . Inside the Mac Mini At the top h the ultra- slim optical drive, behind which hides the 2. 5" hard disk. Ee'qw, to the left, port of the cen trifugal black. CPU fan con be seen. Above and to the right is the main memory: a standard FC27Q0 DDR DIMM with 1 84 pi r s No! only is the machine suitable for home otrice use, it makes o reliable and virus-bee surfing sta- tion: to date, viruses for OS X are almost unheard of. It could also form the heart of a quiet and stylish home enter to inmenf system, and already 'media cen- 're applications are popping up on the Internet. The machine is also suitable for use as a small all-round Internet server. Thanks to the underlyinq BSD kernel tap-quality implemen- tations of a the necessary pro- grams ana protocols are already in place, including Apache, SMB and so on,, allowing its use as a web, FTP. AFP or simple file server. Using 'Apple Remote Desktop (VNC) the machine con be administered without its mouse or keyboard. When com- pared with the rather larger mini- ITX systems based around the Via EPIA CPUs the Mac Mini offers mere comfort ond cower j and moreover is better value: and that's before you even con- sider the machine's looks. ni:c: wv.w.aoc : e.com Technical data and prices CrU jVI PC-7447, alias G4 PowerPC; 512 KB L2 cache: } . 25 GHz or 1.42 GHz RAA \ 2d 6 MB PC 2700 DDR; expandable to maximum 1 GB Drives DVD±R/CD RW combo or DVD+RW; 2.5 bora' disk, 40 GB or 80 GB Interfaces FireWire; 2 USB 2.0- modem: audio cut: DVI-l (digital and analogue via adaptor) Software 05 X 10.37; MacOS Classic; iUfe 05 package Miscellaneous external power supply; no keyboard or mouse supplied £339 for 1.25 GHz/40 GB; £399 hr 1 .42 GHz/80 GB; 4x DVD±RW £70 extra ■ VVJLAjN and Bluetooth £70 extra Figure 4. The male's cord seen from above. The RAM slot is along the top edge. Top left s toe connector for 'the optional WlAN and Bluetooth cord , whale on the right is the. ID t interface In the jb-efrem right earner is " e CPU waii the heatsink removed, fphpju courtesy mazre.-.s.ds) Figure 5. The mother bead seen from below. The large chip at the top is Apple- specific and does the same job as the north and south bridges in a Pa. On the tight is the ATI 9200 GPU , which has its own 32 ATS of dedi- catea graphics memory, (photo courtesy mac rews.de) l 1 4 2005 * slAfci e!=drc".>:s Mmom/m Proces Christian Tavernier A large proportion of modern electronic circuitry uses a microcontroller as a central element. In the design stage for such circuits, professional and amateur designers often wrestle with the question of which microcontroller to use, since thousands of different types are commercially available. This article is intended to help guide you through the selection maze. 12 =[=Ettf ms - 4 2D05 selecting the right microcontroller When the author of this article started studying microcon- trollers around 25 years ago, the answer to this question was rather simple. There were only two or three manufac- turers active in the field., and none of them offered more than two or three different types. Comparing the various types and determining which one best met your require- ments was thus easy (and considering the state of affairs at that time, it was actually more o question of which one had the fewest shortcomings). Nowadays we are overwhelmed by a Hoad of different types from dozens of manufacturers, all descended from various families that occasionally compete with ihe ir own stablemales. It's a hopeless task to try to directly compare the features of the various types of microcontrollers, since that would require poring through thousands of data sheets. You thus have to take a different approach, and the pur- pose of this article is to assist you in this by suggesting a few questions you should ask yourself. We also look at the answers you might expect to receive to these ques- tions and now to decide which microcontroller families have the best features for your specific application. How- ever, we don't wont to mislead you; we can't give you any magic formula for selecting the most suitable micro- controller, for the simple reason that it's not possible. In fact, oil types of microcontrollers can handle just about every sort of task, which Is what makes them so power- ful. It also means that what makes or breaks an applica- tion is not the pure performance figures of the microcon- troller, but instead how you use It. Survey According to a recent American user survey conducted among major developers of microcontroller-based appli- cations, the relative importance of the selection criteria can be rated as follows: - availability of development software: 67% - price: 51% - number of I/O pins and available internal peripherals: 40% - availability of developer kits: 35% - compatibility of the generated code: 27% You have probably noticed that this adds up to a goad deal more than 100%, but the survey allowed multiple responses. The responses also give a good picture of the problems posed by such o question and how difficult It is to identify a predominant criterion. Are you experienced? The first question you must ask yourself is whether you already hove any experience with a particular microcon- troller family. If you do, you should concentrate your fur- ther Interest on microcontrollers from that family unless you ore not particularly satisfied with it. The advantage of this approach is that you are already aware of ihe manufacturer's peculiarities', so you don'i have to again learn all the details of an instruction set, addressing modes, register names, how to handle inputs and out- puts, and so on. If you have also invested in various development tools, such as a development environment, a programmer and perhaps even an emulator, you will probably be able to continue using them (although an upgrade may be necessary). On the other hand, if you do not already hove any experi- ence with microcontrollers, you choice is completely open and you can use ihe selection criteria described below. Assembly language or high-level language? Although this question only involves the software, the answer is closely related to the selected hardware. Look- ing at it from the other direction, choosing a particular type of software can also result in selecting hardware that can work together with the software. This question was irrelevant a few years ago, since at that time the amount of program memory in microcon- trollers was so small that the only option was program- ming in assembly language, which is commonly but improperly called assembler'. If you program in a high- level language, you have to allow for ihe fact that your code will be translated Into assembly language by a compiler and that each line of code in a high-level lan- guage usually generates many lines of code in assembly language. This means that if you program in a high-level language, you need a microcontroller with a relatively large memory capacity. Alihough modern compilers have made enormous progress in optimising the generated code, they're still no match for 'handooded' assembly language, at least when the main activity of the code is manipulating bits in registers, as is typically the case for microcontroller appli- cations. Compilers for high-level languages have prob- lems dealing with such operations. For example, consider the instruction output_D ( i } j The purpose of this instruction is place the value of the 8- bit integer i on output port D of a microcontroller. On of the better C compilers for current PJCs translates this as follows: KQVL W 00 3SF 03,5 MOVWF 0 8 BCF 03.5 MGVF 20, W MOVWF 08 4 2C05 ■ efffSsior dsctienifs 13 Fiaure i AffhaL-qh At FLA 8 is free ir is a full-fledged development environment with an editor end assembler and it even includes a simulator Everything works fee eth er perfectly. i * o 1 1 zjism *= * ^ Fig ure 2. The FCWH development environment for its CCS C compiler for FiC microcontrollers Is also o good example of successful integration Figure 3. The well-known free wq re p rog r o m IcPrcz r (v-awj'c- p rcg.com j can he used to program various types of microcontrollers using er/ simple programmers. % - m □ £ * □ O ■ £ % ^ V Sj - p'^yyr -Ico* :::: . 5310: : : i = 2£S5 G5£4 anis salt qcqs esifi 1533 C51I 2G13 GDAl 3 GD 3 2013 3475 JJG 3 3FZ5 L UlIi 52 3 F Olifl 2315 C 1 1-3 !£G 1 2 S*C C323 3G17 DjTB -: : i 1 : ID 3 : 2-340: ::i : "DID: 2955: A3"H - EHrJ;; : dli GCAD GOBI irjT 1555 ll 13 ■HA1 GOSl 1513 OS 20 GE3F IE33 3601 □ B3 i 0QG5 2522 3113 31D3 HfC CiA! D5D = 2351 ■533 22QI CiAi I7£i 1713 IT 3 3 GJ5A 31 it 1 C 03 35 3Z 1021 135 3 33ir 23 1C 2 £ :■ 3 aizo cm 2315 0620 3 IOC 260 1 S 20 CCAl 1333 lT 35 3552 2 OLD 1351 3.50< 1333 07 G 2 3 IBS D ?A 0 3513 oats 1253 0156 C2A3 C52I 0500 L _AD 05AD 31(51 □ UL1 1203 1CJLC 3 tlf 0051 1233 74 -. . ,-i - 6 r , F .- *1 - , d -i -3*3 c < - U| e iu.l _ > d|>.e K . K* . i 7 .L.Yj.jd HDD: 37 FT FT 7 T 7 T iids: 77 it rf ff ff II IT FT FT 33 H 15 : 77 7 T 77 II FF ... JI [I n IT IT Dili 77 FT FI FF FT 0030 : ft FT FT FF FF - D 2 2 : 77 77 7 F FF FF 77 77 77 FF i’ 11 77 37 37 FF FF 11 33 FT 37 FF FI 11 rf if ii nyjjuj 73777717 iiiiiiiT 77177777 St 11 Jr J J J i 77777777 itrimr 11773777 I J ~7J IEO" ZzzOzfj- l* -.lit -x=: . 7 VC - 7 ?V^- r ifl=L- 7 tt>I0j r 2.3 — +rm \ y-tjj- 1 5 >.~£f I =*---- 3 o_- - * zr_ - i -' 7 -c l sr ' lorecmx PC t EF 25 - ; 1 t 1 ; A programmer coding in assembly language can do the same thing using only two instructions. In this particular (but realistic) example, using a compiler increases the memory requirement by o factor of ihree compared with using assembly language. If your application requires making calculations using digits after the decimal point or in scientific notation, or if it employs complex mathematical functions such as trigonometric formulas, using □ high-level language is practically unavoidable. Anyone who has ever com- puted a cosine in assembly language will doubtless agree with this! The choice of programming language thus depends pri- marily on the sort of calculations that are made in your application. If all the program has io do is manipulate inputs and outputs and make simple calculations, assem- bly language is the right choice. On the other hand, if the program has to perform numerous calculations or use complex mathematical functions, you should choose a high-level language. There is one exception to this rule: if you are experienced in using o high-level language, even though it may not be the mast suitable language far microcontroller applications, you will probably want to use it in order to avoid having to learn how to program in assembly language. However, you should bear in mind that this will unavoidably result in reduced processing power far your application. Before leaving the subject of the choice of software, we should note that with a few exceptions, fhe only high-level languages available for microcontrollers are Basic and C. Even after you've chosen a programming language, you still don't know which microcontroller family you should select. However, one thing is already certain: if you want to use a high-level language, you will need a relatively large amount of program memory. Development environment The development environment includes several programs ond interfaces, including: - a text editor for writing programs; - an assembler if you use assembly language, or a com* piler if you use a high-level language, although a com- piler is always accompanied by a matching assembler; - a simulator, 'which is a program that can be used to simulate the program for testing; - an emulator, which is a mix of hardware and software that can be used to test the program before It is pro- grammed into the actual application environment; - a programmer for programming fhe microcontroller with the program you have developed. Aside from fhe simulator and fhe emulator, which are optional, these element; are indispensable. Nowadays they ore often packaged into what is called an inte- grated development environment' (IDE). These programs, most of 'which run under Windows, make a polished impression with their many windows, and they allow you to quickly jump from the editor ro the assembler or com- piler, or even to the simulator or emulator if they are inte- grated info the package. The screen shots made for this article show some examples of fhe Microchip MPLAB environment and ihe PCWH development environment for the C compiler from CCS. With the exception oF the emulator and the programmer, which partially consist of hardware that you have to pay for, most of these tools consist entirely of software. Some microcontroller manufacturers use a handy commercial trick here: they make the programs available free of 14 dd.lor clctlrnrlo - 4/21135 Don't pogrom that pC, bo© load if! Nov/ that microcontrollers with o respectable amount or pro- gram memory are commercially ova liable, a new concept has become popular: the boot loader. A boot iaader is a very small program! that Is programmed into the lav/ or high memory cf the microcontroller tilted in ihe circuit ro be developed. This program can communicate with the development tools (used to write ihe program code) via a serial port or some other type of serial link, such as USB, \-C or a CAN bus. The boot leader program can interpret a certain number of commands related to reading,, programming and erasing the program memory of the associated microcontroller. The 'work- ing principle is basically fairly simple. When ihe program being developed is ready for testing, com- munication with the boat loader is initiated. The boot loader then leads ihe program code into ihe program memory of the microcontroller, thus avoiding the need to use an external pro- grammer. After this operation is completed the boot loader transfers conirol to ihe loaded program, and the user can then execute and tesl the loaded program. A new program can be loaded charge. That may seem strange, but the logical conse- quence of this way of doing business is that developers use these programs and are thus inclined to also use the microcontrollers from the same manufacturers. Although these programs are free, they are certainly not second-rate software. In fact, MPLAB Es one of the best programs the author is aware of. Beside the fact that this environment allows you io program in assembly lan- guage [it comes complete with an editor, assembler and simulator), it cooperates almost automatically with compil- ers and emulators from other manufacturers. They are so well integrated into the development environment that they seem to actually belong to it. This 'generosity' with regard development tools is limited to programming in assembly language. Practically all cur- rent makers of compilers for high-level languages charge money For iheir products. Fortunately, many compiler sup- pliers (for Basic and C) make available demo versions that are adequate for hobbyists and allow professionals to quickly test their products. The table accompanying this article lists alt of She devel- opment environments available from microcontroller man- ufacturers. You can download them and try them out without having to use an actual microcontroller. That gives you an opportunity to find out which of fhem are the most user-friendly. If you wish to [or must) use a high- level programming language, it's a goad idea to check whether there is an integrated compiler for that lan- guage, which further underscores the importance of demo versions. Finally, there's the programmer, since sooner or later you will naturally want to program your microcontroller. The current trend in this area is toward in-system programming (ISP) or in-circuit serial programming (ICSP) r These tech- niques allow ihe microcontroller to be programmed after it has been fitted to the circuit board, using a connection with only three or four leads. The required programmer is very simple, and suitable designs for various microcon- troller families have already been published in Elektor Electronic s. The availability, price and/or difficulty of building the programmer are thus factors you should take using the bent loader as often as necessary (after the previ- ous program has been erased). The speed gain obtained by using this method is a -actor of ten relative to the traditional method of programming,, which naturally has a positive effect an the entire development process. You have probably already realised that the microcontroller must meet a certain number cf requirements to allow a bool loader to be used. In particular, it must have: - sufficient program memory lo hold the boot loader in a adi- iion lo the program being developed. - internal support far erasing and programming the program memory, and - an RS232 aorr or other type of serial link, such as USB or CAN. If these requirements ore met, it is fairly easy to use a bool loader. There are presently numerous freeware programs available via the Internet for microcontroller families Inal sup- port boot loading. into account when selecting a microcontroller family. Another recent development is the 'boot leader'., which is certainly o handy too! in the development stage of a pro- gram. We have dedicated a separate inset to (his subject. However, boot loaders can only be used with microcon- trollers that can program their own pregram memory. Man- ufactures are slowly but surely employing this technique, but many of fhem have not yet dared to take this hurdle. In conclusion to this discussion of development tools, we can say ihat lor a hobbyist or small company that cannot afford to make a large investment, the availability of a simple programmer or one that can be built al a Sow cost, together with free development tools, will be the decisive factor in selecting the microcontroller family. Once again, we would like to point out that ihe accom- panying table can help you considerably in making your selection. 8, 16 or 32 bits? Microcontrollers just keep on growing with regard to pro- cessing posver. The 4-bit types have just about disap- peared from ihe market, and current microcontrollers can process 8-bit, ] 6-bit, or even 32-bit data. However, you shouldn't draw the conclusion that 32-btt types are neces- sarily the most powerful and you're archaic if you use an 8-bit microcontroller. In fact, if your program only controls a few inputs and outputs and doesn't use complex computations or large databases, an 8-bit type is a better choice than a ] o-bit or 32-bit model, Thai may sound illogical, but ihe follow- ing example can quickly show that it isn't. If your applica- tion uses a serial RS232 Sink, the data are treated as 8- bit words. That's because ASCII characters are transmit- ted via this link, and as you know, ASCII characters have a size of seven or eight bits (standard or extended set), A 32-brt microcontroller Es at o disadvantage in such a situ- ation, since it has to process the 8-bit data as 32-bit words, which means 24 bits have to be masked out. If you have to make mathematical or scientific calcula- tions in your application, a 16-bir or 32-biS mlcrocon- 4 2CDj - elektor rbrfrcnirs 15 5etec/icn tob ! e. This table lists the vari- ous families from me major manufac- turers. The 'Core column indicates the type of architecture cr processing unit that forms the basis of the microcon- troller The Free IDE column lists the names of the devel- opment environ- ments in at can be downloaded from the related manu- facturer sites. Manufacturer Internal Data bus Architecture Core Free IDE Anofog Ob ,ke wvtf.cn dog. rom 8 bits ADUCSxx GSC 8051 — 32 bits ADUOxx | RISC | ARM? — Atutel ViVtf.fftmtLrofTi 6 bits AT89xxx CISC 8051 indepo ideal progioms 8 bits T$B7m CISC independent programs G bits AYR RISC — AYR studio 16 bits AT9hxx RISC AM 7/9 — Gnus Lugk vrtv,rimis.cQ)\ resspcb.com ^3 LUebBrick Web-enabled Building Automation control unit ■ Process control device with 8 states machines Network interface & web browser configuration panels 'f 8 configurable trigger inputs 12 TTL digital inputs 8 TTL & O.C digital outputs ■ 1 Temperature sensor input 1 Rotary encoder input v 2 Analogue outputs v 1 Analogue input Go to: www.o2m8.com/elektor teSeHK he OSS Eraryj Ui ng cirern Proven technology Reliable /Robust User Configurable Python/PHP Scripts Web Browser Panels SMS Integration ! itel (Ef.ii-J - Jt; bcl hisEstni* C1M5 Ld 'JrC ID UlT tries? 5 srt*-'/ e RG7 S-h Telephone: 01189 30^33 Fax: 01189 30TS31 info@oZm8.com www.o2mB.com Servicing Your Complete Prototype Needs 0 Prototypes al a fraction of tits cost 1 - To-j"rg a^n seL-d ndu O Any COftlQiiT t - Fr4 7 35pm Oj £W=£3HM=Lr EUROCSRD Cl ?TH O industry sianfe/d ovaMy O Follow up ssrns was O CAJ.t GAD UKisuftirtg + Tooling + Photoplots + VAT £ 29.89* *SSerir»g,rate3 /ray vdy Tree = €49 *f^2 ixeu&ir 'Te, ssso 0 80°- 3 tie -4* ;r* xc=4, 1. rD-L: r.n- 1 : i T £L *3% fgfl -V. -j 5= .* r- : . l _ " t ■ 5.'-7ip// send your fiks ond erdtf OHUflt WWW. PCS - POOL. COM viiasr: or, fa Are you passionate about your Do you love building kit, and making things work? i Do you want to build a career, getting paid for doing what you i enjoy? Yes to all of these? Thera plug Into your potential * launch or upgrade your qualifications in Electronics, by studying at Derby BSc Electronics BSc Electrical & Electronic Engineering Also Foundation Year, and HNC/HND Electrical & Electronic Engineering ■ For people who love electronics, taught by people who y j/* love electronics ■ Part-time and full-time study modes available m Ideal both for the school leaver, and die mature learner ■ &isy upgrades from HNC co HND to BSc (Honours) ■ Final Year options give specialist training in current hoc topics, like digital signal processing, embedded systems, EMC, or power electronics For further details view http^Arenigaderbyac.uk/ and email or phone: Dr Amar Bousbaine, aJ>oiisbaine@derbyacuk tel: 0 1 332 59 1 760 Oft Tim Wilmshurst q-vrifmshurst@deihyac.uk tel: 01 332 59 1350, University of Derby, Kcdleston Road, Derby. DE22 I GB. UK pl u 9 ins WES university to your potential of DERBY ■ 1/2005 ■ efckloi dctlrojiits 19 byild aoiid program the MMee board Tony Dixon 20 cfritlor t!rftro:!£5 - 4/2005 Bored with PICs, AVRs and 8051s everyone else is doing? Last month we covered 32-bit ARM microcontrollers and the undeniable star from all the devices discussed in that article was the Philips LPC2 1 Ox. This month the real thing is upon us: enter ARMee, an incredibly powerful ARM development board you can build and program yourself. !k Over the years Elektor Electronics have published a number of microcontroller development boards and tills article is the latest in a long line of such articles. Vtfhat's different about this article and this design is that instead of being based on an 8 -bit device such as a PIC f 1). AVR |2] or 8061 [3) controller, this design will use a 32-bit ARM microcon- troller: the LFC210x from Philips Semi- conductors. This device has just about everything you could want from a micro- controller, see the ARMee & LPC21Qx Main Features' inset. However, we should also mention that it lacks any ADC interface and an external bus inter- face. But then the LPC210x is a true microcontroller and has no external bus interface to extend the memory capabil- ities using external Flash or SRAM chips, or add new peripherals. Hardware The circuit diagram of the develop- ment system is shown in Figure 1. The motherboard may be powered from a standard DC mains adapter capable of supplying between 9 V and 15 V DC. An adapter capable of supplying around 500 mA will be more than suf- ficient for powering the development system board and any other reason- able amount of hardware connected to the development board. On the processor daughterboard, volt- age regulators provide the various volt- ages required by the LPC21Gx: 1.8 V for its CPU core and 3.3 V for its peripher- als and I/O. The LPC210x micro has 5- V tolerant I/O and is capable of directly driving 5-V TTL logic. Like many modern processors the LPC210x provides a reset circuit inter- nally, so an external puli-up resistor is all that is required to finish the design. Pushbutton S2 is available to allow for manual resets to occur. RS232 serial communication is pro- vided at connector KB and the interface is built around ICl r a MAX3232 RS232 Transceiver chip providing two driver and two receiver circuits. Tne MAX3232 is powered from the 3.3- V supply and an on-board charge pump provides the - 12 V and -12 V needed by the RS232 interface. The board has the option of a second RS232 interface at connector K6 provided by the sec- ond RS232 driver and receiver circuits of IC1. Jumpers JP6 and JP7 should he fitted to the correct position to enable the second RS232 port, If two RS232 interfaces are not required then connector K6 can provide a Modbus pin-compatible R3485 inter- face. Tne RS4S5 interface is driven by 102, a MAX3G82 RS485 Transceiver chip from Maxim, which is also pow- ered from the 3.3-V supply Jumpers JP6 and JP7 should be fitted to the cor- rect position to enable the RS485 port instead of the second RS232 port. As already stated, the RS485 interface is Modbus pin-compatible. However, Modbus uses pin 5 of the 9 -way sub-D connector as a signal line while for RS232 pin 5 is connected to signal ground. To overcome this problem, jumper JP4 also needs ro be fitted cor- rectly to select either pin 5 as an RS485 signal or as RS232 signal ground. Connector K4 provides the option of linking a standard alphanumeric LCD to the system board. Tne LCD interface shares some the same LPC2l0x I/O pins with the 3 -way DIL switch. To use the LCD. every switch position of the DIL switch must be set to OS. A preset PI is used tcyadjust the LCD contrast. Tne LCD R/W signal pin b of K4 is tied to 0 V thus preventing a program to read back any data from the LCD. Therefore a program, should use a sim- ple delay to allow the LCD sufficient time to process its last command. Dig- ital I/O lines P0.22 and PG.23 control the LCD RS anti E signals respectively. If the LCD module has an inreoiated "W* - backlight it may be powered through current limiting resistor R22. An array of 16 LEDs (D1-D16) is cro- wded on the board. The LEDs are con- nected to the first 16 digital input / out- put (I/O) lines of the LPC21Gx and can be used to indicate status or monitor peripheral activity such as activity on the UARTs. LED D! is connected to 4 21) 05 - ek>L:i elstlfctia 21 ARMee & LPC210x Main Features LPC21 Ox (2104/2105/2106): - 1 6/32-bit ARM7TDMI-5 processor core - 128 kB program Flash memory - 1 6/32/64 kB SRAM data memory - ISP and IAP - digital I/O; 2 UARTs - SPI and DC interfaces - fimer capture and PWM outputs -JTA.G debugging interface ARMee Development System: - direct lineage with earlier Eiekfor Electronics development systems - detachable processor module available ready-stuffed with LPC2106 - LEDs far viewing port status - 8-way DJL switch for switch inputs - connector for linking to o standard alphanumeric LCD mod- ule - real-war Id connectivity via two 9-way sul>D connectors: 2 x RS232 ar I x RS232 and 1 x Modbus pin-compatible RS485 - DIN4 I 6 1 2 I/O expansion connector on motherboard - 160x100 mm Euro card - Free multi-platform GNU GCC C compilers - Wide selection of free and commercial ARM development software PG.GQ, LED D2 to R01 and so on. It should be noted that the LEDs also share the LPC210x I O pins with other functions such as the UARTG and UAETI. The LEDs are divided into two groups of 8. The first group, D1-D8 are enabled by juniper JP1 connecting them to 0 V and the second group D8-D16 are enabled by juniper JP2 again connect- ing them to 0 V. A n 8 - w ay D IL $\ v 1 1 c h , ST sh are s i he same LPC2l0x I/O pins as the LCD interface connector and should only be used if no LCD module is fitted to the system. You may use this switch for debugging purposes or use it as a con- figuration switch. On the motherboard a DIN41S12 A-C connector, K2 r is available for the con- nection of external circuitry to the development system. This connector carries the voltage supply rails -B V and —3.3 V. dock and reset signals and all 32 I/O sicrnals from the LPC2 iOx. ■p> Tne connector also carries signals for separate 1 2 C and SPI interfaces. It should be noted that on the LPC210x an I O pin may provide more than one function, in this case the I/O pm may be shared with the UAJRT I 2 C, SPI or other signals. It should also be noted that the on board LEDs. 8-way OIL switch and LCD connection also share I/O signals on the DIN41612 connector. Printed si rev it boards The PCS artwork for the motherboard and detachable processor board is shown in Figure 2. The processor daughterboard is avail- able ready-built as item 040444-91 (with LPC21Q6 fitted), or bare as item 040444-1; see Readers Services pages or ao to our Online Shoo. ■Si-p' wr Tne LPC210x is a 48-pm surface mount device (SLID) and will need to be sol- dered directly to the PCS. Tne bare PCB G 40444-1 comes pre -tinned. Posi- tion ICl carefully onto the SLID pads ; then using a fine tipped soldering iron, solder each corner of the IC. It you are happy with the IC's position then con- tinue and carefully solder the rest of the IC pins. Solder carefully, but don't worry If excess solder connects the T o o D o t 3 V-3 0 - [C3 LMS 3117AM. P-1.0 C; +1VS © © *— r ce ■ CA 23 Pj-VBQK ?3.E V:=n £3 =2.5.7' .2 5': 2-1 fTTCX 35 QSG 2“ P‘3,7 i = =L 4-5- POATXD1 * 7 F2.2SX25 20 PZ.22 12 Fj-33 35 r : 24 34 P 3. 1 2 3r F3.11 75 PD.12 57 35 F 3.25 35 42_ P-5 t3 41 £ ■4$ 1 17 DD2-1 UBDl-2 paa-s da rC 54 Fvi$CH M.fS F" EVIStJ Ffl.lE Fa^VOSJ rD,l7.TEi37 RTOf P0.1&TU* DBG FG.1FTCX =2,7.50 EL P2 23TDI F3&TKD1 ,C1 PjjJIftTO B3T P127 F 122 PS Si PZZkl r : 2= FG “TICES P0.1Q PS liWSW P3.t! F5.12 PS. 25 >JC FE.13 LPC210X FSJi Ffl.ISCL ic HC IC S 3 ;■ > f. XI TVS 15 C2 -it xi H H 21 C3 lEUHz VZ-P ’ T * r ■ ■""T F5.I4 -E PZ.il 45 r: it ?:■ i-.tr st IS P3.1E.7ki5- 1 PG iSTCK 2 s 7.1 Tm ! 3 £2 21.7213 £ F3T . a FD.27 5 P3-S3 12 F3 IP 32 HLuTXEO 14 f; t p.x 22 15 P2.2Z 15 F3-31 | " z. ?Z 2. SCL J X2 O o A2 t5V — © - 3 V3 — ica LM5B11 7AMP’ C4:444. 2 . it a Figure LGrcurr diagram of the ARfAee Development System, Note that the processor module is detachable! 22 cldhr elfdrodu ■ j/2&D5 pins. Using some fresh desolcier braid apply to each solder bridge and heat udth a soldering iron for a moment, allowing the braid to absorb the solder from the bridge. Once the bridge is removed carefully resoider with the Sue tipped soldering iron. The bare motherboard PCB is available ready-made from out Readers Services and online Shop as item no. 040444-2. When fitting components to the PCB, do observe the polarities of the diodes, the electrolytic capacitors and the LEDs. IC1 and IC3 on the motherboard can be fitted into sockets. With all components are fitted do one last visual inspection and compare the fruit of your efforts with our working proto- type shown in Figure 3 before apply- ing power to the board. Programming ¥&&§§ The LPC210x is easily programmed using the C programming language, A number of commercial C- Compilers are available for the ARM architecture ( see * 5 C J S -t!=har s!=rircnf« 23 web links). Those users who do nor want ro purchase a commercial C-com- piler can use the GNU G- Compiler. Tills is an open-source C -compiler that is considered by many as good as most of the commercial offerings. The down- side of using the GNU compiler is that you don't have the polished installation process of a commercial compiler. The LPC210x IC itself can be pro- grammed using the on-board J TAG or the internal Serial Boot Loader. The JTAG interface can be used for more than just programming the chip. It cam be used to debug a program during execution on LPC21Gx. To use the JTAG interface, a JTAG debugging interface module is required to connect between theLPC210x development system and a host PC. There are several low cost commercial JTAG interface modules available, as well as several non- com- mercial interpretations. These can he found though a simple search on the web, or by checking out the web links provided at the end of this article. If JTAG debugging is not required then Figure 2a . FCB design f or the Eurocard- size ARMee motherboard. COMPONENTS LIST ARMee motherboard Resistors: R1 “ 8-way lOkQ S1L array R2-RI7 - ^kn R18.R19.R20.R26..R27 - lOk.Q R21 - 1 kC5 R22 - 3311 R23 = 1 20 Q R24,R25 — see text FI = 1 OkD prase? Capacitors: C1-C5,C8,C9 = lOOnF C6 = lOOpF 25V, radial C 7 = 1 0 jjF 25V, radial Semiconductors: D1-D16,D18 = LED, Sow current 3mm D17 = 1N4007 SCI = MAX3232CFE 1C2 - 7805 IC3 = MAX3082CP Miscellaneous: JP1 JP2 JP3 JP5 = 2-way pinheadar v/ilh jumper JP4JP6 JP7 = 3-way pir.heoder with jumper K i = 20- way boxheader K2 = 2x3 2-way DIN416 I 2 AC connector K3 = mains adapter connector, PCS mount K4 - general purpose LCD module., 2x16 characters K5,K6 = 9-way sub-D socket (female), angled, PCB mount K7,K8 - 20-way SIL socket 5 1 = 8-way DIP switch 52 = pushbutton, PCB mount, e.g., DT56 Heatsink, Fischer SKI 04 25,, 4 STC FCB, order cade 040444-2 Disk, project software (LEDTesI), order code 040444-1 1 or Free Download 24 dikiuf s'fiticdcs - 4/2DD5 the LPC21Gx can be programmed using the built-in serial boot loader. This allows the 5 digital J O lines used by the JTAG interface to be used for something else. Serto/ leader To use tire serial hoot loader jumper JF3 needs to be fined. JP3 pulls PQ.14 to ground and releasing the LPC210x from reset forces the LPC21Gx to execute an internal serial boot loader program from the top 8 k of its Flash memory. Using a free PC program provided by Philips Semiconductor ( Figure 4) and a serial cable connected between a host PC and UARTO of the LPG21Gx (R3232 Port 1 on the ARMee board) allot vs the progrEmiming of the LPC210x to take place. Using ©MU <&€€ with ARM PF&tiessors “V'/hy do we want to use the GNU GCC compiler?" you may ask? Well for a start the tools by virtue of their begin- nings and the method of their commu- O O 0 o 0 © 1 v. .15 - clbilt'f 'S^lUcms 25 Figure 2b, FCB design for the detachable COMPONENTS LIST LPC2l0x daughterboard Capacitors: C1,QV,C5 = 1 OOnF, shape 0805 C2.C3 = 33pF. snaps 0805 C6.C7.C8 = IQpF 16 V. radial Semiconductors: 1C l - LFC210* (2104/2105/2106] IC2 * LMS81 17AMP-3.3 IC3 = LM$8 1 1 7AMP-I . 8 Miscellaneous: K1,K2 - 20-way SIL pinheader XT - 1 6MHz quariz crystal PC8 (bare), order code 040444-1 PCS (ready populated, with LPC2106) order code 040444-91 Figure 3, Our finished and tested prototype of the ARMee Development Score/. The processor module con be migrated to the to rg e t app / lea tic n ! 26 clekJor dfetron'ts - 4 MS nal user support they are essentially provided for free at the Free Software Foundation (FSF) web site. These tools are made available through the GNU project under the GNU general public license. Historically, the software from GNU /FSF was aimed at [he UNIX oper- ating system and GNU is short for "GNU's Not Unix 1 , while GCC is short for "GNU Compiler Collection', GNU GCC can be found of dozens of different hosr platforms from Linux, Microsoft Windows, UNIX and Solaris and many others. GNU GCC has been targeted to produce executables for many different microprocessor archi- tectures ranging from Intel/AMD x86, figure J. riash Downloader from Philips. Simple Input / Outpu Bus - SIOB The Simple Input / Ouipui Bus (SIOB) is about os sim pb as an expansion bus can be. 32 digital I/O signals are brought to a DINA 1 61 2 board connector and made available as an expansion port. The digital I/O lines may be either inputs or outputs dependant on ine type of expansion interface required. The programmer of the development board is responsible far configur- ing the data direction register of the microcontroller according to their digital I/O requirement. In addition to she digital I/O signals the SIOB also offers serial expansion in the form of a SPI and l?C interface. A small num- ber of SPI chip select signals are also present on the bus. The presence of the SPi and \ 2 C interfaces will allow the development system to be expanded in many ways. For example a system could be expanded with PC hosed Analogue to Digital (ADC) and Digital to Analogue [DAC] converters or SPI driven digital I/O. The bus is completed by the +5 V and +3.3 V power signals, dock signal, RESET and RESET One final note on ine 3IOB r ihe signal pins of the LP^210x are not only used for digital I/O but have other functions such as UART, PC SPI, PWM, Timer Captu re J 3 aG aeouggEng etc. Where a signal pm is used to soy drive a UARf interface it will no longer be available as a digital I/O signal and thus no longer be available for the SIOB. If o system requires the use of the DART, JTAG debugging ana LCD interfaces then there will be very few digital I/O signals available for ihe 5108. In such cases system expansion is best done through the PC or SPI interfaces available on the SIOB, Motorola 63x00. PowerPC, ABM 7 and ARM9w GNU GCC also covers several microcontroller architectures, some of these being TTs MSF430, Atmel’s AVR and Motorola's 68HC1 1. Another aood reason is buos. software w ■ bugs. The GNU tool chain gets updated regularly meaning any reported prob- lems are fixed relatively fast. Your next question might be "What's the downside of using GNU GCC?" Well, for a start it's the staggering range of hosts and targets available. You have to check if GCC is available for your host platform, next check if your target processor is available and finally decide if you want ro build (i.e., compile) the GCC yourself or want a pre -built binary. However, for the most part you will find the most common target architectures available for both. Win32 and Linux hosts as both source code and binaries. Rut one word of warning, don't expect to find a fancy -*=. Zjt z af v \ = 7’ii leill v : - : -=zZz±;L=.z. iwi - rZ ; i" y. c : li-IHir. iJ „■ Sj.- E : :Zm iIVi • • : -J ■ !j“s- 33= r ~ r 11 , l vF;r T- J. sr r Sana ikx nM fee ,-^-= iff -a r_=. F:i- '-TLT.-I -XT ! VwiFji -'-.u.t r jjBeWS - t — r jmrii: 3 v ■: -* a*-! v .j ^ , -i . | Ejj Liyij ^HJ GC. I - - J 71 IT Figure D. VIDE Programmer's Editor. 4* 2295 -5 Yu-:: dcflinnia 27 More ARM binufils. addr2lina ar gprof nlmconv nm ranfib readelf size strings strip Converts addresses into filenames and line numbers. Archiving utility (creating, modifying and extracting from orchivss) Displays profiling information* Converts object code into an NLM. Lists symbols from object files. Generates an index to the contents of an archive. Displays information from any ELF format object file. Lists the section sizes of an object or archive file. Lists printable strings from files. Discards symbols. installation program or an Integrated Development Environment (IDE) — this is "storm trooper' DIY develop- ment. If you want a fancy installer and IDE check out one of the companies that offer ore -configured, ready to go versions of the GNU tools., GNU-X tools from i.licro cross and GMUPro from Red- hat axe two examples of commercial GNU toots, If you wanted to build your own bina- ries then download them from the FSF/G-NU web site and follow the insrructions provided on the site. How- ever, we will rake one of the many pre- built binaries and use if to compile our C code with. For our example we will use the GNU GCC version 3,4 Win32 pre-built bina- ries from www. gnuarm . com. You can select the Linux host if you wish. Other pre-buiit binaries are available on the web, Google a search with [GNTJJ, [ARM] and [binaries] and see how Commercial offerings If you are happy to provide a few personal derails to Keil you can freely down- load their uVision IDE and a pre-built copy of GNU tools. These tools are unre- slrlcted for generating code wish the only limitation [at this time] is that the debug- ger is limited to 16 k program size. Tihe Keil tools are based around their u Vision 3 IDE the screendump shows the IDE configured for GNU GCC. Redhot and Microcross provide pre-built GNU tool chains for your chosen target and host platform. Rowley Associates also provide □ commercial development environment based on the GNU tool chain but using their own libraries and IDE. - 1 T1 - £ ^ y Q 3 M •« - <3 - ^ jO; ! l > M\ many hits you get. So let's download the binaries from GNUARM and install them on our PC. GNU C Compiler Go to the GNUARlv! sub -directory you installed, look down the list of pro- gram files and you will see a program called arm-eli-gcc.exe. Similarly, if you v. y ere using a microprocessor based on the SH3 architecture you would expect to find sh 3- elfs-gcc . exe in the sub- directory. Now, arm-el f-gcc is a GNU GCC com- piler targeted for the ARM architecture using the Extended Linker Format (ELF \ object file format. If you were using the Common Object File Format (CGFT) you would rind aim-cofi-ucc.exe. ELF and COFF are two different formats of file structure that the GCC can save the compiler object output to. Our first task is to make sure the GCC compiler has been correctly installed. A quick test is to display the version message from the GCC compiler. Open a Command Window or MS-DOS win- dow and type the command arm-elf- gcc -v. If you don't see the GCC ver- sion message, then you most likely need to add the GCC directory to our environment path. Tb use the compiler, open a DOS win- dow and type arm- elf - gc c -c le dt st . c The actual prooxam is found in the >ii w “LEDTest - an example' inset. An archive file containing the assembly code, linker and compiler result hies is available as a free download vrith this article (040444-11). The GCC compiler has a raft of options we can invoke, too many to list in this article! Some of the main command line options are: -c for compile only and do not link the object file: -Wall to enable every warning and error conditions the compiler will produce; -o filename to change the hie name of the object file produced; -S to produce an assembly listing interspaced with me original C code: -g to include debugging information* The command aim-elf-gcc -Wall ledtst.c -o ledtst Configuring Keil uVtsion IDE for GNU GCC will faithfully compile leek si. c with all compiler warnings enabled and pro- 28 either dctfr&nTnN 2C-05 cioce an object file called ledtst.o . When we invoke GGC compiler, it nor- mally does the preprocessing, compi- lation . assembly and linking. However we can tel] the compiler not to link any of the object files by using -c option. Where this is done we can use the GNU linker to combine our object files into a single output file. GNU Linker The object files produced during the compilation stage are by themselves incomplete. We still need to resolve internal variables and function refer- ences for the object files and this is where the linker comes in. The linker’s job is to combine the object files and resolve any unresolved symbols and function references. The command line GNU link er Id (or aim-eli-ld) takes the names of the object files to be linked together as arguments, as well as any options and outputs a single relocatable object tile. If we had several files to compile and link we might type: arm-elf-gcc -c module! .c arm-elf-gcc -c modules. c arm-elf-gcc -c modules. c arm-elf- Id module l.o modules. o mod- ules. o -o prog! There are no memory addresses assigned to the code and data sections in the relocatable object file. To do this we need a locator program that will assign physical memory addresses to each code and data sections. The GNU linker has a built-in locator function that can locate the cede and data sec- tions of the program to specific areas of memory, which results in an absolutely located binary image. We can now download this binary' image to our development system. The GNU linker includes a scripting language that can be used to conirol the linking process and the exact order of the code and data sections within the relocatable program. We can also assign memory address to the code and data sections. We call a script file by using the command line option -T followed by the name of the script file, for example: arm-elf-id -Tipc2l06-rom,ld GNU Make The make file is used to mechanise the compilation process. In essence, the make utility folio tvs a user defined set of rules and these rules are processed in sequence. For instance, instead of typing the four command lines for the linker example shown previously we would type and save these commands into separate text file makefile or another suitable filename. To compile this example we would type: make makefile The Make utility will determine what source code files have changed since the last time is was run and will only compile those changed files. You may also include conditional compilation choices by making use of makes pre- processor functions. De£>U00mgf The GNU GCC tool chain also comes with a command line debugging tool called GDB, GNU GDB is one of those tools whose operation and large number of options could fill an entire book, let alone a sin- gle article. We do not intend to use GDB with the ARMee Development Board, instead you will be using the Flash downloader provided Philips [Figure 4), Therefore, for this article we skim over most of GDB functionality but those readers wanting more infor- mation on GNU GDB are referred to the web where lurks Bill Gatlin's excellent introduction. In essence GDB is a source debugger. It is connected to a target board through a serial connection where It communicates and interacts with a monitor type program on the target board. To launch GDB type: arm-elf- gdb Iedtst Once G-DB is running you will be work- ing within the G-DB console where the debugging commands will be typed. Next, you can load your program 10 the target board by using the command (gdb} load Once loaded, you can step through your source code, set break points, investigate what functions were called to get to the current source line or use one of the other debugging options GDB offers. ©s?laer Pools The GNU tool chain also includes a number of other tools, the bin utils, which we can us during our develop- ment. Two of the most useful tools are objeopy and oh j dump. The objeopy (or a im-elf-objcopy) utility is used to translate object files from one format to another format. For example, we can translate a file from binary image into s- re cord format. arm- elf- objeopy -O srec ledtst.o ledtst.slO while the obi dump (or ar m-elf-obj- dump) utility can be used to disassem- bly the object files. With the disassem- bled file you can see where the linker has located the various text, data and bss sections of our object file. arm- elf- ob j do mp . — disas s em b 1 e ledtst.o You may also add source code to the Sfart-up file To use our compiled C program we first need fa initialise ins processors siack pointers and memory settings. A separate object tile called the start up file usually does this. Typically a siart up file will be called startup. s. boat s or crtO.s. The siarl up file is linked to the rest of the compiled object files during the program, linking stage. Check the example files from the LPC2000 group on Yahoo for trlO.s or boohs, which are typical examples of ARM start up files. The start up code must provide the following: 1 . Disable all interrupts. 2. Copy initialised variables from ROM to RAM. 3. Zero uninitialised data variables. 4. Allocate space far and initialise stack area. 5. Initialise the stack, 6. Create and initialise the heap area, 7. Enable interrupts, 8. Jump to main (j. ' 05 ■ ekMor slsifionks 29 disassembled output by adding ihe option -S to the command line, li you want to view the symbol table of our object file, simply include i he — syms option to the command line. Some of the GNU other binut ils are listed in Table 1. me L DTest - an example using the ARMee hoard In ihe embedded development community me first program you usually write with a new compiler or target platform is a LED-ftashing program. This is as ubiquitous as the hello world program is for PC development and we will be no different. Our example program will consist of a C program that will Hash one rhe LEDs an the ARMee development board. See Listing 1 1 Include the Philips ARM LPC2100 C header file. ARM start up file [bool.o] and GCC linker script (Ipc2 106-romJd) in the same directory as our LED test program. Pram the command line prompt, type the Following GCC commands: V F h en ins t aile d , G MU doe sn t pro vi d e us with any form of integrated devel- opment environment (IDE). To resolve this we could install VIDE Figure 5), one of the more popular IDEs that can be used with the GNU tool chain. VIDE provides us with a pro examiners text editor and a GUI for running the GNU tools. Other IDEs, both free and commercial, are available for us to use with our GNU tools. Do a search of the web to see what s out there, or use the Forum on our website to get in touch with fellow ART, I twisters. arm-elf-gcc -c. ledbtc arm-eif-ld -T!pc2 \ 06-rom.ld -noaiartfiles, -nasldlib -s o led baot.o Sedhi.o □ rm-elF-objcopy — oulpur-target ihex lest teshhex We should now have □ compiled and linked hex file ready For sending to ihe ARMee Development board. To save retyping ihe GCC commands, we could type Ihe above GCC commands into a text editor and save them as a batch file ledtst.bat or create a Makefile. Finally, instead of using the GDB debugging tool included with GNU GCC we will op ro use the simple Flash download provided by Philips Semiconductor, Figure 4. Select the Filename of our LED hex file and upload to ihe target board. Once uploaded, press reset on the ARMee heard and LED D I should start to flash. Congratulations! You've have successfully comp Led linked and uploaded our test program using the GNU GCC compiler and tools. ¥ include _?C2 I GO .h r ' References: 1 . FiCee Development System, Elekror Electronics February 2003. 2 . AV Rss D S' v e a pmerk System E I e k E a r Electronics March 2003. 2. 09$ 62 5 2 Flash Microcontra her Bccrc. cieMor Electronics December 2001. For further reading ) . Programming Embedded Systems in C anc C++, Michael Ball' O Reiliy (wv, vcoreCy.tomf 2. An In trad uc lion te GCC Brian J. Gough foreword by Richard M. Stallman; pdf copy ar http :j / ww. n erw o r k- theory.co.uk , gec 'intro void Delay [unsigned long a ) { while (— a 1=0); } inc "air. [void) { r * System I nit T ■ /* I nit PL L */ SCB_PLLCFG = 0x23; £CB_?LLF EED = OxAA? SCBPLLFEED = 0x55; SCB PEECOli = 0x0 1 ; /* Enable ?LL */ SCE FLLFE ZD = QxAA; ECE ELLFEED = 0x55; Websites: a .'. w. geccisies.com , ■ to n y a i xo n 2 k 1 index, htmr i ARM.ee support website) wwv/.g nu.org [Mia in GNU web site) ■.vww.faf.org (Free Software Foundolion web sliej ■ts^vw, gn trarm.com (GNU Binaries ter ARM processors) http:/ / groups.yohoo. cam/ group/ !pc200 0/ (Philips LPC2000 ARM Discussion Group) h rf p : / / g ro u ps .yahcQ.com/gro u p gnuarrr. / {GNU ARM Discussion Group) '.v.-/ . o h] sc ic e ni ro I xo m / vide.htm ( V 1 D E Windows IDE) www.bi lgolHff.com (Exce lent GNU tutorials by Bill GatlifF) http: / , '.v ■*■/ w. dfeamislife.com/arm / (LFC2 ' 06 tutorials by Sew) ►■Avw keil.cGm |GNU GCC and Comm ere -a 1 C-Cc mp i lers] wv,- w-_rovdey_co.uk (GNU GCC and Commercial C-Com oilers) v/ww.red hat.co.uk (Commercial GNU GCC tad chains) VAvv/.micrceross. co.uk (Commercial GNU while { l i ECS Plj_S TAT L PL0CK ) ); /* Wait for ELI ro lock * 5C3 FLLC0U - 0x03 ; T Connect BIT. ae clock source * / SCH PLLFEED = QxAA; 3CB PLLFEED = 0x55 ; T Irtec MAJt 5 Flash re" cry MAKJ-DtflCR*0x2 ; >*A3!j:AMTIH-0x4; 5CB_VPBDIV=Qxl; /* loft GPIO 1 / GPIGI0DXR = 0x0000 00 001; G?1Q_I0SET |= 0x000000 QI; recch T t f 2,ash ~ T FCLK = GCIiK T /* FO.O as output */ T LED off T / M main loop T . while (I) { GDIO_TOSET |= OxQQOOOOQl; T LED off Delay ( 100QGG0 » ; G?TO_IOCLK |= 0x00000001; /* LED on */ Delay ( 2000000); 30 diki&rdHtjeniad 2 C 0 S Parallax BASIC Stamps - still the easy way to get your project up and running! Serial Alphanumeric and Graphic Displays, Mini-Terminals and Bezel kits Animated Head 3-Axis Machine . Six- Legged Walkers Robotic Arms Bipeds Robotic models for both the beginner and the advanced hobbyist Servo Drivers Motor Drivers On-Screen Displays | : DMX Protocol U/Sound Ranging "| Animatronics and Specialist Interface-Control Modules Quadra vox - — -- i. l ». ■ ■ mmm ■; - i _ Sen sop/1 nc Parallax fech-lcols BASICMicro MP3 & Speech Systems 'Voice Recognition U bicam Tool Kits PIC & Rom Emulators PIC BASIC Compilers Development Tools Milford Instruments Limited Tel 01977 683665, Fax 01977 681465, sales@milinst.com GIANT 10" 7 SEGMENT DISPLAYS IC's -TRANSISTORS - DIODES A fcuS purchase ena Wes us to - bong to you biiese GA.\ _ iegrersc'cs dspays s£a nowBflbnialy'fe tree ' fe 1 0' ' character s ate .:•• , -as t = rssd- sfrEty catena tSstences aid erisfcfes □ host ef appfea- zers rc-org set -re- boards a gltei docks, coun- ters, fivenl timers ctz At tne te -ere a s mi is z-zveo srd Cv-crara 12 \ IC iiT-.s ?Atezr,'ng .vs sv.bjtss ra*?^. PC cr PC may be usee to ccrjbr 5t'C-5 :r my\zm ogte L vi te= ra r i^cra Zere Fewisr tetrrer, ^tech areacy sroTtes c=5 -c- rtr s- excel 'ant DIY practical article irr tee Vs. tesue cf "Everyday & Practical Electronics' magazine Idea. 1 Schoci Co i-ege ecu- steuzticn project Sczofed n gac R-- ccrdutr ccrrp'ee ush dma f'AA'. Less th an. 30 ; '; Only £29.95 5 or 4/ £99.00 o. of maStors pnee ! erta FT, MW cMerFHffi THE AMAZING TELEBOX TV SOUND & VIDEO TUNER CABLE COMPATIBLE ' VIDEO MONITORS State of the an PAL UK s:mz URF TV tuner module With composite IV pp video & NICAM hi n stereo sound rate. Micro electronics a i on one sms': I FCB ody 73 x rrm rzl 5 te t_ _ zz cetera ' - 5 = simple 3 wire link te pc i\z-= z,z — z_te r . £-ii=p e= zc — z ete witz simple working program and documentation. Reqi. raz - 12V * + SY DC to pp^ratSL ERA NO NEW - Order a s M YQQ , On /y £39,95 cc rt~ |3,i St9 '.u.'rV/. d.d t-te. cq . uK da Ea_m yWJ. h rm for picture + /lt/j 1 derails HARD DISK DRIVES TA” - 2 : TOSHIBA V<-i:2VAi J V3b aztzz 12.5 mm - Nzw £59.95 2 ft* TOSH IBA MK42L3 MAT 4.3Gb laptop {B.2 rrjn H) Nn W £1 05.00 2 V TOSHIBA .VKS4CSMAV 5 ‘Gb =p;p-p '2 7 mm - 7/e.y £96,00 2ft" TOS H I BA V K1 81 ser £P O A Raca 1 1 C R4 0 z _ a 4Q channel vtsw? race -de r avstem £37 5 Q Rskera 4 5 KVA 3 ph Cn J~c UPS - Nsa z andrcc E45Q0 Emerson AP 1 30 2 5KVA Lnducbiat speciUPS £1493 Mann Tally MT645 H.gh speed z s pr w £2200 Inlel SBC 4SEH335E :.s4B5 system SMcRsm £945 £19 50 £1150 £1450 E 1 2 5 0 ALL £FOA £550 HPED30AG2.:: 7 CC z 17 Amps Intel SBC 4S5 125C0B Ernsnzed Nikon HFXrtl . Ec~ zzzii PHEUP3 PM 55 IB pro. Tv Motorola VME B .-C E z'snis Trio 0-:5 .77 Freer Fujitsu M2041R 600 LPM V" £1950 firfftsu !*12Q41D 600 LPJ H ? prin ra r with ne?Awk inisif ace £ 1 2 50 Siemens K440O 64Kb to 14tH.lb denant snalyser £29=0 Perkin Elmer 2330 Intmied spectrophotzsrneter £500 Po rk I n E I m □ r 5 9 7 r.Aareq = pectnz p z z tz mete r £3 50 0 VG ElDctno nics 1035 TELETEXT De-zco ~ z V=rg - Meter £3250 Ugh fSand 60 output high ^p-zc 2n mck mount VxJ c-o V D A‘s £495 Sekonic SD 150K 18 idler - -3 z z ':g Hybrid chart r&conte r £1995 B^K 2533 M ■croph'Wis era amp £200 Taylor Hobscn Ts .suffsrrptilis: r&ca-Asr £750 ADC SS200 Ca conffknude gas dsLSJ'zr J monitor £1450 SBC A/,120 73 P P M ? ( tetsr (Ernes 1 Turner) -+■ drive e'etben'es £ 75 AJfRlTSU 9654A GzLze GC-2.sG-b vic’vefcrm rn-enltcr £56=0 AR RFTS U ML93A c z 1 : z dz ,ve - it clc r £990 ARRITSU f Ore opts characteosbo test sz-1 EPOA Rd5 FTUZ rkJ u nrt £650 R5S SBUF-E1 Vision nriKMator £775 WILTRON 6530 B m 2 - 22 G Hz R - s-v ss p ge ns t sloe £ 57 50 TEK 2445 1 50 MHz 4 trace cscStescops £1250 TEK 2485 3Q0 Mhz 300 MHz csaldsmpe ret* rawall £ 1 9 5 5 TEK TDS350 400M nz d.grte ! reejtLme * disk dir.e. FFT etz £2300 TEKTD3524AE:: i .'zz z zte tePL-a - z:z z_-c zz aveiz E510D H P3 595 A Opt 907 20Hz to 40 M nz spetdium analyser £39 5 Q PHILIPS PW1730 10 £0KV XftAY zazetete- S accesscr-ES £PDA VARLACS - Larop range from stack - call er see our website C LA U D E L Y O NS 1 24 24 c v e r. z' = p base a idn te z s £32 5 CLAUDE LYONS ' WA 24 f> 4 1 5\ 3 press a uzs v c-T ra;s £2300 SOL/D STATE LASERS DC POWER SUPPLIES RELAYS - 200,000 FROM STOCK -ELECTRONICS- 14" £59.00 order TD84 IT £79,00 33U Ordsr as BC44 mm=i "s x 62cD x £'j3 i", !p4" h a 0 - ’ ■" Only 42 u Ofderss DT20 External trimenSKMis m“ ( =2019H x 635D x (75.5 r H x 2:T p]'z A D « 2: Only £345 47 u Order as RV36 “ = te r R fnm“2235H 603 W 186’ D x 2VA T W ) Only £410 Call for shipping quotation * V i • • « V • * ft 1 ft ft • ft ft ft ft * « * • i 4 • • ft ft 4 ft ■ ■ ■ ■ * ■ ■ ft ft ■ ■ • ft 1 ft i ■ V ft ft ft 1 ft ft ft i ft ft ft * 1 ■ i ft ft 1 ft ft ■ ■ft • • ft ft ft ft ft- ft • 1 ft • » 1 ft ft ft ft ft ft ft ft 1- ft ft 15 £69.00 Generic LOW COST SVGA Monitors We choose the make, which includes Compaq. fJitsuhushi. IBM, etc. Supplied ready to run with a." canias. Standard RTS 95 day guarantea. S^p p : a 2 ,Tr go do used condition. Shipping coda D, 2tj Converts your coSour monilorTnto 5 QUALITY COLOUR 7Y!E The TELEBOX s an sTECfre bB/ cased mans povt&sd i/xl eansrlrg st eiKtmcs read/ to pug in» a host d \xSeo workers cr AY =d= rpari 'k'lih a ccirccste vibea cr SWT input Tne compcsts v^efeo ojpat Mii atsa piug dracb/ kite rrost video woudats. stoYng tezKricn cf TV chenneis net normslZy isxr.abs cn most t'ension receivers' - - - BOX ME : V:r : _zzr zertefe en fie test |xstbe ^o.v reeeptun rf 8 i#y ■ ..■■■: =.; ■“ -. ' _- r :;■•■:•..•■ z z/z ir :rzz _ -zz TELEBDX ’.'3 zc. .tz^- atj 1 si bequerdes VHF ard nc’uriing ths HYPBRRAHD £3 uied by most cable TV operators 053 dr desktop computer sideo sys* tans & PS 3 (pcLre in pcLre) seics. Fir compete ccrnpsfDlfy - e.en jot ntritors wmalsaLrtd-an jfteQfsf4m^aucSoafrip(lia - arel fewfer-ei hER ZCC D_ZZ>_t Zte ZnZY'ZeC 35 SteTiZSlt E'teTC r e.'. - ULy OJ3.teZte=;Z TELEBOX ST for composite TELEBOX STL =3 ST but fin TELEBOX MB !.L:crd — 4_ '•* ; itete ^■Z" :zte £36.95 £39-50 £69.95 kjj'd ice; ' caioT' *Fof cable 1 hypetband ^acal reception TeJehox MB shr _ z z e :z _ - ^eztez :z 2 caz.e I.ze se - . :e S~zz"czzz eezc.t5 zzde 3 Legacy products High spec genuine multysync, CGA f EGA. VGA, SVGA MYsufcishT FA3415ETKL -4' S’. 2-. Fi’-Uhasync coox zl,-:z yp-* : 25 c :t zj^a sre r=sol/>:n :/ ■ ZT- x - .sr- sr a reus s'or-3 ocrreca:n :s = ros or" oerrev^s -cia-ing IBM PCs i.n CGA. EGA.. VGA £ SVGA rrobs EBC. CG.M_MOOOR £ ARCHIMEDES zzz APPLE, zscep-pite te'ri z’, i . r_ zr rg LO’iV ^rPTF.^E— zp&z^z^z.jz FVy zz5.ter:Pte.t > EXCELLENT usidconaox; TPt £ Swr^ Base £4.75 VGA csb’a ler IBM PC included rinhr *- Qmle r ^5 umy ti4U i,e. CG 73 Extema! cab’-es fur ciher types cJ ccmputem cizliab-'s - CALL This month's special 33 /42/47 U - High Quality All steel' Rack Cabinets Vateri. Eurocran Enclosures Lie tc i j, t hrnbeat pos- sible sp&c. raz.v ali stsei constfuction v, in zn;,5: e = be anj t-atk riz-z.te Frp-: azz ppz.p zzzte zte hinged for ezzy access z~ Z 3 ■zsckap'c .Vi" z.£ secure 5 lever banc! laefci Trp ‘ r z"i czc' 3 zzrjiteZteP zf zz_ize ,■,= -zz sles ■-■. :h g 'designer style” st z -zz: zzz, z frur.i pans to ensbe status r.dibstcrs :e r,e seer, through the panel _,et remain uncbUusl-.e Interna . the rat' fealuras !l s Dtieri re n- fzrzteZ .erizz ~z rre~Zete lz take the heavi- est of 19 rack equipmenL Trte E.vz “ z.az e ,er za J ’ 1 rz stnzia extras ara able are ce z_".z."ez fzz ateodard zeze rats'. A mains dis- tribution panel nreraa tez.^tez tz ire zaztz - ■■j-z' z . zos y 1 £C 2 z - E_zc szz*.-2 iz s~z ’ , r l so’p 3 b " sv. itched utility scckst- C.s-ra -.sn: =- is ::sc by fu .. z...3 j sT pg;.-. bzz- gr.z cz..m =■ rned -op s&ctd-n Vi L" tep an-5 1 :e p^-.'is :pp pai# ma) co n&Td.sd ‘ r z: 5:1— i z* Integral fans to tee 5.: z a.e etc Qiner 'eatteea mcJiide: rated gs^htk and floor levei-em, prepunched ut za - e1 at z ■'■ e ^ "earfo 1 " zeZ 0 connezior ^z;zess etz Ezpz e-z " excel fcnL. a gnLjf _sez ccnciz'dn :z kE.ys. 2z z_‘ Rc ? a : z _e. ezrre zre, ?. ■ = sz = - CALL - C=z t“ supc ez ri ragny otner zctez_raz:.zi PHILIPS HCS35 ;3zra style as CMS 333) stuactivety s^-'ed 14 T cc'OLr mo niior W-ir. bo.lh RGB end standard composite 15-625 Khz video inputs . a SCART socket s~i ia berate phe-rta leeks - tez r e e^z z. power amp and speaker ter all audio visual uses A co' " ez: z rezt tz Amiga and Atari ESC zczrz_tete zez'z'a video monitoring security azz zatz'is ,vz direct connection to most colour cameras. High quality vrith many features sum as t:sm csTiceafed fiap oonucis. VCR correclkm button etc G■> m=nu5 £24.95 shipping c-h^rgss for soft'.vare is code 3 V 5 fete red, 670nm laser diode assembly. Unit runs from 5 V DC at apprax 50 mA. On.g made fcr conturuotrs use in z _5tete tzar- code scanreite. the laser is mounted in a. removshte scild. si^ — _ — btodt, Viiiich functions es a neelsnk and hgkl cpbdal mcxrnL Dims of b.-cck are 50 w x 30 d x 15h mm integral teeturas incfirde ever tarn- :5-='.-tej v -te ~ s s ' Ti -i r. . r . : ft ;t"t .. OH I OFF. Marry uses for experimental optics, ccmrns Ik .f?g.htsh&ws st: S u z z ed ccmp: ere writh iteta sheet Cteer as TD31 ONLY £24.95 ALL MAIL TO Ddpt EK, 29 I 35 Osborne R 6 Thornton Heath Surrey CR7 8PD : UK Open Mon - Fri 9.00 - 5:30 IS Million Items On Line Now ! Secure Ordering, Pictures, Information vtesinu www.distel.co.uk email ~ admin Udistei.co.uk ALL ^ ENQUIRIES 0208 653 3333 FAX 0208 653 8888 AJ pr.-'i : y . -i M.et 1 ire add 17 j5z- \ f AT to TOTAL ertfer '--v.rii Ljz _.-.i s:c:-_ t £' jI :-.- r 5LGO, {Ep£1 S 00, [FfCAii. Afcwr ezero.^ 3 csj’s ibr Eh'pprg -fs3=r CALL LrJesa ssisd gusa^sd fer SO dsys AJ $usrsri£ss on a teLrn to bese risete AJ j teiZ'tete- fzr .n e Tzo CAS - zr-.zes z-ez ter o_te _e zucc^. A. Zrazeratera, Zteie. - k^inmfn onlef £10, Bcra Fete sccour? craars accecrac Scroora I'iCrtjig c^jS dsfBxe. Catsge crerggs (Ai=£3.Z30. iEj=£t. R2-. i(0J=£1fl, ic our Ssncsrc f Ccrcbo ns of Safe which can z-z- ■. v?,'.ec zz cr_r tveisiie end TlCteOte.:. vproj. rrr.r redee Cra--:ra z-,.z.oz: zz steo. :: :r.r.'i'4 jVo: is ete soriCiVeosed. : Deois/ Beoteoteos 2 .’. . EiOE OBSOLETE - SHORT SUPPLY - BULK 10,000,000 items EX STOCK Far MAJOR SAWXGS CALL or sea web site www.djstBt.co.uk COMPUTER MONITOR SPECIALS Visit our website www.distel.co.uk Surplus always wanted for cash! 32 s-Evrc! =1 ec 1 tijr:o - 4 5005 ONLY r r INCLUDING p&p L I VISA 1BKz*3BEH FEATURES u Instruments - Meters, Scopes, +10 NEW Transient Recorder, Function VIRTUAL Generator, Power Supply INSTRUMENTS • Test mode, equivalent to the standard SPICE analyses l == - , »• and a separate continuous transient simulation mode that allows you to interactively alter device and circuit parameters and examine the results immediately * Layered sweeps, meaning you can step almost any device or circuit parameter on top of any Test ■ Monte Carlo analysis available for all tests 0 Easier pari selection, including a customizable Parts Palette • User-friendly interlace with buttons and control tabs • Live updating in Simulation mode * Circuit wizard makes it easy to generate standard circuits including Attenuators, Power Supplies. Filters, Op-Amp and Tube-based Circuits • Tabbed-based Windows * Highly flexible graphing * 3D graphing FULL - OPERATIONAL SINGLE USER VERSION ® NEW "realistic" models for caps, resistors, inductors 9 Interactive parts including switches, fuses, LEDs, etc. • Layered Sweep tests (expanded). ■ Expanded Monte-carlo tests B2 SPICE is backed by comprehensive technical support both local rate telephone and online, full user manuals and tutorials and a NO QUIBBLE, FREE 30 DAY EVALUATION OFFER Used worldwide by higher education, research and Industrial professionals B2 3P3CE is a powerful and most importantly, ACCURATE software package for professional and enthusiast alike. (^Research CALL 01603 872331 www.spice software.com f ,* ■ t " ' N ? t / /, a . ■ r m fefej Si ■ i ■ ; f ; : - : ^ W & ■t L Ml jHJH x • ‘ 7 r f ‘ / ft \ .ii r ,Ll .■ m w ' Almost every electronic circuit contains bipolar transistors, FETs or diodes. Most electronics hobbyists have a supply of such components removed from old circuit boards. A tester that can be used to sort out the leads and measure the characteristics is thus a handy tool. - - — - ■ SC-ftnalyser 2885 Elektor Rev 1.8e ; ■h. if the markings on the device can still he read. It's usually possible 10 look up its technical characteristics in a data book. But if the markings are vague or completely missing, you can only guess. Using this particularly handy tester, you can quickly identify the most commonly used types of semi- conductor devices (bipolar transistors, JFETs, MOSFETs and diodes:, includ- ing SMD components. Besides identi- fying the leads, the tester calculates various parameters, such as H EE for bipolar transistors., VV^- , I DSS and Rzsz:; - or JEETs, the threshold voltage for IvIOSFETh and the forward cur- rent voltage and leakage current for diodes. All of this information is clearly displayed on an LCD (compati- ble) screen. Operating principle Each of the three leads of the unknown device is connected to ground or -5 V via resistors with knov; values. The fol- lowing resistance values can be used: 100 a 1 kU 5.6 k Q, and 100 Mil. For each configuration, three voltages are measured using a PIC16F876 mfcro- cont roller. The microcontroller always siarrs with a quick, rough measurement to deter- mine whether the device is a bipolar transistor. This is done by connecting two of the three transistor leads io ground while the third lead is con- nected to -5 V via a 5.6-kQ resistor. The microcontroller measures the volt- age across the resistor and stores the measured value. Two more measure- ments of this sort are made with dif- ferent lead sequences, with each measurement being made at the junc- tion of the 5.6-kQ resistor and the Tran- sistor. This yields three values that have a specific relat ion shit} to the Transistor type. Table 1 shows the values the: should theoretically be measured for NPN and PNP transistors. Here the minus sign corresponds to a connection to ground via a 10Q-Q resistor, and me oius sian stands for a connection to -5 V via a 5,6-Ml resisior. An NPN transistor gives two values of approximately 5 V and one of approximately 0,7 V, while a PNP transistor gives a single value of 5 V and two values of 0.7 V. The firsr test is also sufficient to identify the base lead of the transistor, since it is the lead whose value differs from the values for the other two leads. Once SJi nilioi mec !e|. ■sure ments Type E B c measured value NPN — — + 5 v T _ 5 V — 0.7 V PNP — — T 0.7 V -r — 0.7 V + 5V the transistor has been identified in this manner, it is tested for current gain. As the positions of the emitter and collector are not known, the cur- rent gain is measured for each of the two possible combinations. The ulti- mate value is taken to be the greater of the two measured values. If the measured voltages do not match any of the combinations in Table 1, the device is subjected to special tests for oilier types of components (MOSFET, diode and JFET). To rest whether the device is a MOSFET, the current gain is measured in a similar manner for all six of the possible lead arrangements. However, some bipolar transistors also yield results that dif- fer from those shown in Table 1. This primarily occurs with transistors hav- ing a protection diode between the collector and the emitter. For such transistors, the current gain is also measured for all six of ibe possible arrangements. Limitations To avoid possible misunderstand- ings, we must say up front that the SC Analyser 2005 cannot be used to measure thryistors or Darlington transistors. Measuring eurretat gain $@r bipolar transistors The measurements described above have identified the base lead of the transistor, and now the other two leads are identified by connecting the tran- sistor in a comm on -collector configura- tion if it is a bipolar transistor, or in a source-follower configuration if it is a MOSFET (see Figure 1). The gain of the transistor is deter- mined by measuring V B and V £ . The formulas for this parameter are: V E = R z x (jj + 1 ) ■ (V E 4 - Rg } p= [(V E ^ (V B ■■ R e )1-1 The circuit can measure gain values over a ranoe of 5 to SS9. An N-chan- v nel MOSFET (Figure lc) can be dis- tinguished from a bipolar transistor by the fact that its gate current is practically zero. In this case, the threshold voltage corresponds to the voltage VA C - V E (for an N- channel type). To be properly identified by the tester, the MOSFET must have a threshold voltage less than 4.5 V, and it must be an enhancement type (which is almost always the case). The other type of MOSFET, which is G34451 - Figure i Canhgumiions far measuring the value of i3 for a transistor and the threshold volte qe cr a MOSFET. ■5 A05 - ■£■*' e .*• 1 g r “'“Srr:* : :s 35 *5V t5V © Figure 2, Configuration for measuring JFET pa romete r s. called a depletion type, is scarcely used any more. Measuring PE? parameters Field-effect transistors ( FETs ) can be characterised by a certain number of parameters, but here we are only inter- ested in three of them: (gate- source threshold voltage), (drain saturation current), and H DS0W (resistance in the full 'on' state). Deter- mining these parameters is more com- plicated than simply measuring the current gain of a bipolar transistor. The topology of the circuit is hardly suitable for making direct measure- © Figure 3. I he Kek in circuit avoids 7AHCAQ52. errors due fa the internal resistance ments, so an indirect method based on a mathematical model of the FET (the Schichman-Hodges model) is used to determine the values of the above- mentioned three parameters by calcu- lation. Of the three principal parame- ters of this static model, which is pri- marily used in Spice simulation, it turns out that only two are actually necessary here, since the third param- eter (/.) has hardly any effect on the ult im ate c alcul at io n ( s ee ins et ) . In order to determine the values of these two parameters, it's necessary to examine two specific operating points in order to obtain a set of two equations. In the first case, the FET is biased in its linear operating region (Figure 2a} by using resistor R c . to force V G3 - to approximately 0.6 V. Some FETs with low saturation cur- rents can be biased into their satura- tion region in this configuration, and in such cases a variation on the circuit shown in Figure 2 is used, but this is not described any further here. The first configuration yields the first set of values for V D3 -,. and 1^. Toe sec- ond operating point is obtained by configuring the transistor to operate as a current source (Figure 2b). which yields a second set of values (V DS2 , V*G52 Igz)' Now things become a bit more compli- cated, because the second operating point can lie in the linear region or the saturation region. The operating region cannot be determined until the thresh- old voltage is known. There’s thus no other choice than to calculate the value of for each type of operating region and then choose the proper value from the two results by checking the corresponding operating regions. The resistances R sw of the analogue switches are shown in the schematic diagram in Figure 3. They have a value of approximately 65 12. The exact val- ues are determined usina an automatic calibration procedure. The drain resist- ance, which is approximately 230 12, consists of a 1C0-Q resistor, the resist- ance of the analogue switch (65 Q), and the output resistance of the micro- processor (65 O). Another factor that must be borne in mind is that most FETs are symmetric, which means that the drain and source are interchangeable. It is thus impos- sible to tell these two leads apart, so the tester can only actually identify the gate lead. The drain and source leads are indicated according to the configu- ration used for calculating the transis- tor parameters. Interchanging the 36 clrVfci cknwits ■ 4/2035 source and dram leads will not chancre the information shown on the display of the SC Analyser 2005, but the results of the calculation always corre- spond to indicated lead arrangement. SchemaiU diagram The complete schematic diagram of the circuit is shown in Figure 4. The circuit draws approximately 6 mA (except for the backlight, which needs around 20 mA), and it. is powered by a 9-V battery, A 7SLG5 voir age regulator combined with three decoupling capacitors reduces the voltage to exactly 5 V in order to power the PIC16F87S. the LCD (with backlight), and the three 74HC4502 multiplexers. The display module communicates with the microcontroller in 4 -bit mode via five Port C leads and lead RA5 of Port A, The PIC16F876 is clocked at approximately 1 MHz by the RIG/C4 network. The PIC16F876 differs from the 'classic' 16F84 by having an on- board A/D converter, which is used in this circuit. The Reset pin can be tied directly to -5 V T since the microcon- troller has an automatic reset function. The three control signals for the tran- sistor being tested come from RC4, RC5 and RC6 in Port C. These signals, which have levels oi 0 V or 5 V, are routed to the three test terminals via three analogue multiplexers in order to insert resistors with specific values between the microcontroller outputs and each of the test terminals. The resistance values are determined by selection signal pairs RET and RB5 tor the right-hand signal (Jl), RA2 and The sialic characteristics of a JFET can be represented by a set of formulas that express the drain current as o function of the voltages Vqj and of the FET. There are two different formulas, since the model distinguishes between the linear region 0 < Vq S < (Vqc - V T uj) and the saturated region Vds s (Vgs - Vth), whe re is the threshold voltage of ihe FET. The full made! employs ihree parameters:^, and V-^. Parameter [i is related to the saturation current and the thresh- old voltage, while parameter K represents ihe channeflen gth modulation factor and is neglected in our calculations (>. = 0). The mathematical made! that we use thus appears as follows: For ihe linear region, defined as 0 < V DS < (V es - V TH ), the following formula applies: Id - P-V ds -[2(V os - V TH ] - V DS Ml + 2 V D5 ) For the saturation region, defined as VpS - l^GS “ VynK following formula applies: to “ N V G5 - V IH ) 2 ‘P + '- Vq5 ) As we have seen, in the first configuration the FET is in the linear region with an adequately large ir^g , so the first for- mula becomes: toi = P " ^TH ) - ^D51 IP] [n the second configuration, the FET can be in the linear mode with: l D2 - P'V D 52‘[2-[Vq52 - V TH ) - V DS2 J [2] or if can be in the saturated mode with: to2 = MVqs2 - Vth ) 2 [3] In this manner, we obtain a set of two equations in which Vp H and 3 are the unknowns. Depending on the operating region or ihe FET, we must use either formula [2] or formula [3). If we assume that ihe FET is operaling in the linear region, formulas (1] and [2] yield: VtHLIN “ C ” ! V G52 “ V 0S2 } 2 /(YdS 2 V’< ) [4) where V K = 1 ! D2 ^ tol I'-Vosi and C - V(Qs 2 2 + V K -[Vpsi - 2 -Vqsi ) [5] Consequently, we can calculate the constant B os follows: B-2 -(Vk-Vgsj) [ 6] If the operating point of the FET is in the soiurated region, for- mulas (1) and [3] yield a second-order equation: V rH 2 * B-V th + C = 0 We now have two solutions for V TH : V TH i --B + % [B2-4 (C^2)] [7] and Vth 2 = VlHSfiJ = -%- "■ [B- - 4 |C - 2)] [8] Only one of ihese solutions is physically possible and this is determined by evaluating the two expressions. All that's left tc do now is to determine V- and V 2 in order to figure out the actual operating region of ihe FET in ihe second configura- tion: V] = V GS2 - V|HUN “ V DS2 V 2 = VqS 2 “ VjHSAT ” V DS2 If V| >0 and V 2 < 0, the FET is operating in the linear region and V Tri = V THUN * If V] < 0 and V 2 > 0, ihe FET is aperaTing in the saturated region and Vth = V THSAT • If ihe FET is operating in the saturated region, ihe I355 param- eter corresponds to ihe drain current for V GS = 0. For v DS , we fake the value corresponding to the boundary oF the satu- ration region, which is Vqs = Vqs — - — V-p-j , Substituting for Vgg in equation [2] or [3] yields: toss = PV TH 2 The value of can be easily calculated by rearranging formula [1] as follows: P = 'dt ^ { v D5! t2 (V GSt - v rH ) _v DSI ]} The resistance Rqsgj: corresponds to the slope at the origin of ihe characteristic curve: Vds - Nto) Vgs = 0 Finally, Formula [1] yields the following results when Vr^ approaches 0 V: to ~ Vqs-Vjt-i r dsgn = dV DS / d iD = -[} - |2-p-V TH )] 4/2CD5 - cl-Vlui eisclr&riia 37 ]C1 Figure 4. Complete schemahc diagram of the SC Analyser 200, RB2 for the centre signal (J2), and RBI and RB2 for the left-hand signal i J3). The voltages present on the test ter- minals are measured by the P1C15F876 via analogue inputs ANO. AN1 and AN3. In order to compensate for the effects of the internal resistances of the ana- logue switches when making current measurements, these measurements are made using a second switch in each 74HC4G52 instead of directly at the leads of the unknown transistor. The operation of this arrangement is shown schematically in Figure 3 with resistor R9 connected in the circuit. The internal resistance of the micro- controller output, which is around 30 LI, must also he taken into account. Finally, three 1-nF capacitors provide a certain amount or filtering for the measured signals. Software The software is written entirely in assembly language and nils a large chunk of the memory space of the PIC16F575. Approximately half of the occupied space is used for calculating parameter values for FETs. If you would like to program your own micro- controller. you can download the nec- essary hex code from the Elektor Elec- tronics website (v-Avw.elektor-eleciron- ics.co.uk). The file is found with the pdf download for this article (April 2005). For those of you without Internet access it is also available on floppy disk from Reader Services, the order code is 0304051-11. Naturally, you can also order a fully programmed micro- controller from Reader Sendees (order no. 030451-41), €©nstroeti@n The PCR layout and component layout are shown in Figure 5. Ensure that the 1C sockets, electrolytic capacitors. 5-V regulator and the four ICs are firted the right way around. The lb resistors can be replaced by 5 : : metal-film resistors carefully selected using an accurate and reliable multi- meter. The analogue switches must be 74HC types, since the internal resist- ance of the normal 4000 series is too large for this application. The display module can be litre d on the copper side of the circuit board. To make it easy to connect the display, there is a single-row 16-way pinheader (male) on the circuit board, which mates with a corresponding 16 -way female connector on the display circuit board. Here we chose to use a modern type of display called 'PLED' (see the 'OLED and PLED' inset), but you can also use any desired LCD module based on (or compatible with) the Hitachi HD44780, although the pin arrangement may differ from the arrangement for the display used here. Note that the pin arrangement of the display used here is rather unusual, with pins 15 and 16 for the backlight being located next to pin 1. Beside the test leads with alligator clips, there is also a special test circuit board that is connected to the main cir- cuit board and can be used to simplify testing SLID devices (diodes and tran- sistors). Use three short, flexible leads to connect the SLID holder to the main circuit board, and ensure that me proper lead sequence is maintained (as 38 elsifcr ckttFCr.'u - 4-2405 Figure 5. Tract and component layouts far the associated printed circuit board , SMD components con be conveniently tested usina the small circuit beard, ■* -f !.■ seen from above: contact 1 to Jl t con- tact 2 (middle) to J2, and contact 3 to J3). Although this hardly matters for the measurements, it is important for identifying the leads. The middle con- tact must always he connected to J2. Naturally, you can also use flexible leads with miniclips. Toe circuit board is designed to fit in a standard enclo- sure with a 9-V batten' compartment. Calibration After the tester is switched on, a wel- come message appears and displays the software version (SC-Analyser 2CQ5 Elektor Rev ; 2.0s). If you don’t see this message, try adjusting contrast control PI to Improve the situation. The first thing you should do is to cali- brate the internal resistances of the analogue switches. If these values are known as exactly as possible, the measurements of the various transistor parameters will be more accurate. If this calibration is not performed, a default value of 65 il is used for each switch. Each time the tester is switched on. the software checks to see whether the calibration has taken place, and if it hasn't, the message Cal error is displayed for approximately one second. The c alibi ad on procedure is easy and runs automatically. To perform the pro- cedure, fit a jumper in position JPI while the tester Is switched off and short all three test leads together, and then switch the tester on. The mes- sage L Cal Remove jumper' will be dis- played on the tester. Now you should remove the jumper, and the calibration procedure will start. Tnree resistances are measured one after the other, and their values are displayed successively. Next, the message ‘Short XX will appear. After this you can discon- nect the three test leads from each cow ITS LIST Resistors: R1.R5.R9 = 100 kQ \% R2 R6.R10 R1 3 - 5kQ6 R3.R7.RU = Ikn. }% R4.R8.R1 2 - 100n, 1% R14 = 47kli R1 5 = 33Q R1 6 = 270 PI = iOkO preser Capacitors: C 1 .C3 = lOuF 25V radial C2,C5.C9 = 1 00 nF C4 = 1 00’ pF C6.C7 C3 - 1 nF MKT CI0 = lOuF 16V radial Semiconductors: D1 = IN4001 1C 1 =78105 1C2 = PIC16F876-20/SP (programmed. dtce" cade 040409-41) IC3JC4 IC5 - 74HC4052 (HC only!] Miscellaneous: Si - on/off slide switch LCD1 = standard LCD wllh 2x16 characters, e-.a.. A5I-G-1 62FS-GF- EW5/W (with backlight) cr LCD 162C BL (F-LED wish active backlight) 16-way SIL pirthead&r with mating connector, or Rateable for connection to display IF 1 = 2-way pinhecdsr with jumper 3 mini croc els as T 3 DILI 6 1C sockets 1 DIL23 IC seeker Enclosure e.a.. Hammond 1591BTSU 9-V tottery with dip-on eods 5 wire links PCB order cade 03045 I -1 [see Readers services cr ww.v.elekrar- efectronlcs.coiik) Disk PIC hex cade order code 030451 ‘11 or tree download from wv,--w . e ! ek to r-s I ectr q n ics . co . uk see text pC configuration I he microcontroller must be config- ured wiih the Following options: oscillator in RC mode - watchdog timer (WDT) disabled - 'timer reset on power on' enabled - brownout reset disabled - IEPROM protection disabled - writing to Flash memory dis- abled - debug mode disabled - code protection disabled 4- 2005 - eld, tv eb:ircrfi 39 other, and the tester vrill automatically change to the test mode and display the message 'No component *-*-*'. Calibration can be performed v.Tien- ever desired by repeating the above procedure (switch oh the power, ht the jumper, and switch the power on again). If you experience any problems, check that the five wire bridges are in fact properly fitted and soldered in place. Also check 10 make sure that the supply voltage is present at the fC sockets. Operation After the welcome message showing the software version ( SC -Analyser 2005 Elec- tor Rev 1.0s), the display should show the following information (Photo 1). The first line shows the transistor type and the value of one of the characteris- tic parameters. The second line shows the lead arrangement of the transistor and. if relevant, the value of a second parameter. Bipolar transistor The fust line of the display shows the polarity of the transistor (PNP or NPN), the type of semiconductor material (sil- icon or germanium), and the parame- ter H-r. The second ime shows the lead arrangement of the transistor and the collector current. The current has a value of approximately 1.5 to 4 mA, depending on the current gain. The SC Analyser 2005 displays the type of semiconductor material ( Ge 1 for ger- manium or SI' for silicon) according to the measured value of V BE (Photo 2). If the transistor is partially or com- pletely shorted, the associated leads are marked with an \X' by the SC Analyser 2005. A short is consid- ered to be present if the resistance measured between two leads is less than 50 Q. (Photo 3). FETs The values of the parameters VV^, lyss and R 33 QN are shown approximately every two seconds. The drain and source leads are determined arbitrarily by the SC Analyser 2005, but they do correspond to the configuration actu- ally used to determine the parameters. If you swap the drain and source leads of the transistor under test (TUT), you can obtain the values for the reverse configuration, but since field effect transistors have symmetric structures, OLID ond P LE Organic LED (OLED) and polymeric LED (PLED) are recent developments in LED technology. The OLED effect was dis- covered in the early 1 980s by Eastman Kodak, but it has only recently been put to practical use in commercial appli- cations such os PDAs ond MP3 players. The Kodak LS633 digital camera was one of he first devices to be fitted with an OLED screen. Some of the MP3 players from Packard Bell also have an especially nice OLED display OLEDs are based on LCD technology. A sandwich farmed of several Sayers of organic film is located between two chorged electrodes: a metal cathode and a transparent anode. There are four organic films in total: a hole injection layer, a hale transport layer on emission layer and an elec- tron transport layer. As scon os a voltage is applied, the pos- itive and negative charges combine in ihe emission layer to generate electroluminescent light. In contrast to LCDs, v/hich need an external source of light (backlight], OLEDs actively emit light. An even more recent development is ihe PLED, in which an undoped polymer is sandwiched between two electrodes. The polymer lights up when a voltage is applied. This device can produce a full range of colours and is relatively inexpen- sive compared with other technologies, such as LCD ond OLED. The advantages of PLEDs are that they require only a small amount of power for high brightness, they are relatively light, robust and rosT and they operate over o relatively large tem- perature range. Comment from our design staff: As you hove probably realised, we are quite enthusiastic about ihe visual properties of the PLED display used in this project. However, we are highly disappointed with the inad- equate design of this display, it generates huge current spikes with amplitudes up to several hundred miiliamperes, which create a lot of noise on the 5-V supply line. In our opinion, this is caused by a poor hardware design for the display [Version A), -with inadequate attention being given to the switching times required by the display drivers. Due to this problem, we were forced to include an extra RC network OLED DESPLAY G ■=- = E Y- H U It H 1 G Less - i X " ■ r - CeV-i.;-:- GK - = [to =-:■-= ^T2 -= r ; — — C — : - : i - :i - 1 i . £ ■ LiiAi i - ;□ Cross -section of on OLED display. The structure or a PLED fs s/nti/on in the +5-V supply. We do not (yet) know whether PLED displays from other manufacturers suffer from the same shortcoming. If you can get your hands on a different brand of PLED display, it would be interesting to just measure what sort of curreni pulses it draws. 40 slskiar f^iticnTcs - T 2005 1 there shouldn't be any large differ- ences in the measured values. Considering the method used to make the measurements, the accuracy of the values provided by the SC Analyser 2005 is more than adequate. For I DES it is =5 h, and for R dso ^ it is ±5 Q. How- ever, the measured value of the thresh - old voltage can differ from, the true value by 0.5 V for certain transistors, although in general an accuracy of 50 mV is achieved. A particular type of FET from one manufacturer may yield a value that is very close to the true value, while the same type from a dif- ferent manufacturer yields a value that diners by several hundred millivolts, hi practice, the accuracy is related to the accuracy of the Schichman-Hodges model and reveals the limitations of this model (refer to the inset on this subject). Threshold voltage The threshold voltage is negative for N-channel FETs and positive for P- c harm. el FETs, The maximum value is limited to -20 V by the soft 7 . '/are. Tne resolution is 10 mV for values up to —9.99 V and 100 mV for larger values (Photo 4). shows the voltage and the current through the diode via a resistance of approximately 400 D, The maximum current is thus limited to around 12 mA (Photo 8J. The second screen shows the same information, but this time with a resist- ance of approximately 5.9 kO, which causes the maximum current to be lim- ited to approximately 803 uA (Photo 9 j, The third screen shows the current in the reverse direction and the test volt- age. The resolution is 100 nA (Photo 1DJ. SMDs You’ve probably been wondering how to use the SMD portion of the tester. Toe leads of the component to be tested must make contact with the cor- responding copper areas on the circuit board. SMD diodes must be connected between area 1 and area 3. A small plastic rod can be used to properly press an SMD device against the cir- cuit board so that its leads make good contact. Conclusion! p{: 1 i It it: ilpl if IH: a J. ill f- ( i — * — - m 9 \ ■ fa 4- " Ell m a * TPi 1 - ‘X* ~~ \p ’i* 'T* I 1 v Saturation current Tne saturation current (with the gate shorted to the source) is shown here. The value of the saturation current ranges from 0 to 99.9 mA. Tne is solu- tion is 10 uA for currents up to 10 mA and 100 liA for currents uu to 100 mA * — Photo 5J. Drain-source resistance Tins is the drain-source resistance when the FET is fully 'on F with v GS = 0 V. The measurement has a range of 0-999 Q (Photo 6). MOSFETs The displayed voltage corresponds to the threshold voltage of the MO S FET for a drain current of approximately 2 mA. The measurement range is 0-4.5 V, with a resolution of 10 mV. For proper 1 dentine ation of the device as a MOSFET, the gate leakage current must not exceed 0.5 uA iPhoto 7). Diodes Diodes can be connected between the left-hand and right-hand terminals of the tester. Tne SC Analyser 2005 indi- cates the positions of the anode and cathode. Tmee screens are displayed in sequence at an interval of approxi- mately 2 seconds. Tne first screen Tne SC Analyser 2005 is a handy eas- ily constructed instrument with a # large number of features, which can be a quite valuable aid to electronics hobbyists and professionals. A brief list of its possible applications includes searching for an equivalent type, testing device operation, sorting devices, measuring unmarked transis- tors, and simply determining the lead ar rang e m e n t without t humb mg through a data book. Time to warm up your solderina iron! (0304514) Internet links Authors web rife: '■■Av 1 ,-.' . m w i nst r-j rrisnfs.com FAQ site: ■vwwr m w i n si r u m e n t s . c q m ,/5 C A 2 C 0 5 / sca2QQ5.bim! Author's e-moil address: m. ■■■ gfecgek. Tm.vYisSrumems.corri Microchip: v/ww. microchip -com ■' o ov/r. load / i i i / ding/picrnicro /families 1 6~57x/ 3Q292c.odt About rfie author The author was born in 1965 and j*- studied at me Ecole Notionale Supeneure d'Eieelroniqijs si de Radioelectrscile de G rentable (EN5ERG) in. France. He worked as an engineer Far seven years in the research department of a large French manufacturer of weighing equipment. Fallowing in Ts he changed to ihe French branch of Ha meg r where he holds the position at Director of Development Between his travels to she other side or the globe, he manages to find a bit of time to design measurement instru- ments for eledronic hobbyists. 4 2i 305 ■ drVtti =!*rtrc"Tts 41 review copy Wo r kin with 32-bit micros Kell A1M7 Development Kit Paul Goossens Most microcontroller-based projects in Elektor Electronics employ 8-bit devices, simply because 8-bit micros usually have sufficient capacity to handle the job. Usually..., not always! In a few cases, we need to look out for more powerful alternatives. This review covers a devel- opment kit based on a 16/32-bit micro. Lots of electronics equip- menu relies on an 8 -bit microcontroller for its intelli- gence. Despite predictions to the contrary, 16-bit micro- controllers never knocked out their 8 -bit counterparts. Today's generation of 32-bit controllers, on the other hand, is increasingly seen in the latest electronic appara- tus. These power fill numb e r crunchers come into their own in complex equipment like DVD players, cam- corders and so on. In most cases, this type of equipment needs to employ some kind of operating sys- tem, which adds to the processor load. Although rhere are operating systems for 8-bit micros, they tend to be rather limited in terms of memory control and memory space. Today's 32 -bit microcon- trollers usually do have resources available required by modern operating sys- tems. The reason is, or course, round in the general trend of consumer electronics growing towards the PC as well as being able to perform several different functions. A good start People with a practical inter- est in electronics (which includes all readers of this magazine) have come to value easy ways of entering new technology. In the case of microcontrollers, one of the best ways to get started is to obtain a development kit. especially if you get your hands on one comprising both hardware and support- ing software. Kail have an excellent repu- tation for comprehensive development systems for a wide variety of microcon- troller families. Kails MCB2IQ0 kit dis- cussed in ibis article is based around the LPC2128 microcontroller from Philips. In addition to the board proper Keil also supply a JTAG interface with a USB connection. The software that comes with the kit is also complete in every way: compiler, linker, simulator and debugger utilities are supplied in 'evaluation' ver- sions, The limitations are nor too serious: the debug- ger is limited to 16 kBytes of code and the software gen- erated by the compiler may not be used commercially. Installation The best thing to ao is first install the software in the kit - 1 6/32 bit core -256 2 1 D : ARRAY [ C- - . 3 ] OF Char ; S ch C h u R >2 S i ze : 2 an grwo r d ; EifD ; A lot of in form a I ion within the header never changes. The procedure PrepareHeader is calfed to set these values in the headers. The values shown below are then assig- ned to the fields in the header: HITH header DO BEGIN ChunkID : - J RIFF ' ; Forwat i = 'ffAVS 5 zb Ch \2 u k 1 ID t= ‘ rat J ; Sub Cb unkSSize : - S 1 1 ; Au d iOr d r^E r : = S Q 1 ; =ubChurik2 IS : = J dab a ' ; JintOf Channels 1; By tssper Sample := 2; EitsPer Sample : = 16; END; As we're limiting ourselves to a mono signal for the time being the value of NumOfChannels is 1 (siereo^2). The sample size is also fixed at 16 bits (smallmteger). The SampleRate is the frequency at which the samples □re output. For 'normal' signals a single cycle is output. The sample rote is therefore equal to the frequency of the signal multiplied by the number or samples in one cycle. The ByteRate is the number of bytes thoi is read per second and is therefore equal to SampleRaie x NumOf- Channels x size of one (mono) sample. In our case this is 2 x SampleRate. The remaining fields hold information about the size of the data block: Chunksize := data size (in bytes) -5-36 5ubChunk2Size := size of the data block We're now at the stage where we have all the informa- tion required to create the WAV file. We just hove to combine the header and data and send them to the sound card. Delphi afters a very tsexible way to reserve an area of memory and fill it with data. This uses parts from the TStream family'. This tamily has several members of which well use the memarystream one (TMemoryS- fream), TMemorystream has Inherited all properties from Tstream and has added a few of its own. Since streams are dynamic variables., only its type will be defined when the program starts and the actual variable still has to be created. As we can only send one WAV file to the sound card we only need □ single variable of this type. The variable is created at the start of the program in the OnCreote method; just as with ihe TStringlist the size of the variable Is not defined here. It Is this property that makes a stream very flexible. Before the header is copied to the Wavesiream it is first cleared; WITH vr* vest re an DO BEGIN Clear; vrrireRaf f er { rlsvehesdsr, WriteSuffer =r , sL-aaz •= END; sizsof [ Wave header ) » ; -n; Next, the WriteBuffer method is used ro copy the header; -i. * I ZBZ ^ j- The first parameter is the variable thai is written to the stream and the second parameter tells how many bytes have to be written. The data has also been prepared and is waiting in an array. This is written to the stream in the same way. The stream itself keeps track with a pointer where the end of the stream Is and It starts writing from that position. In this way the data follows on neatly after the header. Writ s3uf far < ar, sizeof ( ar j We can read or change ihe value or she above-mentio- ned pointer using the Position property. AN the Information is now ready ro be sent to the sound card. Because the creation of the WAV file made use of three predefined functions, we have combined PrepareHeader 46 defer -4/2005 s -,T and Wr] fa Buffer in one procedure: _ = _ = i "0 b “ ac - ; V AR ar : ) li wouldn r be very useful if we only displayed the sample frequency We'd rather set and show the signal fre- quency. Because we already know how many data samples there are, the relationship between the signal fre- quency and She sample rate is straightforward: Wav&Hesder. SanpIeRare = Sreq t ;iun-£)rSsr.pIes: With the help of a Snackbar we can set the signal Fre- quency and use that to calculate the SampleRate and show it on the display. After a wave function is started the position of the Freq- TrackBar is read and the SampleRate is set with the cal- culated value. Once this is done we can use the PreqTrackBar to adjust the signal frequency. The position of the Trackbar is read and the SampleRate b calculated. We then turn the sound off for a moment (more on this later). The pointer in the stream is set to 0 at the start of the header and Write Buffer is then used to copy the modified header over the old one. The sound is then turned an again. After every change in frequency the display is of course updated. These actions have to be performed every time that the slider of the FreqTrackBar is moved. It therefore makes sense to start these actions via the OnChange event. Select the trackbar ana double-click on the OnChange event under the tab for Events in the Object Inspector. We then add the tallowing commands to the OnChange procedure: P ROCS! DU PC TFc m 1 . Fzre qTr ^ c k S a zrC h s T; go, 5 C r. d 5 T : TQbjscb) ; BEGIN KITH FraqFrack.E=r DO BEGIN Wave header „3a“pIaRalic: := FraqFrazjcIiar . Fc=ii icr. t li unOI £ ar.p lea; t a r jtl a o^Rd off Pi ay Sound! NIL, I , C- j ; Welvs S tream. Position : = Q ; Waves t rear. . WriteBuf f ar [ Waveheader , zlzezf ( wavaha- ■ 'Fth %Bd‘ rzriarE are displayed vith a. f ield-'.fidfch cf S charterers Fraqlabal , Caprigr. : = For7^Et( f \5d r , ( FreqTrack- Bar.Pasitipn] | - ' r.z 1 ; a-rrr.d Dr. rgrir. FlayScmnd : VFrrearr . !!ar.rry r 1, FF I MFMGEV OR £:;r_i::s or if: __\f ync ; END ; END; The imported waveform still has to be converted into a WAV file. This was already read into the Data In Strin- gLbt, which is a stream optimised for strings. The Strin- glbt has a Count property, which returns the number of strings read. This thererore tells us the number of samples. Because the waveform was created externally weVe assumed that the sample rate is 50 kHz is. The sample rate has to fit in 2 bytes and therefore has a maximum value or 64 kHz. 50 kHz is dose to the maximum and is easier to use in calculations. We have already made sure that the maximum amolitude is within limits when we ere- I ated the data file in Excel, so that is also take care of. We con use ibis information to construct the wave hea Haute 3-ihh is what me sowlco'n fcoks *:s a. so 2 kHz}. t‘: :■ figure Arc! rir.a: > a squares a^e output (2 kHz as ■-*- der. We then read the Siring List sample by sample, con* vert it to a sma//in/eger and add it to the WaveStream: FOR index := 0 10 Cazipl aCnznv - 1 DO BEGIN a azr.pls : - S trloint Oat sin . £ a rir.qa [ index ] > ; W ave £ - rear' . Wr ItaFvf far \ = ar.pl a , £ r r aa f = airpl a ; END; Once this is completed, the sound cord can be loaded with the WaveStream and the playback can start. Driving the sound card The unit M/VISysrem has several procedures that we need to control the sound card. The most important procedure is the one to play back a file: Play Sound ( , , ) In the simplest case pararnl is the name of a WAV file, for example: c:\winnt\media\chimes.wav. It is also possible to pass a memory address (pointer) to a WAV Hie stored in memory and that is what we use here, A Memory St re am has a memory property, which is of type pointer. This was the main reason for ' M5 ■ sYui.r 47 ; it-irn li tnnfotn -I mrnimm ■ j 1 i 4 l f» . * , ■ i 3TTf > * + * in. .11* *1 li HI - - . * I; * M — ’ -• ~ r I »-* i ilitiflil tHtff iri Mini [ T ; Figure 5. Part of the wa^'eform created in Excel. The complete cycle consists - ' a '-Hz signal, 500 m> x 'C . i omptoude to/ o^vsd 3 ;r 500 ms c* ; 0'- amplitude. The sampling frequency is 50 kHz. Fiou re 6. The construction cr a 6lm;ap for o SpsedButicn. choosing this type of stream. The first parameter then looks as follows: ? lay S otjh d ( I t a ve£ t r eari . r.e “ o r y ,

r \ Param2 is 0, unless sound is played bock from o resource, but we won't go into this here. By choosing a suitable value for pa ram 3 we tell the sound card that paraml isn't □ file, bur a pointer to a memory address. Param3 is made up of a combination of 3 constants that are defined in the unit MMSystem. 5ND_MEMORY indicates that param l is a memory address, SND_LOOP makes the file play indefinitely and 5ND_ASYNC tells that the playback has to happen auto* nomously. The last value is required in combination with SND_LOOP. Whenever we want to send the data stream to the sound card we use the procedure: ? I ay £ ou nd r V? av & £ ^ re ar. . Me” o ry ( 3 , 3 IX D_J*ZMORY O R SirTLCO? OR £!m_ASYKC ) ; To turn ihe sound oFf we also use PlaySound, but with dif- ferent parameters: ?lay3 o‘_:r. d ; ’ill ,£■,-* Since the first parameter is a pointer, we can't just put a zero in it. Instead, we have to use a special type of empty pointer, called NIL. The only thing left to do is to sei the amplitude of the sig- nal, which we do via a Windows function from the Wave Amplitude Control. This requires a 4-byte variable, which holds the signal level. Ihe iwo most significant byres determine the signal level of the left channel and the other two bytes are for the right channel. Two functions have been defined to adjust bath channels independently. We first use waveoutgefvolume to read the current volume level. We then replace the hig- hest or lowest two bytes and write back the variable using waveoufsetvolume* The volume setiing usually follows a logarithmic rule. This hasn't been taken into account when we show the ampli- tude as a percentage of the maximum signal level. Layout We have taken particular care with the layout. For the first time we've used burtons that contain images. We have chosen to use so-called speedbutfons because they ha ve several useful properties. Depending on the state of a button it can show a different image. If is also passible to un select all other buttons when o s inale button is die- ked. If you want to unselect a group of buttons they have to know aboui each other's existence. They know this via the property group index. When a burton is clicked all other buttons with the same groupindex are unselecfed jgroupindex >0J. This is an ideal solution when we wont to select a single button, for example v^hen we choose a waveform. Images can be added via the Glyph property. A glyph (a 'raised'' character or symbol) is a bitmap that contains a maximum of four images, which are all of ihe same size and are next to each other in □ horizontal row. The SpeedButtan shows one oF these images, depending on ihe state of the burton (see Figure 5), Image 1 Button is unselected Image 2 Burton disabled Image 3 Button is clicked. If groupindex=0 image 1 appears again afterwards. Image 4 Button stays down. We also have to tell the speedbutton that there are 4 ima- ges in the glyph via the property NumGlyphs=4. Conclusien and result! Even though the externally generated WAV file has a limi- ted frequency range (max. sample frequency of 64 kHz), this is a very useful function generator. Because we can use externally generated waveform files, the number of possible waveforms is infinite, which makes this fairly uni- que amongst signal generators. We could expand the generator by making use of both stereo) channels. The left and right channels could then oe programmed separately. As an example, when wor- king with complex signals one channel could be pro- grammed with the signal ond the other channel could be used for a trigger signal with a programmable delay. When v/e used a spectrum analyser (Agilent 4395A) to analyse a sine wave output, we obtained surprisingly good results: S/N ration: > 95 dB 2 r *“ harmonic; < - 65 dB 3 r ° harmonic: < -80 dB Measured with a 1 kHz signal at 0 dBm. These values were measured an an arbitrary computer that had its sound card on the motherboard. Other cords may give very different results. A number of sound cards were found to produce signifi- cant distortion at maximum output levels. St is important ra keep an eye out far this if distortion is of concern. If necessary the maximum amplitude should be set to o lower value. The waveforms shown in this article hove been captured by a digital oscilloscope (leCroy WaveRunner LT344L). All program files for this article can be found at www.elexfor-electron ics.co.uk (April 2005, file no, 040240-4-1 I). 48 eEektuur- 4/2005 eiews & new products Flash PSCs with USB 2.0 Connectivity Microchip recently announced the first Flash PIC--- microcontrollers with Full-Speed USB 2,0 connec- tivity and 48 MHz operation, for 12 megabiis-per-second (Mbps) data-transfer rates. Combined with o '.vide variety' of peripherals and nano Watt Technology power management rhese features pro- vide a complete solution for designer; working with USB in industrial medical and many other embedded applications. Most USB-capable microcon- (rollers are optimised for personal computing (PC) and consumer applications rather than embed- ded designs. Microchip s new USB PIC microcontroller family offers the benefits or Full-Speed USB to a broader range of appli- cations that may operate in harsh environments and connect to per- sonal computers less often. Key feature; or the new devices include: 2 kBytes of RAM, 1 j tS byte of which can be a dedicated USB buffer; 256 bytes or EE PROM data mem- ary; E US ART module supporting RS232, RS485 one UN" serial interfaces ; A taster Synchronous Sari o' Port (MSSPl supporting l-C' v and SPr t,r communication; i 0- h i f A naiog-ioD ig Tta t Converter with up to 12 channels, Two Analog Comparators Cop lure /Com p a re/P WM fCCPj module with i 6-bit capture and resolution Enhanced Capture, /C amp a re/PWM (ECCPj with dead-time control and fau ft-p rate ction inp uts Four Timers (3 x 1 6-hit, J x 3-bifj Programmable Brownout Reset and Law Voltage Detect circuits Enhances tn-Circuif Debugging capabilities with up to three hard wore breakpoints. Microchip offers on extensive sei of libraries for the most common application classes, including the Human Interface Device (HID). Communication Device Class (CDC) and custom drivers. Microchip is a^so publishing an application note illustrating how to replace a serial port with o Full-Speed USB link in a few easy steps. The tour new USB PtC microcon- trollers are planned for general sampling and volume production in December, in several package options. For additional informa- tion visit the Microchip website a t www. microchip.com/usb MitroLhip Ltd., Microchip House, 505 Eksdale Rood, Vfmnersh Triangle, Wokingham RG4I 5TU.TeL (+44) (0)118 921 5869. Fax (+44) (0)118 921 5820. www. microchip .com . FRUSTRATED ! Looking for ICs TRANSISTORS? A phone call to us could get a result. We offer an extensive range and with a world- wide database ai our fingertips, we are able to source even more. We specialise in devices with ihe following prefix (to name but a few). 2N 2SA 25B 2SC 2SD 2P 2SJ 2SK 3N 3SK 4N 6N 17 40 AD ADC AN AM AY BA BC BD BDT BDY BDW BDX BF BFR BFS BFT BFX BFY BLY BLX BS BR BRX BRY BS BBS BSY BSW B5N BT RTABTR BRWBU BUK BUT BUY BUW BOX BUY BUZ CA CD CX CXA DAC DC DM DS DTA DTC CL CM HA HCF HD HEF TCL ICM IRF i KA Kl A L LA LB LC I D LF LM \1 M5M MA MAB MAX MB MC MDAJ MJE MJF MM MX MRS 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 SIRA I STRS SVl TTATAA TAG TEA TC TCA TDA TDB TEA TIC TIP TIPL TEA TL TLC TMP TMS TPU U L A UAA UC UDN ULN UM UFA UPC UPD VN X XR Z ZX ZT5 + many others We can also offer equivalents iat customers' risk) We also stock a full range of other electronic components Mail, phone. Fax Credit Card orders and callers welcome VISA Cricklewood Electronics Ltd 40-42 Cricklewood Broadway London NYV2 3ET Tel: 020 S452 0161 Fax: 020 8208 1441 - - - r, •=. -- - — - n* *' r 1 _* i — — - - •». _-»• : .• zrrwJ Connect 4/2095 ■ e!4.r:r ditireJily 49 Brachion L Does alcohol cause violent behaviour? Peter van Herpen Researchers af Warrick University recently discovered new particles and dubbed them 'brachions' (from Latin brachius which means arm). The term also has a strong association with Brachiasaurus, one of the most ferocious creatures that ever trod the ea rth, so clearly the newly discovered particle related to violence in some way. is The experts were able to prove that a high concentration of brachions in blood increases the risk of a person turn- ing violent. One of the most intriguing questions is of course how brachions end up in blood. After a good deal of research, mostly in pubs, it turned out that brachions are mostly (but not exclusively] present in alcoholic drinks To everyone's surprise, the relation between brachion concentration and the alcohol percentage is tar from tin- ear. Also, the effect of brachions is dependent on pen sonal Factors "ike age. body mass index [BMI] and sex. The correlation between these factors is illustrated in graph 1 (for females with BMI between 20 and 30). Dr Pa of and her pubcrawling co-workers af the Univer- sity were able to design an interesting circuit for use in clinics, football arenas, boxing halls and prisons that measures the brachion concentration in any liquid, show- ing the (possible) effects on a display. The brachion concentration is measured in a nonTnvasive manner, using two sensors. One is an infrared sensor measuring the absorption of infrared light, the other, a conduction sensor. Based on □ complex formula these two factors establish the brachion particle count in blood. The formula is implemented in the system software. Circuit As a spinoff of the scientific project, a circuit was designed specially far Elekfor readers ra enable them to experiment. The heart or the circuit is a Siemens 30C535 processor ticking at 1 2 MHz, The sensors — here, a common reflective light port and a simple conduction sen- sor — are connected direct to if. For the rest, the schematic does not amount to much. The display is con- nected directly to port 0 via pull-up resistors [because of the open-drain outputs) and the rotary/pushbutton is tied to some inputs on port PI . The software may be blown into an EPROM. Because of the experimental nature or the circuit, pre-programmed EPROMs ore not available. User insfrudisns Operation First use the rotary/pushbutton to select the sex (M/F), then the person's length, weight and age. The software will use these data to compute the BMI ana select the right parameters for the graph. It is important not to tell your test person [s] that the variable age is actually lim- ited to 35 when 'Female is selected because apparently women can not be older than that, nor that weight is actually increased by 1 5 % because women as is com- 50 = 'Mc CvA'OVn- n 'itjji E TE ETC monly known, will always lie about this. Next the probes are submersed In the liquid to be exam- ined and the actual measurement may begin. It will take about 10 seconds before the calculations begin — the process Is easily followed on the display. The result is expressed in brachion count per litre. A typi- cal value tor (French) red wines (not older than 1995) is 4.37x1 0 _ : 2 brachion 5 / litre. Next, it you press the but- ton again, you will see the effect on the test person if he/she drinks 0.1 litre of the liquid. By repeated pressing of the button, the amount Is increased in steps of 0,1 litre (five key presses approximate one pint). For women, the order of the steps is from 'none to 'Tee! like and 'feel nothing'; and for men, from "none' to looks bigger than it Is' . well and truly spent', J vialent . right up to 'com- pletely plastered . Many more intermediate levels are available in the software. We probably do not need to fell you that Field-trialling the software was a huge under- taking mostly done outside our office hours ana we wish to express our gratitude to Jameson and Guinness for their kind support. Readers interested in obtaining the software may send on email to edltor@elektor-elecrronics.co,uk, subject: 'bra- chion detector April 2005k Literature: Brachions Elementary Pariides and their Effects by Dr Aprit 5. Peat Warrick University publication, 2004. ■! 20D5 - ikklsr eletlicnks 51 Everything you've ever wanted to know Ulrich Passern Modern mobile electronic gadgets demand ever more portable and powerful energy storage devices. Research by battery manufacturers all over the world moves on apace; new developments supplant old technologies, and are themselves almost instantly superseded by even newer technologies. The field is in a state of constant flux with new surprises every day. There are three battery technologies lhat currently domi- nate the market. The longest established and most techni- cally outmoded is the leaded d battery. However, its almost legendary robustness and low price guarantees its place powering the starter motor in vehicles and for energy storage for emeraency suDolies. The nickel family consists of two well-known products: the nickel-cadmium (NiCd) battery and the nickel-metal hydride (NiMH) battery. This will soon change, as the cadmium in NiCd batteries is harmful to the environment 52 cHuor clinics -I/20Q5 about lithium batteries... and, under an EU regulation, the batteries wifi disappear from the market in 2008. The industry is prepared Far this and has driven the development of NiMH cells to the paint where they are o match for NiCd cells in almost every respect. NiCd and NiMH cells have a built-in chemical 'charge reserve an a hence are relatively insen- sitive to overcharging or to deep discharge. For some time it has not been possible to meet the energy requirements of modern mobile phones, laptops and PDAs using nickel-based batteries and., unnoticed by many o third battery family has gained considerable importance in recent years. These are lithium-based bat- teries: lithium-ion (Li-ion) and lithium polymer (Li-polymer), Liihium technology has answered many researchers'’ prayers, since, with a standard electrode potential of 3.04 V, it sits at the top of the electrochemical series. These new energy storage devices are ideally suited for modern portable electronic equipment, since they are light, small, and have an extremely high energy density, it would be wrong to believe that we have reached the end of the road: advanced battery development, espe- cially for laptops., is leading towards even more powerful energy sources and in a few years lithium battery tech- nology will be overtaken. The next generation in mobile power sources is already appearing on the horizon: the fuel celt, on which more later. A sensitive soul For a long lime it was thought that engineers would not be able to control the complex processes in a lithium cell* However, enormous amounts of research effort have finally paid off and now lithium batteries hove replaced nickel batteries in almost all key applications. However, as observant Elektor Electronics readers will know, it has until recently been practically impossible to buy Individ- ual Li-ion or Li-polymer cells. The reason is that it has nor been possible to equip lithium ceils with the 'charge reserve we mentioned earlier, and so they are extremely prone to damage. If a Li-ion or Li-polymer cell is even slightly overcharged, it starts to produce gases and can rupture (Fig u re 1). the gases produced are also extremely poisonous* If a lithium cell is heavily over- charged it can catch fire or, in extreme cases, explode. Since lithium is highly reactive, a lithium fire is very hard to put out. Water behaves like petrol, aggravating the fire, and must on no account be used on a lithium fire, li is better to use a fire blanket, a suitable extinguisher or even sand. Electronic protection The industry has replaced the 'charge reserve’ missing from lithium cells with intelligent protection circuitry. Fiaare ' When a Tj" Li-pj \ rr battery ;itf$ ruptured h - ,' 3 «. fa nazes, tee battery car, exptede. SSi Jj *4 it % llj IT r° tT_ nature _ he n :eg r atea na:: : ter'.r.g circuit* In industrial /rmium b j are ays rr^crcsrocssscr- t can ‘robed. short-circuit fuse tempers Lure sensor Connection lor protection electronics Figure 2. ‘■"o~ !cnrg L-steg Ffuitipk sensors p^ote c:-s tee battery m g v e re harg in g . ihese ore built into the battery pack (see Figure 2) and use a number of sensors to protect the cells against over- charging or short-circuit (Figure 3). In tests by consumer organisations these protected battery packs have been found to be safe. It would be irresponsible to dispense with the safety electronics: you may remember stories in -t TOOS-ebUit dstlrcnits 53 : 'j;: re - . Sch en i c~ c 0- Cv.vT=- bowery (source: Vartoj. Figure 5. Li -ten baffery- rc r laptops in 3S2P con rig \j ro ! c r, ( J 0.8 V terminal '■ dtogej 5S4P 6000mAh cluster of 4 parallel cells Figure 6. Labelling $0i0fie for Li-ion and . '-polymer catteries. 5 clusters in series Number before S lJ to be set on charger (here: 5) ~ 2 7. A piece o* tin is usually ordered to —e aluminium term's no ci o l -co r-r - J / t after v_ fiacre 3 4 id.& c 'ere of tope serves as a strain relief for *re ronnecOor v, ires the press about exploding Nokia mobile phones. Here cheap third-party battery packs were to blame w hich lacked short-circuit protection. Lithium-polymer ©n top Within the lithium family two members have been com- peting for superiority over the last two years. The market share of Li-ion cells has been fallrno steadily as Li-polymer cells gain ground. I he background to this is simple; Li-ion cells contain a liquid electrolyte and must therefore be protected by a rather heavy steel jacket. Li-polymer cells, on the other hand, use a polymer film to fix the electrolyte and can be packaged in lightweight aluminium foi ! (Fig- ure 4). [-polymer cells can therefore offer more energy in a smaller volume and are considerably lighter than Li- ion batteries. Nevertheless, the thin aluminium casing is easily damaged and so Li-polymer cells must be handled and stared carefully. The Flat construction of the Li-polymer cell which was described in the May 20 GO issue of Eiektor Electronics: mokes if easy to use in many applications. A wide range of Lhpolymer cells with capacities morn 250 mAh to 6000 mAh is available. Prices, however, are fairly high, ranging from £ 4 for a 350 mAh cell to £ 30 for a 2100 mAh cell, depending on She qualify, capacity and performance under bad. High demand, especially from modellers, has meant that over the last year many manufacturers and suppliers have started offering individual Li-polymer ceils or ready- assembled packs (generally without protection electron- ics). In this connection □ warning is in order: individual Li-polymer cells must always be stored out of the reach of children, since they look just like outsize strips of chewing gum osking to be unwrapped or bitten into. Pack assembly Li-ion and Li-polymer cells con be connected in series or in parallel. Figure 5 shows on industrial LMan pack for a laptop where cells are connected In parallel in pairs, three such pairs being wired In series. Figure 6 shows the standard markino scheme that has been developed , , — for these battery packs. If you wish to build your own Li-polymer battery pock,, there are a couple of problems to overcome, A particular inconvenience is that the positive terminal is made of alu- minium and cannot be soldered using normal solder. The manufacturer therefore attaches a small solderabce metal strip to the terminal (Figure 7) which, in accordance with Murphy's law, Is usually on the wrong side when It comes to assembling the pack. A better alternative Is to use a specie, aluminium solder, which is unfortunately noi cheap.. The thin terminal connections rend fa break easily and a strain relief must be fitted (Figure 8). To simplify the job of assembling packs, many manufacturers offer special solaerable circuit boards as an accessory, or pro- vide the cells with the connections already brought out to a small circuit board. Pure power Since Li-polymer cells are available in a range of differ- ent sizes and can be wired together info packs In various ways, some extremely high-power units have become available — of a price. The two Thunder Power Li-poly- 54 Olid d=cl[Gr;H - 4 '17 . 5 mer packs [see photograph of the beginning of this arli- cle] each hove a capacity of 6 Ah. a nominal voltage of 1 8.5 V and can be handle a continuous 8 C (48 A) iaadl The two catteries together can deliver over 1600 W, despite weighing only 1.2 kg. The pair of bat- teries costs about five hundred pounds. The best price-performance ratio is currently offered by the 850 mAh HDHE cells with a weight of "t 8 g pro- duced by Kokam. These can be discharged at up to 10 C (he., up fo 8.5 A) with peak bads up to 15 C. A hand-soldered battery pack constructed from these cells is shown in Figure 9. Here six cells are wired in parallel to form a block, and five such blocks are wired in series. The pack (5.1 An I 8.5 V, 30 cells) can deliver 5 1 A continuously with peaks up to 76 A, has a weight of 850 g and casts about Z 250 in total. ShorJ-circuit protection electronics Lithium batteries must be monitored both during charging and during discharge to ensure they are not overloaded. Measurements show that the cells in a lithium battery behove differently from one another both when charging (Figure 10) and when discharging (Figure 11). Indi- vidual monitoring of the cells is therefore recommended. The whole battery can be monitored using a circuit along the Sines of that shown in Figure 12: the sixcell battery shown requires just two extra wires to allow the cells to bs monitored individually. At present there is no standard for these extra connections. Same manufacturers use mul- tiple connectors (Figure 1 3),. while others use just a sin- gle extra connector [Figure 14). During charging a sacalled 'Li-polymer balancer circuit (Figure 15) is connected to the extra wires for individ- ual cell monitoring. The balancers route current past the fully-charged ceils and thereby protect the cells (or blocks of cells connected in parallel) from overcharging. This allows the battery os a whole to be charged further, by diverting the current to the other cells or blocks of cells. Li- polymer balancers do not by themselves prevent oven charging, but they do keep the cells in step with one another and thus increase the total energy available. Circuifs to monitor individual cells in lithium battery packs are still under development. The circuits that are gener- ally used interrupt the discharging of the battery as a whole when a voltage or 3 V per cell is reached. Li-poly- mer cells suffer permanent damage if discharged below 2.5 V, and so this threshold value allows tor a certain □mount of variation between the cells in the battery pack. Charging techniques lithium batteries, like lead-acid batteries, are charged at constant voltage. The charger must simply provide a fixed voltage of 4. 1 V per cell for Li-ion batteries with □ lithium cobalt oxide cathode or 4.2 V per cell for Li-poly- mer with a tolerance of 0.05 V per cel.. The current is given by the formula ‘ = (Mcharger “ Ubnti) / and falls to zero when the battery is fully charged. Over- charging is in principle impossible and the battery can be left connected to the charger for as long os desired, although for safety reasons lithium batteries should never be charged unattended. In order that the current is nor aaurs ?. Hand- made U- polymer battery using rnirty 850 mAh ceth in a :: J 6 P configuration. The 5.1 Ah, 18.5 V cc r '< be.Aer currents jo to 1 C C (51 Ah I l lima [5] Figure W T^e ir-ji vidua' := 5 "no L:\TC y-:~r cotter/ can reach jppsr inreshs d ‘ : w — ■ _> L_l J l_l ■ — - ce'.f 2 -.'sere ' The ce ! b ako- Ltsisa . behave r-rr D'rrererTry .v”e _ disc " urging . a r. 6 therefore mu if be rr ant fared indi* idua , F^ure 12. lihium !_r. re 's L'- : cn and i- pc'y mer: can be ru^i=z r ea h series cr in paracel The free re sno-vs the pr ~ : r. e w !h NiAH Figure . 3. E\ z ra connections are brought Cut J r a ibvr ‘Sur the . id l . 0 cells fo be monitored. ■? 2*105 - e :vtu; ='!=-:rr-"ics 55 About the author Ulrich Passern was bom 52 years to the day after the first powered flight by the Wright brothers. Inspired by his father (an airman) at an early age, he developed □ passion for constructing and fly- ing model aircraft. In professional life he found his second passion: electronics. After studying elec- trical engineering he started his career at a large computer company. After founding his own engi- neering consultancy for measurement technology, model building and profession came together in the development of a battery testing device, which was subsequently developed into o computer- controlled charger which was very successful bath In industry and in the world of model building. Meanwhile, Ulrich is once more working in the field of computers and regularly carries out compar- ative testing of batteries and chargers for the German modellers' magazine FMT. too high when charging begins (it should not exceed 1 C) cheap chargers are simply arranged to have a suit- able internal resistance. More advanced chargers pro- vide proper current limiting. It is thus very easy to build a lithium battery charger. Figure 1 6 shows the LiPo402 charger from Kokam, which easily fits in the pocket. This charger is microprocessor controlled and can be adjusted to suit various Li-polymer battery types. The Figure 1 4. U- co ■ ner batteries ..... .a crc r b^sc with a spec'ai a ~ ~ " sctjr b c< c w ~b '. ‘dbcJ ce .fs ‘a de rr&nitared. Figure 75. i f - po ! r, mer bo fencer -cu b fretec' me kattury from overcrarging a d eep be ce c _ : j b 5 r sc vh P: ddc I a r.o r her. Figure 16. The _ ;r b'4 2 by j -. c • " is r modem .i'--- roc: :r - 'ce' tot h_- _ -co . ms r taneris? price is around Fifty pounds. You can of course construct your own liihium battery charger, as Jong as you are careful to observe the exact voltage and current threshold values. Ageing Lithium batteries generally exhibit a very low self-dis- charge and can be stored far a long time without requir- ing attention. The inevitable ageing is minimised if it is discharged to about 20 = d of its normal charge and stored in a cool dry room (at about 10 degrees Celsius). Cycle life of modern lithium batteries is similar to that of other batteries: about 300 to 500 chorge/discharge cycles should be achievable without difficulty if the bat- tery is not abused. The 'memory or 'lazy battery' effect found in nickel-based batteries does not occur in liihium batteries, and so they need not be discharged before charging. The ©uflesk The power requirements of modern mobile devices are torever increasing, and all over the world research con- tinues at a feverish pace on a completely new type of energy source: the miniature fuel cel!. in 2003 Japan identified the fuel cell as one of the six technologies most important to the future of the Japanese economy. Almost as scon as this was announced, three Japanese companies simultaneously presented their plans: NEC. Toshiba and Hitachi already have function- ing fuel cells in their laboratories and are working on a schedule for mass production. Hitachi's PDA fuel cell should come onto the market In 2005. Mobile phone manufacturer Nokia is already testing Bluetooth headsets powered by a fuel cell. To prove their suitability ror everyday use the devices are being used in- house by a hundred Nokia employees. The long-term aim of the Japanese manufacturers is to replace all currently-used batteries with suitably-sized fuel- cel! equivalents. It is more probable, however, that the various types will coexist, as over one hundred years of history of the lead^acid battery shows. However things turn out, mobile power supply devices have an exciting future. 56 e!:bor P=nroni;s--S 'iGOS Comparison of energy capacities Normally the capacity of a battery is specified in Amp- hours (Ah). Using [his unit allows us to determine almost immediately how long a battery can continue to provide power under a given load. For example, to calculate roughly how long o standard 21 W bulb can be run from a fully-charged 44 Ah car battery: Web pointers The Following web sites have further information on lithium batteries, protection circuits and chargers. h ttp : / / www. P o w e r B ox- Sys tems.com I = P / U = 2 1 W / 1 2 V = 1 .75 A and 44 Ah / 1.75 A = 25 .1 h In order to compare batteries with different termina] volt- ages it is berter to work with the energy capacity of a cell in Wait-seconds or Wott-hours (Whj, and the specific energy in Wh/kg. The often (mis) used term 'energy densi- ty' usually refers to the energy per unit volume, rather than per unit weight. h ttp : // www. g ro u p n e r. d e http:/ /www. ikaru5-modellbau.de Lithium-sutphur beifteries Another development is lithium-sulphur [U-S] technology, which gives a cel! voltage of 2.1 V. This should not be con- fused with the lithium-sulphur dioxide (Li SO?] technology. The company Sion (www.slonpowsrcom) has developed □ prototype specified at 350 Wh/kg. This is a major advance in comparison with curreni commercially-available technolo- gies. The NiMH cells in ihe Toyota Prius hybrid car, for example, have a specific energy of just 46 Wh/kg The rel- atively high specific energy is not the only benefit of this technology: Li-S batteries can deliver very high currents, per- form well at extremes of temperature and in principle are immune to overcharging. Of course, there are also disadvantages when compared to other systems: after about 350 to 400 charge cycles ihe capacity or even ihe most modern Li-S batteries falls to about 8CW of its original value. For most applications a minimum of 350 charge cycles is specified, and 500 cycles is seen as a desirable target. One of the reasons lor the rapid ioss in capacity is an effect whereby the composition of ihe liquid cathode slowly changes. A film which forms on the fixed electrode during discharge afreets the characteristics of the battery. It is diffi- cult eg keep the ceil in a stable, effective condition. NiMH cells with a pressure switch Nickel-based rechargeable cells are ideal tor powering modern electronic equipmenl such as MP3 players, mobile communications devices or digital cameras, which require ihe cells to be able to deliver high currents for short periods of iime. The ath er side of the coin is ihe ienothy charging lime, or, alternatively the high cost of a charger that can charge the cells quickly without (even more quicklyi destroying them. Such 'intelligent' chargers invariably employ a micro con- troller and temperature sensors. Of course, microcontrollers with integrated sensors make rhe unit somewhat smoller and cheaper, but the next step, integrating ihe intelligence info (he cell, has foundered for reasons of cast. Rayovac (Varra) has recently developed the socalled [-C3 cell (' in-cell charge control') . which can be recharged with- cut using an intelligent charger in 15 minuies, and, lhanks to irs optimised construction . also offers longer discharge times. There is no electronics in the cell; instead there is a small mechanical pressure switch. This is not only economi- cal but also technically elegant: the pressure inside the cell is a better measure of its state ihan its temperature or its voltage. When the pressure reaches a set value (in the range 1 COO kPa to 3500 kPa), □ sprung disc at the anede breaks the connection: the cel! is fully charged. 15 min Figure 1 shows this arrangement in the dosed state, when the cell is being charged. When the cell becomes fully charged, the sprung disc moves and pushes the contacts apart, interrupting the current flow. Using this patented pressure switch It is possible to use rela- tively simple and therefore cheap fast chargers to charge a cell in jus! \5 minutes using □ current of up to 7.5 A, wlth- ■1/2005 - r!Ater rh-rrrcNs 57 2 Rapid charging Consumer AA cell 1,700 mAh 04016$ -11 out detriment to the life of the cell. Recharging parti ally- charged cells is not a problem either, since the current is reliably interrupted when the cell reaches full charge. The cost of the charging circuit is between 30 A and 50 % less than that of conventional fast chargers. The batteries oiso have a higher capacity [AA size 2.0 Ah, AAA size 0.8 Ah) and are hot significantly more expensive ihon 'nor- mal NiMH cells. Only about half the normal amount of anode material is required to absorb the oases produced during charging, which means fhai the cathode can be made larger, increasing the capacity of the cell. The I-C3 cells are not charged in a normal charger at con- stant current bus rather using a constant voltage: this makes the temperature rise less during charging (Figure 2). For safety reasons the I-C3 charger also includes a timer which stops charging offer 1 5 minutes, and a simple over-tempera- iure switch. The fine- safety measure Is an external vent as used in norma! NiMH cells which opens under extreme pressure to prevent the cells from rupturing under any con- ditions. Zinc-polymer The American company Zinc Matrix Power (www.zfiip.com) offers a new rechargeable battery with a cell voltage of 1,5 V based on zinc a materia! whose use in batteries is well established. Using a specially-developed polymer, capacities of up to 240 Wh./kg should be possi- ble. . he polymer is designed to prevent the zinc oxide which is produced during discharge from migrating around the ceil. Without the polymer, the zinc would redeposit haphazardly on the anode during charging, reducing its effective surface area, and thereby reducing the current that the cell can deliver. Th ere is □ further effect that complicates the use or zinc In batteries: the charging voltage causes the water in the elec- trolyte to be broken down into oxygen and hydrogen so unless precautions ore taken the cell wilt slowly dry out. In practice this means that environ mentally-harmful heavy met- als must be added to prevent the hydrogen being released. Currently mare environmentally-friendly additives are used, but These ore only suitable tor 'normal' cells, not : or rechargeable ones. Ileciric aeroplanes Electrically-powered model aeroplanes ore no longer a rare sight. Less well-known, however Is that recently electric aeroplanes capable of manned flight hove entered mass production. The first manned electric aeroplane flight was rn 1973 by an Austrian HB-3 'Crow motor glider, powered by o 10 kW Bosch DC motor and Varta NlCd batteries with a total weight of 125 kg. Constructor Heino Brditschka piloted the nine minute flight himself, reaching an altitude of 300 metres. The mass-produced aeroplanes are also motor gliders. Despite considerable improvements in battery technology, aeroplanes powered by electric motors are sill! limited to fly- ing short circuits and so have some way to go before find- ing many customers. Matters are different with modern motor gliders, which hove o mechanism which allows the motor and propeller to be retracted completely inside the fuselage behind the cockpit when gliding. Motor power h only needed far rake-off arid to gain altitude ready far glid- ing or ior assistance in still air and at the end of a flight in order to avoid landing far From base should the thermals die down. The conventional solution is a relatively low- power two- stroke engine and a small reserve or rue!. This has several disadvantages not shared by the electric system including noise unreliability' or operation (especially when 58 risris: f Errr-: - :cs* - 5055 sterling) and a relatively complex technology, including an electric starter, G propeller broke and a device to slop the propeller in the correct position all in □ very small space. The electric motor provides a more elegant solution. The battery unfortunately is nor as small or light as a fuel tank and stores ess energy. However, if an electric system offers enough power tor the particular requirements of the motor glider then success m the market is }mi a matter of price. The first electric motor glider with motor retraction mecha- nism was the AE-1 Silent by Air Energy of Aachen in Germany [w ww.airenergy.de) which took off on Its first flight in 1997 and received German type certification os an ultralight aircraft (12 m wingspan, 200 kg net weight) in 1998. The electric motor Is rated at 13 kW and weighs 8.5 kg 'while the NiMH battery weighs 40 kg and stores 1 .4 kVv h. Air Enero'. is currently working on o derivative using considerably more po werful Li-ion baiteries. The move from NiMH batteries to Li-ian batteries has already been made by Lange Hugzeugbau at Zweibrucken in Germany jwvAv.langeTlugzeugbau.cam) in their An tares motor glider which mokes optimal use of the available tech- nologies and which sets a new standard among such craft. The propulsion system uses a brushless permanent magnet DC motor with an external rotor with a rated power of 42 kW a torque of 250 Nm and an efficiency or 98.5 c =(l], weighing only 28 kg. The motor was developed at HTA Biel in Switzerland, Seventy -two Safi [www_50ft.fr) VL 41 M Ll-icn cells are used for energy storage. The indi- vidual cells have □ capacity of 39 Ah at 3.6 V, far a total of about 76 kg. The An T ares con climb to 1 000 m in under four minutes and to rhe maximum 3000 m in 13 minutes. Without thermals this altitude is sufficient T or 1 ,5 hours of gliding and gives a range or over 150 km. The electronics handles propulsion system control and battery monitoring on a includes a built-in charger [8 h charging time at 230 V), The Sort VL cells used here should achieve a life of 1000 cycles over 1 1 years. Information on the cells and a data sheet car be found at wvAV.5aft.fr. of 1 0. 1 kWh at 260 V with a weight Of course, people's minds have already turned to ihe possi- bility of electric ceropfanes powered by fuel cells. An American team supported by Boeing originally announced that they would make a first flight on 1/ December 2003 (the hundredth anniversary or powered flight), bur at the time of writing there ore no indications that a successful flight has ye* taken place. 4. 2C05 - sir 1 fit cizdtedtt 59 increasingly common in new electronics equipment. They are superior in terms of both size and weight compared to NiCd and NiMH batteries. However, the charging method for LiPo cells is completely different from other battery types. In this article we present a simple but effective charger for this type of battery. 60 ikJtfer ftroTiks * | j 2C05 Lithium-polymer batteries are fre- quently used these days in small elec- tronic equipment such as cellphones, PDAs and the like. In these applica- tions it is important to toe manufac- turer that the battery being used is as small and light as possible. It is also important, of course, that the battery has enough capacity so that the user does not need to charge it every day. Taking all these considerations into account, you will quickly arrive at LiPos (Lithium- Polymer batteries). Tnere are. however, a few disadvan- tages when using LiPos. Not all LiPos are able to deliver large currents. They can usually deliver a maximum current of IOC (see inset). There are notable exceptions, however, some LiPos being able to deliver 20 C or 30 C of current 1 Another important consideration that needs to be taken into account is the CHARGE: Q.SCmA, CC/CV, 4.2V P 1/20CmA Cut-off, at 23 n 2 ; C TIME [min] KOD1Q - 12 Figure LCharging characteristic of a UPo cell. At a constant charging current the cell voltage rises slowly to 4.2 V! Figure 2. Jhe schematic consists of the charger section a round the special charger tC type LTto W and an indicator section around /C2a/fa. 4 2Q05-d=Ucr ekctrtnics 61 CURRENT [mA] & CAPACITY |mAh] Figure 3 , The FCB for the charger makes construction very straightforward [ ftememfcer to fit ihe wire link between K2 and C2. COMPONENTS LIST Resistors: R1 = 49kQ9 1% R2 = 1 2k04 1% R3 - 2700 R4 = 1 fkQ3 1% R5 - 4kQ87 \% R6 RS R9 R14.R1 8 = IkO R7 = IQ 2W RIO = 3GIkQ 1% R1 1 = 174kO 1% R12 = IkQ5 \% R 1 3 = ion Rio - 12 Ikn 1% R 1 a = 60kO4 1% R17 = 30kni ]% different charging method. In addition, LiPo batteries are very sensitive io in correct use. It is not entirely impos- sible that this type of battery can catch hie or even explode when used incor- rectly! So. when designing a charger for LiPo batteries, a few rules have to be obeyed. Charging M e iik ei When charging a LiPo battery, two things have to be monitored, namely the current and the voltage. Manufac- turers always supply a recommended charging current in terms of C (nomi- nal capacity in ampere-hours). This value is usually in the range from IC to 20. In addition, the maximum voltage may never be exceeded. This is (depending on the manufacturer) 4.2 or 4,25 V per cell. Our charger is actually a power supply that is both current and voltage lim- Ri 9 - IkQ ]% R20 - 27kO R21 = 4kn7 Capacitors: C1.C5 = IOilF 25V radial C2.C3.C4.C6..C9 = lOOnF C7 - 1 pF 25V radial C8 = 2uF2 25V radial ClGXZil = 680nF Inductors; LI = suppressor coil 35uH >2A (e.g. Dig i key # M5727-ND) Semiconductors: DT - 1N5400 [e.g., Digikey# i N 5 4 0 0 R LOSC T-N D) D2,D3 = 3 1DQ04 (e.g. Dlaikey # 3 1 DQ04-ND) 04 = [ED. red taw-currenl ited. A typical charging curve for a LiPo battery is shown in Figure 1. The current is cons rant at the beginning of the charging cycle. While charging, the voltage increases slowly to about 4.2 V From that moment on, the voltage remains constant and the current will decrease slowly The charging process is just about completed when the current has dropped to about 0.0 5C. At that point the batter, 7 is nearly full and any addi- tional charging is happening only very slowly. The circuit Figure 2 shows the complete schematic for the charger. At its cen- tre is an IC from Linear Technology, the LT151Q. This IC contains a step- down converter together with a cur- rent and voltage limiter, so that for a D5 - LED. green, low-currenl fCl = L i 5 1 CCN (Linear Technology, \vwwJi near, cam] lC2 = TLC272CP [e.g., Digikey # 296- 1 824-5-ND) IC3 = LM385BLF’2,5 (e.g. Dial key n 296-9559-5-ND) T1 = BC557 Miscellaneous: 5 1 r S2 = switch, an/off K1 = 2 -way FCB terminal black, feed pitoh 5mm K2 = 1 0-way (2x5) plnheoder with 1 jumper fill = 2 PCB solder pins [battery connection] 1 wire link Enclosure , e.g., Hammond type 159 IB FCB ref. 050010-1 available from TheFCBShoo i complete charger, only a handful of external parts have to be added. Because of the step-down converter, the charger is quite efficient and no additional heat sulking is necessary. The converter requires only an exter- nal inductor, diodes and a capacitor for the boost circuit. The regulator oper- ates at a reasonably high frequency (about 200 kHz), so the inductor (LI) can he quite small. Adjustments The charger, as drawn here, is intended for two LiPo cells in series. The maximum voltage of 4.2 V per cel 1 must never be exceeded. That is why we have selected a maximum voltage of B.2 V (4.1 V per cell). This adjust- ment is accomplished until resistors R4 and R5. The IC ensures that the volt- age at pin 5 (OVF) does not exceed 2.365 V. Toe voltage at QVP is equal to: 62 clffStbr cEidredo ■ 4 20 jS Current, C and batteries Whenever we ore discussing batteries, the term r C appears aver and over again. For many of you. Shis may cause contusion. However the concept is quite easy. The term 'C is used ro indicate the amount or charging and discharging current or a battery. With inis i C is the current that a full battery can deliver for a continu- ous stretch of one hour. Wish a battery of 1000 mAh ihis is therefore a current or 1000 mA (1 A). If we charge the ceil with 0.5C in theory it can deliver fhis cur- rent For two hours. An important property of a battery is its capacity [expressed in mAh] and iss cur- rent raring (the maximum current that a battery con supply, usually expressed in C). Common values ore 2C 10C end 12C. For instance, assume you want to use a LtPc battery for your own circuit that requires □ peak current of about 1 A. The battery has to be able to supply this cur- rent. The manufacturer offers several type or LiPo, each rated for a maximum Scad current or 2C. Our battery therefore, needs to have □ minimum capacity' of 500 mAh (2C = 2 x 5CQ = 1000 mA]. Only Shea you can be reasonably confi- dent that the LiPo battery can actually supply this current! V OVP = V batc x R5/(R4-R5) When the voir age across the battery Is equal to 3.18 V, the voltage at pin 5 will be 2.47 V. In this way the iC ensures that the voltage cannot rise any further and the voltage across our battery can- not become too high. If the charger needs to charge three ceils in series, we can easily adjust the value of R4 so that the iC will limit the voltage at 4. 1 x 3 V. Ar a value of 19k6 for R4. the voltage will be limited at 12.39 V. This is equivalent to 4.13 V per cell. Since the cells are very sensitive to the applied voltage, as already mentioned, it is very important that R4 and R5 are resistors with IT: tolerance. That way, the worst-case voltage will ultimately be no more than IT- greater than intended. Also, the IC itself is not 10Q : : accurate. That is why we designed for a cell voltage of 4.1 V instead of 4.2 V. We can now be sure that the maximum voltage will not he exceeded! Since we are using a step-down regula- tor, the circuit needs to be supplied with a voltage that is a few volts higher than the desired charging volt- age for the battery. Consequently, a battery with two cells in series can easily be charged with a power supply voltage of 12 V When there are three cells in series, the power supply needs to increase ro a minimum of about 15 VI Current The adjustment of the current is done simply with a resistor between ground and pin 13 (PROG) of ICL C7 and R3 are necessary to stabilise the regula- tion loop: never omit these compo- nents! When switch 31 is open. R1 determines the maximum current that the IC will deliver. The formula is: ! :=:w = 2.465 ■ (2000 /HI) or Rl"= 2.465 x (2000 I_ = _ : ). in out circuit Ri has a value of 49k9. This sets the current to about 100 mA. When switch SI is closed, the IC 'sees' a resistance value equal to the parallel value of Rl and R2. In this case, we have 49k S in parallel with 12k4, result- ing in a resistance of about 9k93. Using the above formula, a charging current of about 500 mA is obtained. If you would like to increase the charg- ing current, be aware that the peak currents are much higher than the pro- grammed average current. This current flows, among others . through Dl, D2 and D3. the inductor and also the IC, In addition, you have to make sure that the recommended charging current of the battery is not exceeded! Charging Indicator A disadvantage of the LT1510 is that there is no output available indicating how much current the IC is actually delivering. Tills would he a useful indi- cation as to whether the charger is still doing something. To still be able to measure the current, resistor R7 is included in the current loop (the volt- age drop across R7 is, after all, a meas- ure of the output current of TCI). The voir age across R7 is amplified by opamp IC2a. IC2b compares this sig- nal with a fixed voltage of 2,85 V. When the voltage at the inverting input of IC2b is lower than 2.85 V, the opamp will rum on the LED. indicating that the current has dropped below a cer- tain value. The measuring method used here is not very accurate but suf- ficient to provide an indication of the state of the charger. If desired, resistor R7 can be replaced with an accurate ammeter. The voltage gain of IC2a is adjustable with a jumper on K2. This jumper selects the resistor value for the feed- back resistor for this on amp and thus the voltage gain. Next to K2 is shot™ to what value the current has to be reduced to (approximately) in order for LED D5 to come on. Construction of the circuit Figure 3 shows the PCB layout designed for the LiPo charger. The design is quite spacious so the mount- ing of the parts should be easy. Note the polarity when fitting the diodes, electrolytic capacitors and ICs and don't forget the wire link between K2 and C2. IC2 can be fitted in a socket, but is better if TCI is soldered directly in the board (or use a good quality socket with turned pins! 1. Fit a jumper to K2 for the desired cur- rent for the LED indie aror. It is best to choose a value close to the C/10 rat- ing of the battery. The circuit is now ready to charge a battery. The batter/ is connected to pins BTL Now con- nect a mains adapter (which has ro be rated for the desired output cur- rent) to K1 and plug it into a mains outlet. During the charging process, you can check the proper operation by measuring the voltage across rhe battery (8.2 V maximum with two cells) and the voltage drop across R7 (a measure of the charging current, 0.1 V at 100 mA), if this is all correct, you can build the circuit into an enclosure with a few suitable connectors for the power sup- ply and the battery. This makes it much more convenient when moving it around. 4 2CD5 - Tw:t TaifcTn 63 Quasar Electronics Limited PQ Box 6535, Bishops Sfcrtford Ci. '23 4WP, United Kingdom Tel: QB7Q 246 1826 Fax: 0B7O 4GG 1045 E-mail: sales@quasaretectronics.com Web: www.Qua sa rE lectro n ics.co m Postage & Packing Options Up ?s 2 Kg s'ossv.e gc: UK Standard 3-7 Day Delivery - £3.55 UK Mainland Next Day Delivery - £5 £5; Europe (EU) - ££ 55 Rest of World - £5 55 'Order online for reduced price UK Postage! We accept ail major credfadebit cards, Make chequsSiFO's payable to Quasar Electronics. Prices include 1 7.55 5 VAT Call now for our FREE CATALOGUE with details of over 300 kits, projects, modules and publications. Discounts for bulk quantities. QUASAR electronics Get Plugged Ini Motor Drivers/Controllers Hera are just a few of our controller end dm er modules for AC, DC. unipo tar/bi polar stepper motors and servo motors See website for full details. NEW! Bidirectional DC Motor Controller Controls the speed or most common DC motors (rated up to 32VDC/5A) in both the forward and re- verse direction. The range of control is from fully OFF to fully ON in both directions. The direction and speed are controlled using a single potentiometer. Screw terminal block for connections. Kit Order Code: 31 6GKT - £14.95 Assembled Order Code: AS3166 - £24.95 DC Motor Speed Controller (5A/100V) Control the speed of almost any common DC motor rated up to 100V/5A. Pulse width modulation output for maximum motor torque at all speeds. Supply: 5-15VDC, Box sup- plied. Dimensions (mm): 6GVte1Q0l_x60H, Kit Order Code: 3067KT - £11.95 Assembled Order Code: AS3C57 - £19.95 NEW! PC / Standalone Unipolar Stepper Motor Driver Drives any 5. 6 or 8-lead unipolar stepper motor rated up to 6 Amps max. Provides speed and direc- tion control. Operates in stand-alone or PC- controlled mode. Up to six 3175 driver boards can be connected to a single parallel port. Supply: 9V DC. PCB: 80x50mm. Kit Order Code; 3179KT - £9.95 Assembled Order Cede: AS3179 - £16.95 Assembled Order Code: AS31 1 3 - £24.95 NEW! Bi-Polar Stepper Motor Driver Drive any bi-polar stepper motor using externally sup- plied 5V levels for stepping and direction control. These usually come from software running on a computer. Supply: 8-3QV DC. PCS: 75x65mm. Kit Order Code: 31 58KT - £12.95 Assembled Order Code: AS3158 - £26.95 Most items are available in kit form (KT suffix) or assembled and ready for use (AS prefix). A CREDIT CARD SALES Controllers & Loggers Here are just a few of the controller and data acquisition and control units we have. See website for full details, Suitable PSU for all units: Order Code PSU445 £8.95 Rolling Code 4-Channel UHF Remote Siate-of-lhe-Art High security. 4 channels. Momentary' or latching relay output. Range up to 40m. Up to 15 Tx‘s can be learnt by one Rx (kit in- cludes one Tx but more avail- able separately). 4 indicator LED s. Rx: PCS 77x85mm, 12VDC 6mA (standby). Two and Ten channel versions e/so available Kit Order Cede: 31 8QKT - £41 .95 Assembled Order Code: AS31 80 - £49.95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port. C C or C F. Continuously togs up to 4 separate sensors located ^ 2Q0m+ from board Wide range of free software appli- cations for storing using data. RGB just 38x38mm. Powered by PC, Includes one □ SI 820 sensor and four header cables. Kit Order Cede: 31 45 KT - £19.95 Assembled Order Code: AS3145 -£26.95 Additional DS1 820 Sensors - £3.95 each NEW! DTMF Telephone Relay Switcher Call your phone number using a DTMF phone from anywhere in the world and remotely turn on of? any of the 4 relays as desired. User settable Security Password, Anti- Tamper, Rings to Answer, Auto Hang-up and Lockout. Includes plastic case. Not BT ap- proved. 130x110x30mm. Power: 12VDC. Kit Order Code: 314QKT - £39.95 Assembled Order Code: AS3140 - £49.95 Serial Isolated 3/0 Module digital inputs. Useful in a variety of control and sensing applications. Controlled via serial port for programming (using our new Win- dows interface, terminal emulator or batch files). Includes plastic case 13Qx1G0x30mm. Power Supply: 12VDC/5QGmA. Kit Order Code: 31 03 KT - £54.95 Assembled Order Code: AS310S - £64.95 Computer controlled channel relay board. 5A mains rated relay outputs- 4 isolated * *■ ■■ * *■ p- ** * ■* *■ Infrared RC Relay Board individually control 12 on- board relays with included infrared remote control unit. Toggle or momentary. 1 5m+- range. 1 12x1 22mm. Supply: 12VDC/0 5A Kit Order Code: 31 42KT - £41.95 Assembled Order Code: AS31 42 - £51.95 PIC & ATMEL Programmers We have a wide range of low cost PIC ana ATMEL Programmers, Complete range and documentation available from our web site. Programmer Accessories : 40 -pin Wide ZIF socket (ZIF40W) £15.00 18V DC Power supply (PSU010) £19.95 Leads: Parallel (LDC136) £4.95 / Serial (LDC441) £4.95 f USB (LDC644) £2.95 ij* E U NEW! USB ’All-Flash* PIC Programmer US8 PIC programmer for ail Flash' devices. No external power supply making it truly portable. Supplied with box and Windows Software. ZIF Socket and USB Plug A-B lead not incl. Kit Order Code: 31 28KT - £34.95 Assembled Order Code: AS 31 23 - £44.95 Enhanced “PiCALL v ISF PIC Programmer Will program virtually ALL 3 1 to 40 pin PICs plus a range /f of ATMEL AVR, SCENIX SX and EEPROM 24C de- vices, Also supports tn Sys- tem Programming (ISP) for PIC and ATMEL AVRs. Free software. Blank chip auto detect for super fast bulk programming. Available in assembled format with ZIF socket only. Assembled Order Code: AS31 44ZIF - £64,95 ATMEL SSxxxx Programmer Uses serial port and any standard terminal comma program. 4 LED's display the status. ZIP sockets not included. Supply: 16-18VDC. Kit Order Code: 31 23KT - £29.95 Assembled Order Code: AS31 23 - £34,95 NEW! USB & Serial Port PIC Programmer USB/Serial connection. Header cable for ICS P. Free Windows software. See website for PICs ■ supported- ZIF Socket/USB Plug A-B lead extra. Supply: 18VDC. Kit Order Code: 31 49CKT - £34.95 Assembled Order Code: AS31 49C - £49.95 www.qu Secure Online Ordering Facilities Full Product Listing, Descriptions & Photos 1MB buffer memory High speed USB 2*0 Interface Advanced display & trigger modes Compact & portable Supplied with Pi coScope & PicoLog software 3204 3205 IDObWc 3205 SMftJl it- S. 5 G£ = ftOGUSh 2 fEa 24 Ek In ?tl*t to SlUih Uihb- 54|4 tn 50 * OldSSMHt r ‘ y T ‘ asexe OtnSOUHt #fctu - 34 * t ioobV ib ■ sam Tel: 01480 396395 wwiw.picotech.com/scope255 usa o ! ua i i Technology Umiud The PicaScope 3000 series oscilloscopes ore the latest offerings from the market leader in PC oscilloscopes combining high bandwidths with large buffer memories* Using the latest advances in electronics, the oscilloscopes connect to the USB port of any modern PC, making fell use of the PCs' processing capabilities, large screens and familiar graphical user interfaces. * High performance: lOGS/s sampling rate S 200MHz bandwidth PicoScope 3000 Series PC Oscilloscopes- lekto lectironik-is Flash Microcontroller Starter Kit Elektor Hardware & Software Contents of Starter uiiiumuB ^ £ 69.00 / US$ 112,50 (plus postage) an* fif * !i < 8 i Step into the fascinating world of microcontrollers 89SS252 Flash Microcontroller board (ready-assembled and tested PCB), 300-mA mains adapter, serial cable for COM port an a software bundle on CD-ROM. Article compilation on CD-ROM: * 89S8252 Flash Microcontroller Board (December 2001) * Microcontroller Basics Course parts 1-6 ( January through June 2002) * Microcontroller Basics FAQ (September 2002) * Port Line and ADC Extension for 89S8252 Flash Micro Board (December 2002) * Chess Computer using the Flash Micro Board.. Order now using the Order Form in the Readers Services section in this issue* Elektor Electronics (Publishing) P.O. Box 190 Tunbridge Wells TN5 7WY England Telephone +44 (0) 1580 200 657 Fax +44(0) 1500 200 616 See also www.elektor~elec1foniDS.co.uk ' Zi -55 * s'sttJuniis 65 For rapid development of electronic systems... BLOCKS E-t-ocks ana smsli circuit boards each of uTiIcft contains 3 fc-'nc* cf electronics typically fourtd in sn electronic system. E -blocks can be progra.Tfced in C, Assembty and are tightly integrated wuh Bowcod© - v-iilch instancy converts flow charts Into rtCm'coo coca Low cost USB PIC programmers [SiATJTQ ai£27, EivjflTt EE-5) ...and Hands on training courses ..plus a wide range of ......plus incredibly easy ...equals extremely rapid system add-on boards and to use software based on development: like Ih s mobile text massaging accessories... flowcharts... system built from E-b locks . Resources for learning Complete courses in CPLD programming electronics and programming Equipment for datalogging, control and PC 'scopes training courses tn PICmicro{R) programming. CPLO programming ar-d ECAD c -n ►£ B^r 1 . T:' ...and more at: Matrix Multimedia Limited s ale s@ m atrixm u I timed i a.co.uk L 0870 700 1831 f. 0870 700 1832 p ■ Number One Systems Easy-PC version 8 just gets better Winning accolades the world over. Easy-PC for Windows V8 is a major milestone in the evolution of this extremely popular software tool. Try a demonstration copy of Easy-PC and prepare to be amazed at the power, versatility and remarkable value for money. Version 8 fetaures □ Sketch Mode Routing □ ODB+t Format Export Li Import Bitmap H Single-Sided AutoRoute LI Customisable Toolbars i Auto Smooch & Mitring of tracks □ Wires & jumpers □ Unified Quality Check Plus lots more. Fully integrated Schematics & PCB layout in a single application complete with forward and back annotation. Design and rules checks at all stages ensure integrity at all times. Professional manufacturing outputs allow you to finish the design process with ease. Stop press... Stop press... Stop press... Stop press... Stop press.. By customer demand now with Eagle import as well asTsien Boardmaker 2 impor cal] for a brochure, prices & CD on -44 (0) 1684 773662 or e-mail 53 Ses@numberone.com you C 2 n also download 2 demo from www.numberone.com W mdia Jr Mi f*tr Hi □rifisttE-b 1 It, :oii hr= =iL r.’l'-Z-.i Number One Systems - Oak Lane - Bredon - Tewkesbury - Glos - United Kingdom - GL2G 7LR UK 66 news & new products Support for Silicon Labs CB051F12X and €8051 FI 3x MCUs Crossware has added full sup- port to its 8051 Development Suite tar the Si. icon Laboratories (v/ww.sila bs.com) C805 1 F I 2X and C8051F13X mixed signal microcontroller units (MCUs). The Silicon Laboratories chips feature advanced pipelining and caching and a phase locked loop which together allow tine core to run at up to ICO MIPS. A multiply and accumulate (MAC | engine can also perform a 1 6-bit signed multiplication in two cycles. The Crossware enhancements allow developers to rapidly exploit the advanced features ot these chips by providing □ than ough combination or wizards, simulation debugging, compiler extensions and pre'Configu ra- tion. Code Creation Wizards are provided for ail on-chip peripherals. They allow the phase locked loop to be rapidly configured to exploit the 100 MIPS maximum perform- ance and with trie compiler and libraries using multiplication code that exploits the MAC engine developers can instantly take full advantage of the speed oFfered by ihess chips. The Crossware environment is fully pre-can tig urea to take advantage of the MCUs 128 kByles of in-sys- tem programmable banked flash and when simulating ana debugging ihe bank- ing process is virtu- ally transparent to the developer. In addition, the flash memory Code Cre- ation Wizard will generate all the cede necessary to erase and rewrite flash memory during pro- gram execution. Cross wore* source level debugger drives the Silicon Lob ora to ries’ JTAG emulation cartridge directly, i his allows it to moke use of the full range of on-chip debug Facilities including the hardware data breakpoints and hardware stack overflow and underflow trao. Crosswares 8051 development suite includes a full featured ANSI C compiler, a relocatable cross-assembler, an advanced overlay linker a state of the art source level simulator that can be extended to simulate a com- plete target system and a debug monitor which supports source I eve I debugging on ihe target sysTem itself. Ail of these inte- grate imo Crossware's Embed- ded Development Studio devel- opment environment to bring Together the only single vendor tool set that con oe used to develop an d fully debug 805 1 programmes both with and with- out 1 hardware. Gosware Products, Old Post House, Silver Street, Lit ling ton, Royston SG8 OQE. Tel (+44) (0)1763 353330. Website: VAVw.crossware.co.uk Sweeping Changes in your Application Lascar's new SP5 I 7 1 OBL has a large clear LCD that shows a 1 7-posilion analogue style dis- play. Essentially a voltmeter with a full scale deflection of I V this module con be used in many places where a quick indication or level rather than an exact reading may be required. The needle on ihe 5P5 l 7 1 0-BL can be centre or left justified to suit a variety ci applications and ihe LCD features a permanent colour scale ond markers to help gauge the STatus or the measurement. The ui:ra low profile, splash proof housing aiso contains a vivid green LED backlight that allow* the module io be seen in all environments. The P5 1710-BL has been designed tor ease ot use in small and hioh volumes. It is a val fable directly from Lascar at a price of £21.95 plus VAX. [□scar Electronics Limited, Module Hose, Whiteparish, Salisbury, Wiltshire SP5 2SJ. TeL (+44) (0)1794 884567, Fax (+44) (0)1794 884616. Website: wwwjascarelectrDmcs.com 4 2005 -Elf !.[■:+ elsElicnici 67 start here 12V Spark Transmitter Markus flindhammer In 1896 Marconi successfully covered a distance of about 3 km using electromagnetic waves. A little later, he established radio contact across water between Lavernock Point, South Wales and Flat Holm Island. The trans- mitter consisted of a spark indue* tor coupled to a dipole antenna. At the receiver side, he used another dipole and a glass tube Riled with silver and nicks! Filings, the scrolled coherer. The Filings enabled the coherer to act os a ‘defined" bad contact wish the RF pulse energy 'rattling' the contact and thus driving the audio ampli- fiers connected to She output. The circuit shown here operates on he same principle. Admittedly it dees not cover the same dis- (ante as Marconi's extensive radio equipment, but then you do not need to start Filing away on the family’s silver cutlery! The transmitter consists of an empty (I) disposable cigarette lighter with □ piezo spark mechanism. On the gas nozzle of the empty lighter you solder a 30-cm long, 1 -mm diameter (20 SWG] solid brass wire which acts as an antenna. When the spark button is pressed, the antenna briefly radiates electromagnetic energy in the VHP PM Frequency band. The effect is easy to verify by holding the transmitter dose to an PM radio and 'firing' it! Compared with the primitive transmitter, our receiver is a more up to date design realised in 'oil solid-siate" electronics. A tele- scopic antenna picks up the tronsr matter's RF energy and applies it to a resonant circuit consisting of an inductor and o capacitor. The electrical signal is rectified by a Germanium diode (AAxxx or OAxx) and amplified by a dar- ling fan stage. The collector oF the second transistor causes voltage changes at pin 4 of the bistable (flip-flop) 1C type 4013. The receiver sensitivity can be adjusted using preset PI. Each time the transmitter sparks away, the Pip-flop toggles and switches the LED on or off. As a circuit vari- ation, you may want to use a relay instead of a LED to allow lamps, a TV set, motors or actua- tors to be switched on and off using your primitive' spark trans- mitter. Your friends will be impressed. Flashing Light with Dimmer Myo Min Most cheap emergency flashing lights at Fixed locations employ glass-based bulbs to generate light. The typical filament bulb is fragile, has a short lifetime and requires a (relatively) high volt- age. Ta overcome these disad- vantages, the author designed the above circuit, using □ solid- state light source, a dimmer function and readily available ICs, all aiming at maximum compactness. In a Poshing light unit ultra-bright LEDs hove distinct advantages over normal LEDs and or course glass-based bulbs. 1C 1 with Rl, R2, PI and Cl supplies the pulse width modulated (PWM) sig- nal that will drive the uftrabrights ai a constant frequency. PI allows you to adjust the bright- ness. Additional drivers are not necessary as the NE555 can source currents up to 200mA. If you need mare light aurput, sim- ply add some more LED strings R3 r D2-D6); up to 8 strings may 33 connected in parallel with the one shown. 1C 2 with P2, R4 and C4 forms another osrable multivibrator that sinks the LED string current according to Flash rate. Preset P2 controls rhe flash rate. C2 and C3 are decoupling capacitors to ensure stable opera- tion at high and law frequencies. The circuit is best powered by a 12 VDC adapter with regulated output, or a step-up converter cir- cuit around, say, a MAX761 and same AA batteries. For the latest blue and white LEDs, it is neces- sary to consider curreni limiting resistor. R3 r and the number of LEDs in the siring. For 1C! the PWM frequency is calculated tram F = (1 .44 / (PI Cl)) The frequency must be greater than 5 kHz to eliminate flicker effects. For IC2. the design equation is the some (but using 'he values of P2 and C 2 ) . The flash rate should be adjusted between 0,5 Hz and 5 Hz. 63 dsteks -T2C0S u £ tj Rev Counter for Moped s Peter van der Ma are! Older mopeds are not usually fit- ted with □ rev counter, which is a bit of a shortcoming- The mak- ing or finding oF a suitable indi- cator instrument or display is often the greatest obstacle for the hobbyist. The author of this circuit has devised a practical solution to this problem in the shape of a (cheap) bicycle com- puter. Such bicycle computer is easily attached to the handle- bars and it usually has a large and very readable display. The moped engine's generator is used fa detect the rev speed. The generator is connected directly to the engine drive shah and generates an AC voltage for the on-board electrical system. The frequency of this voltage corre- sponds with the rev speed of the engine. This frequency, however, is tod high to be used directly by the bicycle computer. The solu- tion For this is to divide the fre- quency of the signal by 16, using a binary counter of the type 7493, before connecting it to the cycle computer. The generator signal is first rec- tified by Dl, R1 and D2 and then limited to 2.5 V. Transistor T1 turns if into a usable logic signal. Counter ICl contains tour flip-flips, one after the other, which divides the signal by 16. This signal drives, via T2, the white LED D3. LDR R6 reacts to the blinking LED and is connected to the cycle computer in place of the supplied wheel sensor. The generator signal also sup- plies the power for She circuit. D4/C1 provide rectification and Filtering, after which the voltage is regulated to 5 V by T3 and D4 T For a correct read-out (calibrated rev counter), the bicycle com- puter needs to be adjusted for a wheel circumference of 889 mm or 89 cm (wheel diameter 28 inch]. Make sure that when building the circuit if is suitably protected against vibration and moisture. Mount the LED and LDR directly opposite each other and keep in mind that they need to be well shielded from ambient light. 4 3005 - dd.tar electronics [Source Level Debug. ant Driver Support with ibraries. Time Multitasking OS with free run time licence Unlimited email support i -Ti i f » ’ 1 ~v[ n LjTbblii 1 M I ■ ! i :Tjf &7n jT gS*s § uh fjtfl ■« . L j \| L'Tjj. i J 1 Vi ftTnl [i] ihft* th] Tt| ] Y=k ff l * 1 FrJ - > \ - i L KiTl n E i 1 n ISI ( y compiler, assem sr al Wi ndows32 basei T ■ ' ■ _ v‘ . -yJ 1 ( ; ; www. ans. uk. com see our web site for full details CAMBRIDGE MICROPROCESSOR SYSTEMS LTD Unit 17-18 Zone 'D' Chelmsford Rd. Ind. Est Great Dunmow, Essex CM6 1XG Telephone: 01371 875644 email: sales@cms.uk.com E-OM1UNE Pick: your micro What things can you do with a microcontroller? Which type do you need for a particular application? Where do you obtain one? These questions are not easy to answer, that is why a number of manufacturers provide a helping hand. 3 wuunmiBxiligknii 1 Ac i ionssf r SfmiftwtftrtiQr bl^lllUM illiJJ ir.iil S-t*., 1 K1 i^UNi • Uut ^i Vijj ir ^ Ttl-1 i 4<.ek 'r-, r a J -Mr rr.i J ■ ini . 4r_— r iM i-V " T “ ” r J - t j ,i_* „ : i*. liauf *ijk ■ ■ L£T ■ - It-.. Iicrjrp — u; • it IIS :u* ci i kF T- iits Hr “ ■■'."'I P n rur u t > - up ' ~ T ~ — ns7 ■4- « i *“ ^ Pa ---. : 8_ l 4 n't hLi i I T .'Ic 5 *iT ■ ■■•-Mil, =■ *Tzri --P* :i» S — . : . ~ “ - ■ - but 3 cm rr_: ■ i i.raj ■ uiui i ”l- B.ir t * iiniii Bid Jr* ti ^3J_m izrtrulu^ *—z =ir.u i Cl Ltd,: I P i.nU ■_ l-iinui h r *■_ *b-, l&riiw wA fA T* Fi-s TA ' «: >-:nic I jp± r.; *13 : I =. -2-iiE U*_ . «=rtr=a«- t- r— "= * e- ^c- jn: ^ ^ 1- =-T __l= 3 “ - ■ : "Esr.^3 *0M 13 =,□ JTlZ I.- , “ _ &*£* >LuE i* - 1~- JJP Jkl IiE te Z • - :zz ± : -!*£ J*zn ■ mr*.* *m= j.i_ -Am. BTrr ik Hpun 'iu SEP^O* £-c ifii ■ i % "a t l ^ .. s t j£ jt:- |Lt * 1 =e rr ... I ‘ECT It k= = hEE IP «14 ’"ri-J 1 - i :w vrz 4- i7*— *■ r-- ifT-^iru y tit - %±± :iL.l lim W i-P Q - "All sorts of things "; "Well, pick something, it all depends on what you want"; " Order on-line or from your friendly retailer around the corner../'; These are the kind of answers you could expect from someone who deals with these things on a regular basis. Well, that was a great deal of help! And what now? Elsewhere in this issue ihere Is an explanation of the things you need to keep in mind when selecting a micro controller. There we show a handy list of web addresses that you can use when looking for the 'best' microcon- eW*M Elertro.nl rs ■ 4/1005 trailer for your application. There is unfortunately no (free) website to be found where you can enter all the parameters for o particular application and which subse- quently suggest a chip type, manufacturer and supplier. At EEM ICmaster [1] under the link "microcontroller it is possible to do a parametric search per manufacturer However, it is necessary to register first, but this is free and we have not yet had a problem with spam. Notional Semiconductor [2] offers the possibility, on the internet, to select a microcontroller from a prod- uct table. You subsequently can make a choice regard- ing the application, which leads you to another page where you can choose, based on the parameters of the desired chip. On the Keil Software website [3] you can perform a parametric search of the chips supported by the software fro m this company. Here you can, for example, easily search for an ARM micro with certain specifications. The Philips website [4] has a catalogue overview. Here yau can look up the specifications for each chip. This applies only to products from Philips, of course. Unfortu- nately there is no parametric search facility available. Renesas [5], established by the well known Hitachi and Mitsubishi Electric companies, does offer a parametric search option. At the tap right of the page there is a link to "parametric search'. This link leads to a page where you have to choose the product category. In this case we select the MPU/MCU product category. This results in a conveniently arranged table where you can enter all the desired parameters. Zilog [6] too, offers the possibility to do a parametric search of their product database, just as Freescale Semiconductor [7]. The latter Is pari of the more per- haps more familiar Motorola. At Freescale we also find the parametric search option in the top right corner. When we follow this link we get to choose from several different types of products, fn this case we again select the (B-, 1 6- or 32-bit) microcontrollers, or course. We then get a small list where we can tick the desired search options. Ticking everything obviously results in the greatest amount of choice. On the next page (finally) we have the possibility of entering the desired features and retrieve ihe part number of the controller that meets the criteria. Infineon [8], which is well known to microcontroller enthusiasts, also has microcontrollers in its product line- up, After making an initial selection between 8- 16- or 32-bit controllers you get a page where you can choose from quite a few parameters. Texas Instruments [9] has o wide selection of micro- controllers, Via 'Microcontrollers" (in the blue 'Products" field) we con choose from a number of controller fami- lies. On the page that now opens there is more informa- tion about different families and there is the possibility to search for a particular controller, A visit to the "Tech- nical Documents' section is certainly worth the effort (link on the left) . Finally we provide the link to the website from Wkhit Sirkhote [10], where a number of projects are described. Here is a selection of nice and possibly also educational projects that can easily be the trigger for a new project idea. I' ZOOS - df'.t jf ei Edrc-rcLs 71 New Road 1 Automated toll colH@ction Ekkehard Scholz If you are planning to drive a lorry over to Continental Europe you wont get far on any motorway before running into a toll system. Germany's sophisticated new neKvork using GPS, GSM and infrared technology has only been up and running since the beginning of the year but the Department of Transport and UK Customs and Excise are watching closely and have announced their intention to introduce a similar system in the UK. 72 e!skfor elcdrcnits- 4/2005 After □ long and protracted birth the new German motor- way tall collection system for Heavy Goads Vehicles (HGVsj is finally up and running. Among its innovative features are the use of in-cab GPS positioning systems and automated toll collection. Traffic How will no longer be impeded by tollbooths and road construction/mainte- nance casts will be kept to a minimum without the tradi- tional toll collection infrastructure. The specification for this new toll system was very demanding and included these main requirements: — The toll levy takes Into account the amount of pollution produced by the HGV and its axle count, — The system must allow for a variable foil levy (accord- ing to the time of travel and road section used). - Toll collection must be performed automatically without the need for the lorry to stop at a tollbooth (free flow system). An On Board Unit (OBU) fitted In the HGV vehicle takes core of this aspect of toll collection. - Drivers of lorries without OBU J s must be able to pre- book a journey manually using special terminals installed in petrol stations, service areas or be able to so on-line. In addition to fulfilling these requirements the system com- ponents should be flexible enough to support other Euro- pean toll systems. This should encourage deployment of the equipment into other European countries. Toll payment with the windows wound up The new toll system requires an On Board Unit (OBU) fo be fitted to the dashboard of every HGV (Figure 1 i. This unit is about ihe size of a standard car radio and per- forms automatic toll registration when the truck drives onto a stretch of toll road. The driver Is not required to book the journey or register any paperwork. Each OBU has the individual HGV specification programmed into it when it Is first installed in the vehicle. When the lorry is started the OBU switches on and reads all preioaded information. At the beginning of any jour- ney the lorry will not necessarily be in the some configu- ration os the last so the driver can enter details for each trip indicating: -The gross weight of the lorry (a lorry without its trailer may weigh less than 12 tonnes and thus travel toll free) . Figure J. Tbe da s/i mo unfed On-Board Unit (OBU) automatically logs motorway toll sections. The driver can input vehicle configuration variables fe.g. the lorry may be travelling without a trailer). { Picture: C run dig) - The number of axles In use (the toll levy will depend on the type of trailer fitted). - Whether the HGV is starting a new journey or if it is just a continuation of the previous journey. - The cost centre that will be used. (This optional input helps the transportation company to identify the particu- lar truck and journey on Its monthly toll statement). Once the data has been entered the OBU will be active. It will now use information from its GPS receiver 4/MS - dek lor elatrcjiiu 73 pick-off Figure 2. Using GF5 (Global Positioning System) together with Tachograph and gyro scape data the OBU pin paints the truck position on a stored digitised map to a resolution of 10 m. Any fell payable is relayed to the central toll office using a mobile phone (GSM) network, (Picture: Toll Collect) along with other positional data (Figure 2) to compare its coordinates v/ith a digitally stored map of the motor- way system and determine if a toll is payable for the stretch of rood that it is on. The positioning works on the same principle os an in-car navigation system. Addi- tional motion sensors are used to improve the system accuracy. A gyroscope fisted with piezo siroin sensors provides inertial information while data from the vehi- cles tachograph supplies speed and distance informa- tion. This dead-reckoning system functions independ- ently of the GPS system. The vehicle positional data from both systems are continually compared. The dead reckoning system ensures the OBU can maintain its positional accuracy for short periods when there is no GPS signal available. The OBU calculates the toll based on the current tariff and road section that the lorry is travelling on. The tall is stared and then sent to the toll control centre using a mobile (GSM) phone link (see Figure 3). The data is sent periodically eiiher when the toll tally reaches a pre- defined level or after a set time interval. 300 control gantries A vital part of i he toll system responsible for vehicle detection and communication is mounted on the 300 overhead gantries [gales) scattered over the German motorway network. As a vehicle approaches the gantry, a detection and tracking unit [developed by Daimler- Chrysler) uses D5RC (Dedicated Short Range Communi- cations) to sense [he vehicle position ana determine when it will pass the gantry. At this point a 3D outline is captured and the vehicles weight category assessed. Any truck with a gross weight of less than ] 2 tonnes is not liable for duty so all information collected on this vehicle is erased. When it is determined that duty is payable, equipment mounted an the gantry interrogates ihe vehicle using DSRC infrared signals to determine if an OBU is fitted. When no reply is received o toll violation will be indi- cated if the driver has not previously booked the journey. A camera now records the registration number ond passes it to the central toll office where it can be automat- ically compared to all the registration numbers for manu- ally pre-boaked journeys. If the journey has been booked all vehicle data is again erased. Where no match is found a toll violation incident is recorded. Policing the system Situated behind arou nd halF of the control gantries are areas where the motorway officials can pull aver vehicles For investigation. The gantries are equipped with two-way radio links allowing motorway officials situated in a park- ing area or by an exit to communicate with the toil cen- Ire. Information relating to toll-evading vehicles will be available in a matter of seconds aher it has passed the contra! gantry. GPS satellite provides navigation data on-board unit t. in-vehicle Installation road transport company A 2 . vehicle 3. OBU detects 4. 03U dstnets 5. check G., OBU calculates data entered position toll-charged (stationary toll charge road section and moving) destination 1 ■ !vX 8. Toff Central invoices road transport company 7. amount due sent to Toll Central by GSM Figure 3. Automatic toll collection for o truck with an OBU fitted. (Picture: Toll Collect) 74 eklilnr tlcdrcnle -4/2005 There is also a ream of around 300 mobile patrol units spread over the entire network carrying out checks on the moving traffic 24 hours a day ensuring that the rolls are enforced. These units operate in the Flow of traffic allow- ing the operators to check vehicle details to determine if the toll is payable. The mobile unit can also determine if the HGV is registered with the roll system ond if the axle count is correct. Any HGV not registered will be checked with all the pre-boaked vehicles stored in the central data bank and if there ts no match the lorry will be pulled over and investigated. A fine will be registered if the toll has not been paid. Both the Fixed automatic vehicle recognition and mobile units collect vehicle details without interrupting ihe flow of traffic. The system checks if the correct toll has been paid but does not perform fine collection. The vehicle position can be pinpointed on any of the 5,200 sections of rood that make up the ] 2,000 km$ oF motorway in Germany. The present system is relatively new and so far only the basic features have been imple- mented to prove this new technology. In ihe coming year we con expect to see the concept of "road pricing' come one step closer when trucks are kitted out with the next generation (dynamic) OBU version 2,0 to allow the inclu- sion of major roads in the scheme. This should prevent HGV drivers taking alternative routes to avoid tolls. Here in the UK, best estimates indicaie that an equivalent system for heavy goods vehicles will not be functioning before 2008 and any universal rood-pricing scheme will not be introduced before 2014. The Department or Trans- port hove indicated shot this system could be applicable to the UK motor way network if the OBU can resolve vehi- cle position to within 60 m (poorer resolution could result in vehicles incurring tolls when travelling on free roads running parallel fo toll roads). The German company who developed the system (Toll Direct] claim the system has a positional resolution of 10 m. The existing motorway gantries fitted with vehicle recognition sensors for tali collection. (Picture: Tell Colled 'Swordfish* PS4GM1G Hsnd Heid USB Oscilloscope A L-iq^s tand s=u c L",= t ^ — - 1 -iiSL !-<2 -£iej .1 5 sasjja -i r 2 — t,-. : jxtes j - be Instruments ► . r. «■. i-eu c; "“I-" C 2 H t* -L-: L r -J— r,-r- — 2. .. :/7 ’ ££.“ - . - - t £3£. f —~ ^'''d t= b la sandint =•■ =''C CK-H fS'-.'-sJ C“£S CUT i* C* JlrJ I'd c — -t T-.s 1 hmt 3- pa."Ti as;iFri=j^n (5 UbFice ta £. nir^s (ei* h mmi pepusr E! E'ld CEi;. A'r iTrti C£ Lr _l C,'',,£:5 2 -? S'S3ihlOe It" --i i - ’ Sv- ordn s h ' * P S-5 0 M 1 0 Fe aru r e s * It 5" *1 £ > IS z- f Fi.?. ;J.‘g rUt ( i tv t tU w ) 4(M 3 /e EiKfrt 1 KivUaa wbge -t-f- » AC./ CC • Ry, fK Jst jh r-ass £149 shipping L VAi artffPtr - i"J ‘i 11 . 1 : = i:- r fSU rs: . .= d E?i‘“ £125 + snipping &l vat Stingray D 5 IM 12 Dust Channel Oacilloscope, Signal Generator &. Multi- Function Instrument r DG s + f 1 Z -1 r ■- ■■ J ■_ ! f7 7 1.2; *T £ -- " 1 -— --=: * — E ;-.E Cjtl TiT.", JMC," i'i •'a' I'iUrTifr fT3HKY ri’J: fiS bm Efist, EfSFH Ll t wttih uf featuB ' - ! l < 1; ii-;' ►■ -- i2 z-.i c zr- s; i i J - =• 1 - -; 4 ». .- 1 r CC ev j a-: t- 17 a! - r - wih IG i^C fKi-Ejir Te:hnlca! Information R r : ttaLiacf isr ■ i; Vatk- - s r r ‘ : — ei.; - i- - ' -Jl- Li£E . ;L' com Sales Informahon -z 3 LUETJT. L Ll - ± -,i-z Eti/ifTC L:- 3Tj Sdta nd £ cteec. h 33 SZv u jl Ti QHJ VlEQlSl fn : Q14l4]fiGl|Q E--i . BiiipEii ^■■5* 11 IHW yr,c ce- Stingray* D51M12 Faamres R;ii sf.ifr-3 z’i-1 ihv 1.2 £- r . 1-1 . f. JF A 3 C iiT Z - Ktr L- - 2 zJ KV 5. i ri J . - f rrr-r: : -i ’ H 3-5 ,ziz ,i H = c,-_rzi i ■ v 3 v 13 / DC Cc-W £. mr, —iii -.± m; 1 ; ■ t ze r irjjga ~ 53 &t-a«nats ZHH'Ki Ef" tTEil '_ z= : -lirf - ng fSL 1 r=fZ-'=- 3h 1 Piftf Jfp'Xjto s^5«l h >— ki z.-tr L3E f 'OtsaB Telematics Control Ihe Automation PIC Technology Standard Modules Custom Design^ Build World liiei' iet jCoi trolkr PICISF452 CPU, 24LC256 EEPROM ami demo Web Sencr. 32K Bytes FLASH. 1 536 B\ies SRAM 3 2 Kbytes EEPROM Web Scr\ er uses about half ihe av albble EEPROM T heaps of spisee left for custom ueb pages! Server bused on the exeelteni Microchip TCP Suck, 13 user programmable 1 O pins. 5 can be Analog Inputs. LED s indicate Power. Collision Link. Rx Carrier. Tv RS232 interface via 3 pin connector or Front End connector. Cubic Included for connection to PC or DTE Dei, ice. Has an iCSP I In Circuit Seriai Programming l connector. Full Technical and Programming Documentation, Pay us a visit Loads of uController ami Automation hit vwAV.total-telematics.com 4 200S -Ek'iiier^Eftfcti'cs 75 electronics leading Time, Date t Weather Forecast, Humidity, In/Out Temperature and Moon Phase on one display . PICK YOUR OWN ANNUAL SUBSCRIPTION and receive this wireless 433 MHz weather station*! Make your choice: • Elektor Electronics annual subscription (standard) You receive 11 issues, including the July/August double issue. • Elektor Electronics annual subscription-PLUS You receive 11 issues, including the Juiy/August double issue, plus a copy of the Elektor Electronics Volume 2005 CD-ROM (normal price £16. 25). Your saving: approx. £10.00! Please fill out the Order Form with this issue. Subscription rates and conditions may be found at the back of this issue, r Offer available to Subscribers who have not held a Subscription to Efeklor Electronics in the last 12 Months. Offer Subject to Availability. ilektor SC/MP Computer (1978) Jan Buiiing If is safe to soy that anyone who wishes to maintain a serious interest in electronics [...} must get to grips with microprocessor technology. The implications of the microcontroller revolution ore so tar reaching that anyone who fails to do so will become hope- lessly out of dare, [..} Preface to a new magazine on the latest 51 2-bif microcontrollers running at 300 GHz? Strong- worded bur unimpressive com- mercial advice from Microchip or Atmel? No, you just read me preface to a series of articles started In November 1977 describing Elektor's SC/MP Microcontroller System. The impact of the series was enormous, very few competitors having had the audacity to bite the ?P bullet. And controversial it was, too, staunch supporters of good old analogue and digital design declaring that the micro- processor in the hands of the home worker meant the end of hobby electronics. SC/MP stands for Simple Cost- effective Microprocessor. The product was officially coiled I S P- 8A/500D and came from National Semiconductor. A later version of the chip employing N- MOS technology was dubbed ISP-8A/60GD. The SC/MP. housed in a 40-pin DIP case belongs in ibe category of very early microprocessors., sporting a traditional structure with registers an accumulator and the ability to address exter- nal memory. As such, if was Notional Semiconductors attempt at securing market share. Not a very successful attempt, as It turned out later, Intel Motorola. Signeiics and even RCA competing fiercely in a then totally new arena. Reportedly the then almighty Elekfor Editor-imChief in the end decided to swing towards the SC/MP in favour the Motorola 6800 because the NS product was... cheaper! From the start, the Elekfor SC/MP was o cluttered system, despite attempts at making wiring diagrams look as orderly as possible. If the Efektor proto- type shown on □ photograph in the November 1977 issue is just ■'two boards strung together with lots of wires' the overage reader was sure to make an even greater mess of it. But tf all worked — readers dili- gently etched and drilled their own PCBs, faithfully typed in Iona hex listings from the mag- azine pages, and started send- ing their programs and home- made extension circuits to Elec- tor. Within months she SC/MP was Famous and occasionally we still meet older (not neces- sarily wiser...) readers proudly telling us the SC/MP was the first computer they built to impress their triends and family members with. The publication of the basic SC/MP system was followed by several J bits-and-babs' articles discussing subjects like BASIC, she Singing SC/MP a disassem- bler, an RF modulator, a 300- baud tape/record interface, a 4- K RAM board, games like Luna and Key pi ay, and the famous Elbug monitor. Going from strength to strength, an after- burner effect occurred when were published and the SC/MP was again mentioned in combi- nation with the ‘TV Typewriter' (ElekTerminal & AC 1 1 Keyboard), a blockbuster project published in December 1978. I now won- der how many readers used the TV Typewriter to program micro- controller systems not using the SC/MP but, for example the pricier but eventually far more popular 6800? The photograph shows what I believe to be a system built around an original SC/MP development beard supplied io Elektor by Notional Semiconduc- tor, The system looks specially designed to read and write cas- sette tapes and is possibly the Master Tape generator far Elek- tor's Software Service (ESS) who at the time supplied SC/MP soft- ware on 45 rpm vinyl records. Anyone got copies of ESS 001 and 002? Retro nics b Q monthly column cover- ing vintage electronics including eg’ endary E'ektar designs. ConSrihu- Hons, suggeslions and requests are .'.■deemed; pease send an email to ed i ?e k t a electron :cs . c a .u k , subject: Retronics EE. "i 2005 - diktat cbriTGTiiQ 77 Martin Oh smarm is a Professor of Electrical Engineering and information Technology at FH Aachen and a long- time contributor to Elektor Electronics. Through Gufzz away he aims of stimulating thought, speculation , construction and simulation as well os raise interesting questions. This month we lack at an everyday Hem: the hum h!e coin, be It a 2-pound, or a 1- or 2-suro piece. Money, including coins, seems to have o strong attracting erfeci on people. Bui how do the above coins behave within a magnetic T'e'd? Will they be a ti reefed or reps’ ed? To rind out we suspend a coin freely in front of an elec- tromagne; (photograph!. Next, we pump c strong current of 8 to 10 A rms through the coil. First we apply an alternating current of 50 Hz and then we repeat the experiment using a fre- quency of 20 kHz. This month's question is: Is ihe coin attracted or repelled? Hints Ihe two pound coin and the I- and 2-mo pieces contain nkkel/bcQss and copper/nkkel alloys limvprideamaLcam/dicfmufyhtml You con use either of these three coins. Ihe coil consists of on Epcos coil far- mer type P36x22 with 50 turns of 90x0. i Cut RFtiti wire. The coil former sits on a ferrite cote half type FID 44/22/15. Ihe inductance of the coil is about 240 mH. In order to obtain an effective current of 8 A through the coil you'll need about 240 volts — on extremely dangerous undertaking os the reactive pom amounts to about 2 kilo - iraffc. Editor's notei all relevant electrical safety precau- tions should be observed and the nature of the above experiment moires it definitely unsuitable for any place other than a professionally equipped lab- oratory , Ihe question may be answered by simple reasoning — complex moths should not he necessary For a lab experi- ment,, find someone with experience in the design of heavy Quizz'away mad warn! Send in the best answer to this month's Quizz 'away question and win an Elektor Flash Micro Board Starter Kit (05 0208-91) worth £69 .The kit contains the ready- assembled and tested board with con- necting cable and software an CD-ROM (see www . e I ekta r-e ! ectra n Ics . co . u k) A answers arc processes b) Martin Ohs- mann in co-operation with ci skier editorial staff. Results ore nor open to discussion or correspondence and a lucky winner Is drawn in cose of several correct answers. h one-euro coin freely suspended in (rent of on electromagnet power supplies. It w 50 Hi current maybe obtained from o toroidal transformer on which a suitable secondary is wound Other wil arrangements are oho possible as long as the quality factor is high enough ot 20 kHz to ensure the forge current flow. At 20 kHz . o high current con be obtained from o full bridge equipped 'with good MQSFEfs (R m}i Q.Ox ohm) powered by a 12-20 WC supply and controlled ( via the gates) by a 20-kHz square wove. Ihe wil is connected to the bridge via a series capacitor dimen- sioned for resonance ot about 20 kHz together with the cat Os sure to use a premium-quality MP capacitor rated for at least 600 V and capable of passing 20 A ot about 200 V (these parts are found in SMPSUs) Ihe square wave fre- quency is adjusted for resonance to occur and oil being well the coil mil pass the required 8 omps or so. Please send your answer to this month's Quizz’away problem, by email, rax or letter to: Quixi'away, Elektor Elect rentes, PO Box 190, Tunbridge Wells TN5 7VJY f England. Fax ( + 44) (0)1580 200616. Email: edilobielektor-efectron ics.cQ.uk, subject: 'quizzaway 4 - 05 '. The closing date is 29 April 2005 (solution published in May 2005 issue). The outcome of the quiz is final. The quiz Is not open to employees of Segment b.v., its business partners and/or associated publishing houses. 78 editor tlttticnitt - 4 '5 l 55 As of the September 2004 issue Quizz'away is a regular feature in Elektor Electronics. The problems to solve are supplied by Professor Martin Ohsmann of Aachen Technical University. ary 2005 p em (p* 78; Lamp Intensity) The equivalent circuit is shown again in Figure I , Normally you would expect the current through Rl to rise when $1 is closed. After all, o parallel network (R2//C) has a smaller resistance than the individual parts., and the voltage source then has to supply more power. However, with the component values shown (Ri - TOO 0, R2 = 200 A, Z c = ~/2G0 Qj the amount or current through Rl is not affected by SI being open or closed hence the Samp brightness is unchanged. This only applies if the capacitor value equals 2jt/a 2RjR 2 where f is the operating frequency. The function of the capacitor may be token over by a coil as long as it has the some [absolute) impedance at f. In addition, the power dissipated in R 1 with the switch closed can be made to equal that in R2 simply by selecting R2 = 2R1 and thot is the case in our circuit. The operation of the circuit may also be explained with the aid of vectors and AC theory (Figure 2). When switch Si is open, the total imped- ance Zq of series network Rl and C is easily calculated as Z Q - Rl +Z C - (1-2/1 _ 100 O In the right-hand part or Figure 2 (imped- ance area), this calculation can be veri- fied. A slightly more complex situation arises when the switch is closed, because we are then looking at a parallel and a series circuit. For the parallel value it is easiest to determine the conduction (Y p ; left-hand part of Figure 2) because it is the sum of the conduction in the two branches. Summing is done with vectors, but this time in the conduction area (left- hand part of Figure 2). The conduction of R2 and C have the same absolute value but are at 90 degrees in the complex area. Figure 2 also shows thot adding these two vectors results In the conduction increasing by □ factor of x2 ar a phase angle of 45 degrees. That conduction equals an impedance of 200 Q/ x2 at a phase angle of -45 degrees. Entering it into the right-hand part of Figure 2 and by vector-adding the value of R 1 r we not only find the total impedance Z c but also that and Z z are at the same distance from the origin, namely on a circle with a radius Z = 100 A / ' S. In other words the circuit has an impedance that's not affected by operating switch 5! The explanation of this 'AC paradox'’ Is found in the foci that the value of current I- remoins unchanged when the switch is operated, although the phase angles does change. With the switch dosed, more power is taken from the source and dissi- pated in R2. By contrast, Rl dissipates the 1 h Rl H R2 &4K72 -7-i4 same amount or power irrespective of the switch position. In the impedance area we can also see that R2 carries a current H that's .2 times smaller than the total cur- rent i] flowing through the parallel circuit. Since R2 is two times the value of Rl the formula P = !- R dictates that the power dissipation in the two resistors is equal. Moral ©f the story: "Watch that phase angle" 2 Double Sided, 1.6 mm, Plated Through, Green Solder mask, Hot Air Level, 1 White Legend. Price including i 2 l ; 0S - dslJar elntfcnics 79 NET LliKS To book your website space contact Huson International Media Tel. 1 (0) 1 932 564999 Fax 0044 (0) 1932 564998 ALLGOOD TECHNOLOGY tf .T.v.alfgoodtschnatQgyXQm Low-medium volume sub-contract assembly. SMT specialist since 1990. Customers include military, aerospace etc. 0402 to BGA capabilities, automatic assembly and hand built prototypes. AUDIOXPRESS W . v w.fii u d i o Xp re ss , cam The premier do-rt-yourseff audio magazine for 35 years. • Hands-on projects • Helpful articles • Expert advice • New technologies Full range of books, back issues on CD _=^ i_ m Am BETA LAYOUT 1 www pcb-pooLcom Beta layout Lid Award- winning site in both English and German offers prototype PCBs ai a fraction of the cost of the usual manufacturers prices. BURN TECHNOLOGY LTD http: V. ww buTiilec.cem Tests Measurement Equipment Distributors • Anemometers 8 Clamp Meters * Light Meters * LCR Meters 8 Sound Meters * Multimeters 8 Device Programmers Burn Technology Limited.. Winfrith Technology Centre, Dorchester. Dorset, DT2 8DH Tel: <013051 852090 Fax: (013051851940 CGMPUCUT http: www.eompuCLFrteTs.cGm Computer Numerical Control from your home PC. Great for tricky jobs, and accurate repetitive work. We supply: - Software - Interface - Manual - Support Price £250 plus postage. CONFORD ELECTRONICS http:. www.coRfof£f8!ecxg>uk- Lightweight portable battery -mains audio units offering the highest technical performance. Microphone, Phantom Power and Headphone Amplifiers. Balances unbalanced signal lines with extensive RF1 protection. DANBURY ELECTRONICS http:/ v, ,v wJi vi n •hepasLd'emcmeo'.uK. Here you will find our mains ana outpui transformers in Mike Holme's range of valve Aube amplifiers (PP & SE). Also circuits, parts lists, chassis, advice. EASYSYNC h rip : vv ww. e as ysync . co. u k Easy Sync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and BS4B5 converters at competitive prices. ELEXOL PTY LTD http:/;V 1 n ww.e!exoJ.,eom Developer and manufacturer of * USB Development Modules, * USB MOD Series. 8 USBI024 Digital Input/Output Module * MP3 Solutions. * MP3MQD4 Module. Distributor inquiries welcome. V jr ELNEC vvw.v. einec.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 8 reliable HW • once a months new SW release • three years warranty' for most programmers ERVAN INTERNATIONAL CO. hup:.' w.’.vr.en/an-inLGom' Power Electronics and Solar Energy Design and Consultants. Also offers: Discount prices of: • Ultra Bright LEDs • PCB LED Cluster Kits 8 Laser Pointers 8 Solar Modules ■ Batteries Compiler. Prog L n Drop Visual Development and a welt featured debugging environment. FOREST ELECTRONIC DEVELOPMENT http:- roreo,.co, uk FED supply PIC programmers. Basic modules, and development software including a PIC C Ibl FUTURLEC hffp: •'Av’.wv.futu Save up to 60% on 8 Electronic Components • Microcontrollers. PIC. Atmel 8 Development Boards, Programmers Huge range of products available on-line for immediate delivery 1 , at very competitive prices. FUTURE TECHNOLOGY DEVICES http: ■ w.vvdSdichip com FTD1 designs and sells USB-UART and USB-FlFO interface i.c/s. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB IIP ELECTRONICS LIMITED r tip ; www . i I pete ct m n I cs. co m HP has been in the audio industry for over 30 years primarily manufacturing both standard and custom audio modules and pre-amplifiers. IPEVA LIMITED http: \ www jpeva.com IPEVA sell low cost USB FPGA development boards. IPEVA provide Design Consultancy for Embedded Systems. OpenCores-EP, FPGA. ASIC, HDL translation and migration. Tel, 0870 080 2340, upeva IILicC i- JLI ELECTRONICS w w w jlbsfectTnnrcs.com Suppliers of electrical .• electronic parts and consumables. Including: 8 Cable ties / bases 8 Tools / hardware 8 Bootlace ferrules 8 Connectors 8 Solvent sprays & cleaners 8 PVC Tape 8 Heat Sink compound LONDON ELECTRONICS COLLEGE http:-' ww .v. Iee.arg.uk Vocational training and education for national qualifications in Electronics Engineering and Information Technology iBTEC First National. Higher National MVQs, GCSEs and Advanced Qualifications). Also Technical Management and Languages, -fc** K_ t ' ■ KOMCARD http: ',wAv.kG meard.com Learn how to design a PCI card, and write a PCI device driver. We lead you step by step with practical PCI projects you build. MOP ELECTRONICS http - wv.-v, . mqpeIeciramc-$:CO Leaders in Device Programming Solutions. 8 Online shop 8 Low Cost Adapters for ail Programmers ■ Single Site and Gang Programmers 8 Support for virtually any Programmable Device ao ekurchiis - 4/2005 INKS NEW WAVE CONCEPTS http: w , .v '.v . n e vj + w av e -cones pis . c o m Software for hobbyists: * Livewire circuit simulation software, only £29.36 * PCB Wizard circuit design software, only £29.36 Available from all Maplin Electronics stores and www,map1inxo*uk PCI WORLD bit p ; www . p c b w o rl d . o rg u k 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. PHYZX http: 'www.ptryzx.oo.uk Automatically Plot and Drill RGB’s * Accurately * Repeatably * Mains operated * Robust Steel Construction ■ Gerber RS274X compatible * Full XYZ RS32 Control * Including Accessories ■ Complete syiem Under £500. PEAK ELECTRONIC DESIGN LIMITED W .peaketeo go. Cool component test gear for your passives and semis. Instant identification, measurement and validation. Connect anyway round. The Peak Atlas family starts from £59. PICDOS™ Imp: pied os.com Hard disk. DOS & files on P1C16FB77. SmartMediaTM based. No complex hardware just wires. Run-Debug existing PtC code & interrupts. Free schematics software, debugger frir.u 3 .rPf| QUASAR ELECTRONICS wy. w. Q u asarEJ cc tro n I c s . c om PCUftS LnfirflCasCtSit ffOJTIfM ' *vn +• v* ■ - - _ m-m. la J u S UE ■ Over 300 electronic kits, projects and ready built units for hobby, education and industrial applications including PIC/ATM EL programming solutions. Online ordering facilities. Teh +44 (0) 870 246 1826 Fax: +44 i0) 870 460 1045 Email: sales@QuasarEiectronics.com PROMOTE YOUR WEBSITE Elektor Electronics have a tea Eure so help customers to promote their website s. Net Links - ;i permanent feature or the magazine where you will be able to highlight your >ite on a regular basis. * For just £220 + VAT ■ HQ per issue for eleven issues » Elektor will publish your company name, a 2 5 -word description and your website a d dress . * For £330 + VAT for the year i £30 per issue for eleven h^ueM will publLh the above plus run a 3cm deep full eulour screen shot from your site. Places are limited and spaees will go on a stiieiJy first come, first served basis, please fix back >our order iod_o 1 \ w ish to promote mv compunv pieise book my space: 1 Text insertion only for £220 - VAT ■ Text and photo for £330 + VAT NAME: JOB TITLE: ADDRESS: .ORGANISATION: ............ .TEL: .... PLEASE COMPLETE COUPON BELOW AND FAX BACK TO GO-44-iOii932 56499S COMPANY NAME .. ...... WEB ADDRESS 25- WORD DESCRIPTION ROBOT ELECTRONICS http : // www. robot- g tectrs hies. c®. ■ Ultrasonic rangefinders • Motor H-Gfidge controllers • Magnetic Compasses • RC servos and controllers _ ilioJlT ^mELLrtJB * PIC programmers and components • Electronic Design-' Development and Manufacturer to industry TELNET http: wwwMelnet. uk.com The site shows graphically Telnets wide range or quality second-user test and measurement equipment. Including oscilloscopes and spectrum analysers. ULTRALIDS brio: Aw ’Sleds. ci tel: 0871 7110413 Large range of low cost Ultra bright teds and Led related lighting products. Major credit cards taken online with same day depatch. USB INSTRUMENTS h bo:. www.ugb- instruments.com USB instruments specialises in PC based instrumentation products and software such as Oscilloscopes, Data Loggers, Logic Anataysers which interface to your PC via USB. VIEWCOM n t to : ' w w , v .vie v. co m . f 2 co . u k tel: 020 8471 9338 fax: 020 8552 0946 * Mail Order supplier of: * Integrated Circuits and Components. * Kii and parts for Etektor projects. * Transistors, FETs. Capacitors, Resistors. Crystals, etc and hard to find devices. View com Electronics, 77 Up pe non Road West. Plaistow. London El 3 9LT VIRTINS TECHNOLOGY http. vAv.v'.vinins.com PC based virtual Instrument for electronics enthusiasts, students and professionals, including full-fledged sound card realtime Oscilloscope, Spectrum, Analyzer and Signal Generator. Down loader and try. ELECTRONIC ENTHUSIASTS _r. . :--f ~ im ~~ arc = run r ~ ^ i~:s Ccnlxf: liiiiirlption LJ-. Lfnil * CFiifcj; I EMd Fi-^_ TVS J : I 5 1 J£-:'ST fm C 151 J jKili i 2GD5-ef“Jiicr e'scfronTcs SI readers services Please Hole v 7 ‘fTs ” =■*♦ £-0 @ ze z, z. l: z : t - - z Pzz "•.: : z : r QifliePu&fefefa' wsbg& at .iv/.v z z - ~ ~ z z : ~ -■■ - S [fekctirs *re.siip0£d fix cotFrEji^sce'o* reafcri .■■ Hraut irttsmet access, r us s READY-BUILT PROJECTS CfariTy 3D0-W Class-T AmplEfier iZIZ-'—SI fi=r taint EVZ’s -::ri fc’ J i_i 34-50 55.70 Flash Microconlraller Starter KU tei.-ieie t zi : Is -: zi-t.izzz, :z: z z:z: z' 2 z z z' z: T ;>s 5 ■■ 2-5 ■ n so Gamehoy Digital Sampling Oscilloscope (GBOSOJ :=r:-555'3- ^i;,-siSe:r: z-t dilt t.-z aiz -3 re r j r= z'-- zj+- 5 ■ 55 03 LPCZlOx ARMee Development System Il-3-5'0 14 1 P44-5 ; - ::zzz: r : : m -z z : , ■- v j 7 = - : tt: : Micro Webserver vrilh MS Cl 210 Board 53 i5 55 7u 0SS6O-51 TtaipfocesaM Sosrf, rE-zij-zzM rnj^l 55 :: 112,50 04402&-91 ’ l i iv, : -■ Pt - z : ri 5 : i r i lea^f-a^embted 41-trJ “5- 55 044D2&® paci^ 0 2 Ci 50-91 A 04 4 EVERGREENS Eleklor Electronics Help Disk 5 z zz: r : EE' 3: :3 1&4.95 3t -5-322-5 ii' ', t:;.: .z';!' Eleklor Eleclranics Item Tracer 1906-2003 5-3 '4 ^5 545. .j- - :: ;z “iz :z:z:zzz 1 7, -•::*£ i" Universal Prototyping Boards 5 ‘ 5 14 55 LrS5-T FC5 2-45 4 50 .75S-2 ZrC3z 4-10 7 25 L z 3S-4 4 RGBs E 5 5 11 35 No, 342 APRIL 2005 L PC 21 Ox ARMee Development System 04-4-’ z izziz - il O D4-34447 V:z-r-:i“ 040444-1 1 I z ■ it; z : | SOfiwairs r . tz-:i- ::it zz: r - z:z z - : te -j SC Analyser 2005 92)45: -i PCS .:j45"-' t : z< : .T,',iT I:!-:"--!' = 57 ITI^TZI No, 341 MARCH 2005 High-End Power Amp 04-:4 5-5-' AT;f«PC8 3-: '93-2 -i:z:?-4:b 341- 55 5 5.;: , z 22 04CB9E-4 FjI-£ FCB Qpamp Tester '5-1 z 1 5 Play Solitaire 16 2 4 J 2 m" r i':4: r ■'£ -3-5641 p-h X&Sim-XK ittt-tl: Remote Temperature Logger lor PIC1SF Board 34=4-17,' = i e . Serially Programmable Crystal Oscillator 1-4 135t-"r 3 z-.it zi' z:^ IT No, 340 FEBRUARY 2005 RFID Detector for 13.56 MHz io^oq.- =2 Z Walking Bug 14 10"'-“ l7e.« z:_tz 5 ; : 7 f fs I- 4790523 itii— z: No, 339 JANUARY 2005 ATX Power Supply Tester 54D:‘2-‘ PCS Intelligent Clap Switch G35I35-- PCS 3,z* zo_r-:z i _ Zi. f z 3 53 * 66-4 * P 3 ■ 3 =5 2 Z 3 = : t it r z = PIC1BF Development Board PCS C4C01M1 -3 z 1 eit.vuz : zz No, 338 DECEMBER 2004 12G Home Bus 545353-' P3E I- 1 3 55-“ " t z«. z:_ :z 5 _ zl ::it' fs LED Christmas Tree 3" 33" 5-5’ : if FCB 5 ir ts USB E2C Interface 043334-1 PCS ■:^2324-r 3 zv -T z:: z: : t, ', ir 7 P4 ■'j-l'T-'i IlilZ "35; PiZt ZZ_ZZ 7 , :'T.: I: I'T':: Tj - PdT^ ffrfe, ROVL~. EPS041* fiftL GP-; - t ' Wsjfs „ i SutSHtiptiS! Semci Lll iMft 4, G : : s IT zz IT iZ'Zizi p- ,t ; - - i . : fled Farm. Pai!6=* Res* TtCsHURST TJ7 TKE ziiziti 5:' : 5;:: : - :: -1- : z: ui f -44i 1553 20GSOT. fai 1-5-44) I-S -3tz’=: :* ’r=:==::'7 ”~t T 1> ii: 15:3 233516 I wii^VniE isr: - _i io liZ: r- t=o*3 tpfff2i£ c^stc?s ttig). of fezzi: aetj J:Z=.-X55) - j'; i; - lL L -= - i ng ifiiicrti to msSteg = PC3 m- : - ; g¥5 ,i_ ^471 - 1 _-:=■= £5.30 (so- ipsa flS.IO Z' z tzIn-'ZIZ t -z - P: _ . :zz z z ..i := 5. :: 7 r "zi : : ;zzi... 4 .:_=t — z- t "i . "i ' rz rz z.i - : zi: z zrd Dzczmia'^ss iiztiz : y i'tz ::izz Zfz i£.E.E il.- t- -37 55 z -- BWHk {L4Ls. FriLz. (EjFlte WApHs, FICssnd Errapsi. svd £5.45 (^rm^ ce.1s>i£ :: _ E' - itiitt t z iz z . r : z: tzi.-it- PAST ARTICLES Pn-gi snd sn teso^osns cfeanfle T?a For rT“i- :- pan zz : -zzz dq t ife i a oty i- : : " e r z tizt*'Z tr^ r-tfU to tterqe 5; l 4 c-p-:— ,Pz GffTrz. !z: zc L : - z titz: : Pnssi anl itEra d5*cnpl:«-4 5 ," jh-i 5 - e £ : II-IEE" £ n :P:'£ z~z Zi-izz-iz’- r;re i.;znz:z L* - :^ !-? fic.ziTs E;;:zzi. fi 35 7 ;:v_ iz::.- £ US s _ 4 5 334-2 1 2413 54 :t it -- :-: 4 53 E.i j No. 337 NOVEMBER 2004 Noise Suppression Fitl&ra 555:21 3-3 FOB ’ i-y. 25 EE Vehicle Battery Jogger 04402M PCS - - - 15 . _ " 55 No, 336 OCTOBER 2004 ClarfTy 3QJ-W Class-T Amplilrer (& 0217-2 FC3 15-Su 23 15 Four in a Row 630146-1 FC9 13 15 25.25 3 3 3 '45-'“ 2 z- zi.TziT' i::z 4 33 5.55 35 5 r 4-3-4' 47^3523 12-MFC. :t:t--z= 7- 40 15 '3 2-: 50 I :: 1543 '6 :I ”.53 5. to i i . i L L ---3 ' ; 53 6.&5 J : "5 5.55 tir 'It I 5.53 C.5 '5 J 3 5.55 5” 55 6 65 35 53 27 7£> -4 55 ‘3 55 "53 a 55 45 SO 5 55 5' 35 4 76 5.5=- No. 335 SEPTEMBER 2004 t 22 . 05 5-25 9.73 Rolling Dice 23 55 23.73 34 [;- : t : 3 = i:: = z :zz "5-75 345-24E-'' l z- zt' z l± ‘ 7 < r tz 4 93 5-33 ^.10 64324^:t 4"55l233'-t2 7 5 r: 5-20 2.75 Swiss Army Knife ' 3-75 25 25 32 244 : .- PCS £-:i V 2 _ =.3232. 532 3 32 - = - — E“ -t' Z ~ " Z TI;Z Ii ZITi 'Z-'Z = :2 552445-41 ■’■"523:1 = 2-3421 \-_yi 7 I It 55 5 55 •3.15 No, 334 JULY/AUGUST 2004 7-55 14 3= JFt Servo Motor Interface ■35 14 35 .i_=:=- _ v : : = i _ i:_tz =. ;: . 4 ■ 2' 3 4 53 :45 222i==-i' = ,3’6 Z 522 - : i ■; :: CZ 33 56-42 R 2 1 6=625 itctt-z: ■ 3- 5-2 5 25 12 5= Macro Webserver with MS Cl 210 Board 044326-1 \:i.'i e :: =: - r : F ' z : , '■”■41 520 3.73 R C Analyser 1C' 35 352'"=-"' Di- z 3 ..It 4 92 C 2 *}1 7 c-4 7 - 1 1 56627-4 I- - ; 1iF25 3-23 2 75 USB Converter Controlled via HTML [■44274, T ■ r;.i, 7 «r- : i p- : = 472 5-23 9 75 Working with AcliveX 355'43"-” n-i. 4 22 No. 333 JUNE 2004 3-I3 16.65 Multi Programmer 52535=- PCS 362 6'7u 10.52 2 2 2 333-” 0 2 ■ r ‘ J — i t 2 : : _ : z c : ■ : e « U*J 5 3: 16.40 Pocket Pong 022622-6- 2 e- F.DSdtr,'^ 4 22 Rail Router 03243 F2B 1D-S-3 v 55 21.00 02-3422-7 1 2-7 =£z:t,mt 4 52' 5634 33-4* 1 I"= z -2 -52 7 i ii r Til 7 z : 5-20 14.70 Smooth Operator 4-^5 -s-65 5:22C4t j Gt 1 7 5 z-iTYriT 4=2 3 33 1225 -1-----4' L ' ^ ' f= -4- ' . - ITTT ZI T 4-72 "2-23 3 g.3-0 No. 332 MAY 2004 4-35 £65 Design Your Own 1C -35 5 555 FCB 66: High-End Preamp "2- 15 222246-* =23 — "'Z l.iT 5 45 2’ 4] 5 ZI 14= 5 4,16 — t z, Colt ■-22 423- £ 63 55524=7 ?C5 — 6 72 225246- ' 2 z- 467 5 2= 1-.35. 121.46—1 F 2’5_ z 462-.7 l it - ~ 7 : Wind Speed £ Oireclion Meter ;=z: ” = 5 '3.53 55 2 5 7 1 , * * C z- it. eo: sotta’EJB i-=- ■ — — 4-23 5 65 252:”"--' ”-5' zz :’ J : :i'z — :: 1 7-55 82 eleVter efeclronlcs - 4 2605 L No. 331 APRIL 2004 □rap-in Microcontroller Board GMEUS-i Z 2E j 2 . ■•+;-"■ .. i;' _ : : T. ' - VHF-Lqw Explorer 2234^1 PC3 No. 330 MARCH 2004 Build Your Own DRM Receiver 323:557 F€E 2: 2:55-" I :■ C?V t't p‘*Vs?f Code Lock 3264 24-1 PCS 2 23424- ” D';* ez_:ze 5 ' e.= zzze r ee u2iMB44l F : l-l4i-iR pra$arar£: Hands-on CP IDs (21 E2-2252-1 FCB 2722:2-'" EZ’ZY.E'E 2:2352-41 rP'i'^2S5LC:- '" ; ' J * : ' ^=d Multichannel Failsafe for Radio Controlled Models . . . :Z£~“ * . :■ E I - '.-=...' : ; : 2203-52-4: ■“531:1-2-. z:;"Ei -- e: Multifunction Frequency Meier 2:2'I5-" FEE 2:2 7: " D e* ezM.'. £" z 2:I"E:-4" 4'2I222’ E-’ ; 2 = I I'-Il'l — ez No. 329 FEBRUARY 2004 Digital Alarm Clock 030096-11 K$ft. BC source and fen cc-cv 639096-41 PtCl6fB4-2-4 :■ pnspaouned [Access 020165-1 1 E-1e.. eez ez_ - ze coze z~: -:z e zM.m’e 020163-41 AT65S82tl-*: : : pfo^ate&d Simple 12T0-23DV Power Inverter 22 pcb Touch -control! Ed Switch JJ L i L - . EZ-"Z~ZZ-Z {0021 -44 T F2-12C52E9G4 E2E z :i e - ""e: No. 32B JANUARY 2004 64-K 80C552 Flash Board 252-242-- PCS 030042-1 f Dsk. rrast prc.Ei: e: j I n E ’ e 03v2 42-21 23F0 1 S. pro®iam>£ti 2E 2 2 -Z-2 ’ EAL ZEvEC^MF :zzi — e: Climate Logger OEI'23 5-1 : :e I:.!':-"" 1 E< EZM'iI" FMS Flight Simulator Encoder 252256-- -2B 030066-41 671FC7676S |W$3fnrflld LEO Hourette 63 3 'll*' FEE 252"::-"“ 2 e- ::_z: e : :* L ze 2 E 2 ' 6 E ■ - ■ E 3 2 2 2 “ 1 ’•'2 -2 : zz E" " fz Mullt-evenl Alarm Clock G2QdC4'S t D&s_ Q rssurc?) nsifGES 12122---—" : 12221"- J 1“1 z'zz'i - -tz Stepper Motors Uncovered 52ji22-;’ f-;cic>=:3-2’: sp No. 327 DECEMBER 2003 FM Remote Control Transmitter i Receiver 25-2— ■■ F-2B LED Chrislmas Decoration 0531 57-- PCfi P87LPC7Gx Programmer . = 2 2 ' 2- " l s’* z "Z -z-i*. JZ“ E'Z Project Timekeeper L ■' EZ_"“EiiZZEZ"ZZZE T EE 1213: 2-4: ? Cl 67521 . T Stepper Motors Uncovered (21 2 1 2 ‘ 2'- - : _=■ v.Z: ZZZ: L : Universal Clack Generalar 221:27-" I z* ez. ze z:zz -: Wireless RS232 Link ■2:2224-' F-2 5 No. 326 NOVEMBER 2003 P r e nislon Measurement! Central . -— r vb No. 326 NOVEMBER 2003 Rev Counter for R C Models 2541 FEE 0241 1M1 DM 7 source and tig* c Ode £ US S [■24‘ *1-4: :: : ' 7 1.--. i_"Z.'Z Z: Running Text Display 5-DLl 15.ZE 22.42 _ E ' EZ _"Z: E'Z':- ZZZ: 4-EO E EE USB Analogue Converter 054374- FC3 2 c 1 IS 21 02 257 4 -r 2 E * r E i Z Z-Z Z E." Z Vi " Z Z J. E E Z : Z-'I iZ~ 25257--- 1 ~.2' 22“E5. Z'z; r E""~EZ USE : 5 :: 4 52' g 23 7-22 U3J 4-92 5 to "5-25 53.45 5-" 2 42K5 16.1 fi B.65 '9 20 j. - ^ " g 2 b- 5.55 ■4-?v 2S. : 2C 5 SO 4-50 33-40 45 75 8.65 5555 4-4] s.ss 2-7*3 75.45 C-“- *5.55 4 13 6.65 G2 4-G" - ■ ' =-52 := :: “52 *2 1: ’3.32 24 to 5 52 15 21 4 S-2 2-’ 5 5 55 ’212 a 15 " 6- 55 4- 52 "2 11 5- lu 5.-55 17 70 10.60 7-75 4-4Z 13.70 3 65 "2 22 T -G5 13.05 3-1.15 4 .00 E' 22 5 65 2 2: :4i5 4-52 g" 0 5 55 10.60 12 : j :: '0’3*5 ’ = C5 7 55 ■ - 1 r 412 ■ 4-52 Mi 5 5= 23225 4 21 : 55 4 11 3 61 a so 25.40 0-75 "5.42 "“-52 4-52 3" 22 3 5: No. 325 OCTOBER 2003 DOS RF Signal Generator 3- 2224-2 -2b ".E-ZE. ■■ “ » “ :■ 45 rj w _L ^ Z'” - 1 " -'■“ = 2235" : 2 1 2 z"z z ~ t-e z T “ , — — 54 25 Mlnimallsl Induction-Balance Melal Detector Oi'j^Sv** nnn r-d — _ - ■5 35 Xilinx PROM Programmer 2" 5" 23-"" SZT.VE'E 4 31 : 11 No. 324 SEPTEMBER 2003 ATV Picture Generator _±_ r-l- . ’ - E * EZ.'ZE i "E.i Z Z ZE EE 4-32 £ z z : 11345 . 4 ' AT90SS515^6PC. pzc-zrTT.rr^di 7 5-22 35.3-2 33325=-42 4“32-3l222-’2 :: 2. Z'ZZ'E -- EZ 1222 24.20 DTMF Romole Telephono Switch .32 2E4-" PCS it 52 20 2 j 122234.: ■ _ : - 1 Z " E " E Z 'Zi'. E " E 4-3“ 2 25 0323E4-b' F.:-5F644-2: 4 ■M r ’“-"r. -r . 26 CQ LC Display vrilh j_G Bus : ; - : ~ 1 '7* bLz 7-25 7 3.2] PlCProq2QDB 010202-1 TV JT-TH, -Zrii: 9 '05 *5 DC 0:0202*1 * .. ?* i'j " ZZ 1 E E" "Ti'.E"E t - - — ZTJ E 15 3" 2352-4" 1 2' f : 3 “4-22 F p iiE : z 2: := 41 15 Polyphonic Doorbell 72655-4- : It* :'-: J 7-'~-T* f .i 1 - 4-52 E65 5223:4-4 ■ r 2 = 7 24-.- : = :-ZZ'E _- EZ * * T — T ^ 25 55 Precision Measurement Central :]::i:-3- 19 23 ■14 52 Valve Preamplifier (1) M > i 1 ■*- J - " -25 E — Z " Z' ZZE'Z 1“ 15 20 40- 02G333-2 F2E p E.zz , ZZE'Z 71-42 2222 j-.gr.~ij-.” ~2E 2 z:e"Z 10- -5 17 E5 No. 323 JULY/AUGUST 2003 Add a Sparkle 222232-" ’ Li- J"! z. 1 1" 2 E Z . ”Z E " EE 422 5 55 fiC?2CHI9A-04 SM. progm vmd 7*40 13.10 AT3DS2313 Programmer 2:4:25-" 325 iacc Mini Running Text Display G20365-11 f" - ■ r ~ - - + - __ j ■ ’2 , IT - 2 4 20 11: Mini Tesl Chari Ger t eralor 222422 ' ' _ E*. ~ . EZ _'ZE Z I ZE 4-55 E 65 Programming Tool for ATEinyl 5 2220:2-1 rCB “25 13 35 322323 1 2 f h z iz : z,,L"E 4-32 5 65 Quad Bridge Car Amp PC3 e r 7Q 1525 Remote Light Control with Dimmer "■ -T ’ El "*■ - _ z : z. ^ i 7 - — * - ' — 332:21-4- 4 :2li.:“-"_ Z'ZZ'i — :Z 6 25 1 - 2: No. 322 JUNE 2003 AVR TV Tennis D3632c-1 Ve- ?CB 5 “1 15.40 1 :I 235-2 F-..^:viz- 12 223 15 25 2 : 3: 25-" ’ L E * " l ” E Z _"ZE Z Z ZE 422 •*i — ’ ZZ 1:1111-4' 4"E2 :5"-5 yr-f: "522 35 22 Electronic Knotted Handkerchiel 32_: 1 :-" ’ . e* F . E Z zzt: e' ezt-.i'e 4-52 .:• 65 22 . 4“zl:_:“ ..'- z:e t: " 2 2-J 3312 Law-Cast LCD Controller [2) 232-1 J 4-- 322 5 25 :22'"4-T" _ E ■ Z Z Z ZZ E Z : 7i'. E"~ : 2 65 Night Light Control l i: J -l " 5P tea e=4 4-32i E 5: 223" -5-4" - j.:::":-".-. z " z z "E : Z 12 55 U “5 Universal XA Development Board u’l'GT’t f m 7 222 22.25 2 z 2" 2 2-“ " 2 i* L5“27 -ZT ■ ri.XADEV 4-20 6 55 v' 5' 32*21 EPROM O r 27C"256~90 r fkogrpfftimsil ■2-53 i“ ”1 2 3 22-22 E ZZ 2)A K9. 27C256-FCr. z z zee — ■: z v: : :-:j--23-5 < 14_ ■ s H 5 " t" 4-23 5 53 4 2Q35 - 7.: , ,fCt e;;DrGni-;i 83 sneak preview 27(C)512 Emulator Despite the inroads of Flash technology, lots of microcon- jroiler applications dill employ on EPROM for program stor- age. The reasons are probably best summarized in two words: J cosf and 'tradition'* The downside of an EPROM is the need for an emulator when it comes to debugging. Our emulator is based an a combination of an FPGA and an AT9QS3515 controller. Far connectivity ii offers 5PI, JTAG and R5232 interfaces. U5B-GPS This article describes on interface between navigation application; and a miniature GPS module coupled to an equally smalt active antenna. The modular struc- ture of the project allows you to use selected parts for your own applications. Theme Plan for 2005 January . „ . , Power Supplies February * * . .Wireless March ..... .Sound April ...... .Microcontrollers May Sensors June .Environment July/ August . .Summer Circuits September * . Jest & Measurement October „ . . i . Security November . . .CAD Software December . , .Opioelectronics Serial Bus Systems Two in-depth ariiclss will deal with the variety of systems available fo route signals in and between equipment while using os few Vires' as passible. Protocols and specifications are describes as well as guidance far designers. Also.,, The Digital Future: PetCheck; Lap Gaunter; Delphi for Electronic Engineers (5); Magnetic Flux Meter; Theremin; NMRA Model Train Programmer; eZ8G Acclaim! RESERVE YOUR COPY NOW! ifeltey SMS m§ § pp srfs m Sotordsy 13 April 20 05 1 UK rfitfrilKJifcn idy). UK subscribers wilt receive ihe rnogmfae a few days before this dote. Article titles and magazine conferil i st/bject to change. NEWSAGENTS ORDER FORM SHOP SAVE / HOME DELIVERY Please save / deliver one copy of Elektor Electronics magazine for me each monch Name: Address: Post code: Telephone: Date; Signature: 1' ■ B ■ 9 i 4 ! r r Qektor , ec re-re ics i n -g t V-JT Please cut out or photocopy this form, com- plete details and hand to your newsagent. Elektor Electronics is published on the third Friday of each month, except in July. Distribution S.O.R. by Seymour (NS). Index of Advertisers A g-:-aTcch-c:cg f . 'tet Links Links . .. Sere Layout Net Links . .... 6.^ Ta c _ _ c : : n , LTD Let Lrks CMS Co mpuc uL "el Links Contort! Eearon is lizi Links Cr:* -a : :: Danbury. ire! treks ... . Display OectitmiGS Easysync flet L r nks ElscoL 'fei Links ....... EiiT&c/NBtLnte .. Ervan I - 'a rnatio - a; 're; s Euroclrcuits ExpresSPCS . Forest fi&I Links Future “fedwotagy Devices. fist Links RrturfnC. Hat Links ilP Elector cs L re i&d. \*i Links . . [pEva Unified. MEt Lreks J ay car Bectrn r;rs .. JLB Electronics, fieibnka Koiucard. ’let Links Labceteer London Elactrer "s Co ege LeiUn-.s ViuLt Mil Limed 3 Lid . - V cracttip V fare Instruments MDP Net Links . i'i "i re re re .re : - j_. : r ” , . . rere : . " l / e . .H-v-vf-ci-'c:: . e tm) , . .iKvvyri;m.^c.c3,7r' . ./,v,v, crns..j : ',£nm , . . ■ w -Qftiffiuc _ . : l " j . i om ♦ .Aiiv, :: Tree: e _■ ... . jiH&v, . ~g -r=JZ5*.Cz : _ . Mm o]m cony - -■ ■■ I-:-, j ■ . - r : uom . jmw - re: . .^v.v.re.re = ~-'.t - . .... r ... . . .;, r iV.v. tt re ::re rez . rev. s* :-£SS-..i re ■ ... . . r'p Vi I ... f z -2 - J. L'ft L . .......... . . B'A’. v . nfir ~~ n. ~ ' “ ■ i. .■ 7 . -.'.v. .. re:: :. Ls.:j ~ . '.re nn-7j -VViV, z. .-£"r £7.""" " --- cr L - - - v.v. . ..vvre, ■ T-rere CL" . -v/iv. =c: frer:: . ■ . .;^h.££:j -..v — , .mwi j mti : ~=~ a co.irf . . tWim rt .'..I.:: - :? - ' -.are . . _>Yj ViY.mftinst tfemnn.co.u?: . -yaw, ~ re - - - re ijjjfi GO , . . . .ao . .19. 30 £Q 69 BO . .. . 3D SO 32 . .75 60 60 SO . ....BO ; 79 19 . . . . .80 BO B0 HO .....30 3 . . . . .30- . ... -SO 30 B0 66 2 31 B0 Links _ :je.\ iVsve Concepts, hzi Links fteirtber One Systems aiirvc NsLvDiks 02MB PCBWoitd ItetUnks . Ff^ 1 ’ Elecifcr.it, 'ret Links ........ FHYZX. ?iet links Pedes. \e: L r I ls . Pica Quasar Ere ctren cs ?i5« Links HU Research ......... Ffobci Electron os. ?.=: Links . . . Telnet 'let Links _ . Total Tatemstlcs ......... Ureases. ItelL'Eiks ... of Dertiy USES Insvumerus. Let Links. VTewcom, ’tel Links ........... Jflins Teciirin.agy. Ucl L "■ s _ j'p Vi i v r > " i : p-ft-ccrriTfiif !s.cam AV^r.m/nheromxom i i; v. vv 5~s5if£L - l " -nm ./iVCiV rei r ~L nr— ....... ..v.i’.v: r • : : r g . . . . . • .re. ; .\YiVti. ........... : av,-a : -f - rere:;-: re -j. ■ ■. £ ■■ re- . . . . mr/i a.'sctisnfcs. cr if . . » p i v, i . ib - f : :. ? r - . . . . -.re-v. f "re: :: :: : .. n . re.fre : ■ -.■re.'. . frei: re- re. _ ■ v, re. - ■ ::re re :.:- vn i jv rec, 77./3. e’e?- ttk , _ . . . . re vrere re re c~m .. .30, Si Si . . . . .55 49 19 ...... .61 31 31 .... ;81 , . . 4.65 ....64.81 33 . . , .81 .at 75 61 Tg ,81 . ...81 ...... .81 AdyerEismg space lor Ihe issue ol 17 May 2005 may be reserved nol JaEer lhan 19 April 2005 .visit Hu son [nternaiitmal Media - Cambridge House - Gogmore Lana - Chertsay. Surrey KT16 SAP - England - Telephone 01932 564 999 - Fax 01932 564993 - a-maii: rev; re h son media com lo wham ad correspondence, copy instructions and artwork should be addressed. 84 elcklDr e!idronics ■ 4- 2005 U; o O C\i 1 P - to i':. ~g. For.PCEs front pans- id Is. EPF I 7e. PALs. 3Als. ■microcorUrti 7-7 ?.r .1 d. 3 orfo : stair par: - . r . ■ • -- 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 Audio Collection 2 z 12.05 Micro Web Server: MSG 1210 board £ ag.oo Network extension £ 41,95 Combined package c 103,50 Fiash Microcontroller Starter Kit £ e&.oo ' ■ . j ■_ is ■ .. ■ . i:..:.:._z: Suhfrtotnl Thp - ---- 5FE crijTfQE trzzi , ihaut cr , a r “ZLTzez a r Pr zee zr 3 rtE-— ZE.rcnntiz n s pc p 5Wffll 7Ere ?uP5*'=w3 ii T r = ' vJ5 L=5^Js=. t, & 0-E: To fa/ pa/d SVi’i ZH c Ti ss-js "liTDef VisffTt METHOD OF PAYMENT 5 ee re . ezee ze : z e zz- ~ z ee ezz r zz ' eee Note: cheques not made out In sterling must be Increased by the equivalent of £15.00 □ □ □ □ n Bank draft Cheque -L ■- 5 ?-::r £ nv *. : : - . : •: Giro transfer - . . 1 ■ ?- ■ :2 3 ■ Postal/money order Pi ease send Ibis order form to * 'averse for conditions Elektor Electronics ^ubiis' r ngi P O. Box 190 Tunbridge Wells TN5 7YVY ENGLAND Address e . ilA EL74 Date - - 2005 Signature ■ iiiif iiiiii ■ ■ ■ i. i a b ■ e j. ■ . ■ m, b. -■ . ■ . ■ ,■ m ji ■ ■ a.. — ■ i* ii ■ b. ■ ■ Xr.fi ■ . ■ _ a m _ ■ .... _ ■ _ ■ _ .« p ■ .b b u _ b b, _ a - ■> _ _ To- , I 73' 2C7 657 Fex: - : . (0)1E77 2: : 616 Interne’ v. ,vA.e‘e-;tc ^siec Tree x 3,c z '_54 z~: Czzzzi r zi zo o z. ZlT ez ~z: :z :ez t z .a 5 . :ee on: ==': : e : :e r I : 7: ’ I'T . Szi-zd : - 1 Ez :> E 76 - e : = r z z . _ z - lz-Z,--Z~ r - Te 771 :Th-EE - ' 57 Fz 73 3 524-9-6“ Ensl . _e:zz' . e.z • : .z zee z: ” BB..BB.EI.B . ■ - A M ■ i. -J. ■ - B B J ■ B . .. fl. J L ,1 - L J.. «, ■. B ! j. n L C Yes, 1 am taking out an an annual subscript ion to elektor electronics and receive a free wireless 433 MHz weather station*. I would like: □ Standard Subscription (11 Issues) PI Subscription-Plus (11 issues plus the Elektor Volume 2005 CD-ROM) T Offer z , £ &t £ :z S^bscxbers v. ~z ha vs rs? z? = 5_r.z cngti&r fo ctesfrarj.ss in tbs test f£:AfoflfAffLG!ffiar Sup/eef to AvsHatilisy. Fee reverse for rates ana ccna Fans, TSfe (BzWr- A t is A fo * 1 fo/tfafe Surname W-i.TTe Address ,z ” ' : • • r - _ 7 -.L \\ •- • ;• :■ EL 7 4 Post ccds Signers METHOD OF PAYMENT see reverse 3e!Gra ; :• r? a; -j _ _ • : ate iW Nots: cheques not made out in sterling must be increased by the equivalent of £15,00 | | Bank draft [~] Cheque ::l: e 6 e E f:::: - :e = _: r v: □ G iro transfer :_ r 74 z. | | Posta (/money order □ ’ VISA ’ m Uipsry oas: n r 1 1 n h E EE£ EEZG L“ S Z"Q5r form tO Worldwide Subscription Service Ltd, Unit 4, Gibbs Reed Farm Pashley Road Tice hurst, nr. Wadhurst East Sussex ENGLAND TN5 7HE Tee! . - 44 i ■ 0 1 5BO 200657 Fax ■ - 4 4 . - 0 . 1 5SD 2006 3 6 E mail ,v vrs s 2 £• 5 z z . ORDERING INSTRUCTIONS, P&P CHARGES Except in the USA and Canada, ail orders, except for subscriptions (for which see below), must be sent BY POST or FAX to our Tunbridge Weds its rt| trie Order Form overleaf. On-line ordering: httj>://VAmesek tor-electro n ins. cs-uk- Readers in the USA and Canada may (but are not obliged mi send orders. ti-ceot for subscriptions (far which see belD\vj, to the USA address given on trie order form. Please apply to Old Co I any Sound for applicable P&P charges. Ffease ailmv 4-6 weeks for deliv: Orders placed on our Tunbridge Wells office mystinclude P&P Charges (Priority or Standard) as fallows: UK: £4,00 Europe: £5.00 f Standard) or £7.00 (Priority) Outside fe/rap mM -Standard) or £12 .00 /Priority) HOWTO PAY Unless you haws an approved credit account with us. all orders must be -accompanied by the full payment, including postage and packing eh areas -is ^:^ed above. Paymen: may be made drawn on a London clearing bank :ee para. - prista i/ISA, Access MasterCard or EuroCard (when paying by credit card, the order must go the cardholder's address). Do not send cash through the mail. Cheques and postal orders should be crossed and made payable to 4 0ektor Electronics (Publishing)'. Payment may also be made by direct transfer from a private i :ss Giro account to our Giro account Mo. 34-152-3801 by completing and sending tc the National Giro Centre, in a National Giro post- age paid envelope, a :~i\ Giro transfer/deposlt form. D.p-not send Biro transfers direct to us, as this will delay your order, if you live mr§i$B UK. payment may also be made by Banker^ sterling draft drawn on a London clearing bank. Eurocheque made out in pounds sterling (with holder's guarantee card number written on the back), or US or Canadian dollar cheque; drawn on a US or Canadian bank. If you pay by Bankers' ster- ling draft, make clear to the issuing bank that your full name and address MUST he communicated to trie London c fearing bank. Our bankers are NAT WEST PLC, 1 St James's Square. Wadhurst, East Suss ax TM5 6BH, England. Our account number 1s 3512 5225, Sorting Code 60-22*15. ISAM code: GB40 NWB K6 022 15 3512 5225 BIO code: NWB KGB 2L COMPONENTS Components for propels appearing in Elektor Efectrontes are usually available from certain advertisers in this magazine. If difficulties in trie supply of components are envisaged, -a source will normal , : : =:/, :r j in the artiefe. Note, however, that the sources) given is (are) not exclusive. TERMS OF BUSINESS Delivery Although every effort will be made to dispatch your order within 2-5 weeks from receipt of your insr :: :ns. we car itdLpriatariferitriis time scale for all orders. Returns F&ulty goods or goods sent in error may be returned tor 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 slating the dispatch note number. If the goods are returned because of a mistake on our part, we wifi refund the return postage. Damaged goods Claims for damaged goods must be received at our Tunbridge Weils office within 1 0-days (UK): todays (Europe) or 21 -days (all other emmfries). Cancelled orders All canceled orders will be subject to a tjtefe handling charge vvitri a minimum charge of £5-00. Patents Patent protection may exist m respect of circuits, devi- ces, components, and so on. described in our hooks and magazines. EM lor Electronics (Publishing) does not accept responsibility or liability for failing to identify such patent .or other protection. Copyright AH drawings, photcgrjcs. articles, printed circuit boards, programmed integrated circuits? diskettes and software carriers published in our books and magazines (other than in third -party advertisements] are copy rig hi and may Pdf M : - Iran s milted in any form or by any means, including photocopying and recording, in whole or in part, without the prior psrmM Sion of Efektor Electronics (Publishing) m writing. Such written permission must also be obtained before any part of these publications' Is stored m a reirfeyaJ system of any nature. Moivrithstandmg the above, primed- circuit Boards may be produced for private and personal use without prior per- mission. Limitation of liability Ffefclor Electronics (Publishing) shall not he liable In contract, tort or otherwise, for any lessor damage suffered by the purchaser whatsoever or howsoever arising- out of, or in connexion with, the supply of goods or services by Etektdr Electronics (Publishing) other than to supply goods as described or, at the option of Elektor Electronics (Publishing), to refund trie purchaser any money paid m reseed of the goods. Law Any question relating to the supply of goods and services by Ejekldr Electronics ( Publishing? sbt :s determined in all respects by the few : : : Enoland. January 2005 ---------- _ » i - - - - - .. - - . SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION SUBSCRIPTION RATES FOR 18- MONTH SUBSCRIPTION Standard Plus Standard Plus United Kingdom £39,50 £46.00 United Kingdom £59.25 £69.00 Economy Mail Res" o\ the World exc ud ng Europe) £51.30 £57.80 Economy Mail Rest o ; re V. : - : rg Evuv £76.95 £86,70 Priority^ Airmail Europe 3 Eire Outside Europe £51.30 £65,00 £57.80 £71,50 Priority Airmail Europe A Eve Outs u£ Enron " E78.75 £97.50 £88.50 £107.25 Airfreight USA A 1 • 'i-.ee ~ US3S8.Q0 USS9B.00 Airfreight USA & Canada ony US3132.0G USS1 47.00 Payment should be made by: - Cheque or bankers ' draft in sterling dor. V Dr -I” Ctiv ban- SUBSCRIPTION CONDITIONS except in the USA and Canada — zee below): * USS cheques drawn on a US or Canadian bank — only by subscribers jn the USA or Canada * Direct transfer to our bank [NAT WEST PLC, 1 St James's Sq_ WatfhufSl. East Sussex TN5 6BH. England). I u account number is 3512 522Z S : ling Cede 60 -IMS. SAN code: GB4Q NWB K6 022 15 3512 5225 BIC cods: NWB KGB 2L * Postal order ■ Credit card: VISA, ACCESS, Euro MasterCard. JCB Electron or Switch. - Transfer to our Giro Account number 34 T52 3801. Giro transfers she. - e:e completing and sending the appropriate :re“efe deposit form to the National Giro Centre (UK) or to your natioual G ■■■ Ct '7. : equesan: costal orders shoo A :c ~c:e- payafi s :: E e :: Electronics i Purilishlno )_ Do not send cash through the mail. Trie standard subscript! on order period Is twelve months. If a permanent Chang's of address during the subscription period means that copies :ohe despatched by a more expensive service, no extra charge will M made. Conversely, no refund will be made, nor expiry date extended, if a change of address allows tbs use of a cheaper service. Student applications, which qualify for -a 20** i. twenty pe? cent) reduction In current rates, must be supported by evidence of studentship signed by the head of the collage, school or university faculty, A standard Student Subscription costs £31,60. a Student Subscription-Plus costs £37 60 ■ JK -on-v Please note that new subscriptions take -about four weeks from receipt of . : der to :c:c me e“i: . a Canceiled subscriptions will he subject to a charge of 25 E (twenty- five per cent) of the full subscription price or £7.5o. wliiEtfev^f Is the higher, plus the cost of any issues already dispatched. Subsciptions cannot be cancelled afie . nave run for six months or more. Ja missy 2175 1 Order now using the Order Form in the Headers Services section in this issue . Elektor Electronics (Publishing) RO. Bax 190 Tunbridge Wells TN5 7WY ENGLAND Telephone +44 (0) 1580 200 657 Fax +44(0)1580 200 616 Ema i I : saies@ele ktor-electronics.co C D- R O (M3 ; More information on www.elektor-electronics.co.uk Elektor 2004 This CD-ROM contains all editorial articles, with the exception of New Pro- ducts items, published in Elektor Electronics maga- zine Volume 2004. Using ihe supplied Acrobat Reader program, articles are presented in the same layout as originally round in ihe magazine. The DiskMirror utility on this CD-ROM allows your earlier Elektor year volume CD-ROMs (1997-2003} to be added to a large archive on hard disk for fast access and easy reference. A built-in search function allows you to find references in any article from the archive on hard disk, or from individual year volume CD-ROMs you have available. £16,25 (USS 28,75) Gameboy Digital Sampling Oscilloscope a brilliant design The GBDSO Is a plug-in module that turns the popular Nintendo Gameboy Classic. Pocket. Colour or Advanced into a versatile dual-channel oscilloscope. An optional link to a PC even allows measured oscillograms to he viewed or stored on the PC. The GBDSO rocked the electronics hobby world and that's why we conti nue one ring ready-built GBDSO modules (including ihe associated PC software and the magazine articles). £103.00 (USS 183.00) Audio Collection 2 A unique CD-ROM for the true audio lover, containing no fewer than 75 audio designs from the past five year volumes of elektor eiecironics magazine. The articles on the CD-ROM cover rest & measurement equip- ment. amplifiers, digital audio and loudspeaker technology. Highlights include the Crescendo Millennium Edition, Audio-DAC 2000, Audlo- and the IR-S PDIF Transmitter and Receiver. Using the included Acrobat Reader you are able to browse the articles on your computer, | as well as print texts, circuit diagrams and RGB layouts. £12,05 (USS 21,25) ECD Elektor's Components Database gives you easy access to design data for over 5.700 ICs. more than 35,000 transistors, FETs, thyristors and triacs, just under 25.000 diodes and 1.800 optocouplers. All data- bank applications are fully interactive, allowing the user to add, edit and complete component data. £12,95 (USS 22.90) Micro Web Server for Internet and Intranet control and regulation via the Internet Remote measurement and control is possible via the Internet. Unfortunately, webservers usually sii in large, humming grey cabinets. That's not the ideal solution for keeping an eye on your refrigerator, coffee machine or central heating system. The Elektor Electronics Micro Web Server provides an alternative. Our incredibly popular MSC1210 microcontroller board (also known as 'Precision Measurement Centraii now provides network and Internet connectivity, allowing the processor to publish iis own data pages onto the web. The article describes a tempera- ture logger allowing the user to enter, via the Internet, temperature [imiis and an email alarm address. The Micro Web Server can also switch net- work ports from an Internet-connected PC. literally anywhere on the globe. Now available: * MSC12 10 board (assembled and iested) £69.00 (USS1 12.50) * Network extension (assembled and tested) £41.95 (USS73.95) ■ Combined package (inch software and all related Elektor Electronics articles on CD-ROM } £103.50 (USS 184.95) \ fY wym 5zl Layout Tm * t S/l* o 0 * Powerful & flexible schematic capture. Auto-component placement and rip-up/retry PCB routing Polygonal gridless ground planes. Libraries of over 8000 schematic and 1000 PCB parts. Bill of materials, DRC reports and much more. Textual library part search. User defined keyboard map CADCAM output to ZIP file. Mixed Mode SPICE Circuit Simulation • Berkeley SP1CE3F5 simulator with custom extensions for true mixed mode and Interactive simulation. • 6 virtual instruments and 14 graph based analysis types. 0 6000 models including TTL, CMOS and PLD digital parts. 0 Fully compatible with manufacturers' SPICE models. • Bitmap import function. • Truetype fonts on PCBg, • Enhanced printer output. Call Now for Upgrade Pricing wwwJuhcenter, co, uk info@lnbcent@r* co. uk 9 9 9 Supports PIC, AVR, 8051, and BASIC STAMP micro-controllers. Co-simulate target firmware with your hardware design. Includes interactive peripheral models for LED and LCD displays, switches, keypads, virtual terminal and much, much more. Compatible with popular compilers and assemblers from Microchip, Crownhill, 1AR, Keil, and others. r i Proteus VSM - Co-simulation controllers