leading the way Lero L?ain mod Darkness Ac)ir*l d Alarm July/August 2004 £5.50 The leaders in PIC development EASE OF USE ♦ ♦ ♦ ♦ All you need to get started with PIC Industry standard/quaiity board Open the box and get coding Available with C compiler or_ use our PicScript to write programs using simple commands... NO ASSEMBLER, NO COMPILER, JUST WRITE AND RUN AUTOMATION SCRIPTABILITY PicDev Board with PicScript PicDev Board with C Compiler £9 9.00 (plus p+p) £165 u 00 (piusp+p) This is a complete development suite This is a complete development suite for for the novice or non programmer. the more advanced programmer. it is shipped with: It is shipped with: • PicDev Board . PicDev Board • PicShell and PicScript software ° PicShell and PicScript software . Breakout board . C compiler Cables . Breakout board . Example scripts . Cables . Example scripts • !CD1 Both i te ms requi re T o o r d e r " 4 l Wit 11 iCLUll puit Power supply adapter ww vcpagm. co uic s ale&Jr pagm,co*u k Tel: -44 (0)1792 891927 Quasar Electronics Limited PO Box 6935, Bishops Stortford, CM23 4WP Tel: QB70 246 1B26 Fax: 0870 460 1045 E-mail: salesigquasarelectranicsxom Add £2.95 P&F to all UK orders or 1st Class Recorded -£4.95, Next Day [insured £250) - 17 . 35 , Europe - £5.95. Rest of World - £9.35 (order online for reduced price UK Postage). We accept all major credit 1 ' debit cards. Make cheques/PO's payable to Quasar Electronics. Prices include 17.5% VAT. Call now for our FREE CATALOGUE with details of over 300 kits, projects, modules and publications. MAIL ORDER ONLY. QUASAR electro n ics ti&tfng yea tn&B ths ri^sf c craecflmf CREDIT CARD SALES 71 Motor Drivers/Controllers Here are just a few of our controller and driver modules for AC, DC, unipolar/bipolar stepper motors and servo motors. See website for full details. DC Motor Speed Controller (5AJ1G0V) Control the speed of almost any common DC motor rated up to 1 G0V/5A. Pulse width modulation output for maximum motor torque at all speeds. Supply: 5-15VOC, Box sup- plied. Dimensions (mm): 8QWx1 OOLxSQH. Kit Order Code: 3Q67KT - £12.95 Assembled Order Code: AS3067 -£19.95 NEW! PC l Standalone Unipolar Stepper Motor Driver Drives any 5 T 6 or B-Eead unipolar stepper motor rated up to 6 Amps max. Provides speed and direc- tion control. Operates in stand-alone or PC- controlled mode. Up to six 3179 driver boards can be connected to a single parallel port. Supply: 9V DC. PCB: 8Gx50mm. Kit Order Code: 3179KT - £9.95 Assembled Order Code: AS3179 -£16.95 PC Controlled Dual Stepper Motor Driver Independently control two unipolar stepper motors (each rated up to 3 Amps max.) using PC parallel port and soft- ware interface provided. Four digital inputs available for monitoring external switches and other inputs. Software provides three run modes and will half-step, single-step or man- ual-step motors. Complete unit neatly housed in an extended D-she!i case. All components, case, documentation and software are sup- plied (stepper motors are NOT provided). Dimensions (mm): 55Wx70Lx15H. Kit Order Code: 31 13KT - £15,95 Assembled Order Code: AS31 1 3 - £24.95 NEW! Bi-Polar Stepper Motor Driver Drive any bi-po [a r stepper motor using externally sup- plied 5V levels for stepping and direction control. These usually come from software running on a computer. Supply: 8-3 QV DC. PCB: 75x85mm, Kit Order Code: 31 58KT -£12.95 Assembled Order Code: AS31 58 - £26,95 '■ . 11*1 i - Most items are available in kit form (KT suffix) or assembled and ready for use (AS prefix). Controllers & Loggers Here are just a few of the controller and! data acquisition and control units we have. See website for full details. Suitable PSU for all units: Order Code PSU445 £8.95 Rolling Code 4-Channel UHF Remote St ate-of-th e-Art. High security, 4 channels. Momentary or latching relay output. Range up to 40m. Up to 15 Tx + s can be learnt by one Rx (kit in- cludes one Tx but more avail- able separately). 4 indicator LED 's. Rx: PCB 77x85mm, 12VDC/6mA (standby). Two and Ten channel versions also available, m Order Code: 3I80ICF - £41,95 Assembled Order Code: AS31 80- £49.95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port. °C or °F. Continuously logs up to 4 separate sensors located 2Q0m+ from board. Wide range of free software appli- cations for storing using data. PCB just 38x38mm. Powered by PC, Includes one DS182Q sensor and four header cables. Kit Order Code: 3145KT - £19.95 Assembled Order Code: AS3145 - £26.95 Additional DS1 820 Sensors - £3.95 each NEW! DTMF Telephone Relay Switcher Call your phone number using a DTMF phone from anywhere in the world and remotely turn on/off any of the 4 relays as desired. User settable Security Password, Anti- Tamper, Rings to Answer, Auto Hang-up and Lockout, includes plastic case. 130x1 10x30mm. Power: 12VDC. Kit Order Code: 3140KT - £39.95 Assembled Order Code: AS3140 - £49.95 Serial Isolated L/G Module PC controlled 8-Relay Board. 1 15/250V relay outputs and 4 isolated digital inputs. Useful in a variety of control and sensing applications. Uses PC serial port for programming {using our new Windows interface or batch files). Once programmed unit can operate without PC. Indudes plastic case 130x100x30mm. Power Supply: 1 2VDC/500mA. Kit Order Code: 310SKT - £54.95 Assembled Order Code: AS31GS- £64.95 Infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control unit. Toggle or momentary, 15m + range. 112x122mm. Supply: 12VDC/0.5A Kit Order Code: 3142KT - £41.95 Assembled Order Code: AS31 42 - £51.95 PIC & ATMEL Programmers We have a wide range of low cost PIC end ATMEL Programmers. Complete range and documentation ava liable from our web site. Program mer A ccess on e s : 40-pin Wide ZiF socket {ZIF40W) £15.00 18V DC Power supply (PSU010) £19,95 Leads: Parallel (LEAD108) £4,95 I Serial (LEAD76) £4,95 / USB (LEADUAB) £2.95 NEW! USB TUI-Flash" PIC Programme^ USB PIC programmer for all ‘Flash’ devices. No external power supply making it truly portable. Supplied with box and Wi n d ows S o ftwa re . Z I F So cket and USB Plug A-B lead not incl. Kit Order Code: 31 2SKT - £29.95 Assembled Order Code: AS31 28 - £39.95 Enhanced L ^PICALL M ISP PIC Programmer Will program virtually ALL 8 to 40 pin PICs plus a range of ATMEL AVR, SCEN1X SX and EEPROM24C de- vices. Also supports In Sys- tem Programming (ISP) for PIC and ATMEL AVRs. Free software. Blank chip auto detect for super fast bulk programming. Requires a 40-pin wide ZIF socket (not Included). Available in assembled format only. Assembled Order Code: AS3144 - £54.95 ATMEL 89 xx xx Programmer Uses serial port and any standard terminal comms program. 4 LED's display the status. ZIF sockets not included. Supply: 16-13VDC, Kit Order Code: 31 23KT - £29,95 Assembled Order Code: A53123- £34,95 NEW! USB & Serial Port PIC Programmer USB/Serial connection. Header cable for ICSP. Free Window's software. See website for PICs ►supported, ZIF Socket/USB Plug A-B lead extra. Supply: 18VDC. Kit Order Coda: 314SKT - £29.95 Assembled Order Code: AS3149 - £44.95 www.quasarel@ctronics.com Secure Online Ordering Facilities Full Product Listing, Descriptions & Photos Kit Documentation & Software Dovmloads T8/20Q4 - elsHcr Franks 4 3 ektor lect ronics CD-ROM Robotics RRP £12.05 (US$21.25) in Robotics, electronics meets information technology as well as mechanical engineering. The meeting results in a boundless experimental field. Do you want to explore it? For beginners the shortest way is along the kits line, while experienced users and programmers are best served by DIY construction. Both options are available on this CD-ROM thanks to a large collection of datasheets, software tools, tips en tricks, addresses, Internet finks to assorted robot constructions and general technical information. All aspects of modern robotics are covered, from sensors to motors, mechanical parts to microcontrollers, not forgetting matching programming tools and libraries for signal processing. Robots built from LEGO® bricks also get a fair amount of attention. Enter the fascinating world of robotics! Order now using the Order Form in the Readers Services section in this issue. El ektor Electronics (Publishing) P.O. Box 190 Tuhbricfge Wells TN5 7WY England Telephone +44 (0) 1580 200 657 Fax +44(0) 1580 200 616 See also www.eiektor-electronics.co.uk I © c t r o n i e s Summer Circuit Compilation Books The 3Gx series of Summer Circuit compilation books have been bestsellers for many years. You can use these books not only for building the circuits described, but also as a treasure trove of ideas or circuit adaptations for your own experi- ments. Many readers have found in these books that new approach, new concept, or new circuit they were looking for. Not surprisingly, our 3Qx books are now firmly established as collectors items, and carefully preserved by thousands of professionals and hobbyists around ihe globe. Circuits and design ideas for: audio, video, music, car, bicycle, home, garden, games, radio, software, test and measurement, PC and peripherals, power supplies, computer hardware, and more. 302 Circuits 354 pages. U x 21 cm 1SBH rrp mm (vm 21.00) 304 Circuits 365 pages, 17 x 235 cin ISBN 040570534-3 Complete your 30 x circuits series now ! mU 0-90570542-9 RRP m.W (OSS 37.00* Order now using the Order Form in the Readers Services section in this issue. Elektor Electronics (Publishing) RG. Box 190 Tunbridge Wells TN5 7WY England Telephone +44 (0) 1580 200 657 Fax +44 (0) 1580 200 616 See also www.ef ektor-e 1 ec tro oi c s .co. u k 4 Emitter el ktomts - 7-3/ 2004 Pleased to meef you As far as the Elekfor Electronics edito- rial team is concerned, the Summer Circuits edition is special in that it represents a beginning as well as an end. We re done hoarding, writing and discussing the dozens of small circuits, design ideas and tips our readers have come to value so much over the past 30 years. At the same time, we launch a fresh hunt for items to go in next year's issue. As is made abundantly clear by this month's front cover, it's also the time when we start thinking of taking a holiday! Although the photograph suggests the team is about to depart for a sun- drenched and possibly electronics-free destination, it was actually taken when we still had a lot of articles to write and make sure this extra-thick issue could be printed. Whatever the workload ahead of us at the lime, once our photographer was happy we enjoyed drinks an a nearby terrace. Apart from the usual office chitchat, the drinks did not fail to generate some really unusual circuit ideas. I would be very surprised if these did not make it into print some time. Happy reading from all of us af Elekfor Electronics! Jan Bulling, idifor Volume 3Q : Number 334, July/ August 2004 ISSN 0268 45 9 Elektor Electronics aims at inspiring people to master elec- tronics at any persona! level by presenting construction proj- ects and spotting developments in electronics and informa- tion technology. EkikiDr £fedn?*5 s produced and pubfcfred by Se&ior Efidronjs (PUbfehireg), f£>. Box 190, TUntwktge Wfe&TNS 7WX Enghixl Tet: (+44) (QJI5SG 200657. fex: (+44) (0) 1560 200616. Email: rn * A "=££7 “■£ i i.c -_z e Tc-m re.'^agsnts. z r = arc e kztot is z-zzl ccl.- 47s cr co subsai poco . ffefeor Efecircnics e prjblliiEhed I i times a year with □ double ssue Sbr August Under the narns E^cfcr and Qdttu^ the jt pybtehed n Rsidi, Serrr,ir. arc tX+cn. Together.- v, ■+ ‘sndr-iez eincr-i r e c rcufe- i.Dr mere than 5 I couTihsi. International Editor Mat Hdte4s Editor >- 5.ut--g : : c'e - ---- - 3 - Internationa! editorial staff- hsm Sagr-er*. Qsvid ?r_- Get* -ended Err*; ■ rcrree^aiier h Guy Fb^erxkxf. Design, staff: KsfeJ V^iwen (head of design), Ibfi Gsssbefis, fait Gpossens, bin Lsr -rem -• i m : - : i Editorial secretariat: Hec.v.| Herre''e~s i : : a le. Graphic design DTP:?-- G. ■=- G-e Deis Managing Director / Publisher: Pz$x Sr*- ■ ers Circubtion Control: e: Debe; : m .. Subscriptions -‘-o' “,-.'d2 SJbscrlpticc Eervce In. U~ 4 - G-bbs Rest -7;— Ps&Kci Seed. Tz^r_ f n ■ = 7 -rE, Erg =rd Telephone: (+44) (0) 1 580 200557. fsc (+44) (0) ! 560 20061 6 hrr-7 . “ 7+7 -,”'7 77 7 3fS CT- +£ 5 _ 77 7 .'.l-l" C'Cer r “ — Head Office: Se-gnrsn b., EC Bo 75 - 90---B See 1 *: "~e ‘ . ether, et - if Tfefhone. -3 46 43854+* F ek(t3 46 437: - Distribution: S=, £= ' .y. S-reet. Lcrdcr P 3LD Erg-arh UK Advertising 3err«d +-::C-V" 3 Crescent T— e O" s ischim G L 5 3 33- Ergar 7 Telephone (+44) (0)1242 510760, Esc (444) (0)1242 226626 bra. . z' . .• 7 - :: . • -c.7“-7.-'g rates £“d iemrs svi si- a en -ec_±i! International Advertising < 7=7 Ca , 7 “ 777 777 77 - ‘-'-77 C++ Em* 7 : . : 7 : 7 :: - l £• 1 . : • - 7 rates 7“7 le — 7 . 7 .a a 7 ’ 7 or, rec^aTL Copyright notice - e 7+^77 7 7 - 7 , 7-7 : n 7" 7 “.££*£■ £ rs hr 7 : — er 7 . 7 t 7 ." A. “a,. 1 ,' “77 7":77 7i 7-.ee C"7. 7 7C£+ = »QL15 5Td 7.77 1 £ 77 l' 7: £7+7 “ L “= ^7 77 7i 7.e77 7 7 ,7?" the magasr-e are cqpyr^iS^TiEnt b.v. and rvssy not be repraijefed oftfanornetted an any fwtti or by sny inctafrtg phobxcpyir^,, senffwig an recartfsr^ n t^boSe or ■n 7i": .’■ 7T -7- Ji 7^-: " ateset pefr^ssce ""7~ — e -C 7 -she 77 Sj 7~ er gemr. ts-ct. rr „T. 7 77 77- 7 77£ " 77 7£"7-£ 1" ■ 7 77 7’ V ±7-7 T77 ““ 7 77 “77 " 7 “77“ 7 ■ 7 E- T.7" C- Sny Fcient pretfectiosj may e!®t m reject ci deices, etc tes&faed h IT S 7“^ 7 77 The :i ,h :“7" 7 777 “77 £77777 r 77I7 “7 7 7- “I ' £ \Q _e7 . ±. r 7“ 777-7- “7 7 : r -zzr er 7 ’'c:e tic - _ ""“7 7^7^ £I7.“ :££■£■£'"£ CC U' £££ +7' 45 7-7““=. 7-7 7“ 70 t“7 F'„7,' 7“7'“7 77 L7£' +■£ ' -- : :t:: .ii 7“: :£^ - 7 ■ v - -y "7 it: -7 7E - “7 = . 7'" £—7 •+- -c: : -.7. reo.m e - - mzi-zni +:-"‘.t:£7 to 7' £'- S) Segment b.v. 2009 Printed in the Netherlands 7-8/2004 - ricldsr ihflrafiks 5 12 Micro Webserver Remote measurement and control is possible ■V a 'he n ter net . U n _ ortu n a re 1 y webse r . ers ifsuo . sir in arge, humming grey cabinets, r ot's not me 'dec so j; ; o r r cr seeping an eye on your refrigerator, cofree machine or central heating system. The Elekfor Electronics V cro Aebserver provides an a item a five. Sts versatile, : Qst, small and easy to build and v h a t s m o re it pro v i des su per per arm once. 20 TV Commercials Killer Sro p those c n n ov eg ad vs r' semen f b r eaks spco- : ng . our record ir gs v if h this ’ngemous circuit, is basic ingredients are an overc lacked Scenix Vi» S X 2 8 microcomroher r y nnin g s om e c s ver s o h- v. are last state RA.-Y and a fw q-wg. code earninq r infrared remote control that obviates surgery 'c the famik s precious VCR. Curious about 'he operation? read on... L"gh t-s en s if . e sense rs . vi f h c h a reared sti cs s: m i ! ar to those of the human eve are most oner imp e- menfed using photoresistors or spec' a land thus expensive] photosensors. Few people realise that normal LEDs can also be used as octree! sensors a that respond the same as the human eye. Contents VOLUME 30 JULY/AUGUST 2004 • no. 334 ll4iL=?lKCfJIBC:9LL;::!'h, Bold article title = includes PCB layout 1 00 V Regulators 36 3.3 V or 5 V Direct from the Mains 4 1 Acoustic Sensor 79 Adjustable Zener Diode 43 Airflow Monitor 32 Blinker Indicator 62 Bluish Flasher 74 Buck/ Boost Voltage Converter 60 CMOS C ry sta I F requ en cy Mu 1 ti p I Eer 3 4 Codec Complete 67 Digital Isolation up to 100 MBit/s SB Doorbell Cascade 35 The Eternal 555 39 Gated Alarm 44 Ho m e N etwo rk for ADSL 8 1 Inductorless 3 to-5 Volts Converter 76 Intelligent Flickering Light 38 Irregular Flasher 46 LED Light Pen 48 Lifespan of Li-Ion Batteries 42 Linear RF Power Meter 42 Long -Interval Pulse Generator 45 Luxury Car Interior Light 53 Mains Failure Alarm 70 Mains Voltage Monitor 61 Master/Slave Switch 75 Mete r Ad a p ter wi In Sy nime t r i ca I In p ut 71 Monitor Life Xtender 40 Motor Tu m/S toll Def ecto r 63 One Component Oscillator for 1 to 10 MHz 58 Power Flip-Flop Using o Trloc 59 Programmable-Gain Amplifier 55 Pseudo Track Occupancy Detector 50 Push Off / Push On 70 PWM Modulator 78 Relay Coil Energy Saver 72 Reset from Multiple Power Supplies 47 Reset 1C with Selectable Voltages 39 Reset Sequencer 44 Save Energy 50 Servo Tester using a 4538 64 Shortwave Monitor 72 Simple Darkness Activated Alarm 33 Simple Infrared Control Extender 56 Si mp le N iCd C h a rg er 51 Single-Chip VHF RF Preamp 66 5MPSU with a Relay 36 Solar-Powered High Efficiency Charger 64 5 S B Add - On fo r AM Receive rs 56 Stable Zener Reference 77 Steam Whistle 66 Stepper Motor Generator 37 Storage Battery Exerciser 48 Switchless NiCd/NiMH Charger 35 Triple Power supply 49 Tuned Radio Frequency (TRF) Receiver 76 Two- LED Voltage Indicator 73 USB Converter Controlled via HTML 65 UV Torch Light 62 Ve ry Low Power 3 2- kHz Oso i I la tar 7 4 Voltage Levels Control Relays 52 Whistling Kettle 54 White LED Lamp 46 Xilinx JTAG interface 79 Xporf 80 You have Mail! 57 Zero Gain Mad for Non- Inverting Opamp 33 More Small Circuits in the December 2004 issue l Canon EOS Cameras go Wireless Sure SF Remote control is desirable it you're into aerie , //ildiife, canerd or physica iv dangerous photogra- phy., but prepare 7 or 3 shock if /gu shop around tor commer- cial y ova liable remote con* to. s. Rajkumar Shormor has on alternative tor /ou. 32-81 Small Circuits Collection Construction Projects 1 2 Micro Webserver 20 TV Commercials Killer 88 !R Servo Motor Interface for RCX 96 R/C Analyser 1 02 Canon EOS Cameras go Wireless 116 Electronic Switch for Modellers Informative Articles 28 Measurement and Control via the internet 82 Light Sensor Technology 106 MAX6954 Display Driver 1 1 0 Battery Polarity Protection 1 1 2 Working with ActiveX 120 Tomi Engdahl, the man behind EpnnommD.net Regulars 5 Foreword & Colophon 8 News & New Products 1 1 9 Mailbox 1 22 Electrical Safety page 124 EMC page 129 Readers Services 131 PCB Layouts 132 Sneak Preview 132 Index of Advertisers WWW.ELEKTOR-ELECTftOMCS.eQ.UK news & new products Low-cost ARM - 7 kits from Hitex Capitalising of the suc- cess of the Keil/Philips LPC900 8051 kits (see Elektor Summer 2003 Edition) Hitex UK has announced the Keil/Philips LPC2100 ARM-7 kits at £75. Th is is a rem arkable price for a remarkable ARM kit. ARM is the 32-bit IP core that is sweeping the 32-bit world like the 8051 did in the 8-bit world. Whilst the ARM core is not new, it has previously only been used as a core In ASICs and special- ist ports, Philips have now released stand-alone ARM7 MCUs. The ARM LPC2100 range is designed to take over where the 805 1 based LPC9G0 range leave off. In order to keep this transition as smooth as pos- sible Philips are using the famil- iar Kei! uVsionS system for both the LPC2100 and LPC9G0 development. The basic LPC2 1 00 kit contains the board and the Kei I develop- ment package. The board sports on LPC2129 port with 16 kB RAM 256 kB Flash on board so no need of any additional mem- ory. Code may run from either RAM or Flash. The LPC2 1 29 has a wide range of peripherals on it including: ADC, GP-IO, HC, UARTs, CAN, SPi, CapSure/com- pare, PWM, two timers and □ real-time-dock/cdendar. One of the UARTs has all the signals required for MODEM control. This range of peripherals mokes for o powerful single chip sys- tem. The board has, of course, a row of LED s and the traditional Keil B!inky J application, a patch area, both serial and CAN net- work are connectors fitted. The board is tracked for expansion connectors for the GPIO. Hitex has a range of working software examples for board that are available on their web site. There is a bool loader on the parr so programming and booting via the serial part Es workable. However, as with all ARM parts there is a JTAG inter- face and unique to Philips ARM- 7 is Trace. Hiiex have o range of JTAG debuggers starting from o parallel port wiggler £50 lo the full industrial systems with trace costing a little more. Whist an the subject of debug- ging, the Keil development suite (uVEsionS) that comes with the kit has a full ARM-7 simulator. This is limited to 16 kB [but no/ time limited) and will be suitable ror most modest applications. The part that is not limited however is the GNU C and C+t compiler suite that is part of the package. So you can build applications of any size with mis kit. In addition lo the full ARM simulation Keil have the JTAG-USB debugger called uLink. This is usually £215 but Hitex are offering o complete kit of the MCB21 00 board with the Keil ulink debugger for £250. This kit also includes the Hitex Hi-top ARM simulator and the Hitex ARM examples. This is a very powerful 32-bit industrial development system at a fraction of the cost. The ARM- 7 parts ore used in all manner of applications from set top boxes to medial systems and many mobile phones. As one industry commentator said ARM is the 805 1 of the 32-bit world. Academics should coniact Chris Hills as Hitex can do some very special arrangements for supply- ing complete ARM Development labs with sets of MCB2I00 boards, JTAG debuggers and Keil development suites as well as a wealth of additional resources for special academic prices. Whilst the IPC90G kits ore suitable for 6 ?h form colleges upwards the ARM kits are more suitable for Universities. Hiiex UK ltd,, Warwick University Science Park, Coventry CV4 71 L Tel +44 [0)24 7669 2066. Internet: www.fntex.c 0 .uk/cm Email: cMls@hitex.co.uk ■J * 5 8 ehklcr declronics - 7-6/2004 EnigmaE Kif hits Bletchley Park Museum The Enigma-E developed by Dutchmen More Simons and Paul Reuvers is a DIY construc- tion kit that enables you to build your own electronic variant of the famous Enigma coding machine that was used by the Garmon army durinq World War 2. The kit works just like a real Enigma and is compatible with □n M3 and M4 Enigma as well as the standard Service Machines. A message encrypted on, say, a real Enigma M4 can be read on the Enigma-E and vice versa* The M4 [4- rotor} Enigma was used by the Ger- man Navy while the M3 version was the standard for the Luft- waffe and Ground Forces [Heer), The makers Paul Simons and Marc Reuvers run o microcontroller software company and are enthusiastic volunteers of the 'Jan Carver Dutch Radio Amateur Museum near Eindhoven, the Nether- lands. Marc and Paul are known for their brilliant, reverse-engi- neering and firmware conver- sions resulting in the re-use (by licensed radio amateurs) of ex- government surplus radio equip- ment (PMR), with the proceeds going to the Jon Carver Museum. Enigma-E is yet another demon- stration of Paul and More's inge- nuity when it comes to translat- ing concepts (this time, electro- mechanical encryption) into real electronics. This rime, quite unex- pectedly, the interest in their product was even greater in the UK than in their home country. Enigma-E is built o round a PIC 1 6F873 and runs software written by Marc using assembler rather than C or another high- level language in order to squeeze maximum functionality from ihe limited memory space available of just 4 kB Flash. The kit The kit comes complete with PCBs and all components, but users will have to add o battery and make or purchase their own enclosure. A great example of how the Enigma-E electronics can be turned in a 'Secret Agent style' portable unit complete with operating instructions secured to ihe inside of the lid may be seen in the photograph. The plug- board, originally a 'miliiory-only' add-on io the commercial Enigma machine, is mounted vertically. The kit olso comprises o 60 t page documentation package with lots of information nor only on ihe construction of the double- sided and through-plated PCBs (and plons for the wooden case) but also on various design aspects and a small historical background to the Enigma machine. According to software wizards Marc and Paul, building the kit isn't difficult, but requires basic sold ering experience. If you haven't soldered for a long time, or ir you're new to electronics, you might want to practice first on some old electronic circuits. Alternatively, you could try to find an electronic enthusiast near you and ask for help. Bletchley Park Bletchley Park was the place where during WW2 the Ger- man armed forces iop secret codes used for radio communi- cation were broken by a team of mathematicians (including Alan Turing and Dilly Knox), provid- ing ihe Allies with vital informa- tion towards their war effort. The world's first programmable computer (all valved and called Colossus) and other technologies we take for granted today were initiated of The National Codes Centre Bletchley Pork. Thanks to the efforts of the Bletchley Park Trust, the historic buildings were saved from demolition and the park con- verted into o museum. Bletchley Park now provides attractive weekday and weekend pro- grammes, theme exhibitions, lec- tures and much more that make Enigma-E elec Ironies housed in a beautifully reded wooden case, with its electromechanical ancestor in the background. an excellent day out for anyone, young and old interested in cryptography, not necessarily within a historic framework. The Enigma-E Kit can be purchased at £1 19.99 in the Bletchley Park Shop, Web pointers Enigma E homepage: mvw.xaTn//emarnae/ Station X r , the Bletchley Park Museum homepage; ■v \ vv/. bfe/cfr fey-park, ora.uk/ (left to right} Marc Simons, Paul Reuvers and Christine Large (A\D Bletchley Park ] , photographed (quite appropriately, we'd say) during the Wizards , Widgets and Weird Inventions exhibition, at ihe same time celebrating the delivery the first hatch of Enigma-E kits and a fe w demo units to the Museum, - - - fog rupht: Dsr. - '■ r ' ?5cr _ jen, £ tsicr. V ■ r ^ri " useu ti 7-8/2004 - efcklor electronics news & new products Ethernet enabled DOS controller At only US$ 98 per unit, JK microsystem's new picoFlash is a 1 86 compatible DOS com* outer with Ethernet whose per- formance rivals competitors Eth- emet-enables products for a frac- tion of the cost. Slightly larger than a credit card, the picoFlash is a fully program- mable. compact single board computer ideally equipped for data acquisition industrial con- trol and communications appli- cations, Standard units feature a fast, 40-MHz RDC R8822 micro- processor, NE2GQ0 compatible Ethernet, 512 k DRAM and 512 k Flash memory, two serial parts, 16 bits ot I/O, hardware clock/calendar and a socket to expand non-volatile memory using M-sy stems DiskOnCbip products. The preloaded royalty- free DOS operating system and Flash file system provide a fast yet convenient environment for embedded development. Along with a watchdog limer r 5-V DC power, RS485 serial part capa- bility LCD support and aggres- sive pricing, the picoFlash single- board computer cavers many embedded Ethernet designs for ihe OEM market. Available development kits are U$$ 2 1 9 and include a picoFlash controller, necessary cables, Borland C/C++ version 4.52 compiler, driver libraries and documentation. Free techni- cal support from JK microsystems 1 engineers is available via email or the new online Support Forums ot http://farums-ikmicro.com JK microsystems^ fnt., 1403 5lh St. Suite D, Davis, CA 95616, USA. Internet: www. j kmfrro.com Two inf© one does g© Alphasense dams to have intro- duced [he smallest two-gas elec- trochemical sensor, onto the world market. The D2 dual Carbon Monoxide and Hydrogen Sulfide sensor represents a significant develop- ment cf ihe established D Fam- ily of sensors. The D2 size, measuring only 14.5 mm [diameter] by 11.5 mm [height], encloses the com- panies well-proven electrochem- ical technology for both CO and H 2 S measurement The design of this miniature sensor ensures that the CO measurement Is not influ- enced by the presence of HlS in either ihe atmosphere being monitored, or In multi-component calibration gas mixtures. The advance made by Alphasense in sensor packaging provides Original Equipment Manufacturers [OEMs) with she opportunity to design lighter and smaller multigas instrumentation, now being demanded by users, A further major advantage for volume instrument manufacturers, is a significant reduction in the cost per measured gas provided by the D2 dual gas sensor. The D Family' continues to grow — not just with the Introduction of this unique dud gas sensor, but also by two additional single gas versions. Bath Chlorine and Nitrogen Dioxide are now avail- able in this miniature size, adding to Carbon Monoxide and Hydrogen Sulfide, with more sensor types planned over ihe coming year, giving OEMs the ability' to further reduce size and price for their next genera- tion of instruments. Alphasense Ltd,, Oak Industrial Park, Great Dunmaw, Essex CM6 1XN. Tel: + 44 (0) 1371 *7 3048, fax: + 44 [0)1 371 87 80 66. Internet: www.d ohflsense.com 10 ehktor dtrtrcmks -7-3/2C>04 Smaller, tew-currenf SPI serial EEPROMs Microchip's 8-Kbif 25XX080A/B and 5 6-Kbit 25XX160A/B are SPI bus+rompatible serial EEP- ROM devices with a maximum clock speed of 1 0 MHz, a write lime of 5 milliseconds, and o wriie current of 3 mi! I i amps. These devices all feature self- timed ERASE and WRITE cycles, built-in write protection, and high reliability with 200-year data retention and one million erase/write cycles. They are available in small packages, such as the MSOP, alongside standard packages including TSSOP, PDIP and SOIC The 25XX080A/B and 25XX16GA/B ore available in two voltage ranges ('AA' in 25AA080B denotes 1 ,8 - 5.5V and LC in 25LCG80B denotes 2.5 - 5,5V), Both industrial temper- □lure grade i(-40 : C lo +85 3 C], and extended temperature grade (-40 "C to +125 : Cj devices are □voilable. In addition, both 16^ and 32-byre page sizes are avail- able, The 'A versions [25 ICO 8 0A and 25LC160A) feature 16-byte page size, while the f B f versions (25LCOSOB and 25LC 1 60B) fea- ture 32-byte page size. Microchip's SEEVAL® 32 Serial E EPROM Designer's Kit supports these new devices assisting sys- tem integration and hardware/ software debug. Ariiona Microchip Technology Ltd, Microchip House, 505 Eksdale Road Winner $h Triangle, Wokingham RG41 5m Tel (+44) (0)118 9215858. Fox (+44) [0)1 18 921 5835. wyA^rn iCTOthip.ro m . :- _ : T c r USB BDM debugger for Coldfire Crossware has developed a USB BDM [background debug mode) debugger for Motorola's Cold- fire family of chips. The USB debugger provides sig- nificant advantages over o par- allel port BDM Interface by ensuring that the data transfer rates from the PC to the debug- ger are super fast. In addition, advanced synchronisation tech- niques have been used to opti- mise the data transfer from the debugger to the target board. Crossware has developed the small yet powerful and fast BDM debugger using the C8051F32G microcontroller from Cygnal (now part of Silicon Laborato- ries), which features o USB con- troller ond requires no external crystal. The miniature debugger plugs directly into the target board minimising signal delays and ensuring that it will be com- patible with the next generation g? Co'dFire chips running at up to 200 MHz. The USB debugger is driven by new version of Crossware's source level debugging soft- ware, which integrates seam- lessly v/iih the rest of Its Cold- Fire Development Suite. The user interface Is unchanged and so developers con simply replace their existing parallel port interface with the new USB debugger and Immediately ben- efit from the improved perform- ance. In addition, developers can also move to platforms such as the newer generation of notebook PCs, which do not hove □ parallel port. The debugger evolved out of a new version of Crossware's 8051 Development Suite. This version featured Code Creation Wizards to allow the USB con- troller ond other peripherals of the C8051F320 to be rapidly configured. Using this as starting point, and by combining its thor- ough knowledge of both the C8051F320 microcontroller and the ColdFire BDM Interface, Crossware has been able to leverage the complementary fea- tures to create a super fast USB BDM debugger. .■ i 5 Crossword Old Post House, Silver Street, Ullmgton, Roystan, Herts, 5G8 GQE, UK, let -+44 (0) 1763 853500 or fax + 44 (0) 1763 853330. Internet: VAVw.crosswaiB.tom 7-8/2004 - dsktcr dsttrcnics 1 CKenhause Remote measurement control is possible the Internet. Unfortunately, webservers usually sit in large, humming grey cabinets. That's not the i solution for keeping an eye on your era tor, coffee machine refrig or central heating system. The Elektor Electronics Micro Webserver provides an alternative. I it ^ % ■ - - • jgsiSk < 1 ’ - — >: ^ i j ^ . i % __ The Elektor Electronics Micro Web- server is a full-fledged node for Inter- net traffic, despite its quite modest dimensions and complexity. It con- sists of a microcontroller board with a network interface. Thanks to its compact con- struction and the versatil- ity of the microcontroller board, the Micro Web- server is an ideal choice for measure- ment and control applications. Nat- urally, the fact that it can be read and oper- ated from any- where in the world via the Internet is a major bonus. Despite these unprecedented features, the necessary hardware is actually mini- mal, In principle, ICs are all you need for a complete Web- server. To avoid any misunderstanding, this is not some kind of demo or prototype, but a fully functional device r:_ suitable for industrial appli- ( ""'"cations, and its potential uses T extend far beyond what we can describe here. Bessie design The underlying technology is rather complex. Consequently, in this article we must omit a large number of inter- esting details that are not essential for a ‘simple : Webserver. However, read- ers who want to know all the details will rind what they're looking for in die accompanying software. The interface is without question unusually user- friendly. For example, the program variables can be used directly in web- sites. it's hardly possible to make things any easier. The Micro Webserver is progr amm ed using the 0 language. But don't let yourself be discouraged if you aren't familiar with C, since this project is cer- tainly suitable for beginners as well. Conneetion Internet and Ethernet are closely related. Ethernet is a standard that defines the connection. The transmis- sion speed is normally 10 or 100 Mbit/s, and it is automatically config- ured when the connection is estab- lished. We use the 10-Mbit/s variant in this project, since it is more than ade- quate for an embedded Webserver, We assume you already have an Ether- net network. The Webserver can thus be connected directly to a hub or switch, so the Internet can be accessed via Ethernet. There are also agreed conventions regarding how Internet communication takes place (via Ethernet, for instance). All of this is specified in the TCP/IP protocol. Here we assume that the network to which the Micro Webserver is con- nected can also ‘speak/ this protocol. From a technical perspective, there's no reason why the Micro Webserver cannot also be directly connected to a PC using a crossover cable. However, describing this in more detail is beyond the scope of this article, since in some cases the PC settings must be changed for such a connection. Hardware After all these introductory diversions, it’s time to get down to brass tacks. The hardware platform is the by now well-proven MSC1210 board (originally described in the 2003 Summer Circuits issue). If you do not already own a copy of this outstanding board, you can obtain one from Elektor Electron- ics together with the extension described here (Figure 1). The extension is thus new. In principle, it’s simply a custom’ network card for the MSC board. This card is built around the CSS 9 00 A Ethernet driver IC {refer to the schematic diagram in Fig- ure 2). As usual with network cards, there are two LEDs (D1 and D2) to indi- cate the status of the network connec- tion. D1 flashes for 6 ms each time a data packet is received or transmitted, or if there is a collision between two packets. The second LED indicates whether the CS89QGA is receiving proper link pulses. These pulses are used in Ethernet networks to synchro- nise transmitters and receivers, and D2 will be on if this synchronisation is successful The network 1C also has a complete lOBase-T transceiver. lOBase-T is the standard for 10-Mbit/s Ethernet over twisted-pair cable. The circuit requires only a few external components. The transformer just ahead of the RJ54 con- nector provides electrical isolation from the rest of the world. The printed circuit board (Figure 3} has a 'prototyping 1 area to provide extra space for user applications, in addition to the space on the MSC 12 10 board. Several spare signal lines are available in the leftmost raw of the pro- totyping area (see Figure 2). Two extra LEDs and a pushbutton switch are also placed on the LAN board. The 13 rilW.ELEKTOR.ORG mxx*-x * 1 ca .1 RZ WW^.WiUULHAEUSER.COil • (C) 2003 a T J^ri HALO**, a * 3 T?u;- ■ _L 1 ^C2 * WOTTCfl ■ IED3LED4 *. * * Figure J . Tjfie AlSC J 2 ? 0 board v/fth /ne network extension: o powerful pair! © Figure 2. The network card is built around the CS89Q0 network 1C. 14 t!dfar d&dro:ics - 7-3 /20EM Applications The Micro Webserver is ideal for the following applications: Automatic an fine weather station: - temperature - precipitation - lightning detection - wind strength and direction - relative humidity - rain barrel level - fight intensity Web interface for home appliances and fixtures: - refrigerator or freezer temperature monitoring - remote control for coffee machine, central heating or lighting - controlling sun ownings or roller shutters - outside lighting - intruder detection - greenhouse climate control Access control and registration in combination with: - badge readers - light barriers - door openers - RFID tags Monitoring and controlling machinery: - rpm - voltage and current - temperature - liquid level - Row rate / discharge rote - pressure - valve control - relay control or PWM (servo) control Terminal for a central database (in combination with an LC display and barcode reader) placement of the connector for the link to the ‘motherboard* allows the exten- sion card to be located next to the motherboard or underneath it. in the latter case, the two boards can sand- wiched together using standoff bushes. Although the design of this project is especially simple, there is one thing that must be mentioned. The current consumption of the LAN IC is 100-120 mA, which is relatively high compared with the current drawn by the microcontroller. The 5-V supply voltage is taken from the MSC1210 board. To prevent the voltage regulator on that board from becoming over- heated, we strongly recommend that the entire circuit be powered from a voltage of 7.5 to 9 V, but definitely no higher than this. Online There's actually not much more to say about the hardware. Configuring the board is fully described in the text box. Once you’ve gotten the server 'up ! T you can start testing. This is where things start to get inter- esting. Tb start off, simply connect the board to the network. LED D2 will be continuously on if an Ethernet signal is detected. This is a promising start, but the real test comes next. It consists of trying to ‘ping 5 the server using the Windows Command Prompt window (DOS command window). On a PC con- nected to die network, type the follow- ing command in the command line: ping 192*168.1.156 (of course, the IP address here must be the address previously assigned to the Webserver). LED DI should start blink- ing as an indication that data is being transferred via the Ethernet, and a reply from the server should appear in the command win- dow. Ping is a simple pro- tocol that allows a few bytes to be transmitted and waits for an ‘echo’. It s a really handy way to quickly check a network connec- tion. If the ping test is QK T you can then access the Webserver using a web browser In the browser window, enter the following address: http://192.168. 1.156 (use the address that has previously been assigned to the Webserver), And that’s it: what you see next comes from that little board (see Figure 5). In the terminal download window, you can also see which page was requested. Hew if w@rks What actually happened when you requested the web page? First, you made a connection to an IP address. Actually it’s a bit more complicated than that: you made a connection to a 'socket' at a particular address. A socket is a sort of 'connector 1 T in this case one that only fits web links. Each socket is also assigned a specific port number. Port 80 is frequently used for web servers. You can see this in the program line socket_setup( 1, SOCXET TCF , 30 , FLAG_?A 55 TVI_OPEN ) . The final parameter here indicates that the socket is passive* which means it waits for requests from clients. The sockets are created in a FOR loop. The number of sockets created determines how many clients can be connected to the server at the same time. As each socket costs memory the total number is lim- ited. The CS89D0A IG used here also has a buffer (approximately 4 kE) for incoming Ethernet packets. That's not especially large if several users want to connect to the sewer at the same time, or if large items such as images are requested. Actually this doesn’t matter all that much, since TCP allows the occasional packet to remain unanswered. If necessary the client resends unanswered packets on its own initiative. After the sockets have been created, ELM FLEX.G initiates the A/D con- verter of the microcontroller a few lines later in the code. For more information about the A/D converter, see the com- panion. Micro Webserver article ‘Mea- surement and Control via the Internet’ in this issue. After this, the program enters a end- less FOR loop. In this loop, poll web- Internet references [ 1 ] rtr.nt!< irh: i rv.c □ |J01 SHttcd* [2] vtewjjt St > o :2 VCC2 POO PCI P02 P03 P04 P05 P06 P07 ALE DGHD3 P27 P26 P25 P24 P23 P22 P21 P20 VCC3 DGND5 INTO Wit PQHT1_6 POftriJ P0RTL5 PORTLO VCC4 DGHD6 Miscellaneous: T1 = Ethernet transformer type TG43 Halo) or ST70 1 OT (Volar), see also reh [61 XI = 20MHz quartz crystal. HC49 SMD case K1 = 34-way D1L pmheader K2 = 8'V/ay plnhecder K3 - RJ45 connector [screened! S 1 = mint pushbutton For software, bare PCBs and fully assembled boards, see the 'What you need' box. Figure 3. I he network card for the /VlSC 1210 board ' figure 4. The web page sen! by the micro Webserver. 16 ebkfor ebtfrasKs - 7-8/2094 Configuring the board The Micro Webserver only works in o TCP/IP network. just like gIE otter computers in a TCP/IP network, the microcontroller is assigned □ unique address, which h its IP address. Be lore you start programming the microcontroller, you must manually specify this address, since the Micro Webserver does not work with automatic address assign- menL Hie default IP address is set to 192.16B.L156. it belongs to a range a I address- es that are specifically reserved lor networks that are not directly connected fa the Internet. Subscribers to ADSL or cable Internet use addresses in this range far iheir local networks. Addresses having the form T 0,0.0.x also belong to ibh category. If may also be possible la request a 'real' Internet address for your Mtao Webserver, but that depends on your provider. In any erne, you must personally check which address range is used in your network and which addresses are available to be assigned to the server. moment! Before you can download anything to the board, you have la acquire u copy of the original Texas Instruments dawnlcader (Downfooder.exe), You can obtain this from the M5C group site at Yahoo [reference [4]), among other places, and it can be placed in the project folder. If you wish, you con also place it in a mare general loca- tion. hut In that cose you naturally have la specify its new location in DLBAT, Be sure to fit jumpers J] end J2 on the MSCI2IG board (13 must remain open}. If J1 and J2 ore not fitted, the board is protected against resetting end modifying the firmware vie the PC Finally, yau need o null modem coble to connect the board to the PC, but that should be obvious. After you've found a place for the downloaded modi- fied DUAT if necessary (to specify a different COM part ar change the path fo the downloaded, connected the board fo the proper PC port, and powered up the board, you're finally reody fo dick an DLBAT in JFE. After choosing an address, you can turn your attention to the necessary programming software and C files. Part of the- requited source code (the pad that implements the actual Webserver] is included with the uC/SI-comptler (from version 1.20 on wards). A fully functional demo version of this compiler can be downloaded free of charge from the author's home page [see reference [1 ]). The only difference between the dema ver- sion and the registered version is that code sire for the Micro Webserver is limited to 1 6 kB, but that s more than enough for this application. Sample source cade for initial- ising the Webserver and implementing web pages (including several sample pages] is included in the package. After installing the uC compiler, you must first use MakeWiz fo create a workspace. In MakeWrz, open the file , -ASRCMSU 2 1 0'£Ui*i FlEX^U^ FLEX.M.AKL Then change so me I hlng in the text (for example, add your own version number) so that the Serve button will be enabled. Tick the 'Write JFE- Workspace File' check box and save fhe file (Figure SI flaw you can start fhe JFE editor [with thanks to Jens Alima no}. In JFE, use 'Open Workspace' to open the fils JSROJASO 21 O^f UA_FLDi^bM_FLDf.WSR All of the files belonging to the project will appear in She editor widow, How yau have Id specify the previously defer mined IP add cess In the ELMFLEX.C file. You can do so In the line COMPOSE IP (my_lp , 192,168.1,156}. A work spa re that has been created using MakeWiz causes three special buttons to appear in JFE 'MAKE', 'RE-MAKE and 'OLBATL Tbs MAKE button causes fhe project to be complied, but if limits processing to fhe files that have actually been modified. The is the usual (and faslesl) way Eo generate the hex file you need far programming if everything goes as it should the MSC1210 board will return o short greeting mes- sage, and if '. Above a section of fhe angina! picture in black and white - below ire fiuerea logo . Figure 3. Section of the angina! picture shown next to the stored version, which is compared u lih fhe logo below. Below fhe white pixels represent the logo ire black pixels the reference pixels, and the grey pixels are neutral. The numbers show the threshold end reference values. the same number of black pixels is added at random into the logo rectan- gle, The remaining pixels are set to neutral ('grey 5 } by setting the second bit in the picture memory Phase 3 In phase 3 the picture is monitored in real time, that is. frame by frame. In each frame the average brightness of the logo pixels is calculated, as is the average of the same number of pixels not belonging to the logo, spread our over a representative area. If the differ- ence between these two values falls below a preset threshold several times, this indicates that the logo has disap- peared. 7-8/2004 - cfckEir alalrcriu 23 PROGRAM SNIPPET 2 mov W, SID ; Contains width of logo rectangle mov $04, W Iood4 ■Sr setb $04.4 nop mov W f RC ;xxx Byte, read image from ADC into RAM mov $00, W nop incs z $04 jmp :Iood4 PROGRAM SNIPPET 3 mov W,$1D mov $04, W ; loops inc RA ;xxx Byte, read from RAM and add setb SQ4 ♦ 4 mov W,$00 snb RB . 6 ; Memory bit ext, image memory jmp i grey sb RB* 7 ^Memory bit . , ext ■ image memory jmp : hick add SG9,W ; Add white snb C_Flag incsz $0A ;Sum white in SOB, SO A, $09 dec $ 0B inc SOB dec HA incsz $04 jmp : loop5 ret : hick add $oc,w ?Arid black snb C_Flsg incsz $0D ; Sum black in 3 0E, SOD, $0C dec $0E inc $0E dec RA incsz $04 jmp : loops ret : grey jmp :x3 ; Dummy for grey pixels :x3 jmp : x4 :x4 dec RA incsz $04 jmp : loop5 ret Figure 3 shows a segment from an original image, and, next to it, the stored version which is compared to the logo below. Here the logo pixels are shown as white, reference pixels as black, and neutral pixels as grey. The numbers show the threshold and refer- ence values. The bit samples from the infra-red remote control stored in the EEPROM which represent the command to stop recording are sent to the infra-red transmitter. With luck they are then detected by the recorder, which will stop recording. The programme continues to be moni- tored. The average brightness differ- ence threshold for detecting the return of the broadcaster's logo is now set somewhat higher. As soon as the logo is clearly detected, the infra-red trans- mitter sends out the command to con- tinue recording. In the monitoring phase the position of the logo in the television picture is known. Line by line, just the sequence of pixels belonging to the logo is selec- tively stored in the internal RAM of the microcontroller. This is carried out at exactly the same resolution as in phase 1, in precisely nine machine cycles per pixel |sse program snippet 21 - In the remaining time until the end of the scan line the stored pixels are processed according to whether they are logo pixels (white), reference pix- els (grey) or neutral pixels (grey). The various brightness sums are calculated jses program snippet 3). When all the pixel brightnesses have been added together, the difference between the sums tor logo pixels and reference pixels is calculated, and com- pared with a suitable threshold value which depends on the size of the logo. When frames which exhibit too small a difference are encountered several times in a row, the logo is judged to be absent and the infra-red command to stop the video recording is transmit- ted. A software module to drive the I 2 C bus as a so-called 'virtual peripheral 3 is available from Scenix and has been modified here to drive the EEPROM to store the infra-red remote control com- mand codes for the recording device to be controlled. Since there are only two different infra- red co mm ands to send to the recorder, we can offer a learning function. In * 24 difctcr declronki - 7- By 2004 Note: For correct operation of the TV ad killer the following are essential: -The broadcaster's logo must appear in the upper third of the screen/ in a fixed position (as is generally the case}. - A good video signal is required. If the picture is not perfectly in sync, the logo can jitter (even though this may not be evident to the eye)* The logo may then not be correctly recognised. learning mode, incoming pulses me sampled using an interrupt and quan- tised to a tiinebase. The count values are stored permanently in the EEP- ROM. In use, the values are fetched from the EEPROM and stored in RAM, so that the sequence of pulses for the code used can be reconstructed with good accuracy and sent out using the infra-red transmitter. In usb A prerequisite for satisfactory opera- tion is a very good video signal. If syn- chronisation is not perfect, the logo can jitter (even though this may not be evident to the eye). The logo may thee not be correctly recognised. When power is applied, or after the reset switch Is pressed, the program runs in four stages. In the hist stage the two infra-red command codes for controlling the recorder can be set. LEARN IR CODES turn on green LED wait for IR signal You now have approximately four sec- onds in which to press the required button (for example, 4 REC f ) on the remote control. The infra-red transmit- ter on the remote control should be just a few centimetres from the receiver diode on the advertisement killer. If no infra-red signal is received wi thin four seconds, the program jumps to 'FIND LOGO 7 ; otherwise, it proceeds as fol- lows: IR signal recognised green LED blinks read IR signal store code in EEPROM turn off green LED turn on red LED wait for IR signal The procedure for learning the 'PAUSE' code is the same, except that only 2 s is allowed. If no infra-red signal is received wi thin 2 s, the program jumps to FIND LOGO. Otherwise it proceeds as follows: If no logo can be recognised In the external memory, the program remains in this loop; otherwise it jumps to: ANALYSE LOGO IR signal recognised red LED blinks read ER signal store code in EEPROM turn off red LED This process has already been described above, under "Phase 2 \ MONITOR LOGO Tile record and pause commands (you can of course use any other remote control commands you choose) need only he programmed in the first time the unit Is used, or if you wish to change the commands. Otherwise, simply turn the unit on and wait! FIND LOGO tum red and green LEDs on The following procedure is executed for the first and second fields: The following procedure is executed for the first and second fields: wait for interrupt at top of picture wait for line Interrupt process lines 33 to 96 After processing, execution can pro- ceed in three possible ways. Logo present green LED flashes periodically rerum to MONITOR LOGO wait for interrupt at top of picture wait for line interrupt process lines 33 to 96 Logo newly disappeared red LED flashes periodically proceed to TRANSMIT IR CODE 1 7- 8/2004 - eklttor dcdieniis COMPONENTS LIST Resistors: (all metal film 0.25 VV. 5 %} R ] = 47a R2 = 8kD2 R3 = 2200 R4,R6 - IOOO R5 = 3kQ6 R7 = not fitted RS = 1200 R9 r R15 - lOkO RIO = 3kQ9 Rll = 750 R12-620O R13 = 6S0kO R14 = 3k03 R16- 120kO R1 7,R22 = 220kO R1 a,R] 9 - lkQ5 R20 - 270 R21 = lkQ2 Capacitors: Cl - lOnF 63V NPO C2-C4,C7,C8,C1 1,C14-C1 6 - IGQnF 63V X7R C5= 220pF 63V NPO C6 = 56dF 63V NPO C9 - lOOpF 63V NPO CIO- 510pF 63V NPO Cl 2 Cl 3,C 1 S = 220nF 63V X7R C17 = 33pF 63V NPO C19-C23 = 1 GpF 16V E2.5-5 C24 = not filled C25 -lOOpF 16V E2.5-6 Semiconductors: D1 # D2 = 1N4I48 D3 = LED 5mm. red, low current D4 - LED, 5mm. green, low current D5 = SFH203FA (Infineon] dl 1 □j g > i Figure 4. Component mounting plan for the double- sided printed circuit hoard. J he trickiest character to deal with is the SRAM in a 28-pin SOJ package. Logo newly appeared green LED flashes periodically proceed to waiter mit TRANSMIT IR CODE 2 -G-a ct/ ' S1Z3*:75/DP SCtJlJX AB9944AC H^74HCTCQN ii Knn99|4 G f ® KJtia&MEA r$65 TRANSMIT IR CODE 1 Fetch first learned infra-red code &om EEPROM and transmit it three times Proceed to MONITOR LOGO TRANSMIT IR CODE 2 Fetch second learned infra-red code from EEPROM and transmit it three times Proceed to MONITOR LOGO Cosssirustion The double-sided printed circuit board for the advertisement killer is designed to fit exactly in the suggested enclo- sure, without the need to wire any of the components using String leads. Populating the board, as Figure 4 shows, may present a few difficulties, since the deck multiplier, the A/D con- verter and the RAM are SMDs. The 26 E!ilttK£!ttfW1li6'7'S/M T1 T3 T4 = BC547B T2 = BC557B T5 - BC337/40 LD1 = LD271-H (InBneon/Osram) T ! C 1 = 1C55Q2M [ICS) IC2 = ADC1 \75Cm (National) IC3 JC8 - 74AC4040 IC4 = SX28AC/OF {Seen Jx, now Ubicom}* C5 = 61 298P6 SOJ28-3 (IDT] IC6 = NM24C08N08E (Fairchild] tC7 - 74HCI00 IC9 = LMI 881 NOSE (National) [Cl 0-78105 Miscellaneous: XI = 20MHz quartz crystal (HC49U-H) LI = 4^iH7 K1 = Cinch socket (lumberg WBTOR I] K2 - mains adaprpr socket 2mm (Lumberg NEB/j 2 1 R) K3 = miniature jack socket (Lumberg KLBR2) SI = pushbutton with make contaett [Scherter 1 301 .9502, no cap) Mains adaptor, 7.5*9 VDC, 300 mA Enclosure (eg., Woe hr Bernic Desk Tap Enclosure 201 IS, vayw. woe hrgmbh.de) IR transmitter head jack plug (Lumberg KL52SL) IR sender LD271-H [In Bn eon), see above Suggested supplier fng. Burn Schulze Oh are Ringstrasse 7 D-79859 Schluchsee Germany. Tel. /fa x: +49 7656 9173 Em o i I Msc h u !z&9 9 @we b . d e * hex code Fife 040051-1 1 Free Download, Figure 5. A jumper h fitted to the :■ r o g ram mine ccr. n e dor ■ s o u ■ o ; a c oc ■ . is provide a to the microcontroller. Figure 6. The infra-red transmitter unit is made from a fight-angled jack plug, in which the diode ts soldered in place of the usual cable. first two ICs can he soldered using a fine-tipped iron and a steady hand, but the SRAM comes in a SOJ (small out- line J-lead) package, whose pins curl under the IC itself. The following highly effective, if somewhat brutal, method is recommended. 1. First fix the device in position on the printed circuit board by care- fully soldering two di agon ally- opposite pins. 2. Solder all the remaining pins as quickly as possible, not worrying about any solder bridges that may be form between the pins. A nor- mal rather than a fine-pointed bit is preferable, since it can be used more quickly. 3. Lay a length of solder wick loaded with flux across the soldered con- nections, and run a hot iron along it, over the pins. With luck all the excess solder will have been removed and the joints will have a satisfactory appearance. You must of course check that all the solder bridges have been removed. It is important that the wick holds enough flux and that the job is done quickly. All the other components are of the normal leaded type and should not present any difficulties. Of course, you must observe the correct polarity for diodes, electrolytic capacitors, transis- tors and ICs. The header in the middle of the printed circuit board is only required for in -cir- cuit programming of the microcon- troller (using the Parallax SX-Key). For normal operation simply fit a jumper in position 1 as shown in Figure 5: this ensures that the clock is provided to the microcontroller Finally, Figure 6 shows how the infra- red transmitter is assembled. The transmitter diode is soldered to a jack plug and bent in such a way that the combination can be eased into a right- angled jack plug housing. The diode can be fitted with a plastic clip to ensure that it sits firmly in place. The whole arrangement can be rotated in the socket and so can be pointed accu- rately at the receiver diode in the recorder, ;4XS:-t Please note: This circuit has not been tested or post- engineered by the Elektor Electronics design laboratory. The use of the VIconti unit described in this article may not be legal in all countries. 7-8 -2004 ■ fhV;t:r dztfrcnks 27 warn kl h j m si;: '-It ile exp - - mI m WjE i use - > . v this starl ~ " i "f " new server, fed right awi so j ay- 1 fou can get ' ''jO. But this mmwwwan L(H 1 IH 11 L T J 1 1 f •- — r— 4-r j :[ M -l-l-n fi i . V — hr sesn't exf 1 ISf its * As an example of user-developed applications far the Micro Webserver, here we show how a software clock can be used to incorporate variables from the MSC1 210 board in a web page, and how variables on the board con be modified via the Internet. We also show you ho w to connect an analogue temperature sensor to the board, and we describe the soft- ware you need to moke the measurements accessible through- out the world via the Webserver - fV ■ *- i It . * * * *■ 7 \ L.i T* Web pages After configuring the microcontroller board and net- work card for proper operation according to the procedure described in the companion Micro Webserver article, you're no doubt keen to conjure up some da to on the Internet. With this Micro Webserver, you can do this by * _ using web pages. Websites are gener- ated using the HTML language. HTML code can be generated and edited using any desired text editor. For example, you can use the Notepad, which is a text editor that is supplied with Windows. There ore also plenty of alter- natives available on the Inter- net. Special code editors are also available. Such editors can automatically display the HTML code in a different colour, among other things. This is a handy Feature, since 'regular' text is dearly distinguished from code, which makes finding errors go a lot faster. <. - ■ u X ' V- W- v - tJs. The following is a simple example of a bit of HTML code: & simple page * 4 Hello E lektor< / a> i The result produced by the code For this page is shown in Figure \ . We have no intention of describing all the delails here, since in numerable manuals and tuto- rials can be found on the Internet, and they ga into much more detail than we possibly could here. Just try using Google (wvAv.googfe.com) to search for "'HTML manual" or 'HTML tutorial . HTML and the microcontroller To make data from the microcontroller board visible via v/eb pages, variables must be incorporated into the HTML code. The server then fills these variables with actual data when the code for the web page is executed. With the FlexGate TCP/IP stack, this is very easy. The ‘W symbol is used to mark a vari- able. If you wont to use the actual W symbol in an HTML page, write in the cade. Wherever there is a variable in the code, the stack automati- cally enters the corresponding C variable. The C variable must always have the type string, which means it must be an array of type char. The sample file SET.HTML (Figure 2J, which is included with the uC/51 compiler, shows how this appears in HTML, This file is required for configuring the server, and it can be downloaded free of charge from the Elekfor Electronics website. In lines 1 9-21 of this file, you will see the variables hr, min and sec. The current time is set here. Lines 28 and 29 con to in the code for check boxes that depend on the values of Is3 and Is4. These two variables contain either 'cT or an empty string. This yields either "checked' or 'checke', respectively. A feature of most browsers is that they ignore anything they don't recognise. Although this technique is not especially elegant, it means that 'checke' will not be interpreted. As a result, the checkbox will not be ticked if the variable does not contain a 'd'f " * | H i ^ " " ' Controlling the microcontroller Of course, users must also be able to modify data in the microcontroller via the Web. In HTML, this is done using struc- tures colled "forms'. Here we use the GET method. This causes the contents of o form to be added to the called URL when it is sent. For instance, if you want to set the dock to 1 6:29:35 and you dick on "Set Clock", the REPIY.HTML page is called with the following parameters: http://. . . /reply *htnil?M = 16&A2=29&A3=35?A 9-Set+Clock In this line, marks the start oF a parameter string and separates the individual parameters. The V symbol indicates a space. Special characters are converted to their equivalent hexadecimal values, which are preceded by Incidentally, an HTML page can contain several forms, whose parameters are then combined in the URL. The FlexGate TCP/IP stack assumes that all variables start with a' or "A" (not case- sensitive), followed by a number in the range 1-255. Associated C code Nov/ you know exactly how to incorporate variables in the HTML code, but who! about the code for the MSC1 210? As described in lift e companion Micro Webserver article else- where in this issues, the ELM FLEX.C rife is where users config- ure the server. In the program loop in which the actual server runs, whenever a page is requested □ check is made to see whether specific parameters must be passed with the URL. For example, if on HTML document such as REPLY.HTML is Suggested applications The Micro Webserver makes an excellent platform far all sorts of applications where it's handy to be able to observe or control something via the internet. The following is □ list of components ond Elekfor Electronics circuits that could be used to provide interfaces to the outside world. A complete weather station can be built using; - a temperature sensor (using a PtlOO sensor, or digitally with on LM76 or the like) - a lightning detector Pune 2003) -on anemometer [May 2004) - a hygrometer (such as the H51 100 used in the January 2004 Climate Laager project) - a rain-barrel gouge ('Rainwater Storage Gauge', December 2000, or 'Precision Level Gauge December 2001 ) - o light intensity sensor [LDR instead of Pt 1 00) Remote control or monitoring of household appliances and fixtures; - temperature monitoring (PilOG, LM75A or the like) - on/off control for a coffee machine, central heating or lighting [with a relay) - sun awning and roller blind contra! (with a relay) - ouiside lighting (with a relay, possibly with an LDR) - intruder detection (IR detector from a DIY home improve- ments shop, or the vibration detector from the December 2002 issue) Access control with centra! registration and monitoring, in combination with; - smart card readers (available from Conrad end other sources) - light borders [such os Simple Infrared Light Barrier', July/August 2002) - door openers [electromechanical. From DIY home improvements shops) Monitoring and controlling machinery - rpm (see Rev Counter for R/C Models' in (he November 2003 issue for an idea) - voltage and current (using a voltage divider or sense resistor ond optocoupfer vjo the A/C converter input) - temperature [PtlOO or LM76 sensor) - liquid level ( Rainwater Storage Gauge', December 2000. or Precision Level Gauge', December 2001) - flow or discharge (Row sensor, available from Conrad and other sources) - pressure (pressure sensor, avail able from Conrad and other sources) - valve controller (with a relay) - relay or PWM controller [PWM signal via a solid-stare relay) Centralised data access and data processing, in combination with on LC display [TC Display with l-C Bus , September 2003) and ban cade reader (from Conrad Electronics or another source) Figure 1. As shown here, a real web page can be created using a few simple lines of HTML cade. requested, url getarg no() is used to determine how many parameters are to be passed with the URL The content is determined using uri_getarg_pc{). As already mentioned, the only permissible values for the orguments are J A1 '-'A255 and 'ol'-'o2 55\ When copying the orguments to local variables, remember that you cannot copy more data ihan the amount declared for the variable. One or ihe primary examples is strings in C: here the final '0' byte also counts! Pi 1 00 temperature measurement One of the demo pages for the Webserver (T_DI5P.HTML) makes temperature measurements. Prl 00 sensors are espe- FlexGate 7 CP/1P stack v2.0 The FlexGate TCP/IP stack used here has been specially developed for 8051 -family processors. In contrast to the more elaborate stocks for PCs, its hardware requirements are quite modest. A complete Webserver can be set up using less than 1 kB of RAM ond approximately 12 kB of code. The stack is open-source software, which means the source code is freely available. In its basic configuration, this stack can handle the most important Internet proto- cols, which ore ICMP, ARP, PING, TCP and UDP. All that has to be added for a Webserver is ARP ond TCP. With the FlexGate TCP/IP stack, in principle any desired num- ber of concurrent connections is possible. The stack is integrated into the uC/51 compiler. This is a complete development environment for ANSI C (see refer- ence [1]). The demo version is normally restricted to 8 kB of code, but for the Micro Webserver the limit h automati- cally increased to 16 KB. 30 efeklw d&rtrEmitf - 7-8/ 2004 daily suitable for this purpose. As the MSC121 0 provides a precise reference voltage and its A/D converter can be cali- brated using the same voltage, any inaccuracies that may be present do not affect the measurement results. If you use a precision resistor and PtlOO sensor (DIN class I /3 is the most suitable], you don't even have to calibrate the circuit. Ir the components ore not so precise, you can achieve a perfectly adequate calibration using an ice- water bath O' C] and a warm-water bath at approximately 40" C with a ever thermometer. Unfortunately, PtlOO sensors are not fully linear, but with the indicated component values the error is within 0.5" C over the range of -10“ C to -r50" C (see Figure 3), As a constant current of approximately 2 mA Rows through the PtlOO sensor,, a certain amount of self-heating can occur with types having a small package. This is often stated in the data sheet where relevant. The voltage divider incorporating the PtlOO sensor is connected to the Ur^f, A1N7 and AGND/AINCOM terminals or the MSC1 21 0 board (see Fig- ure 4). Figure 2. SET.HTML displayed in the AceHTML ed'tor window. Processing the measurement data The ELMET.C file contains not only initialisation subroutines, but also interrupt subroutines. The software clock and the A/D converter both work with interrupts. This is used to continu- ously maintain the value measured by the A/D converter in a temporary variable of type long. To save computation time, this value is only converted into a temperature offer it reaches ELM_FLEX.C. The macro AD_FILT8 can be used to configure the A/D converter to always return the average value of sev- eral measurements. In this simple demo program,, the A/D converter is calibrated once only using set advai bip(). However, for reliable meas- urements it s a good idea to regularly recalibrate ihe A/D converter, such as every few minutes. One way to do this is to coll the initialisation routine in the main loop if a flog is set by the interrupt routine far the software clock. This method is bet- ter than calling the function directly In the interrupt routine. This is because as □ matter of principle the interrupt routine should be exited as quickly as possible, in order to avoid delays In responding to any other interrupts. Conclusion The software clock and making temperature measurements using a Ptl 00 sensor with the A/D converter are simply two sample applications. Naturally, the server can be used to implement just about any task you con imagine. Same of the passible applications we can think of are listed in the "Sug- gested applications' box. This list is far from complete, and if is actually intended to stimulate you to use the MSC1 21 0 board and the new network interface to develop your own applications. We re very much interested in seeing your ideas. Well certainly report all the attractive, interesting and clever applications in Flakier Electronics. And as always, we always reward applications suitable for publication with a suitable payment. Let us hear from you at editor® OlOktOr-elSC- tronics.co.uk, subject: Micro Webserver, -:40H7-U Figure 3 . Non-linearity or the Ft i 00 temperature sensor B-i — j 1k13 I — D.1-= AUfJ Figure 4. Connecting the temperature sensor to the reference voltage and A/Q can verier. V / Rp’c DC: 100,0011 50' C: 11 3.40 ii FT 100 1/3tWN AGV? ATIS COM giDT*7-11 internet references [1] vAvw.wi t ken ha euser.com A uC/ 51 compiler with source code [2] .■/V -.v. ti .com/ m sc The MSC1 21 x home page [3] g rc u ps ya h go .com , ■ g ro u p / T t -h v\ S C M5CI 21x users group. Definitely worth the effort. Free, but registration is required. [ 4] freewa re.aceh tm \ . com Free HTML editor. Registration not necessary. 7-S/20D4 ■ lieklor e'rd rentes 31 Airflow Monitor Gregor Kleine Fans are usually monitored by measuring their opening currents. It the current lies within a certain range, it is assumed that the ran is spinning properly and provid- ing □ stream of cooling air. If it falls below a lower threshold or exceeds an upper threshold, something is wrong with the fan: it is either defective or blocked by some sori of object. The cooling airflow generated by o fan can be directly monitored using the Ana- log Devices TMP1 2 sensor 1C [www.ona- bg.com | - This 1C contains a temperature sensor ond a heater resistor, as well os two comparators and a referencewolEage source. Figure 1 shows the complete cir- cuit diagram of an airflow monitor. The voltage divider formed by R1 , R2 and R3 defines the temperature thresholds and the hysteresis for the switching paints (via the current Iref flowing through the resistor chain). The internal heater resistor con be powered directly from the supply voltage via pin 5 (Hearer), but an external resis- tor (R5j can also be connected in series between the supply voltage and pin 5 to reduce the internal power dissipation or the 1C. The circuit output is provided here by two LEDs driven by the open-collector outputs UNDER (pin 6) and OVER (pin 7). The operating principle of the IMP 1 2 1C is that it is warmed by the integrated heater resistor and cooled by the airs flow. If there is no airflow or the airflow is insufficient due to a defective fan or obstructed air inlet, the temperature increases until the amount of heat dissi- pated by the 1C (by conduction to the cir- cuit board or other means) balances the amount of heat generated inside the 1C. Figure 2 shows this in the form of two curves. The power dissipation of ihe inter- na! 1 GOT > heater resistor is plotted on ihe X axis. This con be os much as 250 mW if pin 5 is connected directly io +5 V. If the heater resistor is not dissipating any power, the sensor will be at approxi- mately ambient temperature which is here taken to be +50 : C. If the power dis- sipated by the heater resistor increases, the level to which the temperolure of the 1C will rise con be read from the two curves, which show the situation with and without cooling airflow. As indicated, the temperolure thresholds Tset+Gh and Tset- lov. are dimensioned such that with the □mount of power converted into heat by 1 2 +5V chip the resistor [in this case, 250 mW), the temperature far the curve with cooling air- flow lies between the two temperature thresholds. Here the threshold tempera- tures are -3-55 C and +60 Z C. The voltage divider R1 /R2/R3 determines not only the absolute positions of the tem- perature thresholds, but also the hysteresis of the switching points. The hysteresis is determined by the current Iref flowing through the resistor chain. The associated formulas are shown in Figure 3. Here AT is the hysteresis, which in this case is set to 2 r C and yields a value of 1 7 pA for Iref. The node voltages for the voltage divider can now be determined from the threshold temperatures, which in this case yields Vsefh 3F = 1 .666 V for an upper threshold V REF © J ^ — jiT ■ 5 _lA + 7uA HI V 5£TtfsGH “ £H - 273-15) * 5mV R2 Veetlcv; - OeetloiV * 773. IS) * 5mV R3 W0065-13 32 staler Erledronks - 7-8/2004 of +60 q C on d Vsetiov. = 1 .64 1 V for a lower threshold of +55 : C As Wef =2.5 V, the values of PJ , P2 and R3 can now be readily calculated from the current and ifse voltage drops across the resistors. The voh ues calculated in this manner are shown in the schematic diagram, without taking into account whether such values are actually available. As the temperature thresholds used here are relatively close together, the actual values of the resistors must be quite close to the calculated values. This can be achieved by connecting standard-value fixed resistors in series and/or parallel or by using trim pots. The IMP! 2 can be used to generate dig- ital monitoring signals For a processor or switch on a supplementary fan (via a driver stage connected to the outputs}. Another possible application is controlling an oven that is switched off by the TMP1 2 when it reaches its setpoint temperature. Such an oven con be used to operate a crystal oscillator at an elevated tempera- ture in order to make it insensitive to tem- perature variations (a crystal oven). According to its data sheet, the 1C can be used at temperatures between -40 C und +125 °C. w : e =‘ Zero Gain Mod for Non-Inverting Opamp Flemming Jensen Electronics textbooks will tell you that a non-inverting opamp normally cannot be regulated down to 0 dB gain. If zero out- put is needed then if is usual to employ an inverting amplifier and a buffer amp in front of it, the buffer acting as an impedance step+ip device. The circuit shown here is a trick to make a non-inverting amplifier go down all the way to zero output. The secret is a linear- law stereo potentiometer connected such that when the spindle is turned clockwise the resistance in PI a increases [gain goes up), while the wiper of PI b moves towards the opamp output [more signal). When the wiper is turned anti-clockwise, the resistance of PI a drops, lowering the gain, while PI b also supplies a smaller signal to the bad. In this way, the output signal can be made to go down to zero. -C . i - r Vr Simple Darkness Activated Alarm Myo Min Most darkness activated alarms employ opamps and some logic ICs. Here, a less expensive approach is shown based on the eternal 555, this time in monostable multivibrator mode. Components R2 and C] represent o one-second network. When the LDR (light dependent resistor) is in the dark, its resistance is high, pulling pin 2 of the 555 to ground. This triggers the monostable and the (active!) 6-volt piezo buzzer will sound. Preset PI is adjusted depending an ambient light levels. The circuit may be fitted on □ wall in your home Assuming PI has been set for the existing ambient light level, the shadow cast by anybody entering the room or hallway will trigger ihe alarm. 7-6 ■ 20IM - c’rktw detitcrJci 33 Gerf Baars Crystals usually operate at Fundamental frequencies up fo about 1 5 MHz. When- ever higher frequencies are required a fre- quency multiplier is placed after the crystal oscillator. The resulting output signal is then a whole multiple of the crystal fre- quency. Other frequency multipliers often use transistors, which produce harmonics due to their nonlinearity These are subse- quently filtered from the signal. One way of doing this is to put o parallel L-C filter in the collector arm. This filter could then be tuned to three times the input frequency. A disadvantage is that such a circuit would quickly become quite substantial This circuit contains only a single 1C and a handful o! passive components, and has a complete oscillator and two fre- quency triplets. The output is therefore a signal with a frequency that is 9 times as much as that of the crystal Two gates from 1C I , which contains six high-speed CMOS inverters, are used as an oscillator in combination with XI . This works at the fundamental frequency of the crystal and has a square wave ot its out- put. A square wave can be considered as the sum of o fundamental sine wave plus an infinite number of odd multiples of that wave. The second stage has been tuned to the first odd multiple (3 x). We know that some of our readers will have noticed that the filter used here is o banckejection (series LC| type. Worse still, when you calculate the rejection frequency you'll find that it is equal to the funda men- tal crystal frequency! The fundamental fre- quency is therefore attenuated, which is good. But how is the third harmonic boosted? That is done by the smaller capacitor of 33 pf in combination with the inductor. Together they form the required band pass filter. [The same applies to the 12 pF capacitor in the next stage.) Through the careful selection of compo- nents, this filter is therefore capable of rejecting the fundamental and boosting the third harmonic! Clever, isn't It? The output in this example is a signal of 30 MHz, The inverter following this stage heavily amplifies this signal and sums it into □ square wave. The same trick Is used again to create the final output signal of 3 times 30 MHz = 90 MHz. At 5 V this circuit delivers about 20 milli- watt into 50 11. This corresponds ta + 13 dBm and is in theory enough to CMOS Crystal Frequency Multiplier IC1.A IG1.B SO MHz 1 MH 33p ci " — It 10p XI 1011 Hz ICt = 74HC04 020375 - 1 1 drive a diode-ring balanced mixer directly. The circuit can be used for any output fre- quency up fo about ICO MHz by varying the component values. When, for exam- ple, an 8 MHz crystal is used to obtain an output frequency of 72 MHz (9x8 = 72), the frequency determining inductors and capacitors have fo be adjusted by a factor of 10/8. You should round the values to the nearest value from the El 2 series. Another application is for use in an FM transmitter; if you connect a varicap in series with the crystal, you can make an FM modulator. An added bonus here is that the relatively small modulation level + 5 V AF In 5V PP 34 eblrtcrdiftronics- 7-8/2004 is also Increased by a Factor of 9. Crys- tals with Frequencies near 10 MHz are relatively easy to Find and inexpensive, so you should always be able to Find o suit- able frequency within the FM band. A crystal of 10.245 MHz for instance would give you a frequency of 92.205 MHz and 1 0.700 MHz results in an output of 96.300 MHz. You may rind that the circuit operates on the border of the HC specifications. IF this causes any problems you should Increase the supply voltage a little to 6 V. CESTUI Doorbell Caicode Rene Bosch Sometimes you have to do it the hard way, even if doing it the easy way is an option. That is the case here. The inten- tion is fo add o second doorbell In paral- lel with the existing bell. This does not, in principle, require any electronic compo- nents. You would simply connect the sec- ond bell to the first one. Bur if the existing bell transformer is not rated For the addi- tional load then this Is not a goad ideal An option is to buy a new and larger transformer. But bigger also means more expensive! Moreover, replacing the exist- ing transformer con be an awkward job, for example when it is buili into She meter box. So we follow different approach. This cir- cuit is connected In parallel with the exist' ing bell. This is possible because the cur- rent consumption is very small compared fo the bod of the bell. The bridge rectifier rectities the bell voltage when the push- button is pressed. This will then close the ©- 230V rXj ©" ©- 230V 'T Lf & relay contacts. These contacts are the electronic' button for the second bell, which Is powered from its own cheap bell transformer. Switchless tiCd/h iMM Cher ger Myo Min This circuit may be used to replace the sin- gle current limiting resistor often found in dirt cheap battery chargers. The alternative shown here will eventually pay off because you no longer have to throw away your NICds after three months or so of maltreatment in the original charger. The circuit diagram shows an LM3 1 7 in constant-current configuration but without the usual tixed or variable resistor at the ADj pin to determine the amount of out- put current. Aba, there Is no switch with an array of different resistors to select the charge currents for three cell or battery types we wish to charge: AAA AA and PP3 (6F22J. When, far example, an empty AAA cel! is connected,, the voltage developed across R! causes T1 to be biased via volt- age dropper D I . This results m about 50 uA flowing from the LM3 1 7'$ ADJ pin into the cell, activating the circuit into con- stoni-current made. D4 is Included to pre- vent the b artery being discharged when the charger is switched off or without a supply voltage. The charging current / is determined by R1/R3/R3 a$ in R[n]«[l-25+V*J// where V soE is 0. 1 V. 7-B,- 2004 - ebkfor dedrenks 35 The current should be one tenth of the nominoi battery capacity ■ — For example, 170 mA For a 1700-mAh NiCd AA cell. Il should be noted that TP3 f rechargeable batteries usually contain seven NiCd cells so their nominal voltage is 8.4 V and not 9 V as rs often thought. It relatively high currents are needed, the power dissipation in R1/R2/R3 becomes an issue. As a rule of thumb, the input voltage required by the charger should be greater than three times the cell or battery (pack) voltage. This is necessary to cover the LM3 f 7’$ dropout voltage and the volt* age across R(n). Two Final notes: the LM317 should be fit- ted with a small heat sink. With electrical safety in mind the use of o general-pur- pose mains adapter with DC output is pre- terred over a dedicated mains trans- former/ rectifier combination. 1 01 t9V...-t25V © * ci ■n7Q-l 35V ©— *- t I: \* LM317 >> * 9^ l si U.S317T C 3 adj. 02 BC547 rv FE 1W 12 -© in _ BC547 i 1N40Q4 3 1M4GQ4 £ AAA BC547 AA ™ PP3/6F22 3» tMQOCZ - 1 1 SMPSU with a Relay Myo Min Switched mode power supply units [SMP- SUs) are popular but difficult to build one- self as well problematic when it comes to understanding their design prindples. B wilding your own SMPSU typically requires a lot of expertise, hard to find components and time. The circuit shown here is educational only and devised to demonstrate the principle of the step-up switch mode circuits. It is not intended to be incorporated in a 'real’ design. Relay Rel has a normally-closed (NC) change-over contact and is connected to act as a vibrator When power is applied to the circuit, the relay is energized and actuates its contact. This action may appear to break the circuit. However, the energy stored in the relay coil will pro- duce an induced voltage which is fed to D1 and Cl for rectification and smooth- ing. The output voltage will be of the order of 150 V and strongly dependent on the type of relay used. In general, the faster the relay, the higher the ouEpui volt- age. The circuit will oscillate at a low fre- quency (100-200 Hz), and a buzzing sound will be heard from ihe relay. m +150V 1 00 V Regulators Gregor Kleine Standard three-legged voltage regulator chips like the LM317 con cope with an input voSrage of up fo about 30 V, a Few high-voltage types can handle 60 V but if that is still not sufficient for your applica- tion the company Superfex (v/ww. super- tax. com] produce devices that can with- stand much higher input voltages. The reg- ulator type LR8 has a maximum input volt- age of 450 V and can supply an oulput current of 20 mA. The LR 1 2 has a better output current of 50 mA but with a maxi- mum input voltage of 1 00 V, and the oul- 36 ehfctor clsctrcks - 7-8/2004 LC1 I Cl put voltage can be adjusted up to 88 V. The output voltage is defined by a poten- tial divider chain connected between the output and the ADJ (adjust) input pin. The regulator simply changes its output volt- oge until the divided voltage at the ADJ input is equal to 1 .2 V. The output voltage can be more precisely expressed as a function of Rl and R2 in the formula: Vour= 1-2 V [1 +IR2/R]]] R2 = R 1 -HW1.2VH] The current through R 1 and R2 must be greater than 100 gA. Just like conventional voltage regulators the LR 1 2 can also be configured os a con- stant current source. Again the regulator simply adjusts its output voltage until it measures 1 .2 V at the ADJ input. Far a constant current of 1 0 mA the value of the series resistor is equal to the resistance that will produce a voltage drop of 1 .2 V when 10 mA passes through It As men- tioned above the maximum output current is limited to oO mA. A capacitor of 100 nF is necessary at the output to ensure stable regulator operation. The LR 12 is available in SO-8, 1092 and T0252/D-PAK outlines. Stepper Motor Generator Stepper motors ore a subject that keeps recurring. This little circuit changes o dock signal (from a square wave generator) into signals with a 9Gdegree phase difference, which are required to drive the stepper motor windings. The price we pay for the simplicity is that the frequency is reduced by a factor of four. This isn't really a problem, since we just have to increase the input fre- quency to compensate. The timing diagram clearly shows ihai the counter outputs of the 4017 are com- bined using inverting OR gates to pro- duce two square waves with a phase dif- ference. This creates the correct sequence for powering the windings: the first wind- ing rs negative and the second positive, both windings are negative, the first wind- ing is positive and the second negative, and finally bath windings ore positive. Internally, the 4017 has a divide-by-10 counter followed by a decoder. Output 0 is active (logic one] as long as the internal counter is at zero. At the next pos- itive edge of the clock signal the counter increments to I and output '1 becomes active. This continues until output '4 f becomes a logic one. This signal is con- nected to the reset input, which immedi- ately resets ihe counter to the "zero" state. If you were to use an oscilloscope to look at this output, you would have to set it up -i-3V ... +15V very precisely before you would be able to see this pulse; that's how short it is. The output of on OR gate can only supply several mA, which is obviously much tea little to drive a stepper motor directly. A suitable driver circuit, which goes between the generator and stepper motor, was published in the May 2004 issue of Eiektor Electronic s. a ■ f»i 1 2 i 3 * 0 i CLK jirurjiru n 1 - ■ z 7-B./2004 - eUfctor sbrtronics 37 Intelligent Flickering Light Andre Frank Whether if is required to simulate an open Fire in a nativity scene, a forest Fire in a model railway landscape, a leg fire in a doll's house or simply for an artificial can- dle, neither steady light nor the commer- cialiy-availabie regularly flickering lights ore very realistic. The circuit described here imitates much better the irregular flickering of a fire. For maximum flexibility, and io reduce the component count to a minimum, a micro- controller from the Atmef ATtiny range has been selected to generate the flickering pattern. Two miniature light bulbs, each driven by a transistor, are controlled using a PWM signal to produce eight different light levels. Potentiometer P ] in the PC net- work adjusts the speed of the deck to the microcontroller, and hence the speed of the Flickering. Generating the light levels in software is straightforward in practice, but the under- lying theory Is far from simple: hence the 'intelligent' in the title. Using a digital pseudorandom number generator [an 8- bit shift register with feedback arranged according to the coefficients of a primitive polynomial) a sequence of period 255 can be produced, in order that the flick- ering is not too violent, the sequence is smoothed using a digital FIR low-pass fil- ter which takes the average of the last two sample values. If desired, a jumper can be fitted that compresses the dynamic range of the output by adding in a fixed basic intensity. The result h an irregular flickering which closely resembles that of a fire. A further option allows the bright- ness values to be read from a look-up table instead of using the sequence gen- erator; this option obviously gives the greatest flexibility. A jumper gives the choice of two different tables. The look-up tables con be used to produce other decorative light effects, such os o light fader, or the continous mixing of two differently-coloured lights. It could even be used to imitate rotating flashing lights on a model. If the design were expanded to three channels, it would be possible to connect three miniature light bulbs In red, green and blue (or an RGB LED} and gen- erate arbitrary colour patterns. The printed circuit board is just the size oF o postage stamp and so should be easy to fit within small models or mode! land- scapes. The board is single-sided, and making the board and populating it should not present any difficulties, thanks to the absence of SMDs. The total compo- nent cost is very low, at around two or three pounds, not including the circuit board. Power con be obtained from any regulated 5 V supply. If only on unregu- lated supply is available, then this should be connected to V+. Current consumption is of course mostly dependent on. the choice of lamp. v+ 38 dcklDf shiffo'cs - 7-8/2 Oft COMPONENTS LIST Resistors: R1 ,R4.R5 = 4kQ7 R2 = 10kQ R3 - 1 LQ R6 = 2200 Capacitors: Cl ,C2 = lOOnF C3 = lQuF 16V Semiconductors: 01 - 5. 1 V zener diode, 400 mW T1 J2 - SC547 1C 1 - Aitinyl 1-6PI (programmed) Miscellaneous: LI ,L2 = 6V / 80mA miniature lamp PCB no, 040089-1 1 available from The PCBSh ap Project soFhvare: file 040089-1 1, Free Download Ti le [ifertial 5 3211 Design Applications Data Quit Help ■O . Cl 1000 Frequency Duty Cycle frif Hz % Calculate AdjUSt! fXH^I ^ Cl r Tuner \_±j Tl Vout tH = 75Q.0us iL^ZSO.GiiS Karel Wa! raven You may not realise ihh, but the 555 timer 1C has been in existence for over 30 years. The chip v/as originally manufactured by Signetics. in ihe first three months following its introduction (1972) over half a million of them were sold. Moreover, it has stayed successful: since that time the 555 has been the most popular 1C sold every year! Nowadays it makes sense to use the CMOS version of this 1C, since it con- sumes significantly less power. Virtually everylhing regarding the 555 can be found at www. s c h em a t i c a . com / 555 Timer design 7555.htm . A program can be downloaded from this site, which easily calculates the values ror ihe R-C components. The program is suitable for both the astable and bistable modes. The adjust' buttons are used to switch between the single 555 and ihe double version [the 556), When a different value is chosen For Cl, the resistors change automatically. C44-:w-: Reset 1C with Selectable Voltages Gregor Kleine Modern digital systems work with a sup- ply voltage of +3.3 V # and sometimes they also need an additional, lower sup- ply voltage, such as 1.8 V, K5 V or even 1 .2 V. To generate a reset signal from these two voltages, it was previ- ously necessary to use a separate reset 1C for each voltage, and each iC had to be Individually dimensioned for the volt- age it monitored. The Linear Technology LTC2904/5 fvAvw. linear.com/odf/29Q45f. pdf) can be programmed for two voltages. The voltages are selected using the SI, 52 and TOL Inputs according to whether they are connected to VI connected to ground or left open. The 1C can be config- ured for the voltages shown In the table. The tolerance for the two voltages can be set using the TOL pin. The effect this has cn the Internally determined reset threshold Is that the larger the tolerance,, the lower the internal threshold Is set. The RST output (pin 3) is an open-drain output. It goes Low when at least one of the two voltages drops below the pro- grammed threshold level. There is o time delay before the reset signal is de-acii- vated after the voltages rise above the threshold level. With ihe LTC2904 this delay has o fixed value of 200 ms, while with the LTC2905 it depends on the value of the capacitor connected to the TMR pin: 7-0/2 004 - Ekkter dsclmniES 39 SI S2 VI V2 VI VI 5.0 V 3.3 V open ground 3.3 V 2.5 V VI open 3.3 V 1.8 V open VI 3.3 V 1.5V open open 3.3 V 1.2 V ground ground 2.5 V 1.8 V ground open 2.5 V f.5V ground VI 2.5 V L2 V VI ground 2,5 V 1.0 V TOL Tolerance VI 5 % open 7.5 % ground 10% L 1 t VT "7 / / \ Power I Supply i I Y2 3V3 tve JT Ml C3 Z2n J2 C2 ]C-£n V2 VI 71, EH HST JC1 LTC29Q4CT* LTC29DSCT * a'3J si sz tol jpi < i — O I o — E I JP2 I JP3 o — J VI V2 / S ! RSr / D/gfta/ \ System j / / l=it O — T WC-G31 - U h-'cv = 9 ms/nr This expression is valid for delay times between 1 ms and 1 0 s. In place of the TMR connection (pin 2], ihe LTC2904 has an open-drain RST output that is complementary to the RST output, which means it is active High. Z'hVS.l-l Monitor Life Xtender IRF54G Jo? in Myo Min Inis circuit was designed to protect a computer monitor from overheating. It is recommended to attach Shis circuit to power users' monitors I Most computer monitors of the CRT type Fail owing to over heating. Artec one or two hours of use, the rear of a monitor may become as hot as 45 degrees C, or 20 degrees above ambient temperature. Most heat comes from the VGA gun driv- ers, the horizontal circuit, vertical circuit and power supply. The best possible way to extract heat and so prolong morv 40 elector tleritanfa -7-8 20 0 4 I itor life (and save the environment) Is to add a brushless fan, which Is lighter, energy-wiser and mare efficient than a normal fan. in the diagram, diodes D2 , D3 and D4 sense the monitor's temperature. These diodes have a total negative temperature coefficient of 6 mV per degree Celsius. To eliminate noise, shielded wire should be used for She connection of the temperature sensor to the circuit sensor. The + 12-V supply voltage is borrowed from the computer s power supply. Alter- natively, a mains adapter with an output of I 2 VDC may be used. Cl and C2 are decoupling capacitors fa eliminate the rip- ple developed by switching or oscillation. 81 provides bias current to Dl, a &V zener diode acting os a reference on the non-inverting pin ofopamp 0,8, 1C I, a J precision shunt regulator' raises the sensor diodes' voltage to just over 6 V depending on the adjustment of PI , C4 is the decou- pling capacitor with the sensor network. Integrator network R4-C5 provides a delay of about 3 seconds, transforming the an/off output signal of IC2.B Into an exponentially decreasing or Increasing voltage. This voltage is fed to pin 3 of the second opamp, IC2.A. The hard on/off technique would produce a good amount of noise whenever the load is switched, hence an alternative had to be found. IC3, a TLC555, is used as an ostable multivibrator with R5 and C6 controlling the charging network that creates a sawtooth voltage with o fre- quency of about 1 70 Hz. This sawtooth is coupled to pin 2 of IC2.A, which com- pares the two voltages at Its input pins and produces a PWM (pulse width modu- lated) output voltage. The sawtooth wave is essential to the PWM signal fed to power output driver T1 by way of stopper resistor R6. The power FET will switch the fan on and aft fan according to the PWM drive signal. The back emf pulses that occur when T1 switches an and off are damped by a high-speed diode, D7. Initially, turn PI to maximum resistance. Blow hot oir from a hair dryer onto the sensordlodes for a minute or so then get the temperature meter near the sensor diodes ond adjust PI slowly towards the minimum resistance positron with a digi- tal meter hooked up on pin 7 of IC2.B. Roughly calibrate the temperature to 40 degrees C. At this temperature, the meter will show approximately 1 2 V. The circuit will draw about 1 20 mA from its 12-V supply. 3.3 V or 5 V Direct from to® Mains +300V - t Gregor Kleine The SR03x range of voltage regulator chips from Supertax | www. su p e riex .com) connects directly to the rectified mains supply and provides a low-current 3.3 V or 5.0 V output without the need for any step-down transformer or inductor. The circuit requires a full-wave rectified mains voltage input [waveform a). A built-in comparator controls o series-pass configured MQSFET, The MOSFET is only switched on whenever the input voltage Is below on 1 8 V threshold. A 220 uf capacitor is used to smooth out fluctua- tions so that the resultant voltage has a sawtooth waveform [waveform b) with o peak value of 18 V, This unregulated voltage is connected to the source input of the chip [pin 7 ) and on internal voltage regulator produces a regulated output [waveform c] of 3,3 V for the type SR036 or 5.0 V for the 5R037. Normally you would expect to see a reservoir capacitor fitted across the out- put of a full wave rectifier in a power supply circuit but in this case it is impor- tant to note that one is not fitted. For correct operation it is necessary for the input voltage to foil dose to zero during each half wave. Warning: This circuit must only be used In a fully encapsulated enclosure with no direct connections to any external circuit. It is important to be aware that the circuit is connected to the moins and the chip has lethal voltages on its pins! All appropriate safety guidelines must be adhered to. j;4V2-‘: 7 8/2004 - dsklcr electrics 41 Lifespan of Li-Ion Batteries Karel Wa I raven New technologies con introduce new problems. We haven't really hod enough experience in the use of Lithium-Ion batteries to make a precise statement on their lifespan. Stories are floating around of o short [ifespon of only a few years when used intensively in note- books, whereas it should be possible for them to last anywhere between 500 and 1,000 cycles. Should you use the full capacity of the battery 200 days per year, it should in iheory have a hFespan of about three years. But even when the battery nos gone through only 1 00 cycles it appears to have lost some capacity. With nickel-cadmium and nickel-hydride cells it is recommended that they are never fully discharged, nor fully charged. The NiMH battery used by Toyota in the Prius cor operates between 40 % and 30 of capacity and has on 8-year guar- antee, IF it wos used between 0 and 1 00 % it wouldn't even survive one year of intensive use. Lithium-Ion batteries appear to behave dif- ferently, Discharging by 20 % and capacity after only three months when they've been kept fully charged at a tem- perature of 60 degrees Celcius. Therefore, if you have a battery that won't be used for a while, you should charge it to 50% and keep it at a coo! tempera- recharging often also seems to reduce the lifespan. With this type of battery if is therefore better to complete the dis- charge/ charge cycle os much as possi- ble, since half a cycle appears to count as a whole one. A second aspect is the oxidation of the electrodes. They begin to deteriorate right from the moment of manufacture and that process is unavoidable. This causes a gradual reduction in the useable capac- ity. Although this process can't be stopped, it can be slowed down. The key words here are low temperature and not fully charged'. It is ironic that this is the exact opposite to the conditions found in a typical notebook: the battery is kept fully charged and the temperature is often around 40 degrees Celcius. There have been reports of batteries losing half their lure (room temperature is fine). You con charge a battery to 50 % of its capacity by reducing the charging voltage to about 3.9 V. In any case, you should check the output voltage of the charger and take away a Few tenths of a volt. Accidents con happen when the charging voltage is too high! Another cause of failure is when the bat- tery is deeply discharged due to self-dis- charge. To avoid damage the battery volt- age should never drop below 2 V. At room temperature this means that the bat- tery should be checked once or twice a year, and recharged if necessary. :■ -el:::-: Linear LT [?'0W9L'‘ Wi'uW Gregor Klein e The Notional Semiconductor LMV225 is a linear RF power meter 1C In an SMD pack- age. It can be used over the frequency range of 450 MHz to 2000 MHz and requires only four external components. The input coupling capacitor isolates the DC voltage of the 1C from the input sig- nal. The I Oka resistor enables or dis- ables the SC according to the DC voltage present ot the input pin. If li is higher than 1.8 V, the detector is enabled and draws a current of around 5-8 mA. 31 the volt- age on pin At is less than 0.8 V, the 1C enters the shutdown mode and draws a current of only a few microamperes. The t2V7 ... +5V5 © Ji7 K1 P^i = 501 < ^-j $©-»- ns 2 A2 A1 47 On tct RFii^iE^ OUT LMV225 GND 82 UoUT B1 C2 In I i (U4CUG - If A- Bump micro SMD i. 1 « 1 1 iT.T, l Si » S~'\ ' ai i © v CUT T Top View SHAtO-lta 42 cl4.ru EbtliHiks - 7-8/2Q04 IMV225 can be switched between the active and shutdown states using a logic- level signal if the signal is connected to the signal via the 1 0-kO resistor. The sup- ply voltage,, which can lie between +2.7 V und +5.5 V, is filtered by a 100- nF capacitor that diverts residual RF sig- nals to ground. Finally, there is an output capacitor that forms o low-pass filter in combination with the internal circuitry of the LMV225. tf this capacitor has a value of 1 nF, the corner frequency of this low- pass filter is approximately 8 kHz. The comer frequency con be calculated using the formula fc - 1 + (2 7T Cout Rc) where R= is the interna! output impedance (1 9,8 kQ), The output lowposs filter deter- mines which AM modulation components are passed by the detector. The output, which hos a relatively high impedance, provides an output voltage that is proportional to the signal power, with a slope of 40 mV/dB. The output is 2.0 V at 9 dBm and 0.4 V at -40 dBm. A level of 0 dBm corresponds to a power of 1 mW in 50 Q. For □ sinusoidal wave- form, this is equivalent to an effective volt- age of 224 mV. For modulated signals, the relationship between power and volt- age is generally different. The table shows several examples of power levels and volt- ages for sinusoidal signals. The input impedance of the LMV225 detector is around 50 o to provide a good match to ihe characteristic impedance commonly dBm mW (Jeff (Sinusoid) -40 0.0001 2.24 mV -30 0.001 7.07 mV | -20 0.01 22.4 mV -10 0.1 71 mV 0 1 224 mV 10 10 707 mV Adjustable Z@oiHsr Po@d© Diefer Sellers l A Zener diode is the simplest known type of voltage limiter [Figure 1 ) As soon as the voltage exceeds the rated voltage of the Zener diode, a current can flow through the diode to limit the voltage. This is exactly the right answer far many protec- tion circuit applications. However, if it is necessary to limit a sig- nal to a certain voltage in a control cir- cuit, Zener diodes do not provide an ade- quate solution. They are only available with fixed values, which are also subject to a tolerance range. What we are look- ing tar is thus an adjustable" Zener diode. Such a component would be useful in a heating controller with a preheat tem- perature limiting, for example, or in a bat- tery charger io provide current limiting. The answer to our quest Is shown in Fig- ure 2. Assume for example that the output voltage must not exceed 6.5 V, The con- trol voltage on the non-inverting input is thus set to 6.5 V, Now assume that 4.2 V is present at the input. The result is that the maximum positive voltage is present at the opamp output, but the diode prevents this from having any effect on the signal. However, if the voltage rises above 6.5 V, the output of the opamp goes negative used in RF circuits. The data sheet for the LMV225 shows how the 40-dB measure- ment range can be shifted to a higher power level using □ series input resistor. The LMV225 was originally designed for use in mobile telephones, so it comes in o tiny SMD package with dimensions of only around 1 x 1 mm with four solder bumps [similar to a ball-grid array pack- age). The connections are labelled A1 , A2, Bl and Bl, like the elements of o matrix. The corner next to A1 is bevelled. 033150-13 and pulls the voltage back down to 6,5 V. The current is limited by R3. 7 * 8/2004 - drfctor Eletfrcmcs 43 Another example is a situation in which exactly the opposite is required. In this case, the voltage must not drop below a certain value. This con be easily achieved by reversing the polarity of the diode. Another option is a voltage that is only allowed to vary within a certain voltage window. It must not rise above o certain value, but it also must not drop below another specific value. In the circuit shown in Figure 3 r the left hand opamp pro vides the upper limit and the right-hand opamp provides the lower limit. Each opamp is wired as a voltage follower § resistor. The open collector out- put of IC2 can be directly connected to the reset input of 1C 1 but the output of IC3 must be connected via a level shifting device before it can be connected to the reset input of IC1 because the voltage level ot the output of IC3 goes negative. JFET transistor T 1 is used to perform the necessary level shifting. The JFET turns off when the voltage ot its gate-source junc- tion is between -2.5 V and -6 V. When [C3 is issuing o reset signal the RES out- put (pin 6] will go up to ground potential and couse II to conduct and trigger a reset oflCL At all other times the RES out- put of IC3 will be pulled to a minus volt- age vio the 100 kQ resistor which then causes T1 to stop conducting and release the reset. A manual reset push button can also be connected to RESIN of ICI if required. The SENSE input (Pin 7} of the TL77xx chips is connected to the positive supply roil. The reference input (pin Ij is fitted with a ICO nF capacitor to reduce the effects of fast transients. The JFET type MMBF4416 is available from Conrad Electronic [ www.conrad.de), order no. 1 4 28 08 [LI© Light Pen Myo Mm Physicians and repair engineers often use small light pens for visual examination purposes. Rugged and expensive as these pens nrta y be, their weak paint is the bulb, which is o serviceable' part. In practice, that nearly always equates to expensive' and / or impossible to find' when you need one. LEDs have a much longer lire than bulbs and the latest ultra bright white ones also offer higher energy-fa-lighf conversion efficiency. On the down side, LEDs require a small electronic helper circuit coiled 'constant-current source'' to get the most out of them. Here, T1 and R1 switch on the LED. R2 acts as a current sensor with T2 shunting off [most of) TVs base bias current when the voltage developed across R2 exceeds about 0.65 V. The constant current through the white LED is calculated from R2 - 0.65 / ^ D With some skill the complete circuit can be built such that its size is equal to an AA battery. The four button cells fake the place of the other AA battery that used to be inside the light pen. Bill + 1V5 BT2 + 1 VS — BT3 + 1 V5 — BT-3 + 1V5 — Storage Battery [Exerciser Ludwig Libertin A motorcycle or boat battery that is not needed over the winter is usually charged before being put away for the winter, after which it remains standing unused for months on end. As □ result, if accumulates deposits of lead sludge, which con result in reduced capacity or even complete fail- ure of the battery. If you don't keep active, you rust! To ovoid this, it's necessary to keep the battery active even during the winter This circuit does such o good job of exercising the battery that if doesn't have to be recharged during the winter It only hos to be fully charged again In the spring before being used again. 1C 1 .A is an astable multivibrator with an asymmetric duty cycle. The output is High far around 0.6 s and Low for around 40 s. IC1.B is wired as a comparator that constantly monitors ihe battery voltage. Jfs threshold voltage is set to 1 1 .0 V using Ihe trimpoL As soon as the battery volt- age drops below this value, the compara- tor goes Low and D6 Is cut off, allowing the second astable multivibrator 1C 1 .C to oscillate at approximately 1.2 Hz. LED D7 then blinks to indicate that the battery must be charged. As long as the battery voltage is greater than 1 1 V, 1C 1 _B is High. IC1 .A is Low most of the time, and in this state D4 con- ducts and the inverting input of ICVD Is Low. This means that SCI .D is High most of the time, with Ti cut off. Tl only conducts during the 0.6-s intervals when 1C1 .A Is High. In this state it allows current to pass through the lamp (12 V / 3 W), which forms the actual load for the battery. After 43 -Mt&r dectrcria ■ 7-3/ZG04 this, darkness prevails again for 40 s. The overage current consumption is approxi- mately 5 mA, At [his rate, a relatively new 40-Ah battery will fake around one year to become fully discharged, However, this can vary depending on the condition of the battery, ond it may be necessary fa Tap up 1 the battery once during the winter. iripfl© r ?r r up’pDf 1C3 D30449- 11 Bernd Schadler Inexpensive miniature transformers nor- mally provide one or two secondary volt- ages, which is sufficient for generating a set of positive and negative supply volt- ages, such as are needed for operational amplifier circuits. But what can you do If you need an additional voltage that is higher than either of the supply voltages [such as a tuning voltage for a receiver?). This circuit shows a simple solution to this problem, and it certainly can be extended to suit other applications. Using a 2x1 o-V transformer, it generates positive 24-V and 1 2-V supply voltages and □ negative 12-V supply voltage. The little trick for generating the +24-V 7-S/2O04 - dfilctol cbftTGEtks 49 output consists of using SC 1 to create a vir- tual ground. This is based on a well- knov/n circuit with a voltage divider Formed by two equal-valued resistors, which divide the voltage Ub across the rectifier from approximately 40 V down to 20 V. This Ub/2 potential is buffered by an opamp, which allows this virtual ground to drive a load. The present cir- cuit uses the same principle, but instead of being divided by a factor cf 2, the volt- age across the rectifier (approximately 40 V] is divided unequally by R1 ond R2. The resulting potential, which is buffered by the apamp and the subsequent transis- tor output stage, lies approximately 15 V above the lower potential, and thus around 25 V below the upper potential The three voltages are stabilised using standard 1 GO-m A voltage regulators, as shown in the schematic. The supply voltages for the apamp are also asymmetric. Thanks to the low cur- rent consumption, this can be managed using two Zener diodes. You must bear in mind that ihe secondary voltage generated by an unloaded minia- ture transformer is significantly higher than its rated secondary voltage. The fol- lowing results were obtained in a test cir- cuit using a L6-VA transformer with two 15-V secondary windings: the positive and negative 12-V outputs could be loaded at around 1 0 mA each, and the 24-V output could be loaded with approx- imately 20 mA, ail without ony drop in any of the output voltages. For small cir- cuits such os a 0{4}-2(7mA instrumenta- tion loop, this Is fully adequate. For more complex circuits or switched loads, addi- tional compensation may be necessary. Save lot Despite our best efforts, a lot of energy is still wasted imperceptibly. We insulate our homes, install high efficiency boilers and buy low energy light bulbs. But it doesn 't end there os far as electrical consumption is concerned. Many other items in the home consume electrical power, but here we concentrate on mains adapters [also called 'wall cubes' or battery elimina- tors]. Take a good leak around the house to see how many you have, and you could soon find about ten of them: phone chargerjs), battery chargers, minr-vac, telephone, answering machine, the radio in the kitchen, modem, and so on. The disadvantage of these adapters is that they easily consume from 1 to 2.5 W under no load, without you getting any- thing in return (apart from same heat, of course). When five mains adapters ore in use. each consuming 2 W, they II take one kilowatt-hour every 100 hours, at a cost oF 7 p. And 100 hours amounts to only 4 days! In a year, this is 87.6 times os much, or a bit over £6 per year. And if ten adapters ore in use this amounts to over £1 2. Something can be done about this, of course. The simplest way Is to switch off all adapters when they ore not in use. Most of you do this already, surely. There are probably o few adopters mat hove to remain switched on at all times though. There is on alternative for these os well: take a look at those modern switch ed- mode adapters* They no longer have a bulky transformer just o swltched-mode supply. They are [unfortunately] a bit more expensive, but tend to be smaller ond give a better regulated output voltage. The quiescent power consumption of these adapters really is very small. Pse id© Track Occupancy Detector for Mdrklin Digital Systems Nils Korber Track occupancy detectors are needed for hidden yards and other sections of track that are hard to see, but they are also nec- essary for block operation. The circuit described here uses an LED to indicate track occupancy for digitally controlled Mark! in HO model train systems (includ- ing Delta Control). In contrast to a real irack occupancy detector, which detects all vehicles, if only responds to vehicles that draw traction current. This means it can be used without making complicated modifications to the rolling stock and frock, since it is only necessary to gap the third rail. This circuit is thus especially suitable for retrofitting to existing installations, and it is equally well suited to M, K and C tracks. The basic Idea of ihe circuit is simple. If a locomotive enters ihe monitored track section, a current flows through the motor. This current is sensed and generates an indication. With a Marklin Digital system, power is provided to she locomotive via o controller or a booster in the form of a square-wave voltage. The voltage levels on the roils ore approximately -1 5 V and + 1 5 V. Digital control information is trans- ferred by a continuous sequence of alter- nating plus ond minus levels. This means that the detector circuit must be able to respond to AC signals. In Figure 1 ihe monitored track section 50 dcktcrdedrcnia-7^3/20^ on the left is connected to ihe ground ter- minal G vio the rails. The third rail, with conducts the traction current to the loco- motive, is isolated from ihe rest of the sys- tem (special third-rail insulators are avail- able for this purpose), and it is connected to the 'B' terminal of ihe controller or boaster via the detector circuit. If a locomo- tive travels over the monitored track sec- tion, the positive component of the drive current flows through diodes D \ and D2, while the negative component flows through D3. With a motor current of approximately 250 mA, the voltage drop across a single diode (1 N4C01 types are used here) is o good 1 V. The voltage drop across the two diodes connected in series (0 I and 02) is suffi- cient to illuminate LED1. Although the locomotive will travel somewhat slower due to the voltage drop, this will not cause any problems. A second defector can be obtained by connecting an addi- tional diode to the circuit as shown in Figure 2. This couses a second LED to illuminate for negative drive current. Due to the pulse trains and fluctuations in the traction current, the LED illumination is not constant, but instead flickers more or less strongly. Other traction-power loads, such as coach lighting or tailfights, will olso generate an 'occupied' indica- tion. In such cases, the LED will remain illuminated even if the locomotive is stand- ing still with no current flowing through the motor. Sometimes the quiescent cur- rent through a decoder is sufficient to cause the LED to illuminate (a little bit) 1 ii V B control unit / t oaster/ DELTA control 0 CtjOl&X iZ even if the locomotive is standing still. Another possibility is to use on opfocou- pler instead of an LED. This would allow the circuit to be connected to an s88 detection module. 03G1HM Simple fNIICd Charger Wolfgang Schmidt A simple NiCd charger con be built using junk box' components and an inexpen- sive LM317 or 78xx voltage regulator. Using a current limiter composed of R3 and a transistor, it can charge as many cells as desired until a 'fully charged' volt- age determined by the voltage regulator is reached, and if indicates whether if is charging or has reached fhe fully charged state. If the storage capacitor (Cl) is omit- ted, pulsed charging fakes place. In this mode, a higher charging current can be used, with all of Ihe control characteristics remaining the same. tci * 7-8/2004 - dektor EfertF&ciits 51 The operation of the circuit is quite sim- ple, [f the cells are no! fully ehorged, a charging current flows freely from the volt- age regulator, although if is limited by resistor R3 and transistor T1 . The limit is set by the formula I max = (0.6 V) +■ R3 For I max = 200 mA, this yields R3 = 3 Q. The LED is on if current limiting is active, which also means that the cells are not yet fully charged. The potential on ihe reference lead of the voltage regulator is raised by approxi- mately 2.9 V due to the voltage across Raj. K. Gorkhali This circuit proves that micr oca processors, PCs and the latest ultra<3ccurate DACs are overkill when it comes to controlling tour relays in sequence in response to a rising control voltage in the range 2.4 V - 12 Vi By using equal resistors in ladder network R I -R5 , equal intervals are cre- ated between the voltages that switch on the relays in sequence. Each resistors drops 1/5" of the supply voltage or 2.4 V in this case, so sve get +2,4 V = Re 1 , +4.8 V - Re2, +7^2 V = Re3, +9.6 V = Re4. Obviously these switching levels vary along with the supply voltage, hence ihe need to employ a stabilised power supply. Looking at the lowest level switching stage, when the control voltage exceeds 2.4 V, IC1 will flip Us output to [nearly) the supply level The resulting current sent into the base of T1 is limited to about 1 mA by R6, Wiih T I driven hard, relay Rel is energised by the collector current. Because the BC548 has a maximum col- lector current spec of 100 mA, the relay coil resistance must not be smaller than 120 ohms. Nearly all current consumed by the circuit goes on account of the relay coils, so depending on your relays a pretty hefty power supply of up to 500 mA may be required. When dimensioning the ladder network to create the desired switching levels, it is good to remember that the 741 will not operate very well with input voltages below 1 .5 V or above 1 0.5 V, while voltage levels fhe LED. This leads to o requirement for a certain minimum number of cells. For an LM317, the voltage between the ref- erence lead and the output is 1 .25 V, which means of leas! three cells must be charged (3 x 1 .45 V > 2.9 V + 1 .25 VJ, For o 7 8 xx with a voltage drop of around 3 V (plus 2.9 V] r the minimum number is four cells. When the cells ore almost fully charged, the current gradually drops, so the current limiter becomes inactive and the LED goes out. In this state, the voltage on fhe refer- ence lead of the regulator depends only on voltage divider R1 /R2. For o 7805 regulator, the value or R2 is selected such 741 outside the supply range [i.e., negative or above +12 V) are aul of the question. If you do need o switching level in the range CM .5 V, consider using an LM324, which contains four cpamps in one pack- age. For the high side of the range (10.5 that the current through it is 6 mA. Together with the current through the reg- ulator [around 4 mA], this yields a current of around 1 0 mA through R 1 . If the volt- age across R1 is 4 V (9 V - 5 V), this yields o value of 390 Q. The end-of- charge voltage can thus be set to approx- imately 8.9 V. As the current through the regulator depends on the device manu- facturer and fhe load, the value of R1 must be adjusted os necessary. The value of the storage capacitor must be matched to fhe selected charging cur- rent. As already mentioned, if can also be omitted for pulse charging, i:I4X50-U U,tJ24 TLCZ4 T£*24 to 12 V), o TLQ84 or a Vaiko+aiT opamp like the T5924 is required. However, the T5924 cannot be used with supply volt- ages above 1 2 V. Voltage Levels Control Relays +1 2V +12V 52 eldrfer elcdrcnks - 7-S/2Q04 Limiiry Car i iferior Ligli BUZ10 Cuno Walters This circuit belongs to the 'car modeling' category. This is similar to the popular case meddmg in the computer world and has found its way into a substantial proportion of cars* The modifications vary From light effects to complete movie playback sys- tems* This circuit is much more modest, but certainly still worth the effort. It provides a Components list Resistors; R1,R2,R6 = 120 kQ R3,R4 = 100 kD R5 = 470 Q R 7= icon R8 = 220 O Capacitors: Cl - 10 nF C2 = 100 uF 25V C3 = 10 uF 25V Sem Icon d ucto rs : T1 = SUZI0 IC1 = TLC272CP Miscellaneous: PCB available from ThePCBShop high qualify interior light delay. This is a feature that is included as standard with most modern cars, although She version wiih an automatic dimmer is generally only found in the more expensive models* With this circuit it is possible to upgrade second hand and mickange models with an m!e- nor light delay that slowly dims after the door hos been closed. The dimming of the light is implemented by means of pulse-width modulation. This requires a triangle wave oscillator and a comparator* Two opamps are generally required to generate o goad triangle wave, but because the waveform doesn't have to be accurate, we can make do with a single opamp. This results in the cir- cuit around IC1 .A, a relaxation oscillator supplying a square wove output. The volt- age at the inverting input has more of a triangular shape. This signal can be used as long as we do not put too much of a load on if. The high impedance input of 1C 1 .B certainly won't cause problems in this respect. This opamp is used as a corrv parator and compares the voltage of the triangular wave with that across the door switch. When the door Is open, ihe switch doses and creates a short to the chassis of ihe car. The output of the opamp will then be high, causing T1 to conduct and the interior light will turn on. When the door is dosed the light will con- tinue to burn at full strength until the voltage across C2 reaches the lower side of the triangle wove [about 5 V). The compara- tor will now switch its output ot the same rote of the triangle wave (about 500 Hz), with a slowly reducing pulse width, which results in a slowly reducing brightness of She interior light. R8 and C3 protect the circuit from voltage spikes that may be induced by the fast switching of the light. The delay and dimming time can be adjusted with R6 and C2. Smaller values result In shorter times. You can vary the dimming time on its own by adjusting R1 , as this changes the amplitude of the trian- gle wave across Cl, R7 limits the dis- charge current of C2; if this were too big, it would considerably reduce the lifespan of the capacitor. There Is no need to worry about reducing the lire of the car battery* The circuit con- sumes just 350 uA when the lamp is off and a TLC272 is used for the duaf opamp. A TL082 will take about 1 mA* These values won't discharge a normal car battery very quickly; the selkJrscharge is probably many times higher. It is also possible to use on LM358, TL072 or TL062 for ICL RB then needs to have a value between 47 O and 1 00 a. Since T1 is always either fully on or folly off, hardly any heat is generated. At a current of 2 A the voltage drop across the transistor is about 1 00 mV, giving rise to a dissipation of 200 mW, This is such a small amount that no heatsink is required. The whole circuit can therefore remain very compact and should be easily fitted In the car, behind the fabric of ihe roof far example. 7-B/2GQ4 - etekter ckcronirs 53 Whistling Kettle Bart Trepak Most eleclrtc kettles do not produce a whistle and just switch off when they have boiled. Fitting a box of electronics directly onto an electric kettle (or even inside!] to detect when the kettle has boiled is obvi- ously out of ihe question. The circuit shown here defects when the kettle switches off, which virtually oil kettles do when the water has boiled. In this way, the electronics can be housed in a sepa- rate box so that no modification is required to the kettle. The box is prefer- ably a type incorporating o mains plug and socket. In Inis application, ihe current flowing in coil 11 provides a magnetic field that actu- ates reed switch SI. Since the current drawn by the kettle element is relatively large (typically 6 to 8 amps), the coil may consist of a few turns of wire around the reed switch. The reed switch is so fast if will actually follow the AC current flow through LI and produce a 100 Hz buzz. The switching circuit driven by the reed switch must, therefore, disregard these short periods when the contacts open, and respond only when they remain open for a relatively long period when the ket- tle has switched off. The circuit is based on a simple voltage controlled oscillator formed around 12 and T3. Its operation is best understood by considering the circuit with junction R4/R5 at 0 V and C4 discharged. T2 will receive base current through R5 and turn on, causing T3 to turn on as well. The falling collector voltage of T3 is transmitted to the base of 12 by C4 causing this transistor to conduct harder. Since the action is regenerative, both transistors will turn on quickly ond con- duct heavily. C4 will therefore charge quickly through 72 $ base-emitter junc- tion and T3, Once the voltage across C4 exceeds about 8.5 V (leaving less than 0.5 V across T2 s b-e junction), T2 will begin to turn off. This action is also regenerative so that soon both transistors are switched off and the collector volt- age of T3 rises rapidly to +9 V. With C4 still charged to 8.5 V, the base of T2 will rise to about 17.5 V holding T2 (and thus 13) off. C4 will now discharge rel- atively slowly via R5 until T2 again begins to conduct whereupon ihe cycle will repeat. The voltage ot ihe collector of T3 will therefore be a series of short negative going pulses whose basic fre- quency will depend on the value of C4 and R5. The pulses will be reproduced in the piezo sounder as a tone. The oscillation frequency of ihe regener- ative circuit is heavily dependent on the voltage at junction R4/R5, As this voltage increases, the frequency will fall until a paint is reached when the oscillation stops altogether. With this in mind, the opera- tian of the circuit around T1 can be consid- ered. In the standby condition, when the kefile is off, SI will be open so that Cl and C2 will be discharged and T1 will remain off so that the circuit will draw no current. When the kettle is switched on, SI is closed, causing Cl and C2 to be discharged and T1 will remain off. C3 will remain discharged so that T2 and T3 will be off ond only a small current will be drown by R1 . Although SI will open peri- odically (at 1 00 Hz), the time constant of Rl/Cl Is such that Cl will have essen- tially no voltage on it as the SI contacts continue to close. When the kettle switches off, 51 will be permanently open and C1/C2 will begin to charge via R 1 , causing T1 to switch on. C3 will then begin to charge vio R4 and the falling voltage at junction R4/R5 will cause T2/I3 to start oscillating with a rising frequency. However, once T 1 has switched off, C3 will no longer be charged via R4 and will begin to dis- charge via R3 and R5 causing the voltage at R4/R5 to rise again. The result is o falling frequency until the oscillator switches off, returning the circuit to its original condition. As well as reducing the current drawn by the circuit to zero, this mimics the action of a conventional whistling kettle, where the frequency rises 54 “bkte i i I cdro nks - 7-8/ 1 0 3-! os more steam is produced and then falls svhen it is taken off the boil. The circuit h powered directly by the mains using a lossless' capacitive moins dropper, C6 : and zener a diode, D2, to provide a nominal 8 V dc supply for She circuit* A I -inch reed switch used in the prototype required about 9 turns of wire to operate with a 2-kW kettle element. Larger switches or lower current may require more turns. In general, the more Sums you can fit on the reed switch, the better, but do remember that the wire has to be thick enough to carry the current. It is strongly recommended to test the cir- cuit using a 9-volt battery instead of the malns-derived supply voltage shown in the circuit diagram. A magnet may be used to operate SI and so simulate the switching of the kettle. Warning, This circuit is connected directly to the 230-V mains and none of the components must be touched when the circuit is in use. The circuit must be housed in an approved ABS case and carry the earth connection fo the load as indicated. Connections and solder joints to components with a voltage greater than 200 volts across them (ac or dc] must have an insulating clearance of least 6 mm. An X2 class capacitor must be used in position C6. Programmable Gain Amplifier +2V7 ... -riavs © Gregor Kleine The gain of an operational amplifier is usually set using two external resistors. If you wish to hove adjustable gain, you can use a digitally controlled multiplexer to select several different gain-setting resis- tors. Such an arrangement using several ICs can now be replaced by the Linear Tech- nology LTC 6910 single amplifier or LTC 691 1 dual amplifier These ICs incor- porate all of the gain-setting components and can be programmed to eight differ- ent gain settings using three digital con- trol inputs. The amplifier is always config- ured in the inverting mode and features raiho-rail input and output. The input and output can be driven to within a few tens of millivolts of the supply voltages. At a gain of 100, the bandwidth still extends to approximately 1 00 kHz. With a unipolar supply, the supply volt- age for the LTC 6910/691 1 can range from-s-2.7 V to +10.5 V. With a bipolar supply, the 1C can be operated at ±1 .4 V to ~5.25 V. There are several different versions of the SC, which ore identified by the suffix -1, -2 or -3. The gains for the various combinations of the digital con- trol signals are shown in the table. Et should be noted that due to the internal arrangement of she resistors, the input resistance cf the amplifier can range from 1 kQ to 10 kQ, depending on the gain setting. This means that a bw-Empedante signal source must be used to avoid affecting the configured gain setting. The AGMD pin (pin 2] is the non-invert- ing input of the internal opamp. It is con- nected to an internal voltage divider con- sisting of two 5-kn resistors between V+ und V- When a single supply voltage is used, a capacitor with a value of at least 1 jjF must be connected fa this pin (Fig- ure 1 ). With a bipolar supply, AGND can be connected directly to signal ground (Figure 2). Note also that with a unipolar supply, a coupling capacitor is required ot the input, and possibly also at the output, since the input and output are internally biased fo half the supply volt- age. These coupling capacitors will deter- mine the lower corner frequency of the amplifier. G2 @1 GO LTC6910-1 LTC691M LTC69I 1*2 LTC6910-3 0 0 0 0 I 0 0 0 0 0 1 -1 -1 -1 -1 0 1 0 -2 -2 -2 “2 0 1 1 -5 5 -4 -3 j 1 — 0 0 -10 o i — - i -8 -4 1 0 I -20 -20 -16 -5 1 1 1 1 : 0 -50 -50 “32 -6 i : 1 1 -100 ^100 7-8/20Q-1 - ebltiDr Ehrticr.xs 55 D. Prabakaran SSB Add-On for AM Receivers Given favourable radio wave propaga- tion, ihe shortwave and radio amateur band ore choclcchbfock with SSB (single- sideband) transmissions, which no matter what language they're in, will foil to pro- duce intelligible speech an on AM radio. SSB is transmitted without a carrier wave. To demodulate an SSB signal [Le. turn it into intelligible speech) it is necessary to use a locally generated carrier at the receiver side. As most inexpensive SW/MW/LW portable radios (and quite a few more expensive general coverage receivers} still use plain old 455 kHz for the intermediate frequency (IF), adding SSB amounts to no more than allowing the radio's IF to pick up a reasonably strong 455-kHz signal and let the existing AM demodulator do the %vork ( The system Is called BFG for 'beat frequency oscilla- tor 1 . The heart of the circuit is a 455-kHz ceramic resonator or crystal, X 1 . The res- onator is used in o CMOS oscillator cir- cuit supplying an RF output level of 5 V C p. Rl which is radiated from a length of insu- lated hookup wire wrapped several times around the receiver. The degree of Induc- tive coupling needed to obtain a good beat note will depend on the IF amplifier shielding and may be adjusted by vary- ing the number of turns. All unused inputs of the 4069 1C must be grounded to pre- vent spurious oscillation. i . Simple Infrared Con t ro I lT te m die r Raj. K. Gorkholi Lots of consumer electronic equipment like TV sets, VCRs, CD and DVD players employs Infrared remote control. In some cases. It is desirable to extend the range of the available control and this circuit fits the bill, receiving the 1R signal from your remote control and re transmitting it, tor example, around a corner info another room. Photodiode D4 Is connected to the Invert- ing input of a 741 opamp through resistor R2 and capacitor C 1 . Since the BPW41 photodiode (from Vishay/Telefunken] needs to be reverse-biased to turn light energy Into a corresponding voltage, it is also connected to the positive supply rail via Rl, The non-inverting Input of the 74 1 is held ot half ihe supply voltage by 56 ebktw Extremes - 7-3/2GD4 means of equal resistors R3 and R4. The opomp is followed by a BD240 after- burner transistor capable of supplying quite high current pulses through iR LEDs D2 and D3. However, the pulsed current through the LD274s should not exceed ] 00 mA or so, hence a fixed resistor is used in series with preset PL D1 is an ordinary visible-light LED that flashes when an IR signal is received from the remote. With regard to ihe setting of P I , do not make the IRED current higher than necessary to reliably reach the final desti- nation of the IR signal. Also, the currents mentioned above are peak levels — due to the small duty factor of the IR pulses. the average current drawn from the bat- tery will be much smaller. The directivity or the IR LEDs — and conse- quently the range of the control extender — may be increased by fitting the devices with reflective caps. You Ha /e Mail! Roberf Ediinger If your letterbox is some distance from your house, you will find a monitoring device useful io indicate when new post has arrived. This can take the Form of a US-sfyle visible Rag; a more modern alter- native uses a 433 MHz radio transceiver The big advantage of the solution pre- sented here is ihot is can use an existing twocore bell cable, without requiring any further power source. The arrival or post Is signalled by a blinking LED; for added effect, a digital voice recorder can also be connected which will, ot regular inter- vals, announce the fact ihat the letterbox needs emptying. The device is silenced by a reset button. The circuit uses one half-cycle of the AC supply to power the bell or buzzer, and the other half-cycle for ihe post indicator Suitably-oriented diodes in the device and in the letterbox ensure that the two signals are independent or one another (Fig- ure 1). The bell current flows from K1 .A through D3, bell-push S2, Dl and the relay back to KLB, Cl provides ade- quate smoothing of the current pulses to ensure that the relay armature does not vibrate. The bell is operated by the nor- mally-open relay contact. If the bell is actually o low-current piezo buzzer, then it can be connected directly and the relay dispensed with. During the half-cycle for the leiterbox mon- itor current Rows from connection Ki .B on the bell transformer through current-limit- ing resistor R 1 , the LED in the optocaupler, reed contact SI (a microswitch can also be used) and D2 and finally back to Kl . If the reed contacts are closed, the LED in the optocoupler will light and switch on the photo Iran sister, A positive voltage will then appear across R3 which wt 1 1 turn the thyris- tor on via C6. The red LED will indicate that post has arrived. Pressing S3 shorts out the thyristor, reducing the current through it below ihe holding value, A small extra circuit can be added to pro- vide continuous letterbox monitoring. This takes the form of o voice recorder whose 'play' button is operated by transistor T1 . T1 in turn is driven by a 555 timer 1C. In the usual 555 timer circuit, where the device is configured as an a stable multi- vibrator, the mark-space ratio cannot he set with complete freedom. Here two diodes provide separate charge and dis- charge paths for capacitor C4. When capacitor C4 is charging, 05 conducts and D4 blocks: the charge rate is deter- mined by R 5. When discharging, D4 con- ducts and R6 and the potentiometer deter- mine the rate. The values shown give a pulse length of approximately 0.5 s with a delay of between 15 s and 32 s. The n/im - deleter d tiffanies 57 short pulse is sufficient fo trigger ihe voice recorder module via transistor II con- nected across Its 'play' button. The voice recorder module (e g. Conrad order code 1 15266) is designed to run from a 6 V supply. The maximum record- ing time is 20 s and ihe current consump- tion is 20 mA when recording and between 40 mA and 60 mA when ploy- ing back. Since our supply is at 8 V, the excess voltage must be dropped using between 1 and 3 series-connected 1N4148 diodes [shown as D x in the cir- cuit diagram). The final voltage should be checked using a multimeter. Alternatively, o 7806 can be used without surrerino a significant loss In volume. If if is desired to use o piezo buzzer to provide an acoustic signal, the pulse length should be increased fo or least 2 s. In this case, R 5 should be increased to 560 kQ or 680 k£2: the pulse length, f om is 0.7R5-C4, and the Interval between pulses, f 0 fj, is 0.7- [R6+R7j'C4. Suitable buzzers are available with a wide range of rated voltages. Z40U5-1 Gregor Kleine When it Is necessary to send a digital sig- nal between two eleclrically isolated cir- cuits you ’would normally choose an optoisolatgr or some form of transformer coupling. Neither of these solutions is ideal; opfocouplers run out of steam beyond about 10 MHz and transformers do not have a goad low frequency (In the region of Hertz] response. The company NVE Corporation [wwwnvexom] pro- duces a range of coupler devices using an innovative IsoLoap' technology allow- ing data rates up fo 1 10 Mbaud. The example shown here uses the 117 1 5 type coupler providing four TIL or CMOS compatible channels with a data rote of 1 00 Mbit/s. Inputs and outputs are com- patible with 3.3 V or 5 V systems. The maximum isolation voltage is 2.5 kV and the device can cope with input transients up fo 20 kV/ps. The company produce many other configurations including bi- directional versions that would be suitable for RS485 interfacing. The IsaLoop coupler Is based on relatively new GMR (G la nrMiagneto Resistive) tech- Gregor Kleine Maxim ( wv/w. m a x i m- i c . co m 1 has pro- duced a completely self-contained TTL oscillator chip in o very small three-pin Digital isolation up to 1 00 MBit/s tsofaBon nology, The input signal produces a cur- rent In o planar coil This current gener- ates a magnetic field that produces a change in resistance of the GMR material. This material is isolated from the planar coil by a thin film high voltage insulating layer. The change In resistance is ampli- fied and fed to a comparator to produce o digital output signed. Differences in the ground potential of either the input or out- put stage will nor produce any current flow in the planar coll and therefore no magnetic field changes to affect the GMR material. Altogether the circuit provides a good electrical Isolation between input and output and also protects against Input signal transients (EMV). 2241 ; One Component Oscilles °O r;J .r 1 fo 10 MHz outline. The MAX7375 family of oscilla- tors operates in the range of 1 MHz up to around 10 MHz, (depending on device suffix) and requires no external components. It may be necessary to fit a 100 nF decoupling capacitor across the supply pins if the chip is sited further than a few centimetres from ony other decou- pling capacitor The specified supply voir age range Is between 2.7 V and 5.5 V 53 debar detlrofiin - 7-8/5004 while current consumption is dependant on dock frequency; at 4 MHz the chip takes 4 mA while at 8 MHz this rises fo 6.5 mA. The device is available in an SOT23 package outline [MAX7375AUR) or in the even smaller 5C7G outline (MAX7375AXR). Note that the pin-out definitions far these two outlines are not identical, the functions of pins 1 and pin 2 are swapped. The accuracy of the output frequency is guaranteed to be within ±2 % of nominal with a supply voltage of 3 V. Over the entire temperature range this rises to o maximum of =4 %. This chip is currently available in a range of seven frequencies shown in the table below. The TTL push- pull output stage can sink and source up to 1 0 mA. The rise and fall times of the oscil- lator output ore in the order of 5 ns while the mark-space ratio lies between 45 % and 57 %. The MAX7375 offers a smaller, more cost-effective and mechanically more robust alternative to the conventional crysr tal or ceramic filter type of oscillator. The device has a wide operating temperature range of -40 °C io +125 "C and this +2V7<.. -r5V5 SOT23 SC70 MAX 7375AUR... MAX 7375AXR... Nominal 1 Output Frequency ...105 1 MHz ...185 1.8432 MHz ...365 3.579545 MHz ...375 3.6864 MHz ...405 4 MHz ...425 4.1943 MHz j ...805 j 8 MHz makes If particularly suitable for auto- motive applications. (04D06tl| Power Flip-Flop Using a Triac R. Edlinger Modern electronics is indispensable for every large model railroad system, and if provides a solution to dmosl every prob- lem. Although ready-made products are exorbitantly expensive, clever electronics hobbyists try to use a minimum number of components to achieve optimum results together with low costs. This approach can be demonstrated using the rather unusual semiconductor power flip-flop described here. A flip^op Is a toggling circuit with two sta- ble switching states (bistable multivibrator). It maintains its output state even in the absence of an input pulse. Flip-flops can easily be implemented using triacs if no DC voltage is available. Triacs are also so inexpensive that they are often used by model railway builders as semiconductor power switches. The decisive advantage of triacs is that they are bi-directional, which means they can be triggered dur- ing both the positive and ihe negative half- cycle by applying an AC voltage to the gate electrode (G). The polarity of the trig- ger voltage is thus irrelevant. Triggering with o DC current is also possible. Figure 1 shows ihe circuit diagram of 7-8/200^ - ebklor dstfiorcks 59 such q power flop-flop. A permanent magnet is fitted to the mode! train, and when it iraveh from left to right, the mag- net switches the flip-flop on and off via reed switches SI and S2. In order for this to work in both directions or travel, another pair of reed switches (S3 and 54) ts connected in parallel with SI and 52. Briefly closing SI or S3 triggers the triac. The RC network CI/R2, which acts os a phase shifter, maintains the trigger cur- rent. The current through R2 ? Cl and the gate electrode (G) reaches its maximum value when the voltage across the load posses through zero. This causes the triac to be triggered anew for each half-cycle, even though no pulse is present at the gate. It remains triggered until S2 or S4 Is dosed, which causes it to return to ihe blocking state. The load can be incandescent lamps In the station area (platform lighting) or a solenoidaperated device, such as a cross- ing gate. The LED connected across the output (with a rectifier diode) indicates the state of the fiip-ftop. The circuit shown here Is designed for use In a model railway system, but there is no reason why it could not be used for other applications. The reed switches can also be replaced by normal pushbutton switches. For the commonly used TIC206D triac, which has a maximum current rating of 4 A, no heat sink is necessary in this application unless a load current exceed- ing 1 A must be supplied continuously or for an extended period of time. If the switch-on or switch-off pulse proves to be inadequate, the value of electrolytic capacitor C I must be increased slightly Gregor Kleine Sometimes it is desired to power □ circuit from a battery where the required supply voltage lies within the discharge curve of the battery. If the battery is new, the cir- cuit receives a higher voltage than required, whereas if the battery is towards the end of Its life, the voltage will not be high enough This is where the new LTC 3440 buck/boost voltage con- verter from Linear Technology [ www.l in- ear, corn ! can help. The switching regula- tor In Figure 1 converts an input voltage in ihe range *2,7 V to *4.5 V into an out- put voltage in the range +2,5 V to +5.5 V using one tiny call. The level of ihe output voltage is set by the voltage divider formed by R2 and R3. The d evice switches as necessary between step-up (or 'boost') operation when V- n Is less than V c . ut , and step-down [or buck ) operation when V n is greater than V QLjt . The maxi- mum available output current is 600 mA, The 1C contains four MOSFET switches (Figure 2] which can connect the input side of coil LI either to V jn or to ground, and the output side of LI either to the out- put voltage or to ground. In step-up oper- ation switch A is permanently on and switch B permanently off. Switches C and D close alternately, storing energy from the Input In the inductor and then releasing it Into the output to create an output voltage higher than the Input voltage. In step- down operation switch D is permanently dosed and switch C permanently open. Switches A and B close alternately and so create a lov/er voltage at V GUf in propor- tion to the mark-space ratio of the switch- BucE /Boost Voltage Converter ing signal. LI , together with the output capacitor, form a low-pass filter. IF the input and output voltages are approxi- mately the same, the 1C svdfches into a pulse-width modulation mode using oil four switches. Resistor R 1 sets the switching frequency of the !C ( which with ihe given value Is around 1.2 MHz. This allows coll LI to be very small. A suitable type is the DT1608C-103 from Coitcraft Iwvav.cqII- craltcoml . The 1C can be shut down using the SHDN/SS input A "soft start" function con also be implemented by applying a slowly-rising voltage to this pin using an RC network. The MODE pin allows the selection of fixed-frequency operation (MODE connected to ground) or burst mode operation [MQDE=Vj n ). The latter offers higher efficiency (of between 70 % and 80 %) at currents below 10 mA. At currents of around 100 mA the efficiency rises to over 90 %. A Further increase in efficiency can be obtained by fitting the two Schottky diodes shown dotted in the circuit diagram. These operate during the brief period when both active switches are open (break-before- make operation). 60 ef;k!or dKlrcrks - 7-S/2GD4 IM '.iDDDi ¥@feg@ Monitor Ft 10 Goswin Visschers Many electronics hobbyist will have experienced the following: you try to fin- ish a project late at night, and the mains supply foils. Whether that is caused by the electricity board or your carelessness isn't redly important. In any case, at such times you may Find yourself without a torch or with flat batteries. There is no need to panic, os this circuit provides an emergency light. When the mains fails, She mains voltage monitor turns on five super bright LEDs, which are fed from a 9 V battery (NiCd or NiMH[ or 7 AA cells. A buzzer has also been included, which should woke you from your sleep when the mains foils. You obviously wouldn't wont to oversleep because your clock radio hod reset, would you? When the mains voltage is present, the battery is charged via relay Rel, diode D8 and resistor RIO. D8 prevents the bat- tery voltage from powering the re! a)', and makes sure that the relay switches off when the mains voltage disappears. R1 0 is chosen such that the charging current of the battery is only a few milliamps. This current is small enough to prevent over- charging the battery, D6 acts as a mains indicator. When the relay turns off, IC1 receives power from ihe battery. The JK flip-flops are set via R12 and C4. This causes T1 and T2 to conduct, which turns on D1 -D5 and the buzzer. When the push button is pressed, a clock pulse appears on the CL K input of flip-flop 1C lb. The output then toggles and the LEDs turn off. At the same time 1C la is reset, which silences the buzzer. If you press the button again, the LEDs will turn on since IC 1 b receives another clock pulse. The buzzer remains off because 1C1 a stays in its reset state. Rll, R3 and C3 help to debounce the push button signal In this way the circuit can also be used os a torch, especially if a separate mains adapter is used as Ihe power supply. As soon as the mains voltage is restored, ihe relay turns on, the LEDs turn off and the battery starts charging. The function of R1 3 is to discharge G4, preparing ihe circuit for the next mishap. If mains failures are a regular occurrence, we recommend that you connect pairs of LEDs in series. The series resistors should then hove o value of 1 00 O. This reduces the current consumption and therefore extends the battery life. This proves very useful when the battery hasn't recharged Fully offer the lost time. In any case, you should buy the brightest LEDs you can get hold or. If the LEDs you use have a maximum current of 20 mA, you should double the value of the series resistors! You could also consider using white LEDs. 7 - 8/2004 - Emitter clsrir traits 61 Blinker Indicator Ludwig Libertin This circuit represent o somewhat unusual blinker indicator for use in a cor or model The running-light display pro- gresses toward the left or ihe right depending on which directional signal is activated. That's pretty cool if you're fond of lights how effects. The circuit consists of two counters (EC2 and O), which are reset to zero via C4 or C 7 respectively whenever o blinker bmp (La) illuminates. The running-light dis- play thus runs through once ond then stops, since ihe highest counter output is connected to the Enable input. When the lamp goes out, o new reset pulse is issued to the relevant counter by NAND gate IC1.A or ICLB respectively, ond the counter counts all the way up again. The progression rate of the display can be adjusted to the right speed using PL Only one LED is on at a time (except for the hazard blinker). This allows the brightness to be easily adjusted using R 1 2. Inciden- tally the circuit can also be modified by replacing the normal diodes with LEDs, with all of the cathodes connected to ground via R1 2. C 4 Oh 1 D_ i€Y iCl.A m Sftt > 1 - cs S3 ^ 1 iM! L ■ ,±y lr« & +■ IC2 4017 dTH KV13 eec 3 1 i i 5 € i 5 CT±S , Ah [Cl =l4$11 D2 ... mi = 1H4?4B o^cnofi j.--c£Tnp. 034351 - tt UV Torch Light Myo Min UV (ultra-violet) LEDs con produce eye- catching effects when their light is allowed to interfere with certain colours, particularly with reflected light under near-dark conditions. Also try shining some UV light on a diamond... Most UV LEDs require about 3.6 V (the blue' diode voltage) to light. Here, a MAX761 step-up switching 1C is used Eo provide constant current to bias the UV diode. The 1C employs PWM In high-cur- rent made and automatically changes to PPM mode in low or medium power mods to save (battery) power. To allow it to be used with two AA cells, the LI D1 62 clfklar ekctfonlcs - 7-3/20Q-S MAX76I is configured in bootstrapped mode with voltage-adjustable feedback. Up lo four cells may be used Jo power the circuit but they moy add more weight than you would like for a torchlight. To prolong the switch life, R1 is connected to the 1C 's SHDN (shutdown) pin. Less than 50 n A will be measured in shutdown mode. Electrolytic capacitor Cl is used to decouple the circuit supply voltage. Witfv out it, ripple and noise may cause insta- bility. The one inductor in the circuit, LI, may have any value between about 10 and 50 {. IH . It stores current in its mag- netic field, while the MOSFET inside the MAX 7 6 1 is switched. A toroid inductor is preferred in this position as it will guarantee low stray radiation. D! has to be a relatively fast diode so don't be tempted to use an lN400x because It has a too slaw recovery time. The circuit efficiency was measured at about 70%, R2, the resistor on the feed- back pin of the MAX761 effectively determines the amount of constant cur- rent, /, sent through the UV LEDs, as follows: R2=1.5/J where / will be between 2 mA and 35 mA. Zener diode 04 damps the output voltage when the load Is disconnected, which may happen when one of the UV LEDs breaks down. Without a load, the MAX761 will switch LI right up to the boost voltage and so destroy itself. : Tyim/lLyi] Detector Karel Wa I raven In single phase AC induction motors, often used in fridges and washing machines, a start winding is used during the starting phase. When the motor has reached a certain speed, this winding is turned off again. The start winding is slightly out of phase to the run winding. The motor will only start turning when the current through this winding Is out of phase to that of the run winding. The phase difference is normally provided by placing a capacitor of sev- eral nF in series with the start winding. When the motor reaches a minimum speed, a centrifugal switch turns off the start winding. The circuit diagram does- n't snow a centrifugal switch; instead it has a triac that is turned on during the staring phase. For clority, the series capacitor isn't shown in the diagram. Once the motor turns It will continue to do so as long as it isn't loaded too much. When it has to drive too heavy a load it will almost certainly stall. A large current starts to flow (as the motor no longer gen- erates a back EMF), which is limited only by the resistance of the winding. This causes the motor to overheat after a certain time and causes permanent damage. It is therefore important to find a way to detect when the motor turns, which happens to be surprisingly easy. When the motor is turning and the start winding is not used, the rotation induces a voltage in this winding. This voltage will be out of phase since the winding is in a different position to the run winding. When the motor stops turning this voltage is no longer affected and will be in phase with the mains voltage. The graph shows Rjn iff rCLTC - some of the relevant waveforms. More information con be found in the application note for the AN2149 made by Motorola, which can be downloaded from their website at wvrw. motorola .cam. We think this contains some useful ideas, but keep in mind that the circuit shown is only partially completed. As It stands, it certainly can't be put straight to use. We should also draw your attention to the fact that mains voltages can be lethal, so fake great care when the mains is connected! :w::w 7-S/2004 ■ :V-,tCrf dcdranks 63 Paul Goossens There are limes when o small servo tester for modelling comes in very useful Every- body who regularly works with servos will know several instances when such o servo tesfer will come in handy. The function of a servo tester is to generate a pulsing signal where ihe width of the positive pulse can be varied between 1 and 2 ms. This pulse- width determines the position the servo should move to. The signal has to repeat itself continuously, with a frequency of about 40 to 60 Hz. We have already pub- lished other servo testers in the past. These circuits often use an NE555 or one of its derivatives to generate the pulses. This lime we have used a 4538 for variety. This 1C contains two astable multi vibrators. You can see from She circuit diagram that not many other components are required besides ihe 4538. The asfabte multi vibra- tor in a 4538 can be started in two ways. When input !q (pin 5 or 1 1 ) is high, a ris- ing edge on input I] (pin 4 or 12) is the start signal to generate a pulse. The pulse-width at the output of 1C la is equal to (R1-rPl]xCl. This means that when potentiometer PI is turned to its min- imum resistance, the pulse-width will be 10 k x 100 n - 1 ms. When PI is set to maximum (10 k), the pulse-width becomes 20 k x 100 n = 2 ms. Servo Tester using a 4538 G4-1D32- 11 Conrad ^raupner Multiplex Rob be Microprop Simprop XL £1 -TL I o TL TL j=n O XL "o XL I ol o + O ■f o + — 0 + ° - ! £ XL o — o c + 0 m 044032-12 At the end of this pulse inverting output Q generates o rising edge. This edge trig- gers 1C 1 ,B, which then generates a pulse. The pulse-width here is 82 k x 220 n - 1 8 ms. At the end of this pulse the Q out- put will also generate a rising edge. This in turn mokes 1C LA generate a pulse again. This completes the circle. Depending on PI, the total period is between 1 9 and 20 ms. This corresponds to a frequency of about 50 to 53 Hz and is therefore well within the permitted fre- quency range. So Iar= Powered Kivh llffktewsf Ctewwr D. Prabakaran This is a simple NICd battery charger powered by solar cells. A solar cell pone! or on array of solar cells can charge a battery at more than 80 % efficiency pro- vided the available voltage exceeds the dully charged battery voltage by the drop across one diode, which is simply inserted between the solar cell array and the battery, Adding o step-down regula- tor enables o solor cell array to charge battery packs with various terminal volt- ages at optimum rates and with efficien- cies approaching those of the regulator itself. However, the IC must then operate in on unorthodox fashion (a.k.o. Elekior mode ) regulating the Row of charge cur- rent in such a way that the solar array out- put voltage remains near ihe level required for peak power transfer. Here,. theMAX639 regulates its input volt- age Instead of its output voltage os is more customary (but less interesting). The input voltage is supplied by twelve amor- phous solar cells with o minimum surface area of ICO cm 2 . Returning to ihe circuit, potential divider R2/R3 disables the internal regulating [oap by holding the V-FB (voltage feed- back) terminal low, while divider R1/R2+R3 enables LEI (low battery inpui) to sense a decrease in the solar array output voltage. The resulting deviation from the solar cells' peak output power causes LBO (lav/ battery output) to pull 5HDN (shutdov/n) low and consequently disable the chip. LBI then senses a rising input voltage, LBO gees high and the pul- sating control maintains maximum power transfer to the NiCd cells. Current limit- 64 elekloi sfeclrcr-ccs - 7-S/2004 mg inside the MAX639 creates a 'cell- ing' of 200 mA For l QUi . Up to Five NiCd ceils may be connected in series to the charger output. When on' the regulator chip passes cur- rent from pin 6 to pin 5 through an inter- nal switch representing a resistance of less than 1 ohm, Benefiting from the reg- ulator's low quiescent current (10 micro- amps typical) and high efficiency [85 %), the circuit can deliver four times more power than the single-diode configuration usually found in simple solar chargers. Cail LI is a 100-pH suppressor choke rated far 600 mA. SOLAR BATTErEY CELL BT1 |R4 V* Cl R2 lOO_ -50 V SHEW LSI IC1 LEO YCKJT MAXIM MAX639 VFB G HD □a Ll 1G&_H 1N5117 BT2 © R3 CN □ I 1 N 5117 C2 reed A7zi 25V © 11 (1JS1 C^iiWGfil’er • I 9 CD led via HTML The two labels on this page have been Paul Goossens In this issue we publish on ActiveX com- poiienl, which can be used to control the USB analogue converter [Elektor Electron- ics , November 2003). In this way, pro- grammers can use C/C++, Delphi, VB etc. to include the converter in their own application. It is maybe less well known that these ActiveX components con also be used from web browsers that support scripts and ActiveX. For this reason we've cre- ated an example HTML file, which uses JavaScript and ActiveX to contra! the USB converter. This file is available as a Free Download from http://wv/w r e!ektor-elec- iron ics .co.uk/ (044 03 4-11). To place an ActiveX component onto a web page you have to make use of the tog. in this o name and a CLASSID have to be specified. This CLAS- SIC is a number that indicates which type of ActiveX component should be used. Since it is impractical to remember all these number by heart, Microsoft have made a program available colled ActiveX Control Pad. With this program it becomes easy to place an ActiveX com- ponent onto a web page and adapt its properties to your own Irking. Now that weVe placed the ActiveX com- ponent onto the page, we can use JavaScript to send commands to this com- ponent or get it to return information. Here the JavaScript port sets up a commu- nication channel with the USB converter when the page is opened. !t also starts a timer that calls the function ShowInputQ every half a second. The functions in JavaScript are very simi- lar to those found in C The three functions used in this example are simple enough far anyone with a bit of programming experience to follow. An important detail that should be mentioned is that every ActiveX component on the page is given o name during the initialisation. In this case, we have given the meaningful name USB" to the component that takes care of the communication with the USB module. creatively named as 'Label V and ' La be 12 ; . The previous tale sounds good, but does it work in practice? Everybody who has a USB analogue converter from the November 2003 issue of Elektor Electron- ics and who has installed this month's ActiveX component, can try it out very quickly. The USB converter first has to be connected via a USB cable. Then you should open the file 'test him'. If you have a web browser that supports ActiveX end JavaScript (such as Internet Explorer), you 5/70 '01 - 1 bitter elstfronks 65 should see the web page as shown here. The values of the A/D converter ore refreshed on the screen twice per second and ihe tick-boxes at the bottom of the screen let you change the state of the four digital outputs. JavaScript is not very powerful when com- pared with other programming languages such as C f C++, Delphi, etc, but has the advantage thot it is relatively easy to understand. Furthermore everybody who has a standard Windows operating sys- tem installed on their PC can get started straight away. i-=4I:4 4 Steam Whistle Gert Baars This circuit consists of six square wove oscillators. Square waves are made up of a large number of harmonics. If six square waves with different frequencies ore added together, the result will be a signal with a very large number of fre- quencies. When you listen io the result you'll find that it is very similar to a steam whistle. The circuit should be useful in modelling or even in a sound studio. This circuit uses only two ICs. The first 1C, a 40106, contains six Schmitt triggers, which ore all configured as oscillators. Different frequencies are generated by the use of different feedback resistors. The output signals from the Schmitt triggers are mixed via resistors. The resulting sig- nal is amplified by JC2, on LM386. This 1C can deliver about 1 W of audio power, which should be sufficient for most applications. If you leave out R 1 3 and all components after PI, the output can then be connected to a more powerful ampli- fier. In this way a truly deafening steam whistle can be created. The "frequency' of the signal can be adjusted with P2, and PI controls the vol- ume. C44G02-H D. Prabakaran Here is a high performance RF amplifier far the entire VHF broadcast and PMPv band (100-175 MHz) which con be suc- cessfully built without any special test Single- VHFRF * ® IIP reamp equipment The grounded-gote configura- tion is inherently stable without any neu- tralization if appropriate PCB layout tech- niques are employed. The performance of ihe amplifier is quite good. The noise figure is below 2 dB and the gain is over 13 dB. The low noise figure and good gain will help car radios or home stereo receivers pick up the lower-power local or campus radio stations, or distant amateur VHF stations in the 2-metres band. Due to the so-colled threshold effect, FM receivers 66 ef+klsr efedrerr-s - 7-8/2004 loose signals abruptly so if your favourite station Fades in and out as you drive, Shis amplifier con cause a dramatic improve- merit. The MAX2633 is a low-voltage, low-noise amplifier for use from VHP io SHF fre- quencies. Operating from o single - 5 - 2.7 V to +5.5V supply, it has a virtually Rat gain response to 900 MHz. Its low noise fig- ure and low supply current makes it ideal for RF receive, buffer and transmit appli- cations. The MAX2633 is biased inter- nally and has a user-selectable supply cur- rent, which can be adjusted by adding a single external resistor (here, R 1 ). This cir- cuit draws only 3 mA current. Besides a single bias resistor, the only external components needed for the MAX2630 family of RF amplifiers are Input and output blocking capacitors, C 1 and C3, and o Vqq bypass capacitor. J 3V...4V5 030153-11 C2. The coupling capacitors must be large enough to contribute negligible reactance in a 5G-Q system at the lowest operating frequency. Use the Following equation to calculate their minimum value: C c = 53000/ f^ [pF] Further information: www. max i m-tc.ca m wo. : Codec Complete Paul Goossens Digital audio equipment usually contains an A/D and a D/A converter. In practice a codec is used for this. This is o chip where both converters are built-in and which often includes standard inputs and outputs for digital audio, such os l 2 S. Apart from this codec there is often a requirement for a microphone input and headphone output as well. Texas Instruments have made a new codec, the TLV32GAIC28, which has an integrated microphone pre-amplifier and a 400 mW headphone amplifier. A Few other practical functions have also been cdded to this chip, such as 2 I/O pins for use in push-button control, microphone detector, etc. it is therefore extremely suitable for use in combination with headsets. The chip can be controlled via an 5P3 interface, which means that most micro- controllers can communicate easily with this codec. As we said earlier, the audio interface can fake an l 2 S signal, but the audio interface is very flexible, as with many other codecs, and can cope with several other audio formats. Should you be on the lookout for a codec and you intend to use a microphone input and headphone output, then this one makes an excellent choice. More informa- tion for this codec can be found in its datasheet at the website of Texas Instru- ments: http:/ /focus Ji.com/ docs/ prod/folders/ print/t{v3 20a ic2 6.html M/20EH - ekJttor dfjfronirs 67 MICRO WEB- SERVER fn * i Cool audio own Multi P on USB Wind speed & diredkni meier Have MS Word, will program DAB: . jT , " Jr # T — M W lor. years after PROJECTS Take out an 18-month subscription to elektor electronics and receive a free 128-MB USB Memory Stick. Please fill out the Order Form with this issue. Subscription rates and conditions may be found at the back of this issue. Mains Failure Alai Myo Min This circuit was designed to produce an audible alarm when the mains power is interrupted. Such an alarm is essential For anyone whose livelihood depends on keeping perishable foodstuffs in cold storage. The circuit Is powered by a I2-V mains adapter, LED D5 will light when the mains voltage is present. When the mains voltage disappears, so does the + 12 V supply voltage, leaving the volt- age regulator 1C 1 and relay driver it -T2 without power The relay driver, by the way, is an energy-saving type, reducing the coil current to about 50% offer a few seconds. Its operation and circuit dimen- sioning are discussed in ine article Relay Coil Energy Saver'. The value of the capacitor at the output of voltage regulator IC1 dearly points to a different use than the usual noise suppres- sion. When the mains power disappears.. Ret is de-energised and the 0.22 F Gold- cap used in position C4 provides supply current to IC2. When the mains voltage is present, C4 is charged up to about 5.5 volts with SCI acting as a 100-nrtA cun rent limit and DIO preventing current flow- ing back into the regulator output when the mains voltage is gone. According to the Goldcap manufacturer, current limiting is not necessary during charging but it Is included here for the security's sake. The CMOS 555 is configured in astable multivibrator mode here to save power, and so enable the audible alarm to sound rel +12V — C3 d Z3 -► BZt DC as long as possible. Resistors R5 and R6 define o short 'on' time of just 10 ms. That is, however, sufficient to get a loud warn- ing from the active buzzer. In case the pubes ore too short. Increase the value of R5 [at the expense of a higher overage current drawn from the Goldcap]. 33C4-T6-I Push Off / Push ©Hi Trevor Skeggs The ubiquitous 555 hos yet another air- ing with this bistable using a simple push- button to provide o push-on, push-off action. It uses the some principle of the stored charge in o capacitor taking a Schmitt trigger through its dead-band as previously published as Pushbutton Switch (038) in the Small Circuiis collec- tion of 2002, Whereas the Schmitt trigger in that refer- ence was made from discrete compo- nents, the in-built dead-bond arising from the two comparators, resistor chain and bistable within the 555 is used instead. The circuit demonstrates a stand-by switch, the state of which is indicated by illumination of either an orange or red LED, exclusively driven by the bipolar out- put of pin 3, Open-collector output (pin 7) pulb-in a I OOmA relay to drive the application cir- cuit; obviously if an ON status LED is pro- vided elsewhere, then the relay, two LEDs and two resistors can be omitted, with 70 ekklflr dettf q : ics - 7-8/20G4 *12V pin 3 being used fo drive the application circuit, either directly or via a transistor. The original NF555 (non-CMOS) can source or sink 200 mA from / into pin 3, Component values are not critical; the deod-band' at input pins 2 and 6 is between 1 /3 and 2/3 of the supply volt- age. When the pushbutton is operKircuif, the input is damped within this zone (at half the supply voltage] by two equal- volue resistors, Rb. To prevent the circuit powering-up info on unknown condition, a power-up reset may be applied with a resistor from supply to pin 4 and capaci- tor to ground. A capacitor and high-value resistor [Rf) provide a memory of ihe output state just prior fo pushing the button and creates o dead time, during which button contact bounce will not cause any further change. When the button is pressed, the stored charge is sufficient to flip the output to the opposite state before the charge is dissi- pated and damped back into the neutral zone by resistors Rb. A minimum of 0.1 pF will work, but it is safer to allow for button contact-bounce or hand tremble; 10 pF with 220 kO gives approximately a 2-second response. . . 1 175 1 Meter Adapter with Symmetrical Input -rISV Aart Rom bout In contrast to an ordinary voltmeter, the input of an oscilloscope generally hos one side (GND) connected to ground via the mains lead. In certain situations this con be very problematic. When the measur- ing probe is connected to a circuit that is also connected to ground, there is o chance that o short is introduced in the circuit. That ihe circuit, and hence the measurement, is affected by this is the least or your problems, [f you were taking measurements from high current or high voltage (valve equipment] circuits, the out- come could be extremely dangerous! Fortunately it is not too difficult to get round this problem. All you have to do is make the input fo the oscilloscope float with respect to ground. The instrumenta- tion amplifier shown here does that, and Functions as on attenuator as well. The AD62 1 from Analog Devices amplifies the input by a factor of 1 0, and a switch at the input gives o choice of 3 ranges, A GND' position has also been included, to calibrate the zero selling of the oscilloscope. The maximum input voltage ot any setting moy never exceed 600 Make sure that RI and R8 have a working voltage of at least 600 V. You could use two equal resistors connected in series for these, since 300 V types ore more easily obtainable. You should also make sure that all resis- tors have □ tolerance of 1 % or better. 7-8/2004 -d^EDi shctronia 71 Other specifications for the AD621 are: with an amplification of 10 times the CMRR is 1 10 dB and the bandwidth is 800 kHz, If you can r t find the AD621 locally, the AD620 is o good alternative. However, the bandwidth is then limited to about 1 20 kHz. The circuit can be housed inside a metal case with a mains supply, but also works perfectly well when powered from two 9 V batteries. The current consumption is only o few mill lamps. You could also increase R9 to 10 k to reduce the power consumption a bit more. C440G3-1 Relay Coil Energy Saver My o Min Some relays will become warm if they remain energised for some time. The cir- cuit shown here will actuate the relay as before but then reduce the 'hold' current through the relay coil current by about 50%, thus considerably reducing the amount of heat dissipation and wasted power. The circuit is only suitable far relays that remain on for long periods. The following equations will enable the circuit to be dimensioned For the relay on hand: R3 - 0 7 / i Charge time = 0.5 x R2 x Cl +12V Where / is the relay coil current. After the relay has been switched off a short delay should be allowed for the relay current to return to maximum so the relay can be energised again at full power. To moke the delay as short as pos- sible, keep Cl as small as possible. In practice, a minimum delay of about 5 sec- onds should be allowed but this is open to experimentation. The action of C2 causes the full supply voltage to appear briefly across the relay coi! r which helps to activate the relay as fast as possible Via T2, o delay network consisting of C 1 and R2 controls the relay coil current flow- ing through T1 and R3, effectively reduc- ing it to half the pull in' current. Diode D2 discharges Cl when the control volt- age is low. Around one second will be needed to completely discharge Cl . T2 shunts the bias current of T1 when the delay has elapsed. Diode D1 helps to dis- charge Cl os quickly as possible. The relay shown in the circuit was specified at 12 V / 400 ohms. All component val- ues for guidance only. Jo . JiiC Shorfwc ve Monito Gert Baars This broadband AM receiver enables you to monitor the shortwave radio bond. The circuit has been deliberately designed to hove low selectivity and is most sensi- tive in the range from 6 to 20 MHz. This frequency range contains most of the shortwave broadcast stations. In this configuration, whichever station has the strongest signal will be the easi- est to hear. An interesting fact is that the signal strength of stations in this bond changes quite a lot. This is because the ionosphere reflects the radio signals. Because Shis layer of the atmosphere is in constant motion, the received signal strengths from different directions are sub- ject to continuous variation. During test- ing of our prototype Radio Netherlands World Service, Radio Finland ond Deutsche Welle alternated as the strongest station ot regular intervals. This receiver not only gives a good indication of the myriad of stations on offer in the short* wave band but Is also an excellent root for monitoring the state of the ionosphere. 72 drktcr dfrtroflitf - 7-S ■*'2004 The circuit actually consists of no more than an RF and on AF amplifier. The high- frequency amplification is carried out by the [F stage of a CA3089. This 1C is actu- ally intended for FM receivers, but the FM section is not used here. The infernal level defector provides a sig- nal of sufficient strength to drive an audio amplifier directly. An LM386 was selected for this task. This 1C can directly drive an 8-0 loudspeaker or headphones without any difficulty. The power supply voltage is 9 V. Because of the modest power consumption a 9-V battery is very suitable. In addition, the circuit will work down to o voltage or about 5.5 V, so that the battery life will be extra long. The antenna will require a little experi- mentation. We obtained reasonable Bart Trepak There are many applications where the accuracy of a digital or analogue (bar graph) is not required but something bet- ter than a simple low/high indicator is desirable. A battery charge level indica- tor in a car is a good example. This simple circuit requiring only two LEDs (preferably one with a green and red LED in a single package), o cheap CMOS 1C type 4093 and □ few resistors should ful- fil many such applications. With a suit- able sensor, the indicator will display the relevant quantify as a colour ranging from red through orange and yellow to green. IC1 .A functions os an oscillator running at about 10 kHz with the component val- ues given, although this is not critical. Assuming for the moment that R1 is not commented, the output of IC1. A is a square wave with almost 50% duty cycle. The voltage at the junction of R2 and Cl will be a triangular wave (again, almost] with a level determined by the difference in the two threshold voltages of the NAND Schmitt trigger gate 1C I .A. 1C 1 .B, IC1.C and 1CI D form inverting and non- inverting buffers so that the outputs of 1C 1 .C and 1C 1 .D switch in complemen- tary fashion. With a 50% duty cycle, the red end green LEDs will be driven on for results with a piece or wire 50 cm Jong, A length of wire in the range of 5 to 15 equal periods of time so that both will light at approximately equal brightness resulting in an orange-yellow display. With R1 in circuit, the actual input volt- age to IC1 .A will consist of the triangu- lar waveform added to the dc input V fn * As the input voltage varies, so will the oscillator duty cycle causing either the red or the green LED to be on for longer periods and so chonging the visible colour of she combi-LED. The actual range over which the effect will be achieved is determined by the relative values of R1 and R2, enabling the circuit to be meters should provide even better results at these fre q u e nc i es . ; ::rr * t matched to most supply voltages. With the component values given and a sup- ply of 8 volts, the LED will vary from fully red to fully green in response to input voltages of 2,5 V and 5.6 V respectively. To monitor a car battery voltage, the bat- tery itselF could be used to power the cir- cuit provided a zsner diode and dropper resistor are added to stabilise the 1C sup- ply voltage. This Is shown in dashed out- lines in the circuit diagram. With an 8.2 V zener the dropper resistor should be oround 220 O and R1 has to be reduced to 4.7 kQ. vo-LD Vo ltage Indicator R3 ■U 7-S/M4 - eiaklor datfrenkj 73 The LEO brightness is determined by R4. As a rule of thumb, R4 -l'S«*- 2 »/3 t kQ l and remember that the 4093 can only supply a few mAs of output current. Applications of this little circuit include non critical ones such os go/norvgo bat' tery testers, simple temperature indicators, water rank level indicators, etc. Bluis lasher +12V Myo Min This circuit is innovative in more than one way and therefore belongs per se in Elek- tor's Small Circuits Collection. Firstly, it demonstrates how the combination of a blue and a white LED can be used to give o realistic imitation of a camera flashlight. Secondly, the good old 555 1C is used in a way many of you may never have seen before — alternately mono- stable / astable — without too much in the way of external parts. Initially C3 will be empty, pulling output pin 3 to +1 2 V and causing the blue LED, Dl, to light via R3. Next, C3 will charge up via R2. Meanwhile C 1 has been build- ing up charge through R1 and D3, If the voltage on C3 reaches about 8 V (two- thirds of 1 2 V), pin 3 of the 555 will drop Low. So does pin 7, causing the white LED to light, pulling its energy from Cl . This energy drops quickly, causing D2 to dim in an exponentially decoying fashion,, just like a camera flashlight. Now, because the 555 r s output has dropped Low, the voltage on C3 will decrease as well. Ad soon os a level of 4 V is reached (one third of 12 V], the above cycle Is repeated. Resistor R4 limits the current through the 555 to safe levels. You may want to experiment with the latest hyper-bright white LEDs. SDK's AlInGaP LEDs, For example, are claimed to light three times as brightly os regular white LEDs. A number at blue LEDs may be connected in series instead of just one os shown in She circuit diagram. Unfortunately, that is not possible at the "white" side. For the best visual effect, the white blue LEDs should be mounted dose together. When fitted dose to the extra brake light in your car, the bluish white flash Is sure to make even persistent failgaters back off. Note however that this use of the circuit may not be legal in all countries. <330143* I Very Low Power 32-kHz Oscillator D. Prabakaran The 32-kHz low-power clock oscillator offers numerous advantages over conven- tional oscillator circuits based on a CMOS inverter Such inverter circuits presr ent problems, for example, supply cur* rents fluctuate widely over a 3-Y to 6-V supply range, while current consumption below 250 pA is difficult to attain. Also, operation can be unreliable with wide variations in the supply voltage and the inverter's Input characteristics are subject to wide tolerances and differences among manufacturers. The circuit shown here solves the above problems. Drawing just 1 3 pA from a 3* V supply, it consists of o one-transistor amplifier/ oscillator (Tl) ond a low-power comparator/reference device (1C l ) . The base of Tl Is biased at 1 .25 V using R5/R4 and the reference in IC 1 , Tl may be any small-signal transistor with a decent beta of 1 00 or so at 5 pA (defined here by R3, fixing the collector voltage at about 1 V below Vccj. The amplifier s nominal gain is approximately 2 V/V. The quartz crystal combined with load capac- itors Cl and C3 forms a feedback path around Tl , whose 1 80 degrees of phase 74 eleklor eletfraits- 7-5/2004 shift causes the oscillation. The bias volt- age of 1 .25 V for the comparator inside the MAX93 1 is defined by the reference via R2. The comparator's input swing is thus accurately centred around the refer- ence voltage. Operating ol 3 V and 32 kHz, IC1 draws just 7 pA. The comparator output can source and sink 40 mA and 5 mA respectively, which isamplefor most low-power loads. How- ever, the moderate nse/fall times of 500 ns and 100 ns respectively can cause standard, high-speed CMOS logic to draw higher than usual switching cur- rents. The optional 74HC14 Schmitt trig- ger shown at the circuit output can han- dle the comparator's rise/foil times with only a small penalty in supply current. Fur- ther information on the MAX 9 3 1 from: www, ma x i m-i c . co m . +2V5...+11V © trM = 5OQ/1G0ii5 IC2.A fii&.i.i ri H .=a 02C232 - 1 1 Karl Kockeis In this age of enlightenment any sari of relationship that could be described as master/slave would be questionable but for the purposes of this circuit It gives a good idea of how it functions. The circuit senses mains current supplied to a 'mas- ter' device and switches 'slave' equipment an or off. This feature is useful in a typi- cal hi-ri or home computer environment where several peripheral devices can all be switched on or off together. A solid-state relay from Sharp is an ideal switching element in this application; a built-in zero crossing defector ensures that switching only occurs when the mains vo!^ age passes through zero and any result- ant interference is kept to an absolute min- imum. All of the Iriac drive circuitry (including optical coupling] is Integrated on pie also depends on the value and E SR associated with C 1 — smaller values of Cl transfer less charge to C2, producing smaller jumps in Vq^. .iJlIC-l, I Stable Zener Reference *15V Ufn [v] 044025- 12 Karel Wa I raven Nowadays some first-rate voltage refer- ences ore available. Take the LM385 for example: inis is available for different volt- ages and even comes in on adjustable version. What is more, the current con- sumption may be kept very small ( 1 0 pA). But as often happens, you may not have one to hand when you need one for an experimental circuit. In that case, you could use an ordinary zener diode for the reference. Unfortu- nately they have o somewhat higher inter- nal resistance (about 5 Q], which means they won't be very stable when the sup- ply voltage varies The solution is right in front of us: use the stabilised zener voltage as the supply volt- age! This is obviously only possible if the stabilised voltage is higher than the zener voltage. It therefore has to be amplified a little. This is exactly what this circuit does: it amplifies it by a factor of two. The cur- rent limiting resister should be chosen such that a current of 1 to 3 mA flows through the zener diode. Manufacturers usually state the zener voltage at a cur- rent between 3 to 5 mA. The zener diode is fed from o stabilised voltage and hence has a very stable oper- ating point, which is independent from the supply voltage. The graph speaks for itself. It is clear ihot the output voltage is much more stable. The graphs have been plotted to different scales to make the comparison easier. In reality the opamp output is twice the zener voltage. Zener diodes also have o temperature coefficient, which is smallest for types with a zener voltage around 5 volts. Virtually any type of opamp should be suitable; even our old friend the 741 works well enough. 7-8/20D4 - elekler dtttaia 77 PWM Moduleator Ton Giesberts If you ever thought of experimenting with pulse-width modulation, this circuit should get you started nicely. We've kept simplic- ity in mind and used o dual 555 Ilmer, making the circuit a piece of cake. We have even designed a small PCB far this, so building it shouldn't be a problem at all. This certainly isn't an original circuit, and is here mainly as an addition to the Dimmer with MOSFET article elsewhere in this issue. The design has therefore been tailored to this use, A frequency of 500 Hz was chosen, split- ting each halF-pericd of the dimmer Into five (a lav/ frequency generates less inter* ference). The first timer is configured as a standard astable frequency generator. There is no need to explain its operation here, since this can easily be found on the Internet in the datasheet and application notes. All we need to mention is that the frequency equals M9/((RU2R2)xCl) [Hz] R2 has been kept small so that the fre- quency can be varied easily by adjusting the values of R1 and/or Cl, The second timer works as a monosiable multivibra- tor and is triggered by the differentiator constructed using R3 and C3. The trigger input reads to a rising edge. A low level at the trigger input farces She output of the timer law. R3 and C3 have therefore been added, to make the control range as large as possible. The pulse-width of the monostable timer is given by 1 .lx R4xC4 and In this case equals just over a millisecond. This is roughly half the period of 1C 1 a. The pulse-width is varied COMPONENTS LIST Resistors: R1 = 270kfl R2,R3 = 101ft R4 = 1 OOkn R5,R8 = 1 kn R6,R7 = 2200 Pi = 2M12, linear, mono Capacitors: C 1 ,C4 = 1 OnF C2.C5.C6 = lOOnF C3 = InF C7 - 2(iF2 63V radio! C8 = 1 OOfiF 25V radial +1SV ♦ I PWUt Semiconductors: D1 = 1 N4002 tCl = NE556 IC2 - 78L15 Miscellaneous: FI = 3-woy pinheoaer K1 = 2-way pinheaber IC2 > ^19V t> C7 - 5 - 15 V - n 78 elcktv decf reeks - 7-8/2&04 using PI to change the voltage on the CNTR input. This changes the voltage to the internal comparators of She timer and hence varies the time required to charge up C4. The contra! range is also affected by the supply voltage; hence we've chosen 15 V for this. The voltage range of PI is limited by R6, R7 and R5. In this design the com fro! voltage varies between 3,32 V and 1 2.55 V [the su pply voltage of the proto- type was 14.8 V). Only when the voltage reaches 3 .51 V does the output become active, with a duty-cycle of 1 3-5 %. The advantage of this initial 'quiet' range is that the lamp will be oft, R8 protects the output against short cir- cuits . With the opftxx>upler of the dimmer □s load, the maximum current consume tion of the circuit is about 30 mA. XiilBTO JTAd [interface Paul Goossens In September 2002 we published a JTAG interface that was compatible with the programming software from Altera, Unfor- tunately, the software from XElinx didn't work in combination with inis interface. The interface published here is compati- ble with the software from Xilinx, so you can use it to program their range of CPIDs and FPGAs. The circuit is very simple and consists of just two ICs and a handful of discrete components. Connector K1 is connected to the PC using o 1:1 printer cable with a 25-way subhD connector at each end. Connector K2 is connected to the TTAG interface of Table I. Pinout for K2 FPGA | CPID ’| 1 Vdd Vdd 2 GND GND 3 CCLK [ TCK 4 D/P ”1 TDO 5 DIN TD1 6 /PROG IMS | the device being programmed. The pin- out for connector K2 is shown in Table 1 . If the device uses o different type of programming connector, K2 will have Eo be adapted accordingly. The circuit con be easily built on a piece of prototyping board. Since there isn't any real standard ror the programming connector, it is very likely that the connec- tions to K2 have to be modified; in that case, a ready-made PCB isn't very useful. Acoustic Sensor Engelbert Gopfert This acoustic sensor was originally devel- oped for an industrial application (monitor- ing a siren), but will also find many domestic applications. Note that the sen- sor is designed with safety of operation as the top priority: this means that if it fails then in the worst-case scenario it will not itself generate a false indication that a sound is detected. Also, the sensor con- nections are protected against polarity reversal and shorrcircuits. The supply volt- age of 24 V is suitable for industrial use, and the output of the sensor swings over 7-E/200-1 - elsktcr tledioait; 79 EW -5- 24V M — © 1W414B D3 t J r D5 1N414B '^1— Of kd E3C547 BC238C 1N414S 033412-11 the supply voltage range. The circuit consists of an eiectret micro- phone, an amplifier, attenuator, rectifier and a switching stage. MEC1 is supplied with a current of 1 mA by R9, 1 1 ampli- fies the signal, decoupled from the supply by Cl , to about 1 Vp p . R 7 sets the collec- tor current of T1 to a maximum of 0.5 mA. The operating point is set by feedback resistor R8. The sensitivity of the circuit can be adfusted using potentiome- ter PI so that it does not respond to ambi- ent noise levels. Diodes Dt and D2 recitfy the signal and C4 provides smoothing. As soon as the voltage across C4 rises above 0.5 V, T2 turns on and the LED connected to the collector of ihe transistor lights. 13 inverts Inis signal. If the microphone receives no sound.. T3 turns on and ihe output will be or ground. IF a signal is detected, T3 turns off and the output is pulled fo +24 V by R4 and R5. In order to allow for an output current of 1 0 mA, 13 s collector resistor needs to be 2.4 k£2. If 0.25 W resistors ore to be used, then to be on the sore side this should be made up of two 4.7 kfi resis- tors wired In parallel. Diode D4 protects the circuit from reverse polarity connec- tion, and D3 protects the output from damage if it is inadvertently connected to the supply. Paul Goossens The Gameboy Advance (G BA) already has its own power supply, processor, key- pad and an LCD display. In addition, the system bus is made available externally. All this is ideal as the basis tor your own embedded system. In the October 2000 issue of Ekhtor Elec- tronics we published an expansion for the Gameboy: a digital oscilloscope. With the arrival of the Xport, mode by Charmed Labs, the development of an embedded system based on the G8A has become a lot easier. The Xport Is a complete development sys- tem. Apart from the expansion board, the necessary software is also supplied. The hart of the circuit on the expansion board is an FPGA made by Xilinx. Depending on ihe version youl! get an FPGA with either 50 K or 1 50 K gates on the board. Using the free development software from Xilinx, you can program your own designs into the FPGA. The board also has a 4 Mbyte flash mem- ory. This memory stores the program for the GSA as well as the configuration for the FPGA, Since the FPGA loses its con- figuration when cower is removed, it must reload the configuration every time mat It is powered up. This fakes place oubnnof- ically thanks to a CPLD on the expansion board. Two version of the Xport come wish an extra 16 Mbyte of SDRAM. This memory can be used by both the proces- sor and the FPGA. Communication with the outside world is well provided for, with 64 I/O signals on board, in addition to the programming and debug connector! As mentioned earlier, the system consists not only of hardware. The PC software Included is a C-compller (GCC), complete with essential libraries, debugger and a programmer application. On bp of this, there is an operating system [eCos] and its bootloader. There are also various examples included (which should be in every good development kit), so you can start using the Xport soon after get your hands an it. :;vej Internet; www. c h a rms d iabs.com 30 elfktor clcdronfEs - 7-S/2QC4 HoEne Netwo for ADSL Karel Wal raven The increased availability of Fasf ADSL Internet connections has made it more attractive to install a small RJ45 Ethernet network in the home. Not only can you exchange files between computers, you will also have fast Internet access for everybody! This does of course require an ADSL modem with o router. Its not possible to use a simple USB modem on its own. For laptops we recommend wireless Eth- ernet connections. IF you find the laying of cables too difficult or inconvenient you can also odd wireless capabilities ta "ordi- nary' PCs. You should bear in mind that the range of wireless connections could sometimes be disappointing. When a network is set up round a router you should use a star configuration for ihe cabling. This means that only a single PC is connected to each router socket. The connecting cable may have a maximum length of 90 m and usually terminates at a connection box. You should use a CAT5 cable with 8 conductors far this, which is suitable for speeds up to 100 Mb/s. The 8 conductors are arranged in 4 pairs, with each pair twisted along the length of the cable. It is extremely important that the wires of each pair are kept together and that they are kept twisted as much as pos- sible. At the connector ends you should therefore make sure that the non-twlsted sections of ihe coble are kept as short os possible, at most a few centimetres. Should you fail to do this you may find that the net- work won't operate at the full rated speed cr possibly cause interference. The wiring itself is very simple. Connect the plugs to the cables such that each pin connects to the corresponding pin at ihe other end. So pin 1 to 1 , 2 tot 2 and so on. Th is also applies to all patch leads between the connection boxes ond PCs (or if you prefer,, the cable can go directly to the PC, without a connection box). It is only when two computers ore connected directly together without a router that a crossover cable is required. The plugs ore attached to the cable using a special crimping tool, ft is also possible without the tool, using just a sc rewd river, but this isn't easy and we don't recom- mend that you fry Et. The wires in the cable hove different colours and there ore no official stan- dards in Europe how you use them (EN501 73). However, the colour code in the Americon T568B standard is often used: 1 orange/whife 2 orange 3 green/whife 4 blue 5 blue/ white 6 green 7 brown/whife 8 brown The coloured/white wires and the solid coloured wires alternate nicely. For Ether- net cabling you only need connections 1, 2, 3 ond 6. The central contacts on pins 4 ond 5 are in the middle of the green pair and may be used for analogue tele^ phones. You then have to make sure that 4 and 5 aren't connected to the Ethernet plugs because the voltages Found on ana- logue telephone lines are high enough to damage an Ethernet cord and/or router. Wires 4 and 5 should then be routed to 044007 - 11 an RJ1 1 telephone socket. We don't rec- ommend it, but it is possible. It Is also possible to pass ISDN signals through the same RJ45 plugs ond cabling. In this case you can't use the same cable for both Ethernet and ISDN since the lat- ter uses pins 3/6 and 4/5. If you use patch cables it helps to keep things organised by using coloured cables. Blue for Ethernet [red for a crossover coble], yellow For analogue tele- phones and green for ISDN. Sticky labels or coloured cable markers can also be used for Identification when you con't get hold of coloured cables. A new standord hos recently been intro- duced, although you pro booty won't use it in the home for a while. Since around iwo years ago you can also use a GG45 connector, which is compatible with RJ45. This has 4 extra contacts and is suitable for speeds up to 600 Mb/s (Category 7/ Class E). RJ45 Straight-through Patch Cable RJ45 RJ45 Crossover Patch Cable RJ45 RJ45 S pin RJ45 Connector (8P8C) 044007- 12 7-3 2004 - Ebfrar decfrcnitt 81 K.-J. Thiesler Light Sensor Technology measuring daylight using LEDs Light-sensitive sensors with characteristics similar to those of the human eye are most often implemented using photoresistors or special (and thus expensive) photosensors. Few people realise that normal LEDs can also be used as optical sensors that respond the same as the human eye. Photodetectors for visible light ore most often built using light-dependent resistors (LDRs), which are welhknown components. Their spectral sensitivity is similar to that of the human eye. In the SMD age, their 'pros and cons' are their large package sizes, large tolerances, large temperature dependence and large sensor currents, besides which they are expensive and very slow. The speed at which LDRs respond to varying light levels is similar to that of the human eye, with resistance changes occurring in the range of seconds. Fast photodiodes with sensitivities corresponding to those of the human eye are rare. Most photodiodes are sensitive in the infrared region, extending as far as 1 100 nm. The special BPW21 silicon photodiode senses the visible region from 425 to 675 nm and has on active area of 7,5 mm2, and it is packaged in a metal T05 case. It is considered to be a reference element and priced accordingly, but it is accurate, has excellent linear ity and is several orders of magnitude faster than an LDR hon/off = 6 ps versus t a fj= 3 s). It is often used as a sun- light reference sensor for photovoltaic power systems. The BPW21 phototransistor is classified as a discontin- ued product, with the Vishay Semiconductors PBPW21 R being suggested as a replacement. However, it is still quire readily available. Still, its price is in the same league as that of the Analog Devices AD820 opamp. Gther types of light sensors include modern 'intelligent optosensors with laboratory characteristics, such as the TAOS TCS230, Agilent Technologies HDSL90G0 and Texas Instruments TSL230. There are also components that operate as light-to-frequency converters. The Agilent Technologies type HSMF-C1 1 8 is a tricolour RGB LED in an SMD package, A summary of light sensors suitable for use with daylight is given in Table L In the past, a variety of tC manufacturers have attempted to eliminate some of the drawbacks of these sensors and 'trim' them to act os converters with paramo ters suitable for use in the visible spectrum, with Faster response times than passive LDR sensors. For labora- tory applications, there are the highly accurate [and thus expensive) Truecolor Dreifeld type MCS3xx RGB colour sensors. They feature standardized spectral sensitivity and colour filtering, and they are planned to be followed by sensor arrays similar to CCD camera ch ips. the monolithic OPT301 from Burr-Brown has a relative sensitivity of BO % for yellow light and a peak response in the near-infrared region, it is only available in the her- metic T099 metal package. It requires a symmetric sup ply voltage, which can be a disadvantage for modern applications. In addition, it requires an infrared filter if if is to be used as a daylight sensor. Daylight Daylight contains a high proportion of longwave infrared radiation. We experience sunlight as warm, with the light at sunrise been sensed os cooler than the light at sunset. By contrast, moonlight has a high proportion of short- wave ultraviolet radiation. This is why we experience moonlight as cold. Our brain also 'sees' with our skin, and it's no accident that the spectral composition of light is referred to as its colour temperature. Our eyes have 82 daklcr dectrcntc5-7’S/20Q4 also evolved accordingly, with the result that specific spec- tral shifts occur according to the intensity of the light, with colour sensitivity decreasing as light intensify decreases. Incandescent light has a high proportion of infrared radiation, with a negligible amount of ultraviolet Our eyes cannot sense long-wavelengih light (IR or thermal radiation). Our shin cells are better equipped for this task. However, almost oil silicon detectors have their peak sensitivities in the infrared region, so they are not suitable for detecting daylight or artificial light. A normal LED, regardless of its colour, emits visible light, which after oil is whot it's designed to do. Its effi- ciency is very low, since most of the energy is converted into neat, although the amount of heat it generates is hardly significant due to its low power dissipation. In contrast to all other artificial light sources, LEDs emit nearly monochromatic light with high colour saturation. In the C1E chart shown in Figu re I, all of the spectral regions for coloured LEDs are located dose to the outer edge of ine horseshoe-shaped line of maximum colour saturation. At the white point, by contrast, colour satura- tion approaches zero. The CIE model The CIE model is by no means perfect, since it cannot be used to explain colours such as brown or gold. It is thus not suitable for defining or accurately specifying our sub- jective perception of colour. Colours outside the range of colour models, such as RGB, CMYK, LAB, and other models, only actually come into existence in our brains, the colour-sensitive cones and rods in our retinas have broadly overlapping spec- tral responses, which means they all contribute to every image. Their information is transmitted to the brain via chemical impulses in the nerve bundle. On their way to ine brain, these impulses are 'premixed' by crosstalk between individual nerve cells, following which they are termed Into a colour image in the brain. In this process, the receptors simply transmit impulses lacking any sort of colour information. Colours only come into existence in ihe brain os the result or combining these impulses and evaluating their mutual relationships. A Tull-colour' image con be generated using a flat- ponef display made from individually driven RGB LEDs, .1. 11 r = - : . CIE Chromaticity Diagram' E2ESZ!:- Figure I. The colour gamut of the CIE standard chart , snowjjng ins nar- rowly demarcated LED regions. However, ihe 'spot colours 1 [colours that cannot be directly generated using the primary colours) are still missing in such a display. On the other hand, the colour saturation of an LED display cannot be matched by any sort of high-quality printing, reflective LC display or CRT monitor, nor even by incandescent lamps with coloured filters. That's why arc lamps are used as light sources For film projectors In cinemas. All of this demonstrates the virtues and vices of LEDs os colour sensors, taking the human eye as the reference. It is thus hardly surprising that high-quality colour sensors based on LEDs have only recently started to be devel- oped, After all, the evolution of LEDs is still In its infancy, and it can be assumed that there are still many applica- tions waiting to be developed. Turning things around Let's simply turn things around: instead of using an LED to emit light, we can place a 'bare' yellow or green LED in a field of light and connect a sensitive voltmeter to its leads. If we do so, we will measure a voltage that varies Table I . Integrated daylight sensors Type Topology Sensitivity Manufacturer Case Range In nm Maximum in nm BPW2I P-N photodiode 420-675 S65 Vis hay TOS 2-pin OPT 101 Photodiode with OTA 280- 1 200 850 Burr- Brown S08 & DIP8 & SIPS OPT 30 1 Photodiode with OTA 200- 1 1 50 750 Burr-Brown T099 8-pin TSL 25x ! Photodiode with OTA 300- 1 1 00 780 Texas Instruments Plastic 3 -pin MCS3xx : 3 RGB P-N photodiodes* , 400-510 490-610 590-750 — Jen colour TOS & S08 TrucCoJor Dreifdd RGB colour sensor ICs with diefenxic interference filters and standard spectra! sensitivity, with or without IR bfocker. 7-S/2004 - ekriiorits S3 Figure 2... The inputs of a CMOS opamp wired os an imped- ance converter have such high resistance that they do not place an excessive load on the photo- voltaic output of the sensor LEDs. Figure 3 . This day- light switch works with almost alt types of JFET and CMOS opamps. *5V according \o the intensify of the light’ falling on the LED, Unfortunately, these measurements cannot be directly used for anything else, since the extremely small light-sen- sitive area and low efficiency of the LED mean that this voltage can only be loaded with an extremely small cur- rent [in the femtaampere range). Even the internal resist- ance of a DVM is significantly less than the source resist- ance of a LED operating in sensor mode. The circuit diagram in figure 2 shows a LED acting as a sensor and connected to the non-inverting input of an opamp. This opamp is wired as an impedance con- verter and has an input impedance an the order of sev- eral teraohms (10 2 Q), due to its simple JFET or CMOS inputs. It thus places almost no load on the voltage from the LED sensor. The LED sensor voltages listed in Table 2 were obtained using this measurement circuit. Here the designation impedance converter' is actually not entirely correct, since this Is a tronsimpedonce ampli- fier, which is a two-part network characterised by current, voltage and impedance conversion. In the circuit shown in Figure 2, the tronsimpedonce amplifier is only wired as an impedance converter. However, this does not need to be discussed any further here. Figure 3 shows an electronic switch that switches on the connected load RL at dusk and switches if off again of dawn. The network formed by R1-R3 provides a refer- ence voltage UREF = 2.25 V of the non-inverting input, with a measured hysteresis of approximately 250 mV. This threshold value is not critical; it is suitable for two bw-current yellow LEDs connected in series. With two LED sensors oriented in different directions, the threshold level is crossed relatively quickly during twi- light. Resistors with fen-percenf tolerance are adequate for this precision' circuit. Using two LEDs mokes the cir- cuit insensitive to artificial light falling on only one sensor, such as light from o streetlight or car headlights. The lag circuit' consisting of LED D3, R4, R5 and C4 also helps here. D3 is enclosed in a length of heat-shrink tubing, which gives if significantly better blocking characteristics than a regular diode. * Opamp selection In theory, a TLC271 (which has a single pchannel MOS- FET input stage) is a suitable choice, since its input bias current is just as low as that of the AD82G. In practice, however, it is inclined to oscillate at the switching point. This tendency to oscillate olso cannot be eliminated with the TLC271, OPA132, AD8035, AD8510 and TLE2081 opomps. With an AD8065, AD820 or AD8610, a net- work composed of R2, R3 and C2 can be used to gener- ate a hysteresis, which is necessary to provide jitter-free switching with 'creeping' twilight The log circuit is not necessary with the latter types of apamps. A TL081 does not see the integration network os the source of a threshold potential, but only as a feedback network that sets the gain. In a circuit built according to Figure 2, a SchmEtttrigger circuit should thus be placed between the output of IC1 ond LED D3. In any case, the TL081 does not oscillate oil that wildly. The high-precision OPA665 is fully overqualified (ond correspondingly expensive) for the job of daylight sensing. If can be used to build a fa si detector for arc lamps. How- ever, If is designed to operate from a bipolar ±5 V supply. The photo at the head of the article shows a prototyping board (EVM) from Texas Instruments that the author used to test the various types of opamps in the daylight sensor cir- cuit, Table 3 provides a summary of suitable operational amplifiers. Other types of opamps having bipolar input trarv sisters or complementary MQSFETs are unsuitable, either because their input resistance is too low or because their input offset current is much too high. Such offset currents result from always-present differences in the gate currents of the complementary transistors in the input stage. The switching point can be shifted to accommodate other light intensities or other types of LEDs by adjusting the values of Rla and R1 b. When adjusting these values, it is best to short out the time-delay network [D3, R4 and R5}. This time-delay network is a lag circuit with o ssvitch- off delay of approximately 3 s. This may appear to be relatively short compared with the duration of twilight at our latitudes, but it is based on practical experience. Just bear in mind that for colour vision, our eyes have a dynamic range for light intensity' of around 100 dB (from approximately 0.1 lux to 20,000 lux). During twilight, the voltage across the LEDs increases or decreases markedly. It thus passes through the switch- ing-point hysteresis band relatively quickly. For extremely slow changes in light intensity, a modern operational amplifier such as the AD8610 should be used, since if has practically stable switching behaviour and a small amount af light hysteresis. This may make it possible to omit the time delay circuit 84 Emitter ekctrDEtks - 7-8/7304 Table 2, Equivalent LED voltage for mean morn ing/evening twilight levels and a moonless night (Figure I output) LED Type U S1AS [V] with °ne LED Ubias [V] with LEDs Twilight Dark Twilight Dark Yellow TLLY44GQ (3 mm low-current) LI 0.8 2.2 1.0 Red TLLR440G (3 mm low-current) 1.0 _ I 2.0 1 _ l Green TLLG4400 (3 mm low-current) 1.2 0.8 2.4 1.4 Blue ^ j LF-59EBGBC (5 mm RGB) 1.5 __ 2 2.4 „ 2 l: A red LED detects near-infrared radiation ^ so it cannot he used to measure night-time Eight. 2: Noi measured. 3: Only one blue LED connected. Table 3. A selection of suitable opamps with JFET input stages Type GBP in MHz Offset in pV Input bias in pA u cc in V *CC in mA U IN max, in V Manu- facturer Case Tested? Note(s) AD8033 80 1000 L5 +5 to 24 3.3 0 to +U C ^3 Analog Dev. SO 8 & SOT 23 yes Shutdown AD8065 145 400 2 ! +5 to 24 6.4 0 to +U C c-3 Analog Dev. SOT 23 yes AD820 1.8 100 2 + 3 to 36 0.65 -0.2 to +U CC H Analog Dev. SO 8 & DIPS yes AD86I0 25 85 2 4-5 to 26 3.5 0 to +Ucc-3 Analog Dev. SO 8 & MSOP8 yes ADS 6 27 5 500 0.5 +5 to 26 0.75 0 to + U C( H Analog Dev. SO 8 & SC70 yes OPAI32 8 250 5 +5 to 36 4 Rail-to- Rail (input and out- put) Burr- Brown SO 8 & DIP 8 yes THD = 0.000.08% TIE207 I 10 500 6 +4.5 to 36 L7 0 to + u cc Texas Instn SO 8 & DIPS yes Offset adj. TLE208 1 10 1100 6 +4.5 to 36 L7 0 to + u cc Texas Instr. SO 8 a DiP 8 yes Offset adj. TL08IC 3 3000 5 +4.5 to 16 1.4 0 to +u cc Texas fnstr. SO 8 & DIP 8 yes Offset ad]. TLC27I C 0.09 1 100 or + 3 to 16 I -0.2 to +UCC-I Texas Instn SO 3 & DIPS yes Offset adj. OPA655 240 1 000 -5 ±4.75 to 5.25 25 ±2.75 Burr- Brown SO 8 a DIP 8 no INAI2I — 200 4 ±2.25 to 18 0.45 to "F^CC" * Burr- Brown SO 8 & DIP 8 no Precision InAmp 7-fl/2Qfl4- elsktGi eletfrcmcs 85 : : :: r a Figure 4. Compari- son of human spec- tral ranges foj and technological spec- tral ranges (b). "r":" 4 ifetbjicn s>cuTilrdne3S human hike -j spectral range aftTHrfg b -■■■Ji >. [rm] technical i spectral range Light spectra and human vision Figure 4 shows the daytime and night-time light sensitivi- ties of the human eye, along with the spectra of a variety of electronic components. The spectral sensitivity of the eye changes with differing lighting levels. This is reason- able, since we can see not only bluish moonlight, whose spectrum is dose to ihe UV region, but also yellowish sun- light, which is shifted toward the 1R region. just as the retina adopts to different brightness levels, it also adapts to colours if they are observed for relatively long times. We sense a white sheet of paper os white, even if it is being illuminated by incandescent light, because our memory tells us the paper is white, although it is actually reflecting yellowish-red light. Our eyes can also adjust to an enormous dynamic range of brightness, ranging from night vision to day vision. This is a range of 0.00001 to 1 ,000,000 cd/m 2 , which corresponds to a dynamic range oF 220 dB. No artificial component can achieve this dynamic range. Per- ception of colour and contrast improves with increasing light intensity, but decreases again with very bright light. However, in the majority of this range of light intensity our eyes are predominantly sensitive In ihe black-and- white spectrum. In the colour region, our eyes have a dynamic range of only' 100 dB, The human sense of colour is individual. There Is no such thing as o green that is perceived the same by everybody, a neutral grey that is the same for everyone or a perfect white. All monitor calibrations are based on the subjective colour perception of the user in question. By contrast, it is certainly possible to standardise radiant sources relative to each other, such as the grey of a cloudy afternoon, the white of an incandescent lamp or the Sahara yellow of a car body, because they are tech- nically measurable, adjustable and repeatable. The retina, which covers the inside of the rear hemi- sphere of the eyeball, consists of a network of cone- shaped and rod-shaped sensor cells (receptors) that con- vert incident light info electrochemical substances (neu- ronal energy). The arrangement and relative numerical distribution or these receptors varies over the entire rear hemisphere of ihe eyeball. These factors vary relative to location on the surface of ihe retina, and they also vary from one person to the next. Approximately 100 million rods are active for night vision, and approximately six million cones are active For day vision, just as multicoloured LEDs have narrow band* widths and different radiation intensities, the sensory cells for brightness, contrast and colour have complex, differen- tiated sensitivities, but they have relatively large band- widths. There are three types of cones, which are sensitive to daylight. They respond to short-wavelength, medium- wavelength and long-wavelength light and ore thus called $, M and L cones, respectively. In contrast to the nearly monochromatic colour emission characteristics of LEDs, the cones have broadly overlapping response curves* Colours in the blue region appear to be darker than colours in the green and red regions because the short- wavelength sensor cells respond more weakly to stimuli. Due to the large overlap in the spectra! sensitivities of the 5, M and L cones, a person with 'normal' vision has especially high spectral sensitivity at 555 nm (green) for day vision fphofoplic vision). The BPW light sensor is matched to this peak sensitivity, as are light signalling systems used for railways and marine transport. By con- trast, modern traffic-light systems now fake people with non-standard colour perception into account and emit green signal light with a large blue component. The lenses of our eyes absorb ultraviolet light. People who develop cataracts can have the natural corneal lens replaced by an artificial plastic lens. Such people can then see UV light In a range extending to below 300 nm, thanks to their 5 cones, insects are especially sensitive to UV light. For people with normal vision, the maximum spectral sensitivity for night vision (skoptic vision) Is at 507 nm. During data transmission from the sensory cells to the brain, there is crosstalk between neighbouring cell groups, not only in the retina but also in the optic nerves and in the brain. A virtual Image only comes into exis- tence after these nerve Impulses arrive In the brain, where they are processed with reference to information ol ready stored in the brain and converted info an image. The eye is only the measurement sensor for this process, and ihe actual sensory cells ore blind 1 to colours and shapes. They simply convert light energy into electro- chemical stimuli, which contain neither colour data nar image data. This is comparable to a graphic processor card with its three RGB lines to a monitor. Here only volt- ages are transmitted, not colour data or image data. In a certain sense, the eye digitally decomposes the 36 dtkfDrdsrfro:Ici-7-S/20(H phoioreoiisric image impinging on the individual receptor cells via the pupil and lens. Due to the crosstalk between neighbouring receptors, optical nerves and brain cells, what we see is again o nan-plxelafed, photorealistic image without any sort of rasterization, moire effects or colour fringes [such as are generated by a monitor and are well known in printing technology, since monitors and paper simply don't have brains). This means that a colour stimulus in the brain only arises from combining the information From all of the receptors and optic nerves. Colour is no! in the light ami not in the eye, hut in the brain Isaac Nevrton Tnese complex chemical and electrical conversions and transfers make standardisation impossible, especially because the levels of endogenous substances in the body con change colour perception. This occurs with vitamin deficiencies or with emissions of endogenous substances, which in extreme coses can lead to o blackout, in which the brain sees white increasingly strongly, colours become increasingly washed out and grey tones become brighter, [Of course, here we re not referring to the black- outs of certain well-known politicians!) However, colour by itself is not a predominant consider* aiian in the brain. This becomes evident if we attempt (in vain) io determine the distance to a light source. We may know the distance to a star in the night sky, but we esti- mate the distance to a lamp using Its surroundings. Conse- quently, the brain needs to know not only the colour emis- sion characteristics of an object, but also its structure and tne nature of its surface [relative to stored experience) , in order to generate an image using the total colour informa- tion. In ihe overall process, the brain also evaluates other impulses, such as may come from the senses oF touch, taste, smell and hearing — and from the second eye. Approximately 8-10 percent of oil European men and 0.5 - 1 percent of European women have hereditary reduced sensitivity to red and/or green. The normal ratio of the sensitivities of the three photoptic S, M and L cones is 1 0 % blue, 48 % green and 42 % red. With a chro- matic visual deficiency, the three types of cones have a diF reran f relative distribution [such as a green deficiency with a distribution of 30 % blue, 30 % green and 40 % red). Some colour-blind people can still properly distinguish green from red, others do not see any difference between red and green, and yet others have a chromatic deficiency only in the central, acute vision region of the eye The cone distribution differs from person to person, and i! also varies over the total surface of the retina. Red/ green diherennation decreases steadily with increas- ing distance from the central acute vision region (toward the outer edge of the hemispheric rear surface of the eye). Total colour blindness is very rare and occurs in only 0.003 percent of the population. There Is also a yel- low/bJue rorm of colour blindness. Colour blindness is a hereditary deficiency that does not change with age, and if cannot arise during the course of a person's life, since it is inherited. The 'normal red/green distribution Is relative to Cen- tral Europe and originates from the ancient times of hunters and gatherers, when it was vital to survival to be able to gather red berries from beneath green leaves or follow blood traces in the forest. Strictly speaking, our normal condition amounts to a hypersensitivity for red/green contrast perception, which is not necessary in other types of landscape such as deserts or polar regions. Colour blindness as a visual deficiency is thus relative to the visual capacity of a majority of the popula- tion in a particular landscape. For persons in professions such as web design and equipment design, who deal with the visual aspects of devices, it is certainly important to pay attention to this phenomenon, since men and women with various forms of colour blindness form a considerable proportion of our population. What is white? What is blue? What is a neu- tral grey? These considerations influence phenomena such as simultaneous contrast (apparent colour tinting of an area seen against a background), colour stereoscopy (which causes red to appear to be closer and blue further away), illegibility of red text on a green background, and other types of chromatic displacement. After all, our lives and our moods depend on colour. The technology used in our electronic medio is similar to the biology of our eyes. However, no-one has yet suc- ceeded In using technical resources to transform the infor- mation from our nerves and brain into a photograph. Summary Light sensors using standard LEDs as sensors connected to opamps with JFET Inputs or simple MOSFET Input stages are certainly worth consideration. In such a con- figuration, various types of !C topologies exhibit different types of oscillatory behaviour during switching. With relatively old types of ICs, the frequency of oscil- lation at the switching point can only be defined with integrating feedback using C2 and R3. By contrast, with more recent types of opamps an RC network at ihe non- inverting input produces better-defined switching behav- iour with additional hysteresis over the range of light intensity. This depends on the integrated compensation system of the 1C, which Is not externally visible. For a simple light sensor built according to Figure 2 and having a time delay of 3 seconds, all of ihe listed types of opamps are suitable. Their mutual differences are essentially smaller than the variations due to ihe pas- sive external components. Altogether, this yields on accih rare, economical SMD design using fewer components and having a smaller area than with o discrete BF245 JFET, a standard opamp and o trimpot. Free Downloads The author's extensive documentation for this article, including reference sources/ literature ref- erences and Web references/ can be down- loaded from the Elektor Electronics website at no charge under download number 030435- 1 2. All available downloads can be found at www, efektor-electromcs 4 co.uk/dl/dhhtm . 7-8/ 2D M - s Mil or elecfnmics 87 Design by C. Baumann IR Servo Motor Interface for RCX LEGO RCX-compatible infrared remote control for servos One of the few features lacking from the LEGO Mindstorms system is an accurate positional drive. This has prompted the author to develop this interface circuit, which can control up to three servos of the type used in radio-controlled models via the IR-interface of the RCX brick. 88 ektfjf elstircmits - 7*8/2004 Figure 1 . Driving a servo using a rectangular waveform whose pulse width determines the servo's position. Figure 2. Timing diagram showing the output signals of the PIC to control three servos. Tlie three different types of LEGO Technic 9 Y motors are more than ade- quate for most robotics projects. How- ever, when accurate angular position- ing is required, one can quickly become frustrated by the amount of play In the gears and start looking for a better solution. The servos used in radio-con- trolled models offer more precision. Of course, we will not only have to deal with mechanical interface prob- lems of joining to other LEGO bricks: we wall also have to operate under control of the RCX, which is a little trickier. The RCX brick is the main control element in the LEGO Mind- storms system. It consists of a micro- controller built into a large, bright yellow, LEGO brick. Ralph Hempel, the creator of pbForth, has, along with Andreas Peter, developed various add-on cir- cuits that allow the RCX to be used with two servo motors. Descriptions of the circuits are available on the Internet: see references [1] and [2J, Hempel has provided special pro- gram commands in pbForth to drive his circuit, namely SERVO INIT and SERVO SET [3). The circuit presented here will allow you to control up to three ser- vos simultaneously with the RCX standard version 2,0 firmware, using the IR interface on the RCX brick. Servo control Servos for radio-controlled models use a form of pulse-width modula- tion (PWM). The control signal is a rectangular waveform with a fre- quency of about 50 Hz. The precise frequency is not critical: it need only lie somewhere in the range 30 Hz to 60 Hz. The information is carried only in the width of the rectangular pulse, which is allowed to vary between 1 ms and 2 ms. As Figure I shows, the servo is in Its mid-posi- tion when the pulse width is 1,5 ms. inside the servo there is a poten- tiometer attached to the output drive shaft. This gives the electronics in the servo the necessary angle feed- back information. Because of the potentiometer end-stops, the servo should never be overdriven, or it will be permanently damaged. This can happen if the pulse width is outside the permitted range. In order to drive three servos at the same time, three rectangular waveforms need to be generated whose pulse widths can be adjusted independently of one another. As can be seen from the circuit diagram in Figure 3, a microcontroller type PIC16F628 (ICS) generates these sig- nals. The program in the PIC is organised in such a way that the three control pulses are produced one after another in sequence at an overall rale of 50 Hz. Thus we have: Ain Afi 1 An ‘ Aff “ 1/50 s = 20 ms We are given A on , B on and C on , the desired pulse widths. The 20 ms total time available is divided into three equal parts, giving: Afi — 20/ 3 ms - A oa ; B Q jj- = 20/3 ms - B on ; C off = 20/3 ms - p The behaviour is illustrated in the diagram in Figure 2. The pulse gen- erator program operates as follows (in much- simplified pseudocode) Label 1 OutA on Wait A n on OutA off Wait A off OutB on Wait An OutB off Wait Af f GutC on Wait An QlitC off Wait Aff Goto Label 1 7-6/2GD-! ■ cleklor dstf rentes 89 ■ 5V ©— W-V da 3 i-7 |l0V ♦ * IC_5 a a o G- +5V © 3 s? ♦ C7 ¥1 HI Hr 220 tfM 16 TSOP1736 SFH5D6 TFMS536C SFH505A PIC12043S IS1 LT6Q TSOPiese rJJL61H30O TSOF4B3fi SFH511C 22 ? 15 zzp ; ■ 18.432MHz i 1 DO n <3 5 RB7 MCLR RBS R35 IC2 RB3 RS2 RBI RED PIC16F628 , OS Cl RA4 RAD ra a 0302 RA1 RAG ■ 13 12 11 10 IS 17 13 12 11 ID s 3_ 2 15 17 +5V © JF" "* tOOn L 1 A MCLR 103 HB7 RSs RES RB4 RB3 R32 RBI RGQ PIC1SF62B HM 0SC1 RA3 RA2 RA1 G5C2 RAO IS X2 CO 15 flh _22p CIO Ih 1 22p 14.3 MHz * R5 R4 K3 ■ff] n n g _L -0 g — E c- K4 il + 1 2X1N4148 G2035E- 11 T50P1736 TSOP1B36 TSOP4S36 SFHS06 SFH505A PIC12043S ISIUGO NJL61H380 SFH5110 Figure 3 . There ore three main ports to the circuit : the dual regulated power supply (1C 1 and IC4), the IR receiver (TSOP 1 738 and IC2), and the puke generator (tC3). Interface Circuit The circuit in Figure 3 Is designed to operate from a separate 9 V battery supply. The two voltage regulator circuits using separate voltage regu- lator ICs {IC1 and IC2) mean that the main supply voltage does not drop when the servos move, ensuring trouble-free operation. If all three motors are moving at the same time, the current draw can be up to around 500 mA. The interface should therefore under no circumstances be connected to an RCX ontput } which is not suitable for such currents. Note also the rather odd use of diodes D1 and D2, A voltage of about 0,65 V is dropped across each diode, which shifts the voltage at the ground pin of the 7805 by 1.3 V. This increases the output voltage of reg- ulator IC4 to 6-3 V r which is the ideal voltage for the servos. The actual IR servo motor con- troller circuit consists of IR receiver IC5 and two type PIC16F628 micro- controllers connected to one another. The first microcontroller (IC2) con- verts the serial data obtained from the IR receiver to parallel, and sends it on to the second microcontroller (IC3). This is done using an S-bit data bus and three control signals. The maximum resolution achievable is one part in 256. The 1 ms time period is divided into 255 steps which, depending on the character- istics of the servo, gives an angular resolution of less than 1 i On some types of servo motor tins resolution is greater than the so-called ‘dead band' (typically 5 us), and so it is possible that the servo motor will not react to a change of just one unit in the control value, (The "dead band' is a necessary feature of servo motors to ensure th at while the motor is turning, the incoming con- trol signal and the internal reference signal can be aligned as quickly as possible, but without having the rotor oscillate about the target posi- tion.) The second PIC (IC3) operates at a clock frequency of 14.3 MHz, a value chosen on the basis of the relation- ship between the servo control pulse 90 chroma- 7-B/iOO-r | TSblC I Control lines truth table [ IC2 (UART) j A4 A3 A0 Value PortA Value (A7-AS, A2, Al masked) Meaning 0 0 0 0 0 NOP 0 0 1 1 1 Load A 0 1 0 2 8 Load B 0 I I 3 9 Set Slope 1 0 0 4 1 6 Charge C 1 0 I 5 17 Set Intercept 1 1 0 6 24 NOP 1 l 1 7 25 Reset Table 2 ' ■ '-.S— Additional LEGO protocol data to monitor transmission Data header (for all opcodes) hex SS FF 00 Opcode 0x14 (=d20) Opcode Complement Ox FF- Ox 14 = OxEB Dummy 0x00 Dummy Complement OxFF Dummy 0x00 Dummy Complement OxFF Instruction n Instruction Complement not{n) Data X Data Complement not(x) Checksum s Checksum Complement not(s) Table 3 ROBOLAB Command overview (Device Instruction Set) Instruction Number Command i (i) 0 Select channel A 2(8) | 0 Select channel B 4(16) 0 Select channel C 1 (1) I. .255 Charge A 2(8) 1.. 255 Charge B 4(16) I..2S5 Charge C 3(9) 0..255 Set slope of selected channel (default 14) 5 (17) 0..SI00 (0..2S5) Sec intercept | DtV 20) of selected channel (default 3575) 1 (25) X Reset all slope and intercept values to default widths and the PIC instruction c^les. The clock period is 69,9 ns: as in the earlier FIC16F84 device, most of the RISC instructions of the PIC16F628 are executed in 4 clocks, and this is also the rate at which the timer increments. An instruction therefore takes 279,9 ns. The pro- gram in IC3 uses the 16-bit timer {TMRl ), and the shortest servo pulse of 1 ms corresponds to 3575 incre- ments of TMRl. This value is also the one used on initialisation. There fol- lows an ‘off* period of (20/3 - 1) ms ; which corresponds to 20258 incre- ments. The pulse length in PIC cycles is calculated as follows: t = a y x - b T where: 0 < x <= 255 (0 is a reserved value) a = (7150-3575)/(255-l) = 14.0 (slope) b = 3575 (intercept) Now we can see why the particular clock frequency of IC3 was chosen: the quotient 3575/254 is approxi- mately an integer. The program In the PIC has the facility to use slope and intercept values different from those given above in order to allow the servos to be trimmed. There are certain limitations in the communi- cations protocol which mean that we can only send 8-bit values: this means that the slope can only be set to integer values, and the intercept can only be adjusted in steps of 20. Data transfer Parallel data transfer between IC2 and ICS takes place in two stages. Two microcontrollers are used because there are several time-critical operations to be carried out. First, the UART (Universal Asynchronous Receiver and Transmitter) must always be ready to receive data, since the interface does not know when the next 1R command will arrive. Second, the UART must man- age reception of data according to the LEGO protocol (opcode 0x14), which uses a block size of 15 bytes at 2400 baud (using one start bit, 8 data bits, a parity bit and one stop bit): this gives a total transmission time of about 70 ms per command. Finally, three independent stable puLse-width modulated signals must be generated according to the incoming commands, and the jitter in these pulses must be kept within the dead band of the servo. The effort involved in trying to integrate all these functions into a single reli- able program in one PIC makes the price of a second PIC16F628 look insignificant. Pins RBI and RB2 of IC2 are con- figured for use with the UART and so are not available to form part of the parallel data bus. RA1 and RA2 are 741/2094'*! defer ektf ranks 91 COMPONENTS LIST Resistors: RU2 - iOkO R3 = 3300 R4,R5,R6 - 5600 Capacitors: C 1 ,C2 f C4 # C5,C 1 1 ,C 1 2 - lOOnF C3 = 4pF7 16V radial C6 = 470 jjF 1 6V radial C7-C10 = 22pF Cl 3 - lOOpF 16V radio] Semiconductors: DJ .D2 - 1N4148 !C1 - 78L05 !C2 r lC3 = PIC16F628, programmed, order codes 020356-4 1 (]C2), 02035^42 (1C3} IC4 = 7805 IC5 = TSGP1738 (see text} Miscellaneous: K I = 9-V battery (see text] K2,K3,K4 “ 3-way pinhecder XI “ 1 8.432MHz quarts crystal X2 = i 4.3MHz qoariz crystal (see text} PCS, order code 0203 56-1 (see Readers Services page) Disk, order code 020356-1 1 or Free Download Conrad uraupner Futaba Multiplex Robbe Microprop Simprop XL ( o" XL fo s ^ m O XL XL ■ — * O XL ¥ XL o o fo jo + o + — G -L O + to - fo XL o O o — o| C031E->13 Figure 5 . P/noufs of various commonly found radio control servos. used instead. This arrangement requires the use of at least one con- trol signal, since the two ports of IC2 cannot be updated simultaneously. Without a control signal, IC3 could read erroneous values between the updates of the ports. In looking at the control signals, note that RA4 of IC2 is an open-drain output and therefore requires a 1 kf> pull-up resistor (Rl). The two ICs are configured so that the internal MCLR signal is pulled to V DD , thus freeing up the pin to be used as the HAS input on 1C3. Table 1 shows the values on the con- trol signal bus and what they signify. RCX UART Using the LEGO Mmdstorms SDK2 [4j and version 2.0 of the firmware, the user has access to the transmit channel of the RCX UART. This opens the door to a new world of robotics projects. For example, an RCX can program another RCX, or several RCX bricks can jointly process sensor and variable data, simply by obeying the LEGO UART protocol and sending the right opcodes. Be warned, however, that communication will be with all RCX bricks in range of the IR commands. This can T according to the SDK, have ‘catastrophic' results. For good rea- sons we have chosen the opcode 0x14 CSETVAR' or : SETV’) for use here. This command is no longer used in RORGLAE 2.5, since a uni- versal Set 1 command was intro- duced in version 2.0 of the firmware, which allows — depending on the configuration — both sensor values and other variables to be set. According to the datasheet the full command is as follows: SETVAR: 0x14 variable, source, number (LO), number (HI) (Reply 0xE3. Note that once the receiving RCX brick has verified the opcode it sends a confirmation of reception. In our case this is not rele- vant, but a short pause should be inserted between consecutive opcode transmissions to avoid IR interference.) We slightly modify this command: 0x14 0 (dummy), 0 (dummy), instruction, data (The RCXs involved will unfortunately lose the use of control variable 0.) Tire LEGO protocol employs several additional data bytes to confirm cor- rect data transmission, as shown in Table 2. The receiver can check the complement bytes and compute the checksum over the received bytes: this can be compared with the received checksum. Overall, this gives a good check on the communi- cation quality. Although the RCX carries out a parity check, it is not essential in the program in IG2 and in any case the 16F628 UART does not provide an automatic parity check facility. The author used the low-cost TSOP1738 from Vishay-Tele- funken as IR receiver and demodula- tor. LEGO IR transmissions are at 2400 baud and use a carrier of 38 kHz. This sensitive IR receiver gives a range of up to 10 ni, when the RCX is configured for long-dis- tance IR communications. Table 3 gives an overview of the instructions used in the ROBOLAB program, with actual values sent given in brackets. As already men- tioned, care should be exercised when trimming the servo parame- ters: in order to avoid overdriving the servo, with possible consequent damage, make adjustments only in small steps. Construction The printed circuit board (Figure 4) is small but easy to populate, and so construction should not present any problems. Care should be taken with the wire links: they are the price that must be paid for using a single-sided circuit board. There are six wire links in total, of which three are under the ICs, one being under IC2 and two under 103. These wire links are best made with insulated wire on the underside of the board. Alter- natively the links can be made on the component side using thin cop- per wire, passing under the IGs (or their sockets). In any case the wire links should be fitted first, followed by the passive components, and finally the active components. As always, take care with the soldering and pay attention to the component values, the polarity of the electrolytic capacitors and diodes, and the orien- tation of the ICs. Tne heatsink for the voltage regulator IC4 is mounted just off the edge of the board. 92 EickfH eltdiflnks - 7-8/2004 Figure 4. The single-sided circuit board is compact: note ihe wire links! The 9 V battery is connected to the terminal pins marked Kl. The current consumption of the circuit chiefly depends on the number and consumption of the servos If space permits, it is best to use a battery made up from six AA-size cells; a 9 V PF3-iype battery will have a much shorter life, perhaps by a factor of between five and ten. JR receiver IC5 need not necessar- ily be soldered directly to the printed circuit board. It can be mounted remotely using a three-core cable running from the points on the board where ICS would be located. Other IR receiver devices with similar char- acteristics can be substituted for the Vishay-Telefunken T30P1738 speci- fied in the parts list. Some of the alternatives available are shown in the circuit diagram (Figure 4) along with their pinouts. All the ICs have three pins, but on the printed circuit board five holes are provided for IG5, arranged so as to allow any of the suggested ICs to be directly sol- dered in (or wired) using three adja- cent holes. There is also an alternative to the 14.3 MHz crystal X2. If a crystal with this frequency is not available, a more re ad ily- avail able 16 MHz part can be used instead. Ordinary radio control servos have no difficulty in coping with the effect of this change. The three servos are connected to the headers at K2, K3 and K4. Again, attention must be paid to the pinout, and the various manufacturers of ser- vos use different plugs on the end of the connection cable. The most fre- quently encountered arrangements are shown in Figure 5, Operation The servo driver interface can be con- trolled using ROBGLAB 2.5 with RCX firmware version 2.0, using the LEGO Figure 6 . One of the RCX programs available for download from www.elektor- electronics.co.uk. The touch sensors can be used to adjust the servo's position. Figure 7 . The heart of the RCX program: driving the RCX UART transmitter. 7 '8/ 2004 - elcktor ebtfronks 93 Web references [ I ] VA7wJnchlab.net 2se wo interface. him [2] http ://mi n dstonm s .lego, co nV s dk2/ defauStasp [3| Dave Baum, Michael Gasped, Ralph Hem pel, Luis Villa: 'Extreme Mindstorms, An Advanced Guide to LEGO Mindscorms', p. 3 1 3. [4] h tip 7/www.ceeo. tufts , edu/ ro bo la- batceeo/Reso u rces/d oc u me n tail on: 1 ' LE G O M i n dSto rmsS D K.zip Free Downloads PCB layout in PDF format. File number: 020356- Lzip RCX program to drive the servos; source and object code for the two PiCs. File number 020356-1 Lzip VAYW.elektor- e I e ctron i c s , co . u k/dj /d L h tm . select month of publication. Author's full documentation including pictures, programs, source and object code and instructions: http:fVVAvw-(:on- vict-lu IR Servo conirol.zip Figure 8 ♦ This simple program runs on the PC and controls the servos vio the [EGO tov/er. tower (RS232 or USB version), or from the RCX itself. Various programs are available for download (see the text box for addresses), of which we only have space here for a brief description. Figure 6 shows a simple down- loadable program with two parallel tasks. In this example the RCX increases or decreases the angular position of the red servo, starting at its mid-position, according to which touch sensor is pressed. The colours red, blue and yellow follow the usual ROROLA-B colour coding convention. The second program icon puts the RCX into long-dis- tance IR communications mode, and the display shows the current Figure 9. I re easy-to-use front panel of the RCSen/o Manager slope value. The intercept value can also be trimmed in a similar fashion. Changing the slope increases or reduces the total range of motion of the servo, while changing the intercept only affects the zero position. As usual in ROB OLAR/Lab VIEW, entire program segments can be col- lected together and represented graphic ally by a single new icon, mak- ing it possible to take a high-level view of even the most complex pro- grams. Figure 7 shows the heart of the RCX program: driving the RCX UART transmitter. Further information on the use of the UART can be found in the LEGO Mmdstorms SDK (4j. The simple program in Figure 8 runs on the PC. Tne red servo motor toms slowly over its entire operating range. Note the use of a Lab VIEW FOR loop with a shift register. Data leaving the main box on the right- hand side are stored in the shift reg- ister at the end of each iteration, and recirculated. This makes it very easy, for example, to check the program for any errors. Tne two icons outside the main box are responsible for tasks including initialising and shutting down communications with the LEGO tower. The program looks for the tower connection configured in ROBOLAB. The normal ROBGLAR RCX direct mode cannot be used, since the program would then wait forever for an acknowledgement sig- nal from the RCX: in our case trans- missions are in one direction only. Finally, Figure 9 shows the front panel of the RCServo Manager pro- gram, which is very easy to use. Both slope and intercept can be trimmed, and the tower only trans- mits when a value is changed. If a value is changed continuously, the value of RATE determines the trans- mission frequency. 94 c'lsktar eleitionia - 7-S/20Q4 D ® lS 1 ! ; S' ~ lectronics CD (Edition 2) Elektor’s Components Database RRP £12.95 (U5$ 22.90) i he program package consists of four databanks covering ICs, transistors, diodes and opfocouplers. A further nine applications cover the calculation of, for example, zener diode series resistors, voltage regulators, voltage dividers and AMVs, A colour band decoder is included for determining resistor and inductor values. The ECD gives you easy access to design data for over 5,700 ICs. more than 35,000 transistors, FETs, thyristors and triacs, just under 25,000 diodes and 1 ,800 optocouplers. Ali databank applications are fully interactive, allowing the user to add, edit and complete component data. This CD-ROM (Windows XP compatible) is a must-have for all electronics enthusiasts. Now-extended with even 1 mom ICs , transistors, FETs, thyristors and triacs! Order now using the Order Form in the Readers Services section In issue. Eiektor Electronics (Publishing) RQ Box 190 Tunbridge Wells TN 5 7WY Eng land Telephone +44 (0) 1580 200 657 Fax +44 (0) 1580 200 616 See also www.elektor-electronics.co.uk High performance Windows based PCB Design Capture > Simulation and Layout software at prices you'd expect # from your local computer store! NEW! in lasy-PC 7 M K L-E'iC-K fcr | McfOKfl ® j ? 3303 HE, S.3 YTuySenrs HT* Library Databook Step and repeat plotting Swap Connection Mode Dimensioning Copy to Metafile plus much more _ til . ± ■, ^ : - : a c ; □ o n '3 n E2 ^ dT li z r. z g o' nig nriii .*'1 flilNKsi Stop press... by customer demand, now with Tsien Boardmaker 2 design import... Number One Systems delivers true 32 bit Windows software applications including features that a few short years ago would only have been available in software tools priced in the thousands! Test drive Easy-PC and Easy-Spice for yourself and be prepared to be amazed at the super value... Call for a brochure, price list and demo CD on +44 (0)'! 684 773662 or email sa!es@numberone.com N umbei One Systems Number One Systems I SKg&mm United Kingdom www.nu 14 , 2D 0 4 - elector dedromts 95 This R/C analyser measures and stores the speed of an R/C model car directly in the car. It is aimed at R/C model car builders who want to know how fast their models can go 'on the road'. 96 aliktw fiEdreniti - 7-8/2004 Features - Supply voltage 5-8 V " Connectors for all external leads - Jumper-sefectable operating modes - Simple hardware construction using standard leaded compo- nents (Conrad] - PIC microcontroller “ Contrast adjustment for dis- play “ RS232 interface - Graphic data presentation - Connection for external push- button - Measures, stores and outputs data - Three rotational sensor options (IR and magnetic) - All control logic on the analyser board The R/C analyser measures the speed oi a model vehicle. The speed is meas- ured directly in the R/C vehicle, rather than being computed from the num- ber of laps and elapsed time. This means that the speed, and in particu- lar the top speed, can be determined ror individual curves and straight- aways. Hie average lap speed is also obtained as a 'by-product', The rate at which the main gear- wheel is spinning is continually measured using a rotational speed sensor. This continual measurement also allows a wide variety of other factors to be tested and analysed, such as the effect of varying the sizes of the main gearwheel or motor pinion, using a different motor, or using a different gearbox, in order to optimise the comiguration of the R/C model and allow the motor to run in its optimum speed range. This gives ambitious model car racers a real advantage. The speed is measured and stored once a second. The current +5V Figure L Circuit diagram of the R/C analyser vvirfi three different types of sensors l-Wm ' t^jQf e!;dionia 97 Table L Operating modes and jumper settings Measuring Readout via display Readout via RS232 1 Connect K5 to the motor battery or an unused receiver channel (use only the -E and - leads) Connect K4 to the sensor Connect K2 to the display Connect K\ to the RS232 port of the PC 1 Set JPI co Set JPI to Set JP I to -R’ | Leave ]P2 open Set JP2 to 'D' Set JP2 to 'RS f — — Open Excel file rdogexTxfs and press the Start button. The program will sit in an endless loop waiting for data (press ESC to abort). ; Press S I ! The first of 1 20 measurements wilt be made after the delay expires. The total measurement time is 60 seconds with an 0.5 -s window or 120 seconds with a l -s window. The measured values are shown sequen- tially on the display in the form of the measurement number (0—59 or 0-1 19) and associated measured value (rps). The measured values are read. After all of the data have been read (approx. 20 s) + the message 'Done' will be displayed. Click on OK to acknowledge. Start a new measurement session by again pressing the button (the previous meas- urements will be erased) Start a new readout by pressing the but- ton again (once or twice). The file RSAPLDLL, which contains the function library for driving the PC serial interface, must be first copied to the Windows system directory to allow the data to be displayed. version of the software allows up to 120 values to be measured; stored and then read out after all the laps have been run. This permits a total driving time of two minutes to be analysed. In the future, an additional EEPRGM will be fitted to the circuit board to achieve a measurement time that is limited only by the capacity of the motor battery (which means approximately 8 to 10 min- utes). The predefined measurement interval (gate time for counting pulses) can be configured using a software parameter. Analyser system The R/C analyser system consists of the analyser board, a rotational speed sensor (selected from three options), a display module for view- ing the data at trackside and an RS232 interface for connection to a PC. The heart (or more precisely, the brain) of the analyser system shown in Figure 1 consists of a PIC16F627 microcontroller with 1 KB of Flash memory and an integrated 128-byte EE PROM for storing the measured values. The microcontroller, which comes in an 18 -pin DIL package, should be fitted in a socket so its software can be updated in the future. It is clocked at 4 MHz by a three-lead ceramic resonator. Two jumpers (JP1 and JP2) are connected to the microcontroller to allow the t'arious functions and settings to be configured. The microcontroller can communi- cate with a PC via an RS232 level converter. Only the TxD and RxD lines are used, so there is no hard- ware handshaking. RxD is included for future enhancements. A low- drop voltage regulator with a voltage drop of only 0.5 V ensures reliable circuit operation from a battery power source. Reset pushbutton SI is used to start a measurement session. Trim- pot PI allows the contrast of the display to be continuously adjusted. Pin 5 (R/W) of the display is connected directly to ground, since the software does not read any data from the display. All con- nections to the power source, rota- tional speed sensor, display, exter- nal pushbutton and RS232 link are made using connectors. The system is rounded out by a program written in Visual Basic, which allows the data to be dis- played and analysed in graphic form. The R/C analyser system is an 'open' system, so future modifications and new features can easily be inte- grated into the hardware and soft- ware. Three different types of sensors can be connected to K4: a Hall sen- sor (which responds to a magnetic field, in this case a rotating field), an optical sensor using reflected light, or an optical gate sensor. If an optical gate sensor is used, a small hole must be drilled in the main gearwheel of the R/C model to allow the IR light beam of the sensor to pass through once per revolution. The optical gate sensor requires the most space of the three options. The distance between the arms of the gate must be adjusted to match the thickness of the main gearwheel. If a reflect ed-light optical sensor is used, the main gearwheel must have a small reflective spot (consist- ing of a piece of glued-on aluminium foil or white enamel). The distance between the reflect ed-light sensor and the reflecting surface can eas- ily be as much as 15 mm without interfering with the operation of the sensor. If a Hall sensor is used, a small magnet is glued to the main gear- wheel to induce a pulse for each rev- olution of the gearwheel. The gap between the sensor and the magnet should not exceed 5 mm. The sensors operate using three dif- ferent principles, but they all yield the same result. The IR light beam interrupted or reflected by the main Reading and displaying measured values 98 dskler dttfrcuia -My 2014 COMPONENTS LIST Resistors; R 1 = lOldl P 1 = 1 Okll press! Capacitors: Ci C 6 = l^F 16 V radial Semiconductors: D1 = IN4148 IC1 - PIC 1 6F627-4/CP, programmed, order code 030178-41 IC2 = LP2950CZ-5.0 1C 3 = MAX232CP Miscellaneous: JP 1 r jP2 = 3-way SIL pinheader wifh jumper K1 = 9-way subD socket |fema!e), angled pins, PCS mount K2 = ] 4-way SIL pmheader K3 = LCD, 2x16 characters with ilalcable and 1 4-v/ay IDC connector K4 - 3-woy pinheader S) = pushbutton, 1 make conlad (Conrad Electronics # 704849-8B) XI = 4MHz ceramic resonator with 3 pins and infernal capacitors. PCB, available from The PCBShop l QQQQQQQQQ i OQOQOOOOOOOQ g\ $ (g) 030l?e-T Tv Tv fv T Zt U o B\ U ° o LJ □ o Figure 2. The printed circuit board is compact, despite being single sided and using leaded components. gearwheel, or the magnetic held in the case of the Hall sensor, causes the sensor to generate a rectangular pulse waveform that is applied to the microcontroller counter input (RA4). This Schmitt-trigger input reeds the pulses to counter TMRQ, which counts the failing edges of the pulses and writes the number of pulses per time unit to the appropriate register, as well as to the internal EEPROM for long-term storage. The time win- dow (1/20, 1/10, 1/2 or 1 s), and with it the number of possible measure- ments, can be configured as desired using the software. When a measurement session is started using SI, there is ten-second delay programmed into the software (this value can be easily modified) to allow the driver to take Iris or her position at the controls or concen- trate on the start. During this delay the values previously stored in the internal EEPROM of the PIC are erased. Pushbutton SI nor only starts a measurement session, it also starts data readout and output via the LCD or RS232 interface if JP1 and JP2 are suitably configured (see Table 1). The measurement data are dis- played using a two -line LCD module with 16 characters per line. For each measurement, the measurement number, measured value, and num- ber of revolutions per second (rps) of the main gearwheel are displayed. The speed can be obtained by a sim- ple conversion. In a planned future version of the software, the speed will be shown directly m km/h. The revised version of the software will allow the conversion factor (distance travelled per revolution of the main gearwheel) to be set using a config- uration parameter. The program for reading the data via the serial interface and display- ing it on a PC is written in Visual Basic for Excel. A simple user inter- face allows suitable parameters to be selected and shows the car speed and motor speed in separate charts. This is ideal for tasks such as inves- tigating how different combinations of pinion size and main gearwheel size affect the speed of the motor. Small cireuit board Although the circuit board for the analyser must be fitted in the R/C car, which means that every square centimetre counts, we managed to come up with a satisfactory solution with a single-sided circuit board using only “normal' leaded compo- nents (Figure 2). This spares you the annoyance of working with SMDs t so populating the board is dead easy. There are two wire bridges, and as previously mentioned, the micxocon- 7-8/2004 - cMtioi efalrcf.ki — Downloads, planned enhancements, and unplanned ideas Illuminating the brake lights by suitable manipulation of the joystick Data transfer via ISM radio link Temperature sensors Reading battery data (e.g- dis- charge curve} The software for this project is available for download from the Elektor Electronics website under number 030178-1 1, and the cir- cuit board layout can also be downloaded under number 030178-1. A pre-programmed version of the microcontroller can be obtained from Readers Services under order number 030178-41. Bare printed circuit boards ore also available from the PCB Shop {see the Elektor Electronics website}. The author has a website dedi- cated to the R/C analyser at www+g eorqeii.de/ anal yzer/ana lyxer.htm . The latest version of the software, including future modifications, enhancements and new ideas, can always be found at this site. - Storing more than 1000 meas- urements using an external EEPROM - Starting a measurement ses- sion using the R/C remote con- trol unit - Using the analyser as a switch ing module for additional func Hons R5APLDLL is available from the website of B. Kainka: http:/ /home.t-online.de/home/ B . Ka i nka/r so pidll.zip trailer should be fitted in a socket. If space is tight, you can use a pin header Instead of the sub-D socket, along with a suitable adapter. Software The entire intelligence of the R/C analyser system is contained in an assembler program. The individual functions, which are programmed as separate modules for ease of under- standing, are called from the main routine via jumps. Once each module has finished its job, it makes an orderly return to the main routine. The main routine initialises the inputs and outputs of the PIC, reads the settings of the two jumpers, and deletes the old measurement values from the internal EEPROM. Driving the serial interface The RSAPLDLL function library allows devices to be driven via the serial interface of the PC. It is typi- cally used, for measurement and con- trol applications. Device control is implemented using macros written in VB {Visual BASIC) for standard MS Office programs, such as Word or Excel. A particular advantage of this is that the transferred measurement values do not have to be first con- verted, but can instead be entered directly into a spreadsheet. The DLL file must be copied to the Windows system directory in the PC. The appropriate functions and procedures {subroutines) of RSAPLDLL are declared in a macro in the Excel document rclogex3.xls. This informs Basic that it has to use new external functions. These declara- tions are located at the beginning of the VB module, followed by the rou- tine for reading the measured values. The interface is initialised and opened using the following configu- ration parameters: 2400 baud, no parity bit, 8 data bits and 1 stop bit. The Excel worksheet rcloggei is then opened and col umn B, which con- tains the values from the previous session, is erased. The macro then waits for new values. The program remains in an endless loop (which can be aborted by pressing the Esc key) until the pushbutton is pressed on the R/C analyser to start reading out the measured values. When the button is pressed, the measured values are read line by line using the function RE AD BYTE. After the data have been transferred, the interface is closed using CLQSECGM and a message dialogue is dis- played. The data are then displayed in an easily understood form, as shown in Figure 3. ^kiwk^I fml - ■OS 2- "~~ r r - 1 — ” m.‘ I- *2" , XE t ; ' » i nfa 3 ;= ■ ft £ - H S £ Vi - - a i y . . * Z-- ■=: _ - X 5 x Figure 3. The parameters and measured values are displayed using on Excel worksheet. TOO el ski w ekrtrfinki-J-3/2G04 PicoServ provides all that is required to enable an Internet web server to be integrated into your system or product, providing remote control and remote access via the Web or mobile phone * . t * * ■ See also www.elektor-electronios.co.uk Simply send ym files and orcfer QHLM E WWW.PC8-POOL.COM v . ; . £ oread | Telephone -$-44 (0) 1580 200 657 Fax +44(0) 15S0 200 616 AH software for the project is available free of charge from our website! Order now using (he Order Form in the Readers Servic section in this issue. 7-8/2004 ■ Ei elder tiSttiDruo 101 Servicing Ydur Complete prototype Needs O Prototypes at a faction of [he cost 0 Tuning ami setup included O Any contour O Ff4 1.6mm, 35umCu n * KE * XUF ‘ J : EUROCARD 0 industry standard qualfty 0 Fc!!m up smes nms 0 CAM f GAD consulting + Tooting 4 Photoplots + VAT £ 29 . 89 * ' S & ri - ng t=:t; .jlv - rz = = r /; fisc #1 3fS5it JQJtM *‘ eep a *5$® a3 e8-* 8 ’ 86 PICO ROVE IUTWA RO Y o JS£)L'5r?Tli ibT0 r ' f i7fC h . o RDFOIT SElfS/YC Q R&WTE CONTROL o miimMEMJ&himnmxG • MAW vawrompe a F4EKGENCrC4Ii * 40» rcosr # UHtfPOiTCR O SlVMJLt SIZE v Creating a w&b browser or motile phone based interface is simpfe using the TOO U far PiCOSer; system. The PiccServ web module takes care of • Network intending e internet promote e >Veb page siornge PicoServ I/O modules provide simpfe analogue and digital interfaces to the real world and the SMS gateway module allows remote access using a mobile phone, Basic HTML programming is all that is required for you to be rapidly in control of your system from any. 1 , here! 4- z out www.compulogic. info mr&'ycomp£dogfcxa.uk or cal 444 { 0 } 1234 756046 lectronics Micro Web Server for Internet and Intranet El S' Our incredibly popular MSC121Q microcontroller board (also known as Precision Measurement Central') now provides network and internet connectivity, allowing the processor to publish its own data pages onto the web. The article describes a temperature logger aliowing the user to enter, via the Internet, temperature limits and an email alarm address. The Micro Web Server can also switch network ports from an Internet-connected PC. literally anywhere on the globe. Now available: * MSC 12 1 0 board (assembled and tested) - Network extension (assembled and tested) - Combined package (inch all related Elektor Electronics articles on diskette) E 69.00 (US$112.59) £ 41.95 (USS 73,95} £103.50 (USS134.95) Simply Embed the Internet with Rajkumar Sharmar Sure/ RP Remote control is desirable if you're into aerial/ wi Idlife, candid or physically dangerous photography/ but prepare for a shock if you shop around for commercially available remote controls. 102 eltktoi electronics -74/2004 Our homebrew alternative is inexpen- sive and designed for popular Canon models like the EOS88, EGS66, EGS3QGD, EOS500N, EOS3 and in fact any other model having a 2.5-mm jack socket for external triggering (find the connection details of the ‘remote con- trol' socket). Most cameras use the double-action click principle where the first half click is for the aperture meas- urement and auto -focus, and the sec- ond half click for the release shutter. Hew it werks The remote control is based on ready- made and type-approved SRD (short- range device) radio modules from Radiometrix, in combination with encoder and decoder ICs from Holtek. The Radiometrix modules and the Holtek iC have been used in a number of previous Elekior Electronics projects and probably do not need further detailing except pointers to the datasheets that tell the complete story. The circuit diagram of the transmitter in Figure 1 shows the Radiometrix TX2 module and the Holtek HT12E encoder 1C in a classic configuration. The trans- mitter comes on the air when S2 is closed and is effectively amplitude- modulated by the continuous datas- tream supplied by the HT12E. The TX2 SRD module is an energy-wise design and therefore ideal for use in portable battery-powered wireless applications. Similar modules are available for other ISM (industrial, scientific, medial) fre- quency bands like 315 MHz (USA), 418 MHz (UK, now phased out), 433.32 MHz (Europe) and 890 MHz. The HT12E is a serial encoder — its eight addresses inputs AG-A7 allow protection codes r to be set up. Here, all A(n) pin are connected to ground. A press on pushbutton SI causes the 'words' AD8 and AD9 to be transmit- ted over the code -protected channel. They can also be transmitted in (time- Figure 1 . Circuit diagram or the remote con fro! transmitter IC2 V nn liCfll P=Z< nFQ.'0 CS G'r AF F.H3 Jv :I‘ 3): $ ■ 6_SV TI RXZ R=a.-3-'Frt£ti i 1! © Pf, oa K- ECt 05 CIS X\ on Ji Jt3 BSSt Ai HT120 AS AS ■ T nj fa w=y^“~ t !■ ■ r \ J Figure 2. The associated receiver is oho an uncluttered design. / r i't T S/2004 - efacJnmis — u COMPONENTS LIST Transmitter Resistors: SI = 10ka R2 = 47QL1 R3 =9 76kn }% Capacitors: Cl = IQpF 25V radio! Semiconductors: 01 - 1N4148 02 = LED, red 1C 1 —Hi « 2 E [Holfek] (Mo pi in Electronics] Miscellaneous: ANTI = stiff wire, length approx. 15.5cm BT 1 = 9V battery' connection MODI = TX2 433MHz SRD radio module (Rodicmeinx). Equivalents from LFRS (\ wav J prsxo.uk] S 1 “ pushbutton, 1 make contact (see also inset) 52 = on/ off switch Receiver Resistors: R1 =51kni 1% R2,R3 = 2200 R4 f R5 - 15GQ Capacitors: Cl = lOOnF C2 = 10|iF 25V radial Semiconductors: D1 = LED, green D2 - LED, red O = HT12D (Holtek) [Maplm Electronics) EC 2 - 7805 EC3JC4 = CNY17-2 Miscellaneous: ANTI - stiff wire, length approx. 15.5cm BT1 = 9V battery connection K1 = mini jack plug (2.5mm) with 3-wire cable MODI = RX2 433MHz: SRD receiver module (Rcdiometrix) ), Equivalents from LF R S | yavw, lprs.co.uk) S 1 = on/off switch PCB available from The PCBShop J. Lee PCB 'events page towards the back of ibi copper track layout may be found on the ' tssue , Web pointers HT12D: www.holtek.com/pdf/ consumer/2_l 2d.PDF HT12E: www.boltek,com/pdf/ co nsumer/2_ 1 2e.PDF TX2 & RX2: www 4 radiometrix.c 0 .uk/ products/productl .htm controlled) sequence if you modify the circuit as shown in the inset. Moving on to Figure 2 we see that the receiver is hardly more complex than the Transmitter. Here, the HT12D decoder (ICl) will decade the datastream received from the Radiometrix RX2 mod- ule. If the communication is faultless, LED D1 lights and outputs D3 and D9 on the HT12D assume the same digital level as their TX counterparts ADS and AD 9 on the HT12E. Via optocouplers IC4 and ICS and mini jack plug Kl, the camera is then instructed to perform the aperture measurement and then take the picture just as if you'd pressed the relevant but- ton on the camera. C#nsfr(f(h*@n The transmitter and receiver are built on miniature boards (Figure 3) so they can be fitted into compact plastic enclosures. As only regular-size com- ponents are used in this project, no problems are envisaged in the con- struction department. To ensure suffi- cient range for the remote control, the antennas must, of course, protrude from the cases and be kept well removed from metal objects like a tri- pod, In practice, you'll find that the usable range or the system will be about 100 m out of doors. Inside build- ings, the range will be much smaller. Double-action dick Optionally, the circuit may be modified as shown here if you want real double-click opera- tion from your camera [click #1 to perform various settings and dick #2 to release the shutter]. Although switches 51a and Sib are shown as coupled they are in fact actu- ated in sequence rather than simultaneously. A suggested switch of this type is distributed by SingatTon (www. 5 ingafron.com/switch/ switch/ktl.pdf), alternatively look at Alps products [www 3 .aIps-co.jp/ ]ndexpdf_5witche5-e.htm[). 104 el&klof eiedrenks- 7-S/2084 Visit o- websitfil THE ORIGINAL SURPLUS WONDERLAND! www.aistei.co.ujJ THIS MONTHS SELECTION FROM OUR VAST EVER CHANGING STOCKS GIANT 10" 7 SEGMENT DISPLA YSl IC’s -TRANSISTORS - DIODES Surplus always wanted for cash! A bux aitiiase us to hlrg fo yjfj toese GlAlVT 7 seofTErt dgtri at a new affonifoVi pneefl The 1C f 1 character sis gr.iss reari- itoffly at fcrg rissrecs and e r&t-lra a hesj tf acoSca- ions hcLrfng. score boartfa, rikptof cfocfcs, cctBV tara, event tim-ars etc. As the urvls are a staple sfibij j device and opotofej ram 12 V DC, arrffe EwuXhfog va furrh^, rde t % PfC ef FC nrsy be ieed to ccnrd srefo it nxnpte digs. Urtfo b^Lhj rta^i Zero Rants' merrtoiy wfidT: gesJ/ sripnes desgfiL For a n excellent EHY practical arilcls, see the May fasue of Everyday 5 PracSqal Becironks' magazine Ideal School I Gcifeoe con- E&ucton preset 5^|£ecf tigood RFEWxSbaconifetew^risSa rfi Less than 30?a of makers price E Only £29.9 S;b) or 4 / £99.00(0) Olterfr.V44 Ot&PK?6 THE AMAZING TELEBOX TV SOUND £ VIDEO TUNER CABLE COUPABBLE' Converts your colour monitor info a QUALITY COLOUR TVH The TELEBOX d an a=rac?iB ?Jfy rasaj msris powered irifc, nriaritG si eerarcs jaariy top*jgnca hosirf vdeo mentors or AV ee^ment when Fn"5 : _=c viTjD a ccrrpc&is sceo cr^AHT ipiTnenutpcsb^iia) Ducxi Vi r I &so pfcxj dreed/ mcs£ vtooo recorders, ajtbYng r&oepdon c TV cfomnefe not normal rec&Vabto cm most tetevkksn recerrera* (TELE' BOX Ken txjficn ccrtxfe on he tmt pane* akw rececccn cf 6 foiv Lneafcfe W ar' Ui-F cofar teuton crarrete. TELEOX JV3 octets \rzl- afy si tetortsen £squ£rEB$ Yr¥ end UHF i*dudaig the HYFERRAKD as Lr^i-d by meet cabie TV operates tesal for desktop computer vkfoo s^s- tHTs a Pf (pi±rd n For cjrplels crrrcafaiiy - eventr OBSOLETE - SHORT SUPPLY - BULK 10,000,000 items EX STOCK Ffrt MAJOR SAVINGS CALL or see web she vww.disteLcQ.uk COMPUTER MONITOR SPECIALS Legacy products High spec genuine multysync. CGA, EGA, VGA, SVGA h&sub=H FAiilEzm '.£’ SVGA lAi&syne o±xn rro*r :ns C 2B ±t pozn Lee and resoLEon cf 1024 x 753 A veri- er/ d. rpL"S abvhs cameakr? b a hoe3 of coTGJ'.ars Lndudra IBM PC’s in CQA, EGA, VGA & SVGA rrntai s&C, COft&SOOOfiB iTojudd Am>za ISIOy ARCHEMEDES APPLE. fes-^ures: ElEhed hnT^ -g and LOV/ RADLATkON JjtPH soeir.iiToa. Fuffly gn^dift^d, it EXCBXEfTT Site Lssd ccna'-xr, TTI 5 S-.vivp-r Ease £4 75 VGAcsbfefcfIBAI PC bdufed. <^v „ r. . „ Ofderas Only £1 29(E) CG73 External c^b'-es fiy other types cf computar^ arra7isb5e - CALL m-n-unr went axnd - s\ rarsf 4 v*m sloq arp^ar snd bw b.el hi R ridio are ptvided as s^rcard. Br^id n?iV - z jJy OLarartaei TELEBOX ST fc- conpesha video input typa wpnlten EJE.SS TELtBOX STL £5 ST tul rttad Wi^di hisgral spea^sr TELEBOX MB WuStband VHF/UHRCabfe/Hypsit^d timer -cr c.araais PAL verskms state 5.5 c: 6 m Hz sound spe-^-isJcn "Per cad ‘5 ' hypeffcand s : g^?j receptk^ Te'e^ox 1 X3 dnld becc"- nactad to a cab’s type service. Shipping cn all Te'ebcx's, cede (3) Generic LOW COST SVGA Monitors \ Ve choose the maks. ,vhich includes Compaq, Mitsubushl IBM, etc. Supplied ready to run with ail cables r Standard RIB 90 day guwaniee. 14 = 1 5 n ir £59.00 £69.00 £79.00 order TD84 order T621 order TJ 66 Su nn 'Jed in good used condition. Shipping code (D) E3S-.SD £53.95 Stats of the art PAL (UK s^so) UHF TV tuner module with com posits IV pp video & NEC AM hi f i:a;eo K.rd ’■fSS. Hltro electro nfes aTJ cn one $nia'1 FC3 onty 73 j. . COST BRAND BY > Order as l, f Y00. Only €39,95 code fBJ See rtiv-iv. rtf£f eLco, l L'da ta_m yOCl h Cm far picture *■ full details HARD DISK DRIVES 2V 2 n - 14" TOSHIBA V-UtX>2MAV I.IGd Eactc^l2_5 nun Hi New £59.95 A - h TOSHIBA VK._:r 5VA. ^ 7 i:;:: E I New £105.00 274’ TOSHIBA L!KB4G5if4AV 5. iGb laptop (T2.7 mm H) New £93.00 I V iOSHIBA WK1S14GAV IB G& laptop (12 mm H} jVaw£14935 2 T 4" to 3Y€ Idi for Ft's, qompteta wth coitku: ^ £15.95 3V COMPAQ 31 37K-32i (IBM) 9 gb ULT/3CSJ3 .Vew £1^9.00 £59S5 £59.95 £59.00 hu-t £49.00 £49.95 £69.95 £59.95 £99,00 £195.00 £99.00 £195.00 £545,00 3’V FUJI FK-3C3-Z5 20r=b MFM Or RFE 3’ i T CONNER CP3C24 20 mb IDE W for eoulv.) RFE 3^' CONNER CP3044 40 mb I0E L/F or equd ) R-- f QUANTUM 40 S Prodrive 42m& SCSI LF. Nsrr, fir S 1 /-' MINISCRJBE 3425 EGfifomyU/Ffaroquiv,) RF£ □ ■ V SEAGATE ST-235 R 30 mb RLL L r RsTum =’ '■ coc 94205-5; 40mb HR M FM br RFE tasted HP 97545 £50 V.b SCSI RFE jested 5'// HP C3010 2 Gbjie SCSI diffcre/iffa/ RFE testsd c NEC D2246 55 !.!□ 3MD Int&rfsce. New S’ FUJFTSU .'J2322K ’SOVb SVD LF RFE iest°d S' FUJITSU W23 92K 2 Gb S '. r D LT RFE tc-^ad Many other floppy l H tiitves* IDE. SCSI . ESDI etc from stock, s^e wc-hsiiE: for full stock list Shipping on all drives is cod 9 fCi Only £99.00 Dj TEST EQUIPMENT & SPECIAL INTEREST ITEMS “ariS 1 " MJTSUBUSHl FA3445ETKL 14 + Jnd ipecSVGA manges FARRELL 0-60V DC @ 50 Amp^ bench PtFwaf Supofies FARNELL AP30S0 0-30V DC © 80 Amps, ber>ch SufDoy KINGSHILL C24 0-E \ C-c: 4 IBM 0230 i >pa 1, s clten ring bass uriii t&rver Wayne Kerr RA200 Ai*j : >a tradufincy Rj&ponse snar.^er INFO DEC 1U. 24 port RJ45 n&wit patet^janete. #TH93 3COM 16670 12 Peri Etriemet hub ^ RJ45 dorrazLr— =_D07 3CO.'ii 16671 24 Fori ElrismaS hub - Rj-o eorTSdt ers 3COM 16700 8 Port Ethernet hub *■ RJ45 ccmedors NEW IBM 53F5501 Token FLng ICS 20 port iobe moeiiSa.5 IBM MAU Tckan ring d'striixriktfi fsnd &225-23-5CE:N AIJil 501 Lmr dsiorircn Dsdlaior 9Ks to 330Krir IEEE LO A LLG O N 0 160-1 1 £C5- 1 EcO M Hz Kjtrid peww ctxr b s Trend OS A 274 Das: Analyser ,', : 3 G703-12V ■ £4 L = ^itsfconi 631 0 Pfiogra.Ti7zbie 2 to 22 GHz sweep generator Marconi 2022C IDkHz-lGHz RF sonsl genarator H P 1 6 3 0 B Log c Analyser HP 3761 A Psttam generate-' b HP37B2A£irorDe’eetcr H P 662 1 A DuaJ Prc^riinvT ate GPiB PSU 0-7 V IK) wa ba HP6264 Rack moimt vartsbfo 0-20V @ 2GA rnsisrer; FSU HPi4121 A DC Eo 22 GHz four chavseJ sc; HP3130A opt 020 30Q ’. r Rz pulse ser-erafor, GPiB etc HP AT Au 5 psn HPGL rigid apeea dhum p’cia.'S - fju-m HP DRAFT 'TASTER 1 S pen high spadd plotter EG+G BtookdE-a) 9503 SC Ptectsicn Ioc^e in smp KeUhley 590 CV cepsdtor / vertigo a~ = yser Fa cal ECR4Q duel 40 channel vdeo neconter system Flsksrs 4 5 KVA 3 pfi C.n Lia UPS - Ne.v baSaries Em e rs on AP 1 30 2.SKVA i -d uss to 3 s pe-z . U P 3 Mann Taliy MT645 H’Sb speed I'napc-Ez- Inte] SBC 466/1 33SE J.V - bus 456 system. aMb Ram £245 £995 £1650 £3950 £POA £760 £2500 £49 £69 £39 £39 £POA £45 £550 £250 £POA £4500 £1550 £3750 £PQA £1600 £475 £POA £7900 £550 £750 £1600 £POA £3750 £4500 £1499 £2200 £945 HFSO10A C-2C0VCC ^ ' .< A -is ter zn power s-pp'/ £1950 In I el S B C 4 66J 12 5 C 0 a ; ; ■ " : ed l! l3sj 3 [7,^ S A j H ew £1 1 SO N i kon HFX-1 1 (Eph rpric-l . s x&jsitb corrircl it £ 1 450 PHILIPS FM551B pra. .TV signal QaTtorafor £1250 Motorola; VME Bus Beards & Com por a fits List SAE CAL L £ P O A £550 £1950 £1250 £2950 £500 £3500 £3250 £495 Trio CHS vdc Inpar, mefored 30 std bench PSU. Hew Fujitsu M3041R £00 L D M rich speed ba'vl printer Fujitsu M 304 ID £00 LPM p-nntar v/ v h iveEwcri: interface Siemens K440D £4<: to l4GMb demux ar^Jj^r Perkin Elmer 299 B Infrared specEncphatordeter Perkin Elmer £97 Irr^Bfod i spec tm&riatomtfSr VG Electronics 1035 TELETEXT Dscodhg Mam'n JJslBf Light Band 60 output high spec 2u rack mount Vtoeo VDA's Sekonlc 3D 150H 18 channel e£gila] Hybrid chart recorder £1995 E £K 2633 ML CfwNm pro amp £3 DO TaylcrHobson is Ty&u if ampVer f raajrdc r £750 ADC 3S2 OD Carbon c Axds gas cfo foefor / men ic* £1 4 50 BBC AM20r3 PPM Meier (Errest Turner} + drive etecimn : £s £75 AN RIT 5 U 9654 A Op-Lcsl DC-ZdG'o rr-zn Her £ 56 50 AHRfTSU ML93A cpUcaJ pow&r mefor £9 go Aiil R TFSlJ r re cf be criaragforisb^ test sel £ PC A R&S FTDZ Dual sound unit £660 R&S SBUF-El Vlsfori motMalOr £775 WJLTR0N 6630 B 12.4 / 20GKz RF straep genaatar £3750 TEK 2445 ISO h'Hz 4 tese osci ioscope £1250 TEK 2465 2 CO V ” 300 h'Hz tiz3cscope rat* mount £1955 £ 1= K TDS350 4C0Mh2 realLme + cfek drive, EFT etc £29 00 iEK IDS 52 4 A i . _Vnz d q~a' rsaxTS - cc';,' c EC ir' e;z £5100 H P35£ 5 A Opt 907 20Hz to 40 Mhz spectrum analyser £5950 PHILIPS PW1 730/1 D 60KVXRAYg^no^for i sccassaries £PDA VAR1ACS - Lange range fram etodc - call or ss a our website C LAU DE LYONS 1 2A 240V Elfsito ph £S3 auto. vefL nss £325 C LAU D E LYON S 1 03A 24 W 1 5V 3 phase auto, veil r^s £29 0 0 19* RA CK CABINETS Europe’s Largest Stocks of quality rack cabinets, y enclosures and accessories. Over 1000 Racks from stock This month's special 33 / 42 / 47 U - High Quality All steel Rack Cabinets U 3 rf* e by Eurocrat! Enclosums _:z 10 highest pos- sible spec. r az:<. Matures all steel const mclicn st/i roTzvez e icE ':z - i z~.-z zzz- zz-m -x-r‘. E~ t z c=zhi dec: s are hinged for easy access 5‘2i ^.ck^la Vi \ to fr.-a secure 5 lever barrel locks "2 front riM-r is consbuctad of d-oub-s nailed r 1 =leaJ am a 'designer Btyle' smoksl aoySp fmrri panel ic snatla status indicators to ha sssn through the panel, yet remain uncblruSTve. internally trie rack features fully slotted rad- ii rose 'i"&fLcs! ibdng members to taka tha rieavl' est of 19 a rack equipmenL Tne t-rt-h move tie vadksa! Rxing struts (extras sva sbto) sra p^ pjndwd for Standard r c&gs rads'. A mains efis* trihutton panel sniemaly mowtetl to trie bottixn vest, provides 8 x TEC 3 p n Euro sockets and 1 * 13 amp 3 p i s wi tched utility s ocfc eL O^-eraJ «nia- v Son is provided by Mly touvared back rice- a- z :z.z z- ; -r.^j :: . i-icLcft Vi to top s - 1 ec a bCiTes, Tre to 3 z-iroJ mey bs removed for fittirc c f integral tans to the sub ptoto etc. Olher foaturas ncfiica. ,:.dfid castors arid foor (av&'er$ T punched utOy a: dvi 1 ?’ rear for bsbfo f ~ e-r z' eto " Supplied in eic^l’anl sbghlly used condlb&n ■Afth keys. Colour Royal bfue, some t sv , a32bte - CALL - Gan be supp&ed en majray other confo*u,f3Lz^5. VIDEO MONITORS PHILIPS HCS35 (same style as GMi6&33J atoacLve.y sr/.tJ ccfour moiritor wttn boih RGB and standard composite 15.625 Khi vidao Inputs vfo SCART sodwl aixJ sep&rato phono Jacks, iztozra! ®jdto power amp and spsakar to=r all auefto vssuaJ ua&s WEI connect c -act to Amiga and Atari BBC ccmputore. kfeal for a I video monitoring / sflcurity app-Vcaz-cns d tract connection to most colour cameras. High quality VirJi many features such 3h frmrt cor ce sled flap contnjfs, VCR ehneebon tKitton elc. Good u=sd mocTmti - fidlir tested -guaranteed Onto fQQ nn Dkneraicris: WI 4" x Ht2%‘ x 1534” D. Wnly tya.LU D? PHILIPS HCS31 Lfoa compad B 1 gczpt video man. to-r v,.to sfon- dard composifs 15.626 Khi video input via SCART socket kfoal for ai modanmg I seciirfty appfta&wis. T&gh efua&ty. ei-equ^proent n% tested i guaranteed foosstote minor screen bums), in sHrac- &rs square tfoqk cer.z ce=e measuring WltT x HttT x 13J$* D. 240 VAC TOtos pmaed. Only £79.00 (D) INDUSTRIAL COMPUTERS tciy &-.zuzz\jzi'i '-dustria140 6foz 355 FCsys^m ireas.r>3 ony (rrm ■ 756 w X E z h X Z72 d foes 1 fo-r ried'Csted controf sppT- csdojis nifwatg DOS. Linux or even WitMknvs I Steel con- la ns B5 to 2S5 V AC 50 / B?0 hz 70 Watt PSU, a 3 afot ISA passh’e tackptone and a Rodty 3 IB (PC 104) standa.Tl, stog’s bcato conv iXttef v.tto 3 J.fflyfa fiOU VOLATILE sc£-d stole Crak Cn Crip' RMIUStC System campraes: Rocky 31B fFCIJM) SBC ISA card Vrzth 40Mriz AU 336SX CPU, 72 pin 5EMM skri vrh 16 SIMM, AMI BIOS, battery haefcedup real tkne crock. 2x9 pn D 16550 serial poite. EPP/tCP pAntor port, mn DIN keyboard con- nector, loppy peri. CE pod for ham dnvss ld to 528 MByte cs CBdirf. vi-storKlog timer and FCL-104 tes sre>:& t Tr= B }ABy;s so 1 5teto fo;§k cn a crip" has its okt, E ! -.DB . ar . d can be fd s> ed formatted & booted. Supplied BRATiD NEW fofly tested and guar- zrr~h. For hi 1 data sea feahifEd Item cn ivebsTe. Ordar eE QG36 1 00's of applications inci fi raws' I. rouTara. robotics e tc 33U Order as BC44 Extemsf cfimenslDns iran=lS25M x 635D x S05 w, (64’ H x 25" Dx23fo’V; . Only £245 42U Order as DT2Q Externa! dimensions mm=20l9hl x 6350 x 603 W. (79.5* axis' D x 23- A Vi Only £345 47U Order ss RV36 External dtnien=iC-E ■ =11:: - * zli I X 603 Vi. (3£‘ H * 25" D x 23 1 V Only £410 Call for shipping quotation UrafcKJCtsdty s miracle of modom technctogy ; eur speefo! biiylrig p^wer 3 A quality preduct fea- turing a foil/ cased COLOUR CCD camera it i give away price I Una features fid eutoEoM sensing for uE£ ,n IdW "fl* 11 & high light applications- A ID mm Seed focus wide angle lens gives excellent focus and resolution from ctose up to Jong range. Trig composite video output w’ earned to any ccrdcs te man tor or T 1 , (via SCAR! socket) abrf most video recorders. Uflti runs From 12V DC so ■deal for security & porta hie applica- tions where mains pewer ret ava tocto Overall oEmensfons £3 mm wide x 117 deep x 43 high. SupcSs-j BRAND NEW A Fully grjarentoed with .:= r f fatp, IQCns ct ep-p :a- n " 5 ' " bforitog Seorrfly, Home Vkfon. Web TV. W& Cams etc, ete. Order ^ LK33 ONL Y £79X0 or 2 for £149.00 w SOFTWARE SPECIALS NT4 Workstation, comptsle v,ith service pack 3 snd licence - OEM packaged, ONLY £89.00 = ENCARTA 95 - CDROM, Not tha latest - but at this price I £7.95 DD3 5.0 un 3¥* M dsks wish ccTd*a boc>s c,Vi QBse z . Windows for Workgroups 3.11+ Dos 6.22 on 3 5" disks Windows 95 CD ROM Only - No Licence - WordPerfect 6 for DOS suppGed on 3^’ disks manual shipping charges for software is code S £14.95 £55.00 £19,95 £24.95 SOLID STATE LASERS Visfete red, B70nm r c.o: e ese-e~bfo. Lire! runs frem □ V C C e : spprex 50 rrA. Origrai !y made for conmuous use fci n ;: . zl t zz- :,>se ecsr.'jers. top \==z r [; r z-j-ted sn a nmoyafale soSd akirrfidufn t Prik. which funedens ss a hsatsirk end rigid Dp.cs? rr*teT;t Dims e* i'oest are 50wx50dx15 h fTAi. fote^.'ni teatoni3 tocf jrie c.e" ten> etc. Suppeed comptofe with date e!~ eel Order SSTD91 ONLY £24.95 {a. DC POWER SUPPLIES Virtually every type of power supply you can fmag/ne.Over TO, 000 Power Supplies Ex Stock - Call or see our web site. RELAYS - 200,000 FROM STOCK Save Tffffo ty chcc; nm >p u.r r.sxt .~foy ffof?- oir Massfve Slocks Stele, Printed CircuS Mounting etc- . CALL or see our web sri-e fty obsolete www.disf5lrCO.uk for more tetonriaObnL Matty vbsoSele types from stDck Save ££££fo « «-« i ■ » * • * • ■ ft i l • « «- i ■ * * * * -ft l -l ft • * i ■ i ■ * ■ fl> ■ m ■ * rn t « a * * ft • in a * *- t ft a * * ■ a ELECTRONICS- ALL MAIL TO Dept EK, 29 t 35 Osborne Rd Thornton Heath Surrey CR7 8 PD, UK Open Mon - Fri 9,00 - 5:30 18 Million Items On Line Now 1 Secure Ordering. Pictures , Information v&isjgn www.distei.co.uk email - admin^disieLcoMk £-tC. x S-Ic ALL ^ ENQUIRIES 0208 653 3333 FAX 0208 653 8888 “■ J 7 ! 7 - : riuf^i.'ers arid 17.&.* VA‘. c TOTAL erdur emeu” 'itojtTLrr. orz-z - ± for -o= i<'z-z~-. n-:- fo.— j,:-. - — r A 1=4 ■r i'.t : 1 ] t 4 26 1 ti v ; LTICSE -1-z-z^l --zjz=zrter<2 izr 9j At oai Ffecountefof vrikxiEi Top CASH friaes psd fer a, ,, cr> 3 fsa*n te tsse cses. AJ hgr^s tessved tt chsno g proes/ seedfcstors wtocii prior no&e. Odara tostefo ■ g i A! &B05TSTBS to- adrawtoiez I E^scfey Serzrt-zs^TZ E&OE_ 7-3/2004 - drMor ehcTronits 105 review copy MAX6954 Display Driver A driver for 14/16 segoners! displays A. Kohler LED displays offer a number of advan- tages over other display technologies: they are reliable, robust, easily read- able from a wide viewing angle and are relatively simple to drive. Along with the more usual 7-segment and dot matrix types come the 14/16 segment displays. This article takes a closer look at a versatile driver 1C from Maxim. 14/ 16 -Segment displays are arranged like T-segment types but with additional diagonals and centre vertical segments. These extra seg- ments allow many more char- acters [including special char- acters) to be displayed but the extra segments demand a more complex driver circuit. There is any number of 7-seg- ment drivers on the market but for 14/16 displays the choice is relatively small. The MAX 6954 and MAX 6955 from Maxim axe designed to meet this need and can also drive 7- segment displays and discrete LED indicators. SPI or PC? The function of both the MAX6954 and MAXG955 are similar. The only difference between the two devices is the interface standard used to connect the device to the microcontroller. The MAX6954 uses an SPI (serial program- ming Interface) while the MAX6955 uses an I2C inter- face. Both ICs are highly inte- grated and this short article only touches on some of the features of the chip, for a more detailed description it is necessary to refer to the (38 page) data sheet [1]. Figure 1 shows the inter- nal block diagram of the MAX6954 and the complete circuit diagram for this appli- cation. The supply voltage should lie between 2.7 V and 5.5 V (it can withstand 6 V for a short period only}. The sup- ply current consumption is 35 mA maximum and typi- cally 22 mA. Current to the segments is limited by an Internal programmable con- stant current source. The character driver can be pro- grammed so that the inten- sity of the entire eight display characters is denned together (globally) or the intensity of each character is individually programmed. The intensity Is defined by the value of the lower four bits written to the intensity register. This allows 16 steps in the display bright- ness so with a segment drive source current of typically 40 mA, each step represents a 2.5 mA reduction in the drive current. The internal clock fre- quency is controlled by an external capacitor (typically 22 pF) connected between the OSGIN input pin and ground. All the internal processes in the LED con- troller including the LED blink frequency are referenced to this oscillator clock. The clock output from OSCOUT (pin 37) can be used to synchronise external circuitry to this driver clock. The LED drive circuitry has 19 outputs GO to 018 and employs a number of different multiplexing techniques to reduce wiring complexity. Firstly the drive Is time multi- plexed so that at one point in the cycle the lower eight out- puts are used to sink current from the common cathode connection of the LED while at other times the current direction is reversed and rhe output acts as a current source to drive an individual 106 Ekkloi tlcdrcnin-Z-B, 2 ll4 Figure L Circuit diagram showing infernal block diagram cf the 40- pin DIL version. 7-Sagmant Display 14-Sagment Display IG-Segment Display 030335- 1Z Figure 2, 7 r i 4 and 16 Segment LED disc, ays segment on the display. The display brightness is con- trolled by using pulse width modulation. A built in current source generator limits the maximum LED current and a single resistor connected between pin 19 and ground defines the value of this cur- rent. The manufacturer sug- gests a resistor value of 56 kO, Each display position has two registers associated with it (called plane 0 and plane 1). One of these registers con- tains the actual display infor- mation whilst the other regis- ter is a background 1 register. This allows new information to be loaded to the back- ground register and then quickly swapped with the dis- play register using just a sin- gle command. An internal decoder and character gener- ator allows 104 characters from the ASCII character set (including some special char- acters) to be displayed, The chip also contains a decoder tor use with seven-segment LEDs. Some of the outputs can also used to scan up to 32 input switches or a key- board, The chip also performs built-in switch debouncing, A part of this keyboard inter- face can also be used as a general-purpose I/O port. The internal Registers The display driver has a com- plicated internal structure including a large number of internal configuration regis- ters to control the chip and all its functions. The values that need to be written to these registers and their interde- pendence on the contents of other registers make the pro- gramming process a little complicated. Some of the important reg- isters used in our application are described below but for a fuller appreciation of the capabilities of this chip it is necessary to spend a little time studying the data sheet. No-op (GQH) This allows data to be sent to just one driver chip when, say, four are daisy chained together. The No-op com- mand is sent to the other three devices. Decode-Mode (01H) This register determines whether the ASCII decoder will be used to generate the displayed character or the LED segments will be indi- vidually driven. The type of LED used (defined in register OCH) will influence the decoded output. Global Intensity (02H) If the global bit is set in QC register the entire display can be dimmed (16 levels). Scan Limit (03H) Sets the number of segments used for the display LEDs, Also used to limit the number of keys scanned if input keys are used. Configuration (04H) This register controls the con- figuration of the chip. For nor- mal operation Bit 0 must be set to a l V otherwise the chip enters its shutdown mode. Bit 1 is unused. Bit 2 controls the blink rare. If the bit is set the blink rate will be approxi- mately 2 Hz otherwise it will around 1 Hz (assuming a 4 MHz clock). Bit 3 inhibits (0) or enables (1) display blink- ing. The blinking can be used to Sash the display on and off or alternately to display two different characters. Bit 4 resets the blink timer. This is useful in a system with multi- ple display drivers: resetting this bit on all the drivers in quick succession will ensure that blinking of all the dis- plays will be synchronised. Bit 5 clears ail the display data stored in both display planes. Bit 6 is used to define the type of display intensity control. A O’ in this position means that the intensity of the whole display will he set by the value stored in register 02. A : r allows each dis- played character to have an intensity defined by the 4-bit values stored in registers at address 10H to 17H. Bit 7 is read only and indicates whether the display is cur- rently on or off in the blink cycle. GPIO Data (05H) This register is used to output 7-3/2004 - ehtlDf e'f-cfrcritt 107 review copy Connection's] Function 17, 18 ,20 19 1, 2, 38 ,39, 40 Freely programmable l/O-Poris, config- urable as inputs ar as open-drain out- puls. Also used by keyboard Interface. 21, 23 ,24 3 CS connection of SPI. 4 Allows multiple AAAX6954 r s to be daisy- chained. Also acts as o data output if internal register values are to be read back. 22 5 Clock Input for SPI. 6 Data input for SPL Copy receive regis- ter numbers and values to this pin. 36 7-1 5,26-35 Outputs for LED display These pins work in digit as well as segment driv- ers. Non-actlvated drivers go into hi- 37 impedance state. 16, 25 Ground connections. Connected to resistor that determines the maximum output current of the driv- ers. Positive supply voltage connections. Good decoupling required because the LED drivers ore capable of very fast switching. Connect to a capacitor to determine speed [frequency) of all internal opera- tions. Also accepts external clock. Supplies blink rate for external synchro- nisation purposes. Open-drain output. Supplies buffered Infernal oscillator clock signal to synchronise other MAX6954s. Not connected. data on the General Purpose I/O pins. Input data can be read from address 35H. Port Configuration (G6H) Selects how the five port pins outputs are used in the circuit. Display Test (07H) A 1 in this register will light all the LED segments includ- ing the decimal point. Normal operation continues when the register Is 0. Key Mask/Key Deb ounce (OSH to OBH) These four registers are used if a keypad is connected, it allows some selected (masked) keys to generate an interrupt when the key press has been de bounced. Digit Type/Key Pressed (OCH) The type of display can be written to this register. The register Is divided into 4 'slots' of 2 bits, these are used to define the display type. Maxim have an exam- ple configuration program available to download from their website. Intensity (10H to 17H) This changes the brightness of each individual character or of all characters together depending on the global bit setting in the configuration register (OCH). Digit Plane 0 (20H to 2FH) These 16 registers store the d i spl aye d ch ar act e rs . The interpretation of these char- acters is dependant on the number of segments used for the display LED used (digit type in register OCH). For 14 or 16 segment displays the seven LSBs indicate the ASCII value of the display character. The MSB controls the decimal point. In 7-seg- ment mode with decoding bits DO to D3 are decoded via the ASCII lookup table while D7 controls the decimal point. If the decode mode is not selected each bit will directly control an LED. These regis- ters act as the 'foreground' stores and are displayed dur- ing the first b link phase (plane PO). Digit Plane 1 (40H to 4FH) Identical to Digit Plane 0 but the contents are displayed in the second blink phase (back- ground register). Digit Plane 0/1 (60H to 6FH) Data written to these address ranges will write to both PO (20H to 2FH) and PI (40H to 4FH) at the same time. These are not new registers but a command to write to both the PO and PI register stores together. Key Debounced/Pressed (88H to 8FH) A T in any position in this register indicates that a key press was detected in this position during the last key scan routine. It can determine if the key was pressed momentarily or if the key was held down. The internal ASCII character generator does not contain any lower-case characters (they cannot be represented on the displays) and will always output up per- case characters irrespective of whether the upper case or lower case ASCII code is used. Tire special characters axe displayed using codes in the range of OBH to 2FH. A simple application The circuit diagram of a sim- ple application example (Fig- ure 1} s ho tvs how lew exter- nal components are neces- sary to implement a display The most difficult part of cir- cuit construction is the wiring between the driver circuit and the LEDs. Connections to the LEDs are not detailed on the circuit diagram because pin outs are gener- ally not consistent between different types of LED from different manufacturers. Toe data sheet from Maxim details these interconnec- tions (OO to 018) to various display devices including a discrete LED matrix and 7 to 16 segment displays. The SPI to the driver chip uses a minimum of three sig- nal wires (together with earth of course). An extra wire can be fitted (DOUT phi 4) if It is necessary to read back information from the chip registers. Included with the development board from Maxim is a complete software package for pro- gram development, the author chose QBASIC. This software allows simple access to the PC parallel printer port running in DOS. The source files axe all avail- able free to download from the Elekior Electronics web- site, look for file number 030335-11 under month of publication. The first program employs some or the basic features of the MAX6954. Eight values are input and displayed on the LEDs. Tne 108 dehor elstfrcnlcs- 6/2004 ECS CLK V 3C DOSXZ ;D15| ; Jpu DDUT SPI data transfer The input signal thresholds of the SPI-lnterface ore fixed at 0.6 V and 1.8 V, this enables the device to be interfaced directly to both 3 V-CMOS and 5 V-TTi. log Ic Families, ihe input current to the inter- face is approximately 1 mA. Signal reflections on the SPI interface can sometimes be a problem (particularly at 5 V) so it is recom- mended to terminate the DIN, C5 and CLK signals with either a 47 KQ or a 33 pp capacitor to ground. To transfer data a the CS input is pulled low to indicate the start oF data transmission, the most signisicani bit or the data stream is now presented to the DIN pin and this bit is clocked into an internal shift register on the ri mg edge of the dock. This process repeats until the last bit of ihe data stream is received, C5 now goes high before the dock signal goes low and this will stare the received message into an internal latch. Each message is 16 bits long, the most signifi- cant eight bits defines both the 7-bit address of the internal register and the read/wrrte bit while the next eight bits are fhe data to be written into that register. The chip can be docked at 8 MHz but MAXIM recommend a more conservative 4 MHz. P-tj' :u= [Jifj*— issxxn : : : :Tr - ■: f!S- program consists of an ini- tialisation routine, display data input and a central data transfer routine. The second program implements a running-text display with a maximum message length of BO characters. The initial- isation procedure is identi- cal to the first program. Both of the programs are a little basic (ouch) but should help to clarify the steps neces- sary to configure the inter- nal registers. See your design in print! Elektor Electronics (Publishing) are looking for Freelance Technical Authors/ Designers If you have # an innovative or otherwise original design you would like to see in print in Europe's largest magazine on practical electronics # above average skills in designing electronic circuits # experience in writing electronics-related software # basic ski/is in complementing your design with an explanatory text # a PC, email and /nfernef access for efficient communication v/ith our in-house design staff then do not hesitate to contact us for exciting opportunities in getting your designs published on a regular basis . Elektor Electronics fC Walraven, Head of Design Dept, BO. Box 75, NL-619Q-AB Beek, The AJefber/ands, Fox* (+31) 46 4370161 Email; k»walraven@segmenf*nl 6/ Ml - el deter rkdronits 109 review copy t- n-channel MOSFETs 1C 1 +1.8... 5,5V + BAIT. X 10 ?.CT \3 1 DOU1 Uil N. FJi2 Fi * i CC2 MAX 4684 p-channs '2 05FE s MAX 4684 EUB : : vj* 47ft -CD : : :::e -- -"-.^-14 Figure 1 . JFe switched consist of two MOSFEh (P- and N-channel). Figure 2 „ Current paths with correctly (a) and Battery Polarity Protection Look, n© diodes, n© relays! K,p Thiesler With battery-operated equipment there's always the risk of batteries being inserted the wrong way around. Although a diode or a bridge rectifier can be used to solve the prob- lem, the down side is considerable energy loss through dissipation of the forward biased device(s). An energy-wise alternative is now avai table in the form of an integrated circuit containing two analogue change-over switches. For sure, switching devices using CMOS technology have been around, for a long time, but it was not until the requirements of mobile phones and portable test equipment forced chip designers to make substantial improvements to the venera- ble 4000 series of CMOS logic ICs. The 'retrofit 1 circuit described in this short article is based on the MAX4684 (from Maxim) and is capable of automatically swapping (or, if you like, correcting) the polarity of a battery set. The circuit can work from a volt- age as low as 1.8 V which may be supplied by two total- ly exhausted dry batteries, NiCd or NiMH cells in series. The internal architecture of the chip as pictured in Figure 1 shows two single- pole changeover switches realised using F-channel and N-channel MGSFETh. These devices are marked by a extremely low l ori resistance, while acting very fast and being capable of carrying and switching high currents. Function ally, the two switch- es mimic a bridge rectifier fed with a direct voltage. The MAX4684 not only pro- tects the equipment being powered, but also arranges for an incorrectly polarized battery voltage to be swapped very quickly. The operation of the IC with the correct or the wrong supply polarity is illustrated in Figure 2. For clarity's sake, the current paths are high- lighted. With no battery (or battery pack) connected, the two switches are in the 'inac- tive' position, so that the COM pins are effectively con- nected to NC (normally closed)* Figure 2 a shows the switch positions when he right polarity is applied: con- trol input INI (upper switch) is tied to the negative battery terminal and leaves the switch in its inactive position. The lower switch, however, toggles because IN 2 is con- 1 10 elcUor dedionks - 7-S ‘2004 MAX 4684 EUB n .incorrectly (b) polarized battery. Figure 3\ Suggested FLB layout with generous copper areas. netted to the positive battery terminal. The switch, now connects COM2 with NO (nor- mally open), taking the bat- ten/ negative terminal to the 0 V output. The other drawing shows the effects of the battery ter- minals being swapped over. The upper switch changes state, while the lower switch remains in the inactive state. Internal protection diodes at all inputs and outputs of the chip guarantee that the MAX4654 will always start properly ihe instant the bat- teries are inserted into the equipment. Before the rele- vant switch changes over, both outputs CQM1 and COM2 (and with them, -fV and ground) are short-circuit- ed. The FIAX4684 has a maxi- mum switching time of 60 ns. Within tlrat period, the inter- nal protection diodes provide the supply voltage for the IC itself, independent of the bat- tery polarity. The internal MQSFEIk are driven and the switch toggles only when the relevant control input is com nectsd to the positive termi- nal of a battery supplying at least 1.4 V ! Only then does the correctly polarized battery voltage appear at the chip outputs. Tire internal switching MGSFFTs are controlled using a certain 4 dead time' during which all switch contacts are opened. This so-called break- before-make mode of at least 2 ns prevents a short-circuit on the battery in case the out- put capacitor is still charged, supplying die IC during a bat- tery change. As opposed to conducting diodes with their virtually constant voltage drop, the voltage across the MOSFET switches is dependent on the current being passed. At just 0.3 Q. the R DSon specification at Vt = 1.8 V is remarkably low. At 5 V, the switch resist- ance drops to 0.2 Q, The two switches and the protection diodes are capable of passing currents up to ±300 mA. The above features make he MAX4684 an excellent choice for lots or equipment running off AA or AAA. cells, including portable audio equipment, mobile test and measurement apparatus and cordless tele- phones. Table 1 shows the maximum voltage drop across the two switches as compared with silicon and Schottky diodes in a bridge rectifier configura- tion. The datasheet of the MAX4684 may be found at hi t o :/.'d dfs er v. m axini- ic.com. en J d S /MAX46 8 4- A X4fi B 5 . n ri f The IC is supplied in a minia- ture 10-pin pMAX case (3 x 5 mm). For space critical applications, the MAX4684 also comes in an even smaller 4 UG5P P case which measures just 1.5 x 2 mm). Figure 3 shows a suggested PCB lay- out for the MAX case. Finally, it should be noted that the MAX4684 can not be used to rectify alternating voltages. i03E3S-lj Comparison between diodes and analogue switches (at 100 mA and 2.4 Vcc) Component Voltage drop Dissipation P t0E 4 Si diodes 2 x 0.65 V = 1 JO V 130 raW 4 Schottky diodes 2 x 0.40 V = 0.80 V 80 mW MAX4684 2 x 0.02 V = 0.04 V 4 mW 2 HAX4624 2 x 0.08 V = 0.16 Y 1 6 m W 2ABGSI9 2 x 0.0S V = OJG V 10 mW 7-S/2QG4 - dck! of efertrccks 111 Eddie Brador Working with ActiveX ActiveX component for the USB analogue converter IS- -• :■ = r* - ’ - '■ j [ ^ fr - - jt.rT - 'rr-- r :— i - ? f fcrD5crrC0[\1 P jutn : Li ActiveX Cofitrcls fttfMBCg carircSs Mt *n£r>3 Ir* rrJrry t| 73 l gf lftit 14* ^C*t W t nr& iy t* tp jrtwiie, COM sarsparertu ta jf* t±* T*rte* cf ^ - izr-p-3 ?iurc*f e-fift'iifc-.fti £ i dB i^rf 13 ffeTmf w ^rtz^U^r. zf .. ..v„j mt t W0 ■ - 33^^ vidVllTK 5. r c5r*tf: i"3 tek ifi V-^i~ t4)ltufur4f rd* ^iUrn sucft ' TmC^TTj flrC pppr tB *fcw 1233*3 *2 f^ET-fTp' t~t= 3.“- on fif HTlds tefcr? at-fnij f-T "‘7 "7 "- tZ " s K:/ : 7"l7- J__: E= * i Hrq sf credia HV'tfags it -S- 77 -j = ■ ?■; VET'natsges v 3fi>5 pisSGitm;- M^tTT g»Ti— , ft titfj-ici :::"■: ; i „s 41--P 1 — .=.- ~z~—~s-~- jpjzn, -cn- .ip 7- |,T-"< Irip tPrlittLiii. 1 ' McrdzflJ fiwrirftpfiL® lT3r$, thf! fp— . r Oi 'frs ;:-. t - =■* - = u . e* _. ;• .i 7 7-. Vi 11 .:-r. _ -u*r*»s ~< - . n ft Sirnctiuefrp’ta^j boz>l.i 3-: ip’ri-t'T *13 TELi7r£f Tgp ? Pi^iij FW- ■>ct± **Srl - i '. ni - 1 ii-” 1 '. p~ 1 r~"t ±~ jt : . - 1 — j z_ r , ftp*. . e < r*4:id ! he USB analogue converter published in the November 2003 issue is a neat circuit for simple measurement and test purposes. The ActiveX component described here can be used to control this circuit from a high level language. oMany Elektor Electronics readers constructed this simple circuit, which makes it possible to easily measure analogue voltages and switch digital outputs via USD. Unfortunately, the associated Window s program had a limited functionality and it wasn't always stable The author was inundated with questions about the program, which led to the development of a utility that allows a user of the USB analogue converter to write a control program for driving any peripheral. The ActiveX component described here can read in analogue values and drive the digital outputs. This type of control makes it possible to program die circuit from within an> high level language, such as Delphi* Visual Basic or C-h- b_\ Bor- land* Since Delphi is one of die most commonly used programming lansuases* well take a look how w e can use this language w — *- r *-■ with the Acti\ eX component. What is ActiveX? An Aetiv eX component is a piece of software that can be used by a host application that incorporates ActiveX control (such as C-H-Builder, Delphi, \isual dBASE. Visual Basic, Internet thk3ettlKlto:!iK-7-3TGj4 Explorer or Netscape Navigator L and thereby enhances its functionalilv. ■> Delphi comes with several ActiveX components for creating graphs, spreadsheets and pictures. Yon can add these compo- nents to the IDE (Integrated Dev elopment Environment) and use them just like any other standard VCL element i Visual Component Library) bs including them in the program and defining their properties with the help of the object inspector. Vou can also use an ActiveX component on a web pane bv including a link to it in an HI ML document and displaying it in a browser that supports ActiveX. The following is a genera] method for using an ActiveX com- ponent in the Delphi programming environment. We won't include all detail* for writing ActiveX components. For this we refer you to the Microsoft Developers Network (MSDNh More information on ActiveX can also be found on Microsoft’s website. FJe %fft Vi!"- F Jrirt=£. Jzifc Id I Q 3 =^-= -« ■< I — ^ it ri-'J.Ii _Di jfcj Off ■■ " 7 1 ' 7 -;j; _ir -- Z^± ^ ^ : : -z:c3 ili t £.sH-ZEl:I.H £ ^ I* j **f Trr-r-s-r r —] T yp- & the name of s program, folder, document, or —J Internet resource, and Widows w$ open it fer you. The ActiveX component picus brxProj 1 .ocx The author used the original Basic program us the starting point and continued development in DelphUk It should be clear that tire scope of this article doesn't allow tor the inclu- sion of a complete course on the development of ActiveX components. The Help function in Delphi will provide you wi th th e requ i red i nfo mi at i on . The complete Installation of the ActiveX component requires another seven files. All these hies can be found in the folder fieh_uc\ {shown in tire screen dump in Figure I l Installation We ll now go through the installation steps manually, as this makes the process clearer than an automatic installation. 1 . The tile picus_brxProj I .ocx should be copied to the folder c:\wiudows\sv stem for Windows 98/ME, to die folder c:\vvindows\system32 for Windows 2000 and XP. or to c:\WINNT\syslem32 for Windows 2000 Pro. 2. Copy all other files from folder fidi_ocx to folder c:\Pru- gram Files\BorIand\DdphiVIniports (the exact folder name can van slightly, depending on the \ erslon of Del- phi). 3. Click on Start, Run and type in the command reg svr32 picus brxProj 1 .ocx < Figure 2 f. W hen this has finished, you should get the message shown in Figure 3. 4. From the Component menu in Delphi choose the Import ActiveX Control option, then click on picits_brxProjL fol- lowed by Install and Save [Figure 4 ). Open: regsvr 32 c:\™dov«\^stem 32 \ptcu 5 _bncProjl ,ocx v OK Cancel Browse,., G4RegsterS&vgf h c 1 . Get succeed . - ■ The program 1 . S tart De 1 ph i , c hoos e Fi I cl Sc w A p pi i c at ion . Click on the ActiveX tab, then click on the component pkus_hrx and put it onto Form 1 * Figure 6). 2. Put a button ( found under the standard elements lab of Delphi } onto the form. Then put and edit box {also found under the standard ele- ments tab) onto ihe form. And finally pur a timer (found under the system elements tab \ onto the form, as shown in Figure 7. 3. Double-click on Button I and enter the following code: procedure IFonti . ButtonlClick ( Sender; XGhject); var Val T:real* W hen this has completed satisfactorily, the ActiveX compo- nent should become visible. W e can now start writing our own driver program. An example with the ActiveX component There is nothing clearer than an example to help understand how things work. We ll start with a very simple one: the tem- perature measurement using the LM335. a well-known tem- perature sensor made by National Semiconductor. Its output voltage is proportional to the temperature. This voltage is amplified by a factor of about six by a TL27I. The circuit diagram is shown in Figure 5. The supply voltage is derived from one of the digital outputs of the C5B analogue converter. Output K 2 is connected to the first analogue input on the PCBialso K2). 74/2004 - e's fetor ekfciu T 1 3 Figure 5 . Circuit diagram of a simp e thermometer using me wrell-knawn IM335. ^5V F : gt/rg 6 . T/is otjecf USB Cenfruls ha $ bee n placed or. the form. rigu r e 7 , Form 1 with Button. 1 r a Trr,e- and an Ear box. figure B. An OCX function con he used to test the opera t ion of the outputs. begin Yal T: -{picus brxl .Al!0*5/2 55} ; {D/T conversion} Editl .text;=flaattastr( vaI_T) ; end? Double-click on the Timer: procedure TFonal.TiiaeriTiiaer (Sender: TObject); begin Button I .Click; end; When you run the program, you should see a temperature- dependent voltage appear on the screen. Using the outputs There is a function in the OCX that allows us to control the outputs of the USB analogue convener. Well use this in the following example. Open a new form in Delphi and add the following elements: - 4 Checkbox elements from the Standard library. - i Timer from the System library. - 1 Button from die Standard library and of course our picus_brxl ocx object from the ActiveX library (Figure 8 c Double-click on the Form and type in the following code: procedure "'For ml . FormC re ( Sender : TOb j ect ) ; begin picusbrxl , active; picusbrxl. visible :=false; end ; Double-click on Button I and add: nrccedure TForml .But ton i Click. (Sender: TObject); begin picus_brx I . J ( Ord( CheckboxI .Checked ) ) ; picus brxl , Jl { Ord| Checkbox2 .Checked ) ) ; picus brxl . J2 ( Ord ( Checkboxl .Checked ) ) ; picus brxl. J3 ( Ore ( Checkbox^ .Checked ) } ; picus brxl . lance ; end; Double-click on ihe Timer element and add: procedure TFonnl . Timer X Timer { Sender : TObject j ; begin Button 1 .Click; end; Click on the Checkboxes and see hou the module outputs change their Mate. These programs only show a lev- of die many possibilities that are offered by the USB analogue convener in conjunction with the ActiveX control. Well leave it up to your imagina- tion to come up with some other uses. :CC43M W&h pointers: ActiveX controls; vfww>mkra5oft*com/com/tech/ActiveX,asp JEDt Visual Component Library; htfp://hQmepaQes*borland.com/jedi/jvcl/ VCLComponents.com: wvmvclcomporTent5.com/ Author's website (under construction): htfp://doreIec. web, oo.fr 114 cfslsiw eEsdianfti - 7-3/2004 Lew COSE USB PIC programmers (Stelng 5! £27, rnodfcj shcwi res) .plus a wsde range of add-on boards and accessories.-. ......plus Incredibly easy to use software based on flow charts... ...equals extremely rapid system development: like th : s mobile text messaging system built from E-blocks. and solutions for learning and development. Hands on training courses Resources for learning CPLD programming Complete courses in electronics and programming Equipment for datalogging, control end PC 'scopes training courses in PJCjrsicrc'R) prog ram mfog. CPLD programming and EGAD mm uuiiflfl see www.matrixmultimedia.co.uk ...and more at: Matrix Multimedia Limited saJes@m atrix multi media, co.u k L 0870 700 1B31 f. 0870 700 1832 6 BLOCKS E^bfocks ara srrsL boards esch of which cents : ts a Nock of etecbxncs typfcsijy found in sn electron^ svsfom. E-blocks can ba programmed an C. Assembly and are tightly integrated with Ffowctxfe - which rtstentry converts f ow charts info PlCm.^0 code. Affordable, Professional ARM7 C/C++ Development! Everything required for LPC2000 Philips ARM7 development in a single, upgradeable kit. ® Industry standard Keil UVISION3 IDE, C/C++ compiler and simulator 0 Fuil Simulation of LPC2000 with peripheral & interrupt support Fully assembled LPC2129 board 3 7 j 16k RAM, 256k FLASH on boaid S Dual CAN and R5232 interfaces JTAC and ETM trace debug interfaces Example program library 0 E uLINK USB-JTAG interface (optional) Sasic 16k code development kits from £75 +VAT Full 16k development kit with JTAG-USB debugger £24g+VAT (Academic price just fi^g+VAIl) fh ON Q pvt SI '±-*4 SDIo^^fAHE hitexi For full details see www.hitex.co.uk/ann :■ E . i _C - ■ . - - - ^PHILIPS 7 - 8/20 D 4 'sbklordcdrcrskf 115 Electronics instead of mechanics Switching systems in models often suffer from mechanical problems. This electronic replacement is much more reliable and offers a little bit extra! 116 el<tei 7-8/2QD4 RECEIVER 5-Q 3 ATT. RECEIVER « — 0 -® 03fJ3.fi 5' 11 TO -252 G S Top View 030390 - 12 Figure 1 . Circuit diagram of the electronic switching system. Remote-controlled models include many components that, because of their various shortcomings, need to be checked constantly. The scale of the problem Is clear from the number of different add-on units that are avail- able from the various manufacturers. Here we present an extremely useful circuit that replaces the (often rather temperamental) switching harness and which also offers a voltage-moni- toring function ivith memory Why repteee the switeh t Experiments with mechanical switch- ing systems reveal, surprisingly that they have contact resistances typically between 0.3 Q and O.B Q, At a peak current of 1 A, which is by no means out of the question with four servos running simultaneously up to 0.5 V of the supply can be lost in the switching harness alone. Over time, as the con- nectors and switch contacts become worn and dirty, things can only get worse. It is possible to get around the weaknesses of the mechanical system using modem electronics. In tins cir- cuit we use a MOSFET as the switch- ing element, giving an ‘on 1 resistance ( r dson) 0.025 m Q. It would be prac- tically impossible to achieve such a low value in a mechanical system. The circuit is switched on and off using two tiny pushbuttons, which have con- siderably less impact on the appear- ance of a model than a big ugly mechanical switch. A further advantage is that the sup- ply voltage is continuously monitored, with a permanent indication of any interruption in the supply — and not a microcontroller in sight! The circuit's status is shown by two light -emitting diodes, so that the user can see what is going on at all times. Requirements The electronic switching element, which sits between the battery and the receiver and servos, must: L be capable of operation at supply voltages as low as 4.5 V; 2, have as low an 'oh resistance as possible; 3. be able to handle currents of up to 5 A without difficulty. We can satisfy all these requirements using MGSFETfe, which are available in a wide range of power ratings. Because we have to deal with low sup- ply voltages of around 4.5 V, the so- called logic level' types are the most suitable. At these voltages, ordinary MOSFETb operate more as variable resistors rather than as switches, which leads to a greater voltage drop and considerable power dissipation in the device. Here we have decided to use the type SUD45PQ3-15A, a P-chaime! MOS- FET made by Vishay {formerly Siemens). This device is available in a TO-252, or k DPAK\ package and can handle currents as high as 10 A with- out difficulty. This makes it ideal for use as a power switch in a model. Its 4 on' resistance R D30N is 0.025 mil, which means that the voltage dropped across it will be negligible even at high currents. There are many other types that have the above properties which could be used instead, as a brief glance through the catalogues of component suppliers will reveal. Switshing &n and @0 Tire circuit diagram of the electronic switching system is shown in Fig- ure 1. The transistor conducts when its gate is taken to ground by T4, In the non-conducting (‘off’) state, the gate is taken to a definite (high) voltage level by R8. Green light-emitting diode D2 indicates when the circuit is in the 'on' state. The circuit is switched to the "oh state by a brief press on pushbutton SI. This takes the base of T5 to ground, and T5 and T3 conduct. Capacitor C2 charges np and, alter a short time, pro- vides a high enough voltage to switch transistor T4. Tills now takes over the job of pushbutton SI, and so the circuit remains in the 'oh state, even if the user releases the pushbutton. C 2 also allows the circuit to retain its state across brief interruptions of the power supply When charged, it can supply enough current to the base of T4 to cover an interruption of several seconds. This behaviour can be demonstrated by disconnecting the 7-5/ 200-1 - ekkfcf ilscfi&Fiks 117 Batteries in RC models When considering a voltage monitoring circuit, it is worth looking at the behaviour of a typical bat- tery in a model, A few details became apparent when the discharge curve is studied carefully. First, the open-circuit voltage of the battery, when fully charged, is around 5,6 V. Under load this falls relatively quickly to around 5 V, where it remains for some time* After a certain discharge time (here approximately 76 minutes} the curve falls off sharply, indicating that the battery is almost completely flat. For a modeller it is impor- tant to know, before making a run, that there is sufficient charge remaining in the battery for the receiver to operate correctly. Discharge curve at 300 mA far a four cell NiCd battery (Sanyo type N-500AA) battery termi n a l s briefly £ nd then reconnecting them: the green light- emitting diode lights again immedi- ately without the need to press the button. D3 prevents C2 from discharg- ing rapidly via Rll. The circuit is switched to the off state by pressing pushbutton 32. C 2 is discharged and the base of T4 goes to ground potential. T4 stops conducting and then so does the MOSFET T3, since the voltage at its gate is no longer neg- ative with respect to that at its source connection. Resistor Rll prevents a dis- charged C2 from being charged by leak- age currents through To, Vo If age m&nitormg Many ways of monitoring the battery voltage in a remote-controlled model have been proposed. In December 2001 we presented a voltage tester cir- cuit based on an L M3 9 14 that showed the measured voltage on a row of ten LEDs, A disadvantage of that circuit was that the lowest measured voltage was not permanently recorded or dis- played. Figure 2. Infernal circuit of the ZSh \560 reset iC. In this circuit the battery voltage is monitored using a so-called reset IC r (Figure 2), a device which is normally used to provide a reset signal to a microcontroller if the supply voltage falls below a certain threshold. There are many variations available on this theme,, the chief difference between devices being in their threshold volt- age. If a different threshold value is required, 1C 1 can be replaced by an appropriate substitute. Make sure, however, that the device has an open- collector output. Essentially a reset IC consists of a comparator and a reference voltage generator. The comparator switches when the voltage produced by the integrated potential divider, which consists of two resistors, falls below that produced by the reference genera- tor, The transistor connected to the output of the comparator provides an open-collector output which pulls the output pin low when it is active. The most important characteristics of the Zetex ZSM560 are as follows: Maximum supply voltage: 8.5 V Threshold voltage: 4.6 V ±0.1 V Hysteresis: 20 mV typical Curran i consump non: 1 35 mA typical Maximum output sink current: 60 mA The reset IC used switches within microseconds and is therefore fast enough to detect reliably even the briefest supply excursions that go below the 4,6 V threshold. Unfortu- nately the output goes inactive again once the supply voltage goes back above the threshold: it has no memory function. Here, this function is provided instead by a 'classical.' (be. microcon- troller-free) circuit, connected to the output of the device. The memory circuit is essentially the same as that around the main sup- ply switch T3. In this case the reset IC takes the place of the ‘on T pushbutton, its output taking the base of T2 to ground when the supply voltage goes below the threshold. This drives T2 P and red light- emitting diode D1 lights, signalling to the user that the supply voltage has fallen below 4.6 V. The user should then charge the battery (or pos- sibly check the battery connections). €onstruttion erne? use Construction of the electronic switching system should not present any difficul- ties. Since the space available in mod- els can vary we have not provided a printed circuit hoard layout. The circuit can instead be built on a piece of perfo- rated board cut to a suitable size for the particular application. Ensure that the capacitors and transistors are correctly oriented. The MOSFET is soldered as an 5MD device: first tin one pad, then put the transistor in place and solder one lead to the pad. Finally the other two leads can be soldered. Use reasonably thick wire to connect to the battery and to the receiver, since it will have to carry currents of 1 A or more. Precious millivolts of voltage drop can be lost if wire that is too thin is used. In use, the switching system is very straightforward Simply connect up the battery and the receiver, and then press the bn* pushbutton. The green light -emitting diode should light. lithe red light- emitting diode does not light, then the model is ready for a run. The circuit is switched off with a brief press of the 'off pushbutton. 118 ckVfc-r elimcrks - 7-&/2D04 mdlbox Project c+ (4 } Hands up, who's been a naughty boy then? i om referring, of course, to your 'C+' project. In fact I was just about to order 400 m of expensive Ethernet cable when I sud- denly realised that t was reading the April issue of Elektor which arrived around April 1 s b Nice try, but pulse cannot travel backwards in time, otherwise consider what would happen if you used the leading edge of the received pulse to gate off the pulse generator before the bandpass filters. In that case the pulse would not be sent. ]f it is not sent then one would not be received at the other end and so there would be nothing to stop the pulse being generated and there- fore.,. Hang on, I can feel a para- dox coming on. Thanks for a great mag though — keep m coming. A, Brammer (psm Dr, Who) Glad you did appreciate cur April spoof in the end. Discusser* closed I DIY Thro ugh- Hale Plating Dear Sir, first let me congratulate you on the new look Elektor. f have been a reader for many years ond it is good to see that Elektor never rests on its laurels! it has always been the best and likely always will be. One minor glitch; the ink seems to rub off on my sweaty palms! Oh, well. Anyway, down to business. In the “ Start Here guide in April 2004, the issue of through-hole plating for hob- byists is discussed. There Is an easy method t use that 1 find invaluable. Mulficore make a system called CopperseH. This is intended for repairing dam- aged boards, but is just as useful for DIY ihrough-hole plating. Although the kit is (too) expensive, it is very easy to improvise the tools and just buy the bail bars. Essentially, the system con- sists of tiny copper tubes filled with solder. These are placed into a hole and snapped off with a special tool [they ore scored for 1 6mm thickness boards). The tubes [called bail bars) ore £23.81 at Farnell (item 463-929) for 500. That's a lot of holes. Another special tool is then used to splay out the solder over the ends of the hole and push the sides of the boil into the board. When soldered, the tube becomes a neat, plated hole! All that is then required is to remove the excess solder from it with sol- der wick. The 'special fools' I use and my method are as follows: Tools: 1. Rente! 1-mm automatic pencil, the old mustard- coloured type with o fixed metoi nib. 2. Small centre-punch with the tip Filed flat. 3. 0.85mm carbide drill bit 4. Desoldering wick Method: 1 . Insert a row oF bails into the Pentel 2. One click should protrude exactly one length of bail. 3. Drill holes for plating with the 0.85mm bit. 4. Insert the bail into the hole and snap off. 5. Place the board against a flat metal surface. 6. Use the centre-punch to splay out the top of the bail. 7. Solder top and bottom of boil to surrounding pad. 8. Remove excess solder from hole with wick Using this method, 1 hove plated many hales for circum- stances where the fop leads of a component are unavail- able but need soldering, usu- ally under big capacitors, power sockets or D-cannec- fors. I have not yet (touch wood) had a single failure. Part of the pleasure I derive from electronics is producing an item that looks profession- al. This system gives that result at a low cost. I hope this information Is of use to your readers. Rick Fox. Thanks for your extensive contribution which is printed full length here because I'm sure H contains valuable information for many of our readers. Serial DLL Dear people at Elektor, I am experimenting with the serial port on my PC. I built up the Com Port Tester from the March 2003 Issue and downloaded the associated DLL from your website, 1 noticed that the DLL does not have a START BIT function. Is there a reason far this? If I required a start bit in my protocol how would I generate if using your DLL, or would I have to add a func- tion ond recompile the DLL? Michael (by email) Jo comply with the serial commu- nication protocol , the hardware will automatically transmit a start bit , hence a separate button is not required. Can 1 build this? Dear Elektor, can I please have some information about pace- makers, or indeed anything about heart beat measure- ment? I am currently doing a project and seeking informa- tion on how to build a pace- maker. Wei Hing (by mail) Please , don't even dream of budding your o wn pacemaker, as we would like to see you continue reading our magazine. We appreciate your curiosity but really, this one is best left to the experts. Display advice Hello, just o note that might help others! 7 segment displays os used in the Digital Alarm Clock in the February 2004 edition are listed as LTS430 ] E (Life- on] these are very hard to find unless you want 500 of them. However, VEeweom, who advertise on page 73 have the equivalent in slock under the part number HD1 1070 or HD 1107G. Hope this is of some use to others. Bob Tavener Thanks Bob. as you can see the word is being passed on. MoilBox Terms *• Publication of reader's correspon- dsnee Is st the discretion of Editor. - Viewpoints expressed by cores- pondents a'? not recess a* i y Lhasa c? :~e Editor .: r Pub; sher - Correspondence may be translated or edited for length ciartty erd style. When replying to Mailbox corre- spondence please q„ote issue number Pisas- send your Mg ;Box corre- spondence to: edit o r@ e l &kto r- electronics co.uk or Elektor Electronics, The Editor PG, Box 19-0 Tu n b Ed ge We 1 1s T f ;5 77v ' t" En g land . W20EH - elektor eleefronks 1 David Daamen fhe man behind epanorama.net Have you got www.epanorama.net bookmarked? if not, you should, because for many years Tomi Engdahl's website has been a highly respected on-line reference work as well as a source of inspiration for many electronics enthusiasts. This time we decided to interview the website maker rather than review his product. 120 cfekl&r c!cd rcilts - 7-8/2004 Ii s biird to think of von having started out with a hobby other than electronics. I don't remember at what age I started. My father was an engineer and I aiso got interested in all kinds of technology at an early age. Somehow 1 got the hang of electronics and yes 1 also took radios a pan as a kid [ At a relatively early age you decided to study Electrical Engineering — - did you consider alternative studies or careers? hen 1 decided to go to Helsinki University of Technology I was not completely sure if 1 should concentrate on computer science or electrical engineering. 1 studied in the Department ol Computer Science and graduated in that field. 1 was sure however to select topics that would give me some knowledge of electrical engineering as well. 1 remember many studies related to signal processing, computer hardware design and data communications were organized by a department called Electrical and Communications Engineering, V* hy did you choose Helsinki University? Today Helsinki L niversiiy of Technology t HLTi is not actu- ally in Helsinki but in Otaniemi near Espoo, just a few kilo- metres west of Helsinki. Anyway, my cousin studied there and HUT had a good reputation. It was also just a half hour dri\ e from my home. Later 1 moved to the campus. Where you plunged into student life, 1 suppose? Sure, tor one thing 1 assisted in organising campus events. One night as 1 was helping a DJ w ith the lighting system it turned out that the next DJ wasn’t going to show up and 1 ended up playing records for some time that evening. 1 ^ot good feedback from the crowd and decided to trv again. Later I teamed up with a friend and we gigged at many stu- dent parties. Did the University also trigger your Internet adventures? Yes. the Internet activities actually started in 1990 but before that I had been active on a BBS for a couple of years, I cuess I started writing texts on PC hardware around 1989. 1 wanted to know more about PC hardware and programming, but there was a lack of information sources and not much material writ- ten in Finnish. I then started writing documents collecting and summarising information 1 found in various sources like PC hardware and component dam books. My first texts were writ- ten in Finnish and covered PC parallel and serial ports. These texts were updated a few years later. The e panorama website is also frequently updated. Do you handle the updates yourself? 1 used to. but nowadays it's a joint effort. The site change from my personal home page on the Univ ersity Webserver to epanoratna.net involved two friends vvith whom I founded F.LI1 Communications Ltd. logether we had to find a suitable name for the website that was still available to register as a domain name. The name change was effected between 1998 and 1999. Where is site hosted today? * in the IS of A, We employ one primary server from Rackhost and one backup. Although the webhostmg company has to be paid for the traffic generated by the site, the facilities offered are generous. For example, we arc now able to run scripts, which was impossible on the University Webserver. Advertis- ing is used to recover some of our running costs, f 1 ^ , ott giv e ns some web statistics, please? Sure, at the beginning of 2004 we recorded a daily average of 14,615 visitors browsing 51.562 pages. Total traffic for Feb- ruary 2004 amounted to 67 gigabytes. ■a- ***■ m ePanorama.net Q Q ' " ; • ' - Iftfd O - : Or-, Q - O ' " : - T- ^ L£xi_ - rorf -;ly Ct *’v» ^ . 1 ^-=- c±'i a -7 : - Lili • - ■ - ■ ■ ■ " T 1 ■" •• - , y. -NT FrgJirfnfT 3&H =■:- ■“ j r T ; V. ■T-- : “7 r -T ? FT-r r^urr.r-- 4 ■ '.U lJ : -L.i ; ■ .■ : t2 i 'r lad J.2 EE4: *j-dr=-± = £ irfc 3 e:*: ■ . - : ; - : i -dti iA <.-Uj b tn • - t~ . tow 3 E4BT - l 1 — 1 Z ~ tT£ E£t v&i- j 1 : f r-r-r (fete ' ~ ~ j: t: EfJ i . 7 - * r : -j~ E^Jli *t~ - !=- .-7 i 1 fcrds Efectranc* . lKv« <*.j~ L T =Ti i £ 44 T^ te* Hk&s tZ 5 ri Mjfc- 9 ■ \t’, ’-z-z~zc ^i-z= Ei : . I'.- Ei i-r- E-?rEE Impressive and snrelv an incentive to generate even more traffic? Time and resources are limiting factors but we strive to add more links, more material to the site's information databases and so on. At the moment the main development is to improve the website administration which will hopefully make updat- ing the site easier and faster. Once things are running smoothly, the database system may also be used for more advanced functions like searching and rating of links. I also hav e some ideas on how the schematics and documents could be improved so ev entually we hope to be able to verify the operation of circuits before they appear on the site, instead of promising amazing things that never happen. Dues your job relate in any wav to the website you run? 1 work in a company called Netcontrol ( ww vv. netcntrol.fi) which develops, markets and supplies monitoring and control systems for energy production and distribution, I also write articles for Prosessori magazine (vvww.prosessori.fi ), for example, a regular feature about good websites I've come across. Updating and extending rnv own website and writing these articles allows me to use the same link information for both. So what’s in ynur own Favourites folder then? Ah well here are just a few pages I bookmarked and visit even dav; ¥ mr www.google.com (when you need to find something that’s not already on www.epanorama.net ! www.prosessori.fi (admittedly only of interest if y ou can read Finnish!. By the way, Prosessori contains licensed Elektor articles in Finnish! vv vv w. s 1 ash do t ,org ( fo r d ai 1 y co mpu te r new s i w w w. dilben.com and wvvw.userfriendly.org (for daily fun) Finally, what are must-see articles on epanorama.net? Actually I'm proud of quite a few articles. Maybe Ground loop problems and how to get rid of them’ deserves a special mention because of the good feedback it received ii different forums, e>£?i33-ij 7-3 2004 - dtljler gljflrcrits 121 safety guidelines In stl mains-operaled equipment certain important safety requirements must be met. The relevant standard tor most sound equipment is Safety of Informa- tion Technology Equipment, including Electrical Business Equipment < Euro- pean Harmonized British Standard BS Ei i 60950:1992?. Electrical safety under this standard relates to protection from * a hazardous voltage, that is. a volt- age greater than u?.4 V peak or 60 V d.e.; * a hazardous energy level, which Is defined as a stored energy level of 20 joules or more or an available continuous power level of 240 7 A or more at a potential of 2 V or more; * a single insulation fault hich Quid cause a conductive pari to become hazardous; - the source of a hazardous voltage or energy level irom primary power: * secondary power (derived irom internal circuitry which is supplied ano isolated from any power source, including o.c.i Protection against electee shock is achieved by two classes of equipment Class I equipment uses basic insu- lation : its conductive pans, which may become hazardous if this insolation fails, must be connected ta the supply protective earth. Class II equipment uses double or reinforced insulation for use where there is no provision for supply protec- tive earth ' rare in electronics - mainly applicable to power tools ). The use of a a Class I! insulated transformer is preferred, but note that when ibis is fitted in a Class l equip- ment, this does not, by itself, confer Class II status on the equipment Electrically conductive enclosures that are used to isolate and protect a hazardous supply voltage or energy level from user access must be protec- tively earthed regardless of whether the mains transformer is Glass 1 or Class II, Always keep the distance between mains-carrying parts and other parts as large as possible, but never less than required. If at all possible, use an approved mains entry with integrated fuse ti older and on off switch. If this is not avail- able, use a strain relief (Figure, note 2) on the mains cable at the point os entry. In this case, the mains fuss should be placed after the doubie-pole on off switch unless il Is a To uchp roofs type or similar. Close to each and every fuse must be affixed a label stating the fuse rating and type. The separate on off switch (Figure, note 4), which is really a 'disconnect device’, should be an approved doubie- pole type (to switch the phase and neu- tral conductors of a single-phase mains supply), to case of a three-phase sup- ply all phases and neutral (where used) must be switched simultaneously. A pluggable mains cable may be consid- ered as a disconnect device. In an approved switch, the contact gap in the off position is not smaller than 3 mm. The on off switch must be fitted by as short a cable as possible to the mains entry point. Ail components in the primary transformer circuit includ- ing a separate mains fuse and separate mains filtering components, must be placed in the switched section of the primary circuit. Placing them before the on off switch will leave them at a haz- ardous voltage level when the equip- ment is switched off. if tbs equipment uses an open-con- struction power supply 'which is not separately protected by an earthed metal screen or insulated enclosure or otherwise guarded, all the conductive parts of the enclosure must be protec- tively earthed using green/yelfow wire : green with a narrow yellow stripe - do not use yellow w ire with a green strips). The earth wire must not be daisy- chained from one pari of the enclosure to another. Each conductive part must be protectively earthed by direct and separate wiring to the primary earth point which should be as dose as pos- sible to the mains connector or mains cable entry. This ensures mat removal of the protective earth from a conduc- tive part does not also remove the pro- tective earth from other conductive parts. Pay particular attention to the metal spindles of switches and potentiome- 3-core mains cable to BSG5Q0 1990 with three stranded conductors in thick PVC sheath Max current 3 A G A 13 A conductor size 16 0,2 mm 24 0.2 mm 40/ 0.2 mm (tom cond area 0,5 mm 2 0,75 mm 2 1.25 mm 2 overall cable die. 5 5 mm 6,9 mm 7.5 mm Insulated hook up wire lo DEFot-12 Max current 1.4 A 3 A 6 A Max working votlage 1000 Vrms 1000 V rms 1000 Vrms PVC sheath (hickness 0.3 mm 0.3 mm 0.45 mm conductor size 7 0,2 mm 16/0,2 mm 24 0.2 mm Horn cond area 0.22 mm 2 0.5 mm 2 0,95 mm 2 overall wlredla 1.2 mm 1.6 mm 2.05 mm 3-flal-ptn mains plug to BS 1363A 1, Use a mams cable with moulded- on plug. 2, Use a strain relief on Ut e main s cable . 3 , Affix a label al Ifte outside of the enclosure near the mains entry stating the equipment type , the mains voltage or voltage range , the frequency or fre- quency range , and the current drain or curent drain range. 4 , Use an approved double-pole on off switch, which is effectively the ‘discon- nect device'. 5, Push wires through eyelets before soldering them in piece. 6, Us e ins uia ting sle e ves for extra protec tion , 7, The distance between frans former terminals and core and other parts must be > 6 mm. 8 , Use the correct type , she and current-carrying capacity of cables and wires -see shaded table below. 9 , A printed-circuit board like ail other parts shoutd be well secured. Aif joints and connections shoutd be weii made and soldered neatly so that they are mechanically and electrically sound . Never solder mains-carrying wires directly to the board: use solder lags. The use of crimp-on tags is also good practice. tO. Even when a Class il transformer is used t it remains the on/off switch whose function it is to isolate a hazardous voltage (i.e., mains input) from the pri- mary circuit in the equipment. The primary-to-secondary isolation of the transformer does not and can not perform this function. tors: if touchable, these must be protec- tively earthed. Note, however, that such components fitted with metal spindles and or levers constructed to the rele- vant British Standard fully meet all insu- lation requirements. The temperature of touchable parts must not be so high as to cause injury or to create a fire risk. Most risks can be eliminated by the use of correct fuses, a sufficiently firm construction, correct choice and use of insulating materials and adequate cool- ing through heat sinks and by extractor fans. The equipment must be sturdy: repeatedly dropping It on to a hard sur- face from a height of 50 mm must not cause damage. Greater impacts must not loosen the mains transformer, elsc- tralytic capacitors and other important components. Do not use dubious or flammable materials that emit poisonous gases. Shorten screws that come too close io other components. Keep mains-carrying parts and wires well away from ventilation holes, so that an intruding screwdriver or inward falling metol object cannot touch such parts. As soon as you open an equipment there are many potential dangers. Most of these can be eliminated by discon- necting the equipment from the mains before the unit is opened. But, since testing requires that it is plugged in again, it is good practice rand safe) to fit a residual current device iRCDr. rated at not more than 30 mA to the mains system (sometimes it is possible to to this inside the mains ouUEl box or multiple socket), ’ Sometimes called residual current breaker - RGB - or residual circuit cur- rent breaker -RCCS, These guidelines have been drawn up with great care by the editorial staff of this magazine. However, the publishers do not assume, and hereby disclaim, any liability for any toss or damage, direct or consequential, caused b, errors or omissions in these guidelines, whether such errors or omissions result from negligence, accident or any other cause. 122 e'tkfei cktre.-lrs- 7-8/2003 BS2P/40 Parallax BASIC Stamps - still the easy way to get your project up and running! Serial Alphanumeric and Graphic Displays, Mini-Terminals and Bezel kits Robotic models for both the beginner and the advanced hobbyist Servo Drivers Motor Drivers DMX Protocof U /Sound Ranging J Animatronics and Specialist Interface-Control Modules Quadra vox MP3 & Speech System s Sensorylnc Voice Recognition fech- loots FJC & Rom Emulators BASlCMitro PIC BASIC Compilers Development Tools Milford Instruments Limited Tel 01977 683665, Fax 01977 681465, sales@milinst.com emc E'l'C DIRECTIVE From i January 139&, home-made equip- ment must take into a cco u nt e m c B. recti e S9.‘536 : eec (emc = Brtctro M a g netic Compatibility). Basically, the directive stales that no ecu proerU may causa. or be susceptible to, external interference. Here, interference means many phenomena, such ss electromagnetic Fe'ds. static dis- charge. mains pollution in the widest sense of the word. Legislation Home-made equipment may £>s taken into use only wtren it is certain that ri cc mpl'es with the effective. In the Untied Kjngdo-m, the dti (Department of Trace and Endistryi wf I, in genera? . only lake action agari.st offenders when a comp's' nt has been mac a. ti the equipment appears net to com- ply with the directive, the constructor may be seed for damages. co label Home construc- tors r c-ed net affix a ce label to their equipment Elektor Electronics and the Directive The p-jReh&s of Etektor Bectronlcs intend that designs published in the magazine comply with the directive. Where necessary, ac cf bona! c ulidetioes w ■: be c b en i n the arth cie. However, the publishers are neither cc , gad to do so, ncr can they be held able for any consequences if the constructed design does not comply v.hh (he directive. Tea column gives a number of measures trial can be taken to ensure that EE- desgned equ pment complies with the Grer.hu. However, these are needed cm 'yin some ces gas. Other measures, particularly In case of audio eau'pmsnb are not new and hare been apped for some time. Why emc? The important lang-term benefit for the tser is that a i electrics' and electron ri equipment in a domestc, busriess and industrial erv- ronmerrl can work harmoniously together. Radiation Tn s pest known form cf emc Is radiation that s emitted spuriou^y by art apparatus, either through bs case or its cab" no. Apart from Lmbrtg such radstkm, the directive also requires that the apparatus dess not iimpart spurious energy to the mans — cot even in the to-- . -frequency range. Ferrte trr&jgtyF.ilsrs ss • 'ns irazea are used for feed rg cad tes thiw-gn = ca re 1 Immunity ins requirements regarding immunity of an equipment to emc ere new. Within cer- tain limits of ambient interference, the apparatus must bs able to continue werin mg Faultlessly. The requirements are fairly extensive end extend to 2 ,\'k range of possible sources of Interference, Computers Computers form the prime group for app'j- cahcn of the dsrectrve. Tnsy. and m'era- pcooessoTS, are notorious sources of inter- fering radiation. V.arec-, er. cwrig to Lee way 0 w rich the r internal mstru crons are earned out sequentially. tosy are also very sensitive ;o Interference. Tre notorious crash s but one manifestation cf this. Enclosures A home-made computer system can comply with the emc b receive criy if ft ls housed in a metal enclosure. A ruin mum requirement is that the underside and rear of the enclosure ri an I -shaped frame. Ad cadi ng must con- verge on this area or be filtered, if there are can sectors 00 the front panel. a u-shaped reetei frame should be used. Bren carter results are obtained if a 20 mm 'Aide. 1 mm thick cop car strip is fixed along the whole width of she res' wall with screws at 50 it m intervals- The strip should have solder tags at regular distances for use as earthrtg points, A closed case is. of course, better than an l-shaped cr u-shaped Frame, it is important that a! I its seams are immune to radiation ingress. Power supplies In any mains power soppy, account shoo’d ce taken of Tnconrng ard Cbtgo T ng interfer- ence, It is good practice to use 2 standard mains fitter \\ b use m etaJ case Is In c rad cc m tact electrical contact with the enclosure or metal frame. Such a rider is not eas y busS at borne. It is advisable to buy one with Integra] mans entry, fuse holder arc on Off switch. Tnis .ab-j benefits electrical Safety in genera". Make sure that the p dinar/ of the fitter -is ler- m hated into its characteristic : meed en.ee - rrormany a series network of a 50 ft 1 '.V resistor and a ' 0 nF. 250 V capadtoc Mains transformers must be provided with rc-nartvorks ai tre primary and sec- ondary side. Bridge rectifiers must be f tiered by rc-nertvorks. The peak charging current Into Erie reserved capacitor must be miteef by the Interna] resistance cf the transformer or by additional series resri-cre fi is advis- able to use 2 250 V. 2 7." varistor between the live and neutral marts Ernes. At trie sec- or.day dbe. it e somefmes necessary to use 2 transient suppresses preferably foh kxAing the reservtxr espadtbr. If th e supo V is used ivirti c .g tel systems, 5 common -mode inductor in the e-sic r can, 1 a.c. tines may prove benefkial for iimbng rad lab err. For audio ecu rtabons, an earth screen bebveen primal' and secondary is ab/sahle. This screen must be I nked via a she rt wire whh the earthing strip. Tre supply must bs able to cope with a mains iaifore fasbre feur periods and wfth mains supply variations of tIO^s and -20f=. Peripheral equipmeril acd ertririrtg A3 cables to ano from peripheral apparatus, such as measurement sensors, control re-lays, must be fed through the metal v.'a’l of the enclosure or fram-e. Trte earth lines of such cables must be conceded d reeby to the earthing sfop at the Inside of the eocJo sure or frame vis a ware no! fencer than 50 mm. When plugs are used, the cable earth, rf any. must be connected fa the earth prt cr the msfaJ surround of irro cocnectoc Basically, all nc-n-screeoed signal lines must be pro vided with 2 niter oonseting of rot less than a 2-0 mm fence bead around the cable or bmch of wires. This bead may be cutsrte the sncSosura (tqr instance, around the pc- [^monitor cable). Leads ihai may have a rss'stance of 150 il must ce provided with a 1 E-D 1 i series resistor at the inside of the connector she-lL if technicaky E'easrtfo, there sbeu'd also be a cspachcr from tr^ point to earth. Commercial feed -through t-fltera or .^fibers may, cf course, be used. In all other cases. screened cable must be osed for connec- tions within the end csu r e. Symmetrical fries must con^st o’ twisted screened cabs and be canned at bn Eh ends. The earth plana tjfprihlfid-drtxrlt boards must be r nked es frrnly as feasible wfth the earth rig strip, for rt stance, via a flexible rts! metaJ strip of fetcabri. Electrostatic discharge (esd) AD parts of so equipment that can be touched from outside must preferably be made from insulating, antistatic materia'. A v i parts trial can be touched 2 nd enter the enclosure, such as potentiamefef and swnch spind es, must be earthed secure-ty- AO inputs and outputs v»rtose v. res cr co-n- nectof pins can be touched must be provid- ed with an earth shield, for instance, an earthed mats! surround via which any e'ec- trosiafic discharge are diverted. Tnis a most coo.-enlerrtry done by ibe use of co nr esters ATth sunken pins, such as tourtd in suo-d connectors, and a metal case. Audio equipment Immunity to radiation is the most important requirement of audio equipment. It is sbriE-ab’e to use screened cab'ss through- out, This s not always p ossicle in case of loudspeaker cables and these must lhe r e- foie, be filtered, For this purpose, there are special high -current t-f iters cr "-friers that do not affect bass reproduction. Such a fil- ter must he fitted in each loudspeaker lead and mounted " n the wall 01 a metal scree n- Enc cox crice-d around the loudspeaker connections. Low-frequency magnetic Helds Screened cables In the enclosure do rci pro vide soeenlng against the 'ow-freciuen- cy (< 2 few kHz) radiation of the mains transformer. The refare, these cab’es must run as dose as possible to the ,va 's of the enclosure. Moreover, 1 he r braid should be rnfc&s 31 one end to the earthing strip. In extreme cases, the power supp y srtau’d be fitted in a sett-contained steel enclosure. 5 pedal transfonTicfe with a shad;ng ring mat reduce the stray field can Sower the hum even further. High-frequency fields High-frequent fields must not be a'l-c wed to peretrate the mete 1 enclosure. A.! exter- nal audio cabfes roust be scraened and the screening must be Terminated outside Ihc- en-dosure. This again neces^teles the use of all-metal connectors. All cable braids roust be linked to the earthing strip made the enclosure. Owing io She skin effecJ. it s Importani to choose an eoefosore v.bh a xvaU Lhrikness > 2 mm la ensure trial infernal and enema fields are kept separate. Any holes rouet be either small ; <20 mm) or c-e covered with a msteJ mesh. Heat sinks Heal sinks should preferably be inside ihe en closure and be earthed at several points. N on-earthed heat sinks in swfich-mode power suppLas cben create proberra If possible, c'ace a rt earth screen berween translsior and heat sink. Mentilaion holes Srarfoaro rirt f rers tui ri;o a marts eody tOQSth^r wrtJi 21 on 07 sw ish. Trie mete* sbe mjT te r. firm c o-ciact r. :h ire enc must be covered with metal mesh unless they ere smaller (ban 20 mm. /enbatars shov'd be rnecs inside the case. Cables Cat as often function as transrot .'Ecerie aerials. This spp : es equally well to screened cables, Tire braid ci a coaxial cab a roust be terortmaled into a suoat e connect or such teat it mekes contact alo ng the Vi bole drournference. Tre brad may be used as the return path to cbte_n r.f. mag* net: 0 screen rig . Fc r a.f . mac netic scree n I rvg it is barter to use tivsfedfoart screened cables. En a ribbon (nal) cable, eecn sriral wire should b-e flanked , if at al possible by earthed w’res. Tee cable should be screened along ere surface o r preferably. a : around. Cables that carry srira's ^ J 0 kHz that are not filtered in Ere end-osure, must be provided with a is rote bead func- tion ng as a DOmmOrtanode Irtbuctarce. Printed-circuH boards Bektor EJectronks prinfed-dicut boards are provided with coppered Fixing boles that are connected to the earte cf tee otcujL This s.rrangerr.eni In cGOjunctfon wrih mete! space rs ensures good ccntect berw-se-n m e board and the orcuU earth. Viriere this is Important, boards bare a specs! eanh plane that can Pa connected, where feas- t-'e. to She earth rig strip via a fatcah 'e. These orea.i'CS coma y have no other earth- ing points end thar fixing hcles are, there- fore, rot coppered. ( 9 @QDCfi) T-r-dsra sed n-rilre/s ensure Eriai -rerferan-qe carii*f em fe from, o r area r tee equ p. -e.ri . a sg ns} less. They are arereq.e ri ■.srtrius cur- rent rat ~gs and for serious frequency ranges 124 fl-ktur El'etlrsnia - 7 - 8/2001 DrDAQ. s fof Dr Di.$ — Resistance Rentage Light ievei ■P^B . / \\ Temperature Microphone ^ . External sensors: Hi • Low^cTsU^^under £60 Ti • Built in sensors^fcr light, temperature and sound O (level and waverarms) M • Lise DrDAQ to capture fast signals • Outputs for control experiments \ • Supplied with both PicoS'cope (oscilloscope) and PicoLog (data logging) software For more information on DrDAQ, please visit: www.picotech.com/ • Scope and spectrum analyser functions • A fraction of the cost. of benchtop scope • Save multiple setups? for ease of use • Save, print and e-mail your traces . • FREE technical support for life • FREE software and upgrades f • Automated measurements l AVe-2/2 Virtual Instrument For more information on our scopes, please visit: J www.picotech.com/scope1 74 Tel: 01480 396395 01480 396296 E-rnail: sales(Q)picotech.com NET LINKS To book your website space contact Bernard Hubbard Tel EE 44 (0)1242 510760 Fax: 0044 (0)1242 226626 ALLGOOD TECHNOLOGY www . al Igoo die c n no) o gy, co m Low-medium volume sub-contract assembly. SMT specialist since 1990. Customers include military, aerospace etc. 0402 to BGA capabilities, automatic assembly and hand built prototypes. _ J .ijJ #Z_ PIIl-POOL 1 BETA LAYOUT v/vw/.pcb-pooLcom Beta layout Ltd Award- winning site in both English and German otters prototype PCBs at a fraction of the cost of the usual manufacturers' prices. BURN TECHNOLOGY LTD htto: www. bu rn tec . go m i Test & Measurement Equipment Distributors • Anemometers * Clamp Meters * Light Meters • LCR Meters * Sound Meters * Multimeters * Device Programmers Bum Technology Limited. Winfrrfh Technology Centre. Dorchester, Dorset DT2 8DH Tel: (01305) 852090 Fax: (013051 851940 COMPUCUT h itp : Av ww.co mpu c utte rs co m Computer Numerical Control from your home PC. Great for tricky jobs, and accurate repetitive work. We supply: - Software - Interface - Manual - Support Price £250 plus postage. CONFORD ELECTRONICS h ftp :// w im. co nfortisSec .com k Lightweight portable battery/mains audio units offering the highest technical performance. Microphone, Phantom Power and Headphone Amplifiers. Balanced/unbalanced signal lines with extensive RF! protection. DANBURY ELECTRONICS h tip: //WWW, mc-h .demon .co.uk 'transforms rs.himl Here you will find our mains and output transformers in Mike Holme's range of valve tube amplifiers (PP & SE). Also circuits, parts lists, chassis, advice. DEBUG INNOVATIONS UK http: ■ v Www. d eb upinn ov ati on s . co m Introducing hassle free prototyping ■ RF/ Analogue * High speed digital * Surface mount * O.T grid * Power planes * Unique patch architecture Forget custom PCBs, start your project now! EASYSYNC hltp://www. e a $ y syn c.co. uk EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and RS485 converters at competitive prices. ELEXOL PTY LTD bttp:/ywww.efexol^om Developer and manufacturer of • USB Development Modules. * USBMOD Series. • USB 1 024 Digital Input/Output Module * MP3 Solutions. - MP3M0D4 Module. Distributor inquiries welcome, ELNEC wvA7.elnec.com • device programmer manufacturer » selling through contracted distributors alt over the world * universal and dedicated device programmers * excellent support and after sale support * free SW updates ■ once a months new SW release • reliable HW • tb re e y e a rs wa rranty fo r most prog ramm ers IRVAN INTERNATIONAL CO. ti ilp : / ' \ wav. ervan-'n Leo m Power Electronics and Solar Energy Design and Consultants. Also offers; Discount prices of: * Ultra Bright LEDs ■ PCB LED Cluster Kits * User Pointers * Solar Modules * Batteries FOREST ELECTRONIC DEVELOPMENT http : fi wmv.fored .com k FED supply PIC programmers, Basic modules, and development software including a PIC C Compiler, Prog n Drop Visual Development and a well featured debugging environment. FUTURLEC http: /.VAViutur] ec.com Save up to 60% on • El ectron i c Co m po ne nts • Microcontrollers. PIC, Atmel • Development Boards, Programmers Huge range of products available on-line tor immediate deliver;, at very competitive prices. FUTURE TECHNOLOGY DEVICES http :/ Av.vw.Mch i p .c am FTDI designs and sells USB-UART and USB-FIFO interface Levs. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB HAMMOND ELECTRONICS http: //www. h am mondmfg.com sales^hammond- giectranicsxo.uk tel: 01256 812812. Small die-cast, plastic and metal enclosures for the hobbyist and professional. Widely available from major distributors. KOMCARD www. komGard.com Learn how fo design a PCI card, and write a PCI device driver. We lead you step by step with practical PC! projects you build. LONDON ELECTRONICS COLLEGE http:/ 'wmwIee.Gfg-uk Vocational training and education for national qualifications in Electronics Engineering and Information Technology iBTEC First National, Higher National NVQs, GCSEs and Advanced Qualifications). Also Technical Management and Languages. MQP ELECTRONICS http: yaw mq pe I e^tro nlcs.com k Leaders in Device Programming Solutions. * Online shop * Low Cost Adapters for all Programmers * Single Site and Gang Programmers ■ Support for virtually any Programmable Device NEW WAVE CONCEPTS http: :: n ew - v; eve -co nee pis .co m Software for hobbyists: » Uvewire circuit simulation software, only £29,36 * PCB Wizard circuit design software, only £29.36 Available from all Maplin Electronics stores and www.maplinxo.uk PCB WORLD http: //wWW; pc bwortti.org.uk World-class site: Your magazine project or prototype PCB from the artwork of your choice for less. Call Lee on 07946 846159 for details, Prompt service. U1IC1 PEAK ELECTRONIC DESIGN LIMITED v;v.T/.peakeleG.co : .uk Cool component test gear for your passives and semis, instant identification, measurement and validation. Connect anyway round. The Peak Atlas family starts from £59. QUASAR ELECTRONICS www. QuasarElectronics.com 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 2461826 Fax: +44 (0) 870 460 1045 Emaif: sales@Quasar0ectrGnics.com ROBOT ELECTRONICS . H n. f * http://VA T AV. r QbQi-electron i cs. co ,uk * Ultras on ic rangefinders * Motor H -Bridge controllers * Magnetic Compasses * RC servos and controllers * PIC programmers and components * Electronic Design 'Development and Manufacturer to industry TECHNOBOTS fitter vaywT ec hnebots. co. u n Welcome to Technobots - the one stop shop specially for the remote operated robot builder " radio control and engineering hobbyist. TELNET hit p; Wvvvy . te I n ef.u kxo m The site shows graphically Telnets wide range of quality second-user test and measurement equipment, including oscilloscopes and spectrum analysers. ULTRALEDS http : 1 ww.ultrsteds co.uk tel: 0871 7110413 Large range of low cost Ultra bright leds and Led related lighting products. Major credit cards taken online with same day depatch. USB INSTRUMENTS http:/ wv/vy.usb- in strum ears. com USB Instruments specialises in PC based instrumentation products and software such as Oscilloscopes, Data Loggers, Logic Analaysers which interface io your PC via USB. VIEWCOM h tip ; vav.v.v i ewco mi9 . c o. u k tel: 020 8471 9338 fax: 020 8552 0946 * Mail Order supplier of: B Integrated Circuits and Components. * Kit and parts for Elektor projects, * Transistors, FETs, Capacitors, Resistors, Crystals, etc and hard to find devices. Vrewcom Electronics, 77 Upperton Road West Pfaisiow, London El 3 9LT p i i i i i i t i E I J J I E I I I 1 1 I I 1 t 1 l I 1 I I It , Elektor Electronics have a feature io help customers to promote their v. ebsires, Xei Links - a permanent feature of the magazine where you will he able io highlight vour she on a regular basis. - For jusi £120 +- \ AT (£10.90 per issue for eleven issues i Elektor will publish your company name, a 25-word description and your website address, 4 For 1300 + N AT for the year i £27.27 per issue for eleven issues ) we will publish the above plus run a 3cm deep full colour screen shot from y our site. Places are limited and spaces will go on a striedy first come. first served basis, please tax back your order today! \ wish to promote mj company, please hook mv space: * Text insertion only for £120 + VAT 4 Text and photo for £300 + VAT ■■ ■ ■ NAME: ., JOB TITLE:.. ADDRESS: ■ ■ tail.- p-pit ORGANISATION: li^tTiiriiitiia .......... h §■ T ■'■■■■■■ * B ■ ■■ ■ PLEASE COMPLETE COLTON BELOW AND KAN BACK TO 0Q44-(0) 1 24: 226626 COMPANY NAME WEB ADDRESS 25- WORD DESCRIPTION ■*- - - - - S -- - .......... 1 l I l I t J l I J 1 1 1 l l l I I I ! I t l l c j ELECTRONIC ENTHUSIASTS Only one magazine tests its projects and circuits in its own iab before publication Contact: Worldwide Subscription Service Ltd, Unit 4 Gibbs Reed Farm, Pashley Road, Ticehurst TN5 7HE Telephone: (+44J fOJ 1580 200657 Fax: (+44) (0) 1580 200616 Or visit our Website: www.eiektor-electronics.co.uk “ — leeirotiles Item Tracer 1985 - 2003 imi PVT? ~zr x uyPw^M mmzn t u t te **T. _ — KTI ■ I !nhj Ii - - mL^M m_z:.3 a =r»:-xr aa/« g'-q ’ LTi EIT contains the digital contents list of all articles published in the magazine over the period 1985-2003. The EIT is supplied on a 3.5-inch diskette, runs under Windows and offers an attractive graphics interface. The program allows sear- ching for various keywords or combinations. AVR Modular Development System C compiler supplied Compatible! with mast development tools In-system programmable Free Atmel debug almulatar available Peripheral drivers and libraries supplied Increasing range of expansion modules Full web site support Based on the Atmel AVR controller Flexible and powerful ^ Check out Flexlt at www.ennovi.co.uk ©nijoyjjtd 0 ^44 {OJ-1425 47BBB4 sal u s|e n n ovi .co. u k Free! El on moaturajlie nl Embedded control Jntrin ei c safety Internet embedded systems USB interface Farnell DTV 12-14 Oscilloscope 0 ual Trs&s M MHz TV Coupling TEKTRONIX H P. E£tSA SjrsJ r AJ-l TV EM —--MV-- 52H3 ILEMWfiOiJ -M.-iioiOr Mb Tj nse 2i!Am _ ilia L »* 4‘1 LES523 GidToscece Dj;' Tree 3SV Hz EUG GOULD 0S3&0 d SdSteope EKssS Tr^ze HSflfc ESS KAUOHAL PAKASOHJC VPTTCSA Dstesttai AjsVSST £l2S KENWOOD VT17S ESS KEHWD0D RttQ iVCn £ Rzsr l T 5^r 53 XDiWGQD R1ISA Vrtw £ fteS*r LteiuLJsea 275 Knr £50 2445 A Fameff LF 1 Sirte/Sq Oscilloscope 10Hz - 1 MHz Qafy^X ha, S5St£ lltc' FM 15 _ HP. E53A «'Cti t:cFA TM * *-/! M HJ. S53H TAfcitFnjra TO>ra-lSOCVr? H_P. SBSt EHS-SSftl _ HA JHU M — SHHI MffJdflOT MIS 1= IffiKi I: 55Kt _ EAiCS AAw* . 737 : ECt -22SrZ tttFCCM *21 ia>?M3CMfir =- . _ IURCQU a:;- M hoike __ — h a. - L rr S H PTUtt S jT^lEJ m Ik ™ ttMSOMteDSay. Cutsora etc. Supplied wtih 2 Triutuia proijes. Tttzzm 22 12 l zZL £iz^-r 5cQf£- E_.i trao* TflCffJtrj ■: ir 7 “ :-::4r :•-■■, " £52 H P. £4;3lA C c -zrz Osc laOLIfc! 4Cr £42; C-ffliJS EB135I S5JT3 Lfcrel V=a» r,-* C&otSdt 5VT2&S LEO £0; eECKHAJi HQl«KEsasfiJ3S^D*fll28Ha^Sir^ TETTTiSfili 733360 Tr^i 2IGVHI tSS a*i THTPOhil TDSK'j I-jl — rLi=: iTIOIfrfi SOOl-tS raaF^KII TBSa:3 0* Tr®5r IKROT SWM Cut/ TflM TTSUKiiS^R . FmjAS PU3O0I i nKPS aj03s|i^ii i jrfKT, r:^fc . UASCOfti S3M A = ftsoia WiZir tfiH£*rHrgrJ ikiEed E1H Used MASCO K! 1619 Tryi z^z HUwi eO'JLO JJ3 SmSq ter I£6ir - IKteildt «a*wn W*m Kffifl &*Z4 c^ecnert &ro?s FLIEAL a»QTr^ RVS tf-jzTfisr 9SZ-3SBiE(tZ jizLi s “>: r 3 ££ tg^^PE Lt:^ 15QUKI E fcd?ie Ssrps tev “icf *y. ■Ji " _ til 353UK: Ck-L'-, 'iTt teE- 7 ^ SCOUHi teEjS:* L-;f, 7-ks ClTJf AVDi TrDTS H.p, 331ZA?.-. 5T- :• t KI*1 5 1 .' HI A.V. ??A S^oIaOt E_ 3 t rz Si.^'S^Trj H^to Rljiis £ FARh’ELI AMM2SA.1c^:e V-:: '7-7 -t i 5!, [ zM ItesjK-l _ _ £ FtttXEU DS$1 L Oar frsq S^t- B : ' 7 &-• ... L : a H-Tzm-z- ■ ._S:_i^: elz RUi£ 6C65A H f z.; •: Trjf R.WS WfJ A S c 71 ?-hl>.4V. i Tr? "a'l-f i-.h'.-i- £2231 ftp. EZSttfeKr* Aai\t.;- tl?£1 HP. S77A IBfZsGrt fcaj'jSi? 5-^233UKf DMt HJ>. SzSIOA Mozjjzc* DOMtft A^jie Lr 03: TO E3M TO WBieEKlOPalmtRfianSjW tlSM Rr^ffS PSGCS 2-1 Raffs =1 '3>: ya CAm ftti-v :W SCUUUflGH 71S5--Z &s2^tFEu.T2. Tafer jaw I j 3i : t hh I'lLl-Z uurncc-TiirJ 4i±zr . £tZs er OsQnioscppss Available H P, 33ICJI St- E-.r^S; 7rt?^L _ .z Ptfes fWKRL LFW4 E -7; tez:!^i>i ^~2 -Wr la Mi r.nzr. T el Mz-Z Az^iZjcH -UStif H P :+5A L- *-■: FnXs < Cl E-EA i T iZ E47A CLrriid Tr?ztf R.L r fE 77 !,r_ 3 £.3 FtmETTSif^ HEVi Mz LC?t D.'Tii dPCTLGD W3.TRS» Fraas Zu'Ki FriC EyrTtfili? i7-S7A-2t' tilt I lCiUfetr- SCM-^ iUit^sa 5 jtr :v±iz-w Mr- T .r 3 ; =e- £523 - icw-a- 1 Os^n-^r HJ>. Ee-771, SjC ‘ COOE - 1 MV-l f 1; &£Ti J HJ. £LB£,E Sjo, THK-Z - 9£L-VHZ Sg Sir EJI53 H P. JLtc- Sj rtr. T 00*32 - S9CBAK7 £- g . £5H RiS A-M Sji 1Hr-S>ZZ Sg&t- UI5 Qitfc'! ufiZL^lSii 1TC&; 3tfSl.t .CO RSLffS PHSSS1 Be &“ liCC-^lKWrZ *J'ZT 233Ki55& ‘‘1Z r “ fiAQU. Slii't B^nTS AliiTU Sg 5aS I'V.'Z-iLj’J 'd £232 H P. SJ254 £rtO> TuirtOZ £*3 2 ! Vra ££-S-S tMAutXl 65V; AapQafe Aia^se E1L?3 HJ. +i3LJV:;-rz-tit^ A^ur (SM H.P. ±2TIA ICR W^5t OObiOfffe £2751 K.P. E32A Osiidiit A-iVSK _ £4M AAUtkl lEL^ 'rCLJ-s:^ AaffsntS-fc Er«i HP. Ill LA ti'IZ-IfW/.t; UAJ-COK] 2445 =nq Cccr^r 2DSt £1t7J K P. S5T3 vt ; CeuTff S3&5 £3 1 i 2 HP. LULA t>= - 73B-M.g Ci-iTfaP £412 HP, 1SJ5 LrvC Mj-Tt- :0 CBETst £1ii: kUaCCBD ZK5 Vzc '7±:L' SStHhi - tM E?i I Portab cuja fUCAi Co^T r,^ 1 PIC 2 = 6Hr STB H. P. Crtf^r 1555 E3!31 A 3 Sir £455 H P .ijgi ¥W1 S^CXT- Ch A"B na r['I -!ir: -z ■ tilt-iz SWtT.TtUTtiJSH Aren't) Ali-JiV f-.nS^- S=- £1251 H P. 89044 S,t ,-iTc-cr Bit CC - sfiOrZ D#t>ttt234 SUOC ST« JlfftEH FaXZC- 5m z 2rQrIV.*l £l« * - fngjflcqs --Ljnzr HP, sltfA fer-Tt-r l-n-SOVr'. E157E HP, S5ST5 5it. fc- 5T-pa5Cftte CtPAlIAL JHTICSt liSHZ E41 SEEEOjSes st> , A^K?o S-Vi'j Azz;-*s^ ? ii5 23 'MS/, 0=0A IlE^V IKUBUYTHAimEft FSSJ PU»7 CM/ - l-LY Tkv-zz itzf ■azz.'j ! FARKOl &«W v zLA FARKEil Hoj25 CMV. 0-25A & PurtJ Sap^l| F^SSJtCI CM(U El PARKRL Dzl: FSU XA25-JT D-SV C-2A Tires €MB. LCO D^y E1E FAftaai 13^2 fraw 0-^A I FAR KELL M-r tS?/ {W14. j Mjtj tQet Perer Srj-iiies iTJ ji-!:. feoJEjjgTra^nKr V&i fcYtutSWW . ! JV 1 5V-Hi - 2-Sriz Dalron 1 0 PBr ( nigh GusJit/ 6 3 Digit ^snchi ?,( altimeter Trie /.ire- Current Convert er PZ?7E£ 1 KLr'BJL’Z LJ7 L ! Special Offers Spectrum Analysers OSCILLOSCOPES Radio Gommumcalions Test Sets 110 WYKEHAM HOAD, READING, BERKS. BBS 1PL Tefephone: ( 0118 ) S 26 EG 41 . Fax: ( 0113 ) S 35169 S . ste w art- a f - r e a dlng.co.uk L=- L”i >'■ -.ZZTZ iz~ iXz— W -&JBT ll- F _ GE i 7 T=:‘ r =— Es'i^Tr^T M7FJM Used Equipment - GUARANTEED. Manuals supplied. This is a V£ftY SJ-WiI SAVPlf OF STOCK. SP£ or Td^hoo&lpr Hste. Ptease disdc tefare cfdEsing. CAMAGE all utils £ 16 . VAT in be s^fel to Tc£J of Goods and Carriage- 128 efektor efedjofLtQ - 7-B/20O4 L readers services P tease Note Software listed @ L'J ays- it -r frgfntta Ffe f-Gsis page Qj fee Pfcfllsliers* wabstfe a WAV.: *■■•* J -r rJ ' rr : ~ ~ : : . K DSWtes are supp&ti feir fee convenience of reasfets wfhout Interna access £ US EVERGREENS EleKtor ElEdronics Help Disk 556022-1 D 4 < ’A'indows \wson 815 14.45 EJefctor Eleclronics Item Tracer 1985-2003 04501 - 3* 1 1 LiHTifite dsts: ix [ d -s> V. ido -a 7 erad 1 ) B -15 14.35 Universal Prololyping Boards UPBS-1 PCB 245 4.25 UF 85*2 2 PC 8 s 4-10 7.25 UPSS -4 4 FC 3 ; 6-55 11-55 no, 334 JULY/AUGUST 2004 IR Servo PiIdEdt Interlace . 1 : Q 20355 -H G 72 PCX prKr= _ 5 Jifl RC e:,'-:: 6 cc.f^ c:fe 4*3 8.65 020356-41 P ClfiffiKB pfu§Tc-T“^ 1 D-DC 3 17.70 020358*42 pfoorarmad 1003 17J0 Filicro Webserver wrih MSG 1210 Board 03 fiiKO -91 *A '^processor BesrU . n 73 y-£ss 7 69-00 112:50 044026-91 Network Ex^nswn BOS.TC r££fr-assanb& 5 d 41 &5 73.95 0440 - 25-^2 Cc” ti'rrf iMCToD-yi -r [ 44025-91 wi a:J t^aiTd afiWr 5 ) 103^0 164.55 @ 04402 5*1 ' l « wt 3 f>: E. T 7 r 5 j. 4 * So=nL PC 5 y 10-45 13 . 5-3 R C Analyser 103017 - 3-11 Dis-K PX Mwffig DHfe 4-93 5.65 0301 1 5 * 4 1 F, 0 l 5 fo 27-4 CR pttt 10-25 16.15 USA Cunverler Conlroiled via HTML .3 044034 - 1 ! C: i 1 EXinpl? peoersns 4*0 8.55 no. 333 JUNE 2004 Multi Programmer m 020338-1 PCB 8 - SO 15.66 @ 020335-11 C 7 4 fkirmsre & soyree 4*0 a .65 Pocket Pong s 030320 -H D'i’> F^C ;^s?c 4*0 3.65 Rail Router I 050403-1 PCS 10 -EO 79.15 m 030403*11 D-i'i PtC & PC sawe 4-00 5 65 030403^1 RC 16 F 877 - 2 &R jiragrsreTEil 21-45 37.35 Smoolh Operator ^ L-J: jZG'y-l T p- 7 - ?’,C 5 GltA , EJ 5 4-90 5.65 030 209*4 1 F, C 1 6F54 * i OR p -^TpT.7-: 14 70 26X10 no, 332 MAY 2004 Design Your Own 1 C @ 0303354 PC S 1555 27.70 HEgp-End Preamp ,!■ 025*46-1 FC3 **- maKi 3-45 14.95 @ 020046*2 PCS — lefey board 7-50 1330 @ 027C4B-3 PCS — PSUbasd 5-70 11.55 020046-11 C>:7 4*0 8.65 02004 5-4 1 RC 1 5LF452-'. L pfi^arm^ 28-20 49*3 Wind Speed S Direction Meter 2 65G3 71-11 QsK pn>jsl s c"a are 4*0 8.65 033] 7 1 -4 1 PtCI €-371, ptb^Tl T^ d 17-55 31,65 no. 331 APRIL 2004 Qrop-m Microconlrotler Board @ 0251 43-1 PCS a-eo 15.20 g 02D 1 4 £-1 ’ ESsk, 7 it yiig pfDjert ffe 4*3 5.65 Pandora's Sound & Music Bos ! 03*402-1 PCB 1060 18.75 GENERAL PnrifesKycea EoanSs (PCBs). sefeafcie^ri firm! pz~e. "=-'5. FICVfe, EPF [-Vs fills. GAis, toisfS art tfKV-Ks fa* promts utiicfi hare i : iri-rc ■ - f if ■ :: r E i : ta ; 3 n±y£* t? rf u ='- 7 lt I zt F-— :rr;E: ::::: T ± ":■— , -=j : =3 be Liipi ?g rex? ne'.vi^ l er,y T'z inv. :■-£ rsr r\ii; 1 PCB cii 5 r: _ *,ir- irjffj-rnaSa fttoagft fee Sander n^) yg fSj-Td h 75 refer*# EPRPJte Gftis filLs, Efi.Ei- VAC He BCs et: v"f' - :'d: 5 *i are i:_g - if re * : gfsjrfliedi : T£,5i zr: ::::- ::.y e *&&£ te vri-:= 7 -7 fyfiisHas “7 tot* tn : 1:7 pi:s a-to-1 z-v ~ :i": i _ 7 “ Pfv:-sS a “5 ilsn sfewn fc£f£ SBpEf¥£& £'- 77r EF1 f-TE't XK3 £. i T E PAST ISSUES r3i: ■ Zi'Z lZ r i-~y_ 7 I ;■ I-M-7 "=-7 " f ~ V/c]f:n':; SiMtr.pSisa Srrrlj-e Ltj, U"'t 4 G Hfisd F ta?.. Psstlij IM TICEHUftST TK5 7HE. Eu^Sari EsJfptesa {+44f 15S0ZC0S57, fu (-r44) 15E D 2KS1 6 azsirr n?$ .genres .ds s 3 n.cs 1 .iil ftices of p£# is&es {except Jidy/Augusi md 77-: -: " 1 7 -■: _r r ; 7 - :-~ 7 g f>: s'r : £ r c p'=s , 7 7 £■*.75 (UK ard ficc): C530 {arnsl Europe); B&.10 Z J “1 C'AJ.Zt Ei,~ "T Was Qf 512! AjjJjSI aid llfcsi£ff fesuet. rdoifeg pofege lor i-7i. L-f 75 : = : L-7 r: E" r = £7.-55 'ir-.L: iti EZ -5 2 - r : _ _ i :7 Ez^ie PAST ARTICLES fisr :—i: : piTZ lire's, p'7!!* ClrlLil 3_- tr»d fe luai&ljaiw B Offices. t^^TfOrar .Jrfi: 2flOGS7r^20v5Tc vr&a&s&iem- efecfr-yjcsLca _■ @ 0 3 £4 02-11 Osc sa^$ -. m 4 te • teefef 7-s &3G4D2-4 1 FSC 1 6f07l P phmhwikI VHP- Law Explorer S| 020416-1 F€3 No, 330 MARCH 2004 Buifd Your Ovm DRM Receiver @ 030365-1 PC B '3 030255-H Dsv Dh.V.£X= prcc'Trn Code Lock 3 021^34-1 PC3 3 D2&434-T1 C--S-. sc 1111.7 i -c cede f 7? 02043-4— 1 fi> 1 6.F54A4P pfogmsd Hands-on CPLDs (2) @ 0^52-1 pea -■3 030052-11 Sgfnii'a?e Q3G052-41 EP?jl7l2SSLC34-15 prograirnied Heliichanoel Failsafe for Radio Controlled Models S> 020332-11 [fc- s-:-_~7 cafe rfe 0202-32-41 52-24:;, pnsgffinrrea Mulljiunclhn Frequency Meter @ 030136-1 PCB ® 030136-11 £fe>‘ pu3jectsot7A'EJK 0 30 1 35^ J A7 S*j 0231 3-1 GFC . prepsfr.rsd No, 329 FEBRUARY 2004 Digllal Alarm CIccK :S 03£vf>1 7 D 7 i r. C 7.7;_T7 L" i f : ' Cftfe 0300^41 PIC- 1 6F84-G4 ?. progfiT.T^d [Access 2 020163-7 ' l 7 ■. 7.71- scarce cede irl c-.— D20 1 B3r4 i AT 3; 5 3 2 52- ' 2PC prsgrarnTicd Simple 12-I0-23DV Power Inverter S 1520435-1 B35 Toucff-cordfDlled Switch g 030214-11 0-44: F 3 TtTL 'vt co« 02021 --^1 FiG i ZC 5Q.3A C4 =-G-5. z^r t : 7d No. 328 JANUARY 2004 64-K B0C552 Flash Guard @ 030042-1 PCS g 030042-11 EKs-_ misc projrv? SfiftAsJs EBCSI 42-21 20FO1 0, prDgrsryosd DZ-D042-3t (xAL 16V8015QP fsn^rered Climate Logger £ U$$ 4-K) S-go 20-55 3640 A-dQ 155D 3-10 16.10 490 8.65 9*0 16.95 4*0 8.65 14 70 z$m 8*0 15.75 4-50 8.55 3540 59.10' 450 8.65 8-70 15.40 9-35 1655 4-BO 8,55 7-55 14.Q5 4‘^D S.65 15-20 25.50 750 13,30 13 90 24.50 8-50 15.05 4 00 8.65 6-15 10.K 9'3B 16.55 4*0 8.65 10-D0 17.70 6-16 10 JO r&m- Tm ar I sdijs j mm / J \ ^ - : ::. | ? z I'.z. 'di: .-.. ; . r ■'£. /. / s . . z.L . '■ iiir.r r com Double Sided, 16 mm, Plated Through, Green Solder mask, Hot Air Level, 1 Whit© Legend. Price Including X ntAUinH l W*T 7-8/2D0t - e! skier rSirtrcrJo £ USS % 030075-1 PCB 7 75 13.70 g 035076-11 D^Wtadm¥5 software 4-90 3.65 FMS Flight Simulator Encoder © D3GQ6&7 PCS 10-20 18.05 03006541 8/LF€J67B?fl. prcrasrvnetf 17-05 30.15 LED Roulette @ O30168-1 PCB 17-90 31JB0 @ 030168-11 E^sOHCB&idhBttks 4-50 B.65 030168-41 S9C2051-12FC, programmed 8415 14.25 Mufti-evenl Alarm Clock '@020304-11 ftst C (stupe) best ffts 4-90 6.65 020304-41 JBIsezoSMZPC.pDS^isned 6-10 1060 Stepper Motors Uncovered 020127-41 PlC16fQ73-2Q/SP 1910 £3 50 No. 327 DECEMBER 2003 FM Remote Control Transmitter & Receiver @ 034044-1 Fee ID-28 10.05 LED Christmas Decoration @ 030157-1 F€3 7-55 1335 PS7LPC76x Programmer @030313-11 Disk project software 4€0 6.65 Project Timekeeper m 020350-1 1 Desk, source £ rift* csk fifes 4-&E> 3 .65 020350-41 HCf6fS4-10p fragrejrjroed 13-15 2325 Stepper Motors Uncovered (2) @02812741 te*. sons cateflb 4-90 0-65 Universal Clock Generator @ 02035541 OisSt source code tie 4-90 865 Wireless RS232 Link @ 038204-1 ECS 070 15.40 No. 326 NOVEMBER 2003 Precision Measurement Central @ 030060-4 PCS 8 70 1540 No. 326 NOVEMBER 2003 Rev Counter Inr R C Models @ #24111-1 PCS 17*50 31.00 0241 >1-11 Esk. SOWEE and tex code 4 -90 8.65 02411141 09C2O5M 2PC. programmed 0-65 15.65 Running Text Display @ 025407-11 D^sotra aid tax code 49D 8.65 USB Analogue Converter @ 020374-1 PC# 7 65 13.5Q @ 020374-11 K&k, he* code and Wr-lsws sc-fr^are 4-90 8.65 02037441 FC16C765, preepanmed 13-25 7345 No* 325 OCTOBER 2003 DOS RF Signal Generator § 02&293-1 P£R r OEnsnSijr 1160 20.55 @ 02D2©-2 PCS, GOftojfeu^ 1248 2145 02029941 AT90S8515 flPC, pro^arored 3]*Ct software 4-90 8.65 020354-41 FiCl 6fB4A-1G£ prepartted 14-45 2555 Precision Measurement Central 030060-91 Efea^asaemttedAlE^t^ 694*3 11250 Valve Preamplifier (1) @ 000383-1 PCS, atnpHiEf board 11-55 29,40 ■m 020383-2 PCB, p oatr soptfy board 11 40 2020 @ 020333-3 PCB. 1 0 board 10-1Q 17.80 Nq, 323 JULY/AUGUST 2003 Add a Sparkle 43 020293-11 Disk, HEX and socro F3 k 4-3# 8.65 tE0293-41 PTv 1 2C50SA-IH SI- f . programed 7'4# 13.10 £ t/5 5 AT90S2313 Programmer @ D34 025-1 PC 3 995 16.00 Herd Disk Selector @ 03405Q-1 RGB S-45 16,75 Mini Running Text Display @ 020383-11 DEL*. scfjnc f = 490 3.65 Mini Test Chari Generator @ Q2O403-1 1 #>■ RC source c«fe 4^3 6.65 Programming Too! {□! ATIinylo m 03W30-1 PC# 7 l E5 13 35 @ D 30030-11 D.i’ pra^tt software 490 US Quad Bridge Car Amp m 034039-1 FC-B B-70 15.35 Remote Light Control with Dimmer @ 020337-11 C-;si HEX trd scarce- files 4-9Q 8.65 020337-41 -IE 502251 -12. 6-25 ■\G5 No. 322 JUNE 2003 * AVfl TV Tennis @ 030026-1 Mia PCB 5-70 15.40 @ 0300262 PusifitdlHi PCB 8-dO 15 £5 @ 030®fi-l 1 D: : ■,. AYR Sffir ref c ode 4-99 5.65 030026*4 - 47 9005 1 5 preg rsrersd 15-20 26.90 Eteclranic Knotted Handkerchief @ 023305-11 &’=■ PC and --■-■jc- f- «iiA-are 490 5.65 02 M3S-4 1 AT90S2 313-1 CPC. pnjg^wsBd 12-60 22-0 Law- Co st LCD Conlroiler (2) @ 020114-1 PCB 8-70 15.35 @ 02011 4-1 1 preset sofVft'sre 4S0 a.6-5 Highl Light Control g 020115-1 ' Efek. r£> sums code 4-ptD 5 65 020115-41 AI9OS2313-10PG, {WJffOTunsd 12-55 22.75 Universal XA Development Board @ 010103-1 FCB 1320 23.35 @010103^11 code, mtOil ben H=s T XAI>£V 4-90 6B5 010103-21 EF RW,t lC8 r 27 ClzS-SO, pregreT t hj 10-0# 17,70 010103-22 EPROM tC9 h 27C25&30. pregaamnied UHX) 17.10 010103-31 G4i 1^3 programmed 4 00 B S# No. 321 MAY 2003 Countdown Timer g 020236-1 1 Li.-. seuiEs E"d h^r ced2 490 8.65 02029M1 AIKS 1290 pf&giwnnsl 13-90 2-1.6# USA Audio Recorder a Q1 2013-11 0.3L EPSDWfee 4SC 3.65 '' 012013-21 EPRC' 1 ,! 27C512. p^anm&l 52-63 22.3# Valve Final Amp (2) @020971-1 ArnpESer bosjd {om= ds^BKTj 15*10 2575 @ 020071-2 PfrAtrav^lrad t#95 17.75 No. 320 APRIL 2003 8. Channel Disco Light Controller © #10131-1 PCS t3-l# 23.15 ’ 010131-41 87C750 or 57C71 . : nnsmbed 23*00 40.70 Pico PLC S 010059-1 PCB 1B70 33.1# @ 01 #55 9m i test pregam 4-50 5 65 Single-Chip Tune Control @ 020064-4 PCB ID -53 19.30 Swrtched-DuUel Power Bar with RS232 Conlrol @ GZ0295-1 PCB 1080 19.10 @ 020295-11 Disk. prc>:z KfrAtE 4-90 8 65 Temperature Indicator for the PC © 02D38O-1 J D^k. source r-d iLTiEt-: cods 4-52 5.65 02038041 AT6SC2D51, pcoffiarmsd 10-25 18.15 No. 319 MARCH 2003 17 V . 1 0 A Switch -fdode Power Supply @ 02ll : 54*3 PCB S-45 16.65 Add-on Switch unit lor R.'C Models @ 020125-1 FCB 8-95 15.35 @ G2 01 26-11 C ',;.k fe* sid source Btu 4*90 £.65 0291 26-4 1 F£1 EC71 2-041 BO. prw ^Tjt« 15 20 26.93 AVRee Developmenl System @ #20351--: PC 3 13-20 2515 @ #20351-11 Disk, eampte p^o^ans 4-S# 8,65 Guitar Effects Switchbox @ #2018-1 -1 FCB 13-15 23.5# Intelligent Fan Timer @ 920170-11 Dsk j-tJ™ Sv-t, .',=:= 4-53 5.65 02# 1 7-0-4 1 54SP4S.Df1 1 21 . pn&rared 11 '30 20.00 Products for older projects (if available) ftisy he found on our web site http:llwww.elektor-electTonics.co.uk 130 tlcktcr ekttorcs - 7-S/2Q04 pcb layouts TV Commercials Kilter 04Q05 1 1 (solder side) TV Commercials Killer 040051-1 (component side) Canon EOS Camaras go Wireless (ira mm Trier) 030432- 1 Canon EOS Cameras go Wireless (receiver) 030432-2 F WM Modulator 044040 - 1 /nje/Jjgenf Flickering Light 04 COS 9- / (R Servo Voter Interface for RCX 020356- 1 R/ C Analyser 030 1 /$- 1 7-8/2004 - ebefrenks 137 sneak preview Bluetooth for Micro controllers This multi-purpose module and associated soft- ware allows □ microcontroller system to commu- nicate with Bluetooth devices like mobile phones, PDAs, notebooks ond PCs within a range of about ICO m. Using the project software you can create a user interface for your microcontroller application an any of these devices. The link to the micro itself is by way of a TfL or R5232 ser- ial cable. Swiss Army Knife The name "Swiss Army Knife' was chosen for inis project ia emphasize the incredible versatility of a small BASIC controller board based around an Aims! 89C8252 and a USB interface (optionally: RS232). The interface allows a BASIC pro-gram of up fa 2 kByfes to be loaded into non volatile memory. Provided you have mastered some BASIC programming, the project offers a simple and very rapid way of developing turnkey appli- cations like alarms, controls, temperature regula- tors and much more CiariTy 300-watt Class-T Amplifier After the first ariicle instalment in the June 2004 issue we're ready la con- tinue with the construction of this awe- same amplifier. Also,.* Wireless USB Module Working with the PICI8F Series SMD Dice Room Thermometer Inside out: Body Fat Meters Update: Microcontrollers In ihe Market Mini Project Slave Flash for Digital Cameras RESERVE YOUR COPY NOV/! Tb kpl&fntsr 2054 yrcs ci sn FA/ 20 2011 1UX dsirt s\m orJ/T UK sdwtribrc v.iii receive the magazine s few days before shli dole. Article title s and magazine contents sirb[ert to thtmg?. NEWSAGENTS ORDER FORM SHOP SAVE / HOME DELIVERY Please save / deliver one copy of Eie&ror Electronics magazine for me each month Name: * . . . , . — Address: „ . * Pd st code: Telephone: Daie> **■ * * * Signature: elektor electronics Please cut out or photocopy this form* com- plete details and hand to your newsagent. Elektor Electronics is published on the third Friday of each month, except in July. Distribution S.G.R. by Seymour (NS), Index of Advertisers A good Technology. fiel Links .vvv.v. a ::: due reexg/ : : ' Beta Layout, Met Links . .... jfwpcfrjtftf.r&n? ...... SK Sectrcnfes ................. YAYiVhte'ec cc-m ....... Bum Technology LTD, Met Links ...... a\wa vx . tec. c::~ r CMS ....... jw&cnisjik. tom ........ Comp-ucut. Met Links ....... .at:, ■: cc ~ : ........ Contpu logic Av^campufogHunfo Contort Electronics, Net Links ...; *.vv:.cc nfn 'C e;ezxu.l - ......... Crtcktewflod ... Danbury, M=i Links aws. r.c-r:. < 25 menxa.ii': Debug InMvatkms, Net Links mmdetiugh ino'/ati&is-pain .. . . . Display Electronics .......... awya \ aiste xo.-..- — , Easysync, fiat Links yam. sss/sy ' : :s. c- : . - . E'&tcl, its! Links z/ayax'xj-z. .cc.T? - *?ti sc, ?Jet Links •mw. e fnec. cd>t< — Eftrwvi ........... .... .Yi'wvxr rtovico.uk .... Erven IntemaiimaL Net links w ww er. an* itxm . Eurocaculs v/w.tiwpciJsriQpxnm Forest, Net links .WflmAwEtf.co.ifk .............. Future Technology Devices. Net links . . vya ; " p :: " ............. Futn-iec. Net Links ........ ..... .wav, fhtefsc.c cm ............. Ham .mend Bectmnks, Net Links w«i ' -v '::r/r:-g.c:~ Hitax .iwr.r Mexco.fA ......... OP lYAA.ftB Wl.cam ............. Komcaiit. Net Links ................ zawa e v co •? Labcenfer w wiY,febcenieic&.ui ........... 126 ...101 126 ...... ,135 126 ....19 ...... .126 101 12S 19 .. 126 126 ...... .105 .......126 .......126 ..126 .128 ...... .m .... ...129 .......126 .......126 ...... .126 .......126 .......115 19 .......126 136 Lor den Electronics College. Net links . . s r .w.\ sc.crg.L- - - - — 126 MsSjk Multimedia Ltd ..... .... .ih* a r : ~ec axox'< — -115 Milf&rd Instruments a a ax:. . ~s:. ce ~ z r c-: - .123 MQP Electronics. Mel Links . .... tee:":- ' ........... — 125 Net Lifts - - . - ■ . .126 127 New Wave Concepts, Net links .wwa'sea -as x?x nxQ.uk . ....... .2 PCS World, Net Links AAA.zztA Giid.vrg , 126 Peak Etectromc, Net Links wa a pee ketec.co.L'k 127 PiCO ......... .com ............ 125 Quasar Bectronics, Net Links ........ av,y,\ Ewe-e crc " :s. cm .3,. 127 Robot Electronics, Net Links r/.v r :: :-e e ::x- cs. .... ... .127 Stewart oi Rsac-ng .... .:■■■. v. rer. cxm-reac-g. :: .123 Tectmabote, Net Links ,'.7,v v.iE-znrxczts.cc... ■. .127 Telnet Net Links ... -isw4 :e "e:. . lem 127 Uitrateds, Net Links ,.v .-.v. t&EtisxojJ — -127 USB Instruments, Net links .ayca/liz- -Etfcrnsns 127 Vtewcom, Net Links ...... aw*v. w&vcomJ9-co.iA 127 ADVERTISING SPACE fortes Issue Gi 21 Sepfenter 20 D4 may be restr.ee nat later ttun 25 August 2004 v.ftn Bekter Esc teenies iPutmhing) AdverBs^Tte^t Cteze - 3 Crescent Terrace - Cbe-tenham GL50 3PE - Eng ! and - Telephone 01242 51Q 769 - Fax 01242 225 526 - e-ma . :e r ~~~v _ ' : - • • 2 - ' ' ne.cn k to ivhom a corresponds nee, copy instruettens and aitwofl- sboute be addressed 132 elektor elscimrilo - 1 -S/2004 Please supply ihe to 1 1 o v^ing _ For PCBs. Irani panel foils. EPROMs. PALs, G ALs. micro can [rollers and diskettes, siate the pari number l.^\ 3nd description: tor books, stale tfie full title; for photocopies of articles, slate full name of article and month and year of publication PLEASE USE BLOCK CAPITALS, I 00 n: Description Price each Gly. Total Order Code r_ i k CD-ROM Robotics £ 12.05 Micro Web Server; MSC 1210 board z s9„oo Network extension t 41.95 Combined package £ 103.50 cd-rom ECD Edition 2 E 12.95 Item Tracer 1 985-2003 e 8.1 5 — .Piinss and item descriptions su bj ect tochapga. Sub-tots/ Tbs poMisbers reserve ite riabl to rterajg prices WitfHHrt pii-jr notify u? Prices' sird i ism if si$c ri pji pns p o p shown here stipjjfse&s tfmse in previous issues. E. & O.E ' Total paid SWITCH ofify: issue number: METHOD OF PAYMENT (see reverse before ticking as appropriate) Note: cheques not made out in sterling must be increased by the equivalent of El 5.00 CH Bank draft □ Cheque (payable to Elector Bectranics Publishing) □ Giro transfer (our account no. 34 1523S01) □ Postaf/money order □ Name Address t cade TeL Pax Date Z .T 5 - EL07 Please send ibis order form to ' (sea reverse for conditions? Eiektor Electronics (Publishing) RO. Box 190 Tunbridge Wells TN5 7WY ENGLAND Tel: (+44) (0)1 5B0 200 657 Fax; (+44) (0)1580 200 616 I nt ernet : www.e Eektgr^ef eciran ies.co.uk ’USA ami Ci'izi r^sidenls may b-isr- fici o&- ggd to) u$® 5 : r css and sea# tfta order form to: Old Colony Soy nd P.O. Bm 576, F+^borough HH 03153 r r : (603) 924-637T.. 924-6526. TR-* : :: Email: custservSaomoXprcss.corii Ik 3 o K Yes, I am taking out an 18-month subscription to eiektor electronics and receive a free 128-MB USB Memory Stick. f would llRce: □ Standard Subscription (17 issues) □ Subscription-Plus (17 issues plus the Eiektor Volume 2004 CD-ROM) Sea reverse for rates 3rd Canadians. sttakpr PMOJttrs D Tips £ lOtM n. .Cl o co =3 c 0 Title (DtfM&Mis/Ms*) Initiate Surname 'fame Add 'ess P&si code Email Date - 2004 Signature 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 Eiektor Bectrorcics Publishing) Giro transfer four account no, 34 152 3501) Postai/money order | ~ ■ | = f r - . - ;r TT VISA Exniry date: * crass out what is not applicable EL07 Please sen 2 iris order form to Worldwide Subscription Service Ltd Unit 4, Gibbs Reed Farm Pash ley Road Tice hurst, nr Wad hurst East Sussex ENGLAND TN5 THE Tel. (+44) (0)1580 2.GC657 Fax (+44) (0)1580 200616 Email vavss © ww ss.d emon, co.uk ORDERING INSTRUCTIONS, P&P CHARGES Excepi m tne J3A a -id Canada, all orders. exce;:t for subscripfions i for v/hich see below must be sent BY -GST or FAX to our Tunbridge Y/elfs redress using the Order Form ovaneaf. ON ins ordering: httpi-Vm'rtv.elekior-elect ronics.to.uk Readers in the USA and Canada may * but are not obliged to) send orders, except for subscriptions (tor which see below). to the USA address given on the. order form. Please apply to Old Colony Sound for applicable P&P charges. Please allow 4-6 v.ee^s for delivery. Orders placed on our Tunbridge Wells office nust include P&P charges | Priority or Standard) as follows: UK: £3.50 Europe: £5,00 (Standard) or £7.00 Priority \ Outside Europe: £3.00 Standard \ or £1 2*00 (Priority) HOW TO PAY Lintess you have an approved credit account with us. a \ orders must do accompanied by the fail payment, including postage and packing charges as siated above.. Payment ms.: :e made by cheque drawn on a London clearing bank (but s=9 pars. 4 below), postal order. ISA Access. MasterCard or EuraCard (when paying by credit card, the order must go file cardholder's address). Dd not send cash through the marl Cheques and postal orders should be crosscj are made payable to 'Elektor Electronics i Publishing A Payment may also to made by direct transfer from a private or business Giro account to our Giro account No, 34 152 3801 by completing and sanding to the National Giro Centre, in a National Giro postage pa d envelope, a National 3 ro transfer deposit form. Do not send Giro transfer direct to us. as this will decay your order. A you live outside the UK. payment may also to nia.de by Bankers’ sterling Graft drawn on a London clearing bank. Eurocheque mace out in pounds sterling with holders guarantee care number written or the back), or US or Canadian dollar cheque drawn on a US or Canadian Park. If you pay by Bankers’ ster mg draft, make clea: to the issuing back that your full name and address MUST be communicated to the London clearing sank. Our rankers are NAT WEST PLC* 1 St James's Square, Wadhurst, East Sussex TN5 6BH, England. Our account number is 3512 5225, Sorting Code 60-22-15. IBAN code: GB40 NWB K8 022 15 3512 5225 BIC code: NWB KGB 2L COMPONENTS Components for projects appearing in Elektor Electronics are usually available from certain advertisers in this magazine. If crffictiitfes in the supply of components are envisaged, a source w| normally be advised A the art c e. Note, however; that the sources) given is arc- no: exclusive. TERMS OF BUSINESS Delivery Although every effort will he made to dispatch your order within 2-3 weeks from receipt of your instructions* we can not guarantee this time sea e "or a orners. Returns faulty goods or goods sent in error may be relumed for replacement or rsfuto. but no: before obtaining cur consent All goods relumed should be packed securely in a padded hag or box. enclosing a covering letter slating die dispatch note number. If the goods are returned because of a mistake on our pgrt v/e vrifi refund tne "Glum postage. Damaged goods Claims for damaged goods must be received at c.=- Tunbridge 7/e Us office within i0 days (IIKT 14 days f Europe l or 21 to_.-s fal! 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 citouto. devices, components, and so on, described in our books and magazines, Elektor Electronics (Publishing) does not accept respo risibility or liability for lavmg to identify seed patent or other protector;. Copyright Ail drawings, photographs, articles, printed circuit boards, programmed integrated circuits, diskettes and software carriers published in our books and magazines (other than in third-party advertisements) are copyright and may not be reproduced or transmitted in ary form or by any maans, induding photocopying egg recording, in whale or in part without the prior pernis- sion of Elektor Electronics (Publishing) in writing. Such written permission must also be obtained before any part of these publications is stored In a retrieval system of any narars. ttofttthstanding :ne above, printed -circuit hoards may be produced for private ato persona! use without prior par- mission. Limitation of liability Elektor Electronics (Publishing) shall not be liable in contract tort or otherwise, for any loss or damage suffered fay the purchaser whatsoever or howsoever arising out of f or in connexion with, the supply of goods or services fay Elektor Electronics (Publishing) other than to supply goods as described or, a! the option of Etekior Electronics (Publishing)* to refund the purchaser any money paid in respect of the goods. Law Any question relat ig to tee supply of goods and services by Elektor Electron -:s Publishing sha!: he determined in ail respects by the Jaws of England, January 2004 SUBSCRIPTION RATES FROM JANUARY 2004 ISSUE United Kingdom Standard £39.50 Plus £45.50 Economy Mail Res* of the World (excluding Europe) £51,30 £57.30 Priority Airmail Europe & Erie £52.50 £58.50 Middle East. Africa. Southwest Asia. Centra' & South America £64*00 £70.00 Australia. New Zealand. Far East & Racine Territories £66.00 £72.00 Airfreight USA & Canada only US$88.00 USS96.50 Payment should be made by: * Cheque or barkers draft in sterling drawn on a London dealing bank (except in the USA and Canada — see below): ■ USS cheques drawn on a US or Canadian bank — only by subscribers in the USA or Canada. * Dfrecl transfer to our bank PAT WEST PIC. 1 3! James’s Square. Wadhurst, East SussexTNS eBH, England)* Our account number is 3512 5225. Sorting Code 60-22-15. IBAN code: GB4Q NWB K6 022 15 3512 5225 BIC code: NWB KGB 2L ■ Postal order. * Credit card: VESA, ACCESS,. Euro MasterCard,. JOB Electron or Switch , , “insrar ro cur Giro Account number 34 152 3301. Giro transfers should be made tv completing and sending the appropriate transfer deposit form to the National Giro Centre (UK) or to your national G=ro Centre, Cheques and postal orders should he made payable to Elektor E setromes Publishing!. Do not send cash through the mail. SUBSCRIPTION RATES FOR 1 8-h/IONTH SUBSCRIPTION United Kingdom Standard £59.25 Plus £65.25 Economy Mail Res: o : re Wor d (exclud ng Ecraca £76.95 £82*95 Priority Airmail Europe & Erie £78.75 £84.75 Middle East, .Africa. Southwest Asia. Central S. South America £96.00 £102.00 Australia, New Zealand. Far East & Pacific Territories £99,00 £105.00 Airfreight USA & Canada only USS1 32.00 USS1 40.50 SUBSCRIPTION CONDITIONS The standard subscription order period : s tweive months, if a permanent c h; ang e of ad dress d a ring -to sub sc ri pti on p btI ad means th at c o p ies have to be despatched by a more expensive service, no extra charge will be made. Conversely, no refund will be made, nor expiry date extended* if a change of address allows the use of a cheaper service. Student applications, which qualify for a 20 = L (twenty per cent) reduction in cur ram rates, must be supported by evidence of studentship signed by the head of the college* school or uni varsity faculty/. A standard Student SubscriDtion costs £31.60. a Student Sufascri pti on- Eras costs £37.60 (UK only)* Pirase note trial new subscriptions fake about four weeks from receipt gi order to become effective. Cancelled subscriptions will be subject to a charge of 25% (twenty-five per cent) of the full subscription price or £7.50* whichever is the high- er, plus the cost of any issues already dispatched. Subsciplious cannot ha cancelled after t he; have run for six months or more.. January 200- 19 INCH BK ELECTRONICS OMP MOS-FET POWER AMPLIFIERS HIGH POWER, TWO CHANNEL 19 INCH RACK Try us for Tivoli Radio Truofi Rad** 1 Just £91.95 Carnage £3.03 XLS 200 Subwoofer Syterrr Save £lQ0 r s buying factory direct 1 0.000's SOLD TO PRO USERS THE RENOWNED JVJXF SERIES OF POWER AMPLIFIERS FOUR MODELS:- MXF20O (100W + 10QW) MXF4G0 (200W + 2Q0W) MXF60O [300W +■ 300WJ MXF9Q0 (45GW + 450W) ALL POWER RATINGS ARE R.M.S. INTO 4 OHMS, WITH BOTH CHANNELS DRIVEN •iSni "In dent power supplies with two toroidal transformers _ IViTn L.E.D. Vu f. siers Level centrals * nn. r- z ~ - i=m- s yi o Vre have combined the famous Peerfes XLS10 with our renowned BSBP2O0/4 sub bass panes in a compact MDF cabinet that measures only D390 x H295 x H295 to produce a tm!y awesome sub woofer system suitable for both Hi-Fi and AV use. rtQftter Comment^ Features:- x H gh and tow Seva: snouts ’Frequency adjust 'Continous phase- centre! "200W RMS 'Separate contra! of high and low level gain 'Automatic Speaker Protection. Comes complete with mains lead, cm stereo ptonn lead/IOm High teve! lead and Spikes Available in Silver or Black, for further information please look on our website at http:7Avww.bKelec.com £279,00 Each plus £3.00 carriage within the UK mainland. International carriage charges to Germany, France, Belgium. Luxebourg and Holland at only £16.00 per XLS 200 MXF1200D 60 0W Per Channel Class D USED THE V.'OFLD OVER Vi CLUBS. PUBS, CINEMAS, D>3COS ETC MXF200 W19 T Dll" H3 : /T 2U Cl7cc . MXF400 W1B* D12' H57** f3U S!ZES ‘~ MXF600 W1Q’ D13* H574 (30 MXF900 W19' D14' H5W (3U PRICES:- MXF200 £175.00 MXF40D £233,85 MXF600 £329.00 MXF900 £449,15 SPECIALIST CARRIER DEL £12.50 Each ABSOLUTE HIGH END CLASS D AMPLIFIER The OMP MFD60O can be used as a stand alone mono block amplifier or fitted into existing loudspeakers to make them active • Compact design due to switch mode P.S.U. % 90% Efficient high switching frequency • Smali size r fits in a 11 0mm x 92mm opening • Neutrik® Combi input balanced / unbalanced • Output fully protected • Status LEDS - Presence / Clip / Protect • 600W/2 Ohm - 500W/4 Ohm - 300W/8 Ohm m All powers in RMS. » Volume control. Input sensitivity 775mV Preq. Response 2Hz-20kHz Price:- 469,95 Inc. V.A.T. Carriage £3.00 { ] The MXF 12000 is not onfy 3 must for PA and D'sco use, but ft s stunntog performarrs fends tedfneac^toStutfoandHj^PQf^verAVCiiemaf^afe^tsalShsutebteforl-fr&xil-SfiiEeL CanbedmBnc&BCt&DrnaCDptay^and has balanced XL R Input, unbalanced jack input power On/Off swftch with cool Kue rated surrounds. RearPanel> Mains I EC aput Neuirik Speakon outputs and Neutrik Combi inputs Golf Sail Height Specification:- Output power 6G0W RMS into 2 Ohm. 590W RMS into 4 Ohm, 3 GOV- RMS into B Ohm Frequency response 2 Hz to 22kHz, Input sensitivty 775mV, Input fmp.7.5k Ohms, TH.D. 0.1 % T S/N 85dB, Power Supply 230V AC 50Hz, Switching Fmq 450kHz, Weight 8.0kg, Size H44 x W4B2 x L376mm SUPPLED READY BU._T A. 1 . □ TESTED OMP MOS-FET POWER AMPLIFIER MODULES Trsse rro±i!'es r^erppy a uErid-wcfe repuLWi 1 for quaSy, reSd^y ^id performance at s. pree, r>_* mccfefe are aralafete fej ajt the reads cf the professorial and hobby narkst 3s. .Indus&y. Lesun^ IndfLfr^feS ViVkti comparing prices, NOTE Eh^ si modes fcrdtLj potrer s_£ffY, fa nafea * m P 1GB- aaddmetrafe to pawra conpaSss Vd it^t Ai mDdefcaraiJi^^stxdm^pciol THOUSANDS OF MODULES PURCHASED BY PROFESSIONAL USERS - OMP/MF IDO Mos-Fet Output Power 110 /-sis R.L1.3. into 4 ohms.fmauency response 1Hz - lC0:*:Hz -3dB. Damping Fa^cr >300, Slew Rste 45V.uS, T.H.D. tvpxe! O.OGz'-L Input Sefisftr«'ity 500mV, S.N.R. IlDdB. Size 300 xM23 x 6Gmr' Price:- £43,35 + £4.00 P&P • Light weight 3kg For further information please look at our website at Lw.w.bkelec.com and dick on the modules and hybrids button Special quantity pricing and customised artwork for OEM T s, Price £28 1.12 Inc Vat Each or £499.00 Per Pair when quot- ing this advert Carriage UK Mainland Only £8.00 Stunning performance Audiophile Quality XT. ue Ajr i bo u-.cz 50W to 5QQ WATT ACTIVE SUB BASS AMPLIFIER PANELS me BSB Range of Sub Bass AmpTefs census of 5 CS'IS E .vih SIvV.lo sC\ most of the 0! Y Enthusiasts needs. A3 pene-Is are aktjghi and come eeju pped wilh both high arid tow tevel inputs with separata gain controls, frequency adjust end 0-180 Deg. continous phase control adjustment A full cenneefcn tead pack toduded OMPfMF 209 Mo s-Fet Output Pd.ver 20 Q a ails 1 RM.S j in to 4 ohms, frequency (response IHzj- 100kHz -3dB. Dampino Factor >3hu H Sfew_.Rafe SOV/uS, TH D typjcaJ 0.001% Input Sensitivity 500 mV, S.N.R. IIOdB. Size 300 x 155 x iCGmrn - Price:- £67.35 + £4.00 P&P OMP/MF 300 MoS'Fet TOutput Power 300 watts R . m , b into 4 ohmsTreguencv resc-onss 1Hz - 1(30 kHz -3dB. Damning Factor >300, Slew Rat 5 0 Wu S , T.H. D. tycicsTO 00 1 % . Trjpuf 500 mV, S.N,R. IICdB, 5 r- Wil xtf _ Price:- £84175 +"£5 . 0 0 PSP ale Sensfirv^y 75 x IGOmrn. OMP/ME 450 Mns-Fet Outnut Power 450 watts R.M.S. into 4 oh ml frequency response 1 Hz - IGOkHz -3dB. Damping Factor >300, Slew Rate 75 VjuS, TH,D. typical 0.001%, Input Sensitivih- 500mV STJR- IIOdB. Fan Cooled. DC. Loudspeaker Protedinn 2 Second Anti Thu mo Delay. Size 3B5 x 210 x 105mm ! Price:- £137.85 t £6,QQ PSP | OMPj'MF 1GOO Mos-Fet C..X 4 . Fc : J 1 1 j a:\i R-M.S. into 2 ' ahmsr frepasney response 1Hz - 100kHz -2dB, Damping Factor >3m. Slew Kate _7|V^uS, T.H.D.-typfssl 0.001=4. Input Sensitivity 500mV, S.N.R, IIOdB. Fan Ceded, D,CT. Lauospeaker Protdot;on ; 2 Second Anti Thump Delay, Size 422 x 300 * 125mm, e Price:- £264.00 + £12,00 P SF VCCLTES ARE NTVO \'ERiOf S STA'CARD - f Tk/r SETS Sf j^’vEAkD»MTn-i ra>3-t OR PEC sexm. ECLT : '.'E>n‘ cc^eroja * mjrsets 1 1 ut ,4 5A 4 47r\ > 0rri5iTHz- OfffitR STATON Cfi PEC MODEL PRICE IMP. * Please BSEP50 £89.95 8 Ohm State 4 BSBP100 £117.44 M/8 Ohm or 8 Ohm BSBP200 £149.50 M/B Ohm when BSBP300 £184.50 4 Ohm ordering BSBP500 £219.50 4 Ohm Model Shown:- BSBP2QQ S ^| C,F r P0W£R 2G0W RMS @ 4 or 8 OHMS TREQ RESP. 10Hz 15KHz DAMPING FACTOR >200 * DISTORTION 0.05% * S/N A WEIGHTED >l00dB * SUPPLY 230V A.C. "WEIGHT S.OKg ' SIZE H254 X W254 X D95mm ARE 2 VERSIONS OF THE ABOVE PANEL AVAILABLE :-BSB200/B 8 OHM VERSION BSB200 4 4 OHM VERSION CHECK WEBSITE FOR PAN ELS UP TO 500 W P.l ELLERY CHARGES:- PLEASE INCLUDE AS ABOVE. A MINP MUf.1 1 CHARGE OF £8 00 TO A MAXIMUM AMOUNT OF £30.00. SfPCfAL CODERS FROM SCHOOLS. COLLEGES. GOVT,, PLCs ETC PRICES INCLUSIVE OF VAT SALES COUNTER CREDIT CARD ORDERS ACCEPTED BY POST PHONE OR FAX The renqwTtsd Peeriess XLS 10 Dr >e jr i is rv ere cf the best 1 u :nct5 suh woofer d-nvejs avs; =t'B locay \'zd= : ri Denma^; by Peerfess, a cc— rsny i^TionymoiE^ with que' :> and cfaflsmgr=r'p Tris dr. .-e uni is IdsaS fj- nc-^E on Intn s.ti# ’ er-crasures cf ansund 17 Rjhs and v. CiVE a bgtxt centre ea deep ca-zs culr-ji Tc futths^ sfiharca the- pjL - Lei of this unit g:sst=royfcut and deeper z=i= can be achieved by cou- P rg the XL SIC, with d's csmpar'sn pas&ve r=d atp: the XLSIl? Peerless XLS 10 £89.00. Peerless XLS10P 32.90 Carriage £8.00 For full specification and prices goto our website at http:/A'/wvr. bkelec.com and try our new shopping basket facility UNIT 1 COMET WAY, SOUTHEND-ON-SEA, ESSEX. SS2 6TR TEL.: 01702-527572 FAX.: 01702-420243 Web:- http://www.bkel ec.com E-Mail saies@bkelec.com 7-8/ 2G-Q4 ■ el&lslar elsdronlcs 135 Auto Placement Models r\ H Schematic & PCB Layout Simulation mmh t-ilu I ™ 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. Mixed Mode SPICE Circuit Simulation Berkeley SPICE3F5 simulator with custom extensions for true mixed mode and interactive simulation. 6 virtual instruments and 14 graph based analysis types. 6000 models including TTL, CMOS and PLD digital parts. Fully compatible with manufacturers’ SPICE models. m Version 6.5 Textual library part search. User defined keyboard map. CADCAM output to ZIP file. Bitmap import function. Truetype fonts on PCBs. Enhanced printer output. Call Now for Upgrade Pricing www. labcenter. co. uk info@labcenter. co . uk • Supports PIC, AVR, 8051, and BASIC STAMP micro-controllers. • Co-simulate target firmware with your hardware design. • Includes interactive peripheral models for LED and LCD displays, switches, keypads, virtual terminal and much, much more. • Compatible with popular compilers and assemblers from Microchip, Crownhiil, IAR, Keil, and others. Proteus VSM - Co-simulation and debugging for popular Micro-controllers