Cl rll priii kr# tL:,» i 'u._n i s it K Vr nit; 1 rjlyl . lX V — rj ^ 1 | VJT7T ilTT \ "i] ■] { fij j ^~l jut w ub if 1 1 :_j j - * • 7" - “ -T ' IP**' [ j \/7 j TTTJ ._] TT | i “• g 1 ! ] j f» n 1 pT*J “■ ilfee nr* i! .j . TTj _f 1 _JJ_LL. • fy 1 9 | » J i \ X r? J I r / J| J 0 J p / j / / Our 2006 catalogue is jam-packed with over 780 new and exciting products! We sell a huge range of innovative products through our FREE 410+ page catalogue. Phone or hop on line to www.jaycarelectronics.co.uk and purchase from us 24/7/365 through our secure encrypted system. Post and Packing charges are modest so you can have any of 8000+ unique products delivered to your door within 7 10 days of your order! Lead-Acid Battery Zapper Kit KC-5414 £11.75 - post & packing This simple circuit is designed to produce bursts of high-energy pulses to lid p reverse the damaging effects of sulpha ti on in wet lead add peffs. This is particularly useful when a battery has been sitting for a period of time without use The effects are dependant of the battery s condition and type, but the results can be quite good indeed. Kit supplied with case, tilkscreened ltd leads, inductors all electronic components. with clear English ins tju chons V "Pre-Champ" Versatile Preamplifier Kit KjC- 5166 CL6Q +- post & packing Specifically designed in conjunction v.ith our champ amplifier (KC-51S2 shown left): Unless your signal has sulrident amplitude die Champ' wifi not produce its maximum power output The Fife- Champ’ is the answer with a gain in excess of 40dB. By changing the master you can vary the gam and (here is provision on the PCS for an deefret mkraphnne (Ure AM-4010 £0-80 - Power required 6 - 12VDC and can be battery powered. i Cl * PCS and all electronic components included ... . in "The Champ" Audio Amplifier Kit KC 5152 £1.95 4- post & packing This hny module uses the LM38& audio 1C, and will deliver 0.5'W into 8 ohms from a 9 volt supply making it ideal for all those basic audio projects- It features variable gain, will happily om from 4-J2VDC and is smaller than a 9 volt battery, allowing ie to fit into the tightest of spaces, * PCB and all electronic components included Ideal f Sc nooI as 'c au ( ? r °iect Tempmaster Kit KC-5413 01.75 - post & packing Need accurate temperature for a wine coaler or beer brewing heater? This proiecr rums a regular fridge or freezer into a wine cooler by accurately controlling the temperature* to make it suitable for wine storage A much cheaper option than commercial units. jg, Kit supplied with PCB, case, and all <■ : pv— electronic components, 'C \ * Australian to UK mains * Te ^Pma.5,7 Er I adaptor required v use PP-4Q2Q £2.95 ^ ~ A Automotive Headlight Reminder Kit KC-53I7 £B,75 + post & packing Features include a modulated alarm, ignition and lights monUonno. optional door switch detection. time-out alarm and a shod delay before the alarm sounds. Build and install this hassle-saving kit enjoy a feature in your j 1 ” car that many luxury- vehicle owners have long taken for granted- Kit supplied with case, silkscreened lid and all -r gl electronic components, Theremin Synthesiser Kit KG5295 £14.75 +- post & packing The Theremin is a weird musical instrument that was invented eariy last century but is still used today The Beach Boys’ classic hit Good Vibrations^ featured a Theremin. Gy moving your hand between the antenna and the mala! plate, you can create strange sound effects. Kit includes a machined, silkscreened, and pre dialed case, circuit board, all electronic components, and dear English instructions. - This product is also available built and fully tested Cat AM-4025 £29,95. Requires 9VDC wail adaptor (Mapl in “GS74R £9.99). "Clock Watcher's" LED Clock Kits These docks are hypnotic! They consist of an AVR driven dock circuit, that also produces a dazzling display with the 60 LEDs around the perimeter It looks ‘ Jj amazing, but can t be property explained here We have filmed it in action so you can see for youredf on our website wwvt jaycarelectonics.com! Kit supplied Viilh double sided silkscreened plated through hole PCB and all board components as well as the special dock housing! Available in Blue (KC-S416) and Red (KC-54&4L Requires 12 VAC wall adaptor (Mapfin ^GLMBL €9 .99* KC-5416 (blue! £55 25 - post & packing KC-5404 (rod) £41.75 - post 8 packing Post and Packing Charges Order Value Cosl £20 - £49.99 £5 £50 - £99-99 £10 £100 * £199.99 £20 £200 - £499.99 £30 £500+ £40 Max weight T 21b (5kg) Heavier parcels FOA. Minimum order £20. Log on to www.iaycarelectronics.co.uk/elektor for your FREE catalogue! 0800 032 7241 (Monday - Friday 09.00 to 17,30 GMT + 10 houcs only). For those who want to write: 100 Silverwater Rd SUverwater NSW 2128 Sydney AUSTRALIA 780+ new products * ~\ \ ^ ^ 410+ page Catalogue A % ^ Helping You Succeed Does your business need more support and resources? Successful organizations recognize the value of a strategic supplier relationship to help them deliver innovative products to their markets in a timely and cost-effective manner. Microchip Technology supports more than 45,000 customers worldwide, and we re committed to helping you succeed. In addition to our high-performance silicon solutions. Microchip provides a long list of support functions that reduce time to market and lower your total system cost. And we have significantly expanded our local technical resources. fftegls&sr Use microchipDIRECT to Order directly from Microchip, 24 hours a day, 7 days a week with a credit card or credit line Receive competitive, direct volume pricing on all devices Check our product inventory Order broken reels at steep discounts Use fast and inexpensive production programming (now availablef Place and maintain your order securely from any network connection * Assign a PO number to your order * Create a unique part number for any item ordered * Receive e-mail notification of orders, deliveries, quote status and more micrt ' j WWW.iniCrDcllipcjirBCt.cam ---- The final product As announced by our Publishing Plan printed on She Sneak Preview page every monlh, the focus in this issue is very much on PCB production tech- niques. Etekror Electronics PCBs are famous the world over for their quality and consistent appearance. Sure, they're also a tad expensive compared to what the competition are supplying but then the quality and finish are vastly superior. Here at Elektor, the change from man- ual artwork design using masking tope and photographic reproduction tech- niques to an ]0 G c o PC-driven process was gradual, and took place in the early 1990s. The use of a PC to draw a schematic and then run a PCS design program was not forced or even suggested' by our governors at the time. In fact some of the younger lab designers at the time started to dis- cover the advantages of the PC route for themselves, eventually supplying files instead of drawings to their col- leagues in the PCB design department. Others stuck to pencil, paper and rub- ber with equally goad results particu- larly in RF and space critical designs. No matter how the final artwork was produced, we never actually mass-pro- duced those famous Elektor circuit boards — this was always farmed out to PCB manufacturers. We did. how- ever, handle the storage and packag- ing of what must have amounted to hundreds of thousands oF those blue and green boards. Also, to this day we have our awn PCB etching and drilling facilities. These are used to make prototypes and one-offs of ony board we're proud and happy to hove kept single-sided [not too many these days, thanks to the micros), \ do recall the excitement in the lab and editorial offices about 1 5 years ago v/hen a parcel arrived containing 500 or so boards for o recently published pro- ject, At last, the proud designer was able to see the fruit or all his design efforts. More importantly however, readers all over the world were more than satisfied wilh superbly produced circuit boards wilh a component over- lay and silk screen finish! Today, There is still the satisfaction not only of publishing these wonderful designs and hearing From you but also of holding a perfectly machined printed circuit board with an Elektor production number printed in a earner. Jan Butting, Editor a » International R8C Design Competition ®cT klQui great prises - easy par | A page 14 l/\l ^ Once the design of a circuit has reached the point where the PCB CAD data file has been produced, a physical board is usually wanted as soon as possible so that a one- off unit or laboratory prototype can be assembled and tested. !n this article we look how to choose between the various alterna- tive routes to manufacture and survey their advantages and disadvantages. Volume 32 May 2006 into. 314 The stand-alone analyser described here used as a hand-held unit or fitted in your car. Diagnostic data is evaluated using an ATmega! 6 and shown on an LCD with four rows of 20 char- acters. Up to eight parameters can be constantly shown on the display while you're driving. Having this information at your fingertips can be especially handy if you have car trouble. Are you bothered by stray cats and dogs prowling and dig- ging in your garden? Or does your own pet require strong persuasion to stay within a restricted area? This electric fence generator may well be the answer to your problems. A simple generator built around a 555 timer and an old ignition coil are sufficient to build a suitable circuit at a small outlay, know-how 1 8 Lead-free? No problem hands-on 30 Mini ATMega Board Onboard OBD-2 Analyser 46 FPGA Course (2) 5 2 An R8C-based oscilloscope 64 (JV LED lighf Box 68 Electric Fence Energizer 72 Design Tips Reforming old capacitors Current surge limifer for toroidal transformers PCB pin insertion tool Accurate timebase technology 24 PCB Production in the Fast Lane 60 E-biocks for Prototyping 30 ATMega Board Even if the ATmega microcontroller isn't necessarily mega, it's still quite popular and we feel it hasn't really received the atten- tion it deserves. The Mini ATmega Board described here puts a change to that, and a nice application for it — our Onboard OBD2 Analyser — is featured in an accompanying article. info & market 6 Colophon 8 Mailbox News & New Products International R8C Design Competition OBD-2 in Elektor Electronics 81 Elektor SHOP 84 Sneak Preview infotainment 75 Retronics: 1 -to- 3 Phase Converter (1994/1995} 77 Hexadoku (5) lectronlcs 5 u b scrip tiont: - : « z : r bEti ror :■ - ^ 7 ~ - z Pegi£ fCOO Gtti Vi&t Pest TWS 9KH. Errand: ei <^44) (0) ID8 261 4509, tsc (444) 0) 208 26! 4447 rie-mfr ■ v, - z ■ z:,' E^rvi: -. _L:ii ' 21 1 : r :-: :: : r. r : _ :e -““I "rr— ■ I'z: J- I'z I_Z1. lt-f C JE” 4 r Volume 32. Number 354, May 2005 5bN 0268/45 9 E/elucr Electronics aims at inspiring people to master electronics at an/ person- al level by presenting construction prelects and spotting developments in elec- tronics 2nd information technology. Publishers z _-e: E:-~:~:e 9HKtngfsratt V, <=3z* . — esl . _ ".tE-E : C >_ r \^SL?C Szd (444) pi) 2 OB 26* 4509, Sac (444) (0) 208 26! 4447 The rr sT^^ e « &/&&& free*- n c W& g pffe , boofc^sops ire a t-zrc^ -3 ^=z ewez r=~ z~ E-:~:t:" £4*t: :t:' ** : : r c -- --- • ■ ~— z -i .% : aoz_r zr_: & - .= ,r Unj^rtr^ nsT-e Stiftbr wH B&iuJ', tHe s in nenm. Gerr -1 EX=Kh Togstrer ,-. - — ire rrsEgEzre s caoso^s: n nco tran 50 coursnes I niemationd Editor "r^ri - " - _ Editor. -L" Bujstg (ed ez ; '/■: s.cc Imcrnatianal editorial si aff: -e~ Ezevt - f:- -- ■ -z“-:-zez_£ ■=- z r - ■ - ■ -zzEErzc-z ■“ Design staff: _ jEEZIZE -z_ L -■: ■= ■z-e .'.z .' i,= Editorial secretariat: £._..- r zaa 7 : : :z ■ r r:~ ' Head Office Era": : , EO Soar 75 NL-4!90hAB Seefc z =z- ~ - -T- — -' : - ■" - - ee* - j 4 c- — s, l t Dirrnbu lion: 5 z > me z " Be he,'. — z - B-icCr -■ : _.I E - = ar r UK Advertising; Huson Imerratiomal Medfe Cambria Hose. Gcgnxxe line* 7~: ~e : - _ “±- ■ ' : 44.- £-z±-_ -44 (0)1912 544999. Fax_ +44 (Oil 932 364993 E— z = .-• i 3" ' -:ca iE ' “ter— -0“- .v- .- • .. ■ ■ -_^ z '■-e/-:-~e - e z-er et 4 — 7 f.irz c~ ei.+ee Intern siional Advertising: ■ ee: Be ~ - ec-ez-z :e -- " - e ' -■ ' \ -±~- : _ _ ■ Ad ^nsr-j et+e e"-t :=f~ - ■-. = - : z Copyright Hotite "Fne r7 y^r r»^d ft dis m^zre zr? 4y C be-ofear+r- sry pefrtc^ p—- ntcr - zEored n a retnr-a . 1 E,‘Er- <# 1+ r<~^: rk^rl prijfeibPn n zeOcZ of C-iTUO. tor-- - ± z ziz use tbe - ztrz- - 5z 1 >Bi; |E^fegar!j azo z£Z.v_^.Tne Pub&shcfs or«nov |Ui33BTJ z- ■ -El±' z z EEC +“ ' — - Graphic design DTP: 7m Gtifces. G-4 Dos Oisctaimef : - _z: E' : 7' " " 7 " " " n — :e — 1 z_=_+z: J z zrs ie . .. . : Hanagtng Director Publisher r ._ 3 “ : *:=-e Marketing: ,r 'E"r^T- pebe "---. ■ - 7 1 ©SegmeriibA 2l>C6 Pnnted n L=”e N^irieriarzE Tel: 01635 40347 Nawbury EJgc lion its Lid Fan 01625 5&143 firatit tissA Mm z±ns RGl 1 iM e-mi: : c:TCut5^TKwtJur/.lssm.n >J* irrt« n?At-jTyi:«:trefi'css:o.u3c WWW. X G AM ES TATI _i ■ Verified Your price conscious PCB supplier CIRCUITS Online price calculation Online ordering Online order tracking Online 24/24H and 7/7D Interested? Contact us: +32 15 28 16 30 E-mail: euro@eurocircuitSpCom WT On demand; pooling for standard boards up to 6 layers from 1 to 1000 pieces from 4 working days onwards a la carte technology a t the right price up to S layers from 1 to 100 0 pieces from 3 working days onwards your board, our challenge up to 20 layers from 1 piece onwards from 2 working days onwards 6 Mfc-r siKlKifiks - 5/ 3004 picture witn uitscope Multichannel Mixed Signal Oscilloscopes 100MHz Digital Oscilloscope 4 Channel Digital Scope using Industry standard BMC probes or analog inputs on the POD connector. 4QMS/s Logic Analyzer B logic. External Trigger and special purpose inputs to cap lure digital signals down to 25nS. Mixed Signal Oscilloscope True MSQ |o capture 4 analog waveforms time-aligned with 8 logic using sophisticated cross-triggering on any input. Real-Time Spectrum Analyzer See spectra and waveforms of all analog channels in real-time displayed simultaneously. Turn your PC into an expandable multichannel scope solution. Never run out of channels again. V/hsther debugging an embedded 3 phase motor cent ic'ier cr monitoring a full scafe synchrotron. BriScape is the right solution. Advanced Networking Operation Flexible network connectivity supporting multi-scope operation , remote monitoring and data acquEstion. Integrates with third-party software Use supplied drivers and Interfaces to build custom tost and measurement and data acquisition solutions. ■Vrth 4 independent analog and 3 synchronized logic channels, SilSccos is deal in situations where a dual charnel scops s mplv net enough Consider many modern embedded systems. component video, 3D robotics, DSP process control and automotive systems. All frequently require more than 2 analog channels a^d severs. s;, nebronized liming channels to really see Lhe bfg picture. Perhaps 4-8 cnanneis is no! enough? No proclaim. buifd a scope array accessible from the PC via your network and synchronized. v ia BitScope's trigger bus or logic inputs. 2mari POD' connected active probes and multiple software options complete the picture for the perfect low cost high performance multichannel lest and debug solution! Bit Sc Ope and your PC provide an array of Virtual Instruments Standard 1 M/20 pF BNG Inputs I jG‘j V - 20 1 d * . ■. eni c a! scale Software select AC DC ccup ng S’-vitcnab's 5G ohm term i natron xl to xIOD cr differentia] probes BitScope Smart POD probe connector 3 logs; channels, 4 additional analog inputs Async serial t 0 for external central Trigger bus tar rnufti-Ecepe sync Ethernet Ccnnectiwity High speed binary data transmission Standard network protocols (UDP/lPi Internet addressable device Expandable and Programmable Simp I s ASCII Protoco BitSccpe Scripting Language Add active probes and devices ElltScope s integrated design uses standard oscilloscope probes arri a growing range of custom probes to provide function airly equal lo instruments many limes the price. Bi tScape plugs info third party software teals and rss an open API fer user programming and custom data acquisition. BitScope DSO software for Windows and Linux INFO & MARKET MAILBOX Direct* toner method Hi Jan — I've been a sub- scriber for many years (I think since 1985) and l keep finding your magazine inter- esting and useful. However, I do hove one suggestion regarding PCBs. Not living in a country in which have offices. Tve always had prob- lems with getting PCBs, since ordering from abroad is kind of complicated in my country (okay, I understand we're in the EtJ, but still...). Recently, I discovered a technology for making my own RCBs, which is very useful and quick: the toner transfer technique. Maybe you've heard of it — basically it's just printing PCB to photo paper using a laser printer, transfer toner to the board using on boner or lam- inalor, etch and voila! Okay, choosing the right paper is difficult, but once you've fig- ured it out, you have a Fin- ished PCB in less than 10 minutes! This must be useful info for all home hobbyists, so maybe you should consider publish- ing o detailed article about it. Here is one link about the method: wv/wJullnebcom/u/torng/ aooSeenc-htm There is also a dedicated group on Yahoo: h it o : ' /a ro u ps . va noo.com / a r oup/Homebrew RGBs/ For your information! Pave! Veider (Slovenia) Thanks Pavel fcr the interesting email which are happy to repro- duce here far the benefit of other readers, it s no coincidence cs this issue is on All Things PCB '. Horn loudspeaker turns 16 Dear Editor — we hove con- structed a matching pair of horn loudspeakers as pub- lished in Elektor Electronics magazine in May 1990 (pages 20-23). We have recently tested the speakers with a frequency analyser and Found the low frequen- cies roll off at around 315 Hz, somewhat higher Shan expected and higher than the response indicated in Figure 2 of the article. Are you able to provide clarifica- tion of the following: 1 h In Fig, 2 of the article there are two response curves. Which one is the measured response of this unit? What is the other curve for? This figure isn't referred to in the article. 2. Have there been any mod- ifications or amendments to this design submitted or pub- lished that might answer our problem with lock of low fre- quency response? Any suggestions or informa- tion would be very much appreciated. Julian Weir (New Zealand) We do not know how you did the measurement, but tb/s design of a bam loudspeaker must give a low frequency roll oft at about 50 Hz The measurement in Figure 2 shows: {a} the frequency response of /he complete unit at a distance of I m with superimposed a sec- ond curve showing the pressure right in front of the born. You should add these two to get an impression of the total frequency response. Drawing (b) shows the impedance curve of the complete loudspeaker system With a low frequency roll off at about 300 Hz you should hear no bass response of all when playing music and we cannot imagine /hats the case. Some- thing else must be wrong, for instance a wrong value for a fil- ter component (the coil in series with the woofer) . Also , the choke of the right woofer is imporrant / assume you have no/ used the original MeFarlow speakers , since they are not available any- more. >bu have to use a speaker with the same Thiele- Small parameters , otherwise the cou- pling of the speaker to the horn will no/ be correct and you do not get enough bass output. (Mr Weir replies) The horn response was measured at 1 m from the front (onatxis) and at differing heights (in front of the mouth, and in front of the drivers etc.) with a receiving level of about 80- 90 dB, 1 have definitely heard a distinct lack of low frequencies: while there are some low frequencies, they are rather quiet. They can be heard when I place my head inside the opening. The horns were built by my dad about 9 years ago. We will have a look ot the filter electronics first to eliminate if that is the problem, then look into the drivers themselves, You are right, dad did not put the same MeFarlow driv- ers in. He put in a 60 W (rmsj 1 0 driver from Altronics Australia, as per the following web site: www. Qltronics.com.au/mdex. as p?a rea= item&id^C3 Q65 He would have researched the specs of the MeFarlow and Found one that he thought would have matched at the time, but we will have a re-look into that too. Do you have any thoughts off-hand that you con give regarding the suitability of ihis driver compared to the Me Fa flows originally specified? ! take it there have been no revisions of the design or dis- cussions/commentories on the final speaker? Many thank for you help, it is very much appreciated. 8 t'rklrr dertrfiaia - “J r I I I [ t I i I I I 1 I 1 1 I I l I f I I I I 1 I I t L Corrections & Updates Simple Rechargeable AA Cell Charocferiser April 2 G 06 , p, 28 - 31 , 050394*1 Resistor R 3 is not shown in the circuit diagram. R3 is a 104; pull-up resistor between the gate of II and the +5 V supply roil. It is present on the printed circuit board. R4 is a leaded component, not an SMD as suggested by the parts list. just after printing this article a problem occurred with the software supplied by the author. For this software to run, the user's PC must have Microsoft Java installed. For various reasons Microsoft is no longer allowed to use the name Jqvq j and [he relevant program is no longer round on the rnternet (but Google for MSJAVxB6.exe and you will still be able io find it). No problems are usually encountered on PCs running Windows 95 or 98 as MS-Jo vo will be resident and the program AA-CELL msjava.ZIP may be run without problems. The author has adapted his software to avoid the use of MS-Java* This requires changes to the installation. The fol- lowing steps are recommended. 1. Install the 1-Wire divers including .NET support (note when to actually connect the circuit, this is indicated during the installation; start without the circuit connecled to the USB}. http:/ /fiies.dalsemixom/autojd/licensed/install_ 1 _wire_dr Ivers_v400.msi 2. Download Microsoft .NET Framework 2.0 redistribulible package and install it (heft file at 23 Mbytes] http:/ /www. m i c ro soft, co m /d o w n I oad s/ d e to i I s . a s px ? fo m T lyid=Q856EAC B-4362-4 BOD-8 EDD-AAB 1 5C5E04F5&dis- pbylang^en 3. Download Microsoft VisualJ# 2.0 Redistributable Package and install it. http : //www. microsoft.com/downlcads/deta ifs.ospx?fom i- lyid=F72C74B3-ED0E-4AF8-AE63-2FQE4250 ] BE i Sdisplay- lang-en 4. Download the project software (AA-CELL dotnef.zip) from the Elektor website and install it. 5. Start — > Programs -> 1-Wire Drivers — > start Default I- Wire Net and select the DS9490 (USB) adapter. 6. Start — Programs — > Maxim Integrated Products — ■ AAcellchar That completes the modified installation procedure. In respect of electrical parameters the loudspeaker your dad used differs considerably from the one we specified for the project. Many readers asked us far a replacement type when McFarfcvv stopped /he production , but if is pretty hard to find a similar type. The leost we can do is give the main specs: On = 035 Qmc = 2.6 o“. 0.4 Vas = -S* I F s = JO Hz The main things that must come close to the original specs, ore QT5 and VAS. By the w ay no corrections were published for this project. It was a suc- cessful design J not really high fidelity, but very good given its relatively low building and compo- nents costs . R8C Tom Thumb con- nects to Avit Easy USB Dear Jon — regarding your query about connecting ihe Avit USB cable to the R8C/Renesas board, I hod already purchased two Avit cables ot the special offer price and decided to use one with my R8C board when it arrived, i mounted the small R8C board on a piece of Veroboard and just connect- ed ihe Avit data lines direct to the microcontroller pins. I used ihe Avit 5V and ground lines to power the R8C from the PC. again jus'r a direct connection. The system worked first time, the only problem 1 had was when 1 tried to download a second program and round that I needed to check the box marked ' erase before pro- gramming 1 (or words to that effect) in the FDT software. 1 also have a 4x20 charac- ter LCD disploy connected which seems to work ok, though I didn't try using the backlight as I don't know how many mA J have left! J may install a switch in the power line so I don't have to switch off the PC or unplug the cable when I need to power down the R8C. So far so good! Keep these excellent projects coming! John Bishop (UK), Thanks John and also Adrian Verity of Avit Research; theres another fine example of ho w quickly solutions can be found Wo our online Forum. Energy recovery Dear Editor — I was interest- ed !o read in "Design Tips', Elektor Electronics t March 2006, the piece submitted by Peter Lay describing how fo recover energy from a relay coil during switch off. Many years I ago per- formed (very amateur- ish) experiments using this tech- nique in o motor circuit. The idea was to get an idea of how much energy could be recovered from a bat- tery driven motor during its normal operation under pulse width speed control. Obviously ihe energy recov- ered would be on-going os [he motor was running. My circuit was almost identical to that described by Mr. Lay, with fhe exception that the motor was in place of ihe relay shown. The transistor was of course driven by a variable Frequency square wave. I was able to demonstrate an amount of energy recovered by the voltage appearing on the capacitor although this did not indicate a very forge amount. However my limited knowledge and practical skills prevented me pursuing the experiments. Would there be any advantage in this sari of idea in attempts to extend the life between charges of batteries driving motors? (my thoughts at the time were of electric vehicles). Perhaps some of your readers could pass some comments? David Cfenton (UK) Suggestions and comments invited . please send foem to the Editor. MailBox Terms Fu oil cat! ort ni reader's correspon- dence is at ire ciscreEco of ins Editor - Viewpoints exposed by corres- pondents ere not necessarily those of Lhe Edited dr Publisher, Corr&spcH-rdsnc? may ce translated nr edited for length. clarity and siyre. V/hsn replying to Mailbox correspondence, ptease quote Issue number - Flgase send your MatIBox CCdespondsnca to edilDr@elfiktof^elw:tmqi^; co.uk nr BeMcr Electronics, The Editor TOGO Great ’.Vest Rasd. 3 renttc r d TV JS 9HH. Eh g ten d . 5/200 i • ttektof e I stl remits INFO & MARKET NEWS & NEW PRODUCTS New dimension f# |olid steta lighting apf j. - :fionf OPTEK Technol- ogy has intro- duced one of the industry 5 brightest single-source pack- aged visible 1ED assemblies. Desig- nated the OPTEK Led mum Series, the 1 G-W pack- age offers a full 12G Z viewing angle for its array of amber blue, green r red, or white lEDs. OPTEK's Lednium Series devices are claimed to achieve an output of up to 330 lumens with nine l-watt LEDs mounted in an anodized aluminum package just 1 .3 inches square, with a board mounted profile of less than 0.5 inch. Conventionally-packaged LED arrays wish comparable fight output often require os many as 12 1 -W LEDs in configura- tions up to 8 inches in diame- ter, which typically consume more power. The wide viewing angle and increased brightness are crit- ical features for lighting design engineers as they begin to incorporate solid state light sources (LEDs) into applications such as automotive interior and exterior lighting, indoor and outdoor electronic signage and displays, os well as architec- tural lighting and general light- ing applications. The OPTEK Lednium Series LED assemblies also provide different parallel-serial connections that enable the operation of 3, 6 or all 9 of the mounted LEDs, enabling design engineers to vary the light output and power consumption. OPTEK s Lednium Series devices are avaifabfe in amber (595 nm, 330 Im); blue (467 nm, 60 Im); green (524 nm, 290 Im); red (624 nm r 247 Im); and white [250 Im). AH colours feature a Full 120^ viewing angle in water dear lenses. In development are other visible, os well as UV and IR wavelengths and package configurations. DC forward cur- rent is 1,05 A, with peak pulsed forward current of 3 A. Typical for- ward voltage char- acteristics range from 6.3 V to 9.25 V (colour- dependent), and reverse voltaae for v all devices is 15 V. Maximum allow- able junction tem- perature is 1 30 = C (average thermal resistance junttion- to-board is 5 = C/W), and the operating temperature range for the device is -50 ‘C to +B0'C. OPTEK Lednium Series prod- ucts are stacked by OPTEK's distributors in the Americas. Europe and Asia. OPTEK Technology, 1645 Well ace Dr., Carroll tan, TX, 75 006, USA. Tel. (+1)972-323-2200. www.optekmr.com/led_prl .asp. ( 0 * 711 1 - 1 ) Lascar for design and manufacture Los car Electronics Ltd, Now offers a custom design and man- ufacturing service that provides its customers with on effective route So rake projects from con- ception to market in a timely and cast-effective manner. Lascar's experienced engineer- ing design and development team hove expertise in many aspects of electronics, mechani- cal and software design — pro- viding the flexibility to engage all elements of the design process. This includes the design and development af custom LCD and LED displays, circuit design, PCS layout, 3D modelling and writing PIC and Windows based software. While full control of design and manufacture is retained in the UK Lascar s service offers □ straightforward route to Far-East- ern manufacture and the cost benefits associated with them. Many types of manufacturing techniques are employed includ- ing COB, COG, SM Plastic Injection Moulding, Metal Cast- ing and Sheet Metal fabrication processes. All manufacturing processes undertaken by Lascar are carried out to B5 ISO 9001:2000. l £7 ■ 1 ■ Lascar Electronics Limited, Module Hose, Whitepcmsh, Salisbury, Wiltshire SP5 2SJ. Tel (+44) [0)1794 884567, Fax (+44) (0) 1 794 884616. internet; wwwJa sajreiectromcs.com 10 dstter dedreski -5/2096 program or step through it line- by-line and see the logic levels of the I/O lines change. Secondly the CD contains a copy of the AVR Studio develop- ment environment which has o fully working licence-free C com- piler embedded info it. You can access AVR studio — pre-loaded with the relevant program — directly tram the CD by clicking on hyperfinks in the tutorials. The learning methodology is really complete: you read the text on- screen, view the program work- ing an the Virtual C machine, bod AVR studio, and then cam- pile the program and send it to your hardware. lastly the hardware contains an Atmel AVR programming board with In System Programming module □ board containing eight LEDs, a board containing 3 switches, and a 2-!ine 1 6-char- acfer LCD board. This is most of what you need to get started and the AVR programming board is compatible with the whole range of additional E- blocks boards should you want a keypad, prototype board, irDA board or other peripheral. If you have always wanted to learn C programming for a microcontroller but have strug- gled with books and manuals an the subject, then this kit could be what you have been waiting for. The kit is based on our popular E-blocks™ system far rapid pro- totyping and learning. The con- cept of E-blocks Is simple: each E-block consists of a block of electronics you ’would Find in an electronic system: a processor board, a switch board, keypad. USB interface etc. To make an electronic system you simply snap the appropriate E-blocks boards together and develop the software to make the system run to the specification. Whilst devel- oping the hardware system is rel- atively easy the software can be the difficult part - and that's where ihe C for AVR micro can- trailers CD ROM comes in. The C for AVR Microcon [rollers CD ROM fulfils several needs of those wonting tc barn C programming for the AVR and for those ’who want to develop □ rejects . Firstly the CD RQMi includes a full course in C programming. The course is screen-based and makes full use of the computer os a medium for learning: it con- tains a series of computer simu- tlons allow you to see the effects on the AVR device os each line of C code is executed, and you can easily understand what is going on. The screen image shows the Virtual C machine. Referring to the diagram: the top part shows you the C pro- gram under discussion, under- neath that in cyan you can see the variables, which change as the program runs, below that you can see the port A and B I/O lines with arrows that show Indicated by a red LED . Below the I/O lines are the critical reg- isters: the data direction regis- ters and their hex input and out- put values. Comrols on ihe right hand side allow you to run the i i ■ AVR running C code. This is a great way of learning C, because the simufa- The Elektar Electronics Easy AVR Kit is available now from the Elektor SHOP, check out details and price at www.elBfctor-elertronics.co.uk their status as an input or an output, and their logic level - where logic 1 is II 5/2005 ■ Before edraua INFO & MARKET NEWS & NEW PRODUCTS Network Cable Analyser gets an intelligence boost! Peak Electronic Design Limited have launched an enhanced version of their Network Cable Analyser the Atlas IT [model UTPG5), designed and made in the UK, The Atlas IT has always had the unique ability to analyse many types of RJ45 based network cabling, including Ethernet, Token Ring, Patch cables and Crossover Cables, The connec- tion pattern of ihe cables is auto- matically recognised and dis- played on the unit's display as well os confirmation of the full connection pattern, Nov/ the Atlas IT has been enhanced with cable deflations of 8 more cable types, including Cisco terminal cables, Linn Audio network cables, Ethernet Economisers, 4 line crossovers, voice/data cables and many more Additionally, for the first time ever, the Allas IT can now recognise the cable type even if there are connection faults (such as missing connections, swapped lines or other errors]. It will display the cable type and highlight any tines that have errors. The Atlas IT hardware has had a boost too, now it can cope with connection to live comms sys- tems and even withstand the high telephone ring voltages (upto 80 V) associated with mixed voice and data cabling. Using the Atlas IT could not be easier connect the main unit at one end of your cable run and the miniature (1 8 mm cube) ter- minator at the other end. For socket testing you con use the supplied mini patch leads too. Press the test button and after a few seconds the results of the analysis are displayed on the clear alphanumeric display. If you use the unique Identified Ter- minators, the Atlas IT will iden- tify the cable run for you too, allowing the easy testing and identification of many cable runs (upto 24) without having to make lots oF trips to swop termi- nators. The Atlas IT will automatically power down after a period of inactivity, so you'll never forget to switch it off* Measuring just 103mm x 70mm x 20mm r the Atlas IT Fits in the palm of your hand or could even happily dan- gle from a network socket l When it's not in use, if can be stored safe and sound in the sup- plied custom machined carry cose along with your acces- sories, terminators, cables and a spare battery. The Atlas IT Is available from many distributors including Far- nell end Mapiin as well as directly from the manufacturer for £89.00 fully inclusive of UK delivery and VAT. Peak Electronic Design Lid. Atlas House, Harpur Hill Business Pork, Buxton/ Derbyshire SKI 7 9JL Tel 01298 70012/ Fax. 01298 70046. www.peakelec.co.uk Coldfire suite embraces Freescaie MCF5207 and MCF 5208 Crossware has enhanced its Coldfire® Development Suite by adding support for Freescaie Semiconductor's MCF5207 and MCF5208 ColdFire micro- processors. This support includes a utility that allows programmers to integrate Freescaie s dBug ROM monitor software instantly into the Crossware development environment allowing developers to be debugging this firmware within minutes, tn addition, Crossware has added support for 64-bit inte- ger arithmetic to its ColdFire C compiler as this is becoming on essentia! requirement for mod- ern embedded systems. 64-bit integer arithmetic is used exten- sively, for instance, for check- sum calculations in Freescaie' s compressed audio reference software. The MCF5208 is a high speed microprocessor based on the V2 CaldFire Care. It includes a wide range of connectivity peripher- als, an integrated DDR SDRAM memory controller and an enhanced multiply and accumu- late unit (eMAC). Distributed clocking allows the on-chip mod- ules to be separately enabled and disabled which, in conjunc- tion with a low power dock divider, makes a low power implementation particularly prac- tical , Many developers wish to use Freescaie s dBug ROM monitor software as a starting point far their awn application. This is particularly easy with the iastest Crossware release because a new utility allows the complete dBug source tree and build set- tings to be imported in a matter of seconds, into the Crossware graphical development environ- ment, Developers can complete a build and download cycle within minutes of unzipping the Freescaie files. Additionally Cross wares FireFly USB BDM (background debug made) inter- face allows rapid download of the firmware into flash. Crossware's Coldfire Develop- ment Suite allows developers to create, build and debug their Coldfire programs both with and without hardware. The totally integrated, user-friendly environment accelerates the development process and signiF- icanily reduces new product trme-tcHnarket. iCc 1 -T www.trosswore.tom 12 debar skrlHmiii - 5/MDfi DuaNyoer BVIM PCI lxpjfi(||i solution for fh© living roo rnr'u Micronas offers PC OEMs and system integrators production' ready DVB-T design for home theaters* At CeBIt 2006 Micronas launched the MicPythan 7M 2R'X J a dual-tuner DVB-T PCI Express© card For home theater solutions. A univer- sal antenna connection lets the user watch and record analogue, digital, and Future HDTV signals without worrying about compli- cated cable connections or even switching antennas. MicPython 2H-X works with Windows XP Med ia Center and other third-party oppSications, guaranteeing ease- of use. Micronas will showcase MicPythcn 2HX far the first time ot CeBIT in Hanover. Germany from March 9 to 15, 2006. Home tbeotre systems must be small and unobtrusive, while delivering picture quality good enough For ever larger screens. MicPython 2H-Xs small size and low power requirements mean the system enclosure is small and quiet. The company's extensive television expertise went into the design to ensure best picture quality. MicPython 2H-X uses the DRX 3975D demodulator, the nGene© APB 7202A PCI Express control ler, both from Micronas, and a MicroTuner TV MT2060 digital TV tuner From Microtune. Micronas' nGene dual-channel multimedia PC! Express controller delivers the bandwidth needed far two TV channels up to HD. all in o single slot — eliminating potential bottlenecks that may occur with two slots required by conventional PCI. nGene is certi- fied by the PCt-SIG, the industry standard body for PCI Express technology, to be PCI Express 1 ,0a compliant. This certification guarantees that MicPython 2 HrX is compatible with a wide variety of PC motherboards offering PCI Express x 1 slats. MicPython 2 H-X and the ATSC- based MicViper™2H-X are the first members of a family of nGene-based reference designs supported by a common soft- ware model. The common soft- ware support across the family makes it easy to design world- srandard products, MicPython 2 H-X and Mic Viper 2 H-X ore complete, production-ready solu- tions. Both reference design kits ore available now. (p»7ni-i> www.mkoma5.ciHn; www.dtfb.org TMD !!edhn©!ogi@s' guided! ansitiom to !©od-free Specialist UK electronics manu- facturing company TMD Tech- nologies Ltd (TMD) has appointed Dr Shubo Gao to implement the transition from the company's traditional to latest environmentolly-hiendly lead free soldering processes. The new project is being under- taken as o Know ledge Transfer Partnership (KTP] between TMD and CRDM Research (Centre for Rapid Design & Manufacture), a Department of the Faculty of Technology, Buckinghamshire Chillern University College (BCUCJ. The programme is funded by the Department of Trade and Industry. Dr Shubo Gao, who has a degree in Electronics Engineer- ing and 1 0 years of industrial experience in electronics assem- bly, will be responsible for the detailed planning and execution of the project, and will be bosed mainly at TMD s manufacturing Facility in Hayes, West London, near Heathrow Airport. She will be working under the guidance of both TMD and David Jacobson. Professor of Materials at CRDM Research, BCUC. who is responsible for overall supervision of the pro- gramme. This important development is aimed at meeting the require- ments of new green EU legisla- tion that bans ihe use of lead in soldered products, and which comes into force in July of this year. It will ensure that TMD's future manufacturing methods will be compatible with all com- ponents from the European Mar- ket tailored for lead free use — as well as those from other vvorld markets that are currently not suited to lead free processes. The in-house programme will include the re-troining of relevant TMD personnel in all aspects of lead free soldering technology. TMD Ltd. designs and manufac- tures specialised transmitters for radar and electronic warfare applications, power supplies and microwave tubes. It also produces a range of commercial amplifiers for EMC testing, med- ical and scientific applications. ■ 03 i -3 - TMD Technologies Ltd*, Unit 3, Swallowfteld V/q y, Hayes, Middle- sex, UB3 IDO, UK. Tel: (+44) (0)20 8573 55 55. www.jmdnC0.uk i'TOOS-sbktof decfrc'ks 13 ImtWmJim R8C DESIGN COMPETITION The R8C Service Page and the R8C Forum topic on our website clearly show that the 16-bit Tom Thumb Starter Kit from the February 2006 issue is a great source of inspiration for readers' own experiments and applications. The free C Booklet sup- plied with the March 2006 issue was a further stimulus by presenting C program- ming for the little board. A great time, we thought, to launch a design competition and give the R8C project a further boost. Microcontrollers are no longer the exclusive domain oF professional designers and programmers. We estimate that about half the readership of E Mtor Electronics ore conversant with microcontrollers, and the percentage is sure lo rise with ihe availability of our Tom Thumb R8C Starter Kit (costing just £ 8.30 plus P&P). A 1 6-bif controller with great connectivity for peripherals, the R8C/1 3 from Renesas offers lots of possibilities for Interesting applications that are easily thought oF as going into mass-produced commercial products. After all millions of R8C micros ore in daily use all over the world, mostly in consumer electronic equipment and automobile electronics. This circumstance really triggered us lo organise a design competition around our successful R8C micro and offer Full commercialisation of the winning entry as the first prize. The lucky winner will receive roy- alties over the turnover realised by the product. However there ore lots of other great prizes to be won! The assignment Develop a killer application for ihe R8C/1 3 microcon- troller introduced in the January and February 2006 issues of Elektor Electronics. Bolh the Tom Thumb module (February 2006) and the R8C Prototyping Board (March 2006) may be used, but really any hardware configura- tion around the R8C is fine. The only condition is that a microcontroller from the R8C series Is used. There ore no limitations or conditions for software tools, although we should odd that for a publication of your design it would be advantageous that freely available tools have been used, i.e., any of the programs on the Starter Kit CD-ROM, or an Elekior free download. This recommendation is made to make sure that ideally the whole R3C community can reproduce your application through the magazine pages or the Elektor website. What to supply To participate in the competition, please do oof send us hardware or prototypes. Instead, supply the fol- lowing: 1 . A short description of the functionality in Word, RTF or ASCII format. 2. Circuit diagram [excluding the R8C board] on paper by post or by email as o .jpg, Jiff, ,eps or Acrobat file. 3. Source code or hex code file[s) of the ROC target soft- ware [on diskette or CD if sent by post}. 4 Additional documentation you deem essential for an Initial appreciation of your project (for example, images). Where to send it to Please send your competition entry by email to ediror®elektor-oledronics, co. u k and use R8C competition as the Subject. Automatic sort- ing will be applied lo incoming emails so please copy the subject exactly. 14 elslivi eh ranks- 5/20 04 Special Prize As is generally known, genius and lunacy go hand in hand. Consequently, nof all competition entries can be measured with the same yardstick regarding real-life value, efficacy and the extent to which the project is "finished". That's why a special prize is offered for the most creative project we receive For this competition. The prize is also as creallve as it gets: An E- Blocks Easy AVR Starter Kit from Matrix Multimedia with a value of £ 250 and a Valve Experimenters Kit from AK-Modul-Bus with a value of £ 65! Alternatively, send the project by post to Elektor Electronics R8C Competition Reg us Brentford \ 000, Great West Road Brentford TW8 9HH United Kingdom supplied in relation to the entry. The Jury decides which projects are published in Elektor Electronics magazine, and which on our website(s) In addition to a prize, a remuneration of 75 pounds or TOO euros is paid per published page (assuming on article size of five pages, that's £ 375 or ^ 500). The Jury The Jury consists of Elektor designers and editors. Mr Burkhard Kainko and Mr Gunther Ewald (the authors of the January 2006 article) as well as several other R8C special- ists and project contributors active in our R8C Forum and on our R8C Service pages. Mat Heffels, our International Editor in Chief, has been appointed Head of the jury. Winners The winners of the competition will be announced in the November 2006 issue. The decision of the Jury in respect of prize-winning entries is not open to discussion. The competition is not open to employees of Glyn, Rene- sas, Elektor Electronics or publishing houses with a busi- ness relation to Segment b.v. Publications By participating in this competition, you agree to publica- tion, in original or edited form, of all material you hove 1 st Prize The First Prize is awarded to the R8C application that's best suited to production, marketing and sale through the Elektor SHOP (magazine and web) and/or Elektor's business partners, within the Publishers' abilities. The prize consists of royalty payments to the amount of 10% (ten percent) of the turnover realised by the winning project. 5/2006 -ddtct sUclFcn'3 1 5 tiEfiSiBSl RK DESIGN COMPETITION 2nd p r j ze TASKING M16C & R8C/Tiny Software Develop- merit Tools v3.1 Value: £ 2239 (3242 €) A complete software development toolset from Tasking, Including Allium's Viper Compiler technology. The ultimate for M16C and R8C software builders. Info: vavw, tasking.com/products/8_l 6_bif/Ml 6C/ Altium Europe GmbH www.altium.com 3 rd Prize EAGLE Professional Value: £975 (1392 €) Complete design suite for circuit board design (up lo 1 ,6 m x 1 .6 m, 16 signal layers, 99 schematics pages). Product: 1 User, layout Editor, Schematics Module, Autorouter Module. CadSoft Computer GmbH www.cadsoft.com 4 th Prize EAGLE Standard Value: £ 480 (696 €) Complete package for PCB design [t Eurocard, 4 signal layers, 99 schematics pages). Product: 1 User, Layout-Editor, Schematics Module, Autorouter Module, CadSoft Computer GmbH www.cadsoft.com 5 lh Prize Money prize: £ 350 (500 €} The fifth prize is 350 pounds (or 500 euros) sponsored by IPS-Pressevertrieb GmbH www.ips-pressevertrieb.de 6 , h Prize Elektor Versatile FPGA Module & Prototyping Board Value: £ 324 (469 €) Versatile FPGA Module with pro- gramming inter- face, cable and connectors, ond the FPGA Prototyping Board. Info: Elektor Electronics March 2006. Elektor Electronics (Publishing) www.elekior-electronic5.co.uk 7 , h Prize ME 2-channel PocketScope DS1MI2 with TESTEC double MF 312-2 probe kit. Value: £ 259 (374 €] A mobile USB Mini Scope / Waveform Generator includ- ing 2 x TT-MF 312 test probe for 20 / 250MHz. Reichelt Elektronik www.reichelt.de 8'* 1 Prize DK51 - Complete Starter Kit for SCI 1 and SC 13 IPC@CHIP Value: £219 (312 €) Comprehensive Starter Kit for your JPC@CH|P- application with 0K50 Develop- ment Board, SC I 3 l EC, CoDeSys CD, Borland CD, serial cable and power supply. Beck-IPC www.beck- ipc.com 16 ddilsr ebdrofiira - 5/20C6 9'* 1 Prize USB Logic Analyser ME ANT 6 Value: £ 199 (279 €) 13 th and 1# Prize Wireless audio modules WA-TX-01 and WA- RX-01A Value; £99 (140 €) each These modules [transmitter and receiver) from Circuit Design enable a high quality wireless link to be created (e.g. for □ cordless microphone). Circuit Design www.circuitdesign.de Mobile, compact 8-channel USB Logic Analyser, ideal for mobile use in combination with a Notebook PC. Meilhaus Electronic GmbH www.meilhaus.de 10 lh Prize MicroPLC Hard- ware Value: £ 1 79 (257 €) Kan is and Cadsoft s EAGLE-progra mma- ble FLC. Reody-to-use board with detailed documentation, power supply ond accessories. Design Bureau W. Kanis GmbH www.kanis.de 11 ,h Prize PCB manu- facturing Value: £ 140 (200 €) Voucher to ue for a PCB manufac- turing order placed with PCB-POOL. Beta LAYOUT www.pcb-pool.com 15 th through 24^ Prize Renesas E8 Emulator Value: £89(128 €) each The E8 enables serial synchronous debugging independ- ent of quartz frequency and monitor. GJyn www.giyn.com 25*h Prize Alitum Live Design Evaluation Kit Value: £ 79 (115 €) The Altium Designer LiveDesign Evaluation Kit contains the LiveDesign Evaluation Board with FPGA (Ahero Cyclone or Xifinx Spartan-3] and the Altium Designer Software (unrestricted 30-day licence], Altium Europe www.altium.com 26 ,h and 27 lh Prize I/O Warrior Starter Kit Value: £ 39 (57 €) each Kit for IO Warrior Evaluation Board including software for Win, Mac r and Linux. Code Mercenar- ies Hardware and Software www.code- mercs.com 12 lh Prize PCB manufacturing Value: £ 140 (200 €) One-off discount of the above amount (inch VAT on an online J Plot&Go or Veri- fied' order. Euro circuits Bvba www.eurocircuits.com 28'fc, 29* and 30 ,fl Prize Elektor Electronics Voucher Value: £ 35 (50 €) Valid for all SHOP products supplied by the Publishers like books, CDs, ready-made modules, kits, software items and circuit boards. Elektor Electronics (Publishing) www.elektor-efectronic5.co.uk 5 2C 36 - t!;khtf d-rtiomn 17 KNOW-HOW SOLDERING Felix Meckmann and Jens Nickel The use of lead-containing solders will be severely restricted from the beginning of July 2006. This has far-reaching conse- quences, especially with regard to auto- mated soldering. We take to closer look. Electronics is playing an ever-increasing role in all areas of daily life. As a consequence ihe number of discarded and redundant electronic appliances and components is continuously on the rise. The EU member states together generate over six million tonnes of electronic waste per year Furthermore, many electronic and electrical appli- ances contain toxic substances such as lead mercury and cadmium. In 2002 the European Parliament and the Council of the European Union, representing the national governments, enacted two directives, 2002/95/EC and 2002/96/ EC. which became known as 'RoH5 f and 'WEEE [1][2]. The directive on 'Waste Electrical and Electronic Equipment' puts liability on manufacturers to mark their appliances, to take old appliances back, recy- cle them as far as possible and prepare the residual waste for disposal [3]. The ban on the use or certain specified hazardous sub- stances in the manufacture of new appliances will avoid damage to the environment and human health, and ques- tions of disposal methods will arise. To this end the PoHS ('restriction on the use of certain hazardous substances in electrical and electronic equipment ) regulations have been adopted, which restrict the use of specified haz- ardous substances. The regulations cover not only lead,, which is an important constituent of solder and which is responsible to a forge extent For its properties but also mercury, cadmium and other substances used in such things os cables and enclosures. The various EU member states are transposing the directives into national law. 18 drh'F e'iifronio o/20'Oi i®y©ring in the RoHb era geneous means th a! She materia] can only be further decomposed by chemical, rather than mechanical means.) Examples are the metal used for an enclosure, copper printed circuit board tracks, solder and so on. ft is therefore necessary that not only the equipment, but also the boards and components used in it, are RoHS compli- ant IF, For example, the solder used contains more than the maximum permissible level of lead, the whole appli- ance may no longer legally be sold. Non-compliant com- ponents and printed circuit boards may., however, be used after 1 July 2006 as spare parts for, or for repairing appliances which were sold before the critical date. Lead-containing solders may also be used in servers and storage systems until 2010, as well os In various types of telecommunication equipment. There is also a compre- hensive exemption for military equipment. The regulations are principally aimed at the manufactur- ers of electrical and electronic devices, but inevitably all parties in the chain of production and sole are affected to some extent. New lead-free components and manufac- turing processes must be made available. Those responsi- ble For development ond manufacture will hove new chal- lenges in coping with the regulations. End users, an the other hand, will see little change. Building a circuit or device purely for your own use does not constitute bring- ing if 'onto the market' and so in this case old compo- nents and lead-containing solders can still be used. The one part in one thousand limit July 1st 2006 is a key date for developers and manufac- turers of electronic equipment: this is when the ban on hazardous substances comes into effect. From this paint it will no longer be permitted to bring onto the market' any electrical or electronic appliance which is not RoHS com- pliant, that is, which contains any of the proscribed sub- stances. In order to make the purification and analysis oF materials technically and economically feasible, thresh- olds have been set below which a material will be con- sidered free from a particular substance: for example, a solder containing less than 0.1 % lead by weight will be deemed lead-free for the purposes of RoHS. These thresholds apply for all homogeneous materials from which an appliance might be constructed. {'Homo- Purchase and design The RoHS directive has o double effect on the choice of components, since assembly houses and manufacturers may no longer use lead-containing solders, which have a particularly low melting paint [183 C C). This means thot, in general, higher soldering temperatures are necessary. Unfortunately it is not possible to deduce from the fact that a component is declared as 'RoHS compliant' that it can withstand higher soldering temperatures! RoHS com- pliance means only that, for example,, the coating an the leads of a component is lead free tin. Critical components include, for example, electrolytic capacitors, devices in BGA (ball grid array) packages, and SMD connectors. Caution should be exercised when purchasing new ver- sions of components. More on this problem can be Found on distributors' websites [4] [ 5 ] [6] {see Figure 1). In o mass production environment a complete changeover for all component types in a single step is thought to be the best way to proceed. This of course demands considerable research into new components, re- designs and experimentation with soldering processes. In this regard it is possible to learn From the experiences of others through the formation of industrial associations and groups. The ZVEI (Central Association of the Ger- man Electrical ond Electronic Engineering Industry) has published a guide to lead free soldering, available on the Internet as a free download [ 7 ]. 5/20D6 - fil ter sfftlntaks 19 GRUNDLAGEN Figure I . Many tomponercl distributors have set op special RoHS pages. In general significant changes to printed circuit board layout, such as increasing the size of solder pads and increasing the distances between copper areas, are not required. Larger components and larger tracks must however be provided with thermo! pads for optimal soldering. Wove soldering In industry through-hole (TH) components are most fre- quently soldered using a wave soldering process. Here the printed circuit board is passed over a solder bath in which a wave is created using nozzles. If it is not desired to completely replace soldering equip- ment in the switchover to a lead-free process, modifica- tions will be required to existing equipment. The reservoir and pump systems in new equipment ore already sup- plied with surfaces coated so that they are capable of withstanding the more aggressive lead-free alloys; older equipment must be likewise modified. When lead is substituted by other metals with a higher melting point, the soldering temperature must increase. Whereas until now temperatures of around 230 C have been adequate, solder baths must now run at tempera- tures of up to 260 L C. In general the preheat temperature now plays o more important role: large components, with their higher heat capacity, must be checked and ade- quately heated in order to avoid failure or damage. Figure 2, The formation of solder bridges can be avoided by the use of on inert atmosphere. There Is a plethora of solder alloys available on the mar- ket, In general a SnAgCu (tin-silver-capper) alloy, with a melting point of 217 ‘C, is the most popular and there h already plenty oF experience with it. It avoids problems such as whisker formation which can occur with pure tin alloys. These whiskers are threads of solder forming from the soldered points which can unfortunately cause u n wo n ted $ h art c i rcu i ts . When using lead-free alloys the contents of the solder bath must be continuously monitored by taking samples, since there is a tendency for the proportion of copper to increase. When this reaches a critical level the solder con flow too readily, leading to unsatisfactory results. Depending to the results of the tests, it is possible to add tin-silver alloy, pure tin, or tin-silver-copper alloy to the sol- der in the both. Figure 3. The porous appearance of the surface of a lead-free soldered joint may seem odd at first. Reflow soldering As in the case of wave soldering, reFlow ovens [see box) also require modification or replacement by new equip- ment. The modifications generally include a powerful heater system and improved thermal insulation, in accor- dance with the higher temperatures involved in the process. Solder bridges must be watched out for: these arise from increased oxidation of the solder and can be prevented by the use of an inert atmosphere (see Figure 2). In mass production the use of an inert atmos- phere is essential. The established manufacturers offer a selection of lead- free solder pastes. When experimenting it is possible to use a standard lead-free solder temperature profile, which will, os a rule, give good results for 90 % of com- ponents, The number of available temperature profiles can be rather large, depending to a significant extent on the product range. 20 ekklvT demonic* - 5/2004 ! Reflow I i soldering \ Although most 'normal' 5MD components I cafl stilt be soldered manually using a fine | soldering iron bit and fine solder, campo- | nents in BGA, CSP (chip scale package) | end similar packages can still only be sol- l dered by machine. The so-called reflow I process is a reliable method. In Inis | process o solder paste is spread onto the | jpads on the printed circuit board where | the component will sit: the paste can of 1 course be lead-free. The components ore | ihen placed cm ihe printed circuit board so | lhat their connections are embedded inlo | ll1 ® P° sfe - The connections can now be soldered in a reflow oven. This process takes place in five precisely-controlled steps | coifed phases (pnase 1 to phase 5 in the figure above) Phase i ts called the preneat phase . The temperature in the reflow oven is gradually increased to ooproximately i 25 ~C The temperature must rise slowly, as otherwise bubbles can form in the solder paste. Phase 2 is the 'soak ohose' or activation phase . here the temperature is very slowly increased to approximately 175 S C. Durina this phase the solder paste is activated' the llux changes into its liquid state and flows over the pads. , Once the circuit board and components are 'soaked', phase 3, the 'reflow phase', is entered. The temperature rises relatively , quickly to aoave tne melting point ot fne tin in the paste so that it melts, and the actual soldering takes place With laad-ccntoin- , mg solders ine target temperature is about 220 ; C to 240 2 C; with lead-free solders it must be increased to between 250 =C I and 260 C In phase 4, Ire so-coifed 'dwell phase , the soldering temperature is held constan; for a few seconds. The tin parti- , c.es held within the solder paste melt into one another and displace the other components of the paste. Between the component I connections ar.a the pads on tne printed circuit board there is now only molten tin, which birds ihem together. After 15 s to 20 s j j ° ,pVe "r pnose 5, the cooling phase , is entered and the populated board is gradually cooled to room temperature. Hand soldering For repairs and hand soldering the switchover will be siraigniforward: simply turn up the temperature on ihe soldering slalion. Lead-free solders corrode the bit more rapidly although service companies have reported no significant increase in iheir use of soldering iron bite. Nevertheless, some manufacturers have brought out new products, such as soldering iron bits mode of silver to improve heat conduction. In some cases, such as when a circuit acard conducts heal oway too rapidly, if is possi- ble lo obtain better results by providing additional hear- ing using hot air. Lead-free soldering takes a little gening used to. The joints are not as bright as those made using lead-con- taining solder and have a porous surface appearance (Figure 3). Lacking lead, the joints are thicker and harder and have a different shape [Figure 4). A joint ihot has what would have been on unsatisfactory appearance is thus likely to be perfectly good. This calls for new guidelines for ihe quality control of soldered joints, as bid down in the paper TP C A-61QD' by the IPC (formerly ihe Institute of Interconnecting and Pack- aging Electronic Circuits) [8]. Outlook in the medium term the need for hwo sets of component stores and two sets of soldering stations will disappear. Niche companies will be set up alongside existing in- house manufacturers and electronics servicing compa- nies, offering repair facilities as well as materials and manufacturing capacity for appliances falling outside the regulations. For hobbyists the switchover to o lead-free regime means access to a wide range of new solders, fluxes and com- ponents. At the same time o wide range of leacbcontain- ing materials will disappear from the market. It is tempera Lure profile for teaPfree reflow soldering H2X-t£-\= Figure 4. Because of the lack of lead, Ihe shape of the join I is different. 5/2005 - e’eiilix elvctranta 21 KNOW-HOW SOLDERING The j Elektor Electronics ' SMD Reflow j Soldering Oven 1 1 Here at the Elektor Electronic* laboratories theory and prac- j tice go hand in hand. When we had ro solder an FFGA in a | SGA package [9] f we realised ihol we needed a reflow | oven. Rather than ordering an expensive device, the Elektor | Electronics designers had a clever idea: convert their I beloved pizza oven into a reflow oven. The team developed I a Temperature controller circuit based around an AT89C52 I microcontroller. Of course., we did not keep the idea a secret 1 from cur readers [10]: the SMD Reflow Soldering Oven 1 ' project by Paul Goossens,. published in the January 2006 issue, gener- 1 □ted enormous interest, as evinced by the dozens of reader letters and e-mails we received. There were many questions about 1 reflow soldering and about our oven design in particular, and many interesting modifications were proposed. One UK reader l has even converted his toaster Into an SMD soldering oven T I 1 ] I I It is easy ra alter the temperature profile in the controller to suit lead-free soldering using the 'EDIT function in the microcontroller program: a good storting poim is the set of values given in the box Reflow soldering but this Is no substitute for a careful study of device datasheets. , expected, however, that in the short to medium term availability of lead-containing components will remain good, since residual stock will come on to the market. About the author: Felix Meckmonn is marketing manager at Schlafhorsi Electronics GmbH. The focus Gt operations for this firm, based in Germany, is the contract develop- ment and manufacture or electronic modules, products and systems. With 1 30 staff, the company has been mak- ing a positive commitment to lead-free technologies since the beginning of 2004. As well as an 5MT production line wave soldering and selective lead free soldering are available. The company has to date delivered 200,000 RoHS AEI 10 lines available for expansion * E asy P !C3 Starts r Pack i nd ud es : ■ P 1C 1 B F4 52 microcon! roller - 16x2 character LCD ’■ 128X64 pixel graphic LCD ► DS18S20 lemperature sensor ■ USB program mtng pow er lead - P rag ra m m ing so ft wa re a nd exa m p tee EasydsPIC2 dsPIC Starter Pack £99.00 EasyAVR3 AVR Starter Pack £99.00 Easy 51 8051 Starter Pack £99.00 * H igh qu al hy tie vef cpm e nt bo ard i Sulft-in USB 2.0 programmer i Windows sai.lE/2000 XP compatible * Supports 20 and 40-pin DIP Atmel 8051 Flash microcontrollers » On-board LEDs switches. potenti- ometer. RS-232 interface 12-bil AD and D A and tw o additional 8 bit l O ports * All! O lines available for expansion * EasyBOBi Starter Pack includes: * 40- pin 8051 microcontroller - 16x2 character LCD - 128x64 pixel graphic LCD ■ DS1BS20 lemperature sensor ^ USB programming power lead - Programming software and examples ■ High qua lily dev e k>pm enl boa rd * Built-in USB 2.0 programmer * Wrndovp s 9 8 ME 2000 - XP co m palsft I a t Supports 8 20 28 and 48-pin DIP PScC m bead-signal controllers * On-board LEDs, svrTlches. potenij- ometera, RS-232 inlerface. RS-485 interlace. CAN interface, real- lime clock. and MMC.SD and CF card sfo Is * AH I/O lines available tor expansion * EasyPSoC3 Starter Pack includes: ■ 4B-pin PSoC mrcroconl roller * 16x2 character LCD ■ 126x64 pixel graphic LCD DS18S20 lemperalure sensor ■ USB programming power lead - Programming software and examples * High quality development board * Suift-in USB 2.0 programmer * Windows 9fl ME 2000 /XP compatible * Supports 3, 20, 23 and 40-pin DIP AVR micracont ra Iters * On board LEDs, switches potenb omelet RS-232 interface, 12-bil A D and D A, and MMC SD card slot * All LG lines available lor expansion * EasyAVR3 Siarter Pack includes: - AT m egaS5 35 m ic roco nt ro Her ’ 16x2 ebaracterLCD ' 128x64 pixel graphic LCD QS16S20 lomperalure sensor ■ USB programming power fead * Programming software and exempts Easy 3 PSoC Starter Pack £119.00 EasyPIC3 PICmicro Starter Pack £99.00 BIGP1C3 80-pin PICmicro Starter Pack £119.00 High quality developmenl board Built-in USS 2.0 programmer Windows S3 ME 2000 XP ccmpasfale Supports Ihe latest BO-pin microcon- trollers from the 18F PICmicro family On-board LEDs, switches polenli- om etere Iwo RS-232 interfaces, PS 2 connector, and MMC.SD and Com- pact Flash card slots All I/O lines available lur expansion BIGPIC3 Starter Pack includes: PIC1BFB520 MCU module 16x2 character LCD 128x64 pixel graphic LCD DS1&S2G temperature sensor USB programmingpower lead Programming software and examples ■ High quality development board * Built-in USB 2,0 programmer * Windows 98 ME 2000,'XP compalibls * Supports 18, 28 and 40-pin DIP digital signal controllers from dsP EC30 family * On-board LEDs, switches, polertri- o meters, RS-232 interface. PS 2 and !CD2 connectors, and MMC SD card slot ■ All i O lines available lor expansion * EasydsPiC2 Starter Pack includes: * dsPlC3GF40l3 digital signal controller 16x2 cha radar LCD 128x64 pixel graphic LCD - USB programming power lead ■ Programming software and examples ■ y y y y y y HANDS-ON MICROCONTROiL ERS Florian Schaffer It's about time, you might say! After all, even if the ATmega microcontroller isn't necessarily mega, it's still quite popular and we feel it hasn't really received the attention it deserves in Efektor Electronics . The Mini ATmega Board described here puts a change to that, and a nice application for it — our Standalone OBD2 Analyser— is featured in an accompanying article. The Mini ATmega Board is a complete application board for ihe ATmega 16 and ATmega32 members of toe Ann el AVR family. It includes an LCD port, a serial interface,, and abundant I/O lines. For programming, the board also has a mini -interface for communicarma T .vith a PC serial port. There are numerous potential applica- tions for small single-board comput- ers in the domestic and hobby realm, such as central heating controllers, roller- shutter controllers and alarm systems. Another popular application Is controlling autonomous robotic sys- tems. In any case, developing your own application programs requires a certain amount of programming expertise, and this board with its pro- gramming interface is naturally quite suitable for acquiring That expertise. It's easy to convert user inputs into actions and responses, even with only a small program. Simple but versatile In its standard configurer ion, the board is intended to be fitted with an ATmega 16. This relatively inexpensive 30 ekkloi ckrin-'ics - 5/2006 «iil Wi«ep32 rinji: 1. S chemalk diogrom of Jhe Mini ATmega Board, which forms a goad boils for comport applied lions. microcontroller from the 8 -bit AVE RISC family is quite suitable for begin- ners due to its DIL package, which is easier to handle than the SMD pack- ages of the smaller AVR microcon- trollers. The ATmega3 r which comes in a skinny 2S-pin package but still has a large number of I/O pins, is also very popular. However, its 8 KB of internal flash program memory is a bit on the skimpy side, so we prefer the larger ATmegalo with twice as much mem- ory. If you need even more memory, the pin -compatible ATmega32 can also be Sited to the board. As the latter device is also largely s oft ware- com- patible. it’s generally only necessary to recompile the software in question without having to make any other modifications. Another reason for the popularity of the ATmega processors is the fact that many major elements axe already integrated., In addition, the 32 I/O lines of the two larger versions provide adequate connectivity for supplementary hardware, including eight pins that can be routed to an internal analogue- to -digital con- verter, The processor can run at a 5/ ZOO 6 - =!ihjj 31 HANDS-ON MICROCONTROLLERS S° O o ® s LJ “ nQ CD CD Q CD 0 © to© Ti o o o o 0 o a 0 o o o o 0 0 = c vS/ D5D17&-1 o gQd c-P — 3 g gP Os ois GG OO 3 GSD000 o o B ® 00000G0BBG00B0O00000 00000000000000000000 00Q000000m0g00000Q0 00 O 00000000000000000000 QQQ000Q00Q0Q000O0QQO 0 00000 0000H0000 0 0000 rs 000000000 0100 0 Q OS ® ! COMPONENTS ! LIST I [ Resistors R 1 = S1L array 8 x I kQ * R2 = SJL array 8 x lOkO I R3 = 1 0k Q 1 R4 = 1 On I R5, R5A = 39 n | R6 = 1 kD j PI = lOkH preset | Capacitors Cl, C2, Cl 3 Cl 4 = lOOnF ceramic 1 C3, C4 -22pF 1 C5-C9 = 1 uF 1 6V radial 1 Cl 0 = 47pF t Cl 1 = 220uF 25V radial I C12 - 10 H r 16V radial I j Semiconductors w D 1 = LED-Array v/ESn 10 LEDs D2 = 1 N4G01 D3 = contained in D 1 1C1 = ATmega 16-PC (DIP40 case] ! IC2 = MAX232 (DIP 1 6 case) I IC3 = 7805 (TO220 cass) I 1 Miscellaneous j JP1-JP4 = wire link, microswHch or 2- ] woy pinheoder wilh jumper] I K1 - 10-woy boxheader K2 r K2A = 20'way S1L pinhead er K3.. K3A = optionally fitted K4 - 9-way sub-D plug [male] PCB mount K5 = 16-way 5IL socket, (e.g. cut oft I from a 40-way wire wrap socket) I and moling S3L plug ( K6 = mains adaptor DC socket, PCB l mount I !C socket, 1 x 40 way, 1 x 20 way, 1 x 1 6 woy 5 1 - 8-way DIP switch 52 = pushbutton, 1 make contact [e.g. Conrad Electronics # 700665) LI = 10 pH (fixed inductor) 1 XI = 8 MHz quartz crystal ] Enclosure, Hammond type 15910 | blue * j t 6-way Rateable [a few centimetres) j PCS, order code 0501 76-1 , supplied including programming adopter board 050176-2. T not required in combination with 08 D2 1 1 1 1 ( 1 I I I 1 1 I 1 ] I 9 ! 1 I 1 9 I i I 1 1 1 l I 1 9 1 I I l I l [ 1 I 1 1 I I 1 1 i I l l I I I I I l Figure 2, Track and component layouts of the circuit board. maximum clock rate of 16 MHz, which yields respectable computing power. Processing complex, time crit- ical tasks is usually not a problem, because most of the machine ins t ruc- tions require only two system clocks for execution. Additional useful fea- tures include internal software UARTs for serial co mm unication and the ability to respond to interrupts and handle system crashes using a watchdog timer. Everything on hoard As you can see from the schematic dia- gram (Figure 1), only a few compo- nents are fitted to the board. Of course, operating power and a clock source are 32 ckldor clediDfsits -5/2006 Flgxrre 3. The fully assembled prototype board. controller. If you use a socket; tor the essential* The first is provided by a 5- V voltage regulator (IC3), and an 8- MHz crystal sets the rate of the micro- controller's internal oscillator. Nearly all of the other component are used to support the various interfaces. Ki is the connector for the program- ming adapter. The circuit arrangement is compatible with conventional 10- lead adapters, such as tiros e used with the Atmel STK boards* The RS232 port (K4) can be pro- grammed via the internal software US ART, and it can achieve high data transmission rates thanks to intemiot ■ control and buffering. The two jumpers JF3 and JP4 allow -rlG V and -10 V to be connected to the D-Sub connector in order to power vampire circuits . A null modem cable must be used to connect the non to a PC, and jumpers JP3 and JP4 should be left open in that case. A few switches and LEDs are naturally quite welcome for simple experiments using the board. Consequently a set of LEDs (LED array Dl) and DIP switches (Si) are connected to the I/O lines. Tne AT meg a can supply up to 40 mA per pin to drive LEDs or other components directly without additional circuitry. If you want to use the port lines for some other purpose, the pull-down resistors (array R2) and LEDs can be disabled by jumper JP2 or JP1, respectively If port A is used as an output, the DIP switches must be switched off (open) to avoid damage to the IC, Components LI. C2 and C14 are pro- vided to improve the accuracy of the AD converter. If an accurate A/D con- verter is not needed, these compo- nents can be omitted and LI can be replaced by a wire bridge. A LCD module with four rows of 20 characters (4 x 20) is the preferred choice for the display and a perfectly suitable type is offered through the Elektor SHOE The board is laid out to exactly fit such a display module. The display can be connected using a pair of fiat cables. However, a more elegant solution is solder half a wire-wrap IC socket to the circuit board. If a pin header is fitted to the LCD board, it can be plugged directly into the socket. As there are many similar ver- sions of this standard type of display you should check carefully to make sure the pinout matches the board lay- out. The modern blue versions are of course easier on the eye than die usual green versions, but as so often hap- pens, it costs a bit more to have a spe- cial taste. Don't forget to adjust the contrast setting with PI when you first power up the board - other tv is e you might think the display is defective, because you wont see anything if the setting is wrong, A LED array with ten LEDs is recom- mended for DL In that case, D3 is automatic ally the tenth (uppermost) LED in the array, and the ninth LED is not used. If you can only obtain an array with eight LEDs, fit ii in the lower eight positions. The ninth posi- tion will then remain open, and a nor- mal LED can be fitted in the tenth posi- tion for D3. K3 and K3A can be used to fit pins on the bottom of the board. That will allow the entire board to he plugged into another board as a replacement for an ATmega for experimental purposes. K2 and K2A are left open for connect- ing I/O lines. The only thing left to mention is the decoupling capacitors under the micro- microcontroller, there will probably be enough room on top of the board to fit small capacitors. If that isn't possible, solder three capacitors in SMD-0805 packages to the pads provided for that purpose on the bottom of the board, Programming The microcontroller can be pro- grammed directly from a PC via a sim- ple programming adapter (see inset). A variety of small programs are avail- able for this purpose. Although some of them are not especially user-friendly, they all do the job. For instance, you can use PonyProg to download fully compiled programs to the ATmega and set the most important (and crucial) fuse bits. The fuse bits are used to configure the micro controller, and this can lead to unfortunate situations In which you lock yourself out, for instance if you 5/2006 -efeh&f dtdfwiro 33 HANDS-ON MICROCONTROLLERS Configuration and Security bits P i V~ 0G3d.cc» 1 1 P iSdctlo^ HZ P Bocriico 01 T Loc*Z I Lcckl P SCDEtiP JTAfiEN P P OGFT f EE5A.VE R BQ0T5Z1 P B 00153! P BOOTHS! P BQStEVELP EDDEHF SUT1 r SUTG P CKSR3 riXS£l2 P CKSE.L1 P CKSSL0 r tfnPlE£i:ea^2rr ; fr.itvx'.*zti&?ert?&i!hA e 1) P ... r i£ ■ &5 ±-“ . T--r.=- r? I - I- — '.i- : : “ir = t 1 , Rr J r7 'Z dzi^hz-r' Qe^Aj | Set A? | | ge*! Ei:-:e figure 4* The rorml settings musl he configured very carefully in PonyPrag before ihe microconlrolfer is programmed. Figure 5. These fuse bits must be set to use on external 8-MHi aysld and enable brownout protection. coniigure the clock source incorrectly or reconfigure the Reset pin as an I/O pin. On top of that, the AVR data sheets use a somewhat puzzling logic that is then partially inverted by the program. The first time you use the program, you must use Setup / Inter- face Setup to configure the right set- tings and then select the proper micro- controller type In the Devices menu, it's certainly a good Idea to use the programmer to read the actual settings of the fuse bits (via Security and Con- figuration Bits in the Command menu u you're using Pony Frog) before you start programming. Not every program does this automatically. You can then compare the bit settings to the descriptions provided in the data sheet. Figure 4 shows the required settings for using an external 3-MHz crystal and enabling brownout detec- tion, which resets the processor when the supply voltage is applied or removed. Data loss couid occur if brownout detection is not used, because no external circuitry is pro- vided for that purpose. Free development environment Numerous development environments are available for the AVR family, and it's easy to develop programs in Basic using BASCOM-AVR (free for code sizes up to 4 KB), in assembly lan- guage using the free AVR Studio envi- ronment. or in GCC using the free WinAVR environment. The example applications for this board were generated using WinAVR, compiled for the ATmegalB. and con- vened to machine language, so all you have to do is use the programmer to download the resulting hex files to the Qash memory of the microcontroller. If you want to recompile the code to use a different crystal or a different type of ATmega microcontroller, you only have to modify the ‘make 1 file accordingly. The AVR GCC Tutorial referenced the link list provides a very extensive intro- duction to C programming, although you must always bear in mind that many of the examples were developed for somewhat older types of microcon- trollers (now discontinued) and require some changes. The routines for the LCD may also need slight modifica- tions. because even though very good general-purpose templates are already available, they have not been included in the examples in order to keep the code as simple as possible. All the examples can be downloaded from the Elektor Electronics website ( www. elektor-electronics . ca.uk) in a Zip file. You can use these programs to become familiar with all ihe essential components and test your board. To get started, you could use the simple ’.blinking LEDs' program. The next step would be to display a message on the LED or try out data communications via the serial interface. As already mentioned in the introduc- rion, an interesting application for this board is described in a companion arti- cle in this issue. It is a stand-alone OBD display unit for car diagnostics, winch you can also use io display vehi- cle-specific data 'on board’ da the LCD module while you are driving. Extensions If you are interested in extending the board after successfully completing your initial programming and applica- tion projects, there are many possibil- ities - far too many to mention them all in this article. For instance, you could implement an I 2 C bus with only a few additional components, add a USB pon T or even connect an SC memory card to store measurement data for subsequent analysis using a PC. Naturally you can also make con- tact with other ATmega fans in the various microcontroller forums, includ- ing (of course) the one at www.elek- tor-electronics.co.uk:. and various newsgroups. | Items available * for this project I 050176-1 PCB, supplied including Drcgramrmng adapter board (050176-2). 050176-42 Programmed ATMEGA 16 0501 76-72 Kii of paris. includes ATMega board 0501761 , pro- gramming adapter board 0501762, preprogrammed ATmega microcontroller (with OBD2 program), all campo nents for boln boards but excluding LC display. 050176-73 LCD, module, 4 x 20 characters, 60 x 98 mm, with background lighting. 05O176-74 Case. Bopla Uni mas 160 with perspex caver and mounting plate Available from www, elektor-electran tes.co.uk Hyperlinks far the project 0501 76*1 1 .zip Development software including program examples (free downlead). 34 dsti&r dsdioma - 5/2G06 In -system prog Gamming The minimum circuit configuration For an ATmega actually amounts to nothing more than a supply voifoge, The external crystal con be omitted if you use the internal oscillator. However, the processor clock rate is not defined especially accurately in that cose, so operation using the internal oscil- lator is only suitable for applications that are not timenirifical. Aside from the supply voltage and the crystal [if used), you also need a programming interface port to load a program into the ATmega. As the ATmega has an in-system program- ming (ISP) interface, it con be programmed in the application circuit - or reprogrammed os often os desired. The flash memory can handle up to 10,000 write operations, and the EEPROM can handle up to 1 00,000, The programming adapter described here can be connected directly to a PC using a one-to-one cable. Connect the other end of the adapter to the ISP connector (Kl) of the Mini Mega Board, ana you're oil set to program the microcon- troller directly from your PC. The circuitry of the programming adapter [Figure TJ can be buili info the housing or a 9-way D-Sub coble connector fa produce a handy programming adapter cable. Assembling the circuit on the small circuit beard (Figure 2) is not particularly difficult, but it does require a steady hand and o bit of care. Before fitting the components, check to make sure ihe board fits in the housing of the D-Sub connec- tor. Then fit the SMD components first, follov/ed by K2 on the otner side of the board. Before soldering ihe D-Sub connector (Kl), check again to make sure the board Fits, In our proto- type, v/e removed the rear wall of the connector housing. That allowed K2 to just fit, and the flat cable could be fed out without any problem. Do not solder K 1 in place until you are sure that the board fits in the connector housing. It will probably be necessary to shorten the pins of K1 slightly and rit ihe ooord at a bi= of on angle. As the connector housing is made from metal or conductive plastic, you should cover the inside with insulating tape to prevent unwanted contact with the circuit board. Figure 2, Track side and component side layouts of the programming Adapter sirtuit board. COMPONENTS LIST (programming adaptor) Resistors (SMD 0805) R1 ,R5 = 10kn R2.R3 = 4kfl7 R4 = 33kQ Capacitors (SMD 0805) Cl = 220pF Semiconductors Di ,D2.D3 = zensr diode 5V1 , 250 mW, SOT23 case [e.a 8ZX84 5V1 SOT23) T1 - BC847 (SOT23) Miscellaneous K1 - 9-way suhD socket (female) with case K2 - 1 0-way pinheader j 0-way Rateable (0.5-1 m) 1 0-way UIDC connector for Rateable RGB, order cods 050 1 76-2 (see SHOP pages or v^ebslie) Figure 3, The circuit hoard with the SMD components fitted* 5, 2006 - dekfer ebdrerio 35 HANDS-ON MICROCONTROLLERS Florian Schaffer You can use the OBD-2 / EOBD diagnostic connector required in all recent cars to read out a lot of interesting data if you have a suitable interface adapter and a notebook computer. An even more practical solution is to use the stand-alone analyser described here, which can be used as a hand-held unit or fitted in your car. Diagnostic data is evaluated using an ATmegal6 and shown on an LCD with four rows of 20 characters. Up to eight parameters can be constantly shown on the display while you're driving. Having this information at your fingertips can be especially handy if you have car trouble. It seemed like an obvious idea: why not use the OBD-2 analyser described in the 2005 Summer Circuits issue more than just twice a year? After all, the car's OBD-2 interface provides interesting data all the time while the vehicle is underway, although using a norebook computer as a display while travelling is rather impractical. Just as with navigation systems, the only suit- able approach is to use a portable dis- play or a built-in display with conven- ient dimensions. Mo sooner said roan done. Fortunately, the OBD data is not so complex that the processing power of a PC is actu- ally necessary to handle it. A micro- controller with a serial port is perfectly adequate, and an easy-to-read alphanumeric LCD is a lot more suit- able than a cumbersome notebook screen for displaying rhe data in a car. The microcontroller hardw are consists of the Mini Mega Board described in another article in this issue. It is fitted with an Atmel ATmegal6 microcon- troller, which fetches the data from the OBD-2 analyser via a serial interlace, analyses the data, and presents it on the LG display. The board already has all the components necessary for this application, except a pushbutton switch on PAO tor configuring the dis- play parameters. As the available readings vary from one vehicle to the next, the display should be freely configurable so the digital cockpit can be adapted to every vehicle that can supply data to the OBD-2 Analyser. To find out which vehicles fall in that category you can consult the Elekror Electronics forum or the database referenced in the link list at the end of this article. Thanks to this configurability, each user can person- ally decide which of the available read- ings should he displayed and whether to display the readings in short form or long form. As the OBD-2 Analyser and the Mini ATMega Board (Figure 1) both have a full-fledged serial interface, it's easy to establish a communication link between the two boards. With regard to mechanical mating of the two boards to form a stand-alone analyser, refer to the capsule instructions listed in the “Step by Step' inset. The boards can be powered from the QBD-fl connector. However, the supply voltage on char connector is \m switched, so it’s worth having a look at the fuse box to see whether a Combo 36 efeklDi datfruiki-S/ZGQA • IF f:^i - OBD-2 Analyser htJord ond ATmego board after assembly* ' switched ignition plus' terminal is available so the boards will only be powered when the ignition switch is on. That's more practical than pulling the OBD ping or using an additional switch- es ns problem that cannot be ignored for in-car used is the large Temperature range. Many inexpensive LCD modules are not designed for the freezing tem- peratures that can occur in cars in the winter Freezing of the liquid crystal medium can cause permanent damage. Most modules are more tolerant with regard to the upper end of rhe temper- ature range. The module shown in com- ponents list for the Mini Mega Board has an operating temperature range of -20 C to +70 C, and it can withstand temperatures as low as -30 C without damage when nor operating. However, the maximum allowable current for the LED backlight is reduced at tempera- ruies above +25 7 C, What do you want to see? Information about the ignition timing advance ot exact intake air volume is probably not as interesting in normal driving situations as the engine speed (rpm) or vehicle speed, ro mention two examples. It s commonly known that standard speedometers read slightly high despite using electronic drive, with the deviation being as much as 10 km/h depending on the speed. Interestingly enough, a significantly more accurate value is output by the OBD system. Comparative measure- ments using a stopwatch and a GPS receiver showed that the OBD- II sys- tem provides a very accurate indica- tion of the true speed, and the OBD- contr oiled digital cockpit display pro- vides an accurate reading over the entire speed range. Of course, if you rely on that reading you will lose the ‘margin of safety* that has probably saved you from being caught in a radar trap several times already If you don’t already have a tachometer, or if you mistrust the one fitted in your car, you can also obtain reliable rpm data from the OBD-II system. The exact coolant Temperature is another thing that is doubtless inter- esting. Unfortunately there's no uni- form specification for the OBD-H inter- face with regard to outputting the water temperature or the oil tempera- ture. Toe oil temperature is more com- monly output with diesel vehicles than with petrol vehicles, which usually out- put the water temperature. You can figure out where the sensor is fitted by b'20Q£-fls!(!*r ihfie"h 37 HANDS-ON MICROCONTROLLERS figure 2, Prololyps of the slund-atone OBD analyser Table 1. OBD -2 Analyser response to a request to provide the PIDs available in the vehicle. Byte Meaning 06 Reply ID 02 Mads 2 response [report readings) OA ' Number or tcllovring byres [10) 40 Protocol information 6B Protocol information 10 ECU address 41 , 40 + requested service j 1 ) 00 Requested PtD (0) 98 First data byte (MSB) 3F Second data byte 80 Third data byte 11 Fourth data byte (LSBj 6C i Checksum Figure 3. Assembly of the boards shown in our prototype. observing the time beii amour of the temperature reading provided by the OBD system. If the temperature increases linearly after a cold scan, it represents the coolant temperature. If instead the indicated value does not increase until the engine has been run- ning for a while, and then increases rapidly to around 90 : C, it comes from an oil-temperature sensor. The oil tem- perature is important with regard to the load capacity of the engine, and it takes a lot longer to return to the ■green zone than the water tempera- ture. That means an oil temperature display can certainly help extend the sendee life of your engine. Software The software for the microcontroller on the Mini Mega Board is available on the EieJttor Electronics website in the downloads for this article in the form of a ready-to-use hex hie, which you only have to download into hash mem- ory. The program has been compiled for an ATmegalG with an external 8- MHz crystal. The software was tested with chip version 2600 of the mOByDiC microcontroller in the OBD analyser. However, future versions shouldn't cause any changes in communications between the OBD analyser and the Mini Mega Board, so we don't antici- pate any problems. If necessary, infor- mation about any relevant changes will be provided in the EieJrtor Elec- tronics website forum and the Mailbox or Corrections & Updates section of the magazine. For readers who not only want to build and use the stand-alone analyser, but also want to know how the software works, here's a brief explanation. Sim- ple commands can be used to request the micro com roller of the OBD -2 Analyser to establish a connection to the vehicle and supply data blocks. These commands are described in the data sheet for the mOSyDIC microcon- troller The communication process essentially consists of exchanging request and response bytes. The com- mands are very similar to those for the well-known ELM OBD ICs , so a glance at the {significantly more informative) data sheets for those devices can be helpful. If you want to find out which data is supported by a particular vehicle, you should request the parameter Identi- fiers (PIDs) by sending the byte string 02 01 00 (hexadecimal values), That particular series of bytes means that 38 pistol sklTC'-Hi - 5/ 2006 yon want to read data (02), you are working in Mode 1 (reqnesr readings), and you want to read our FIDO, In response, you will receive (among other things) four data bytes for the first 32 supported. PIDs. Many vehicles can also supply additional parameters, but they are not supported by the dis- play unit in its present form. After this, you can send the byte sequence 02 01 followed by a PID num- ber to request the data block for the corresponding PID. Toe response will be something resembling what is shown in Table 1. The checksum cal- culation is quite simple: the byte val- ues starting with the third byte onward are added, and the sum Is then ANDed with FF to eliminate every- thing except the two least- significant hex digits. The meanings of the individual bytes and the calculations necessary to gen- erate the displayed readings are described for ail the supported proto- cols in the ISO 15031-5 standard and its US counterpart SAE J1979- How- ever, if you’re not willing to spend £ 100 or so for your own copy, you can obtain more informal ion from the well- known v,- yvv, obd-2.de website, which is run by the author of the first OBD article in Elektor Electronics (October 2002 ). Display configuration The readings shown on the display depend on two factors. The first factor is which PIDs are available from vehi- cle in question, and the second factor Is which of the available readings the user selects for the display configura- tion. When the stand-alone analyser is switched on, it automatically deter- mines which PIDs are supported by the vehicle and stores them in the EEPROM of the ATMeqa. If the analyser is connected to a different vehicle, it will automatically recognise any change in the available PIDs. In both cases, the unit will ask you to configure ihe display tor the readings you want to have displayed (Figure 4). You can also enter the configuration mode whenever you wish by pressing and holding the PA0 button. The display can show up to eight read- ings in short form (Figure 5) or four readings in long form (Figure 6). For each line, you can select either one reading in long form or two readings in short form. A blinking cursor indicates the position that is currently being Step by Sfep 1 . Before you start, you have fo consider where and how you wan! to fiMhe two boards. One option is to fit them into an enclosure, as we did for the prototype shown in the phoios. However, you might be able to Find a suit- able place for them in the car [measure carefully!), so alt you need is □ frame or front panel to cover the boards. In that regard, you should bear in mind that the OBD cable is relatively thick,, and for cosmetic reasons it should probably be concealed from sighi. Figure 2 shows the construction of our prototype unit. The enclosure has a transparent acrylic sheet os o front panel* We painted it on the inside using spray paint. The opening for the display was mosked off before painting. That's an easy way to produce a perfect display window without drilling, sawing or routing. 2. The two boards are joined together using a mounting plate (aluminium sheet or piece of circuit board). The mounting plate is located between the two boards. The Mini ATMega Boord is placed at the front r and the OBD analyser board is placed at the rear. The mounting plate Fils into the guide slots in the enclosure. With the enclosure we used for ihe prototype, 15-mm and 10mm standoffs produced exactly the right spacing for the board assembly. As an alternative, the OBD-2 Analyser board could be Fitted horizontally in the enclosure. However, ihe vertical arrangement we used for the prototype has ihe advantage lhat it is easier to conned the OBD cable. If you use a straight D-sub connector far K2 instead of an angle connector, the cable can be plugged in directly. Of course, you can also omit K2 and solder the OBD II cable directly to the board. In that case, you will have to cut off the D-sub connector at the end of the OBD-II cable, out you may have to do that anyhow if the OBD cable is not long enough. If the OBD vehicle connector is located somewhere other than near the steering wheel, such as under the seat, the cable will usually be too short. Then it's a good idea to use a dif- ferent cable of sufficient length and fit the OBD-ll plug or one end. The other end can be fitted with a 9-way D-sub connector or soldered directly to the OBD analyser board, 3. Only four connections ore necessary between the two boards. Pins 2, 3 and 5 (ground) of K1 on the OBD-2 Analyser board must be connected to the same pins or K4 on the ATmega board. You should use stranded wire for this instead of solid wire to avoid a risk of breakage. The fourth connection is required to route ihe 2-V supply voltage to the ATmega board. If you omit K4 (power supply connector) an the ATmega board, you will have a connection point for *12 V that is connected to the anode of D2 via a cir- cuit board track. On the OBD-2 board, -f-12 V is present at the anode of D3. You con thus connect the anode of D3 on the OBD board to the anode of D2 on the ATmega board. Connect the display configuration pushbutton switch between PA0 [microcon- troller pin 40) and +5 V. 5/'i80&- =V>.i-:r skdrcrJu 39 HANDS-ON MICROCONTROLLERS figure 4. Display contcnls offer swifch-on in the car. configured. If the cursor is at the start or a line, you can select the long form or the short form for displaying a reading. Pressing the button causes the next avail able reading or next display option to he shown. The display posi- tion is blanked after you have cycled through all the available PIDs r and pressing the button again causes the first reading option (protocol and avail- able PIDs in hexadecimal notation) to be displayed. If you leave the button Figure 5. Display screen showing four readings. Figure £l Up to eight readings con he displayed simultaneously. ! Important Tips ! • If the existing OBD-2 cable is too shod and yon cannot find nine-conductor screened cable to make a replacement cable, 8-conductor network cable [CAT5, preferably screened) is a readily available alternative. Hie missing ninth conductor [with respect to the OSD cable) is actually unnecessary, because you can use a single ground connection instead of two connechons, Refer to the construction instructions for the 0BD-2 Analyser in the July/ August j 2005 issue of Elektor Electronics for cable wiring details. J I m If you already fitted ihe 9-way D-sub connector (Kl) on ihe OBD analyser | I board, that doesn't have to present a problem for joining It to the ATme-ga | I board. Simply leave the connector In place and solder ihe three leads to the [ g bottom of ihe ATmega board, I • If you already fitted ihe 9-way D-sub socket (tC2( on ihe OBD analyser board, you shouldn't try to unsolder it intact, because the through-hole plating will usu- ally not survive such an exercise. A better solution Es to cut off the pins and then unsolder the pin remnants individually (hold the pin with pliers, heat the solder joint until the solder melts, and them pull the pin out). I o There is a new version of the OBD-2 software. Information about possible j \ upgrades will be published on www.eiek tor-electronics. co.uk as soon as the \ I derails are known. g k _ _ «. ^ — — _ _ — _ _ _ _ _ w w n — — _ _ = What's in a car? The quesiion about which parame- ters you con read out From your cor is best answered by your car. You con be sure of the answer after reading out the supported PIDs via the OBD-2 connector After that, you can read out measured values for the PIDs supported by ihe ECU. Consult the author's website www.blafuseLde/misc/ obd2_pid.php for specific information about he PIDs. That website also provides another brilliantly simple feature: type the PID code read out by the stand- alone analyser Info the search field to view full list of the supported functions. For example, the mean- ing of PID 983E801 1 is shown in the following table. I PID Sensor 1 System tests status 4 Calculated load value 5 Engine coolant temp 11 intake manifold pressure 12 Engine RPM 13 Vehicle speed 14 Ignition timing advance 15 Air Intake iemperaiure 16 Air flow rote from MAP 17 Absolute throttle position 28 OBD standard 32 More PIDs 40 delta tlcdrcnia - 5y 200A r Construction information for autonomous analyser Component papularion changes fo ATmega board: Not required: RT, K4, K6 f SI, D1, JP1 ,JP3 and JP4 (do not fit), JP2 = wire jink Additionally required: S3 ~ pushbutton [1 moke contact) between PAQ ond +5 V Case, e.g. Bop!a Uni mas U16G, size 160/133/75 mm Programmed Aim eg a Controller, order cods 0501 76-A2 [HEX file contained in free download 050 T 76*8 l*zip from www.elektor^lectronics.co.uk) Configuration bits for ATmega: All bits unprogrammed (' I ] except B0OT5ZO, BOOTSZ1, BODEN and SUTI . Component population changes to QBD-2 Analyser board: Do no! fit Kl; use straight pins version for K2 or do not mount ft For kits and parts for this project, see Elekter SHOP pages orwww.elektoreleetronics.co.uk impressed for a couple of seconds, the cursor will jump to the next display position. If you previously selected a long -form display, it will jump directly to the next line. The configuration session is ended when the last avail able position has been configured. Only short- form out- puts can be configured in the second half of each line. Functions As the stand-alone analyser is designed ro be used as a digital add- on lustrum ent for cars, its trouble diag- nosis capabilities are limited. Storing text descriptions of trouble codes ivGuld vastly exceed the memory capacity of the ATmega 16, Conse- quently you will still have to use a lap- top computer with diagnostic software to read and clear trouble codes, PID 2 is also not supported. That FID indicates which trouble codes caused trouble data to be stored in the engine control unit. However, the ATmega software does recognise any trouble indications that may occur if they can be read out in Mode 7. That actually includes all continually monitored sys- tems. However, the fact tit at no trouble is indicated does not necessarily mean that no trouble codes have been stored. The actual trouble codes must be read using other OBD service modes, depending on the manufac- turer. The blinking spanner symbol alternating with an inverted exclama- tion mark and ‘Diagnosis' on the dis- play indicates that a trouble code has been detected. You can then use the diagnostic software on your laptop to read out the trouble code and clear the trouble memory. Of course, it's also possible to config- ure the unit to display PIDL If PID1 is supported by the engine control unit, it contains the number of pending exhaust -related trouble codes that caused the engine-trouble war nin g symbol (MIL, or ' malfunction indica- tor lamp ' to be illuminated in the vehicle cockpit. DIY Ideas A microcontroller system (such as the Mini Mega Board) connected to an OBD-2 Analyser naturally lends Itself to a wide variety of further applica- tions, including DIY projects. For instance, you could develop a data log- ging function using a standard SD memory card so the data could subse- quently be read out and analysed on your home PC. If you add GPS data storage to that, you have a true digital ‘black box' in your car. which might be too much of a good thing in terms of monitoring. -5Gl“t-Z' ! Links I I w w v elek tor-e ! e r, iron i c s.cc , j I* (OBD forum) 1 vaw. blofusel de, mi;c/obd2_£coi ned pbp (vehicle list; ins Eleklor Electronics OBD-2 Analyser is shown there as mOByDlc interface J www ozeneleklronik.com/ upload/dato/oe/ moby2600.pdf (mOByDiC 2600 data sheet) I wvAv.blalusel de/mi sc/obd2_picLphp (PID calculation) www.obd-2.d9/tech_prog.hlml [Gerhard Mullers reading calculations for individ- j uol PIDs) | . v. ,v i ,arg (ISO - International Organization for Standardization] www zee : g (SAE - Society of Automotive Engineers) An ATmegea by any oilier name... As mentioned in the article, the Mini ATMega Board can be fitted with the ATmegalb (which has 16 KB of program memory) or the ATmega32 [which has 32 KB). The only difference between the two microcontrollers thus appears to be the size of the flash memory. At least, that's what we thought when we loaded code compiled for an ATmega 16 into on ATmega32. When nothing at all worked and we were at our wit's end trying 1o figure out why, on attentive col- league pointed out that we had the wrong type of microcontroller. Now you know H so you don't have to try It for yourself. 5/2006 -d? liter skdrcn'is 41 Rarely have we f r f^^H received so many (enfhu- siastic) reactions from readers as those that were prompted by the publication of the OBD-2 analyser. Rarely were we asked so many questions and rarely did we have so few answers... Karel Wa I raven In ihe Double Summer issue (the July/August issue) of 2005 we published an adicEe concerning a DIY car analyser device the OBD-2 Analyser. With the aid of this circuit and a (laptop) computer it is passible to read informa- lion From your car such as temperature, speed; engine rev speed and instanta- neous power. In addition, the screen also shows Fault codes as soon as something goes wrong with your pre- cious possession, so that you re no longer completely dependent on your mechanic. Thousands of readers have built this circuit and it was unavoidable that we ai the editorial offices were going to be inundated with questions. The most common question was obviously: j have such and such a car and will ihe circuit work with my car? To get some clarification we asked you to share your experiences on the forum on our website and we received a massive response. At the moment we are sorting through all the responses so that it will be easier for you to get a quick overview. The most important issues we discuss here. The reports of models that were successfully read started to stream in. 42 ekkf&r ffedronlis - 5/ 2004 Hurray! It appears that our car is our most precious possession, we cherish if and with every small deviation From normal driving behaviour or sound we are concerned. It is then not surprising that you as technically interested people are so happy with a circuit that allows you to diagnose possible defects. The comments on this topic varied from Hurray, at lost! to "What a good idea \ Without doubt, the most common question was: :J hor which cars is the OBD-2 tester suitable? In the original article we naturally mentioned that in principle petrol cars from 2001 and diesels From 2003 are fitted with an EOBD-inferface. However, it appears to be a little sneakier than that. A few old hands in the trade butted into this discussion and the answer is: 'New petrol cars From 2001 and new diesel models from 2003. If a model was already in production before that year then it does NOT need to conform to the OBD-2 standard. And of course there are always the stubborn manufacturers who will do different if they can get away with it,.." The pinch is therefore the word 'new'. This does not mean new From the factory but a new model or an upgraded model. So ft is quite possible that the cor with petrol engine that you bought in 2002 is not compatible! ues that make nc sense: The PC communicates with my Fiat Stilo from 2GQ3, but the measurement results make no sense at atl. For example, water temperature 21 5. I have read on another site (Ozen Elektronik) that Fiats from 2003 and earlier speak their own language and they were going to make a program that would work with this. Does anyone know any more of this? I'm keen to find a good working program, because I have been struggling with this car from the beginning and really would like to read everything back. Fiat have been dragging the chain and are now saying thai the warranty is over. The company Ozen does indeed hove special chips For certain makes, including Fiat, Ford and Mazda. It is however best to go directly to the website far Ozen ESek- tronik and to have a took around and, if necessary, to contact them. "The PC communicates with my Fiat Stiio from 2003 7 but the measurement results make no sense at all/' It is oof all gold that glitters We connoi ignore that a number of readers were disap- pointed with the design and had hoped for more. Your official car dealership has diagnostic equipment from the factory that costs thousands of Euros and provides a practically complete insight in all aspects of your car. We will be very honest here: Our OBD-2 analyser cannot compete with this,, its capabilities are considerably more modest. But this is offset by a price tag that is also con- siderably more modest. Only those parameters (plus a few extras that differ for each car] that the manufacturer is required to make available according to European law are displayed by our analyser. In particular with cars from earlier than 2000 it is sometimes disappointing how much (read: how little) can be read. Not com- pletely OBD-2 compliant. 1 can scon sensor values, but no DTCs are found. Unfortunately 1 do not know if there are no DTCs or if they cannot be read.,.' In addition there were a large number of readers who wanted to use the OBD^2 circuit for engine tuning. Unfor- tunately it is not suitable for this. This is the domain of specialists] Consider that it is much easier to ruin your engine than it is to get more power from iti Cars from the Fiat group often provide measurement val- VitdlS k^fa^T* ««%t»f — t(yk)f/>^c TI 1 Cf-*>M) y*k y*k (JffMU* «w»«l »/*noii - rJi cm) t *!vr^ 1] ** ‘ "( V 1 ’ * l In the first article of this series, we described the basic components of digital electronics and put them to use. In this second instalment, we introduce some components that are a bit more complicated and perform a few simple calculations using digital logic. After reading the first pari of diis senes, you should know enough about the basic components of digital elec- tronics. In this instalment, we use them to do things that are a bit more useful. Memory Let s start off by looking at ihe most commonly used type of memory ele- ment: the flip -flop. The simplest type of flip- Cop is the ‘set-reset' (SR) flip-flop, it has two inputs (Set and Reset) and one or two outputs (Q and 6). When the Set input goes to T, the Q output also goes to T. That state remains unchanged even if the Set input returns to ‘0\ When the Reset input goes to ‘1\ the Q output will go to J 0\ That state also remains stable after the Reset input returns to ‘O’. The response of the flip- flop is undefined if the Set and Reset inputs are both T. That is regarded as a forbidden state that must never occur. Figure 1 shows a schematic diagram for this type of Qip-Oop. It is con- structed from standard components. IC1 and IC2 are NAND gates (a NAND gate is an AND gate with an inverter at its output, and an inverted output is marked by a small circle or diagonal line at the output). Truth table How can this be translated into a truth table? The answer is shown in Fig- ure 2. The SR hip-hop is shown at the far left. The associated truth table shows output Q^_ i instead of output Q. That indicates that this column shows the state of the output after the input signals have been processed. In some cases, the output state also depends on the previous state of the output. That is indicated here by Qm. Advanced forms A slightly more advanced form of flip- flop is the type known as a 'latch'. Its truth table is shown in Figure 2. This type of flip-flop has two inputs - D (Tiata l and Gate - and one output (Q). The Q output is the same as the D input as long as the Gate input is T. When the Gate input goes to 'O’, the Q 46 drVfsi 'ted rasis ■ 5/200 & output retains its value regardless of the state of the D input. It effectively stores the state of the D input at the time when the Gate signal became *0\ The next step brings us to the D-type flip-flop. The output of this type of flip- flop assumes the state of the input when the signal on the CLK input changes from *0 T to *1\ That is indi- cated in the truth table by an arrow. The output remains unchanged as long as the CLK input stays at ' T or '0". The D-type flip-flop can be expanded with a variety of additional inputs. Fig* ure 2 shows such an expanded D-type flip-flop. It has three inputs in addition to the D and CLK inputs: SET RESET and CE. The SET and RESET inputs perform the same functions as with an SR flip-flop. The clock enable (CE) input of this flip-flop controls the response to the dock signal: a rising edge on the CLK input has no effect if the CE input is not in the High state. Trying it out The ex5 folder (included in the down- loads for the second instalment on the Elektor Electronics website under Magazine May ) contains an example with various types of flip-flops. The RS flip-flop and the latch are implemented in Ure example in the form of logic gates. You can use the example to con- vince yourself that these functions can be constructed using ordinary gates. The other types of flip-flops are taken from the Guartus library. You can use the pushbuttons to exper- imentally test the operation of the var- ious types of flip-flops, VHDL Things really start to get Interesting when you use VHDL for flip-flops. Hie nice thing about VHDL is that you can describe a design instead of building it with small logic elements. The pro- gram uses the description to design logic that does exactly what your description says. Before we get into the details of the design, you need to know how the VHDL compiler reads your description, A VHDL file describes how the outputs (and the internal signals, if any) have to respond to the inputs. For this pur- pose, the VHDL compiler applies every conceivable combination of input sig- nals (in virtual form) to the inputs of your design. For each change to the input signals, tire compiler attempts to determine how the outputs must respond. That all sounds a bit abstract, but the following example should help clarify what if means. Structure The structure of a simple VHDL file is shown in Figure 3. The first thing you have to do is make the standard library visible’ to the compiler. Several basic functions for digital logic are denned in the standard library. After that, you must declare at least one entity. You can think of an entity as something like a particular type of IC In the entity declaration, you give the entity a name (a ‘type number') and define the inputs and outputs of your 'virtual IC\ After that comes the architecture sec- tion, which describes how the entity functions. An example We can use an example to show exactly how all this works. The project for this example is located in the ex6 folder. Doubleclick on die block named Laic h_ VHDL. That will open the VHDL file that describes how this particular bit of logic operates. The declaration of an entity named Latch _^/HDL starts on line 29. The inputs CLK and DATA and an output named Q are declared here. These sig- nals are all of type stdjogic . That data type Indicates that they are digital sig- nals. We T ll describe some other types later on. The description of how the Latch -IJHDL entity has to respond to its input signals starts on line 44. figure I. Sasic tonf lepra Ifcn of a llrp-rinp using four HAND pres. Processes You have already seen that Boolean equations can be used to describe functions. An even more powerful approach is to use processes. In a process, you can specify the value(s) that one or more signals must assume under various circumstances. The process keyword is followed by a sensitivity fist. Each time the compiler changes the (virtual } value of any of the signal in this list, it must evaluate the code segment of the process. We'll explain this a bit later on. If then else The keyword if appears on line 51. li will doubtless be familiar io the pro- grammers among our readers. This line say s that if the signal on the CLK input is T, the compiler must evaluate the code until it encounters an and if state- ment. In this case there is only line in between, and it contains the state- ment Q< — DATA:. The whole process is terminated by an end process state- ment, and the end of the description is declared in line 56, Evaluation When the compiler evaluates the code segment, it discovers that the G output must be the same as the DATA input as long as CLK is 1 , Nothing must happen when CLK Is not T r which 5/2006 -dcklwEkcirofliB 47 HANDS-ON FPGA Name: Circuit symbol: SET-RESET FLIFFLOP LATCH D-FLIPFLQP extended D-FUPFtOP PRE (SET) CLR (RESET) Truth table: SET RESET .Qn+i 0 0 Qft 0 1 i 0 ' 1 0 1 1 1 9 A GATE Qn*1 o Qn 1 D CLK Gfl+i 0 Qn 1 Qn t D 050025 - 2 - 12 CLK CE RESET SET Qml X X 1 r t s ? £ X X 1 0 0 X X 0 1 1 x 0 0 G Qn * 1 a 0 D 0 1 0 0 Qn 1 1 0 0 Q n Figure 2. Various types of Flip-Hops and ihelr truth tobies. means Q must not change, Thai shows how you can design a latch in VHDL. D-type flip-flop Now open the Me DffVHDL in the same way as before. Here you will see a similar hie vrith a few crucial differ- ences. A new construction for the if statement appears on ime 51. The construction elk 'event is only true when the CLK signal changes. The construction elk 'event and elk- 1 ' is thus only true when a positive edge (la tv -to -high transition) is present at the CLK input. The G output will only assume the value of the DATA input in that situa- tion. In all other situations, Q will remains the same. This is thus a description of a D-type flip-flop. Another D-type flip-flop The second example of a D-type Mp- flop has two additional inputs: SET and RESET. In the accompanying VHDL code, you can see that a test is first made to see whether reset is *1’. If it is, the output is set to '0\ Otherwise the state of the set input is examined. If it is T t the output will go high. If the set and reset inputs are both not r 1 \ a test is made to see whether the elk signal exhibits a rising edge (just as in the previous example lor a D-type flip-flop). If you refer back at the atari of the process, you wall see that me signals elk. set and reset appear in the sensi- tivity list. Output Q can change if any one or these signals changes state. The set and reset inputs act asynchro- nously to the elk input. In other words, the device does not require a rising edge on the elk input to respond ro a sec or reset command. You should also note that reset has a higher priority than set for this flip-flop. If set and reset ate both T at the same rime, reset will win the contest and the output will go to '0', Arithmetic The examples up to now have used signals of type stdjogic . An extension STEP 1: SET SET = 1 ; ReSET = Q STEP 2: HOLD _ = t STEP 3: RESET SET = 0; RESET = G -o SET^fl; RE5FT =■ 1i KAJilRS HAff325 WU&135 EC1 1 V A 1C 1 ■1 A orv output Q goss‘1 -j Jd iFtsfrn i 1 itircth . 1 = Output Q remains at V f= ~ -: i ' > fTim ft raETisra l_?it Ouspua O swing so 0'- Cv-a — zA l -v ii'O' » i " ?CEStT ±ii£, i.T,' Q- E3 TB-.-- 1 ^3.1.-- -1 17 sar.-j STEP A: HOLD SET = C:RESET=.D Oi^p-jS Q rc-rrtjina al V z-k *_h z* r j ^ 1 3 CL KCv5=-i - n Figure 3. The various slalos of a flip-Flop, 48 cEcklordKlronks- 5/2005 of that type is std logic vector. which we abbreviate as SJL V f or the remain- der of tills article. Teat type consists of a set of signals of type scd logic. You can use such a set of signals to repre- sent a number (see inset). There is also a type known as natural. It encompasses all positive whole numbers (integers). Doing arithmetic with signals of type natural is quite easy. You can use them for addition, subtraction, muitiplicapon and division in VHDL. To at capability is used in ex? to create a pulse waveform with a frequency of 1 kHz, derived bom a 50 -MHz clock. Open the example and do able- dick on the block named pulse generator. In the associated VHDL code, you can see how a signal of type natural is used for counting. First the ports are defined: a input signal named elk and an output signal named sJow_cZfc. In the associated VHDL code, you can see how a signal of type natural is used for counting. Tills signal must he able to hold the range of values from 0 to 500.0GG inclusive. The VHDL code uses these numbers to determine how many bits are required. In the associated procedure, a rest is made on each rising edge of oik to determine whether the value of the counter signal has reached the maxi- mum value {499,999). if it has. the new value is set to 'O' and the slow elk out- put is set to T. In all other cases, the value of counter is incremented by 1 and the slow elk output is set to J Q\ Tne net result Is that the output goes to r after 500,000 clock pulses. On the next clock pulse, it returns to ‘O' and the cycle starts again from the begin- ning. If a 50 -MHz clock signal is applied to the elk input r the output will briefly go to ‘1’ a thousand times per second. The VHDL code tor caJcuJate_sum demonstrates something else that's new. First, line 25 shows that an addi- tional library is necessary - the numeric std library. A variety of arith- metic operations and conversions are defined In that library The input signal a is declared in line 34. The expression STDLOGICVEC- TOE (3 downto Oj says that this signal set consists of four signals: a(3) f af£), a(i) and afDj. You already know that a signal set can be used to represent numbers. Making calculations with S L_V is a bit more roundabout. The mnciions of addition, subtraction and so on are not defined for type S L V in Binary arithmetic Mumpers con be represented using one or more digital signals. As binary signals I con have only two slates [1 or 0), the binary number system must be used in such F coses. In normal life we use the decimal number system (base 10). In the deck 1 mol system, a set ot three numerals can be used to represent 10 3 (1000) different [ numbers (0-999). I In the binary system, a set of three digits {signals] can represent a total of 2 3 g [2 x 2 x 2 = 3} values ranging From 000' to ‘1 1 T, or 0 fa 7 in decimal nolo- I fion. Sample calculation 1 The number 821 in decimal notation consists of 8 x 10^ + 2 x i 0 1 + 1 < 10°. I Similarly, the number HOT in binary notation consists aF 1 x 2^ + 0 x 2* + I I x 2' J = 1 x 4 + 1 > 1 - 5 in decimal notation. l You may find the following table useful For converting between binary and deck I mal numbers. I 1 I I I ] f I I I I 1 J 1 i I [ I I I I i I I i i i i i i i i a i i i i i i J Hexadecimal notation I I I I I i i i b 2^=8 2 7 s4 2' =2 29=1 Decimal Hexadecimal 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 2 2 0 0 J 7 3 3 0 J 0 0 4 4 0 1 0 1 5 5 0 1 r 0 6 6 0 1 1 1 7 7 1 0 0 0 8 8 1 0 0 1 9 9 i 0 } 0 JO A i 0 1 1 77 B i 7 0 0 12 c l \ 0 1 13 D i 1 1 0 14 8 1 } } 15 F i i i 1 i l l t I l l I i i i l I i 1 i I l l v a i i i i i i i t i a i a i a a a i E [ I ! I t I I I i i i a a a a i i a i Relatively large binary numbers are generally difficult to comprehend due to the large number of ones and zeros. Hexadecimal nolalion (base- 16 number sys- tem) can be used to make ihem easier to understand. That notation uses the numerals 0—9 and the letters A-F, with A representing the decimal value 10, B the decimal value 1 1 , and so on. See also our Hexadoku puzzle! A single char- acter can thus be used to represent 16 different values. Thar corresponds to four bits in the binary system. 5/2G06 - skkluf setrcrics 49 HANDS-ON FPGA p ™ ^ TTX ^ ZZZ -1 1=M — x^l j=t « _ wnt-iMM a _ q ! A- five High and Active Low ! Many components hove 'active Low' inputs. Thai means the input is 'active when the logic level at the input is Low. \ For instance, a flip-flap with an aclive-law Reset will be reset when a logic | 1 Low signal is applied to the Reset input. Active-Jow inputs can be recognised ] 1 by the small circle or triangle al the input concerned. An "inversion bar' can I I also be placed above the name of the input to indicate that it is active low, I I such as RESET ! It s also possible For outputs to be active Low. Such outputs can similarly be I recognised by the inversion bar over the name or a small circle or slanted I line at the output. E* = = ^ ~ ^ ^ x::, = . zi =: = ^ = = ». — « ^ ^ ^ — = 4 VHDL. However, they are defined in me muneric std library for some other types, including unsigned. Several use- ful conversion routines are also located in that library. The expression UNSIGNED (a) con- verts the set of signals a(3),^a(Q) to type unsigned. A sex of signals of type unsigned can be converted to type S_L_V in the same manner You can see all that on line 49. There the two input signals a and Jb {each of which is a signal sex) are convened to type unsigned. The two values are added together, which yields a result of type unsigned. Finally, that result is convened to type S_L_V. These sig- nals are also linked to the SUM output, This thus amounts to a simple addition function. A subtraction function is described in the same manner in calculate d!!. Busses The two blocks are interconnected in the Quanus schematic by several sig- nal lines originating from dipswitch S5. The input port. D!PS\ A . r lTGHi3..0l , con- sists of four independent input lines w ith t he d e s ig n. ati o ns DIPSWSIT CH[3j . DIPSWlTCH&j , etc. This deviates from die VHDL standard with regard to the noiadon for a set of signals. This set of signal lines can also be con- nected using a bus instead of individ- ual signal lines. You can draw a bus in Quanus by using the Bus Tool instead of the Node Tool. A bus is shown in a schematic diagram with a thicker line than individual signal lines. Tne schematic diagram here has sev- eral busses, some of which are con- nected to a port at only one end. Quar- tus regards all signals with the same name as being linked together, so it isn't necessary to connect all the asso- ciated lines together. Multiplexing The 7 ^segment displays must be driven one at a time. Only one segment can be on at any given time. This sequential drive is provided by the sequencer block. In the count process in sequencer. vhd T you can see that the Internal select signal is incremented by 1 each time each time a rising edge occurs on the cik line when the clk en input is T .In the schematic, c lk_en is connected to a signal line that goes to T once every 500,000 clock pulses. As a result, the imernal_selaci signal is incremented 100 times per second (50 MHz - 500,000). Line 55 shows a new feature of VHDL, It says that the sell signal must go to T if the counter value is ‘O', and other- wise the sen output must be 'QL Sig- nals se!2 to saM are generated in the same way. As a result, these outputs go to T sequentially. The counter value is also output via the sal signal (line 72). Signals sall-sal4 drive transistors T1-T4 on the prototyping board to enable the various groups of LED seg- ments. In step This example is designed to display four different numbers. The numbers must be output sequentially, synchro- nised with rhe drive signals for transis- tors T1-T4. The sel[l..Q] signals from the sequencer can be used far this pur- pose. The zrrnx block takes care of all this. The current output is enabled by the four inputs (vail, val2, sum and dir) according to the value of die sei signal. Tne keyword v/hen appears in line 52 of the associated VHDL code. In dial line, the currant output is enabled by the val 3 input if the value of sal is ‘GO’ (0). Similarly, the output is enabled by val2 iisal is equal to DT (1), and so on. Once again, the final enable is pro- vided here by the else keyword. Decoding The cmrenc output contains the value to be shown on the display. This value is also nicely synchronised with the drive signals for rhe individual groups of LED segments. The value of current is available in binary form, so the individual LED seg- ments must be driven based on this binary code, Tne value T must be shown on a 7-segment display by driv- ing segments b and e. To display the value J Q\ segments a-fmust be driven. That means the binary values must be converted into the proper drive signals for the various segments. Tnis lasr bit of processing is handled by the block named to_seven_segment. In the VHDL code for that block, you will see another new keyword: case. Tne line CASE val IS says that the value of val determines how the follow- ing bit of code is to be processed. You could read line 50 as 'if val has a value of L 0O0GL then the fallowing must hap- pen'. The software will then evaluate the subsequent lines of code until it encounters the next when keyword. In line 51, you can see that this causes the value T 111110' to be assigned to the segmentsjmt output. In other words, segments a-4 are driven on and segment g is not driven. The numerals 1-9 and the digirs A-F (for hexadeci- p = B ^^:o B . B i n iom D ^. B oa e ioiB Bn ^ SABnH i alann ! Earlier in this series [ Versatile FPGA Module E/eictor Electronics March 2006. I FPGA Prototyping Board, Elektor Electronics March 2006. I FPOA Course (V). Ehkior Electronics April 2006 (with Free downloads). L H «» r ->:i=i BE =i=> U = c 3 === k = i =: = S c=== S = 3 i =i=. e =c==z= = s=iU 50 ■=kk!Gr - S./2006 mal display) are decoded in a similar manner. Finally, the end of the case statement is indicated inline 84. Testing The best way to understand the previ- ous explanation is tony it out in prac- tice. To do so, program me FPGA unit vrith the example program in ex7. If everything goes right you will see sev- eral numbers appear on the 7-segment displays. few changes to the code of tire example. For instance, you can change the order of the numbers, or instead of calculat- ing the difference of two numbers, yon can calculate and display the product of ihe two values (multiply “ 1 in VHDL). The ex8 folder con- 1 1 ugital arithmetic j in practice I All digital devices calculate using ihe binary number sys- J tem, even if their users are nof aware of ihe Fact. The arith- metic processes are often considerably more complex than simple addition. ! Your personal calculator is a good example of what can be j done with digital arithmetic, Besides normal arithmetic opera- tions, il can also be used for relatively complex calculations such os sine f cosine, square root, and so on. An example of a more practical application oF this arithmetic I capability is a digital control system for a rocket, A consider- 1 able amount of real-time calculation is necessary to accurately I send □ rocket into space along its intended path. Yet another example is your DVD player. It takes a lot of mathematical calculations to transform the compressed data I on a DVD into a nice picture on your screen. All those calcu- I lotions are performed by a processor. Naturally that's a digi- tal processor, and it calculates [lightning fast) using only I binary numbers. You can use switches 0-3 of S5 to assign a value to vail. It will be shown on the display at the far left. You can similarly use switches 4^7 to assign a value to the second number. The third number on. ihe display shows the result of adding the two input val- ues, and the last number shows the difference between the two values. Experimenting To familiarise yourself with this approach to designing, try making a tains several other folders with even more examples. Now that you’ve read this article, you should be able to figure out how these examples work. Try out each of them in tum f and study the associated code to discover how they work. That’s the only way to became fluent in VHDLl v-_ S SQffS - Etfltar 51 HANDS-ON R8C 16-BIT TOM THUMB -based Oscilloscope Burkhard Kainka and Olaf Kaluza Tom Thumb as a software 'scope The previous instalments of our R8C 'Tom Thumb' series concentrated on explaining the basic functions of the R8/13 system. Now it's time to look at some real applications. The objective here is to develop a small oscilloscope in two forms: first on a PC, and second as a stand-alone device with its own graphic display. Many real’ PC oscilloscopes can achieve sampling rates of up to 20 MHz, but usually with B-foit re so- luuon. Simple implementations using a sound card typically have a sam- pling rate of 43 kHz or so. However, sound cards can dot process DC sig- nals. One way to remedy this situa- tion is to use a microcontroller with an A/D converter. A PC storage oscilloscope The objective is to have the R8C/13 take samples as rapidly as possible, buffer the measured values in RAM, and then transmit them to the PC ar a high baud rate. To keep the conversion time short; the A/D converter will be operated in B-bit mode. In theory, the maximum memory depth is nearly 1000 bytes. However, only 500 bytes are used here, because a conflict with the memory demands of the KD30 52 skklor - 5/1006 +5V © i JPi 1! R8C/13 K7 i 1 TXOl K& rv ! P0.1 y-*W w c- c- G- 1 P0.2 • 1 PD.3 -- r r\ j 1AQUE H w ! F3.-S 'w P0.5 ■J I F0.6 -o _TN F0.7 _r\ L/“ ! IVCC ~r\ 1 P3.0 1 AVS3 v“v- rv j P3-1 1 AVCC .•V P3,2 V P3.3 1 HK iok H Q che in H io» 1 -0 Ch5 1H. D50179 -5 11 Figure I. TJie analogue inpiJs are proleded fay TO-kQ resistors. Listing 11 Data acquisition using the R8G/13 ('SeopeT project) unsigned char ad_buf [500] ; unsigned char ad_in( unsigned char ch) { adconO = OxBD +■ ch; adconl = 0x20; adst “ 1 ; while (adst ~ !){} return ad; ) void sample i unsigned int ch) { unsigned int a dr ; for { =dr s 0; adr < 500; adriH-} { ad_huf l adr] = ad_in(ch J ; } for {adr = 0; adr < 500; adr^+} i sendTxd0(ad buf [adrj | ; > > void main {void} { while ( 1 | { 5 apple ( receiveRxdO ( } } ; > } ~ — — — — — — — — — — — - ^ — ^ — ^ / /Fort PO group //B-bit mode / / Conve r s ion s t art //tflait A/D conversion //AD value debugger could easily arise with a larger data volume. The 'Scope T project (see Listing 1) uses the UART0 serial interface port of the microcontroller. That leaves UAHTi free for the debugger. Toe data trans- mission rare is set to 38,400 baud. The A fD converter can use the seven avail- able channels (AN0-AN6), which are located in port 0. As the LCD is not used for this application, all seven channels are available. Data communication is governed by the following protocol. The PC fust transmits a single byte containing the desired channel number (0-6). The R8C/13 then takes 600 individual sam- ples and stores the results in its data buffer. At the end of the measurement process, all 500 bytes are transferred directly to the PC, The sampling rate is approximately 100 kHz, which is suit- able for general measurement tasks. It is highly recommended to fit 10 kO protective resistors in series with the inputs of the individual channels {Fig- ure 1). That will avoid any risk of dam- age to me microcontroller if an exces- sive voltage is accidentally applied to an input. The potentiometer connected to analogue channel 6 can be put to good use as a zero -reference control for measuring AC signals. Additional smoothing of the supply voltage may necessary, because the voltage drop across the Polyswitch fuse (FI) creates noise on the V cc line and thus on the reference voltage for the A/D con- verter. A 100-pF electrolytic capacitor connected to V cc will provide ade- quate smoothing. Displaying measurement data In Visual Basic On the PC side, a small Visual Basic (VB) program looks after displaying the measured values. Tne VB project was generated using VB5, and it can also ! Listing 2 ! • Data reception tn VB I Private Sub CoraroaiidljCIickf * I 1 XIKEINTT t I SESiDBYTE I di I i DELAY 200 | I For is = 0 To 500 [ I a - READBYtB{ ) | i Chi ( n t = Int {a) | | Next I) | | Plot | I End Sub } 5, 2005 - *!sV!bi ckttrciiki 53 HANDS-ON R8C 16-BIT TOM THUMB Figure 2. An osdllogram on the PC nionHor. be compiled using VB6. The accompa- nying .exe file was generated using VB6. The user selects the desired input channel and starts a measurement session by pressing the 'Stan' button. Automatic repetitive measurements can enabled instead by pressing Auto (see Figure 2). The Spectrum button selects a Fourier spectrum display as described in the next section. The procedure for requesting and receiving the data (Listing 2) stores the incoming 500 byres in a data array des- ignated Chl(n), from which the data is passed to the output routine {‘Plot ). Fourier analysis When measurement data is available in digital form, the spectral compo- nents of the signal can be calculated and displayed using Fourier analysis. In simplified terms, that consists of multiplying the actual waveform by a sine wave with a known frequency. Ffgut * 3 Freffuency spectrum of a 1-kHr square-wave signal. The result indicates the amplitude of the signal component at drat frequency that is present in the original signal. However, tills requires a considerable amount of computation. If 500 samples are present, 500 sine -wave values must be calculated for each frequency and multiplied by the measurement data. The whole process must actually be performed twice, because the unknown phase offset of the measured signal makes it necessary to perform two analyses with a phase difference of 90 degrees. After that, the two out- put values must be processed by vec- tor addition to obtain their joint mag- nitude. To avoid generating measure- ment errors due to the abrupt termination of the signal at the edges of the measurement window, it is rec- ommended to first process the meas- urement data using a rounded window function This analysis is normally performed 54 tlAtet fhtir&'iis - 5/2006 Listing 3 Fourier analysis in VB Private Sab Trans forci ( ) For a = 0 To 500 ChZ(n) ~ (Chi (a} - 127 j * ( I - Cos ( n * pi / 500 )) J Hanning Window Rest n For k = 1 To 500 r = 0 i = 0 For j * 1 To 500 r • r + Ch2(j) * Sift (St "* j / 380) i - i + Ch2(j) - Cos(k i j / 380) Nest j Chl(fc) = 1 / 100 * 5qr(r * r + i T i) Next K End Sub — — — — — — — — — — — — — with a ‘fast Fourier transform' (FFT) using the butterfly algorithm. Although the FFT may be fast, it is complicated and requires quite a lot of memory. Nevertheless, our objective later on will be to copy the algorithm used for this purpose as exactly as possible from the VB code into C code compiled for the R8C. Consequently we use a simple digital Fourier transform (DFT) here. Listing 3 shows the conversion routine that processes the time sequence in Chi into a frequency spec- trum in Ch2. The edges axe rounded using a Hann window before the actual transformation takes place. Fig- ure 3 shows the spectrum of a 1-kHz square-wave signal as displayed in the pro gram window. Graphic LCD The graphic LCD really turns the R8C/13 into a powerful system. With it in place, the PC is only needed for pro- gramming. and an application such as the simple oscilloscope described here can run ruby independently on the microcontroller system Here we use a type G4128E from Displaytech (distrib- uted by Giyn, and available from AX MGDUL-BU3 and Geist Electronic as well). The display has a resolution of 128 x 64 pixels and requires a supply voltage in the range of 3 V to 3.6 V (maximum). It can be driven either in parallel or serially via an SP1 interface. Parallel operation would occupy too many port lines in this case. The LCD is thus operated in serial mode here, which also simplifies the connection. The sample project described here ( LCD64128E') specifically requires the indicated display type. Unfortunately, there is no commonly used type of ‘standard' controller for graphic dis- plays, but instead a wide variety of rypes In this case, the controller is the KSQ713 from Samsung. The specified 3- V operating voltage means that the conrrol lines must also be driven using 3-V signal levels. There are two ways to do that. One way is to use a 3-V sup- ply voltage for the R3C / 13 as well, and the other way is to use suitable level converters - which in the simplest case can be voltage dividers formed by pairs of resistors. These two options are illustrated in Figures 4 and 5, An extra 3. 3-V voltage regulator can be used to operate the R8C/13 at a reduced voltage, as shown in Figure 5. However, there's an even simpler option. For initial testing, it's sufficient to connect two IN4004 diodes in series wirh the 5-V supply lead. With a volt- age drop of approximately 0.7 V per diode, the supply voltage for the R8C / 13 and display is reduced to 3.6 V (5 V - 1.4 V) f which is within the allowed range for the display. The diodes can be fitted very easily by preparing a 'special' jumper for JP11 on the application board, with the two diodes wired in series between the contacts. Incidentally we accidentally operated the display for a very short time at 5 V without any adverse effects. It thus appears to be able to survive such mistakes. i To enable the display to be driven in serial mode, you must bridge jumper JP3 on the back of the LCD circuit The signal lines required for serial data transmission are: DB 7 = SID to TXD0/PT4 DB6 = sax to CLK/PI 6 /CSIB lo P L3 RS to PI 7 E lo ground R/W to ground RSI to Reset or Filled wilh Us own reset circuit Toe Reset line can be connected to the R8C 13 microcontroller Resei line. The display also has a white backlight LED that draws a current of 20 mA_ board with a dioo of solder. UJ o r* ip a o vss 037 □35 D55 □ Si DB3 032 Pit DBO E fviv RS FI ST CSIB LEO- LED - 6 7 B B JO jt 12 is 12 is 17 It I t3V5 i ^ — I ion — | h KS O O C- O RXDl r~i 1 KG CHVSS | R5SET 1 XOVT 1 VBS [ Xflf t vcc 1 PL7 I PIS [ RXD 0 [ Txaa 1 pij ! pii i pm i Pi.a \ P43 | O c o o c- o o o o o o o JPU 2x is D50173-5-U I FigvTf 4, Display ccnnedion willi reduied V [C , 5/?00fl -e‘s!tlcr tlulroniu 55 R8C 16-BIT TOM THUMB figure 5. LCD connection with □ 3.3-V voltage regulator. Figure 6 Outputs from Ihe sample project. Figure 7, Ad oscillogram od the LCD, The sample project for serial operation (LCD 64128) implements two different serial drive methods: using the syn- chronous UART0 (SPI port) of the R8C/13 or using direct pore instruc- tions, which take more time The proj- ect supports both options. The direc- tive ^define SYNCUARTO' selects fast SPI transmission with a clock rate of 1.6 MHz. Unfortunately, the display RAM cannot be read back in serial mode, so a large 'shadow RAM' (1024 bytes) would nor- mally be required. Here we use a trick in ks07i3.e instead. It consists of stor- ing only the most recently used bytes in a relatively small buffer If a suitable sequence is chosen, characters and lines can be generated m this manner without overwriting previously gener- ated elements. Toe instruction '# define LCDSIZE 123' in file ks0713,h configures a buffer with 128 entries, which requires 384 bytes of memory. That value can be reduced if RAM space is right. When you want to set a pixel* the function 'bit buffer' first checks whether other p lx els have already been set in the corresponding byte of the display before it sets the bit for the new pixel. However, the old bits will be lost if the routine encounters a location that could not be saved previ- ously in memory. A description of the details of me driver would exceed the scope of this article However, the project code is carefully commented, so if need be you can figure out for yourself how it works. Here we limit ourselves to brief descriptions of the functions provided by the driver, which you can use to cre- ate your own projects. Iedg_inlt(]; Initialises the display 1 c d g^dra wpix e 1 (x , y, B LACK) ; sets a pixel at posh ion (x. y) lcdg_Mne(x 1 ,y 1 ,x2,y 2,BLACK) ; draws a line from (xl, yl) to (x2, y2) icdg_circle(x,y t r 1 BLACK); draws a circle with origin (x ? y) and radius r lcdg_box(xl l yl,x2 1 y2 1 BLACK); draws a rectangle with comers (xl* yl) and (x2, y2) ks0713_invert(); inverts the entire content of me display ksG713_normal(); switches back to non-invened display ksG713_clrscrO; clears the display 56 dd:l£f ekrf[E:"i« ■ V2M6 oprintf( u %2%qText ,r ( x,y) ; writes a chaiacier string at location (x t y) oprmtf("%z%q%d l, l x > y 1 n}; writes the integer n ai iocarion (x. Y) The oprintf function is a simplified ver- sion of the normal priutf function in C. It can output integers as well as char- acter strings. To keep the code size within limits, we omitted support for real numbers. The charB.h character set is supported with an 8 x 8 pixel matrix. The sample project illustrates the capabilities of the display and gener- ates the pixel graphic shown in Fig- ure 6, It includes a line, a circle and a rectangle. Finally, a character siring is output, including an incrementing number. The entire display is Inverted after 20 passes through the routine and then restored to the normal state after another 20 passes. The example also demonstrates the limitations of the memory-saving graphics algo- rithm: a small portion of the drawn rectangle is erased by the superim- posed text. A mini oscilloscope Now that all the necessary tools are ready, we can put together a small oscilloscope with an LC display. The data acquisition function is nearly the same as for the PC oscilloscope. How- ever, in this case we only have to acquire 128 bytes. The entire LCD area is used to display the results (Figure 7). As we need memory space to store the measurement data, the size of the auxiliary RAM lor the display must be reduced In this case, good results can Listing 4 Measurement and display on the LCD {'LCD64I 285cope' project) void main ( void ) i \msigTisd xnc a dr; delay! 10000 ) ; lcdg_init ( ) ; while ( 1 ) t I trigger ^ > \ for (adr = Q; sdr < 123; sdr-^ ) { ad_bu£ [ adr ] = ( sd_in { 6 f ) ; } ksS7l3_clrscr( ) ; for | sdr - 0; sdr < 127; adr+4- ) { Icdg line {acr, 63-sd b-iif [ adr] 4 ( adr^l , 63-ad_btri[adr-l 1 4, SLACK } ; > deisyj 100(10) ; } > Listing 5 Trigger function ('LCD641 2EScope jr project) void trigger (void ) { int start,; Start - 0 ; while | pi 0 a t start) { while ( ad l_in ( fa } > sd_in { 5 ) \ ; while ( ad_in ( 6 ) < adin ( 5 ) ) ; start = I ; } while (pi 1 & 1 start) { while ( ac_in( S ) < adjn (5) ]; while (adin ( 6 ) > ad _in ( 5 ) ) ; start = 1; > > ™ ~ ™ — 1 ■ — — — — — — — — — — — ~ — J Serial interface timing The program generates a 200-ms deicy after sending the Star! command. A shorter delay was initially configured here, since the actual measurement lakes only 5 ms. After that, Readbyte receives the characters as fast as they arrive A timeout value of 10 ms applies to the reception of individual bytes. Each byte, with iis eight data bits, start bit and slop bit, takes 0.26 ms (10 x 1/38,400 $), so there shouldn't be ony problem. However, liming problems did occur with some relatively recent PCs and o few USB/RS232 adapters. It turned out that the data stream is temporarily stared in a buffer with a size of 64 bytes or so and then transmitted as o block in a USB frame. No problems occurred with the Prolific 1C on the applica- tion board, but some recent-model PCs are no longer fitted with a 'normal' R5232 interface using a 16550 1C. Instead, they have a virtual COM interface that presumably also uses USB internally and exhibits exactly this buffer behaviour. That can cause time gaps in the received data stream, which In turn lead to timeouts. The 200-ms delay solves this problem by providing sufficient time for all the data to be received by the serial interface ond stored in the receive buffer. After that, the VB program can read out the data at full speed. 5/5006 - d-Tlm ekrironits 57 HANDS-ON R8C 16-BIT TOM THUMB © •POS ] [ tv£G H ° °|« 9 Ql^ 1 44 -W- t i 4 =-^h tt rSV Ka r i F.X- 5 ' ) K6 CCT55 t L_ P.E5ET 1 V - ! f\. A -OUT I i—i vss 1 — ^mT XOf 1 n vcg |: r\ Pi.? J Pl£ ||| -n- n_ a.t.&o 1 _n, — : tjlk 1 |"S_ pijj 1 r"s L_" pi 2 i PI.1 1 PIC J -0 c - : M3 I ’V' K7 1? HflC/fJ 15 1? a o- o- o o -- Cr f> o- o o o o JPI Ko TlQl t P 0.1 \ t F33 f U-SCE l PS-4 j PCI l PGlS 1 PD.7 1 r/cc 1 Pin 1 iYSS Pii l *¥CC 1 P 22 F TJ| I J O I for f adr = G ; ad r < 256 ; adr++) ■ f I aeWbuffarir] - f(ad_buf[ adr]-I27) T (I - cose (( flca^f adr T _PI / 128 J ) /2+ 127); I ) I ksG713_clrscr( ) ; c old ~ 0? I for = 0; k < 129; K++) I i I r = 0; I 1 = 0; I for ( j - 0 ; j < 256; j-r+j I i I r = r + [(ad_buf[ j]~127) * Slatah| (k * j / A) k 2551) / 128; 1 i = i t ( (ad_buf[j 1-127) * Sintabi(k * j / 4 + 64) h 255] ) / 1$0; I ) I r = ( int )sqrrr( (( Elaatjir* ( zlQat)r+( float ) i T ( float ) 1 ) ) ; I c = r7 200 ; | //o= &d_bu£|k]/4; | Icdg line { k , 63^c_old , k-r 1 , 63 -c , BLACK ) ; 1 c_old = c; I } 1 delay { 10006 ) ; 58 ridtor dtrircnio - 5/Mfi Figure 9, A Fourier nnoJysis wilhoyf I he Hortn window. #include ,+ mathlh r ' allows you to use functions such as siuf ; cost and sqrtf for fioating-poim ('float ) values, which require less memory than the usual fimctions for the ‘double* format. How- ever, they take up considerably more space in ROM. In its default conhguxa- cion, the compiler is limited to a maxi- mum program size of 8 KB, so the start of ROM must be moved down from OeOOOHto OcBQDH- Thai leaves enough room for the firmware of the KD30 debugger. Line 609 of file "SectGG.Inc 1 must be modified accordingly. Incident- rally, the entire LCDS4I28Spec project generates a code volume of 10,950 bytes. • section r om_N E , R OMD ATA *org 0 c 80 OH The compiler directive #LncIude ’"math! h" is important here. Although the source code will compile without an error message if it is missing, the mathematical functions used in the code wall not work properly. It's also important to pay attention to upper- case and lower-case characters, because only floating-point values can be passed to the fimctions. Tire conver- sion function 'floarfadr)' converts the integer variable aclr 1 into a real num- ber in floating-point format (Listing 6). The sample project shot vs that work- ing with C for the RSC/13 is just as easy as using Visual Basic for the PC, However due to time constraints the actual computation loop for the Fourier transform has to manage without the sinf function, because 65 T 536 sine cal- culations and multiplications would simply take too long. A pre -calculated sine lookup table is used instead. That reduces the computational effort to 65.536 muiripiicaiions in 16-bit format, which the R8C manages without bat- ting an eye. By contrast, the 256 cos! calls for the Harm window and 128 sqrtf calls for the vector addition do not cause any objectionable delay. The full screen display is generated in a fraction of a second. See your design in print! Elekfor Electronics (Publishing) are looking for Freelance Technical Authors/ Designers If you have # on innovative or otherwise origin a/ design you would tike to see in print in Europe's iargest magazine on proof leal electronics # above average skills in designing e/ectronic circuits t/F experience in writing electron ics-re/o fed software # basic skiils in complementing your design with an explanatory text # a PC emaii and Internet access for efficient communication with our in-house design staff; then do not hesitate to contact us for exciting opportunities in getting your designs published on a regular basis. E/ekfor Electronics David Doormen, Head of Design Dept RO* Box 75, NL-619Q-AB Seek, The Netherlands, Fax: (+31) 46 4370161 Em ail : d, da amen@segmen t n l S/ 2G06 ■ etdkr t'Edwrftt 59 TECHNOLOGY E-BLOCKS Many readers have asked how they can make their own E-blocks. This month we take a look at some options on making your own prototype E-blocks and give you some suggestions for E- blocks that we would like to see. TiP'W- *1 r UinHh Pi r I >rv t - TTT f iyl it ^ 1 ,, z tf & AY. jt A, ° r ,l , | Lvj, . V y w . 1 Figure 1. Our cigareiie packet plan. The first step to making an E-block is to get some hardware up and miming. Before you do that you need some kind of pian for what you want 10 make. Usually with electronics this means you have to draw up a circuit diagram. To make your initial design you will need to draw on information from datasheets: the datasheets on the development equipment you are using and ihe datasheets on the electronic components you plan to use. Your schematic can rake many forms - from a Computer Aided Design (CAD) schematic, to a sketch on ihe back of a cigarette packet. For the sake of this article we have gone for ihe cigarette packet" approach that you can see here. On the cigarette packet in Fig* ure 1 you can see my ideas for a sim- ple bene atop instrument containing a basic E- blocks logic analyser and a voltage- variable power supply As well as being a useful instrument, I am hop- ing this will help me learn a little more about analogue electronics. At this stage of a project I like to make sure I have all the information. I am likely to need: which pin numbers on the ICs correspond to each signal lines, pinout of the transistors, etc. You can see that even on this simple diagram there is quite a lot of information. At the heart of the system is a 16F877 40 -pin PIC micro with 20 -MHz crystal oscillator and two pus h-to -make switches on E0 and El. A two-line 16- character alphanumeric LC display is connected to port B of the PlCmiero. Port C of the device is connected - via 330-ohm resistors — to an E-blocks port [not shown) on the left of diagram. I plan to use ihe first line of the LCD dis- play to show me the status of the lines on Port C in both binary and hex for- mats. Later 1 might also use this for monitoring 1 2 C or SPI bus commands, which is why I chose port C as it is internally connected to the PIC US ART (universal serial asynchronous receiver/ transmitter). A good old 7805 regulator will create 5 V for the circuit horn a spare 16-V ‘rat's-tail' power sup- ply I had in the drawer. I have used an SPLbus 256-step potentiometer - the MCP4101 from Microchip — and con- nected it to C3 (clock}, C5 (data) and B7 (chip select) of the *877. The 10-kft 4101 is the bottom part of a potential divider, with a 10 -kO resistor to +5 V. This produces an output from 0 to 2.5 V in 256 steps. This signal is amplified by a LM324 op amp powered off the 16-V input to produce an output between 0 and (hopefully) 16 V. A simple TIP142 NFN Darlington transistor - effectively My plan 60 eltkfor tlfdrwiks - 5/Uflfi John Dobson an emitter follower — then provides the power supply output. The emitter of the Darlington is fed to a G.5-Q resis- tor and men 10 the screw terminal out- put connector. A differential amplifier will amplify the voltage across the 0.5- 11 resistor, allowing me to make a dis- play of the current output. This will feed into pin A! of the '877. The output voltage is also divided down by poten- tial divider chain to produce a signal between 0 and 3 V which is directly proportional to V GUt . This is connected to pin AO of the '877. So 1 can have the software calculate and display both the output voltage and cuixeni of the power supply I plan to produce all of the code for this using Flowcode. Getting started My hist aim is ‘proof of concept 1 and technical risk’; I want to know if the idea is likely to work and test the core components: particularly the linear potentiometer which i have never used before. We are going to base onr initial prototype on the E-blocks system, as we have a PIC micro programmer, dis- plays. switches, which all connect together very quickly All we need to do is prototype the parts of the circuit that we don't have: the MCP41010 design, the opamps. I won't bother to prototype the output stage just yet as i am more confident about that pan of the design. It makes sense to me to get the 41010 working first as i have never used it and to test the fundamental theory of our design and get the values of ihe resistors in the op -amps right. The MCP41Q10 and the LM324 can be seen in close-up on Figure 2, and you can see the initial prototyping E -blocks system in Figure 3. In Figure 3 you can see we have an E- blocks PICmicro Multiple grammar with an LCD display on port B. some switches on port D, and port A and C feeding onto ihe prototype board con- raining our 41010 and LM324 circuit. Once the circuit diagram was estab- lished tins only look around 15 minutes to construct. Here is a hint: in Figure 2 you can see that we are using a pack of small multi-strand leads with rugged gold end terminals to make the connections ? ti - jo o t» ti ** 4m % «* OriOn^-'! a * ** a O Q ft Ci T* 6 ‘"J '*'*0***1 0**1 **M fp PJOOOTJ** Ofifl' u « oooa tjo o 1. 1 m «• f i**fj*j N'Mi* i t * i i~i * i f t* r* it'i ** *. OCifif it Up" I’-p (I 4* niifuKi p rf P n n nnof’i mtt vr-i O •*-*i p— * i i !”» J * . ■ .p “ ■ f ’ 1 H - • I t I P I I t I * t ^ » ijjP P I I ♦ * ! I t ♦ ( ifW * » * i * « *■«■*. ‘ I 'V — 1 * * 4 * * - m p * > . - if y ,i,i f .1 - <= ? w— v Figure 2. The MCP41 0 1 and the LM324 hoppy together on a prototype board. on the prototype board. You can use single core wire for this quite ade- quately, but if you are going to do this frequently then the proper leads are worth investing in: ihe single core wires have a tendency to snap off inside your Protoblock, and they are slightly too large for inserting into turned-pin sockets which are almost universally used for prototyping. Mote also that on the prototype board shown there are o two E -blocks D-type connectors: * two terminal screw connectors for power and ground: o two single inline 9 -way turned pin figure 3. The t-Uoiks prototyping system. 5. iflOi - del hr dtrtrcr.ks 6! E-BLOCKS V \ OOOOOOOOOtiT ifQdOOOD ’I O QOOQDODOOOu'u-j'bC 00 00400.0 0 0 . :L i '. ODQOCl ' aCrocoiiD 5 O' ■ , . Q f ' OOt I < ftO r.'J 1 (O Pi JOtnl; m3 '•'■ - - >s t. — d — ^ — — -**".** — ^ -n ■- — t- 30000000 '■ >aaP Q0OQ0O000 0 000 00D0000QgoflOOD fiPJOOOO&OOOuCfQQDOOQQOOOOOOOOOO : SPO(J€ODCl0oi500 0 0 000(}0OOOOQOCtOC o^OQOOdoooaofloopaooQooooQooooo HR* ■ I 1 in Pot: 221 collage is: figure 4, The ffnol design on a potdi batud. sockets for berth E-blocks ports: o a patch area to the right of the Pro- toblock for connecting the more awk- ward components that won't fit onto your Protoblock, these include poten- tiometers and surface mounted compo- nents (SMDs). Patch boarding The problem with the Protoboard approach is that is it only temporary — once your design is proven then yon need to find a more permanent way of developing your project. You have a n umb er of choices here: * develop a custom printed circuit board (the best method, but time con- suming and expensive); 9 use stripboard a.k.a. veroboard or perfboard iyeuch!); * use what we call a patch board. ■% Patch hoards simply consist of a bare circuit board with a large number of plated through holes onto which you solder your final circuit. Once you are confident of your design, you can sim- ply go ahead and solder the compo- nents on and wire them up - if you do make a mistake then it is easy enough to remove the components. Note that some people use patch boards for the first prototype, but it does take longer to correct mistakes. The great advan- tage of the patch board system is that, as all the components are soldered onto the board, it is more rugged and essentially makes a more permanent E -block component. In Figure 4 you cart see the final design on an E-blocks patch board. Tills has an E-blocks counselor oo the top and ail the components mounted onto the board and soldered in place. When it comes to wiring, you also have some choices: you can use coloured single-core wire, which provides a strong and easily traceable circuit, but can get messy when you have lots of connections (note on this design there are around 50 wires). I prefer another approach which is much, much faster; if you look at Figure 5 you can see that I have used what is called wiring pen- cil wire'. This thin wire has a layer of polyurethane insulating coating that burns away with a soldering iron to reveal the copper wire beneath. To use it you just apply the soldering iron for a second or so and then solder it to the appropriate component pin. I don't • r -CE jj Oj f ■ 0 ■*o< * O O O V o vr 5660 5 0 0 0 5000 booo D O OSj 20 0 0 2000 > A A A C hi ' r* v . _6 6 0 0 0 0 0 0 T “W - Jft • ^ X O O © - 5 © o o o o o o c 00^0 © <# 3 o O O p O ° ( , ' " v viz ■ vr .> *5 * C)OOs 4 id O' b DO o < O GO OOOO C OOOOOI OOOOOOOOOOOOO' O 0^0 © O C >0 ooooo a n n, ft n r'i O OOOO Figure 5* Close up of the bollom of Ifie patch board showing wiring and 5MD components. ( Earlier in this series ! i Electronic Building Blocks I I November 2005. I I E-blocks and Flowcode I December 2005. | E-blocks in Cyberspace ^ January 2006. ® I E-blocks - now you CAN , | E February 2006. | E-blocks Making Waves March 2006. ! t E-blocks Making Waves at C. L I April 2006. E Articles may be downloaded indi- vidually From our website. I For a complete overview oF 1 available E-blocks visit ihe relevanl SHOP pages oi j www.elektor-electronics. to.uk | 62 elektnr dftfrenfrs - 5/2004 | Call for Papers Here are a few suggestions for E-bfocks projects we would hke to see: I DMX * RFID * Zigbee ° Joystick 6 Camera 6 SRD RF transceiver * Compass 6 Real-time dock * 1 FPAA interface e Colour sensor 0 BQ 51 0 Z8D * PC E-block, 1 g Readers are invited to submit ouflmes and detailed propositions for any of the above projects* know of a faster way of making a cir- cuit and the results aie surprisingly rugged. In Figure 5 you can see that 1 have also used some sun ace -mounted components on the bottom side of the patch board, Design summary The design itself seems to work fairly well, The coll ector-emi tier drop on the Darlington was more than i expected and I ended up with an output range of around 0 to 12 V rather than the desired 0 to 16 V. I tested the design with a resistive load (ah the aroma of burning resistors) and drew around 350 niA. 1 did not get round to develop- ing the current monitor circuit and software, and my voltage algorithm in Flowcode only gave an integer read out. Room for improvement in the pro gramming department! I was impressed by the ease of use of the Microchip MCP4101 device and will certainly use it again. If you are going to use it make sure you have the most recent SPI components for Flowcode installed. An article on SPI was pub- lished in last month's Elekior Electronics. Conclusion From this brief article you have hope- fully seen the steps you need to take to make your own E -blocks board, and also how you can take a project from the initial prototyping through to a fin- ished item. We are always looking for new project ideas for E-blocks and we have a large number of new boards coming in the next few months (including Bluetooth. Bluetooth CODEC. SD/MMC card reader, motors, LIN. PS2 VGA, optoiso- iator, USB/R5232, MP3, GPS, and relay). However, there are a several other functions that we would like to see in E-biccks format listed above. If you are interested, in developing a project for these - in eluding the code for a PlCmi- cro based in C - rhen please contact the Editor. a OONSTRUCTIO FLU nr Electronics 1 Publishing i Joes no! provide pans and components other than PCBs. an J preprogrammed ICs t not necessarily for all proj- ects). Components are usually available from a number of retailers - see the advert s in the magazine. Selected projects are supplied as kits. Large and small values of components are indicated by means of one of the following prefixes E — lu f ’ P ipmi = HM 5 Titeia) = tfP- T G (giga) = tO 9 M niega = Iff k (kflo) = ILF h Oiecio) = ltP da Uiccai - UP a tattoo - I(H S f (femtol = IQ -15 p (ptco) = 1 EH 3 n inano) = 1 tH g: l micro i = ifr- m ^ mlTlII = lfrd c ivtimii = UH J idea' = 10-3 In some circuit diagrams, to avoid confusion, the value of components is given by snbsts luting the relevant prefix for the decimal point. For example, 3k9 = 3.9 fcQ 4/iF7 = 4J^F Unless otherwise indicated, the tolerance of resistors is ±59c and their rat- ing is l A- l 6 watt. The working voltage of capacitors is > 50 V In populating a pcb. always start with the smallest passive components, that is. wire budges, resistors and small capaeuors: and then ic sockets, relays, electrolytic and other large capacitors, and connectors. Vulnerable semi con due ton and ICS should he done last. Soldering. Use a 1 5-3 4 \V soldering iron with a fine tip and good quality solder tin. Insert the terminals of components in the hoard" bend them slightly cut them short, and solder wait 1-2 seconds for the tin to flow smoothly and remove the iron. Do not overheat, particularly when solder- ing ics and semiconductors. Unsoldering is best done with a suction iron or special unsoldering braid. Faulrfinding, If the circuit does riot work. carefully compare the populated board with the published component knout and pans list. Are all the com-. I _ : = J GUIDELINES portents in the correct position? Has correct polarity been observed Have the powerlines been reversed? Are all solder join Ls sound? Have an\ wire bridges been forgotten? — If voltage lewis have been gnen on the circuit diagram. Jo those meas- ured on the hoard match them -note that deviations up to ±IUT from the specified values are acceptable. Possible corrections to published projects are published from time to time in this magazine. Also, our online Forum often contain > useful comments addition^ to the published projects. The value of a resistor is indicated bv a colour code follows. color 1 black 0 hmwii 1 1 xlO 1 red 7 1 xlO- orange 3 3 xl

