mm. eleMar-eieetromcs.cQ.uk mt^j irm ** : i f i BT J IP f 1 ■t ~ * : IMP 2 t hU r) ! J fi'?’> jjPii — i — j . ^Tt^j J j j ikf'.- DrDAQ Output to; frOAd Temperature External sensors: Humidity Temperature 02 In Air Reed Switch • Low cosWunder £80 (+VAT) • Built in sensors.for light, temperature and sound (level and waveforms) • Use DrDAQ to capture fast signals • Outputs for control experiments \ • Supplied with both PicoScope (oscilloscope) and PicoLog (data logging) software \ For more information on DrDAQ, please visit: \ www.picotech.com/drdaq119 Scope and spectrum analyser functions A fraction of the cost. of benchtop scope Save multiple setups, for ease of use Save, print and e-mail your traces ^ FREE technical support for life ^ FREE software and upgrades t Automated measurements l VTrfual fnstrumeirl For more information on our scopes, please visit: f www.picotech.com/scope265 Tel: 01480 396395 Fax: 01480 396296 E-mail: sales@picotech.com tL. ' jl Jm Get Your FREE UK Pound Priced Catalogue - all 400+ pages! Just fill out the catalogue request form at vrww.jaycarelectronicsxo.ulc/ catalogue Check our website! • All of our 6,000+ products with search facilities. * 128-bit secure on-line ordering - safe 61 secure. ■ Over 3,500 product datasheets & application notes. - And we're from Australia, so you can trust us! ■ Postage and Packing includes airmail to the UK Hofeinfo^EaE ww#, fay sarefe tiro n E eijco.iA Emm Performance Electronics for Cars Book BS-5QSG £6.35 + post S, packing Australia's leading electronics magazine, Silicon Chip, has developed a range of projects for performance cars. There are 16 projects in total, ranging from devices for remapping fuel curves, to nitrous controllers, and more! The book includes all instructions, components lists, colour pictures, and circuit layouts. There are also chapters on engine management, advanced systems, DIY modifications, and more. Over ISO pages! Alt of the projects described are available in kit form, exclusively from Jaycar. Check out our website for all the details. 3 Stage FM iransmitter Kit KJ-875Q £5.80 -i- post and packing The circuit board may measure just 2 fU x ll/lfitW}"*, but it can transmit signals over half a mile in the open. It has flexible power requirements, with 6 to 12VDC input voltage (so a 9V battery would be suitable). It Is quick to build, and fun to use. Kit supplied with circuit board, electronic components, and dear English instructions. t Remote Control Extender Kit Mkll £6,70 - post and packing KC-5209 If you have a source device such as a DVD player running to a TV In another room, or perhaps a Hi-Fi system with speakers in the other end of your house, you probably get tired of walking ta the other room just to change tracks or fast forward etc. This project effectively transfers the IR signal from your remote control and retransmits it in the other room! Kit includes case, circuit board, all electronic : j/pJj components, and dear English instructions. * II Mi.il. .iXil Theremin Synthesiser Kit KC-5295 £17.50 post & packing Hie Theremin is a weird musical Instrument that was invented early East century but is stili used today. The Beach Boys' classic hit “Good Vibrations" featured a Theremin. By moving your hand between the ariterma and metal plate, you create weird sound effects like in those scary movies! Kit includes a '^^machlned, silk-screened, and pre-drilled case, ^^circuit board, all electronic components, ^^and dear English instructions. 50MHz Frequency Meter Kit ^ ■ ■ with LCD Display /^S KC-5369 £20.30 + post & packing Vy ;~;1 rr rr IF you want a great value frequency meter, then this prefect is For you. It features autoranging operation for ease of use, * \ switching between Its \ i _ ’ three ranges. High *r\ resolution of O.tHz up to ® 150Hz, 1Hz between 150Hz and 16MHz, and iQHz above 16MHz. It can be powered by a 9V battery or wall adaptor (not included) and the case measures fust 5 1/8 ,r x 2 5/B r ' x V . Kit includes laser cut & silk screened case, circuit board, electronic components, &. dear English instructions. We Stock 9VDC wall adaptor required fMaplm #MGB0B £5.99). Log on to www.jaycarelectronics.co.uk/catalogue for your FREE catalogue! 0800 032 7241 (Monday - Friday 09.00 to 17.30 GMT + 10 hours only) For those that want to write: 100 Silverwater Rd Silverwater NSW 2128 Sydney Australia R1MOTI £OKT*OL man wuh Test & Measurement Equipment Power Products and Accessories Audio & Video Equipment 61 Accessories Computer & Telecoms Security & Surveillance Equipment i >h| CF1 jjsfraEi i l‘1 v^jrrT ti r=:~ TrJjT ij - fjyvJItypKrrTj «3l | ■ B! | r t / • j T™ 1 *rlB INTELLIGENT ELECTRONICS START WITH MICROCHIP The Simple Way to Learn About Microchip Analogue Products and PIC® Microcontrollers — V - — * .*> — - Date : 19th April 2005 20th April 2005 21st April 2005 3rd May 2005 4th May 2005 [ 5th May 2005 Location : Bracknell Birmingham Manchester Reading - dsPIC® Birmingham - dsPIC Manchester - dsPIC - ■'* -r- - ■ f - _ _ — Learn from the experts! Microchip is again offering engineers the chance to attend its exciting seminars in a location near you. Two seminars will be offered each day. The morning session is designed for those new to Microchip, the afternoon session is suited for those who are familiar with Microchip or who have attended the morning session. The morning embedded control design session will present a typical application: temperature sensing. It demonstrates how simply designers that are new to Microchip's products can add intelligence, an LCD display and simple connectivity using a PIC microcontroller and analogue devices from Microchip. Various easy-to-use development tools and starter kits Will be used to demonstrate the concepts. The afternoon begins where the morning seminar left off. It provides more advanced training, showing how to incorporate the latest connectivity solutions such as USB, ZigBee 7 " and Ethernet to your embedded control! designs by using high-end PIC microcontrollers. ( ©3SQ 5 j Morning beginners’ session: £20.00 (includes PlCkit'" 1 Flash Starter Kit) Afternoon advanced connectivity session: £50,00 (includes a P1CDE!.I~ : HPC demonstration board.) Prices quoted exclude VAT Become an Expert the Easy Way Don’t miss the chance to develop your knowledge and skills. Register now at www.microchip.com/seminars Microchip Microcontrollers • Digital Signal Controllers • Analog • Serial EEPROMs ftotS- AH pocee, dates and contents g ta lg ri are subject to change- The Wcrccftp name and i-go, FfC, PJCrm^o, tisPfC srnd MPLAB are rsgistefKf trad-ornsjfe of fctarscrtp Tectvniogy Inc. an the USA and other countries and PtCtot and Ft COE l ,' a r e ot ikmdqi TecSiorfogy Inc. *i the USA and other countries. ZkjSee s a trcdemsri? of the ZigBee Alliance A3 o3" er trademarks are ■prop^riy of th&jr respective companfies. 20Ca JZcrccfTp TtKtn.ho-togy Ice. All rights raser; z-d_ ’. r Eh 1-z.Erz. 1ZC5 All change to online Next month issue will have two articles, one a backgrounder, the other a construction project, both covering a highly topical as well as controversial item: the (alleged) health hazards of electromagnetic radiation levels pro duced by cordless phones, mobiles and telecom operators' base stations. We present a novel RF fieldstrength meter designed in our labs in good Elektor tradition, which means: tried & tested, educational, copiously illustrat- ed and backed by a number or ready-made items like PCBs and kirs. The other article is a backgrounder on radi- ation level standards, reports, debates, relevant authorities and so on, and for this we need you help! By the time this May 2005 issue reaches our UK subscribers, a web poll should be available on our website. Participation is free, anonymous and easy by answering a few yes/no questions. The results of the poll we hope to include in the background article. Also on the subject of our website (wwv/.el ektor-electromcs.co.uk) I and a number or my colleagues discovered that about 6 out of 1 0 emails sent to us by way of the Query Form service on the Contact page can be answered either by referring to an FAQ listed on the on the Service page or by inviting the correspondent to post his/her question in our Forum, In the latter cose, although aur technical ream is often unable to provide immedi- ate, exact answers to the [often vague and poorly formulated) questions, other readers — there are quite a few of them around — may recognise the problem and offer their expertise, Nat forgetting Elektor's own editors, lab workers and freelance authors of course — Peter Moreton and Tony Dixon for example scaur the Forum for entries on their respective 'heavyweight' projects, the PIC 1 SF board and the ARM Development System. As the Forum may be searched far specific words, with your help it may be turned into an online 'Elektor knowledge base with fast and easy access, I look forward to seeing your postings. Meanwhile, interesting letters and emails have started to arrive in reply to a number of topics first published in Mailbox, our monthly crop of readers correspondence published an pages 8 and 9. While collecting and edit- ing several letters I could not help noticing that two of the most popular topics for debate, mobile telephone masts and Nicad batteries, have a common denominator: electronics and the environment and that's next month's main subject. Jan Boiling - Editor Volume 3 ! # Number 343, May 2005 155* 0268/45 1 9 EJektor Electronics aims at inspiring people to master electronics at any personal level by presenting construction projects and spotting developments in electronics and infor- mation technology. E r ■ . ’ - ' ' ' 33 : t nxjucec et i : _ :■ ^ ■ - _ _ ■ E c.ar '? =-: iror. — -\.z i~ ~z RO. Box 190, WfefeTNS 7WY, England. TeL: (+44) <0)1580 200657, fax: (t-44) (G) ! 580 2CX36 1 6. EroaH: safes i The magazitfse e avskbfe from newsager^ bookshops and efettroracs refai o*a- 3 ' SiiiS CT 301 '' Odder OecmxKsb pubfefoed 1 1 tariigsaygarvj^arfcidhfe kaaefew- feiy R Aari-. Under ifce name Senior and Bfeteua; the magazine s also published in French, German and Dutch. Together with francNsed esSfeots the magarine k on cstqJz - '■z~ n Tore in.sr. 50 courir e: Imematjflnal Editor ' 'l: Editor: ar. e v: . ;■ ; International editorial staff: -i Be^ee-- T~ Ee — - Pol- _-e— tr : - - ■ r • • .e: G..- Design staff: -4 e .‘.i -EEd e -- T&- Gesieris Fe_. Goossers. Ld: Lstot/s - - . ■ : e i : G . - - • t Editorial secretariat: H±za e H-nz-e- t - 3 .... -- - Graphic design DTP: To- G_ rers E s'; Dz i Managing Director Publisher: Tv. S-G Gradation Control: ? -Vr' E3 Gei- - ::: . Subscriptions r" :3". :e L:g Jr 3 - G bfas Reed fern*. feshfey Rood. TkiditjrstTNS THE, "telephone: (-H44} (0)1 580 200657, fkc(444)(P)15802006l6 -E-te . . ■ : “ • - if - rc ■ Rats 3 - :: _ t : are gv-en 3- 1 be E-EI-e e:-:-' Z ; _ - - Fz- r ". Head Office 5egnerib.v EG. Bex 75 \U6 90-ABBeefc The Kaherfar^is "leiqhone: -5 : I, rax. — r ’: . hi Distribution: $e>7ro:-r; 'ih ' Jg.vTer Socet Lcrdbn Vi F ELD De e - .3 UK Advertising Htson frSemsborte} Frieda. Carnforidge House, Gqgmtwe U_r^. Q--erl5£>' r S-i me > ?CTI6 9. AH Er-gt=r.d Tetepborte: -r 44 (0)1932 564999. Fax: 4-44 (0)1 932 564998 ElTiE' - ------ - " Internet v A di rc.es ard :t; = e:e 33 . :- or? 'c--3_etl Internationa! Advertising '■ EEE C.E-3C---3:, 3 _ e 3 E r Eii E_- Heed -G”:- Ett.e : Edv-eriE: ri T - - - - -: .^v 3 - : rates te — e :,e 33 -3- -3 1- requasL Copyright Notice ll -3 crcuis Oescr&ed in this my-A p se far dcsr^eitD i£e only. AS dravtfn^, photography pmteri rirrt^ board feyajs, pt o^ei ni i ^ d arcus, disks. CD-j^JMs, gefova^t. - riga and attkfe teste pUb fe h e d in otf books and tfiafi; i^sfd-psny acii«sT 3 se- n-enn 5 ) ^ cop-^T^re Se-mers, b.v. and f ney not be repnoctKed or Iransnitteij Biany xjfmor by Miy metres, ndu^gpholcxDgij^^ scanrw^ an h whe^e of ri |Eit vMvtA poor iNfttten pernsac-asiaTvthe !\MatefSL 5bthw5E[£^|3efiiRSSOfvm^^sobe<±feredbd^ 3tf part of thfi pdbfksJkwi s sinr^d ,n a rEine'i'ai petSctbom ©at ti resped cf devices, oomgona^s etc desaibed in tte maEzsHe. Its efccs not access resportstiiiqf far Bo idrafiSy such , - J -± r p—'E-r.a-- "•j slc flier l' c-i — s zr aices — Z' as pe — DEcn :z "■- 1 3 "i3-e :: 3 r 2 E'lZv tksgp, and to lsc the cosserts in other Segnerf piitEesbof^ and acihRje. The hifcfehera -L 1 - 3 "--“- e - - 3.3- - z - Z-3 iz He- Segment b.v, 2005 Printed in the Netherlands 5. 5005 -tericr dsclicnlts 5 10*45 h 35 kt 7 1 i Does the cal hotel keep your pet warm enough when you leave her for a long weekend? Does your dog walker really give your pet the exercise you've been paying for? Find out what your pet gets up to when you're not around, or discover how they're treated when left in the care of others. You can do all this with the animal data-logging transceiver described in this article. The market for GPS (Global Positioning System) navigation systems has grown at a staggering rate so that now there are dedicated systems available for practically every type of travel and/or vehicle. Modern GPS navigation aids achieve remarkable accuracy in comparison but when the satellite sig- nal gets weak or obscured they still need to take a lesson from Columbus to fill in the gaps,,* Informative Articles Regulars 24 Mobile Navigation PLUS 5 Foreword & Colophon 30 Sense Organs in Cars 8 Mailbox 10 News: The Digital Future 42 Lab Talk (2): Component specifications 13 New Products 60 Delphi for Electronic Engineers (5) 78 Quizz'away 77 retronics: 82 Readers Services 84 Sneak Preview Philips TV servicing equipment ca. 1 955 84 Index of Advertisers Volume 3 1 May 2005 no. 343 46 54 66 Programmer for DCC Magnetic Temperature & Model Railway Control Flux Density Meter Humidity Sensor The DCC system distinguishes itself from the competition by being far more flexi- ble, but also for the necessity of having to program the decoders. The majority of control boxes on the market perform this function only poorly. The stand- alone programmer presented here offers a great deal more functionality! How do you know accurately if a magnet is stronger or v/eaker than one you've dubbed your reference device? This simple to build instrument has the answer. The meter employs a homemade search coil about 1 .5 cm square. This is placed in the region where the field is to be measured and is withdrawn sharply. The tiny surface-mount SHT1 1 sensor module provides cali- brated digital readings of tem- perature and relative humidity. The chip includes two sensor elements, an A/D converter, calibration memory and a digi- tal interface. Construction Projects 1 6 Petlnspect 38 66 74 Glow Plug Heater Programmer for DCC Model Railway Control Magnetic Flux Density Meter Temperature & Humidity Sensor 1 V," ‘ * * ... i kz* r.; tV. •= ; - ■ Mini Project: 5.1 Surround Sound Switch Box Design Tips: More Current from an LM2575 - Inrush Current Limiter - 9-V Battery Replacement WEB POL >LL on i. . radiation hazards we wanf your opinion mailbox New websife (1 ) Hi Jan — I just want to con- gratulate you all on the mag- nificent new webs tie. It is great to find a sate that actu- ally works, rs intuitive and gives plenty of information. Very well done! Mark Weir {New Zealand) We ore still working hard fo dear several problems with the new site. Just like an electronic circuit , a lot of effort goes into getting it to work the way you wont and constant breaking is part of the activity : New website (2) Dear Elektor — while your new website rook a bit of getting used too, I applaud the ability to download older articles in PDF format. I \vonder though, as you are now producing them in PDF, why there is not a subscription format to down- load the complete magazine in PDF format every month. It would be so much easier For overseas readers and we wouldn't get them 2-3 months behind [! buy mine on standing order from the newsagent os it's much cheaper than a direct subscription). At least two of your competitors are doing it and I find this a most satisfacto- ry way of obtaining them. They also do not consume huge amounts or space on the book- shelf, another bonusl Terry Mowtes (Australia) The extension of our website serv- ices suggested by Terry and other correspc n den rs is cur ren fly b e ir g studied for practical feasibility. Our articles have been published in cdf format since 1997 for the purpose of our year volume CD- ROMs . A tean w h ile . bis font readers like Terry cun now download any individual article from the latest issue on fhe same day UK sub- scribers get their paper copy : Buying 1 I issues from a- news- Fond memories of Edwin Dear Jan — you have taken me back to my child- hood with the Renames instal- ment on the Edwin Amplifier in your March 2005 issue. I started reading Elektor in 1 977 and Edwin was the first ever project that I rook on with a friend of mine or the age of 16. I remember blowing up the filter capacitors on the power supply due to misconnecrion. We built the amplifier for the local mosque as a gift, and os far as I know, until I moved to UK in 1 986, It was still operational, I note that the board on the photograph and the illustration does not indi- cate the 12x1 ohm resistors paralleled on the output section. Cental Oxturk (UK) Thanks Cental tar /effing us know. Several other read- ers oho responded by sending us pho- tographs of their Edwin amplifiers and some of these ore reproduced here. By the way, the power Rs were fitted at the under- side of the board 1 stand in Australia may be mar- ginally cheaper than a year's sub- scription but on the down side (pun intended I you are at least 2 months behind European readers as the price advantage is based on surface mail delivery. Seismometer design: help wanted! Dear Jan — I have a triaxial seismometer head, and the four channel data capture and processor. A really pro- fessional seismometer could be made for a fraction of those sold commercially. Because I am not o program- mer, f would like to get In touch with a programmer to develop the source coda. This latter would be best done in C-S-+ to drive the machine in DOS mode. It is believed that this mode pro- duces the least errors. The four channel chip is an Analogue Devices AD77I6. The machine would deliver its output as time and date stamped events to a PC via a serial port. Each event would be recallable for viewing and analysis for each of the three axis, i.e. x, y, & z. The Fourth Input would be used for other pur- poses, possibly temp, pres- sure, and humidity. There are a number or other chips that could be incorporated lo assist the AD7716, including a 805 1 microcon- troller, The frequency range of interest would be 0- 500 Hz. My ultimate atm would be to publish this design in Elektor magazine. The device was originally intended for urban low Fre- quency noise detection and control, however it might well work For Tsunami detection, but over what distance I would not like to guess. The instrument would also be of Interest to geologists both pro- fessional and amateur. The prospect of checking It out on tectonic plate movements has increased my interest. John Scott (UK) This looks like a very ambitious . useful and topical project which we will be happy to publish. Any- one willing to help John with the software? The topic may be contin- ued in cur website Forum. NiCd Lottery advantages (3) Dear Editor — I've followed ihe nicod debate from November 2004 with interest because I use batteries oil ihe time as an aeromodeller. Generally, I would have thought, that the differences between NiCds and NiMHs has been well documented. Certainly on o size and weight 8 tkkter itcrtruFiics- S/2005 bosis the NiMH scores best on a capacity test every time but far sheer our and out perform- ance the mead still has the edge. I believe the military still use nicads as a power source in their equipment because they want guaranteed results in the harshest of environmen- tal conditions. The cycle life of Nicads may be another advantage, it can be in the thousands whereas the NiMHs are said to be in the low hundreds, although the newer ones may be much better. Metal Hydrides also suffer from the same wire cor- rosion as Cadmiums. I treat both types in exactly the some way, charging etc. and to date I've hod no problems at all. That, of course, is not to say everyone should do this, see Gert Helles s splendid ABC of Rechargeable Batteries', Nov, '04. Talking of Nov. 04, your reply to George Price mentioned AA size 2-Ah NiCds. The best I've ever seen is a 1 300 mAh. A 2-Ah AA size nicad would truly be a remarkable beast! As far as the environmental issues go, about a year ago ihe EU mooted a Battery Directive that stated that all battery materials must be recycled. The battery Industry today is a multi-million dollar money-spin- ner, and it is inconceivable not to believe that there may be many counterfeits and locka- likes in circulation. My concern is that I seen to be getting some of these, j've been checking and testing cells for fellow mod- ellers for a number of years and I'm seeing mare and more dodgy packs. Inis story as worth an article in Itself. Unfortunately, the fact that there are so many poor quality cells being supplied does not seem to be widely reported. As far as aerpmodelling goes, this is a bit of a safety issue with me. There have definitely been some incidents with transmitter and receiver packs, which have resulted in bent models. One day it may be more serious, l realise some of what I've said may now be very rapidly becoming history. The new kid- on- the-block, the Lithium cell, ts making It's presence felt in a very big way indeed. These have been oround for a while but have usually been designed for a specific applica- tion. Now you can buy the individual cells In o great vari- ety of sizes. We've been test- ing these for the last couple of years and now you can almost see the increase in use on a weekly basis. The global sale of rechargeable Lithium units expanded from 35 million to 280 million between 1995 and 1998. And up to 500 mil- lion in 2000. This figure could be well In excess of 2 billion For 2005. To make a comparison, we have a 4-cell AA-size nicad pack, BOOmAh at 5 volts. Capacity: up to about 4 watt hours. Then we have a Itthim polymer gem, 3-cell, 340 mAh at 1 1.8 V. Capacity: again around 4 Wh. The nicads weigh 100 grams, the Lithiums, with voltage regulator, weigh 30 grams. Physically, the lithi- um pack is only about half the size ot the nicads, ioa. Hydrides rate slightly better in this respect but there's still no real competition, it may be possible to discharge ihe nicads at 1 6 amps, that's 20 times capacity. The Lithiums will discharge at 6.8 amps, also 20 times capacity. There are snags, some Lithiums are made from flammable materials and then there is the much more precise charging/discharging regime. And, at the moment, depending an where you buy your batteries, they can be up to three times as expensive as NiCds or NiHMs. But for the future, I shall make every effort to use Lithiums whenever possi- ble, which is in almost every case. Another measure of just how fast Inis change is coming in, is the fact that in 2004 the winning made! of the European Aerobatic Championships tor made I planes was powered by Lithium cells and an electric motor. This is an achievement that back at ihe turn of the Millennium, just five short years ago, in some quarters may have been considered, to say the least, to be highly impossi- ble'. Akin, perhaps, to saying today that in five years time an electric powered car will win a Formula One race. I'm sure this is all being driven (?) by the insatiable demand for portable power for all today's must-have toys. [Model aeroplanes are not toys. Well, that's what my friend tells his wife, anyway.) If / when nickel cadmium cells are eventually banned, this might not now be quite the problem that it once was. And, indeed, what bet- ter developments and tech- nologies ore just oround the corner? Peter Beeney (UK) Peter's letter is published almost unabridged because it contains Information and viewpoints not yet presented by other correspon- dents , Further information on Lithium Polymer batteries , theoret- ical an a p radi ca I o f course. may be found in last month's issue. By the way, v/e recently spotted 2100 mAh AA size NiCd batter- ies at knock-down prices. Corrections & Updates 89S8252 Flash Microcontroller Board December 2001, p* 54, 010208 A few users running Windows XP Home Edition SP2 have reported problems. Apparently, unaccounted for CTS I me activity occurs on the RS232 port when PI is programmed to supply fast pulses. This causes XP to hang even if the relevant COM port is not accessed. Also, a timing problem was discovered in the original download utilities. Both prob- Jems have been addressed and an update Is available at: h tt d ; / / wv av . b- ka i n ka . d s bosismufQa.htm 5C Analyser 2005 April 2005, p, 34-41, 030451-1 In the Components List an page 39, the order cade for the programmed PIC (IC2) should be corrected to read: 030451-41. MailBox Terms - Publication of readers cenespcn- dence s ai re c sc ration oMhe Editor. - Viewpoints expressed by corres- pondents are net necessarily those of ihe Editor or Publisher - Correspondenc-e may be translated cr edited for length daily and style. - ', T i hen repaying to Mai bo* corre- spondence. pease ejc-ie issue number. -F : ease send your Mail Box corre- spondence to: edito riSgtektur-etectTonics co. uk or B skier E'actrcrfos Tr.e Editor, FO. Box ISO. Tunbn'dgs Wefis TN5 7WY England VMS - Efe'iclijr detircriu 9 news & new products Deiano L Klipsfein The preliminary events of the recent International Electron Devices Meeting (IEDM) included a full-day seminar titled 'Devices for Next Generation Digital Consumer Circuits and Systems', which dealt with the components needed for future digital consumer systems and the obstacles to their implementation. Here we describe some highlights of the discus- sions a nd possible solutions. Figure L A mobile phone on your wrist - os easy to w ear os a watch, but less sa$y to use, (Photo: Siemens} The igital Future The next generation of ICs for consumer Such presentations always start with some basic questions, such as 'What's the point of at! these efforts? Don't v/e already have everything we need? Are there any conceivable technical devices that haven't already been invented?' Under the chair- manship of Akira Matsuzawa, an IEEE Fellow and a professor at the Tokyo Institute of Technol- ogy who played a leading rale at Matsushita up to 2003, this seminar defined the objectives differently, in terms of new chal- lenges instead of new media. His slogan was 'accessible every- where and always', and the new technologies are subordinated to inis demand - or perhaps v/e should say, to this future opportu- nity, After all, not everyone looks forward to this sort of universal accessibility and usability. Matsuzawa justifiably termed the requirements for future devices a 'technology driver' for the ICs. This can be clearly seen from the rapid advances in mobile phones, but even more dearly in PC s. Modem PCs are packed with capabilities that nobody actually needs for professional use in an office or an business trips. Entertainment electronics, □nd especially electronic games, stimulate extending the limits of 1C technology much more than any professional application. The various product sectors exhibit impressive annual growth rates, with two-digit figures presently being posted by DVDs 20%), navigation (22%), servers 1 8% , and printers ( 1 0%) . At 9%, desktop PCs lie just below this level, but notebooks are slightly above it. Although mobile phones are at the bottom of the growth chart (~5%), they have the largest volume with more than 450 new units per yean Many mobile phones are now fashionable lifestyle prod- ucts, such os the 'Wristfone', a mobile phone that is worn on the wrist like o watch [Figure 1). Digitalisation means good busi- ness for 1C manufacturers. The semiconductor shore of total pro- duction costs has significantly increased since the days of ana- logue television at the expense of other types of components, and especially at the expense or labour lime. In a traditional tele- vision set with semiconductors accounting for around 25% of production cost and other compo- nents around 40%, labour costs were around 30%. In a modern digital television set, semiconduc- tors account for 50% of the pro- duction cost, the other compo- nents take up 30%, software and licences are good for 10%, and labour costs ore only 10%. The 'mixed signal' challenge Digital medio hove created a new class of ICs. Consumer elec- tronics demands high-perform- ance ICs with sophisticated microprocessor technology, but it also demands technologies with very low power consump- tion. These requirements are sometimes at odds with each other, so a third technology has taken root. It consists of "mixed- signal ICs, which often provide better solutions to difficult requirements than purely digital technology. With regard to the necessary processing capacity, the difference between digital audio technology at the bottom end and real-time virtual reality at the top end amounts to more than four orders of magnitude (Figure 2). With a processing capacity of around 1 gigaoper Or tions per second [GOPSj Intel's famous Pentium III processor lies approximately halfway between these two extremes. An MPEG-4 codec can serve as an example of the current requirements: it should be able 10 elwfronks - 5y2(H)5 #■ ro deliver 1 2 GOPS at a power dissipation of less than 1 00 mW, As Mafsuzav/o explained, this requires some pretty fancy engineering. The 1C designer's toolkit includes paral- lel processing, vector pipelining highly specialised video codec machines, and sophisticated on- chip tosk distribution. The results can be dearly seen by compar- ing different chip architectures. A siandard, general-purpose microprocessor with two parallel processor cores has a power dis- sipation of 7 W with a process- ing capacity of 1 GOPS. An application-specific 1C, by con- trast, can be designed to yield 2.5 times this processing capac- ity with only 12 mW or power dissipation. This represents an improvement of more than three orders of magnitude in the ratio of processing capacity to power consumption. Karsuhiko Ueda manager of the Matsushita development labora- tory, also described the prob- lems facing system designers (Figure 3). Far one thing, tran- sistor density on ICs has increased by o factor of more than 100 during the past 15 years. This increased packing density has created several prob- lems, such as intense heating, increased crosstalk, and ele- vated leakage currents. How- ever, such high packing density is compelled by the increasingly severe demands being placed on ICs. A CD player con man- age with 200 000 transistors, but a DVD player requires 4 mil- lion, and the figure rises to nearly 40 million for a digital tel- evision set. If such quantities are io be economically placed on sil- icon, the only solution Is to used 'shrunken' chip structures. Mixed-signal ICs, which contoin both analogue and digital tech- nology, are primarily used for interfaces and network circuitry in consumer electronics devices. In DVD systems, they are prima- rily usea for error correction. This requires analogue and digital fil- ters, fast A/D converters, and of course the actual correction cir- cuitry, which is usually based on the Viterbi algorithms. With his pioneering mathematical theo- ries, Dr And rev/ Viterbi paved the way far inexpensive mass production of such digital devices. Reproduction at a suit- able quality level would nor be possible without such error cor- rection. if the necessary accu- racy had to be implemented in the basic DVD system, the ICs would be unaffordable. The required accuracy is Impres- sive: finding the 'right pit an a 1 6x DVD Is like locating an 0.4- mm dust particle In a football sta- dium while flying over it at a speed of Mach 1 60. For com- parison, a normal passenger air- plane Hies at Miach 0.85, This makes it even more remarkable that the average price of a DVD recorder dropped by half between 2000 and 2002. Multimedia The term multimedia has vari- ous definitions., and radio broad- casters, PC manufacturers and providers of communications infrastructures don't always use it with the same meaning. How- ever, there are two particularly important aspects far consumer electronics. The firs! is a bidirec- tional link (unlike radio or televi- sion), and the second is inte- grated processing or audio, video and graphics. Th Is requires special signal proces- sors that can convert analogue signals In real time for digital processing and perform the nec- essary error correction on the digital signals. The system architecture of such multimedia processors differs from the familiar architecture used for general-purpose proces- sors. ihey are almost always parallel processors with separate command and data processing. The architecture of the command processor (execution unit) is roughly the same as the stan- dard architecture, but the data processor consists of an arith- metic array that can be scaled as desired Eo meet the needs of the target device. I f necessary a outboard hardware engine can be added to further accelerate 10.C00 1000 in CL o <3 o u cz £ too io ‘w— e -jf ]_ I £ 0.1 0.01 Audio Video Virtual Reality o n Pentium zs o v> a u 3 o o 5 TJ © u □ a o LlF n . © o Li a Q 6 in a © "O C © Q Q 11 E 3 » e E3 a a a n Figure 2 . Performance figures hr major digital systems. {Chart: A. ■Aatsimawaj specific media processes, such as processing graphic data. Robots also employ such hierar- chical processors an a large scale [see Figure 4). Maarten Vertregr of the Philips research laboratory in Eindhoven highlighted the relationships between digital and analogue technology, each of which has i!s particular strengths. Digital tech- nology excels in programmabil- ity and data storage, while ana- logue technology is better for human interfaces. He also pre- sented an example to show that analogue technology still holds an important place in digital media: 75% of the silicon costs in the Nokia 7650 mobile phone are due Eo analogue circuitry. The new demands are what determine future developments. Vertregt mentioned higher data rates, increased f exibility to sup- Maximum transistor count per cm 2 Transistor count needed to cost-effectively produce Figure 2. The number a: kamhtors required to cost-ene-crively produce digital systems. (Chart: K. Ueda} 5/2005 - ddtlor efettfonTrs 11 news & [new products #■ port different standards, greater dynamic range, increased band- width, and significantly improved energy efficiency. But the most important factor is lower cost, to make the new devices affordable. Memory devices One of the basic functions of digital consumer systems is stor- ing information. It is an essential element of everything from con- ventional magnetic-tape record- ing far audio and video to CDs, DVDs, and iPods. Although mag- netic recording is losing ground in the consumer sector, semicon- ductor memories are advancing rapidly, especially Flash mem- ory. The average amount of WAND Flash memory in digital medio is presently doubling every year. This trend is being driven by more than just digital cameras. Set-top boxes, instant- on laptops, and even mobile phones demand more and more memory capacity. Data storage prospects for digital consumer electronics have been studied by Paolo Cappelletti, Development Manager for non- volatile memory technologies at STMicroelectronics in Agrafe Bri- anza. The market for nonvolatile memory presently appears to be boundless. There are many rea- sons for this. Digital technology cannot manage without memory. □ no increasing application mobility favours semiconductor memory over hard disks, since it is smaller and consumes less power. Moss production for mil- lions of consumer devices cre- ates large piece counts, which in turn allows costs to be reduced. At the same time, reducing the size of Flash memory cells decreases the amount of silicon area used and also helps decrease costs. In the early years, memory ICs hod a 30% share of the ratal semiconductor market. Sharp price decreases since then have reduced their market share, although the number of memory bits sold throughout ihe world Has constantly increased. The share of memory chips is now increasing again, but at different rates. Volatile DRAM is growing at around 1 7% per year, but the rate for nonvolatile Flash mem- ory is 23%. There are also differences among the various circuit types. NOR Flash memory, which has dominated since the start oF the Flash memory era, will probably surrender its position to NAND Flash in the coming year [Fig- ure 5}. NAND Flash memory promises higher packing density and lower production costs. The largest single market for NOR Flash memory is presently mobile phones. There is some hope that they will also pene- trate she digital camera market or find their way into USB sticks for laptops. These applications are presently the domain of NAND Flash memory. Other types of nonvolatile mem- ory ore already coming into sight, such as FeKAM, MRAM, PCM (phase-change memory), polymer memory, and cholko- genide memory. Their long-term prospects cannot be clearly iden- tified from their relative strengths and weaknesses, especially since they are still at different maturity levels. Flash memory will most likely continue to dom- inate during the near future. Sensors and packaging The IDEM 'short course also pre- sented information about other subjects. We should mention imaging systems and in particular packaging, which is an espe- cially tricky issue with the steadily decreasing dimensions of portable equipment. The descriptions or imaging sys- tems focussed on future develop- ments in CCD ond CMOS sen- sors and the necessary circuit and module technologies. Most system designers found the impli- cations of this portion of the senv mar less dramatic, especially as it did nor address new display technologies. Construction and packaging technologies, by contrast, play a major role in the design of inte- grated circuits. This is the realm of highly specialised designers, Figure ± The Sony Aiho dog ond Quiro robot ore among the first robots designed hr consumers. They moke significant demands an the capabili- ties of their processors. (Photo: Sony, who often simply help their col- leagues from the traditional school of 1C design deal with questions such as what can be achieved using face-down or 'flipchip' technology with the ICs mounted upside down on the cir- cuit board and directly attached using bumps v or the practical limit an the number of pins per SC tor system-on-chip designs. As such considerations must be deoil with very early in the 1C design process, these specialists are rap- idly assuming a key position, \G50j 21 2000 2001 2002 2003 2004 2005 2006 2007 2003 0 NOR []NAND 050022-13 Figure 5. The NAND version of Flash memory 1 can be expected fo win the contest between NOR an NAND memories, since the cost advantages it provides are on important factor in consumer electronics. (Chart: P. CoppeF.ettij 12 elsklar Ekrfreiiics - 5/2005 More Memory for MSC 1210 Development Board We’re happy to announce that a second ver- sion has been produced of our mighty popular MSCl 210 microcontroller board. The upgrad- ed product now has the Y5 version of the MSC1210 microcontroller which means more memory is available for your applications. As opposed to the previous ver- sion, the Y4, ihe new micro fitted on our MSCl 210 boards has double the amount of memory, namely 32 k Bytes instead or 16 IcByles. Although this up to date board moy be used in stand alone fashion, by adding suit- able hardware it may also act os a voltmeter or o BASIC computer [Elektor Electronics July through October 2003); an RS485 inter- face [frfektor Electronics Novem- ber and December 2003) or a v/ e bse r ve r ( Eie £ ror E lec fro n ics July/Augusf 2004). For the latter application in par- ticular, extra memory will prove very useful, as not only will the chip be able to hold larger pro- grams, in combination with the network extension card duly/ August 2004) it's also capa- ble of staring more web pages. Old hands at programming moy remark that a larger processor by itself Is great, but needs to be supported by the (free) software. Fortunately, the designer of ihe software, Mr. Wiekenhouser, was found willing and able to adapt the free MSCl 21 0 soft- ware for files up to 32 kbytes. A licensed version is only required if your software exceeds ihe 32- kByre limit. As a bonus, the new software now allows floating point routines to be added with- out problems. Cts C 21 WWW.WtCKENHAEUSER.COU j | ] _ booooaocK . a a 6 o o cj o c i i u o o o q o i looopoo o o o a o i I a The M5C 1210 system software may be downloaded free of charge from www . v/j ckenhauser.com,-' We are offering the new MSCl 210 board at the same price as the previous version, only £ 69.00, for a limited period. This offer is valid till 31 May 2005, After that date, the price of the MSC 1210 board will be £ 75-90. Ordering the new product is easy, just contact our Customer Services quoting order code 030060-91 (see Readers Ser- vices page). Online ordering is also possible (and much Faster!) via www. efektor-electronic 5_co_.uk L-5C074 Class D audio DirectFET™ for high performance amplifiers International Rectifier recently intro- duced the IRF6665 DirectFET 7 ™ MQSFET for medium power Class- D audio amplifiers. The device parameters are tuned specifically for improved audio performance such as efficiency total harmonic distortion fTHD) and power den- sity. Applications for Class D amplifiers range horn battery-pow- ered portable products to high-end professional amplifiers, musical instruments and car and name mul- timedia systems. In addition to application-tuned silicon, (R's DirectFET packaging technology enhances perform- ance in Class D audio amplifier circuits by reducing lead Induc- tance, which improves switching performance and reduces EMI noise. Thermal efficiency enables 100 W operation into 8 ohms without a heatsink. Elim- inating heatsinks shrinks circuit size and bulk, giving designers more layout flexibility ana reduces amplifier cost. Critical MOSFET parameters determining Closs-D audio per- formance include device on- resistance, or Rosj on ] and gate charge, or Q c . These parame- ters can determine efficiency in □ Cla 55 D audio amplifier. G57G53 -1 Intematianal Redtfier, European Regional Cenlre, 439/445 Godsfone Road, Whyteleafe, Surrey CR3 OBL TeL ^44 (0)20 3645 8003. wvrwJrf.com 5/ 20 05 -rhUa riedTcria 13 news & lew products Fast-Acting NIC Thermistor Sensors 5 e Mi tec's range of fast-acting thermistor sensors ore claimed to offer unique solutions to the elec- tronics industry. Cost-effective, mint 10-220 style packages with R25s from 1 k_ to 100 k_ con be mounted directly to fhe PCB or fitted with Hying leads. Exposed bead sen- sors monitor and control rapid airfow and Sob-Touch ' sensors operating to 200 "C offer T.C.s down to 0.5 s. I he latest NC sensor reacts quickly to IR output in non-con- tact applications where ther- mopiles would be restricted by high local ambients. ATC Semitic Limited, Unit 14 Cosgrove Business Pork, Daisy bank Lane, Andarfon, North with CW 9 6 AA, TeL (+ 44 ) ( 0)870 9010777 . Email: 5 ales@atcsemiteoco.ula Website: www.crtcsefnrtec.co.uk L : -7l^-b| Signal Wizard v 2 from UMIST The Signal Wizard 2 from UMIST is a unique, integrated system for designing, download- ing and running very high per- formance filters In real-time. It includes the high-level PC-based software interface that designs the filter according to the user s requirements, a hardware mod- ule based on on advanced digi- tal signal processor and a low- level firmware operating system that implements the filtering oper- ations, Once designed an inte- grated software interface is used to download the Filter to the hardware module via a serial fink where it is executed on demand. Most important, the system requires no knowledge of digital signal processing (DSP) theory on the part of the user, or of the mathematics associated with digital filter design. The Sig- nal Wizard is a total-solution package. Due to Its flexibility, it is particularly well suited to the reaktlme processing of audio sig- nals. High quality analogue sig- nal conditioning and a stereo 24-bit resolution codec provide extremely high resolution suffi- cient for the most demanding applications. In short. The Signal Wizard 2 brings the power of digital signal processing to any audio-bandwidth domain that requires electronic signal filter- ing. Applications include audio signal processing sensor signal conditioning signal analysts, vibration analysis, education and research in electrical, elec- tronic and oiher physical sci- ences. New features added for Signal wizard 2 include True stand- alone operation (without PC) once configured; HR and adapr tlve filters; True dual channel operation; Impulse response import; Real or complex fre- quency response import; Delay options for in/out and FIR filter modes; Real-time spectrum ana- lyzer; 6x faster operation; Off- line filter mode for wave [WAV] fibs. Low pass, high bass, multiple bond-stop / band-pass filters may be combined to produce very complex filters for frequen- cies up to 24 kHz, os well as standard infinite impulse response (HR) and adoptive types. The software can also accept measured responses to define a filter template. This can be used to provide measurement equalisation or to search oui sig- nal signatures in noisy environ- ments. In fact, ir is a simple mat- ter to produce filters with com- pletely arbitrary frequency magnitude and phase character- istics using the finite impulse response (FIR) method, with no phase distortion, no matter how sharp the Filter is. Alternatively, arbitrary phase distortion can be introduced if this is desirable. It is even possible to design and execute real-time deconvolution (inverse) filters using the special invert mode. Because the pro- cessing module is so fast, it is possible to design tillers with responses far beyond what is possible with traditional ana- logue techniques. The control program runs under Windows, and provides a user-Friendly fil- ter design tool that demystifies the process or specifying the Fil- ter. The filter design process sim- ply becomes one of describing the desired frequency response. The design package indicates the response that will be pro- duced and also the deviation from that specified. User designs may be stared for re-use and actual responses may be entered from measurements for simula- tion or equalisation purposes. The filters are calculated and downloaded to the hardware within seconds. Patrick Gay deck!, School of Electrical and Electronic Engi- neering, University of Manchester, P. 0 . Box 88 , The h rod cry Building, Manchester M&Q 1 QD. Email p a t r kk.gay deckK@m a ndis ste r,ac uk 14 ebVfor el Edi emits - 5/2005 EASY To Use! Very LOW Cost! Extremely FAS ! Turnaround! Layout Software DOWNLOAD our free CAD software DESXG N your two or four layer PC boards us your design with just a click top quality boards in just days e^resspcb.com rot hi tTgI GIVI fifties Control U bu e Automation PiC Technology Standard Modules Custom Designs Build World thertuet uControilfcr PIC1SF452 CPli T 24LC2S6 EEPROM and demo Web Server 32 KBytes FLASH, 1536 Bytes SRAM and 32Kbytes EEPROM. W eb Server about half the available EEPROM memory , heaps of space left for custom web pages! Server based on the excellent Microchip TCP Stack. 13 user programmable I O pins, 5 can be Analog Inputs. LED’s indicate Power, Collision Link, Rx Carrier, Tx. RS232 interface via 3 pin connector or Front End connector. Cable Included for connection to PL or DTE Device Has an 1C SP (In Circuit Serial Programming) connector. Full Technical and Programming Documentation Pay us a visit f| ||g I I Loads of uControIler and Automation kit www . t ota I-telemafi cs.com ifti 2' Eusy-UcD libai-Tunb D)Tfljkj 'Miami ‘± & y UillqUa liyl-iinty yyiJIy-yymivJi'-Jiii iilali of u iiuiiyu. ii ysyy u DCP yiiii UuU fUna yla 7 T.n Iyiiiil y/i^a/d dbrsJyris m siuj bjd u Impy/t ; V/iiMiii uni\ run. iUm; “7T~ r ■ i lur juu M2 dtrskjjdny i u : i uliujuii ‘iiiUj- iiia 5s£ • -r- *35 HbCtuiin, 'm jjliar iur Jiyi sJyjii duu! sii-uu a ‘Jyyl citiimiyl yyyji= fin’/y/dyu iiiid iJylyja h Ilia ijiil/j'iimJSiiiiljjly ry;y yyn rfl., 'tllUjia yparuilyii. i'ipfaiisjiUte in>u> -iU ;*.rte Jy iy: iijid a.!pyr: yr iuj^ulsa iii IS ii()yr yfj;!y/i j'yr yyyyy fibs. tSbiilyy/'J, CD, jJyWar DuppJy ynLf ij)isi//sj53 y^aryiiuij ui J i-j.2 I'.ily uyusJ fuuiiP5aJaDiyLl). US $450 K £235 approx) /gf i - J§ . £ j . - Jsj^l ■ - , JjtX , h i- ■ t Far mcjrii iiiformutiuu Email: infoTf&uiilly.cani Full details arid ordoriny infannutiim ut: *vv/v/.iiaaiiu.ciim/3u^|jliiiraj'iiirir/-jiyuu[vyiaurd2.iUm 5 .TD 35 - sitvior el^fronlts 15 retlnspect A 1 6-bit wearable computer for pets Pete Cross www.pefinspeet.com f/mii shows oil the latest in wearable mpuling. You ton monitor the (are of your pet too, when you build a Petlnsped animal logging transceiver. Does the cat hotel keep your pet warm enough when you leave her for a long weekend? Does your dog walker really give your pet the exercise you've been paying for? Find out what your pet gets up to when you're not around, or discover how they're treated when left in the care of others. You can do all this with the animal data-logging transceiver described here. Petlnsped is a sophisticated data- logger and v.dreless coraimmi cations device that lets you discover what environment your pet experiences and how they behave white you’re not around. Petlnsped consists of a 16-bit microcontroller with 256 kbytes of Flash memory and sen- sors for pressure, temperature, activ- ity, light and proximity. The digital transceiver provides communication with a range of up to 30m, All this comes in a package 28mm in diame- ter, including batteries. This makes it small enough and light enough for a cat to wear comfortably as mod- elled by Elmo in the introductory photograph. Pet Inspect comprises two circular PCBs, if you just want the sensing and datalogging capability just build the digital board which has the microcontroller on one side and the sensors on the other. If you want to add transceiver capability, then you should also build the transceiver board. The transceiver board can be 16 elckfor e'Micnlcs - 5/2605 Figure 1 An M 1 6C microcontroller is at the heart of the Fetlnspecf sensor platform as it goes about its business of monitoring your pet and its environment , Figure 2. By downloading the data and graphing it rrr a spreadsheet you can see what your pet got up to. if the pet's in range , you can update the graph with live results using an Excel macro. built by itself to be used (or reused) as a general purpose unit for your own projects* Figure 1 gives an overview of system functions* Showing results A week's worth of data can be stored at a time when sampling at a 15- minute logging interval. As long as you download once a week from your pet s you can get uninterrupted graphs for the life of the batteries — typically, two and a half months. Fig- ure 2 shows results downloaded from Elmo while she was wearing a Petlnspect. The results span half a day and the sampling rate was once a minute. Activity monitoring Activity data is provided by the CW1 600-1 ball- in-cage tilt-switch from ASSEMtech |1]. Figure 3 shows the physical dimensions of the switch. The ball moves around, opening and closing the contacts of the switch. It will remain closed when held still in a vertical orienta- tion plus or minus 15 degrees. This allows for basic posture recognition if oriented correctly on the animal. Even while the microcontroller core is stopped, the switch is feeding two timer-counters. The first timer is sim- ply clocked by the tilt-switch wired between ground and a pull-up resis- tor to Vdd which provides the num- ber of switch cycles per minute* The second timer gates the real-time clock 32-kHz crystal to another counter to provide a 'percent-closed* figure, i.e, the percentage of time the switch stays in the closed position. Figure 2 shows increased activity when Elmo was generating most of the observed events tiirougbout the day — except when napping! Pressure sensing The MS5534AM piezo -resistive pres- sure sensor from Inter sema shown in Figure 4 is micro -electro -mechanical structured (ME MS) device contains an integral 15-bit analogue to digital converter for accurately measuring both pressure and temperature. The pressure value is read out using a 3-wire synchronous serial interface, along with a temperature reading and calibration coefficients. The module is calibrated at two temper- atures and two pressures at the fac- tory for determining the six calibra- tion coefficients. The calibration coef- ficients are used by the software run- ning on the microcontroller to correct for both the gain and offset errors of the pressure sensor, temperature sensor and analogue to digital con- C omm uni c a tion Wireless Transceiver Program/Debug Port Wired Comms Port Message Handling Status LEO j Temperature Proximity Pressure Motion Light Utilities Data Logging / Retrieval Real-Time Clock Event Scheduler Unique ID M16C ^ Microcontroller /r c. , 5 ' _ & nn edsMioo cnv t&t&f svpaste ss r vd f / t-b Eekte B&Jnnna d&tgi it & cffsed us c sen ue vfimsnlm footodsis ga n dws biTirs. Ihs odgtm ’ unetf'dgsd -f fihi ri fa cfa;s i24 pages/ is m o :cf fa; ties damdood fa m. 040321-1 1 us MM.fakt^Btfwk$.m±L 5, 2005 - elskter dtdrcnia 17 5,6mm L , 3.5 mm L r i a. 8,7 mm Figure 3. The activity sensor is o boll-in-cage tilt switch. Being non-mercury ' if rs completely safe, even if your pet swallows if. (Adapted from [ 1 ]) Figure 4 . At 9x9 mm, the M55534AA<\ pressure sensor was originally designed for altimeter watches and the like. In Petinspect, the MS5534AM has enough resolution to tell you if your cat sleeps on the dining room table when she thinks you're no! around. (Adapted from [2]) 4.0 mm Figure 5. The LDR is not calibrated to any real units of light intensity. Instead it simply reads in terms of percentage of full sunlight , where 0 % corresponds to an absence of light and 1 00% represents the maximum intensity ever expected when m full sun. 7 0mm ifl N Figure 6. This is the TR3000 ASH Transceiver from RF Monolithics „ / don't suppose the designers pictured their creation adorning the likes of my cat? (Adapted from verier Second order compensation calculations involving the calibration constants and raw pressure and temperature readings provide enhanced accuracy of the calibrated pressure readings. In order to average noise, 8 readings are combined. This averaged result gives a measurement which changes less than = 0.05 mhar when the pet is still and at a constant height. To determine absolute pet altitude from pressure will require some math. After the pressure readings are calibrated using the calibration constants and the formula supplied by the manufacturer, the following formula converts this actual pressure to an altitude above sea level: 0.0665 CU 90262 This pressure -to-altitude conversion equation is based on US Standard Atmosphere 1978. T is the tempera- ture in Kelvin, p G , is the pressure of the day at sea level and p is the cali- brated pressure reading from the MS 5 534AM pressure sensor. The height, h, is in units of meters. In Figure 2, event (2) shows Elmo climbing a tree. There is a marked short-term decrease in pressure when she is up the tree, followed by a rapid increase on her return jour- ney Earthward. The slower varia- tions in pressure across the graph axe due to the changing ambient air pressure. Temperature recording When Rover takes a break at the pet motel, you like to make sure he's looked after. The temperature meas- urement is derived from the pressure sensor, since It needs this to provide Its own temperature compensation. The reading is accurate to =0.5 = C with a resolution of 0,015 °C. The recorded temperature is Influ- enced by three factors: ambient tem- perature. incident solar radiation and body heat generated by metabolism — which Increases with physical exertion. This is just as well, because all of these contribute to the variable of interest: the core body tempera- ture of your pet. In Figure 2 r when Elmo was napping outside (4) there was a greater amount of incident light and a lower temperature recorded throughout this time. Large sudden changes in temperature recorded by the device exhibit exponential arrival at the new level, even in the presence of small fluctuations. For example, when Petinspect was removed from Elmo (9), the recorded temperature plummeted in tills way, but you can also see this with less definition when Elmo exits the house just before taking her nap outside (4) and again when she enters the house for her six o block feed (5). 18 ekVEGF Electrodes - 5 /‘2005 T»- c* k "i_: TfM CCii ^TT 0^:1- lj-71"^ -"’ -.- : ^Cct (SiJf '■rcT " ? - - Iht'J &Z -, " ; -■ — " - - - ■Il.\= - - i . . --,.• __ >: ■ t wj ■ 0^1 J ! 3^ =>;-* Verier _ ‘--ZZ F-M5 - l ir. !■ 1 - •. : -i ej =Tiirrpi ! R«* r t* : h % iU. ;I3 Figure 7. Ampfrfier Sequenced Hybrid (ASH) transceiver block diagram A gain- limiting factor in most receiver amplifiers is the feedback from later stages affecting the sensitive high -gain earlier stages . This problem is eliminated in the ASH design by switching only one amplifying stage on ot a time. (Adapted from 1 3}) Light intensity recordings The light dependant resistor (LDR) is a good inside/ out side indicator. In Figure 2 Fve added 15% to the light readings purely to prevent the light intensity results from overlapping on the temperature data. Due to changes in orientation and shadow- ing, the light readings will fluctuate markedly however the average read- ing is a very good indicator for estab- lishing inside/outside location during the day. A semi-opaque enclosure for the Pet Inspect helps to diffuse light from any angle, reducing these fluc- tuations, see Figure 5. In Figure 2, napping outside (4) shows a greater amount of incident light than napping inside (6), When Elmo takes a toilet break from the artificial light inside just before 11:00pm, she goes outside which results in a sudden momentary decrease in light and temperature (8), Careful mounting of the device will ensure that the readings are not affected by changes in positioning. When Elmo climbed the tree (2), there was a false indication of lower light, probably due to the fact that the Petlnspect got rotated so that the LDR pressed against her neck, rather than away from it. Monolithic s (Figure 6) was chosen for the wireless transceiver [3j, The TR3G0G was the only device that fit- ted into the restricted physical space, and was integrated enough to easily form part of a circuit with the minimum amount of components. It also met the minimum requirements for data rate, power consumption, and ease of development. Being of fixed carrier frequency, the part number determines the fre- quency of operation. This device uses Amplitude Shift Keying (ASK) or On/Off Keying (OOK) at a carrier of 433.92 MHz. OOK was selected because the amplitude shift keying mode is only available at higher data rates which have correspondingly reduced range. These transceivers have been used in products to track climbers on Mt. Everest and runners in the Boston Marathon. The ASH design employed in the TR30G0 contains an amplifier time- sequenced receiver section which provides over 90 dB of RF gain with- out the use of frequency down con- Proximity recording So who’s eating all the brekkies? Since each pet has the ability to both transmit and receive information, they have the ability to communicate with one another over a short range (3G m line -of- sight). Each Petlnspect constantly listens for ID transmis- sions from other Petlnspeets, and transmits its own ID number every 15 minutes (or at whatever period you like). This allows you to assess the social grouping of pets. If you place a Petlnspect by the feed bowl, you can check for feeding attendance. During the test in Figure 2, I had another Petlnspect sitting by the feed bowl It has a short antenna to reduce the range, localizing the capture of ID transmissions to about 1 m. As you can see by the orange triangles repre- senting feed bowl attendance, Elmo likes her food! T ran yy .vsfy BaOariu PCS JVVOtcCE; f Ai3TKcnr:^i & PCS A r£%n-& PACU SL*>KV5Krjf Reset i-C ash T ranscei 1 5V LED SET-icy MX'. Voftag* R j Ccrj£"«23 Socket Ttrperaijre Sensor From antenna end From antenna end with Transceiver/Batteries PCB removed Csp fl?“v D-Rr'} U16C P.'.crcco- -o -v lite^CECr£jt*£?J Ssr.icrs PC 3 Cao lriA O-fl ir>5 TnrtSC& .-I"" PCS ! £V lri*>PC3 C =r - "j F*i Pstgrapwr ng Ccr iQ Mrtz Srt'-x, S' From microconlroSJer end From microcontroller end with M icroco ntrdleh Sensors PCB removed Transceiver The TR3QOO Amplifier Sequenced Hybrid (ASH) transceiver IC from RF Figure 8. The six layer PCB has dedicated power and ground planes on each board , which along with other techniques , means bulky shielding is unnecessary. As a result , the electronics package , including batteries fit into a c) f Hnder 28mm in diameter and 23mm length. 5, Eh -fdta ekrtronia 19 Petlmspecii Main Features Overall Operational temperature range —10 Eo *70 3 C Operating voltage 3.0 V nominal Battery life 1 0 weeks vrilh a sensor sampling poricd of 1 5 minutes. Sleep current 90 mA vrhtle maintaining tfie real time dock, continuously integrating animal movements and listening once □ second fur wireless data Peak current Dimensions 17 mA electronics package: 28.6 x 28.6 x 25.0 mm Flash ROM RAM 256 k 20 k Main dock Transceiver Section Transmit output power Range Raw data rate Modulation Carrier frequency Carrier frequency tolerance Receiver dynamic range 10 MHz HkJ&m (0.25mW) 15 m iine of sight (typical) 23 kbps on -off keying 433.92 MHz {licence -exempt ISM) ±200 kHz -10 Eo “84 dBm version. Unlike a superheterodyne receiver which achieves stability by distributing RF gain over multiple frequencies, the ASH transceiver dis- tributes the total RF gain over time. Figure 7 explains this in block dia- gram form. In this application, the transceiver is configured for OOK modulation at 23k Bits Per Second (BPS), The transceiver draws too much cur- rent to be kept in receive mode while listening for the start of transmis- sions. Instead, the transceiver is placed in receive mode for S ms out of every 600 ms. It is asleep for the remaining part of the receive polling cycle. When Petlnspect or a base station wants to send a message, it trans- mits a 800ms preamble before the first packet. This Tickle’ wakes up ail Petlnspect units in range and keeps them awake and in full-time receive mode until they detect 2.5 seconds of continuous silence. They then re- enter sleep mode to continue receiver polling. Construction Layout is crucial to the success of the transceiver operation. Normally, microcontrollers are not used in dose proximity to radio frequency compo- nents. The spurious signals coupled from the microcontroller clocking ele- ments into the radio circuits can affect both transmission and recep- tion, To mitigate this, the transceiver and microcontroller are placed at opposite ends of the device. Atten- tion to power supply distribution, shielding and other design rules allows a successful arrangement of components. The result of this care- Pet Inspect 23 psr Se$3T£ T nf sw f Base Station O: i.rjf y.Yr ; 5* Fsn *ze c&agrcsics T CjT-'.r: U ful layout is shown in Figure 8. Extensive constructional notes, including useful tips on making waterproof Petlnspect units are pro- vided in the unabridged version of this article. Base station The purpose of the base station is to relay commands typed into the lap- top for transmission over the wire- less link. As shown in Figure 9. the commands are parsed and sent to the base station transceiver over the RS232 serial cable at 57,600 baud, Petlnspect reply packets are cap- tured by the base station transceiver and reformatted for serial transmis- sion over cable in the reverse direc- tion to the laptop. Although the wired link is duplex, the RF trans- ceiver link is half-duplex at 23 kbits per second. The base station can be constructed from a Petlnspect run- ning different software. The actual action to be carried out is decided upon by the ’ Message Centre'’ mod- ule. A base station might also be config- ured to control the imm ediate envi- ronment for your pet. For example, the door to the cat brekkies might only open if all of the following con- ditions ar e true: Integrated activity over last two hours > 12, AND cat has not accessed brekkies within the last hour, AND time is after 4 : 30pm. OR Cat has not eaten for four hours . If you really want to get serious, put- ting the dispenser on a weigh scale that can be queried for the amount of brekkies eaten at each sitting would allow you closely track feed intake. Software The source code for the base station and Petlnspect is common, being written almost entirely in the G pro- gramming language. Assembly was used sparingly where C was not suitable. The full source code listings are available free of charge from out website, the files are included in archive no, 040327-11. zip. Figure 9. Base Station/ Petlnspect communication flow: The user types in a command on the laptop. This is echoed back by the base station over the serial port Petlnspect replies to all received messages via the wireless link to confirm that the command has been received and actioned. Schematics! Now that we T ve talked about all the peripherals the full schematic starts 20 elrklof clKtroniu - 5/2005 to make sense. In fact it's a pretty standard circuit, with the micro con- troller surrounded by all of the peripherals talked about so far in Figure 10* There are just a few details to tidy up such as the LED and power supply conditioning. D101 is a tri-colour LED included for quick indication of sys- tem status* The LED is green when receiving ! red when transmitting and orange when an error condition occurs, such as a low battery condi- tion. U 107 is a micro -power ultra-low quiescent current voltage regulator with the sped a! property of having a quiescent current of only 1.1 uA. This is the current the voltage regulator wastes while still providing 3.0 V at the output. It also has an ultra-low dropout voltage (100 mV at 10 mA). These features mean this part is especially suited to long term ‘always on' applications with con- straints on battery capacity. The schematic for the ASH trans- ceiver circuitry discussed previously is shown in Figure 11, Component values have been changed to enable a Baud rate of 23 kbps. [3] Low power regimen With a very small battery, much time was spent optimizing for reduced battery current. The use of a 3,0V operating voltage helps reduce power consumption, but the most important factor is the amount of time spent in the various operating modes '* V £T - gjiu. I-I- + Vm T s \ 03 :i - 3,01 f M Vit "Snsnwi XI 2KXO: Figure 10. Microcontroller and Sensors Board schematic. Note the two crystal oscillators . 7b save power, the 10MHz oscillator is only turned on occasionally \ -"iinTirFi icw f/gure ? / . ASH transceiver schematic. Luckily, you con buy a DR3 1 00 transceiver PCB module pre-assembled at the (actory and change a few discrete components to alter the Baud rate. The various power modes are as follows: Sleep Mode: Microcontroller core stopped, timers being clocked by 32 kHz sub-clock for real-time clock and motion activity counters, trans- ceiver in sleep mode, 10 MHz oscilla- tor is off. Doze Mode: As for sleep mode, but transceiver is in receive mode. Low Speed Mode: As for doze mode but microcontroller core is operating from a 32 kHz sub -clock Fully Awake Mode: Microcontroller core is clocked from 10 MHz oscilla- tor Transceiver is in receive or trans- mit mode. Further work If you decide to build a Petlnspect, you might like to extend its capabili- ties by adding more peripherals. Other sensors could be included: for example, an accelerometer could be added for posture recognition. GPS is an obvious choice for tracking and a microphone could be used to measure sound levels and detect hazardous environments such as busy roads. As you can see T this article has described only the platform of a sys- tem that could be greatly enhanced by the application of your own enthusiasm and ideas. nces [1] ASSEMledi Europe Ltd., CW1 600-1 Moving Sensing Switch Product Dora Sheet, Rev B, 1998, [2] Intersemo Sensoric 5A,, MS5534A Boro meter Module Dora Sneei t DA5534_024, 2003. [3] !RF Manolimlcs Inc,, TR3G0Q ^33.92 MHz Hybrid Transceiver Datasheet TR3Q00p, rev 2000,1 2.08, 2000. Acknowledgements The hardware and software tar inis project was created as part of an M. Phil in conjunction with The University or Waikato and InferAg Ud. It was supported by the Dick and Mary Earle Scholarship in Technology and o Masters scholarship from The University or Waikato, Availability of parts and software A full schematic, PCB layout, source code, compiled executables and Bill of Materials (BOM) lists with supplier details is freely available from the magazine website should you wish to make a Petlnspect oil by yourself. This includes every- thing required far the Petlnspect base station and the programming cable. Use the executable IF you don't wan! to go to the bolher of Installing the compiler. Parts are also available through the author at , www.petinspect.com. Due to the dif- ficulty of soldering the ASH transceiver IC r it would be easier la use the Ira receiver module based on Inis same 1C by the manufacturer: the DR310Q. This module needs a few passive components replaced to convert it 23kBPS operation. The instructions to modify the DR3100 are part of the downlead from the magazine website. The only disadvantage oF the DR31G0 Is that it is a little bigger. Due to the extreme miniaturization using very small surface mount parts, ihts proj- ect is recommended for experienced electronics enthusiasts. A construction manual will be available before you commit to buying parts to ensure that you get an accurate Idea of what's required in assembling the device. You can build just one Petlnspect and download the data with a wired link oFter retrieving it from your pet. To get the most benefit however, you should build two Petlnspecrs ond conFigure one as □ base station. The base station connects to the PC serial port, allowing communication with any Petlnspect in range over the wire- less link. You can then download from Rover while he is still wearing the Petlnspect. 22 clcfctw elftfrciiia - 5/2305 pj m fxm : | Pj A o \ Jy J JA Servicing Your Complete Prototype Needs O Pmtntypasat a tract. on of Lea cost C Tooling and setup inciudsd O Anycoftianr 0 Fr4 1 6mm 35um Cu 0 Ifidi&try standard quafity 0 Foltev/ up series nm 0 CAM / CAD consisting ffKXPLuea EURQCARD asra + Tooling + Pholoplots f VAT r _ i; _ = - ? . : - e _ Eti?i !tm iti-l pEflr rSat rfsGfiefcfcpaits&rc o8 00-B® Sind ym fifes onfe MM: “ ^B-POOLCOM d oread / mam *r cifctrefixm On Screen Display Project A Versatile, Programmable, Low Cost Projects. •& PiC 16F628 micro contra liar * 28 by 1 1 character OSD * Fully programmable * Demo software available * I/O lines for sensor interface * RS232 serial interface & PAL or NTSC compatible * Enclosure option available Visit www.S iTIPNJCDM Forest Electronics - PIC and AVR C Compiler Products FED s ANSI C Compiler for PIC or AVR processors * Fully integrated editor with syntax highlighting, multiple pages etc. * Full project support - include end manage multiple source files, simulator, assembler files and notes ''comments within one project * Fully integrated simulator and waveform analyser step from C line to C line, or examine code In assembler form. View device pins using a logic analyser application. * Simulator supports LCD modules, keypad, buttons, LED r s, displays, analogue inputs, serial and asynchronous data and more. * Designed to ANSI C standards * PIC - Supports 18xxx, 16xxx, 12xxx series 14 and 16 bit core processors * AVR - Supports standard and MEGA core processo/'s * Generates MR LAB/ AVR Studio projects and source files and completely standard hex output files. WIZ-C / AVIDICY Drag and Drop rapid application development using ANSI C for PIC and A VR * Rapid Application Development for the PIC or AVR microcontroller usinq the C language (WJZ- 0 for the PIC, AVID ICY for the AVR) * Drag and drop your software component selections on to your design * Included components support timers, serial interfaces, !2C r LCD, 7 Seg displays, keypads, switches, port controls, many bus interfaces including II C and Dallas IButton, AVR PIC Hardware, and more, * Connect software components to MCU pins by point & dick * Parameters set from drop down list boxes, check boxes, or text entry * Links your cods automatically into library events (e.g. Button Pressed, Byte Received etc.) * Automatically generates your base application including full initialisation, interrupt handling and main program loop * The complete C Compiler and AVR Simulator programs are integrated into AVI DIG Y - total editing compilation assembly / simulation support in one program * Also indudes the Element Editor to enable you to create your own components with ease. * Demonstration available from cur web site Prices from £45,00 - details & demo From www.fored.co.uk Forest Electronic Developments 01590-681511 (Voice/Fax) email ; info@fored.co.uk www.fored.co.uk Also programmers, ICE, & development systems 5/2005 - tltklcr eledrcfiks 23 Movement sensors enhm He GPS reliability Ekkehard Scholz in the 1 490s when Columbus sailed the ocean blue he wasn't able to plot a course with the aid of a GPS navigation system, instead, he worked out his position on the globe (as it turned out) by meticulously recording the ship's speed and compass bearing in a process known as 'dead reckoning'. In those days it was quite common to be a couple of hundred miles out on long journeys. 24 t!=kfor elMraritcs - 5/2005 Modern GPS navigation aids achieve remarkable accu- racy in comparison bur when the satellite signal gets weak or obscured they still need to take a lesson from Columbus to fill in the gaps... The market For GPS (Global Positioning System] naviga- tion systems has grown at a staggering rate so that now there ore dedicated systems available for practically every type of travel and/or vehicle. As a consequence of the high level of system integration, mass production of specialist chips and lower production cosis of both in-car (Figure 1} and portable (Figure 2] navigation equips ment has fallen dramatically over recent years. Vehicular navigation installations use additional information from turn-rate sensors and distance trip data to help keep the system on course and display the correct on-screen posi- tion between GPS fixes . The process of positron plotting using distance travelled and compass heading is known as 'dead reckoning/ (DR). DR information is Important because it can be used in conjunction with digital map Information stored on □ CD or flash memory to update the displayed vehicle position when the GPS signal is obscured in tunnels or by tree canopy cover in a forest or buildings in town. GPS and Dead Reckoning The idea to support the GPS information with data from movement sensors is not new but it is only since the avail- ability of low cost movement sensors such as electronic accelerometers, gyroscopes and compasses that the sys- tems con be targeted at a mass-market. Navigation systems that use both GPS and DR informa- tion fall into one of two camps in they way they handle the data: The most basic system uses GPS data for posi- tional information and only foils back to DR when the GPS signal h unavailable. The second type is more sophisticated and combines both GPS and DR informa- tion to achieve better positional accuracy. SiRFDRive is a commercial navigation software package marketed by SlRF Technology that combines (or couples' both GPS and DR information. The software has good modular design to help simplify the development process of o GPS/DR system. The close coupling of GPS and DR data is achieved using Kalman navigation filtering soft- ware, This technique is essentially an optimised interpola- tion algorithm using the last position together with actual GPS information and movement sensor data to predict the next position with minimum error. A feature of Kalman filtering is that it does not use all past data relat- ing to the path taken it just calculates the new position using information from the last position, this therefore requires fewer resources bur leads to some inaccuracy. To optimise positional accuracy Kalman filtering allows Figure l. Th e Travef Pilot RNS 149 from Blaupunkt crams a car radio CD player and navigation system into a standard DIN vehicle radio- housing format (photo: Blaupunkt} an adaptive approach to DR and GPS data handling: with a good GPS signal strength GPS data has a greater influence on the Interpolated position but with poor GPS reception or low-speed travel the DR information has more influence. Movement sensors Acceleration can be measured with a closed-loop accelerometer. This device uses a servo amplifier to drive current info deflection coils positioned either side of a swinging mass to keep the moss steady. The current required to keep the mass stationary Is directly propor- tional to the applied acceleration. This type oF sensor has Figure 2: A personal nav igation aid for serious ramblers, (photo: Garminj 5, 2005 -ehUcr ckdicnks 25 Figure 3. Components of o typical car navig a lion sys iem , CD player 97007?- 11 TomTom GO ifhe story ( 1 ) A GPS system using a MfMSIC sensor, ARM controller and Linux software TomTom (hosed in The Netherlands) ore suppliers or sophisticated navigation equipment worldwide. This unit uses the CMOS thermal accelerometer from MhViSlC to provide DR data. The TomTom GO is promoted os being the smallest and most intelligent All-in-one car navigation unit in the world. This compact unit has a full colour TFT display and contains the mapping software and a GPS receiver. The unit can be mounted in the vehicle using the supplied bracket. The unit has its own Lilon rechargeable battery so it is ready to go as soon as it is out of the box and switched on. The route display can be switched between 3D or 2D representation with either day or night views. Language is selectable and the touch screen Is Intuit ' m to use. The battery can be recharged from a cigarette lighter socket. The built-in dead reckoning facility enables the unit to be good linearity throughout the measurement range and is typically capable of detecting forces of co. 20 g to a res- olution of 10 pg. The unit is shockproof (1 00 g max) and has been used in many military and civilian applications for many years with proven reliability. Two different types of turn rate sensors con be used, each relies on a different physical effect to sense rotation. They are briefly discussed below. - The vibrating gyroscope (The word gyro here sim- ply Indicates that the device senses rate of turn, it does not imply thol the device contains a rotating mass like a traditional gyroscope) uses the mechanical Coriolis force (a) experienced by a vibrating mass fhot is rotated («] in a plane orthogonal to its plane of vibration (v) (see Fig- ure 4). A piezo harmonic vibrator or capacitive driver produces the moving mass. This type of gyro is oFten used in low-cost nan-critical applications. It has □ poorer performance compared with laser gyro particularly in terms of its noise, sensitivity to mechanical vibration and its temperature dependant output drift (3 Vs], - The optical gyroscope [laser gyro ). Once again no spinning mechanics are involved but instead this type of gyro relies on the Sagnac effect to sense rota- tion. Figure 5 shows the basic Fibre Optic Gyroscope (FOG) layout. It consists of o light emitting super lumi- nescent diode [SLD), a modulator, an interference detec- tor and a coil of fibre optic cable consisting of n turns enclosing an area A. When Sight from the SLD passes through the second beam splitter one half of the beam is injected at one end of the fibre optic coil and travels in a clockwise direction through the coil while the other half is injected at the other end and travels in an anti- clockwise direction. The phase relationship of the two exiting beams is compared in a interferometer. Both beams travelled the same distance [but in different TomTom GO the story (2) An open system Technically the TomTom GO is interesting not just for its integrated Deed Reckoning feature (or "Assisted Satellite Navigation' as it is referred to by the manufacturer) but also far its system architecture. Et employs a 200 MHz ARM920T processor which was recently found to run a Linux (!) operating system. Use of Linux meant that TomTom, in response to pressure from the Linux communi- ty, eventually had to make its control software available as an open source program. This in formation together svifh some clever reverse engineering in forma iion avail- able on the Internet makes this device the most transpar- ent navigation equipment available today. With all the information available it is perfectly possible to develop the platform further, for example, os a medio player, A look at the Wiki page mentioned below details the use of a TomTom system in this field of application. TomTom are continuing with product development and unveiled three further models at the CeBit Exhibition in March. The basic GO300 has a 200 MHz processor but does not have an accelerometer or dead reckoning capa- bility. The GO500 is similar to the earlier mode! but has a clock speed of 400 MHz like the GO700. This model □Iso has a 64 MB memory and a built-in 2.5 GB hard disk with pre-installed map data for the whole of Europe. All three models have a built-in blue tooth transceiver. A software development kit called 5DK5 is also available 26 deklor ebtfr&nks-5/2Q05 PfsoJa ~dti T&t GO A® Figure 4. The principle of the vibration gyre { Picture : IMAR Navigation} used as a payable unit. Travel information and country specific mapping data far oil European countries is pre- loaded to the unit via the SD memory card. At the coun- try border it is only necessary to plug the SD card for ihe next country and carry on with the journey. Once the country-specific SD memory card is plugged into ihe unit ihe driver will have access, not only to detailed map information but also to places of interest (POIsj such as hotels or restaurants in the vicinity. Hare c&lf, stfcclrve coit surface a Figure 5. Laser gyro block diagram. (Picture: /AlAfi Navigation) The serial Port OpetlTom .■li-.iirnniij ' ri ri E 1 E , -4 . i . ri . 4 ■ it.EB.Tri..... si-u, ►sciiij ill umV. .i>jt iirii;.; J ( ilTTjfiftU- tUM i lllii ut- 4 t«i;i y* unl:i 1 i3.j limifi r.fin i n fri ns i u n r :ut m* SR |i.* J „'l ; iKIiSI , f rtftfthU rt miiEr- t 'JiUM lilCItAJti f: MJ 5! -11 f | TiJi'tiir*!; till 1)1 f iJ-J.fl r tt i : J I i i-jjft. ■wTii Ee »*:!. UlU 11 3IU-H- I i - ri't: ■ liitl.i.j f;- Si uri l: e I*, p t 6 ". -C XS\ - pi 3rilc:-t i££ :Gfr^iST (: * < > A.S232] ..Reverse Engineering' for professional with special features including a method to transfer data using GPRS radio interface. There is also an official GO development toolkit avail- able which allows the development of C+t programs under Windows using ihe Cygwin compiler. So it just goes to show that almost anything is possible with Linux... Weblrnks: wvvv/.tQmtom T com/?Languaqe=5 (manufacturers site) http://wiki.opentomBora/ (Wiki with lots of information on the TomTom Gaj directions) so the phase difference of the outputs will be zero* An interesting thing happens when ihe whole apparatus is rotated around the coil axis (where w is the angular rotation speed]* If the rotation is in a dock- wise direction then the light travelling in the same direc- tion around the coil will travel a slightly longer path because the detector has moved further away from the transmitter while the light Is in transit through the coil. Similarly the anticlockwise light beam will hit the detec- tor sooner because if has moved nearer to the transmit- ter. Coreful observation of ihe two output beams by an interferometer indicates a phase shift proportional to the rotational speed. In another variant (the closed loop FOG] ihe beam can be fed to a phase shifting element which corrects the phase difference and the amount of correction indicates ihe turn rate. Compared with mechanical or piezoelectric gyros the fibre optic gyro is much less sensitive to the effects of vibration and acceleration this Is the main reason ihey are preferred to any other type for precise measurement. The Thermal accelerometer An ingenious new type of accelerometer does not use a conventional mechanical pendulum to detect movement or inclination. Instead the unit senses tiny variations in the convection currents generated by a heating element sus- pended inside a hermetically sealed chamber. The com- plete device comprising the micro-machined chamber, heater, thermocouple sensors and amplifiers are con- tained within a 5 mm square LCC-8 chip outline. The smaif heating element is supported in the chamber and has two thermocouple sensors (for sensing single axis movement] fixed either side (Figure 6). The element pro- duces a circulating 'bubble of warm air centred between the two thermocouples. Whenever the device is moved or 5 / 20 D 5 - clckior ekcfruiks 27 surrounding air heated air Figure 6. The healed air shifts under the influence of acceleration (Picture: Mem&ic Inc ) — i i i- ; temperature sensor heating cavity silicon substrate inclined along its sensing axis the bubble of war m air shifts [it has □ different mass from the surrounding air in the chamber) so that one thermocouple now becomes warmer and the other cooler (proportional to the rate of acceleration or angle of incline). The two thermocouples are connected as elements in a Wheatstone-Bridge so that the voltage change outputs a difference voltage [Fig- ure 7). The output signal indicates the direction and force of acceleration- The sensing axis is horizontal to measure velocity increase/decrease or tilt angle. This device is builMnto the TomTom navigation system (see insets] and is particularly flexible for stand-alone applications because the unit is completely self-contained and does not require an interface to any vehicle sensor. Acceleration Figure 7. As accele ration or inclination increases so the temperature difference ge/i lorgec (Picture: M&nsic Inc.) Acceleration No Acceleration Distance E-biocks dra email tirctit boards aatin or vmlch contains a Keck of e’Bcirofiics Eyp'cally found in an electronic system . E-blocks can be prog rammed in C, Assembly and era tightly Integrated with Fkwcode - which Instantly converts flow charts into PlCmfcro code, Lew cost USB PiC prog rammers {S tertsng at £ 27 . mo&tf 5 ftown ESS) ..plus a wide range of ......plus incrwfiMy easy ...equals extremely rapid system add-on boards and to use software based on development like this mobile text messaging accessories..* flow charts... system built from E-blocks. ...and solutions for learning and development... Hands on training courses Resources for learning Complete courses In CPLO programming electronics and programming Equipment for datalogging, control and PC ‘scopes mi Eftra m m see www.matrixmultimedia.co.uk ...and more at: Matrix Multimedia Limited s a !es@ matri xm ul ti m edl a .co. uk L 0870 700 1831 L 0870 700 1832 28 elector ektroriits- 5/5005 SERIAL COMMUNICATIONS SPECIALISTS Test and Measurement Solutions featured products NETCOM-813 8 Port RS232/RS422/RS485 model £350 NETCOM Ethernet- Serial Servers NelCom are industrial strength, network based serial device servers for connecting RS232 f RS422 and RS485 serial devices di redly to a 10/1 00Mbps Ethernet network running TCP/IP, Netcom can control 1 or more serial devices located virtually anywhere (via Ethernet or Internet), NetCom can be configured over Driver Panels, WEB Browser Serial Port, Telnet or SNMP and serves as a transparent serial channel without platform and distance limitation. Housed in a sturdy metal enclosure including DIN rail mount, one to eight port models are available. 19in rack-mount versions with internal switch mode PSU can also be supplied. priced from £85 i NetCom 111 ) DS1M12 Oscilloscope / Datalogger 2 iMS/s Input Channels + waveform generator output , PCI-800L 8 Pori PCS RS232 Serial card £150 (including cables) USB Instruments - PC Oscilloscopes & Logic Analyzers Our range of PC instruments may be budget priced but have a wealth of features normally only found in more expensive ins- fomentation. Our DS1M12 and PS40M10 oscilloscopes have sophisticated digital triggering including delayed lime base and come with our EasySoope oscilloscope / spectrum analyzer / voltage and, frequency display application software and our EasyLogger data logging software. We also provide Windows DLLs and code examples for 3rd party software interfacing to our scopes; Our ANTS and ANTI 6 Logic Analyzers feature 0/16 capture channels of data at a blazing 500 MS/S sample rate in a compact enclosure. priced from £125 ( IJS1M12 & ANT8 ) 1 to 16 port USB to Serial Adapters With over 16 different models available, we probably stock the widest range of USB Serial Adapters available anywhere. We offer converter cables, multi-port enclosure style models in metal and plastic, also rack mount units such as the US B-1 6COM- R M opposite. Serial interfaces supported include RS232, RS422 and RS485. We also supply ppto-isolated RS422 and RS4S5 versions for relaible long distance communications. All our USB Serial products are based on the premium chipsets and drivers from UK company FTDf for superior compatibility, performance and technical support across Windows, MAC-OS and Linux platforms. priced from £20 { US232B/LG laptop Companion } PC! Seria! Cards Discover our great value for money range of mulli-poit PCI serial cards. Supporting from two to eight ports, the range includes RS232, RS422, RS485 and opto-isolated versions. Our 4 port and 8 port models can connect through external cables or the innovative wall mounting COMBOX. Easy Sync Ltd 373 Scotland Street, Glasgow G5 8QB, United Kingdom Tel: 0141 4181001 / Fax: 0141 4180110 Web : htlp:/Avww,easy sync, co.uk E-Mail: sales@easysync.co.uk * Prices shown exclude PP and VAT where applicable A&flom®9iiV0 §ei$§or§ Sense Organs Helmuth Lemme Modern vehicles are computer networks on wheels in which sensors provide the links to the real world. These sense organs for the onboard electronics are subject to extremely severe requirements. Here we provide an overview of the virtually unlimited variety of sensors and highlight current trends and new developments. The components of a Bosch ESP system: ) } ESP hy- draulic unit with control system, 2] w heel rpm sensor 3} steering wheel sensor, A) rotation rote & acceleration semap 5) control unit far communication with the motor- management system. 30 ekUD! drrtjonks - 5/2005 Increasing competitive pressure is forcing motor vehicle manufaciurers to make ever more sophisticated innova- tions. This applies not only to passenger vehicles, but also to commercial vehicles such as lorries and busses, and of course to motorcycles as well* The decisive improvements made in recent years are: - increased driving safety, - reduced fuel consumption, - reduced environmental pollution, - increased comfort and convenience, and - improved diagnostic functions. To moke all of this possible, many physical quantities - mechanical, thermal, and other - must be measured at innumerable locations in the vehicle and conveyed to a microcontroller. The microcontroller monitors the measured values and triggers suitable control functions as necessary. In contemporary top-end vehicles, the number of sensors can easily run into the hundreds, and motor vehicles are gradually turning into mobile electronic fortresses. Generally speaking, the trend is moving away from inde- pendently operating individual modules and toward full networking of the entire vehicle using suitable busses. In a manner of speaking, the objective is to have every nook and cranny know what s happening everywhere else. Some or the functions that would be inconceivable without sensors are: - ABS (anti-lock braking system): brake lack- ing is prevented by reducing the pressure on the brake pads under electronic control in order to maintain the steerability of the vehicle. - ASR (acceleration slip regulation, a,k.a. Trac- tion control'): prevents individual wheels from spinning. - ESP [Electronic Stability Program): prevents skid- ding in order to keep the vehicle on the course desired by the driver - ACC [Adaptive Cruise Control): automatic control of the optimum distance from the preceding vehicle according to the vehicle speed. - Minimising harmful emissions by monitoring the exhaust gas and suitably adjusting the fud/alr mixture. - Triggering airbags in case of a collision - but only if the associated seat is occupied. - Backing off a window if it cannot be raised without encountering resistance (because a finger is in the way, for instance). - Warning signals for doors that are not properly closed while the vehicle Is moving, insufficient fuel in the tank, icy roads, seat belts thai are not fastened,, and so on. As human life, significant property values and ihe reputa- tions of entire corporations depend on the trustworthy operation of these sensors, they ore subjected to extremely strict reliability requirements, the ambient con- ditions raced by these sensors are challenging, with tem- peratures ranging from well below freezing (-40 "G] to the sizzling heat of a highly overheated engine [160 Z C, with brief excursions up to 200 ~C), as well as rainwater, ice, de-icing salts, oil, brake fluid, battery acid, dust, exhaust gasses, vibration, mechanical shocks, and strong electromagnetic Fields arising trom the immediate vicinity. Besides being secure against total failure, the sensors must maintain their measurement accuracy within speci- fied tolerances under all of these conditions over many years. At the same time, they are also exposed to unre- lenting cost pressures. As a result, only a small fraction of the nearly unimaginable variety of commercially avail- able types or sensors con meet the selection criteria. Fig- ure 1 gives an overview of the most significant vehicle systems incorporating sensors. Engine sensors Here one of the most important quantities to be measured is crankshaft rpm. The 'classic' way to do this is to use an Inductive sensor consisting of a coil and a permanent magnet. A steel cam or lobe is located on the shaft. When it passes In front of the sensor the magnetic flux through the call changes. For each rotation of the shaft, a single voltage pulse is induced and then further processed by the electronic circuitry. Another option involves a magnet attached to the shaft. If this type of sensor is located next to a gearwheel or a magnetised wheel with several poles (multi pole ring], a corresponding number of pulses will be obtained for each rotation of the shaft. This principle is simple and economical. The frequency of the generated signal is a measure of the rpm. However, a drawback of this approach is that the voltage that Is generated is also pro- portional to the rpm, so it is difficult to sense very low rotational speeds. This problem can be avoided by using a sensor that responds to a static magnetic field, such as a Hall-effect sensor or a magnetoresistive sensor. Such sensors are wear-free and reliable, and they are already widely used in automotive systems due to their low cost. The second important quantity is the instantaneous angu- lar position of the crankshaft or the camshaft, which rotates at half the speed of the crankshaft in a four-stroke engine. This quantity is needed by electronic ignition con- trols, Inductive and magnetic sensors are again suitable for this purpose. The development trend Is moving away from traditional mechanical valve control and toward electronic valve control. The Siemens/VDO Electronic Valve Train (EVT) system, for Instance, provides an increased range of options for valve opening and closing times and thus allows the engine to be operated more efficiently. 5/2005 - elcklcr derirontEs 31 Figure /_ Sensors are used in a wide variety of vehicle systems. •jp # u .cr A ^ / Jp j5/ V j. J? ,/#' , ^ J- j? ;* # ,.{M !~'' . ,# $? ^ ^ J* P .v J> ^ J? \ V 5 i ,/V *’ f Another parameter that requires monitoring is the engine temperature, since overheating due to failure of the cool- ing system poses a serious threat. Semiconductor sensors and metallic sensors [using platinum or other metals} ore suitable for use as temperature sensors. A flow sensor in the fuel supply line can provide an indi- cation of the instantaneous fuel consumption. However, it con be omitted with modern fuel-injection engines, since the amount of fuel being consumed can be precisely cal- culated from the volume of fuel delivered by the injection pump. The on-board computer con then compute and dis- play the average consumption per 100 km, the total can- sumption since the lost reset, and (if the amount of fuel in the tank is also included in the computation) the antici- pated distance that can still be travelled. Measuring the amount of air taken in by the engine (or more precisely, the mass of the intake air] is very important for optimum engine control. As is well known, air density depends on the air temperature and elevation above sea level. With sensors that essentially measure the air volume, the measured value must be suitably corrected. Mechanical airflow sensors use a potentiometer to sense how far a flap (air vane] located in the air stream is deflected by the dynamic pressure. Moving parts can be dispensed with by using thermal airflow sensors (hot-wire and hot-fifm airflow sensors). Such sensors use □ platinum wire or small ceramic plate with a platinum heating ele- ment and vapour-deposited metal-film resistors as sensor elements. The cooling effect of the air stream flowing past the sensor is compensated by using a closed-loop control system to maintain the sensor or a constant temperature. The heating current required to maintoin the sensor at a constant temperature Is proportional to the airflow and thus provides a measure of the mass airflow. Torque measurement Modern automatic transmissions are controlled by micro- controllers. To determine the optimum shifting paint, the microcontroller needs information about the amount of torque generated by the engine as welt as the crankshaft rpm. This represents a particular challenge to sensor designers, since this quantity must be measured an a rotating shaft. One option is to use the magnetoelastic effect, which is the change in the magnetic permeability of steel under mechanical stress. Another option is to measure the torsion of the shaft by using two incremental angular sensors located a certain distance apart. 7 x by wire 7 When the driver is assisted by electronic aids such as ASS, A5R, ESP, ACC and so on, the control elements (throttle and brakes) are no longer directly actuated by mechanical links to the pedals. The circuitry connected between the pedals and the control elements has its own 'intelligence" and takes corrective action if necessary. This is referred to as drive by wire and broke by wire. 32 clckler efeftnjfila - 5/ 2 QOS The pedal positions are sensed using angular sensors, usually potentiometers, which are subject to extremely severe reliability requirements. Normal types of poten- tiometers with carbon tracks wear over time, with the result that their resistance increases. Besides this, the wiper can intermittently lift off the track due to soiling. Increased service life can be achieved by using zero- wear designs, such as a new Novotechmk product that combines Inductive and resistive operating principles. In this sensor, a sliding Ferrite yoke modulates the inductive coupling between two conductive loops. The degree of coupling is measured by an attached ASIC. Electronic power steering In a few standard production models, the force for power steering assistance is provided by electric motors instead of a hydraulic system. This has the advantage of reduced fuel consumption and lower weight. Electric power steer- ing requires an angular sensor attached to the steering wheel to measure the total angle of rotation over a range of around four full turns. The output signal from this sen- sor is also important for the ESP system. The steering- wheel sensor can use a potentiometer or employ optica! or magnetic effects to sense rotation. Steer by wire refers to a purely electronic steering system similar to the systems used in aircraft, with no mechanical link between the steering wheel and the front wheels. It is presently in the research stage and not yet ready for mass production. The safety requirements in this area ore extremely high. An interim solution developed by Bosch allows the electronics to intervene via a planetary gear drive. If the electronics Fail, the vehicle can still be steered using the mechanical system. Brake by wire is also a reality in the form of on interim solution with an electromechanical brake pedal that elec- tronically controls elecirohydraulically actuated brakes. Besides safety considerations, the primary obstacle to a purely electrical system is the fad that the amount of cur- rent necessary for operation with □ 1 2-V electrical system would be too large for practical implementation. Conver- sion to a 4 2-V system, which has been urged for same time now (see the February 2000 issue of Elektor Efec- tronics), is being kept on hold by the industry, primarily for cost reasons. Minimising pollutants Minimising pollutant emissions requires maintaining on optimum air/fuel ratio (Aumbda) in the engine intake mix- ture. The lambda sensor in the exhaust pipe is an oxygen sensor based on the principle of ionic conduction in a solid electrolyte. The signal from the lambda sensor is used to adjust the fuel/aSr mixture fed to the engine. Lambda sensors have also become technically sophisti- cated devices, and they are available in numerous ver- sions to meet different requirements. Intelligent windows Besides position sensors that switch off the motor in the .fully open and fully closed positions, electrically operated windows and sunroofs hove force sensors to detect resist- ance to the closing motion. This is because there's a risk of body parts being trapped or pinched, particularly RF prompt A»> («AiL_ tensor reply isn i SAW transponder scanning module SAW sensor module circuit SAW wheel- rim ante nna wheel case a me n na capacitive pressure sensor Figure 2 , A senior system for measuring pressure and temperature in rotating tyres using c surface acoustic wove fra n spondee { SC , ' r ' 5 f .T = " S' ■' DO . when children carelessly play with the windows or sun- roof, The windows and roof are required to automatically open again if resistance is encountered. One sensor that has been specially developed for this purpose is the Infi- neon TLE49x6. This is a dual Hall sensor containing two Hall-effect elements on a single chip, which determine the position and direction of motion. Tyre pressure and brakes Tyres are among the most important saFety-rela ted compo- nents. Tyre damage has been responsible for innumerable accidents. Underinflation is particularly hazardous, since excessive sidewall flexing can cause tyres to overheat and rupture. Electronic monitoring systems can provide an advance warning of underinflation. They are initially being fitted in commercial vehicles [lorries, buses, etc.), A special problem in this case is transmitting the meas- urement data from the rotating wheel to the (relatively) stationary chassis. Wireless links are much more reliable than slip rings for this purpose. With a wireless system, pressure and temperature sensors are linked to a transmit- ter inside the tyre that sends the measurements using radio waves. Early versions of such systems were pow- ered by lithium batteries, but eliminating the battery is desirable for maintenance reasons. Modern baileryless systems, such as the Tire IQ system developed by Siemens VDO Automotive and Goodyear, use surface The individual com- ponents or a Bosch ESP system. Eis-;- 5/2005 - deleter demerits 33 Figure 4. A micramechankal rotation-rate sensor senses the rotation of the vehicle around its vertical GX iS. \ 5c-. rze: Bosch ! acoustic wave Iran spenders powered by the RF field. AB5, ASR f and ESP systems need to know how fast the wheels are turning. In early systems this was determined using inductive sensors such as those already mentioned, with ihe disadvantage that they give poor results at low rotation speeds. Magnetic sensors using ihe Hall effect and various types of magnetoresistive sensors have proven to be superior for this purpose. Electronically enhanced driving stability Many accidents are caused by skidding. The Bosch Elec- tronic Stability Program (ESP) illustrated in Figure 3 Includes ABS and ASR functions and goes even further. It detects any skidding motion of the vehicle at a very early stage and actively attempts to counter the skid in order to bring the vehicle back under control. This is done by suit- ably braking individual wheels ond reducing engine power. To do this, the controller correlates the angular position of the steering wheel and ihe applied braking force with the rotation of she vehicle about Its vertical axis (yaw rote) ond the vehicle's speed. There ore many different types of sensors that con be used to measure the yaw rate. Most of them make use oF the Coriolis force, which causes the oscillation pat- tern of a vibrating micromechanical structure (such as a rotary pendulum or a tuning fork) to change when it is rotated. This change is detected by variations in the capacitance between the oscillating element and the substrate (Figure 4). If a vehicle rolls over and comes to rest on its roof or Its side, the tightly cinched safety belts must be loosened to moke it easier to free the occupants. A tilt sensor can be used to sense the attitude of the vehicle. Many different operating principles can be used for such sensors, but sensors based on thermal principles are especially suit- able for manufacturing small, inexpensive devices. Such sensors contain on electrically heoted wire surrounded by a bubble of hot oir. If the sensor is horizontal, the two temperature sensors on either side of the heater receive the same amount of heat. These sensors are wired into a measurement bridge whose output voltage is zero in this condition. If the sensor is tilted, the sensors will have dif- ferent temperatures and there will be a nan-zero output voltage. At least two manufacturers (Memsec and Vagi) presently offer this type of sensor [see also the 'Mobile Navigation article in this issue). Reliable fuel level measurement The common method for measuring ihe fuel level employs a tank float connected by a lever arm to a potentiometer that is sealed to prevent fuel penetration. With such an arrangement, wear con lead to incorrect readings with unpleasant consequences. Siemens-VDO manufactures a wear-free sensor. It con- tains an array of magnetically actuated contact elements resembling a harp. The field of a magnet attached to the float lever passes through the case and doses individual contacts in turn (Figure 5), Morgan Electro Ceramics has introduced a completely different principle that does not require a float. It uses ultrasonic waves emitted by piezoelectric transducers In the floor of the tank to measure the fuel level. The level is determined by measuring the travel time of the reflected waves. Figure 5. .A high-reliability fu- el level sensor with many fine contact arms actuated by an external magnet passing alongside the contacts. [SCrJ.'C*! VDQ} Personal safety writ large The utmost In reliability is demanded for airbag deploy- ment sensors. They must respond with absolute certainty when o collision with a certain force level occurs, but oth- erwise they must never respond to shocks below the threshold level, in order to prevent them from actually causing an accident. The sensors used for this purpose □re acceleration sensors. Many different operating princi- ples can potentially be used for this purpose. Most of them involve an inertial mass suspended using a spring mechanism, with ihe deflection of the mass from its quies- cent position being sensed. MEcromechanical versions etched from monolithic silicon crystals are widely used. Deflection of the mass causes the capacitances between the fingers' of interleaved comb electrodes to change, and this change is measured by electronic circuitry Inte- grated into the same chip. Despite their delicate micro- scopic structures, such sensors have outstanding durabil- ity (Figure 6). 34 el e a for d edronits- 5/211 05 If ihs passenger seat is empty, there is no point in trigger- ing the passenger-side airbag if there is an accident. One v/ay to implement occupant classification [OC) is to place a synihetic composite mat containing forcecfepend- ent resistors beneath the seat upholstery in order to meas- ure the pressure distribution profile [this approach has been developed by Bosch and 1EE). If no pressure is pres- ent, the airbag is not triggered, even if a child seat is Fit- ted, Other options include force sensors fitted la the four seat attachment points [see Figure 7 ) ond 'intelligent bolts J [the Bosch iBa/r system). In this case, evaluation cir- cuitry computes the weight on the passenger seat ond the weight distribution and derives o suitable airbag deploy- ment strategy from this information: full deployment, soft deployment, or trigger suppression. Internal and external climate Regardless of what the weather may be like outside, the climate inside the vehicle should be comfortable. Regu- loted air-conditioning units are becoming Increasingly common. Their temperature sensors usually operate on the principle of resistance variation. The driver needs clean air In order to give his or her best attention to the task at hand. During travel through a tun- nel, the concentration of noxious gasses (COj, CO, NG X , and unbumed hydrocarbons] can increase sharply. In this case, it is better to block the supply of external air and allow the interior air to recirculate until the outside air is again clean. This can be accomplished using an air quality sensor that measures the concentration of undesir- able gasses [essentially CO and NO x ) and doses an inlet flap valve when a threshold value is exceeded [such sensors ore made by Bosch, for example). Windscreen wipers that automatically switch on when it starts raining reduce the burden on the driver. Rain sen- sors operate optically using a combination of an LED and an infrared photodiode. The reflection characteristics of the surface of the windscreen are different when ft is dry and when it is wet. The speed of the windscreen wipers can also be adjusted according to the measured amount af rain. Other types of sensors, such as a system made by Preh, detect mis! on the glass and suitably control the air conditioning system. An outside temperature display on the dashboard is par- ticularly important in the winter. Many modern vehicles have temperature sensors to warn against black ice com ditions. They are fitted far enough away from the engine and exhaust to prevent them from being aFfected by warmth from those sources. Faultless navigation Navigation systems ore becoming increasingly popular. They determine the position of the vehicle using a GPS receiver, but they don't work in tunnels or underground car parks. In order to determine the orientation of the vehicle, it is also necessary to use an electronic compass with highly accurate magnetic Reid sensors. Hall-effect sensors are far too insensitive For use with the earth's magnetic Field (approximately 40 jjT) , so flux gate sen- sors (which are distinctly better but more expensive) ore used instead. The earth $ magnetic field can be locally distorted due to perturbing influences such as concrete buildings contain- Figure 6. An acceleration sensor for triggering on airbag built m the farm of a micro- mechanical de vice with an inertial fTrOSS that h deflect- ed from its quiescent position. {Source fs.-L.T_- ing a large amount of steel, ond of course the body of the vehicle also distorts the field. For this reason, naviga- tion systems use the distance travelled by the vehicle as □ form of supplementary information. This distance con be obtained from the number of wheel rotations or by twice integrating the data obtained from an acceleration sen- sor. The rotation angle of the steering wheel Is not suffi- ciently accurate for measuring travel along curves. The previously described yaw-rate sensors provide a more reliable source of information in such cases. Automatically keeping a safe distance Electronic distance sensors moke parallel parking easier. Piezoelectric oscillators in the bumper emit ultrasonic pulses and receive the echoes. The pulse delay is o meas- ure of the distance. The measurement range is around three metres. At high speeds, one of the most common causes of acci- dents is following too closely behind the vehicle in front. Figure 7. Electronic seat cccu- panc y detection us- ing force sensors at the attachment points, ; 5r?j rce: E'e-~ efis - V D2 • 5/2005 - ehkfor ckdrortfa 35 A radar sensor can measure the distance using millimetre waves in ihe 76— 77 -GHz. frequency band. The beam is tightly focuses to avoid interference from objects along- side the road. In the Bosch Adaptive Cruise Control (ACC) system, four overlapping radar beams scan the space In front of the vehicle with a measurement range extending up to 200 metres. This system con also detect several different vehicles within the measurement range. The next step is to fit short-range radar monitoring sys- terns in regular production vehicles. The prerequisite for such short-range radar (SRR) systems is approval of the 24-GHz frequency band for this application [see the ''EU Frequency Wrangle" inset). Radio amateurs will not be happy! What we hove briefly described here represents only a fraction of the sensors currently being used in modern vehicles. Innovations are proceeding so rapidly that the number will multiply in just a few years. Hopefully, this will have the effect of making vehicles even safer, more fuel-efficient and cleaner. EU Frequency Wrangle One distance warning radar system already available os a regular production item which was christened 'Adaptive Cruise Control (ACC) by Bosch operates In the 77-GHz frequency band and has a range of more than 1 00 m, but it is expensive and occupies a relatively large amount of space in the can In addition, it only scans a relatively nar- row region directly in front of the vehicle. The industry anticipates that a significantly larger contribu- tion to reducing accident statistics could be realised using short-range radar, which Is intended to provide full-perime- ter monitoring with a range of up to 20 metres. For this purpose inexpensive radar sensors operating in ihe 24- GHz frequency band hove been developed, and an indus- trial consortium called SARA (for Short range Automotive Radar frequency Allocation') was founded with the objec- tive of having this frequency band be approved interna- tionally far broadband automotive radar sensors. Although this regulatory objective was already achieved in 2002 in the USA, the EU commission chose the 79-GHz frequency band instead in mid-2004. This was because some of the Member States were afraid that there would be interference with the 21-26-GHz band which is used for applications such as point-to-point radio links, weather satellites, radio astronomy and police radar. Besides putting export-oriented manufacturers in the EU at a competitive disadvantage, this decision created a con- flict with the EU's own objectives. The European Action Programme far Read Traffic Safety' obliges the Member States to achieve a 50-percent reduction in the number of traffic accident victims by 2010 (relative to 2000), This objective cannot be achieved without using driver assis- tance systems based an short-range radar (SRR), and with- out access to the 24-GHz band it will take severci years until such systems are available since currently available 79-GHz sensors use expensive GoAs semiconductor devices and are not sufficiently mature. The solution to this problem was found In a typical EU compromise, consisting of limited-term approval of 24- GHz systems with various restrictions, reservations. Interim reports and monitoring measures. The decision of the commission on 17 January 2005 affirms in principle the previous decision to use the 79-GHz band, but it allows the 24-GHz band to be used 'as long as the proportion of vehicles fitted with such systems in each national mar- ket Is less than 777 and adds that Tt rs presently assumed that this limit will not be reached before 30 June 201 3 This rule only applies to new vehicles for which the system is fitted as factory equipment, but their 24-GHz radars may still continue to be used after 2013. An especially original aspect Is the establishment of prohi- bition zones for protecting radio astronomy stations. When a vehicle approaches such a prohibition zone, the 24-GHz radar sensors In the vehicle are to be disabled. Up to 30 June 2007, manual disabling by the driver is permissible, but after that date only vehicles whose 24- GHz systems are automatically disabled (In whatever manner) when approaching such a prohibition zone will be approved for registration. Be that as It may, the automotive industry Immediately gave the go-ohead for Introducing 24-GHz technology as factory equipment, which means that all newly developed models can be fitted with it. Naturally, this will start with the top-end models such as the new Daimler-Chrysler 5 class in the second half of the year. Ernst Krempelsauer 36 dtp.foi 5 htirer’t s - 5/2005 N o1 Number One Systems The world beating PCB design software Easy= for Windows Easy-PC version 8 just gets better Winning accolades the world over, Easy-PC for Windows V8 is a major milestone in the evolution of this extremely popular software tool. Try a demonstration copy of Easy-PC and prepare to be amazed at the power, versatility and remarkable value for money* ijkA A F*- f w si L 0 t-i-J #■ fl 4 Version 8 fetaures ■4 □ Sketch Mode Routing H ODB++ Format Export H Import Bitmap El SEngfe-Sided AutoRoute ■ Customisable Toolbars □ Auto Smooth & Mitring of tracks □ Wires & jumpers ■ Unified Quality Check Plus lots more. Fully integrated Schematics & PCB layout in a single application complete with forward and back annotation. Design and rules checks at all stages ensure integrity at all times. Professional manufacturing outputs allow you to finish the design process with ease. Stop press,,. Stop press,.. Stop press... Stop press*.. Stop press.., By customer demand now with Eagle import as well asTsien Boardmaker 2 import call for a brochure, prices St CD on +44 (0) 1684 773662 or e-mail sales@numberone.com you can also download a demo from www.numberone.com f|r i.* , -i . . r* ♦ JL'V. vi.iL ST* Number One Systems - Oak Une - Bredon - Tewkesbury - Glos - Uniced Kingdom - GL20 7LR UK PicoScope 3000 Series The PicoScope 3000 series oscilloscopes are the latest offerings from the market leader in PC oscilloscopes combining high band widths with large buffer memories. Using the latest advances in electronics, the oscilloscopes connect to the USB port of any modern PC making foil use of the PCs 1 processing capabilities, large screens and familiar graphical user interfaces* High performance: lOGS/s sampling rate & 200MHz bandwidth 1MB buffer memory High speed USB 2.0 interface Advanced display & trigger modes Compact & portable Supplied with PicoScope £ Pic d L og softwa Tel: 01480 396395 www.picotech.com/scope264 7 ediiH \U y JLimUed 5/2005 - elckloi tEsdntnlu Z7 This article is intended for those readers who work on all types of models which include combustion engines, such as airplanes, cars, boats, and other vehicles, who would like to be able to adjust the heating current of the glow plug and have an indication of its physical state. This circuit is specifically designed for hobbyists who use models which include combustion {or more generally, thermal) engines, generally operating with a mixture of oil t methanol, and mtromethane. The combustion of this mixture is used to maintain the glow plug filament at a sufficient tempera- ture to ensure proper engine operation without an external power supply Of course, during start-up, an initial energy boost is required in order to produce internal combustion which will then automatically continue spark plug incandescence. Generally, a small external battery (1,2V low amp cell) is used to ensure glow plug heating and does not permit the heating current to he adjusted. Moreover, how many times do we all forget to recharge the battery the night before, or it simply went dead after prolonged use with a stubborn engine. In connection with field boxes equipped with power panels that can carry out this function, the methods employed by the manufacturers are somewhat obsolete (but we imagine, very in expensive) because they usually rely on a simple resistor inserted between the power supply (car bat- tery) and the glow plug. The heat produced by such a device is sure to quickly bring it back to our attention! Obviously, an active, more intelligent circuit is required. Glow plug heater The core of tills set-up relies on an ST- type microcontroller, the 5T7FliteQ5. You can find the datasheet at the fol- lowing url: yjww- st .com Aston 1 1 n e /hook s ; a scii/dc-cs ■ 8348.htm . This tiny ‘black box' is only Light in name; it actually integrates no less than L5 kB of Flash memory 128 bytes of RAM, as well as numerous peripher- als which make it a top performer using a minimum of external compo- nents. For our set-up, we happily use its internal RC oscillator (calibrated to 1%), an integrated PLL ensures an 8- MHz clock of the core, multiple inter- rupt sources (external: pushbutton; internal: RTC counter), the analogue- Figure L The diagram of our Glow Plug Heater is remarkable tor its simplicity: a modern microcontroller assisted with a few external components . digital convener (ADC) as well as the PWM mode (Pulse Width Modulation) of the 12-bit counter. Operation relies on a switching power supply design generating current pulses in the glow plug filament in order to heat it up to the proper tem- perature and so enable the combustion engine to start, €Srcust diagram A quick glance at the diagram shown in Figure 1 is sufficient to realize the small number of required components: rhis microcontroller is indeed perfectly sized for this application. Everything is already integrated, no nee d for an external quartz crystal, a load resistor for the pushbutton, or an amplifier for current detection. A small 5-V regulator supplies power to the ST7Flite05. This microcontroller handles several functions: 1, Generating the PWM signal at 10 kHz frequency at pin PA2. 2. Reading the desired current using potentiometer PI and an on-chip analogue-to-digital converter (ADC). 3, Continuously reading the actual heating current using the ADC and an internal operational amplifier. 4, Displaying the current and state of the glow plug on a multicoloured LED bar. 5. Validating/de activating the heat- ing current with the pushbutton SI. Output stage A glow plug filament employs a con- siderable amount of current — any- where up to 10 amperes at just 1 volt. Tire power wall be supplied by a tradi- tional MOSFET BUZ11 (usually found in the drawers of every electronics specialist). We could have chosen a Logic Level MOSFET so we wouldn't have needed a pre-stage (R2 r T4) to 5/2005 - ebklflr ekdredcs 39 Figure 2. Copper frock layout artd component mounting plan of the FCB designed for this project. Figure 3. Finished example of the Glow Plug Heater. drive the gate signal (5 V to 12 V) T but this type of component is less common and usually more expensive than simi- lar 12-V components. R2 is the 12-V load resistor which is used to drive the push-pull input stage, composed of T1 and T2. These two transistors are used later to ensure very rapid charging and discharging of the EUZ11 gate, despite the relatively high value of resistor R2, Those of you wishing to use a different MGSFET (N-chaimel) could lower the value of R2 in order to shorten the switching time, if necessary. However, be careful not to make it too short because this resistor constantly dissi- pates energy. Current level detection is ensured by COMPONENTS LIST Resistors; Rl = 470Q R2 = 4k Q7 R3/R4 = 1Q5 R5 - IGkQ R6 = CLQQ5 (50 mQ) ?J = 1 kQ PI = 1 OkO logarithmic low potentiometer Capacitors: Cl r C2 r C3,C6 = 100 nF C4 = 1 OpF/25 V C5 = not used C7 - luF 25V C8 = 10nF Semiconductors: T1 = BC547 12 - BC557 T3 - BUZ 1 1 T4 = BS1 70 1C 1 = ST7FLITE05 (programmed,, order cade 040239 - 41 ) IC2 = 78L05 D1 = LED red, 3mm, ultrabrig ht D2,D3 = LED, orange., 3mm, ullrabright D4-D7 = LED, green, 3 mm, ultrabrignt D5 = 1 N5820 Inductors: LI = 47pH Miscellaneous: Si = pushbutton, 1 make contact K1,K2 = 2-way PCB terminal block, bad pitch 5mm PCB, rel. 040329-1 ( available from The PCBShop 40 eSeVtar eledrortccs - 5/2005 one 50-mn resistor, R6, and one R/C combination (R7/C7) which supplies a few tens of millivolts to pin FBI, Diode D5 protects against unwanted voltage spikes during switching. Resistor R5 is used to verify the presence of a glow plug and to make sure that it is work- ing (low state detected on pin PA7 of 1C 1 in this case). We have yet to discuss the function of inductor LI, Due to the type or load (likened to a very low value resistor), the tungsten filament efficiently restores the energy which has been stored during current pulsing, so that we observe averaged intensity of the current without, theoretically, the need to add an inductor in the output stage. We have, however, opted for safety, in our glow plug as well as in the models being worked on nearby (the wire con- necting the glow plug set-up could act as an antenna and be a source of potentially dangerous spikes) so we added inductor LI. We did not want to make a big deal out of a few extra square centimetres of additional PCB surface required by the inductor which has to be capable of withstanding tens of amperes. Construction and operation The single- sided circuit board of which the track layout and component mounting plan may be found in Fig- ure 2 does not elicit any special com- ments. First, we put in the wire bridge, then the resistors, the capacitors, the induc- tor, and the integrated circuits (be careful with the polarities, 1C1 should be mounted in a high-quality socket) and end with the connectors, Kl, for the supply voltage (-hi 2V) provided by a mains adaptor or an old car battery (as is ustmary in the modelling world), K2 is connected to the glow plug, and finally the potentiometer. A small heatsink will be necessary to cool the MGSFET and the diode, considering the currents they have to withstand. Before inserting the microcontroller in its socket, you should verify that the -r 5 V supply voltage is present at pin 2 after having connected the (unloaded) circuit to a I2-V source. Next, after hav- ing cut the power, mount the ST7Flite05 and turn the potentiometer fully counter-clockwise to make sure that the heating current is adjusted to a minimum setting. Plug in to the power supply. Since no glow plug is hooked up at this time, the various coloured LEDs {1 red, 2 orange, and 3 green) should light up in sequence (light chain) to signal that nothing has been detected (or that the glow plug has burnt out... if of course it is con- nected to the circuit!). Next, adjust the current using the potentiometer Be careful not to over- load the glow plug or risk burning out the filament (you should watch it, especially when using 'hot' glow plugs which have finer filaments than J c old’ types). Just making the filament slightly red is usually sufficient. Then, all that is left to do is to press pushbutton SI to heat the glow plug filament. The circuit draws about 11 mA without load. In conclusion The program running in the ST7F!ite05 micro was written in C and compiled using a METRO WE RK5 compiler (www.met rowerks.com). In addition, another C compiler is available at CG5- MJ C m vw. co s mic-s o ft ware - c om ) . Free beta versions and Lite versions limited to a few kilobytes can be used to work without any restrictions on this type of micro. The program may he downloaded for free from our website, or obtained on disk (order code 040236-11) for the convenience of those readers who do not have access to the Internet. The program can be modified to your liking, although we must add that a minim al knowledge of the C programming language and an ST7 programmer will be necessary. Inexpensive programming tools, uti- lized by the whole family of Flash ST7 microcontrollers, are also available at ST Microelectronics [stick programmer) and Sof tec- micro systems (Indart STX/D), which can also be used to debug the application if necessary. * 4 : 239 - 1 '. Internet Links Metrowerks: v/ww. m e trov ve rk s . com Cosmic: \v\vw. c os m \ c-s o Eh vq re.com ST: vwAv.sl.com About the author Florenr Coste graduated In 2000 with an Engineering degree in Microelectronics from the Charles Fabry Institute in Marseilles, France, He is employed by STmicraelectronics as a software engineer in application development and support and is based in Hong Specializing in microcontroller soft- ware, he has worked closely with Asian customers far two years in order to utilize multimedia platforms. He specialized in motor control applications v/hich led him to devel- op projects on micros (ST7MC, just to refer to the latest fashionable ST micro) dedicated to controlling syn- chronous motors (brushless, air con- ditioned, for example) and asynchro- nous (induction) motors. A passionate fan of airplane model- ling and electronics, he happily combines bath disciplines in his spare lime. 5/2005 - dekior detiionks 41 lob talk Figure I. The input of an op-amp usually consist* of a differential amplifier Figure 2. The complete schematic of on op amp this example is an NE5532. Part 2: Component specifications Karel Walraven We receive a quite few schematics from read- ers at our editorial offices. With these, it is fre- quently the case that the designer has not taken the common mode range of (usually) opamps into account. This is a characteristic that is repeatedly overlooked. It is therefore worthwhile to delve into this topic a little more. Operational amplifiers and com- parators (me taller could he con- sidered operational amplifiers as well, but with mare emphasis on speed and less on linearity and noise) are almost always con- structed infernally os differential amplifiers. In Figure 1 you can see what such a stage typically looks like, Figure 2 shows a real world example (in this case an NE5532,, mare modern opamps □re much more complex). Differ- ential stages are not only used in opamps, but for example also in power amplifiers. In that case ihey are usually built from discrete parts, because a larger power handling and higher operating voltage are required. There are also variations where FcTs are used instead of bipolar transis- tors but this makes no real differ- ence when it comes to under- standing the operation. In order for the differential stage to work properly, T1 and T2 need to be driven fully. As you already know, this will require o voltage drop of at least 0,6 V from base to emitter. The current source, whtch is connected to the emitters, also requires o small amount of volt- age to work properly. You can imagine therefore, that this whole arrangement will not work unless there is at least 1 to 1 .5 V on the bases of both transistors (with respect to the negative power supply rail). A similar effect takes place when the voltage at the transistor bases is too high: the collector resistors as drawn, are in practice not actual resistors, but made from transistors which will olso require o minimum voltage to perform their task properly. So if the voltage at the base is equal (or higherl) than the positive sup- ply voltage, the voltage at the col* lector cannot be much lower [in practice about 0.4 to 0.5 V below the voltage or the base]. That leaves too little voltage tor the transistors that Form the collec- tor resistor. Therefore: with this architecture the input voltage always has to a little higher than the negative supply voltage and a little lower than the positive sup- ply voltage. In the datasheets you will usually find this characteristic in a table with the heading 1 Electrical Characteristics' in a section named 'input Voltage Range' or 'Common mode Input voltage range' or some similar phrase. Refer to Figure 3 where the relevant part of the datasheet or the most famous opomp r the 741, is shown. The manufacturer takes quite □ wide margin, with a ±15 V supply rail the inputs have to remain within -1 3 and -f ] 3 V. If we include the extremes of manufacturing toler- ances we have to be within ±12 V. In more intelligible Ian* guage: the voltage or the inputs hos to be ai least 2 V above the negative power supply voltage (the negative supply voltage con also be zero) and 2 V below the positive supply voltage. If you do not take this into account the cir- cuit is likely to give completely unpredictable results. Naturally, opamp designers have worked from the beginning to eliminate these shortcomings. By using a different architecture, some opamps can operate down to the negative supply roil (a well- known example is the LM324, which will even permit a voltage of a few tenths of a volt below (I) the negative rail). Same other opamps can operate up to the positive roil (TL084 and LF357). In recent years so-called 'raiMo- rail' opamps have appeared, which can operate with all input 42 el-kirn dedrenTa - 5/2005 Electrical Characteristics EV#“ *i?t CHidtisu U/ 7 J 1 A L.UTtT 1 jmic W-pl£ UJlI if.,-, Itii r >^ V=r A-" !■= ' T*=SC p.-. s t : tjj P-z z-'U Q i- 55 30 50 -v ^UUITV S i : 5 '^.l ft. i tc in 4 JQ z : 7 = r.V ITV ■ -r - C ,= >r Viits&S E-it If V c -Z'Z. Z ~ .4 - □ . ' .T^-ge * 25 Vs * ±? 3 V zir, ZL T 5 eY — {Mtset €.^~— T 1 ,= if Z iC- 3 Q isjz 2D 200 rJ* : ■ j- UA.i 73 35 VI. 5:0 .-A S.v*- 33 * C'%v ~--r=?Z Z~ - H 5 “A C Sis* T,.= Kv 3 G 35 zo: II _ j_ 1 ■ uifh — J S 1 JLkJLU . !■ 0 • 3 .A > - dj -£ i-Er^->::r i p - 2 SC. Vj, - -?ov ’O t e j C.z ZO - 5.3 ZC ita ’mm 1 '^uu- V = = -Z 7 f CLi U2J ■XlJ Vlitiji -. = i ■ c z:JS = :- V -‘2 V “i Figure 3. The specifications (this example is from a 741) detail the input voltage range. volfoges. provider ihey remain within the applied power suapjy voltage. The concession ihal has to be made for this is that such raiUoraif opamps usually permit 0 much lower operating voltage ihan the 36 V of the 741 . In Table 1 we have listed a few of the more common opamps. Up to now it was customary that the first few letters of the part num- ber indicate the manufacturer of the part, so you really didn't have to take much note or inch How- ever, manufacturers like to squeeze as much as possible out 01 their bread-and-butter pads by Introducing new versions. So you can buy, far example, variations of the LM324 called the LP324 {IP29G2J and the LMV324. IP means low pov/er and this opomps draws less than one tenths the supply current com- pared to the old version. \\ is also 1 0 times slower and has a lower output current capability. The IMV324 {low voltage) operates with a supply voltage of 5.5 V maximum {compared to the 32 V of the other types), uses less cur- rent, can deliver less current, but operates at the same speed. These three parts have the same number but different prefixes and the differences are significant! So in the event of doubt, consult the datasheet! Table 1* Input Voltage Range Part Number above V- below V+ LM741 2 2 LM324, LM358, LM2902 ° 1.5 LF356, LF357 3 -0.1 TL061 ...TL084 3 0 TLC271 ... TLC274 -0.3 0.8 r j TS924 0 0 tif’d i. W Ararat * * 55>s nfj ! fin Hit fi'l .r-. SPS.A Ruu=j u an * mx _i£ix ) f V\t r wxt bc305ta n 1 kV jsurt nYrwn^ [.15 t fr ?e~ = L a a? e a - c SOFTWARE OFFICIAL DISTRIBUTOR prove \4iU3 OdDTfl wafc look |¥CS & A % % & 'I * ftrafsFJ . l r±rje: X : Jlfi :f‘i ct. ; - a.: . .. r 0- v * * r * * w # 0 * W m m m - ^ - r. ± 2 F im c f - : ■ 0- * -r -r w & * m m w -mr m itt. h> XQ*h> ac * it ±1 -■ = : ? .e.C - Enviro ■tanai’Dg. zJ ." e i: i QEj # include ^eopcr&l * uV I S 1 0 N3 1 n dustTy-Standar d Workbench For Microcontrollers Options Wizard for Tool Configuration * Customisable Editor pVisfoNg * Source Browser * CPU & Peripheral Simulation v Complete integration with emulators T Dedicatedhigh-optimisafion C compilers t Microcontroller language extensions Classroom training, see website for dates With free hands-on us er gul des and m anual s Download your trial compiler version from: www.hitex.co.uk (UKJ Lid let 02^ ? ££^ii£B E m . Sj. 1 £5 "■ "nil ejc-£j&.uSt hitexi Fax; 0^4 7669 2131 Dc.ytLCPMtKT TOOLS V.rSrv. .'L-.vhiU 1 ! ;=? tiV E? - 200 i 5/2005 - 5 Ick I or s^drcriLcs 43 Elektor’s online services have been restyled and extended within a brand new easy to use website. Now featuring Elektor News Service, Forum, Marketplace, Online Shop and several download options MKT/ \ ^TMtonss-CO. u ' r - I *22 ^ !.'A r • : IT- * r • . 1 £ ass:, j • indexed article archive hack to 1998 • summary for easy recognition • search articles by volume or keyword » T 1 I i;t . , S!F l*?. \ cM.wjriS. \«p^ ■W 1 \ t*. All*** iui Nt* 5 II Have l He* CC \ Good n , „v-otUi * \ss - o f \ ■pw ^'jr> ■M \ I . 1 iii V Te a\stet • on paper and on the web NEWS daffy electronics newsfeed c weekly free Iter FORUM m r„w— 1 *** -gsssgsr'^ •SKntf* ^..o'E ^ 0 ' 6 . - rt 0 ^Vn^ rt0n ^ *‘ H 3 =V--- D4 m RTI *1BV © - SRI9 5V *5Y C2 S' LCD! LC DISPLAY \ 2 x 16 CHARS. . a c m 5 ^ Q ^ > > > — — I HIT" □ IE + 5 V © nui - * i&soTTakv I icon t r * P&iVEft Thiq 1 r—i I DU K1 t-5 O £r O O 1 i [ 11141 -aB 0 D12 :T.:rvF7 44 0AT*5 cit JcT 1 4 J 71 U © PtiTO PA3AD3 r3i,7: FAT ' A0 1 PafAS'JG PA2TADZ PS3A5N1 PASi'UXS P S4^5 PJU4A34 F531I0-&( FAD AS5 Fasvi^o FASAK Fs7: J 5CX •FATA 07 ICS PESO FES’ ‘(T2 ftcVALE F E L CC 3 5 ATmegaaSIS PD3RXD _PDiP PGr'AS POUTXD FC1,'A2 r32ANTO PCZAlu rOlVim PCI ato PH^EK FC4 At 5 PDE.YJCTA FC5.AS2 pp*v7p FCt Al j F07. , = D FC7.A54 XTALt XT412 PI R21 / _ H wl IDt i'J-Ht I Cl 2 ■ : - '15V ti - ID ri J . 2 zz T K 23 1! 24 12 33 13 U I Fl» t5V 51 11 i3 5x 1X4148 21 D1 22 Dt4 N K4 K4 O Dr 5 >1 24 D15 Pf 41- Z7 s ! Cl SSP -V J." I = 1 - I P R I p E ■ yj y * *! 1 V IO — ^ FJ£L yj l — ^FJiTES RJVCT *isv -sv 0 © _ 2 cia 7n !2 15 1 PI 20 V3L '.'33 CEl Oi/Tl Eft IC3 CJT2 iOi-3 IK3 S£?fj L233E j Pii OUT4 CE2 5£fi4 z JD PRO O R4. UVIHG f Figure 1. The central component in the schematic far the DCC programmer is the AJMega85l 5 microcontroller 5/2005 - el&klor ekrironiK 47 was the case with the Mark] in decoders of the first generation. In addition, the model had to be disas- sembled every time the address of the decoder needed to be changed. In the case of DCC, the programming of the decoders takes place by sending information via the rails, so there is no need to fiddle with die trains. The con- trol options are nearly unlimited and are only determined by the chip in the decoder. The NMRA standard contains 1024 configuration variables (CV). At the moment only about fifty CVs have been defined, the remainder are reserved for the designers of decoders to allow for the implementation of spe- cial functions (CV49 to CV64, CV112 to CVI28, CV545 to CV593 and CV624 to CV640), or reserved by the NMRA for future applications (CV15, CV16, CV20, CV26, GV47, CV48, CV96 to CV104, CV107 to CV111, 0 VI 29 to CV891, CV594 to CV623 and CV641 to CV1024). From all these defined CVs, only a handful (CV1, CV7, GV8 and CV29) must he implemented in every decoder. All the others are optional or only recommended. Due to lack of space, it is impossible to describe the function of every CV in this article. We therefore recommend that you read the manuals of the decoders that you may have. Incidentally, the values of the CVs are stored in non-volatile memory (in most cases in the EEFROM of the micro- processor) so that the settings of the decoder are preserved when the power supply voltage Is not present. Circuit description As is shown in Figure 1, the circuit is built around a microcontroller, the ATMega8515, from Atm el. The ATMega8515 is the successor of the AT90SS515, which is now obsolete, hut is compatible with respect to pin out and programming. The main character- istics are: 8 kBytes of Flash program memory, 512 bytes of EE PROM, 512 bytes of RAM, two counters /com- parators, one serial port and one SPI- interface. This ATM eg a version also has In interrupt input and three addi- tional I/O -ports (port E). Tne chips from the AT90 series from Atmel, ATMega and ATTiny, all have the same RISC core with the same instruction set, irrespective of the actual type. Power supply Tne power supply provides two volt- ages: 5 V for the logic and a regulated voltage of +15 to +18 V for the output stage. That is why we have two sepa- rate regulators. IG1 provides the voltage on the rails. An LM317 was selected for this task. The output voltage from this regulator is adjustable with potentiome- ter R15. This is to take into account the recommendations from the NMRA (in principle the voltage applied to the rails varies a little, depending on the scale). Toe values Indicated on the schematic result in an output voltage of 18 V. This corresponds exactly with the require- ments for decoders for the scales of 0, HO and N. In front of 1C 1 is the traditional combi- nation of rectifier and filter stage. The 5 V power supply is provided by IC2. Neither 1G 1 nor IC2 require a heatsink. To dissipate what little heat they gen- erate it is sufficient to bolt them to the PCB. Ouput stage A power stage is built around IC3, an L293E from ST Micro Electronics. Start- ing with a TTL-ievel signal, this IC generates an AC voltage of sufficient amplitude to allow programming via the rails. Diodes D5 through D8 protect the out- put transistors of 103 from surge volt- ages. The function of R1 Is to measure the current that flows through these transistors so that our system can detect the acknowledge pulse from the decoder to be programmed. LED D10. protected by D9 (remember that the DCC voltage is actually AC!), indicates the presence of a DCC signal on the rails, Tne current measured with R1 is fil- tered by R3/C6 before sending It to dual comparator IC4. IC4b senses cur- rents greater than 51 mA (acknowl- edge signal current). IC4a senses cur- rents greater than 250 mA (default value). The outputs from the compara- tors go to the microcontroller to indi- cate a possible overload and the pres- ence of the acknowledge signal. We now return to IC3 to explain the two signals it receives from the micro- processor. The TRACK ENA-signal enables the output transistors of ICS. As long as this signal is logic zero, no voltage appears on K3. The DCC signal is inverted with the circuit around T1 in order to generate the necessary sig- nals for the two half-bridges in IC3. Controller We complete the description of the schematic with the central component: IC5, The microcontroller takes care of all driving and control tasks in the pro- grammer: driving of the LCD. reading the keyboard, generating the DCC sig- nal, processing the current measure- ment, etc, A program, specifically writ- ten for this application, handles every- thing. The LCD is driven in 4 -bit mode to reduce the number of traces on the PCB. PI is used to adjust the contrast. Any standard LCD module based on the HD 44780 controller is suitable for this programmer (most LCD modules, except the graphics versions use this chip: this en siues a wide selection regarding the colour, character size, with or without backlight, etc.). IC5 also takes care of the keyboard Although the schematic assumes a number of individual pushbuttons, the circuit is also suitable for small key- pads in the 4>3 format (telephone key- pad). The only button separate from this is S2. Diodes D13 through D15 protect the micro controller from the short circuits that would otherwise result when the user presses more than one key at a time. Resistors R14 to R16 pull the inputs of IC5 low when no keys are pressed. 1C5 runs at S MHz thanks to XI and is initialised at start-up by the combina- tion of R10/C11/D11. Ki is an optional connector that makes it possible to program IC5 in the board using the Atmel programming cable If you buy IC5 pre-programmed from Efektor Electronics then you can omit Kl and D12 from the board. Construction Although the circuit for the program- mer is quite straightforward, the con- struction still requires that we explain a few of the details. To facilitate the first stage, and in the tradition of Elektor Electronics T we have designed a nice printed circuit board, the component side of which is shown in Figure 2. The ready-made PCB Is available through Readers Ser- vices as order code 040422 - 1 . The parts are mounted in the usual order: first the low-profile pans, resistors and diodes, followed by the low capacitors. A quick note regarding the capacitors Cll and C12: we have used ultra- miniature rimes here. If you are unable to find this size, there is nothing stop- ping you from using the size you do have and mount it flat on the PCB; there is enough room. Then it is the turn of the connectors and the header for K4. the keyboard. K4' in the 48 clckior detfrcnks - 5/2005 Figure 2, Component overlay for the PCB that has been designed for this circuit COMPONENTS LIST Resistors: R1 = 1QG.5W R2,R5 = 2kQ2 PARZ^R^RIS-Rld = 10kn R4,R1 0.R1 l,R12 = 47kQ R6 = 5]Q£1]% R 1 7 - 2kQ7 R1 8 = 220U R19 = 5kQ6 R20 = 3313 R21 =2713 PI - 1 OkD preset Capacitors: Cl = IQQGuF 35V radio! C2C5 = IDOnF C6 = lOnF C8,C9 = 22pF CIO, Cl 3,C14 = 47nF Cl 1 = 1 uF 16V radial Cl 2 - lOpF 16V radio! Semiconductors: Dl-D8= 1N4001 09,01 1 ,D13-D17 = 1N4I46 D1Q,D18 = LED, lov/currenf, 3mm D 1 2 = BAT85 T1 = 8C547 1C1 = LM31 7 IC2 = 7805 ICS - L293E IC4 = LM393 JCO = ATMegn8515-8PI (programmed, order code 040422 - 41 ) Miscellaneous: K 1 = 1 Q-%vay pinheader (2x5 pins) K4 - 7-way pinheader LCD 1 = LCD module, 2x1 6 characters, backlight optionaL Alternatively a PLED display (ASI-G-1 62FSGF-EWS/W) XI - 8 MHz quartz crystal [low- profile model, case type HC49/4H] 51 = keypad, 3x4 keys (e.a., Conrad Electronics # 709840] 52 = pushbutton with make contact, e.a.. DT6Q ] 6-way pinheader and socket for display connection PCS, order cade 040422-1 {see Readers Services or website) Disk, ATMega source & hex cade, order code 040422-1 1 or Free Download schematic represents the male connec- tor on the keypad. As usual, we advise to mount all the ICs in good quality sockets (turned pin). This is applies above all to IC3 because it is directly connected to the outside world and could possibly come in contact with electrostatic charges. Even though the risk of damage is small, it is much easier to make the IC easy to replace should it become nec- essary The two voltage regulators IC1 and IC2 (an LM317 and an L7805) are mounted flat on the PCB so that the PCB can act as a heatsink- Make sure that the metal tab of IC1 is well insu- lated and does not make electrical con- tact with the ground plane (in contrast to the 7805, the metal tab of the LM317 is not connected to ground). Another note regarding ICL, which is mounted flat in the PCB. Because it is underneath the LCD, we have to make sure that we use a version with the correct height. Controller Concerning IC5, you need to know that the program has been written for an ATMega8515, but it will also work with the older AT90S8515 (because the latter is obsolete now, it may be possi- ble to obtain it cheap from some- where). The controller can be obtained pre-programmed from Readers Ser- vices as item 040422-41, but you can also program it yourself. If you choose the latter solution, you will need to fit K1 and D12 on the board and buy (or make) a program- ming cable that is compatible with the Atmel standard. You will also need pro- gramming software suitable for the Atmel ATMega. For this purpose we can recommend the tree software pro- gram called Pony Prog, available from http://www.lancos.com. Incident ally on the same website you can also find the schematic for the Atmel cable (cable type STK200-/STK300). Note: for the ATMega it is not sufficient to just send the HEX hie to the con- troller to get it to function. The chips from the ATMega series first need to be configured before programming At the factory Atmel sets the chips to a 5/2005 - ehktof drrirrks 49 Figure 3. Fully built-up prototype o f the DCC programmer default configuration, but this is not suitable for our application. You will need to change it, otherwise the circuit will not work. The configuration of the chip is made with what are called + ruse bits 1 . In PonyProg we click on the padlock symbol in the main window after hav- ing selected the ATMega85i5 in the Device menu (choose AVR Micro' then l ATMega8515'). In the window that now appears all the tick boxes need to be deselected (or click on "Clear AIT). Then click on Write. Once the configu- ration bits have been programmed, you can send the HEX file (menu Command Y' Write program (FLASH) "). If necessary, you can con- sult the user manual for PonyProg, This procedure is nor necessary, of course, when using the pre-pro- grammed processor (order code 040422 - 41 ). He member to use a low-profile socket for ICS to prevent problems later on when mounting the LCD module. Keyboard Regarding the keyboard we need to note that if you are using a ready-made keypad you will need to check carefully ihat the wiring at the connector corre- sponds with that of the schematic. If necessary you can easily make a key- board yourself by using pushbuttons of the type "ITT DG r or something similar, mounted on a small piece of prototyp- ing board. The majority of telephone keypads follow the connections as shown in the schematic, but it is bet- ter to be safe than sorry. LCD Final note: the mounting of the LCD. You may already have noticed that the PCB has a connection for this purpose, namely LCD1. This connector has 16 pins, while a standard LCD module has only 14 pins. The reason for this is that with certain models of LCD mod- ule the backlight is connected to two extra pins next to the data bus. Here we have selected a PLED display because of the fantastic quality and readability of this type of display, if your display has only 14 pins (a type without backlight or with a separate backlight supply) then pin 1 of the dis- play has to be connected to the left- most pin of connector LODI (next to R9/R3). Other considerations A comment regarding resistor R20. This resistor is used to limit the current through the backlight. Look for the cor- rect value in the datasheet for your dis- play (the value is typically in the order of 33 to 47 _Q, our PLED display required a resistance of 33 Q). it is a good idea to check the power supply voltages at the IC sockets before fitting the ICs. Verify that the correct voltage is present at the appro- priate pins (—5 V on pin 40 of iC5 r 3 of IC4, 10 of IC3 and + 18 V on pin 20 of the same socket). At least we can now be sure that the power supply is func- tioning properly. Once this has been checked, the ICs can be inserted in their sockets (after hist turning the power supply off, of course). Wow mount the LCD in such a place that the top part of the enclosure fits nicely over the top of it. This also applies the switch S2. Using ifce programmer After everything has been assembled it is time to power up the programmer for the hist time. The circuit is pow- 50 eJ&jcIot cfjrtroniu - 5/2005 Elekior Electronics would not be Elektor Electronic $ unless we provided a brief explanation of the DCC system for which o programmer is described here. DCC means DIGITAL COM- MAND CONTROL and for clarity: it has nothing to do with ihe unfortunately foiled digital compact cassette system that Philips introduced in 1992 with the same abbreviation. In a DCC system an AC voltage is applied to the rails. The peculiar aspect is that this AC voltage (o square wave] not only provides the energy to drive locomotives, switching points and signals, but also contains the digital information that is necessary to send commands, such as desired speed and direction to ihe appropriate device. Depending on ihe Frequency, the AC voltage on the rails can be interpreted as either o logic one or zero. A wave shape with a period of 1 1 6 us (8.6 kHz) consisting of a positive and negative half of 58 us each represents a logic one. A logic zero has a length of at least 2 x 100 us [5 kHz) and at most a total length of 12,000 us. A logic zero may therefore be stretched . The transmission is no more complicated than inis, by putting tong and short waveforms one after the other ony desired digital message can be sent. The oscilloscope picture gives you an indication as to what these signals look like. Nov/ that it is dear how ones and zeros are transmitted, you will wonder how a complete message is assembled. This consists of the following things: - First the preamble is sent, consisting of 14 or more lagic ones. This signal provides the necessary synchronisation between messages and indicates that the receiver has to be ready because a new message may begin at any moment. -Then Follows a start bit ('0'), this zero after ihe preamble indicates the actual beginning of the message. - Subsequently there is one byte (8 bits) that contains the address. All decoders read this address and in that way determine iF the message is intended for it, because nor- mally every decoder has a unique address. Of these 8 bits, 7 bits ore used for the address, so there are 128 pas- sible addresses. The eighth bit provides the option of inter- preting more bits from ihe next byte as address os well. In this extended' addressing mode addresses with 9 ? 1 1 or 14 bits ore possible. - After the address there are one or more data bytes. Usually a command byte (set speed, for example] is sent first, followed by a data byte that contains the correspon- ding value (the desired speed, for example). -The last byre is a checksum (error detection byte). This is used to check tf the entire message has been received cor- rectly. - You have probably already asked yourself how ihe decoder separates the various bytes. Just as with normal RS232 serial communication, each byte is preceded with a start bit (logic zero). After the lost byte the start bit Is omit- ted and a stop bit (1 ) is transmitted instead. This way the decoder 'knows that the transmission is complete. All messages are frequently repeated. It is, after all, easily possible that a bit has been lost because of noise or sparks on the rails. Moreover, something has to be continually sent, otherwise the rail voltage will disappear and every- thing will stop... Messages with extended addresses are longer and take up more time. They are therefore repeated less frequently and are used for switching points and signals. In this way, ihe moving objects (i.e., locomotives) can be controlled more responsively. Three addresses are reserved: they are 0, 254 and 2 55. To program a decoder it is not necessary to know the address of the decoder. The programming instructions contain one of the reserved addresses [normally address 0, the so-coiled broadcast address] and every decoder responds to this. This is also the reason why programming may only occur to one decoder at a time, usually an a separate section of roil. It other decoders are also connected then they would be pro- grammed as well. In addition, this method makes it possible to work with a decoder with which you have lost contact (you don't know its address ony more or lost what you pro- grammed in the CVs) and reset it to its original factory default settings. While programming, the receiver (decoder) generates a receive acknowledge signal once the desired action for example programming a CV, has been carried out. This acknowledge consists of a brief increase of current consump- tion of at least 60 mA for 6 ms. The transmitter is usually able to detect this increase in current and therefore knows that ihere is a connection. In order to be able to signal with a higher current consumption it is usually necessary far a decoder to be connected to a load (the motor for example). In most of the recent standards the options for return mes- sages has been greatly expanded. The newest decoders can, after special commands, make use of transmission paus- es and actively transmit entire bytes by injecting current into the roils. Bui this is all so very new that very little of it is actu- ally available. If you feel up to it you can read the standards here: h tip ; / / www. d cc . i n f o/sto n d a rd s r a s / Tek^reVu £ Trigger A f i b r A 1 3me 2 S. 4 n 5 Set io Delay Tim? i \ ■ Thpji Set ID 05 Sti Eg Min M40.0jj$ A c 0.00000 5 B Fvents O I s.oo v I is.QV Set to \1in E Trigger After a L,ste Couplinq slope Events DC I IS O V This o sdlbscope picture gives on impression of the shape of DCC signals. The second trace shows the acknowledge pulse from the decoder. 5 2CD5 -elAict tfedfenia 51 ered directly from an AC voltage source of around 18 to 24 V which is able to deliver about 250 niA (a trans- former rated about 6 VA is eminently suitable). The circuit should start up as soon as it is powered up. The display should show the message *DCC Prog. Vx.x' where x.x is the version of the pro- grain). If this mess age does not appear we start by adjusting the contrast of the display with PL If that is not suc- cess ful r turn off the power supply and check the wiring of the PCB, Also check that the display is connected correctly. Press any key on the keypad once the welcome message is displayed. The programmer now wants to know which mode yon would like to work in. You can select from the following modes: - Direct CV Write (write to CV in the direct mode) -Paged CV Write (write to CV in the paged mode) -Address Only Write (write to CV1 in simple mode) - Direct CV Read (read CV in direct mode) -Paged CV Read (read CV in paged mode) -Address Only Read (read CV1 in sim- ple mode) - Factory .Reset (restore factory default settings) With each press of the Function button you can select the next operating mode from the list. You will have noticed that it is possible to read the CV using two different methods: the direct mode and the paged mode. The difference between these modes is related to the protocol that is used to send commands to the decoder. From the user's standpoint the modes are identical (same number of CVs and same purpose). The vast majority of decoders recog- nises the direct mode, hence the default mode proposed here. The paged mode is available to you if you have some old decoders that do not support the direct mode. If you notice that you do not get an acknowledge from a decoder in direct mode, you can try to program it in paged mode. Before we delve into the details of pro- gramming our decoders we have to stress two important points. First: when programming your trains, use a separate section of rail that is not com nected to the remainder of your railway. If you do not do this, you run the risk of programming a different locomotive that is accidentally also on the tracks with the same values as the first. For example, if you are changing the address of the decoder, that will result in two locomotives with the same address... Even if you do want to pro- gram two decoders with the same data, this is not the way to do it. Each decoder has to be programmed sepa- rately When two decoders are con- nected in parallel the acknowledge signals may be corrupted (the current pulse has an abnormal value} or results in faulty behaviour of the decoders! Second point: program your decoder only after it is fitted In the model. The great majority of decoders generate the acknowledge signal by powering the motor of the locomotive in which they are installed for a few millisec- onds (also refer to the box DCC back- grounder*). If the decoder is not con- nected to the motor then this pulse cannot be generated and the program- mer will indicate a programming error (see further on). In practice We now change from theory to prac- tice and actually program a CV Select a write mode (either direct or paged) using the Fhnct/on button. Confirm your choice by pressing Enter. The pro- grammer now shows the following line: CV#:_ Val : We start, using the keypad, by enter- ing the CV number, between 1 and 1024. With the button Delete we can erase the last character by mowing the cursor backwards. Press Enter again after the CV number has been entered: the cursor on the display will now jump to the field named VnJ. In this field you can enter the value, ranging from 0 to 255, that has to be written to the CV Here too you can use the Delete key to correct the entered value. If the value entered is outside the allowed range, it is erased and the cur- sor is moved to the start of the field. The programming procedure can be aborted at any time by pressing Func- tion. You will then he returned to the menu for selecting the mode. Once the CV value has been entered, the output stage of the programmer is activated: LED DIO lights up to indi- cate that voltage is applied to the decoder. At the same time the pro- grammer indicates Programming... This entire operation takes less than one second! When the decoder has successfully completed the programming cycle the programmer shows Done! Pressing any key will return you to the CV entry screen (that way you can enter multi- ple CVs without having to select the progra mm i n g mode each time). If the decoder does not generate the acknowledge signal during the pro- gramming phase the programmer will show the text Wo Ack detected! This does not necessarily mean that the procedure has failed — the program- ming of the decoder could actually have been successful. This situation can sometimes arise with models hav- ing small motors, which are unable to generate the acknowledge signal of 80 mA (this often happens with older Jouef models with a 5-poie motor). The only means you have of verifying the programming is to place the model on the rails and check its behaviour. The programmer can also be used to read back values stored in the decoder. To do this, we have to first select a read mode (direct or paged) and then press Enter to confirm our selection. In read mode the programmer only asks you to enter the CV number. The read procedure starts after pressing Enter. The display shows Heading... while at the same time LED DIO is lit. As you will now realise, reading a CV takes much more time than program- ming it. This is because the decoder cannot send any data. The program- mer sends a message to the decoder for each of the allowed values of 0 to 255. When the decoder recognises the value found in its memory it will send the acknowledge signal. The program- mer now knows that the value sent corresponds with the value of ihe CV in the decoder. Once the decoder has processed the read request the programmer shows the following message: CV#xxxx=yyy Where xxxx is the number of the CV read and yyy is its value. By pressing any key you are returned to the screen for entering the CV number. If the decoder does not react to any- thing the programmer will display No Ack detected! again. When the current consumption is excessively high (more than 250 mA) while programming or reading, the programmer will show Decoder fault! This usually indicates a faulty decoder (short circuit in the output stage). 52 eEeklnr ekrtromcs - 5/200S Table 1 . Comparison between protocols from f md DCC Protocol Mdrklin 1 st generation [a.k.a. Viiicfcta fcnryot] Mdrklin generation EEDTS Pro DCC / NMRA Originator Markim Mdrklin Elektor Electronics lenz / NMRA Driving current Asymmetric square wave from 18 to 22 V/38 kHz '76 kH.r hr cdd fricn-c' Fusions) Asymmetric square wove from \ 8 to 22 V/38 kHz (76 kHz. Fc-t c-ddlferFBl funder.;} Asymmetric square wave from 18 to 22 V/38 kHz (76 kHz for odkfitinrjaf functions) 1 Symmetric square wave 18 tot 22 V fr eq u e ncy-m od u! a ted Number of supported decoders 80 80 79/80 (249 wilh soiWe VI .2) 99 with basic and >1 COO with ex+endeii p rotate Number of speed settings 14 ! 4/1 5/28 [depends on decoder) 14/15/28 [depends on dc-ccd e, r j 14/28/126 (etep^rdi c n decoder] Absolute direction of travel No Yes Yes Yes Transmission error defection 1 No No No Via control code Compatible with EEDTS EEDTS Pro Mdrklin 1 51 generation EEDTS _ . J . • ; ► _ Mdrklin 1 st and 2 n ^ generation Any NMRA system Specific functions per decoder 1 command per direction 1 command per direction + 4 additional functions 1 command per direction + 4 additional functions 1 additional Function in 'BASIC 12 additional functions in "EXTENDED" Emergency stop No No No Yes When you select the Address Only mode, the programmer uses a special routine defined by the NMRA, The makes it possible to access CV1 (decoder address) directly. In this case it is not necessary to enter the CV number, but the other operations remain the same. The ZTC brand decoders contain a catch: their addressing system differs from the NMRA system. CV1 to CV1024 are stored as decoder addresses 0 to 1023 according to the NMRA system (the program in the decoder takes care of the conversion from CV number to actual address). In the ZTC decoders, CV1 is stored at location 1. which causes a shift. In order to program this brand of decoders you need to add 1 to the number of the CV to be operated on so that the correct memory location Is manipulated (for example, to change CV1 you need to enter address 2 on the keypad). Tne last function on the programmer is the factory reset. The DCC standard includes a message that allows the decoder to return to its default state, as it was shipped horn the factory. This function is not available with all decoders. To use this function, press the Function button until the text fac- tory Reset appears. Conhini youi choice by pressing Enter. Tne pro- grammer now asks Confirm ? After pressing Enter again the programmer will send the appropriate code. If at the end of the operation everything has gone well (ack from the decoder) the programmer will indicate Done* In the other event one of two fault mes- sages will appear. Finally We now wish you long, enjoyable hobby evenings to familiarise yourself with your decoder by experimenting with the different CVs of your decoders. Table 2. NMRA defines 1024 CVs, but the vast majority of decoders recognise only □ hand- ful. The first 20 variables are the most common and ore recognised by the majority of decoders. CV Function Comment 1 Ease address Identifies decoder 2 Starling voltage Minimum motor voltage I J Acceleration characteristic Simulates acceleration 4 Deceleration characteristic Simulates deceleration 5 Maximum voltage Maximum motor voltage U Average volraae Correction of the motor characteristic 7 Program version numbers Read only 8 Manufacturer number Read only 9 PWM Adjustment of switching frequency 10 EMF Feedback Cutout Speed control 11 Power supply selection Non- DCC power supply 17/18 Extended address Decoder identification using 14 bits 19 Link address Multi-traction control 29 Decoder-configuration Bt (far-bit control 5/20D5 - either dstfronks 53 Magn Flux Den Ben J. Climer How do you know accurately if a magnet is stronger or weaker than one you've dubbed your reference device? This simple to build instrument has the answer. % 54 with a sim pie pickup coil +5V © LCD1 tensor a o- MAX4130 EUK-T R12 TP1 0- +5V ff) 132 PI / TF2 R5 R4 £ tpj I T" It 12 13 14 . I C7 100n LC DISPLAY 1 x 16 |> am n n — a ! C W O n 40 20 © f/CLR R37 ! JC3 Ji3s FLAG RS5 RAIMA 1 R94 R Al' AN 2, YR E F- RS3 RA3fAltWHEF* RfiJ/ro R31 P.A5.AN4 RBQAItt PIC1GF876 RCO HC7/RJC KC1 HC&TX RC2 RCd RC3 RC4 m OSC1 0SC2 — 1 2B 14 27 i T 25 24 23 £2 21 la 17 15 la ' SW! i< ZHCS400 13 12 ii 10 5 5 5 +5V © H13 2212 1—0 1 T R14 Co I \ Pa i N IQi [Cl LP2950C25.G (HfliSa ' 11 Figure 1. Circuit diagram of fhe magnetic Fiux density meter. Designed for portability and field use , the instrument provides an easy way of comparing fhe 'strength of permanent magnets. The author has made several genera- tors for small wind turbines using per- manent magnets. Some of these mag- nets were scrap material horn old loud- speaker drive units. Their properties were unknown, so that when they were built into a magnetic circuit the results were at best 'unpredictable’ . This led to the need for a means of P at least roughly measuring magnetic field strength. Commercial 'Gauss meters' are expen- sive. They usually employ semiconduc- tor Hail transducers and suitable ones are not readily available. As an alter- native, "search coils 1 may be used. These are small coils that can be with- drawn from a magnetic field, giving a voltage pulse which is related to the magnetic flux through the pickup coil. The pulse was traditionally measured with ballistic galvanometers, which were delicate and not seen nowadays except in the odd science museum exhibition. Seme magnetic bastes Magnetic quantities are expressed in MKS units now. In the past, the unit Gauss' was popular. The commercial instruments often seen for the meas- urement of magnetic fields are still often referred to as Gauss meters. Magnetic field strength or magnetiz- ing force is expressed in amps /met re. This is consistent with the field in a long, uniformly wound, solenoid coil being equal to the number of turns per metre times the number of amps through the coil In a nonmagnetic material like air, the magnetic flux density is equal to the magnetic field multiplied by 1.26 x It is expressed in teslas (SI symbol: T). The difference between the field and the flux density is more apparent in 5, 2Q05 - eFsklor ekdrcma 55 Figure 2. Copper track layout and component mounting plan of the PCB designed for the instrument. ferromagnetic materials where the flux density can be enhanced by a factor of 1,000 or more. One tesla is equivalent to 10,000 Gauss, Mains electric motors and transform- ers employ flux densities up to about one tesla (1 T), Modem permanent magnets can generate similar values. Superconducting coils can reach about 10 T. By comparison, the earth’s mag- netic flux density is less than one ten thousandth of a tesla. Magnetic Flux is measured in webers (Wb). In fact, 1 tesla is a density of 1 Wb per metre 2 . A search coil works by means of lines of flux linked' through the coil. Toe effect of the flux is magnified by the number of turns in the coil. 'Flux link- age’ is the flux through the coil times the number of turns. When the flux linkage through a coil changes with time, a voltage appears across the ends of the coil. This voltage is equal to the rate of change of flux linkage measured in webers per sec- ond. If the coil has 10 turns, has an area of 1 cm 2 and is withdrawn from a flux density of 1 tesla in 0.1 seconds, the average voltage is only... 10 mV! This is inconveniently low but the search coil has to be small to fit into small narrow gaps in magnetic cir- cuits. It is necessary to amplify this voltage to a value that can be easily digitised. Time for some non- theoreti- cal electronics! Overall description of the meter The meter employs a homemade search coil about 1.5 cm square. This is placed in the region where the field is to be measured and is withdrawn sharply. The coil is connected via an amplifier, to an A/D port on a micro- processor. As soon as a voltage is detected, the processor measures the voltage 256 times within a time slot of about 0.25 seconds. At the end of this time the coil is assumed to he out of the field. The microprocessor adds up all of the voltages it has measured and the total is proportional to the flux change. For the mathematicians, it has integrated the rate of change of flux. The microprocessor then computes the result and displays it on an LCD The result stays on the display until the instrument is reset. Only one orientation of the search coil can be used since the A/D converter will only work with positive voltages. The meter is portable and powered by four AA size 1.5 volt batteries. The cur- rent drain is only 10 mA. The circuit Tne circuit schematic is shown in Fig- ure 1 . To make the instrument simple and portable, it operates on four AA batteries. Their output is regulated to 5 V with a low dropout regulator type LP295QGZ-50. This supply is then used by the single rail opamp, !C2, and by the microprocessor. Single rail amplifiers do not work well if the output is vrithin a few millivolts of the negative rail, so It is necessary to establish another 'ground 1 about 100 mV higher. This is done using a low barrier height Schottky diode, Dl. The forward voltage of this diode is low when the current is only 2 mA. The raised 'ground 1 level is used at tire negative input of the opamp and at the reference input of the A/D converter. The amplifier used is a Max4130EUKT- T Tills has an input voltage offset of up to ±3.5 mV At the output of the ampli- fier this could become an error of up to 400 mV. The A/D converter in the microprocessor converts to 10-bit accu- racy which equates to a resolution of about 5 mV Tnus the offset error from the amplifier should be less than this value. In the circuit, preset PI allows the voltage at the negative Input of the amplifier to be adjusted by about z4 mV to remove the offset error. We should not forget that the input off- set voltage is also subject to a temper- ature coefficient which is typically ±2 uV/ : C. This is acceptable since the error at the output of the amplifier should be less than ±5 mV over a ±20 C C temperature range. The meter has two ranges switched by a 2-gang switch, S2.A/B, As well as varying the gam of the amplifier, it switches a voltage to pins 12 and 13 of the microprocessor to indicate the range setting. The micro is a PIC16F376 using a 16- MHz crystal. This micro has Flash memory and A/D input. Tne output Is displayed on a 16-character LCD with one line. Resistor R1 is only used if your LCD module has a backlight option. If the instrument is actually battery powered as shown in the cir- cuit diagram, then the display must be a P LED type if the current consump- tion is to remain within limits (max. 20 mA). The value of R1 will he gov- erned by the display specs — check yours to make sure! The backlight volt- age (if applicable) is supplied by the LP295G-5.0 and this is rated at 100 mA maximum. Our prototype without backlight was happy with just 10 mA. 56 tkktordufrDnia ■ 5/2005 Editor's Cl oice Some instruments you can build yourself are a godsend in that they help you understand the true cause of Vague prob- lems encountered equipment not easily associated with mod- ern electronics. I am happy to say that Ben dinner's Magnetic Flux Density Meter described in this article is one of them. A good number of two-stroke engines on vintage motorcycles and mopeds use a flywheel with internal magnets to gener- ate the high voltage for the spark plug (10 kV and up) and the vehicle lighting voltage (usually 6 or 12 V). Although specialists in mechanical engineering will be able to oven haul such engines almost with their eyes dosed (leaving elec- frames enthusiasts in awe), the ignition is often recognised as 'special and "mysterious". 1 hove seen and heard 100“= mechanically sound vintage two-stroke engines refusing to start altogether or running in very erratic way s, and the frus- trated owners unable to get to grips with the obvious cause: insufficient spark voltage. On closer inspection, this rime by an 'electrics 1 specialist, the problems ore nearly always; worn contact breakers, burnt out high-votiage coils, broken wires and faulty or leaky damper capacitors. All this is a good lough and plain sailing for anyone capable of identifying o soldering iron and a capacitor, but the one thing that remains a tola! mystery to all and sundry is why one flywheel works just fine, and another, hardly or not at alii. The stronger the magnet swishing across the core of the high- voltage coil [actually, a step-up transformer), the better the combustion as a stronger spark is produced. Although a spark voltage af just I kV is sufficient to make my low-com- pression two“Siroke engines run, mare than 1 0 kV is required for a reliable cold start and a properly "singing' engine. Flywheels salvaged from the 49 cc moped engines often do not see fhe light until after tens of years of storage in damp cellars, The resultant rust is nor usually a problem but having cleaned the flywheel and putting it to ihe test the results are nearly always disappointing. The four magnets having been unable to commute to a small extent for so many years seem to have lost a great deal of their original magnetic force. The problem could hove been avoided by dropping the associat- ed Ignition base plate into the flywheel and then putting fhe lot into reasonably dry and clean storage like a loft. Using fhe Magnetic Flux Density Meter I am now able to pre- dict with near 100% certainty Ef a flywheel bought on □ car- boot sole or given to me for inspection by friends, will work perfectly, marginally or not at oil on an otherwise Fine engine. I m now drawing small crowds on vintage moiorcy- cle markets and never buy dud flywheels again l Because I have a reference value available obtained from a "known good flywheel, I can now get to investigating how weak- ened flywheel magnets can be reliably restored to their origi- nal strength. I guess if will take a few amps here and there... COMPONENTS LIST Resistors; R J = * a (1Q0Q suggested starting value only) R2 r R5 = 2k£27 SAAD cose size 0805 R3,R4 - 2Q2 SMD case size 0805 (e.g,. Fame'll # 310-4515) R6.R9.R10 R1 1 - 10 ka, SMD, case size 0805 R7,R8 = 1 00kn SMD, case size 0805 R 1 2 = t kQ, SMD case size 0805 R1 3 = 22Q R14 = 39kQ PI = 10Q preset. Bourns type 3329H (e.g.. Farnelt # 345-970) P2 = 1 QkQ preset H Capacitors; Cl ,C2 = 2pF2 25V radial C3,C7 = lGQnF, SMD, case size 0805 C4,C5 = 22pF, SMD, case size 0805 C6 = 1 OpF, 63V, radio! Semiconductors; D1 - high current Schottky diode, case size SOD-323, e.g,, Zetex type ZHCS400 (Fame!! # 301-4850) IC1 = LP2950CZ-5.Q 1C 2 - MAX41 30EUK-T (Maxim) cos- size 5-lead SOT-23 or MAX4122EUK-T (Farneil #353-4169) 1C3 = PIC 1 6F876-20/SP, programmed, order code 040258-41 (28-pln narrow DIP case) Miscellaneous: K! = 2-way pinheader SI = on/off switch, 1 make contact, chassis mount 52 - 2-pole, 2-way changeover switch, chassis mount (-5- 6-way S!L header if necessary) 53 = pushbutton. 1 make contact XI = 1 6 MHz quartz crystal, HG49/4H case LCD! = LCD, 1 line, 1 6 characters, with 14 way pinheader BT 1 = battery pack, 4 x 1 ,5 V AA size Enclosure with battery compartment for 4 AA batteries, e.g. OKW shell-type case VI 55 (SGI 55), version It! (OKW # A940833S). size approx. 158x95x33 mm PCS, ref. 040258-1 , from The PCSShop Disk, PIC source code files, order code 040258- 11 or download from website* * * see text x x www. elekto cel ec Iron ics.co. uk 5/2005 - elektof eltrtrema 57 Figure 3. The finished board, ready for Tiffing inside the plastic case. We did not use a reset switch; instead, a / O' microfarad electrolytic cap was connected across the pins for S3'. Also note the use of a leaded 3AT85 instead of the SA\D diode. The LCD supply voltage is decoupled separately with C6 and RX3. The LCD contrast is adjusted using preset P2. Software The code was written in assembly language. It uses subroutines to han- dle A/D conversion, driving the dis- play t delays and binary to decimal conversion. After setting up, the micro stays in a bop, repeatedly measuring the ampli- fied voltage from the search coil. As soon as this changes from zero, it measures the input 256 times and maintains a running total in a 16 bit register. If at any stage the voltage reaches the maximum value which the A/D converter can handle, it stops and displays an error message. When it has reached a valid total, it converts the 16-bit binary number to its decimal equivalent and displays it on the LCD. The decimal point is placed using the range information available at pins 12 and 13. The result is displayed until the instrument is reset using a press switch. Versions of the code are available from the Elektoi web site, the file number is 040258- 11. zip and it may he found with other on-line information stored for this article. Construeti&n The circuit is built on a single sided board with a ground plane. The art- work is given in Figure 2. If necessary, a pdf file containing reflected and non- reflected versions of the copper track layout may be downloaded from our website. Almost all of the components are surface mount. The amplifier is in a SOT23 package. The pitch of the pins is only 0.95 mm but fortunately there axe only five of them so that hand sol- dering is possible. Remember to fit the one diode the cor- rect way round. It is best to fit a base under the 28- pin PIC16F876 to avoid damage dur- ing soldering. Perhaps the most diffi- cult part of the construction is con- necting the LCD to the board. If a suitable connector (&1) is not avail- able, this can be done using a short length of ribbon cable with 14 con- ductors. The ends need to bs splayed out to match the spacings on the cir- cuit and the LCD. All 14 of the pads down one side of the board are used. They are in the same sequence as the pads on a standard LCD. Pin 1 of the LCD is connected to the end nearer pin 15 of the PIC. The other pads are connected in turn up to pin 14 of the LCD. The three switches need to be fitted on the front panel together with the LCD. The wiring between the board and switch $2 has be kept a s short as possible. The circuit fits in a plastic box about 150x90 mm. They are available with a battery compartment to take the four AA size batteries. Alkaline batteries are required since the voltage from rechargeable ones (NIMH or NiCd) would be too low at 4.8 volts nominally. Piekup e@H The pickup coil is made by securing a very fiat M4-size nut on a piece of sticky tape and then tightly but care- fully winding 10 turns of 0.2 -nun diam- eter {3WG36] enamelled copper wire around it. The nut is then carefully removed and the resultant coil shape sealed and secured In place by cover- ing it with a second piece of sticky tape. The result is a very flat pickup coll that 1 s small enough to probe into many different magnetic assemblies. The coil is connected to the meter using a twisted pair of flexible wires. For the prototype we used an RCA (audio line’) plug and socket of undis- puted quality Adjustment When the meter has been built it is necessary to adjust the preset poten- tiometer. Do this at an ‘average 4 room temperature so that the offset will be as small as possible at either a low or high room temperature. Plug in the search coil and switch on with the instrument case open and the range switch on the more sensitive range. The LCD should either read SET' or a number with ‘T h for tesla after it. If it shows the number, it means that the amplifier offset is positive so that the instrument has started to count imme- diately. L SET' either means that you are very lucky and the offset is zero or, more likely the offset is negative. Con- nect a voltmeter or scope to pins 2 (TP 3) and 4 (Sensor B terminal) of the PIC i.e. the analogue input and the analogue reference, and alter the pre- set until the voltage is within 1 mV of zero. After this, press ‘reset 1 (S3) and the display should show SET'. If an accurate and sensitive voltmeter is not available, it is possible to per- form the adjustment by trial and error. Get a condition where the display shows a number and ‘T\ then turn the 58 chief ct efcrtrodis - 5/2005 preset slightly and press reset. If it still reads a number, turn the preset a little more and press reset. Repeat until the display reads 'SET. Obviously, beware of taking the offset too far in the nega- tive direction, Usb the instrument To read the flux density, insert the search coil into the magnetic field with the magnetic field perpendicular to the cod. If the meter shows a reading, it probably means that the coil needs to be flipped. Turn the coil over and reinsert it. Press 'reset 1 and sharply withdraw the coil. Toe meter should now display a reading. It should be noted that any movement of ill e coll producing a change of linked flux results in a voltage so it is easy to trigger a reading accident ally Just press 'reset 1 and try again. It is possible to take a measurement by pushing the coil into the field but this is not recommended since it is easy to crash the coil into a metal pole piece. Obviously if the display indicates over range', you need to change to the less sensitive range setting. Another possi- bility is to withdraw the coil slightly more slowly. The meter is not a high precision instrument but it should be accurate to ± 10 %. Seareh coil experiments anti calibration The PCB search coil used for initial experiments was a printed circuit type. Although it was found to be stable and repeatable alternative coiis may be made horn insulated or 5 in our case, enamelled wire. However, unless you are lucky enough to have access to magnetic standards you have a prob- lem with calibration. It is possible to create standard fields using solenoids or other suitable coils but to obtain even 0.1 T it is necessary to put a whopping 10 A through some hundreds of turns. The coils heat up within seconds so the current changes fast if a constant voltage power pack is used. One possible approach it to create your own transfer standard 1 . This could be any available permanent magnet, it needs to be big enough to provide a fairly uniform field over the area of a search coil. Measure it with the stan- dard' search coil and then measure it the coil of your own design (possibly a PCB), Add turns or change the surface area until the readings agiee or give a reading different by some chosen fac- tor, The pickup coil as described above in relation with our prototype is a sug- gested construction only and not intended to acts as a reference coll. In a good many cases, however, compar- ative rather than absolute measure- ments of magnetic field strengths are more than adequate { 040253 - 1 ) Reference SmoLi wind turbines, see v iTv/w- score iQWind.-cQ.uk. See your design in print! Ulektor Electronics (Publishing) are looking for Freelance Technical Authors/ Designers If you have # on innovative or otherwise original design you would like to see in print in Europe's largest magazine on practical electronics # above average skills in designing e/ecfronic circuits # experience in writing electronics- related software # basic skil/s in complementing your design with an explanatory text # a PC, email and Infernet 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. Elektor Electronics K. Walraven, Head of Design Dept > fiO, Sox 75, NL-6J9Q-AB Seek, The Netherlands , Fax: f+3Ij 46 4370161 Email: k*walraven@segment,nl 5/2005 - elsVlor cfedrcnks 59 CO Elect rune i±t Part 5: measurin SUD LET 11Z F. -V. r _ ary : ni’jiz : :: : lit- _ y , ■_ -n . _ — ■ : 33 ci«"#£ "3J-5 1 y ) 1 * £m mm A Z. VI 8 .111 — * a SK'JiOr-SFiDLT r “ ”»T ?r y 1 . l JL 1 ■ 1 JT__a b . l. -.1. i j. X 5»r<_nEHvCtT EftHALSTB J l ecu? > Ffltml Tite Soiaxl Card Tester ■— j 2JP jlOSTCiP Np. of pfayba ck d evices jEditl No. of recording deukes |Edti 2 Chert J: Check 5Hl< Ktwil b «-■ f ii:CTZF.:IJ.L- ; TJ SHU JLLIA3 It i8tt> TlLTBSSi ; ... . 1 l '-j “ " ; . -- • Detlef Overbeek, Anton Vogelaar and Siegfried Zuhr _-I - ; r;= :* SJITp P&3?0£ = : : . ■ , - — i- - i - __ j,* t - — i- • • J i ^ j ^ - V -“T - . — ~ - — In Part 4 or this course, we used the PC sound card to generate a variety of waveforms. In I fils instalment; we turn this around. Here waveforms arriving via the line input of the sound card are stored and then displayed on the screen. Before turning our attention to describing how to program such a 'PC oscilloscope', we examine a few Delphi topics you'll need for this task. The purpose of the project described here is to implement an oscilloscope on the PC that uses the PC sound card as an A/D converter. This project consists of four parts: 1 . Drawing on Canvas, the 'drawing window" in Delphi, os an introduction to familiarise yourself with the material. 2. Drawing a sine wave. In the process, you'll learn a bit about reusing code rn Delphi. 3. Checking the essentia] equipment in the PC: the sound card. 4. The most important port: building on oscilloscope that con be used to display [on the screen) an AC signal present at the line input of the sound card. The First three items are addressed in this instalment. The fourth one is somewhat more extensive, so we re saving it for next month. Drawing First we want to show you how easy It is to display your own drawings on the screen [Figure T). (in capsule form, this is painting on Canvas .] Start a new project via File/New/Application, A form will appear, along with an editor. You should save this right away. Assign the name Co nvasSimple.dpr to the Delphi project resource (DPR) file, and name the form Canvas. pas. To build the program quickly, proceed as follows. First, go to the Standard component tab, select the panel component, and place it at the bottom of the Main form. Set the Align property to oZ/Soffom. Then place an image from the Additional tab on the remainder of the form. Using the Object Inspector (which you can bring up using the FI 1 key), set the Align property to a//- Ciienr. Place a timer from the System tab on the form. Nov/ go back to the bottom, where you have to do seve- 60 efsklw dedromts- 5/2005 ml things with the pane!* Give it a colour, put a label on it, and enter a name here [select whatever name you want to give the program). A panel has the special pro perty that it becomes the owner of everything that is pla- ced directly on top of It. That has a lot of advantages for searching, relocating and processing. Continue by placing another eleven Speed burtons from the Additional tab here. The icons that are placed on the buttons are supplied with the project. They are miniature bitmaps, which are also called 'glyphs'. The Glyph pro- perty generates a window where you can enter a path that specifies which icon you want to use. You con also make your own icons. Selecting Tools/ 1 mage Editor starts a program that you can use to make all sorts of images, but that's a subject on its own. After you have configured the glyph [of type Tbitmap) you also have to specify the number of glyphs, which is four The button has four states, so it needs an icon for each state. Now you have everything you need. The program listing dearly shows what you can do. It s a good idea to first create this program and siudy it, since that will help you understand the things you'll be needing shortly. You can use this program to place a variety oF coloured shapes (round, elliptical or rectangular) and put lines in specific locations or delete them. The principle is quite simple: the form has a Canvas property, which is what you draw on. It's also important to know that the farm puts the origin for all coordinates at the top left (0, 0), which also holds true for all objects you place on the form. Procedure DrawFxgl ; Begin Canvas * Rectangle (IQ, 10, 600, 300); End ; Procedure DrawFig2 ; Begin Canvas . Mo veTo (10, 10); Canvas .Line To (600, 300 ) ; Canvas . Move To ( 10 , 3 00 ) ; Canvas - LineTo (600, 10); End ; The first procedure draws a rectangle. The second grace- dure goes to a certain point and then draws a line from that point to another point. It's important to realise that the drawn image is not saved unless you have this task run under procedure TMa in- form. FormPaint (Sender : TObject). That's annoying, since you loose the image every time another window slides over the drawing. However, this doesn't happen if you execute the procedure in FomtPainfc. If other procedures are nested inside this procedure, you can clearly see that a particular task is executed each time, after which a selection is made as the last operation* Begin If Figl In Figs Then DrawFigl; If Fig2 In Figs Then DrawFig2 ; If Fig 3 In Figs Then DrawFig3 ; If Fig4 In Figs Then DrawFig4; End These types ore declared (under uses), and they are filled in procedures such as the following: Procedure Drav?F ig I ; Begin Canvas -Rectangle (10, 10, 600, 300); Figure J. A user-gensrafed drawing an the Delphi canvas. End; Procedure DrawFig2; Begin Canvas .Mo veTo (10, 10); Canvas .LineTo ( 600 , 300 ) ; Canvas -MoveTo (ID, 300); Canvas -LineTo (600, 10); E it d ; Procedure Dr awF ig 3 ; Begin Canvas , MoveTo (305, 10); Canvas -LineTo (305, 300); Canvas .MoveTo ( 10, 155); Canvas .LineTo (600, 155}; End; P r o c e dn re D r awF i g 4 ; Const Window : Array [0. .4 ] Of TPoint — ( (X ; 305; Y ; 10) , (X : 600; Y : 155), (X : 305; Y : 3Q0 ) , (X : 10; Y : 155), (X : 305; Y : ID}); Begin Canvas . Polyline ( Window ) End ; However, there's also another way to ensure that whate- ver is drawn doesn't immediately disappear, which is to draw an the canvas of an image. This is what happens in the example, and the image is switched' an or off by enabling or disabling the Visibility attribute. The Visibility attribute has the property Boolean, and it can be enabled or disabled. Image 1 .Visible := True; Timer 1. Enabled : = Not Timer 1 . Enabled; Enabled is reset in the last line of code above. It's useful to remember that this always causes the result io change 5/2005 - elc'dw electronics 61 Figure 2. The bosk ingredients for this project a buff on. a Speed buron and a timer. to the opposite state. The timer is used to cause a single operation to be repea- ted several times in succession, as in the previously menti- oned procedure. To allow a few more things to be incor- porated, there is also on extended version called 'Can- vas Extended', which is helpful tor learning how to use menus. A method for installing □ printer and printing your drawings is also included in this version. The listings of these two programs are available on the Delphi website of the Pascal Users' Group {www.learningdetphi.info) and the Elekfor Electronics website. Sine wave Now you're getting closer to your ultimate objective, which is building on oscilloscope. As you have seen, dra- wing on the canvas is actually nor all that difficult, but you have to bear in mind that what you want can become rather complex in use. That's why we decided to do something we haven't done so far in Delphi: using two units, one of which contains only code, while the other one, as usual, is a unit (form) that also displays an object. Thar means you can also use units to organise things in Delphi. Give each of the units a name, and link them to each other so they are aware of each other. This allows even very complex things to be organised in a comprehensible manner. That's exactly what you're going to do now. Naturally, the listing is available at the previ- ously mentioned locations. Start with File/New /Application That gives you your basic program. Save Form 1 and Unit! with the object display and code os Unit! .pas. Next, select File/New/Unit to create a second unit to be used exclusively to hold code. New units are numbered auto- matically, so Delphi will assign the name Unit2 to this unit. When you save everything, you will be automati- cally offered the following names: UnitLpas, Unit2.pas, and Project Ldpr for the Delphi project resource file. The executable file will also be assigned the name Project ) ,exe. It s important to know that Delphi can do the naming for you. That's handy for a small, simple project, but gene- rally speaking it's better to assign your ov/n names - pre- ferably names that are meaningful, such as Userlnier- face.pas and DisplayAfgonthm.pas * However, that's something you can do later on when you create your own projects. Here we decided to keep the default names so everyone is offered the same names. Now that you've saved everything, you hove to Introduce all the members of the project to each other. You re using Unit! and Unit2, and they have to be able to work toge- ther. File/UseUnif or ALT+F1 1 shows a list of units that can be added, ond here there is only one choice: Unit2_ Use FI 2 to bring the form [Farmlj to the foreground. Place a Paintbox from the System tab (second from the left) on the canvas. If you're looking for a component ond you can't find it, go to View/Component and type the name of the component in the window that Is displayed. Next, place a button and a Speed button. You also need a timer. These are all the basic ingredients of the project [Figure 2). Is it really that simple or is the hard part still to come? Practical experience shows that the best way to approach problems is to treat them like a tree with a lot of branches. IF you break a problem down into little pie- ces, It becomes easier to understand. Before you start an this project, it's a good idea to down- load all the code so you can see how everything firs toge- ther, However, we recommend that you build everything yourself as instructed despite the fact that you already have the finished project in your hands. If you do the work yourself you'll understand everything much better. Nov/ it's time to carry on: Procedure TForml .PBxP a int {Sender ; TObject) ; (* Invalidate Paintbox 1 *} Begin OscRepaint ( Paintboxl ) ; End; Whot's happening here? Double-dick on Invalidate in order to select it. Then press function key FI . The Delphi help menu will appear and display the following [or simi- lar) explanation: Use invalidate when the entire object must be redrawn. If more than one region must be redrawn , Invalidate will do this in a single operation without any Bickering of the screen. If you look at the buttons ond double-click in the IDE, you can expect Delphi to create a process. This process takes the following form: procedure TForml . ButtonlClick ( Sender : “Ob- ject); begin end; The next procedure also has something special in it: Procedure TForml *DoAc quire {Sender : TObject (* Handle button data acquiring OnClick event *) Begin If Speeds Litton 1 , Down Then Begin OscDataN 0; // No data present // This global variable is expressly included in this unit to make the unit reusable • / / Placing the var here makes it always avai- lable as soon as unit2 is linked to a project * Timer 1 * Enabled : = True; // Start data aanmsaJ: Paintboxl .Invalidate // Herteken bet form End Else Timer 1 .Enabled : - False // Stop data generation End ; 62 eltktcf elect? arifi - 5/1005 This procedure was generated by hand. That's not always necessary in Delphi, but it is possible. Here's an explanation or how to do it. You start with the Proce- dure line. The name of the form in which the procedure is located naturally belongs in this line. Here it's TForml, but you can use whatever frame is appropriate. After this, enter a name that describes what happens in the procedure. In the above example we chose the name DoAcquire, which indicates what the procedure is sup- posed to do. In this case a Sender is also declared to allow another object to be controlled later on: Procedure TForrnl .DoAcquire f Sender : TGbject); As we selected a Speed button and this type of button has four states, you can provisionally have the burton manage several different things. If it is in the dawn state, it checks whether any data are present, enables the timer and recognises the form. If it is no longer in the down state, it must stop creating data. The cade is ente- red between Begin and End as usual. The following example deviates from this arrangement. Here the button is located in a FormCreate: Procedure TFornil .FormCreate [Sender : TOb- ject ) j ( * These settings can also be handled in the Object Inspector (FU). You cen also .have them be triggered by a dou- ble-click event In the Events tab of the Object Inspector on QnCreate . In that case r Delphi creates the basic proce- dure and you fill it in . T ) Begin with Paintbox I Do Begin Width := 510 ; Height : = 410; OnPaint : — PBxPaint.; Controls ryle : = ControiStyle + [ csOpa- qus] End; Vfith SpeedButtonl Bo Begin Caption : = 'Acquire' ; AllowAllUp ; = True; Group Index : - 1; GnClick ;= BoAcquire End; With Timerl Do Begin Enabled : =■ False; Interval := 30; OnTimer i = DoTimer End; With Button! Do Begin Caption : = 'Clear'; QnClick DoClear End; OscBackground (Paintboxl); // Calculate background End; You can divide the text up in various manners as long as you pay attention to the semicolon, which acts as an ena-oHine character or command delimiter. The compiler will object immediately if there's something wrong here. The OoTimer procedure uses a bit of good, old-fashioned arithmetic: Procedure TFonnl . DoTirer (Sender : TObject); (* Handle the timer timeout event *) Begin If OscDatalJ = 3 00 Then // Global variable declared in Unit2 Begin OscDatalJ ; = 0 ; Paintbox! * Invalidate End Else OscAddY ( Paintbox! f Sin (-5 * 2 * Pi * OscDataH / 500J} End ; Figure 3. A v/mdov/ displaying Severn! sine wove cycles. The Paintbox is the object you draw on. We chose the value '5' here because we want to drasv five periods of the sine wave in order to fill! the entire screen. The End Else line inear the bottom) needs a bit of explanation. Each time OscAddY is called, GscDataft is incremented by 1 . This causes OscDatalJ to cycle through the range of 0 to 500 and draw a new sine wave for each cycle. Delphi works with radians for the sine function, so a full period of the sine wove corres- ponds to 2 ti radians. We can also do bit of cleaning up: Procedure TFonnl . DoClear (Sender : TQbjact); (* Handle the button Clear event *) Begin OscDatalJ := 0; // Date becomes empty Paintbox! * Invalidate End; That completes the description of the norma! form. Unit2 is actually intended to be reused, as we promised earlier an. This unit is very well documented, so it s worth taking the trouble to read through it carefully. Controlling the sound card Now we want fo show you how you can use ihe Windows environment to call the code (via Delphi) that you will ulti- mately need to build the oscilloscope we have in mind. Windows comes with a simple sound recorder [Start / All Programs / Accessories / Entertainment / Sound Recorder). It's a convenient tool for recording audio data via the microphone or line input (Figure 4). This is a good way to check whether everything is wor- king properly and moke adjustments os necessary. This Functionality is a component of Windows. You can also use Delphi to access most Windows components and use them far your awn purposes. This con be done via Win- dows, but it can also be done from ihe Delphi IDE. This is made possible by Windows application programming interface (API) calls. That's exactly what we want. The sound recorder can store the recorded audio data in a .wov file, and that's exactly what we used for the function generator in the previous instalment. Now comes the question: where can you find these API calls? Windows uses mmsysiem.dll for ihis purpose, and 5/2005 - e Inkier dedranks 63 Ft gu re £ . Tne V Vi n dows 5 o u r d Reco rder makes if ea s y to record c signal via the sound cord. Delphi provides access to this via AAMSysiem.pas, which is also called the Borland Delphi Runtime Library / Win32 mulfimedia API Interface Unit'. Before you can proceed any further, you have to specify that Delphi MAISysfem will be used for executing com* mands, and you must manually insert this unit at the beginning of the header of the form where the units being used are declared under uses. You can also find the file under Program Files\Borlcmd\Dslphi7\SQurce\Rtl\ Win\. Numerous rou- tines for using DLL are named or declared in this file, along with how they are called from Delphi. The inte- resting part for our purposes can be found in the Wave- form audio support section. All the routines and parame- ters related to audio input and output are listed there. Start off by checking to see whether you can actually find the sound card using a mini-application running under Del- phi. The DLL contains a routine called WaveOutGelNum- Devs, which returns the number of devices that can play back sound. Next to it Is the routine WavelnGeiNumDevs r which returns the number of devices that can record sound. To obtain this information, you can run a little test in the form of o program. Start a new project and place two labels and two edit boxes (from the Standard fab of the Component palette] on the blank form, along with three Figure 5. This lest program doted* which sound options are present in the PC . bit buttons (from the Additional tab of the Component palette). Place a label, an edit box and a button for each line, and add a third bit button underneath. Configure the third bit burton as a Close button by using the Object Inspector to set the Kind property to btClose. This will cause an icon to appear automatically, and the Close task will be executed without any visible code because this function is simply configured via the property. Change the text by entering 'Number of playback devi- ces' for the caption of the first label. The caption for the second label is 'Number of recording devices'. Use the caption Check' for the remaining two buttons. If you dick on the fop bit button, Delphi will open the text editor with a procedure already generated for this onCiick event. You can also see this using the Object Inspector in the Events tab. The BitBtnlClick proce- dure is entered there after the onCiick property. Enter the following code between the Begin and End statements: If WaveQirtGetNumDevs = 0 then .// Execute com- mend requests, sppl Icstion . HessageBox ( 1 Error ' , J IiO playback device found", mb ok.) Else editl.Text := letToStr ( VTaveQutGetNumDevs } ; // Convert found quantity into text. You use the WoveOutGetNumDevs command to call a function in mmsystem.dll that returns the number of devi- ces that can play back sound. You do the same thing for the second button, but using □ command for the number of devices that can record sound. Doubleclick on the button and enter the following code between Begin and End: If WaveXnGetHumDevE = 0 then // Execute command requests, application . HessageBox ( "Error ' , 'No recording devices found" f inb ok) els s edit2.Xext := intToStr ( wavelnGet^umDevs ) ; // Convert found quantity Into text. If you compile the program and run it (Figure 5), you'll see that the edit} text (the number of devices) changes after the Check button is clicked. This also happens with the other Check burton for the number of recording devi- ces. Now you know two things: a recording device has been found (the sound card), and you can find it using code. If you want to use the sound card for recording, you have to specify how you want to do this (that is, in which for- mat], If you look at the properties of the sound recording device, you'll see that if uses a PCM format. The other parameters ore the sampling rate, the number of bits per sample, and whether the information is mono or stereo. Mono with on 8-bit value is adequate for this purpose, and you can use 1 1,000 samples per second for recording (the lowest available value). Various structures for this informa- tion have already been defined in the MMSystem unit. If you want to know whether the recording yielded usable data, it's easy to check this by playing back the stored .wav file. For readers who ore following this course, on explanatory Delphi Course Glossary is available a t wwv/. Is arningdeloh i. info and on the Eiekior Electronics website a t wvw/. e iek 'preelection ics . co. uk . it clearly defines a number of terms used in the course. 64 tlfkter Ekdronhs - 5/2005 QUASAR electronics Get Hugged tnl Quasar Electronics Limited PO Box 6935, Bishops Stortfcrd CM 23 4WP, United Kingdom Tel: 0870 246 1826 Fax: 0870 460 1045 E-maik sales@quasarelectronics.com Web: vwAY.QuasarElectfomcs.com Postage & Packing Options (Up to 2Kg gross weight): UK Standard 3-7 Day Delivery- £355; UK Mainland Next Day Delivery - £3.95; Europe {E U) * £6. 95; Rest of World - £3 95 'Order online Tor reduced price UK Postage! We accept ail major c redrt/d ebit ca rds. Make cheque s/PO's payable to Quasar Electronics. Prices include 17.5% VAT. Call now for our FREE CATALOGUE with details of over 300 kits, projects, modules and publications. Discounts for bulk quantities. © CREDIT CARD SALES NEW! Bidirectional DC Motor Controller Controls the speed of most common DC motors (rated up to 32VDC/5A) in both the forward and re- verse direction. The range of control is from fully OFF to fully ON in both directions. The direction and speed are controlled using a single potentiometer. S ere v/ terminal block for connections. Kit Order Code: 3166KT -£14.95 Assembled Order Code: AS3166 -£205 Motor Drivers/Controllers ' Here are just a few of our controller and driver modules for AC, DC, unipolar/bipotar stepper motors and servo motors. See website for full details. DC Motor Speed Controller (5A/100V) Control the speed of almost any common DC motor rated up to 100V/5A, Pulse width modulation output for maximum motor torque at all speeds. Supply: 5-15VDC. Box sup- plied. Dimensions (mm): 60W*100Lx6QH, Kit Order Code: 3Q67KT - £11,96 Assembled Order Code: AS3067 - £19.95 NEW! PC / Standalone Unipolar Stepper Motor Driver Drives any 5, 6 or 8-lead unipolar stepper motor rated up to 6 Amps max. Provides speed and direc- tion control. Operates In stand-alone or PC- controlled mode. Up to six 3179 driver boards can be connected to a single parallel port. Supply: 9V DC. PCB: 80x50mm. Kit Order Code: 3l79KT-£9.95 Assembled Order Code: AS31 79 -£16.95 Assembled Order Code: AS31 1 3 - £24.95 NEW! Bi-Polar Stepper Motor Driver Drive any bipolar stepper motor using externally sup- plied 5V levels for stepping and direction control. These usually come from software running on a computer. Supply: 8-30V DC. PCB: 75x85mm, Kit Order Code: 315SKT - £12.95 Assembled Order Code: AS3158 - £26.95 Most items are available in kit form (KT suffix) or assembled and ready for use (AS prefix). Controllers & Loggers Here are just a few of the controller and data acquisition and control units we have. See website for full details. Suitable PSU for all units: Order Code PSU445 £8,95 Rolling Code 4-Channel UHF Remote State-of-the-Art. High security. 4 channels. Momentary or latching relay output. Range up to 40m. Up to 15 Tx's can be leamt by one Rx (kit in- cludes one Tx but more avail- able separately}. 4 indicator LED s. Rx: PCB 77x85mm, 12VDC/6mA (standby). Two and Ten channel versions also available , Kit Order Code: 3180KT - £41,95 Assembled Order Code: AS3180 - £49,95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port. C C or °F. Continuously logs up to 4 separate sensors located 200m + from board. Wide range of free software appli- cations for storing/using data. PCB just 38x38mm. Powered by PC. Includes one DS1820 sensor and four header cables. Kit Order Code: 3145KT- £19,95 Assembled Order Code: AS31 45 - £26.95 Additional DS1 820 Sensors - £3.95 each NEW! DTMF Telephone Relay Switcher Call your phone number using a GTMF phone from anywhere in the world and remotely turn on/off any of the 4 relays as desired. User settable Security Password, Anti- Tamper, Rings to Answer, Auto Hang up and Lookout. Includes plastic case. Not BT ap- proved. 130x1 10x30mm. Power: 12VDC. Kit Order Code: 314CKT- £39.95 Assembled Order Code: AS3140 - £49.95 Serial Isolated I/O Module Computer controlled 8- channel relay board. 5A mains rated relay outputs, 4 isolated digital inputs. Useful in a variety of control and sensing applications. Controlled via serial port for programming (using our new Win- dows interface, terminal emulator or batch files). Includes plastic case 130x1 OOx3Dmm. Power Suppiy: 12VDC/500mA. Kit Order Code: 31 08 KT - £54.95 Assembled Order Code: AS31 08 - £64.95 Infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control unit. Toggle or momentary, 15m+ range. 1 12x1 22mm. Supply: 12VDC/0.5A Kit Order Code: 31 42KT - £41.95 Asse mbled Order Code : AS31 42 - £5 1 .9 5 PIC & AT MEL Programmers We have a wide range of low cost PiC and ATMEL Programmers, Complete range and documentation available from our web site. Programmer Accessories: 40-pin Wide Z1F socket (ZIF40W) £15.00 18V DC Power supply (PSU010) £19.95 Leads: Parallel (LDC136) £4.95 / Serial (LDC441) £4.95 / USB (LDC644) £2.95 NEW l USB ‘All-Flash 1 PIC Programmer USB PIC programmer for all Flash' devices. No external power supply making it truly portable. Supplied with box and Wndows Software. ZIF Socket and USB Plug A-B lead not incl. Kit Order Code: 31 28KT- £34.95 Assembled Order Code: AS31 28 - £44,95 Enhanced "PIC ALL” ISP PIC Programmer Wit program virtually ALL 8 to 40 pin PICs plus a range of ATMEL AVR, SC E NIX SX and EEPROM24C de- vices, Also supports In Sys- tem Programming (ISP) for PIC and ATMEL AVRs. Free software. Blank chip auto detect for super fast bulk programming. Available in assembled format with ZIF socket only. Assembled Order Code: AS3144Z1F- £64.95 ATMEL 89xxxx Programmer Uses serial port and any standard terminal comms program, 4 LED's display the status. ZIF sockets not included. Supply: 16-18VDC. Kit Order Code: 31 23 KT - £29.96 Assembled Order Code: AS3123 - £34.95 NEW! USB & Serial Port PIC Programmer USB/Serial connection. Header cable for ICSP. Free Windows software. See website for PICs (supported. ZIF Socket/USB Plug -ITT A-B lead extra. Supply: 18VDC. Kit Order Code: 31 43CKT - £34.96 Assembled Order Code: AS31 49C - £49.95 www.quasareIectronics.com Secure Online Ordering Facilities Full Product Listing, Descriptions & Photos Kit Documentation & Software Downloads SHT1 1 sensor for predsion measurements T EM PERATURE Jurgen MaiB The tiny surface-mount SHT1 1 sensor module provides ca digital readings of temperature and relative humidity. The chip includes two sensor elements, an A/D converter, calibration memory and a digital interface. \ Temperature and humidity Temperature and humidify determine lo a large extent hov/ comfortable an environment is for humans, animals and plants, and there are many goods which can only be pro- served tn the right environmental conditions. The atmosphere is never perfectly dry; shere is always a certain amount of water vapour present in the air. Air has the properly that it can carry water in the form of wafer vapour. The amount of water so carried, measured in grams per cubic metre (g/m 3 ) or grams per kilogram (g/kg), depends on the temperature of the air: the warmer the air, the more wafer vapour can be carried. The maximum quantu ty of water vapour that can be carried at a given tempera- ture is called the saturation vapour density and the tempera- fur e at which the vapour density in the air is equal to the sot- uration vapour density is called the dew point. Dry air at a given temperature can only carry a certain amount of water vapour: at 25 = C at sea level 1 kg of air can carry a maximum of about 20 g of water. The absolute humidity in this case is thus 20 g/kg, while the relative humidity is 100 %. Under the same conditions, if the air is carrying 1 0 g/kg of water, ihe relative humidity is 50 %. Relative humidity, or RH, is thus the ratio of the absolute humidity to the maximum possible absolute humidity. 3f a body of air which has an RH of say 80 % and a temper- ature of 30 "C is cooled, there will come a point when the relative humidity reaches 100 %: condensation will form. This temperature is called ihe dew point. In meteorology ihe dew paint is an important indicator for predicting mist and fog. If the evening tempera lure is dose to the dew point,, there is o very high probability of fag in the night. Furthermore, the lowest night-time temperature can be esti- mated from a measurement of the dew point temperature in the evening. In electronics shops end on the Inter- net humidity sensors are easy to come by. Unfortunately they tend to either be cheap and offer poor accuracy or offer good accuracy but at a cost. Electronic measurement of humidity is generally done using a capacitive sen- sor. The result is subject to an error of between 1 % and 10 % f giving rise to large differences from device to device because of discrepancies in calibration. A very accurate technique is to use a dew point hygrometer. Here the con- densation of water vapour on a mirror surface when the dew point is reached is detected using an optical sensor. The technique is highly accurate, but, of course, also rather expensive. The measurement system described below determines the temperature, the relative humidity and hence the absolute humidity and the dew point to an extremely high degree of accuracy. The SHT1 T module The measurement device in this sys- tem is the SHT11 single-chip sensor module from Sensirion, which provides calibrated digital readings of relative humidity and temperature over a digi- tal interface. The use of an industrial CMOS manufacturing process in com- bination with a subsequent process- ing stage called ‘CMOSens technol- ogy' guarantees high reliability and excellent long-term stability The sen- sor, which is the size of a match head (7.5 mm by 5.0 mm by 2.5 nun ) is shown in Figure 1. It includes two cal- ibrated sensors, for temperature and relative humidity integrated on a sin- gle chip with a 14-bit A/D converter. The digital two-wire interface allows connection to a microcontroller. Fur- ther advantages include long-term stability low drift and a shore response time of 4 s. Its excellent signal quality and good interference rejection characteristics make the sensor module a particularly attractive choice. At the factory, each sensor is calibrated in a precision humidity-controlled chamber, and the calibration coefficients are stored in OTP memory on the chip. During measurements, these values are used to process the internal sensor signals. Application areas for the SHT11 range from greenhouse monitoring, through climate control for animal enclosures, Figure L Internal block diagram of the SHT1 h S/2005 - elhtor “icriFOfisti 67 DATA I r Transmission Start SDK figure 2. Initialising the interface. Table 1- Overview of commands. Command Code Reserved OOOOx Measure temperature 00011 Measure humidity 00101 Read siolus register 0011 1 Write status register 00110 Reserved oioix- niox i Soft reset 11110 Table 2. Coefficients required to calculate humidify. SO RH cl c2 c3 12 bit -4 0.0405 -2,8 • io 6 8 bit -4 ' 1 0.648 -7,2 ■ io- J to ventilation and process control sys- tems. Current consumption The sensor requires a readily-provided 2.4 V to 5.5 V power supply voltage. The voltage source should be stable. as variations can directly affect the measured values. After power is applied there is a delay of about 11 ms before the sensor is ready for the first measurement command. The current consumption of the sensor in operation is about 550 uA t and in sleep mode is about 1 uA, which is negligible for all practical purposes. Serial two-wire interface The bidirectional serial two-wire inter- face offered by the SHT sensor module is similar to, but not directly compati- ble with, the I 2 C interface: the role of the master continuously switches from controller to sensor and hack again. The SCK connection (serial clock input) serves to synchronise the sensor with the connected microcontroller, while data are sent to and from the sensor using the DATA. pin. The data pin is tri statable; it changes on the falling edge of SCK and is validated by the rising edge. The data pin is provided with a pull-up resistor and can be pulled low when needed by the mas- ter (the microcontroller). Command transmission To initiate a measurement the trans- mission start 1 sequence must be sent to the sensor. This entails pulling down the DATA line while SCK remains high, followed by an active- low pulse on SCK t after which the DATA line rises again (see Figure 2), The command which follows consists of three address bits and five instruc- tion bits. At present only address 000 is supported . The instruction hits for a temperature measurement are 00011, while those for a humidity measure- ment are 00101. The complete com- mand set for the sensor is shown in Table 1. After sending the command the micro- controller must wait until the sensor completes the measurement. This takes about 11 ms for an 8-bit meas- urement, 55 ms for a 12-bit measure- ment and 2 10 ms for a 14-bit measure- ment. Toe sensor indicates that a measurement is complete by pulling the data line to ground. The microcon- troller must wait for this 'data ready" signal and then restart SCK. Two bytes of data can now be read out (more sig- nificant first), followed by a one-byte CRC checksum. The microcontroller acknowledges receipt of each byte by pulling the data line low. The acknowl- edge bit after the CRC marks the end of the co mmuni cation If the CRC checksum is not to be used the microcontroller can terminate the communication mime dia rely after the Transmission Start DATA SCK / / w : 3 r_ 2 ' E-I : " .' i SHTn p*5 down file DATA 6ns DATA SCK Address- COD' \ Command- G0 1 01 1 it C4 C3 C2 Cl C3P 3OT ■ \ ,/\/\/Ww\/\/\ Bold = SH I Ixx controls DATA i p.b J S' Plain = uC controls DATA tine Measurement '55ms for 12 bri ‘11ms fur 8 bit 12 bit humidity data \ 3 t3 end fr&Tsnissran hf tv? C RC ,5 useci *** to# sow , It to S E fit* 7 S 5 4 3 2. t Q I ^ AA/VVVVWWWWVWY. DATA CRC-8 Checksum / wait for next measurement Transmission Start SCK 6 = 4 3 2 t 6 3,-k. yWWWYAiA Skip acknowledge to end transmission ’ \ i \ / v i > v / Figure 3 . Timing diagram for transferring a single reading. 68 tkltQr dfidTonits - 5/2505 LSB has been received by taking the data line high for the following acknowledge bit. If communication is interrupted, the serial interface of the sensor can he reset using the sequence of signals shown in Figure 3- Nine or more SCK pulses with DATA held high, followed by a transmission start sequence, will reset the interface so that a new com- mand can be sent. Processing the readings From tills point on it is just a matter of calculation: the sensor data have been transferred to the microcontroller and it is an easy job to convert these val- ues into a temperature result in ~C and a relative h umi dity RH. Since the temperature sensor is highly linear, it is very easy to convert the output value SO Teirr> into the actual temperature value: T - dl + (d2 x SOfcap) With a 5 V power supply, dl is -40 "C. For a 14-bit reading, 62 is 0.01 G C, for a 12-bit reading 0.04 C. Values for other voltages and for conversion io the Fahrenheit scale appear in the data sheet. A more complicated equation is needed to compensate for the non-lin- earity of the humidity sensor: ^linear = cl + ( c2 SO^) + {c3 X sOrh 2 ) The constants cl, c2 and c3 are given in Table 2. A simpler {and correspond- ingly less accurate) calculation is described in the application note ‘Non- Linearity Compensation'. At temperatures far from 25 G the temperature coefficient of the humid- ity sensor needs to be taken into account: RH comp - (T - 25 c C) x [0.01 -f (t2 x SOrr)! + Coefficient t2 is 0.00008 for a 12-bit measurement, and 0.00128 for an 8-bit measurement. A complete system The author has designed a measure- ment system based on the SHT1 1 sen- sor and an Atmel ATMegaS microcon- troller. Tlie circuit and a description of the system which offers and internal and an external sensor, along with printed circuit board layouts and soft- ware, are available for tree download from the Elektor Electronics website at v." v w. elektor- ele ctro p1cs.cq.uk . Please not that the above information has not been post -engineered by the Elektor lab, or checked by editorial staff. The original Sens in on data sheet and application notes are available for download from the manufacturer’s website at wv/w sensiri on . c om . '4 ■ - 7- : " i £TlL lectronics Edition (a Now extended with even more tcs f transistors f FETs, thyristors and triacsl EEektor's Components Database gives you easy access to design data for over 5,700 ICs, more than 35.000 transistors, FETs, thyristors and triacs ; just under 25.000 diodes and 1.800 optocouplers. All databank applications are fully interactive, allowing the user io add. edit and complete component data. ISBN 90-5381-159-1 £12,95 (USS 22.90) Order now using the Order Form in the Readers Services section in this issue. Elektor Electronics (Publishing) RO. Box 190 Tunbridge Wells TN5 7WY ENGLAND Tel -r44 (0) 1580 200 657 More information on www.elekfor-efeotronlcs.co.uk DON'T LOSE YOUR TEMPER Before phoning us - if you are looking for a hard-io-fi ml part. We have over 20,000 items in stock - including obsolete and up-to-date parts. WHY NOT VISIT OUR WEBSITE www. crick lew oodeleetronics.com 2N 2SA 25B 2SC 2SD 2P 2SJ 2SK 3N 3SK 4N 6N 17 40 AD ADC AN AM AY BA BC BD BDT BDV BDW BDX RF BFR BFS BFT BFX BFY BLY BLX BS BR BRX BRY BS BSS BSV BSW BSX BT BTA BTB BRW BU BUK BUT BUV BUW BUX BUY BUZ CA CD CX CXA DAC DG DM DS DTA DTC GL GM HA HCF HD HEF ICL ICM IRF J KA KIA L LA LB LC LD LF LM M M5M MA MAB MAX MB MG MDAJ MJE MJF MM MN MPS MPSA MP5H.MPSU MRF NJM NE O.M OP PA PAL PIC P.X RC S SAA SAB SAD SAJ SAS SDA SG SI SL SN SO STA STK SIR STRD S I RM STRS SV1 TTATAA TAG TBA TCTCA TDA TDB TEA TIC TIP T1PL TEA TI. TLC TMP IMS TPU U UA HA A UC UDN ULN UM UPA UPC UPD VN X XR Z ZN ZTX-i- mrmy otlters Me accept Mail, telephone & email orders. Callers welcome. Opening hours Mon-Sat 9:30 - 6:00 VISA Connect Cricklewood Electronics Ltd 40-42 Cricklewood Broadway London NW2 3ET Tel: 020 8452 0161 Fax: 020 8208 1441 sales@crickk^vooddectronics.com 5/2005 - chtar ekdrcda 69 mini project 5. 1 Surround Switch Box simple but extremely useful Of necessity, today's (sur- round) amplifiers have to come with lots of inputs and outputs. However, a problem occurs if you want to use several signal sources having an analogue 5. 1 output: there's only one compatible input available! The switch box described in this article solves the problem in a simple and elegant way. f’iVtci flitted ■ 5/2005 Measurement results {outputs loaded with 1 0 kQ) Current consumption: Channel separation: 60 dB (20 kHz] Crosstalk oa. 35 mA (switched an] 0 (switched off) >37 dB {1 kHz) <88 dB (1 kHz] <63 dB [20 kHz) Surround sound equipment has become widespread and is quickly invading our living rooms. The 5.1 standard is not just used in the DVD player — a SACD player will also have one (SA stands for Super Audio), while modem PC soundcards have a plethora of signal outputs. Unfortu- nately, it is bard to find an amplifier with more than one 5.1 Surround Sound input. Although switch boxes are available commercially, their price tags make home construction a neces- sity rather than a luxury Here is the proof. Three relays The design is as simple as it is effec- tive, allowing you to switch between two 5.1 signal sources. We’re using three relays with double-pole changeover contacts. This is done to make sure one input group is always connected through even if there is no supply voltage on the relays. Switch SI enables the signal sources to be routed appropriately. Network Rl/Cl serves to debounce the switch contact. At about 35 mA (at 12V} S the current consumption of the relays is a little too high to enable the circuit to be pow- ered by a batten 7 pack. That is why we recommend using a small mains adapter. The relays used here will work reliably even down to 5.3 volts. Such a low voltage causes the current demand to drop a little. The motivation for the use of relays as switches is their fairly good pile e/per- formance ratio and availability. Of course, switches are passive, requiring no supply voltage at all. However, within the same price class, relay con- tacts are not only better, but also more reliable than the traditional switch. Incidentally, the parts list indicates a generic, industry standard relay allow- ing you to apply other, compatible types as well Deuble-sided beard In order to keep it as compact as pos- sible, the project is built on a double- sided printed circuit board (PCB). The artwork is based on the use of cinch sockets with a 6.3-mm thread. Appar- ently there are also sockets with a thread of 7.2 mm or even larger. If these larger sockets are used, the rele- vant PCB holes have to be made a lit- tle larger. This will remove the through-plating hut that is of little con- sequence as the sockets themselves will establish a contact between the top and underside of the board. If you use a larger type socket, you have to prevent the nut from creating a short- circuit with the signal connection or the positive supply track for the relays. FROtlT L O R K1 K2 -© ©- FL-1 PR-1 L O R K7 KS CENTERsSUB +12V + ri (±yp 1 I K3 R K4 ruf FL ^ PR 4 >&A L O R K5 K6 ©~1 FL-2 U FR2 L K9 R L K10 Kit [4 f] R K12 -© i RL KE2 i RR RL-2 RR-2 D540M - U Figure J. The circuit diagram excels in simplicity. 5 2005 - sld.tui decides 71 solder side Figure 2. The FCB has been designed for maximum channel separation (note the earth plane running between signal lines j. The connection labels printed on the Elektor PCB are of course, free to adapt to your own wishes. For best results, one of the relay supply COMPOUMLNTS Resistor; R1 = ] Oil Capacitor: Cl - 100 pF 25V radial lines has to be connected to the signal ground. This is done to eliminate the effect of the relay coil on the signals. Because the supply floats with respect y. to the signal voltage, it makes no dif- ference if you connect the positive or negative supply line. The enclosure is preferably a metal type. Do ensure a proper connection between the case and ground of one of the input or output sockets. The mains adapter may be connected to the circuit by a low voltage DC sup- ply socket for chassis mounting. Our audio lab measurements on the circuit indicated that most cross-talk between two channels is caused by the contacts in one relay. The separa- tion between the other signals was greater than 100 dB The circuit is open to countless varia- tions and we wish you lots of fun building and using the switch box! JLB4SG9-11 Miscellaneous: Kl-Kl 8 - cinch socket, chassis mount, gold-plated, 6.3mm threading = switch, 1 make contact RE 1 . RE2 RE3 = 1 2V relay 2 changeover contacts, e.g,, Meisei M4d 2H 960 11/1 2 V [Conrad Electronics order code 505170) or equivalent. PCS, ref 054G09- 1 from ThePCBShop 72 eT lunr - 5 2005 Visit our website www.disteLco.uk j| THE ORIGINAL SURPLUS WONDERLAND! J THIS MONTH’S SELECTION FROM OUR VAST EVER CHANGING STOCKS Surplus always wanted for cash! ] GIANT 10" 7 SEGMENT DISPLA YS I IC's -TRANSISTORS - DIODES A z'-k. r= to z—-z to .=_ -.-nn-z -- A- : : ■ j L -i: z r-L .v □ fTc '3 Ptes” 1 ne 10” character size g’.'re eroeptorca’ read- sa'.Tt i ono zteterces -mi envies 3 r,-.f-z or scoTcs- tcrs fftoudro score boards digfel clocks, courv tecs. event timers Ql: As Ere ltAs are 3 &&£ = zr-tCTZ-C-’-JS -- i VL tor" *2 . DC srrpe sA^ring via a'.'Ehes, rhays P C or PC nsy bekf^tDOcrfiblsaigSecrniLA^iedg^L ftegral Zsn FtpwsT rrerray v4ich groat/ sripScES deggn. For sn excellent DIV practical article. see the May issue of 'everyday & Prechca! Oectrocacs r rt^AJine kfesl School l Godege con- struc&fi proved. Staffed in good RFE oonjffo(\ comftete wfti tteta dToa. Less lhan 3oy = Only £29.95 a; or 4 / £99.00 Di of makers price ! Oder ^ fv&6 THE AMAZING TELEBOX OM *** ** rr- mISTt TV SOUND & VIDEO TUNER CABLE COMPATIBLE 1 Converts your colour monitor Into a QUALITY COLOUR TV'! “ns TELEBOX o ar azreir. a to. . zzzz>z —a'rs ro^eed ini cootsiwgal efexsncs react/ to pig ite> a hod d \*3so mentors cr AV squpreriwhfch srato^vi^accfrpc^e vifeocrSCARTlipyL inecorpcefc vbeocxzpJl vstJ ateo jftjg rira% mfen nxst video raccnfers. a&fWtng rso^pScn of TV channels not norma:";/ receivable on most Revision rec&r.T'fs' te_£- BOX PiEh button ccnfrcte on tie trri part: alow reoep&zn c f a tofty Lneazto of Lr L-.Hr ectojr ^evece charne-is TELEEOX MB -:e .^rs /hj- aly si testehstn hKyjgiries VHF ait UriF aiducfng the HYPERBAND as used by most cable TV operators, '.z-te tor desktop computer video sys- tems & PP (paefexe ii pckia) s£yp& Per eorepiese OGnpfl% - evai fcr vr-avtt vv'.-cc'. i.:o: ■ 2.- -Jto- .v=z llo 5.-0V an: nv, -=■.=• - ? serfo cuEpui Drzcc-itj si rjo^d. Brand ne.s - fu>/ TE LEB Q X ST fir Cdrr ze-5 j!e \ zeoi nput type me r.Aors £26.95 TELE BOX STL as ST but fitted with integral speaker £39.50 TE LEB OX hf B Multiland VHFilJHFjRCebSe^Hypertisnd timer £69.95 For overseas PAL versions stste 5.5 or 6 m Hz sound specific&ibn. ■-C. r cal - r ,;f:zi r 2 -: ;tl 'czcz: . ' “a a: : - V= =. _ z_ = =e _ ■ nect&d 10 a cabia type service. Shipping on a3 Talebox's. code (fl) Slate or the art P.Al (UK spec; UHF TV tuner module CVa^ i ,, ’Th composite ' / pp . dvo & Ml CAM hi fi stereo sound cl:'Lj.L$. Micro eiectronlcs =i'i c -n ere sms I PCS on : ,y x 160 x 52 mm enable fuff tuning control via a simple 3 wire link to an IBM pc type computer. Supp&ed compfete with 5 Em pi e working program and dpewnerdabon. RepuYes -5- 12V & + 5V DC to tmas. B RAND NEW - Order ss M YQ0. Only £39 . 9 5 code (B) SE"Q v | . , iViV.dJ5 lel-CO, uk d3 t5_fny00. him for piciurn + full details HARD DISK DRIVES 2V*" - 14 m 2Vz‘ TOSHIBA MK1O02MAV 1. IGD aptopitZS mm P; New £59.35 254" TOSHIBA MK4313MAT 4 3Gb laptop (S.2 mm H| New £10 5.00 254" TOSHIBA MK&409MAV 6.1Gb laptop (12.7 mu h New £9B.D0 2 Y TOSHIBA MK1B14GAV18 Gb laptop (12 mm H) New£U9 95 254* to 314' conversion kit for Pc’s T ocKr^sfete with connectors £1 5J95 3'// COMPAQ 3 i 3706-521 (eBV 9 zb UL7 SCSI 3 New £199,00 OBSOLETE - SHORT SUPPLY -SULK 10,00(7000 items EX STOCK For MAJOR SAVINGS CALL or see web site www.distef. co.uk COMPUTER MONITOR SPECIALS Legacy products High spec genuine multysync. CGA, EGA, VGA, SVGA Mteuhiahl FA3415ETKL '4 r S'/GA MuJhsync czozr mcotor wsh ine 028 del pteh Lti= aro r=sz>- _zj m of 1024 x 753- A van- £r 1 3 rcuis amatol tt = ho-ii cr ccrrcijs‘5 tocliid -g IBM PC's m CGA. EGA, VGA a SVGA modes.. BBC. COVJitOEXJRE (retjang Arrlg-. J Z'T ARCHIMEDES — t: APPLE. 1.5ary -securas: Etched ^legate 3d LOW RADIATION HPR sgc-zn zsz-qt Fu v guacantesl. EXCELLENT z3e used ccnoYcrt Hi & Swfvei Base £4.75 vGA^tbcBMPCinc^ Only £1 29 (Ej EXtehtei oab'es for other types of computers svailsb^i - CALL Generic LOW COST SVGA Monitors Wo choose the make T which includes Compaq, Mitsubushi IBM Z sic. Supplied ready to wn a r/i a! I cables. Standard RTQ 9j? doy guscanteu. 14 iJ 15“ 17“ £59.00 £69.00 £79.00 order TDB4 order TG21 order UES Supplied in good used condition. Shipping cods /DJ 354" FUJI FK-3&9-2S 20mh MFM IT RFE 3 J CONNER Cr*3024 20 mb IDE 1/F [or equv ) RFE 312/ CON H ER CP3&44 40 mb IDE LF (nr equiv.) RFE 354" QUANTUM 40S Prodrwe 42m& SCSI l/F. New RFE 5: *' MINISCRiBE 3425 2Z~z VElrf IfF [or equiv.} RFE z , ' SEAGATE ST-233R 30 mb RLL UF Retort) 5' / CDC 54205*51 40mb HH P*IFM LF RFE tested 554" HP 97543 650 Mb SCSI RFE tested HP C3010 2 Gbyie SC3 differential RFE t NEC P2246 35 Mb SMD interface. New FUJITSU M2322K 16S’,fii SMD AT RFE tosied F U J ITS U M2 3 S2K 2 Gb SVD F RFE tested 5 T ; 5’ 6 r "■Er_ £59.95 £59,95 £59,09 £49.00 £49.95 £69.95 £69.95 £99.00 £195.00 £99-00 £195.00 £345,00 Msny ocher floppy & H drives, IDE, SCSI , ESDI etc from stock, see websfle for full 1 slock list. Shipping on s II drives is code (C) Only £99.00 idi TEST EQUIPMENT & SPECIAL INTEREST ITEMS this section are pre o wned. MITSUBUSHI FA3445ETKL 14" -= sz-z-z SVGA npwiitd'? £245 FARfiELL 0 £QV EG 2: 5 1 Amps bench Pc>->*r. Supples £995 FARM ELL AP3060 B*30V DC @ 80 Amps, bench Sirppy £1850 KING SHILL C24C3/1 (FKJV @ OC 200 Amps - NEW £3950 t kiV ta 4DG hV/ * 4M Hz 3 porter sources - ex slock £PO A IB.M 3230 Type 1 _ t oi:«n r r.g base u« r 1 rirr.-e: £760 Wayne Karr RA2O0 Audio 6et|uency re sp in n&a analyser £2500 I HF 00 EC 1 U« 24 port. RMS ne&mbr*: = z : : - zene.s, ^TH93 £“ 9 3 COM 15670 12 Port Ethernet hub - RJ45 raniiectors £LD97 £69 3COM 16571 24 Port Ethernet hzb - RJ4icp,".neciJTS £59 3COM 16700 8 Port Ethernet hub - RJ45 esamectocs NELY £39 IBM 53F55G1 Token E&ig ICS 20 port lobe modutes £POA IBM MAU T okan itog efishibf jfon panel 822B-23-5Q50N £45 AJ II £0 1 Lew d istojiton escalator 9Hz to 33GKhz, IEEE LG £550 A LL GO H 83 66.1 1865-1 8&0 MKz hybrid power combmer^ £250 T re nd OS A 2 74 Data Analysa - vr.Pi G 703 [ 27.1 \EA-.o £P O A Ma rco ni 63 1 D Ptd-zraTrLirizt ie 2 tz 42 G Hz ne p s rs' c r £4 50 9 Marconi 2022C lOKHz-IGHzRF 5 anal geraralsy £1550 HP1G5QB Logic Analyser ” £3750 H P37 5 1 A Peue-Tr, ge r orator 1 HF37S2A E nw Detector £POA H P 662 1 A Itoz Prog ramjrac-' 5 G F 1 3 PSU 0-7 \ 1 60 v/£ 4s £1500 H P62 64 feck mount variable 0-2DV @ 2QA metered PSU £475 H P541 21 A DC to 22 G Hz tot r chanitel test set £PO A HP8130A Opt 020 3C0 MHz putsa generator. GmB eic £7900 HP At, A0 8 pen BPGL high speed drum ptodera - from £550 HP D RAFT JilAS TER 1 £ sen tegh s^eed pAottor £750 EG+G Brook deal 95035C Prer-s zn Seek in amp £1800 Kedhlcy 590 CV capacitor I anafyser £POA Ratal ICR40 z-z 40 d'tennefvixde recorder system £3750 Fi&kors 45KVA 3 ph Qn line UPS - New batteries £4500 Emerson AP130 2 5 KVA induSl' S! Spec.UPS £1499 Mann Tally MT645 H : gn speed ! ne printer £2200 Intel SBC 456 1335E Vu'i l sS 466 System. 8Mb Ram £945 Trio 0-‘ S vie '■ear. metered 30 snp bench PSU. New £550 Fujitsu M3041R €i D LFM h : -zn speed bend pcirtEr £1950 Fujitsu M 3 04 1 D 600 LPM printer with network interface £1 250 Siemens K440D £4Kz to denw angiysgr £2950 Perkin Elm e r 299B tnfrarez iiazva rhotometer £ 500 Perkin Ermer 597 fnfra^a sp-eztrschctOTSlSJ £3500 VG Electronics 1 035 TELETEXT D^COC ng Ms'-j'" Vrtz - £3250 LighlBand 60 output high spec 2u ladr mount Villen VDA’s £495 S g k onto SO 1 50 H 1 5 cha r. rvsi d tolta Hy brid chart redo rder £ 1 995 B&K 2633 M ropphcxie pre amp £300 Taylor Hobson Tslrysurf ampfdver, recc-rder £750 ADC SS200 CedMn rfkuddegas deteziDr/ monitor £1450 BBC A fit 20 3 PP', 1 , f.tete - ; Ernest Turner) +■ drive efsctmmcs £75 AURiTSU 9654 A Qptca DC-2.5&b *av5rjTm rr.cr ior £5650 At! RiTSU ,M L93A (nfical py^cr m-s-tof £990 ANRfTSU Fto m opzc ch= rg c's rist'-c test set £ P OA R&S h 3 UZ Dtra? scund unit £650 R8S SBUF-E1 Vistoh modn r etar £775 VV1 LTRO N 6630 B 12_4 20GHz RF sifteep gene rats r £5750 TEK 2445 15C MHz 4 trace ci-zj ascepe £1250 TEK 2465 300 Mhz 300 14Hz osc^ctscope rack mount £1 955 TEK T D 33B0 400Mhz digSaE mstome * dsk drh^ F FT etc £2900 TEK TD S 5 24 A SOOMhz c^jrtaJ realiims + co=d4J r t£spjlay etc £51 00 HP3585A Opt 907 20Hz to 4Q Mhzspeclnjm aaalys&r £3950 PHILIPS PW1730f10 6GKV XRAY genera tor & zzeessa riee £P OA VAR1ACS - Lergs rangs from stock - call or see aur website CLAUDE LYON S 1 2A 240V sln^te phase a u la. vd l rezs £325 CLAUDE LYONS 100A 24&415V 3 phase auto vutL £2900 =,<4® <&■ 19” RACK CABINETS Europe's Largest Stocks of quality rack cabinets, enclosures and accessories. Over 1000 Racks from stock This month's special 33/42/47 U- High Quality All steel Rack Cabinets Msde by Euro-craft Enclosures i_to :o the highest pus- sibte spec, r^zx fsatores all steel construction with ■i:“ = re= s 5 =e. ; -=-: g”z z=.z- z::‘± 2 ~z tank rioc'-a 5 re hinged Tor easy access a |£zyaza wan ri.e secure 5 fever barrel locks The front door cs constructed of double watted |- i’ee’ with a ’designer style 1 smoked ao-"_, c from panel to enable status Indicators to be seen ; through the panel, yet remain unobtrusive. ' Internally the rack tenures to . s totted rein- famed .erito&l HVr-g m-sm.hers to lake the heavi- est of 19" rack equipment. The tv.-s mavaz e venics fixing slruts ^extras avaitobte are pre punched tor standard ‘cage njts : . A mains dis- tribution panel internally mounted to the ixyttom roar, provides B x EEC 3 pizi Euro snirAeto and 1 : ' 2 £" l: if switched utility socket Oven^l venSa- Son i s provided by fuSy tguvsned bade doer aid driubte skmned top sectsKt with top and side kxjvros. Trie top panel nay be removed for fitting of integral fans to the s l c i_- ale d _ . G '. n •- r "^at L r -j5 intrude: fitted castors and floor tevefers, propDrid^ed utety panel ai toner rear tor cable l connector access etc. So pp frpq in excellent, slightly used condition with keys. Colour Royal Wue. some grey avaiabte - GALL - Can be suppled In many otter configurations. VIDEO MONITORS PHILIPS HC535 (same style as CMS 33 3) atoraztxvely sZf 'c-z 1-L ca'our mc-n'tor whn htolh RGB and standard composite 15-625 Khz video inputs .'■= SC ART socket and separate phono jacks. 3.: c power amp and speaker tor all audio visual uses. Wi conned dreetto Amiga and Atari BBC computers. Idee! for ali video monitoring / security appftcatmns vritn direct connection to m os t colour cameras High qusSty wiih many features sttch as front conceal ad Rap controls. VCR corteetton button etc. Good used axvhbcri - fu% tested - guera ■n teed Anlu C Q Q fin Ckmensiofis: W 14* xhl^/Ax 1514' D. w r 1 1 J t ” lUU t p > PHILIPS HCS31 Ultra compact 9" colour video mocHtor with stan- dard composite 15.625 Khz video Input via SCART socket. Ideal for aU iTKJfvtctfing / seontty appficafions. High qua^ty, ex-egtrlpmsm fully tested £ guaranteed (possible minor screen hums}, tn attrac- tive square bock p&asfic case measuring \Y1CT x H1Q T x 13*Z' O. 240 VAC ft™ powered ^ Q n[y £79^0 (D> INDUSTRIAL COMPUTERS Tiny steBbox sized In-dustriaS 40 hfhz 3B6 PC system measuring or.j (mm) Zcz w X SB h X 272 d. Ideal fcr ced-zstei contra spp 1 ;- catlors nmning DC S , tor- u s c r even Windows ! Steel case con- tsi's 85 to 2o5 . AC 50 ' 60 n z 70 Watt PSU. a 3 sz: ISA pass he backplane and a Rocky 316 (PC1D4) standard, singte board com- puter wtth S MByte NON VOLATILE soOd state Tfisk On Chip’ FA\*2.$< S;=teT ::-:-ses: w::v. j'E =4 rs-2 with 40Ji1Hz ALi 3B63X CPU. 72 pin SIMM s?ot with 16 fidiyte SIMM, AMI BIOS, battery backed up real bme dock. 2 x9 pen D 16550 serial ports. EFpiECP printer port, nirt DIN keyboard con- nector, fioppy port, IDE port for Irani drives up to 52 £ MB. te capacity,, watcridog fimer and PC/104 bus sobteL The 3 MByte solid stats 'disk on a ch$T has ria omt BIOS, and can be ftEskert, Ebrmsttfed & booted. Supplied BRAND NEVf fully tested 1 aid guar- anised. Ftsrfu ceta see featured item WiVetss-Ts Order as G525 100 s o( applications inc: firewall, routers, robotics etc 33U Order as B C44 External dlmeciskins irnhii^lSSSH x 635D x 603 V.. ;£-L H t 25" Dx23 i i \Y J Only £245 42U Order as DT20 Exlemal di mens tons; mm=2fI19H x 635D X LiL s.s'rtaras! □ x 237/ VV ; Only £345 47U Order as RV35 External dimensions mm^2235H x 635D x 603 W. (83' H x 25’ D x 23-4’ W ) Only £410 Call for shipping quotation COLOUR CCD CAMERAS . 6 /, m Undoubted. r , a miracle of modern technology A Kir special buying pc-wer 1 A quality product tea- aL hiring s fu / cased COLOUR CCD camera at a ™ glvE awsy price > UnJtfgstyros fia autefight sensing fw uie in low light i high light ^ applications. A 10 nun :-j.eZ focus wtov ang a ens tjivas excellent focus ^ and resolulaon from c.oao up fa izr.p range Trie composite video output oonrieef to any comp3s.fi> monzof or T2 , a SCART sockatj and rzoii ..zog recorders. Unil runs tram 12V DC so fdeel for sezunty h portsble applica^ tlona i'iherE rnaMiS pi.var r>;: S'. ; 55 e Overafl tiJmen-sions 66 nun vnlrte x 117 deep x 43 fpgh. Supplied BPA.Mj \£,'. 5 f z.iz'ze: >>. z - _:e r ’ 1 j i s i :i- : = "s 5e:_to/ -z~e . .'.e: .'At Cto': rZ el: Otoe: as LK33 ONL Y £ 79.00 or 2 for £149.00 ,b SOFTWARE SPECIALS 7 NT4 Workstation, complete with service pack 3 and licence - OEM packaged. OWL Y £ 89.00 h ENCARTA 95 - CD ROM, Hot the latest - but at this price ! £TJ95 DOS 5.0 on 3 V> ' cF.sks w .lb cervdse bocks c ■ Q Base . £14.95 Windo ws for V/orkgroups 3.1 It Dos 6.22 on 3.5" disks E55-QQ Y/indowe 95 CDR05t Only - Ho Licence - £19-55 Word perfect 6 tor DOS suppesd ci 3' diske L'.zh r £24-95 shipping charges for software is code B SOLID STATE LASERS Visiito red T E70njn .ase- z ==a assembly Unit runs from 5 V DC el eppmx SD mA Original made tor cafiCnuatis use m anfustna] bar- code scanners, trie teser is mounlert in a temovahte soSd akimcniim nOock. which nirtarons as a heatsink and rigid optical mounL Owns of b tod? are 50 wx 50 rt x 15 h mm. Integral features inc&Jde aver tem- perature shutdown, current control, laser OK ouput, and gated TTL CN _C-- 1 . 1 e ' .. -z±2 a.tza-'— zz: zz- zz — ii z - :> ^ z ■■■ 5 etc. Suppled cc-Ti p cte .'.toi date sheet Order as ™i ONLY £24.95 .. r .•, : z--,z‘ zv: design tips More Current from an LM2575 A. Vogel The LM2575 is a Simple Switcher' from National Semiconductor, which means it s a switch-mode controller 1C ihai's relatively easy to use. The members of She Simple Switcher family are designed for output currents of 1 A, 3 A and 5 A, However, sometimes even more current is necessary. A J pro- fessional' designer solves this prob- lem by using a PWM controller with on external power MOSFET, but such controllers (and integrated controllers with even higher output currents] are rather expensive, dif- ficult to obtain and highly suscep- tible to design errors. The best solution is thus to increase the output current of a Simple Switcher. This can be done by using the output signal to drive an external power switch in she form of o p-chon ne I MOSF FT with a low 'an 1 resistance. The Simple Switcher, in this case an LM2576, is only used as a switching circuit. When Its output is on (High), tran- sistor T2 conducts and pulls the gate of the MG5FFT to ground potential via D1 . By contrast, T2 is cut off when the output of the switching controller is low. The gate capacitance is then dis- charged vio 13 and Dl, causing the MQSFET to quickly switch off. Without this emitter follower, the gate capacitance could only be discharged much more slowly via R3, Seen from the outside, the cir- cuit acts the some os a simple 1M2575 (aside from the increased output current, of course]. We must also mention a drawback of this arrangement: the circuit dees not have short-circuit protec- tion or overtemperature projection. This must be taken into account when It is used. The BC546 used for T2 is no! espe- cially fast. The power dissipation of II decreases if the edges of the gate signal ore steeper. It would thus be better to use a BS1 70 for T2, since it is faster. If a BS170 is used for T1 , the value of R1 must be chosen to keep the gate voltage below 1 2 V. If the input voltage Is 1 2 V, R1 can be replaced by a wire bridge. Naturally, the output Inductor must be suitable for the desired output current, and the core (as well as the output capacitors] must be suit- able for use with high-frequency signals. The following considerations must be borne in mind in designing the circuit beard. First, conductors car- rying high currents must be os short and broad as possible. In addition, currents flowing into the Inductor and electrolytic capacitors must be kept separate from cur- rents flowing out of these compo- nents. Finally, the feedback path must never pass through the mag- netic field of the Inductor. Inrush Current Limiter Alexandr Smertenko In many households, computers are switched on with all of their peripherals at the same time. As these devices are normally fitted with switch-mode power sup- plies, which briefly draw very high currents when first switched on, it may happen that the fuse blows or the circuit breaker trips {just as with heavy-duty electrical tools). The circuit described here provides versatile, competent protection against extremely high inrush currents, ail at o rea- sonable cost. Its operating principle is both Author's home page: http:// www.acG-vpqel-de LM2576 dotasheef wYm-nationalcoffl/pf/LM/LM257 6.html simple ond effective. When power is switched on the current is limited to around 1 4-15 A by a high-power series resistor (R 1 ]. At the some time, a dc voltage generated by a small power sup- ply starts charging C4 via R2. When the voltage on the capac- itor reaches 0.7 V after □ good half a second.. T1 posses enough current to energise the relay ond short out the series resistor. The load is thus directly connected to the mains. The only luxury In the circuit is a neon lamp that lights up while current limiting is active. If the lamp dees not go out immediately after the power is switched on, something Is wrong and the series resistor Is at risk of going up in smoke, despite its impressive power rating of 100 W. 74 dtktor rlcfliG tiics - 5/2005 IC1 9-V Battery Replacement Lex de Hoo This circuit v/as originally designed to power a motorcycle intercom From ihe vehicle supply system. This type of intercom, which is used for communication between driver and passenger, generally requires quite a bit of power. In order to improve intel- ligibility there is often elaborate filtering and a compander is sometimes used os well* The dis- advantage is that a battery does- n't lost very long. You could use rechargeable batteries, of course buf ihaf is often rather laborious. It seems much more obvious to use the motorcycle power supply instead. A 9-V converter For such on appli- cation has to meet a few special requirements. For one, it has to prevent interference from, for example, the ignition system reaching the attached circuit. It is also preferable that the entire cir- cuit fils m the 9-V battery compart- ment. This circuit msels these requirements quite successfully and the design has nonetheless remained fairly simple. In ihe schematic we can recognise a fil- ter, followed by a voltage regulator and a voltage indicator* 01. which protects the circuit against reverse polarity, is followed by an LC and an RC Filter (C3/LI/L2/CI/R1/C2). This fil- ter excludes various disturbances from ihe motorcycle power system. Moreover, the design with the 7SL08 and D3 ensures that ihe voltage regulator is operating in the linear region. The nominal sys- tem voltage of 14 V can some- times sag to about 1 2 V when heavy bads such as the lights are switched on. Although the circuit is obviously suitable far all kinds of applica- tions, we would like to mention that it has been extensively tested on a Yamaha TRX850, These tests show that the converter functions very well and that the interference sup- pression is exceSlent. Very Low Power ource Level Driver Support with I Time Multitasking OS with I free run time licence. b Unlimited email support. Tii i jp* | ■»» w * ■ f i • _ | 1 «■ Core up tc f Jp Ext' www. cms. uk. com see our web site for full details CAMBRIDGE MICROPROCESSOR SYSTEMS LTD Unit 17-18 Zone ‘D 1 Chelmsford Rd. Ind. Est. Great Dun mow, Essex CM6 1XG Telephone: 01 371 875644 email: 5ale5@crns.uk I com BS2P/24 BS2P/40 Parallax BASIC Stamps - still the easy way to get your project up and running! Serial Alphanumeric and Graphic Displays, Mini-Terminals and Bezel kits Robotic models for both the beginner and the advanced hobbyist Motor Drivers On -Screen Displays DMX Protocol U/ Sound Ranging — — Animatronics and Specialist Interface-Control Modules Quadra vox Sensorylnc Parallax Tech-Tools MP3 & Speech Systems Voice Recognition Ubicom Tool Kits PIC & Rom Emulators BASICMicro PIC BASIC Compil ers »i - Development Tools Milford Instruments Limited Tel 01977 683665, Fax 01977 681465, sales@miiinsf.com retronics TV servicing equipment ca. 1955 Jan Suiting Up to about 1 985 radio and TV repair and servicing was a seri- ous business providing employ- ment to thousands of trained technicians. With the arrival of the microcontroller and dirt- cheap Far East impart TV sets the nac ] .e art V repavrtvxg TV sets at the component level [one hand in packet!) was no longer economic and disappeared in all but the lowest developed countries in the world. The lost fairly authentic TV Service Chop (sic) I saw was in an idyllic street near Pyihagarion harbour on the Greek island of Samos (yes, the birthplace of Pythagoras). The lettering on the shop window did not belie the (admittedly mini- mum) activity In the shop, which actually hod a cluttered work- bench and fair piles of 1 970s test equipment. The weary-look- ing shop owner an English expatriate, I would describe as an old hippy. In most European countries, the TV set took about ten years to become an afFordoble and common electrical item in households. The equipment shown in the picture dates from about I 955 and was Philips way to give backing to their massive sales of early TV sets (all with valves, of course). Retailers selling Philips TV sets would also install Philips test equipment in the service and repair department. The photograph shows three items typically found therein in the mid-1950 s, and one per- haps less usual instrument. The targe instrument is a GAA2893 RE Signal Generator For 90 kHz - 50 MHz with AAA modulation facilities. I guess this 'baatanchar' was mostly used to test TV IF amplifiers at the then widely used 37-38 MHz fre- quency. The specimen shown has French-language print with the controls. Its output signal is incredibly stable. The GM23 15 AF Signal Gener- ator - I would expect to have been used in conjunction with the GM7628 Rf/AF Signal Tracer ; in order to locate faults in all kinds of amplifiers. The signal tracer still has the original probe. The add man out is the PR9500 unit r which after some Googling turned out to be a con- ductance tester for liquids. Typi- cal use would be in a laboratory to check the quality of (drinking) water. However, the instrument having an external reference input as well as an accurate interna! bridge circuit, the TV servicing fraternity soon found out that the PR950G was also great for R, C and even L meas- urements. GM denotes o series of ea rly electronics lab instruments and eventually comprised more than 50 items, including several alb valve oscilloscopes. All were designed and built between 1948 and about 1958 (cfthe design/lifecycle of todays dis- posable" equipment!]. Philips GM test equipment with black shiny front panels and knurled black knobs almas! Invariably contains MO' and '80 series consumer electron- ics valves throughout the designs. These valves are still widely available today and the instruments themselves are also easily repaired and calibrated thanks to service manuals and the use of fairly common parts. These 50-year-old iesr instru- ments are still a common find an radio rallies, hence do not represent any great value except to the keen collector. I obtained the instruments as part at an inheritance. Unfortunately, the previous owner had been a lifetime chain smoker so drastic action was required to remove a persistent nicotine look & smell". Each instrument was scrubbed dean with a mild detergent, dried and then put into a box and fully covered in cat litter to absorb the smelM . The process takes about a week to complete and did not fail to restore the equipment to its former glory. ■ 145 : 16 -: Reference: 1. Electronic Classics, Collecting, Restoration and Repair, And rew Emmerson, Newnes, ISBN 0-7506-3788-9. - (tower kfi L {upper 'e?i| - r [upper right} Retronics is a momht/ column cover- ing vintage electronics including teg* endary Erekrar designs. Contribv Hons, suggestions and requests are we 'corned; p tease sera an email to edr‘or@elektor*e feetr cnIts.co.uk subject: Retronics EE. 5/2005 - ddilor dtttnmia 77 Martin Ohsmann is a Professor of Electrical Engineering and Information Technology at FH Aachen and a long- time contributor to Elektor Electronics . Through Quizz away he aims at stimulating thought , speculation , construction and simulation os well as raise interesting questions . Quizz'away and win! Send in the best answer to this month s Quizz'away question ond win one of three Weather Stations with outdoor thermometer and prediction function svorth approx. £89,00 each. All answers are processed by Martin Ohs- mann in co-operation with Elektor editorial staff. Results ore not open to discussion or correspondence and o lucky winner is drawn in case of several correct answers. This month we present an extremely simple circuit. We operate a transis- tor as shown n Figure I and use a high-impedance voltmeter (any stan- dard digital voltmeter will be fine) to measure the voltage U between termi- nals A and B. Figure 2 shows the experimental selup — the 15-V benchtop supply is however not yet switched on. Hint: The result is astounding ond it Is well worth to carry out this experiment. After the measurement, the transistor should not be relumed to a drawer or the iunkboxl In fact we recommend binning it. This months question is: What is value of the voltage U measured between A and B? Figure i. Test mimt. Figure 2L Pmtknf cmstmtm. Please send your answer to ihis month's Guizz'away problem, by email, tax or letter io: Quizz'away, Elektor Electronics, PO Box 1 90, Tunbridge Weils TN5 7WY, England. Fax ( + 44) fO]T 580 200616. Email; editor^elektor-electrontcs.co.uk, subject; 'quizzaway 5-05'* The dosing date is 31 May 2005 (solution published In the july/August 2005 issue). The outcome of She quiz is final. The quiz is not open to employees of Segment b.v. r its business partners and/or asso- ciated publishing houses. 78 dckldi etadroftia - 5/2005 As of the September 2004 issue Quizz'away is a regular feature in Elektor Electronics . The problems to solve are supplied by Professor Martin Ohsmann of Aachen Technical University. Solution to the March 2005 problem (p. 78; 'Oddball Oscillator'] With ihb circuit, the decisive factor is the use of a current feedback amplifier [CFA). today, many fast operational amplifiers employ this circuit topology. Most circuits will allow normal opamps to be replaced by CPAs... but not oil! Whereas with an ordinary opamp the voltage between the non-inverting input (IN-f) and the inverting input (IN-) is used to generate on output voltage based an extremely high amplification, the CFA is based on a different principle. The volt- age at the IN* input of the CFA is ampli- fied by a buffer [emitter follower with unity gain). The output of ihe buffer is the invert- ing 'input' (IN-) of the CFA. The output current i of the buffer stage [Le., the input current of the IN- input) is used, by means of high amplification ; to generate an output voltage. Normally, CPAs ore configured such that the current / is reduced to zero by feedback. Armed with this knowledge, our circuit looks far less intelligible: together with components Cl, C2 and L, the [invisible) buffer between the IN* and IN- input is used to build a Colpitis oscillator. The out- put current of the buffer is used to generate the output signal (due to gain). The output stage inside the CFA acting as a limiter, a square wave signal will appear at the out- put. The signal frequency f is approxi- mated using the equation f= 1 / [2 r ^ FC / 2) = 32.8 kHz where C = C l = C2 = 47 nF and £. = LI = ImH. The calcu- lated and practical results match quite well. The left part of Figure 4 shows ihe typical input stage of a CFA. The buffer consists of a double complementary emitter follower. Current mirrors in the collector lines of ihe buffer's output transis- tors quasi-capture the output cur- rent and the resultant signals are used to drive the output stage. The concept of re-using one stage s output current to control further stages Is sometimes found in audio amplifiers and high-volt- age opamp circuits. As shown in the right-hand port of Figure 4, the supply currents of an opamp may be sensed in order to con- trol o further output stage. The same concept transpires — a cur- rent is used as the controlling ele- ment in a regulation loop. Literature recommendation : IM61 81 data sheet and applica- tion notes from various manufac- turers covering the current feed- back amplifier \ Figure 3. Oscillator bused on o CFX -■.j : i . 5/2005 - e- “Vtor elsttramcs 79 LINKS To book your website Tel. 0044 (0) 1 932 564999 contact Huson International Media ALLGOOD TECHNOLOGY www.a I lgoodtechnology.com Low-medium volume sub-contract assembly. SMT specialist since 1990. Customers include military, aerospace etc. 0402 to BGA capabilities, automatic assembly and hand built prototypes. AUDIOXPRESS WYA7.audioXj3res5.com The premier do-it-yourself audio magazine for 35 years, * Hands-on projects • Helpful articles * Expert advice __ • New technologies Full range of books, back issues on CD 3 . - K—i m BETA LAYOUT YA'AV.pCb-pOOl.COm Beta layout Ltd Award- vanning site in both English and German offers prototype RGBs at a fraction of the cost of the usual manufacturers prices. BURN TECHNOLOGY LTD http ; // www. bu rn tec . eg m Test & Measurement Equipment Distributors * Anemometers * Clamp Meters * Light Meters * LCR Meters • Sound Meters * Multimeters • Device Programmers Burn Technology Limited, Wmfrith Technology Centre, Dorchester, Dorset DT2 SDH Tel; (013051 852090 Fax: (01929) 463214 COMPUCUT h rip: ’ vYww.com pucutters.com Computer Numerical Control from your home PC, Great for tricky jobs, and accurate repetitive work. We supply: - Software - Interface - Manual - Support Price £250 plus postage. CONFORD ELECTRONICS http://mwAGonfo rdeie c . co. u k Lightweight portable battery/ mains audio units offering the highest technical performance. Microphone, Phantom Power and Headphone Amplifiers. Balanced-unbalanced signal lines with extensive RFi protection. DANBURY ELECTRONICS hltpi//www. I mng i n the past de man .co . uk Here you will find our mains and output transformers in Mike Holme's range of valve tube amplifiers (PP & SE), Also circuits, parts lists, chassis, advice. EASYSYNC http: //wvvw. easy sy nc.co.uk EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and RS485 converters at competitive prices. FUTURE TECHNOLOGY DEVICES http : / www. rtcilchip. com FTDI designs and sells USB-UART and USB-F1F0 interface Lc/s. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB ILP ELECTRONICS LIMITED * / ,'|.i r jm Jf i ■ ii ELEXOL PTY LTD http:/. wvYw.etexol.com Developer and manufacturer of • USB Development Modules. • USBMOD Series. • USB1024 Digital Input Output Module • MP3 Solutions, • MP3M0D4 Module. Distributor inquiries welcome. m. Y ELNEC www.e1ftee.com ^ * device programmer manufacturer * selling ihrough 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 1 for most programmers FOREST ELECTRONIC DEVELOPMENT http:/- 'www v fored.co.uk FED supply PIC programmers, Basic modules, and development software including a PIC C FUTURLEC http ; ■■ www f: u to r 1 no.cn m Save up to 60% on * Electronic Components * Microcontrollers, P1C 7 Atmel * D eve In p m e nr B oa rds, Programmers Huge range of producis available on-line for immediate delivery, at very competitive prices. YYitjjetectronics.com ILP has been in the audio industry for over 30 years primarily manufacturing both standard and custom audio modules and p re -amplifiers. IPEVA LIMITED hLip:/'/A , rw.ic&v£,com. IPEVA sell low cost USB FPGA development boards. IPEVA provide Design Consultancy for Embedded Systems, OpenCores-IR FPGA, ASIC, HDL translation and migration, Tel. 0870 080 2340. JLS ELECTRONICS YAVYYjtbetectronlcs.com Suppliers of electrical electronic parts and consumables. Including: * Cable ties / bases * Tools / hardware * Bootlace ferrules ■ Connectors * Solvent sprays & cleaners * PVC Tape * Heat Sink compound KOMCARD h bp: / ■, vww. k om ca rd .co m Learn how to design a PCI card, and write a PCI device driver. We lead you step by step with practical PC! projects you build. LONDON ELECTRONICS COLLEGE hflpV/v/YA'/.tec.org.bk 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. BO cltV tc? dertr&aitf - 5/2005 NET [LINKS MQP ELECTRONICS http:/ -v A'v;. mqpelectronics.co.uk Leaders in Device Programming Solutions, * Online shop * Low Cost Adapters for all Programmers * Single Site and Gang Programmers ■ Support for virtually any Programmable Device NEW WAVE CONCEPTS http if , ww. n ew-w a ve -co ncepts . com Software for hobbyists: * Live wire circuit simulation software, only £29.36 * PCB Wizard circuit design software, only £29.36 Available from all Maplm Electronics stores and mm.maplin.co.uk PHYZX http:// www. p hyzx .co.uk Automatically Plot and Drill RGB's • Accurately • Repeatably • Mains operated • Robust Steel Construction • Gerber RS274X compatible • Full XYZ RS32 Control • Including Accessories • Complete syiem Under £500, PICD0S TU http: //www. p jedosxom Hard disk, DOS & files on PIC16F877. SmartMediaTM based. No complex hardware just wires. Run- Debug existing PIC code & interrupts. Free schematics software, debugger PCB WORLD http: w ww. p eb wo ft d .or g.uk World-Glass site: Your magazine project or prototype PCB from the artwork of your choice for less. Call Lee on 07946 8461 59 for details. Prompt service. ETCOT ES3 lUEl QUASAR ELECTRONICS w : . w QuasarBec tro n ics .com Over 300 electronic kits, projects and ready built units for hobby, education and industrial applications including FIC/ATMEL programming solutions. Online ordering facilities. Tel: +44 (0)870 246 1826 Fax: +44 (0) 870 4601045 Email: sales@QuasarElectronics.com PROMOTE YOUR WEBSITE HERE Elektor Electronic huve a feature 10 help customers to promote their s Net Links - a permanent feiiiure of ihe magazine where you will be able to highlight your she on a regular bails. * Fi *r ju*l £ 2 20 - AT i i 20 pc r issu e for e le e n is^uisi Elekinr will publish your company name, a 2S-woni de -crip Lion and your website address, * For £330 + VAT for Lhe year ( £30 per is>ue for eleven issues t we will publish the above plu> run a 3cm deep full colour screen shot from your site. Places are limited and spaces w ill go on a siriciiy first come, first served basis, please fax back y mir order today’ i I wish to promote my company, please book my space: J - Text insertion only for £220 + VAT * Text and photo for 030 + VAT i NAME:. i JOB TITLE t I i i I I t i i i i i 1 i t i i i i i i t L ADDRESS .ORGANISATION: ‘ ---- - - - — -TP ----- - * «- * # ..... b . . — PLEASE COMPLETE COUPON BELOW AND FAX BACK TO 0tM4-i0)1 932 56499S l l t I I I I I 1 1 COMPANY NAME ...., I t WEB ADDRESS.. i 25-WORD DESCRIPTION | I — - — i t 1 ! 1 I I I j fa - - -- -- - - * -r - - - ■ e !!• ei ROBOT ELECTRONICS http jfmm, robot-electron ics. co.uk ■ Ultrasun ic rangefinders • Motor H- Bridge controllers • Magnetic Compasses • RC sen;os and controllers • PIC programmers and components • Electronic Design. Development and Manufacturer to Industry U LTR ALE DS U1 tr - Bl : w m\ _ultrafeds.CQ.uk tel: 0871 7110413 Large range of tow cost Ultra bright feds and Led related lighting products. Major credit cards taken online with same day depatch. USB INSTRUMENTS http: i/mm. usb-i nstru me nts.co m USB Instruments specialises In PC based instrumentation products and software such as Oscilloscopes, Data Loggers, Logic Analaysers which interface to your PC via USB VIEWCOM h ft p : www. v 1 ewcom .19 mu k tel: 020 8471 9338 fax: 020 8552 0946 * Mail Order supplier of: ■ Integrated Circuits and Components. * Kit and parts for Efektor projects. • Transistors. FETs t Capacitors, Resistors, Crystals, etc and hard to find devices. Viewcom Electronics, 77 Upperton Road West, Plaistow, London El 3 9LT VIRTINS TECHNOLOGY ■— — - -- f/wmv irtms.com PC based virtual instrument for electronics enthusiasts, students and professionals, including full-fledged sound card real time Oscilloscope. Spectrum. Analyzer and Signal, Generator, Downloader and try. ELECTRONIC MMTHUSIASTS O^oTeiragsme ijnin r. c o*n Befere putsmsr. ELECTOR ELECTRONICS THE ELECTRONICS « COMPUTER MAGAZINE CsntKE i — Sir, r# t:J. Ur,t 4 G-'.t-ti Eeed f Fxifzicf TnfKJrt T?* 5 7H = TE-Zff.',™: a I 5EJ 7 Fix Z I *13 1 -Zi T : 5/2005 -tidier eiedronks 81 lektor n L» Order now using the Order Form In the Readers Services section in this issue . Elektor 2004 This CD-ROM contains all editorial articles, with the exception of New Pro- ducts items, published in Elektor Electronics maga- zine Volume 2004. Using the supplied Acrobat Reader program, articles are presented in the same layout as originally found in the magazine. The DiskMirror utility on this CD-ROM allows your earlier Elektor year volume CD-ROMs (1997-2003) to be added to a large archive on hard disk for fast access and easy reference. A built-in search function allows you to find references in any article from the archive on hard disk, or from individual year volume CD-ROMs you have available. £16.25 (USS 23.75) Audio Collection 2 A unique CD-ROM for the true audio lover, containing no fewer than 75 audio designs from the past five year volumes of Elektor Electronics magazine. The articles on the CD-ROM cover test & measurement equipment, amplifiers, digital audio and loudspeaker technolo- gy. Highlights include the Crescendo Millennium Edition, Audio-DAC 2000. Audio-ADC 2000 and the 3R-S PDIF Transmitter and Receiver. Using the included Acrobat Reader you are able to browse the articles on your computer, as well as print texts, circuit diagrams and PCB layouts. £12.05 (USS 21.25) Robotics A large collection of data- sheets, software tools, tips, tricks and Internet links to assorted robot construc- tions and general technical information. All aspects of modern robotics are covered, from sensors to motors, mechanical parts to microcontrollers, not forget- ting matching programming fools and libraries for signal processing. £12.05 (USS 21.25) Order n WWW. More information on www.elektor-electronics.co.uk *** unji MSC1210 Development Board Now with double the amount of memory and free software! The MSCI 210 Development Board is still an incredibly popular item, A second version has been produced now extended with some considerable improvements! * The board contains the latest version of the MSCI 21 Q processor (the Y5) * This new micro has double the amount of memory (32 kBytes instead of 16 kBytes) * The free MSC121Q software has been adapted for files up to 32 kBytes Limited period offer: only £ 69.00 Order now! This offer is vallid until 31 May 2005. After that date, the price of the MSCi 210 board will be £ 75.90. For the Webserver application, extra memory will prove very useful. Not only will the Y5 chip be able to hold larger programs, in combination with the network extension card ft's also capable of storing more web pages. Micro Web Server for internet and Intranet Unfortunately, webservers usually sit in large, humming grey cabinets, ThaFs not the ideal solution for keeping an eye on your refrigerator, coffee machine or central heating system. The Elektor Electronics Micro Web Server provides an alternative. Our incredibly popular MSCI 210 microcontroller board (also known as ‘Precision Measurement Central’) now provides network and Internet connectivity, allowing the processor to publish its own data pages onto the web. The article describes a tempera- ture logger allowing the user to enter, via the Internet, temperature limits and an email alarm address. The Micro Web Server can also switch net- work ports from an Internet-connected PC, literally anywhere on the globe. £69.00 (USS1 12.50) £ 41.95 (USS73.95) MSC121Q board (assembled and tested) NePr/ork extension (assembled and tested) Combined package (in cl. software and all related Elektor Electronics articles on CD-ROM) £103.50 (USS 184.95) inline at Or call Elektor Customer Services lectronics.co.uk SC (semiconductor) Analyser 2005 (Elektor Electronics April 2005) * Complete kit of parts including PCS and programmed controller (without LCD) 030451-71 £ 29.65 S 55.85 'standard' back-lit LC display 030451-72 £ 7.25 / S 13.65 Poly-LED display 030451-73 £ 25.50 I $ 48.05 on (+44) (0)1580 200657 or email sales@elektor-electronics.cQ.iik. Now available: new Elektor Electronics kits and modules GPS Receiver on USB (Elektor Electronics June 2005) Complete kit with extra long cable and waterproof antenna case (available from mid May 2005) 040264-71 £ 62.05 / 3 116.95 LPC210x ARMee Development System (Elektor Electronics April 2005) • Processor board, ready-built and tested 040444-91 £ 20.55 5 38.70 » Motherboard (bare, without components) 040444-2 £ 1 1 .70 / S 22.05 Temperature Logger (Elektor Electronics June 2005) Complete kit of parts including components, PCS and program- med controller (available from mid May 2005) 030447-71 £ 25,35 / S 48.75 Further products from Eiektor Electronics: i READY-BUILT PROJECTS £ s ClariTy 30Q-W Class-T Amplifier 03D21 7-3 1 — " ' 5' i: : s?d w. m 5 ’ ,f Da 2 ra -flits d . cc for LI S.L2 34-50 55.70 Flash Microcontroller Starter Kit 01G20&-91 re5tr/-assefltb £3 FCE md. cee'e sdspreT & related aitfc Ses £9 00 112 50 Gameboy Digital Sampling Oscilloscope (GBDSO) 990032-91 rea^-sss-ET.t:^ zcrz ir: tne PC salfr-are an reteled arix-es 10300 183.00 LPC210X ARMee Development System 040444-91 Prceesscr' bofifd r=ady-mada ard tested 20-55 38.70 Micro Webserver with MSC1210 Board 03G050-9 1 M •; p - :■ : £ e 55 r B c = 1 r ti read v-sss e mi:- 53 044026-9 1 ! i v- . - *, Exte n ~ ~ - : = ;d rE= - .-a5 -Err : ■ £ d 41-95 73.95 044026-92 Ccmfc pacK-g* (02£O£O-51 i 25-91 i ewss) 103-50 184.55 EVERGREENS £ s Elektor Electronics Help Disk 956022-1 Os*; \\ '.$r5'z~\ a- 15 14.45 Elektor Electronics Item Tracer 1985-2003 046003-11 tteteMSfi ;£§sk Vlm/tews veis&i) 8-15 14.35 Universal Prototyping Boards UFSS-l PCS 2-45 4.30 UPSS-2 2 RGBs 4-10 7.25 UPBS^S 4 PCBs £-55 11.55 No. 342 MAY 2005 £ s Glow Plug Heater § 040233-11 D iV ST 7 z'zram. 5-20 9.75 040239^ 1 SIT FITTED 5, p r 33 ra mm an 6-55 12.35 Magnetic Flux Density Meter Q G40258- 1 1 Disk PIC source code 520 9.75 04025841 FiCi 6f67fr20‘SR prs^m-sd lu-55 31.15 Programmer for DOC Model Railway Control 040422-1 PCS 18-60 35.05 8 040422-1 1 ATJ-tega Mu/ce 8 hex code 040422-41 "T7.'£-:i35l6-5?l program T>ed 520 16-55 9.75 3115 No. 342 APRIL 2005 £ $ LPC21 Ox ARMee Development System 040444-1 Pr c€ 5 55-2 r boain 470 8.65 G 040444-2 Mctrerijoaro 1170 22.05 a C40t 44-11 D = r r Ed £ afwsrs 5-20 9.75 040444-01 Processor board, reary-made and tested 2055 38.70 SC Analyser 2005 033451-1 PCE 5-35 10,10 Q 030451-11 C4-. 520 £.75 030451-4 1 PiC 1 6F876-20S R programmed 1375 25,55 No. 341 MARCH 2005 £ s High-End Power Amp 040193-1 Ajrrp^EfPCB 9-55 18.15 i 040 1 95-2 n i leal : ' PCS 795 1455 Q 040198-3 S-7: , PCS 795 14.95 § 0401904 F.eeFCB 4 50 8.45 Opamp Tester D303e6-1 PCS 645 12.95 Play Solitaire 4 030410-11 D s- prc f-::scii' t are 5-20 0,75 03041041 AT90S231 3-1 OPC, programmed 55Q 1035 Remote Temperature Logger for P1C18F Board 8 040441 -11 D 5vprc : =ct ec ftw a re 5-20 9,75 Serially Programmable Crystal Oscillator § 040351-11 C.Ek, proved sdnva re 5-20 9.75 Products for older projects (if available) may be found on our website www.eiektor-eiectronics.co.uk home construction = fun and added value sneak preview Web poll on www.eiektofeie issues already dispatched Subsciptions cannot be canceled after they have run for six months or more. January 2005 SUBSCRIPTION CONDITIONS I 1 ejektor I lectronics leading the way K;h Time, Date, Weather Forecast, Humidity, In/Out Temperature and Moon Phase on one display. PICK YOUR OWN ANNUAL SUBSCRIPTION and receive this wireless 433 MHz weather station*! Make your choice: • Eiektor Electronics annual subscription (standard) You receive 11 issues, including the July/August doubie issue, • Eiektor Electronics annual subscription-PLUS You receive 11 issues, including the Juiy/August double issue, plus a copy of the Eiektor Electronics Volume 2005 CD-ROM (normal price £16.25). Your saving: approx. £10.00! Please fill out the Order Form with this issue. Subscription rates and conditions may be found at the back of this issue. ' Offer available to Subscribers who have not held a Subscription to Eiektor Electronics in the last 12 Months. Offer Subject to Availability. Models The Complete Electronics Design System I Schematic & PCB Layout Powerful & flexible schematic capture. Auto-component placement and rip-up/retry PCB routing Polygonal gridless ground planes. Libraries of over 8000 schematic and 1000 PCB parts. Bill of materials, DRC reports and much more. New Features in Version 6.5 Textual library part search. User defined keyboard map CADCAM output to ZIP file. Mixed Mode SPICE Circuit Simulation • Berkeley SPICE3F5 simulator with custom extensions for true mixed mode and interactive simulation. • 6 virtual instruments and 14 graph based analysis types. 8 6000 models including TTL, CMOS and PLD digital parts. • Fully compatible with manufacturers’ SPICE models. • Bitmap import function. • Truetype fonts on PCBs. • Enhanced printer output. Call Now for Upgrade Pricing www . labcenter. co. uk info @labcenter. co. uk Supports PIC, AVR, 8051. and BASIC STAMP micro-controllers. Co-simulate target firmware with your hardware design. Includes interactive peripheral models for LED and LCD displays, switches, keypads, virtual terminal and much, much more. Compatible with popular compilers and assemblers from Microchip, Crownhill, IAR, Keil, and others. Proteus VSM - Co-simulation and debugging for popular Micro-controllers