December 2005 £3.70 wvM.eEekto^eleEfromcs.co.uk wannahav Electronic War ' Jl** r - a ,j ^flr 1 * ^ _• - danger i w » ..old Engineering toy R/C car as router control From A to D..* via USBI Telephone Supervisor inristnsas Light Strinc ■» Oi 1 A 1 400+ page i Catalogue A Post and Packing Charges: Order Value Cost £20 - £49.99 £5 £50 - £99.99 £10 £100 - £199.99 £200 - £499.99 Cost £5 £10 £20 £30 £40 £500- £40 Max weight 121b (5kg) - heavier parcels POA. Minimum order £20. for your FREE catalogue! 0800 032 7241 (Monday - Friday 09.00 to 17.30 GMT * 10 hours only). For those who want to write: 100 Silverwater Rd Silvervvater NSW 2128 Sydney AUSTRALIA iV , \ , rr £ ** mg Yes, that's right, down town, down under in Sydney Australia. We are a bunch of electronics enthusiasts who sell a great range of goodies through our FREE 400 page catalogue. Don’t be frightened! You can purchase on the Net from us 24/7/365 through our secure encrypted system. Post and packing charges are modest and you can have any of 8000+ unique products deliv- ered to your door within 7 - 10 days of your order. Some specific products are shown below. Theremin Synthesiser Kit KC-S29S €54.75 + post & packing The Theremin is a weird musical instrument that was invented early last century but is still used today. The Beach Boys' classic hit Good Vibrations' featured a Theremin. By moving you hand between the antenna and the metal plate, you create strange sound effects like in those scary movies! Kit includes a machined, silk screened, and pre drill ad case, circuit board, all electronic components, and dear English instructions. 9VDC power supply required IMaplln #G574R $9.99). We StOCk.. Electronic Components, Sub- Assemblies & Electronic Kits rawer Products 8 Accessories Audio 8 Visual Equipment 8 Accessories Computer 8 Telecoms Accessories Burglar Alarms & Surveillance Equipment Lighting Products 8 Accessories Gadgets 8 Unique 'Clock Watchers' Clock Kit Now with Blue LEDs KC-5416 £55.25 + post & packing It consists of an AVR driven clock circuit, and produces a dazzling display with the £0 blue LEDs around the perimeter. It looks amazing, but can’t be properly explained here. We have filmed it in action so you can see for yourself on our website, so check it out! Kit supplied with double sided stlkscreened plated through hole PCS and all board components as well as the Lead-Acid Battery Zapper Kit KC-5414 £11.75 + post & packing Lead acid batteries are very common in modem life, and are a very versatile power source. Unfortunately, the chemical reaction inside the cells can be the very thing leading it to a premature death. This simple circuit is designed to produce bursts of high- energy pulses to help reverse the damaging effects of sulphatlon in wet lead arid cells. This is particularly useful when a battery has been sitting for a period of time without use. The effects are dependant of the battery’s condition and type, but the results can be quite good indeed. special clock housing and dear English instructions. * Kit supplied with case, silk screened lid, leads, inductors, all electronic components, and clear English instructions High Performance Electronic Projects for Cars 8S-S0QG £7,00 4 post & packing Australia’s leading electronics magazine Silicon Chip, has developed a range of projects for performance cai 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, color pictures, and circuit layouts* There are aba chapters on engine management, advanced systems and D!Y modifications. Over 150 pages! All die projects are available in kit form. Nitrous Fuel Mixture / Motor Speed Controlle KC-53B2 £7.95 4 past & packin When activated, it will fire the injector at a preset duty cycle, adding a fixed amount of nitrous fuel. This is a far cheaper alternative to a dedicated fuel solenoid and jets* It also makes a great motor controller, to control an electronic water pump, additional fuel pump, cooling fans and more. It is suitable for use with most fuel injectors, or pumps and motors up to 10 amps. Kit supplied with PCB and ali electronic components. Please note that the use oF Nitrous Oxide systems is for race use only. Use of these sys- tems on the street Is illegal. r ' * High Range Adjustable Temperature Switch with LCD KC-5176 £22.75 4 post & packing Heat can be a major problem with any car, especially modified and performance cars. The more power, the more heat, so you need to ensure you have adequate cooling systems in place. This temperature sv/itch can be set anywhere tip to 12QQ e C, so It is extremely versatile. The relay can be used to trigger an extra thermo fan on an intercooler, mount a sensor near your turbo manifold and trigger water spray cooling, ora simple buzzer or light to warn you of a high temperature. The LCD displays the temperature all the time, which can easily be dash mounted. ivrake hi fill V. MikroElelrron a MICROCONTROLLER DEVELOPMENT TOOLS from Be ms Make PICmicro® development easy with the EasyPIC3 - only £99! The new EasyPICS Development Board combines a versatile development/experiment board with a built-in USB programmer. With its wealth of on-board VO devices and support for virtually all 0. 14, 18 r 28 and 40-pin PICmicro- microcontrollers in the 1QK 12F, 16F and 18F families, we're certain you won't find a more ver- satile high quality board at such a low price. The EasyPICS Development Board is supplied with USB pro- gramming power cable, programming software and useful example programs. Also available are similar boards for the 8051 1 AVR and dsPIC, each at the same great price of £99 including UK delivery and VAT— please telephone or see our website for further details. EasyPIC3 Development Board features: * High quality development/experiment board with built-in USB 2.0 high-speed programmer. » Programming software compatible with Windows operating systems including 2000 and XP, * Comes with a PIC16F877A microcontroller but compatible with virtually all 8. 14, 18. 28 and 40- pin PICmicro" devices in the 10F. 12F, 16F and 18F families. * On-board I/O devices including switches, LEDs, seven-segment displays, potentiometers and RS- 232 interface. Now also features USB and PS/2 keyboard interface connectors, ■ Provision for easy fitting of optional DS18S20 temperature sensor, and LCD and G.LCD dis- plays. * All I/O lines available for off-board expansion. ► Wide range of optional add-on boards available including ADC, DAC, EEPROM, Compact Flash, M M C/S D, Keypad, RTC. RS-485, CAN and IrDA. Additional add-ons available soon. * Powered from your PC's USB port or optional mains adapter. 1 Supplied with example programs written in assembly language. BASIC, C and Pascal. 1 Supplied with Microchip Technology's MPLAB development software and demonstration versions of MikroElektronikas mikroBASIC, mikroC and mikroPascal compilers. Learn about microcontrollers with our EasyPIC3 Starter Pack - just £149! WeVe taken the EasyPICS Development Board and added a 16x2 character LCD display, 128x64 graphical LCD. DS18S20 temperature sensor, RS-232 serial communications cable and our own easy-to-follow microcontroller tutorial to form a complete and self-contained Starter Pack — everything you need to learn aboui and experiment with microcontrollers! With this pack you will quickly become proficient in microcontroller programming and interlacing. Please see our website for full list of covered topics. Make programming easy too with mikroBASIC, mikroC and mikroPascal Three incredibly easy-to-use yet powerful compilers for PICmicro 5 microcontrollers, each featuring a user-friendly code editor, built-in tools and routines and source-level debugger. Supplied libraries facilitate rapid development and include ADC, CAN. Compact Flash, EEPROM, Ethernet, Graphic LCD. I 2 C, LCD, 1-wire. PWM, RS-485, sound. SPI, USART, USB routines and many more. mikroBASIC and mikroPascal— £99 each, mikroC— £149. Call 0845 226 9451 or order online at www.breadboarding.co.uk All prices include UK delivery and VAT. Major credit and debit cards accepted. Secure online ordering. From the Editor's desk Early reports show that our November 2005 issue with its free Kaleidoscope e-CAD DVD achieved not only good soles figures but also o number of sell-out reports from sev- eral major newsagents including WHS shops. As our distributors do not restock sales points, the best way now to get your copy of the issue with the free DVD inside is to con- tact our Customer Services department, see poge 6 for the contact information. Feed- back on the free DVD is starting to come in. too. We had a good laugh when someone reported that the Kaleidoscope DVD would not run on the CD-ROM player in his PC nor on the family's DVD player connected to the TV set ("no music or menu on me screen"). We've launched on on-line Survey to help us find out which of the programs on the Kaleidoscope DVD our readers think is the best of the lot. The Survey is accessible vio our homepage. E-blocks hove rocketed into popularity, prov- ing that the concept of 'connectivity for the future' holds true. Designs using E-blocks are storting to come in and we sure hope to publish some in the near future. Meanwhile, this December issue has an article on Flow- code, the magic software behind E-blocks. This issue marks the end of two article series: Delphi for Electronic Engineers ond Quin' Amy. As o cautious estimate, the Del- phi course has attracted about 3,000 follow- ers so we con confidently say it's been a resounding success. QuinAwayvtiW be fol- lowed up by a different kind of puzzle to stimulate the grey matter — in hexadeci- mal fashion. Finally, hot news from the Elektor lab! The resident pizza oven is temporarily out of order while Paul Goossens is converting the thing into an SMD bakery — look ond smell in the January 2005 issue. Meanwhile our drinks fridge is back to normal — see page 8. Happy reading and enjoy the Christmas holidays. Jon Bulling, Editor 1 8 Jumbos and Minis Displays are probably [he mast important man-machine interface. Everywhere you look - televisions, monitors, and industrial applications - the old-faithful CRT display technology is losing ground and being superseded by more up-to-date technolo- gies, which are also conquer- ing new application areas. In this article we look at the cur- rent situation and examine possible future trends. A ? rf 7 1 w 1 jjHni i* IF jigBa 1 Si s L J J U 1 4 - 4 ■— ■i-l i People have been busy experimenting with electricity ever since it was 'discovered'. Many good things have come out of these experi- ments, and the world would look completely different without all our electronic aids. But there's also another, darker, side to the picture. Volume 31 December 20OS nOo 349 36 Telephone Supervisor If you have a fit looking at your monthly phone bill you might want to know who's on the phone oil the time. Also, you may want to start exercising control over which extension in your home is disobled or enabled. Our Tele- phone Supervisor comes with smart Windows software that puts you (back) in contra! of things. We thank all our readers, contributors and advertisers for their support during the past year and itftsh you all a happy and peaceful 2006 . This design shows a \oy R/C car can be adapted lo act as a (W)IAN Router 'watch- dog' to switch the Router on or off depending whether any networked PCs are present. know-how 18 Jumbos and Minis 24 Electronic Warfare 1 hands-on 30 From A to D via USB 36 Telephone Supervisor 48 Colourful Christmas Light Strings 52 Save Energy by Reverse Engineering 74 Design Tips SMD Solder Aid Simple Li-Ion Charger Build your own Rotary Encoder Labtalk: Right-angle LEDs technology 56 E-blocks and Flowcode 60 Delphi for Electronic Engineers [9; final) 66 Tune in with MATLAB 7 0 App.ication Note: Current Sensing using the ZXCTIQxx 6 Colophon 3 Mailbox Corrections & Updates 4 News & New Products 8 - Sneak Preview infotainment 44 Christmas Gifts: gadgets, gizmos and wannahaves 77 Retron ics: Analogue Multimeters 78 Quizz'Away (15; final)) lektor lectronics Subscriptions: z- :i - i: =z -- -_i z ■ - BrehEted, 1 0 ®) Grezt West Reed. Brentkhrd TWB 9 HH. England, ■feL (-=-44) (0) 2m 26 1 4509. ta= (^-44) (0) 208 26! 4447 i-.te^er. • &ra ' ’ ' ’ - - - - - = jzee ire : i: £ . or re- 5 -Jbsc' :i C'der = :" _ Volume 3 1 , Number 349 T December 2005 ISSN 0268/4519 Head Office: Sri"-:- - : t * PC- Bo. : ^ ’ 3 r Tekphotte:(+3»)4643&5444. foe (4-31)46437016! : . t" t : . : Bektor Electronics aims at inspiring people to master electronics at any person- al favel by presenting construction projects and spotting developments in elec- tronics and information technology. Publishers : ■ _j ■ zZ L rg ■ _ I _I .. as: C.±ii -z-=j Breritkxd TWB 9HH. &^nd. Tel. (-5-44) (0) 203 26! 4509, fee (444) (0) 203 26! av r \;/.e:=?-icr-aecL r ci? , iCi. co Tre rrepsns 5 svsfebfe from newsagents. Dooleys g^d efedroracs retell Of on sdb- i-c r _:•:■■ I -< _ _ la.rj :•• • ee i : _e- -- r it l trrfis a ■ zz .■. _ r a z zz _z for - i - _r _ z _ z-z !-:■■::• s _ c r: zza : : a:-: ztuz z~ - Fnzrdi Gerrzr srd 7J .. ■ Tr-g?lt¥-r nrfh fr^y K r regp+ir y- k m r &r* in iwyp t ivn ST> m Inttmaticmnl Editor 'z - - z'Z E .. Editor! Bat -g rac : i- -- : -a'e z . es.cc International editorial staff: Hiny B^gg^rr. — • . Ez.-iers. Errsi KrartpeSsaufir, ze'v'oe I_- D eslgn 5 UfT : B>i.c L . e ez^t ~ ; read c L e =z r ~ ~z~ B a -::a ~ s r a_ I _ _ Ei— s. Luc La-r '-a-.s. ifera .Vzzz.ei Editorial s&tretarEat: -aaa z - a -- e elzez iez j : g __ : z: ' Distribution: Ssr,-rr its; E= ' ;av*— ar Sf—t Lc-- .Jc - ■'- ?2 cr-sjaro UK Advertising; Hfistxi Irrt^ayJiunaJ Mad a. Cferbndge Czr~~= Line, I zzz : _ ray kTI 6 444 Erhard Telqshooe: +44 (0)1932 564999. fee +44 (0)1932 564993 Errs.!- - ::z *- _: . — - z. . ..." Irjerrcet ' :■ a: i:-£ r ±iaz a- j :-■•= zava^cao aj-zr. International Advertising: < sss Be ee -=ec B - ce Ema - _ . z 'El ■ ; ■ EEaz a r c ia . e- a ai - e cr a: ar. Copynght Hatice The cfois ceased vn ifts rregaans aye fcr domestic tse orty. AA pdctqgrap#^., pentad drojt tc^-rf Eyn t prap^niEd d^3_ CD-RO^fe, s eftvitt. arc azda ta-ts pii> oshed ii air bodes arsi maj^r^ies {o+er tfen srr/^feemeidS) sr^ S^neisL b.v. i~d. n&f -■iec-e :c.:ad caaz nr-.^c a a' - rb'm :r e-. vr~sri rekdrg trevoax?; v scarr. 'gar letanlic it whofe or sa paz : i-s. pner wrinen p e micssi on 6rom tbs Piddsher?. Such wrajen peamns- son ?kn nR r>— .rH+ b^jre sr/ part o£ this puMcstcri s ^sied in = pn^ecd^riisyejGSt m i^speacfaTasis, de%ios, oompaienSs dscrised The RitSsSief (kies Jics accepg respw^sbSsy ror &Jrsigt£> ide?it^ sacn pssatfs) or cicner protfCton. The siisfraskat of iss^scr aiticfes arpfies petm^otl to the f\£^iere to alter tos tesd aftd dea = _■ _ a' . '-.EjE a sacra zee ;:■ T z-:. r ‘ Graphic deiign DTP: -■.a'a lie _ i Managing Director, Publisher: -a_ a' !■ - . Disclaimer 1 -z ::-r' ; z : : z ' , - -- - : - z - : f . - -*.- Marketing; '-'a ": ‘-ee Ceee - :s:r ■:■: © Segment b.v.. 2 (XJ 5 P nnted n me N e - :" 5 r =n d 5 Thousands of OBD cables and connectors in stock Custom, cable design and manufacturing Lowest prices • Online ordering • Ship worldwide Contact us online: www, OBDCables.com ■ sales@obdcables.com 'X J r we doi^'k have uouv OSP cable, we com help t^ou br/iad rki Your price conscious PCB supplier Verified CIRCUITS - pooling for prototypes and small series - from 1 till 1 .000 pieces - from 4 working days onwards - up to 6 layers Online Price calculation Online Ordering Online Order tracking Online 24/24H and 7/7D wide range of technological capabilities up to 20 layers from 1 piece onwards from 2 working days onwards WWW. .com ± i" --: lZ.'C ZJJ - 'T| MEGApool - pooling for series - 250, 500 of 1.000 pieces - medium series at prices of MEGA series 6 Either eEstfrcmn - 12/2DQ5 SERIAL COMMUNICATIONS SPECIALISTS Test and Measurement Solutions featured products \ iaB0 111 \ = E a s y S Y H C IffflfirNl nit — - - Bronze Prize Winner = MA5A Tech Briers 2004 Products of the Year £125.00 DS1 Ml 2 USB Scope / Logger 2 x IMS/s Input Channels + waveform generator output. Easy Scope & Easy Logger sAv included. £36.00 USB-2C0M-M 2 Pen End us iris! USB RS232 Serial with wall mount bracket and DC auxiliary output £65.00 UPCI-400HS 4 Pan UPCi RS232 Serial Card with Spider Cable or CCU3QX IQ ( extra j CANUSB is a very smalt ctongte that plugs into any PC USB Port and gives an instant CAN connectivity. This means it can be treated by software as a standard COM Port (serial RS232 port) which eliminates the need for any extra drivers or by installing a direct driver DLL for faster communications and higher CAN bus loads. CAN232 is a very small dongle that plugs into any PC COM Port, or any other RS232 port in an embedded system and gives an instant CAN connectivity. This means it can be treated by software as a standard COM Port (serial RS232 port) which eliminates Ihe need for any extra drivers. Sending and receiving can be done in standard ASCII format. priced from £81.00 | CAN-232 ) USB Instruments - PC Oscilloscopes & Logic Analyzers Our range of PC Instruments may be b Lid get priced but have a wealth of features normally only found in more expensive instrumentation. Our DS1M12 and PS4GM10 oscilloscopes have sophisticated digital triggering including delayed limebase and come with our EasyScope 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 ANT16 Logic Analyzers feature 8/16 capture channels of data at a blazing 5O0MS/S sample rate in a compact enclosure. priced from £125.00 ( DS1M12 & ANTS ) 1 to 16 port USB to Serial Adapters With over 16 different models available, we probably slock the widest range of USB Serial Adapters available anywhere. We offer converter cables, mufti-port enclosure style models in metal and plastic, also rack mount units with integral PSD such as the USB- 16CQM-RM. Serial interfaces supported include RS232, RS422 and RS485. We also supply oplo-isolated RS422 and RS485 versions for relaible long distance communications. All our USB Serial products are based on the premium chipsets and drivers from FTDI Chip for superior compatibility, performance and technical support across Windows, MAC-OS, CE and Linux platforms. priced from £20.00 ( US232B/LC ) UPCi Serial Cards Discover our great value for money range of multi -port UPCf 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 COM BOX. priced from £21.00 ( UPCI - 200L ) EasySync Ltd 373 Scotland Street Glasgow G5 8QB U.K. Tel: +44 (141) 418-0181 Fax: +44 (141) 418-0110 Web : htfp://www.easysy nc.co.uk E-Mail: sales@easysync.co.uk ' Prices shown exclude carriage and VAT where applicable 1 2/2005 - drrironin 7 MAILBOX ' hf a M T 1 1 ■ Towards the Zero-Oil Noise Conceiting PC noise and heal. There ore far simpler solutions to the problem of PC heat and noise, and for more enjoyable than having to explain to one's wife why oil is dripping onto the carpetl Firstly, buy a small domestic fridge. Bore a 50-mm hole in the side, remove the shelves then carefully install the PC inside. Feed all the cables through Ihe hole, then fill the remaining fridge space with cans of beer or lager. Software and hardware crashes take on a whale new dimension as one downs several cans or lager. Secondly, for those troubled with PC fan noise — could l suggest your buy o microphone ond large speaker, and con- Dear Jan — 1 have come to the conclusion Etektor Elec- tronics should include a Pub- lic Health Warning on its front cover. ! had a pink fit when I read in the October 2005 issue -— a PC had been immersed in oil to eliminate Coo er struct q noise cancelling circuit. Not only will it eliminate fan noise, but will deaden the noise of your raucous singing while you are attempting to repair the crashed PCS David Jack (UK] Excellent idea David but what to do about the heat and noise generated by the fridge, and the objections of ihe Missus against a fridge installed tor the sake of a PC? Good morning jan — you must own a very old fridge? From my experience modern fridges are ultra quiet. Repositioning the microphone over the compressor would resolve that problem. Rhjeior Under this heeding we will occasionally publish circuits, ideas and suggestions that did not make it to full publication in this magazine for various reasons (like lack of space], Euro forgery detector The detector for forged Euro banknotes as proposed by Mr Karl Prodinger is marked hy an interesting measurement principle ond a well thought out concept complete with some remarkable technical tweaks. Initially we wanted to post-engineer this project into o full-blown Elekior Electronics DIY project but arguably the mechonicol construction so essential in this design is hard to make repeatable in on electronics magazine like ours. However, the approach to the problem is innovative enough to warrant publication in ihis month's Rejektor section. Possibly readers in the UK ond USA ore able to modify the design for use v/ilh pound sterling or US dollar banknotes respectively. The measurement principle is based oa a lesser known characteristic of Euro and other banknotes: sections of the banknote surface are printed using infra- red blocking ink, while olher sections have ink on them that's transparent to !R light. The difference is not visible until the banknote is held under an IR light source, as evidenced fay the photo showing a 10 and a 50 Euro note being tested. The banknotes are placed on a white background. Under IR light expo- sure, only the right-hand side of both banknotes is visible, the wider, left-hand part remains white. The author used a simple monochrome video camera with- out o built-in IR filter to view the results. A piece of hlack film carrier material in front of the comero objective was used os a filter against visible light and so boost Ihe camera's IR sensitivity. A couple of IR LEDs may he used for the light source, but off the shelf halogen lighls ore olso quite suitable os they emit quire a lot of IR light. The circuit shown here is based on an approach filed under no. AT6392U with the German Polents Office. On the DEPATISnet website you can view polents applied for free of chare (http;//depa1isnet.dpmQ.de}. The circuit is buill around a quod opomp type TLQ84 and is remarkable for hav- ing just one adjustment point. The measurement setup for the detection light reflection against the surface of a banknote consists of two LEDs ond a photodi- ode. LEDs D1 (green) ond D! (IR) are driven by an oscillator built around ICla. It supplies a frequency between 1 and 3 kHz. By means of on array of series resistors, the intensify of the LEDs is controlled. Preset R6 is required to compen- sate product tolerances on ihe BPY62 photodiode ns well os response deviations 8 cbLior dtttrcnlcs- 12/2005 My main concern is the noise generated from the fridge door being constantly opened and dosed to check the beer is cold enough! The image on the left shows the proposed Zero-Oil Noise Can- celling PC Cooler . Excellent comment again David and the right-hand photograph shows, our editorial fridge or a fypicQ I rod ay a he moon around 2 pm. between ihe LEDs, ensuring stable operation of the detector over longer periods. Opamp It lb is configured to act as o iransimpedance amplifier typically used with photodiodes (here, D3). Sensor 03 has to be filled with a piece of black beat shrink tubing to prevent ambient light corrupting ihe measurement results. The drcuii around the third opomp, ICU, is fairly unusual. Bolh inputs receive the same signal, but only ihe inverting input has a capacitor to ground (C3). This capacitor allows ihe signal supplied by the BPV62 to be averaged [remember, the LEDs ore controlled by a rectangular signal, hence produce light pulses). The function of ibis stage is the crux to the operation of the entire circuit. While the inverting inpul of the opamp determines ihe overage value of ihe signal, te non- inverting input receives the brightness values resulting from the light reflections on the banknote. When the banknote paper has IR blocking print on it, 03 will receive a small amount of light from the two LEDs. If, an ihe other hand, the ink is transparent to IR light, D3 will receive a weak signal from the green LED (D1 ) r but a strong signal from IR LED D2 + Ihe stronger signal is converted by IG c into a nearly rectangular-shaped signal. The fourth opamp in the circuit, ICld, serves to compensate the difference in propagation time between the oscillator output and ihe output of IClc. The out- put of ICld supplies signals synchronously with JCl'c output signal. Although ihe Formant synfh goes online Readers may like to know that some 25 years after publica- tion, the world-famous Elektor Formant synthesizer still enjoys great popularity and is graced by o group of staunch support- ers. Formant users may be Found In a Yahoo discussion group at http://lounch.qroups.vQhoo.com /qrouo/ElektorFormont/ Battery backup for bike — help please Dear Editor — I believed I had thought up a simple battery backup using capacitors to iso- late the 'dynamo' from DC and an optoisolator driving a tran- sistor (with series diode) to switch ihe backup. I was quite hopeful about my design but in practice puz- zlingly it seems not to work — it won't switch over to the dynamo! I hod hoped to send it as a cir- cuit idea — perhaps you could use it for your puzzle page. Alan Bradley (UK) Thank s A fan your hand drown arcuit is reproduced here for rest of the circuit looks fairly simple, we are in fact looking at a complete syn- chronous demodulator. The pulses at the outputs of IClc and ICld are compared using LDs D5 and series resistor R17. If a dear signal appears ol the output of IClc os o result of IB-transparent ink, this signal will be in anti phase with that at the output of !(1 d. Diode DS ihen lights to indole the presence of ihe IR transparent ink. Via R20, this point s also connected to a piezo buzzer providing an audible indication. The power supply section built around II ensures good stabilisation of the supply voltage. A power-alt indicator has been added in the form of yellow LED D5. If the baltery voltage drops, so will the LED current, eventually to a level so low ihe LED wifi go oul. The authors prototype was built using SMD parts because ihe resullanl shorter PCB Iracks allow the sensitivity of the opamps to strong RF fields to he kepi to a minimum. In ihe event of RF oscillations arising, the dashed components may he added (R8, 1 Ok; (2 approx. IDpF). To adjust the cir- cuit, the testor is held above a couple of sheets of white (copy) paper. Preset R6 Is adjusted for LED D5 to just come on. This setting remains stobfe - due to ihe signal averaging (there is no fixed reference value for IClc), any drift on pari of D3 con have no effect. Provided if hos been built correctly, Ihe circuit will ihen respond reliably to IR-transparenl and IR-blocking types of ink. In practice we siill need to look at the problem of finding the right areas on ban- knotes to he subjected fo the false/good test In ihe relevant range ihe transi- tion from IR-transparent and IR-blacking has to be recognisable as dearly and reliably as possible to ensure that really good forgeries ore olso detected. Wilh ihe 10- and 50-Euro banknotes in the photograph, ihe relevant transition area is neor Ihe figures In the top right bond and bottom right hand corners. In this test ore, the banknote hos to show a clearly visible decolouration effect. With a larger white component (lighter print) it is however possihle that the brightness difference delected by the IR test is loo small. The rear (verso) side of Euro banknotes (showing the bridge motif) is entirely transparent in the IR range, only the serial numbers will show up black. Information on commercially available banknote testers may he found at, among others, vnyw.Y/ekQYerif.com 1 2/2005 - ckktur 9 INFO & MARKET MAILBOX VtfcfLTf U T:- f m J i-" /V ! jCi-A HF \OOju^ + rJI ft® wsis r-y f 6«sw \/ L-flr.P.s ff-£t y: 5R+^:^» f i& \7 I5P ; i ___T^-r- CP^O tfpLAtlft. other readers to examine a no' hopefully help you discover where the fault isi Please send feedback to the editor so this sub- ject may be continued in a truly constructive way! This month's issue hos t he last instalment of Professor Ohs - monns Guizz Away' series of electronics bminfeasers. As oi January next near we will be printing a contemporary puzzle tor the electron sc> - m i n dec to pit their wits against 1 i ESR/C Meter ^ September 2005, p. 30, ® 040259*1. The parts list stores a wrong I enclosure; this should o Ham* g mond type 1593YBK, I FAQs on this popular project \ may be found on our website I Forum, I I i { 1 -MHz I Frequency Counter I July/ August 20 05, p« 100, 1 030045- K l The original software con* I Earned a few errors and o new version may be obtained from our website [rer. ! 030045-1 1 .zip). The software has been written j for a 4. 1 94304-MHz quartz Windows FIFO buffer Dear Editor — I refer to the inset on page 35 of the Octo- ber 2005 issue ("Colossus ]r/ r , Ed.) where you show that dis- abling the FIFO buffer in Win- dows XP can help to solve problems with R5232 serial communication. While experimenting with a DCF77 time signal receiver module, I discovered that switching the FIFO buffer does not take effect until the PC is restarted. This may be confus- crystal. To enable the micro controller to be used with an 8. 388608 MHz crystal, the program has to be modified as explained in the source code file, and then compiled again. Precision B a r o m et e r/ A [ t i m ete r September 2005, p. 54, 040313-1. New so It. va re that solves the problems with the real-time clock is now available from our website (ref. 0403 1 3- i 1 .zip). A 56 pF capacitor between pin 12 it IC2 and ground will improve the accuracy of the internal clock. ing as the operating system does not produce a matching message. Without a restart of the system it would seem that changing the FIFO settings has no eFFecl I Peter Simoons [ (Netherlands) B Thanks hr that Peter, the word is | being passed on. i i E I SMD soldering aid l Dear Elektar staff — ! applaud [ the attention you give in your articles to the problems of SMD soldering. E Being an electronics designer myself. I recently had my own share of problems with these tiny bits and decided to build a special tool to help me get them properly soldered onto a board. To my surprise, inexpen* sive tools that help you get an SMD property soldered are few and for between. My design for an SMD locker may be round on wwv/.midi button ,nl - G. Bouland (Netherlands) That looks like o very useful little tool indeed, and we print a pho- tograph of the device here, ft may 6s ordered through Mr Bouland s we 6 s i to. Th j s man th s Design Tips pages also show an SMD solder! na aid , u Marketplace We're pleased to say ihoi the Forum and fr-News pages of our website attract o lot of visi- tors every day. Not so, as it turned out, with the Market- place section we set up earlier this year, and that is why we Corrections & Updates 10 tldslor ebdnsriu* T 2/2005 decided to remove if effectively □s of 1 October 2005. However, registered users of our website of www.slekfor- eiectrQnics.co.uk can sfil! offer components, equipment, fools, books, magazines etc. for sole, or post a Wonted message, in ihe relevant sections of the Forum. Everyone's invited! H5R/C Meter — capacitor equivalent diagram Dear Editor — as a long-time subscriber to your magazine I enjoyed reading the 'E5R/C Meter article in the September 2005 issue. 1 was a little sur- prised however to see a capac- itor electrically represented as a capacity' with resistor in series with it. I would have expected a capacitance with a shunt (parallel) resistor (actu- ally, ihe leakage resistor]. How else fo explain; 1 .A charged capacitor in stor- age will gradually lose its charge. This can only be due to a parallel resistor across the capacitance, 2. If you connect a capacitor with a series resistor to a voltage source Ub and select ever higher values For the resistor, you will notice that the voltage an the capacitor will eventually become lower than Ub. This is explained by ihe voltage drop across the series resistor due to the vir- tual resistance in parallel with the capacitance. Will you shore your views on this with me? A, Wilcox (UK)) The E } ektor ESR/C Meter has been a resounding success and aha gave rise to some hof debates jh internet newsgroups on electronics. The capacitor equivalent diagram sho wn in the article was purposely kept os simple as possible, show - mg only the main virtual compo- nents; — in fib is case, the capaci- tance and the series resistor, both o f v/h ich being accuro tefy meas- ured by the instrument. The com- plete equivalent circuit would also comprise a series mducionce (formed mainly by the wire termi- nals and rolled up electrodes), a s hunt ( leakage ) resistor as you correctly describe (being respon- sible for all listed effects) and an RC network again in parallel 'with the capacitance and responsible for the so-called dialectical absorption ot the capacitor, the phenomena you list can mdeed he explained on ihe basis of th e comp reh en s i ve eq viva le n t diagram. Identifying SMD components Dear Editor — thanks for a great program called Resistor Colour Band Identifier in 040203- 1 1 .zip. However 1 was wondering if there was a similar program, pdf sheets col- lection or website for identify- ing SMD components. ! cur- rently use the Farnell/RS cata- logues which can be time con- suming. ! think it would be use- ful to have an article on SMD repair and component identify- ing. Again thanks for a great magazine. Keith Harris (Australia) SMD identification car ce vary tricky and time consuming , How- ever, have a look at Mr R.R Black- ■r veils excellent overview at www : marspori. demon . co. uk/ CiariTy on electrostatic speakers? Dear Jon — can you tell me if the CiariTy amplifier (June, Sep- tember, October 2004, cd.) is suitable for use with electro static loudspeakers? 1 have built my own E5 loudspeakers with depth-adjustable mem- branes. We do nor recommend connect- ing ES drive units to the Clarify amplifier because the transformer with the capacitive load or the electrostatic loudspeaker forms a complex imped once that's sure fo afreet me output filter --esc case to some coarse. 7c this we should add that the hnal impedance of c typical ES speaker is likely to drop below 3 W ot higher frequencies, which is too much or a load for this amp. MculBox Terms - Publication of reads rte corraspure Pence s at me discret or of the Editor, - viewpoints expressed b, comes- concerns are - _t necessarily arose -:.f the Editor or Rub ishgr - Core seen canes may be translated or edited for length, clarity and styie - vYhen replying to Mai] box ec-rrespor: dance, ptease quote Issue number. - - ease send v our Mail Box correspondence to; editor@gfektor-ef&ctrQnics.co.u H or Etektor Electronics. The Editor RO. Box 190 , Tunbridge Watis TN5 7WV. England. G4PMK’s SMD Codebook Ccdts beginning with 'A‘ C= ■ - I P i : .n.HHi: : IT i 1 u f*7 Butt ij-ii Drrhi W srt ini .im; Ezu'1-e.i-cC ti * fn;: 5-i l z. J: : Ei 1 3 !'tj 1 ■ j ■ = ” .3. V3 >3 -a n jsfia Ct’o.’ j rfte * i )^V ■:o iw. & SO. it j.: VP i "S77T2. »“ ■ T-, • 1 M 73 VC j „ “ ~‘2V~Z , Fi ~:z r K£ . _ . YWE uc ■"iSTan WF E =— . L rl: 'SI AZ, rLiSart , r T- . iu - . qi L " ft p cip* ---nr K -r- A1 I i ■ ■A : zizil U ■- - - 1 pOKC -- 1 3C"3 u a z f — Fj-=- 1 , P Ss : T !wa-s -■= BkP" - * — - h .— — — x x j Z'.T- 1 i-i "zi .iz'vi: '.z-j-r - .* : .1; T.5T5Z'- £1 =•* f>i SCWi _ — — j r-~ ZXri ; -mrxi viz r-'Jf: -'-i ‘«r rrr-iij Vf i -_ur*Fi.V;: -rfi-Xi Mi JL LI~2 T_l; ziELt.,:: ' X-z; ‘ejijj s!irir4Jiw* ** :z,l i'.ZiJL S5 jt II' £ iZ; Zl 5 t Xl £JT J3L hi "Hd i-. .V&lk&E vtr pi " — ■3IS < rP - i: - .. MI --- n --r o j : — : ■*4 itit o?; i e: : :: *2 =*'■3 -- c rrX-EI *25 = *' .c : : z^ : : s m d J7i ain fra men im 12/2005 - eleSclpr etecfronics CIRCUITS PD Interfaces under Windows 25 95 U5S 52 00 -r ST62 Microcontrollers i i - - ST62 MICSOCOSmOLUM DiCTOflARY OF MONITOR Technology Dictionary of Monitor Technology The Dictionary of Monitor Technology is a pioneering book of unsurpassed range which clearly documents all aspects of the deve- lopment of computer monitors. The subjects covered extend from the first 12-inch IBM monitor to today's high- tech units. £ 25,95 U5S 52.00 Practical program- ming of the ST62 series of microcon- trollers from SGS Thomson. E 24.95 OSS 50.00 - ' ’ - r Designing Audio Circuits How does speech, music, or, indeed, any sound get from the record, CD, or cassette tape to the loudspeaker? This book endea- vours to give a comprehensible answer. £ 20,75 USS 42.00 Designing Audio Circuits High-end Audio Equipment H ' a jF/ Vv \ Build your own High-end Audio Equipment For those who cannot, or will not, pay high prices for high end equipment, a solution is offered in this book; build your own at considerable cost savings. £ 15.55 USS 31.00 Make your 4 m choice! Build your own Audio Valve Amplifiers This book contains, apart from con- struction projects for preamplifiers, power amplifiers, and two amplifiers for musical instruments, information on the operation of electron tubes, while the first chapter gives a short history of the valve. ( PC Interfaces under Windows PC Interfaces can be used for more than just the printer, mouse, modem and joystick! While it was relatively easy to directly access PC interfaces using a DOS computer, under Windows things are not all that simple. This book (CD-ROM incL) shows you how it can be done. 304 Circuits Special Christmas Offer Eiektor Books I $ 59.90 Offer valid until! 1 January 2006 Exd. P&P 304 Circuits is aimed at the active electro- nics enthusiast, professional or amateur. [n this book you will find ideas, concepts and circuits covering the gamut ot electronics. " M The book is arranged In subject sections to make it easier for you to find the circuit or idea you are looking for. 13 45 USS 27 UQ Lasers: Theory and Practice A valuable book on the practical use of lasers. It consists of two main parts. The first deals with the fundamentals of lasers, inclu- ding such topics as types of laser, modes of laser operation, wave- lengths, chopping, scanning and applications. The second part contains a number of practical circuits and experiments. I - ' ?l zz, Handbook for sound technicians £ 20.75 USS 42.00 : - ■ Handbook for Sound Technicians This book contains chapters on basic theory; micro- phones and musi- cal instruments; various types of amplifier; loud- speakers; effects equipment; recording techniques; lighting equipment; the rehearsal room; and faultfinding and small repairs. £ 20.75 USS 42.00 Faultfinding in Computers and Digital Circuits This book covers faultfinding not just in microprocessor systems, microcontrollers and industrial PCs, but also in consumer items such as personal computers, multimedia I devices, digi- tal television and so on. Js/Ul'-j Faultfinding in Computers and Digital Circuits - LX' - J PC SERVICE AND REPAIR PC Service and Repair This book provides the infor- mation you need to be able to deal with computer system faults whenever they occur. With the aid of this book, you can tackle faultfinding at various levels, ranging from the replacement of complete cards or assemblies to the identification of a single faulty component. £ 31-15 USS 61.00 SCSI: The Ins and Outs SCSI THE INS AND OUTS I ftrim/ I I*r>. r» F £2 This book comes with a CD-ROM and wifi prove invaluable when you want to sort out a problem In a SCSI system. £ 24.95 USS 50,00 I am ordering three books for just £ 29.90 (USS 59.90)!* TIP! This offer being limited to available stocks we kindly advise you lo lick mom than three books on the Order Form, please number the books in preferential order. * Exd. P&P UK: £ 4.00 Europe: £ 5.GD Outside Europe: £ 8 .uQ PC Interfaces under Windows 304 Circuits Build your own High-end Audio Equipment Dictionary of Monitor Technology ST62 Microcontrollers Build your own Audio Valve Amplifiers Designing Audio Circuits Lasers: Theory and Practice Handbook for Sound Technicians Faultfinding in Computers and Digital Circuits PC Service and Repair SCSI: The ins and Outs Him & NEW PRODUCTS 2.4-GHz WirelessUSB™ Radio-on-a-Chip Cypress Semiconductor Carp, recency introduced It s next-gen- eration 2. 4-GHz WirelessUSB™ Radio-an-a-Chip. The new Wire- lessUSB IP offers the mas! robust solution with the lowest power consumption for keyboards, mice, and other Human Interface Devices [HIDsj while providing on unparalleled feature set enabling low BOM costs, higher data rate applications, and foster time to market. WirelessUSB LP operates between 1.8 and 3.6 volts, using many advanced tech- niques to extend bottery life in devices such as wireless mice. The new device uses Cypress's patented Direct Sequence Spread Spectrum (DSSS) and fre- quency-agile technology to offer best-in-class interference immu- nity for a 2.4GHz radio system. This combination of low power consumption, interference immu- nity and low cost make it ideal for wireless HID applications such as keyboards, mice, remote controls., presentation tools and game controllers. WirelessUSB LP brings these benefits to the Voice over Internet Protocol (VoIP) market for products like wireless headsets by transferring data at a maximum speed of up to 1 Mbps. WirelessUSB LP uses Cypress's patent pending AutoRate Receiver v technology enabling the device to receive data at any data rate without the need to negotiate speed changes, in addition, the device includes integrated features such as an automatic transaction sequencer deep packet buffers (1 6 byte) for TX and RX, ond a boost con- verter (generating up to 2.7V}. These features simplify firmware design, offload processing requirements, allow tor the use of lower cost microcontrollers, and power external devices such as optical sensors. The device also has highly optimized tim- ing, including quick startup, fast channel changes, and immedi- ate link turnaround capabilities. All of the se enhanced features combine ta significantly extend battery life,, save design time and reduce overall system costs. WirelessUSB LP lowers support call costs with the user-friendly KISS Bind™ feature, which enables a user to intuitively link a wireless peripheral to the desired host by simply bringing them in very close proximity with one another. The device also supports the recently announced Touch Wake™ capability to save additional battery power by allowing a WirelessUSB periph- eral to instantly wake from an ultra -low-power sleep mode when the user touches it. More Information about the product is available online at www- eye ress-com , "5-i Zigbee- ready wireless network Cratlon, the wireless sensor semi- conductor company, and Betathe rm, a leading provider of high precision NIC thermistors ond temperature probe assem- blies announced the successful deployment of Oration's wireless sensor network at Beta therm 's manufacturing plant in Galway. This is believed to be the first successful European deployment of the emergent IEEE 802.1 5,4 ZigBee wireless protocol in a monitoring system. The results of the deployment were outlined In o paper at the Radio Solutions Conference in Sophia Anti polls, France, on October 12. The wireless sensor network measures temperature, light and humidity at several locations around the manufacturing plant and performs wireless data transmission at regular intervals to a PC server in Betatherm's administrative office block over one hundred metres away. The measurement modules ore pow- ered by long-life batteries with a projected operational life of up to ten years. The modules use Betamerm's interchangeable Series II range of NTC thermistors, which are suited to high precision tempera- ture sensing in plant monitoring applications because or their accuracy, sensitivity and robust construction. The wireless net- work operates in an environment that is particularly harsh for RP signals with the presence of elec- trical manufacturing equipment a neighbouring three-storey metal-dad building and a nearby telecommunications tower trans- mitting at microwave frequen- cies. Even under these conditions the modules are capable of trans- mitting over several hundred metres at the ZigBee ISM fre- quency' of 2.4 GHz. The modules can additionally use Cratlon s patent-pending Lo-Hop fre- quency hopping algorithm to avoid RF blocking in the event of interference from Wi-Fi access points or microwave ovens, A live-demo link to the wireless network in real-time operation is available at: http; Vwv/v/.crat- EQn.com/crQllon/Qpp.html Evaluation kits of ihe modules ore now available, and the module design, software stock, sensor interface circuits, ond RF deploy- ment guidelines are available for license to OEMs in the energy conservation, building manage- ment and related sectors. D5“ 75 - 4-1 VAVw.cratlon.com www.bitathenm.com 14 drkfBi el-rtEcte ■ 17/2005 Microchip: 49 new 16-bift microcontrollers in one launch Microchip announces the PIC24 Family, its first fam- ily of 1 6-bif PIC micro- controllers. The Family debuts with 22 general- purpose devices and offers up to 40 MIPS per- formance, 1 6 kBbyiss of RAM and 256 kBbytes of Flash program memory, In packages up to 100 pins. Besides fhe PIC24 family Mlerochipa also launched the dsPIC33 family. Both families maintain compat- ibility with Microchips MPLAB© Integrated Development Environ- ment (IDE) platfo rm and upward compatibility with all dsPIC© digital signal controllers. There are two series of devices within the PIC24 family. The PIC24F offers a cost-effective step up in performance, memory and peripherals for many demanding 8-bit microcontroller applications. For even more demanding applications, the PIC24H offers 40 MIPS perform- ance, more memory and addi- tional peripherals, such as CAN communication modules. Overall, the PIC24 delivers increased performance without sacrificing interrupt flexibility and responsiveness, cade exe- cution predictability, easy I/O manipulation, C code efficiency and system Integrity. As with all Microchip microcontroller families, the P1C24 is designed to meet a wide range of needs across a broad spectrum of applications. Specific examples include consumer items such as handheld remote controls; communications applica- tions such as optical net- work components; Instru- mentation and measure- ment applications such as hand-held and remote ter- minals, POS terminals and medical Instruments; and industrial applications such as factory automation sys- tems, building monitor-and-can- trol systems and security/occess systems. Additional key features include; 1 6 MIPS performance with cost- effective PIC24F family; 40 MIPS operation with high-performance P1C24H family; 64-256 kBbytes of Flash program memory; 8-16 kBbytes of RAM; 64-100 pin package options with JTAG; 2 x DART; 2 x 5 PI™ and 2 x I2C ; up to 2 CAN ports; Real Time Clock Calendar (RTCCJ; Direct Memory Access (DMA) on P1C24H family; 1 Q-bif, 500 ksps A-to-D convener with 16 Input channels (PFC24F); 2 x 1 2-bit, 500 ksps A-ft>D converters with 1 6 Input channels (P1C24H). The new dsPIC33 family Is highly compatible with the exist- ing dsP!C30 family - it has the same instruction set, has compat- ible pinouts, and offers an attrac- tive price and feolure-set for applications requiring larger Flash and RAM, The two initial dsPIC33 product families shore the following key features: 40 MIPS deterministic per- formance; 3.3V opera- tion; 64 to 256 Kbytes Flash; 8 to 30 Kbytes RAM; 64- to 100-Pin TQFP packages; serial I/O subsystems, including up to two each; SPI TV 12C™, UART and CAN; Direct Memory Access (DMA); one or two 500 ksps, 1 2-bit A/D convert- ers; Codec interface. The dsPlC33 Motor-Con- trol and Power-Conversion DSCs have one or two 1.1 Msps 1 0-bit A/D con- verters; up to 8 sample- and-holds for simultane- ous sampling; specialized PWM far Motor-Control r Lighting and Power-Conversion applications; Quadrature Encoder Interface. Both new families are marked by backwards compatibility with existing products. A similar pinout and an identical Instruc- tion set make the transition from PIC 18 to the 1 6-bit P1C24 as easy as possible. Existing Microchip development tools such as the MPLAB C30 C com- piler and the MPLAB PM3 uni- versal device programmer can be used. Microchip has also cre- oied the Explorer 16 Development board to support alt 1 6-bit PIC24 microcontrollers and 1 6 - bit dsPIC digital signal controllers. Samples are available In fhe first quarter of 2006 and volume production Is scheduled for the second quarter of that year. The Explorer 16 kit (p/n DM240Q01) will be available from Novem- ber 2005. (G577S7B i ) Further Information from www.microchlp.tom DMA Memory Bus 40 MIPS 16-bit Core 16-Bit ALU Register 16x18 16-Bit MPY JTAG & Emul interface Address Generation Shifter Accumulator Interrupt 16-bit Timers Watchdog AD, 12-bit, iS ch. AD, 12-bit, 16 ch. UART (2) 1 2 C t “ (2) SPI™ (2) CAN (1-2) CODEC l/F Motor Control 12/2D05 - efeklor ekfrcMs 15 NEWS & NEW PRODUCTS Fusion of anti-collision radar and video sensors for pedestrian safety Class D controller chip Cambridge Consultants has developed pedestrian-sensing sof tware to support its anti-colli- sion radar for automobiles. The technology allows radar and video sensors to work in tandem to sense pedestrians - or cyclists - enabling the introduction or advanced active safety cancepts such as tilting the bonnet to miti- gate an impact or deploying external airbags. This sensor fusion' technology uses the forward-! coking radar to cue the video, greatly reducing the amount of real-time processing required. Cambridge Consultants has exploited this fo develop a sye tern mol can run on a lowcost DSP [digital signal processor] devel- oped for mass consumer appli- ances - making the technology well suited to the cost demands of the automobile industry. This low cost focus is comple- mented by Cambridge Consul- tants' innovative radar technology, CCL-Soficar, which operates ot the low frequency of 5.8 GHz - greatly reducing system costs com- pared with conventional auto mo- bile radar technologies operating at 24 or 77 GHz. The new software performs object classification. It uses radar scatter information, object move- ment information, shape and colour matching and other tech- niques to distinguish humans from other moving objects. Analysis is performed in real- time. Results From the company's prototype system, which Is based an a low-cost DSP, are currently generated at a typical rare of 10 to 20 Hz [or every 100 to 50 milliseconds). Com- bined with the radar system's 20 to 25 metre range, this provides the time margin required to initi- ate active safety measures. Among the impact mitigation measures under discussion by the industry are tilting the bonnet to lessen the severity of impact, firing external airbags, ana assisting braking. ll J s likely that the final abject clas- sification rale will be increased to around 50 Hz for commercial use — by selecting higher clock speed versions of the DSP — to match the new generations of fast, law-cast image sensors cur- rently being developed for auto- motive applications. Cambridge Cansullants' sensor fusion technology is equally applicable to improving the per- formance of next-generation reversing aids, by providing the driver with a full colour display where the object classification software automatically identifies objects, along with approximate distance Information, to help drivers take necessary action. This new development is a valu- able enhancement of the CCL- Soficar anti-collision radar tech- nology announced in 2C03. CCL- Soficar Is a pulsed radar system working in the 5.8-GHz band, rather than the 24 or 77 GHz bands used in alternative anti-col- lision radar approaches. The effect of this relatively low fre- quency is fa reduce the cost of the components required to build a system and avoid She rime ond cost overhead which precision assembly of higher frequency equipment imposes. With this technology, just four radar modules and one electronic control unit (ECU) are required to provide 360 degree protec- tion for an automobile — fur- ther reducing the bill of materi- als compared with alternative approaches, which can require two or more modules fo be Installed on every side of a vehicle. The new video-equipped CCL- Softcar demonstration system Is installed in c mid-range car, and is currently being shown ro European automobile and accessory manufacturers. Cambridge Consultants ltd*. Sci- ence Park, Milton Road, Cam- bridge CB4 ODW, liK. Tel: +44 [0)1223 420024; Fax: +44 (0)1223 423373; www.tQmbrIdgeeonsultcnls.com (057 ! 75- l International Rectifier recently introduced the 1RS201 24$, a 200V control 1C developed specifically for Class D audio applications up to 500W per channel. Integrated features such as adjustable dead-time genera- tion and bi-directEona! over-cur- rent sensing protect the amplifier system. Also, these features allow audio designers to simplify' circuits ond minimize component count far Class D audio ampli- fiers in home theatre entertain- ment systems, audio-video receivers and automotive sound systems. The internal, selectable dead- time generation circuit is ther- mally compensated for stability, and is immune fo noise and sup- ply voltage fluctuations to help improve total harmonic distor- tion, or THD. The 1RS20124S has built-in bi-directional current sensing and combines with an integrated shutdown function ro protect the output MOSFETs when an over-current condition occurs, such as a short-circuited speaker wire. The new iRS20l24$ Class D audio high voltage control 1C is available immediately. The device is lead-free ond RoHS- compliant. www.lrf.com 16 r'Atci electronic* - ! 2/2005 i Layout Software EASY To Use! Very LOW Cost! Extremely FAST Turnaround! R9 r-Tll 313 SI O WN LOAD our free CAD software DESIGN your two or four layer PC boards SEND us your design with j ust a dick ICEIVE top quality boards in just days e^resspcb.com avis* Digital Multimeter A do-lt-j i»irra I f l«( fiitu-f with noli, ntiiu a. cunrtnl nulrr VmJ diode I Ml. £16.99 AM/FtM Radio Shortwave Receiver \ kit |u mxkr m VM TM BnHd ji»unnlf ^ ^hun»«* rcdio in an ^llnrthf cast frcdtrr tn IKttn to Iraiuniiubmt £ 16 99 1™“? Jtrofod ihr world. £9,99 > * * 4 />/ / ZhGfij Aovue Alt In One * I M'»tvtng far Ihr 11 1 lim^tc toldcriu* equipment? The \\nuc 9H9 include a fimptiaiurt controlled inin, hot -dr renfit V uun amt a it-lF\ 1 JAPSIL £99*99 l : x fii Aoyue Soldering Iron 1 2 / 9/3 V DIY PSU The Vnt Ur 9J6 u j ratore \ Uo'ltTuLrwiJ cmilndltd tnfitcrins iron with a ^ nrsukilctl power tupph . ZTG-ThpC nniic and a hi"h Hog* into a T10V «r 24RV maim quality dud and 4 ^parr Mppl * . Suitable for up to 2 00m A. ceramic liratinn element. £ 1 7.99 £24.99 I irhFitld HtrlFMlH The ( Of ei tAchjn:*c. ( uniluil Si, l.ktfafirM. MaTti- US|.t U| I IH>I3> 1566*4 Postcard Radio a tiiuJr rrjAUl radio to build. Requires no -►itilcr I'icVi up \W raiifo otaHom. £6.99 Special Christina SauT packs Available! See Wehsjte. Shop open Mon-Sat f ii> centre local ion 9:(lft-5:ft0 Our range provi 68000 based ,L IrDA, SPjj, PC, Analogue, •H nmers/Counters. RTC, etc. 4b- t ‘ • Large Memory Capacity: Flash, SRAM, DRAM. •Supports:- igggP Mono & Colour LCD's, pTSuoi Panels & Keypads, Very Low Power. it ■Target easily & quickly. i^Ov . J *7 ^anHB ull'-ANSt ‘C’ compiler, assembler r all Windows32 based. 3urce Level Debug. Driver Support with * Libraries. \ Si Time Multitasking OS with h free run time licence. IfeE Unlimited email support./ : 'll* i f * 1 r U i j A 1 ,V. >1 g \ i ' - j H ■ - ' - aBK [1 mV? Li ® . 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 Dunmow, Essex CM6 1XG Telephone: 01 371 875644 email: sales@cms.uk.com 12 / 20 D 5 - cl&ictw dcdro^Tcs KNOW-HOW LARGE DISPLAYS Flat-screen displays conq Rainer Bucken Displays are probably the most important man-machine interface. Everywhere you look - televisions, monitors, and industrial applications - the old-faithful CRT display tech- nology is losing ground and being displaced by more up-to-date tech- nologies, which are also conquering new application areas. Mere we look at the current situation and examine possible future trends. In 1 897, Karl Ferdinand Braun wrote a paper about "a method for demonstrating and studying the time progres- sion of variable currents', tn that paper, he proposed using a cathode ray tube (CRT) as a quickly responding display and observation instrument. Braun's idea quickly lead to unforeseen new uses. A patent for the Braun tube' svas awarded in 1907, and in 1930 the German physicist Manfred von Ardenne, who was only 23 at the time, succeeded in transmitting a television image using only electronic techniques. The basic principle hasn't changed since then: an elec- tron beam strikes a phosphor layer inside a vacuum valve and causes it lo emit light. A caihade ray tube con- sists of a glass envelope with a front surface that is usu- ally convex. That is necessary to withstand the powerful pressure on the outside of the CRT, because the air is evacuated from picture tubes to create a vacuum. A fila- ment and cathode are located in the funnel-shaped neck of the CRT They are surrounded by a Wehnelf cylinder', which forces the electrons to escape through a small hole. The cathode and Wehneli cylinder are held at a negative potential that can be adjusted to control the brightness of the image. Thar assembly is complemented by a set of horizontal and vertical deflection coils and an anode, which is driven by a positive potential. Electrosta- tic beam deflection was used initially, but it was quickly replaced by magnetic deflection. These components col- lectively form on assembly that is colled an 'electron gun'. The inside surface of the glass envelope has a graphite coating that is connected to a very high anode potential (as much as 1 7,000 V). A mask In the form of a dot mask, slot mask or aperture grill is located in front of the phosphor layer (see reference [1 ]), The evolution of the CRT can be read from the steadily increasing deflection angles and screen sizes. The CRT depth con be decreased by using a larger deflection angle. The most commonly used angles until recently were 65 degrees, 90 degrees and 1 10 degrees. Types with a 125-degree deflection angle and a depth of around 40 cm are now available. elsitof siecJrcnks- 12 2005 the world Interlaced versus progressive Television broatkesfing using interlaced frames was first demonstrated at the German Broadcasting Exhibition In 1935, The technique involves splitting the image frames into Iwo sub* frames and writing them successively - first the odd*numbered tines, and the even- numbered lines. The persistence of the phosphor and the latency of our eyes couse the two images to merge. The apparent frame rate is thus doubled, which reduces flicker and the required band- width. However, the interlacing technique also has drawbacks. For instance, there is a time offset between the two subframes, which causes sawtooth patterns to be generated on vertical edges in rapidly changing parts of ihe image. Interfacing also couses major difficulties lor modern video encoding methods used to reduce data rates. As o result, the 72Gp standard hos became established in the course of the conversion from the European PAL television standard {which effectively provides 2 sets of 288 lines) to high- resolution television (HDTV), Here '720' designates ihe number of lines and 'p' stands for 'progressive display', which means full-frame display without interlacing. However, good- quality imagery can also bo produced using the interfaced HDTV standout 1 0801. The next stage is already being discussed with the 1080p standard. It's claimed that the new displays won't have ony trouble handling lhat standard. The screen diagonal of CRTs was 23 cm in 1 953. In 1955, the standard size was 43 cm. The 1 1 Odegree deflection technical breakthrough came in 1970 and led to the prevalence of 66-cm television sets. In 1 987, sev- eral exhibilors exhibited 82-cm (32-inch) sets, and Grundig even exhibited a 95cm (36 inch] CRT display. The set weighed in at a hefty 125 kg and had a sug- gested price of 8000 German marks. In 2001 , Sony pre- sented the KV40XBR700 'Super Triniton' with a 101-cm screen diagonal. That was the high point of ihe trend everywhere in the world. HDTV stimulates innovation The Japanese television institution NHK has been work- ing to develop high-definition ielevision [HDTV; also known as Hi -Vision' in Japan) since 1 964. Instead of 525 horizontal lines as specified by ihe NTSC standard commonly used in japan, the high-definition system was specified to have 1 125 lines. It was first demonstrated in 1985 using CRTs and projectors. The first broadcasting tests started in 1986, Digital Hi-Vision broadcasts via satellite were initiated in 2000, and high-definition terres- trial systems were introduced in 2003. The systems are planned to provide coverage for 80% of Japanese house- holds by the end oF the coming year. However, this ail requires new displays that can handle the newly created HDTV broadcast standards designated as ' 1 280 x 720p/60' and H920x 1 0801/30'. The first number of the designation is the number of pixels per line, and the second is the number of lines. The letter 'p' or T indicates the type of image reproduction used: progres- sive (p) or 'interlaced' (i) (see inset). The final digit speci- fies ihe number of image frames transmitted per second. European broadcasters must choose between 10801/25 and 750p/50. For comparison, the current PAL TV sys- tem effectively provides only 2 x 288 lines per image frame. Incidentally, Europe has also been trying since i 986 to establish its own HDTV system with 1250 lines and o 50-Hz half-frame rate, A non-interlaced technique was also on the agenda. Unfortunately, the technology was developed without any attention to the market. On British behest, in late 1 992 the EU was prevented from investing any more funds in the programme. The entire affair ended up as a multi-million boondoggle thai set back the development of European high-resolution televi- sion by many years. large-format plasma displays In the 1 970s, NHK established a plasma laboratory In its Science and Technical Research Laboratories (STRL). figure L CRT televisions hove been around for nearly 100 years, This one was made in 1960. m (Photo: Sony) Experts from Matsushita also worked In the plasma iabo rotory, STRL developed the phosphors for the three pri- mary colours (red, green and blue) and the fill gas For the cells, Fujitsu began development of plasma-based dis- plays in 1 967 and presented the first panels in 1992, with a display diagonal of 21 inches (53 cm). The world marker far plasma TVs may have been as much os 6 million units In that year, which was more than twice as many os in the previous year, Matsushita, which sells products under ihe Panasonic brand name, is by Its own account the world's largest producer, followed by Samsung, LG Electronics and Pioneer, At this year's IFA exhibition in Germany Panasonic presented 50- and 65- Inch displays with 'true HDTV resolution of 1920 x 1080 pixels. For the domestic market, 1 366 x 768 is probably good enough for a start. Sam- sung also has no plans to market its newly presented 108OJi ne displays in Europe for the time being. The largest plasma TV screen yet developed, with a diag- onal of 259 cm (102 inches) and a resolution of 1 920 x 1080 pixels, also comes from the Korean firm. Even if it only represents a feasibility study, currenily available plasma display panels [PDFs] can cerlalnly hold their own without it. With display diagonals of 165 cm or more, they transform living rooms and pubs into personal home cinemas. PDFs are primarily used in television sets and as display modules in locations such as fai rs and airports. 1 2/2005 - eblttoi detifoniK 19 KNOW-HOW LARGE DISPLAYS Figure 2. Plasma displays do no I need an external Eight source, ns I hey generate UV light by exciting noble gasses In Individual cells. The UV Eight is converted into one of the three primary colours by syllable phosphor coolings In the cells. (Dicgoni: Gavron, [2]} Stimulating light emission from noble gasses Although plasma displays have a certain external resemblance io liquid-crystal displays, their operating principle is completely different (see Figure 2), Two glass substrates enclose a large number of small cells that are filled a mixture of the noble gasses argon, neon and xenon and whose walls are coated with a phosphor for one of the three primary colours (red, green and blue] [2]. Ultraviolet light is generated in each cell by a high voltage [approximately 500 V] applied to an address electrode and a display elec- trode. The ultraviolet light is converted into visible red, green or blue light by the phosphor coating on the walls of the cell. The question of whether if is better to use a DC voltage or an AC voltage to excite light emis- sion from the plasma was disputed for a long time. Most current PDFs use AC excitation. According to video expert Wolfgang Klinger of Panasonic, they have lower power consumption than DC types. Relative to CRT displays, plasma displays have better brightness uniformity between the centre of the display and the edge regions. They also allow displays with Figure 3. Schematic diagram of an LCD. Polarized light is 'rotated' by ihe helical liquid crystals and can thus exit via the second polarizing filter, which is ralatad by 90 degrees relative to the first one (see text). The pixel thus appears la be bright. If an electric field is applied, the Hqyld crystals straighten out and no longer rotate the plane of polarization af the Eight. That results In a dark pixel iOopm: Ve:ci large diagonals to be manufactured relatively economi- cally. However, these benefits come at the cost of slightly higher power consumption. The power consumption of plasma displays is variable and reaches a maximum with large white areas, while the power consumption of LCDs is primarily determined by the background illumi- nation source and is nearly constant. The total power consumption of some plasma displays is as much as 50% higher. However, Panasonic recently proved the opposite situation during an internal demonstration: plasma displays can perform better than LCDs with low- brightness imagery. In any case, the time when plasma displays required enormous fans is long past. However, the useful life of the displays is still a subject of heated debate. The maximum operating time of plasma displays is often specified as 30.000 hours, but figures of 50,000 to as much as 60.000 hours can now be regarded as realistic. After that time, the luminous efficiency of the phosphor starts to gradually decrease, so accurate colour reproduction is no longer possible. On the other hand, burn-in' effects are quite rare with proper use. A liquid-crystal all-rounder The growing significance of liquid-crystal displays (LCDs) Is due to the large variety and versatility of their potential uses. Liquid crystals were first described in 1 8S8 by the Austrian Friedrich Meinitzer, and in 1963 the American R. Williams discovered their electro-optical properties. The first LC display was created in 1968, and in 1973 Sharp introduced a packet calculator with an LCD. In June 1983, Casio presented the first LCD pocket televi- sion set with a 2.7-inch (67-mm) display. Starting in 1 985, portable computers became o reality with the Toshiba model T10QG, and similar colour displays were first marketed in the early 1 990s. It's estimated that around three million LCD television sets were sold worldwide in 2003, and the predicted figure for 2008 is 30 million. Turnover from flat-screen displays increased from 45 million euros In 2003 to 80 billion euros In 2006, with LCDs accounting for around 70% to 80% oF that figure. A LC display is constructed using the sandwich principle (see Figure 3). Light trom a backlight source passes through a polarizing filter on the outer surface of the first glass plate and the first electrode layer. After that it encounters the liquid crystal layer, which is located between two orientation layers. That is followed by another electrode layer, an insulation layer, a colour fil- ter, a glass sheet, and a second polarization filter. The orientation layers are aligned at right angles to each other, which causes the crystals to assume a helical shape along the light path in the absence of an applied electric field. The light is polarized in a specific plane by the first polarizing filter, and the plane of polarization rotates by 90 degrees as the light posses through the liq- uid crystal layer. That allows it to emerge through the sec- ond polarization filter, which is suitably rotated by 90 degrees relative to the first filter. This process yields a bright pixel. IF an electric field is applied to the crystals, they lose their 'twist'. As a result, the plane or polarization of the light does not change during its passage, so the light is blocked by the second polarization Filter. The pixel thus appears to be dark. 20 d=5ttar dectouits - 12/2005 Overcoming teething troubles LC displays and projectors are classified into Kvo types: reflective and transmissive. With a reflective type, light from an external source is reflected by on internal mirror, while a transmissive type uses light produced by a built-in lamp. The light must also pass through the LC layer dun ing projection. If the pixels are not driven by translsiors, rhe display is called a J pos$ive r display. With an active display, which is also called a 'th in-film transistor (TFT) display, each pixel is driven by a transistor That results in a very fast frame rate. The response times of top-end dis- plays are currently around 1 0 ms, with values as low as 4 ms now being quoted. The luminance of LCDs can be os high as 800 condala per square metre, while a realis- tic value for PDFs is only 500 cd/mA although some manufacturers now claim up to 1500 cd/m 2 . Plasma dis- plays have the advantage with regard to contrast, which is the ratio of the luminance of the brightest possible and darkest possible pixels. They have values of 800:1 to 5000: 1 , while LCDs sport figures of 400: 1 to 1 000: 1 . However, that situation could change, NEC exhibited a LCD monitor with LED background illumination that con achieve precise colour reproduction. That makes on inte- grated luminescent lamp unnecessary. Dynamic control of the brightness of the backlight allows the illumination to be increased for bright scenes and reduced for dark scenes. Besides reducing energy consumption, that makes dork images truly dark. Incidentally, a restricted viewing angle Is now regarded as a teething problem that has long since been over- come. Viewing angles of up to 1 80 degrees are not uncommon. Sharp and Philips have introduced new dis- plays thor show completely different images depending on the viewing angle (Figure 4). Big is beautiful It is already possible to construct displays using LC tech- nology with display diagonals of 3.5 to 208 cm (1.5 to 82 Inches) and resolutions up to 1920 x 1080. Even QUXGA-W resolution (3840 x 2400 pixels) is feasible For computer monitors. The largest LC display to dote, which Samsung presented a few weeks ago, still dcesn i represent the end of the line. According to reports from a recent international display convention, a 1 02-inch unit is currently being developed. The market leader in LCD technology is by oil accounts Sharp. It has a 45 -inch display with HDTV resolution (1920 x 1080) in its product line for a year already, and a similar 65-Inch version was exhibited at the fair, the production figure was said io be 1000 units per month. Loewe even displayed a 65-inch set In Berlin with an inte- grated HDTV receiver. However, the prices of LCDs are still quite high, particu- larly for true HDTV displays. For Instance, the official sell- ing price in Japan of the 65-inch display exhibited by Sharp in Berlin was said to be the equivalent of 15,560, although it was readily available In Tokyo's Akihabar electronics district for as low as 1 2,500. For comparison, Sharp's 45-inch display Is available in Ger- many far less than 6000. Production capacities are presently being sharply increased to allow large and medium-sized displays to be produced more economically. Joint ventures for this purpose have been established by Philips wiih LG and Sony with Samsung. Fujitsu and Hitachi also operate a joint factory. Figure 4. Viewing □ television programme end ths Internet at the same lime on a single LCD: this specie! Sharp display could solve space problems. iPholo: Shsp figure 5. OLEDs hove primarily conquered a market niche for small displays. {FTmjTu: ’arced: Sharp and other manufacturers already have produc- tion lines that mass-produce man-sized 'mother panels'. The first eighih^generation plant is currently being built In the Japanese city of Kameyamo. It will produce pan- els wiih dimensions of 2.40 x 3. 1 6 metres storting October 2006. At the same time that screen sizes are increasing, pixel sizes are shrinking. A pixel density of 100 to 200 pixels per inch (ppi) is currently possible, which For example would allow 5-cm displays to be produced in GVGA for- mat [320 x 240) or 9.4-cm LCDs with VGA resolution (640 x 480). Organic LEDs Displays made from organic light-emitting diodes (OLEDs) are one of the most recent flat-screen technologies and have already found a market niche for use in mobile phones and MP3 players. Development of organic materials began ai Kodak in the late 1970s. The key to the technology is semiconducting organic polymers that are applied to a thin glass sheet or plastic film and emit light when a voltage is applied [4], OLEDs thus do not require background illumination. Organic displays are thin, lightweight and bright, which makes them suitable far use in small portable devices (Figure 5). In addition, OLEDs have high switching speeds, which enables them to display moving images quite well. There are approximately 50 manufacturers that supply components or finished products, including Covion, Lite Array, Kodak, Osrom, Philips, Pioneer, RIT- display, Samsung, Sanyo, Seiko, Sharp, Siemens, Solomon, Sony, Truly Semiconductors, Universal Display, and Vitex. Intensive research is still being conducted, for example at the Frauenhofer Institute for Photonic Microsystems (IPMS) in Dresden. 1 2/ 2605- diktat elutionics 21 KNOW-HOW LARGE DISPLAYS Figure 6. Philips exhibited an OLED-based flexible display at I his y earns IFA. Pr::o: FK>f; Figure h A separate minKRY far every pixel: SED is a completely new technology waiting to take on the world. ■ Didiwj: bih'bci Toshiba Construction of Large Screen SED Surf ace-conduction Electron-emitter Display Phosphor QBfSfl IIS Pb Emitter Phosphor Spacer Deflection ilifl 3JLK Yoke CRT SED It is expected that in the future it will be possible to pro- duce OLEDs that can be folded and rolled up, which would allow them to provide serious competition to paper (Figure 6). Initial prototypes are currently being presented, but there is still a long way to go before products suitable for moss production ore available. Here Europe could hove a new opportunity to again make a productive contribution in ihe display field. Early this year, former German Federal Minister of Research Edelgard Bulmahn announced ihe OLED Research and Development Initiative 20 1 5 ' , with the stated abjective of investing around 100 million euros in research during the coming years. Displays Instead of wallpaper Philips, which is participating in the programme, is even researching light-emitting wallpaper and drapery. Diet- rich Bertram, Manager of OLED Development Light at Philips, is optimistic: 'OLEDs will be significantly more efficient than incandescent lamps, even if their manufac- turing costs are several times as high. Light-emitting cur- tains or wallpaper could be commercially available in three to five years/ However, there ore still a lor or hurdles to overcome before large-format OLEDs can conquer major applica- tion areas. The primary problems are excessively short useful life and variable aging of the three pigments (red, green and blue). The blue pigment fades especially quickly. It might take quite a while to achieve the target figure of at least 40,000 operating hours For TV panels. The significant number of transistors required per pixel (two to four] also makes the system quite complex. Fur- thermore. there is currently no manufacturing technique available for moss production of large-format panels. Nevertheless, many OLED supporters already regard them os a possible competitor to LCDs, particularly in sizes greater than 2 inches, in good part due to the com- bination of high resolution ana low energy consumption. Once again, the Koreans managed to come up with a real topper. Samsung presented the largest prototype yet produced, with a display diagonal of 101 cm [40 inches}, a resolution of 1280 x 800 pixels, and a goad contrast ratio. However, such displays are still a long way away from the mass production stage. Fit for the future An important criterion for all display technologies is resistance to obsolescence. CRT-based devices ore clearly approaching the end of their product life cycle and will vanish from the market. Plasma technology will primarily remain attractive tor large displays. OLEDs have already become established in a small market niche. By contrast, LCDs have reached a high level of technological and market maturity, but they still harbour an enormous development potential. Manufacturers are making substantial investments In research and develop ment At Sharp, that amounts to the impressive figure of around 7 % of their annual global turnover. The growth rates also clearly argue in favour of flat screens, such as LCDs and plasma displays. Analysts expect turnover for both types to jump by more than 3G% this year. The German Society for Entertainment and Communications Electronics anticipates that German con- sumers will spend more than 1.5 billion euros on new displays ihls yean In the coming year, more than 2.4 mil- lion LCDs, 550,000 PDPs, 1 70,000 front projectors and 80,000 rear projectors could be sold - as well as another 3.2 million CRT-based devices. The cathode-ray principle may even experience a renais- sance, because an entirely new technique is waiting in the wings. Toshiba and Canon are jointly developing a technology called 'surface-conduction electron emitter dis- play (SED). It promises to yield a resolution of 1 920 x 1080 pixels, short response times, low power consumption, large display diagonals [50 inches or more], and high brightness without background illumina- tion. The contrast ratio is said io be 100,000:1. This technique, like that of conventional CRT televisions, is based on directed emission of electrons that cause a phosphorescent layer integrated into the glass surface of the screen to emit light (Figure 7). However, a separate electron emitter is provided far each pixel. The first pilot plant went Into production in late August in the Japanese city of Hiratsuka. The Japanese aim to produce 75,000 displays per month by late 2007 and win a market share of 30% for Rat-panel displays larger than 50 Inches. D5fj29" -i. Useful links: [1] http://arcadeC0lltroU.com/file5/MIsceltQneous/crtfaq.htm [2] http://e!ecfromcs*howstuflwofks*com/plasma"disp!ay3,fitm [3] www.Qkiholx3rflnews.com/fin/ [4] w ww.o rganl cserntco n duct ors.com 22 tkUcr elect tasks- 12/2005 | A VI FRe search www.avilresearch.co.uk USB to TTL Serial Cable * Simple and Easy way to give- USB s upped; to your designs • Connects daecLfy to mkatjcontnoBef UART of l/G pins = I :c ' - : r - I hz : : lir ' J _r " J! it' Z Jr ■ It Afi oYoitay integrated into sfeefc. moulded USB plug A -way cc-nr^ct-f Gnd RX. TX a?va -5," Suppled with PC drive**. ^ijunpte cods and tirforia! Special Price of enfy 29. S3 Fndtafrng VAT * AVt i Research also supply: l 2 C Bus TfJCjJ; - Mows your PC to monitor and control the l*C Bus Invaluable tool for cevelgpefs u^mg : _ a EC Eius iee website fer fu. z Jlz www.avitresearchxo.uk info@avitresearch.co.uk G870 741 3636 O Prototypes at a fraction of tttacmt Q TooFing and smut) mchidad O Any contour t • Industry s tar dBm qmFT, O Followup sands runs 0 CAJA / CAD consulting O Fr4 tn-Tiffi. 35pm Cu EUBQCAfUt nm + Tooling t Piwtopiots + i^r * £ 29 . r=?=5 msy .z-y Free SL-^UlxT.-ii nms hr -s» :j' ; v £Jta£ vaoSbuobfiHtna Simply wnd your files end order OIIUHt WWW.PC8-POOL.COM t^rn lmTuiSI d oread C KTSah I : E ^; Il j i: l -~ - E iTiM ■■!■■! ■ ■ J ™"“™ PicoScope 3000 The PicoScope 3000 series oscilloscopes are the latest offerings from the market leader in PC oscilloscopes combining high bandwidths with large buffer memories. Using the latest advances in electronics, the oscilloscopes connect to the USB port of any modern PC making full use of the PCs' processing capabilities, large screens and familiar graphical user interfaces. High performance; lOGS/s sampling rate £ 2Q0MHz bandwidth * 1MB buffer memory * High speed USB 2,0 interface * Advanced display £ trigger modes * Compact £ portable * Supplied with PicoScope £ PicaLog software bi mla I El! ITS 04 3205 3206 SfJMTtr lUOUHf 2tH£.IKr 2 5GS* 5>B£a 11MS: IDOUSs 20005% ?,E*i tn«ar S'tn 5j im IW 5*i L* $4*4 Vn Iia^h la blkJiv SO*** OtapWl 0 M» lUOUItf q«kb IMS AhAIM : Ib}K PE c*n*u-t* Tel: 01480 396395 www.picotech.com/scope318 zlHtaVro i2UV 1*933.0 IUSSt.1 txmptuUmi 7 i't lit U >1 Oi* \ IJffl ili <1 12/2005 * efetloF ekdroiviis 23 KNOW-HOW EM WAVES People have been busy experimenting with electricity ever since it was 'discovered'. Many good things have come out of these experiments, and the world would look completely different without all our electronic aids. But there's also another side to the S.H.J.A. Vossen and B.J.A.M. van Leersum Ihke the radiation from a broadcasting antenna, make it 20 times as strong , and bundle the radiated energy into a narrow beam: you have a powerful weapon in your hands! Such systems are already available to the U.S. army for dispersing crowds. For example, the Vehicle Mounted Area Denial System (VMADS) illustrated in Figure i and Figure 2 emits strong electromagnetic waves {EM waves) that cause a painful sensation in the skin. It s not known whether there are any other effects, bnt those of you who read our electrosmog article in the June issue will certainly realise that other effects are possible. The power of such electromagnetic weapons is naturally sc ale able, and it can be quite a bit higher than the example we just mentioned. Susceptible We're accustomed to using a wide variety of electronic devices and sys- tems in our everyday environment. Toe amount of electronics usedincars is increasing aE the time. Even cyclists and hikers are kitted out with all sorts of gadgets, such as GPS receivers tor determining iheix loca- tion and the route to be fallowed. The use of wireless communication media has also increased enormously, and there's certainly no end in sight to ne v j d e velopme nt s . All these devices work with electricity, and that means they generate electro- 24 cfeklur eSfdrama - 12/2005 magnetic (EM) fields. Whether these fields are desired depends on the application. However, there's no ques- tion that ah electronic systems are also suscepiible to external EM fields. For that reason, government bodies set limits to the amount of electromagnetic interference (EM) equipment and sys- terns can and may generate. These protective requirements are specified in electromagnetic compatibility (EMC) standards, and they are specific to par- ticular products or classes of products. In Europe. EMC standards are speci- fied in the European EMC Directive (89/336), However, most EMC require- ments are limited to frequencies below 1000 MHz. so what happens to or with equipment at frequencies above 1000 MHz is not known. Interference signals There are various ways to generate directed electromagnetic radiation at high power for the purpose of interfer- ing with the operation of electronic equipment or totally disabling it. One of these technologies is High- Power Microwaves 5 (HPM). EM waves horn an HPM weapon are very difficult to defend against in sev- eral regards, because they: ft propagate at the speed of light ; » are invisible ; * are not affected by weather conditions; ft are often difficult to detect; ft and the supply of ‘ammunition' is practically unlimited. HPM waves can penetrate into a sys- tem in different manners. They can enter via 'front-door 1 coupling or 'back- door' coupling (see Figure 3). With front door coupling, energy is coupled into the system via sensors and anten- nas used to detect radio signals. The interference signal can he inside or outside the frequency band the sen- sors and/or antennas are normally designed to receive (in-band versus out-of-band coupling). With back-door coupling, HPM energy penetrates the system via ventilation openings, doors, cables, and so on. HPM is often compared to electromag- netic pulses {EMPs}, but an EMP is actually a variation on the idea of high- power microwaves. EMPs are gener- ated by nuclear explosions thar cause a natural reaction with molecules in the atmosphere. Waveforms HPM can occur in four forms (see Fig- ure 4), The continuous waveform showQ in Figure 4a is characterised by its frequency and power. This sort of waveform is usually generated using a resonant microwave tube, such as the 1 31/2005 - sicklier dertrenks 25 KNOW-HOW EM WAVES Figure 1, A vehicle-mounted area denlol system. Table 1 . Classifi cation of HPM effects Category Physical effect and consequences . Damage * Discord » Repair 9 Replace fuse 9 Repair software Denial * As bng os the interference signal is present and a short lime a her the interference signal goes away [no damage] 9 As long as the user is busy solving problems Disiurbance 9 Behaviour altered, no longer usable fno damage or denial) 9 Minor errors, still usable Deception 9 Modified information paths, insertion of false data Figure 2, An HPM system fitted In a vehicle. Figure 3, Examples of front-door and bark-door roup flng paths. magnetron used in standard micro wave ovens. The narrowband waveform shown in Figure 4b is the most commonly used form of HPM. Its characteristics are determined by the frequency, peak power, pulse width or energy content of each pulse, pulse repetition fre- quency: average power, and duty cycle. The advantage of this form is that it’s easy to generate a high peak power with a relatively modest total power. There are two reasons for using a repetitive waveform as an interference signal. The first reason is that it has a higher chance of success because the specific time when interference occurs is time-critical. The second reason is that error-correction systems are often used in systems to combat minor dis- turbances, which can also occur inside the systems. However, such systems will fail if multiple small disturbances axe created in rapid succession. The types of devices used as sources for this type of waveform include trav- elling wave tubes, magnetrons, kly- strons, and virtual cathode oscillators (vircators). The third type of waveform is the damped sine wave shown in Figure 4c, Here the important parameters are the dominant frequency peak power, damping coefficient, and pulse energy. If the waveform is repetitive, the pulse repetition frequency and average power are also important. Trie advan- tage of this waveform is that it can be generated using an "impulse source', in which stored energy is discharged very quickly into antenna. Expensive vacuum valves are unnecessary with such a generator. The final waveform (shown in Figure 4d) is called ultra- wide band'. Its typical parameters are peak power, rise time, fall time, and bandwidth. This waveform contains a large num- ber of frequencies. However, the peak power of each individual frequency is relatively modest, which reduces the effect on equipment and systems. This waveform can also be generated without using expensive vacuum valves. However, it requires an antenna that is much more complex than the antennas for the other wave- forms (see Figure 5). Towards the E-bomb Systems for generating all the described pulse forms are theoretically conceivable. The emitted power is scale able, with the upper limit deter- mined by size and the available source of electric al energy. We already men- tioned an example of an operational system: the VI v IADS system. Another option is to build an HPM sys- tem into a ballistic or rocket -powered projectile. From a technical perspec- tive, there are two options for such sys- tems, The first option is to generate HPM using a fully electrical system powered by a source of stored electri- cal energy, such as a battery, capaci- tors, or the like. The second option is to use an explo- sion-driven HPM system. In the latter type of system, a capacitor generates an initial current in a coil, A metal tube filled with a explosive is located inside the coil. Controlled detonation of the explosive causes rapid compression of 26 ebltor ebcfrontfs - 12/2005 the magnetic flux. At the same time, the surface area and inductance of the coil decrease, which causes the initial cunent to surge to a very high value (see Figure 6), The pulse generated in this manner is a damped sine wave or single broadband pulse. The held is emitted in all directions, A disadvantage of the 1 E-bomb’ described above is that it can emit only a single pulse. There is also a risk of injuries or fatalities when explosives are used. Another problem is that up to now, all attempts to use an antenna to radiate the extremely high power that can be generated by an explosion- driven Ihix compressor have been unsuccessful. Social safety and security We now present several examples that show why HPM could form a threat. These examples are fictitious, and they are intended to stimulate our readers to think about the issue. Scenario 1 We have all recently witnessed the attacks on the public transport net- work in London. Suppose HPM had also been used in addition to explosives. That would have made wireless communication between the various emergency serv- ices practically impossible, which could have significantly increased the number of victims. In addition, HPM could have been used to disable the surveillance sys- tems. which would have made it con- siderably more difficult to track down the perpetrators. Scenario 2 Nowadays, electronic aids are used intensively everywhere in the world. The Internet is also part of this picture. Providers of commercial and financial services nat orally take advantage of this by offering all sorts of electronic services via the Internet. The pen capita density of computers with Inter- net connections is very high in most West European countries. In many of these countries, the Internet network is linked to the rest of the world via a central node using a large number of computers. If all these computers were affected by HPM such that they could no longer function properly, the impact would be enormous. Suppose that on the exact day when salary payments are transferred, the decimal point were to be shifted two About the authors Stefan H J.A. Vossen has been working in the Observation Systems business uni! of TIIO Defence, Seairify and Safely since 2002 [TflO is the Institute for technology and physics in the Netherlands). Beside his scientific activities in the field of the effects of electromagnetic fields an people and equipment, he is involved in fostering commercial applications of that knowledge. His subjects of interest Include EMC, intentional electromagnetic interference, health, screening materi- als and applications for such materials, foods, and medical applications. He is also actively involved In developing new technologies and applications (including numerical applications) for TIIO in order to deal with future problems. Bari JAM. van Leersum has been working In the Observation Systems business unit af TNO Defence, Security and Safely since 1 995. He is engaged In scientific activities in the field of the effects of electromagnetic fields on people and equipment, and he is responsible for knowledge acquisition in his role as research programme manager. His subjects of Interest include EMC, EMI intentional EMI, HPM, antenna technology, integrated topside design, and health-related aspects of EM radiation. His activities range from developing numerical spatial models to formulating and executing test methods. E-Vdck E. = '©SCVEr Le nse P;= "9 , 9 " £ ‘ 3 " * Qmpirt P - 3502=5 - \1 TIME 050261 - 73 Figure b> An explosion-driven flux compressor. The explosion eeuses the metal tube to expand, with the result that the cai] is shorted out and flux is compressed front oily. That causes an electromagnetic pulse to be radiated. 1 2/2Q 05 - eldctor ekdrenks 27 KNOW-HOW m WAVES Figure 5, An impulse radiating antenna developed by TNO, Netherlands. positions to the left by an intentionally generated glitch- That would cause a lot of confusion and turmoil Another example is cashpoints or elec- tronic payment transactions using the bankcard system. If the system stopped wirking during the pre- Christ- mas shopping season, people would be unable to make their purchases for the holidays. Beside major economic mayhem, that would cause a lot of emotional damage. Scenario 3 This example is probably one of the best-known examples. Suppose an 'E- bomb* (HPM in projectile form) released its energy in a region contain- ing many important electronic nodes. The way an E-bomb explodes is illus- trated in Figure 8 t where the EM wave is represented as white rings in the air. All electronic devices inside the white rings would be unusable. There is a lot of speculation in the media about such E-bombs. However, engineers and scientists axe increas- ingly questioning the feasibility of gen- HPM in all cases. In addition to the familiar metallic materials, synthetic and composite materials that can pro- vide outstanding protection are now available to help guard against HPM, Normally speaking, such systems are designed to comply with EMC stan- dards, The measures used can be recognised by features such as special cable feed-throughs r screening grilles, and contact springs in computer cabi- nets. As indicated in Table 1, the effects of HPM can resemble minor disturbances that occur normally in equipment and systems (see Figure 7). That makes it especially difficult to recognise inten- tional sabotage (in case of mili tary applications, for example). Worried? In tills article, we have shown why HPM can cause interference to equip- ment and systems. Protection is possible, but it requires an awareness of HPM. In addition, it is very difficult to find a single, general- Don't try lis at home! After reading this article, some of our more experimentally minded readers may be inclined to try a few experiments on their own with an old microwave oven. We emphati- cally advise against such experiments, because they can create potentially fatal situations! j \ Figure 7. A burned-out diode an a (hip (lap) and a J hung' computer (bottom): caused by an Internal fault or on external influence? erating such high levels of electromag- netic energy from a relatively small bomb. Protection Generating HPM is probably not par- ticularly difficult (consider the microwave oven, for example). Protect- ing against HPM is rather more diffi- cult, but it is possible. The most impor- tant factor is that persons responsible for equipment and systems must he aware of the phenomenon of high- power microwaves (HPM) and the potential consequences for them. A well-known protective measure is a 1 Faraday cage : . That is an excellent solution for an isolated system, but as soon as communication, ventilation or any other sort of interaction must take place via a hole in the cage, it cannot provide adequate protection against purpose defence against HPM, because one of the specific features of HPM is that the form of threat is not predictable due to the large variety of options. HPM will doubtless beusedona large scale in the future, because it is a highly promising non -lethal weapon for use in the military theatre and civil- ian crime prevention. Naturally people are also afraid that terrorists might employ HPM systems to wreak large-scale damage. Our pro- visional estimation is that such a sce- nario is unlikely because it would be difficult to claim responsibility for an HPM attack, in part due to the diffi- culty of detection and the unpre- dictability of the effects of HPM. Up to now, terrorists evidently prefer highly violent (and fatal) actions. r .-'. 28 Get the full picture with BitScope Mixed Signal Oscilloscopes Turn your PC into a powerful Digital Storage Oscilloscope! See inside your circuit with simultaneous analog, logic and spectrum displays to make tracking down those elusive real-time bugs much easier BitScope combines a high speed synchronized storage scope and logic analyzer with a programmable waveform generator and spectrum analyzer. With Smart POD connected active probes and multiple software options you :e got the perfect low cost high performance test and debug solution! Standard 1 M/20pF BMC Inputs 2Q0uV-20V div w.th xtO probe S/Y. select AC DC cojc: ng Switch able SGohm term ; nation Arbitrary Waveform Generator BitScope Smart POD probe connector 5 logic chancels, cross-triggering Dual cranr.a'; analog inputs As-, no serial I/O ior external control Supports active probes BitScope and your PC provide an array of Virtual Instruments USB 2*0 or Ethernet Connectivity Single cable to PC or switch Compressed data transmission Ethernet opr; on uses U DP/IP Internet addressable de\ ice Expandable a rad Programmable Simple ASCII Protocol BitScope Scripting Language Add active probes and devices Supplies up to 500mA vis POD BiiS cope's integrated design uses standard oscilloscope probes and a growing range of custom probes to provide functionality equal to instruments many limes the pnee. BftScope plugs into third party software tools and has an open API for user programming and custom data acquisition. BitScope DSO software for Windows and Linux 100MHz Digital Oscilloscope Dual Channel Digital Scope using industry standard 8NC probes or analog inputs on the POD. 40MS/S Logic Analyzer 8 logic, External Trigger and special purpose inputs to capture digital signals down to 25nS, Mixed Signal Oscilloscope True MSQ to capture analog waveforms time-aligned with logic using sophisticated cross-triggering on any input Real-Time Spectrum Analyzer See spectra and waveforms in res Mi me displayed simultaneously Waveform Generator Load up lo f 28K arbitrary waveform and replay via BNC B. Capture circuit response simultaneously on BMC A HANDS-ON PC-BASED INSTRUMENTATION Guido Korber Thanks to its ease of use / USB has become a widespread standard. Here we present a data acquisition module with eight chan- nels, using a clever USB chip and a 12-bit A/D converter. Example programs in Del- phi make it easy to use the converter in your own projects. USB is fosi, plug-and-play capable, and can supply enough power for many peripherals; these three reasons explain why this interface is displacing its predecessors in more and more applications. However, the path to using USB in your own applications is not always a smooth one. One possible approach For USB beginners is to use one of the 805 1 compatible microcontrollers From Cypress, as we described in 2002 in Elekfor Elec- tronics [I 2]. Other USB I/O and interface projects have used microcontrollers from Cypress, Microchip and IF [3, 4, 5}. In this project we employ a ready-programmed microcon- troller that handles all the management tasks. The SO Warrior' chips from Berlin-based Code Mercenaries are a particularly simple and cost-effective way to build a USB application and a good choice For prototypes, one- off projects or small quantity production [see [ext box). The devices, however, only offer digital inputs and out- puts, o limitation which we can nevertheless overcome by using their built-in t^C interface. Using this bus it is easy to connect all kinds of other devices, including A/D con- verters. In our circuit we use the MAX] 27, an 8-channel A/D converter with 1 2-bit resolution. The input range of the ADC can be switched between 0 V to 5 V, 0 V to 1 0 V, -5 V to -r 5 V and -1 0 V to +1 0 V. The Internal ref- erence voltage generator makes it easy to build o unit with reasonable accuracy; if this is not good enough, the pin-compatible MAXI 28 allows the use of an external voltage reference. There is little else to be said about the circuit itself (see the circuit diagram); we will concentrate more In this article on the software components used. 30 =!iklcr elffticriis - 12/2005 Reading and writing Lei us begin with the MAX] 27 chip Itself. Communicating with it is not complicated: the control sequence always begins by writing o fwobyte command which sets the channel to be converted and the input range. The result can then be read using a two-byte read command. The MAXI 27 and MAXI 20 have three address pins that allow up to eight of the devices to be connected to a single l-C bus. For this project we are using a single chip, and so we set all the address pins to 0. This means that the chip will respond to I 2 C address $50. The MAXI 27 command has the format IxxxrbppT The top bit is always set; 'xxx T is ine number of the input chan- nel to be converted, and V (or 'R NG\ For 'range'} sets the input range: 0 means up to 5 V, 1 means up to 1 0 V. Bipolar operation is selected by flag bit V (or BIP ): 0 stands for 0 V to 5 V or 0 V to 1 0 V, and 1 stands for -5 V to +5 V or - 1 0 V to + 1 0 V. Finally, the 'pp bits select the power mode, allowing the device to be pur into a standby mode to reduce its current consumption. In our case we set these bits to zero. In order to convert channel 0 with an input range of ±10 V, therefore, we need fo send command SBC to l 2 C address $50. In order to read out the conversion result, two bytes have to be read from device address $51 , The more signifi- cant byte is read first. Only the top 12 bits of the result ore valid: it must therefore be shifted down by Four places. The value can now be suitably scaled according to the settings of RNG and B1R. This is slightly more com- plex tn the bipolar modes, as the 12-bit result is returned in signed two's complement form. Delphi, however, works with 32-bit integers and we therefore have to per- form sign extension: if the highest of the 12 bits is set, the remaining 20 bits must also be set. The result is an inte- ger value in the range -2047 to -3-2047. The programming language Delphi, which we shall use to drive the converter In our applications, has already had o series devoted to it in Elekior Electronics [6]. Since not all readers will be crack Delphi hackers, we have written two example programs to help you use the devices in your own projects. If you do not already have a copy of Delphi, the Delphi 2005 PE version, which can be obtained cheaply or even for free, is recommended. Components, Components, Components The first Delphi example program shows how to install a new 'component [all source code is available at http:// www. eiektor-elecrronics.co.uk). Components ore a strength of Delphi: a huge number of these modules can be found on the Internet, for example at [7]. Most of these are available for free. In our case we need an HID ('human interface device ) component. HIDs form a suf> class of USB devices, including mice, keyboards, joy- sticks, and many other devices. The IO Warrior also appears as an HID class device. These components will work under Delphi 6 and Windows 98 (and under Delphi 4 and Delphi 5 with small changes to the project file) Installation is straightforward. Copy the files to a suitable place and double-click an HidCantroller.dpk. The Delphi IDE will appear with the project workspace far [he com- ponents. Click on 'Compile and Install' and the job is nearly done. The path to the component directory must now be entered into the Delphi IDE so that they can be found: this is done under 'Tools : Environment Options... : Library : Library path". You can now immediately use the components in your own Delphi projects. The example program is simple. A TRadioGroup is used to set the MAXI 27 mode, and resulting values are dis- played using multiple TLabel components. Arrays of com- ponents are not directly supported by Delphi, and so we put the TLabel components for displaying the results into our own array: procedure TFoirl . Fore, Create ( Sender : “Object); begin // put individual label components in an array / / so we tan Index into them Values: f 0 ] : = Label 1; Values {1] : = Label 2; Valuea[2] : - Label 3 ; VaIuea|3J Labe 14 ; Valuesj 4] Labels ; Values [5] := LabslG; Values [6] Label?; Values [7] : - Label3; ecd ; Plug and play Now we come to the TjvHidDeviceController compo- nent, which enables access to the 10 Warrior. This has an OnDeviceChange event which indicates when an HID class device is connected or disconnected. Helpfully, the component simulates the connection of all HIDs currently connected when the program is started. The hardest 12/2005- el rktoi ejetfro&Tcs 31 HANDS-ON Figure 1. The '10 Warrior' USB chip communicates wtlh ihe A/D converter over ihe \ 2 C bus. PC-BASED INSTRUMENTATION +5V aspect of managing HIDs is that they can be connected or disconnected at any time. A check must therefore first be made to see that the event was not triggered by the disconnection oFan IO Warrior already in use; if no IO Warrior is currently in use, then □ check is made to see if one is now present, as the event can also be triggered by an IO Warrior device being connected. The variable Enabled ', which controls the timer that gov- erns the A/D conversions, is initially set to false. It is only activated when an IO Warrior device is found. Note that since the A/D converter is written to via the IO Warrior device rather ihan directly, the PC data have to be assembled into suitable data packets for the tO War- rior, More Information on this can be found In the IO Warrior documentation at http://www.codemeres.com. procedure TFoml . Bidet inevicaCftange f Sender : TOb ject j ; var I: Integer; Report: TIICReport; Byte sWr It ten : DWORD j begin he s an 10 Warrior already in use been di=con- r.ecred? if Assigned! XOWIIC) and not TOTTue .IsFluggsctTn then begin / / switch off read timer Kicker . Enabled := False; // and deallocate PreeAndNlI f I0WIIC ) ; end ; // check for new 10 Warrior device If not Assigned ( I OWIIC ) then if H IdC 1 1 > Che c kOu t By Ca 1 i ba ck ( IOW I IC , § F ind 10 W Com- plex} then begin IO Warrior found: activate XIC FillChar ( Report , SizeOf ( Report ) , Q ) ; Repor t . Report! D $01; Rep or t . Bytes [ 0 ] : ~ SOI; XOWIIC .KriteFile ( Report , CiseOf f Report ■ , BytesWritfcen) ; / ■ enable read timer Kicker IE n abled := True; end else for X ; = Low(Yalues) to »igh( Values ) do // no ID Warrior found, indicate value unknown Values [ X J. Caption := end; Channel sequencing When an IO Warrior Is found its l 2 C function must be enabled by writing a suitable data block. The timer must also be activated to govern the reading of values from the MAXI 27, The timer function simply steps through all the channels of the MAXI 27, reading in each case two bytes over the I^C bus and suitably displaying the result [see listing in box). The timer Is used to read the MAX 127 every 200 ms. It is not possible to run foster ihan this,, as the design of the IO Warrior severely limits the speed of read transactions over the ! 2 C bus. It is therefore not really practical to build on eightchannel oscilloscope on the basis of this project! The assembly of the command byres for the MAXI 27 is explained in more detail in the listing (see box): Report , Bytes \ 2 ] : = 580 or t Paru-abars . It&niZndex shl Ij or ( I shl 4 } ; 32 riskier chdroiilrs ■ 1 2/2DOS BIt-twiddiing is inevitable when dealing with peripheral devices. The format of the byte is 1 xxxyzGQ. The fixed part of this is $80 (hexadecimal). The start bit must always be set, and the power-down bits must always be zero. The channel number, selected by I, is shifted to the left by four bits and inserted into the 'xxx' bits of the byte using an 'OR' operation, RNG ['y') and BIP ('z'j ore han- dled as a two-bit quantity. The RadioGraup allows only exactly one RadiaButton to be selected, giving its index starting from zero in Itemlndex. Since we have four but- tons, this gives the desired two-bit quantity. This is then shifted left two places and inserted info the byte. Care is required when reading data in bipolar mode as the I 2-hit results are signed two's complement values. Conveniently, this is also the case far the integer data type, although in this cose the values are 32 bits long. If the most significant of the twelve bits is set, the number represented is negative and sign extension is required, setting the higher 20 bits of the integer to one. The data value con then be scaled and converted to o string for display. Adapting the program far the MAXI 28 involves replac- ing 1 0.0 or 5.0 respectively by the reference voltage used, or by half of that value. Software toolbox The second example program, which uses the file iowkit.dll from the IO Warrior SDK (freely downloadable from http:// www. codemercs.com), is very similar to the first. To simplify matters the API ignores the possibility that an IO Warrior might be connected or disconnected. This moves the search for and initialisation of the IO Warrior device into FormCreate, and the read and write functions have a new syntax. The remainder of the code is identi- cal. This example is more suitable as a base for a transla- tion into Visual Basic 6 or Visual C++, since iowkit.dll can also be called from these programming languages, whereas the HID component is limited to use with Delphi, The important part of the example program is therefore now included in iowkit.pas. As with practically all DLLs iowkit.dll is written In C, and the API is in the form of a C header file rowkit.h. To drive the DLL iowkit.h must there- fore be converted into iowkit.pas. This jab needs to be done by hand, as the C header file can use all the fea- tures of the C language, including C constructions which do not have direct equivalents in Delphi. Space does not permit a full explanation here: the interested reader is referred to RudI Velthuis' website [8], In general a C header file consists of simple constants, structures and function prototypes. In Delphi a D1L is directly linked, and so the function declarations must also include the DLL linkage information: this job is done in C by a LIB file, but this has no counterpart in Delphi. The majority of the API normally consists of simple numerical constants: I define 10 WKI T_VE NDGR_I d 0 y. 07 cO which In Delphi becomes a simple constant: const IOftKlT_VElfTOR_ID = S07c0; Structures are somewhat more involved, and in the case of IO Warrior we also have to deal with a union: typed sf -cruet _XDWKIT_REPORT < □CHAR Report ID; union l DWORD Value; BYTE Bytes [ 4 ] ; }? } I OI-RI T_R£ PORT, T P XGWKI T_R£PQRT ; type PIOWKIT_RSPORT - ' IOWKITREPORT; I OrrK I T_RE +0 R ! — packed record Re p or 1. 1 D : Byte; case Boolean of Raise: (Value: DWORD; ) ; True; (Bytes: array of Byte;}; end ; IO Warrior 3 he JO Warrior is o Cypress CY7C63743 microcontroller, which offers o USB interface, [f is programmed with cods from Code Mercenaries Hard- and Software GmbH ( blip: //www. cede meres .com). The IO Warrior24 has 16 I/O pins which con be individually configured os either inputs or outputs as required. To do more sophisticated things than just toggle o couple of port pins, the IO Warrior offers 'Special Mode Functions', Using a simple commend one of these functions can be enabled on the chip, whereupon ihs 1G Warrior takes over direct control of the I/O pins to impfemem the desired function. IO Warrior24 supports the PC bus, the 5FI bus and driving an alphanumeric LCD module or a matrix or up to 8 by 32 LEDs. IO WarrIcr4G also supports matrices of up to 8 by 8 switches or pushbuttons. It is easy to jss these chips with your own software. Under Windows 98 or 2000 or later a library allows simple access from many programming languages. Examples are provided in C- *+, Visual Basic and Delphi with the SDK (available for free down- load from http://www.ccdemercs.com]. There h also support for Linux 2,6 kernels MacOS 9, MacOS X and Java under both Windows and Linux. Starter kits are available for both chips, which include oil the necessary components os well as a few extras for initial resting on a printed circuit board with a prototyping area. 12/2D05 - efzklsj detttonits 33 HANDS-ON PC-BASED INSTRUMENTATION MAXIM! 27 liC Voltage ■PI fxj input Range CHG: 4,96 V r 0 V .. +5 V 1 CHI: 0,00 V CH2: 0,00 V r -5 V . +5 V i CH3: 0,00 v cm o.oo V •> ov . -io M i CHS: 0,00 V r -10 V .-10 V CH6: 0,00 V CH7: 0,00 V From Delphi to C ond back Fortunately in mis cose, Delphi does have a counterpart in the variant record". The structure name [JOWKfT_REPOR7] is not present in the Delphi code: in the C version it is only used in the declaration of a pointer to the structure itself. Delphi can do without this auxiliary declaration, as the declaration of the pointer to the structure (PIOWKlTREPQRTi before the structure itself shows. Most of the fundamental data types used by Win- dows are already built in to Delphi, making this part of the translation trivial (see table). Figure 2. Our example program is written in Delphi, Types in C and Delphi The fundamental data types are easy to convert from one language into the other: C Delphi char Char wcharj WideChar unsigned char Byte shorl int Smallint int Integer unsigned int Cardinal float Single double Double The above example should make it clear h ow to declare a pointer type. Sometimes the C header file does not include the declaration of the painter type, but it will be required in Delphi if such a pointer is ever used as o parameter to a function. It therefore makes sense always to declare corresponding pointer types. In C the directive '#pragma pack (push, 1) is needed to set the alignment of the structure e ements. For packing into bytes Delphi uses a packed record" (see text box). Without this, the normal alignment is to eight-byte bound- aries, in the interests of compatibility with current C com- pilers without the need for extra commands. Functions and procedures are handled in two parts. The declaration Is placed in the interface part of the Delphi unit, while in the implementation parr the actual function is delegated to the DLL ULOIIG IOKKIT_API TowKitRead ( XOWKITHAHDLiE dev Handle, UIiONG n unPine , PCa&R buffer, ULOKG length ) ; function lo w£i t Read ( d e vHand le : TGWK 1 7 :l D L5 ; numPipe: ULQ^G; buffer: PChsr ; length: GLONG ) : UXONG ; s tdca 1 1 ; function lowKitRead; external * lowklt.dll' nsr.e d ±. ow K i fc5t& a c ' t The 'packed' and 'stdcall' keywords The keywords packed and stdcall make frequent appearances in the source cade. They are often required in Delphi pro- grams which use DLL or the Windows API, both of which are written in C. The keyword packed prevents the compiler from optimising the arrangement c\ data in memory for speed by separating their storage locations, for example, consider a 32-bit processor Data can be processed most quickly if each word is stored aligned to a 32-bit memory boundary. This leaves many memory locations unused if 6-bit (byte) or 16-bit quantities are stored. If the keyword packed appears, however, the compiler avoids this optimisation and gaps are no longer left between vari- ables. Many DLls expect data structures not optimised for speed, if a data structure is to be used by a program os welt as by a DLL, pocked’ is necessary to avoid any conflicts. The 'stdcall keyword is used in conjunction with function calls, and has to do with the so-called catting convention': Le. deter- mining how parameters are passed to a Function. Most functions in the Windows API use the stdcall J method (but not all- checking ihe documentation Is essential). In this cose the parameters are stored from right to left on the stock by the caller (the code which is using the function). When the Function or procedure is called, lE is the responsibility of the cal lee (the cade con- taining the called function) fa ensure that ihe stack is iidied up. Terrible things con happen if the caller and callse use different calling conventions. Frequently the stack will become corrupted and the program will jump to a random location ond crash Et will is an exceptionally tedious process. When using externa I ly-wriifen DLLs it Is therefore always necessary to determine which calling convention has been used and whether structures ore pocked or not. This wilt avoid a lot of headaches when it comes to debugging the cade. readily be appreciated that tracking down bugs of this kind 34 elakler electronics - 12/2005 Timer procedure , . extract value / 1 first pack the two bytes into a single procedure TFormi . Kicker Timer { Sender t TQbjeci); word var 'i : = ( Report .Bytes [ 1 } shl 8 ) or 1- liitecer: Resort . Bytes [ 2 ] ; Report: TlICReport ; // now shift right four places, because By te sSfrlt ten. By te s Re a d : EW QRD ; // the 12 data bits sit at the top of the IT: Integer; 16-bit field begin li 2 = M shr 4; // just to be on the safe side // convert value to volts if Assigned (IQKIICJ then // according to the settings of RITG and BIP r step through all MAXI 2 7 channels and display for I 0 to 7 do ■ / to two decimal places in the appropriate begirt label FillCharj Report , SizeOf [Report ) , 0); case Parameters . Itemlndex of // Report ID I3C write request 0: Report. Report ID := $02; / / unsigned value // 2 bytes with 1 2C sc art and stop / / scale to 0V to 5v Report .Bytes j 0 J 3C2; Values f I J . Caption ; = / ’LAX 127 address byre = ADR 0, write Fomat('i2f' ( [It * 5.0 / 4096.0]); Report .Bytes [ 1 ) : - $50; 1: // MAX 12” control byte begin // START, RNG and BTP corns trot, the Radi- // signed value c Group, / extend sign from 12 to 32 bits // 1 = channel number, normal power tnde If {N and $800) o 0 then Report . Bytes [ 2 ] j = $ 8 0 or 5= N or Integer ( SFEFFFQ 00 ) ; { Parameters . Itemlndear shl 2) or [2 shl ij; // scale to -57 to +5V IOW IIC . WriteFile (Report , SizeOf ( Report ) , Value s [ 1 1 . Caption : — BytesWri then ) ; Formats '%_2f' , fIT - 5.0 204G.Q]}; / / reap ACK report from 10 Warrior and dis- end; card 2: (read errors are usually hardware prob- // unsigned value lens ) // scale to OV to I0V IOWI IC . ResdF 1 I e{ Report, SizeOf ( Report ) r Values [ I ], Caption := BytesRead ) ; Format { '%.2fr, [IT - 10.0 / 4096,0]); ■5 * FiilChar j Report, SizeOf ( Report ) , 0); j i begin // ReportID I2C read request // signed value Report .Report ID : - $03; // extend sign from 12 to 32 bits // 2 bytes if {13 and $@00 J <> 0 then Report . Byte 5 [ 0 J : = $02; ii : = 11 or integer { SFFFFFOO 0 ) ; / 1LAXI27 address byte — ADR 0, read / / scale to -1DV to ^lOV Report . By tes [ 1 ] : = $51; Values [ I ] .Caption ;= IOW I 1C .WriteFiie( Report, SizeOf { Report j , Format f J ^.2f V, fN * 10.0 / 204B.0) ) ; BytesWritten ) ; end ; read reply from MAXI 2 7 over IZC end; I Oil lie . ReadF lie ( Report, SizeQf (Report) , end; BytesRead j ; end; It is easy to see From this haw Delphi handies linkage with the DLL (the text box explains the use of 'stdcall']. It is worth noting that the name of the Function need not necessarily agree with the name in the DLL, which allows identifier prefixes or suffixes to be made consistent. IF the function names have no! made available in the DLL, they con simply be exported from it using, for example, 'lowK- itRead@1 6'. The biggest problems in converting functions are pointer parameters. In contrast to C, Delphi uses 'call by refer- ence'; in C there are only pointers. In C, then, a pointer con indicate the first element of an array or a call-by-ref- erence parameter pointing to a variable. In Delphi, Tnt T a might be either a: PlniegeC, a pointer to the first ele- ment of an array, or 'var □: Integer', a simple variable passed by reference. Only by reference to the documen- tation can this be resolved. Note: PCBs and JO Warrior ICs for this project are available ihraugh Reeders Services, see SHOP pages or www.el&klor-eleclronitsx&.uk r - - — - — - — - -i I References and links ! | [1] USB Driver Programming (1 j I Elektor Electronics, October 2002, p. 40. I I [2] 'USB Driver Programming (2)\ ■ ] Elektor Electronics, November 2002, p. 30. ( - [3] 'USB Interface', J I Elektor Electronics, September 2000, p. 44. ■ [4] 'USB Analogue Converter',, Elektor Electronics, November 2003, p. 12. 1 [5] 'USS/t^C Interface', l Elekior Electronics,. December 2004, p, 52. I [6] Delphi For Electronic Engineers', I Elektor Electronics, from January 2005. I 1 E [7] http://ivcl.sf.net | [8] www: velthms.homepoge.Njnline.de/ articles/ | orticlesconverlhtml i 12/2005 'dele Em e Fed ranks 35 HANDS-ON TELECOMMS If you hove a fit looking at your monthly phone bill you might want to know who's on the phone all the time. Also, you may want to start exercising control over which extension in your home is disabled or enabled. The Telephone Supervisor is suitable for up to three phone extensions and comes with smart Windows software that puts you (back) in control of things. One of its most salient features is the ability to log phone calls on the PC. 36 efsJtlW elrClfOffiES - 12/2005 Telephone Supervisor main features Up to three telephone sets RJ1 ] snap-in connectors Enahfe/disabie any Individual phone Choice of various busy tones Eavesdropping blocked Windows control software Coll log on PC Programmable off-hook delay Phone activity monitor Status retention in PIC EEPROM Telephone use and misuse is a common source of irritation, confusion and misunderstand- ing in many house- holds where phones are installed in (children's) bedrooms and studies. To find that the phone is busy when you need to make an urgent call is frustrating to say the least. Another disadvantage of having a couple of phones sim- ply connected up in parallel in the home is that everyone can eaves- .. conversation simply by picking up the receiver (or not put- ting it down after taking the call and the usual hollering up or down the stairs). High time for some regulator/ action hacked by clever electronics and software. The landline To understand how the Telephone Supervisor works, you need to under- stand some telephone line basics. What follows is a very simplified expla- nation of the workings of a reasonably modern, dead standard Exchange, The telephone line is an interesting yet hostile environment To prevent situa- tions that would interfere with the functioning of the telephone network, it is imperative to use correct interfac- ing techniques. Also, in most countries (including the UK) it is not allowed to connect equipment that's not type approved to the public switched tele- phone network (PSTN), In a POTS (plain old telephone system) the telephone line carries both DC and AC signals (audio) simultaneously The DC is used to power the circuitry within the telephone during a conver- sation, and is derived from a large bat- tery, of a nominal 48 V, located at the Telephone Exchange. The landline between the Telephone Exchange and the home may be sev- eral kilometres long, and has a resist- ance proportional to the length of the line. The further you are away from the Exchange l the more line resistance. The telephone line is made from a pair of copper wires us u ally about 0,5 mm in diameter. The resistance of the line varies from 90 ohms to 180 ohms per kilometre. When the handset is lifted, the tele- phone signals the Exchange by com- pleting the line circuit. Effectively a switch known as the hook-switch is closed. The circuit between the Exchange and the phone is known as a loop. The expressions off ‘hook and on-hook are used. During the off-hook condition, the current flowing in this loop is known as the loop or line cur- rent. This current will be in the order of several tens of milliaraps. About 20 mA may be assumed to be a typical value. Only a very small leakage current is permitted to flow in the loop when on- hook (i.e., off line). For a nominal 50 V Hire voltage, the maximum leakage can be assumed to be 50 uA. ■ A detection circuit at the Exchange recognizes that a telephone receiver has gone off-hook when a few mA of line current are drawn from the line, and is effectively signalling the Exchange that it requires attention. The Exchange presents a dial tone to the line, and allocates a dial detection circuit, in readiness for the user to start dialing the number. When this number has been received and decoded by the exchange, it can then start to switch in the correct voice circuits to enable the call to be set up. The above, analogue, system has been in nse for a lm ost three quarters of a century in most countries and although reliable and still in use on millions of phones around the world, it suffers horn user-end disadvantages mentioned above. To solve the prob- lems without investing in a home exchange, the Telephone Supervisor was designed. Telephone Supervisor The circuit diagram of the Telephone Supervisor is given in Figure 1, The circuit is designed around a 220 Q series resistor and an optocoupler. If the phone extension plugged into the Telephone Supervisor is lifted off-hook then the line current it draws will cause a voltage drop across the rele- vant 220 Q resistor (El, R5 or R9). This voltage causes the LED in IC3. 1G4 or IC5 (i.e. ; in the optoisolator) to light and rum on the associated photo tran- sistor. which in turn switches the tran- sistor that controls one of two inputs RA3 and RA4 on the microcontroller (a PIC 16F628A). The anti-parallel pairs of diodes D1-D2 and D3-D4 etc, pre- vent the voltage across the 220 Q resistor from exceeding about 1.2 V, regardless of the line current. As men- tioned in the telephone line basics, sit- uations that would interfere with the telephone network functioning should be avoided. Type IL250 optocouplers isolate the rest of the Telephone Supervisor circuit from the telephone line, thus ensuring that a minimum number of components are effectively connected to the line. Note: In most European countries, it is mandatory that when a device draws 20 mA from the line, that voltage across the device is less than 9 V. RS232 Port The RS232 porr that’s part of our circuit can be set up for two-way (mil-duplex) communications. The RS232 signals are represented by voltage levels with respect to a system common (power ground). On most computers, the RS232 port equals a COM port (for con- necting mouse, modem and/or serial printer). Today RS232 is rapidly super- 12/2005 - diki&r dedrenks 37 HANDS-ON TELECOMMS seded by the USB port. The data tr ansmis sion starts with a start' bit, which is logic 0. Then each bit is sent down the line, one at a time. The LSB (Least Significant Bit) is sent first. A ‘stop' bit (logic i) is then appended to the signal to make up the transmission. RS232 logic levels are allowed to vary between +3 V and H™ 25 V to signify a space’ (logic 0) and -3 V to -25 V for a ‘mark’ (logic 1). Any voltage in between these regions (i.e T1 between -r 3 and -3 volts) is undefined. The BS 23 2-level signals are taken through 1 — i 2 H — -v 3 £ *”h 1 5 RJ41 Q5CD5S - 1 1 Three telephone sets supervised by a PIC microcontroller. The jumpers allow for regional differences belweEJi line pm assignment on the Phone and Exchange sockets. 38 drklDf ektlnmG - 12/2005 an RS232 level converter chip type MAX232 converter them to machine understandable signal levels, i.s. f hav- ing TTL swing (0 V / 5 V), The RS232 data waveform consists of combination of a start bit, data bit, and stop bit. The MAX232 is an old faithful that hardly requires further discussion. The chip includes a charge pump generat- ing - 5 - 10V and -10 V from a 5 V power supply. It also includes two receivers and two transmitters in the same package. PC-PIC communications As an example, when the PC checks the Telephone Supervisor hardware it employs the command #Cal!IDCH T (Call Identification Check Hardware). The Telephone Supervisor receives the string in a binary format and the PIC- resident firmware converts it to a dec- imal value between 0 and 255. This value determines the subroutine to be jumped to. in this example the soft- ware will access ihe E EPROM memory (0x28), The string NH# and the value mentioned are converted to a decimal value which is then returned to the PC bit by bit. The PC receives a binary value and converts it to an ASCII string, which in the case of the terminal will be dis- played as 'received 1 . The same princi- ple applies to ail the subroutines. The o nl y diff e rence is that when you change a setting, for example, disable phone #1, the software will disable the phone, update the register and only then send confirmation to the PC. Of the control lines on the RS232 inter- face, DSR is used to monitor the Tele- phone Supervisor determining on-or-off line status and handshake, while DTR is used for handshaking purposes. The baud rate on the PC connected to the Telephone Supervisor has to be set to 86 kbps. What's that PIC doing? The PIC in the circuit is in control of the phone enabling/disabling func- tions, line use detection, line busy' processing and the communications with the PC. The firmware needed to do ali this is available in the form of a source code listing or an executable (object code) file. An extract of the source code listing is shown in Fig- ure 2. For all you home PIC burners these files may be downloaded nee of charge from our website as file num- ber 050039-11. zip. In case you can use the hex object code file straight away, do note the PIC configuration bits shown in the Inset. Those without access to a suitable PIC programmer may buy the ready-programmed PIC micro through our Readers Services under ref. no. 050039- 4 L Six of the PIC16F628A outputs (RB0-RB5) are used to drive three bistable relays via transistors T5- T10. There are two coils in the relays and PIC source code (extract) ; Main Menu Main DSl PORTA r 2 call DQ.Gls ; Delay for G f 0i sec bef PORTA , 2 movlv D'Q' ; Clear From lEOVWf SelMenu ; Move w to SelMenu contmO incf sz SelMenu r f ■ Increments specified regie- ter jnovf SeiMeim,^ ; Data into w contmOA btfsc PORTA, 0 ; Monitor RAO for input goto contmi btfsc PORTA, 1 ? Monitor RAl for input goto contm3 goto contmOA contml contm2 btrss PORTA, 0 ; Monitor RAO for input goto contmO btfsc PORTA, 1 ; Monitor RAl for input goto contm3 goto con tm2 contm3 cuts s PORTA, I ; Monitor RAl for input goto contm4 goto con m3 contmi incf st SelMenu ; Increments specified regis- ter movf SelMenu, w ; Data into w :ncfsz SelMenu, f ; Increments specified regis- ter movf SelMenu ,v ; Data into v f ; To create mere menu 1 tens , copy the next four lines and paste then ; directly under the la st menu Item. You need to make a rev; changes. . ™ Z t r -Li zi l, change the TLBnu number [Q r 2 r ] . This number should not be ; smaller than 2 and should not exceed 255. This address should run ; concurrently h with the address from your user Interface on your PC. I ; Read file from EE PROM ; Do not change this menu item; ; it is a fixed value on the OCX . By changing ; this the Q€X will not funct ion correctly* f tnovf SelMenu , w ; Selected menu item ; data into w sublw D* 5' ; Subtract w( SelMenu) ; form literal ( D ' ? 1 } btf sc STATUS , 2 ; Test result coto PRO ; If w( SelMenu) “ ; liters 1( D' ? 1 ) ; then goto menu item ; Result ; [Read file from EEPROM j Extract of the PIC source cads listing. 1 2/2005 - delete* ekdfoofc 39 HANDS-ON TELECOMMS » LCMfira Server - : n\ [ft- 1, i . i p „ B | m 5- ■)f LCM lamina! F.:-t r _ 5 ; - . :re-j ►’■ovss . _' J A ^ ^ *1 : : =" '■- ttCaitDOv ttCyiDBT* SrCaJIDFS* BCaMDLS* sC*JfDFU' ttO±5!DQ*V HsfdivseL!. Tone? nSJQOSfeHtMtMi UfchAtc) Enafcfed Phone 1 * = Rrone LCM En£ted=T~^ 0 if H c«]fc D y = SGbrs 0 n H sc£ & ei^tj = 5&; “^:rjei?l_Ojf HcX Ltj 5 Rtfeased FhcoE«3_OftHtJck Lr-aRefcaied Phone S 2 _Dff Hsscfc Lrt Prfz'f: Monitor Phone Activity 1 J iT.rii" Fr-jir.z Air, fy ■■ -! l! MHooL On Hook Off Hco>: PnHsek 4T* | tine I Date I Callice RwksI rhCrtftS 1&3&58 11 Otiito JJiB OiioooiC^ :e : 1535 03 15:36:10 n Odrte2D05 11 Ddd3s2D05 11 tkislsf 20 K Lre Refearsd QUgonjCal Lne R e-ea: m LCM Settings * Resis id£ct the dewed d^a;. Busy Tones OpVm i h=: epebn sdi: a s vcu to corf: a? *be ftps c ^ fctfiyLone G BicsyTonel 1 10,000 kHs, Mono SG^LVes ® Bury To* 2 ( ISJOUlH^Moiq 1Qfeb/t« O Busy T one 3 [ 25,000 kHz, Mono 1 CTJti/jtc 7 O Busy Tore A | 15 jnUi 1 z,MTO * 2 . 3 ) O Off Hoc* Delay 0 n:ec © Off Hoofe Delay 5 Q rassc O Off Kook Delay 200 ease O Off Hoqfc Delay 330 nsec O OlfHockDaferyKeo Caned Bay T c« Enable \ Disable Phones Enafefe \ 0 it&fe Phonei Phonal W 1 ref? Coraecied PortAdAesr BT 3611 ^ jL LmSia&scAcfcre Phone 2 rerr DiKsawficied _I? 1 £ " a .” l ■.- Phone3 Fart Corsets Bf 3i2- LCM Siifos Actr.'e j CX j j C=rca j i The LCM First Server software in qcHqei on the PC the devices latch, in both directions. Only a short pulse is needed to switch the relay on, using the one coiL A short pulse on the other coil will switch the relay oh. This means that ail phones that are disabled/ enabled will maintain their status even with power failure. PIC port line RB6 is used in conjunc- tion with transistor T4 to generate one of four busy tones. The functions of the other port lines may be summarized as follows: RB7: transmit data RAO: receive data RA1: DTR (Data Te rmin al Ready) RA2: DSR (Data Send Ready) RA3 & RA4: monitor the inputs from transistors Tl, T2 and T3; these are switched by opto couplers IC3, IC4 and ICb as explained above. To prevent exceeding the ring equiva- lent number allowed for your tele- phone line, it is advisable to connect two phones and a modem to the Tele- phone Supervisor. If you want to con- nect three phones, you will have to physically disconnect one of the phones ringers. The software to use on the PC is called LCM First Server v. 1*1 where LCM stands for Line Current Monitor „ the original, techy', title of tills project. The PC software comes on a CD-ROM with order code 050039-81, which is avail- able through Readers Sendees The operation of the program is explained in great detail in the associated Soft- ware Guide, a professionally styled and copiously illustrated 7-page MS Word document that’s available for free downloading as file number 050039-12. A compilation screenshot showing the Telephone Sup ends or software in action in various windows and sub- menus appears in Figure 3. The Telephone Supervisor board must be connected to the PC using a non- crossed RS232 cable. The project is not at all diffi cult to build if you use the carefully designed printed circuit board shown in Fig- ure 4 and the information in the parts list. Only conventional leaded parts are used, no SI, ID parts to struggle with or lose to mum’s vacuum cleaner. The board is single sided and contains two wire links which must be fitted first on penalty of creating hard to find hardware errors, emails to the editor and unnecessary postings in our on- line Forum. As you can see from the copper track layout, the "microcon- troller area' of the board has additional PC Software: LCM First Server Building it 40 eJ=tlor deifiDiuo - 12/2005 Copper trod layout and component mounting pta/i of the single-sided FCB designed for the Telephone Supervisor. There ere [us! Iwo wire links to fit on the board! copper pour to keep stray signals and interference to a minimum . Provided you apply no more than about 12 V DC to the supply input (on two solder pins), the TG220-style 7809 volt- age regulator, IC7, will not run partic- ularly hot so it may he mounted with- out a heatsink. Mounting an M3 nut between its metal tab and the board surface makes for neat, secure and exactly horizontal fitting of this TO 2 20 device, with its three terminals bent at [components I LIST , Resistors: R1.R3.R5 R7,K9,R1 1 = 2200 ! R2,R6,R10 = Ik LI R4.R8R1 2,R1 3 = 47kO R14 = 3300 R1 5-R22 = lOkO 1 R23 R24 R25 = 22kO I R26 = 1 kOB | Capacitors: 1 Cl ,C1 1 = lOOnF (Cl 5mm lead pilch) j C2,C5 = 220|jF 16V radial C3 - 22nF, lead pilch 5mm C4,C7-C10 = 4pF7 63V radial G6 = 220pF 25V radial Semiconductors: D1-D22 = IN4148 D23 = LED, low current D24 = I N4007 Tl -13 = 8C212B T4 = BC549C or BC55QC T5T10 = 8C237B i C 1 = PIC 16F 628-20/P;. programmed, order code 050039-4 1 * 1C 2 = AAAX232 IC3 f IC4 r lC5 - IL250 (HI IAA4) IC6 = 7 8 LOS 1C 7 - 7809 Miscellaneous: jpj -jPl 6 - 2-way pinheader and 8 jumpers K 1 -K4 = RJ I I PCS mount socket K5 = 9-way sub-D socket (female), angled pins, FCB mount XI - not filled, see text RE1 r RE2,RE3 = 1 2V PCB relay, bistable, two energising solenoids 2 x 4000, two changeover contacts, e,g T , DS2E- ML2-I2VJ Panasonic (Schurlcht # 407220; v/ww-schurichhde) 2 wire links CD-ROM, LCM First Server 1,1, order code 050039-8 1 * PIC source & hex code files, file 050039-1 1 “ Free Download PCB, ref. 0500394 from The PCBShop Inductors: 11 = 47pH ~ See Eiektor SHOP pages or www. elektor-eEectronEcs-co.uk 1 2/ 2005 - dsfclor elytra nits 41 TELECOMMS an angle of 90 degrees. All electrolytic caps on the board are radial types hence have to be fitted vertically Care should be taken to get these devices correctly polarised on the board, so make sure you know where the positive and negative leads (1) are and (2) have to go on the board , The same goes for the diodes, in respect of their cathode and anode ter- minals, Sure, the ICs are also polarised components so don't insert them the wrong way around. Position XI on the board remains empty. Initially this was for a 4 -MHz ceramic resonator device. An adapta- tion of the PIC software however allowed for the PIC s internal 4 MHz clack to be used. All four RJI 1 phone sockets are fitted in a neat row at the board edge. Inci- dent a Uy we recommend using sockets for all integrated circuits including the opt occupiers. Jumper clusters JP1-JF4, JP5- JP8 and JP9-JP12 have to be set in accordance with the pin /signal assignment of the RJI I connectors to the phones. Unfor- tunately the assignment of the phone line signals (here, called 'a 1 and b')to pins on the socket differs from country to country hence may take some figur- ing out. The same goes for the 'Exchange 1 socket, K4. As a matter of course, only one jumper may be fitted for the J a r line, and one for the Jr line, so JP1 and JP2, for example, are mutu- ally exclusive. For the sake of conven- ience the pin numbers of the RJ11 sockets are printed on the PCS overlay. Our prototype worked with four junipers installed in position *3' and the other four in position r 4 T (line IT on RJ11 pin 3: line a; on pin 4). The finished board should be given a thorough visual inspection before pow- ering it up for the first time. We recom- mend using the LCM Terminal utility from the LCM First Server software to check if the hardware and PC connec- tion are functional. When this is suc- cessful, the PC software can be used to download the default configuration into the PIC on the board. This func- tionality is explained and illustrated in the Software Guide , vow: • Note; this circuit is not type approved to BABT standards and in the UK may nof be connected to the public switched telephone network (PSTN), Anlhonie Botha - LCM05O039Sho1rnajLEam Figui e Finished board ready for mounting Into an AS- 5 enclosure. r — — — — “ — — -P-, — — — — — — — — — ^ 1 PIC configuration bits I Processor: PIC 16F62 8-20/P Pile: 050039-4 1 .hex BIT 0 1 2 3 4 5 6 7 a 9 10 n 12 13 Options i Y G5CQ: F CSC 1 : vTDTE PWRTE/ F QSC2 MCLRE BOREN LVP CPD/ CP/: 1 INTRC OSCILLATOR 0 INTRC OSCILLATOR 0 WATCHDOG DISABLED 0 POV7ERUF TIMER ENABLED 1 INTRC OSCILLATOR 1 RA5 is MCLR 1 BROWNOUT ENABLED 1 LOW VOLTAGE PROGRAM ENABLED 1 DATA MEMORY PROTECTION OFF 1 CODE MEMORY PROTECTION OFF ease of reprogramming EEprom memory must be cleared! 42 eWtlor eletfromcs- 12/2005 New B 2 Spice Version 5 has all the power and functions you expect from a professional Spice package, but without the high cost: ° Real design flexibility with over 30,000 models, unlimited circuit size and a huge range of new virtual instruments • New Circuit Wizard saves time by auto-generating many designs for you • Sweep all parameters for any component and simulation type with the powerful new Scenario Editor • Live Circuit feature allows values to be adjusted while simulations are running, displaying the results in real time Professional standard Spice simulation for just £229 + VAT. Plus educational and multi-user licence discounts available and FREE comprehensive telephone technical support. Try the full version completely free for 30 days. www.spice-software.com Tel: 01603 872331 Research House, Norwich Road, Eastgate Norwich. NR10 4HA. Fax: 01603 379010 Email info@bokmg.co.uk CHRISTMAS GIFTS INFOTAINMENT! With Christmas almost upon us it's that time of the year again to find or make original presents for friends and relatives. For your inspiration we found twenty or so gifts that are sure to delight any electronics enthusiast, including you, as the recipient, of course! For subtle guidance of your friends in their choice of Christmas presents (for you), pass this issue of Eiektor around. Kandy 3-in-l lob aid For anyone with too Llf tie space in the flame lob or workshop; Velfeman's LABI may present a solution. LABI pads an adjustable powers supply, a multimeter and □ temperature-controlled soldering station in a single enclosure. The manufacturer's design is well thought out as two separata transformers are available for the power supply and the solder Iron, while the multimeter is bat- tery powered for proper electrical isolation. Seen d: vyww.ve3lemon.be Programmable LED Badge Electronic Experimenter's Box They're bad! Experimenter's boxes for 'fast and fun' construction of cir- cuits without soldering. A great gift for the budding electronics fon. Several box sties are available. The box shown here is suitable for a whopping 130 experiments. Similar boxes are available from toy shops and electronics retailers. Seen at: www.vellemc-n.be Thes programmable LED bodge con act not only as a name bodge but also os on eye-catcher in discos and pubs. Up fa 50 characters stored in memory ore displayed on a 21x7 LID display. The unit is powered by a Lithium button cell Seen at: wwm roc kin gslane.nl The E-blocks modular construction system allows beginners as well os experienced engineers to design and build microcontroller circuits foster than ever before. The core of ihe system is a USB Mullrprogrommer, o board that's sulloble far a wide range of microcanlrallErs and ready for connection to all kinds of extension and application boords. Programming is modular, loo, using programs and reody-to-use chunks of software. Seen atr www.eleklor-eleftromts.to.ufc Instant Loudspeakers Using these SoundPad slicks you can transform almost any surface into s loudspeaker; a door, a tabletop or just □ Ihick piece of plywood. Of course, fhe sound quolily is strongly dependent an malarial and shape, but SoundPad slicks are great fun to experiment with. SoundPads con- tain a loudspeaker voice coll with terminals that con be secured to o surface using self-adhesive fall. Seen ah www.fhinkgeeLcom Solder starter kit A alee starter kit far eh Ironies hobbyists, containing a 25-wall solder Iron, solder I in, a solder stand, pliers and two mini kits, one tor flashing LEDs end one for a LED sound to light unit. Start soldering straight away and learn the tricks. Seen oh www.velfeman.be 44 e! elder electronics ■ I7/2G05 gadgets, gh ic CO] DU CilI W ©] Dll DO @] ClI @3 W (B § LEDs for Maglite flashlight USA firm T&rralux specialties In r □plorement lamps far ihe world famous ullra-Fugged Muglile flashlights. However, Terrain actually supplies while LEDs, with full mechanical and eledrical compatibility wllh Magfite's original lamps. The LEDs are mounted on a mini hoard that also holds the drive electronics. Versions are available for several Maglite flashlights and lights strengths Seen ah www.lerTdaxtarp.com Polarity Checker Using PoleChecker from audio guru Van Den Hu! you not only detect the presence of direct and alter- nating voltages in a safe way, you con also conned all equip- ment in your audio system for the best possible sound repro- duction. The tester is battery- less and even has an LCD screen providing an indication of the value of the voltage measured. Seen at: wwvr.vondefifntl.com Voice Synthesizer The SPD3 board is a small PCfl with a complete voice synthesiser an It, using the WTS701EM/T fro m Winbond as I he tore device. By way of on RS232 interface you send ASCII text lo the board. The text is reproduced by a voice from a small built-in loudspeaker. The board measures fust 4x4 cm, runs off a 5-V supply and is easily added to on existing microcontroller board. Seen oh www.rockmgstone.nf Cold Fusion Excellent for small repair jobs in awkward places, this cordless salder Iron from Conrad Electronics. The device Is powered by four penlight batteries. The crux Is in the two-part lip: it's made of a conductive material called Athclite. The tip remains cold until you place II onto a conductive surface, for example, a solder spol on a PCB. A hefty current then starts to flow, rapidly heating the solder spot. Seen at: www.tonrad.nl Shocking Roulette If you are bored with charades or monopoly and want lo play a different game under the Christmas tree this year you might consider Shocking Roulette. We're talking about the Russian variant involving the gun with just one bullet. The device has four hales far each of the contestants to Insert a finger in. After pressing a button, ihe LEDs wllh Ihe contest- ants start to flash and after a while one LED remains on. The lucky winner 7 gets an electric jolt! Anyone for tennis? Seen at: www.thsgadgettampany.nl Who remembers PowerBalf, a boll with an Internal flywheel intended as a fitness train er far hood and wrist muscles? Some users actually became addicted to PowerBall. How, we found a successor: Manual Power. This too, is a gyroscope you have lo keep spinning. The new model has a built In generator allowing you, while [uggllng Ihe device, lo generate electrical energy for ihe internal flashlight, or to charge your mobile phone holler y. Seen at: www.gndgatione.nl Manual Power for Mobile Phone Light-emitting Sticks Okoy, these Tritium Teasers have nothing to do wllh electronics per se, but they may turn aut to be useful 'must-haves 7 In some occasions. The remarkable thing about these sticks is that they emit light over a period of 10 [I hot's right, ten) years without a battery] These are opaque tubes with a fluorescent foyer inside, tilled with boron-silicate and then thermally sealed using a loser. Available in dif- ferent colours, they look great on your key ring. Seen at: www.smarl-elemenls.com 1 2/2005 -tkktor electronics 45 CHRISTMAS GIFTS Vinf iye Roceiver for Mobiles (Very) long-time Elekior readers may remember a circuit published eh the 1970s that made a meld globe (of ihe pencil sharpener type) 'float' inside a magnetic field. Such a gadget is row available commercially ond Ihe llaallng globe still causes 'awe and wonder' among ihe uninitiated. The model we saw has on Impressive diameter of about 18 cm, which Is sure la impress your Christmas party guests. www. gadget uni ver s e.ca m — Floating Globe hot terribly practical, but still a good gimmick; a vintage telephone receiver you tan connect to a mobile phone. A for cry from ihe Idlest flluetoolh headset yaur friends are Hashing! Just imagine the amazement af passers-by at the bus sta- tion seeing you talk into this vintage receiver. The receiver is a virtual copy of the Western Electric model 500 telephone set and may be connected io Ihe 2.5* mm jack socket available an most modern mobiles. Seen at vwwJhinkgeek.com The Philips DA 3 000 is a porlable DAB receiver weighing in at less than 100 grams. It has a backlight for a brightly Illuminated dis- play and a joystick to control it oil DAB (digital audio broadcasting) Is the digital alternative to analogue VHF FM broadcasts. The system has proved to supply excellent sound quality, DAB was railed out a few years ago in ihe UK and now has nationwide coverage. Seen at: www, mop lin.co.uk - The digital radio system coifed 0PM (for Digital Radio Mondiale) rocketed into popularity among our readers mainly through the Elektor D1Y DRM receiver published In March 2004. it does, however, require a PC to work. One of the first commercial all- portable DRM receivers is now offered by Mayah Communications. The radio contains a DSP module far the decoding of DRM signals and doubles as an ana- logue receiver. Af o price, however, of about 350 pounds! Seen at: vA7w.moynh.com Check your own Car All modern cars have on QBD-2 connector supplying oil kinds of data when suitably 'provoked'. The system also allows certain vehicle data to be changed (within limits} which Is interesting if you dabble In tar repair. Elektar's very own OBD-2 Analyser tomes as a kit af ports. You conned It between a PC or laptop and the OBD-2 socket in your car. Next, you're allowed o glimpse at Ihe car's internal electronics! Seen at: www.eleklDr-eie(fronics.co,ijk MlndReader The 20G MlndReader is a clever toy that reads your mind after you hove answered 20 questions. You may think that's not possi- ble, but thanks to a smart algorithm this gadget is capable — In most cases — of guessing what (object) you are thinking of. That is.., well any- way, try it and mar- vel at fhe results! Seen at: www.gadgethouse.nl Mini DAB Receiver Portable DRM Receiver Bright Feet Slippers This may well be ihe ultimate gift for the really spoiled electronics enthusiast: feet slippers with built-in lighting. Never get lost agoln in the dark or stumble around waking up everybody on your way at night to fhe fridge or work- shop., Available in several sizes, this navel footwear is pretty ingenious, A pressure sensor detects when you put on the slippers, while a timer provides o courtesy fight when you take them off again. The slippers are powered by two Lithium batteries you can easily replace. Seen al: www.b rig htfeefsElppejs.com 46 ei-ksar efrdco.nics - 12-2005 LED Replacement Lamps The traditional lamps in our homes are gradually phased out and replaced by oilier light sources. Especially vrhite lEDs are on the rise. Conrad supplies nifty replacement lamps far the well-known halogen spollighls al home, in 230' V and low-voltage versions. They have the same shape as halogen lamps and contain an array of IS white LEDs. Also available in several colours. VW Microbus plays LP records Certainly one of Ihe holiest hems in this overview, ihls miniature Volkswagen bus lhaf plays your vinyl records* Put the bus on the LP and it will drive around playing ihe record through its built-in loudspeaker* The vehicle is powered by a 9-V battery. A warning, though! The sup- plier tails Ihe product: 'Vinyl killer record playing VW van 1 , so we have aur doubts about what's left of the pre- cious record when the bus is at the end of its groovy journey* Seen at: www.fitfr.com High-end a! 30 dollars At first blush Ihe Sank 7- amp does not appear much mare than a plastic case with a Tripalh switching amplifier module inside* Judging from reviews however [www.tnt-audio.com/ampli/t-amp_e.htmlJ ihe small amplifier excels in sound reproduction, and has been compared to amplifiers casting upwards of 1 kdollar. The thing runs off □ baltery pack — a meins adapter is available as an option. Seen at; www. 5 Hechnologies.tom Universal USB/HID Cable Connecting a hard disk externally to a computer con be very handy, for example, when you need a one-lime backup device. Sure, external hard disks wilh USB or FireWire connec- tivity are nothing new (nor are sleek cases for them], but why not use ihal old hard disk gathering dust? The advantage of lh!s U5B2.0-tO'!DE table is that ihe IDE side has Ivro connectors, so 2.5-inch as well as 3. 5-inch hnrd drives may be hooked up. Seen at: www.usbgeek.tom Seen at: www.conrad.nJ Weather Station with PC Link Wealher stalions for use in the living ream tome in many shapes and sizes, from small to large and from dir I cheap to astronomically priced. The crux of this one is the complete outfit (if comes with three outdoor sensors) and the R5232 iinklo ihe compuler. Using ihe supplied software you can view ihe weather changes on your PC screen. A version with a touch screen is also avail- able. Seen al: www.weershop.be Alternative gifts Every year the same gifts: a calen- dar, a pen {wilh inscription]) or a battle of wine. Nothing wrong wilh these, of course, hut for from origi- nal* If, afler browsing these pages, you still haven't found anything to your liking and also lack the inspira- tion for other ideas, try something com- pletely different* What about a nice wood- en salad howl with matching cutlery, possibly comple- mented by on oil-nnd-vmegar dressing set? Not just practical, but healthy, too] A nice set of candle holders is sure to create the right ambient lighting during the festive season* if you think that's real corny, why not surprise your friends or beloved ones with tickets for a rock concert, a karting event, a balloon trip or an anti-skid course? Success guaranteed, hut a tad mare expensive than your ordinary Christmas presents. 12/2005- clckler electronics 47 HANDS-ON 'Qksy lei's gel re ady for Christmas. To get myself info the right mood [and brighter things up a bit during these dark days), 1 decided to hang up Christmas lights in my room. But as anyone who bows me can tell you, I tinker with just about any sort of electronics i get my hands on. I found these Christmas fights at a clothes outlet. SO lamps in five colours for the stupendous price of one pound. So E took six strings right away. Here you can see what's inside the box: 50 Christmas lamps, including two spires. It's amazing, Mike!" Hey, they really work! You can see the five colours clearly here. The problem with this sort of colourful lights is... well, that they're just too colourful. It seems too Ameri- can to me, too gaudy* That's certainly not what we want. But don't worry, thats easy to fix. ' " «§i The dark days of winter are on their way again, so it's time for some cheerful lighting for the Festive Season. The author picked up six Christmas light strings for a song and reworked them a bit. The result can be used for many sorts of occasions other than Christmas, so it can improve the ambience in your room for the rest of the year as well. The Elektor Electronics staff really enjoyed this idea and the implementa- tion. Jeroen managed to create atnac- tive mood lighting using very limited resources and even less money. Our contribution is a schematic diagram for a mains controller and a few tips that may help simplify the construction. For completeness, we also describe how the circuit works. You will need the following compo- nents for Ills project (see Figure 1): just fall you: this is a microcontroller-driven, computiMntirfaced, triac- switched, electrically isolated, six-channel phase-control dimner. There! That means you can attach six different light fixtures to it, md each of them can be individually dimmed using a computer. The six Christmas light strings are a perfect match. Of course, this is all at 230- V mains potential, so it must be fitted into an enclosure, fortunately, these days you can get a cheap enclosure for free by devouring, like I did, the content* of a tub of custard. |FY1: if Was chocolate custard.) 1 — Step t: remove all the Urrtpj from the light firings. That's l\t lamps in total, including the spares. Step 2: sort the lamps by colour and then plug them all back in. fra have to admit it looks a lot more chic already, doesn't it? Sul tre're not done yet: besides being ehto, I'm an E£ ’ 1 [£d: electrical engineering] student. And the fact that the bmps cannot be easily switched on or off, and betide that have only one brightness level. Is naturally a major obsta- cle to the ultimate Christmas experience. Happily, that oar also be fitted. First we bundle all the lamps into a single, massive illu- minated backbone. That eliminates the effect of sorting the lamps, but it can be completely restored... • a microcontroller (Atmel AT90S2313) * a 5-V power supply for the microcon- troller ♦ a 12-V power supply for the triac drive circuitry * an interface to a serial port The author used a data cable for a Siemens C35 mobile phone for the PC interface, but a MAX232 can easily be integrated into the circuit diagram (see Figure 3). The author also used several other 'exotic 1 components. That simply reflects what he had on hand. It's also better to use optotriacs instead of opto couplers. A suitable choice is the Sharp S202S11 (see Figure 3). That also allows TR2 to be omitted, as the 12-V supply for the opto couplers is no longer necessary, The second winding of TR1 can then be used to power IC9, The microcontroller is also a bit on the old side. If you can t find it, you can also use the ATTiny2313, which is pin- and code- compatible with the AT90S. Make sure the fuse declarations are correct when you program it: FUSE H=0xDF, FUSE L-GxCE The dimmer portion of the circuit is quite simple. There is a transformer for the 5 A/ supply, and a second transformer for the 12-V supply and zero -crossing detector. The zero- crossing detector allows the micro- controller to operate synchronized to The custard tub id dimmer in the final location. Tha cable to the six light strings runs upward, the miins cable runs dotfewird, and I ha RS232 CDflnedion to ny server runs to the top right. The suspension point it the ether and. The result: the different colours can no* be dimmed indi- vidually using i computer, so you can use s web page to put together your own colour composition sod create your very own, unique Christos* expedite.' !-.>■ / j jV H - A Jr mfjl ' n • l pf^ W V 1 ff j HANDS-ON CHRISTMAS LIGHTS 050390 - 1 i Figure 1 , Although the sthemofic diagram is fairly large, it's quite simple in principle. The microcontroller Is connected via KI* the 50-Hz mams voltage. As already mentioned, one of the transformers and the 12- V supply can be omitted if you use optotriacs. The microcontroller drives the triacs. When the microcontroller applies a pulse to an optocoupler input, the triae conducts until the mains voltage passes through zero. A six-channel phase-control dimmer is implemented in the microcontroller software. It can be controlled via the serial port. The microcontroller causes a portion of the sinusoidal mains waveform, which is divided into 200 adjustable steps, to be applied to a string of Christmas lamps via a triae. Tnal allows each string to be dimmed with a resolution of 200 steps. The source code for the microcontroller and the accompanying PC program can be downloaded from the Elector Electronics website ( http: / / www. elek- tor-el e c t roni c s . co .uk / ) . The software for the PC amounts to a simple controller for a six-channel dim- mer, The only thing you have to do. besides adjusting the six dimmer slid- ers, is to configure tire Com port. There aren't any bells and whistles. Communication between the PC and the microcontroller is quite simple. Configure the port for 19,200 baud, no parity, 8 data bits, and 1 stop bit. Two bytes are transmitted each time a dimmer value is changed. The first byte begins with a T, followed by six bits that specify which channel (which light string) is to be changed. The final bit is the most significant bit of the new dimmer value, Tne sec- ond byte starts with 'O', followed by the remainder of the dimmer value. This can be shown schematically as follows: Byte 1; 1 c5 c4 d c2 cl cO d7 Byte 2: 0 d6 d5 d4 d3 d2 dl d0 50 elskEor electronic - 12/2005 EM 2x 1N414B K3 RS232 O O c- i oco d D3H — fu 2 RiD 7 RTS L n- 3 Ti0 r r B CTS 4 DTFE HI 5 GJtD SUS &3 0 U2 Id 1 C5 & 1u 16V 14 13 a X cid r lu 15V C1 + V+ © IC10 Cl— TiCUT TlIM huh RIOUT ft-; ; ■: e "ru rr T20UT T21H C2- MAX232 C2- ¥• | Cll ![} fu 16V OS029G * 12 Figure 2. MAX232 wiling- and conflcdfom. If you don't happen Id have a spare Siemens C35 data cable, you can communkole with the microcontroller using ihis drcuil. Figure 3, The op rocoupler— If tac combination can be replaced by an optotriac as shown here. No snubber network is necessary if you use the S202S1I. As shown in Figure 2, you have to connect DTR to DSR (pin 4 to pin 6) when you make the serial interface cable. The same applies to RTS and CT3 (pins 7 and 8). That provides the handshaking necessary for proper data transport. Use a 1:1 data cable if you need to extend the cable. The 1.1AX232 is powered by tapping on its supply voltage fro m the DSR and RTS lines (pins 6 and 7). If you fit diodes to these lines, they can do an excellent job of powering a 7805 volt- age regulator IQ The usual safety measures axe appli- cable to this circuit, due to the fact that it is powered directly from the 230-V mains. A proper enclosure is thus not an unnecessary luxury. Please consult the instructions on the Electrical Safety’ page published reg- ularly in Elektoi Electronics, We can- not endorse using an empty custard tub (as used by the author) as a zero- cost' enclosure. r About H i ie author I I I I 1 Jeroen Domburg is o student of Electrical Engineering at Soxion Hogescfiool in Enschede (Netherlands)* He is an enthusias- tic hobbyist and interested in microcontrollers/ electronics end computers. Jeroen designs illumi- nated news displays as a part-time job, and he is presently working on a project involving networked modules fitted with individual microcontrollers. Website: http://sprite.5tudent.utwente.nl/ -ieroen/kerstlompjes art.html & — _ — — — — — — — — j Ptef^e note: Readers Orciuls hove nerf been feslsl or pGsheftgi neeced by ihe Ehkkx itsdssigri tabofoksy. 12/2095 - eIekIuj eisrlrcrics 51 HANDS-ON REVERSE ENGINEERING Miniature radio controlled cars are great fun for the armchair rally enthusiast but once the novelty has worn off or the car suffers a mechanical failure any true electronics enthusiast is more likely to reach foi their smallest size Phillips screwdriver rather than toss the car straight into the dustbin. This design shows how just such a model R/C system can be adapted to act as a (W)LAN Router "watchdog 7 to switch the Router on or off depending whether any networked PC's are present. Radio controlled models are getting smaller and cheaper: diminutive pocket-sized radio controlled cars can nowadays be found for as little as S to 10 pounds (probably less on Ebay). Take a closer look under the bonnet of these matchbox minis and yon will be surprised at what yon get for your money. A table at the end of this arti- cle lists the most important parts. With the help of a little ‘reverse engi- neering' and a few additional compo- nents the radio control link can be pressed into service in a completely different field: wireless networked PCs usually connect to the Internet via a Router. For convenience the Router will be permanently switched on so that any PC has immediate wireless access to the Internet when required. The cir- cuit suggested here uses a receiver cir- cuit taken from a radio controlled car system to switch the Router on only when there is at least one PC (fitted with an R/C transmitter) switched on and in range of the network. The cir- cuit draws less current than a Router so in small networks there will be a worthwhile energy saving. Reverse Engineering RE (Reverse engineering) is the process of examining finished equip- ment to work out how and why the unit was designed in such a way. The aim of the exercise is usually to repro- duce (improve/ adapt) the design while 52 eldfar elect redo - 12/2D05 - avoiding any possible copyright infringements (thanks to www.wikipedia.org for help with the definition). This is in fact precisely the approach we used to investigate the workings or the model cars. The R/G system has two channels, for- waid/re verse commands on channel 1 and left/ right on channel 2. Transmis- sion occurs on allocated channels either in the 27 MHz or 40 MHz ISM (Industrial, Scientific and Medical) band. The transmitter has four minia- ture pushbuttons on the PCB which allow for forward, reverse, left or right commands. Two AAA size batteries power the transmitter while the car itself runs on the energy stored in a small NiCd cell which requires top- ping-up from a charging unit before each race. The nominal cell voltage is 1-2 V with a capacity of SO mAh and this stores enough energy for around one minute of activity. Steering is achieved with the help of two power- ful Neodymium magnets mounted in the front of the car. An electrical coil positioned between the magnets exerts a pushing or pulling force on the magnets depending on the direction of current through the coll and this will have the effect of steering the car hard left or hard right. When there are no steering signals received, current through the coil is zero and a centring spring ensures the wheels return to the straight ahead position. With this knowledge of the remote control unit’s operation the transmitter can be adapted to send out RF signal pulses periodically when a network (LAN or WLAN) connected PC is switched on. The remote control receiver can then be used to switch the network Router. As long as it receives an RF pulse say every two minutes, it will know there is at least one PC in range and the Router will remain switched on. It functions as a sort of watchdog; keeping the Router switched on whenever at least one PC is in range and then switching it off when no PCs are detected. The transmitter The transmitter PCB is shown in Fig- ure 1. The upper right-hand push but- Figure 1- The remofe conlrol tromnjflter PCB* Figure 2, The modified transmitter circuit showing the fransmitter PCB module* 12/2005-iMtC'T tfsrirorJo 53 HANDS-ON REVERSE ENGINEERING i if 1 / t r f 1 r | t i if 4 Wot m m ku# 1 p 1 r.f 1 t f I v I vin {>•■ ( >. ill Figure 3 , The additional arcvilry fits into the transmitter battery compartmenK 0 230V 0 FI s TH1 7005 ■> * 470^ 5V In BV ra!sy 5V 230V (^03 X X giE-€n c E 4 rr! JT N 4001 © i 7 o Li IC 2 ms - OUT TH NE 555 — ! H 5£j.. \ receiver module M = "molar - contact Kl. K2 = switching clock contacts 47n © © Router = 0 = r~~i |47iU 050206-42 Figure 4. The modified r^eiver drruit showing the model tar receiver module. ton is used for making the car move forward. When the button is pressed a pulse is transmitted that is decoded in the receiver to switch the motor in the forward direction. The push burton connects the input to ground (active low) so it is important that our inter- face also does the same. The connec- tion is shown as point A connected to T1 (the 'forwards 1 button on the trans- mitter) and switched low by pin 3 of die timer integrated circuit (101). The B V supply for the CMOS NE555 is sourced from the PC power supply. A 'Y 1 cable can be used to connect directly to the power supply flying leads or if you would prefer not to open up the computer a keyboard adapter connecter can be used to tap into the 5 V supply from the PC key- board socket. LED D1 reduces the transmitter PCB supply voltage to around 3.3 V. When the PC is switched on capacitor 02 produces a reset pulse on pin 4 of the IC. The output on Pm3 will go low and enable the transmitter briefly. The receiver will detect the resulting RF pulse and switch on the Router (assuming it is not already switched on). It may be necessary to increase the value of C2 if this first RF pulse is too short to switch on the Router The NE555 is configured as an as table multivibrator so it will repeat- edly pulse the transmitter on and off as long as it is powered up and the voltage on C2 has risen above the threshold voltage. The values of Rl. R2 and Cl control the astable timing; a value of 1 MQ for Rl will produce an output high (transmitter inactive) time of more than 5 minutes with a low time (transmitter on) of approximately 1.5 s. The off period can be reduced to around 30 s by connecting a 100 kD resistor in parallel to Rl. Ensure that the receiver time constant is longer than the transmitter time constant otherwise the Router will be continu- ally cycled on and off. The control circuit with the NE555 is built on a small piece of perforated board and fitted into the transmitter’s battery compartment (Figure 3). The receiver The entire receiver circuit is fitted into the enclosure of a mechanical time switch. The time switch typically uses a single pole switch to interrupt the mains connection to its in-built mains socket. The receiver circuit in Figure 4 54 debar dtrtiamis- 15 2005 Figure 5, The R/C tar receiver PCB used in the circuit shown in Figure 4. ■ Wo mg! High Voltage I The Iran s former, mains fuse, relay contacts and connections to the mains wiring (Figure 4) are carrying lethal voltages. It is I imperative that they are enclosed within a properly insulated I enclosure and that all safety guidelines are adhered to, I Please refer to the Electrical Safety page printed regularly in C this magazine. uses a relay contact in parallel to the time switch contact. It is also possible to mount the receiver in any suitably sized plastic enclosure with a mains plug and socket. A small mains transformer together with a bridge rectifier and b V regula- tor provide the supply for the mono flop configured NE555. The green LED is connected in series with the 5 V supply and provides a voltage drop so that approximately 3.3 V is available to power the receiver mod- ule (Figure 5). Before any modifica- tions are attempted on the mains time switch it is vital to read the warning at the end of the article and be aware of the dangers! Once the unit is powered up the 470 uF capacitor will start to charge up to the supply voltage via the 500 kfl resistor. As we mentioned before, t his capacitor charging time must be greater than the transmission pulse interval of the transmitter. When a pulse from a transmitter is detected the *M' output of the receiver will he switched to ground. The M connection was originally used to switch the elec- tric motor ground return but in the new application it provides a discharge path for the capacitor via the 560 Q resistor This produces a high level on the output (pin 3) of the NE555 so that the relay puQs in and switches the Router on. Without any pulses received form any PC's the capacitor will charge -up towards 5 V. When the volt- age across the capacitor reaches 2/3 of the 5 V supply voltage the relay con- tacts are released and power to the external equipment (the Router) will be interrupted. Supply current to the receiver flows through the LED and each time a pulse is received the increase in current causes the LED to light a little brighter and give a visual indication of a received pulse. Practical tip Before you devote too much time on this project first build the transmitter and test the system to make snre it has sufficient range to cover your PC net- work with the receiver powered from 3.5 V. Switch the transmitter to forward and take the receiver around the area checking that the motor keeps turning. If the range is sufficient check the two motor connections to see which is switched to ground. 1 l*s Model car Remote control transmitter Charger unit Receiver PCB Transmitter PCB, Charger PCB U V/60 mAh HiCd cell Telescopic aeriol 3 x 1.5 V batteries Small DC motor 2 x 1.5 V batteries On/Off Swikh Coil (steering) 2 Neodymium Magnets 1 rear ox!e 2 from wheels Bodywork strews Screws Enclosure with boliery romp art men! Enclosure 12/2005 ' cfcklar el^Mcs 55 TECHNOLOGY E-BLOCKS & FLOWCODE Evelien Snei & David Daamen Figure 1 . The Flawcatfe environment: simulate before programming! Lust month we introduced you to E-blocks. Well now take a closer look at Flowcode, the programming software that complements the modular design of E-blocks perfectly. Even if you don't yet have any E-blocks it is still worthwhile to read further. This soft- ware happens to be suitable for other PIC designs as well! 56 dekluf ekitrcnics - 1 2/2005 code * It is of course o bit difficult to describe a programming teal if you don't have access to the hardware. Although this article is based around E-blocks, Flowcade can also be used to program other hardware that uses PEC con- trollers. But why should you? When you use Flowcade along with E-blocks you'll find that you save yourself a large amount of development time. A large number of E- blocks came with a fully programmed macro for use with i his programming software. This means that you no longer need to have a detailed knowledge of how to interface these peripherals, so you con concentrate on the main program! Go with the flow FEowcode is a program that makes it easy to write micro- controller applications, simply by dragging icons onto a program flowchart. These programs can drive various peripherals (such as LEDs and LCDs) that are connected to the microcontroller. The FEowcode environment consists of a workspace con- taining flowchart windows, several toolboxes with icons for the flowchart and external components, three win- dows where the status of the microcontroller and the con- nected components con be inspected, and two windows that display the variables and macro calls during the sim- ulation (Figure I). To create a new program you should follow these steps: 1 . Open a new flowchart, then specify the type of micro* control Eer that the software should work with. 2. Drag icons From the toolbox onto the flowchart to give the program a body. 3. Add peripherals to the project by clicking on the icons on the components toolbox. Adapt their properties and specify how they're connected to the controller. 4. Simulate the application to check that it works as expected. 5. Transfer the application ro the microcontroller. The application is first automatically translated into C, then into assembler code and finally into object code, which is then used to program the controller. Macros moke life easier Macros are a powerful element of Flowcade. These are parts of the program that are represented in the flowchart as a single block. In reolity, each macro is a miniature flowchart on its own. The use of macros offers many advantages: Sections of programs that appear more than once only have ia be typed in once. • The flowchart is easier to follow because many of the details are hidden inside macros. The Flowchart then only shows the main program tasks. * Macros can be saved separately (exported) and reused at a later stage in another program by importing them. Quad seven segr.gnt counter usfog ntyirplexing CStiil - 2 - 12 Figure 2. flowchart for Iho counter from example 20, Numerous examples Flowcade comes complete with a large number of exam- ples {tutorials}. Let's take a look at tutorial 20, a counter with o multiplexed 4-digir /-segment-display. The display Is driven via two I/O porfs of the PIC. This example Is interesting because it shows how easy it is to drive such 15. 2005 - eleklir e^rtroTiics 57 TECHNOLOGY E-BLOCKS & FLOWCODE Figure 3. flowchart for ibe macro INT£RRUPT_TMRO. '.!-C?£JT'Sr;CC:Lij;r co , j 1 .t = cc j:;t - 1 o display with Flowcode, despite the fact that we're deal- ing with a iota! of 32 light-emitting segments! The flowchart for this program is shown in Figure 2 . The program starts with five calculations , where the five vari- ables we use in the program are given initial values. Then the interrupt routine is installed and the program enters on endless loop, where the 7-segment displays are driven sequentially. In this loop the vafue to be displayed is incremented at regular intervals. The program branch begins with a ‘condition. When the value of the variable COUNT is greater than or equai fa 25 the right-hand branch is taken, otherwise the program Figure 4. goes straight an. In the right-hand branch the value of the Flowchart for the macro variable COUNT is reset to 0 and then the macro UPDATE_VALUE$, UPDATEVALUE5 is called. This macro increments the dis- played count by one by adjusting the variables 5EG0 to SEG3, The two branches then meet up again and the four digits are lit up one after the other, again using a macro. We have then reached the end of the loop and the microcontroller jumps bock to the start. Missing Code? The observant reader will now wonder if something isn't missing from this program, since it isn't clear how the value of COUNT can ever become greater ihan 25. COUNT has been set to 0 and from then on never appears ro change! Incrementing the value of COUNT is the task of the interrupt routine in the program. This can be found from the menu Macro>Edii/Deleie. When this menu is selected a window opens with the names af the macros used in the program. In this case we're interested in the macro INTERRUPTTMRO. When we select this from the list and click on Edit another flowchart is dis- played (see Figure 3). And here is the piece of code that appeared to be missing l The only task of this inter- rupt routine is to increment the variable COUNT. We can take a look at the other macros in the same way. The flowchart for the macro UPDATE_VAIUE3 is shown in Figure 4. It shows that a lot of work is required to increase the values of SEGO to 5EG3. First the value of SEGO (which is the least significant digit of the displayed value) is incremented by 1 . This is followed by a condi- tional branch. As long as SEGO is less than 1 0 nothing else has to be done. In this case the program carries straight on. When SEGO is equal to 1 0 it is reset to 0 and 5 EG! (which is for the second digit) has to be incre- mented. SEG2 and SEG3 are eventually Incremented in the same way. The macro ShowDigit is responsible for driving the actual segments of the display but this pre-programmed macro cannot be inspected by ihe user. Connecting and programming the PiC Does the simulation work? When you use E-blacks you are only a few steps away from a working prototype. The E-block with the 7-segment displays (refer to the Elektar website for more information) can be connected directly to the E-blccks Multiprogrammer. Remember to connect a supply wire between V+ OUT on the processor board and V + on the display board. Wffir'sA 'd. ‘Tjc, VoV^rvd.o -zr^ *Compile \o PIC from ihe menu. The program is then translated into C, converted into ASM code, transformed into object code, and finally converted into HEX code,, which is sent to the microcontroller via ihe USB conneciion. Once the code has been transferred, the PIC will immediately start executing It: the counter on ihe 7-segment display starts to increment! More Information and llie complete E-blocks catalogue can be found at: htt p:/ /vAYw.elektor-ehctronics, co.uk/eblocks 58 skitter eledr antes- 1 2/2=0 Q 5 DON'T LOSE YOUR TEMPER ^ Before phoning us - if you are looking for a hard- to- find part. We have over 20.000 items in sioek - including obsolete and up-to-date parts. WHY NOT VISIT OUR WEBSITE wmt. ericklewoodelectronies.com 2X 2SA 2SB 2SC 2SD 2P 2SJ 2SK 3N 3SK 4N 6N 17 40 AD ADC AN AM AY BA BC BD BDT BDY BDW BDY BF B1K BFS BF! BFX BFY' BLY BEX BS BR BRX BRY BS BSS BSY BSW BSX BT BTA BTB BRWBU BUK BLT BIT BUW BUX BIT BUZ CA CD CX CXA DAC DG DM DS DTA DTC GL G.M HA HCF HD HEP 1CL ICM IRF J KA K1A L LA LB LC LD LF LM M M5M MA MAB MAX MB MC MD.AJ MJE MJF MM MN MPS MPSA MPSH MF5U MRF NJM NE OM OP PA PAL PIC PX RC S S AT SAB SAD SAJ SAS SDA SG SI SL SX SO STA STK SIR STRD STRM STRS SV1 T TATAA TAG TBA TC TCA TDA TDB TEA TIC TIP TIPL TEA TL TLC TMP IMS TPU U UA UAA UC LT>N ULN UM UPA UPC LTD VN X XR Z ZN ZTX+ many others We accept Mail, telephone & email orders. Callers welcome. Opening hours Mon-Sat 9:30 - 6:00 Cricklewood Electronics Ltd 40-42 Cricklewood Broadway Loudon NTV2 3ET Tel: 020 8452 (1161 Fax: 020 8208 1441 sales@cricklewondelectromcs.coni TATldN.DUM k « L .. 44-3 1 : “ -= — i sfe Electronic Components - Packed Mfi i order P&P: £2.50 (Free UXP&P Neyj arrivals C 0 ~ outer Ir.terfe; = r. g Set IC Socket Set RCA Alicia Co-finecto r Set Speaker Conrencr Set Srioie Threw Switch Ser Sutrtn Switch Set Popular sets I/4W Metal Film Resistor Se: 1/2W/ Metal Rim Register Set 1205/0805 SMD Resistor Sec Racial t ectrotytic Capacitor Set Mi mature Polyester Capadtcir Set Cera it c Disc Capacit&r Set rantaiurn Bead Set 12Q6/DB05/GSQ5 SMD Cap Set 52XC Connector Sci GFRP Prototyping Strip board Say noi', and receive 5 further 10" - and Individually Labelled fer orders over £20}. P-Dz_zt Cc Kle CTR-0Q1 CTPS0D2 AUD-GQ1 AUD-0G2 SWT-00 1 swr-ooz Product Code RES- GO I P.cS-002 SMD-001 CAP' 001 cap^oo; CAP-003 cap-om SMP-OQ2 eivc-Goi pcs+joi Set Contents 45 p-eces 30 p.xjces ZO pieteE 10 pieces 26 pieces >4 p'eces Set Cdr.tedts iCSG pieces 1040 pie-teg 1 LIZ peces 103 t etes 100 pietas 2 50 pieces 37 pieces soo pieces 1 2 f eces i piece discount. Quote key -.V arid 'EDISON' Winchester House iVi ^Chester Rond Walton -an-Thames Surrey KT:2 1BH M:0370 750 4463 Fnx:03701376£t05 Pn ce £15.9 ^ £2.99 62.99 £2,99 £2.99 Price £9.09 £9.99 £12,90 £4.59 £4.95 £4.00 £4.99 £14-59 £4.90 £7.99 Order and browse online at v/v/w. fasicorrTponents.co.uk fastcomponents 9 the best way to byy components Tl? Version 9 fetaures ^ i 3D Board View Q New Win XP User Interface El Reverse Engineer SCM from PCS O Track Fattening ■ Interactive Schematic Routing □ New Sliding Toolbars □ Component Clearance Checks □ Alphanumeric Pin Names Plus many more exciting features Fully integrated Schematics & PCB layout in a single application complete with forward and back annotatioi Design and rules checks at all stages ensure integrity a all times. Professional manufacturing outputs allow you to finish the design process with ease. Stop press, ,, Stop press,,. Stop press... Stop press, Easy-PC imports Eagle files as well asTsien Boardmaker 2 files call for a brochure, prices & CD on +44 (0)1684 773662 or e-mail salc0@rtumberone.com you can also download a demo from www.numberone.com Easy-PC version 9 just gets better Winning accolades the world over, Easy-PC for Windows V9 is another major milestone in the evolution of this extremely popular software tool. Try a demonstration copy of Easy-PC and prepare to be amazed at the power, versatility and remarkable value for money. Number One Systems - Oak Lane - Bredon - Tewkesbury - Glos - United Kingdom - GL20 7LR UK 17/2Q05 - debtor electronics 59 00 Delphi for Electronic Engineers Detlef Overbeek, Anton Vogelaar und Siegfried Zuhr Part 10 (final) The DelphiStamp stands on its own two feet In this final part of the Delphi course we will continue with the development of the sprinkler system started in part 9. More valves are added to the system, as is ci water pump. On the software side we will add a timer function. The end result is a / grown-up / sprinkler system that will prove its worth during the summer. In the previous part we started the sprinkler system project. We created a basic system, which was First simulated in Delphi. The program was then stored in the Delphi Stamp. Here we made use of the evaluation kit, specifically the LCD, the pushbutton, a second pushbutton (connected to the second analogue inpui) and the LEDs r which were used to indicate the stare or the outputs. In that system you could select individual valves, how long they stayed open for and how often the cycle should be repeated. In this instalment the object is to enhance the project with the addition of more valves, a water pump and the Facih ity to start the sprinkling cycle at a later time (for example during the night). We would tike to call up and modify the settings via a PC, using a monitoring/configurallan program. (The program for ihe Delphi Stamp is developed in Del- phi, then cross-compiled and stored in ihe Delphi Stamp , This then functions completely independently , The monitoring/configuroiion program is a separate application. This programs runs on a PC and uses on RS232 cable to read and modify ihe settings of the Del- phi 5/amp program , effectively controlling if remotely). 60 etskiDr el«tranln - 1 3/2095 Figure L The clrtuit diagram for the hardware used in Jhis project. There are two ways in which the project can be expanded: We can either use the existing I/O capabilities of the Del- phi Stomp or we use the HC port to communicate with the extra hardware. [n this case we decided to use the l-C interface, and the necessary pushbuttons and outputs are connected via an I/O chip to the Delphi Stamp. For this we use a PCF8574, which has S I/O lines that can be written to or read from. A maximum of 16 of these chips can be aodressed on the bus, which means that the system can be easily expanded to have up to 16 x 8 = 1 28 IO lines. When this is iaier used on a standalone basis [without tne evaluation board), the only connections needed are For the Delphi Stamp, the LCD, the I/O chip and the power drivers (Figure I). The software Well use the source code of the last instalment as the basis for developing the software. The simulation has to be expanded with the I/O chip, two pushbuttons and six outputs. These are added to the existing control panel in the Graphical User Interface (Figure 3), The underlying code has to be modified in several places. The menu structure We hove to add two buttons to the form of the pro- gram. Well use Speedbuttons for these (because they have a Down property; when clicked, this property becomes True), Two procedures and a function are added to the unit Udrivers: TWI init [Two Wire Interface = l 2 C], PCF8574_Wr (Write) and PCF8574_Rd (Read). In the simulation they emulate the actions of the drivers in the Delphi Stamp, The i nil doesn't do anything in the simula- tion and is therefore empty, PCF8574_Wr is responsible for updating the colour of the LEDs on the screen, PCF8574_Rd reports the state of Figure 2, An example of the valve driver, using 24 V ct . Figure 3, At the bottom-left: the Two buttons and six LEDs* 1 2/2005 * tldctof dedrmtiis 61 Array settings © Q e © © o @ © Main menu Edit Mode Value Mode 040240 ' 10 - U etc, up to maximum number of valves Figure 4. All (he functions in the menu. 62 ef-klor electronics - 12/2005 the pushbuttons. Il does this by looking if the 'Down' property is set to True. If this is the cose it will be reflected in ihe return value of the function. That covers the expansion of the simulation. Th e core of the program, the unit UControl, requires more attention. We wont to increase the number of valves from three to five, and use the sixth output to drive a water pump to provide our own water pressure. We also have So add an entry to the menu for setting the start time. The array that holds the menu entries is therefore increased to hold 1 0 entries. In the code for the menu we hove to take account of the new size of the array. The menu entry 'Starting time' Is added between Number of cycles' and the First valve (Figure 4). In this way, when we add mare valves at a later stage we can add them on after the last valve and we won't have to change the structure of the menu. A submenu is added to the Start entry in the menu. From here we can choose between 'Start direct' and 'Start delayed'. 'Exit is used to return to the main menu. A similar menu can be found in the 'Starting time' menu entry, with the options Set star! hour 1 , 'Set start minute' and 'Exit'. Far the display of text on the LCD we have added ihe procedures 'ShowStorf and 'ShowTimerk For going through the menu in a vertical direction (via button 1 ), Menulevel I has to be adapted. This now has a sub-menu with three options. The valves are now dealt with one position further, from >4 to >5 in the comparison {If Menulevel > 5 then}. Posi- tion 5 now deals with incrementing the values for the storting hour and minutes. When the hour becomes greater than 23 the variable is reset to 0 and the minutes are reset when the value goes beyond 59. The time is stored in two variables: S_hour and S min. We will come back to these later on. For going through ihe menu horizontally (via button 2] we have to change Menulevel 1 . When button 2 is used to open the menu, the initial value is read from the array. This will be equal to 1 , which corresponds to the 'Start direct' option. Button 1 can now be used to go through the sub-menu, where option 2 is for 'Start delayed' and option 3 is for 'Exit'. When button 2 is pressed again, a jump ts made to the left or right in the menu structure, depending on the cur- rent position (edit value). When the edit value is >2 then the Exit' option is per- formed and the next item from the main menu will appear. IF this isn't the case then when editmode = 1 the system will be started by setting the variable Run to True. When editmode = 2 the variable Timer is set to True. These variables affect the actions of the program later on in the procedure ControlExe. But first we have to complete ihe menu. When setting the timer the menu is navigated in a similar manner, but this time when button 2 is pressed a second time we move another level to the right, into the Value-mode. The text on the display is provided by 'ShowTimer' In Value-mode button ] is used to increment the value. The value of the edit-mode determines svhether Shour or 5_min is incremented. When button 2 is pressed □ third time we go back one level to the left. At the end of the sub-menu we can return to the main menu via an Exit option. We will now explain the function of the variables S hour and S_min. Together they make up the time at which a cycle should be storied. This has to be compared with the current time, which is stored in ihe variables TJiour, T min and T_sec, The Delphi Stamp doesn't have a real- time dock; hence we use o simple counter to increment these variables. The PC is used to set the correct time of the clack. This fakes us directly to the next item. To implement this the PC has to be able to write to the memory of the Del- phi Stamp. This isn't a problem, since we can use M485.D1L, which communicates with the 485-server in the Delphi Stamp. Just three extra lines in the unit Umoin far the Delphi Stomp project [so not in the simulation proj- ect!) are all that's needed to start the server. But how do we determine the location in memory for these variables? If we add them to a new unit and have this as the first unit in Umain for the Delphi Stamp, then they will be placed ot the start of the available memory. If we look at ihe memory structure for the Delphi Stamp, we first see the BIOS. This goes up to $ 1 7F, which means that the first usable address will be $180. This is there- fore where the first variable is stored, ond the rest follow on from here. We therefore create a new unit called UMem. We add the Following variables to this: T_hour, T_min r T_see of type Byte, which are used for the display of the current time, S hour, 5_min of type Byte, which are used to store the starting time. From UContral we move these variables here: Settings ; Arrayfl 0] of Byte, for storing and reading the settings. Run of type Byte, to keep track of the status. (0 = False, > 1 - True). Timer of type Byte is added to determine the status of the timer function. And that's all that is required. More on UContro! We odd the unit UMem to the Uses section of UControl so we can make use of the variables. Some code is added to the procedure Contrallnit for the initialisation of the l-C [TWl init] and the new variables. We also set default values in all of the menu entries here. Miost of the changes are made within the procedure Con- trolExe. To start with, some code is added to keep track oF the time. The procedure ControlExe is called every 100 ms. We then count to 10 to obtain one second, then to 60 for the minutes and again to 60 for the hours. When the hours reach 24, everything is reset to zero and a new day begins. The dock Is displayed on the bottom line of the main menu. The code that deals with the bottom line has been modified for this. When the timer function has been acti- vated the bottom line will show the word Timer' followed by the time remaining. This is calculated by a separate piece of code using the values of T_baur/T_min and S_hour/S_min. The changes in the menu are made by adapting the sec- tion that deals with EdifMode. in Menulevel 1 the routine ShowS tart is added and in Menulevel 5 ShowTimer replaces ShowValve, which moves on to Menulevel > 5. When it's time to start the cycle we set Run to True. At this moment in time we also make a note oF all the set- tings. Up until then they could still be changed (exter- nally). An extra bit of code has been added to read these settings when the Run-mode begins. This occurs just 1 7/2005 - dektor Efedrifiirts before ihe cycle is starred. And now for the I/O. The reading of the pushbuttons is replaced by the reading of the ! 2 C chip. From the returned value we can determine which buttons are pressed and which procedure has to be colled. The procedure SetValve also has to be adapted for use with the \ Z C chip. In here a binary number is written to the chip using PCF8574_Wr f with the value depending on the valve that needs to be activated. Along with the valve, the bit For the pump is also turned an. At the end of a cycle everything is fumed off. Th is concludes the changes needed in the program. If we press button 2 from the Start' option we reach a sub-menu with the option 'Start sprinkling'. Pressing but- ton 2 again will start the cycle. We see that the left-hand LED turns on as will the right- hand LED of the first enabled valve, which is normally valve 1 (assuming that no parameters have been changed and valve ! was turned off). At the end of the sprinkling time the next valve is turned an. At the end of the cycle the last valve is turned off, os well as the pump. The last topic is the starting of the timer, if we go fo the option for Starting time' in the main menu and then press button 2 we reach a sub-menu fo 'Set start hour'. If we press button 2 again we go another level down in the submenu and can now adjust the value for the starting hour using button L When you have set the required value, button 2 will return you to the previous sub-menu. Button 1 can then be used to step to the next option to Set start minute'. In here we con set the starting minute and exit using button 2. With button 1 v/e step to the Exit option and then press button 2 fo return to the next option in the main menu. The starting time has now been set. If we now go to the Start option of the menu and press burton 2, we can use button 1 to choose the 'Delayed start' option. Pressing button 2 will activate this and the display will show Timer xx:xx:xx', indicating how much time is left before the cycle will start. Pressing button 2 again will exit from this mode. When the timer is turned on, the internal variable Timer is set to True. In ControlExe the starting time is continually compared with the current time and the display is updated. When the result or the comparison equals zero, Timer Is set to False and Run is set to True to start the cycle. At the end of the cycle the system turns itself off. Please note that soon after the initialisation of the time- variables it can happen that the cycle starts immediately when the timer made is turned an. The comparison of the times works by comparing the variables T_hour/S_hour and Tjmin/S_mm. if the timer mode is selected within the first minute after turning on the Delphi Stamp fhese values are all still at 0, with the result that the cycle starts. To the Delphi Stamp The unit UControl, which was created and tested in Del- phi, has to be copied to the directory where the project for the AVR compiler Is stored. The unit UMem Is new as well, so aba has to be copied. We then run AVRpas and start a new project. Make sure that all settings are correct (refer to the description In the previous article) and give a name to the project. Add the file UMaln and make this the main file. You should then open the other files in the editor via Figure 5, The monitormg/configuratinn program. File/Open and add UDrivers.pos, UControl. pas and the unit UMem, The l 2 C driver has been added to the unit UDrlvers. This has been kept separate on purpose to show how easy it is to add new modules whenever they ore required. The enhanced version is called UDriversEx and is included in the project via the Uses' section of UcontroL Compile these two flies via Compile/Current editor file. Sometimes there may be a few error messages because some of the Delphi functions aren't included in AVRPos. These can often be corrected by making simple modifica- tions, giving a successful compilation. Compile the project: Project/Moin Project file. The code has then been generated and you can exit from AVRPos. The file created by the cross-compiler, which contains the binary code, now has to be stored in the Delphi Stamp. For this we'll use an R5232 connection and the program Mon485, which connects to the M485 server running on the Delphi Stamp. Copy the program across to the Delphi Stamp, which then becomes a fully independent device. Monitoring via the PC The monitoring via a computer is done with a separate program. By monitoring' we mean that the program can read and display all settings. In this cose we can also send new settings to the Delphi Stamp via the Write button. During normal operation the program will be in Read- made. All parts of the system can be found again In the monitoring program: the LCD display, the settings, the two start options and the status of the outputs. Added to these ore the actual time (from the PC) and buttons for reading the settings or write them to the Delphi Stamp. This program communicates via the M485 protocol with the Delphi Stomp and can retrieve ihe stored settings. The buttons marked Start and Timer Start are used to set the Delphi Stamp in either Run or Timer mode. The description of this application for the Delphi Stamp concludes the course in Delphi for Electronic Engineers. We hope that you've found it very informative. More information about the Delphi Stomp can be found at www.vogelaanelectrQnics.com. Further details, about this course and the programs are at www. I earning del- phi. info. 64 dcktBT elcrtroria- 12 20 D5 QUASAR electronics Quasar Electronics Limited PQ Box 5935 Bishops Stortford CM23 4WP, United Kingdom let: 0870 246 1826 Fax: 0871 277 2728 E-mail: sales@quasareleotronics.com Web: VAVW.QuasarElectronics.com Postage & Packing Options (Up to 2Kg gross weighs? UK Standard 3-7 Day Delivery - £3 £5 UK Mainland Next Day Delivery - £3 95 Europe (EU) - £6 95 Rest of World - £9,95 lOrder online for reduced price UK Postage! We accept all major credttfdehit cards. Make cheques/PO‘s payable to Quasar Electronics. Prices include 17.5% VAT. Cell now for our FREE CATALOGUE With details of over 300 kits, projects, modules and publications. Discounts for bulk quantities. @ @ ¥' ¥l CREDIT CARD SALES Get Plugged Ini Ho! Ho! Ho! Christmas 2005 is on it's way BUT DON'T PANIC!! We have some fantastic gift ideas for young (and older) enquiring minds Electronic Project Labs An electronics course in a box! All assume no previous knowledge and require NO solder. See website for full details 30 in ONE -£14.95 Order Code EPL030KT 130 in ONE - £33,95 Order Code EPL130KT 300 in ONE -£48,95 Order Code EPL300KT SOD in ONE -£134.95 Order Code EPL500KT Robot Sensor - £14.95 Order Code EPLR20 Digital Recording Laboratory - £24.95 Order Code EPLDR Solderless Electronic Project Kits ^ J AAfl-FM Radio Kit -£6.95 Order Code ERKAFKT Shortwave Kit £6.95 Order Code ERKSWKT Crystal Radio Kit - £6,95 Order Code ERKSWKT Electronic Bell - £3.95 Order Code EAKEBKT Electronic Motor - £8.95 Order Code EAKEMKT Generator - £8.95 Order Code EAKEGKT Room Alarm * £4.95 Order Code EAKRAKT Hand Held Metal Detector - £9.95 Order Code ELMDX7KT Metal Detector - £9,95 Order Code ELMDKT Mechanical Motorised Wooden Kits Future engineers can learn about the opera- tion of transmissions steered through gears or pulleys. Easy to build, no glue or sol- dering required. Automech - £12.95 Order Code C21-605KT Coptermech -£12.95 Order Code C21 -604KT Trainmech - £12.95 Order Code C21-606KT Robomech - £12.95 Order Code C21-603KT Stegomech -£12,95 Order Code C21-6G2KT Tyrannomech - £12.95 Order Code C21-601KT Festive Electronic Project Kits Musical LED Jingle Bells -£17.95 Order Code 1176KT Hi-Tech Microcontroller Multi-Coloured Christmas Tree -£13.95 Order Code 3103KT See our website for even more great gift ideas! No.1 SKITS Secure Online Ordering Facilities Full Product Listing. Descriptions & Photos Kit Documentation & Software Downloads TECHNOLOGY DIGITAL RADIO MONDIALE Wolfgang Hartmann and Burkhard Kainka DRM broadcasts provide unparalleled programme quality on short medium and long wave fre- quencies. Diorama is a new open-source DRJVl decoder program developed at the University of Kaiserslautern, Germany. With the addition of a little hardware it can decode these long range transmissions and play them in real-time on a PC. A strongpoint of this implementation is its use of IVIATLAB which provides an insight into the nuts and bolts of signal processing. Figure 1. Additional information Is displayed via the control panel. Figure 2* Received signal Information. Radio broadcasts using the DRM (Digital Radio Mondi- ale] digital Format are becoming more commonplace but commercial receivers are still a little thin on the ground and needless to soy very expensive; a good enough rea- son io add a low cast RE Front-end to your PC (e.g, the Elekior Electronics DRM receiver [1]] a. id decode the sig- nals with software. Diorama is a complete open-source DRM receiver decod- ing program operating in real-time that has been devel- oped by Torsten Schorr and Andreas Dittrich at the Insti- tute of Telecommunications at ihe University oF Kaiser- slauten [2]. The program is similar io the 'Dream software that regular readers will recognise from our earlier articles on DRM receivers [1]. Diorama is implemented using the numerical computing environment MATIAB. This approach enables the signal decoding process can be interrupted and examined at any point Io gain valuable understanding of the signal processing behaviour. The program requires version 5.2 of MATLAB (release 10) or higher. A graphical user interface for adjustment and dis- play of system parameters Is optional. The input signal spectrum, synchronisation variables, received S/NR and many other variables are shown in the standard online display. In addition it is possible to display the received signal along with the recovered output data. First Impressions For those who do not have the full version of MATLAB there is an alternative EXE version of Diorama that only requires a runtime version of MATLAB [MCR Installer). We tested this version here in Windows XP Once diorama, axe is started it runs In the background In a DOS window. The Diorama Control Panel Is also dis- 66 eleklDr dertramc- 12 2005 A look at flit new ope rso'irct DRIA decoder program Dioiar m The concept * By Torsten Schorr and Andreas Dittrich MATLAB was chosen far this project to handle the received dafo stream because it provides an interpreted script-like pro- gramming language that facilitates an efficient stepwise metnodology ror application software development and incor- porates useful debugging tools. In addition MATLAB incarpe- rates many userul mathematical signal processing tools and functions tor data visualisation. Use of the internal signal processing routines of MATLAB ro-gefner with a little native cede where necessary [far the more processor-intensive tasks} ensures that Diorama executes rast enough to be able fa decode the DRM signal in real time. In aadition me user is able to manually interrupt program execution and observe internal data and variables with the help of the MATLAB integrated visualisation tools. Program execution can be stepped and break points inserted. Changes to the program code con be easily mode which take effect immediately when Diorama is restarted without the need to recompile the code., Development and debugging of the new algorithms for DRM decoding proved to be relatively simple and much faster using this development environment. This environment h also a useful educational tool because the operation or mony telecommunications algorithms can be Illustrated with Diorama. MATLAB is also available as a compiler version. Depending on the release version of the compiler, it can either produce binary files (in this case Dlls) or fifes using MATLAB s own file format. In both cases an executable [.exej file is generated which runs like any other software applications on the PC. The necessary libraries including signal processing, visualisa- tion tools and a virtual processor for the MATLAB specific for- mat are contained in a runtime environment which must be installed in parallel to the Diorama pregram. ployed but this con be closed if you prefer the applica- tion to disappear' from the screen. Diorama handles sig- nal decoding only, tuning ond setup of the DRM receiver hardware is performed by an additional program such as DRM.exe for the Elekfor Electronics DRM-RX [1], With the Control Panel [Figure 1) it is possible to view additional data. Signal info (Figure 2) identifies the received station and any additional data services from ine station. Data such os the signal to noise ratio are also displayed. The received signal input spectrum is shown in Figure 3 and Figure 4 gives the three-dimensional 'sig- nal constellations of the received carriers. The quality and robustness of the decoding process is comparable to the Dream software. When the received signal to noise ratio drops below the level where the sig- nal can be reliably recovered the software outputs artifi- cial noise on the audio so that it is possible to distin- guish this condition from a temporary break in signal modulation. A strongpoint or the software is the handling of inrarmo- tion pages sent by DRM broadcast stations. The pages can be viewed using your normal Internet browser application. Received images are stored in a folder and can be retrieved later If required. Literature and Links [1] Build your o wn DRM receiver 1 . E-ektor Electronics, 3 / 2004 , R ] 2 [2] http://nt.etr.uni-kl.de/forschung/dIcroma Input spectrum input stgnsl, mean: O.QD, ms: 0.10 1 0 — ^**^1 *• ~ i l T- f— T^ flVrr -t \ -1 s-,. X ff 3 £ 10 0 -10 -20 -30 -30 input signal pswerspecirum 12 kHi shifted + tewpiss fiheied TO I 4 ■ 4 ■ l S' i P- H X a i a B ■ 4 x 4 4 » 4 * 4 * l. I • i ■ ■ ■ B 1 1 1 1 | # a _ 4_ _ , a e > I 'i a 1 i 1 » 1 J: M-W t. ■ y'&fiA 1 a P a R 4 a f 1 r ■' ■ 4 4 '•1 J. | ■ ■ * B* ■ r 7" * 4 1 . * Hi | 4- E ; a « i ■ V J * ■ 4 * i L i 3/ * -1 J 1 ■ ":"T" i i ■ ■ A/ti a a. V t ft 4 4 4 4 4 a a ■ P 1 B a ■ : z 1’ E a a R a 1 a ■ fi i I i 1 n M P (n$&L i j ■ * h : ; * * ..... * * * + — « * » * * m 4 * * 4 J a □ 2 4 e 8 TO 12 14 16 ta 20 22 24 -6 -4 -2 0 2 4 6 tf e a u e Vi t: y ,(k Ha) Ci nsle IfcsifjFti : vai hrUfarjfn J to j-j ; rz= p z t Figure 3, The signal spedrum display gives a dear impression of ihe input signal. Figure 4, The receive Signal Constellations shown In 3D, 12/ 2Cd5 - cfskiar e’&dnuiks 67 Eiektor Electronics (Publishing) / Segment ELU Reg us Brentford * 1 000 Great West Road Brentford TW8 9HH * United Kingdom Telephone +44 (0} 208 261 4509 Fax +44 (0) 208 261 4447 Email: sales@elektor-electronics.co.uk Order now using the Order Form in the Readers Services section in this issue Step into the fascinating world of microcontrollers Microcontroller Basics Burkhard Kainka NEW Microcontroller Basics Microcontrollers have become an indispensable part of modern electronics. They make things possible that vastly exceed what could be done previously. Innumerable applications show that almost nothing is impossible. There's thus every reason to learn more about them, but that raises the question of where to find a good introduction to this fascinating technology. The answer is easy: this Microcontroller Basics book, combined with the 89S8252 Flash Board project published by Eiektor Electronics. This book clearly explains the technology using various microcontroller circuits and programs written in several different programming languages. In the course of the book, the reader gradually develops increased competence in converting his or her ideas into microcontroller circuitry. ISBN 0-905705-67-X Flash Microcontroller Starter Kit Eiektor Hardware & Software Step into the fascinating world of microcontrollers with the Eiektor Electronics Flash Microcontroller Starter Kit. Order now the ready-assembled PCB incl. software, cable, adapter & related articles. Contents of Starter Kit: • 89S8252 Flash Microcontroller board (ready-assembled and tested PCB} * 300-mA mains adapter 230 Pages £18.70 / US$ 33.70 • Serial cable for COM port £69.00 / US$ 112.50 • Software bundle on CD-ROM • Article compilation on CD-ROM More information on www.elektor-electronics.co.uk WIZ-C for the PIC - Rapid Application Development in C NOW available with USB Development System WIZ-C - ANSI Compiler and Rapid Application Development in C * WIZ-C is more than a C Compiler for the PIC - it is a complete development environment with rapid access to library components with point and click set up. * Ideal for beginners, includes full tutorial manuals and an introductory manual to the C language. * Syntax highlighting editor. * Full ANSI C Compiler * Large libraries included for displays, ports, data transfer, keypads, graphics, bootloader and C standard functions. * Extensive simulation capabilities, very rapid program execution, includes simulation of LCD, LED' switches, I2C, RS232 terminals etc, inspect C variables in C format USB development Support * Add on library provides point and click CDC support to WIZ-C * Installs as a virtual com port - access easily from C, Visual BASIC, Hyperterminal etc. ■ Development board (pictured) based on 1SF2550 supplied with bootloader and sample application * See website for details • Logic analyser can display waveforms of PIC pins and internal registers simplifying debugging. • Includes assembler to allow you to develop assembler projects in their own right, or as part of C projects • LITE version supports the most popular PIC devices - academic users may choose these types. • UK written and supported. • Priced from £35,00 We accept major credit cards and Switch. Order securely from our site www.fored.co.uk or contact us by phone or fax on 01 590-681 51 1 , email infQ@foredxo.uk . Forest Electronic Developments, 12 Buldowne Walk, Sway, Lymington Hampshire. S041 6DU www.fored.co.uk info@fored.co.uk lektor lectronics CD-ROM ECD Edition 3 Now with a new ISBN 90-5381-159-1 Elektor's Components £12.95 (US $ 22.90) Database gives you easy access to design data for over 5,000 ICs 3 more than Order now using the Order Form in the Readers Services 35,000 transistors, FETs, section in this issue. thyristors and triacs, just under 25,000 diodes and Eiektor Electronics 1.800 optocouplers. All databank applications are fully interactive, allowing the user to add, edit and complete component data. (Publishing) / Segment B.V. Reg us Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel. +44 (D) 208 261 4509 More information on www.elektor-electronics.co.uk lectronics 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 Eiektor Electronics magazine. The articles on the CD-ROM cover test & measurement equipment, amplifiers, digital audio and loudspeaker technology. Highlights include the Crescendo Millennium Edition, Audio-DAC 2000, Auoto-ADC 2000 and the IR-S/PDIF Transmitter and Receiver. Using the included Acrobat Reader you are able to browse the articles on you r computer, as well as print texts, circuit diagrams 1 1 L M 1 tJ ISBN 90-5381-176-1 Order now using tile Order Form in the Readers Services section in this issue. Eiektor Electronics shing Regus Brentford 1000 Great West Road Brentford TW8 9HH and PCB layouts. . +44 (0) 208 261 4509 See also www.elektor-electronics.co.uk 12/2005 - efckkr c'ecJrohts 69 TECHNOLOGY APPLICATION NOTE Figure L The ZXCT1010 In a hm \ c current sense tircuil showing 3he interne] block diagram and chip pm-oirfs. Jhs content of this note is based on information received from manufacturers in the electrical and electronics industries or their representatives and does not imply practical experience by EMfor Electronics or Us consultants. Current Sensing USING THE ZXCT 1 OXX Gregor Kleine Measuring high-side current becomes a piece of cake when you use the ZXCT1 Oxx range of devices from Zetex. The chips can produce a proportional output voltage referenced to ground by sensing current through a user- defined shunt resistor. The semiconductor manufacturer Zetex has recently intro- duced a new family of current sensing ICs, These devices operate from a wide supply voltage range between + 2.5 to 20 V and can be used in many applications including overload protection, battery chargers, cooling fan current monitoring or switch -on surge limiting. The four variants perform the same function but have different output characteristics; the measured current can be output as a scaled current or voltage and one variant has an in- built comparator Current sensing with three external components The basic configuration using a ZXCT 1010 and current sensing resistor (shunt) R1 is shown in Figure 1 . This device output current at Iq ,- Is a scaled down measure- ment of the load current through R L Resistor R2 is con- nected between Iqijt and ground and converts the output current into a voltage Vq^. Internally the ZXCT1010 contains an op-amp, transistor and a 100 Q resistor. The op-amp is configured so that when a voltage Is devel- oped across the sense resistor it will cause the transistor to conduct and divert sufficient current through its loyj pin so that the voltage across the op-amp inputs is reduced to zero. The voltage across the internal 100 Q resistor will therefore be the same as ihe drop across the sense resistor (Vsemse)- This relationship can be expressed mathematically: l L x R1 = 1 00 £2 x l 3 = V SENSE Rearranging for 1?: ] 2 = I l xR1 / 100 O We can assume that the op-amp takes so little current at its inputs that all of l 2 posses through the transistor and 70 sEcklDT E cCtTOFliCS- 5/2 005 out of Iqut The voltage (Vqjj) produced across the external resistor R2 can now be expressed in terms of the other variables: ^out = lour x R 2 = I 2 x R2 Substituting the expression far I? above: v OUT = V SENSE x (R2 / 1 00 Q] For the ZXCT] 022: Vqut " 1 00 x I x R 1 The ZXCT 1021 produces an output voltage of I V for a drop of 100 mV across the shunt resistor R1 while the 2XCT1022 produces the same output for a drop of 1 0 mV across R! _ v GUT=L xR1 x |R2 / 100 Q) [1] The ZXCT 1010 requires a value of R 1 so that the load current produces a sense voltage of approximately 100 mV. The low sense voltage reduces power dissipation in R] * As an example, assuming a load current I of 5 A, RI can be calculated from: R1 588 Vsemse / k [2] Rl -0.1 V/5A = 20mQ It most coses it will be convenient to make this low value resistor using an etched track on the PCB. The required track length and width can be calculated providing the thickness of ihe copper layer is known (see 'Printed cur- rent sensors']. Once the value of Rl has been calculated it is nov/ possi- ble to choose the value of the scaling resistor R2 so that is gives the required output voltage for the load current of 5 A. For example we will pick an output voltage of 500 mV, Rearranging equation [1] for R2: R2 - Vout / J(Il x R 1 ) x 1 00 Q] [3] R2 - [0.5 V / (5 A x 0,02 Q}] x 100 Q R2 = 500 Q Equation [1] becomes: Vour-0.1 Vx[l L /l A] it is important to choose R2 so that the value of V c jj can* not be greater than the supply voltage V|N- In practice the maximum value of Vquj should always be a few volts less than the supply voltage. Capacitor C I filters supply-borne high frequency noise and should always be present in any circuit using a ZXCT1 Oxx device to ensure stable operation and reduce any tendency for the device to oscillate. Figure 2. Both the ZXCT1021 ad ZXCT 1022 have a built-in staling resistor R2. Figure 3, Bipolar current sensing configuration. Current in/voitage out The ZXCT 102 1 and ZXCT 1022 devices are basically the same as the ZXCTIGlO but have a built-in scaling resis- tor (R2) and therefore have a Vquj rather than an !qut pin. The resistor ratio of R2 / 1 00 Q in equation [1] is replaced by 1 5 kQ / ] .5 k Q = 1 0 for the ZXCT 1 02 1 and 15 kQ / 1500- 100 for the ZXCT 1 022. The equa- tion for Rl then simplifies to: For the ZXCT 1021: Vquh- - 1 0 x x R ] VQUT Figure 4. The characteristic of output voltage versus bipolar current. 5/2005 ■ efcklor elrtfrcnks 71 TECHNOLOGY APPLICATION NOTE Figure 5, Current sensing wElh a supply greeter than 20 V, Figure 6, TheRDSON of a switched MOSFET con also be used for sensing current. Type Function Technical Data ZXCT 1 009 Forerunner to the ZXCT 1010 ZXCT 1010 has a lower Offset ZXCT 1010 Current sense with current output. Vsense typ* 1 ^0 Bandwidth 2 MHz sup- ply current 4 uA Package outline SOT 23 ZXCT 1021 Current sense with voltage output. ^SENSE typ- TOO mV VouT / V SEN5£ = 1 0 Bandwidth 300 kHz supply current 25 uA Package oulline SOT-23'5 zxa 1022 Current sense with voltage output. V SEHSE *YP- 1 0 mV V OLFT / VSENSE = 1 00 Bandwidth 300 kHz supply current 25 uA Package outline SOT-23-5 ZXCT ] 030 Current sense with voltage output and built-in comparator. ^SENSE typ. 1 00 mV V OLFT / V 5EN5E = 10 Bandwidth ] 0 MHz V cc = +2.2 to 20 V supply current 270 llA Package outline MSOP8 Bipolar sensing The ZXTC 1010 can only sense current flowing in one direction, when the current changes direction iQyy remains at zero. Where an application calls for current sensing in both directions (e a. monitoring the charge and discharge current of a rechargeable battery) it is necessary to use a bipolar current sense configura- tion. Fig ure 3 shows how two ZXCT 101 0$ can be con- nected using the same sensing resistor R1 and output scaling resistor R2. The upper ZXCT1 010 in the diagram has its V1N and LOAD inputs swapped around ihe sense resistor. Both R1 and R2 can be calculated using the for- mulae given above. For applications requiring the for- ward/ reverse currents to be independently monitored the two Vquj signals from each ZXCT] 010 can be sepa- rated and connected to its own scolina resistor R2. Both the ZXCT1021 and ZXCT1022 have a in built 15 k_Q scaling resistor but their tolerance is so wide (±30 % according to the data sheet] that these devices would, in most cases be unsuitable this type of configuration. Fig- ure 4 shows the Vquj to load current relationship. The ZXCT I 010 chip employs high side sensing without the need to disrupt the earth return. The device Is also suitable in circuits where the supply rail exceeds 20 V but a few extra components are required (Figure 5). The zener diode ensures the supply to the ZXCT1010 does not exceed 15 V while the remainder of the supply volt- age is dropped across the collector-emitter junction of T1 . It is important to check that this does not exceed the tran- sistor Vqtq rating. The voltage level of the IOUT pin will be one diode drop (0.7 V) above the base potential of T1 . The high current gain of T1 enables us to ignore the base current and assume that the emitter and collector currents are equal. The scaled output voltage Vqjjt is once again produced by Iquj through R2 and can be calculated as before. The value of resistor R3 is calculated to allow a current of 0. 1 m A through the zener diode. The ZXCT 1010 draws just 4 uA and the current gain of T1 ensures that Its base current will also be comparatively small. The transistor is used in a common-base configuration. The chip con also be used in conjunction with a MOSFET to both switch and sense the current to a circuit (Figure 6), The MOSFET drain-source resistance (Rq 5 Ojn) ' s typically around 1 0 mQ and Is used to sense the load current in this circuit. The load resistor connected to pin 5 is only required if the output voltage drives an elec- trically noisy circuit that may generate voltage spikes greater than ihe maximum 20 V supply limit of the chip. 72 eErbarElfftTMits ■ 5/2005 One thing to bear in mind with this circuit is that the value of Rqj qjsj has quite a wide spread ond is also o function of temperature. When the MOSFET is switched off ^GUT dses maximum value because the drain- source voltage rises to a maximum and the current sense 1C interprets this as maximum load current condition. The type ZXCT1030 has a built-in comparator with an internal reference voltage and comparator Input level |Comp_in). In addition to the usual Vqut it has a digital comparator output (open collector) pin Comp_our that switches low when the pre-set threshold at Comp_in is exceeded. References; Data sheets from: www.zetex.com ZETEX Application Note No. 39 ZETEX Design Note No, 77 (High Voltage Transients) r I 1 I 1 I I I I I I I I I I I I I 1 I I 1 i E 1 1 I i E I I I I Printed current sense resistors The current sensing element R1 has a relatively low value and can be cheaply made from a zigzag length oF PCB track. The resistivity of capper is: p cu - 0.0175 Q-nim 2 / m The copper layer thickness of a standard PCB is typi- cally 35 am. The resistance of R1 can be calculated from the length of copper track \ Ctw and its cross sec- tional area A L ar R] = Pcu* h/ Acu The cross sectional area A CiJ is given by the copper layer thickness and track width w cu ; A cu = 35 jim x w. cu I I I I I l I I 1 1 L / Cu p" ,pr 1 v Trackwidfh b GU Maximum current 0. 1 mm ■ _ii 0.5 A ' * 0.2 mm 0.7 A 0.3 mm 1*0 A 0,5 mm 1.2 A 0.8 mm 1 — — ! 1 -5 A 1 .0 mm 1.7 A ] .5 mm 2*0 A 2 mm 4 A 3 mm 6 A 5 mm 8 A | 10 mm !i 12 A Far example, assuming we require a resistance far R1 or OJ Q. The calculated current flow indicates that □ 0.2 mm wide track will be acceptable. Plug the value Far R1 into the above formula and using a cross sectional area of 35 pm x 0.2 = 0*007 mm 2 we arrive at o PCB track length l cu of 40 mm. The track must be able lo pass tne current wiihout getting too hot. The table indicates maximum current rating for a given track width: The last consideration is how well copper performs as a resistor. The bad news is that if has a relatively high positive temperature coefficient i.e. os it gets hotter its resistance Increases linearly by 0.4%/"C, A tempera- ture change from +5 Z C to +45° C will result in a 1 6 % change in resistance! The good news Is that the ZXCTl Oxx family of devices hove a negative temperature coeffi- cient. This characteristic is not linear and is not as pronounced os copper (0.25 % / °C between +5 "C and +45 "C) but it does go some way to offset changes bought about by heating R1 . The device will need to have good thermal coupling to R1 to get maxi- mum benefit from this effect. t LOAD byist, A mechanical (pul ley/ string) transmission fa increase the ppr of mechanical encoders is passible In theory but ar the cost of an awkward amount of torque. Also, the sim- plest solution (apparently] or turn- ing the mechanical encoder faster than usual is not viable as It will stress the device beyond its limits. Another alternative is to turn a small stepper motor into an encoder. After all, a stepper motor has permanent magnets Inducing voltages in the rotor coils. Without going Into too much detail, a stepper motor requires two signals with a phase difference of 90 degrees. The voltages generated per coil can then be said to represent a 'Gray code 1 that is, two voltages 90 degrees out of phase. Smaller motors salvaged by ihe dozens from old printers and flatbed scanners ore particularly suited to our purpose as they usu- ally turn smoothly and have a small cogwheel attached allow- ing a larger wheel to be driven. A 1:10 transmission for example easily results in a rotary encoder with 150 or so ppr, which may be very suitable tor tuning a receiver In 1 00 Hz steps. Some printers and flatbed scanners have stepper motors with 1 - or 2- wheel gear reductions an the spindle. The motor used by the author gave an e fleet ive reduc- tion of 1:13 using two wheels, A 6 mm spindle was provisionally mounted on the second cog- wheel and turning the spindle resulted in 1 30 pulses per revolu- tion. In this circuit, voltages supplied by ihe coils in the stepper motors are converted into square wave signals having TIL levels. As with a real’ Bourns encoder, Gray encoded signals are output ar 90 degrees phase difference. The two opamps inside the TL072 case are configured as compara- tors. Thanks to their high gain, even small voltages are reliably processed , enabling your logic to respond when the spindle is turned slowly. The additional hysteresis created with R1 and R2 Is required in view of the 'output' signals typl- ca lly supplied by the stepper motor. This simple circuit is the poor man's equivalent of a very reli- able, high resolution rotary encoder and may also be used !□ decode speed and direction of fast turning spindles on, for exam- ple, electric motors. Mechanical encoders simply aren't suitable for that purpose. See your design in print! Biektor Electronics (Publishing) are looking for Freelance Technical Authors/ Designers If you hove an innovative or otherwise original design you would like to see in print in Europe's /orgest magazine on practical electronics - above average skills in designing electronic circuits - experience in writing electronics-related software - basic skills in complementing your design with an exp/onafory text - a PC email and Internet access for effi- cient 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. Biektor Electronics - K, Waf raven , Head of Design Depf, #0. Box 75, NL-6 1 90-AB Seek, The Netherlands, Fax i (+3JJ 46 4370161 Emaih k.v/alrcrven@segmenhn( i 7 2005 - ddJor drdiEiiiu 75 INFOTAINMENT LABTALK . ■ Korel Walraven ..a good (soldering) exercise The miniaturisation of components does cause the odd bit of trouble at Elektor Electronics as well. While developing last June's Electrosmog Tester our lab suf- fered a few unpleasant set- backs. Read along... i - For the Electrosmog Tester fea- tured in tire June 2005 issue of this year we looked for LEDs that radiated light towards the side instead of upwards, which is usu ally th e case. Normally mis is not on issue. With a standard leaded LED you can easily bend the legs so that the LED can paint in any desired direction. How- ever, with this project we wanted to keep things small and cheap. There are LED-arrays available that can be mounted on the side, but the price of those cannot be called attractive at oil That's why we storied looking in the area of SMD LEDs. By coincidence we stumbled upon □ "right angle LED' from one of the larger manufacturers. To be honest, we didn't know that components with this name existed, and we couldn't quite image who! they where. It was- n't immediately dear In which direction the light left the LEDs. The method of mounting was also a cause for debate. The LEDs had capper surfaces al the ends and on the bottom, while we would have expected con- ductive surfaces along the long edges. This is, after all, ihe side of the LED that is in contact wiih the copper on the RGB. But if wasn't like that. We quickly ordered a few and made the faolprint for the FCB. Everything looked fine. Solder- ing by hand was not a problem. The LEDs are of good quality and ore quite bright. There is also a clear mark lhat indicates the cathode, so making a mis- take is nearly impossible. When the first batch went into production we were still in high spirits. But soon there was a phone call from the contract assembler. The footprint for the LEDs was not correct. On the RGB. the LEDs were rotating on their pads and were pointing in all directions, because ihe pads were loo long and too close fogelhen This required some fur- ther investigation. We studied the datasheet again, and sure enough, the footprint in the datasheet was correct. We had made a mistake. Out of habit, when drawing the footprint we placed the pads with the long sides parallel. That was com- pletely wrong in this case. Now we also understand why the con- tact surfaces are on the ends... To add to our misfortune, we had to solder some thousand fid- dly SMD LEDs by hand... A new botch and new opportu- nities. With the now corrected footprint everything will be all right, we thought. But, and you can see this coming, this was not to be. Another phone coll from the contract assembler: all the LEDs are the wrong way around, ihe cathode and anode were swapped. We didn't understand that. Surely every component can be placed on the RGB rotated at any angle? Since when do oil transistors and elec- trolytic capacitors hove to placed in ihe PCB oil pointing in the same direction? This is true, and applies to all components, except to right angle LEDs. You con turn them around, of course, bur then they will shine ihelr light into o different (and therefore wrong] direction. If the LEDs come with the cathode on the left our of ihe tape, then she cath- ode stays on the left and there is nothing that can be done about it. The surface mount assembly machine cannot turn components upside down. Well, there is no end lo our misforlune. For the second time we had to solder o thousand fiddly SMD LEDs by hand, and design a new PCS... Everything turned our all right in ihe end. We learned our les- son (SMD LED soldering). And, os they soy: ' Practise mokes perfect". ' 350226 - 76 efsklw elecfratirts- 1 1/2C05 76 RETRONICS INFOTAINMEN Analogue Multimeters Jan Bulling The great thing about using an old analogue multimeter is that you find yourself actually thinking before taking c measurement. Questions you ask yourself should include; what value con I expect to see; what range should I select- will the object of my measurement damage the meter, and, where do I plug in the test leads on the meter ? Youngsters used to using DMMs with multi-digit displays and sleek, rugged cases will laugh iheir heads off and simply connect their meter to any circuit with any polarity in any way and wait far any error signal, prefer- ably texted to their mobile phone with a nice ringtone to go with it What do you mean you have to know what you measure? While nor depreciating the huge technical progress vested in digi- tal multimeters, nor their accuracy, ruggedness and low cost, the Instruments make sloppy engi- neers because it Is no longer nec- essary to know what the circuit you're measuring is actually doing. Typically, (he DMM user will initially marvel at the reading on the display and only then attempt to understand the circuit he or she is dealing with. 1 guess (he two analogue multime- ters pictured here differ some 10- 15 years in age. the Simpson Model 260 (series 79] being the oldest. Its black, ABS case is very rugged, with o carrying han- dle that doubles as a tilt stand. With this meter you sure have to know what you're doing os there □ re no fewer than four pairs of input sockets for the test leads to plug into, plus a rotary switch with positions +DC, -DC; AC /DC and 50V/amp/250mV. In goad US tradition, the back panel has a 250+-word safety statement including more don'ts r cautions , warnings ond dis- claimers than useful instructions how to use the instrument. The moving coil meter is proudly iderv titled as a 'taut band suspension' type, while the meter load is stated os 20 kn/V for DC ond 5 kn/V for AC* As usual with these multimeters, high current ( 1 0 A) and high voltage 1 1,000V] measurements require the test leads to be relocated into separate inputs. The Simpson meter is powered by a 1 ,5-V ond a 9-V battery and has no active parts like FETs. The ranges on this instrument are 1mA, 10mA (A], 100mA, 500mA, 2.5V (IV), 10V, 50V fciA), 250V, 500V (1000V), Rxl , Rxl 00; Rxl 0,000, off/transit The meter shown is in mint condi- tion — 1 recently saw one on Ebay fetching about 50 dollars. Genuine AVO' meters are now collectibles! The Philips PM 241 pictured here comes straight ouS of the box, having been in safe storage for I guess about 30-35 years. It is a tyoical example of mid- 1970s case styling using an anodized aluminum front panel (hat's not scratch-proof. The meter scale hos o mirror band to pre- vent reeding errors due ro the parallax effect. In practice, you dose one eye and adjust your viewing angle until just one nee- dle is seen. Again laughter from the DMM generation bur a quick iest shows that the reading accu- racy obtained in this way is bet- ter than 0.5 percent. The PM24 1 is powered by the same batteries as the Simpson 260 and even has a small spool of resistance wire inside to replace the fuse protecting the 3 A range. A narrow pushbutton we thought was labelled '0.4 x 1 ' in (he cen- tre of the rotary switch initially puzzled us but then if fumed out (hat pressing it in the current ranges causes the meter sensitiv- ity to increase by 1/0.4. Weird but useful. This allows a volts scale to be used for belier accu- racy. The ranges of this beautiful meter are 300uA, 3mA, 30mA, 300mA, 3 A, OFF, xlQ, xl OOQ, xl0kQ r 300V (1200V), 120V, 30V, 12V, 3V, U2V, 0.3V (0.06V). Separate test lead inputs are available for the 60 mV and 1 2C0 V ranges. 1 could not resist installing batteries in ine PM241 and put It through its paces. It worked perfectly on all ranges with better accuracy than I will ever require. The Simpson and Philips meters both hove a 'reset' pushbutton operating as circuit breaker to clear an overload condition. In practice, you will hear a click sound when you make a gross mistake in connecting up the meter Finally, two advantages of ana- log ue multimeters over their digital counterparts should not be left un mentioned. Firstly, the old meters will show a trend which is useful In adjustment work — • the movement of a needle being eas- ier to resolve than rolling digits. Second, most of these oldies will double as a relative Reldsfrength meter for transmitter alignment well into the VHF range — just switch !o literally any AC range and use one test lead as an antenna. Re: rentes is a monthly column covering vintage electronics including legendary Essktor design;. Contributions, suggestions and requests are welcomed; pteoie send an email to editor le'e ktor-el sctronics .co. u k , subject: Retromcs E-E. 12 2005 - efcklDf eledrcnia 77 INFOTAINMENT QUIZZ'AWAY Ma rim Onyricriri is a Professor of Electrical Engineering and Information Technology at FH Aachen end a long-time contributor to Ekkfor Electronic}. Through Quizz'oway he aims of stimulating thought, speculation, ccnstnjciion and simulation os well as raise interesting questions. LEDs detect light As is generally known, LEDs are used to generate light That the same devices con also detect light is a less known fact. However, the currents and voltages generated in this way are generally so small as to make practical use almost impossible. Nonetheless v/e will concentrate on ibis 'out of the ordinary' use of LEDs, To measure the current gener- ated by on LED, we use the transim- pedance amplifier shown in Fig - ure 1 . Its function is to turn the cur- rent / generated by the LED into a proportional voltage U f and more specifically at zero bios voltage on the LED, The conversion factor is 1 V per ]00 nA, Offsets, if any, may be compensated using the pre- set in the circuit. We now take a red, a green and a yellow LED and connect them to the circuit one by one, A 0.6-waft minia- ture bulb is used as the light source. The currents generated are listed in +12V Figure I. Trois imped once amplifier. V r Mm * . \ Figure 2. LEDs defecting instead of generating light. Please send your answer to this month's Quizz'away problem, by emoH, fax or fetter to: Quizz'away, Elekfror Electronics, PO Box 1 90, Tunbridge Wells TN5 7WY, England* Fax (#44) (0)1530 200616, Email: edjtorlelekfor-elecfronks.co^uk, subject: 'quizzaway 12-05', The dosing date is 31 December 2005 (solution published in the December 2005 issue). The outcome of the quiz is Final. The quiz is not open to employees of Segment b.v r , its business partners and/or associated publishing houses. I I 1 1 I t I I I I ! I 1 1 I I J I i i i ! I I I I l I l S®0®ti@n 0® : lhie October 2005 problem (p. 78; vanishing voltage) When dimensioning opamp circuits, it is common practice to assume infi- nite open-loop gain H supplied by the opamp. However in the case of the problem we need to see how this assumption can be upheld. Because the circuit operates at a rel- atively low frequency, OP la ampli- fies input voltage U- by 10, while OP I 8 amplifies U m by 100. This makes L/ b into an output voltage, amplified by OPIa's open-loop gain H. So we can write (except for the sign, in view of the inverting action}: 4 ^ 10 ( 4 = Hu m which gives H= 100 U b / U Q However the open-loop gain is fre- quency dependent — the relevant response for the TL082 device from Texas Instruments is shown in Fig- ure 3. Belov/ a relatively low fre- quency [here, about 30 Hz) the opamp exhibits constant high gain (H approaching 200,000) without phase shift. Above this frequency, H drops at a rate of 1 0 (20 dBj per decade at an almost constant phase shift of 90 degrees. This range extends almost to 3 MHz r with the product or frequency and gain remaining virtually constant. This parameter is called the Gain/Bandwidih product [GBP) of the opamp. For □ 1X082, GBP is typically 3 MHz. Consequently, the open-loop gain H will be about 3,000 at 90 degrees phase shift (see also Fig- 78 ddctanl cetera - 12/2005 This 15 th instalment marks the end of the Quizz'away series in Eiektor Electronics. The problems to solve were supplied by Professor Martin Ghsmann of Aachen Technical University. Table 1 . Next, we use a loser pointer for the light source and a red LED as the sensor; As you can see from the table, ibis combination generates a rel- atively high current, providing proof of the laser power. The table has two missing values for you to supply. Table 1 i sn bulb laser - LEU 6 V/0. 1 A pointer red 100 nA 500 nA yellow 150 nA 22 green 30 nA 22 This month's question is: How much current can be expected when aiming the laser pointer at the green and yellow LED respectively? Plus an additional question: For what achievement was Albert Ein- stein awarded the Nobel Prize? Send in the best answer to this month's Quizz'away question and win an with a value of £ 63 . 99 . All answers are processed by Martin Ohsmann in coopera- tion with Elskror editorial stoFF. Results are not open to ciiscus- or correspondence and a iut*y ‘.vinner is drawn in case of several correct answers. Eiektor I SR/C Metier kit Figure 3. Frequency end phase response for TL082 open-loop gain. Figure 4. Upper trace; Uu; lower trace: U a . Table 2 opamp U a GBP (calculated) GBP (lyp*) (datasheet) TL032 80 mV 3,1 MHz 3 MHz TL062 250 mV 1 MHz 1 MHz TLC272 100 mV 2.5 MHz 2 MHz MCI 458 200 mV 1 .2 MHz 1 MHz NE5532 i 8 mV 31 MHz 10 MHz ure 3). This allows us to calculate the results: at U e = 250 mV e fj we get U b - 10 2.5 V* Hence we have L4_ = U ^ / 3,000 and we can write 100x2.5 V e ff/ 3,000 U c ~ 83 mV eff The actually measured value of 80 mV seems to agree well with the theoretical result. LC will lead U D by 90 degrees. The two output voltages are shown in Figure 4, which proves their phase difference. The levels of U a and L/^ may be verified using the scaling factors. The same experi- ment was repeated using other opamps. The results appear in Table 2. n I 1 l J i l I I E I 1 I I 1 1 1 1 I I I i I 1 1 I I 1 1 I 4 12/2005 - cfsVier eh {Tronic 79 LEKTO j SHOWCASE To book your showcase space contact Huson International Media Tel, (0) 1932 564999 Fax 0044 (0) 1932 56499S ALLGOOD TECHNOLOGY vayw. Elf g oo d: ecb n ol o gy, co m Low-medium volume sub-contract assembly* SMTT specialist since 1990. Customers include military, aerospace etc. 0402 to BGA capabilities, automatic assembly and hand built prototypes. . — u; ti t -ii BETA LAYOUT vw/v/.pcb- pool .com Beta layout Ltd Award- winning site in both English and German offers prototype RGBs at a fraction of the cost of the usual manufacturer's prices. GAIIMV "TTTTTT £ ■ il | t E 1 DESIGN GATEWAY vrmv . d es i gn - g ate way . go m PaimLoglc 11 USS 399.00 * Compact Leg e Analyzer iLHGmm x W73,3mm > I3mm) * High sampling rate (400 MHz/ 8c1l 200 MHz/1 6ch, 100 MHz/32ch) * USB 2.0 high speed mode * SMB memory storage * Bus Analyzer function * Multiple waveform windows * Waveform save/restore GATGUJAV DESIGN GATEWAY vavv/i d esi g n -gs ie way. com 1 1 ■ ^ > t t < >ti True PCI Starter Kit .... US$1 35.00 i ■ PCI Development Kt ■ Based on 200,000 gates FPGA • Extension conneciors for 72 pin I/O true pd • Configuration support for JIAO and slave serial • Free PCI Core for Target Mode DESIGN GATEWAY □tN: GATEUJAV C t * * a r l i -t i 2 t j n -caieway.com Ethernet 10 ...US$1 15.00 * 8 bits embedded network microcontroller * 6 channels available for 10 bits ADC * Ethernet 1 0 BASE T 1 0 Mb &h-is=rn^t io * UART port RS23ZRS4B5, Max Speed atl 15200bps * 35 bits general purpose i/0 * 500 bytes user area flash memory 5A TEUJA¥ C a n | t ■ | L i a > i ■ - DESIGN GATEWAY yay,y ce vav.cor. VariClock ...USS1 63.00 • Adjustable clock signal synthesizer • 3 rotary switches for frequency setting • Standard DIP pin arrangement ■ Support both 3V 5V by on-bo ard regulator VC250M14P Requency range : 25-400 MHz Frequency setting : 11.1Hz step VC 1 C 0 M 1 4 P Requency range : 2 5 - 1 fl D ! A Hi Frequency setting : lOO kHz step for 25- | 50 Mite : 2 00 kHz step for mere tnsji 50 MHz BURN TECHNOLOGY LTD http :/; www, bu r n tec . com Test El Measurement Equipment Distributors • Anemometers * Clamp Meters * Light Meters • LCR Meters • Sound Meters * Multimeters * Device Programmers Burn Technology Limited, Winfrrth Technology Centre, Dorchester. Dorset,. DT2 SDH Tel: (01305) 852090 Fax: (01929) 463214 COMPUCUT nil p: * www, compu cutters .com Computer Numerical Conlrol from your home PC. Great for tricky jobs, and accurate repetitive work. V/e supply: - Software - interface - Manual - Support Price £250 plus postage. CONFORD ELECTRONICS h tip : www. eon f o rd el ec . co . u k Lightweight portable baftery/mains audio units offering the highest technical performance. Microphone, Phantom Power and Headphone Amplifiers. Balanced unbalanced signal lines with extensive HR protection. EAGLEPICS h ftp:// www. e ag I epl c s.co . uk Embedded Internet Solutions * Stand alone TCP/IP module • Platform independent • Simple i! AT-!ike J[ command set • GPRS or modem connection * E-Mail, FTP, HTTP, UDP * Development board available * Free development utilities • Free UDP-only stack EASYSYNC http : ■ w w w. a asysy n c .co . u k EasySync Ltd sells a wide range of single and multi- port USB to BS23ZRS422 ana R5485 converters at competitive prices. DANBURY ELECTRONICS http :h wvav. I iv i no intb epasL demon.co.uk Here you will find our mains and output transformers in Mike Holme's range of valve tube amplifiers (PP El SE). Also circuits, parts lists, chassis, advice. ELNEC r . k rw,. einec.com device programmer manufacturer selling through contracted distributors all over the world universal and dedicated device programmers excellent support and after sale support free SW updates reliable HW once a months new SW release three years warranty for most programmers FUTURLEC http:/ ■ w ms. f uturl ec.c o m Save up to 60% on • Electronic Components • Microcontrollers, PIC, Atm el • Development Boards, Programmers Huge range of producis available on-line for immediate delivery', at very competitive prices. FUTURE TECHNOLOGY DEVICES http : i w'ww. fid ichip. com FTD1 desions and sells USB-UART and USB-FIFO interface Lc.'s. Complete with PC drivers, these devices simplify ibe task of designing or upgrading peripherals to USB IPEVA LIMITED http: wyay joBva.com IPEVA sell low cost USB FPGA development boards. IPEVA provide Design Consultancy for Embedded Systems, OpenCores-IP. FPGA. ASIC. HDL translation and migration. Tel. G87D 08G 2340. JLB ELECTRONICS v, 'w w.j Ibelec tram cs . co m Suppliers of electrical / electronic parts and consumables. Including: * Cable iies bases * Tools /hardware * Bootlace ferrules * Connectors * Solvent sprays & cleaners * PVC Tape * Heat Sink compound LONDON ELECTRONICS COLLEGE Vi iY iV. ? 8C , 0 TO . U r\ Vocational training and education for national qualifications in Electronics Engineering and Information Technology iBTEC First National. Higher National NVGs, GCSEs and Advanced Qualifications). Also Technical Management and Languages. 80 s!* fetor ds^Gnits- 12 7 DOS MQP ELECTRONICS h ftp : q p elec Ironies xo.uk Leaders in Device Programming Solutions, • Online shop * Low Cost Adapters for bEE Programmers * Single Site and Gang Programmers • Support for virtually any Programmable Device NEW WAVE CONCEPTS vm vs , n e w -wa ve-co n cspts.com Software for hobbyists: ■ Livewire circuit simulation soft ware, only £34.99 ■ PCS Wizard circuit design «*« software, only £34.99 “ Available from all Maplln Electronics stores and www.maplin.co.uk. OLD COLONY SOUND LAB v.v. v, caudioXpress.com Premier source for DEY audio for 35 years! New catalog features: * Books * CDs * Tesi & Measurement •Kits Full range of products and magazines for the DJY audio enthusiast! PCB WORLD hiip.: / vww.pcb1vorld.0rg.uk World-class site: Your magazine project or prototype PCB from the artwork of your choice for less. Call Lee on 07946 846159 for details. Prompt service. QUASAR ELECTRONICS , iv l Q ua s arE tectr n ics , co m Over 300 electronic kits, projects and ready built units for hobby, education and industrial applications including PIC/ATMEL programming solutions. Online ordering facilities. Tel: +44 (0) 870 246 1826 Fax: +44 (0) 870 4601045 E mai I: safe s@ Q u as arEl ectron i cs, co m QUASAR electronics ROBOT ELECTRONICS httpv'/wvWi'.roixit- efectronicsxo.uk • Ultrasonic rangefinders • Motor H-Bridge controllers • Magnetic Compasses • RC servos and controllers SK PANG ELECTRONICS h ftp:/ v, f ;v w. £ kp a n c . co, . u k • ELM DBDII 1C • VAG-COM Interface • OBDII connector and cable • Modironix Micro X board • Embedded Ethernet Controller • PIC Microcontroller, CAN Bus driver Major credit cards taken online. SYTR0N1C TECHNOLOGY LTD w ww . m 2mte : e m e i r /. com Supplier of wireless modules and accessories for remote monitoring M2M applications. • GSM/GPRS TCP/IP modules • Embedded GSM GPRS modem • Development Kits • GPS modules • GSM/GPS antennas • Adapter cables Online ordering facilities. Tel (013941 210911 * PIC programmers and components • Electronic Design/Development and Manufacturer to industry SHOWCASE YOUR COMPANY HERE Elektor Electronics has a feature to help customers promote their business. Showcase - a permanent feature of the magu/tne v, here you will be able to sh ov. case your produc Ls and s ervi ees. * For just £220 + VAT ( £20 per issue for elev en issues I Elektor will publish your compnm name, website adress and a 30- word description I wish to promote my company, please book * Text insertion only for £220 + VAT * Text • For £330 t YAJ for the year (£30 per issue for eleven issuer vve will publish the above plus mn a 3cm deep full colour image - e.s. a product shoL a screen shot from your site, u company logo - your choice Places are limited and spaces will go on a strict! y come, llrsi served basis. So please fax back vour order today! niv space: and photo for £330 - VAT ULTRALEDS Ulirsleds.^ trttpi/Avwvv. ultra] eds. CO- ti k tel: 0871 7110413 Large range of low cost Ultra bright leds and Led related lighting products. Major credit cards taken online with same day depatcb. NAME: .. JOB TITLE: ADDRESS:...,,,,., ...... .ORGANISATION: i _ j. _____ T B . , . B , t a - - - - -r m i n i ■ n m * ‘ s it, TEL:.... [ PLEASE COMPLETE COUPON BELOW AND FAX BACK TO 00-44-1 0 i i 932 564998 ! COMPANY NAME 1 WEB ADDRESS 30-WORD DESCRIPTION r aa r a ‘■---rs-'BTa t __ — - Ta-ra-aa * -S T !f r v ■ - T T 1 tb aa ar a USB INSTRUMENTS hitp;/Avmv.L]sb - i nstru men taxon USB Instruments specialises in PC based instrumentation products and software such as Oscilloscopes, Data Loggers, Logic Analaysers which interface to your PC via USB VIRTINS TECHNOLOGY ftp:. www.virtmsxom PC based virtual instrument for electronics enthusiasts, students and professionals, including full-fledged sound card real time Oscilloscope. Spectrum. Analyzer and Signal, Generator, Dovmloader and try. ELECTRONIC ENTHUSIASTS Gnfy ofte magazine tests its projects and drains in rts own lab before publication ELEKTOR ELECTRONICS THE ELECTRONICS £ COMPUTER MAGAZINE ss m Contact;: Worldwide Subscription Service Lid, Unit 4 Gfbbs fieed Farm, Fashfey ftORd, Ticehurjt TNS 7HE Telephone: 015H0 2006B7 Fax: D150O2OO&16 www.elektor-ejert ronlcr.co.uk 17 ?QD5 - sleklar elcClicRtu 81 Contains 8 push to make switches with upstream and downstream D-type connectors Further E-blocks can be connected to this Switch board. two Starter Kits E-folocks Starter Kit professional I 1 FI owe ode for PIGrn re m MG Us ¥2 C D BOM Pro versi on £11 8.00 Flowcode is a very high level language programming system for PIC- micro microcontrollers based on flowcharts. Flowcode allows newcomers to programming to design and simulate complex robotics and control systems in a matter of minutes. The use of macros allows students to control highly complex electronic devices without getting bogged down in understanding the programming involved. Flowcode is a powerful rapid development tool and is also useful as a means of introducing the need for C and assembly programming. Pro versions indude RS232 comms, JDRA comms, Keypad control, multiple servo control, on-board EEPROM routines. Dutch and German language pack available. 1 LCD board £ 19.30 16 character, 2 line alphanumeric LCD display on a 4 wire serial bus Flowcode macros for driving this E-block are available. Extra: PIC16F877 microcontroller E-blocks Starter Kit professional Special offer. £ 166,00 E- blocks Starter Kit basic 1 USB Multiprogrsmmer £ 77,30 This new PICmicro microcontroller programmer connects to your PC via USB to provide you with a low cost flexible PICmicro microcontrol- ler programmer for development and programming use. This board can be used with Assembly, C or Flowcode programming utilities provided by Matrix Multimedia. The board will program a range of 8, 18. 28 and 40 pin PICmicro® microcontroller devices from the 12, 16 and 18 series PICmicro range, using the programming software provided. A P1C16F88 device is included. Special offer: £ 96,00 Learn more about E-blocks? For more information, visit Ordering Use the order form at the back or go to wvAyglektor-electfchics,dd.irk E-blocks will be shipped after receipt of payment. Prices are exclusive of postage. ;w_ e!ektor7el ectrdn ics . cauk ebioc ks 3 LED board £ 14,65 Contains 8 LEDs with upstream and downstream D-type connectors. Further E-blocks can be connected to this E-block. — ‘5*- — — r — - - r O Q m Jl j y -t5 kt . - Order online at www.elektor-electronics.co.uk Order now using the Order Form in the Readers Services section in this issue * ESR/C Meter (September 2005) Kit of parts including PCB. default LCD module, 2x16 characters and programmed controllers. Enclosure not included, 040259-71 £ 63.99 / S 1 1 9.95 Elektor Electronics (Publishing) l Segment Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 (0) 208 261 4509 Fax: +44 (0) 208 261 4447 Email: sales@elektor-electronics..co.uk Dire io practical constraints, final ilfustraifons and specifications play differ from published designs. Prices subject to change See www.eleKt of- efectmnjcs.co.uk for up to date Information, B.V. Matching enclosu 040259-72 £ 6.99 /$ 12.95 Electrosmog Tester (June 2005) Ready-built PCB (excl. enclosure) 050008-91 £ 50.00 / S 94.25 Matching enclosure 050008-71 £ 10.25 /S 19.30 Further products from Elektor Electronics; READY-BUILT PROJECTS ClariTy 300- W Class-T Amplifier 03021 7-9 1 Amp&fier board wtn SMDs prilled; corns for LI & L2 34.50 Flash Microcontroller Starter Kit 010208-91 raady-iKSembfetf PCS hcL softnae, cstfe, adapter & fefeted artides 69 00 Gameboy Digital Sampling Oscilloscope (GBQSO) 990082-91 ready-assented board, reithePC software and related articfes 1C&C0 Micro Webserver with MSC121G Board 030060-91 Microprocessor Board, ready-assembted 75.90 C44G25-91 NstwvrV Exier^n Erard ready • -assemtfed 44.59 044020-92 Conned package (030060-91 & &44026-91 & related article) 117-50 LPC210X ARMee Development System 040444-9 1 Processor board, readymade and tested 55.70 1 1 2,50 183.00 14235 63.35 £20,95 25 50 48.05 ! NO. 349 DECEMBER 2005 From A to D via USB 050222-1 PCS 7-95 14.95 £50222-41 FCkV24-P, _ 9-40 17.75 Telephone Supervisor 05003941 P tC 1 6F62&-20P, programmed 8-20 15,55 050039-SI CD-fiOM. PIC fiot & source codes. LCM Firs! Server 6-90 12.95 1 NO. 348 NOVEMBER 2005 Remote Control by Mobile Phone 040415-1 PCB 6-20 11.55 040415-11 C £.« 3 iC ei.'cb i he.* f ps 520 975 0404 1 5-4 1 ? i C 1 c r 8 4 4-2 Q r. r r ~C ^ rr T-e I 1030 19.50 Synchronous Servos (@003 1 -1 T D.ik. c r G eel £-: fr. 1 - am 5 '20 975 020031-41 ATQO^aia-lOPC^progarmnfid 785 14.65 INO. 347 OCTOBER 2005 27C512 Emulator 030444 - ; 1 D sk : : ft v. a -b 5-20 9.75 030444-31 EF,M7C64SLGt4-15 prcg.-amn^j 27 50 51,95 030444-41 AT95SS515-4PC. prog'afn^ed 15-10 28.35 Kits & Modules OBD-2 Analyser (July/August 2005) Kit of parts including PCB, programmed controller, compo- nents (including IC7 ; IC3 - PCA82C250, 12V), enclosure and RS232 cable. OBD cable not included. 050092-71 £ 52.50 /S 96.95 OBD cable 050092-72 £ 27.55 /$ 51.95 Temperature Logger (June 2005) Complete kit of parts including components. PCB and program- med controller 030447-71 £ 25.85 / S 48.75 Colossus Jr. 040257-1 1 G ck. PIC iCurct code 040257-41 P1C12F575-C P. p ? cc J imT = 2 Flash Lock for PCs 050107*41 ?;ci£Fn2£A~ SC c'c-rammed 0501 07-81 C D 0 V p rt ect sc ftw = rs 5-20 410 5-00 B9Q 975 5.35 045 12.95 I NO. 346 SEPTEMBER 2005 ESR/C Meter 040259-1 FCB. bare 12-40 53.35 040259- 1 1 D = - PiC 5 re* cm* 5-20 975 C40259-4 1 PEClEF 677-2 0 = : = - : : ;ra 15-50 29.25 040259-42 PtC ' 6- 5- 4-20 P p ' >2 je _ ~ = z 10 30 19.45 040259-7 1 k ! i 1 cB'tB w. ; t*b l • ■: nci-c i _ ■ b 6399 119,95 04 025 9-72 r - z e _ ^ ' e- £-99 1295 Hitting the High Note 040015-41 Airosgsg-ieFC prMfarrrrsd 15-50 25.25 0400 1 5-1 1 D 'tY/.antrese&cfr.eD.u k ................. .23 Bets Layout Showcase . . . . . ...... «?**- 23. 30 Bitscope Designs , . . i 7 txtscops. com ............... .29 Breads oarding Systems ........... -a\\w breatfesafo ig.cv. .3 Bum Techipotogy LTD. Showcase - r, ntec.ee jrr ... ........ .30 CMS . . .. ... AY,YK(Z7teMk-Cam ... .17 Compile ui Showcase ... .......... .,j;vv. fnpisstj!!ets.csm ..... ... 80 Contort Electrodes. Showcase .wwv confofdeleGX o.u- ........... ... .80 CnckJewood toWMCfiWswootfeltclfmics.GGfri 59 Da nbury . S h owes se wv. v. .. ng> - theca st. usni op co.u.k .80 - = ^ . =.. — SO Eagtepics. Showcase ^v.w.ssgisf.r^ co.uk .80 Easysync. Showcase viva; easysync.co.^}; . _7 r fi0 aiec. Showcase wv. w.e. nsc.com 80 Eurocircuits \\vm,tfteacbstiop.CQfi} . . ............. .6 EspressFCB ... .-avav oxpfsssfico.com 17 Fast Components .................. mwJsstconipQfi&its.CQ.Lii - ,59 Forest ............... .... irw7Kfoietf.C0.vV ........ ....... ,59 Future Tec Urology Devices, Showcase . . .araw. cc rM p.ccm ......... ,80 Futurtee. Showcase /Aw/.ftihuiec. com ............... ........BO tpeva Limited, Showcase ... iv-v/w-rs-a. ccm ..... ....... .80 Jaycar Electronics * .vws.jzy&fe&zirorccs.ca.bi 2 JLB Electronics, Showcase mm^hstsctroruLs.com ............ .80 LaUcenier iww 'zbcontercoA* .88 Uchh&ld Electronics . _ .vniv. •. : - Ts/detectra ~ rs.es _ .17 London Electronics Cotege. Showcase . cc.c-rg...- .......... .......... .60 MOP Electronics, Showcase ........ , ,hv.v. mppe ectfor cs.co .- ........ . 81 New Wave Concepts. Showcase av/N Flash Microcontroller Starter Kit £ 69.00 . es srcd Item d^schptions subject to change. Tbs publishers reser/s tfe right to eftanp prices without prior notffisatmn. Prices aud item descriptions shown fere supersede those in previous issues. E & Q.E Sub-total P&P Total paid SWITCH unYf. issue number t fame Address • Postcode Tel rex ~ ~ ’ Dale - 2C05 Signature Eli 2 METHOD OF PAYMENT (see reverse before ticking as appropriate} Note: cheques not made out in sterling must be increased by the equivalent of £15.00 | ~[ Bank draft [ | Cheque (payable to Eleklcir Electronics Publishing) □ Giro transfer (our amount no.. 34 152 3301 ) l~j Po s t a If mon e y o rd e r □ at 7 sits; Please sens this order fc r ni ic " see te va rs s fa r car tifo a ~ s Elektor Electronics (Publishing) Segment B.V. Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel : (+44) (0) 2Q8 261 4509 Fax: (+44) (0) 2 OB 261 4447 i nteme t: v/w/. elektor-electron icsxa u k 'USA apt Canada residents may rism ire not obligati to) us? 5 p rices, and sand the ordei form to: Q 1 C jion: Sound _-a: r v 9 :m 3/5. ? cl t~. b 310’jgr. HH 03453 - 0373 . Tel. ( 603 } 924-5371 92 A-GS 26 Fi ► • 1 503 1 53-’9A57 Entail: custs^rvg a udsoJfpr65s.com »*#■*#■*■«* ■ ■ - >E * * PTl'l Yes, 1 am faking out an annual subscription f© elektor electronics and receive a free 1 W Luxeon LED Torchlight. I would like: | | Standard Subscription (11 issues) I | Subscription-Plus (11 issues plus the Elektor Volume 2005 CD-ROM) T Offer available to Subscribers who have no! held a Sasser pica to Bek tor Electro mes fa the last 72 Months. Offer Subject to Ava : 'sb2ty. 5=5 reverse far miss end cor.nwons. i fife : Q •" l *r \ f rs Ms ’) in itia ts Some me A fame Address - Pcs: cods Email Date - -2005 Signature " cross out what is not applicable ELI 2 METHOD OF PAYMENT 5== re. s' s= bofo'e treking se appropriate j Note: cheques not made out in sterling must be increased by the equivalent of £15.00 Bank draft j | Cheque ( payable la Efeklor Eectronics Publishing) □ Giro transfer (a jr account ns 34 7-52 233" □ Postal/money order Expiry date Please 5erD this order form to Elektor Electronics (Publishing) Segment B.V. Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom 7e . +44 0 20 S 261 45G9 Fax: 1+44) iO) 206 261 4447 1 n Se • n s ■ w v. . a e kio ;-e la c it o n i cs. c c u k s vb sc r m ri on $ : -i s ! ok io r-e la ctre fries, go. u k ORDERING INSTRUCTIONS, P&P CHARGES E ' c?pt in the USA and Canada, ai orners, ex cept. for subscriptions for hrch see below), most be sent BY 3 0ST or FAX to oar Brentford address using re Order Form overleaf* On-line ordering: http: ww.elekior-etectrQnicsxo.uk Readers in the USA and Canada may ihut are not obliged to send orders, except for subscriptions for which see below ■, to the USA address given on the order form. Please apply to Old Colony Sound for applicable PSP charges. Please allow 4-6 weeks for delivery* Orders placed on our Brentford office m jsi mclude PSP charges (Priority or Standard: as follows: UK: £4.00 Europe: £5.00 (Standard) or £7.00 (Priority) Outside Europe: £8.00 [Standard's or £12.00 (Priority) H O W TO PAY Unless you ha.e an approved credit account with us. all orders must be- accompanied by toe f . payment including postage aid packing charges os slated above. Payment may be made by diaque drawn on a London clearing bank but see pare. 4 below), postal order VISA. Access, MasterCard or EuroCard (when paying by credit card, the order must go the cardholder's address). Do not send cash through the mail Cheques and posiu oners should be crossed arc made payable to ‘Elektor Electronics (Publishing)', Payment may also be made l. direct transfer from a pri.ate or business Giro account to our Giro account No. 34-152-3001 by completing and sending to the National Giro Centre, in a National Giro post- age raib envelope. 3 Matron a: Giro pansier deposit form. Do rot sera Giro transfers direct to us. as this will delay ymm order. If you live outside toe UK. pay mast may also be made by Bankers' sier ing draft drawn on a London clearing bank. Eurocheque made out m pounds sterling . with holder's guarantee card number written on the back:, or US or Canadian dollar cheque drawn on a US or Canadian back, if you pay by Bankers' ster- ling draft, make clear to the issuing hank that your full name and address MUST be communicated to the London clearing bank. Our bankers are NAT WEST PLC. 1 St James's Square. V/adhurst. East Sussex TN5 6BH, England. Our account number Is 3512 5225. Sorting Code 60-22-15, IE AN code; GB40 NWB K6 022 15 3512 5225 BIC code: NWB KGB 2L COM PON ENTS Comporiems for projects appearing In Elector Electronics are usuaff, available from certain advertisers in this magazine. If difficulties in the supply of components are envisaged, a source will normally be advised : n the article, Nate, however that the sourcefsj given is are) not exclusive.. TERMS OF BUSINESS Delivery Although every effort will be made to dispatch your order within 2-3 weeks from receipt of your instructions, we can not guarantee this time scale tor an orders. Returns Faulty goods or goads sen in error may be returned for replacement or refund, out not before obtaining our ::nswit All goods returnee should be packed securely m a sac dad bag or box. enclosing a covering letter stating the dispatch note number: If the goods are returned because of. a mistake on our part, we will refund the return postage. Damaged goods Cia ms for damages goods must be received at ourTunbridge Wells office within 10-days (UK); 14-days (Europe) or 21-days (all other countries). Cancelled orders All cancelled orders will be subject to a 10% handling charge with a minimum charge of £5 00, Patents Patent protection may exist in respect of circuits, devi- ces, components, and so on,, described in our books and magazines. Elektor Electronics (Publishing) does not accept responsibility or liability for fat ng tc identity such patent or oilier protection. Copyright AH drawings, photographs, articles, printed circuit boards, programmed integrated circuits, diskettes an: software carriers published in our banks and magazines (other than in third-party advertisements) 3f= copyright ana may not he reproduced or transmitted in any term cc by any means, including photocopying and recording, in whole or in part, without the prior permis- s on of Elektor Elscircnlcs (Publishing! In writing. Such written permission most a' so do obtains before an,, cert of these publications is stored in a retrieval system of any nature* Notwithstanding Ihe above, printed-circuit hoards may be produced for private and personal use without prior per- mission. Limitation of liability Elektor Electronics (Publishing) shall not ce liable in contract* tort, or otherwise, for any loss or damage suffered ty tie purchaser whatsoever or howsoever arising m of. or in connexion with., im supply of goods orsaniHs by Oektar Electronics F.,z shine* other Tar tc suppri goods as described or* at the option of Elektor Electronics ( Publishing j, to refund the purchaser any mousy cs a in respect of the goods.. Law Any question relating to the supply of goods and services by Elektor Electronics (Publishing) shall be determined in all respects by the laws oi England. 1 I » » ■ . T i I II 1 .1 1. * t a A i . 4 l i i . . . . i . * . . . . i, . , J , January 2035 SUBSCRIPTiON RATES FOR ANNUAL SUBSCRIPTION United Kingdom Standard £41.90 Pius £48,80 Economy Mail Rest of the World 1 excluding Europe' £54.50 £61.40 Priority Airmail Europe & Eire £54,50 £61.40 Oulslde Europe £63.90 £75.80 Airfreight USA & Canada only US$95,50 US$106.50 Payment should be made by: - Cheque or bankers 1 draft in sterling drawn on a London clearing bank (except in the USA and Canada — see below); * OSS cheques drawn on a US or Canadian bank — only by subscribers in the USA or Canada. * I Hi transfer to our bank NAT .VEST PLC. 1 St James's Square. Wadhursty East Sussex TN5 6BH, England). Our account number 5 35:2 5225. Sorting Code 6D-22-1 5. IBAN code: GB40 NWB K6 m 15 3512 5225 SIC code: NWB KGB 2L * Postal order. * Credit : a rtf: VIS A AC C ES S. Eu ro IvlasterCa rd . JC E El ectro n or £ w ftc h * * Transfer to our Gifu Account number 34 1 52 3801. Giro transfers should be made by completing and sending the appropriate transfer deposit form tc the National Giro Centre (UK) or to your national Giro Centre* Cheques and costal orders should ;:e made payable to E sttor Electronics (Publishing), Do not send cash through the mail. SUBSCRIPTION CONDITIONS The standard subscr ption order period m twelve months. If a permanent change of address during tie subscript Ion period means that copies have to ce despatched by a more expensive service, no extra charge will be made. Conversely no refund will be made nor expiry date extended, if a change of address allows the use of a cheaper service. St u d e Fit a ppMc atio n s, w hich m a i ty fo 1 a 2 0% ( iw an ty a ercent - re d u cti 0 n in current rates, must be supported by evidence of studentship signed by the head of Ihe college, school or university/ faculty A standard Student Subscription costs £33.50 a St: dent Subscription-Plus costs £40.40 (UK only)* Please note that new subscriptions take about four weeks from receipt of order 10 become effective. Cancelled subscriptions will be subject to a charge of 25 : ^ il\ven;y- fi/e per cent; of the full subscription Dries or £7.50, whichever Is the higher plus the cost of any issues already dispatched. Subsections cannot be cancelled after they have run for six months or more. January 2005 Straight from f electronics < heart OPTOELECTRONICS & DISPLAY Electronic Warfare - Christmas Holiday Projects Select your own annual subscription and receive a free 1 W Luxeon LED Torchlight Elektor Electronics annua! subscription (standard) You receive 11 issues, including the Juiy/August double issue Elektor Electronics annual subscription-PLUS You receive 1 1 Issues, including the July/August double issue plus a copy of the Elektor Electronics Volume 2005 CD-ROM (normal price Cl 6.25). Your saving: approx. £10.00! Next Issue Available options Please fill out the Order Form with this issue. Subscription rates and conditions may be found at the back of this issue 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. in Version 6.8 • Interactive Design Rule Check. • Mitring / Unmitring. • Enhanced track editing. • Struct/Array expansion. • ELF/DWARF file loader. • Expanded model libraries. Call Now for Upgrade Pricing • Berkeley SPICE3F5 simulator with custom extensions for true mixed mode and interactive simulation. • 6 virtual instruments and 14 graph based analysis types. • 6000 models including TTL, CMOS and PLD digital parts. • Fully compatible with manufacturers' SPICE models. www.labcenter.c0.uk info@labcenter. to. uli • Supports PIC, AVR, 8051, ARM7 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 Mixed Mode SPICE Circuit Simulation