rtth- ±103 none — — — ±203 Examples: brown-red-brown - gold = 12UQ, Fi r yellow -violet-orange- gold = 4" kn, 5L 5/ - ekVtgr sledrofiTts 63 PCB MANUFACTURING re efficient PCB exposure Reinhardt Weber Commercial PCB exposure light boxes usually employ gas discharge tubes as an ultraviolet (UV) light source, these devices are however bulky, fragile and costly. Incandescent lamps are not a good alternative; they produce a lot of heat and relatively little UV. An interesting development boasting high efficiency and excellent reliability is the recently introduced UV LED. This design will be welcomed by any- one considering homebrew PCB pro- duction, it uses the L-7113UVC type UV LED from the ‘Super Bright LED Lamps' range by Kingbnght to build a UV light box. The emission wave- length of this LED is precisely 400 mn. ideal for transferring a mask pattern to the photo-resist layer of coated PCBs. The maximum LED forward current is quoted as 30 niA. producing a voltage drop of 4.2 V The entire light source is made up of 24 diodes arranged in a grid pattern to ensure even illumination across the Eurocard sized PCS, The beam angle for this LED is given as 20 degrees. Beam edges are defined as points in the radiation pattern where the lumi- nous intensity has fallen 50 % com- pared to its peak at the centre of the beam. The LED grid spacing is chosen to ensure that the overlapping light cones produce an even distribution of light over the complete area of exposed PCB. Figure 1 gives the exposure time as a Figure 1, Correlation of LED spacing, distance lo the glass platen and exposure time. E E a CO A Hi ■a c O) CL distance between LEDs in mm 05DO29-11 64 ■Idtar Ekdronks - 5/2006 func- tion of LED spacing and distance from the LEDs to the glass platen. There will foe some variance between PCB materials supplied by different manufacturers and to some extent the age of the material. Eurocard illumination Placing the LEDs closer together allows a shorter distance between the LEDs and the glass platen. This would increase the UV intensity and reduce the PCB exposure time but at the expense of more LEDs, as ever we run into the speed verses cost trade off. The LEDs in this design are arranged in a grid on a Eurocard sized PCB with a spacing of approximately 31 mm. Tne total number of UV LEDs required for this 100 nun x 160 mm card is 24 (Fig- ure 2). At a distance of about 80 mm between the LEDs and the glass platen the tight exposure lime for a PCB was found to be around six minutes. The optimal distance between the LEDs and glass platen to give an even light distribution can be determined empirically; put on a pair of UV protec- tion glasses and place a sheet of white paper over the glass platen, move it away from the LEDs until the individ- ual pools of light overlap to form a uni- form area of illumination on the sheet. Tne dist ance can be increased to cover a greater area but the PCB mask expo- sure time will need to be increased c orresp ondingly. Circuits don't get much simpler Tne electrical assembly work for this design involves little more than solder- ing the LEDs to suitable series resis- tors, The LEDs are wired as 12 pairs, each with a single 120 £1 series resis- tor connected to the 12 V inpui (Fig- ure 3). Each pair draws about 25 mA so the 12 V mains adapter must be capable of supplying a total of around 300 mA. The reverse breakdown volt- age of an LED is relatively low compared to a silicon diode so D1 pro- tects the entire circuit against input voltage polarity reversal. For s imp licity and speed ihe complete circuit can be built on a sheet of perfo- rated prototyping board The author rig us r e ? LED foyout on Ihe Eurocar t! sized PCS, euhocahu 1 60 mm x 1 00 mm 0 20 40 60 80 100 40 60 60 100 120 140 160 060029 - 12 5/2006 - deleter ekrtronlu 65 HANDS-ON PCB MANUFACTURING has also produced a Eurocard sized PCB for the circuit ^Figure 2 and Fig- ure 3 1 and also a half size board con- taining 12 LEDs, Both of the layouts can be downloaded from www.elektor- electronics.co.uk free of charge, the rile number is 060029-1. zip (see articles listed for this month May 2006). Construction Before any components are mounted on the board it is necessapy to apply some form of reflective layer to the board sur- face. This can be seif adhesive white plastic him or a few layers of white spray paint, a particularly good finish can be achieved with a layer of metal- lic silver followed by a layer of clear lac- quer. The light -scattering property of this finish helps to produce good, even fOumination across the board. The PCB carrying the LEDs can now be fitted (glue or screw) into the base of a suitably sized coniainer or enclo- sure, Leads carrying power to the cir- I- E" Tt Z 1 T T T~" 013 I DI5 \ DS \ d \2 Si Zi Z: Z: D1& 017 Zi Z: □ 13 D7 cm R3 Zi Z D22 02 T H7 I Rd H4 R9 Rt R2 m X* X? X mi ev tv BIG D25 +t2V W— © R3 m 07 D5 ■ ¥ f T 1N4D07 m2 033 D5 D5 □ 1-1 093 □ 24 0S&029 - 13 fcT JMM * ! IrKk^tincd ?%&h: t _ test ft e-r -Tt'cy iSc Ha + Star Pack Offer - Buy both analysers for Cl 30 and gel a free carry case and free probe accessories! Semiconductor Analyser - Atlas DCA55 * Automatically analyse most 2 and 3 leaded semi's: transistors. MOSFETs. JFETs, diodes, LEDs etc... « Automatically identify all leads. Connect any way! * Measures lots of parameters too. such as gain. PN characteristics, MOSFET gate thresholds, leakage current and much more. I -rf 1 EUROCARD Prirseiflmpfe Any laze ond ronloijr pjiiihl|] Optional • 5oWermaii • Foitlummund • Silkureen ■ 4-Layer Multilayer 9 6-Layer Multilayer VOV/hiOAD (fUft *m lAmrsonwAM! Freephone (J) 0800-3898560 Sid r f ;t ^ ffiXis orra A possible alternative to the MOSFET is t for example, the 20N60. Incidentally, the MOSFET is not mounted directly onto the PCB T but at a few mm above the PCB surface using a bolt and two nuts. This mounting method helps the device stay reasonably cool. Irthe time between pulses is too long, R5 may be replaced by a wire link. The ignition coil (Figure 3) should preferably be one from an electronic ignition system for 12-V cars. The type we happened to use had a primary resistance of about 0.7 Q and a self- inductance of 5 mH. To protect the coil against faults in the circuit we strongly recommend using an in-line fuse. After all, if the 555 fails or gees haywire from some reason or other, the ignition coil primary forms a virtual short-circuit on the battery and a very high current will start to flow, eventually causing the coil to be destroyed or t worse, causing a fire. To increase the reliability of the circuit, it is best to solder the IC directly onto the circuit board, yes that's without a socket. IC socket pins are subject to oxidation in the typical environment the circuit win be used in (outside, in a garden or meadow). For the same rea- sons of reliability, we’re using two par- alleled switch contacts instead of just one, reducing the risks of a bad contact disturbing your night rest. If it is desired to operate the switch with the circuit in an enclosure, you may find it useful to mount it at the solder side — just look at the height of Cb and the Fast -on (spade) connectors, :s:a4.s-: [components ' LIST 1 1 I Resistors R1 - 15k« R2,R3 = okQS R4 = 1M£1 R5 = 390kn ■ R6 = 4700 I R7 = 5600 1 ] Capacitors j Cl C2 = IQOjiF 63V radial C3 - lOnF C4 = 1 uF5 MKT, lead pitch 5mm or 7.5mm C5 - 220nF 630V MKT, lead pitch 22.5 or 27.5mm, size 1 1 x30 mm C6,C8 = lOOnF C7 = 47 uF 25V radial Semiconductors D1 - zener diode I0V0.5W D2,D3 = 1N4148 D4 = 1 N4007 D5 - LED, low-current D6 = ] N4002 T1 - IRFP460PBF (500 V/20 A T0247AC), e.g., Dtgi-Key IRFP460PBF- ND !C1 = TIC555CP (do nor use NE555!) Miscellaneous K1-K4 = Fa$t-on [spade] connector, vertical, 2-way PCB mount 51 = slide switch, PCB mount, 3 x changeover (2 poles, 3 positons), e g., Conrad Electronics 708097-62 In-line fuse 4A T (slow) with holder 1 24/ ignition coil (w. length of spark plug coble) 1 wire link (next to D2) PCB, ref. 050248-1 from The FCBShop 1 l I 1 I l \ I 1 i I i l 70 sfsklof dfiUonlis - 5/2006 DON'T LOSE YOUR TEMPER Before phoning us - if you are looking lor a hard- to- find pan. We have over 20.000 items in slock - including obsolete and up-to-date pans. WHY NOT VISIT OUR WEBSITE mvH.crickleiYOodeleetronk’s.coni 2N 2SA 2SB 2SC 2SD 2P 2SJ 2SK 3N 3SK -4.N 6K 17 -10 AD ADC AN AM AY BA BC BD BDT BDV BDW BDX BF BFR BFS BFT BFX BFY BLY BLX BS BR BRX BRY BS BSS BSV BSW BSX BT BTABTB BRW B U BUK BUT BUV BUW BUX BUY BUZ CA CD CX CXA DAC DG DM DS DTA D IC GL GM HA HCF HD HEF SCL ICM LRF J KA K1AL l.A LB LC LD LF LM M M5M MA MAB MAX MB MC MDAJ MIE MJF MM MN MPS MPSA MPSH MPSU MRF NJM NE OM OP PA PAL PIC PN RC S SAA SAB SAD SAJ SAS SDA SG SI SL SN SO STA STK SIR STRD STRM SIRS SV I T TA TAA TAG TBA TC TCA TDA TDB TEA TIC DP TIPI. TEA TL TLC TMP TMS TPU U UA UAA UC UDN UN UM UPA UPC UPD VN X XR Z ZN ZTX 4- many o liters We accept Mail, telephone & email orders. Callers 'welcome. Opening hours Mon-Sat ‘Jr30 - 6:1)0 £vmc*i VISA Connect Cricklewood Electronics Ltd 41L42 Cricklewood Broadway London NW2 JET Tel: 020 8452 0161 Fax: 020 8208 1441 sales crickleuoocielcctronics.coni £12*05 / US$ 21 *25 Order now Order Form m ine Readers Services section irt this issue Ssktqr Electronics Reg its Brentford 1000 Great West Road Brentford TWE 9HH Tel ^44 (0) 208 261 4509 lect t o n II e s CD-ROM Robotics A large collection of datasheets, software tools, lips, tricks and Internet links to assorted robot constructions and general technical information. All aspects of modern robotics are covered, from sensors to motors, mechanical parts to micro- controllers, not forgetting matching programming tools and libraries for signal processing. Robots built from LEGO 5 bricks also get a fair amount of attention. Lichfield Tel: (01543) 256684 ctiio Web: www.lichfieldeleotronies.co.uk The Corn Enchangj? Conduit Street Lichfield, Staffs. WS13 6JU " - ; l I elephant board £28*99 Make your own telephone jrui team how the* u or k. Chasing Arrow £9,99 A 2 1 LED kit to build an animated arrov. , 9-12V DC p Electronic Sandglass £14,99 A 22 I FF) digital sandglass With adjustable speed. Fire Sirpii £4.99 L sing transistors and passive par - ^ build a ilre siren with button. ig|i Electronic Dice £10,99 " LED kit to make an electronic ^ dice. Uses 4CI 1 7 and transistore 2 VVm Y*U* Meter £4.99 ■ iAAel A 2u LED audio meier. Nu banerie* required i- 2 Digit Digital Counter £9*99 How docs a metal detector work? Find out ,vidi this great kit. Electronic Shuck Machine £5.99 Tm> great kir turns low voltage DC in to hi ah , oluse AC. •rife % 4 Wav Traffic Light £6.99 Build this 12 LED traffic light, A kit ever, one should do cnee. Easy F.M Radio £14*99 A simple IC bused FM Radio Redever. ^-lOSMhz Electronic Code Switch £14,99 The circuit is u 10 key 4 digit code lock t a \ih relay for solenoid. Magnetic Alarm £16.99 Make a maim eric switch bur alar alarm using this simple kit. Telephone Interceptor £8*^9 \ small amplifier circuit which lets y ou hear phone conversations Clap on off switch £9*99 Make a sound 4Cil \ ated on off sv. iich with rehv and mic 15W Stereo Amp £24.99 Build y our own high quality stereo amplifier. U-30V3APSU £15.99 Build \ our own variable voltage 2 amp Power supply . Ra in in g Alarm £6.9 9 A simple circuit \\ Itlt remute rain sensor and alarm \\ alky Talky kit £34.99 1 Pair of 27Mhz Walfcy Talkies in kit form. Anyue 850 Rew ork Station £54.99 This great hot air rework Station i> idtral for hobbyists working with ever smaller chips. The 85 0 includes 3 nozzles and has a temperature range of I GO-5O0C and adjustable air flow . Ideal for 5GJC-QFP Aoyue 936 Soldering irnn £24*99 A high quality' temperature controlled 35W soldering Iron with long lasting ceramic heater element metal iron stand with solder holder feeder. Spare clement included free! Temp range; 3O0-48OC Aovue 909 iron* eim and PSU Also Available £99.99 Other available kits: Babani Books & More Video Amplifier £12,99 I to 4 channel \ ideo amp] i tier with adjustable gain 1-1 Jh. Telephone In-Lsc £2.99 A nice simple kit with two LED's No batteries req. V,U. Meter* LED £3.99 1 3 L e ! * A ‘AUkr 1. e ve I Indicate r O 4 * 6 LED Triangle Flasher* £4.99 Atomic Oiusitig Light 1 LED £4*99 3 LED ChiiiGg Li^bt i,4.4U I LED Flasher 10 LED Circle £4.99 AC Dasher 1CH 220V 700W £5*99 tMftV 1 A Variable PSU £7,99 Visitor Chime kit £“.90 {Cockrcr^ch ELnrishfr Circuit L3L99 10 LED Running light straiEhl£8*99 Two way uhasfng light £S49 UV Xenon Tube Fisher £8,99 Touch Sn itch (On Ofij HS.99 Rotation phasing light £10,99 Wireless V.IL Meter 15 £ 1 2-99 Robot voice changer £12.99 S\V Stereo Amplifier kit £13.99 S > ereo S imu I si or £ H*99 25ri 1R Renuitc control reksyfiS.99 Dancing Light 3CH 2400W £19.99 POl Inirared ieitsor switch £27.99 Elcycrv^ Pro :'_r lFl- Cm^cu £■■ 95 4 5 SnTFr - T C75TEIEJ3 3 B::c k Pro • czz* l 4.«1 j T^srf F.T-lipTT ---|-l f il.w lion tki aid Mike V«n Oku pCHi £4.9y Getting thr Mgsi From Vtmr Mdirirsirr : - An lutrittiRtiixi to Am3icur Radio *4.99 Ptr* cr ScpplyProjiCts £4.99 Tt± Ait of Soliknflg iJ.*^ A Begimisi Guide tn TTL OieituJ lc% £4 95 A ikgnusTs G iLiiir la CMOS Digits! le> PraalcU Eicetnsik Muiiz Pt, £ 4,95 Ekctremc Preset* fw Mdia EcthLuizsta £4.95 Nuts 4c Vails ITS Ekcnunks MBautne £4.99 Post and Packinq 124 new kits. 21 new enclosures and a new online shop since last month. Order Value £4.99-£ 12.99 £13,CI0-£22.99 £23,IJ0-£49.99 £5U.U!J-£ 1 50*011 l'&\' Cost £l*5U £2.50 £ 6.00 £ 12.00 UK Only, phone for PtkP to Ireland. Pay by cheque* card or postal order! Visit website for weight based P&P Or s Lit uur shop in Lichfield 5/20 DA - slfittor ^kdniFils 71 DESIGN TIPS Reforming old electrolytic capacitors Luc Lem mens Electrolytic capacitors that have □pent g long iima in storage ore being sdd as new old stock' (NOS) by the surplus trade, or come from old equipment, are not or no longer of a suitable quality that allows them to be used just like that. After manufacturing there is a very thin layer of oxide an the positive electrode that acts as a dielectric between the plates. In normal use when there is a volt- age across the capacitor this layer is maintained by the leak- age current in this component. Bui if the capacitor is not used far a long time, ihis thin layer slowly disappears, so that the capacitor starts to look more like a short circuit If □ voltage is then suddenly applied, the cur- rent can rise so high that the capacitor overheats and the dielectric evaporates. This can result in She explosion oF the capacitor At low values of capacitance it is nol worth the trouble to take the risk, because these compo- nents are not that expensive. Unless you want to restore for example, an old radio and want to keep it as original as passible. Also axial capacitors □re becoming increasingly rare and are almost noi available new. Large power supply reser- voir capaciiors have always been expensive and certainly in this category it is definitely worth the effort to Iry to brealhe new life into them. And oF course, it is this category that generates the most spectacular explosions' when something goes wrong... This can be avoided by waking op the capacitor slowly (that is: reform the oxide layer slowly). Use o large value resistor (1 MQ far example) and con- nect if in series with the capaci- tor to □ tab power suoply. Start with a power supply voltage of about a quarter of the rated capacitor voltage and measure the voltage across ihe capacitor. It can take some time, even o number of hours before this volt- age is equal to the power sup- ply voltage (he., the capacitor is charged). It takes some patience to allow the oxide layer So be reformed. After that you can increase the voltage in a Few steps to the rated value (each time wail until boih voltages are equal again before proceed* ing). There is a reasonably good chance that this procedure will he successful of you Follow this method with care and patience! ^> 1344 ) Current surge limiter for toroidal transformers K. Viemickel Lots of circuit variations exist an this theme. We would like to add one more, however, that's not easily beaten far simplicity and reliability. It seems that toroidal mains trans- formers can only be switched on by q hefty initial current. The cur- renl surge is especially high when Initially the residual magnetism stored in the closed core has to be built up because qF the instan- taneous phase angle. The current surge occurs w hen the sinusoidal current in the primary" winding and the remaining magnetism in the iron care cause the latter to go into saturation. An example may help here. The residual mag- netism has a positive value. When power is applied ta the pri- mary, a positive half cycle that happens to arrive raises the posi- tive magnetism value to a value sufficient to cause massive satura- tion of ihe iron core. In this condi- tion, the only current limiter is the resistance of the primary winding copper wire end lhat For sure is a very low value in the case of heavy toroidal transformers. Only alter a few Full cycles of the mains voltage will the magnetisation get synchronised with the alternating current, keeping the iron core free From saturation up to the nominal load limit. During the critical period, some kind of current lim- iting device should be used to prevent a big 'thump at power- on. Here, o thermistor is used for that purpose. In parallel with the NTC we find a normallyopen relay contact. The contact will bypass the NTC after a short time,, supplying the 72 dclitor dtflronks - 5/2GQ6 transformer with ihe Full mains voltage and of course allowing ihe NIC to cool down For the next power-on sequence. The relay will pull in as soon as the transformer is ready to accept the full mains voltage. The NIC is protected by a resettable thermal switch and a )0-A slow-blow fuse. The circuit has proved to be utterly reliable in practice. Besides a low component count, it is also marked by low current consump- tion. Of course, it will cause a short power-on detay. The value of resistor R2 and zener diode D2 may have to be adapted to suit the coil voltage oF RE 1 . Warning. This circuit is connected directly the mains voltage* Alt relevant precautions apply in respect of electrical safety- PCB pin insertion tool Luc Lemmens (llektor labs) The humble PCB pin is used not only to connect wires to PCB tracks, but also for test and meas- urements points an circuit boards. Despite their mechanical simplicity, PCB pins are surprisingly difficult to mount and solder. Frequently encountered problems [admit it!( ore burnt fingers while soldering the pin, and pins dropping from the board when ihe board is turned, or, worse, when they're being soldered. Try to keep it in place with your Finger — too hot to touch — Icok far pliers — pm dislocated — and so on. It s a good idea to drill the holes for the PCB pins a fraction smaller than the pin diameter — that way, the pin remains in place when you're ready to solder it. However that also requires o bit more force to push the pin into position ana a tool is then useful to prevent injuring your fingers. Pliers may be less suit- able, especially if considerable farce is required on the pin. To the best of our knowledge, no commercial tool exists for the purpose. No problem, let's make a PCB pin insertion tool our- selves. A discorded round file or screw- driver is great. Cut or grind ihe shaft as straight os you can and drill a hole in the end so the ridge on the PCB pin is secure against the surface of the tool. The PCB pin is inserted into the tool and held In place with a noil or Fingertip. The tool han- dle provides a secure grip and allows considerable Insertion force to be applied. If an old file is used, it is recommended to cover the remaining section of ihe steel surface with heat shrink tubing. This will prevent injury to your hand. Accurate timebase Thomas Potofschnig This circuit demonstrates how eas- ily a timebase can be designed using a minimum number of com- ponents. This circuit consists of no more than an 1C and on oscilla- tor to 'which a few connections and decoupling ports are added. Use is made of a single !C from the 4000 series, the rype 4521 oscillator / counter with 24 steps. Here we only use the counter sec- tion of the 1C. The 1C Is supplied with a dock signal by on oscillator module. The clock signal is divided down by the 452 1 to obtain certain val- ues. Discrete frequencies obtained in this way ore avail- able cn the counter output pins of the 452 1 . For example, pin 1 0 (GIB) supplies the clock fre- quency (applied to pin 6) by a factor of 2 1 5 or 262, 1 44. Like- wise, pin I (G24) divides the input signal by 2^4 or 1 6,777,2 ! 6. By using a clock frequency of 2.097152 MHz the following timebase frequencies ore obtained ol the output of the 4521: Pin 10 (Q18): 8 Hz; Pin 11 (Q19): 4 Hz; Pin 12 (Q20): 2 Hz; Pin 13 (Q21): 1 Hz; Pin 14 (Q22): 0,5 Hz; Pin 15 (Q23): 0.25 Hz; Pin 1 (G24): 0.125 Hz. In case other frequencies are required, a different crystal oscil- lator module should be selected. For flexibility, an IC socket is rec- ommended so modules con be exchanged quickly. Alternatively, modules may be connected rc the 4521 by means of a selector switch. To keep the circuit as versatile as possible, the outputs of the 452 1 counter may be made available for connection to ihe outside world by way of a p inheader, ror the sake of convenience, the pin- header also supplies s-5 V and GND. 5/2006 - filet lor s-rtredu 73 Quasar Electronics Limited PO Box 6S35. Bishops Siortford CM23 4WP, United Kingdom Tel: 0870 24G 1B26 Fax: 0870 460 1045 E-mail: saIes*§iquasaretectronics.com We b : www.Q u as a rE lect ron les .com Postage & Packing Options (Up to 2 Kg gross .-.e UK Standard 3-7 Day Delivery - Vi UK Mainland N'Eit Day Delivery - £-3 .So Europe (EU) - £6 S5, Rest of World - £9 S5 (up to O.SKg) tOrder online for reduced price UK Postage! We accept all major credit debit cards. Make chequesfPQ's payable to Quasar Electronic 5, Prices include 17,5% VAT. Call now for our FREE CATALOGUE with details of over 300 kits, projects, modules and publications. Discounts for bulk quantities. Dffiicu QUASAR electronics Get Phjgg&d ini Motor Drivers/Controllers Hera are just a few of cur controller and driver modules for AC, DC, umpolar/bipolar stepper motors and servo motors See website for full details. NEW! Bidirectional DC Motor Controller Controls the speed of y most common DC motors (rated up to 32VdCf5A) in both the forward and reverse direction The range of control is from fully OFF to fully ON in both directions. Tne direction and speed are con- trolled using a single potentiometer. Screw terminal block for connections. Kit Order Cede: 3166KT - £15, $5 Assembled Order Code; AS3166 - £25.95 DC Motor Speed Controller (5A/100V) Control the speed of almost any common DC motor rated up to 1 GOV. 5 A. Pulse width modulation output for maximum motor torque at atl speeds. Supply: 5-15Vdc. Box supplied. Dimensions (mm): BGWxl OOLxBQH. Kit Order Code: 3067 KT - £12.95 Assembled Order Code: AS3057 - £20,95 NEW! PC i 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 lo six 3179 driver boards can be connected to a single parallel port. Supply 9Vdc PCB: oQxSQmm Kit Order Code 31 79KT- £11,95 Assembled Order Code; AS3179 - £19.95 NEW! Bi-Potar Stepper Motor Driver Drive any bi-pofar stepper motor using externally sup- plied 5V levels for stepping and direction control These usually come from software running on a computer. Supply 3-3GVdc PCB: 75x65mm. Kit Order Code 3158KT - £14.95 Assembled Order Code; AS31 58 - £29.95 Most items are available in kit form (KT suffix) or assembled and ready for use (AS prefix) CREDIT CARD SALES 71 v 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 PSU345 £9,95 Rolling Code 4-Channel UHF Remote Slate-of-the-Art. High security 4 channels. Momentary or latching relay output Range up to 40m, Up to 1 5 Tx's can be learnt by one Rx (krt in- cludes one Tx but more avail- able separately). 4 indicator LED s Rx: PCB 77x85mm, l2Vdc/6mA (standby). Two and Tan channel versions also available* Kit Order Code: 31 S0KT - £39.95 Assembled Order Code: AS31 80 - £47.95 Computer Temperature Data Logger ^channel temperature log- ger for serial port, = C or Z F. Continuously logs Up to 4 separate sensors located 2G0m+ from board. Wide ^ range of free software appli- cations for storing using data, PCB just 3Bx3Smm. Powered by PC, Includes one QS1820 sensor and four header cables Kit Order Code: 31 45KT- £17.95 Assembled Order Code: AS3145 - £23.95 Additional DS 1 620 Sensors - £3.95 each NEW! DTMF Telephone Relay Switcher Ceil your phone number using a DTMF phone from anywhere in the world and remotely turn orVoff 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 8T ap- proved. 130x110x30mm Power 12Vdc. Kit Order Code: 31 40KT - £44.95 Assembled Order Code: AS3140 - £64,95 Serial Isolated I/O Module Computer controlled o- channel relay board. 5A mains rated relay outputs. A isolated digital inpuls 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 130x1 00x3 Omm P owe r S u pp ly : 1 2 Vdc /500mA . Krt Order Code: 31 08KT - £54.95 Assembled Order Code: AS310B - £64.95 Infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control unit. Toggle or momentary. 15m+ range. 112x122mm. Supply: 12Vdc/0.5A Kit Order Code: 3142KT - £42.95 Assembled Order Code: AS3142 -£52,95 PIC & ATMEL Programmers We have a wide range of low cos! PIC and ATMEL Programmers Complete range and documentation available from our web srte. Progra m m er A cc es s o ties : 40-pin Wide ZIF socket (ZIF40W) £16.00 IBVdc Power supply (PSU010) £19.95 Leads: Parade! (LDC136) £4.95 / Serial (LDC441) £4.95 / USB (LDC644) £2,95 NEW! USB 'All-Flash' PIC Programmer USB PIC programmer for bEE 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 Assembled Order Code A5312B - £39.95 “PfCALL” PIC Programmer PtCALL will program virtu- ally alt 8 to 40 pin serial- mode * AND parallehmode (PIC18C5X family)' pro- grammed PIC micro control- lers. Free fully functional software. Blank chip auto detect for super fast bulk programming Parallel port connection. Supply: 16-18Vdc. Assembled Order Code: AS31 17 - £24.95 ATMEL 89xxxx Programmer Uses serial port and any standard terminal com ms program 4 LED's display the status. ZIF sockets not included. Supply 16-18Vdc Kit Order Code: 3123KT - £24.95 NEW! USB & Serial Port PIC Programmer USB. Serial connection. Header cable for 1CSP. Free Windows software Wide range of sup- iporfed PICs - see website for r ' f _T2. J complete listing. ZIF Socket USB Plug A-B lead not incl. Supply: 1 6-1 SVdc. Kit Order Code: 3149EKT - £37.95 Assembled Order Code AS3149E - £52.95 Secure Online Ordering Facilities Full Product Listing. Descriptions & Pholos IKil Documentation A Software Downloads RETRONICS INFOTAINMENT l-fo-3 Phase converter (1994/19 5) Jan Butting Our resident designer Karel Wa I raven has been known far almost three decades to have a serious infatuation with electric motors and it was no .vender he was assigned, back in 1 994, to a project received from one B. Yahya for a 1 -tc>'3 phase con- verter. Unlike his colleagues [and myself) safe in the world of millkamps and everything sub 20 volts or so, Karel likes kVAs, big ox. motors and electrical engineering' in general (although he will also happily whip up a piece of 8051 assembly code for you). From the very beginning, the phase converter project raised high hopes as bock in 1994 such units were rarer than hens teeth and only found in the profes- sional domains, i,e, well out of the reach of the D1Y enthusiast. So whats the point in converting your 230-V 1 -phase mains volt- age to three phases? The answer is: none, unless you have a really fine 3-phase motor lying about you d like to apply speed control on. Three-phase motors are relatively powerful per watt of energy absorbed and therefore the items of choice in lots af professional equipment. The principle underlying the abil- ity to control a 3-phase motor for speed is il'ustrafed by the block schematic. It is based on the fact that the speed of a 3 -phase motor dependson the frequency of the applied voltage rather than the voltage level In our design, a hefty control circuit through some power MOSFETs applies almost sinusoidal volt- ages across the motor windings connected in star arrangement. The sinusoidal voltage was cre- ated using pulse-width modula- tion. Without delving into the opera- tion of the design, two things must have struck our readers as quite novel at the time: firstly the use of an 80C535 microcon- troller (not easily associated with 750-watt ox, motors) and sec- ondly, the sudden appearance af a GAL of the 20-legged variety. The GAL, in the end, caused the most concern as it was a rela- tively new component in 1994. Of course, we supplied it ready- pregrammed, but lots of readers started asking For the jedec file to —JUJJJiJJJ bum their awn 1 6VB. t remember some readers accusing us of black-box engineering on account of the GAL being a key compo- nent they could not easily pro- duce at home. Some even claimed it did nothing except fill- ing Elektads pockets 1 , but when shown the equivalent in logic gates the critics soon shut up. The converter was so complex, and there was so much to say about it the article had to be split in two parts. The unit graced the magazine cover in December ] 994 and its construction was described in January 1995. A good deal of attention was given to electrical safety aspects of the project. When 1 pulled the unit from cabi- net #1 2 in our lobaroiory it struck me that a motor or two would be nice to photograph with the con- verter. Karel opened o drawer and handed me three mint look- ing motors which, he said had been in use by the Dutch Stare Mines fDSM) in the late 1 960s [J thought they couldn't have been older than c few years). I was in for another surprise: the motors were the ones originally pictured on the December 1994 maga- zine cover. Having been told about this months' subject for Retronics my colleague Guy Roedersdarf in the French editorial department sud- denly remembered having received a letter from on irate reader from a Morth-African country. Not mincing his French, the correspondent condemned Efektor & staff for All Eternity on account of having printed the name of an author he was at log- gerheads with regarding some religious Interpretation, The wretched author, it turned out, was Harun Yahyo — ■ not even a distant relative of the designer of the Elektor project. Twelve years on ) can safely say that the con- verter was a very papular project and w r e are no longer waiting for whatever curse of to Fall upon us. Or maybe it was that virus in lost week's email? RsTTomca is c rricnir,/ cdumn coverir g v.nEuge electronics including legendary Elsfctor designs. Contributions, suggestions ond requests are we 4 corned- please send on email Id editor 2e*eLfor-e!ectTon]cs*co,uk subject: Retronics EE. 5, 2006 - eleklcr dHlftflitf 75 . "ti board Opto-isciatof board Atme! AVR Mt^VO^rafTimer LEE : e : FTCrr 7 ro .Muttipro^rarrurSf ■seg rr E-'t :: sp-tu Internal board Atmel ARM Pic-grarmnsr F C -7! Take one of our upstream programmer boards + add a number of downstream peripheral boards + combine with our range of software utilities and = develop a wide range of highly functional electronic systems E-blocks are small circuit boards each of which contains a block of electronics that you would typically find in an electronic system. The E-blocks range consists of around 150 separate items which can be combined to make an enormous variety of electronic systems offering a wide range of learning opportunities. Learn more about E-blocks? P\: lot, r,E- boarn Pc board Bit ;=*L-i ijj • hearts PUZZLE INFOTAINMEra Entering the competition Pleo^e send ihe numbers in ihe grey boxes by email, fox or pGslia Muzzle will) an electronic foucDi Here is our Hexadoku puzzle for the month of May. Switch off the PC and sharpen your pencil for another brain teaser that'll turn out to be a real challenge to solve. Send us your solution and win one of the fantastic prizes! The instructions for the puzzle zle and these determine ihe are straightforward. In the start situation, diagram composed of 16x16 Elektor Electronics Hexadoku Regus Brentford 1000 Great West Rood Brentford TWB tHH United Kingdom. Fox (+44) [0)208 2614447 Email: edrtor@elektor-declronics.ca.uk Subject: hexadoku 05-2006. The dosing dale is 24 May 2006. Competition not open io employees of Segment b.v v its business partners and/or associated publishing houses. boxes, enter numbers in such a way that all hexadecimal numbers 0 ihrough F (that s O- 9 and A-F) occur once in every row, once in every col- umn, and In every one of the 4x4 boxes (marked by ihe thicker black lines). A number of clues are given in the puz- Your solution may win a prize and requires only the num- bers in ihe grey boxes lo be sent to us (see below). The puzzle is also available os a free download from our website (Magazine — > 2006 — > May). .imxz-i) Prize winners The solution of the February 2006 Hexadoku is: 3B479. The E-blocks Starter Kit Professional goes to: Steve Barber {Storfold, UK). An ilektor SHOP Voucher worth £35*00 goes to: Jari Koskinen (Koulovo, FIN) R. Wilton (Helston, UK) and Jim Gray (Jefferson. USA]. 0 3 5 A 8 E 2 4 D C D 4 0 B 5 1 6 2 F 9 8 7_ _8_ _6_ _0_ D 2 B E 0 A 9 T 7 6 1 C F 0 5 E 4 F C 2 1 A 6 D 6 2 0 D 7 A B 5 4 6 1 8 0 C 9 : F C 7 6 A E 8 3 2 D 8 B 4 9 7 E F 0 6 _3j _9_ 4_ ~ _F_ 2_ 7 1 E D T 6 "o" ~ 9 4 C i 2 0 8 3 B D A E F 1 A_ 1 _F_ _3_ 7 _6_ _B_ _5_ E Solve Hexadoku and win! Correct solutions qualify for an E-blocks Starter Kit Professional worth £248*55 and ihree Ilektor Electronics Shop Vouchers worth £35 each. We believe these prizes should encourage all our readers to participate! 5/2006 - tkkloi ekitroiila 77 ELEKTOR SHOWCASE To book your showcase space contact Huson International Media Tel. 0044 (0) 1932 564999 ATC SEMITIC LTD mvwatcse m ilec ca u k Thermal and current-sensitive components for temperature control anti circuit protection; * NIC Thermistors • Current Diodes * Thermostats * Re-settable Fuses * Thermal Fuses » Temperature Sensors Call today for free samples and pricing Tel: 0870 901 0777 Fax: 0870 901 0888 . - i — i BETA LAYOUT www.pcbrpoo1.cam Bala layout Ltd Award- winning site in troth English and German oilers prototype PCBs at a Traction of the cost of the usual manufacturer’s prices. POM GATE III A V k. J TTTT7 DESIGN GATEWAY ww ,idas ip - g atev/a j i co m Palmlogic II .... US$ 399.00 * Compact Logic Analyzer tLltfkmn x U/73,3mm x T3mm) * High sampling rate i4G0 MHz. 8t h. 200 MHz/1 6ch, 100 MHz/32cti)g| * USB 2.0 high speed mode * SMB memory storage * Bus Analyze r function * Multiple waveform windows * Waveform save/restare GATEUJAV DESIGN GATEWAY www. design- gs tew ay. co m True PCI Starter Kit USS135.0Q • PCI Development Kit • Based on 200,000 gates FPGA • Extension connectors for 72 pin 10 pa • Configuration support for JTAG and slave serial • Free PCI Core for Target Mode DESIGN GATEWAY GATeuJAV 0SLgn-oareway.com Si W r rrJ w . . Ethernet 10 _ US$1 15.00 * S bits embedded network microcontroller * 6 channels available for 10 bits ADC * Ethernet 1 0 BASE T 10 Mb i- io * UAPtT port RS232'RS485 t Max Speed all 15200bps * 35 bits general purpose 1/0 * 500 bytes user area flash memory DESIGN GATEWAY iffli till EAT £11) A ¥ £ * ji t ■ j t t r w J r * -r w oe sian -ga \ eway. co m VariCEock ... DSS1 63.00 • Adjustable cluck signal synthesizer • 3 rotary switches for frequency setting • Standard DIP pin arrangement ■ Support both 3V 5V by on-board regulator VC25QM14P frequency range : 25-4M MHz freq uency siting : 1 MHz step VC1Q0M14P frequency range ; 25-100 MHz frequency setting : TOO kHz step for 25- 50 MHz ; 2C0 kHz step for more than 50 l\H 1 AV1T RESEARCH ww .v a v i tress arc h , co, u k USB has never been so simple... with our USB to Microcontroller Interlace cable. Appears just like a serial port to both PC and Microcontroller, for really easy USB connection to your projects, or replacement ot existing RS232 interfaces. See our webpage for more details. Only £29.99 inc vat. COMPUCUT http : f wvm. compticuiiBrs.com Computer Numerical Control from yaur home PC. Great for tricky jobs, and accurate repetitive work. We supply: - Software - Interface - Manual - Support Price £250 plus postage. COMPULOGIC LTD www. comp ulopic.co.uk Internet Remote Control Starter Kit £139.99 Create a simple web based remote control interface for many applications * Miniature Web Server Module * Analogue 'Digital Module * PSU * Manuals, software, example HTML code CONFORD ELECTRONICS http ■ ww.v, confordel e c ,co . uk Lightweight portable battery 'mains audio units offering the highest technical performance. Microphone. Phantom Power and Headphone Amplifiers, Balanced 'unbalanced signal tines with extensive HR protection. DANBURY ELECTRONICS http: vA'Av.Dajibury ElectroniC5X0.uk Transformer manufacturers since 1983, Visit our new site! Also link directly to Mike Holme's Vahre/- Tube DIY amplifier site, featuring our standard Audio Transformers {Mains, Output, Chokes, PR SE ete). EAGLEPICS http:'-’ w/, 11 , vveagleplcsxo.uk Embedded Internet Solutions • Stand alone TCP IP module • Platform independent ■ Simple AT-like command set • GPRS or modem connection • E-Mail, FTP. HTTP, UDP • Development board available • Free development utilities • Free UDP-only stack EASYSYNC http; www . easy sy 00X0.0 k EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and R54S5 converters at competitive prices. ELNEC vwAv- eln ec.com ^ I * device programmer manufacturer * selling through contracted distributors all over the world • universal and dedicated device programmers • excellent support and after sale support • free SW updates * reliable HW * once a months new SW release • three years warranty for most programmers FUTURE TECHNOLOGY DEVICES http:-- wwwrtd i c h i pxom FTD1 designs and sells USB-UART and USB-RFO interface i.c.s. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB FUTURLEC vAVW.njturteacom Save up to 60% on • Electronic Components * Microcontrollers, PIC, Alma I ■ Development Boards. Programmers Huge range of products available on-line for immediate delivery, at very competitive prices. HERDS TECHNOLOGY LTD www lft9W®ephrtD[ogy.co.uk Introducing Modular Concept for microcontroller. Suitable for Developers, Pre-production. Educational and Hobby applications. * WinPlC2QG6 USB full speed programmer. * CPU micro controller modules. * Peripheral modules for all microcontrollers. IPEVA LIMITED nE p ; t wvav. toe va. com IPEVA self low cost USB FPGA development boards , IPEVA provide Design Consultancy for Embedded Systems. OpenCoresrtP. FPGA, ASIC. HDL translation and migration. Tel. 0670 080 2340. 78 ?!=jetw dtcfrc-ffiB - 5/2006 products and services directory JLB ELECTRONICS v.'V. w j lDefsctron3C3.com Suppliers of electrical / electronic parts and consumables. Including: * Cable ties bases * Tools hard warn * Bootlace ferrules * Connectors * Solvent sprays cleaners * PVC Tape * Heat Sink compound KMK TECHNOLOGIES Ltd. http: WWW; kmk .com. Hk Low Cost OIY Robotic Kits and Computer Controller Boards. LONDON ELECTRONICS COLLEGE httpL^r:.vv:,[“C,org.uk Vocational training and education for national qualifications in Electronics Engineering and Information Technology (BTEC First National, Higher National NVQs, GCSEs and Advanced Qualifications*. Also Technical Management and Languages. MGP ELECTRONICS hnp^'-ww.mcipelecimnrcsxo.iik Leaders in Device Programming Solutions. * Online shop * Low Cost Adapters for all Programmers * Single Site and Gang Programmers * Support for virtually any Programmable Devieo NEW WAVE CONCEPTS .vvmneW-wave-iMCSptexdm Software for hobbyists: * Livewire circuit simulation software, only £34.99 • PCB Wizard circuit design software, only £34.99 Available from all Maplin Electronics stores and vvww.map1mco.uk. OLD COLONY SOUND LAB WWW. aumoX p ress .com Premier source for DIY audio for 35 years! Mew catalog features: * Books * CDs * Test & Measurement ■ Kits Full range of producis and magazines for the DIY audio enthusiast! PCB WORLD ' www, p c b wo ri d .c rgmk World-class site: Your magazine project or prototype PCB from the artwork of your choice for less. Call Lee on 07946 346159 for details. Prompi service. ULTRALEDS :U1 1 http v . w vnv. ultraSeds.co.uk tel: 0071 7110413 Large range of low cost Ultra bright leds and Led related lighting producis. Major credit cards taken online with same day depatch. - - SHOWCASE YOUR COMPANY Elekror Kectroilks has a feiiure to help customer* promo i e their business, Showcase - u pemmuent feature of the magazine where you \%ill be able to showcase yotir products and rervici^ * For just £220 + VAT t £20 per issue for eleven issue* i Etekior will publish your compauv nare website adress and a JO-word description n * For £330 -t- VAT tor the y ear i £30 per issue for eleven issues) we will publish the above plus ren a 3cm deep full colour image - e.a. ajm>diici shoL a screen shot from your site, a company logo - your choice Places are limited and sp^ce% will go un 4 stncilv first come, first served basis. So please fax back your order today! I v. Lsij to promote' m_\ company, please book m\ space: • Text insertion only for £220 + VAT * Text and photo for £330 +■ VAT il. JOB TITLE: ADDRESS: ORGANISATION: ■ *-S * b--b a b mm m. m * m.m A- r -m-w m a ■ ■ * ■ *t-b v ■*§■#§■*■■■ ■■■■■ ■ riiiara ai • ■ j i TT B T TT -I ■ T ir B BBIB * -*■«* .TEL: ***,.,„ PLEASE COMPLETE COUPON BELOW .AND FAX BACK TO 00-44-(0)1932 564998 COMPANY NAME WEB ADDRESS . *?-'■ ... 30-WORD DESCRIPTION B a. P I- T ■ B- B B B «! - -- T 9 . B 1 B - - i- - b--b ■ b -B I B “ B- -fi B ■ b b b _ > a .. # b ■ ■■ 4 *■ B m v m a m m M M EIB 1 J i.. . . “ ■* B -I PTB 1 BJ B B B> B, ■ tl M - B - - B T B -B B B B B 1 - “ • p i I i .1 n i I J a a i , , . , , ■ - T B T B 'B B B ill B ■ B I - 4 -B-BB--B«B*fc-J_ TB , -■4 #-*-T B- B rm m a m m m m,m a. ■ * - ■•■“■•■BB'BB > - t b t a BflBBaajaia»f| ■ ■* * a - P"B a a T a I I l 1 1 I t i I J l r i t i i i i i i i i t r i c b *fTITBTB 1 ia^a 1 I 1 J. QUASAR ELECTRONICS www.Quasa r Electronics com Over 300 electronic kite, projects and ready built unite for hobby. education and industrial aDDlicatfons Including PIC/ATMEL programming solutions. Online orderinn facilities Tel: -44 (0) 670 2461826 Fax: -r44 (0) 870 460 1045 EmaiLsales@Qtjasaraectrenics.com QUASAR eiectfonics ROBOT ELECTRONICS h ttp : //www, mb ot-e;e c Irani icsxc.uk Advanced Sensors snd Electronics far Robotics * Ultrasonic Range Finders • Compass modules • Infra-Red Thermal sensors * Motor Controllers ■ Vision Systems * Wireless Telemetry Links • Embedded Controllers SK PANG ELECTRONICS http://YAW/.skpanu.co. uk • ELM QBD13 1C • VAG-C0M Interface ■ 0BD1I connector and cable * Modtrumx Micro X board ■ Embedded Ethernet Control^ * PIC Microcontroller, CAN Bus driver Major credit cards taken online. SYTR0NIC TECHNOLOGY LTD wyvvj. mSmletemetfy.com Supplier or wireless modules and accessories for remote monitoring M2M applications. * GSM/GPRS TCP ;IP moduEes > Embedded GSM GPRS modern * Development Kite * GPS modules * GSM GPS antennas * Adapter cables Online ordering facilities. Tel ( 0 l 394 i 210911 USB INSTRUMENTS Ei ii p: ■ / www. usb-in s lr umentexotn USB instruments specialises in PC based instrumentation products and software such as Oscilloscopes, Data Loggers. Logic Analaysers which interface to your PC via USB VIRTINS TECHNOLOGY IP /Lin i- iia f Vi vtnmcom PC and Packet PC based virtual instrument for electronics enthusiasts, students, professionals and scientists, including sound card real time oscilloscope, spectrum analyzer, and signal generator Free to download and try. ELECTRONIC ENTHUSIASTS ~n- . - — _ BT-L. ■ fc,J, _ , „ _ ^ r ' — “<• • ---- _ - •• L ' Lt. U A -rr A IO ; iiM.'IW ELEKTOR I THE ELECTRONICS & COMPUTER MAGAZINE _ Co-TliTK: Ii=. 7 r.';pjjn lemur LsJ U7 * 1 * ^ I'HJ tr.S JHf ttj-rfwic fill 13 1 :-IAI 7 T-t l tm~ IZ.li 1 1 mwm JE. J — i:,Ur 7 r-;a CZL 5. ■ 2 C ij j 6 - tk Mor eleiffanlEs 79 1 0 mobile oscilloscopes compared for performance Select your own annual subscription and receive a free 1 W Luxeon LED Torchlight Available options: P - — 1 1-T» ' I ■ ' * Efektpr Electronics annua! subscription '{standard) You receive j issues; including the:, July/Augusi double it • Eiekior Electronics annual subscription -PLUS You receive 1 1 issues, including the July/ August double ji pius a copy of the Eiektor Electronics Volume 200.6 CD-R {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 ■ Offer available to Subscribers who have not held a subscription tD Elektor Electronics during the last 12 months. Otter subject to availability. Order now using the Order Form in the Readers Services section in this issue. CD-ROM ft t I 1 1 Elektor Electronics (Publishing) Reg us Brentford 1000 Great West Road Telephone +44 (0) 208 261 4509 ;Brentford TW8 9HH Fax +44 (0) 208 261 4447 United Kingdom Email: sales® elektor- electronics. More information on www.elektor-electronics.co.uk Elektor 2005 This CD-ROM contains ail editorial articles, with the exception of New Products items, published in Elektor Electronics magazine Volume 2005. Using the supplied Acro- bai Reader program, articles are presented in the same Jay- out as originally found in the magazine. The Disk- Mirror utility on this CD-ROM allows your ear fie r Elektor year volume CD-ROMs n 997-2004 1 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 arti- cle from the archive on hard disk, or from indivi- dual year volume CD-ROMs you have available, £16,25 (USS 23.75) Home Automation This CD-ROM provides an overview of what manufactu- rers offer today in the field of Home Netv, orking, both wired and wireless. The CD-ROM contains specifications, standards and protocols of commercially available bus and svstems. For develo- pers, there are datasheets of specific compo- nents and various items with application data. End-users and hobbyists will find ready-made applications that can be used Immediately. £12,95 assar. b'cd pfcg-SO modi*; = For sU>5£3it^arE 171 80 323 50 Per non-s u-t^scTDers 20630 38S;50 NO, 351 FEBRUARY 2006 Brushless Motor Controller 05Q 157-41 ST7MCl r pragrerntrad 350 7 15 A 16-bit Tom Thumb 050 1 73-9 1 RSC Starts Kl 6-30 15^0 NO. 350 JANUARY 20D6 95-watt Laptop PSU Adaptor (£00(29-1 PCB 4eO 9.05 Automatic Attic Window Controller D3Q 139-11 Dai PiC source A ha * tocte 5-20 9.75 050 123-41 F ; C 1 6F84 A-2D !. P. p: ogffirimed 1310 24.65 j 334 E t -72 LC D \ 2< 86 rf are cters 7-25 13.65 030451-73 FLED Ltaiie 2x16 characters 25-50 48.0= SMD Reflow Soldering Oven 05Q51 §-11 Ek=*_ so Lirce arrf nst code 5-20 9.75 Q5Q319-41 ATB9C52/24JI. p^ag'srr.med 7.6Q !4_25 030451 -72 LCD Modu e 2x ! 8 cterac fe r s 7-25 13.65 030451*73 PLED Modufe 2x16 characters 5550 48 05 Timer Switch for Washing Machine 050G5B-1 PCS a SO 15.70 050056- *1 D a ' F.C sc-y :e & ns x cede 520 9.75 0500 58*4 1 P5G16F04. pregram T^d 1310 24.65 (FPGA Module & FPGA Prototyping Board) Elektor Electronics (Publishing) Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Te!.: +44 (0) 208 261 4509 Fax: +44 (0) 208 261 4447 Email; sales ©elektor-'electronics.co.uk inline at lectronics.co.uk Dus id practical; constraints, final illustrations and specif 3 -cations to date information HiKs & Modules l i (March 2006) Reatiwassembled Versatile FPGA Module: - Altera Cyclone FPGA (12,060 LE’s!) - 4 Mbit configuration RAM - 8 Mbit user RAM (20nS!) - 1 Mbit user FLASH memory - 00 user I/O lines - 1 dedicated fast clock input - 4 dedicated PLL outputs - integrated power supply unit - 50MHz oscillator Including programming interface, programming cables, con- nectors and ready-assembled FPGA Prototyping Board. Special Offer for subscribers: £ 275.00 Non-subscribers: £ 324.00 The Versatile FPGA Module (no. 040477-91; and the FPGA Prototyping Board (no. 050370-91 ) are also available indivi- dually. See ’.v.vw^elektor-electroniGS.co.uk for more details. A 16-bit Tom Thumb (February 2006) R3C Starter Kit com- prising CD-ROM and RSC 13 microcom tr oiler board with SIL pin headers supplied separately. 050179-51 £ 8.30 / S 15.60 [ NO. 349 DECEMBER 2005 From A to D via USB 05-0222- 1 PCS 7-35 14.95 050222-41 iOYV24-P, pragammed 940 1775 Telephone Supervisor 05003-41 RCl 6 F€ 2 ^ 2 a^pf(^Sfnmed 5-2D 15,55 050039-81 CD- BOW, PiC he* &. source codes, ICM Fra Server £90 12.95 [NO. 348 NOVEMBER 2005 Remote Control by Mobile Phone 046415-1 PCB £20 11.55 C40415-! \ L ^iC scut :s & hat fi 5'20 9.75 WOM5-41 PC16FB 4A-2liR p":^rrrt+ d 1030 1350 Synchronous Servos 026u31-U sc^A-are sm 9.75 02003 Ml AmS^tS-IOFapriJ^Bmmeff 7 £5 14 55 I NO. 347 OCTOBER 2005 27C512 Emulator 023444 .11 Dii> , pfc , =-:i i err a a re 5-20 9.75 030444-31 EFW7064SLC84-15. pra^ammed 27-5Q 5135 03044441 AT90Sa5lS^PC,pfcyamn>ed 15-10 23.35 Colossus Jr. C402o7-1 1 D <> PC z0 u p ce c ccH? 5-2$ 3.75 0 4026 7 -41 P tC 1 2R? 75-1 F p r ;--^ m a ^ " L 410 535 Flash Lock for PCs 050107-41 FiCl6F528A-l»SO, programmed 5C0 945 050107-31 CD-ROM lgtect i : ttv. =je 6 90 12.35 [NO. 346 SEPTEMBER 2005 ESR/C Meter 040259-1 FC 6 1240 23,35 WQ2S9-1 1 Disk. PiC source S hex codes 5- 26 3,75 G40S5&41 PfC t &F877-2QIF! pTC-grainmed ■ 5-50 23.25 640259-42 P C - 6F34A-2C' ? p rcg ' - — -i 10-30 19.45 040253-71 K4 Of p^Jls wttfroul t^Ucsure 63-99 119-95 040253-72 -23 6-93 12.95 Hitting the High Note 04001&41 ATmega8-16PC r progfsrmted 15-50 29.25 Application Board for R8C/13 (March 2006) Extends R8C.T3 micro module with 2 x serial I/O. USB. LCD. LEDs, analogue I/P, PSU and. reset and MODE control. Ready built PCB 050179-92 £ 48.27 / S 90.94 LCD with backlight 030451-72 £7.25/5 13.65 Q4ftj1 5-1 1 D = - f t, = d so “ -vs re 520 9.75 Precision Barometer/Altimeter 640313- 11 G ? - p “C >: i stf:a f 520 9 75 040313-41 P;C16F£76 prsTamred 1655 51.15 040313-1 PCE 755 14 25 Racetrack Timer 64Q5S5-4T AT 5 -C 2 ?j E 1 -24 F sas 12-95 640335-SI C OF 0 M , : r c ? : itv- em> 575 9.75 NO. 345 JULY/AUGUST 2005 1 MHz Frequency Counter 03 004 5-1 1 C.£s L" L-ri « of [v.=/5 5-20 975 0^:045^1 ATS0S23 1 MOPI. prc.i--a.r-ed 550 10,35 Code Lock with One Button £40481-11 Oi£<. ST.rcs i r ^,' E5 520 9,75 040481-41 PICI 6 FS -1 6-S5 12,95 Digital VU Meter 0561 1 B-1 1 C 1 ■ Ar T y sc ftw a re 5-20 9.75 05 j 1 1 &-4 1 AH ny 1 5 _ 5 ~ c r eir.-.Ed 340 6.45 DIL/SOIC/TSSOP Adapter Boards 040259-1 PCS T-r 2 l,vE- Do (C 6-75 12 70 640259-2 FOB. ra KHrey SOX iC 6-75 12.70 040^94 PCS, for 2 u-v.Ey 7550? ! C 6-75 12.70 MP3 Adaptor for TV 054035-1 PCB EErt- £95 7=6 €54035-1 1 D 3 * ft Kt 5.20 9.75 0=4035-31 EPW7I364SLC44-10 prcc-rariws 27-55 51.95 QBD-2 Analyser 05009&1 PCS tare 3-25 1665 0500^41 TS9C5 1 C COZUA p': crsm mea 25-20 49.40 050092-71 K : a r : caz 52-50 £6.95 050092-72 059 :3 OBD edaclt' cat a 27 55 51.95 Products for older projects (if available) may be found on our website vAvw.elektor-electronicsxo.uk home construction = fun and added value Poly-LED display 030451-73 £ 25.50/5 48.05 SNEAK PREVIEW Scopemeters Compared Everyone serious about electronics os o profession but also os a pastime v.ifl need to use an osciHoscops from lime lo time. Hie conventional oscilloscope is usually powered from ihe mains and designed to stay on ifie lest bench for most of its useful lifetime. By contrast, o new generation of instruments called scopemeters is designed for portability and use 'in the field'. In the next issue we will provide a market overview of available instruments. Electronic Passports If your passport runs oul in the next few months the chances are you could he issued with one of the new electronic passports that are being introduced throughout the EU this year. ePossporls hove on embedded RFID tog containing your personal information which Immigration offi- cials can read remotely; hopefully nobody else will be eavesdropping on this electronic conversation... Also... Lambda Probes; PCB Short Circuit Locator; FM Stereo Test Transmitter; FPGA Course (3); E-blotks for X10 Networks; Hexodoku Puzzle. Network Cable Tester Computer networks are not just found in offices hut olso in private homes, albeit at a smaller scale in mosl coses. Everything's just fine as long os Ihe network does whot i1 J s supposed to do, hut when problems start to occur, a good tester is in order lo pinpoint the table or connection that needs to be replaced In aur design for such a tester, o PIC 1 6FS74 checks Ihe four wire pairs for proper connectivity, showing the result on four LEDs. A separate switch allows (Glgahit) crossover cobles to be tested as well. Theme Plan for 2006 January ...... .Reading / Reverse Engining February . . , , , .Motors / fropulston March .DevelopmaU / Mkroaxi trailers April .Power Supplies / Safety May .Soldering / Etching June .Test & Measurement July /August . . . .Summer Circuits September RFID / Medical Electronics October E-Stmubtian Noverijbef .... .Chipc&nJs / Security December .... .Ebdrotneebarikd ‘ Endastiras RESERVE YOUR COPY NOW! The June 3DD6 hm ste* cb sale ca Thursday 11 May 2006 (UK disfri: Jlion cnlyf. UK subscribers will receive the magazine a few days before this dels. Article nibs and mcgoilne cenlenis subjscl to change. NEWSAGENTS ORDER FORM SHOP SAVE / HOME DELIVERY Please save deliver one copy ofiii&krQj - Eleczionics magazine forme each month Please cut out or photocopy this form, com- plete details and hand to your news agent. Elektor Electronics is published on the child Friday of each month, except in July Distribution S.O.R. by Seymour (NS), « » d i s i c ■ Address; Post code: Telephone: Date: Signature: ■ B S ■ 9 S B- B ■ B ■ B B a lektor lectronics ding th w www.elektor-electronics.co.uk www.etektor-electronics.co.uk m jvw.elektor- electronic Electronics on All magazine articles back to volume 2000 are available online in pdf format. The article summary ond parts list (if applicable] can be instantly viewed to help you positively identify an article. Article related items are also shown, including software downloads, cir- cuit boards, programmed ICs and corrections and updates if applicable. Complete magazine issues moy also be downloaded. lektor [uclrotilt: A rht£tefc»rQHn*£CI ESR/C Meter .mm sj In the Elektor Electronics Shop you'll find all other products sold by the pub- lishers, like CD-ROMs, kits and beaks. A powerful search function allows you to search for items ond references across the entire website. Also oo the Elektor Electronics website: » Electronics news and Elektor announcements • Readers Forum, o PCB, software and e-magazine downloads • Surveys ond polls • FAQ, Author Guidel ines and Contact MEWAR «— » ■ ■ » |Mlf ^ i ui» qiMra m 4 hN!rm ■ HOtl rj u k j = ---- .■'ll «~l» *r* p ■ ■ ■■ i ig gp H u#- ■>"*>■■ np »i * in prp isrp- -i™ ZdlEF p Isann iri Z** 'mmm tv ■ -+ r , £j.l I IClilP P L IkM _* s * mj* 84 elektw eletfru'IO' 5/2006 Please supply the following. For RGBs. front panel foils, EPRG'Ms, RALs, GALs, microcontrollers arid diskettes. siaia ifae par- number and description: for books, state the full title: for photocopies of articles, state full frame of article and month and year of publication. please use block capitals. Description Price each Qty. Total Order Code Micro controller Basics e is .to E-blocks Starter Kit basic z 96,oo E- blocks Starter Kit professional z lee.oo Pnces 4 nt* item ;ubp 3 iq things. 3 us v . - ibt : c-rb: Ft :es l •• sn*:«-vn fcf* : rre.-zi-y. *.r::z= n p== /:qus issues E L j.L Sub-total P&P Total paid ■h'arre METHOD OF PAYMENT 3 ■ ■: va rse lb‘dt= : z-~g ee ap p ro p : ■ =*\ e □ Sank transfer | | Cheque I U K - 1 &si tie 1 1 c u Lc jfafrs Q ? I Lv » □ Giro transfer expiry date: ,, Verification codte _ - SWITCH ONLY Stan date: „ fssuanumban ? tease send this order form ?•: ’ s s £ rsvMS tores': 4 rr n r ElaktOf Electronics (Publishing) Reg us Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Address - Post cede Te! — t4 I- £CS 25 45= - Fax: |-^44) (OJ 208 2B1 4447 Interne : m ■iw/.elektar^sieE trenics.ca.uk 4e skt^r-e!5Ci'C^;"S co.uk Teh Email - L ' Signature 'USAsrij C 3 r+ 35 i residents rna:> t ■“ t? _ :r r j: ::: :□ -r 5 ;• :a ‘ : i : ■ : L ■ e onf-: ■ r : o\ L On C»:l ■ . 5 :- ,-j Lab PQ So* a Te Pitt rixi fcutfti m G 3 * 58 ' 03 m tel (£ 03 ) 524 T 37 L 924-6526 fee i 6Q3) 924*5457 Email cuELE*r. isudivXpTTi^ <£> O O i Yes ; 1 am taking out an annual subscription to elektor electronics and receive a free 1 W Luxeon LED Torchlight. 1 would like: I I Standard Subscription (11 issues) I | Subscription-Plus (11 issues plus the Elektor Volume 2006 CD-ROM) METHOD OF PAYMENT 1 53 e r svErsc hero re ticking as appropriate) [ | Bank transfer | | Cheque (UK-resident customers 0.fJLY> | | Giro transfer Offer a, dr at' a to Subscribers ~r> ns not held a subscript on to Elektor Bee ironies during the last 12 months. Offer sublet!, 'tensd^i See reverse -~r 3 tes ano go nait is ns. '■isme Address - Post ceJe \ Teh Email Safe — - 200a Signature * cross out what ,s net anpt cate ELD 5 Expiry date: . ... ... Verif cation CQd9: - sv. itch l:;_: Start dais: ... feius turmi^r PieH -30 send c-'LG-- Id Elektor Electronics i Publishing Bogus Brentford 1000 Great West Road Brentford TWB 9HH United Kingdom Tel -44 .0 206 264 450 * Fs, i-44 |0i 2L5 251 ^ •r-tssrei. v. r* w. e ! e -.'to e ec 1 ■ c ~ j i : : a .a ■ ; stnscr ip t( an s 4 ^ ; e k ?o r-s ‘eclrcn^a co.u k ORDERING INSTRUCTIONS. P&P CHARGES Except in flip USA and Canada, all orders, except for subscriptions (far which see below), must be sent BY POST or FAX to our Brentford address using the Order ? :=*“ overleaf On-line ordering: htip:/- wvAy.stBktar-elactronlssxo.uk Readers in the USA and Canada my | but a:e not obliged to) sene orders, except for subscriptions | for ; vch see below) to the JSA address given on the order form Please apply to Old Colony Sound for applicable Pc* 3 charges, Please alter, 4-8 weeks for deliver . Orders placed on our Brentford office must include PiP charges (Priority or Standard • as fallows: UK: £4,00 Europe: £5.00 (Standard) or £7,00 (Priority) Outside Eumpe: £8.00 (Standard) or £42.00 (Priority) HOWTO PAY A orders must be accompanied by the full pa. mm including cjsiage and packing charges as stated above or advised b; Customer Services staff. Bank tra ns fen n to a c c o a n t no. 4 0 1 0 9 52 0 held b. E : e fcto r Electronics Publishing;! Segment b. v. v. r i: h AB f; -A h I R 0 B an k Lon d or . I BA! J : G E 3 5 E 3040 20 r : 3 : 2L Currency: sterling (UKP), Please your full name and address gets com muni Dated To us. Cheque sent by pest- made payable to Elekte r Electronics (Publishing] Segment b.v.. We can only accept sterling cheques end bank drafts ham UK-resident customers or subscribers. Y/e regret that no cheques can be accepted ?rom custom's or subscribers in any other country Giro transfer into account no. £4- 152-3 301. field b, Bektor Electronics (Publishing) Segment b.v, Ptease do not send gin- vransfsr.teeposit forms direct!.. ;o us. cut instead use the national Giro postage p m envelops and send It to your National Gird Centre. Credit card VISA, Access MasterCard JCBCard and Switch cards can be processed by mail, email. ,veb. fax and telephone.. Online ordering thm-ughour web sites SSL-orot ecf eo fa r y a u r sec u r fty. COMPONENTS Components for projects appearing in Eiektoi Bee-ironies are usually available from certain advertisers in tnis magazine. if difficulties in the supply OF components are envisaged, a source will normally be .advised in the article. Note, however, tftetlfte sources) given Is (are) not exclusive. TERMS OF BUSINESS Delivery Although even/ effort will be made to dispatch your order within 2-3 weeks from receipt of pur instructions, we can not guarantee this rime scaie for all orders Returns Faulty geoJs Dr goods sen- ir. errar may m relumed for replacement or refund, out not oetere obtaining our consent. - goods returned should to i acked securely in a padciec hag or box. enclosing a covering letter slating me dispatch note number. ,f the goods are burned because of a mfstaka :-n our pan ,ve .‘.ill remind the return postage Damaged goods Claims for damaged poods mar be received at cur Sreiriorri office within 10-days (UK); 14-days (Europe) or 21-days (all other countries . Cancelled orders Ajr cancelled orders will be subject to a 10% handling charge with a minimum charge of £54 KL Patents Fateni protection may exist in respect of circuits, devices, cjTrpDnevs, am: so on, ces.vteE in our books and magazines, Eiektor Else ironies (Publishing) does not accept responsibility or liability for fa ling to identify such patent or other protection. Copyright All drav, 7ge p v:::graphs t artidis. printed circuit boards, programmed Integrated circuits, Si suites 2 nd soft //a re carriers pubbshed n our books and magazines (other than In th rd-part; sg veffisemente) are copyright and may not be reproduced or van sm tied in any farm or by any means. iiictedirg photocopying and recording. In v.nele or ir can without Ike prior permission of Etektor Electronics ''Publishing) in writing Such written permission must also be obtained before any can of these publications is stored in a retrieval system of any nature. Notvrithstanding the above, printed- circuit hoarris may be produced for private and persons! use without prior permission. Limitation of liability Bettor Bgctromcs [Fun ish no) sha not be liable ir contract iort. or olhs-v 1m for airy loss or damage suffer:: b , riis purchaser whatsoever or howsoever a- sina out of or in corne-xior* with, the syopk m goods or ser.tees b; E : ektvr Electronics (Pofciishhg/ Q'tes- than to supply goods as described or, at the option of Bettor Electronics (Publishing), to refund the purchaser am; mono 1 ; paid in respect of the goods. Law Any qua site r? re. etna to - supply of goods eod services hj Bettor Electronics Publishing i shall be determined n a; respects b; tee 'aws of Eng tend. January 2iM)6 a r a-KS'fc Ir -a ri ■ -r ■> ■* « ■ ■ ■ r -m -w w r t r r r r i r t a r « v ? - ? - a r Ai rrrt a r a a- ™ ■ +• -i ^ ■ SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION United Kingdom Standard £41,90 Plus £48.60 Surface Mail Rsst of Ihe World £54.50 £81.40 USA Ik Canada USS 95.50 USS106.5G Airmail Pe=l of trie v/crid £66.90 £75.80 USA I± Canada USS 120.00 US$131.00 HOWTO PAY Sank transfer into account no. 40209520 held by Elektor Electronics Publishing i Ssoment b . with ABN-A7RQ Bank London. IEAL: GB35 ABN A 4050 304 o’ 2095 20. BiC: ABWAG82L. Currency: stBriing (UKP ), Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Elektur Electronics (Publishing) -Segment b v '.Ye can only a:-:ep? sterling cheques and bank drafts from UK- res dent customers or subscribers. We -agrs! tha! no cheques can bs accepted from customers or subscribers in any other country. Giro transfer into account no. 34-152-3BG:., k-!d by Eie'ktor Electronics (Publishing) / Segment h.v. Please do not send giro transfer/ deposit farms :rif“Cip to us. but instead use ihe Lteiionai Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA A: -ess, YtesterCara. JCBCard md Switch cards can be processed by mail, email, v/eh, fax and tele phone, Onlme ordering through our / ;e bs 4a is S S L-p ro tecte d I o r , oursecu rite. SUBSCRIPTION CONDITIONS The standard subscription order period is twelve months. If a perma- nenS c n ange ■' f address during th s s u b scr. n l ■ o n p e : i c d rn ean s tri a: cop 5 s have to ha despair- eu by more expens ve series, nc e.ttra charge win be made. Converse;,', no refund will be made, ncr expiry date e - lendad, if a change of address allows the use of a cheaper service. Student applications, which qualify ter a 20% (twenty pW ::4,t reduc- lion ir current re-es. must be suppcied by evidence of stuoeniship s-gntd by the read of ihe college, school or um.ersste teculte A standard Student Subscr pt or costs J:3 50. a Student Subscriptten- Flus oasts £4040 (UK crnly). Please note that new subscript on s take about four weeks from receipt of order to become effective. Canceled subscriptions will be subieci to a charge of 25 £ tvramy- ff've per cent! of the te| subscription ortee or £7,50 wmchevar is the Higher, p us the cost of an issues already d spHched Subsclptions cannot be cancelled after Hisy nave run ter sk* months or mere. January 20 Q 6 3= ISBN D-9Q5705-BB-8 Visual Basic 496 pages E27.507USS 51. 50 for Electronics Engineering Applications This book is targeted towards those people that want to control existing or home made hardware from their computer After familia- rizing yourself with Visual Basic* its development environment and the toolset it oners are discussed in detail. Each topic is accompanied by clear, ready to run code, and where necessary, schematics are provided that will get your projects up to speed in no time. This book discusses tools like Debug to find hardware addresses, set- ting up remote communication using TCP. IP and UDP sockets, writing your own internet servers and even connecting your own block of hardware over USB or Ethernet and controlling it from Visual Basic. All examples are ready to compile using Visual Basic 5.0, 6.0, NET or 2005. Extensive coverage is given on the differences between what could be called Visual Basic Classic and Visual basic .NET 2005. 5.0. 0.0. VBA, .HIT. 2085 ' r* -»> ►4# *1 *■»■* ■ il for Electronics Eng leering Applications Vince nl Hindis 0lek|gr Order now using liie Order Form in the Readers Services section in this issue* Elektor Electronics (Publish inert Brentford TW8 9HB United Kingdom Tel. -f44 (0} 208 261 4509 See also www.e I ektor-electron icsxo.uk Index of Advertisers ATC Senritec Ud. Showcase wvM.alcs&rutee.co.uk * .78 Aaid - - mfwtt . She? wc ase - - . iwrai ar/d. a *>7te3s. cb^ , ,73 AvU RsseircM. Showcase . . wiv w: avi&ssssitti-ca. tik . . 73 Beta Layout, Showcase .wftw.p0*pi3QKpam 67, 78 Bitscops D&sips . . . . . . . ,7 Ste:ei_de:d do Systemfe , v \\W-bf%$$kj3nis? g r co jy< . .29 Com du oil Showcase \Y t v>x cnmpucL}tiefs _ com 7fl Gem pl := tg r'c. She w c as »v v, w €OiPfl(tkifftc.ca. uk . 78 CanfDEe £[£citgti:c 5. Showcase .... -a 'aw. ccnfQra&ec. co.uk , . 7fi Cr -:kft.VtFSD iraw.Gribkfe com - . . . . 71 □anbury Showcase . .iviyi vJ)&?I)iiry BeZlrQiucs.cn. uk . , * “6 Oci'Qn G slavey Showcase i vwvn d com 7S tag'Eii cs, Showcase , wtaagiepic-s caw,-. , , , , 75 Easysyrc, Shcwcass mviteasysyrnDCaji* .23, 73 Orrec. Showcase ffMr.eitf£C£am 73 Eiiracf/cdits . . .LKW/Jftfpc&Atfp-C&n 6 Future TethmsSagy De* :es Shaw case nw w ftdi&tp-CQn: ...... .78 Futons Showcase A'Mvfuhirtec.CGm , 78 Hems Terfmotagy, Showcase ... ,> mvw ca.uk * .78 tpeva Limited. Showcase ivnwpevaxom . * , .. + .78 Jaycar Efetfromts .... . 2 JLB ti ■edttdf.es, Shvwcas-E win s'// , SsYetifto ft ds . COfn ... . .79 Kl.tK r&fcnotogiss Ltd, Showcase mvwAmfccflm.lWf . 73 Lshcsmer . . . . . ... uk ......... S3 LrctrlTekl Bsctraoics * cpjik 71 London t-^zv on es Co! age Showcase wjiw.tec.orgMk. 79 Microchip . . . . , M m Av;.nneiU£tvp. com MAP Electrodes, Showcase . . vv vr+v. m QDEiEEifDrdzs. cy . d k *v = W .Ya . T Gone cpts. 5 r J 35 z A ♦ V W /?f jWs . £*£0 .'!£ cl-!& .CD T- ' wb u f v £JcCUor7: £ vv.i rs w £ tron : es, ca if k , . Karater One Systems ... . wvmV f numbeame com ftinye kstworte ,. ,, v,\nv *ssmss!AL-sn c£vn PCS World, Shower wv^vpiSi mjffd ofp tik Fes-: ElEcfrcrric D&s gn wVi'wipESAetec.catr. 1 . Pico - * jriV#.p;tQtscti com .... Oitasar EIsc!mnfC5, Showcase iH™gyasare/ec#nJ3^^Gftrn RD ReEearcn .... . u v w spi ce-safiwaK? . com Rahr. ElecCmrcs, Showcase iv.'h v/ f 35 c; L « ..... .. ...r......*. ,*■**,■ ■■ i,a SK P>Dg dsetniiues, Sbovcase \vw ^;sApafigxt> uk . Sylfon'D Tzr r\m logy S n 0 w . va w. rt&ntel&ii eby. cam UltiHltds. Showcase _ - . .av.wmOisIv&.cq uk USB fostruments. Showcase . . -WMVMSb mstfiirnzntSsCQfn Virif'nsTectinrOrOgy. Showcase wavs. * vttfe co/tt 4 79 79 * . . . . 0 67 .6 .79 67 ... .46 .74 79 45 . , , 79 . 73 79 ..... .79 79 79 79 79 Advertising space lor the issue ol 13 June 2006 may he reserved not later than 16 May 2006 with Huson International Media - Cambridge House - Gogmore lane - Cherlsey, Suney KT16 SAP — England - TeTephone 01932 564 999- Fax 01932 56499B - e-maih .>-• •. ; 3 : to whom ail carte span da nee copy instructions ano smvob- sn jyfn be address ed. 5 200 1 ■ ^EklGrEkdroniu 87 LET I OIM 1515 SCHEMATIC A powerful capture package tailored for todays engineer and designed to allow rapid entry of complex schematics for simulation and PCB Layout. PRO 5 PICE MIXED MODE SIMD A customised implementation of the industry standard Berkeley SPICE 3F5 engine with extensive optimisations and enhancements for true mixed mode simulation and circuit animation. ViM VIRTUAL SYSTEM The worlds first and best schematic based microcontroller co-simulation software. Proteus VSM allows you to simulate the interaction between software running on a microcontroller and any analog or digital electronics connected to it. This streamlines the project lifecycle and obviates the need for expensive hardware analysis tools. ARES PCB DESIGN A modern and professional layout package which seamlessly integrates with the ISIS capture software. Features such as autoptacement and autorouting, interactive DRC and an intuitive interface all serve to maximise productivity and reduce time to market CONTACT US NOW to discuss requirements or request a FREE evaluation copy. LA BC ENTER ELECTRONICS LTD. A technology pioneer In the EDA industry since 1988. Technical support direct from the program authors. Flexible packages and pricing tailored to customer requirements M ■ ■ i m J ¥1 [7 ■ l [i] ci o l Vt 1 s B ;