FREE SUPPLEMENT DECEMBER 2006 £3.80 www.elektor.com presents prototypes mTnwtm W r 1 H L ' i il Hi § 9 770268 45112 8 copy ,tafc>9 ue 410+ P a9 o C “ C KW P rob ' itia «t's « o P website \o9 «« to °-Lco.uk/ca' ’ ,^\ectrontcs co IR Romote Control Extender MKII KC-5432 £7.25 + post & packing Operate your DVD player or digital decoder using its remote control from another room. It picks up the signal from the remote control and sends it via a 2-wire cable to an infrared LED located close to the device. This improved model features fast data transfer, capable of transmitting Foxtel digital remote control signals using the Pace 400 series decoder. Kit supplied with case, screen printed front panel, PCB with overlay and all electronic components POST AND PACKING CHARGES: Order Value Cost Order Value Cos £20 - £49.99 £5 £200 - £499.99 £30 £50 - £99.99 £10 £500+ £40 £100 -£199.99 £20 Max weight 121b (5kg). Heavier parcels POA. Minimum order £20. Galactic Voice Kit KC-5431 £13.25 + post & packing Be the envy of everyone at the next Interplanetary | ' Conference for Evil Beings wJ with this galactic voice ^ • simulator kit. Effect and . * \ depth controls allow you to vary the effect to simulate \ } everything from the \ . F metallically-challenged C-3PO, to the hysterical ranting of Daleks hell-bent on exterminating anything not nailed down. The kit includes PCB with overlay, enclosure, speaker and all components. For those who really need to get out of the house a lot more. Take me to your leader. • Requires 9V battery Magnetic Cartridge Pre-amp KC-5433 £11.75 + post & packing This kit is used to amplify the 3-4mV signals from a phono cartridge to line level, so you can use your turntable with the CD or tuner inputs on your Hi-Fi amplifier - most modern amps don't include a phono input any more. Dust off the old LP collection or use it to record your LPs on to CD. The design is suitable for 12" LPs, and also allows for RIAA equalisation of all the really old 78s. Please note that the input sensitivity of this design means it's only suitable for moving-magnet, not moving-coil cartridges. Kit includes PCB with overlay and all . electronic components. ^ V • Requires 12VAC power '"We* Requires 9VDC wall adaptor (Maplin #GS74R £9.99) Battery Zapper MKII ” KC-5427 £29.00 + post & packing This kit attacks a common cause of failure in wet lead acid cell batteries: sulphation. The circuit produces short bursts of high level energy to reverse the damaging sulphation effect. This new improved unit features a battery health checker with LED indicator, new circuit protection against badly sulphated batteries, test points for a DMM and connection for a battery charger. Kit includes case with screen printed lid, PCB with overlay, all electronic _ j components and clear English instructions. Suitable for 6, 12 and 24V J J batteries MS • Powered by the battery M itself High Range Adjustable Switch with LCD KC-5376 £22.75 + post & packing This temperature switch can be set anywhere up to 1200°C, so it's extremely versatile. The relay can be used to trigger an extra thermo fan on an intercooler, mount a sensor near your turbo manifold and trigger water spray cooling, or a simple alarm to warn you of overheating. The LCD, which can easily be dash mounted, displays the temperature constantly. Kit supplied with solder masked PCB with overlay, LCD panel, temperature probe and all electronic components. Improved Model! _ Universal High Energy Ignition Kit KC-5419 £27.75 + post & packing A high energy 0.9ms spark burns fuel faster and more efficiently to give you more power! This versatile kit can be connected to conventional points, twin points or reluctor ignition systems. Kit supplied with diecast case, PCB and all electronic ib. components. * .U \ We stock , km l ^ an extensive \ iart^range of quality V ■ automotive . \ Smart Fuel Mixture Display Kit KC-5374 £8.95 + post & packing This kit features auto dimming for night driving, emergency lean-out alarm, better circuit protection, and a 'dancing' display which functions when the ECU is operating in closed loop. Kit supplied with PCB and all electronic components. • Car must be fitted with air flow and EGO sensors (standard on all EFI systems) for full ** functionality. h’ 8 * ® Theremin Synthesiser MKII KC-5426 £43.50 + post & packing By moving your hand between the metal antennae, create unusual sound effects! The Theremin Mkll improves on its predecessor by allowing adjustments to the tonal quality by providing a better waveform. With a multitude of controls, this instrument's musical potential is only limited by the skill and imagination of its player. Kit includes stand, PCB with overlay, machined case with silkscreen printed lid, loudspeaker, pitch antennae, all specified electronic components and clear English instructions. Intelligent Turbo Timer Kit KC-5383 £14.75 + post & packing This great module uses input from an airflow, oxygen, or MAP sensor to determine how hard the car has been driven. It then uses this information to calculate how long the car needs to idle, reducing unnecessary idle time. The ^ sensitivity and maximum idle time are both adjustable, so you can be sure your turbo will cool properly. Kit supplied with |i d PCB, and all electronic components. ^ ^ Recommended ^ " box UB3 (HB-6013) I £1.40 each Improved Model! Recommended box UB3 (HB-6013) £1.40 each Requires 9-12VDC wall adaptor (Maplin #JC91Y £14.99) All prices in £ Stg __T 1 Free 410+ page Catalogue. Log on to www.jaycarelectronics.co.uk/catalog for your FREE catalogue! 0800 032 7241 1 A (Monday - Friday 09.00 to 17.30 GMT + 10 hours only). For those who want to write: 100 Silverwater Rd Silverwater NSW 2128 Sydney AUSTRALIA BitScope PC Oscilloscopes & Analy DSO Test Instrument Software for BitScope Mixed Signal Oscilloscopes _ \ \ I .^ai*/ 4 Channel BitScope Digital Storage Oscilloscope Up to 4 analog channels using industry standard probes or POD connected analog inputs. Mixed Signal Oscilloscope Capture and display up to 4 analog and 8 logic channels with sophisticated cross-triggers. Spectrum Analyzer Integrated real-time spectrum analyzer for each analog channel with concurrent waveform display. Logic Analyzer 8 logic, External Trigger and special purpose inputs to capture digital signals down to 25nS. Data Recorder Record anything the DSO can capture and display. Supports live data replay image export. Networking Flexible network connectivity supporting multi-scope operation, remote monitoring and data acquisition. Data Export Export data with DSO using portable CSV files or use libraries to build custom BitScope solutions. 2 Channel BitScope Pocket Analyzer BitScope DSO Software for Windows and Linux BitScope DSO is fast and intuitive multi-channel test and measurement software for your PC or notebook. Whether it's a digital scope, spectrum analyzer, mixed signal scope, logic analyzer, waveform generator or data recorder, BitScope DSO supports them all. Capture deep buffer one-shots or display waveforms live just like an analog scope. Comprehensive test instrument integration means you can view the same data in different ways simultaneously at the click of a button. DSO may even be used stand-alone to share data with colleagues, students or customers. Waveforms may be exported as portable image files or live captures replayed on other PCs as if a BitScope was locally connected. BitScope DSO supports all current BitScope models, auto-configures when it connects and can manage multiple BitScopes concurrently. No manual setup is normally required. Data export is available for use with third party software tools and BitScope's networked data acquisition capabilities are fully supported. www . bitscope . com From the Editors desk With this extra-thick December issue we close off the publication year 2006. I've a few points to share with you all and I guess it does no harm to mention them in this month's Editorial space — in random order! All change to dot com. As you may have noticed on last month's front cover, our website is also available at www.elektor.com. We are using this domain name because it is easier to remember (and type!) than www.elektor-electronics.co.uk . However, both websites run 100% in parallel and the old domain name will continue to be used. The i-TRIXX supplement you get free of charge with this issue is actually the sixth gift our readers get this year. Earlier this year we gave away a Visual Basic booklet (January 2006); a C booklet and an FPGA poster (March 2006); an RFID card (September 2006); and an E-Simulation DVD (Octo- ber 2006). The circuits in the 24-page i-TRIXX supplement are aimed at the younger generation (1 1 to 15s) and we would appreciate if you would let us know what you think of it. We're hiring! Due to our expanding activities we're looking for: • free-lance translators, German-English and Dutch-English; • a free-lance News Correspondent (UK based); • a free-lance Books Acquisition Mana- ger (UK based). For details regarding these positions, please contact me on editor@elektor.com and I will put you in touch with the responsi- ble person within our organisation. The Cumulative Index for Elektor Electro- nics volume 32 (2006) will be available as a free pdf download from our web- site. Like last year, we feel that the three precious pages taken up by the year index are better used for projects and other articles. Readers without internet access may write or telephone to request a free copy of the document on paper. Finally, from all of us here at Elektor, we thank all our readers, business partners and advertisers for their continued sup- port during the past year and wish you all a Merry Christmas and a peaceful and prosperous 2007! As a special treat for all radio amateurs we present a general-coverage AM/FM/SSB recei ver with a wide range of features, which uses a DDS chip in the VFO section and also has a DRM output that can be fed into a computer. The receiver is controlled by an 8-bit Atmel RISC processor. The frequency readout is on a clearly legible 7-segment LED display. There are an incredible number of options these days for the safe 'packing up' of electronic circuits. Open any catalogue from any well-known mail-order com- pany and you will get an impression of the extensive range on offer. This article gives an overview of the different types with their particular characteristics and provides hints as to how you can make a professiona looking front panel yourself. 70 WLAN Antenna Design 20 Tightly Packed The domestic use of WLANs has grown rapidly as DSL routers with built-in wireless Ethernet have become available, and now it is easy to use a notebook PC to surf the Internet wirelessly from the comfort of one's sofa. However, things get trickier if a reinforced con- crete wall stands in the way, or if a neighbour happens to be using the same frequency... Jan Buiting, Editor 88 A New Flowcode no ouLur-iu, AiD unfits,.. NfiW, nvQrvuhn unm ■dflVtilOp panwotful olfiOT.-ro-r'ile ■yattima A new version of Flowcode for E-blocks has just been released — version 3. This is more than a simple upgrade: Flowcode has matured into a nice if not impressive development tool. Volume 32 December 2006 no. 360 know-how 70 WLAN Antenna Design 76 Wh ere am I — and Where are the Others? hands-on 84 88 92 94 Multi-Purpose 3D Milling Machine (announcement) Shortwave Capture Go with the Flow Design Tips Client-server quizmaster Pencil rubber cleans solder pads FPGA Course (7) A New Flowcode Intelligent Voltmeter in a Plug A Wire with Total Recall technology 34 Spy Radio Stations 38 Wi reless Key 80 Radio Control using WLAN ICs 96 Smaller is not Always Better info & market 6 Colophon 8 Mailbox News & New Products 20 Tightly Packed 08 Sneak Preview infotainment 14 Ch ristmas Presents 100SSB Receiver for 20m and 80m (1987) 101 Hexadoku lektor lectronics Volume 32, Number 360, December 2006 ISSN 0268/45 1 9 Elektor Electronics aims at inspiring people to master electronics at any personal level by presenting construction projects and spotting developments in electronics and information technology. Publishers: Elektor Electronics (Publishing), Regus Brentford, 1 000 Great West Road, Brentford TW8 9HH, England. Tel. (+44) 208 26 1 4509, fax: (+44) 208 26 1 4447 www.elektor.com The magazine is available from newsagents, bookshops and electronics retail outlets, or on subscription. Elektor Electronics is published I I times a year with a double issue for July & August. Underthe name Elektor and EJektuur, the magazine is also published in French, German and Dutch. Together with franchised editions the magazine is on circulation in more than 50 countries. International Editor: Mat Fdeffels (m.heffels@segment.nl) Editor: Jan Buiting (editor@elektor.com) International editorial staff: Fdarry Baggen, Thijs Beckers, Ernst Krempelsauer, Jens Nickel, Guy Raedersdorf. Design staff: Ton Giesberts, Paul Goossens, Luc Lemmens, Christiaan Vossen Editorial secretariat: Fdedwig Fdennekens (secretariaat@segment.nl) Graphic design / DTP: Giel Dols Managing Director / Publisher: Paul Snakkers Marketing: Carlo van Nistelrooy Customer Services: Margriet Debeij (m.debeij@segment.nl) Subscriptions: Elektor Electronics (Publishing), Regus Brentford, 1000 Great West Road, Brentford TW8 9 H H , England. Tel. (+44) 208 26 1 4509, fax: (+44) 208 26 1 4447 Internet: www.elektor.com Email: subscriptions@elektor.com Rates and terms are given on the Subscription Order Form Head Office: Segment b.v. PO. Box 75 NL-6 1 90-AB Beek The Netherlands Telephone: (+3 I ) 46 4389444, Fax: (+3 I ) 46 4370 1 6 1 Distribution: Seymour, 2 East Poultry Street, London EC I A, England Telephone: +44 207 429 4073 UK Advertising: Fduson International Media, Cambridge Fdouse, Gogmore Lane, Chertsey, Surrey KTI 6 9AR England. Telephone: +44 1932 564999, Fax: +44 1932 564998 Email: r.elgar@husonmedia.com Internet: www.husonmedia.com Advertising rates and terms available on request. International Advertising: Frank van de Raadt, address as Fdead Office Email: advertenties@elektuur.nl Advertising rates and terms available on request. Copyright Notice The circuits described in this magazine are for domestic use only. All drawings, photographs, printed circuit board layouts, programmed integrated circuits, disks, CD-ROMs, software carriers and article texts published in our books and magazines (other than third-party advertisements) are copyright Segment, b.v. and may not be reproduced or transmitted in any form or by any means, including photocopying, scanning an recording, in whole or in part without prior written permission from the Publishers. Such written permission must also be obtained before any part of this publication is stored in a retrieval system of any nature. Patent protection may exist in respect of circuits, devices, components etc. described in this magazine. The Publisher does not accept responsibility for failing to identify such patent(s) or other protection. The submission of designs or articles implies permis- sion to the Publishers to alter the text and design, and to use the contents in other Segment publica- tions and activities. The Publishers cannot guarantee to return any material submitted to them. Disclaimer Prices and descriptions of publication-related items subject to change. Errors and omissions excluded. © Segment b.v. 2006 Printed in the Netherlands ClmScon 5 USB Scon Tool • Diagnose any car with EOBD • Based on the ELM327 1C • Supports all EOBD and OBD-II protocols ✓ ISO 1 5765-4 (CAN) >+ ISO 1 4230-4 (Keyword 2000) s IS09 141-2 SJI850VPW SJI850 PWM • 9600 or 38400 baud • Supported by more software than any other OBD interface • Inexpensive • Full Speed USB I . I • Automatic protocol detection • Package includes cables, software CD, and Quick Start Guide • Buy from your local UK distributors! www.ElmScan5.com/elekfor 6 elektor electronics - 12/2006 PicoScope 3000 Series PC Oscilloscopes The PicoScopc 300 □ scries □scillcicopcs arc the latest offerings from the market lender in PC oscllloKOpes combining high bandwidths with large buffer memo ri es r Using the latest advances in electronics^ the escillnscDpes connect to the USB port of any modern PC, making full use of the PCs' processing capabilities, large screens and familiar graphical user interfaces. * High performance: 1 0GS s sampling race & 20GMHz bandwidth -■ 1MB buffer memory * High speed USB 2.0 interface * Advanced display £ trigger modes * Compact & portable * Supplied with PicoScope & PicoLog software Tel: 01480 396395 www.picotech.com/scope374 -r ••> ■r\ U.'ltf l HH S801 Non SPX*^I HH IujW-Ii . imtmrn HWU1* t*14 «. i p u f g _ P hf* 1 — 9u4.ii IhOv fi- DOp^ inp+- D tm KUifi nur.imi.iii Oi#-krHmeu HUD birca HH iIHWVtitDIIV i. jjy a luuai .1 li m Technology Limited rz u vL B=D SERVICING YO U R COMPLETE PROTOTYPE NEEDS Price Example: 16 Sq-lnches (double sided pth) 2 Pays: €12 8 Days:€ Standard PCB-Pool Service SIMPLY SEND YOUR FILES AND ORDER ONLINE! New Service: c?i m *'«mr "ur" Save vital time on design errors in advance of receiving your Prototype. View high resolution photographic images of your PCB during each pro- duction stage. Be one step ahead,use our realtime PCB monitoring service. j# 389 8560 inrir.PC9-PO0t.c0Mf fid !~ PftOTELS # electronics DfCdll WORKBENCH ■ 12/2006 - elektor electronics 7 INFO & MARKET MAILBOX Poor man's VGA Tester Hi Elektor people — I attach a circuit diagram of a simple VGA Tester. The circuit is suitable for direct connection to a VGA display with a resolution of 480x640 pixels and generates a chessboard pattern. I designed the tester around a PIC1 2F508. It contains very few components and I believe the circuit speaks for itself. Jumper JP1 per- mits the colour selection between red, green and blue. By replacing it with three diodes (1 N41 48), the test picture goes black and white. The video output level is adjustable with preset PI . The software I wrote for the tester is also simplicity itself. In principle, a loop is executed in which the image is built up bit by bit. The listing contains information regarding the pulse timing, which should enable users to adapt the program to suit other resolutions. I designed the circuit with the help of MPLAB IDE v7. 20 and Eagle 4. 1 6. Hans Kooi (Netherlands) Thanks Hans , we agree that your circuit is hard to beat in terms of component count. The signal is composed entirely by the PIC and with some dexterity the tester could be built into a VGA plug. The source codce is ovoiloble for free downloading from our website — the file number is 060215-11 .zip. Phono Splitter — some points to note Dear Editor — I write to mention a few small errors that apparently have kept in my project 'Phono Splitter' published in the July/August 2006 issue. • Compensation capacitor C4 should have a value of 47 pF, not 470 pF. • T1 should be a BC560C like T2 and T3. • In my prototype, diodes D2 and D3 were types 1 N4448, mainly because oif their tighter specificati- ons in respect of forward bias voltage. I would expect 1 N4148s to work equally well, though. RS232 (transmission) 2 x 22 pin A1 compatible slot Thanks for publishing my de- sign and hope a few readers benefit from it. MarceD van de Gevel (Netherlands) A nice change, I would say, from all that new fangled stuff around. Franz Achatz (Germany) Thanks Marcel ond our apolo- gies for the errors in reproducing your design. With over 100 ar- ticle files being produced in four languages within a period of about four weeks , the pro- duction of our Summer Circuits edition is a tour de force where errors con not be ruled out en- tirely particularly when making the drawings. Apple-01 Replica computer Dear Jan — just tro say that I built a replica of the 30 year old Apple-1 computer (see photo). I was honoured to get a personal 'OK' from Steve Free e-SIM DVD Dear Jan — I believe 754C1 is the answer to Hexadoku, October 2006 (correct! Ed.). I was looking for something to read at the shop, and found your magazine which I subscribed to in my student days, some twenty years ago. I have already tried some of the programs on the e-SIM DVD, thanks for bringing me back to the days of PCBs and simulations! Magnus R. Berg (Norway) Welcome bock Magnus , you're in good company here. Wozniak to reuse his A1 firm- ware on my replica computer which I dubbed 'A-ONE'. The A-ONE works fine as far as I can check. Here are some data: • 6502 at 1 MHz • 6821 PIA • 32 kB RAM • EPROM with WOZ-Mon and WOZ BASIC • GAL for address decoding etc. • TINY231 3 for PS2 keyboard and RS232 (reception) • MEGA32 for video and Pontavi-Thomson Bridge Dear Jan — there is nothing new in this life! The above bridge (Retronics, September 2006, Ed.) is a simplified version of the Kelvin Bridge and featured in a few old books on calibration. I have a splendid version in a teak case with a large brass scale, made by Pye of Cambridge, and it is accurate to . 1 %. I have a collection of over twenty bridges made by Sullivan, Cambridge Instruments, Wayne & Kerr, Marconi, etc. together with 8 elektor electronics - 12/2006 RFID Quest extended To give readers more time to read out the number stored on the free RFID card they got with their September 2006 issue (using a home built reader unit or one of the designs published in the same issue), the period for reporting winning card numbers has been extended to 1 5 December 2006. See also the RFID pages at www.elektor.com galvanometers, standards and precision potentiometers. The workmanship is incredibly high and part of our heritage we should all be proud of. John Price (UK) Indeed we should John. Thanks for letting us know about the origins of the Pontavi-Thomson bridge. Photograph reproduced courtesy of Kenyon College , Ohio (quite a distance from Kelvin Way Bridge , Glasgow). Mail Box Terms •Publication of reader’s correspondence is at the discretion of the Editor. •Viewpoints expressed by corres- pondents are not necessarily those of the Editor or Publisher. •Correspondence may be translated or edited for length, clarity and style. •When replying to Mailbox correspondence, please quote Issue number. •Please send your MailBox correspondence to: editor@elektor-electronics.co.uk or Elektor Electronics, The Editor, 1000 Great West Road, Brentford TW8 9HH, England. More power from the High-End Power Amp Dear Editor — I believe the relatively low output power of the High-End Power Amplifier from the March 2005 issue is mostly owing to the enclosure used. In other words, if a larger cabinet is used, more space is available to step up the power supplied by the amp. For example, the transformer voltage can be increased from 1 8 V to 25 V. After rectification, this results in about 31 VDC. The modi- fications I carried out at the component level are: Power supply: 225 VA toroidal transformer, 2x22 V C5, C6, etc.: 10,000 |jF 35 V Fuses: 1 .5 A Two NTCs in series with the mains voltage Amplifier board: R18: 10k R42: 220k R45: 220Q D1 4;D1 5: 12V Heatsink: 2 x Fischer SK 155, 75 (0.9 K/W) Indicator board: R1 6;R1 7;R33;R34: 330Q R5;R22: 820Q mmm R6;R23: 10k PI and P2 allow the gain of the indi- cator board to be adjusted between 9 and about 1 3.7 times. I selected the Monacor (Monarch) type UC- 204/SW case which has a size of 437x82x235 mm. Because of the larger output power, the indicator board is no longer required, hence I did not fit the LEDs on the front panel. Because the mm feedback is reduced, I fear the distortion goes up while damping is reduced. Lacking high-end test equipment I am unable to say if my modifications reduce the amplifier's performance in any way. P. Kempenaar (Netherlands) Our audio design specialist Ton Giesberts confirms that his High-End Power Amplifier design has potential for higher output power. The supply voltage may be increased to 35 V maximum , but not without major surgery to the existing design. For example , a larger heatsink must be used on the driver stage , and the resistor with the relay (R45) has to be adapted [ as you have done. The sensitivity also requires adapting — it is now fairly low at 1.5 V for full drive. We confirm that it can be done by using 10 kQ for R18 , but stress that the modification modifies the carefully designed feedback response , which is likely to result in instability. This part of the modification really calls for a rede- sign. We recommend the use of an oscilloscope and a protected power supply if you want to stay on top of any tendencey to oscillation. The OPA177 has a maximum supply voltage spec of 22 V, hence is hard pushed in the original design already. Zener diodes of at least 12 V (D14; D15) are recommended at the suggested supply level of 31 VDC. At a supply voltage of 35 V, the zener diodes should be exchanged for 15-V types. Regarding the output power , at a supply voltage of 31 V, about 50 watts can be delivered into 8 ohms , while the minimum load impedance goes up to about 3 ohms to keep the power transistors within their safe operating area. 12/2006 - elektor electronics 9 INFO & MARKET NEWS & NEW PRODUCTS Single-cell 1-A Li-Ion / Li-polymer charge management controllers Microchip announces the MCP73833 and MCP73834 sin- gle-cell, high current (1 amp), Li- lon/Li-Polymer linear charge-ma- nagement controllers. These fully integrated devices combine sever- al key charge-management and safety features in a single chip for reliable charging of high-capaci- ty single-cell Li-Ion and Li-Polymer batteries. By including a pass transistor, cur- rent-sense and reverse-discharge protection on a single chip, the MCP73833/4 charge-manage- ment controllers eliminate the need for external components. Multiple combinations of key charging pa- rameters, including pre-condition- ing current threshold and ratio, charge-termination threshold and recharge threshold ratio are avail- able, meaning the devices provide standard product support for a va- riety of high-current Li-lon/Li-Poly- mer charging applications. In ad- dition, with a high charging cur- rent of up to 1 A and support for multiple regulated output voltages (4.2 V, 4.35 V, 4.4 V and 4.5 V), the devices can be used with vari- ous generations of Lithium battery technology. Safety features on the new devic- es to prevent overcharging and overheating include charge tim- ers, battery-temperature feedback and thermal-current regulation. The charge timer shuts the charger off if a charge is not terminated be- fore timeout is reached. The bat- tery-temperature feedback reduces the charge current if the battery's temperature reaches the limit of safety and the thermal-current regu- lation feature decreases the charge current if the charge-controller itself reaches its thermal limits. Device-specific features include a power-good output on the MCP73833 and a timer-enable input on the MCP73834. Both devices also offer a low dropout regulator (LDO) test mode that en- ables application system test even in the absence of a battery; and both feature two status outputs to provide the user with additional information about the state of the charge-controller. To support development, Microchip offers the MCP73833 Evaluation Board (Part # MCP73833EV). The board is available today at www. microchipdirect.com. The MCP73833/4 charge-ma- nagement controllers are availa- ble in 1 0-pin MSOP and thermally efficient 3x3 mm DFN packages. They are available for sampling at sample.microchip.com and for vo- lume ordering at www. microchip- direct. com. For more information, visit Microchip's website at www.microchip.com/MCP73833. (067227-VII) Are you CO sure? If you have a Carbon Monoxide (CO) concern and need to know more, Lascar Electronics' EL-USB- CO carbon monoxide data logger could help in determining the na- ture of the problem. Carbon Monoxide (CO) is a poi- sonous gas which is both odour- less and colourless. It is produced by equipment/machinery that isn't working correctly and can be found anywhere from construc- tion sites and furnace rooms to of- fice blocks and homes. Lascar's EL-USB-CO data logger monitors and records CO levels in an en- vironment over a period of time. This can help the user to deter- mine where and when peak levels of CO occur, allowing corrective action to be carried out to remedy the problem. The EL-USB-CO stores over 32,000 readings and can record CO lev- els from 0 to 1 000 ppm. Setup of the data logger is completed us- ing the supplied EL-USB software, wi th the EL-USB-CO plugging di- rectly into the USB port of a PC. Here the user can assign the log- ger a name, choose a sample rate (from a choice of once every: 1 0 secs, 30 secs, 1 mins, 5 mins), as well as determining a high-alarm level. Once setup is complete the EL-USB-CO should be left in the environment where the study is to take place. The EL-USB-CO is available for pur- chase at £49.00 from the Lascar website (www.lascarelectronics. com). (067227-III) DAB/FM radio module Frontier Silicon announces the launch of Naples FS201 1, an in- tegrated standalone dual-band DAB/FM radio module. The unit is a complete DAB module op- erating in both master and slave modes and incorporating Frontier Silicon's Apollo RF front-end, Cho- rus DAB baseband processor and NXP Semiconductor's TEA 5764 FM radio 1C. The module is meas- uring 35mm x 38mm x 2.7mm on a single-sided PCB. The DAB signal processing func- tions and protocol stack are imple- mented in firmware running on the Chorus processor, which also runs the control interface to Naples. In a master configuration the module requires a power source, antenna, LCD and keypad to create a fully featured digital radio. Alternative- ly, the module can be controlled by an existing microcontroller as a slave module via a serial port or SCB (serial control bus) compli- ant device allowing it to be inte- grated into larger audio systems. The module also supports various software features such as DAB dy- namic DLS radio service text, 256 kbps decode capacity, stored pre- sets and manual tuning when con- figured in system applications. www.frontier-silicon.com (067227-1) 10 elektor electronics - 12/2006 Mid-power 24-Vin maxi modules Vicor announces the addition of eight mid-power Maxi DC-DC con- verters to the 24 Vdc input family: a 3.3-Vout, 200-W model and 300- W models at 5 , 12, 15, 24, 28, 36, and 48-Vout. The modules — which incorporate Vicor's patented low-noise Zero-Current and Zero- Voltage Switching (ZCS/ZVS) topol- ogy — are appropriate for indus- trial or process control, distributed power, medical, ATE, communica- tions, defence, and aerospace ap- plications. With switching frequen- cies up to 1MHz, the 24Vdc family provides rapid transient response well suited for RF applications. The new products provide design- ers who do not need the full-power capability of a 24V Maxi module with a mid-power option, with all of the functionality and configurability of the high power models. In ad- dition, low-noise ZCS/ZVS greatly reduces the design effort and filter- ing costs required for power con- verters to meet agency conducted emissions requirements. The modules, which are available in RoHS compliant models, are a compact 1 17 x 56 x 12.7 mm in size, with a height above board of 1 0.9 mm. With these new models, the 24 Vin Maxi family now comprises 16 models with output voltages from 3.3 to 48 Vdc and power levels from 200 to 400 W. The convert- ers operate from 24 V nominal in- put, with an input range of 1 8 V to 36 V. Efficiencies range up to 88% for the higher output voltag- es. These models are available in five different environmental grades, with six different pin options and three choices of baseplate. They can be configured in any combi- nation in Vicor's Custom Module Design System. A datasheet is available on: www.vicorpower.com/library/ technical_documentation/ datasheets/2nd_gen/. www.vicoreurope.com (067227-V) 8-bit microcontrollers with integrated Ethernet peripheral Microchip announces a family of the world's smallest 8-bit mi- crocontrollers with an integrated IEEE 802.3-compliant Ethernet communications peripheral. The PIC18F97J60 family is optimized for embedded applications, and has an on-chip Medium Access Controller (MAC) and Physical Layer Device (PHY). By integrating a 1 0BASE-T Ethernet controller onto a 10 MIPS PIC 18 microcontroller with up to 128 kBytes of Flash program memory, Microchip is providing embedded systems designers with a simple, cost-effective single-chip remote- communication solution for a wide range of applications. Microchip also offers a free TCP/IP software stack to reduce development time. Ethernet is the leading networking technology for local area networks (LANs), and it can be used to con- nect embedded devices through a LAN to the Internet. Ethernet's in- frastructure, performance, interop- erability, scalability and ease of development have made it a stan- dard choice for such embedded communications. Any embedded application that requires Ethernet connectivity can take advantage of the new nine- member PIC 1 8F97J60 microcon- troller family. Such applications can include Industrial Automation (e.g. industrial control, power-sup- ply monitoring, network/server monitoring and environmental monitoring); Building Automation (e.g. fire & safety, access control, security panels, lighting control and VoIP intercoms). Key features of the new family include: • Seamless Migration: add Eth- ernet to existing PIC 18 designs with minimal cost and develop- ment time. • IEEE 802.3-Compliant: on-chip 10BASE-T MAC and PHY provide reliable packet-data transmission and reception. • Dedicated 8-kByte Ethernet Buf- fer: enables efficient packet stor- age, retrieval and modification, and reduces the demand on the integrated microcontroller. • 128 kBytes of Flash and 4 Kbytes SRAM: to accommodate the TCP/IP stack and Web server, leaving ample space for applica- tion code. The PIC1 8F97J60 PICDEM.net™ 2 Development Board (part # DM163024) has been created specifically to assist development with these new integrated devices. In addition, the latest version of Mi- crochip's free PIC1 8 TCP/IP Ether- net Stack can be downloaded at www.microchip.com/tcpip . The new family is also supported by Microchip's suite of development tools, including the MPLAB® VDI Visual Device Initializer, Applica- tion Maestro™ software, MPLAB Cl 8 C compiler and the MPLAB ICD 2 in-circuit debugger. The new PIC devices are all of- fered in RoHS-compliant TQFP packages. www.microchip.com / ethernet (067227-11) J U 12/2006 - elektor electronics 11 Special Christmas Offer Elektor Books/CD-ROMs for just £ 27.50 1 $ 52.50 Offer valid untill 1 January 2007 Exd. P&P PC Interfaces under Windows PC Interfaces can be used for more than just the printer, mouse, modem and joystick! While it was relatively easy to directly access PC interfaces using a DOS computer, under Windows things are not all that simple. This book (CD-ROM incl.) shows you how it can be done. 265 pages £ 25.95 USS 52.00 C hfTFh FidES UHDEff fitnofflt Bestseller Handbook for Sound Technicians This book contains chapters on basic theory; microphones and musical instruments; various types of amplifier; loudspeakers; effects equipment; recording techniques; lighting equipment; the rehearsal room; and faultfinding and small repairs. I tiar.XuDak tar scuna toebtfctons 276 pages £ 20.75 USS 42.00 Build your own High-end Audio Equipment For those who cannot, or will not, pay high prices for high end equipment, a solution is offered in this book: build your own at considerable cost savings. 262 pages £ 15.55 | USS 31.00 LASSUS: f HtiuKT J'ltlC no: 180 pages £ 20.75 | USS 42.00 r Lasers: Theory and Practice A valuable book on the practical use of lasers. It consists of two main parts. The first deals with the fundamentals of lasers, including such topics as types of laser, modes of laser operation, wavelengths, chopping, scanning and applications. The second part contains a number of practical circuits and experiments. Designing Audio Circuits How does speech, music, or, indeed, any sound get from the record, CD, or casset- te tape to the loudspeaker? This book endeavours to give a comprehensible answer. 350 pages £ 20.75 | USS 42.00 fQUliffOdhg Jft Computers and Digital Circuits T UjMP JMhsm Designing Audio Circuits Faultfinding in Computers and Digital Circuits This book covers faultfinding not just in microprocessor systems, microcontrollers and industrial PCs, but also in consumer items such as personal computers, multi- media devices, digital television and so on. make your choice 625 pages | £ 31.15 | USS 63.00 r ft PC SERVICE AND REPAIR Save £££ ) PC Service and Repair This book provides the information you need to be able to deal with computer system faults whenever they occur. With the aid of this book, you can tackle faultfinding at various levels, ranging from the replacement of complete cards or assemblies to the identi- fication of a single faulty com- ponent. A cd-rom Audio Collection 1+2 Two must-haves for the true audio lover. Each CD-ROM contains no fewer than 75 audio designs from Elektor Electronics. Using the included Acrobat Reader you are able to browse the articles on your computer, as well as print texts, circuit diagrams and PCB layouts. £ 12.05 USS 21.25 479 pages £ 31.15 | USS 63.00 r cd-rom Software Toolbox 2 This CD-ROM contains software tools for, and information about, microcontrollers. Toolbox 2 gives specific attention to technical documen- tation about protocols, field buses, as well as modern information carriers which find increasing use. The hardware side of things is not forgotten either. £ 12.05 | US$ 21.25 r cd-rom Robotics A large collection of datasheets, software tools, tips en tricks, addresses, Internet links to assorted robot constructions and general technical informa- tion. All aspects of modern robotics are covered, from sensors to motors, mechanical parts to microcontrollers, not forgetting matching program- ming tools and libraries for signal processing. £ 12.05 USS 21.25 r N cd-rom ECD Edition 3 Elektor's Components Database gives you easy access to design data for over 5,000 ICs, more than 35,000 transistors, FETs, thyristors and triacs, just under 25,000 diodes and 1,800 opto- couplers. All databank appli- cations are fully interactive, allowing the user to add, edit and complete component data. £ 14.95 | USS 26.50 CD-ROM Digital Circuit Library 1-2-3 Each CD-ROM contains over 300 circuits complete with diagram and text. Zoom and print module. Fast search facility. Error-tolerant index search system. Many printed-circuit board layouts. £ 12.05 | USS 21.25 Limited Stock r cd-rom Elektor Electronics 2001 + 2004 These Elektor Electronics annual CD-ROMs contain all editorial articles published in Elektor Electronics magazine volume 2001 and 2004. The CD-ROMs are packed with features including a powerful search engine and the possibility to edit PCB layouts with a graphics program, or printing hard copy at printer resolution. Offer valid untill 1 January 2007 r E 16.25 | USS 28.75 1 V No Order Form here? No problem, you can still benefit from our offer. Please contact us: Elektor Electronics (Publishing) Regus Brentford | 1 000 Great West Road Brentford TW8 9HH | United Kingdom Telephone +44 208 261 4509 | Fax +44 208 261 4447 Email: sales@elektor.com ii'tft INFO & MARKET GADGETS & MUSTHAVES Christmas Presents For the electronics hobbyist who has everything already Do you still need help choosing gifts for others (or for yourself)? We'd like to lend you a hand with a variegated selection of interesting, fun, handy, gadget- like or simply unusual gifts. It also includes several items that people with no special interest in electronics will enjoy. Time on the fly The XP3 clock is a programmable digital clock that displays the time and messages hovering in the air. A set of LEDs fitted to a rod that swings back and forth at a tidy 1 6-Hz rate flash on and off at just the right times to create visible messages. Each message appears in a different form. You can program four indivi- dual messages, each with a maxi- mum of 200 characters. They can be combined with the date and time display in all sorts of ways. There are also several prepro- grammed messages, in English of course. Seen at: www.gadgethouse.nl Hovering football We must admit that this 'hovering football' isn't actually round. Howe- ver, it's a nice alternative to the real thing for a spot of football in the living room without doing too much damage to the furniture. This is a genuine hovercraft in the form of a flattened ball. It floats on a cushion of air blown out at the bottom, so it can hover over the floor and move easily. It doesn't have any electronics - just a battery-powered motor. Seen at: http://smm.de T-shirt with graphic analyser You're bound to attract attention if you wear this T-shirt to a disco or cafe. An illuminated panel in the form of a graphic analyser is fitted into the front of the T-shirt. The accompanying microphone and electronics pick up ambient sound and drive the bars of the graphic display accordingly. The analyser is powered by a de- tachable battery pack. The T-shirt is available in two sizes. Unfortunately, it can only be washed by hand, so you have to be prepared to handle it with TLC. Seen at: www.bestel.nl Solar-powered headphone radio With this set of headphones, you have music with you wherever you go - all without batteries. An FM receiver is built into the ear shells, and it is powered by a set of rechargeable AAA cells. The cells are charged by a solar panel fitted on top of the headband. One hour of sunlight is enough for 1 to 3 hours of pleasant listening. Mini drum set Who doesn't occasionally get the urge to have a go at being a drummer? But how many of us have a drum set at home? And of course, you have to re- member the neighbours... Now there's a solution for the weekend drummer: an affordable electronic mini drum set. Several drums, and even a cymbal, are located on a surface with the dimensi- ons of a mouse pad. You can drum on these instruments with your fingers. Of course, it takes a bit of practice to get the hang of it. There are also several control knobs behind the drums. This way you don't have to worry about complaints from the neighbours - as long as you can resist the temptation to con- nect the drum set to your stereo system! Seen at: www.megagadgets.nl 14 elektor electronics - 12/2006 Talking toilet paper holder This gadget is just the thing for surprising your friends and ac- quaintances. It genera- tes a spoken message each time some pulls toilet paper off the roll. You can record your own message, either serious or humorous. For instance, you could use it to remind your children to wash their hands when they're fini- shed, or to remind adults to close the lid before they leave. As for humorous messages, that's something we'll leave up to you! The toilet roll holder has a spring-loaded middle pie- ce, so it can be used with nearly every standard holder. Seen at: www.bestel.nl Flexible keyboard With this unusual keyboard, which is not only flexible and waterproof but also features trendy blue illumination, you're immune to just about everything. It simply shrugs off coffee, bread crumbs and tobacco residues. An occasional rinse under the tap is enough to keep it looking as good as new. It will last for years if you take good care of it, and it's great with a laptop - just roll it up and pack it away. Seen at: www.usbgeek.com Remote-controlled golf ball Just when you thought you'd seen it all! You may wonder how anyone came up with the idea of a remotely controlled golf ball, but it's mainly intended as a sort of practical joke. Suppose you're golfing with a friend, and he suddenly sees his golf ball making strange lurching motions. You know the answer: you swapped a remotely controlled ball for his real ball. You can use the remote control to cause the ball to swing to the right or left while it's rol- ling. Just the thing for golfers with a healthy sense of humour! Seen at: www. iwantoneofthose.com Mini UFO If you always wanted to pilot a UFO, here's your chance. The X- UFO consists of a thin frame with four propellers, along with the control and receiver electronics you need to operate it. It is gy- roscopically stabilised in flight. The X-UFO is made from ultra-lightweight carbon fibre and EPP foam. Four LEDs (one red and three blue) not only help you keep track of the X-UFO, but also give it an unworldly appearance. The X-UFO comes with a four-channel proportional R/C unit. Seen at: www.gadgethouse.nl Illuminated toilet seat Are you always irritated by the dim lighting in the WC when you have to use it in the wee hours? And does you wife always complain that you leave the toilet seat up after you use it at night? The intelligent LavNav toilet light puts an end to all these problems. After you fit this tiny light to the bottom of the toilet lid, it automatically illuminates the toilet bowl discreetly when you approach the toilet. And so you don't forget whether the toilet seat is raised or lowered, the lamp has two different colours, green means it's OK to sit down, while red means watch out, the seat's still up! Seen at: www.gadgets.co.uk Colourful loudspeakers The Lightwave loudspeakers are small spherical loudspeakers made from transparent plastic that change colour in rhythm with the music. They also have beat detection. Listeners can choose from three different colour patterns or a specific constant colour, or they can let the colours respond to the music. The speakers are approximately 10 cm in diameter, and the built-in amplifier delivers 5 W PMPO. They are an ideal complement to an MP3 player or a portable CD player. Seen at: www.gadgets.uk 12/2006 - elektor electronics 15 INFO & MARKET GADGETS & MUSTHAVES gadgets with USB interfaces, but this is really the best of the lot. This miniature rocket launcher has a rocket holder with three foam-rubber rockets. You can use the included software (Mac and PC versions) to aim the roc- kets horizontally and vertically and then fire them. The propul- sive force is provided by several springs in the rocket holder, and the range is approximately 3 metres. This rocket launcher has become so popular that hackers have already developed modified soft- ware for it. Several successor models have also been sighted already. Seen at: www.gadgets.co.uk High-tech ballpoint pen This is something we all need! Now you don't have to chew on your pencil during a drawn-out press conference. Instead, you can listen to relaxing music with this high-tech MP3 ball- point pen. Thanks to its generous storage capacity of 51 2 MB or 1 GB, the pen is also suitable for long mee- tings. After you've listened to all the music, you can simply switch on the built-in FM radio. If somebody hap- pens to say something interesting, the built-in microphone will pick it up nicely for you, so you don't have to miss anything. The rechar- geable lithium-ion battery is good for 7 hours of operation. Seen at: www.usbgeek.com Hovering globe It's still something special to see a metal globe hovering in the air thanks to a magnetic field. Here a bit of electronics and a coil are used to attract the globe just enough to keep it hovering in the air. Various models are available. Last year we had a very modern one, and this time we chose an 'antique' model with a nice 20-cm globe. The base of the copper-coloured frame hou- ses a full-fledged microcontroller that adjusts the magne- tic field 1 6,000 times per second. Seen at: www.gadgets.co.uk Roll-up keyboard This keyboard (the musical kind) has 49 keys and a USB port (which is where it draws its operating power) along with another convenient feature: your can roll it up. That's something keyboard players who are familiar with normal 'hardcase' keyboards will certainly appreciate. Especially since this flexible USB keyboard can hold its own against its space-gobbling cousins. The key- board features eight percussion instruments, demo songs, vibrato and other effects, a metronome, and much more. You can also compose your own rhythms if you want. The beat can be adjusted from a sedate 40 beats per minute to a nerve-wracking 208. Seen at: www.usbgeek.com Shake those numbers! You're probably already familiar with pocket torches that you shake to generate the necessary energy. The same principle has now been applied to pocket calculators. The little calculator shown here has a small tube at the top with a magnet inside that can move back and forth. When you shake the calculator, a coil surrounding the tube generates enough electrical energy from the moving magnet to power the calculator for a short while. That's naturally something else than a calculator that runs on solar cells or uses water as a source of energy. Seen at: www.gadgets.co.uk Electronic Lederhose This pair of electronic Lederhose (leather shorts) comes from the Bavarian clothing manufacturer Lodenfrey. This traditional sou- th-German garment is fitted with an MP3 player with 51 2 MB of memory and a built-in (or should we say sewn-in) control panel. It also has a handsfree function for your mobile phone. Now you can slap your thighs, listen to music and make phone calls all at the same time. Seen at: www.lodenfrey.de USB rocket launcher This article is full of all sorts of USB slippers If you often sit in front of your computer until the wee hours, it can get pretty uncomfortable sometimes, especially during the cold season. However, you can avoid cold feet with these USB-powered electric slippers. These fluffy slippers can be connected to any computer with a USB port (PC or Mac) or even a game console. The heating element is washable, and it warms the slippers to a maximum temperature of 48 °C. Now that's comfort! One caution: make sure your computer has enough USB ports and a hefty power supply, since otherwise it probably won't to be able to handle all these USB gadgets. Seen at: www.usbgeek.com 16 elektor electronics - 12/2006 Pleasant scents Overclock your brain Overclocking CPUs is old news by now - the new rage is overclocking the grey mat- ter between your ears. This gadget provides especially intensive training of your grey nerve cells. With this device and a bit of practice, you can significantly boost the 'clock frequency' of your brain. It trains your assimilation speed. We've heard that our boss has already ordered a thousand or so. Seen at: http://shop.elv.de Water- powered calculator Following in the steps of pocket calculators powered by AC adapters, batteries and solar cells comes the most ecologically responsible model yet. It doesn't run on alco- hol, but instead on water, which explains its name: H20. It goes for several weeks on just a few drops. When it doesn't want to work any more, just fill it up under the tap and you're all set for several more weeks. Handy, ecolo- gical, and economical - and above all a lot of fun! You know the type: glued to the computer day and night while churning out code at the rate of several pages a minute. This talent is often accompanied by sleep deficiency, personal hygiene that leaves something to be desired, and a penetrating musty odour. To help ca- mouflage the aroma of canned cola and ambulant pizza leftovers, we recommend this USB-powered aroma dispenser as a suitable gift. Citronella and anise, camphor and orange-peel oil are mind-expanding, so they help with debugging. Seen at: www.usbgeek.com Heated gloves Suppose you're sitting in the Trans-Siberia Express on your way to an important presentation on drilling for oil. Just when you want to run through your PowerPoint presentation again, the train's heating system fails. No problem - you simply slip on these USB-powered heated gloves and carry on. Incidentally, they match nicely with the USB slippers described in this article. However, in this case we recommend that you at least purchase a reserve bat- tery, since otherwise you could easily find yourself sitting with cold feet, cold hands, and a blank screen. Seen at: www.usbgeek.com Binary clock Seen enough of those omnipresent LCD clocks that show the time in hours and minutes with painstaking precision?. How about a clock that displays the time using blue LEDs, and what's more in binary form? That makes checking the time a mental exercise, since the six co- lumns correspond to hours, minutes and seconds, each in the form of tens and units. The time displayed by the clock in the photo is 1 2 hours, 1 minute and 47 seconds. The LED brightness can be set to three different levels. Of course, as an electronics whiz you'll master this new way of telling time in only a couple of minutes. Seen at: http://www.bestel.nl Seen at: www.ledindon.com H Racer: a hydrogen-powered car The first car fully powered by hydrogen: that's the techno- logy of the future! Unfortunately, this model is rather small, but the 21 st century is still young. The H Racer is a full- fledged demonstration of a hydrogen propulsion system. A solar cell supplies the energy to produce the hydrogen (H), and the transparent housing lets you easily see what hap- pens: blue LEDs illuminate the tiny bubbles of oxygen ( 02 ) that are expelled from the water reservoir. Seen at: www.latestbuy.com.au Cubite speaker and USB hub We'd be lost without USB in this world, and USB hubs are at least equally indispensable. The Cu- bite Speaker USB hub is a stylishly fashioned box that houses not only an excellent speaker for your PC, but also a USB hub with ports for your web- cam, MP3 player, memory stick and digital came- ra. The speaker has a large volume knob and two smaller knobs to adjust the treble and bass. It is powered from the USB port, so it doesn't need an external power supply (or any additional software). Seen at: www.iwantoneofthose.com 12/2006 - elektor electronics 17 INFO & MARKET ENCLOSURES Enclosures and front panels Thijs Beckers There are an incredible number of options these days for the safe 'packing up' of electronic circuits. Open any catalogue from any well-known mail-order company and you will get an impression of the extensive range on offer. This article gives an overview of the different types with their particular characteristics and provides hints as to how you can make a professional looking front panel yourself. From an economic and marketing perspective, the enclo- sure, including the front panel, of commercial equipment is very important for the manufacturer. Equipment that does not look attractive will sell poorly, of course, and is nearly impossible to extol its virtues in advertisements. So it is logical that much time and effort is spent on the design of these enclosures. An additional consideration is the ergonomics of equipment that has many operating controls. The design of the enclosure is then already taken into account during the development of the circuit. This is usually not the case for prototypes, small (hand- made) production runs and home-built circuits. Of course, the marketing aspect is not a consideration here either. Specific characteristics, such as extra heavy-duty water- proof and explosion resistant boxes, are a little bit over the top for the average home project. A standard box is usually good enough. But that does not distract from the fact that appearance and function certainly also do play a role in your own circuits. With a little bit of searching for a nice and appropriate enclosure and a little bit of ef- fort for a front panel you can definitely make a nice look- ing piece of equipment that would not look out of place when displayed in the average electronics shop window. With a clean design and your own logo on the front pan- el it will look like the real thing. Making a choice For prototypes you usually choose from a few types of enclosures that may optionally conform to some stand- ard, (see inset Industrial Enclosures). For each design you will look at what type of enclosure suits best. There are a number of different types of enclosures that may be cat- egorised as follows: 1 . 1 9-inch enclosures, which can be easily built into, or removed from, a standard rack or industrial box. 2. Enclosures that are deliberately sized for the common 'Euro format' PCB. 18 elektor electronics - 12/2006 3. Console enclosures with a tailored front panel or (slop- ing) top for control or mixing panels. 4. Small enclosures with a built-in mains plug, which plugs into a power point just like a mains power adapter. 5. Enclosures for handheld applications, such as multimeters. 6. Enclosures for DIN rail systems, which are commonly used in an industrial environment. A few of the factors that are important for the type of enclosure are of course the size, safety, construction mate- rial, method of mounting and - mainly important in indus- trial applications - the NEMA and/or IP classification [1 ]. The size obviously depends on the components that have to fit in the enclosure, together with the connection and mounting options, internal and external access, thermal conditions and potential future extensions. The material selected needs to be able to withstand the conditions that the enclosure will be subjected to at the location at which it will be used. Considerations are corrosion resistance and rigidity requirements. The NEMA and/or IP classifica- tion is an industrial standard for the protective characteris- tics of an enclosure. Tables 1 and 2 in the inset Indus- trial Enclosures give an overview of these two common protection classifications. Machining The internal electronics will, in all likelihood, be con- nected to the outside world via cables and plugs. This requires a number of plugs and contact points, which usu- ally requires some machining of the enclosure. In addition, the operating buttons need to be given a logical position, generally on the front panel. The front panel usually demands the most attention. To make an attractive aluminium front panel, complete with label- ling, requires a fair amount of equipment (drills, routers, screen printer, sander, etc.) and the process is not easy. Also, if you only need to do these things every once in a while it is not worthwhile to invest in the required equip- ment. There are a number of companies that specialise in the manufacture of front panels, such as the German company Schaeffer [2], the American Internet company eMachineShop [3], the English company CTL-Compo- nents [4], the international company Elma [5] and the Dutch company Antronics [6]. Schaeffer and eMachine- Shop even offer their own (free!) software, which makes it easy to draw your own design. This design can then be sent to the manufacturer who will then machine and screen print the front panel. In this way you can obtain a professional looking front panel. Do it yourself The specialist equipment that is required for this machin- ing has its price, of course. This is often clearly noticed from the amount of money you have hand over for a cus- tom manufactured front panel. A cheaper solution is the self-adhesive, transparent film that can be printed with a laser printer. This film gives only limited protection from scratches and gives a somewhat dull result. The latter can be improved with some plastic spray. In addition to the special film for laser printers there is also the overhead transparency for inkjet printers. This Case manufacturers Manufacturer Website ABB www.abb.nl APW www.apw.com Bernstein www.bernstein-ag.de Bopla www.bopla.de Boss www.boss-enclosures.co.uk Box www.boxenclosures.com Cooper www.b-line.com Deltron Emcon www.deltron-emcon.com Dold www.dold.com Erni www.erni.com Eurobox www.euroboxenclosures.com Fibox www.fibox.nl Himel www.himelenclosures.com Hammond Manufactoring www.hammfg.com Lawtronics www.lawtronics.co.uk Monacor www.monacor.nl Moeller benelux.moeller.net/nl OKW www.okw.com Pactec www.pactecenclosures.com Retex www.retex.es Rittal www. rittal.nl Rolec www. rolec.de ROSE Systemtechnik www.rose-pw.de Sarel www.sarel.nl Schroff www. sch roff . co.uk Serpac www.serpac.com Spelsberg www.spelsberg.nl TEKO www.tekoenclosures.com VERO www.vero-electronics.com Weidmuller www.weidmuller.nl 12/2006 - elektor electronics 19 INFO & MARKET ENCLOSURES Table 1 : Description degrees of protection to DIN EN 60529 (VDE 0470) (IP-type) Number Degrees of protection for people and solid objects (first number) Degrees of protection against water (second number) 0 No protection No protection 1 Protection against solid objects greater than 50 mm diameter Vertically falling drops of water do not cause damage 2 Protection against solid objects greater than 12 mm diameter Drops of water with up to 1 5° from vertical do not cause any damage 3 Protection against solid objects greater than 2.5 mm diameter Drops of water with up to 60° from vertical do not cause any damage 4 Protection against solid objects greater than 1 mm diameter Splashing water from any direction does not cause any damage. 5 Completely protected against accidental touch, par- tially against dust Low pressure water jets from any direction do not cause any damage 6 Completely protected against accidental touch and against dust Strong jets of water do not cause any damage 7 - Water does not cause any damage if the enclosure is submerged by 0.1 5-1 m 8 - Water does not cause any damage if the enclosure is submerged by a specified amount 9 - Water under high pressure from any angle does not cause any damage Table 2: NEMA standard for enclosures NEMA standard Description NEMA 1 NEMA 2 NEMA 3 Enclosures constructed for indoor use to provide a degree of protection to personnel against incidental contact with the enclosed equipment and to provide a degree of protection against falling dirt. As NEMA 1 , and to provide a degree of protection against dripping and light splashing of liquids. Enclosures constructed for either indoor or outdoor use to provide a degree of protection to personnel against incidental contact with the enclosed equipment; to provide a degree of protection against falling dirt, rain, sleet, snow, and windblown dust; and that will be undamaged by the external formation of ice on the enclosure. NEMA3R NEMA 3S NEMA 4 As NEMA 3, except no protection against dust As NEMA 3, and in which the external mechanism(s) remain operable when ice laden As NEMA 3, and hose-directed water and that will be undamaged by the external formation of ice on the enclosure NEMA 4X NEMA 5 NEMA 6 NEMA6P NEMA 7 NEMA 8 NEMA 9 NEMA 10 NEMA 1 1 NEMA 12 NEMA 12K NEMA 13 As NEMA 4, and protected against corrosion As NEMA 2, but protection against airborne dust, lint, fibers As NEMA 4, and protected against water during occasional temporary submersion at a limited depth As NEMA 6, but protected against water during prolonged submersion at a limited depth Enclosure for indoor use at locations specified as Class I, Group A, B, C and D (refer National Electrical Code, NEC) withstands pressure caused by internal explosion and prevents the ignition if explosive gasses. Also inter- nal heat does not cause danger to the environment As NEMA 7, enclosure submerged in oil Enclosures for indoor use at locations specified as Class II, Group E, F en G (refer NEC). Protected against dust, internal over-heating does not create an explosion hazard for surrounding gasses Suitable for use in corrosive environments, enclosure submerged in oil As NEMA 5, for industrial use As NEMA 12, with knock-outs As NEMA 5, also protected against oil and non-corroding cooling fluids 20 elektor electronics - 12/2006 film is printed on the reverse side. First stick clear, double- sided adhesive foil (available in stationery shops) to the front panel and then the mirror-printed film. In this way the ink is also protected against scratches. In colour and using at least 300 dpi it will also look good and is not expensive. Before sticking the film to the front panel, you first have to make the holes in it. Tip: it is better to deburr the front side of small holes once the film is in place. The opening in the film will then have the correct diameter at the same time. You can easily cut square or large openings in the film with a sharp knife. On (ugly) plastic front panels you can use the standard sticker sheets for the front panel layout. Or alternatively, you can use standard paper and the above-mentioned double-sided adhesive foil. The colour of the paper will obviously determine the colour of the front of the enclosure. Tip: a 'membrane keyboard' can be made quite easily with an additional printed film between the front panel and the adhesive foil. Behind the printed keyboard is an opening in the front panel that could contain miniature pushbuttons. The front panel can be made from cheap materials, of course. Drilling To drill small round holes, twist drills are obviously the best choice. A good drill stand is very handy and a drill press is ideal. If you mark the locations of the holes with a centre punch then the tip of the drill will not wander if you are drilling free-hand. Large, round holes are best made by first drilling a smaller hole and then enlarging it with a reamer. Rectangular openings are a little harder. With simple tools it is best to proceed as follows: drill, within the cutout, a hole that's large enough for the saw blade of a hacksaw. Now cut the material to within about 0.5 to 1 mm of the desired opening. Remove the last little bit with a file. If you are using thin sheet for the enclosure it is better to use a jigsaw for this, instead of a hacksaw. Sandwich the thin sheet with thin plywood or something similar, that you cut at the same time. In this way the thin sheet will not bend. Leave the plywood in place also when filing. For very narrow openings (for slide potentiometers, for example), drill a number of small holes next to each other (with a good drill press and a short drill these holes can even overlap). With a little key file you can then remove the remaining unwanted material. A nice result Both in industry as well as for your own applications, the purpose of the enclosure is mainly to protect the elec- tronics components from permanent damage caused by moisture, chemicals and dust. At the same time it provides a protective function for the environment. This can be pro- tection to prevent the accidental touching of hazardous voltages but also for EMI. A second good reason to package a circuit is to make it look more attractive. The average user is not fascinated with a collection of components on a circuit board. A good front panel layout will also make it immediately ob- vious what each operating button does and how to use the equipment. In industry there is often great emphasis on the physical appearance. That is why specifically designed enclosures are often used, that are evaluated at an early stage of the Industrial enclosures The material from which an enclosure is made determines its physical properties for the most part. Plastic is usually chosen for portable applications, because of its weight and wear resistance. In other applications other factors such as mechanical strength, electrical and thermal resistance and fire resistance are more important. Tables 1 and 2 show the protection classification that an enclosure can offer for two common standards. To provide protection against EMI, the enclosures can be coated with, for example, carbon, aluminium or copper. This is very im- portant, in particular for sensitive electronics, if the circuit is to operate without problems. Up to 1 MHz you can use electronic fil- ters and metal screens. Above that frequency a decent Faraday cage is required. To also keep out magnetic fields, an aluminium or steel sheet enclosure is inadequate. This application requires special \i-metal. A number of common materials for plastic enclosures are polycarbonate , polystyrene , polypropylene and ABS. Some enclosures are transparent for IR. This is very handy for remote controls , for example. And there are many more special properties along these lines. If we select a metal enclosure , we can make a distinction between aluminium , galvanised steel sheet , stainless steel and a number of other materials. A metal enclosure has the advantage that it will largely block electric fields , of course. 12/2006 - elektor electronics 21 INFO & MARKET ENCLOSURES overall design. The initial costs of a newly designed en- closure may be quite high, but large numbers reduce the price per enclosure considerable. Buying large numbers of standard enclosures would be much more expensive in the end, because the various holes still need to be machined. If you are working with prototypes then the considera- tions are completely different of course. It is often the case that the circuit is already finished and you only need an enclosure that will fit everything. With the directions given above, it is entirely possible to make a front panel that does not have to look inferior to that of a professional piece of equipment. ( 060298 - 1 ) All photographs: Conrad Electronics. Weblinks: id www.nema.org [2] www.schaeffer-ag.de [3] www.emachineshop.com [4] www.ctl-components.com [5] www.elma.de [6] www.supermoduul.nl GLOSSARY ABS: Acrylonitrile Butadiene-Styrene. Rigid man-made fi- bre with very little tendency to shrink. EMI: Electromagnetic Interference. Undesired interference from electromagnetic fields. NEMA: National Electronic Manufacturers Association, American association which represents the designers and manufacturers of electronic equipment. IP: Ingress Protection, protection against access or touch. Stainless Steel: alloy of iron, chromium and carbon which forms a layer of chromium-oxide on the outside so that the material does not corrode any further. ju-metal (mu-metal): Nickel-iron alloy with 2% copper and molybdenum with a very high magnetic permeabi lity. As a result it is very suitable for blocking magnetic fields. Advertisement Tel: Qt 635 40347 HGwtwrji EScttnjnicslId Fai:M«S*l*J hMBu^i BtlU 2AD i mi A ciiciiils ivrrwbury Icmi.lg. uk wwm rpriccU oo: s. c*. u k ANopr; L.AMnmr 'i lj AM£b TAT/ON j-Tdffu arr^iffv-iFYf-p Hnw to hjjnjs pmb Ocs iejiv Yulw Own Vrcen Game C'uwsiat.rr IrrribMIu ,J - _ Dr-Jpji by flu * ~ ■ __ Mar\ fldD/JBOO, SlrwUirZK Spectnmi, VSfe'fej! ApfAff II -flc CwnrnWhW'P ti4! jj 4 rmrrcN f/£ : .» T uo* . lh — t-tt & (id run ! - &>N£ r* HUrtrrlMi AhE 5-uJmrtj! ■ run Wwf to L4JFT1 Sjrtfm * Ftflp AVt+r* SC- 5 . MkrP Ei*"wi Urt 4 5j4rn 0ewtep*iwK4(H ' pDiM-Jl m D- •. j.:'i i" 4 il!ir ’ tiUki and l’ 1 nv. -r i Supers &&& • .J bnvbfvnprt KP Ccrmriiln KH www. X Game Station .com Ph: ■J 3 B.T 3 iE.-zagB | aupmin^MWE.NFr ilumji auia MNKI I 22 elektor electronics - 12/2006 Ready to go kit specially for Elektor readers In next month's issue, Elektor - in cooperation with a renowned manufacturer - presents an extraordinary project many readers have eagerly awaited for many years: a real 3D milling machine for home construction from a kit. taining all metal parts (see photograph), the stepper motors, two ready-assembled circuit boards for the drive electronics, a spindle motor with the associated clamping device and a base plate. The kit comes with special control software that's remarkable for its user-friendliness and general structure. All this is supplied to you no less than 700 pounds (ap- prox. 1 ,000 euros) cheaper than a comparable instrument. Thanks to the article in the January 2007 issue and the sup- plied manual, construction of the Elektor Milling Machine is straightforward. Our serious advice is not to miss this unique project in next month's issue! (060232-a) Although we can't go into details right now, we also can't resist printing a pho- tograph of all metal parts that go into building the Elektor 3D Mill- ing Machine. Tell us if we're wrong when claim- ing that this is the first af- fordable tabletop milling machine for anyone do- ing precision mechanical work, be it for electronics, electromechanical ap- plications or modelling. The machine is versatile in that it can be used not just for the production of front panels and 3D mod- els, but also to mill your own PCBs at home, at in- credible precision. The net X-Y working sur- face of the milling ma- chine is 300x400 mm, while the Z (vertical) range is specified as 1 00 mm. A complete kit The Elektor 3D Milling Machine comes as a comprehensive kit con- 12/2006 - elektor electronics 23 HANDS-ON SW RECEIVER Gert Baars As a special treat for all radio amateurs we present a general-coverage AM/FM/SSB receiver with a wide range of features, which uses a DDS chip in the VFO section and also has a DRM output that can be fed into a computer. The receiver is controlled by a modern 8-bit Atmel RISC processor. The frequency readout is on a clearly legible 7-segment LED display. This receiver can be seen as the suc- cessor to the receiver published in January 1999. The experience gained with this predecessor (which, inciden- tally, has given a lot of listening enjoy- ment to many constructors), has been used to develop a more advanced RF receiver. The best parts of the original design have been kept, such as the Interme- diate Frequency (IF) and double con- version superheterodyne sections. This new receiver also has some new func- tions up its sleeve. For example, there is a DRM output that can be fed to a PC for decoding. The tuning resolution has also been improved to provide better fine-tuning, for example for SSB recep- tion. This makes the frequency readout more precise and a BFO is no longer necessary. Some thought has also gone into the aerial input stage, where an active in- put circuit makes the need for a long wire aerial superfluous. We’ve also used a number of contem- porary components, such as a DDS chip that is used as a VFO; the receiver is controlled by a modern 8-bit Atmel RISC processor. In the design our preference went to 7- segment LED displays for the frequen- cy readout, which look better and are easier to read than a standard LCD. This receiver has three switchable bandwidths, each of which is opti- mised for use with one of the possible reception modes (AM, FM, USB, LSB or DRM). The sensitivity and the ability to deal with large input signals have been im- proved for the reception bands of this receiver, largely through the use of a diode-ring mixer as the first mixer. The receiver itself generates very little noise. This can be clearly heard when you aren’t tuned into a station and con- nect an aerial: the noise then increases markedly. A sensitivity better than 1 pV makes little sense at lower frequencies (roughly below 7 MHz), since it isn't the weak signals that make reception diffi- cult, but rather the strong signals that swamp the others. A higher gain just doesn't make sense under these cir- cumstances. Furthermore, you should find that most signals in that frequency range are strong enough to be picked up, even with a telescopic aerial. In a nutshell, this is a receiver that is suitable to pick up all broadcast and amateur bands between 0 and 30 MHz. The ease of operation, its various func- tions and its performance are guaran- teed to provide you with many hours of listening enjoyment. Block diagram The block diagram (Figure 1) starts with the aerials. The internal aerial is followed by a high impedance ampli- fier with adjustable gain. This ampli- fier isn’t required for an external aeri- al. Directly after the aerial switch is a low-pass filter with a corner frequency of 30MHz. This suppresses any possi- ble image frequencies and other un- wanted signals. Following this is the first mixer. Its purpose is to convert the range of 0 to 30 MHz into 45 MHz. For this we require a VFO frequency of 45 to 75 MHz. A first IF of 45 MHz is a good choice because the first image frequencies are 90 MHz away, which make them easy to suppress. The VFO signal is produced by a DDS generator. More details on its opera- tion can be found in the DDS RF Signal Generator article that was published in the October 2003 issue. The reference frequency for this DDS is obtained by multiplying the 10 MHz crystal oscil- lator frequency by a factor of three to obtain 30 MHz. Inside the DDS a PLL multiplies this signal a further 6 times, so that the internal reference frequency 24 elektor electronics - 12/2006 becomes 180 MHz. Normally the max- imum output frequency of the DDS should be around 40% of this reference frequency But if we add a better band- pass filter at the output it is possible to increase this figure somewhat. The DDS can now produce frequencies in 0.04 Hz steps. The required 100 Hz resolution therefore isn’t a problem. The DDS is controlled by a microcon- troller that also takes care of driving the frequency readout, the scanning of the keypad and a rotary controller for tuning. A number of extra I/O lines take care of the selection of the au- dio bandwidth and reception mode (FM/AM/L SB/USB). After the first mixer is the first IF fil- ter, which has a bandwidth of 15 kHz. This bandwidth determines the maxi- mum possible bandwidth of the receiv- er. This filter suppresses the image fre- quencies of the second mixer. It also removes any other unwanted by-prod- ucts from the output of the first mixer. The signal now arrives at the second mixer. This converts the signal into an IF of 455 kHz. It does this using a fixed local oscillator frequency of 44.545 MHz. A frequency of 455 kHz was cho- sen because this low frequency can be easily amplified, and also because Specifications • Double conversion superheterodyne receiver - first IF 45 MHz, second IF 455 kHz • Microcontroller control of the DDS generator and other functions • Tuning range of 0 to 30 MHz in steps of 1 kHz or 1 00 Hz • DRM output, suitable for connection to a PC soundcard • Audio bandwidth of 3, 6 or 1 5 kHz, dependent on the reception mode • Keypad with 1 6 keys for inputting the frequency, mode and bandwidth • Memory for 64 frequencies, including bandwidth and mode • Synchronous detector for AM • Quadrature detector for FM • Product detector for SSB • Built-in adjustable input amplifier for a telescopic aerial • Approximate sensitivity of 1 to 2 yL/V (without preamp) • Supply voltage of 1 3 to 1 5 V, max. 650 mA 12/2006 - elektor electronics HANDS-ON SW RECEIVER In the early days of Elektor Electronics many types of receivers were pub- lished on a regular basis. Due to the relatively high cost of semiconductors in those days these receivers were usually fairly simple designs. As a com- parison we'll show you a shortwave receiver that was published almost 40 years ago in Elektuur magazine. The use of a tunnel diode in this design is of particular interest because it was an unusual component at the time. The construction method was nothing like what we expect these days: some soldering pins and wires were used to connect all the components together because it was quite difficult at the time to produce a PCB. (Note: referring article not available in English) n Back in time J there are many inexpensive but good- quality filters available for this much- used frequency The gain of the second mixer can be adjusted automatically or manually To prevent overloading the receiv- er when very strong SW signals are picked up via a wire aerial we had to add a type of AGC circuit. Manually re- ducing the gain can improve the clarity of SSB signals in the amateur bands, because this reduces the QRM. After buffering the signal it reaches three switches that select one of three filters, each with a different band- width. These switches are controlled by the microcontroller. The three bandwidths in question are 3, 6 and 15 KHz. 3 kHz is suitable for SSB, 6 kHz for AM and 15 kHz for FM and DRM. After another buffer is the IF ampli- fier. This actually consists of two am- plifiers, each with an adjustable gain. This combination can provide a vari- able gain up to 80 dB, which is suffi- cient to keep the output signal level of the IF amplifier constant for both weak and strong signals. An AGC circuit is used to adjust this gain automatically. This adjustment follows the signal fair- ly quickly, for example to suppress the fading of AM signals. But for SSB re- ception it is made to react more slow- ly. The fast ‘attack’ and slow ‘decay’ of this AGC circuit improves the audio quality of SSB and CW signals. The DRM detector takes the IF sig- nal before it reaches the IF amplifier. This is because we don’t need much amplification of the signal for this out- put. The DRM transmitters are power- ful enough to produce a few hundred mV before the IF amplifier. This also pp avoids any noise from being introduced by the extra amplifiers. The DRM detector consists of a prod- uct detector with a local oscillator of 467 kHz. The difference between this and 455 kHz is 12 kHz, which is fil- tered before being made available at the DRM output. The 10 kHz wide sig- nal now covers frequencies between 7 and 17 kHz, which is exactly what is required by the DRM program, Dream. An AGC circuit is not really neces- sary for DRM because the soundcard and the Dream program can cope with widely varying signal strengths. Following the IF amplifier are the AM, FM and SSB detectors. The AM de- modulator used here is a variation on the well-known synchronous detector. The principle of operation is that the AM signal is multiplied by an unmodu- r - "" _____ n J Internal and external aerial J ■ This receiver has the facility to accept two different aerials, each of which is suitable for different frequency bands. ■ ■ Since even a suspended 20-metre length of wire has a higher impedance at low frequencies, an external aerial will work better than an internal ■ one down to about 500 kHz. For lower frequencies it is better to switch to a telescopic aerial, which also has a high impedance, but is only very I lightly loaded by the pre-amplifier. • The external aerial can be a 1 0 to 20 metre length of wire, suspended between 2 isolators, which in turn should be half a metre away from their mounting points. These isolators can be easily made from a length of PVC tubing. Two pieces around 20 cm long, with holes drilled at the ends are perfectly suitable. There is nothing special about the wire used for the aerial, as long as it can withstand strong winds and heavy rain. We would advise against connecting an aerial longer than about 1 metre to the pre-amplifier. This can result in distortion and other interferen- 1 ce. You would also pick up a lot of noise. A telescopic aerial or a 50 cm length of wire works perfectly well. 1 26 elektor electronics - 12/2006 lated signal with exactly the same fre- quency and phase. This signal can be extracted using a PLL with a slow con- trol loop, which keeps the frequency and phase intact should the AM sig- nal momentarily fade. This results in less distortion than would otherwise occur when the signal fades. It is how- ever also possible to extract the mix signal directly from the input signal as long as the modulation components are removed first. This is easily done with the help of a limiter. This limiter provides a mix signal with a constant amplitude. This results in good quality AM reception and provides better re- sistance to distortion caused by fading (which occurs in diode detectors). We have used a quadrature detector for FM signal is multiplied by the same signal, but with a phase shift. This phase shift is exactly 90 degrees at the IF, but increases/decreases for an in- crease/decrease in the input frequency. The multiplier has a corresponding in- crease/decrease in its output voltage. A balanced multiplier is in fact very similar to an EXOR phase detector. The SSB detector is a product detec- tor. If we multiply the USB or LSB sig- nal with another signal that differs in frequency by 1.5 kHz we obtain the audio signal. Note that the first mixer creates a mirror image of the spectrum because we’ve using high-side injec- tion, so USB becomes LSB and vice versa. The local oscillator used here is controlled via the microcontroller to This comes in very useful when receiv- ing SSB and CW signals. The corner frequency can be adjusted from about 500 to 3500 Hz. To reduce interference from hum and other low-frequency noise a high-pass filter is also included, with a corner fre- quency of 300 Hz. The last stage is an audio power am- plifier. This has sufficient output power to drive a 2 W loudspeaker. Schematic We should now be familiar with the general design of the receiver. This makes it a lot easier to interpret the circuit diagrams in Figures 2, 3 and 4, and not be alarmed by the large Figure 1. The block diagram for the shortwave receiver is fairly elaborate. At the bottom-left you can see the DDS generator and the microcontroller. the FM demodulator. This type of de- tector is well known for the good qual- ity audio it produces. The limiter used in the AM section is also used to sup- ply a constant amplitude signal to the FM demodulator. This helps to avoid distortion caused by very strong input signals. It also suppresses AM noise components, which could overload the detector if their amplitude was too large. The overall result is a much bet- ter signal to noise ratio. The actual operation of the quadrature detector is quite straightforward. The produce either 456.5 or 453.5 kHz. This way the selection can be made via the keypad. The microcontroller selects the re- quired mode with the help of analogue switches that follow each of the detec- tors. Since the microcontroller controls both the mode and the bandwidth it can automatically select the appropri- ate bandwidth for each mode. After the switches is an adjustable low-pass filter with a steep cut-off. This suppresses whistles and other in- terference caused by nearby stations. number of components. The blocks shown in Figure 1 can be found in the diagrams quite easily. We start with descriptions of the prin- cipal parts in the receiver section of Figure 2. At the top-left is the pre-am- plifier for the telescopic aerial. This consists of a two-stage configuration using low-noise DG MOSFETs (T1/T2). The first stage provides a high-imped- ance input and some gain, the second stage functions as a 50 Q driver. The gain can be adjusted from about +6 to -20 dB. 12/2006 - elektor electronics 27 HANDS-ON SW RECEIVER R32 C53 L12 ^ v EOHI-^P-04 2 DRM 28 elektor electronics - 12/2006 3 +5VD m |j[ BC557B Q Jc.1 K1 J " KEYPAD o- 3 4 5 6 7 a 8 ENCODER DISPLAY 31 _ ■10 11_ 12 13 14 15 16 17 40 © RESET ALE IC1 PB0(T0) PC0(A8) PB1(T1) PC1(A9) PB2(AIN0) PC2(A10) PB3 PC3(A11) PB4(SS) PC4(A12) PB5(MOSI) PC5(A13) PB6(MISO) PC6(A14) PB7(SCK) PC7(A15) ICP OC1B AT90S851 5 PDO(RXD) PAO(ADO) PDI(TXD) PAI(ADI) PD2(INT0) PA2(AD2) PD3(INT1) PA3(AD3) PD4 PA4(AD4) PD5(OC1 A) PA5(AD5) PD6(WR) PA6(AD6) PD7(RD) PA7(AD7) -L. XI X2 C' AM AM FM FM LSB/USB SSB SSB NARROW MEDIUM WIDE NARROW MEDIUM WIDE LSB/USB 030417 -12a Figure 2. Schematic for the receiver section. There is a heap of components, but with the help of the block diagram you should be able to recognise the different sections. Figure 3. The electronics for the microcontroller board. The wiring diagram at the bottom-left shows how K3 and K4 on the receiver board should be connected to K3 on the microcontroller board. Figure 4. This part is on the display board: display driver, six-digit 7-segment display, rotary encoder and a keypad with 16 keys. Two BA482 switching diodes (D2 and D3) have been used to switch between the pre-amplifier and the input for an external aerial. This type of diode has a very low AC resistance when a certain forward current flows through it. From the aerial switch the signal is fed into a low-pass filter consisting of in- ductors LI to L3 and capacitors Cll to C17. These form a Cauer-like filter, which cuts of steeply at 30 MHz and which has a fairly flat transfer function from 0 Hz onwards. The input and out- put impedance of this filter is 50 Q. Following this input filter is the first mixer (MIX1). We have used an ASK-1 diode-ring mixer made by Mini-Circuits Labs because of its ability to handle 4 +5D 0 - +5VD 0 L2 IOO^iH C7 lOOn C8 jcg 220i^^W^p00n LD6 SC52-11GWA LD5 SC52-11GWA LD4 SC52-11GWA LD3 SC52-11GWA LD2 SC52-11GWA LD1 SC52-11GWA a 7 a 7 a 7 a 7 a 7 a of. OJj 4 2 1 _9_ JO 0: Uol 4 2 1 _9_ JO 0: njo ; 4 2 1 of. U; 4 2 1 0: U o; 4 2 1 _9_ JO 0: Uo] cc cc dp _5_ cc cc dp 5_ cc cc dp _5_ cc cc dp _5_ cc cc dp _5_ cc cc dp 7 14 6 16 4 20 2 23 1 21 9 15 10 17 5 22 24 19 R5 18 © ISET DIN SEGA SEGB IC2 CLK LOAD SEGC DIG7 SEGD DIG6 SEGE DIG5 SEGF DIG4 SEGG DIG3 SEGDP DIG2 MAX7219 DIG1 DOUT DIG0 -L. _l_ 4 9 13 12 K5 i SI o 1 ENCODER ENCODER DISPLAY K2 KEYPAD (o o o o- o- o- o- o- S14 v sio v 2 O. S6 v 3 S2 V S15 v S11 v ' 6 O. S3 v B S16 v S12 v ' 8 O. S8 v 9 ^ S4 V c S17 v S13 v 0 S9 v W L S5 ^ D 030417 -12c 030417 -12b 12/2006 - elektor electronics 29 HANDS-ON SW RECEIVER large input signals. Eagle-eyed readers will have noticed that we've swapped the input (RF) and output (IF) of this mixer. The mixer still works well in this configuration, but it has the advantage that the input frequency can be a lot lower (almost down to 0 Hz, which is exactly what we require). At the output of this mixer is a filter (FL1) that suppresses unwanted by- products and the image frequencies of the second mixer. An LC network at the output of the filter is used to match the impedances. We now come to the second mixer, which is built around T3. Again we've chosen a low-noise BF992 DG MOS- FET, which has a somewhat better gain than most of its equivalents. As far as large signals are concerned, we don't demand as much from this mixer as from the first one because we're only really dealing with one fre- quency here. The purpose of the second mixer is to convert the first IF (45 MHz) to the second IF (455 kHz). Specifically de- signed crystals with a frequency of 44.545 MHz are available for this. The local oscillator signal for the first mixer is supplied by a VFO. This signal should have a frequency range from 45 to 75 MHz, with a resolution of 100 Hz. We have chosen an AD9851 DDS made by Analog Devices (IC3 in Figure 3), which provides a stable output that can be accurately programmed in small frequency steps. The frequency range is just about wide enough for use in our application. At the output of the DDS is a band- pass filter (C34 to C39, L15 to L20) with a pass-band of 45 to 75 MHz. The im- pedance of this filter is about 100 Q. The impedance is lowered to 50 Q us- ing resistors Rll and R12. The result- ing signal is then fed into a MAR8 (IC2 in Figure 2). This IC (made by Mini-Cir- cuits) is a wide-band amplifier with an output impedance of 50 Q. It also has enough output power to provide a good signal to the first mixer. After buffer T4 come the three IF-fil- ters. These can be individually turned on using BA482 switch diodes (us- ing the same principle as for the aer- ial switch). In this way the processor can switch between bandwidths of 3, 6 or 15 kHz. The IF transformer (TR1) provides a load to the filters that is equal to their characteristic impedance (about 2 kQ). Following buffer stage T7 we end up at the IF amplifier consisting of two AD603 ICs made by Analog Devices (IC3/IC4). The gain of each IC can be adjusted over a range of 40 dB using a control voltage. This gives us a total AGC range of 80 dB. The AGC voltage is also used to drive the S-meter (Ml) via T8. The detector for DRM signals has been placed straight after the IF filters. The IF amplifier is therefore not used for DRM signals, as we saw from the block diagram. The DRM signal is decoded using a product detector that mixes the in- put signal with a fixed frequency sig- nal. The mixer chosen for this job, an NE612 (IC 1), has an internal Colpitts oscillator. This can be set up in such a way that it will oscillate at a slight- ly lower frequency than the resonant frequency (470 kHz) of the CSB470 res- onator used here. In this case we re- quire 467 kHz, which is used to convert the 455 kHz signal into an audio signal with a centre frequency of 12 kHz and a bandwidth of 10 kHz. We've now arrived at the detection stages for AM/FM/SSB. Each of the three stages has been built around an NE612 mixer IC. The SSB detector is a product detec- tor, as is usual for SSB detection. The internal oscillator of IC5 has been con- figured in such a way that only one resonator is required for USB as well as LSB operation. The trick used here is that transistors T13 and T14 switch a trimmer capacitor either in series or parallel with the resonator. The quadrature detector for FM de- modulation is built around IC6. This detector is very suitable for demodu- lating narrow-band FM, which is nor- mally used in the 11-metre CB band. Because this type of demodulator is somewhat sensitive to AM compo- nents, the signal is first fed through a limiter. This consists of a push-pull transistor pair (T10/T11). With the val- 30 elektor electronics - 12/2006 ues for the base resistors as shown, the signal fed to the NE612 will be limited to about 250 mV . pp The simplest way of demodulating AM is with an ordinary diode. A disadvan- tage of this method is that distortion is introduced when the signal weakens. This is particularly a nuisance when the signal fades, which happens fairly often in the shortwave bands. A syn- chronous detector (IC7) is more resist- ant to these occurrences. For this we use the signal from the limiter in the FM demodulator as the mix signal. The amplitude of this signal is virtu- ally constant, even when the signal strength varies a lot. There are now three available audio signals, which can be selected by the microcontroller with the help of three BS170 FETs that are used here as ana- logue switches. The receiver is equipped with an effec- tive audio filter. This is an adjustable low-pass filter built around IC8, which is a switched capacitor filter. The MAX7400 contains a very steep 8 th -or- der elliptic filter where the corner fre- quency can be set with a capacitor. If a varicap (D8) is used for this capacitor then the corner frequency can easily be adjusted using a potentiometer. An active fifth-order high-pass filter built around opamp IC9 then filters out all frequencies below 300 Hz, thereby suppressing hum and other low-fre- quency noise. The final stage is an audio power amplifier, for which we’ve chosen an LM380N8. This 8-pin IC is capable of delivering 2.5 W of audio power when supplied with a high enough voltage. In this case we supply the IC with the maximum permitted 15 V which means it can output 1.7 Watts into 8 Q. That should provide enough volume in even somewhat noisy environments. At the heart of the control section is an AT90S8515, a microcontroller made by Atmel (IC1, Figure 2). One of its many tasks is to provide the DDS chip (IC3) with the correct data. This happens se- rially, which requires fewer I/O lines. For each change in frequency the mi- crocontroller sends a string of 40 bits to the DDS. This happens extremely quickly so you won’t experience any delays when changing the frequency. A rotary encoder (SI in Figure 4) is used for tuning purposes, which sup- plies 24 pulses per turn to the micro- controller. The encoder output is con- nected to an interrupt line, so not a single pulse will be missed by the soft- ware. In this way you can tune through 24 kHz per complete turn at 1 kHz reso- lution, which is sufficient for AM and FM. The resolution can also be set to 100 Hz (via the D key on the keypad), which results in 2.4 kHz per turn. This is more suitable for tuning to a SSB sta- tion on the amateur bands. It would be nice if the encoder could provide more pulses per turn, so that you could al- ways tune with a resolution of 100 Hz. In this case you would need to replace it with an optical encoder. The keypad is another input device that is read by the microcontroller. This consists of 16 keys arranged in a 4x4 matrix. In this configuration you only need eight I/O lines to scan the key- pad. The scanning is fast enough never to miss a key press. Apart from the 10 digits there are four extra keys on this keypad (A, B, C and D), which are used as function keys. This reduces the number of switch- es required on the front panel, which makes the operation of the receiver easier and clearer. Three I/O lines from IC1 provide the display driver (IC2, a MAX7219) with data. This display driver can drive a maximum of eight 7-segment displays. This IC also has the ability to control the segments of each digit individually. In this application we’ve made use of this to display an L for LSB mode, a U for USB mode, an F for FM and an A for AM, followed by the bandwidth of ei- ther 3, 6 or 15. And last but not least, the microcon- troller also controls the settings for the bandwidth and modes. This is imple- mented very simply using seven I/O lines, which are set high or low by the software as required. The software for the microcontroller was written in assembly language and consists of about 1800 lines. The pro- gram has 21 subroutines, a reset rou- tine, two interrupt routines (encoder, timer) and a main program loop. A programmed microcontroller can be ordered from Elektor Electronics using order code 030417-41. In contrast with other Elektor Electronics projects we can’t provide you with the source and hex files. Each of the boards for the receiver has been provided with a liberal number of voltage regulators, suppression chokes and capacitors. The supply voltage of 13 to 15 V (0.5 A) is provided by a mains adapter. Construction The electronics for the whole receiver have been divided across three boards: a receiver board, a microcontroller board and a display board. Due to a lack of space we can only show you photos of the completed boards in this article. All PCB layouts, component overlays and the accompanying parts lists can be downloaded free of charge from httpj//www.elektor.com/ (look in magazine/December 2006/Shortwave Capture). Ready-made circuit boards are available from Elektor’ s business partner ‘The PCBShop’ (Eurocircuits) In a radio receiver you obviously have to use several special RF components. The best places to buy these are spe- cialist electronics firms, such as inter- nationally operating Barend Hendrik- sen (www.xs4all.nl/~barendh) or HaJe Electronics (www.haje.nl). A reasonably experienced electronics hobbyist shouldn’t have many prob- lems with the construction. There is only one component that is difficult to solder: the DDS chip, which comes in an SSOP package! There are two parts lists: one for the receiver board (-1) and one for the mi- crocontroller and display boards (-2). Take care not to mix up the part num- bers between -1 and -2. The receiver board (030417-1) has been made very compact. Because of this, the space for resistors is smaller than usual and the leads have to be bent closer to the body. All SMD FETs and SMD transistors have to be soldered on the underside of the board. The MAR8 can be soldered either way up, since its connections are symmetrical. Do take care that the lead with the indica- tor dot is soldered to the correct pad. We decided to make JP1 (aerial input selection) a header with a jumper, but if you intend to change the aerial input on a regular basis then it will be much easier if you add another switch to the front panel instead. As we mentioned earlier, the solder- ing of IC3 and its associated compo- nents on the microcontroller board re- quires very delicate work. The decou- pling capacitors are also SMD; these should preferably be 0805 types, but 1206 ones fit as well. You should first solder two decoupling caps (C24, C27) underneath (!) L 12 and L13. The headers for K3, K6 and the supply are soldered onto the solder-side of the microcontroller board (assuming that you don’t want to solder the con- 12/2006 - elektor electronics 31 HANDS-ON SW RECEIVER nection leads straight onto the board). The voltage regulators (IC5 and IC7) are also found here. These should be provided with a heatsink, otherwise they could overheat when the case is screwed shut. On the display board the following components are mounted on the under- side of the board: the rotary encoder SI (so the spindle sticks out through the front), the headers (if required) for K2, K5 and the supply, and electrolytic capacitor C8. It is best to use flexible wire for the connections between the boards. If you have plugs at one end it will be easier if you ever need to separate the boards in the future. The cables should be kept away from the receiver board as much as possible, otherwise you’re asking for trouble (unwanted oscilla- tions etc.). Route the cables directly away from the board and only then bend them towards the other boards. Keep in mind that the order of the pins on K3 and K4 on the receiver board is different to that on K3 on the microcon- troller board. We’ve added a wiring di- agram in Figure 3 to remind you. You should use a short length of thin 50 Q coax cable like RG174 for the synthe- siser connection. The supply for boards -1 and -2 loops from one to the other, which is why there are two connectors for the pow- er supply. On the receiver board you could use K6 for the incoming +13 V for example, and use K7 to link it to the microcontroller board and display board. To avoid buying many different types of plugs we have used only 5 or 8-way types and just removed the un- wanted pins when necessary. The dimensions of the boards are such that they all fit in a standard case made by Bopla. The receiver board is mounted flat on the bottom of the case and the other two boards are mounted vertically behind each other (display board at the front). The spindles of the potentiome- ters of the receiver board fit through the holes in the other two boards. The potentiometers should therefore have long spindles so they can stick through the front panel. When you use the recommended Bopla case, the re- ceiver board can be fitted using a few M2. 5 bolts. It won't do any harm if you put some aluminium foil on the bottom inside the case and connect it to ground. This provides some extra shielding, which improves the stability of the receiver. An unetched piece of PCB is also suit- able. We don't want any short-circuits, so the PCB should be placed with the copper side down, or if you used alu- minium foil you should cover it with in- sulation tape. The microcontroller and the display boards are mounted vertically inside the case. Although there are slots on the left and right-hand side of the case for this purpose, we didn't use them because the boards wouldn't fit. Luckily the boards can also fit on ei- ther side of the slots. The 7-segment display ends up just behind the front panel and there is also enough room for the microcontroller board this way. At the back of the case is a connec- tor for the supply, a feed-through for the telescopic aerial and a hole for a phono-socket for connecting an exter- nal aerial. 32 elektor electronics - 12/2006 Adjustments There are nine trim points in this re- ceiver. To start with it is best to set all trimmers at their halfway position. Be- fore you continue, make sure that an aerial is connected and selected. Select the AM mode using the A key on the keypad. Next you should type in the frequency of a strong medium wave transmitter. If you use an inter- nal aerial you should set the gain to its maximum; this also applies to the RF gain. Set the audio volume control to halfway. If necessary, use the ro- tary encoder until you hear a medium wave station. First set trimmer C30 in the collector of the local oscillator of mers should again be adjusted to get the maximum S-meter-reading. In a double conversion superhetero- dyne receiver there are two oscillators that determine the accuracy of the re- ception frequency: the reference os- cillator for the DDS and the local os- cillator for the second mixer. You will need a frequency counter to set these correctly. First type in a frequency of 30.000.0 MHz. Then adjust the trim- mer of the 10 MHz reference oscillator (C30 on the microcontroller board) un- til the frequency at the output of the MAR8 (IC2) is 75.000.000 MHz. The frequency counter should now be con- nected to the second gate of the sec- ond mixer (T3). Use trimmer C26 near AM station, for example in the medi- um wave. Then use the B key to select LSB, and adjust C94 until you have a beat frequency of 0 Hz. Now use the B key to select USB, and adjust C93 until you have a beat frequency of 0 Hz. The receiver is now ready for use and the case can be put together. DRM use In order to process DRM signals you have to connect the DRM output of the receiver to the line input of a sound- card in a PC. Next you have to start a program called Dream. The bandwidth of the receiver has to be set to 15 kHz using the C key. The mode doesn’t mat- 1 Operation 1 Overview of all keypad functions: 0 to 9 numerical input of frequency D 'Enter' after inputting the frequency A AM(6)/FM(1 5) mode B LSB(3)/USB(3) mode C select 3, 6 or 1 5 kHz bandwidth, independent of the current mode D select 100 Hz or 1 kHz tuning resolution * store the frequency, mode and bandwidth into memory *mm store into memory entry mm (mm = 00 t/m 63) # recall the frequency, mode and bandwidth from memory #mm recall memory entry mm (mm = 00 to 63) (When the receiver is turned on, memory entry 00 is used by default.) The display for the frequency readout consists of 6 digits and has a resolution of 1 00 Hz. This also means that when you input a fre- I quency via the keypad you have to enter it down to the last 1 00 Hz. For most stations you'll find that you have to input the frequency in kHz followed by an extra zero. But to receive the DCF time signal on 77.5 kHz you just type in 775 and D. ■ There are two fixed decimal points on the display. So for channel 14 in the 27 MHz band for example, the display will show 27.1 25.0. 1 When the A or B keys are used to change the reception mode, the display will show the selected mode for several seconds. For exam- ple, after pressing the A key it will show A-6, which means AM mode I with a 6 kHz bandwidth. Pressing the A key again will show F-l 5 (FM i mode, 15 kHz bandwidth). Pressing the B key changes the display to L-3 (LSB mode, 3 kHz bandwidth). Pressing the B key again shows U-3 (USB mode, 3 kHz bandwidth). Repeatedly pressing the C key doesn't change the mode, but rather the bandwidth. Again, the display will show the last selected setting. When none of the A, B or C keys has been pressed for a period of 2 seconds the display will automatically revert back to the frequency readout. 1 the second mixer to obtain maximum volume. Next you should set the trimmers of the first IF (C18 and Cl 9) to obtain maxi- mum volume. The full-scale trimmer (P3) and the null-trimmer (P4) for the S-meter should now be adjusted. The rest of the set- tings can now be completed with the help of the S-meter reading. If a very strong signal is received you should reduce the aerial gain a little. Adjust the core of the IF transformer following the IF filters (TR1) to get the maximum S-meter-reading. When the sensitivity of the receiver im- proves you can try tuning to a weaker station. The previously mentioned trim- the 44.545 MHz crystal to adjust the frequency to 44.545.000 MHz. Once all these settings have been com- pleted we can start with adjusting the FM demodulator. For this we need to tune in to an FM transmission in the 27 MHz band. We then need to adjust the core of the IF transformer (L20) in the FM demodulator. (Make sure that you have selected the FM mode with a 15 kHz bandwidth, using the A key.) As an alternative, you could adjust it for minimum audio output when receiv- ing an AM station in FM mode, which is actually a bit more precise. The last trimmers to be adjusted are the two trimmer capacitors in the SSB product detector. Tune in to a known ter, but if you select AM you may be able to tell via the loudspeaker if there is any interference in the DRM signal. After setting up the soundcard on a PC (this is described in the March 2004 is- sue of Elektor Electronics) the receiv- er can be tuned to a DRM transmit- ter. Many DRM stations don’t transmit continuously, but according to a cer- tain schedule. You can check via the loudspeaker of the receiver whether you’ve tuned into a DRM transmission. A harsh noise should come out of the loudspeaker. You can then turn down the volume on the receiver. Finally, you use the recording control on the PC to set the required level. ( 030417 - 1 ) 12/2006 - elektor electronics 33 TECHNOLOGY COMMUNICATIONS (M@m Jochen Schafer Their programme content is not what you would describe as entertaining but these strange broadcasts have not only attracted the attention of shortwave enthusiasts but also songwriters and filmmakers... not forgetting government counter-intelligence departments. Those of you who choose to do a spot of short wave surfing during their idle moments will no doubt have hit upon one or two stations where the programme content is made up entirely of someone (usually female) monotonously reading out a series of numbers. Your first assumption may be that you have gate crashed a pirate radio version of Bingo until you notice that some of the numbers are repeated and grouped either in fours or fives. The enigmatic nature of these broadcasts is further enhanced by the station identification which can take the form of a repeated short extract of music played on what sounds like a Stylophone. Once you add in ionospheric distortion and fading the overall effect is quite spooky. Recording artists have exploited this aspect of the transmissions and used sampling and mixing to produce interesting effects. The film Vanilla sky' also features them in the soundtrack. Directional antennas have been used to pin-point the sources of these transmissions but they do not appear on any official broadcast schedule and when the authorities have been asked what the transmissions actually represent their explanation seems to favour 'meteorological data'. Emerging Patterns Transmissions from the number stations conform to a regular pattern: They begin (usually on the hour or half hour) with an interval signal (tone sequence, melody or call sign), followed by a three number ID (usually), a count va ue corresponding to the number of code groups in the transmission followed by transmission of the code groups. The former West German BND transmissions were always terminated by a combination of two characters from the NATO alphabet (over 80 different combinations were used) followed by a tone burst. The 'Lincolnshire Poacher' is an active station purported to emanate from the RAF base at Akrotiri in Cyprus. Each transmission begins on the hour and lasts for 45 minutes. Transmission starts with the first 15 notes of the English folk tune repeated 1 2 times followed by a 5 figure ID repeated six times and two notes from a glockenspiel. The message follows and is always composed of 200 groups of five numbers (the last number in each group is pronounced with a rising terminal). The message ends with six repeats of the poacher tune. Number Stations do not exclusively use voice transmission; Morse is also used as well as tone signalling where each tone represents a different number. These 'polytone' stations are thought to be operated by the Russian authorities. Some irregularities Not all the stations retain their original identity; take for example a German speaking station which had been broadcasting for over 30 years from a site in Poland. Its station identification was an extract of the 'Swedish Rhapsody' by Mantovani played on a music-box chime or 'ice cream van' as it became more affectionately known. The station closed after the catastrophic floods of 1 997 but today it is again in operation, at the same site and frequency but this time thought to be run by the British SIS. The mechanised voice which popped up on this station was instantly recognised by Number Station listeners as belonging to 'Cynthia' who they had heard before on a station thought to be used by the American security department. The American security department ceased all Number Stations activity in October 2003 but up until then they 34 elektor electronics - 12/2006 were thought to be operating (like the Russian security services) in Europe, transmitting in many languages including English, German and Spanish. Up until a few years ago there was also an Arabic speaking station. It has never been established which government was responsible for the 'Swedish Rhapsody' transmissions and some stations are not always what they first appear; a recent example was heard broadcasting from the Indian subcontinent in July 2005 and given the designation 'E22', the transmissions bore the hallmarks of a Number Station but it was finally identified in December 2005 as test transmissions by 'All India Radio' for a new transmitter site. The station has since become fully operational and reclassified as a broadcast station. More details of the transmissions can be found at [1] under the heading 'E22 private room and study page'. Current activity Number Stations first appeared at a time when there were no alternative paths available to relay messages worldwide. Today we have a number of options which offer global coverage including satellite communication and the Internet which you might reasonably assume would eventually supplant radio broadcasts but in recent months shortwave activity has actually grown more intense. Among the organisations thought to be making use of these stations are the British Secret Intelligence Service (formerly MI6) The Israeli intelligence agency (a.k.a. Mossad) and the Russian Federal Security Service (FSB) together with other organisations broadcasting from Chechnya, Cuba, Korea and two English speaking stations in Egypt. Their continued use by many countries highlights the advantages of this form of broadcast which includes low Tools of the trade One of the advantages of communicating via Number Stations is that no specia- lised equipment is needed to pick up the message, just a regular travel or 'world band' radio which can be purchased on the high street (some stations use upper side band). The operative just needs patience and an undisturbed period of time to take down the numbers. Communication is only one-way of course but small portable two-way HF radios have also been developed for use in the field. An example of this type of radio equipment is the SP-1 5 short wave set develo- ped in the late 50s by Wandel & Goltermann together with Pfitzner. The receiver was fully transistorised while the transmitter used valves. The entire kit including aerial, headphones, Morse key, fast code generator, crystals, NiCd batteries and mains charger are all contained in a neat briefcase which enables the set to be ready for use in a very short time. A notable design feature is the simple super- het receiver covering 2.5 to 24 MHz in two ranges with a BFO. For its time it had an extremely good specification with a sensitivity of 22 /JV at 10 dB S/N. Current consumption is just 8 mA. It was used by the German secret service 'Gehlen' (la- ter the BND) and also by the German armed forces for military reconnaissance. The excellent receiver design also saw service in other NATO roles. An example of a similar piece of kit 'from the other side' is the Soviet built R-353 set, the transmitter and receiver are housed in a light metal case together with the power supply. In contrast to the SP-1 5 the R-353 receiver is a valve double superhet. An interesting feature of this unit is the programmable magnetic band cassette shown attached to the front of the radio. Number sequences can be re- corded onto the tape using a 1 0-way dial and then sent very quickly in a short transmission burst. This dramatically reduces the risk of the transmitter being dis- covered by direction finding. (EK) Its Eastern Block rival: The R-353 (Photo: Max 0. Altmann) 12/2006 - elektor electronics 35 TECHNOLOGY COMMUNICATIONS Table Frequency (kHz) Enigma Identity Details 6959/ 9251/ 11545 E03 Thought to be used by the British Secret Intelligence Service. Transmissions begin on the hour. Mode: USB (J3E). Station ident: A repeated keyboard rendition of a phrase from the 'The Lincolnshire Poacher'. 3150/4270, 4461, 6840/9130/ 11565/ 13533 E10 Thought to be used by the Israeli Mossad. Letter groups are used instead of number groups. Transmissions begin on the hour and half hour. Mode: Mostly AM (A3E). Station ident: A three letter sequence. cost, low tech equipment (the signals can be picked up on a relatively inexpensive 'world band' type of radio), broad coverage (assuming the signals are not subject to Electronic Counter Measures) and excellent message security. The stations usually operate at frequencies between the recognised shortwave bands, using either AM (Amplitude Modulation) or USB (Upper Side Band). They can be located by sweeping these frequencies on the hour and half hour. The table gives details of two stations which are currently active. The 'E03' refers to the station identity assigned by ENIGMA. Those of you interested in exploring this subject in more depth are recommended to pay a visit to the website of Simon Mason [2] it contains many fascinating curiosities. A popular American site is also included [3] — it has a link to the 'FRS Commander Bunny' transmissions complete with an attempt at decoding. The Usergroup The Number Station broadcasts have fascinated listeners for decades. Since the end of the 1 990s there has been a European mailing list covering this subject from a Yahoo group with the name ENIGMA 2000 (European Number Information Gathering and Monitoring Association) which evolved form the earlier ENIGMA group. This organisation has catalogued and classified all the known Number Stations and given them the designations E = English speaking, G = German speaking, M = Morse transmissions, S = Slavic speaking (Russian, Polish etc.), V = various for transmissions in other languages and X = transmissions using special types of modulation (e.g. polytones as already mentioned). The mailing list for ENIGMA 2000 has currently grown to around 700 subscribers. Securing the information It's a sobering thought that while most radio programmes are designed to capture the greatest number of listeners this must be one of the few examples where the intended audience for an international broadcast may be just a single listener who alone possesses the key to unlock the message. When transmitting cipher text to what is potentially an entire global audience it is vital that the encryption method employed is absolutely bullet proof otherwise government counter intelligence departments with their vast computational resources will surely resolve (eventually) any encryption scheme based upon a mathematical algorithm. One such cipher which has proved to be perfectly secure is the Vernam cipher or 'one time pad'. The encryption key is a series of random numbers each of which are added to each character in the plain text message. The resulting cipher text is transmitted and the receiver subtracts the key on their 'one time pad' to recover the plain text message. Even with knowledge of some part of the message it does not help to decipher the rest of the message provided truly random keys are used. The weakness of this method is that a 'one time pad' containing the keys must be carried securely by the operator and then destroyed (by both sender and receiver) after use, if it is stolen or copied security will be jeopardised. Over the years many agents working in foreign lands (both east and west) have been found in possession of tiny 'one time' pads sometimes concealed in a hollowed out soap bar, sometimes inside the shell of a walnut (the most literal form of code cracking?). Governments are obliged to remain silent on matters of national security and have never acknowledged the existence of Number Stations or their possible role in espionage, the identical nature of sequences transmitted by Number Stations and those found on agent's one time pads may of course prove to be purely coincidental. Without any hard evidence we are forced to accept the official account that the transmissions are in fact reporting snow fall levels in the Mediterranean but if you find that explanation too difficult to swallow then maybe that thought about pirate radio Bingo (at the tax payer's expense) really is the only plausible alternative. ( 060229 - 1 ) [1 ] http://mysite.wanadoo-members.co.uk/thesecretsiteofmike [2] www.simonmason.karoo.net/page30.html [3] www.spynumbers.com Further interesting links: http://home.freeuk.com/spook007 http://www.irdial.com/conet.htm http://en.wikipedia.org/wiki/Numbers_station The Author Jochen Schafer is 34 years old and has been blind from birth. He works as a documentation assistant at the Ger- man Blind Studies Institute (Blista) in Marburg. He has been tuning into Number Stations in his free time since 1 977 when he first started listening to short wave. His archive contains more than 1000 cassettes documen- ting Number Station broadcasts; he is a subscriber to the ENIGMA 2000 mailing list and one of four site modera- tors. In his capacity as Germany's leading Number Stati- ons specialist he has made contributions to many publica- tions on the subject. His Email address is (the_kopf@yahoo.com). He is keen to get in touch with anyone who has any recordings of earlier broadcasts (from the 60's to the 80's) to add to his collec- tion, he has particular interest in broadcasts made by West German BND stations with a two-letter call sign. 36 elektor electronics - 12/2006 UL Proved H fgh Quality ISO 9000 Certificated . * Accept Orders' From 3pcs to 1M Pcs* & Capabilities: B| Up to 40 \ 2. 5my “ftflck/^ • 0* Hole Sl 2 ce * 0* tWKh Hole Size Blind And Buried Vias RoHs, Compliant Prices: +* . . i • ** * ( Only $50 For 3pcs 21^-- l Only $168 For ^pcs 4 " x Only $288 Fou3pcs 4' sf A* ,6L Free Solder Mask & Silkscrfeen Veoa* Competitive Price For Bulk Orders I*.. * *T3L ** Http: //www. ezpcb. com salesOezpcb. com «r - LED/Light Kits 6 LED V.U. Meter 10 LED V.U. Meter Wireless V.U. Meter 2 LED Flasher 3 LED Running Light 5 LED Flasher 10 LED Running Light 1CH 700W AC Flasher 2CH 1400W AC Flasher 10 LED Running Light, S 10 LED Running Light, C Two Way Chasing Light Circular Casing Light 12V Xenon Tube Flasher Super Electronic Roulette Mini Roulette wheel Heads or Tails Game Deluxe Electronic Dice Dancing Light 3CH LED Flasher 2 colour Priority Machine Xenon Tube Flasher Super Bright Flasher Robot LED Flasher Fire Fly Light: 6 Prog chasing light kit 11 LED Star Flasher 25 LED Star Burst 4 Way Traffic Light 21 LED Chasing Arrow Atom Chasing light Two Way Chasing Light Triangle Flasher 6 LED Electronic Windmill Electronic Sand Glass Radio Kits FM Wireless Mic 3V FM Wireless Mic 9V Easy FM Radio: Easy AM Radio: Walky Talky Kit: Advanced AM Radio Kit: Advanced AM/FM Radio IC Shortwave Receiver MK484/ZN141 AM Radio £3.99 £4.99 £12.99 £3.99 £4.49 £4.99 £4.99 £5.99 £7.99 £8.99 £8.99 £8.99 £10.99 £8.99 £24.99 £9.99 £4.99 £10.99 £19.99 £3.99 £5.99 £15.9!T £5.99 £5.99 £3.99 £15.99 £6.99 £16.99 £9.99 £9.99 £4.99 £7.99 £4.99 £9.99 £14.9!> £6.99 £6.99 £14.99 £7.99 £34.99 £13.99 £16.99 £9.99 £9.99 We would like to the readers of Elektor a very merry Christmas and a happy new year! Free postage on any kits ordered above £10 to the UK from now until Jan 1st 2007. Orders below £10 add £1 P&P Outside UK: £1.50 per item To order simply visit www. lichf ieldelectr o nics. co . uk By Phone: (01543) 256684 By e-mail: sales@lichfieldelectronics .co.uk Or by post to: Lichfield Electronics, Conduit Street Lichfield. Staffordshire. WS13 6JU r* Noisv Kits Steady Hand Game £7.99 Ambulance Siren £5.99 Fire Siren Kit £4.99 Police Siren Kit £5.99 Two Tone Door Bell £5.99 Christmas Tune Generator £3.99 13 Tone Mini Organ £4.99 25 Tone Mini Organ £8.99 Car Reversing Alarm £4.99 T elenhone Kits Recorder Starter: T elephone Amplifier 10W Speaker ringer Phone Eavesdropper Dual Station Intercom Telephone In-Use display Privacy Protector £9.99 £9.99 £9.99 ' £8.99 £10.99" £2.99 £7.99 FM Telephone Transmitter £8.99 Ring Controlled Relay: Do-It-Yourself Phone: £12.99 £28.9Y Switching Kits Light Activated Switch Light Controlled Switch T ouch Switch T imer Switch 0-3hr Timer Switch 0-10hr Voice Activated Delay off Voice Control Switch 25ft Infrared Remote Relay £18.99 2CH 50ft IR Remote Relay £29.99 $ Light Dimmer 500W £5.99 Electronic Code Switch £14.99 Water Level Control £9.99 g* Other Kits TV transmitter £27.99 Sound Reversing Car £14.99 DIY Digital Multimeter £16.99 Electric Shock Machine £5.99 300mA 6-9-12V PSU kit £8.99 0-30V 3A DC Regulator £15.99 0-30V 1A DC Regulator £7.99 Emergency Light circuit 6V £5.99 Rat/Cockroach Banisher £8.99 Other Kits Muscle Massage equipment £12.99 PIR Sensor with 7A relay £27.99 Human to Robot Voice Raining Alarm & speaker Stereo Simulator Kit Low Battery Alarm 12V 0-12V 500 mA Regulator Digital Counter 2 digit. Transistor Checker 12.99 £6.99 £14.99 i £6.99 £4.99 £12.99 £6.99 pae L4 '■ mL if * Other Kits Intruder Alarm £9.99 Visitors Chime £7.99 Magnetic switch Alarm £16.99 Infra Red Alarm £24.99 50V 30W Mono Amp OTL £14.99 12V 15W Stereo Amp BTL £24.99 8W 12V Sterep Amp £13.99 2W 9-12V Stereo Amp £9.99 Stereo Tone Control kit 15V£22.99 12/2006 - elektor electronics 37 TECHNOLOGY READER CIRCUITS Secure wireless switching can be useful in a variety of applications, such as activating or deactivating an alarm system, operating a garage door opener, or operating an anti-start device in your car. The circuit described here is compact and quite secure, and it operates in the 433-MHz ISM band. Wireless Key Compact and secure Gert Baars The circuit described here consists of a transmitter and a receiver operating on a frequency in the 433-MHz ISM band. Frequencies in this band can be used without a licence if the transmit- ter power does not exceed 10 mW (10 dBm). The transmitter is small enough to be fitted in a key fob, and it is pow- ered by a 3-V lithium cell. The trans- mitter only emits RF signals in short bursts, so the current consumption is no more than 8 mA. As the battery has a capacity of more than 200 mAh, it will last for several years. The receiver operates from a supply volt- age of 5 V and can be powered from a simple AC adapter. If it is used with a car battery, a 78L05 must be connected between the battery and the circuit. In the case of a 6-V battery (such as is used with motorcycles and scooters), a low- drop 5-V regulator must be used. A 24-bit code is used to ensure that the receiver only responds to the proper key transmitter. More than 16 million combinations are possible with such a code. To give you an idea of how big this number is, with a burst length of 300 ms for each transmitted code the transmitter would have to transmit an uninterrupted series of sequential codes for two months in order to work through all possible combinations. Microcontrollers are used in both units (transmitter and receiver) to encode and decode the key. Transmitter The actual transmitter consists of a Maxim MAX1472 (Figure 1). This tiny 8-pin IC contains a crystal-controlled ASK transmitter for frequencies in the 300-450 MHz range. It includes a fixed-ratio PLL and a crystal reference oscillator. This type of design is more precise and more stable than an ISM transmitter based on a SAW filter. The frequency selected for this project is 433.920 MHz. It results from the fact that the PLL multiplies the crystal fre- quency by 32. Due to the narrow toler- ances of crystals, the match between the transmitter and the receiver is always adequate without any need for tweaking, in part because the receiver has a relatively large bandwidth. The crystal has a frequency of 13.560 MHz. It comes from Hong Kong X’tals [1]. The coil in series with the crystal ensures that the circuit oscillates at the series frequency of the crystal. The transmitter IC has a 10-mW output stage, which is good for a range of at least 10 metres indoors (the author only tested the unit in his house). A loop antenna etched on the circuit board is often used in such applica- tions, but a dipole antenna (too short for the actual frequency) proves to give better results. Two radiating elements, each approximately 4 cm long and 0.04” thick are fitted to the transmitter board for this purpose. The transmitter IC has a data input for ASK modulation. Although it can be modulated at up to 100 Kb/s, we have to point out that the reliability of the system is better at lower rates. As only a relatively small amount of data must be transmitted, a bit rate of 100 b/s can be used. It takes only 240 ms to send 24 bits at this rate. The total burst length is 300 ms, including the preamble and start bit. This burst is transmitted when the transmit button is pressed, with a total current consumption of around 8 mA. The microcontroller switches the trans- mitter off immediately after the burst has been sent and then enters a power-down mode, with the result that the total current consumption drops to less than 2 mA as long as the button is held pressed. This reduces the bat- tery consumption to a minimum. In practice, it means the transmit button must be held down for approximately half a second to transmit all the data. A microcontroller is used to generate the code key and transmit it by modu- lating the transmitter IC. The selected microcontroller is the Atmel ATtinyl5L, which is available in an 8 -pin DIP pack- age. This microcontroller has an inter- nal RC clock generator that runs at 1.6 MHz, and it can be set within a toler- ance of 1% using a calibration byte. After the flash code memory has been programmed, the calibration byte must read from the internal ‘signature space’ using the programming software and then written to location 1023 ($3FF) of the flash memory. This only has to be done once when the microcontroller is programmed. Each time the microcon- troller starts up, it reads the calibration byte from the flash memory and then writes it to the oscillator calibration register to optimise the accuracy of the internal processor clock. Receiver The receiver is also a Maxim IC (Figure 2). In this case it is a MAX1473, which 38 elektor electronics - 12/2006 contains a complete superheterodyne receiver. Here again the reference fre- quency, in this case the local oscillator frequency, is provided by a PLL oscilla- tor. As the PLL multiplication factor is 32 and the IF is 10.7 MHz, the crystal fre- quency must be 13.2256 MHz (see [1]). A remarkable feature of this IC is the integrated image rejection mixer, which effectively means that the mixer stage also provides adequate image frequency suppression, so there is no need for a preselection filter at the input. As a result, the required number of external components can be reduced to around 20. The receiver does not have to be tuned, and it boasts a sensitivity of better than approximately 1 jliV The receiver IC also has an audio filter that is intended to reduce noise and interference. A ‘data sheer’ after the filter provides automatic operating point adjustment to provide data that is as reliable as possible even under weak signal conditions. The receiver unit is also fitted with an ATtinyl5L microcontroller. The data sheer output of the receiver IC is con- nected to an input of the microcon- troller, which decodes the burst signals from the transmitter. If the decoded data contains the correct key, it acti- vates two outputs. Here OUT1 pro- vides a 1-second pulse if the correct key is received. It is intended to be used to drive a mechanical latch opener, which is usually fitted with a solenoid. The second output (OUT2) is an alternate-action switch. OUT2 Figure 1 . The transmitter consists of only two ICs and can be built in a very compact form. switches to +5 V when the key is received once and then toggles to 0 V the next time it is received. It can thus be used to switch something on or off, such the control unit of an alarm sys- tem or an anti-start device in a car. Software The software consists of two separate programs - one for the transmitter and one for the receiver. At somewhat more than 400 lines each, these programs are fairly modest in size. At the transmitter end, after starting up the software looks for a particular value (a ‘signature’) in the EEPROM of the microcontroller to see whether a valid key has already been generated. If it hasn’t, the software immediately generates a 24-bit code and stores it in the EEPROM memory along with the signature so it will not have to gener- ate a new key the next time. A random number generator that pro- vides an arbitrary 24-bit value is needed to generate the key. This is implemented using a capacitor con- nected to pin 2 of the microcontroller. The algorithm used for this purpose is based on timing. Pin 2 is first config- ured as an output and held low for a certain length of time to discharge the capacitor. After that the pin is config- 8mm LI: Y///////A 4mm Figure 2. The receiver is somewhat larger, primarily due to the extensive circuitry around the MAX 1473. 12/2006 - elektor electronics 39 TECHNOLOGY READER CIRCUITS ured as an input, which also means that an internal pull-up resistor is connected to the pin. The capacitor is charged via this resistor, but the charging time con- stant is much longer than the processor speed. During the interval when the input is still low, the value of the key is changed in rapid succession by a cer- tain algorithm. This continues until the capacitor is fully charged. The input read as a ‘1’ at this point, at which time the key value stops changing. This results in a key with a random value. The randomness arises from the fact that the charging process is slow rela- tive to the processor speed. The charg- ing time corresponds to approximately 10,000 processor cycles. Tests have shown that the charging time is not entirely constant. A 0.01-percent change in the charging time is suffi- cient to yield a different result. This also shows that two different transmit- ters will never generate the same key, especially because most capacitors have a tolerance of around 5%. With a normal start-up process (switching on power), the transmitter first reads the key present in memory, but it cannot be transmitted just like that. A preamble with a duty cycle of exactly 50% is transmitted first to allow the operating point of the data slicer to be adjusted. The transitions in the pre- amble also serve to synchronise the timing at the receiver end with the tim- ing at the transmitter end. A start bit is transmitted after the preamble to indicate that the key will be transmit- ted next. The ‘real’ data is only sent after the start bit, after which the transmitter is switched off immedi- ately and the microcontroller enters the power-down mode to minimise battery consumption. A different program is naturally neces- sary at the receiver end. In contrast to the transmitter, the receiver is always on. In this case the microcontroller lis- tens to see whether anything is being received. If it is, it checks whether the received data stream has the correct format, which includes checking whether the start bit synchronisation is valid. After this it reads the key and compares it with the value of the key stored in its EEPROM memory. The microcontroller has a jumper that enables it to read the key. If the jumper is fitted, the receiver is in ‘learn mode’. If a key is received in this mode, it is stored in the EEPROM. This means that the first time the receiver is switched on, the jumper must be fitted and the code transmitted using the key transmitter so the key can be stored in the receiver’s memory. After the jumper is removed, the receiver should switch its outputs when the key trans- mitter is activated. It may be neces- sary to disconnect the receiver antenna for this procedure and activate the transmitter close to the receiver. This will reduce the effect of any inter- ference signals present at 433.92 MHz. The watchdog timer is also enabled in the microcontroller on the receiver end. If the program counter is affected by a noise pulse on the supply line, for instance, which can lead to a ‘hung’ system, the microcontroller will be reset automatically after approximately 1 second and the receiver will execute a normal start-up. Data slicer and Manchester coding The data slicer in the receiver is built around an opamp in the receiver IC that is intended to be used for this pur- pose. A data slicer is simply a compara- tor with a reference level that is auto- matically set when a data signal with a duty cycle of 50% is received. It is thus important that the duty cycle of the data signal is in fact 50%. Manches- ter coding is used to achieve this result. The circuit of the data slicer is shown in Figure 3. The time constant of R and C is large relative to the data bit rate that is used. As a result, the DC level at the inverting input is equal to the average value of the received sig- nal. With a 50% duty cycle, it will thus be exactly halfway between the mini- mum and maximum values. However, a certain amount of hysteresis is desir- able because the receiver also gener- ates noise when no signal is present or the signal is relatively weak. This is provided by R1 and R2. It is also necessary to have the trans- mitter send a preamble before the actual data. The preamble consists of a series of clock pulses with a duty cycle of 50% and a period that is much shorter than the RC time constant of the data slicer. This ensures that the operating point of the data slicer is set properly. Manchester coding must be used to achieve the required 50% duty cycle with the signal used here. This essentially amounts to EXORing the data with a clock signal having the same period as the bit interval. The original bit stream is then recov- ered in the same manner by EXORing Figure 3. Design of the data slicer in the MAX 1473. the received data with a clock signal. A drawback of Manchester coding is that it increases the bandwidth of the transmitted signal by a factor of 2, but this is not a problem with the low bit rate used here. In theory, the bytes output by the decoding logic when the clock is high are the same as the bytes output by the decoding logic when the clock is low. Both bytes are in fact decoded by the receiver software. The second byte should essentially be a copy of the first one. The correctness of the timing is monitored closely by comparing the two bytes after each set of eight decoded bits. Timing The most important aspect with regard to the algorithms used in the software at both ends (transmitter and receiver) is proper timing. The transmitter must generate a bit stream with a certain frequency, and the receiver must be able to recover it with sufficient accu- racy. For this reason, the key transmit- ter sends the receiver a preamble con- sisting of clock pulses at the same fre- quency as the bit rate before it sends the coded 24-bit key. The preamble is followed by a start bit that enables the receiver to deduce that the preamble is finished and the actual data will follow. The ATtinyl5L microcontrollers at each end run on their internal RC clocks. A calibration byte for the clock generator is programmed into each microcontroller by the manufacturer. However, this cal- ibration value is intended to be used with a supply voltage of 5 V. As the transmitter operates at 3 V its clock fre- quency is lower than it would be at 5 V For this reason, an extra provision has been made in the software of the receiver. With the receiver in learn mode (as described below), the receiver 40 elektor electronics - 12/2006 copies the timing of the transmitter as well as its 24-bit key. Both values are stored in the EEPROM of the micro- controller and used when the receiver is operating in the normal mode. Programming settings The code for the ATtiny microcontrollers in the trans- mitter and receiver is available free of charge on the Elektor Electronics website under item number 050364-11 (see month of publication). The microcon- trollers must be programmed using a suitable program- mer before they are fitted to the circuit boards. When you program the microcontroller, don’t forget to read the oscillator calibration byte from the signature memory of the microcontroller and reprogram it in flash memory location 1023 ($3FF). It is also important to tick BOD as enabled and set the BOD level to 4.0 V for the receiver or 2.7 V for the transmitter. If BOD is not pro- grammed, the content of the EEPROM memory (which contains the key code) can be affected when power is switched on or off, with the result that things may no longer work properly. The ‘very quickly rising power’ fuse settings (CKSEL = 11) must also be programmed for the transmitter and the receiver. This is partly related to proper operation of the watchdog timer. Professional Features - Exceptional Price Initial use 34 Channels sampled at 500 MHz After you have fully assembled the transmitter board, you must first activate it so it can generate and store a code. It’s a good idea to do this a couple of times to be sure that a 24-bit code has been generated and stored. Next, fit J1 on the receiver board. Then switch on the receiver, but do not connect any antenna yet (to avoid picking up interference). Hold the transmitter close to the receiver board and activate it a couple of times. Now remove J1 while the receiver is still on and reset the receiver (by switching it off and on) without Jl. The supply voltage must drop to nearly zero during this process, so watch out for the effects of any large capac- itors in the power supply. If everything goes well, the LED connected to OUT1 of the receiver will now light up for around 1 second each time you press the trans- mit button. To be on the safe side, hold the transmit button of the receiver pressed for at least 1 second each time you activate the transmitter. If everything is working the way it should, you can con- nect the receiver outputs to the device or circuit to be operated. Bear in mind that it may be necessary to con- nect a buffer stage or semiconductor relay between the receiver and the load. ( 050364 - 1 ) [1] Crystals used in this project: www.hongkongcrystal.com Tx: 9SMI356000E03FAFZOOO Rx: 9SMI322560E03FAFZOOO Sophisticated Multi-level Triggering Transitional Sampling / Timing and State Connect this indispensable tool to your PC’s USB I . I or 2.0 port and watch it pay for itself within hours! / • 500 MHz Max. Timing Mode Sample Rate (internal clock) • 200 MHz Max. Sample Rate State Mode (external clock) • Multi-level Triggering on Edge, Pattern, Event Count, Group Magnitude/Range, Duration etc. • Real-Time Hardware Sample Compression • Qualified (Gated) State Mode Sampling " ' "\ Interpreters for l 2 C, SPI and RS232 included Integrated 300 MHz Frequency Counter +6V to -6V Adjustable Logic Threshold supports virtually all logic families Full version of software free to download Mictor adapter available Coil data LI (transmitter): 3 turns 0.3 mm dia. silver-plated cop- per wire, coil diameter 2.5 mm, length 5 mm LI (receiver): see Figure 2. L2 (receiver): see Figure 2 12/2006 - elektor electronics (www.pcTestlnstruments.com ) Visit our website for screenshots, specifications and to download the easy-to-use software. IntronixTest Instruments, Inc. 16421 N.Tatum Blvd.Unit 130 Phoenix, Arizona 85032 USA Tel: (001) 602 493-0674 Fax: (001) 602 493-2258 www.pcTestlnstruments.com * The amount of £21 0 was calculated at the time this ad was created. The actual price will depend upon the exchange rate at the time of purchase. Price does not include the UK VAT of 17.5% plus a small import fee of typically £5-10. These fees will be collected at the time of delivery (companies can claim a refund for the 17.5% VAT from HMRC). E&0E HANDS-ON HOME & GARDEN Jurgen MaiB In this day and age enjoying constant hot water should not be an expensive luxury. All the same, the way some households squander energy to provide this on tap makes you wonder. Our novel circuit saves both your bank balance and the environment! The circulation pump in a heating sys- tem is the device that makes possible the accustomed luxury of having hot water at the turn of the tap. Unavoid- able heat losses in the plumbing sys- tem and the constant operation of the circulation pump lead to profligate waste of energy, however. In fact, according to Oxford University’s Envi- ronmental Change Institute, the pump consumes as much energy as lighting or the fridge in most households, and a pan-European drive is now under- way to find ways of saving costs for what is one of the most ignored elec- trical devices in the home. To cut power consumption we need to lag all pipes well and reduce the amount of time that the pump operates to only when hot water is actually required. There are already a variety of control systems on the market for managing circulation pumps. One of these relies on flow sensors, which react ade- quately fast but are hardly simple to install (they require plumbing into the pipe system). Other devices observe temperature variations. These deter- mine the temperature difference between the hot water and circulation pipes, using any variation from the desired value as the trigger. The sys- tems are both reliable and very simple to install, since no ‘invasive action’ is necessary to the plumbing. Unfortu- nately the sluggish action of the tem- perature sensors means they do not operate very rapidly. One feature that both systems share is their relatively high purchase cost. Our approach here takes a rather different route. A simple, readily available piezo sounder used as an acoustic emission sensor detects the sound of flowing water in the plumbing system. This is what we use as the switching trigger. Piezoelectric effect Piezoelectric sounders, also known as electronic buzzers, are used in many electronic circuits as audible transduc- ers or ‘bleepers’. Easy to use, they also take up little space and are extremely affordable. A change in the voltage Piezoelectric transducer controls domestic water system Figure 1 . The pump control comprises five capacitor-coupled stages. applied to the piezo crystal in the sounder deforms it slightly, an effect that is used to generate sound. The principle is reversible too, enabling the transducer to work as a highly sensi- tive ‘microphone’ as well. The varia- tions in voltage charge resulting from altered mechanical stress on the crystal structure can be registered electroni- cally and processed further. Piezoelec- tric sensors are widely used today in workshop tools, for automotive appli- cations and in technical setups as pressure, power and dynamic accelerometer devices. The pump control system shown in Figure 1 comprises several modules, each with their own function. • The first is a preamplifier stage with an amplification factor of from 10 to 1,000. The signal coming from the sensor has a value in the region of 100 to 300 jL/V and is delivered via cou- pling capacitor Cl to the non-invert- ing input of IC1. The amplification of this stage is set by trimpot PI. The extremely low-noise precision ampli- fier LTC1049 (from Linear Technology) functions not only as an amplifier but also as an impedance adapter with a high-Z input resistor to avoid loading the sensor signal. Coupling capacitor C3 takes the now boosted sensor sig- nal to a second amplifier (once more type LTC1049 with an amplification factor of 10). Total amplification is defined as A = [(R3 / (R4+P1)) + 1] x [(R6/R5) +1]. • The signal, now amplified to around 1.0 V is fed via C5 to a comparator stage. The switching threshold for IC3 (yet again a LTC1049) is set in the region of around 0.5 to 1.55 V by R8, R15 and trimpot P2. If the sensor detects a flow signal, a squarewave output voltage of approximately 1 kHz appears at the output of IC3. • This squarewave signal is taken via C6 to the frequency-to-voltage con- verter LM2907 (IC4). This module operates in ‘speed switch-mode’ and above the frequency set as / = 1 / (2 C7R12) delivers a High output level, which — • provides the trigger signal for the PIC16F675 microcontroller that follows. As each of the switching elements is connected by coupling capacitors, they can all be modified easily for other applications too. The amplifier circuitry would, for instance, make a magnifi- cent microphone amplifier, ultrasonic amplifier or ground motion detector (geophone). Linear Technology pro- vides for its own modules a free and easy-to-use simulation tool called SwitcherCadlll. A simulation program for this project is contained in our Pro- ject Software archive file 060099-1 l.zip which can be downloaded free of charge from www.elektor.com. Soft- and hardware The software controlling the pump is relatively straightforward; the program can be modified according to require- ments and the particular circuit appli- 12/2006 - elektor electronics 43 HANDS-ON HOME & GARDEN cation. After applying supply voltage the system is initialised, with all three LEDs activated sequentially. The flash- ing of SCAN indicator LED on Pin 7 of the Controller indicates that monitor- ing is in progress. A High output pro- duced by the analogue signal process- ing section is recognised by the micro- controller at pin 4 and activates the FLOW DETECT indicator LED on pin 6. False triggering is excluded to a large extent automatically as the Controller waits about three seconds for the High signal to be repeated. If this is the case, then the FLOW DETECT and PUMP ON indicator LEDs are activated for 50 s, together with circuit’s output pin 3 and consequently the relay as well. Turning on the hot water tap briefly (3 s) is sufficient to put the cir- culation pump into operation. Switch- ing times should be adjusted in the software according to the length and other characteristics of the plumbing. To facilitate this, the Project Software includes the source code in BASIC as well as the HEX data for programming the Controller. Construction and installation As the header photo shows, the author built the hardware using SMD technol- ogy, to enable everything to fit inside a small case. However, this is not absolutely necessary, after all the micro- controller comes in a normal DIL enclo- sure for easy reprogramming. Transpar- ent silicon rubber (as used around sinks and showers) is ideal for fixing the sen- sor to the back of the enclosure, three or four small fixing pads on the edge of the sensor being entirely adequate. Fig- ure 2 indicates how the little device can be clamped to the hot water pipe with a couple of cable ties. The Controller switches the circulation pump on and off using a transistor driver stage and a suitable relay. The relay is connected (looped) into the Live (L) wire of the pump as shown. Since we are dealing with mains volt- age here all connections to the relay must be protected from accidental touch contact and installed according to the IEE Wiring Regulations, which are the national standard to which all domestic and industrial wiring must conform in Britain. Both potentiometers should be adjusted to their middle setting the first time the circuit is installed, so as to give an amplification factor A of around 500 (trimpot PI) and a signal switching threshold of around 1.0 V (trimpot P2) for the signal amplitude. The final task is to turn on the hot water tap and adjust the overall signal amplification factor of the system at PI so that the circuitry recognises the noise of water flowing reliably (maxi- mum amplification with the trimpot turned fully to the left). If required, the amplitude switching threshold can also be increased or reduced. ( 060099 - 1 ) Links: Data sheet LTC 1049: www.linear.com/ pc/ down load Docu me nt.do?navld=H0,C 1 ,C1 1 54, C 1 009, C 1 027, PI 1 89,D3403 Simulation program: http://ltspice.linear.com/software/ swcadiii.exe Data sheet LM2907: www.national.com/pf/LM/LM2907.ht ml#Datasheet University of Oxford/European Union SAVE II project: www.eci.ox.ac.uk/lowercf/ eusave_circulation.html IEE Wiring Regulations: http://en.wikipedia.org/wiki/Electrical _wiring_(UK) and www.iee.org/Publish/WireRegs 44 elektor electronics - 12/2006 24-PAGE ‘E-TRIXX’ SUPPLEMENT escaped from the Elektor kitchen Next Issue: FREE CD-ROM FROM MICROCHIP/LABCENTER/ELEKTOR -=^5^; MPLAB C30 Compiler — EXPLORER-1 6 — Proteus VSM for PICs ire Want to know everything each month? Fill out the Order Form with this issue today! i * ■ _ r Subscription rates and conditions may be found at the back of this issue. * Offer available to Subscribers who have not held a subscription to Elektor Electronics during the last 12 months. Offer subject to availability. OQQQQOOO ’ - 1 m CONTENTS Did someone ring? 4 A touch more bling, perhaps? 5 Empty battery? e Lord and master! ? Battery saver circuit ? Battery indicator for the caravan s When the siren sounds... 9 Temperature-controlled switch 10 Check your contacts n Check Out Your LEDs 12 It's Wet! 13 Dicing with LEDs u Surf simulator Save Your Ears i? Electronic poltergeist is Pump it up: MP 3 booster 19 Musical saw 20 Luminous house number 22 15 Applause generator 23 This December 2006 issue of Elektor Electronics comes with a free collection of simple yet useful and sometimes playful circuits for home construction. The drcyitsj/ve hope and expect, are easily understood and reproducible and should appeal to the less advanced electronics enthusiast, although more experienced readers are also bound to find interesting bits and bobs to help them through the dark winter evenings in a pleasant and educational way. A deafening siren that will make burglars run off — electronic dice adds fun to games — a lighting house number helps your friends and acquaintances find your home more easily in the dark. Do you want to stand out from the crowd in the local disco, or encourage annoying visitors to leave early, with a bit of help from an electronic poltergeist? All these, and more, circuits may be found in this 24-page i-TRIXX supplement, which is offered to you free of charge. All i-TRIXX circuits in this supplement originate from the Elektor labs and are spin-offs from larger projects, scribblings on the back of envelopes, dead-bug fiddling, 'quick and dirty' solutions, or even design ideas that eventually became so intriguing the designer just had to develop it out for enthusiasm, curiosity and technical satisfaction — all at the same time in not a few cases. In this respect, i-TRIXX are truly 'tricks of the trade' that got pencilled down and eventually — with the help of our editorial team — made it to this publication in print instead of just ending up in a drawer or the more contemporary Windows Recycle Bin. From over 30 years experience in publishing for electronics enthusiasts all over the world we know that the Christmas holidays are a great time for fun circuits that cost next to nothing to build, often from parts found in the junkbox [now's a good time to clean it out!). Especially newcomers to the hobby will find i-TRIXX useful to learn about theS process that begins with the ability to 'read' a circuit diagram and culminates in powering up a fully working prototype. Have fun with the i-TRIXX collection! Did someone ring? If yoiTre expecting an important visitor but you just have to step out for a moment, an electronic doorbell memory can come in handy so you can see whether someone rang while you were out. Of course, you can't tell whether it was the visitor you were expecting who dropped by then, but a call to the mobile phone of the person concerned can quickly answer that question. A doorbell memory can also save you the trouble of going to the front door (if you live upstairs) when you think you heard the bell but aren't sure. And if you can't buy one, then of course you can build one yourself! Read on to find out how. Doorbell memory It takes only a handful of electronic components to build a handy tale-tale with an LED that indicates whether someone pressed the button of your doorbell. How many times have you thought you heard your doorbell while watching television in the evening? The sound of the well-known 'ding-dong' chimes occurs all too often, especially during the many commercials that nowadays remind us at the most inconvenient times that the gripping film we're watching is only a fantasy. A glance at the LED of the doorbell memory will tell you whether you have to go to the door or can try to escape the ads by zapping to a different channel. Or if you're expecting someone but have to make a quick trip to the neighbours to borrow a few beers for the occasion, it can be handy to be able to see whether your visitor already arrived while you were out. If so, you can always call him or her on the mobile to confess that you hadn't properly prepared for the expected visit. and the memory is armed. When the doorbell button is pressed, the memory circuit receives an AC or DC voltage via diode D1, depending on the type of doorbell. It can handle either type. Transistor T 1 thus receives a base current, so it starts conducting and drives T2 into conduction. The LED lights up as an indication that the doorbell has rung (i.e. was energised). The combination of transistor T2 and resistor R3 keeps T1 conducting after the bell voltage goes away (when the button is no longer pressed). The memory remains in this state until switch SI is opened. This switch thus acts as a reset switch as well as a power switch. The circuit can be assembled compactly on a small piece of perforated prototyping board, so it can be fitted into just about any model of doorbell. The transistors can be replaced by other, equivalent types as long as you use a combination of NPN and PNP types. The circuit is as simple as it is effective. It is connected in parallel with the bell and powered by a 3-V supply formed by two 1.5-V penlight batteries connected in series. The doorbell memory draws so little current that a set of batteries will last several years in normal use. The circuit works as follows. When the supply voltage is switched on with switch SI, capacitor Cl (initially uncharged) prevents transistors T1 and T2 from conducting. LED D2 is off, r 5 ) Electronics inside out ! 'i i-TRIXX collection - 12/2006 74HC4060 Q11 Q12 Q13 Q5 Q4 Q6 Q3 5 — II — 1 v DD 16 Q11 Q12 Q9 15 Q13 Q7 14 Q5 Q8 ~ M3~ Q4 R 12 ll Q6 PI 11 r Q3 pQ PO 0- 10 'ID 1 9 RESET PI PO 74HC4060 R1 R2 R3 D1 GEO— ►tF— i BAT85 D2 i— i3k9 1 >r f BAT85 D3 L < 2k2 I M 1 T BAT85 R4 D4 i H M4 BAT85 D5 051002-11 Figure 7 . A binary counter (IC1) raises the current through LED D5 from zero to the maximum value in 16 steps. Want to attract attention at bling-bling parties? That f s not so easy, since all the party animals there are doing their best to grab attention. The more bling, the more looks you get. An electronic disco brooch with a cool skin as an eyecatcher can certainly help. If you make it yourself, your chances of success lie entirely in your own hands. And it's certainly not all that difficult! A touch more bling, perhaps? Disco brooch The disco brooch described here is a small but attention-getting bit of electronic circuitry. It lights up a LED in steps until it reaches maximum brightness and then goes out, after which the entire process repeats itself, so you can attract attention at discos and parties. If you solder all the components on a small piece of perforated prototyping board, possibly along with a small battery, you can keep the whole thing nice and compact. We'll come back to that later. First let's have a brief look at how the circuit works. It is built around IC1 (see Figure 1), which is a binary counter chip. A digital pattern of ones and zeros appears at its outputs. Only the outputs on pins 4 to 7 are used in this particular case. They thus generate a count from 0 (binary 0000) to 15 (binary 1111). All outputs are zero at the start, and the LED is dark. Resistors R1-R4 are dimensioned such that the current flowing through LED D5 increases in steps to its maximum value during the following 15 states of the counter. This all happens at a rate that is controlled by the RC network connected to pins 9-11 of the 1C. At the end of the cycle, the counter goes back to zero and the LED goes dark. You can use trimpot PI to adjust the duration of each of the steps. The maximum length of the full step cycle is 1.5 seconds, and the minimum length is 0.14 seconds. At the minimum time setting, it appears that the LED just blinks. Diodes D1-D4 isolate the individual outputs of IC1 so they do not interfere with each other. They are Schottky diodes, which have a lower forward voltage drop than normal diodes. As a result, there will be enough voltage to provide adequate current through resistors R1-R4 (and thus through the LED) even when the battery voltage is low. Of course, the brightness of the LED still depends on the battery voltage. In practice, a battery voltage of 3 V gives very nice results. This voltage can be provided by a button cell, since the maximum current at this supply voltage is only around 2 mA. If you use a suitable battery holder designed for PCB mounting, you can tuck the button cell away nicely on the circuit board (see Figure 2). Of course, you also have to be able to switch the brooch on and off. You can use a safety pin for this purpose, and at the same time it can do what it is designed for, which is to attach the brooch to your clothing. To prepare the safety pin for this purpose, cut a piece out of the fixed leg. That represents the opened switch. The easiest way to do this is to first solder the pin in the proper position on the circuit board (see Figure 3). Use a bit of sandpaper to roughen the surface of the pin first so the solder will stick better. After the pin is soldered securely in place, cut out a piece in the middle and your DIY switch is ready to use. Figure 3. You can make an on/off switch from a safety pin , which also serves to pin the brooch to your clothing. Figure 2. Fit the components as close together as possible on a piece of perforated circuit board to keep the h'nished circuit compact. i-TRIXX collection - 12/2006 5 Photo: www.energizer.com Empty battery? Is the battery empty, or is there something wrong with the device? That's always a difficult question when your Walkman or some other battery-powered device appears to be dead when you switch it on. Before you take it to the shop for servicing, the first thing you should do is to test the battery or batteries. Of course, this means you need a reliable battery tester, but it also means you can limit the damage to the cost of a battery or two and a one-time investment of time and money in building a suitable tester. Battery tester Many commercial battery testers consist of nothing more than a resistor, a simple little meter and a pushbutton. Some manufacturers include an even simpler tester with a set of batteries, consisting of a strip of plastic with a layer of some sort of electrically conductive material that changes colour when a current flows through it. If you press this strip over the battery between the positive and negative terminals, a fully charged battery will cause a more intense change in colour than a partially discharged battery. Naturally, tests of this sort do not provide especially reliable or accurate results. The idea behind the circuit described here is to load a single battery, a set of batteries connected in series, a rechargeable battery, or even a small button cell with a reasonably constant current and use a separate multimeter or voltmeter module (Ml) to check the voltage. A quickly decreasing voltage indicates that the battery or batteries will have to be replaced soon. BD139 e y b c + i BC639 BF245 BC640 ft ft G || || D E || || B S C SI BT1 m 1 T2 __ Q) T1 BC640 Cl 100n T3 T4 2x BC639 BD139 R2 D1 BAT85 T5 X ©n 051003 - 11 BF245B Electronics inside out! If a constant-current circuit is used for the load, the current can never too be large and there is no need to make an adjustment for the number of cells. The constant-current circuit is specially designed to work with a voltage as low as 0.9 V. It's quite difficult to make a circuit work at even lower voltages with normal transistors. The active constant-current element is transistor T1. The current through it is held constant by comparing the voltage across resistor R1 in its collector path with a relatively constant reference voltage across diode D1. This comparison is provided by differential amplifier T3/T4. The voltage across diode D1 (a Schottky type) is reasonably constant by nature, but it is also stabilised by using FET T5 as a simple constant-current sink. T5 also limits the current at relatively high voltages (with several batteries in series). The constant voltage across D1 is transferred to resistor R12 by differential amplifier T1/T2, so a constant current flows through R1 from the battery or batteries being tested. R1 has a relatively low resistance, so this current is larger than the current drawn by the rest of the circuit. The quiescent current, which incidentally is also reasonably constant, is thus negligible. The test current thus remains reasonably constant while the battery or batteries is/are being tested. The maximum battery voltage that the tester can handle is set by T5, and here it is 30 V. To ensure that T1 does not get too warm at high battery voltages, keep the test as short as possible. Use a pushbutton switch as a test switch so the battery being tested cannot be left under load by accident. In these days of environmental awareness it has become desirable to use batteries as efficiently as possible. A lot of battery powered electronic devices do not switch themselves off automatically, such as multimeters. Forgetting to turn these off isn't just a nuisance (since you'll find that you don't have a spare battery at the crucial moment), but you're also unnecessarily reducing the lifespan of the batteries and causing extra pollution. And it isn't really necessary for those electronic thermometers to display the temperature day and night. As a skilful and environmentally aware i-TRIXXer you should make one or more of these small battery saver circuits. 6 i-TRIXX collection - 12/2006 Photo: Tratec Telecom B V - Veenendaal NL Lord and master! Men in particular enjoy the convenience of television remote controls - often to the annoyance of their female partners. Men apparently want to know what they're missing when the TV is tuned to a particular programme, so they like to keep zapping to other channels. With the remote control in their hands, they feel like they are the lord and master of the TV set. They are thus completely at a loss if the remote control doesn't work properly. There are many reasons why a remote control unit can malfunction, such as defective IR receiver in the TV set, a defect in the remote control, or empty batteries. Here a tester that can determine whether the remote control unit still emits an IR signal can come in handy. If you want to keep the IR reins firmly in hand, you can build your own IR detector. IR detector If you have a few remote control units around the house, you'll appreciate this little circuit. The LED clearly indicates whether the remote control unit actually emits an IR signal when you press one of the buttons on the unit. The circuit uses a photodiode (D1) to sense the infrared light emitted by the remote control unit (if it is working properly). The plastic package of this diode acts as an IR filter that is only transparent to invisible light with a wavelength of 950 nm. Although there are probably some remote control units that use IR diodes operating at a different wavelength, the circuit has enough sensi- tivity to detect them as well. If enough light falls on photodiode D1, an electrical current will flow through the diode. In fact, what hap- pens is that the leakage current increases, since photo- diodes are usually operated in reverse-biased mode (as is the case here). If the current is large enough, transis- tor T1 conducts and causes LED D2 to light up. If LED D2 remains dark, this means the remote control unit is not producing any IR light. This can be due to an empty battery (or batteries) or a fault in the internal circuitry. Pay careful attention to the polarisation of the photo- diode when wiring it into the circuit. The cathode is clearly marked by a special pin. For LED D2, use a low- current type that can handle a current of at least 7 mA. The detector can be powered by a pair of 1.5-V penlight cells connected in series. Battery saver circuit i-TRIXX presents a small electronic switch that connects a battery to the equipment for a certain amount of time when a push-button is momentarily pressed. And we have also taken the ambient light level into account; when it is dark you won't be able to read the display so it is only logical to turn the switch off, even if the time delay hasn't passed yet. The circuit is quite straightforward. For the actual switch we're using a well-known mosfet, the BS170. A mosfet (T2 in the circuit) used in this configuration doesn't need a current to make it conduct (just a voltage), which makes the circuit very efficient. When the battery is connected to the battery saver circuit for the first time, capacitor C2 provides the gate of the mosfet with a positive voltage, which causes T2 to conduct and hence connect the load (on the 9 V output) to the battery (BT1). C2 is slowly charged up via R3 (i.e. the voltage across C2 increases). This causes the voltage at the gate to drop and eventually it becomes so low that T2 can no longer conduct, removing the supply voltage to the load. In this state the battery saver circuit draws a very small current of about 1 pA. If you now press SI, C2 will discharge Battery indicator for the caravan BF245 1 B C547B 1 This i-TRIXX circuit can prevent a whole lot of trouble for those of you who go on holiday in a caravan. It would be a significant damper on your holiday spirit when you are ready to leave the camping and discover that you have used your battery too much and that you are now unable to start the car. This annoyance can be avoided if you were warned early enough by an illuminated LED when the charge in the battery threatens to become too low. A quiet, out of the way, in the countryside camping is what modern people look for to be able to unwind. However, we do not want to be completely deprived of all our creature comforts. We don't cope very long without electric light or a TV! And in the absence of a mains power outlet the car battery has to function as energy source, with the risk that later on there will be too little left to start the engine. The little circuit presented here gives you an early warning when the battery voltage (and therefore its stored energy) threatens to become too low. The setting of T1 and T2 determines whether LED D2 will light up when the battery voltage drops below a certain level. Junction FET T3 is used as a current source in order to try to keep the current through the LED as constant as possible. In this way the indicator remains lit even when the battery is in a state of very deep discharge (< 4 volt). The LED is a good low- current type that is still very bright at a very small current (1 to 2 mA). Voltage divider R1 and R2 has been calculated such that T1 will start to conduct when the voltage of the battery is greater than 12 V. If you think this threshold is too high (or: if you think that you can still start your car with a lower battery voltage), then you can reduce the value of R2 or replace it with a 50-k preset (connected as an adjustable resistor). When T1 conducts, the base current to T2 is interrupted and the collector of T2 will become high through R4. In this state T3 does not conduct and the LED is off. When the battery voltage drops below 12 V, T1 will block and T2 will start to conduct. R5 is now connected to ground via T2 which turns T3 into a current source of about 2 mA that drives the LED. There is, of course, a transition region during which the current through the LED slowly increases; after all, T1 and T2 do not switch with infinite gain! In our prototype the LED changed from fully off to fully on at a voltage variation from 12 to 11 V. As a bonus, a partially illuminated LED gives a rough indication as to how much the voltage actually is. Diode D1 prevents the circuit from inadvertently giving up the ghost if the circuit is connected incorrectly to the battery (reverse polarity). In practice, because of variations in the specifications of the transistors, the threshold and the current level through the LED can be different. Test the circuit thoroughly before using it. If you want a brighter indicator, you can increase the current through the LED by replacing T3 with a BF245B or BF245C. When the LED is off, the current through the circuit is barely 30 pA at a battery voltage of 14.4 V. With the LED is on and at a battery voltage of about 10 V, the current consumption is about 2 mA. Even with an illuminated LED, the circuit is not likely to be the cause of a flat battery. Even a good quality battery will have a selfdischarge rate which is many times greater than the maximum current consumption of this circuit! and the circuit returns to its initial state, with a new turn-off delay. Resistor R5 is used to limit the discharge current through the switch to an acceptable level. You only need to hold down the switch for a few hundredths of a second to fully discharge C2. In our prototype, connected between a 9 V battery and a load that drew about 5 mA, the output voltage started to drop after about 26 minutes. After 30 minutes the voltage had dropped to 2.4 V. You should use a good quality capacitor for C2 (one that has a very low leakage current), otherwise you could have to wait a very long time before the switch turns off! The ambient light level is detected using an LDR (R1). An LDR is a type of light sensor that reduces in resistance when the light level increases. We recommend that you use an FW150, obtainable from 8 i-TRIXX collection - 12/2006 When the siren sounds... In Greek mythology, a siren was a demonic being (half bird, half woman). Later on this idea was transformed in art into a mermaid: a combination of a fish and a woman. Mechanical and electromechanical versions were invented even later, and electronic models were developed in the last century. Sirens are characterised by their ability to produce sounds that attract attention. With the exception of the flesh-and-blood models, they are thus used to warn people in a particular area of impending danger. The electronic versions are the most suitable for DIY construction. Siren There are lots of different ways to make an electronic siren. Here we use a binary counter (1C 1 ) and an analogue multiplexer (IC2, which is a digitally configurable switch). The counter is a type 4060 1C, which has an integrated oscillator. The oscillator generates the tone of the siren. The frequency of this tone depends on the resistance between pin 10 of IC1 and the junction of Cl and R9. The trick here is that the analogue multiplexer adjusts the clock rate of the counter depending on the state of the counter. The frequency of the oscillator decreases as the resistance between pin 10 of IC1 and the junction of Cl and R9 increases, and the lower the frequency of the oscillator, the longer the counter remains in its current state. This means that high frequencies present on pin 9 are generated for shorter times than low frequencies. The values of resistors R1-R8 increase in uniform steps of approximately 10 kO, with the result that the output on pin 9 is a series of eight decreasing frequencies, and this series is constantly repeated in cyclical fashion. Transistor T 1 (BD139) and resistor R10 are included to boost the signal from pin 9 to a level suitable for e.g. Conrad as part number 183547-89. When there is too little light its resistance increases and potential divider R1/R2 causes transistor T 1 to conduct. T1 then charges up C2 very quickly through R4, which limits the current to a safe level. This stops T2 from conducting and the load is turned off. The choice of value for R2 determines how dark it has to be before T1 starts to conduct. The battery saver circuit can be added to devices that use 6 or 9 volt batteries and which don't draw more than 100 mA. The circuit can be built on a piece of experimenter's board and should be made as compact as possible so that it can be built into the battery powered device. driving a loudspeaker. The sound produced by this circuit may be familiar to some of our readers (especially if their memories extend back to older types of pinball and arcade game machines). You can also adjust the characteristics of the sound, since this circuit is primarily an invitation to experiment with the component values - in particular R1-R8 (10 kO minimum), but also Cl. The values of R1-R8 do not have to follow a strictly increasing series; they can also be selected randomly. The current consumption is primarily determined by resistor R10 and the loudspeaker (in our case an 8-0 type). The siren circuit draws approximately 33 mA at a supply voltage of 9 V. The supply ^ \ current is 11 mA at the minimum supply voltage of 4 V, and it increases to 60 mA at the maximum supply voltage of 15 V. Jc2 ^^00n R9 r <» — | 1M | 1 Cl II 33n IC1 10 12 16 © CTR14 CT < CT=0 3 4 5 6 7 8 9 11 12 13 6 _ t4 J_3 JI5 2 _ 3 R1 <>— | IQkO h R2 <> — | 20k0 h R3 <> — | 30k1 R4 8 4060 J. ^ Jc3 ^ToOn 16 13 14 15 -| 40 k2 1 — 1 12 R5 1 -| 49 k9 | — 1 5 R6 2 60 k4 R7 <>— | 69 k8 h R8 80k6 } VDD 0 MDX 1 '0 2 8x - J i 7 3 IC2 ^2 4 5 COM 6 4051 7 G8 VEE VSS LJL- 11 BD139 10 9 3 /|6 e y b c 4051 4060 051007- 11 i-TRIXX collection - 12/2006 9 Temperature-controlled switch It sounds rather mysterious: a switch that is controlled by its ambient temperature. All without the touch of a human hand, except for when you're building this sort of electronic thermostat. There are a lot of handy uses for a thermally controlled switch. If the temperature inside your PC gets too high sometimes, the circuit can switch on an extra fan. You can also use to switch on an electric heater automatically if the room temperature is too low. There are innumerable potential applications for the thermostat described here. There are lots of ways to measure the temperature of an object. One very simple way is to use a semiconductor sensor, such as the National Semiconductor LM35 1C. This sensor is accurate to within 0.5 °C at 25 °C, and few other sensors can do better or even come close to this level of accuracy. In the circuit described here, the sensor (IC2) generates an output voltage of 10 mV/°C, so the minimum temperature that can be measured is 0 °C. At 25 °C, the output voltage of the sensor is (25 °C x 10 mV/°C) = 0.25 V. The circuit uses a TLC271 opamp as a comparator. It compares the voltage from the temperature sensor, which is connected to its non-inverting input (pin 3), with the voltage on its inverting input (pin 2). The latter voltage can be set with potentiometer PI. If the voltage from the sensor rises above the reference value set by PI (which represents the desired temperature), the output of the comparator toggles to the full supply voltage level. The output is fed to transistor T1, which acts as a switch so the output can handle more current. This makes it possible to energise a relay in order to switch a heavy load or a higher voltage. The transistor also supplies current to LED D1, which indicates whether the temperature is above the reference value. The reference value can be adjusted by PI over the range of 18-30 °C with the indicated component values. Of course, you can adjust the range to suit your needs by modifying the value of R1 and/or R2. To prevent instability in the vicinity of the reference value, a small amount of hysteresis is provided by resistor R4 so the temperature will have to continue rising or falling by a small amount (approximately 0.5 °C) before the output state changes. The LM35 is available in several different versions. All versions have a rated temperature range of at least 0-100 °C. One thing you may have to take into account is that the sensor has a relatively long response time. According to the datasheet, the sensor takes 3 minutes to reach nearly 100% of its final value in still air. The opamp has very low drift relative to its input voltages, and in the low-power mode used here it draws very little current. The sensor also draws very little current, so the total current consumption is less than 80 jiA when LED D1 is off. The advantage of low current consumption is that the circuit can be powered by a battery if necessary (6 V, 9 V or 12 V). The sensor has a rated operating voltage range of 4-30 V, and the TLC271 is rated for a supply voltage of 3-16 V. The circuit can thus work very well with a 12-V supply voltage, which means you can also use it for car applications (at 14.4 V). In that case, you must give additional attention to filtering out interference on the supply voltage. +5V I C2 lOOn IC2 R2 «- (0V30) \ © LM35 Pi 10k R3 Q «- (0V18) R1 I Cl 220n LM35 6 TLC271 0 D1 ’ + 5V R7 20mA max. T R5 -| 6k8 h €> R6 I BC547B BC547B 6 051006-11 Electronics inside out ! 10 i-TRIXX collection - 12/2006 Check your contacts Having good contacts is important - not only in your daily life, but also in electronics. In contrast to social contacts, the reliability of electrical contacts can be checked quickly and easily. Various types of continuity testers are commercially available for this purpose. Most multimeters also have a continuity test function for electrical connections. A simple beep helps you tell good contacts from bad ones. However, in some cases the tester doesn't produce a beep because it won't accept contact resistances that are somewhat higher than usual. Also, poorly conducting (and thus bad) connections are sometimes indicated to be good. Here e-trix comes to your aid with a design for a DIY continuity tester that helps you separate the wheat from the chaff. Continuity tester Many multimeters have a built-in continuity test function. However, in many cases the resistance necessary to activate the beeper when you are looking for bad connections is just a bit too high. It can also happen that the beeper sounds even though the resistance of the connection is unacceptably high. This circuit lets you adjust the threshold between bad and good contacts to suit your needs. The circuit is built around an operational amplifier (IC1) wired as a comparator. The opamp compares the voltage on its inverting input (pin 2) with the voltage on its non-inverting input (pin 3). The voltage on pin 3 can be set using potentiometer PI, so you can set the threshold between good and bad connections. When test probes TP1 and TP2 are placed on either side of a connection or contact to be tested, a voltage is generated across the probes by the current flowing though resistors R1 and R3, and it appears on pin 2 of the opamp. This voltage depends on the resistance between the probe tips. If the voltage on pin 2 is lower than the reference voltage on pin 3, the difference is amplified so strongly by the opamp that its output (pin 6) is practically the same as the supply voltage. This causes transistor T1 to conduct, which in turn causes DC buzzer BZ1 to sound. This means that the resistance of the connection being tested is less than the threshold value set by PI, and thus that the connection is OK. By contrast, a bad connection will cause the relationship between the voltages on the inputs of the opamp to be the opposite, with the result that its output will be at ground level. The transistor will not conduct, and the buzzer will remain still. To ensure that the opamp 'toggles' properly (which means that its output goes to ground level or the supply voltage level) when the difference voltage is sufficiently large and does not oscillate during the transition interval due to small fluctuations in the difference voltage produced by interference, its output is coupled back to its non-inverting input (pin 3) by resistor R4. This causes any change on the output to be passed back to this input in amplified form, with the result that the detected difference voltage is amplified (and thus boosted). 1N4148 Diodes D1, D2 and D3 protect the circuit against excessive positive and negative input voltages that may come from the connections or contacts being tested. They also ensure that the continuity tester does not inject excessively high voltages into the item under test. Capacitor Cl suppresses high-frequency interference. The circuit draws only a small supply current, so it can easily be powered by a 9-V battery. Photo: Hirschmann Electronics B V Check Out Your LEDs You have to admit that these tiny electronic lamps are handy, and they last almost forever. Around 40 years after Nick Holanyak developed the first LED, they have become just about indispensable. Any self-respecting electronics hobbyist always has a few in his junk box. But before you use LEDs, it's a good idea to check them out. With a LED tester, you can even do it in the dark! LED tester LEDs are available nowadays in all shapes and colours. There are types with clear, colourless packages, while others have coloured plastic packages. Many modern types of LEDs need less current than older types. Some of them provide quite a puddle of light if you give them a decent amount of current. When you're working with used LEDs from the junk box, there's a good chance that you can't tell which lead is which any more. (If the leads haven't been trimmed, the short lead is always the cathode lead and the long lead is the anode lead.) If you use several LEDs in a display where they all have the same current, you naturally want all the LEDs to have the same brightness. But that's not always the case, even with LEDs of the same type. To save yourself unnecessary soldering work, it's a good idea to check the LEDs out first. That's the job of the LED tester described here. SI Q * D1 Z 2V7 0W4 D2 This circuit can be used to test up to three LEDs at once, connected in series. You can easily increase that number by using a higher supply voltage. If you do so, you should allow 2.7 V for each additional LED. The Zener diodes are included in the circuit so it can also be used to test one or two LEDs. Another benefit of the Zeners is that even if one or more of the LEDs are defective or connected with reverse polarity, the remaining ones will light up normally. That makes it easy to spot suspect LEDs. If you extend the tester to handle more LEDs, you must add another Zener diode for each LED position. The test current that flows through the LEDs is held reasonably constant by FET T1, independent of the number of LEDs being tested. The FET is used as a constant-current source to keep the circuit as simple as possible. The drawback of this approach is that the tolerance range of FET characteristics is especially large. The type used here even has three versions: A, B and C. We used the B version here so the current through the LEDs can be adjusted using z 2V7 0W4 D3 z 2V7 £ 0W4 r4 T1 ) BF245B 1 s . 2 “I Pi S 2k5 i BF245B 0 051009-11 potentiometer PI over the range of 1-7 mA. If you need more current, you can use a BF254C instead, but then you will also need a higher supply voltage. For example, you can connect two 9-V batteries in series or power the circuit from a mains adapter. However, some LEDs have a maximum rated current of only 5 mA. You should thus always start testing at the lowest current by setting PI to maximum resistance. You can easily see from the brightness whether you need more current. If an LED does not light up, it may be defective or connected the wrong way round. Reduce the current to the minimum level before reversing or replacing any LEDs. If you label the polarity of the terminals on the LED tester, you can easily mark the cathode and anode leads of the tested LEDs. To make it easy to swap the LEDs, you can use an 1C socket as a test socket. The selected Zener diodes were chosen to make the tester suitable for red, yellow and green LEDs. Red LEDs have a forward voltage of 1.6 V to 1.8 V. The value for yellow LEDs is around 1.9 V, and with green LEDs the forward voltage can be as high as 2 V. If you also want to test modern blue or white LEDs, you will have to replace the Zener diodes with types having a voltage of 4.7 V or 5.1 V. The supply voltage will also have to be increased accordingly - for example, by connecting two 9-V batteries in series. j * * t r Electronics inside out ! 12 i-TRIXX collection - 12/2006 It's Wet! Have you ever seen the stairs to one of the upper stories in your house turn into a waterfall? Or maybe you've come home to find your aquarium fish trying to swim across the carpet? For your sake, we hope not, because the consequences are usually fairly dramatic. With a handful of electronic components, you can at least ensure that you will be warned before you have to put on your waders. Water alarm It's better to prevent water problems than to have to correct them. But no how many precautions you take, an occasional leak can still happen. A burst water supply hose for the washing machine, a bath tap that someone forgot to turn off, a broken aquarium wall, or a leaking boiler or central heating tank - anything is possible. In such cases, it's nice to be warned as quickly as possible, for example by an acoustic water alarm. Then you can at least limit the damage. If you're handy with a soldering iron and know the difference between an 1C and a PC, you'll no doubt enjoy building the electronic water alarm described here. The circuit takes advantage of the fact that 'normal' water is always slightly contaminated, even if only slightly, and thus conducts electricity to a certain extent. It is built around an popular 1C from the somewhat antiquated 4000-series logic family: the 4093. This 1C contains four inverted-output AND gates (NAND gates) with Schmitt-trigger inputs. If water is detected between the probes, it emits an intermittent and rather irritating beeping tone. The conductivity of the water is used to active the circuit built around ICIa. The two electrodes (probes) are fitted at the lowest point where water will come to stand. They can be two tinned copper wires, but you can also use two pieces of circuit board with the copper surface coated with solder. The combination of ICIa, resistor R2 and capacitor C2 forms a simple oscillator that produces the intermittent (on/off) effect of the alarm. If no water is present between the probes, the input of ICIa is held low by R1 and the output of IC1 b is also low. The oscillator is not active in this state. If moisture is sensed, the supply voltage pulls input 1 of gate IC1 a high via the conductive water, causing the gate to start oscillating. Whenever the output of IC1 b is high, the tone generator built around ICIc is enabled, and in turn it energises buzzer BZ1. The net result is a periodic, intermittent beeping tone. You can adjust the intermittent effect of the sound produced by the water alarm to suit your taste by simply adjusting the value of R2 or C2. You can also set the pitch of the sound with PI. The closer the pitch is to the resonant frequency of buzzer BZ1, the louder the tone will be. You should set the sound to the most irritating level possible. Gate IC1 d is used to boost the amount of power than can be pumped into the buzzer. It inverts the output signal from ICIc to double the voltage applied to the buzzer. Naturally, the circuit of the alarm must be fitted somewhere that will remain high and dry. Use a pair of thin twisted wires to connect the electrodes (probes) to the board. Naturally, you should use insulated, flexible wire for this purpose. Twisting the wires together makes the relatively long connection between the probes and the circuit less sensitive to false alarms due to external electromagnetic interference. The current consumption is very low (less than 0.1 jiA) when everything is dry. When the buzzer is energised, the current consumption can rise to around 2 mA. We measured 3 mA with the frequency set to the maximum value. The battery thus last for several years as long as no water is detected. Of course, you should bear in mind that the battery might start leaking after a while. © i-TRIXX collection - 12/2006 13 Dicing with LEDs Every self-respecting DIYer makes his own electronic dice with LEDs as spots. Then you don't have to throw the dice anymore - just push the button. The electronics also ensures that nobody can try to improve his luck by fiddling with the dice. Too bad for sore losers! This circuit proves that an electronic die built using standard components can be made quite compact. The key component of here is a type 4060 digital counter (IC1). This 1C has an integrated oscillator stage, so only two resistors (R7 and R8) and a capacitor (C7) are necessary to generate the clock signal. The clock signal is divided by various factors by the internal digital circuitry of the 1C. The division factors are designated by 'CV in the 1C drawing symbol. For instance, the signal on the CT3 output (pin 7) is a square wave with a frequency equal to the clock frequency divided by 2 3 (8). The clock signal is divided by 2 4 (16) on the CT4 output, by 2 5 (32) on the CT5 output, and so on. This means the output signals form a binary number that 4060 3C5S7B- +9V Electronics inside out! & does. Of course, a die has only six possible values marked on the six sides of a cube. This means that at least three bits (the first three outputs) of the counter are necessary to drive a display. Eight different counter states (2 3 ) can be represented with three bits, but in this case the counter must be restricted to six states. To make sure this happens, Dll, D12 and R6 are used to reset the counter to its initial state when it reaches the seventh state, which means when it reaches a binary count of 110. When this happens, pins 4 and 5 of the 1C are both logic T (high level), which causes a logic T to be applied to pin 12 via resistor R6. This causes the counter to be reset, which is what we want. The display consists of seven LEDs arranged in the same pattern as the usual markings on a normal die. This arrangement is shown in the schematic diagram. Before you begin thinking about the proper logical connections between the LEDs and the counter outputs, you can start by noting that except for the '1 ' state there will always be two LEDs lit up at the same time. This means that only four distinct indications are necessary, instead of seven (with a total of seven LEDs). Another advantage of this is that the current consumption can be reduced by connecting pairs of LEDs in series. Resistors R1-R4 limit the current through the LEDs to approximately 2 mA. This means you have to use low- current LEDs. They are nice and bright at a current of 2 mA. Resistor R3 has a higher value because only one LED is driven via it. For convenience, the circuit is dimensioned based on using a 9-V battery. The current consumption of the circuit depends on the number of LEDs that are illuminated, and with our prototype it varied over a range of approximately 2.5 mA to 6.5 mA. The LEDs still produce enough light even when the supply voltage is as low as 6 V, but this depends strongly on the characteristics of the low-current LEDs used in the circuit. Diodes D8-D10 and transistor T1 are necessary to enable all the states of a normal die to be shown. By that, we primarily mean the states with two or three spots, which must be located diagonally. state binary LEDs 'on' spots 1 000 1, 3, 4, 6, 7 5 2 001 1, 6, 7 3 3 010 1, 2, 3, 4, 5, 6 6 4 011 7 1 5 100 1, 3, 4, 6 4 6 101 1,6 2 14 i-TRIXX collection - 12/2006 Surf simulator For readers who want to delve more deeply into the design, the following table shows the six different binary states, which LEDs are lit up for each state, and the number of spots shown by the die. The die is operated by switch SI. In the quiescent state, the break contact of SI is closed and the oscillator is stopped because the input of the oscillator stage is connected to ground via the switch. When SI is pressed, the oscillator starts running and causes the states of the LEDs to change at a rate of 1 kHz, which is too fast to follow with the naked eye. This high frequency ensures that the state of the die is purely random when SI is released, so there is no regularity or pattern in the results. The circuit can be assembled on a small piece of perforated prototyping board. Fit the LEDs in exactly the same pattern as shown in the schematic diagram, since otherwise the spot patterns will not correspond to a real die. When you have assembled the circuit board, fit it in a plastic enclosure along with a 9-V battery to provide power. 1 r\ Do you long for a beach holiday on a tropical island, but you don't have the necessary wherewithal? We've got just the answer: build the i-TRIXX surf simulator, put on your headphones, and dream yourself away from this dreary realm. Let the rhythmic rush of the waves transport you to a sun-drenched beach with gently swaying palm trees, and relax for a while before returning to a chilly confrontation with reality. That's the ultimate in low-budget travel. Book now! Isn't it great to relax on the snow-white sand of a tropical beach with a cool drink in your hand? To enjoy the magnificent of earthly creation while letting your thoughts drift on the hypnotic mantra of the breaking surf? No relaxant brewed by human hands can possibly compete with it! But when you start thinking about how much it all costs, you'll reach for the headache pills instead. Fortunately, there's a less expensive way to relax — with a bit of electronics that imitates the soothing sound of the sea. You'll have to imagine the corresponding surroundings on your own. A sunlamp and a few scoops of sand may help... This circuit uses more components that most of the i-TRIXX do it yourself projects, but this doesn't make it harder to understand how it works. We have also designed a PCB layout for the circuit, which makes DIY construction that much easier. Noise is usually the last thing you want in any sort of audio circuitry. Noise is generated in semiconductor BC547B 1 • R16 - | 100k h R17 ■4V5 R15 -| 33k F ■\P1 R14 D2 H X I — Took 2M5 V 1N4148 R13 ~| 2M2 F C8 2 ( 0.2 +4V5 © R11 +4V5 © C2 R1 HI 100n Cl II R4 47 p 1 10k H R12 +4V5 © 3 s R18 BT1 9V R19 • • £ V. y.~ green <» — • 4 C9 □ CIO lOOn 220|o 25 V © IC1 S 11 © 100n C5 220n R2 R3 3n3 D1 T1 I 1N4148 R6 R7 I II © ■4V5 IC1 = TL084 R8 H 100k \ 47 p R9 C6 t . nnnb*o| 220n I oTT IC1 TL084 14 8 CM BC547B -) -4V5 065109- 11 . i-TRIXX collection - 12/2006 devices (transistors and diodes) as an undesirable by-product. However, in our surf simulator we just can't get enough of it! Noise forms the basis for imitating the sound of breaking surf. We take advantage of the fact that a reverse-biased base-emitter junction of a transistor generates noise like the devil if the voltage is high enough. The noise source in the schematic diagram is transistor T1. The base-emitter junction of this transistor breaks down at approximately 7 V (depending on the specific transistor). R1 limits the current to a level that avoids destroying the transistor. T1 generates a constant noise signal, which doesn't resemble the sound of breaking surf. If you listen carefully to the sound of real surf, you'll notice that it resembles a noise signal that increases rapidly in volume (as the wave rolls up the beach) and then slowly dies down. This means the noise must rise and decay in a sawtooth waveform. To achieve this effect, we make use of the AC impedance of a normal diode (D1 in the schematic diagram), which depends on the amount of DC current flowing through the diode. The higher the current through the diode, the lower its AC impedance (and thus its impedance to the noise signal). The voltage across RIO determines how much current flows through diode D1. The noise signal is amplified by ICId and applied to the diode, and the voltage across the diode is further amplified by ICIc to the output level. As already mentioned, the amplitude of the noise signal depends on the DC current through diode D1. What we have to do now is make the current through D1 (or in other words, the voltage across RIO) vary in a sawtooth pattern. This job is handled by amplifiers IC1 a and IC1 b. You can use PI to adjust the form of the sawtooth (and thus how the noise grows and decays) according to your taste. The circuit works best with a clean 9-V supply voltage, so an AC mains adapter with a stabilised 9-V output is the preferred choice as a power source. A balanced supply voltage is required for proper operation of the circuit, so a virtual ground is necessary. This is created in a simple manner by a voltage divider (R18 and R19). To reduce the current consumption (in case you want to power the circuit from a battery), it also provides a 'power on' indication. The current consumption of the circuit is approximately 9 mA, which means the battery would have to be replaced already after two days of continuous use if it is powered by a battery, so using an AC mains adapter is certainly advisable. We designed a PCB layout for this project to make it easier to assemble, since it is a bit more complex than most of the i-TRIXX circuits. If you follow the illustrated component layout, you shouldn't have any trouble at all. The idea here is that you print the copper layout at actual size (52 x 52 mm) on transparent film. The easiest way to do this is to use the supplied pdf file which you can open with Adobe Reader. You can then use the film to expose a circuit board, develop it, and then etch it. Alternatively, you can take the film to your local electronics shop and have them make a board for you. If you need a real holiday before tackling this, visit your local travel agent! Electronics inside out! Resistors R1,R2,R6 = 1 MQ R3 = 4kQ7 R4,R8,R10,R14,R16 = 100 k Q R5 = 22 kQ R 7, R 1 2 = 10 kQ R9 = 1 kQ R11 = 120 kQ R13 = 2MQ2 R15 = 33 kQ R17 = 220 kQ R18 = 3kQ9 R19 = 2kQ2 PI = 2MQ5 preset Capacitors C1,C10,C11 = 100 nF C2,C5 = 47 pF C3,C6 = 220 nF C4 = 3nF3 C7 = 47 jiF/25V radial C8 = 2|i2 MKT lead pitch 5 or 7.5mm C9 = 220 jiF/25V radial Semiconductors D1,D2 = 1N4148 D3 = LED, 3mm, green, low current T1 = BC547B IC1 = TL084 Miscellaneous 6 PCB solder pins BT1 = 9V battery with clip-on leads (however 9 V battery eliminator preferred) 16 i-TRIXX collection - 12/2006 Save Your Ears 'Hello... HELLO! Are you deaf? Do you have disco ears?' If people ask you this and you're still well below 80 r you may be suffering from hearing loss, which can come from (prolonged) listening to very loud music. You won't notice how bad it is until it's too late, and after that you won't be able to hear your favourite music the way it really is - so an expensive sound system is no longer a sound investment. To avoid all this, use the i-trixx sound meter to save your ears (and your neighbours' ears!). Noise meter With just a handful of components, you can build a simple but effective sound level meter for your sound system. This sort of circuit is also called a VU meter. The abbreviation 'VU' stands for 'volume unit', which is used to express the average value of a music signal over a short time. The VU meter described here is what is called a 'passive' type. This means it does not need a separate power supply, since the power is provided by the input signal. This makes it easy to use: just connect it to the loudspeaker terminals (the polarity doesn't matter) and you're all set. The more LEDs that light up while the music is playing, the more you should be asking yourself how well you are treating your ears (and your neighbours' ears). Of course, this isn't an accurately calibrated meter. The circuit design is too simple (and too inexpensive) for that. However, you can have a non-disco type (or your neighbours) tell you when the music is really too loud, and the maximum number of LED lit up at that time can serve you as a good reference for the maximum tolerable sound level. Although this is a passive VU meter, it contains active components in the form of two transistors and six FETs. Seven LEDs light up in steps to show how much power is being pumped into the loudspeaker. The steps correspond to the power levels shown in the schematic for a sine-wave signal into an 8-ohm load. LED D1 lights up first at low loudspeaker voltages. As the music power increases, the following LEDs (D2, D3, and so on) light up as well. The LEDs thus dance to the rhythm of the music (especially the bass notes). This circuit can easily be assembled on a small piece of prototyping board. Use low-current types for the LEDs. They have a low forward voltage and are fairly bright at current levels as low as 1 mA. Connect the VU meter to the loudspeaker you want to monitor. If LED D2 never lights up (it remains dark even when LED D3 lights up), reverse the polarity of diode D8 (we have more to say about this later on). In addition, bear in mind that the sound from the speaker will have to be fairly loud before the LEDs will start lighting up. If you want to know more about the technical details of this VU meter, keep on reading. Each LED is driven by its own current source so it will not be overloaded with too much current when the input voltage increases. The current sources also ensure that the final amplifier is not loaded any more than necessary. The current sources for LEDs D1-D6 are formed by FET circuits. A FET can be made to supply a fixed current by simply connecting a resistor to the source lead (resistors R1-R6 in this case). With a resistance of 1 kO, the current is theoretically limited to 1 mA. However, in practice FETs have a especially broad tolerance range. The actual current level with our prototype ranged from 0.65 mA to 0.98 mA. To ensure that each LED only lights up starting at a defined voltage, a Zener diode (D8-D13) is connected in series with each LED starting with D2. The Zener voltage must be approximately 3 V less than the voltage necessary for the indicated power level. The 3-V offset is a consequence of the voltage losses resulting from the LED, the FET, the rectifier, and the overvoltage protection. The overvoltage protection R9 -©-[ 39 Q D14 BC337 18 6 ° W 3 ° W 12 . W 6 y 31V 1 W5 ' ^7 ^^6 ^^5 ^^4 ^^3 ^^2 R8 D13 D12 Dll DIO D9 D8 1N4004 63V max BC337 BF245 R1 £ L J: £ L J: £ L J: £ L — : £ L T1...T6 = BF245A 065107-11 i-TRIXX collection - 12/2006 17 is combined with the current source for LED D7. One problem with using FETs as current sources is that the maximum rated drain-source voltage of the types used here is only 30 V. If you want to use the circuit with an especially powerful final amplifier, a maximum input level of slightly more than 30 V is much too low. We thus decided to double the limit. This job is handled by T7 and T8. If the amplitude of the applied signal is less than 30 V, T8 buffers the rectified voltage on Cl. This means that when only the first LED is lit, the additional voltage drop of the overvoltage protection circuit is primarily determined by the base-emitter voltage of T8. The maximum worst-case voltage drop across R8 is 0.7 V when all the LEDs are on, but it has increasingly less effect as the input voltage rises. R8 is necessary so the base voltage can be regulated. R7 is fitted in series with LED D7 and Zener diode D13, and the voltage drop across R7 is used to cause transistor T7 to conduct. This voltage may be around 0.3 V at very low current levels, but with a current of a few milliamperes it can be assumed to be 0.6 V. Transistor T7 starts conducting if the input voltage rises above the threshold voltage of D7 and D13, and this reduces the voltage on the base of T8. This negative feedback stabilises the supply voltage for the LEDs at a level of around 30 V. With a value of 390 O for R7, the current through LED D7 will be slightly more than 1 mA. This has been done intentionally so D7 will be a bit brighter than the other LEDs when the signal level is above 30 V. When the voltage is higher than 30 V, the circuit draws additional current due to the voltage drop across R8. The AC voltage on the loudspeaker terminals is half- wave rectified by diode D14. This standard diode can handle 1 A at 400 V. The peak current level can be considerably higher, but don't forget that the current still has to be provided by the final amplifier. Resistor R9 is included in series with the input to keep the additional load on the final amplifier within safe bounds and limit the interference or distortion that may result from this load. The peak current can never exceed 1.5 A (the charging current of Cl), even when the circuit is connected directly to an AC voltage with an amplitude of 60 V. Cl also determines how long the LEDs stay lit. This brings us to an important aspect of the circuit, which you may wish to experiment with in combination with the current through the LEDs. An important consideration in the circuit design is to keep the load on the final amplifier to a minimum. However, the combination of R9 and Cl causes an averaging of the complex music signal. The peak signal levels in the music are higher (or even much higher) than the average value. Tests made under actual conditions show that the applied peak power can easily be a factor of 2 to 4 greater than what is indicated by this Electronic How about an amusing (although your victims may not agree) circuit that you can use to play a trick on your friends or family, or to get rid of your mother-in- law? A handful of electronic components can create a cricket-like chirping sound every few minutes or so. You should hide this electronic poltergeist such that it's difficult to find, but can still be heard clearly. It is guaranteed to drive people mad! i-TRIXX shows you how to build this irritating circuit. Read on... - Did you hear that? - What? - That chirping noise. -Chirping noise? - Yes , I think there's a cricket somewhere in the room. - 1 didn't hear anything! - Well, it's stopped now! A bit later: - There it is again! Did you hear it? - 1 heard nothing, go back to sleep! - I'm not going mad am I? I'm sure there's a cricket around somewhere! We have to get rid of it, otherwise I won't be able to sleep! This could be a possible conversation in the bedroom where you've hidden the electronic poltergeist. But before you can create all this mischief you'll have to use your soldering iron. You'll be pleased to hear that the construction of this circuit won't give you sleepless nights, as long as you work carefully. At the heart of the circuit is an old favourite 1C, the 4093. This chip contains four NAND gates, each of which has two inputs. These NAND gates have Schmitt triggered inputs (more on this later) and are ideal for use in this particular application. Three of the gates are used as oscillators. The oscillator built around IC1 A produces a high-pitched sound similar to that made by crickets when they rub their wings together. A second VU meter. This amounts to 240 W or more with an 8-0 loudspeaker. You can reduce the value of Cl to make the circuit respond more quickly (and thus more accurately) to peak signal levels. Now a few comments on D8. You may receive a stabistor (for example, from the Philips BZV86 series or the like) for D8. Unlike a Zener diode, a stabistor must be connected in the forward-biased direction. A stabistor actually consists of a set of PN junctions in series (or ordinary forward-biased diodes). Check this carefully: if D2 does not light up when D8 is fitted as a normal Zener diode, then D8 quite likely a stabistor, so you should fit it the other way round. Electronics inside out! 18 i-TRIXX collection - 12/2006 R1 D1 [H 10k I H R3 1 47k \ IC1.A poltergeist oscillator (IC1 B) is used to interrupt this noise at regular intervals. The third oscillator (IC1C) is used to turn on the chirping noises for a short while, with a few minutes silence in between. So how do these oscillators work? We'll take IC1 A as an example. The output of this binary NAND gate will only be a logic low (virtually equal to 0 Volts) when both inputs are at a logic high level (typically just over half the supply voltage). Each input has a Schmitt trigger circuit so that slowly changing input signals can be also be dealt with. The Schmitt trigger makes the gate switch state suddenly when the input is slowly increasing and reaches the point where it could be considered at a logic high state. Inputs that are hesitating somewhere between low and high are effectively given a helping hand upwards. When the supply voltage (a 9 V battery) is first connected to the circuit, the input at pin 2 is at a logic low level (since capacitor C2 has not yet charged up). This means that the output of the NAND gate at pin 3 will be at a logic high level. Capacitor C2 is now charged up via the output at pin 3 and resistor R3 until the Schmitt trigger decides that the voltage level at pin 2 has increased enough for it to be at a logic high level. The output of the gate now switches over to a logic low level, assuming that the input at pin 1 is at a logic high level. Capacitor C2 will now be discharged by the output at pin 3 via R3, which causes the input at pin 2 to become low again, and the whole cycle repeats itself. The speed (frequency) at which this charging and discharging takes place depends on the values of R3 and C2. Pump it up: MP3 booster MP3 players are all the rage these days. The smaller ones in memory-stick format are particularly easy to take with you; your very own 'personal sound system' on the move! It's when you want others to share your taste in music that you find these players to have a lack of power. You can get round this problem with the help of the i-TRIXX MP3 booster, a small amplifier that can be used to connect your MP3 player directly to your Hi-Fi. When you next invite your friends to a party you can ask them to bring their 'personal music' as well as the usual drinks! But first we have to build this booster! The small battery-powered players have an output signal that is more than sufficient to drive a set of 32 Ohm headphones. You'll often find that with an output of 1 mW the sound pressure level (SPL) produced can reach up to 90 dB. This would be sufficient to cause permanent damage to your hearing after only one hour! The maximum output voltage will then be around 200 mV. This, however, is insufficient to fully drive a power amplifier. For this you'll need an extra circuit that boosts the output voltage. Power amps usually require 1 V for maximum output, hence the signal has to be amplified by a factor of five. We will also have to bear in mind that quieter recordings may need to be amplified even more. We've used a simple method here to select the gain, which avoids the use of potentiometers. After all, the MP3 player already has its own volume control. We decided to have two gain settings on the booster, one of three times and the other ten times. 1N4148 R2 -| 3M3 The oscillator built around IC1 C works in a slightly differently way. In this case a diode (D1) causes capacitor Cl to charge via both R1 and R2, which is much quicker than when Cl discharges via R2 only. This causes the poltergeist to be quiet for three minutes (the slow discharge) and only make a noise for a second or so (the fast charge). The fourth gate (IC1 D) is used to combine the two oscillators (IC1 A, which makes the high-pitched sound of the wings rubbing together and IC1B, which imitates the periodic movement of the wings) and drive the sounder. It is possible to change the frequencies at which gates IC1 A to IC1 C operate by varying the values of resistors R1 to R4. A lower value results in a higher frequency, and a higher value lowers it. You could also consider reducing the volume of the sounder by increasing the value of R5; this will make it even more difficult to find the circuit. The current consumption of our prototype was under 300 jiA during the time it was silent, which rose to about 1.3 mA when the circuit was producing sounds (this only lasts 1 second). With an ordinary 9 V battery this circuit can operate for several (irritating) months, and there won't be many people who could put up with that! BZ1 065126 - i-TRIXX collection - 12/2006 19 Musical saw Usually it's the person who sings when the sawing goes well. But the saw itself can also be made to produce musical sounds by drawing a bow across its edge. By bending the saw in different ways an experienced saw player is able to extract a musical melody from the saw. If you don't have a spare saw and bow to hand you could always build this electronic version. At least with this instrument you'll never cut yourself! So warm up your soldering iron and get cracking! Everybody who has sawn some wood will be aware that the saw can sometimes produce musical sounds, especially when the sawing isn't going very smoothly. There are even professional musicians who use specially manufactured saws as musical instruments. You'll only appreciate their skills if you happen to like this style of music though. As a dedicated electronics hobbyist you'd rather build an electronic version, of course, and we've designed a simple circuit for you. The circuit diagram may appear a bit complex at first, but don't let it worry you. We have also designed a printed circuit board for this circuit, which makes the construction a lot easier than if you had to use experimenter's board. The complete circuit is built around a single 1C, a TL084, which contains four opamps. These opamps have been configured as oscillators in this circuit, and together they produce sounds similar to that of a musical saw. The circuit consists mainly of three, almost identical, adjustable oscillators built round IC1B, IC1C and IC1D. The frequencies can be adjusted via potentiometers PI to P3, with a slight overlap in the frequency range between the oscillators. A fourth (similar) oscillator, which produces the final output, is modulated by the first three oscillators, which creates a varying frequency that quite closely resembles the sounds produced by a saw. Oscillator IC1 B creates a type of vibrato effect (this is a quick variation of the frequency, and is comparable to the effect produced when you use your hand to rapidly change the amount of bending of the saw). Oscillators IC1C and IC1D, which oscillate at lower frequencies, create an arbitrary variation of the frequency (melody) of the electronic saw (corresponding to small changes in the level of bending of the saw). The oscillators operate as astable multivibrators with a Schmitt trigger. We'll take the oscillator built round IC1 B to explain how it works. When power is first applied, capacitor Cl will be completely discharged and a voltage of -9 Volts will appear at the inverting input (pin 6) of IC1 B. Since the non-inverting input (pin 5) will be at a higher potential (via R1 and R2), the output (pin 7) will be at a high level (virtually equal to the supply voltage of +9 Volts). This output will now charge capacitor Cl via PI and R3, until such time that the voltage at pin 6 rises above that of pin 5. At that moment the output of the opamp switches over to -9 Volts (the negative supply voltage). This causes capacitor Cl to discharge via PI and R3, until the voltage at the inverting input falls below that of the non-inverting input, when the whole process repeats itself. The output of the oscillator is therefore a square wave. Resistor R4 and capacitor C4 smooth the sharp Amplifiers IC1 A and IC1 B (for the right and left channels) are housed in a single package, a TS922IN. The output signal of the MP3 player is fed via a stereo cable and socket K1 to the inputs of the amplifiers. The gain depends on the relationship between resistors R2 and R1 (R6 and R5 for the other channel) and is equal to ten times. When you add jumper JP1 (JP2), resistor R3 (R7) will be connected in parallel with the negative feedback resistor R1 (R6), which causes the gain to be reduced to about three. When you start using the booster you can decide which gain setting works best for you. Resistor R4 (R8) takes the amplified MP3 signal to the output socket K2 (K3). A cable then connects these phono sockets to the input of your power amplifier. The resistors connected in series with the output (R4 and R8) are there to keep the booster stable when a long cable is connected to its output. Cables have an unwelcome, parasitic capacitance. This capacitive effect could (due to phase shifts of the signal) affect the negative feedback of the booster in such a way that a positive feed back occurs, with the result that the booster oscillates and possibly damages the power amplifier! The resistors (R4 and R8) effectively isolate the output of the booster from the parasitic capacitance of the output cable. They also protect the booster outputs from short circuits. We've used a TS922IN opamp in this booster because it can operate at very low supply voltages (the maximum is only 12 V!), but can still output a reasonable current (80 mA max.). For the supply we've used rechargeable batteries (e.g. NiCd or NiMH cells) so that we don't need a mains supply. To keep the number of cells required as small as possible, we've chosen a supply voltage of 5 volt; this can be supplied by four rechargeable batteries. It is also possible to use four ordinary, non-rechargeable batteries; it's true that the supply voltage then becomes a bit higher (6 Volts), but that won't cause any harm. Since we've used a symmetrical supply for the booster (2x2 batteries), it will be easiest if you use two separate 20 i-TRIXX collection - 12/2006 edges of this square wave, which produces a more pleasing sound when it is fed into the final oscillator (IC1 A). The outputs of the other two oscillators (IC1 C and IC1 D) are also added to this modulation signal. P4 is used to adjust the level of modulation that is presented to the input of FET T1. This FET is connected in parallel with resistor R18 and determines the frequency (pitch) of oscillator IC1 A. This oscillator also produces a square wave output (on pin 1). Flowever, the output is taken from pin 2, which is a more rounded signal and therefore won't sound so harsh. This signal is first buffered by Darlington transistor T2 so that the frequency isn't affected when you connect a load to the output. The electronic musical saw can also be played by hand. In that case you should replace presets PI to P3 with slider potentiometers, which can be easily and quickly adjusted by hand. battery holders, each with two AA cells. The two holders are connected in series. Make sure that the batteries are connected the right way round; the positive of one always has to be connected to the negative of the next. This also applies to the connection between the two battery holders. SI A/B is a double pole switch, which is used to turn both halves of the battery supply on or off simultaneously. If you can't find the (dual) opamp we've used (or an equivalent), you could always use standard opamps such as the NE5532, TL082 or TL072. These do need a higher supply voltage to operate properly. In these cases you should use two 9 V batteries and replace resistor R9 with a 15 kO one. Do take care when you connect the circuit to your power amplifier because the output signal can be a lot larger and you could overload the power amplifier. (Although you're more likely to damage the loudspeakers, rather than the amplifier!) (Please note that these two 9 V batteries can't be used as a supply for the TS922IN!) The current consumption of the circuit is on average +/- 8 mA. When you use two 9 V batteries they can provide the circuit with many hours of (musical?) power. To make the construction of this circuit a lot easier we have designed a PCB layout. Since we have also included the component layout there's not much that could go wrong with the construction. You should copy the track layout at its true size (70 x 50 mm) to a sheet of transparent plastic. That is easiest if you download the PDF file supplied for this project and use Adobe Acrobat Reader to print it out. You can use this to expose, develop and etch your own PCB. Alternatively, you could take it to a local electronics shop who may be able to produce the PCB for you. ici I if^D [ [ [ ] ] ] R1 K1 A — o o Ik R3 H 4k7 H R2 Ti H 10k h JP1 R4 K2 Hioonl — ICI =TS922IN R5 hzd- R6 { 4k7 V J JP2 see text R7 In our circuit we've used a stereo jack socket for the input and phono sockets for the output because these are the most compatible with MP3 players and power amplifiers respectively. If you wanted to, you could sol- der shielded cables directly to the circuit instead, with the correct plugs on the ends. You'll never find yourself without the correct connection leads in that case! SI .A +5V © o — <► BT1 T* 1 JS 1 I BT2 I — I 100n T ■ R8 JL I T | iooq| —t£)wL ^ ■ K3 _L BT3 * BT4 R9 © ICI © s o — <► SI .B C2 lOOn D1 065107-11 ,? j w i-TRIXX collection - 12/2006 21 10 6 Luminous house number During the dark autumn and winter months in particular you'll find that ordinary house numbers are more difficult to read, especially if your home is further back from the road. If you want to avoid that your family, friends and deliverymen drive past your home, you should build this electronic version. At the same time you can show the world that you're an avid electronics hobbyist! It can easily be put together during a rainy weekend. For a change this isn't a hi-tech circuit, but instead is quite straightforward and it comes in useful too. House numbers can sometimes be difficult to read. In this article we show you how to build a luminous version that uses large 7-segment displays made by Kingbright, which have digits with a height of 57 mm. There are of course other manufactures that produce similar displays and it is not essential that you use the same displays that we've used here. You do have to keep an eye on the number of LEDs used to make up each segment (7 in total) and on the forward voltage drop when the segments are lit, so that you don't exceed the maximum current through the LEDS, but more on this later. The required segments of the display are connected to the supply via resistors. When you connect all segments you obtain the digit 8, for a 0, 6 or 9 one of the segments is disconnected and a 1 for example only needs two segments lit. In this way you can display all of the digits from 0 to 9. Each segment in the display consists of a number of LEDs connected in series (in our module this is 4). In the display used by us the anodes of the first LED in every segment are connected together, hence the term 'common anode display'. The common anode obviously has to be connected to the positive supply. The 'free' ends of the segments that have to be lit are connected via a resistor to the negative supply (ground). The current through the segments and hence their brightness is dependent on the value of the resistors. For the power supply we can use a doorbell transformer, which is often already present and which generally supplies 8 Volts AC. The alternating voltage of the doorbell transformer is rectified so that the peak current through the LEDs doesn't exceed their limits. The rectifier circuit consists of a standard bridge rectifier followed by a smoothing capacitor. These can supply the right voltage for a one or two-digit house number. For house numbers of three digits or more you will have to experiment with the resistors to find what values give the correct current through the segments. But for house numbers like 88, 80 or 90 (many segments will be lit) this also applies. For every extra segment that is lit the current consumption increases, which causes the supply voltage to drop by an amount dependent on the quality of the doorbell transformer. It is therefore difficult to give an exact figure for the value of the current limiting resistors in the circuit; the 47 Cl mentioned here should be taken as a guideline to give a current of about 22 mA (which is a safe value for the type of display we used) when an 8 Volt doorbell transformer is used. If you want to be sure that you're not exceeding the current limit you should place an ammeter in series with the supply and divide the measured current by the number of segments that are lit. If the result is greater than 22 mA you should increase the values of the resistors, and reduce their value if the result is less than 22 mA. To determine what current flows through a segment you could of course measure the voltage across the resistor connected to it and use Ohm's law to calculate the current. For the installation it's best to split the circuit into two parts: the bridge rectifier (B1) and the smoothing capacitor (Cl) near the transformer and the display and resistors in a weather proof box next to the front door. When your house number consists of two digits you should build two display modules (shown in the circuit diagram inside the dotted lines). The display section should be connected to the power supply section using a twin-cored cable such as loudspeaker cable. Try to use a cable with reasonably thick cores, especially if a lot of segments are lit. For '88' the current requirement is 0.3 A! The house number also has to be legible in strong sunlight. To achieve a better contrast you can place a piece of transparent plastic (with the same colour as the LEDs) in front of the display, or you could stick transparent tape over the segments (using the right colour). In the latter case you should only cover the active segments so that you can still see the number without an applied voltage. The table below shows you which resistors need to be soldered to produce each digit: 0 R1,R2,R3,R4,R5,R6 1 R2,R3 2 R1,R2,R4,R5,R7 3 R1,R2,R3,R4,R7 4 R2,R3,R6,R7 5 R1,R3,R4,R6,R7 6 R1,R3,R4,R5,R6,R7 7 R1,R2,R3 8 R1,R2,R3,R4,R5,R6,R7 9 R1,R2,R3,R4,R6,R7 22 i-TRIXX collection - 12/2006 Applause generator No, the performance of our national team during the 2006 World Cup Soccer Tournament did not deserve any applause. Better occasions come to mind where a resounding applause is much more appropriate. And to prevent injury to your hands when this occasion does present itself, we developed an electronic applause generator. In this way you can avoid being the only one applauding in a busy hall and prevent both yourself as well as the receiver from feeling uncomfortable. Applause from a large crowd sounds very similar to noise. Noise is therefore also the source signal in this circuit. A proven method for the generation of noise is to 'zener' the base-emitter junction of a transistor. That is what T1 and R1 are for. The base-emitter junc- tion is wired as a diode in the reverse biased direction and connected via R1 to the power supply voltage of 9 volts. Because of this relatively high voltage, the base-emitter diode will break down, but the high resi- stance value of R1 prevents the junction from failing because of excessive current. The voltage across the base-emitter diode is relatively constant; this diode acts like a zener diode. The noise that is produced is very small however and is considerably amplified by opamp IC1 first, before any further processing. The opamp is set to half the supply voltage by R2 and R3. The noise signal is applied to the input of the opamp via Cl. This capacitor ensures the separation of the high DC voltage (the 'zener voltage') at the emitter of T1 and the half-power-supply-voltage at pin 3 of the opamp. In our prototype this zener voltage amounted to 8.3 V. It can happen that this voltage is greater than 9 V. In that case you will have to either increase the power supply voltage or pick another transistor for T1 that has a lower zener voltage. This is just a case of swapping the transistor and repeating the measure- ment. Because of the presence of C2 and C3, the opamp am- plifies mostly the low-frequency part of the noise. This results in the best approximation of real applause. The transistor stage that follows provides the clapping sound. The noise is presented to the base of T2 via C5. C6 is charged slowly via R5 after the power supply is switched on and this causes T2, via R6, to progressively conduct more and more. As a result the noise signal at the collector of T2 will grow to a maximum. The emitter voltage is set by R7 and R8 to half of the power supply voltage. T2 comes out of conduction for part of the time because of the size of the noise signal. There is therefore a switching effect with the noise that gives a strong impression of applause. The signal is available at the output via C7. If you object to the lower frequencies then you can pick a smaller value for C7. D1 ensures that C6 is discharged quickly when the circuit is switched off so that when it is switched back on again the same delay and growth of applause results. If you like experimenting, you can change the values of C2, C3 and R4 or choose a different opamp and try to make the sound even more realistic. If you would also like the applause to decay slowly, you can connect R5 alternately to the positive and negative of the power supply, for example with the aid of a change-over switch (D1 is omitted in this case). A smaller value of C6 accelerates the effect. The current consumption of the circuit is only 4 mA; a 9-V battery is therefore eminently suitable as the power supply. If you plan to put the circuit in a box then do not forget the on/off switch. Once you've got the circuit to work, the first applause is naturally for yourself! R1 BT1 ! 9V R2 Cl II lOOn 47(x DOn 25 V D1 z 1N4148 C5 II 470n TL081 R5 R7 R6 T- R9 T2 C7 i c 10ja 63V BC547B ♦ i-TRIXX collection - 12/2006 23 TWO-CHANNEL US »»sok aa/vx; IMSTRUMFfNlTS The PCSU1 000 digital storage oscilloscope uses the power of your PC to visualize electrical signals. High sensitive resolution, down to 0.1 5mV. Contents: 1 multimeter, 1 power supply & 1 soldering iron This unit covers 99% of your home lab needs. Perfect solution for starters or schools. 1/00 World’s most portable oscilloscope in Complete kit, just add wood. Kit includes: amplifier and filter circuit, two 1 6cm woofers, alu rear panel, bass-reflex tube, small hardware and assembly instructions for both amp circuit and enclosure. 8-channel RF remote control set. Latching or momentary mode for each output vivnis SCOW POWER AMPLIFIER MODULE Excellent value for money. Fully discrete design. Overload and short-circuit protection. I IQ Pj, UJO® universal I/O card with USB™ interface. Safe, optically isolated communication between all the I/O’s and your PC. Bright, red, jumbo-sized 7-segment displays (57mm), Complete with snap-in enclosure. Multiple units can be linked in an easy way to create larger readouts for e.g. score-keeping, timing, counting, ... Easy platform-independent control via RS232 three-wire interface. Sold per pair. .. _ _ Buzzer output: fast / slow / continuous. Distance indication with 3-LED-bar. Adjustable alarm distance. LED alarm indicator. Dry contact NO/NC relay. Applications: robot projects, object detection, distance measuring, parking aid, security systems. MK17Q RIDING SANTA ALL THESE KITS HAVE LED ANIMATIONS MK117 MK11B Suggested retail prices VAT included JgOlVlHZ DON'T LOSE YOUR TEMPER Before phoning us - if you are looking for a hard-to-find part. We have over 20,000 items in stock - including obsolete and up-to-date parts. WHY NOT VISIT OUR WEBSITE www.cricklewoodelectronics.com 2N 2SA 2SB 2SC 2SD 2P 2SJ 2SK 3N 3SK 4N 6N 17 40 AD ADC AN AM AY BA BC BD BDT BDV BDW BDX BF BFR BFS BFT BFX BFY BLY BLX BS BR BRX BRY BS BSS BSV BSW BSX BT BTABTB BRWBU BUK BUT BUV BUW BUX BUY BUZ CA CD CX CXA DAC DG DM DS DTA DTC GL GM HA HCF HD HEF ICL ICM IRF J KA KIAL LA LB LC LD LF LM M M5M MA MAB MAX MB MC MDAJ MJE MJF MM MN MPS MPSA MPSH MPSU MRF NJM NE OM OP PA PAL PIC PN RC S SAA SAB SAD SAJ SAS SDA SG SI SL SN SO STA STK STR STRD STRM STRS SV1 T TA TAA TAG TBA TC TCA TDA TDB TEA TIC TIP TIPL TEA TL TLC TMP TMS TPU U UA UAA UC UDN ULN UM UPA UPC UPD VN X XR Z ZN ZTX + many others We accept Mail, telephone & email orders. Callers welcome. Opening hours Mon-Sat 9:30-6:00 Connect Cricklewood Electronics Ltd 40-42 Cricklewood Broadway London NW2 3ET Tel: 020 8452 0161 Fax: 020 8208 1441 sales @ cricklewoodelectronics.com ByVac Electronics Control hardware using simple text commends | L&nu-g |\w loeci LCD-cfriWarT-. jVvibQuv Hj dpW oonwiuis n^TTr- fawrjocft IE D toITh rf-iptas AF v-m. by w«t c-^nr-e-z^'xi Tr lh m Jirl'. 1 liTilil WKIW Cm- -v« sk* I>imi itps ConfifrCt A PC F.5T37 or iur [iAflr PuFchaie Options,; Dfrlioe it www.bf vac .co.uk ■■ Telephone 73^ 34fi . email * Cheque or P^taL Order to: ftyVas , PQ BOX 4049, Pttfllittns, SHEFFIELD, S3* 6WP Post and packing UK £ 1,50 Wotid Wide £ 3,50 Vh ■■■' ■ Pi j^ByVch ol Number One Systems far Windows The World Beating PCB design software JEasy-PC version 10 sets another milestone Winning accolades the world ovenEasy-FC hr Windows VIO is another major milestone in the evolution of this extremely popular software tool. Try a demonstration copy of Easy -PC and prepare io be amazed at the power versatility and remarkable va*ue for money. 1 -r ■ — — | !■ ” " 1 y i : | | l. 1, h ■ J. A I J \ , L J Version 10 features ■ Intelligent Gerber Import uptioo ■ Track/Shape "Hug 1 Mode Routing I Test C ill louts ■ LayarA Via Stack Prevkwt ■ Blind &■ Burled Via Support B Tea rd rop Pa ds ■ Draw Spacing Clearance* ■ Spiral Tracks & Shapes Plus many more exciting; Features Fully integrated Schematics & PCB layout in a single application complete with forward and back annotation. Design and rules checks t all stages ensure integrity at ail times. Professional manufacturing outputs allow you to finish the design process with ease. Stop press... Stop press... Stop press„. Stop press. Easy* PC imports Eagle files as well as Tsien Boardmaker 2 files till for 3 brochure, pcices & CD on *44 (0)1634 77.36*2 or E-mail tjleL@nwmb-fl rone. com you ca-n also download a dtmo froni www.numberone.corn Oak Lnue. Eredon Tewte^Dury. GIde. Gl_ 2 fl 7LR United Kingdom && i b 12/2006 - elektor electronics 69 KNOW-HOW RF Increased range the easy way Stefan Tauschek and Thomas Scherer The domestic use of WLANs has grown rapidly as DSL routers with built-in wireless Ethernet have become available, and now it is easy to use a notebook PC to surf the Internet wirelessly from the comfort of one's sofa. However, things get trickier if a reinforced concrete wall stands in the way, or if a neighbour happens to be using the same frequency... The enormous popularity of WLANs (wireless local area networks) is easy to understand: not everyone has their desk situated next to a telephone sock- et. Even in the case of desktop PCs it is now easier to provide a fast Inter- net connection via the ether rather than by installing fixed cables. Unfor- tunately, things do not always go per- fectly smoothly in practice: sometimes it can be difficult to set up a reliable connection between two devices even just a short distance apart in the same building. The problems and their causes The frequency used for WLAN commu- nications according to IEEE 802.11b or 802. llg is around 2.4 GHz. At this fre- quency radio waves propagate qua- si-optically and are considerably at- tenuated by moisture in walls. Rein- forced concrete and limestone block the waves to an even greater extent because of their high metal content. A further limitation is that in Europe transmit power in this band is limited to 100 mW. Often also corners are cut in the in- terests of cost reductions. A WLAN router with a price tag of a few tens of pounds will make a few compromises in performance: a typical device will have inside a mini-PCI WLAN card, just as a laptop might. Such cards of- ten only output around 50 mW rather than 100 mW, and poor matching to the antenna often accounts for a few more dB of loss. The overall effective transmit power might only be around 10 mW or 20 mW. A straightforward way to recoup some of this loss is to use a special antenna that offers gain. And that is what this article is about: how to build a DIY di- rectional WLAN antenna which focus- es the available transmit power in the desired direction, providing a gain of several dB over a conventional omni- directional antenna. Furthermore, a di- rectional antenna does not just provide gain in the transmit path; signals re- ceived from sources within the anten- na’s beam are amplified by the same factor. Since the WLAN connection is bidirectional, this means that a direc- tional antenna can give us a considera- ble increase in range without the need for complex RF electronics. The solutions When faced with a poorly-perform- ing WLAN, it is wise to pause before reaching for the soldering iron. A cou- ple of aspects should be considered before deciding to make or buy a di- rectional antenna. First it is worth noting that the best Ethernet connection is a wired one. A wired connection is both faster and more reliable. If this is not an option for any reason, or if (because connection is to be made to a notebook) it is not convenient, then there are a few things one can do to improve the performance of a wireless network. The first step is to try mov- ing the router a few feet closer to the computer. Another option is to splash out a few tens of pounds on a repeat- er, which can add five to ten metres of range within a building. Even bet- ter is to deactivate the WLAN part of the router and, for a similar sum, pur- chase an access point (see Figure 1). This is a box of electronics which takes an Ethernet connection on one side and provides a WLAN connection on the other. The device can be connect- ed to the router using an Ethernet ca- ble. Because the device is dedicated to the one function, we might reason- ably hope that it would provide better RF performance. A more significant advantage is that multifunction de- vices that combine a DSL modem with WLAN router and switch functions do not normally have a usable RF connec- tor, and so it is hard to connect an ex- ternal antenna. The small stub anten- na usually provided is connected by a fixed wire to a sub-miniature connec- tor on the internal WLAN card. This connector is not designed for repeated 70 elektor electronics - 12/2006 length X/4. At 2.44 GHz, this is a quarter of 300xl0 6 / 2.44xl0 9 metres, or slightly more than 3 cm. At the other end of the spectrum from this simple antenna is the parabolic re- flector, which can have a diameter of several metres. This can offer a gain of up to 60 dB over the simple quar- ter-wavelength monopole. European regulations only allow such antennas to be fed at a very low power. Experi- ments in the USA with specially-con- structed (and expensive) antennas of this type have achieved ranges of up to 200 km. plugging and un- plugging and is unmanageably tiny. Access points, however, are avail- able with common-or-garden SMA con- nectors (see Figure 2), making it easy to connect an external purchased or home-made directional antenna. One further piece of advice: it is pref- erable to use a longer Ethernet cable rather than a longer antenna cable. It is easy to achieve data transfer rates of 100 Mbit/s over 50 m or more of CAT5 cable; but the losses in 50 m of antenna cable could easily cancel out the ben- efits of a directional antenna. Figure 1. SMA connector on the rear panel of an access point. A Antenna types In the following discussion we shall not consider WLAN routers that em- ploy several antennas and MIMO (mul- tiple input multiple output) technology. Commercially-available access points (such as the one shown in Figure 1) are usually fitted with a so-called quarter- wavelength stub antenna, or monopo- le (see Figure 3). Sometimes the stub can be entirely inside the enclosure (as long as it is made of plastic). The an- tenna consists of a piece of wire with A wide range of directional antenna designs between these two extremes have been tried for WLAN applica- tions. Two designs have proved most successful, offering good gain and sim- ple construction. The first type takes the form of a waveguide and goes by the catchy name of ‘cantenna’ (see left-hand half of Figure 4). The second type consists of specially-arranged diamond-shaped sections in front of a reflector, and is called a ‘biquad’ (see right-hand half of Figure 4). The lat- Figure 2. A typical access point: sometimes these are used to help reduce the length of antenna cable needed. 12/2006 - elektor electronics 71 KNOW-HOW RF Figure 3. Quarter-wavelength stub antenna suitable for a WLAN router or access point. Figure 4. Prototype cantenna and biquad antenna constructed in the Elektor Electronics laboratory. Figure 5. Construction drawing for the cantenna. Figure 6. Three-dimensional model of the cantenna plotted by 4NEC2. ter type can in theory offer a gain of around 12 dB (although as we shall see later, practice can deviate from theo- ry!), somewhat more than the 10 dB that the cantenna can provide. Both types give considerable improvements over typical integrated antennas, and we shall now go on to look at them both in more detail. The cantenna As mentioned above, the cantenna operates as a kind of waveguide. The theory of such antennas is far from triv- ial; those interested can find a good in- troduction at [1]. As can be seen from Figure 4 and the drawing in Figure 5, the antenna consists of a can of certain specified dimensions and a carefully- arranged feed. There is a wide range of guides avail- able to constructing cantennas of vari- ous dimensions [2]. The following sug- gestions have the advantage that they have been tested by simulation, carried out by Stefan Tauschek using a soft- ware package called 4NEC2, available for free download from [3]. The program is based on the so-called boundary ele- ment method [4]: the idea is to convert Maxwell’s equations into a system of linear algebraic equations, which are then stepwise integrated to calculate the current distribution in the antenna. The ‘NEC’ in the program name stands for ‘numerical electromagnetic code’. Although their derivation is complicat- ed, the results themselves are simple: Figure 6 shows the three-dimensional model of the Cantenna in 4NEC2 and Figure 7 the calculated radiation pat- tern. The directional nature of the an- tenna is clear. To make an accurate cantenna the can must be exactly one wavelength long. At 2.44 GHz this is very nearly 123 mm. The internal diameter is approximately 100 mm, slightly more than 4/5 A. The feed stub, shown as a radiator, should be approximately A/5, or 25 mm, long. Ideally this is a wedge-shaped or tapered piece of metal, with the thicker end pointing to the middle of the can. The distance from the base of the can, the ‘radiator offset’, is the rather odd multiple of 7/32 times the wavelength, or 27 mm. It is difficult to find ready-made cans with these dimensions. A reasonably accurate version can be made by hand from copper sheet as shown in Fig- In the Elektor l When we had constructed prototypes in our laboratory we naturally wanted to test them immediately. The test equip- ment comprised an ordinary laptop and a PC as the fixed station to which the various antennas were connected. The walls of the laboratory building are built using a type of brick that absorbs RF of this frequency very well. The layout of the building is a chain of rooms in a slightly staggered arrangement. There are many PCs and other electronic devices in the laboratory and in the editorial offices, producing a high level of electromagnetic interference. We tested the ranges of four antennas: an ordinary A/4 stub, the biquad, the cantenna, and a commercial model (the HA- 014SD from Hawk- ing Technology: see Figure 12) costing around fifty pounds, with a quoted gain of at least 1 4 dB. In each case the anten- na was connected to the WLAN card in the ure 4; deviations of up to 10 % from the nominal dimensions should be tolera- ble for ordinary use. Of course, there is plenty of scope for experimentation. The trickiest part of construction is connecting to the radiator. We can start from a commercially-available N- type RF connector. Figure 8 shows an example of this type of connector with a radiator (sometimes called ‘exciter’) soldered to it. A suitable hole must be made in the can to fit the connector. Washers should be used when fitting the connector to avoid damage to the can. The antenna is now ready for use. If it is to be used outside it is worth considering waterproofing the connec- tion to the radiator. Adaptor cables from N-type connec- tors to SMA connectors or other types are available ready made; alternatively, it is easy, as well as cheaper, to make up a suitable cable oneself. As noted above, the antenna cable should be no Web links [1] Waveguide theory: http://en.wikipedia.org/wiki/Waveguide %28electromagnetism%29 [2] Various antenna designs: http://qdg.sorbs.net/qdgant.htm 72 elektor electronics - 12/2006 Electronics lab PC using an RF cable three metres long. We achieved the following results: 1 ) Stub: 1 0 m 2) HAOl 4SD: 20 m 3) Biquad: 21 m 4) Cantenna: 26 m Here again the cantenna comes out on top. The performance of the commercial anten- na teaches us two things: first, one should not always believe in a manufacturer's sometimes rather optimistic gain figures (the antenna is deliver- ing an estimated gain of around 6 dB rather than 14 dB); and sec- ond, the DIY approach often pays off! Figure 12. The commercial directional WLAN antenna used for comparison tests. longer than necessary in order to get the most benefit from the gain of the antenna. Biquad An alternative design of antenna, which is also easy to construct, is the biquad. This takes the form of an an- gular figure-of-eight pattern of wire in front of and parallel to a reflector surface. The design has proved very popular on the Internet, where there are countless construction guides, no doubt because of its good theoretical performance and ‘high-tech’ appear- ance. The design described here has the advantage, shared with the can- tenna above, that it has been simulat- ed and optimised by computer. In essence the biquad is a folded multi- ple X/4 dipole. As Figure 9 shows, the resulting shape resembles a figure-of- eight. Each edge of the two squares [3] 4NEC2 software: http://home.ict.nl/~arivoors [4] Boundary element method: http://en. wikipedia. org/wiki/Boundary_element_method [5] Download page for NetStumbler: http://www.netstumbler.com/downloads is V4 = 30.5 mm long. A suitable ma- terial is 1 mm copper wire. The feed connection is made between the point where the two squares meet and the open ends, which are connected to ground (the feed cable screen). Fig- ure 10 clearly shows the current dis- tribution due to the individual anten- na elements. Current nodes and antin- odes can be seen at the corners of the square: the antenna is in resonance. The figure-of-eight should be mount- ed approximately 15 mm to 17 mm in front of the reflector. Practical experi- ments have shown that it is possible to achieve an excellent SWR (standing- wave ratio) of 1:1.15. It is recommended that the side of the reflector should be equal to one wave- length. In other words, the ideal re- flector is a conducting square of metal measuring 123 mm on each side. Vari- ous materials are suitable: in the pro- totype we found copper-clad printed circuit board satisfactory. A reflector could also be made from a CD (the metallised part has diameter approxi- mately 118 mm). The dimensions of the multi-dipole are unfortunately rather critical. As shown in Figure 4, a suitable piece of copper pipe can be used to fix the biquad figure-of-eight. The pipe is sol- dered to the reflector and the RF co- axial cable passed through the pipe as the feed. The central conductor of the cable is then directly soldered to the middle of the figure-of-eight. Alterna- tively, an N-type connector can be used as with the cantenna, the correct dis- tance to the reflector being achieved using two pieces of copper wire of suit- able length. The figure at the beginning of the arti- cle shows the radiation pattern of a bi- quad antenna whose reflector is fitted with two plates, 30 mm high, on oppo- site sides to attenuate the rearwards- pointing lobes. Using this construction a gain of between 10 dB and 12 dB can be achieved. There are reports of lap- tops equipped with biquad antennas connecting to an access point (also with a specially-constructed antenna) 10 km away. Miscellanea Tall tales of spectacular results ob- tained by avid WLAN hunters abound, but it is true to say that there can be enormous differences in practically- achievable range depending on the local townscape or countryside, on Figure 7. Radiation pattern of the cantenna calculated using 4NEC2. Figure 8. N-type connector with a tapered radiator made from copper sheet soldered to it. Figure 9. Construction drawing for the figure-of-eight biquad antenna. Figure 10. Current distribution for the biquad antenna calculated using 4NEC2. 12/2006 - elektor electronics 73 KNOW-HOW RF Antennas in practice The most detailed calculations and highest technical specifications count for nothing if good results are not achieved in practice. We therefore decided to take the antennas we built in the Elektor Elec- tronics laboratory according to the designs calculated by Stefan Tauschek for a practical test. The most stringent test involved installing the various antennas at the home of Thomas Scherer in Frankfurt city centre and then using an ordinary Centrino laptop running NetStum- bler to measure the signal strength in the street outside and deter- mine over what range a connection could be achieved. ■ hud- LUC*!- 1mm | Enu fan* O htac-Ai l UA PP 12 rm 0 t UMhp: Jp at ■Ifi 449 IB > WHi kr-H L«: 14 Am— A P WlP a 1® S u MP WtP u to ■100 50 yjli MK WlAJH VI HH*i PP ! ^P JZ -i® E #im» i^rccjdi i i iP wtv' -H tot 10 ■U OH n EH** pp UrtP El ,1® IE '>> Cftn .UrfaMpKM i i MP ■rftf too H in wiah VI tp WEP a •1® » IW nJ’ii 13 Hi*** MP WP n ■tot St i > Figure 11. List of WLANs found by NetStumbler. The screendump in Figure 7 7 was taken immediately outside the building. It shows that in this are there are many WLANs competing for the airwaves. The strongest signal, with SSID 7 If PP Test Kanal 1 ', is being produced by the access point shown in Figure 2 set up for this test. Table 1. Typical antenna ranges in the city centre. Antenna type Distance Stub Biquad Cantenna 20 m -84 dB -80 dB -72 dB 30 m — -85 dB -80 dB 40 m — — -86 dB The building is a five-storey reinforced concrete structure built in the 1 980s. The walls screen radio signals so effectively that radio and digital television reception is difficult, even though the transmitter is only 4 km away. The WLAN router is situated in a hallway on the third floor, surrounded by walls. Even just 5 m away, on the floor above, signal quality has dropped from 'excellent' to merely 'good'. Inside the building only four of the 21 WLANs shown in Figure 1 1 can be received. The building thus makes an excellent test location.. Table 1 shows how far the radio waves propagate along the street outside the building, after attenuation by one wall. The directional an- tennas were, of course, correctly aligned for the test. The first surprise is that the biquad is clearly outperformed by the cantenna. The rea- son for this disagreement with the theoretical results was not found: cable connections and the like were thoroughly checked. In the city (and with one wall interposed between transmitter and receiver) the cantenna offers approximately double the range of the ordinary stub antenna. The performance of the biquad antenna sits between the two: we eagerly await the comments of our expert readership in the Elektor Electronics online forum! To see what a directional antenna is capable of, we need to get away from the electromagnetic smog of the city. To this end we moved the test setup to a house on the outskirts of a small village. The antenna, connected to an access point, was arranged to transmit from the (open) front door of the house over the fields beyond. The measure- ments therefore give the line-of-sight performance of the antennas. Besides the test WLAN, NetStumbler found two other WLANs in ran- ge, but both were at least six channels away from the test frequency. Table 2. Ranges achieved in open countryside. Antenna type Distance Stub Biquad Cantenna 40m 22 Mbit 48 Mbit 54 Mbit 60m — 1 1 Mbit 54 Mbit 120m — — 5,5 Mbit Table 2 shows that line-of-sight communication is possible over con- siderably greater distances than in the city. We have shown the com- munication rates achieved, as this is the most practically useful figure. Communication over 1 20 m using a tin can is not a bad achieve- ment, we think! The tripling of range achieved using the cantenna, compared to the stub antenna, is in line with the theoretical gain figure of 1 0 dB. If both access point and laptop are equipped with directional an- tennas, ranges under these conditions of over 200 m can easily be obtained. In this case the laptop must be used in conjunction with an external WLAN adapter (either a PCMCIA card or connected via USB) which has an RF connector, although this arrangement does make the laptop rather unwieldy! house layout and construction mate- rial, and even on the neighbours! For example, in Frankfurt city centre where Thomas Scherer carried out his anten- na field tests there is practically no point where a laptop cannot pick up signals from at least 15 WLANs, and the same would go for any other ma- jor European city. To this we can add interference from microwave ovens, mobile telephones and other transmit- ters, all in or near the frequency band we are interested in. Things are quiet- er (as yet) in the 5 GHz band used by IEEE 802.11a WLANs. It is also worth noting that the channels available in Europe, numbered from 1 to 13 in the IEEE 802.11b and 802. llg standards, provide for only three non-overlapping channels. A powerful WLAN run by a neighbour can interfere with between three and six channels on either side. If problems with signal quality are en- countered, the first thing to check is what transmitters are active in the neighbourhood. The NetStumbler pro- gram [5], a favourite of ‘wardrivers’ (people who drive around looking for WLANs using a laptop) is helpful here. It scans the radio frequencies in a con- figurable fashion and shows informa- tion about the various networks avail- able, including their SSIDs and signal strengths. Depending on the WLAN hardware, the results might not always be perfectly accurate, but the relative values do usually give a good overview of the situation. ( 060056 - 1 ) 74 elektor electronics - 12/2006 In all mains-operated equipment certain important safety requirements must be met. The relevant standard for most sound equipment is Safety of Informa- tion Technology Equipment, including Electrical Business Equipment (Euro- pean Harmonized British Standard BS EN 60950:1992). Electrical safety under this standard relates to protection from • a hazardous voltage, that is, a volt- age greater than 42.4 V peak or 60 V d.c.; • 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 VA or more at a potential of 2 V or more; • a single insulation fault which would cause a conductive part to become hazardous; • the source of a hazardous voltage or energy level from primary power; • secondary power (derived from internal circuitry which is supplied and isolated from any power source, including d.c.) Protection against electric shock is achieved by two classes of equipment. Class I equipment uses basic insu- lation ; its conductive parts, which may become hazardous if this insulation fails, must be connected to 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 II insulated transformer is preferred, but note that when this is fitted in a Class I 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 Class I 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 holder and on/off switch. If this is not avail- able, use a strain relief (Figure, note 2) on the mains cable at the point of entry. In this case, the mains fuse should be placed after the double-pole on/off switch unless it is a Touchproof® 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 double- pole type (to switch the phase and neu- tral conductors of a single-phase mains supply). In 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 ELECTRICAL SAFETY INFO & MARKET 1. Use a mains cable with moulded-on plug. 2. Use a strain relief on the mains cable. 3. Affix a label at the outside of the enclosure near the mains entry stating the eguipment type, the mains voltage or voltage range, the freguency or fre- guency 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 place. 6. Use insulating sleeves for extra protection. 7. The distance between transformer terminals and core and other parts must be >6 mm. 8. Use the correct type, size and current-carrying capacity of cables and wires - see shaded table below. 9. A printed-circuit board like all other parts should be well secured. All joints and connections should be well made and soldered neatly so that they are mechanically and electrically sound. Never solder mains-carrying wires directly to the board: use solder tags. The use of crimp-on tags is also good practice. 10. Even when a Class II transformer is used, 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 eguipment. The primary-to-secondary isolation of the transformer does not and can not perform this function. 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. All 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 the 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/yellow wire (green with a narrow yellow stripe - do not use yellow wire with a green stripe). The earth wire must not be daisy- chained from one part 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 close as pos- sible to the mains connector or mains cable entry. This ensures that 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- ters: 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, elec- trolytic capacitors and other important components. Do not use dubious or flammable materials that emit poisonous gases. Shorten screws that come too close to other components. Keep mains-carrying parts and wires well away from ventilation holes, so that an intruding screwdriver or inward falling metal 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 (and safe) to fit a residual current device (RCD)*, rated at not more than 30 mA to the mains system (sometimes it is possible to fit this inside the mains outlet box or multiple socket). * Sometimes called residual current breaker - RCB - or residual circuit cur- rent breaker -RCCB. 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 loss or damage, direct or consequential, caused by errors or omissions in these guidelines, whether such errors or omissions result from negligence, accident or any other cause. 3-core mains cable to BS6500 1990 with three stranded conductors in thick PVC sheath Max current 3 A 6 A 13 A conductor size 16/0.2 mm 24/0.2 mm 40/0.2 mm Norn cond area 0.5 mm 2 0.75 mm 2 1.25 mm 2 overall cable dia. 5.6 mm 6.9 mm 7.5 mm Insulated hook-up wire to DEF61-12 Max current 1.4 A 3 A 6 A Max working voltage 1000 V rms 1000 V rms 1000 V rms PVC sheath thickness 0.3 mm 0.3 mm 0.45 mm conductor size 7/0.2 mm 16/0.2 mm 24/0.2 mm Norn cond area 0.22 mm 2 0.5 mm 2 0.95 mm 2 overall wire dia 1.2 mm 1.6 mm 2.05 mm 3-flat-pin mains plug to BS 1363A 12/2006 - elektor electronics 75 KNOW-HOW WLAN Where am I - and W Dennis Vredeveld Wireless LAN (WLAN) has become incredibly popular in the last few years. Wireless internet has now become very common in a corporate environment as well as in public spaces and in our homes. But what not many people know, is that WLAN can also be put to excellent use for other applications, such as, for example, determining the position of devices on the wireless network. How this works you can read in this article. Position determination technology is the basis for the now universally known GPS (Global Positioning System). GPS operates relatively accurately in the city and motorways, but is not suitable for use inside buildings. The reason is that the reception of the GPS signals from the satellites are too weak inside buildings so that there is very little left of the original accuracy. An indoor equivalent of the GPS system is currently not available and there is not even the slightest sign of a possible standard. As a result we have to resort to other systems, which, even though they were not developed for this purpose, still provide surprisingly good results in practice. Such as, for example, position determination using WLAN! WLAN - how does it work? Devices with WLAN functionality generally have an in- tegrated WLAN card. This card maintains the connec- tion with the base station, the so-called Access Point (AP). 76 elektor electronics - 12/2006 Wireless transfer of data can take place once a successful connection has been established. Because the quality of the connection can diminish - or even disappear com- pletely - when the user moves, the card scans at regular intervals for other Access Points that may be within range. Based on different algorithms that are implemented by the manufacturer in the driver for the card, the card can decide to establish a connection with another AP and terminate the old connection. This is called a 'hando- ver'. Which access point becomes the new connection depends on the signal strengths of the various APs. The signal strength is determined by the card based on data packets that are sent by the AP specifically for this pur- pose. The packets are called beacons and are transmit- ted by the AP at regular intervals (about 1 0 times per second). These beacons contain the unique MAC-address of the AP, as well as the name of the wireless network, the so-called SSID. Should the signal strength of the AP that the card is currently connected to become too weak then the card starts to search for better alternatives. This is only valid of course if we have the use of a network with multi- ple APs (refer to the example in Figure 1). Figure 1. This signal strength information is normally hidden from us by Windows. Relationship signal strength-position The method described here implies that there is a relation- ship between the position of the user (or more accurately: of the WLAN card in the device that the user is carrying) and the measured signal strength of the beacons that are received from different APs. This relationship can also be used to locate the user within the WLAN network. In prin- ciple two different methods can be thought of to achieve this: dows-API for communicating with network cards. In this way it is possible to obtain the necessary information from the WLAN-driver in a pre-defined manner, irre- spective of the manufacturer. More information can be found at [1 ] and [2]. Performing the calibration Before our positioning system can be used, we must first carry out the calibration. This consists of recording the 1 . Simulation: We try to calculate the expected signal strength at each position in advance based on a model. Afterwards we compare the measured values and try to find out where the user is based on the results from the model. 2. Calibration: Instead of calculating the expected signal strength for each location, the signal strength is measured at different, predetermined locations. This information is stored and used as data for comparison for subsequent measurements when the user is in an unknown location. Various tests have shown that the first method is not only significantly more complicated, but is also less accurate than the second. The reason for this is that the signal propagation in an indoor environment is so very complex that even very extensive models cannot take all existing factors into account. Reading Signal strengths The question now arises how we are going to obtain these seemingly very important signal strengths. Win- dows, after all, hides this information from us in the first instance by translating the received signal strengths into less accurate terms such as 'very strong' or 'weak'. The answer to this? NDIS! NDIS is a standard Win- Figure 2. Visualisation of the signal strength of an AR based on a simulation. Red means large signal strength, blue means weak signal strength. 12/2006 - elektor electronics 77 KNOW-HOW WLAN signal strengths of all access points at different locations, scattered over the space that is covered by the LAN net- work. More points increase the accuracy, until the points are less than one meter apart. At every calibration loca- tion we measure the received signal strength in four differ- ent directions for a few seconds for all APs. This informa- tion is stored in a database. The different orientations are important because the human body has a measurable influence in the received signal strength. There is therefore a difference if we are facing the AP or if we are between the AP and the WLAN device. Where am I? Once this calibration has been completed, the actual po- sition determination can begin. By measuring the signal strengths of all APs at regular intervals and comparing these with the calibrated locations, the most likely position can be calculated. Because we will not usually be at a calibration location, a weighted average is taken from the calibration positions that correspond best with the signal strength profile. With additional mathematical tricks (such as calculating a running average of the recent locations) the accuracy of the system can be further improved. In this way we are able to achieve a resolution down to a few meters; suf- ficient to determine in which room or in which corner of a hall the user is located. The smarter the algorithm, the better the position can be determined. The development of a real clever algorithm The author Dennis Vredeveld (vredeveld@imst.de) is a software-ar- chitect at IMST GmbH in Kamp-Lintfort, Germany, where, among other things, work is being done on a software- framework for several indoor position determination tech- nologies, including WLAN. More information can be found at www.imst.com and www.centrum21.de under the heading 'ipos'. for determining the position is certainly no sinecure - we are curious for your solution. If you have developed a good method for this, then be sure to let us know! (060269) Illustrations : IMST GmbH Web links [1] www.ndis.com [2] http://msdn. microsoft. com/library/default. asp? url=/library/ en-us/wceddl<40/html/cxconNDISDriverArchitecture.asp Advertisement ■ FREE download Graphic Calculator V9.2 with Electronics, Mechanics and Maths Toolbox, | l .iH-a)' p m i., *!l ii LiIdi VV.J l- i r •m, j r* 1 H“ ? £ Pvn ■ ■■ (H ; I .1 1 |j / r'l 1 • lilt "LU llljj *1 + 1 L ) ’.1 “ V | - j h , * J •! 1 n j ■ | j ! | r | Ajjil j jw| r» | r-ri | rn J m ) Utf j Mir | 1 flrtfl | Six* ' H >H | l.-i 1 | I _1 H 1 | / 1 i | | 1 | 1 [ e* 3 1 *.! r a ‘Sf XJ f ■ i ■* i f .< wh rf.'url*! b , tn b r 1 ► — r* j 1 P«llf 1 includes Technology. Hobbies and Education Store 1 software r> + i | i j a ™ Linn j dlt buzificzi Id tfnmwfids oJ r?nv principles vy.t ^ ^i« 0^^/ EFflf -Mrs sofrtfflpe JtfflwMrsr SaatfJESSSr*' Home Study Pack PjrJLrccipAcs t'S.JJ Dur iop JCi’JiYap pjctfiigc for campiiluig. JCT, pt?ystcs. CiJTi ffoctfQn iefr •TfCftfepr, Jtnctafifef, pSG*. mortal rMitosnyr, jimotoui rtMflte, mow rtfcrife 1 GCSE. A-L*¥*t, HNC HMD trttd D*Qf**. Ckiwr-Jead dim' t.n a k>u li’idi. J-Sf i ti jr, sryu pj^ /it ja .i-l'. - i 5^ mi xiKid if. 1 _ nTVrt; kmtr>S [/c£e hKwfl. Lif-C- COm 3D***" Ln«lP*iwi PtST-iftU Senior Power Engineer £35k - £55k splash power Cambridge, UK Splashpower Ltd develops wireless power technology for recharging portable consumer electronics devices. Having completed a major phase of R&D, they are preparing to license their technology to global OEM’s. Based in the vibrant and Historic town of Cambridge, 40 miles North of London, it is the centre of new and emerging technology within the UK. They are currently seeking a Senior Power Engineer to: • Lead all Power circuit design and assessment from requirements analysis through to acceptance and certification, providing technical leadership to implementation teams • Develop system level mapping, detail simulation tools and Design Methodology • Assist in the capture, and preparation of, design specifications from primary requirements to the implementation of secondary requirements If you have extensive experience in low power electronics (sub 100 Watt), with knowledge of batteries, charging, and/or power systems (e.g. SMPS), we’d like to talk to you. If you want to work with some of Europe’s brightest Engineers contact Lisa Hart on +44 (0)1582 878827 or Lhart@redlineplc.com RpHlinP www.redlineplc.com Luton: + 44 (0)i582 450054 IW^UIMIV^i r | Manchester: +44 (0)161 491 7830 Recruiting Excellence CV@RedlineplC.COm Scotland: +44 (0)1698 527120 78 elektor electronics - 12/2006 DESIGN TIPS HANDS-ON Client-server quizmaster Manuel Schreiner This circuit is designed for use in quizzes involving several players. The situation is a fami- liar one: whoever presses (or, in practice, thumps) their button first lights their lamp and is gi- ven the opportunity to answer the question. We have published a number of designs for such circuits over the years in Elektor Electronics, but admittedly none has been par- ticularly straightforward, often using microcontrollers and even radio modules! This circuit demonstrates that we can do the job very simply, us- ing just a couple of discrete (not to say antique!) components. Our terminology, on the other hand, is bang up-to-date: we have designed a client-server quiz system. The server (i.e., the quizmaster) is shown on the left in the circuit diagram. It consists of a relay (K2), a pull-up resistor (Rl) and a transistor. The relay is used to switch a buzzer or bell. Switch S2 is used to reset the system. The client systems are connected to the server and to one anoth- er using a three-wire bus. Each client consists of a relay, a tran- sistor and a couple of diodes. One of the jobs of the relay is to switch on the lamp on the con- testant's desk. The three bus wires carry V cc , ground, and a blocking signal. A number of client systems, one per contestant, can be connected to the three wires. In the quiescent state the blocking signal carries the supply voltage V cc . When one of the contestants' lamps is lit this drops to 0.7 V. When a contestant presses his button (SI) relay K1 pulls in as a result of the voltage (the block- ing signal minus 0.7 V) applied to the base of transistor Q 1 . If another contestant subsequently presses his own button nothing will happen: the voltage appear- ing at the base of his transistor will now be 0 V, and so it will not be turned on. Relays with a working voltage of 6 V can be used, with a supply voltage not exceeding 9 V. ( 060218 - 1 ) Pencil rubber cleans solder pads Luc Lemmens Just in case you didn't know, from 1 July 2006 all new elec- tronics equipment has to be RoHS-compliant. One of the im- plications of the new rules is that solder tin containing lead may no longer be used in newly pro- duced equipment. Interestingly, exceptions are made for auto- motive electronics, medical and military equipment. Currently there are some doubts regard- ing the mechanical durability of the substances used to replace the lead/tin alloy we've been using for decades to solder our circuits. The use of lead/tin sol- der is also still allowed for repair work on older equipment. Conse- quently it will take a while before the 'old' type of solder tin has disappeared from electronics in general. Browsing the soldering and sol- dering tools section of just about any catalogue from a major electronics supplier, you'll soon be at a loss at what solder tin to choose, the choice of alloys and compounds being confusing to say the least. Still, 90% of all varieties have one thing in com- mon: the lead component has been replaced by silver. Only the tin/silver ratio varies. In most cases, another metal has been added to optimise the chemical and thermal characteristics. Also, differences exist in the flux type and the amount of it added to the solder tin. Pre-tinned Elektor Electronics printed circuit boards, too, had to undergo a change in the pro- duction process. Since a few months, our board suppliers apply chemical silver to cover copper surfaces and so comply with RoHs. It took us some get- ting used to when the first boards started to arrive in our lab — to us, it seemed as if the white component overlay was cover- ing the solder pads! Still, the boards turned out to be perfectly solderable. Now, silver has a nasty habit if oxidising quickly. Just as table silver, our boards seem to turn black and dull after a while, es- pecially if touched by fingers. It is therefore recommended to use airtight packaging for circuit boards when in storage or tran- sit. After all, solder tin will not flow very well on silver oxide. If a circuit board shows black smudges, problems in solder- ing may be prevented by solv- ing the silver oxide traces with a soft piece of pencil rubber, which some of you may remember from the days when a pencil was used to make notes and drawings. The silver-oxide spots and areas will disappear remarkably quickly and soldering will be a breeze afterwards. If you solder imme- diately after applying the pencil rubber, the problems are solved for good. So far, we have not observed significant oxidising in joints made using the latest sil- ver/tin based solder, so 'polish- ing the silver' is unlikely to be- come a recurrent subject in this magazine. ( 060230 - 11 ) 12/2006 - elektor electronics 79 TECHNOLOGY RADIO REMOTE CONTROL Model aircraft these days fly at lightning speed and with their backup systems can cost as much as a small car. If someone else's control ((O)) _ U system blocks yours, the results can be dearly fatal for both aircraft! A new broadband-based system could prove an ideal solution. Until recently it was no exaggeration to describe radio control (R/C) systems for plane, car and ship models as utterly 'stone age', at least from a communications technology point of view. Transmission techniques had not moved forward since amplitude modulation (AM) was generally ditched in favour of frequency modulation (FM), and that was several decades ago. The standards established at that time are largely still in use around the world. Key points of this standardisation include using the frequency bands 27, 35 and 40 MHz for control signal transmission. Across Europe 35 MHz is reserved exclusively for model aircraft control, whereas a multi- tude of other users have access to the 27 and 40 MHz bands. The frequency bands are divided into channels 10 kHz wide, making this a narrowband modulation sys- tem. With no guardbands between individual channels, it is technically simple for signals to bleed over into ad- jacent channels, requiring signals to be limited to 8 kHz bandwidth if interference is to be avoided. Most of to- day's R/C receivers use IF filters having a 3-dB band- width of around 6 kHz. The simplest way of generating R/C transmissions is to code the signal using Time Division Multiplex (TDM) tech- nology. To control between 4 (minimum) and 12 (maxi- mum) servo functions, a corresponding number of pulses of variable width are generated sequentially with a rep- etition rate of around 20 ms, then used to modify the RF carrier using frequency modulation. For this kind of cod- ing the term Pulse Position Modulation (PPM) has been defined. Over the years another system known as Pulse Code Modulation (PCM) has also been implemented and there is no single standard in use. Proprietary (manufac- turer-specific) data compression systems reduce compat- ibility between PCM systems. Since the signal structure does no more than distinguish between two different amplitude levels, the modulation of the RF carrier boils down to frequency switching between two fixed values. Figure 1 shows a block diagram of a current model aircraft R/C receiver using double super- het technology. Its architecture conforms to the classic frequency conversion process using a first IF of 1 0.7 MHz and a second IF of 455 kHz. Signal processing is han- dled by a microprocessor. Interference Unfortunately the interference problem is as old as the remote control hobby itself. Interference in the airwaves is both frequent and destructive, arising from many causes but chiefly through use of the same radio channels by more than one user simultaneously. In severe cases propa- gation effects can lead to near total signal blocking for a moment or two, although total data loss over any extend- ed period is rare. Various measures can mitigate the problem of two users occupying the same channel simultaneously. Frequency band scanners built into the transmitters can prevent op- eration when it is detected that the selected channel is al- ready occupied. This becomes a total solution only when every user's transmitter is equipped in this way, which is seldom the case. The scanner is of no value of course if another user cuts into the channel after the first owner's plane is already in flight. A higher level of interference protection is achieved by using more than one control channel simultaneously, as in the case of a commercial system that uses one chan- nel each in the 35 and 40 MHz bands at the same time. The possibility of simultaneous interference on both chan- 80 elektor electronics - 12/2006 Broadband and DSSS technology ior model aircraft nels is more or less excluded, at the cost nevertheless of increased hardware costs and greater failure risk arising from the higher component count. A broadband future? With some model aircraft now using jet propulsion (the heading illustration is a replica of the Albatros L-39 mili- tary jet) costing the same as a small car and represent- ing a significant safety risk with air speeds of well over 300 km/h, the desire for fully interference-resistant R/C systems is entirely comprehensible. Unfortunately, regula- tory requirements and the need for backwards compat- ibility are hindering the introduction of any fundamentally new R/C technology. On the other hand practically prov- en communication techniques have existed for a long time that would adapt to model control extremely well. Exam- ples taken from mobile radio include the DECT, WLAN, Bluetooth and ZigBee standards. In all these applications a multitude of point-to-point or user device-to-user device radio links are operated bi-directionally and simultaneous- ly in the same frequency domain. The American Paul Beard and his firm Spektrum have developed a radio R/C system for models that exploits modern communication techniques and takes full advan- tage of cheap, off-the-shelf chipsets [1]. The initial offer- ing, for R/C car models only, was RF modules for three servo functions. This was a far cry from the latest product, a fully airworthy system covering six servo functions with the code number DX6. Figure 2 shows the transmitter and receiver. The only restriction is that this control system is intended only for so-called parkflyers and micro helis. These craft have a range of 1 00 metres maximum. The technology SpektrunrTs R/C system operates in the 2.4 GHz ISM (industrial, scientific, medical) frequency band that is available for use without a user licence in most coun- tries. Consequently it is used by a multitude of applica- tions including WLANs, Bluetooth and ZigBee. The effect of these other applications is of minor significance to us, since in the vast majority of cases the physical distance or separation between these indoor users and our outdoor R/C systems will be large enough to cause no difficulty. The generous breadth of spectrum at our disposal, around 83 MHz (from 2.4 to 2.4835 GHz), enables modern dig- ital modulation techniques to be used to their best advan- tage. Regulatory conditions lay down a spectral power density of 1 0 mW per MHz of bandwidth, capped at a maximum of 100 mW for the complete band. Depending on the bandwidth of the signal being radiated, transmit powers of between 1 0 and 1 00 mW are permissible. A purely theoretical calculation indicates a potential trans- mission range of over 1 0 km with 1 00 mW transmit pow- er, -90 dBm receiver sensitivity and 6 dB antenna gain at transmitter and receiver — or 4 km using 1 0 mW. In a radio controlled aircraft context several conditions would have to be guaranteed to achieve this kind of range and experience with WLANs and Bluetooth indicates the dis- plug-in 24.4 MHz xtal (channel 70) 11.155 MHz xtal 060009 - 12 3.41 MHz xtal Figure 1. Block diagram of a conventional remote control receiver for model aircraft (Photo: author). Figure 2. DX6 2.4 GHz model aircraft transmitter with receivers for six servo functions (Source: Graupner [6]). Figure 3. Transmit RF module and receiver for remote control of model cars (Photo: author). 12/2006 - elektor electronics 81 TECHNOLOGY RADIO REMOTE CONTROL Figure 4. Simplified block diagram of the Cypress CYWUSB6934 transceiver (Source: Cypress). tances achieved in practice are frequently well below the theoretical values. To establish what might be realistic results, range tests were carried out using transmit and receive modules made by Spektrum for radio-controlling model cars (Fig- ure 3). In these tests the transmitter and receiver were po- sitioned around 1 .5 metres off the ground (flat landscape, ground covering damp, transmit and receive antennas in direct line of sight with around 800 m separation). Un- der these conditions the link was rock-solid, without any interference at all. However, as soon as either transmit or receive antenna were blocked by human bodies the link was lost altogether. The Spektrum transmit module has an output power of 1 0 mW and thus conforms to specification ETS 300 328 for GSRDs (General Short Range Devices). By way of comparison, data sheets for commercial WLAN routers indicate they provide radiated power levels of 15 dBm (equivalent to 3 1 .6 mW), as they occupy a greater bandwidth. Chips with everything At the heart of SpektrunrTs transmit and receive modules is the CYWUSB6934 transceiver made by the U.S semi- conductor producer Cypress Semiconductor Corpora- tion [2]. Receive sensitivity is -90 dBm (7 jiV into 50 £2) and transmit output power is 0 dBm (1 mW). Integrated with this is a 1 3 MHz reference oscillator for the internal frequency synthesiser. The oscillator is voltage-controlled so that it can cover the complete 2.4-GHz ISM band. Its circuit architecture reveals a single superhet with low IF and integrated IF filter (Figure 4 gives a simplified block diagram). According to the manufacturer the module is intended for cordless applications in PC mouse, keyboard und joystick applications, for game controllers, remote controllers, barcode scanners and toys. To achieve the output power of at least 1 0 dBm (10 mW) required for remote control of models, the transmit module uses an SE2526A power amplifier from SiGe Semiconductor [3] to boost the signal. This amplifier module is normally used in WLAN applications built according to IEEE 802.1 lb and g specifications that provide RF output levels up to 20 dBm (1 00 mW). The chip has an integrated low- pass filter and an antenna changeover switch that makes separate transmit and receive connections possible. The transmit antenna is well matched and is connected us- ing 50-£2 coax cable. Whether Spektrum actually limits the output to 10 dBm would need precision measurement to establish but the power is certainly appreciable. The author’s tests were confined to making relative measure- ments. In this process the transmitter was switched on and off many times at random so as to test occupancy of all possible 79 RF channels in the 2.4 GHz ISM band. The total frequency range covered was determined at around 84 MHz, which squares up well with the permitted band- width of 83 MHz. The band occupancy of the signal in use in one of the 79 RF channels was around 830 kHz, corresponding to the channel spacing of 1 MHz. Construction and layout of transmitter and receiver print- ed circuit boards are shown in the following pictures. In Figure 5 the transmit RF board can be seen together with the subminiature co-ax socket for the antenna connection. The track from the connector to power amplifier chip has an impedance close to 50 Q. Near the edge of the board is the 1 3-MHz reference oscillator for the transceiver 1C. Figure 6 shows the transmit signal processing board with its microprocessor and clock oscillator, Figure 7 il- lustrates the receiver RF board with the transceiver. The simple wire antenna, which is not impedance-matched, is taken direct to the receiver input with filtering. Finally in Figure 8 we see the signal processing board for the re- ceiver, complete with microprocessor and clock oscillator. With no adjustable filters used in either the transmit mod- ule or the receiver, construction is both straightforward and affordable. The VLSI chips used have a unit price of less than five dollars (n quantities of 100 upwards). Management matters Organisation of signal generation and processing is han- dled in both the transmit RF module and the receiver by a Cypress CY8C27443-24PVI microprocessor [2]. The Cypress transceiver is configured so that it operates in one of the 79 possible channels within the 83 MHz wide 2.4-GHz ISM band. To achieve this, a scanning process is initiated when the device is powered up. This means that the Spektrum transmitter operates bi-directionally; the receiver associated with the transmitter scans the band and gives the go-ahead to the transmitter only when an unoccupied channel is found. To avoid mistakes the trans- mit/receive management system ensures that the devices do not transmit and receive simultaneously. Test measure- ment show that the transmit signal is pulsed with an 'on' time of just over 5 ms and 1 3 ms repetition rate. The signal used to control the servo functions is not in fact modulated directly onto the RF carrier. Cypress makes use of a digital modulation system by the name of DSSS (Direct Sequence Spread Spectrum) [4]. This is one of two prominent digital modulation techniques, the other be- ing FHSS (Frequency Hopping Spread Spectrum). DSSS is used in WLANs, ZigBee, GPS and UMTS, with FHSS employed by Bluetooth. Both techniques have their roots in the military field. The FHSS technique involves signal- hopping among the 79 channels of the ISM band 1 ,600 times a second, following a fixed sequence determined individually between each transmitter and receiver. Military origins The remote control system that we are using employs DSSS. In the process the narrowband desired signal is first processed digitally so as to straddle a significantly broader bandwidth and is only then modulated onto the RF carrier. In this way the spectral power density is re- duced to a level where the spread-out transmit signal dis- 82 elektor electronics - 12/2006 appears into the general noise background and can no longer be detected using conventional methods (the mili- tary connection now becomes clear). The receiver, if pro- vided with the same code, can reverse the spread proc- ess using what is called 'processing gain'. The gain here increases as the straddle code ('chipping sequence') becomes extended. Any transmitters using the 'wrong' code will be heard as noise and ignored. It's not all gain, however, and there are nevertheless limits that are set primarily by the limited processing power available. The bitrate change of the chipping sequence used by Spektrum for remote control amounts to 64 chips/bits corresponding to a calculated gain of 10log 10 (64) = 1 8 dB. Various losses reduce this in practice to perhaps 1 6 dB. To achieve an acceptable signal-to-noise ratio of circa 1 0 dB and system losses of around 2 dB for good resistance to potential interference a signal processing gain of more than 30 dB would be required. In a situa- tion like this the power of the interfering signal might be 20 dB stronger than the wanted signal. This, however, would imply a bitrate change or chipping code length of more than 1 ,000. It's easy to see how the system param- eters for really good interference suppression run rapidly out of control. It's worth noting in addition that this proc- ess can work only when transmitter and receiver use the same code. With Spektrum's remote control the transmit code is made known to the receiver at the start of op- eration using the so-called 'binding process' (it's just con- ceivable that other receivers might be linked in too!). Finally, here's an interesting thought to consider: for data transmission this new system employs one out of 79 chan- nels each 1 MHz wide and prevents another user of the same system from sharing the same channel. Resilience to interference in the same channel is nevertheless minimal if a more powerful user employing another system appears. The WLAN system on the other hand employs three chan- nels each 22 MHz broad and permits a limited number of devices using the same system within a single channel. And on account of the significantly greater channel band- width, WLAN is significantly more resistant to same-chan- nel interference. It is nevertheless accepted that increasing user numbers in a channel reduces the data rate. This selfsame criterion is not acceptable for radio control, however; real-time response takes top priority. This is presumably the reason why Spektrum employs the system described, even though it is less interference-resistant. A further pointer in this direction is the fact that the new DX6 remote control for model aircraft actually occupies two out of the 79 channels simultaneously and the receiver is also built on a twin-channel basis (Figure 2). It would be fascinating to learn how remote control systems of this kind perform when several users are using the same type of equipment concurrently. ( 060009 - 1 ) Web links [1] www.spektrumrc.com [2] www.cypress.com [3] www.sige.com [4] http://en. wikipedia. org/wiki/Direct-sequence_spread_spectrum [5] www.weatronic.com [6] www.graupner.de Figure 5. Transmitter RF board with subminiature co-ax connector for antenna connection. The circuit track from the connector to the transceiver 1C has an impedance close to 50 Q (Photo: author). Figure 6. Transmitter signal processing hoard with microprocessor and clock oscillator. Figure 7. Receiver RF board with transceiver 1C. The simple wire antenna, which is not impedance-matched, is connected direct to the receiver input without filtering. Figure 8. Receive-side signal processing board with microprocessor and clock oscillator. 12/2006 - elektor electronics 83 HANDS-ON FPGA NEC Paul Goossens and Andreas Voggeneder A picture is worth a thousand words, which is probably why alphanumeric displays have given way to graphic displays in the latest mobile telephones. Although our FPGA prototyping board is not a small as a mobile phone, it can still generate video. That's why it has a VGA port. As you have probably already guessed, the VGA port can be used to display video imagery on a VGA moni- tor. We've kept the VGA hardware on the prototyping board quite simple. Three D/A converters are implement- ed using several resistors. Each converter has a resolution of 3 bits. They generate the red, green and blue (RGB) signals. The horizontal and vertical sync signals come straight from the FPGA. 84 elektor electronics - 12/2006 VGA signals Naturally, all five VGA signals are generated by the FPGA. Before you delve into the details of the implemen- tation, you need to know how theses signals ultimately create a video image. Here we limit ourselves to generating an image with a resolution of 640 x 480 pixels and a frame rate of 60 Hz. Every VGA monitor can easily display this stand- ard resolution. Each frame consists of a number of lines of video informa- tion. A typical video line is shown in Figure 1 . A video line can be decomposed into a certain number of pixel in- tervals. One image pixel can be generated in each pixel interval by the combined R, G and B signals. The R, G and B signals must be low during the first 96 pixel intervals. The HSYNC signal is also low during this time. The monitor recognises the start of a new line from this set of signal states. This is followed by 48 pixel intervals during which HSYNC is high while the colour signals (R, G and B) re- main low. The actual image line starts next. For each pixel interval, the R, G and B signals determine the colour and intensity of the associated pixel. As you might expect, this portion of the line consists of 640 pixel intervals - one for each pixel in a horizontal line. At the end of the line, there are another 1 6 pixel intervals during which the colour signals are all low. HSYNC remains high during this time. A sin- gle video line consists of 800 pixel intervals in total. It takes another 479 video lines after this one to send all the pixels to the monitor. They are followed by ten video lines that are fully black (RGB = 0). These lines are fol- lowed by another two lines (also black) with the VSYNC signal low. This tells the monitor that the next frame is coming. Finally, there are another 33 black video lines with VSYNC high again. The total number of lines in a frame is thus 525. Example 1 The pixel frequency (dot rate) in this VGA mode is 25. 1 67 MHz. The length of one pixel interval is thus the inverse of this frequency, which is approximately 39.7 ns. For this example, we can round off the frequency to 25 MHz, which is easy to generate from the 50-MHz clock signal al- ready present on the board. This dif- fers from the desired frequency by approximately 0.7%, which is fairly small and lies within tolerance. Example 19 (ex 7 9) generates a VGA signal that pro- duces a colourful image on the monitor. The code in file ex!9.vhd contains a process named vid, which generates the VSYNC and HSYNC signals. This process also keeps track of which column and line of the screen image is 'at bat'. This information is stored in the Col and Line registers. VidEn indicates whether a pixel is being generated or the R, G and B signals must be set to 0. Note that the Col and Line signals are only valid when VidEn is set to 1 . The qen signal divides the 50-MHz clock signal by 2. The rest of this process is very simple. Try to figure out for yourself exactly how it works! The fractal process uses the current coordinates (Col and Line) to determine the intensities of the red, green and blue signals. The algorithm used here is actually not signif- icant - its only purpose is to generate a par- ticular pattern on the monitor screen. After you compile the exam- ple and load it in the FPGA, connect a VGA monitor VGA functions Various low-level routines that make it easier to use the VGA interface are located in fpgajib.c. The most impor- tant routines are: lnit_screen(): initialises the VGA controller SetCurrentColor (Color): sets the new foreground colour SetCurrentBkColor (Color): sets the new background colour Gotoxy(x,y): places the cursor at the specified position WriteScreen(Text): writes text to the screen starting at the current cursor position Clrscr(): erases the screen Several constants that can come in handy when you're programming are located in infpgajib.h and fpga_reg.h. They include constants for the various colours. 12/2006 - elektor electronics 85 HANDS-ON FPGA DIY experiments Example 19 forms a good basis for some simple DIY experi- menting. Be sure to make a copy of the file first so you can restore things to the original situation. To get you started, try making the following changes: - Delete lines 147-149 - Replace the graph process with the following code: graph : process (elk, clr) begin if clr = '1' then Red <="00"; Blue <="00"; Green <="00"; elsif (elk' event) and (elk = ' 1 ' ) then if qen = ' 1 ' then if VidEn = ' 1 ' then if Col (3 downto 0)="1000" then Green<="ll" ; else Green<="00" ; end if; else Red <= "00"; Green <= "00"; Blue <= "00"; end if; end if; end if; end process graph; The above modification is quite simple. Now try making your own modification to add a blue horizontal line to the image. (Tip: the Line register keeps track of the currently active line.) Once you've mastered this, how about generating a dashed line instead? Timing Signal timing is very important in digital circuit design. For instance, changes to a design can affect its maximum opera- ting frequency. Registers (flip-flops) are often used in digital designs. They impose timing requirements on the associated signals to en- sure that they work properly. The most commonly used timing parameters are: Tsu (setup): specifies how long the data must be valid at the input of the flip-flop before the clock pulse arrives Tco (clock to output): indicates how long it takes for the data on the input to appear at the output after the clock pulse arrives Th (hold): specifies how long the data on the input must re- main unchanged after the clock pulse arrives An operation of some sort (such as AND, OR or even additi- on) usually occurs between the output of one flip-flop and the input of the next one. These combinational circuits also have delays between their inputs and the outputs. The interconnects inside the FPGA also cause delays. These delays and requirements have certain tolerance ranges. For example, a flip-flop with a specified Tco of 2 ns may be able to work even faster in practice. The longest possible time is called the 'worst-case time', and the best possible time is called the 'best-case time'. After Quartus compiles a design, it analyses the timing of the design. This yields a figure for the maximum operating fre- quency of the design. To arrive at this result, the program cal- culates the maximum delay between the clock pulse and when the signal arrives at the flip-flop data input for each signal line. This delay is often called the 'arrival time'. The Tsu of the flip-flop concerned is included in this delay. Worst-case times are used for this calculation. The longest delay determines how quickly successive clock pulses can follow each other. If you set a desired minimal clock rate in Quartus (refer to Quartus Help), it can determine whether the design meets your requirement. Quartus also analyses the Th requirement of the flip-flops. Here again it calculates the delay between the clock pulse and when the data signal arrives at each flip-flop. The best-case times are used for this second analysis. They must always be greater than the Th requirement of the flip-flop concerned. You can view the results of the timing analysis in Quartus in the Compilation Report. This report includes a section named 'Timing Analyzer', which provides detailed information about the timing of your design. The term 'slack' appears frequent- ly in this report. Slack designates the difference between the calculated delay and the desired delay based on your desired clock frequency. A positive slack for Tsu indicates that the signal arrives at the data input of a flip-flop earlier than the required time (by the amount of the slack value). In the case of Th, the slack indicates how much longer the signal remains unchanged than the required (minimum) time. Positive slack is good news, and negative slack is bad news. If your design is too slow, you have two options. The first option is to see whether Quartus can help you compile the design better. To do this, select 'Timing Optimization Advisor' under Advisors in the Tools menu. It will help you configure the Quartus compiler to produce a better result. The second option is to examine the timing report to see which signals are slowing things down. Once you know this, you can try to modify your design to make these signals so- mewhat faster. You might find that using a different algorithm helps. There are also techniques that can be used to adapt a design to a higher clock frequency, but that's a different subject! 86 elektor electronics - 12/2006 to connector K9 on the prototyping board. If everything went right, you will be treated to a pretty design on the monitor. Dynamic Conjuring up a nice figure like this on your monitor is a lot of fun, but you'll get tired of looking at it after while. It would be better (and more useful) to be able to display information on the screen. If you combine this with a bit of intelligence, you might just have something. This is the purpose of Example 20 (ex20). Here the trusty T51 microcontroller has been extended to include the PS/2 interface described in the last instalment and a VGA interface. The VGA interface is linked to the micro- controller via the XRAM bus. From the perspective of the microcontroller, this interface is simply a block of memory starting at address 0x8000 and a set of eight memory lo- cations starting at address OxAAOO. As you can see from the size of the Croffikkorte-o.vhd file, this is a fairly sizeable design. For this reason, we don't intend to describe it in detail here. Based on what you've already learned from the previous instalments, you should be able to figure it out on your own. However, it is good idea to say something about how the interface is driven by the software. Driver Thanks to the C files provided with the course, the driver routine that runs in the microcontroller is fairly simple. The first thing ex20.c does is to call lnitscreen(). This caus- es the VGA controller to be configured properly so it is ready to be used. Next, SetCurrentColor and SetCurrentBkColor set the im- age colours. Each character can be displayed in a differ- ent colour. Theses functions only change the colour that is used when the data is written to the screen. Next, Gotoxy(28, 1) positions the (invisible) cursor to coor- dinates (28, 1 ). Writescreen ("text") places the first text on the screen. Here the colour is determined by the previous SetCurrent- Color and SetCurrentBkColor functions. Finally, the putchar2() function displays individual char- acters on the screen. This function also uses the previous colour information. Use A welcome message will appear on the monitor after you configure the FPGA and connect a PS/2 keyboard. You can then use the keyboard to type in text, which will ap- pear immediately on the monitor. You can use the function keys (FI to F4) to change the colour of the text. As an exercise to familiarise yourself with the VGA inter- face, you can experiment with modifying the software. For instance, try integrating the l 2 C interface described in one of the previous instalments so the output of the A/D converter can be displayed on the monitor. Another idea would be to display the scan codes received on the PS/2 interface instead of the decoded characters. If you can't get that to work, you can always ask other readers of Ele- ktor Electronics for help via the Forum on our website. Let's have fun! After all this hard work, it's time for a bit of relaxation. As a special treat, we've developed a fun application for HSYNC 300 96 48 96 16 r~ R G B 060025 - 7 - 11 Figure 1. Structure of a video line. Figure 2. Signal flow for a timing analysis. you. The hardware is exactly the same as for the previous example ( ex20 ). The only difference is in the software, which has been modified 'slightly'. Example 21 (ex21) implements the familiar 'four in a row' game, but this time entirely in the FPGA. This example also shows how you can define your own characters - that is, if you can tear yourself away from the game long enough to have a look at the source code. ( 060025 - 7 ) Join the FPGA Course with the Elektor FPGA Package! The basis of this course is an FPGA Module powered by an Altera Cyclone FPGA chip, installed on an FPGA Prototy- ping Board equipped with a wealth of I/O and two dis- plays (see the March 2006 issue). Both boards are available ready-populated and tested. Together they form a solid basis for you to try out the examples presented as part of the course and so build per- sonal expertise and know-how in the field of FPGAs. Further information may be found on the shop/kits & mo- dules pages at www.elektor.com 12/2006 - elektor electronics 87 HANDS-ON E-BLOCKS NO UMlTS + t . Maiv, everynne can develop powerful electronic systems ■ Micnasentrellflr devalopmant laeftwara ■ to UBS gropNcal tnterfseQ - Flint E f hHclblff Putting Flowcode 3 through its paces Jan Buiting A new version of Flowcode for E-blocks has just been released — version 3. This is more than a simple upgrade: Flowcode has matured into a nice if not impressive development tool. Many of our readers are now quite familiar with Flow- code, the software brains behind all E-blocks projects, with some having actually bought the product. A number of E-blocks tutorials, reports and application examples were published earlier this year. Originally, Flowcode was designed to help College stu- dents develop electronic projects based on the popular PIC microcontroller. As time has passed, more and more features have been added to Flowcode, and the latest ver- sion 3 has actually turned out to be quite a nice devel- opment tool not just for the programmers starting out but also for professional engineers. In this respect, my own position is that I have been an electronics enthusiast for 30-odd years and have occa- sionally worked with microcontrollers, specifically the CDP1 802 (see Retronics in the October 2006 issue). For- tunately, thanks to contributing authors and colleagues in the Elektor lab I have never been out of touch with micro- controllers and related stuff like (E)PROMs and Flash de- vices. Although I can read PIC, 8051 and AVR assembly code and the odd piece of C and Visual Basic, I must ad- mit that I am not ou fait with the latest in microcontroller land when it comes to programming. So, when the new Flowcode landed on my desk I thought I would see for myself whether it lived up to my expectation: microcontrol- ler programming should be easier than 20 years ago. On the desk and on the PC To undertake the review I got hold of the 30-day demo copy of Flowcode 3, which is available as a free down- load from our website. At the time of writing I got Beta 5 — the final version will be on our website. I also got out a set of E-blocks modules comprising a PICmicro Multi- programmer board, an LED board, a Switch board and an LCD board. The lot was connected up as shown in Figure 1 . My colleagues in the lab having estimated my proficiency ("zero") and general chances of success ("well see"), gave me an 1 8-pin PIC1 6F88 device (worth £2.75) to insert in the Multiprogrammer. Somehow I surmised that this must be a low-end device but having looked up the datasheet on the Microchip website I discovered the de- vice has 7 kB ROM, 368 bytes of RAM, seven 10-bit A to D channels, timers, a USART communication port and a host of other things I had never heard of (BOR? LVD?). 88 elektor electronics - 12/2006 for blocks Looks like things have moved on a little since I last used a microprocessor! I was happy with my low-end' 'F88 chip because its simple architecture would prevent me from at- tempting the impossible (yet). Having installed Flowcode 3 and the associated PPP driv- er (which was a breeze) I thought I would see if I was in control of the hardware and software setup by getting a single LED to flash. I know the example is corny, but you have to walk before you run — writing that l 2 C bus driver or 8-level DMA demultiplexer will come later! The sequence Right. In Flowcode I started a new flowchart, dragged an Output icon onto the chart and clicked on it to get the properties up. I set bit 1 of PIC port A to go On and pressed the 'PLAY' button. The software simulated the 'pro- gram' and pin AO on the PIC graphic faithfully went red to indicate a logic 1 had been placed on port A bit 0. Af- ter a little trial and error I very quickly had a program that flashed AO on and off on the screen. No time wasted on editing assembly code, re-assembling the code, burning a new EPROM, stirring the coffee and finally relaunching the application, fingers crossed and praying for success. That was 20 years ago. I learned a few things here: you need to slow Flowcode's simulator down so you can see what is going on in your program. Correspondingly I deduced you need to put delays in the program otherwise what I had hoped to be a slowly flashing light will just look like a slightly dim LED. You can see my first program in Figure 2. Not bad for 1 0 minutes work. Flushed with success I then decided it was time to see this in action on a real PICmicro device. Simulation is great but I am only convinced by real-life electronics. To down- load a program to a microcontroller, in my case the lowly 1 6F88, you simply click on the small chip icon on the menu and off it goes. Off it went — but nothing happened on my hardware. Time to read the Help file and the Getting Started guide, both of which can only be described as crisply produced, easy-going yet comprehensive documents with great educational value. Having gone through this I concluded that I needed to load the chip... configure screen to set up the parameters for the real-life PIC: set the clock oscilla- tor for a Crystal, turn off the watchdog timer, Brown Out Detection and Disable Low Voltage Programming. These settings, by the way, are now the number-1 problem expe- rienced by readers having built an Elektor project based on a PIC, having burned their own PIC device and finding that it doesn't work. Check those PIC config words! Then I pressed the Download to Chip icon again and I had my first program running on the real-life PIC. I looked at my watch — I started 30 minutes ago. For a relative newcomer who occasionally still gets nightmares in as- sembly code I did not think that was too bad. Learning curve Having read the Help file I discovered that Flowcode 3 is shipped with around 30 example files that demonstrate Figure 1. The E-blocks I connected up for my baptism of fire, so to speak. how the major fea- tures of Flowcode can be used. Some of these are based on the 'F88 device I happened to have used for my experiment and others are based on a larger 'F877 device. Flowcode can also oper- ate on the much larger '1 8 series range of PICs as well as the smaller '1 2 series. I then spent the next hour or so look- ing through the example files for the 'F88, downloading a number of them to my hardware and launching the applications. Many only require the use of simple LEDs, switches and LEDs, but some call for more advanced components h * i: *>.■ I.iird r * > Figure 2. My first program. 12/2006 - elektor electronics 89 HANDS-ON E-BLOCKS What's new & better in Flowcode Version 3 Graphical User Interface improvements Zoom: Multiple zoom levels, zoom to fit Tiling: horizontal tile, vertical tile Smaller PICmicro MCU on-screen device Screen icons: new graphics, description now inside icons, better comments, more icons per screen viewable Screen appearance: user selected icon shading, and back- ground colour Hardware and software macros now have separate icon graphics now known as: 'macro' and 'hardware macro' New: Print Preview and print to screen zoom setting Flowcharts can be exported to JPEG or BMP for incorpora- tion into documents • Tile horizontal and vertical and auto-arrange for multiple ma- cro viewing Improvements for migration to C All icons have bubble help to display icon function Icons can also produce equivalent C code of each icon as bubbles Students can view the C code equivalent of the whole program Students can view the Assembly code equivalent of the whole program Screen layout is preserved on save to allow educators to build more relevant examples Tutorial file descriptions now included Tutorial files exploit features such as labelled components to add context Multilingual support Main program and Help file: English, French, Dutch, Finnish, German, Spanish Main program but not Help file: Chinese, Italian, Greek Earlier in this series Electronic Building Blocks, November 2005. E-blocks and Flowcode, December 2005. E-blocks in Cyberspace, January 2006. E-blocks - now you CAN, February 2006. E-blocks Making Waves, March 2006. E-blocks Making Waves at C, April 2006. From 2 to 3 Those of you who are currently using Flowcode version 2 will want to know what improvements have been made to version 3. I have no experience of version 2 but look- ing in the Help file it states that major improvements have been made to the graphical user interface, there are new features to help learners, lots of functionality improve- ments such as 1 6-bit numbers, support for strings, better interrupt handling, improved macros, more components, and so on. A full list is given in the inset. figure 3 My final Decision Maker program. (i.e. E-blocks) like keypads and sensors. When you look through these examples, Flowcode's two main strengths become clear. Firstly, it is a very good way for those that are not front line programmers, like myself, to understand how programs work and can be created in a short time. This in turn means that the learning curve for Flowcode itself is actually very steep. Secondly, it is not a toy. Whilst it is great for those start- ing out to program, it is also quite powerful, with fully supported interrupts and a range of communication pro- tocols like SPI, RS232, CAN, Bluetooth and even TCP/IP supported — all of which I will grind my teeth on — in due course! Flowcode flips the coin So, having trained myself up it was time to get down to developing an application that, although serious in inten- tion, is the tongue-in-cheek equivalent of flipping a coin: a PIC-assisted Yes/No decision maker. Some people, mostly managers, attribute great author- ity and powers of decision to PCs and microcontrollers, arguing that they are 1 00% digital hence have no 'grey areas' or room for 'discussion'. What I need to confirm these people in their beliefs (as well as making them forget the simple coin in their wallet) is a program where they could press a button and get a 'yes' or 'no' decision to display on the LCD. So I set about making it — as an exercise, of course. You can see the final program in Figure 3. It took me about an hour in the end. I have put up the file 'Decide. 90 elektor electronics - 12/2006 Software functionality improvements Better range of simulation speeds to check working program before downloading it to the PICmicro microcontroller Alter variables whilst simulation is paused Support for 16-bit numbers and arithmetic, choice of types includes CHAR, INT and STRING Support for hexadecimal and binary numbers in all dialogue boxes Full support for strings including string manipulation com- mands like ADD, LEFT, RIGHT Variables are now case sensitive New string process icon supports string manipulation Interrupt icon supports a larger range of interrupts as well as custom interrupt definition. Each interrupts run a macro of your choice. Improved Delay icon with a much greater range of delays While icon can operate for a defined number of times Subroutines can now have parameters passed to them, and returned Larger range of supported devices now includes 1 8 series PICmicro microcontrollers (technical specification for full list). Undo and Redo commands Improved C compiler Component improvements LCD: range supported now includes 40-character 2-line; 20- character 4-line etc. Full LCD functions now supported with scroll and other features. Switches can now be labelled, options for display vertical and horizontal, left to right or right to left. LEDs can now be labelled, options for display vertical and horizontal;, left to right or right to left. New PWM (Pulse Width modulation) component for motor control. Analogue components available now include thermometer, dial, or slider Target communications components now include RS232, I2C, Internet web server, Internet TCP/IP, Bluetooth, CAN bus and LIN bus E-blocks for Prototyping, May 2006. E-blocks and X-10, June 2006. E-blocks Easy ARM Pack, September 2006. Articles may be downloaded individually from www.elektor.com. An overview of available E-blocks and software is available on the SHOP pages at www.elektor.com fcP for free downloading with this article — the file number is 065096-1 l.zip. Unfortunately Flowcode does not have a random number generator so I created a simple counter and then used the MOD feature in a calculation icon to detect whether the count was odd or even. This outcome was used to answer Yes or No to whatever weighty decision the user had in mind. What impressed me is just how easy this was. The LCD was very easy to incorporate in the program and it really adds a lot of functionality to an electronic system. The hardest part of the job was deciding how I was go- ing to structure the program itself in terms of the logical flow and the variables I needed to track the status of the program. Once I had done this on paper, transferring it to Flowcode was quite painless. The thing that most im- pressed me was that once I had got the program working using Flowcode's simulation mode, when I transferred it to the hardware (this time having loaded the PIC config bits!) it worked just like the simulation did. Conclusion To a newcomer, Flowcode 3 'does what it says on the tin'. It was easy to get started and make a program, was intuitive to use, and produced code that worked. There are a few minor disappointments such as the lack of a random number generator, which I happened to stum- Figure 4. An example of a more advanced Flowcode program. ble on for the Decision Maker program, and the fact that floating-point numbers are not supported as variables. It does however seem to have more features and capabili- ties than you could shake a stick at. I was also struck by the thought that it was more fun than the day job. Then I realized that this was my day job! ( 065096 - 1 ) A full featured but 30-day limited demo version of Flowcode 3 can be downloaded free of charge from www.elektor.com. Follow: magazine — » volumes — » 2006 — > december — » A New Flowcode for E-blocks 12/2006 - elektor electronics 91 INFOTAINMENT MODDING & TWEAKING Intelligent Voltmete Miniature 3-channel A/D converter Jeroen Domburg & Thijs Beckers This month we'll make use of the ATTinyl3 again. This versatile microcontroller is used here in a practical, compact voltmeter with an RS232 link for use 'on the road'. In this article we show you how to build a small device that wouldn't be out of place in the laptop case of an electronics fanatic. It is a three-channel A/D converter/ voltmeter, connected via the serial port. Whether you want to measure transistor characteristics, battery dis- charge characteristics or just measure the voltage at a few points, this circuit can help you out as long as the voltages are between 0 and 5 V. Description One of the most important design criteria of this circuit is the amount of space it takes up. To keep this as small as possible we have left out as many components as we could. The final design consists of just five components, which were coaxed into a DB9 plug (see photos). The cir- cuit uses RS232 for connecting to a PC, although the volt- ages don't fully comply with the standards, as this saves on the number of components required. There is one sec- tion that is conspicuous by its absence: the power supply. This is in fact drawn from the serial port. The circuit diagram shows how simple this circuit is. The supply section consists of D1 , IC1 and Cl . When the se- rial port is in a ready state, the voltage on the DTR line is usually somewhere between 8 to 12 V. The circuit grate- fully makes use of this. The 78L05 and the electrolytic ca- pacitor ensure that IC2 is supplied with a stable 5 V. D1 protects the circuit from damage if the DTR line is some- how in the wrong state and outputs a negative voltage. At the hart of the circuit is an Atmel ATTinyl 3. This 1C has the all-important 10-bit A/D converter and 1 .1 V refer- ence voltage integrated on the chip. The ATTinyl 3 is available in a DIP package as well as an SMD package. If there is a need for it, it's therefore possible to construct an even tinier version. Interface There is no UART present inside the chip, so we had to implement this in software. For this reason there is also no need to use a MAX232 or similar to invert the signals or convert them into 1 2 V. The latter has been done in the cheapest way possible: we've left it out altogether. The RS232 signal generated by the microcontroller is connect- ed directly to the RxD line of the PC. Although this isn't ac- cording to the official specifications, in practice it seems to work most of the time. To convert the ±1 2 V of the TxD line from the PC into a TTL level for the microcontroller we use a single 1 0 k resis- tor (R 1 ). The internal ESD diodes of the GPIO pin of the microcontroller short signals above 5 V and below 0 V to the supply lines. R1 limits the current to a safe level. The UART is, as mentioned earlier, emulated inside the mi- crocontroller. A UART normally requires a stable clock to You only need five electronic parts, one D B9 connector & cover and some cable to build this project. In this case a PCB would take up valuable space. Besides, it's much more fun to construct it like this. 92 elektor electronics - 12/2006 About the author operate, such as a crystal. This component is also missing from the circuit. Here we're using the internal RC oscilla- tor of the ATTinyl 3 as the clock, which is not very accu- rate. To obtain a stable timing signal we make use of the bit-clock of the serial signal from the PC. The first charac- ter received from the PC is analysed and the result is used to generate the bit-clock for the UART. Apart from the routines for the UART and the A/D convert- er, there is also a bit of software that implements an auto- ranging function. If required, the software can automati- cally switch the reference voltage for individual channels between the built-in 1 . 1 V and the 5 V supply voltage. Because the 5 V supply is a lot less stable than the 1.1 V reference voltage, it is possible to turn off this feature. Jeroen Domburg is a student at the Saxion Technical University in Enschede, the Net- herlands. Jeroen is an enthusiastic hobbyist, with interests in microcontrollers, elec- tronics and computers. In this column he displays his personal handiwork, modifications and other interes- ting circuits, which do not necessarily have to be useful. In most cases they are not likely to win a beauty contest and safety is generally taken with a grain of salt. But that doesn't concern the author at all. As long as the circuit does what it was inten- ded for then all is well. You have been warned! In use Because the circuit uses a microcontroller and RS232 signals, it is fairly straightforward to control. When it is connected to a serial port you can use a terminal emula- tion program such as Hyperterm (Windows) or Minicom (Linux). The serial port settings are: 1200 baud, no parity, 8 data bits and 1 stop bit. Pressing 'enter' will display the initial menu. From the menu you can adjust several set- tings. Choosing 'run' will make the measured samples of the three channels scroll down the display. These can be looked at straight away, or they can be stored in a file by the terminal program, so that they can be analysed at a later date, using Excel for example. On the other hand... An 'instrument' with so few components also has some disadvantages. The inputs, for example, are not galvani- cally isolated from the serial port. Keep this in mind when you take measurements from devices connected to the same PC or even the same mains ring. The circuit is also fairly easily affected by the voltage lev- els on the serial port. If the voltage on the DTR line drops below 6 V, or the RxD line doesn't accept a signal of only 5 V you'll find that the circuit won't function reliably. The source code may be freely downloaded from the websites of the author [1] or Elektor Electronics [2]. You are therefore free to modify the software if you wish to change or add some extra functions. ( 065120 ) Web links: [1 ] http://sprite.student.utwente.nl/~jeroen/projects/serad [2] www.elektor.com And this is the end result. Nobody would guess that this contains a three-channel voltmeter. It's a perfect fit. This way we don't need to buy a special enclosure either. And this is what the computer display looks like. The three columns can also be logged, for analysis at a later date. 12/2006 - elektor electronics 93 HANDS-ON PROPULSION Burkhard Kainka Memory metal is often thought of as 7 a solution looking for a problem 7 . It's an intriguing material; warming it makes it return to its original shape. The application described here is academic in that it doesn't provide a solution to any great problem but instead produces a novel visual effect. This design should provide some re- lief for those of you who are irritated by the sight of continually blinking LEDs. This circuit grabs attention by swaying an LED gently back and forth like a tree bending in the wind. The movement could have easily been produced by a servo or electric motor but memory wire has the ad- vantage of moving silently. This type of wire is also known as Nitinol, indi- cating that it is an alloy of nickel and titanium. The wire can be deformed into any shape which is retained until heat is applied then it returns to its original shape. The original shape is ‘programmed’ into the wire by heating it to a much higher tem- perature. A bent wire returns to its original straight shape or a straight wire returns to its original pattern. This looks particularly bizarre if the original shape is something like a pa- per clip; straighten it out then apply a little heat and watch it fold back up into a paper clip! Memory wire can also be used to pro- vide mechanical propulsion; in this setup the wire is fixed between two points and then deformed by tension- ing the wire. When heat is applied it shrinks back to its original length pro- ducing a pulling force between the two points. The wire is available in differ- ent diameters and from a number of suppliers [2] [3] [4]. The Mechanics This design repeatedly swings the LED along a trapezoidal shaped path. The motive force is provided by a 15 cm length of 0.15 mm diameter memory wire. It is necessary to put the wire under sufficient tension so that when heat is applied it shrinks by 4 to 5 % back to its original length. Heating is achieved by passing a current of around 300 mA through the wire. The wire is fixed at either end and in the middle forming an angle of 90 degrees. The shortening and length- ening of these small lengths of wire is barely perceptible so the move- ment is magnified by the mechani- cal leverage produced in the LED fixture (see Figure 1). Two lengths of insulated wire with hooked ends provide tension to the memory wire from a 1 cm diameter spring made up of four turns of 0.5 mm copper wire mounted on the circuit board. A small steel spring could be substi- tuted to provide the tension. Each time current passes through one section of the memory wire it contracts and pulls the hook which makes the LED sway. A 10 cm long lever produc- es around 1 to 2 cm of movement in the LED which can be further increased by lengthening the lever. The complete mechanical structure and electron- ics are contained on the prototyping board. Figure 2 is a side view of the assembly and shows the memory wire particularly well. 94 elektor electronics - 12/2006 Figure 1. The memory wire is clamped at three points and tensioned from a spring via two hooked wires. The LED is fitted to the top of the spring. Electronic control The memory wire used in this appli- cation is called Flex-150 [2]; it has a resistance of 50 ohms/m and can car- ry a maximum of 400 mA. Each 7.5 cm length of wire has a resistance of al- most 4 Ohm and should be used with a voltage supply of less than 1.6 V. A sin- gle 1.5 V battery or 1.2 V rechargeable battery can be used for test purpos- es. A microcontroller is used to switch current through the wires so that the LED repeatedly moves along a two- axis path defined by values stored in the software (Figure 3). The switching waveforms have a rela- tively small ‘on to off’ ratio so it is pos- sible to switch current through the memory wire directly from the 4 to 6 V supply (four NiMH cells would be a suitable power source). The BC337 transistors can handle up to 1 A and the PWM switching waveforms are arranged so that there is never more than one transistor conducting at any one time. The program causes the LED to sway between four positions. Source code for the Tiny 11 program can be downloaded free of charge from the Elektor Electronics website [5]. You can also access additional memory wire information along with some sug- gestions for further experimentation. ( 060144 ) Web links m www.stiquito.com [2] www.mikromodellbau.de [3] www.robotstore.com [4] www.memory-metalle.de [5] www.elektor.com (month of publication) Figure 3. Current through the wires is switched by a microcontroller, this ensures consistent, repeatable LED movement. B Figure 2. A side view of the assembly shows the memory wire fixing. Current through the memory wire causes it to pull the LED in that direction. I ci 100|i © PB5 ■Cl PB2 PB3 PB1 PB4 PBO ATTinyll JL 1 4 R1 — | 220 Q |- - 4 B +5V R3 T2 c> BC337 BC337 D1 • — ® 060144-11 12/2006 - elektor electronics 95 TECHNOLOGY LAB TALK Smaller is not Always Better Faultfinding on inaccessible 1C connections Karel Walraven Most of our readers will appreciate that miniaturisation has brought many benefits. It is certainly the case that those small, modern mobile phones look better and are more practical than those old-fashioned bricks you had to lug around (see Retronics elsewhere in this issue). At least as long as they work. Should something go wrong, it seems hope- less to repair it, but it isn't impossible. We'll look into this in more detail here. Have you ever wondered why it is that when you're look- ing for a place on a map, you often find it nearer the edge? That is because the edge of a map takes up a much larger area than you would expect. For example, say you have a map of 1 by 1 m. Half the area of this map is taken up by a square in the middle with dimen- sions of 70 by 70 cm, and the other half is taken up by a strip along the edge, which is just 1 5 cm wide. It does- n't seem much, a strip of just 15 cm, but in practice you find yourself staring at those wretched 1 5 centimetres for half the time... In a similar way, the introduction of 'pin- less' components has had a big impact on miniaturisation. The space taken up by the pins along the edge is just wasted space really. It would be much better if we could mount the ICs right next to each other, with all connections made on the underside. The so-called 'Square Packs' have therefore proved to be very popular (see main photo). The area gained becomes relatively bigger as the chips get smaller. This is because the connecting pins are of a fixed size, so smaller chips have a relatively larger area taken up by the pins compared to larger chips. The differ- ence in area can be as much as a factor of two. Just like our example with the map, a lot of area is lost' by the use of connecting pins along the edge. One of the main rules in faultfinding is that you should always take measurements at the pins of components. After all, you can never be certain that there is a perfect connection between the pin and the PCB track. With square packs it is no longer possible to physically access these connections, so we have to find some other way. However, all is not lost when you're unsure of one of these connections. Although you can't directly access this connection, you can use a handy trick to test the connec- tion with a multimeter (!). This technique also comes in very handy for those of you who solder SMDs, for exam- ple, with our SMD Oven from the January 2006 issue. When the circuit works straight away there is nothing to worry about, otherwise there is a possibility that there is a bad connection between one of the pads under- neath a square pack (or another difficult to reach 1C) and the 1C itself. Even boards manufactured on an industrial scale have a certain percentage of failures, and with some patience and a bit of luck it is possible to repair these PCBs. Most multimeters have a setting that measures diode properties. In this setting the forward voltage drop of the diode is measured when a small test current (usually about 1 mA) is passed through it. That's exactly what we're looking for. First, check that your multimeter comes equipped with this setting (Figure 1). Then try it out with a normal silicon diode and then a Schottky diode. These should give readings of about 0.65 and 0.35 V respectively. And now for the big trick: how can we use the diode-test setting of a multimeter to check the connection of a pin that is inaccessible? Fortunately, virtually every pin on an 1C has protection diodes built in (there are a few excep- tions, such as oscillator circuits and open-collector out- puts). Usually, there is a reverse-biased diode between the pin and ground, and another between the pin and the positive supply (Figure 2). We therefore connect the positive probe of the multimeter to the ground of the cir- cuit and connect the negative probe to the track going to the pin. When there is a good connection between the track and the chip we get a measurement of the internal protection diode and the meter usually gives a reading of about 0.6 to 0.7 V. On the other hand, if there is an open circuit the meter won't give a reading. It is fairly obvious that when the fault is in the ground connection to the 1C, all measurements to the pins will show a faulty connection. Unfortunately, the readings don't always give a clear-cut result. This is because the track doesn't only go to the suspect pin, but also to other components, and these extra connections will often influence the measurement. You should therefore refer to the circuit diagram and esti- mate how much of an effect these connections have (Figure 3). If there is a high-impedance resistor or FET then they can be ignored. Should the track go to another pin on an 1C then it is impossible to know from which pin you're measuring the protection diode. In such cases you're left with just one option: you have to (temporarily) cut the track. ( 065103 - 1 ) 2 V + y- 065103 - 12 12/2006 - elektor electronics 97 The Vinculum famify ol USB Host Controller not only handles the USB Host interface and data transfer functions, but owing to the inbuilt processor core and embedded Flash memory, Vinculum encapsulates the USB device desses as well. When interfacing to mass storage devices such as USB Flash drive, digital camera, or PDA. Vinculum atso transparently handles the FAT Fite structure communicating via UART, SPI or parallel FIFO interfaces via a simple to implement command set. Vinculum provides a new cost effective solution for providing USB Host capability into products that previously did nol have the hardware resources available. CONNECTS WITH 1 USB Dri« Cftmtwi USB PORT 1 USB PORT 2 CRYSTAL _C— I USB HOST/ SLAVE SIE 1 USB HOST/ SLAVE SfE 2 12MHz osc RESET# PROG# TEST PLL FILTER G4k X a FLASH MEMORY VINCULUM GORE I W 33-bit NPU Dual DMA CONTROLLER AOBUS 0-7 I ► FIFO ACBUS 0*7 1/F * ► BOBUS 0-7 4 ► 1 4k x 8 SRAM ID PORTS BC0U5 D-S 4 ► Se^Pfl! e U58Dl*rC m Kbcl’Mcose Future Tech no logy Devices International Limited 373 Scotland Street, Glasgow, G5 6QB. United Kingdom Te(: ++44 (0) 141 429 2777 Fax: +44 (0) 141 429 2758 Email: vinculum sates@ttdichip.com Vinculum Evaluation Modules & Application Areas The ' D [ P 1 module is a n MCU to USB Host Controller de ve lopment mod ufe for the VMC1 L devcoe and is ideal for rapid prototyping and development of VNC1L designs, • Jumper selectahte UART, $PI or FIFO MCU Interfaces • USB "A' type socket to interface with USB peripherals * 2nd USB Interface available via module pins if required * Single 5V supply input - Auxiliary 3.3VJ200mA power output to power external logic ■ Traffic indicator led$ i RIVE ; is possibly the easiest solution for adding a USB Flash Drive interface to existing products. Only four signal lines plus 5V/GND are required lo be connected, * One USB "A" socket to corned lo USB Ftash Drive * Link Selectable UART or SPI interface * Only 4 signals lo connect excluding PWR/GND * Single 5V supply required * Easy to implement command set VMU St C i is a product that not only lets you add USB Ftash Drive interfacing to your product but allows you to play back MP3 and other popular digital music formats direct from a USB Flash Drive. * One USB "A' socket to connect lo USB Flash Drive * Stereo 3,5mm headphone jack socket and audio line-out connector for audio playback, * Unk Selectable UART or SPI interface * Only 4 signals lo conned excluding PWR/GND * Single 5V supply required * Easy to implement command set V NCULUM IMAGINE WAT YOU COULD DESIGN WITi-l IT http://www.vinculum.com INFOTAINMENT RETRONICS SSB receiver for 20 and 80 m (1987) Jan Buiting, PE1CSI Elsewhere in this is- sue you'll find an arti- cle describing a short- wave receiver (150 kHz - 30 MHz) with contem- porary components like a DDS synthesizer, an ARM microcontroller and an LCD. Valuable as they are and adding considerably to ease of use, the micro and the LCD are really just pe- ripherals around the real thing: the receiver proper, i.e., the RF and AF circuitry. Out of cu- riosity I delved into the Elektor relics cabinet and pulled out an al- most intact example of the 20/80 m SSB receiv- er we published in the November 1987 issue. About 20 years ago (time flies!) no eye catch- ing 'design highlights' or 'quick specs' boxes were included in technical arti- cles, which look grim and dry by today's standards, but are really a wonder of technical comprehen- siveness. The style of the article text is 'techie' throughout. I recall writing it, the way it was done in 1 987, and a success it was. For the RF enthusiasts and old hands among you, a quick spec of the 1987 design would read like this: single-conversion USB/ LSB receiver with 9-MHz IF; single free-running DG-MOSFET VCO; DG-MOSFET input stages with soft bandpass and IF notches, manual 20/80 m antenna switching; DG- MOSFET mixers; AGC acting on IF amp, 2.2-kHz audio. There were not too many design quirks in this receiver. The single (!) varicap-controlled VCO has a frequency range of 5. 0-5. 5 MHz. Mixing is additive for the 80-m band (3. 5 + 5. 5 = 9 MHz) and subtractive for the 20-m band (14-5 = 9 MHz). Three paral- lel-connected 27-MHz quartz crystals operating at their funda- mental frequency (9 MHz) form the IF filter with a bandwidth of about 2 kHz. The design has no fewer that five dual-gate MOSFETs from the BF98x series, which were ex- tremely popular at the time, ap- proaching - to a considerable extent — the response and be- haviour of valves. However the devices were also notorious for the ongoing confusion about their pinning. Depending on the man- ufacturer and sometimes even the production batch, the drain and source pins on these devices were identified in different ways (studs, longer/shorter pin, etc.). To help constructors of the receiver (and prevent lengthy technical discus- sions over the telephone), the DG-MOSFET circuit symbol and all three pinout variants of the BF981/982 were clearly printed in the circuit diagram. I realise the 1987 receiver has just two amateur radio bands as opposed to 'general cover- age' for this month's DDS/ARM version but then the 20-m and 80-m bands are by far the most popular hotspots in the short- wave spectrum and SSB is the default mode for voice commu- nications, local (80 m) and DX (20 m). Also, a block diagram and concluding piece of text in the 1 987 article explain how the receiver can be used as the tune- able IF section of a 0-30 MHz communication receiver. Food for thought for advanced con- structors of RF gear. Having fitting two knobs that were missing from the front pan- el of the 1987 receiver I gave it a quick 'electrical' inspection — everything was still in place as assembled 20 years ago by Jan Barendrecht our RF expert. The receiver came alive when con- nected to a 20-m/80-m com- bined dipole I had ac- cess to at my local radio club. The results were not bad, but not con- vincing either, particu- larly when compared to a vintage Yaesu FRG- 7 I had also brought along. The first, glar- ing, shortcoming is the lack of a frequency rea- dout — you really have no idea where you are on the band when turn- ing that multiturn tuning control. Not admitting defeat, on 20 m I sim- ply pitched reception of a mid-strength Balkan- ish SSB station against the FRG-7. The frequen- cy stability, BFO and AGC of the Elektor re- ceiver were beyond re- proach but the receiver as a whole was let down quite badly by none oth- er than its audio sec- tion, more specifically, the loudspeaker fitted in the case! A world of difference when I con- nected headphones, and even better results when I bypassed the flaky LM386, tapping the audio signal at the wiper of the volume pot and feeding it to a dedicated headphone amplifier. Although the receiver has poor prestage filtering, the BF982 MOSFETs go a long way in pre- venting intermodulation and other effects owing to RF over- loading. None the less it will re- quire an antenna tuner / atten- uator when the bands open up due to propagation. Also, the 2.2-kHz bandwidth afforded by the 27 MHz xtals appears to be too wide nowadays and the IF filter slopes are not accurately defined. But then, the price tag compared to an FRG-7... in 1 987, of course! ( 065089-1 A scanned copy of the 1987 article is available free of charge from our website. Go to MAGAZINE December 2006. Retronics is a monthly column covering vintage electronics including legendary Elektor designs. Contributions, suggestions and requests are welcomed; please send an email to editor@elektor.com, subject: Retronics EE. 100 elektor electronics - 12/2006 PUZZLE INFOTAINMENT Hexadoku Puzzle with an electronic touch Time flies when you're having fun but also when... solving an Elektor Hexadoku! Here's the last puzzle for this year 2006 — we hope you or your family members enjoy solving it. If it's your first attempt, don't give up — persist and win a super prize! Participate! Please send your solution (the numbers in the grey boxes) by email, fax or post to: Elektor Electronics Hexadoku Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom. Fax (+44)(0)208 2614447 Email: editor@elektor-electronics.co.uk Subject: hexadoku 12-2006. The closing date is 1 January 2006. The competition is not open to employees of Seg- ment b.v., its business partners and/or associated publishing houses. The instructions for this puzzle are straightforward. In the di- agram composed of 1 6 x 1 6 boxes, enter numbers such that all hexadecimal numbers 0 through F (that's 0-9 and A-F) occur once only in each row, once in each column and in each of the 4x4 boxes (marked by the thicker black lines). A number of clues are given in the puzzle and these determine the start situation. All correct entries received for each month's puzzle go into a draw for a main prize and three lesser prizes. All you need to do is send us the numbers in the grey boxes. The puzzle is also available as a free download from our website (Magazine 2006 December). Prize winners The solution of the October 2006 Hexadoku is: 754C1 . The E-blocks Starter Kit Professional goes to: Tomas Bakke (Horte, Norway). An Elektor SHOP voucher worth £35.00 goes to: L. Bailey (Wheatley); Andrew Larkin (Wivenhoe); Jim Orchard (Chelmsford). Congratulations everybody! 2 3 4 1 0 C A 8 D 5 B C 3 7 4 8 1 5 6 9 F 0 D E B 3 8 4 5 B E 7 2 5 4 6 A 7 9 8 E 5 8 2 9 F 3 4 D 3 A 0 F B 1 8 6 7 6 9 D A 2 C 1 E 7 1 9 C 3 0 A 2 F 8 9 A F 0 4 5 C B 6 3 4 6 1 D C B 2 8 D 1 A 9 5 B 3 4 C 1 5 F E C 2 9 0 4 4 0 B F E C 2 8 3 9 F 5 D 1 C Solve Hexadoku and win! Correct solutions received enter a prize draw for an E-blocks Starter Kit Professional worth £248.55 and three Elektor Electronics SHOP Vouchers worth £35.00 each. We believe these prizes should encourage all our readers to participate! 12/2006 - elektor electronics 101 ELEKTOR SHOWCASE To book your showcase space contact Huson International Media Tel. 0044 (0) 1 932 564999 Fax 0044 (0) 1 932 564998 ATC SEMITEC LTD www.atcsemitec.co.uk Thermal and current-sensitive components for temperature control and circuit protection; • NTC Thermistors • Current Diodes • Thermostats • Re-settable Fuses • Thermal Fuses • Temperature Sensors Call today for free samples and pricing Tel: 0870 901 0777 Fax: 0870 901 0888 AVIT RESEARCH www.avitresearch.co.uk USB has never been so simple... with our USB to Microcontroller Interface cable. Appears just like a serial port to both PC and Microcontroller, for really easy USB connection to your projects, or replacement of existing RS232 interfaces. See our webpage for more details. Only £29.99 inc vat. BAEC http://baec.tripod.com "The British Amateur Electronics Club Archive Website. Archiving extracts from 140+ Newsletters from 1966- 2002. Currently have interesting and useful selected articles from 12 Newsletters. Also a section about built electronics projects with schematics and photos. Plus useful info., downloads and links. NO ADVERTS!" BETA LAYOUT www.pcb-pool.com Beta layout Ltd Award- winning site in both English and German offers prototype PCBs at a fraction of the cost of the usual manufacturer’s prices. COMPULOGIC LTD www.compulogic.co.uk Internet Remote Control Starter Kit £139.99 Create a simple web based remote control interface for many applications • Miniature Web Server Module • Analogue/Digital Module •PSU • Manuals, software, example HTML code CONFORD ELECTRONICS http://www.confordelec.co.uk Lightweight portable battery/mains audio units offering the highest technical performance. Microphone, Phantom Power and Headphone Amplifiers. Balanced/unbalanced signal lines with extensive RFI protection. DANBURY ELECTRONICS http://www.DanburyElectronics.co.uk Transformer manufacturers since 1 983. Visit our new site! Also link directly to Mike Holme’s Valve/- Tube DIY amplifier site, featuring our standard Audio Transformers (Mains, Output, Chokes, PP, SE, etc). EASYSYNC http://www.easysync.co.uk EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and RS485 converters at competitive prices. ELNEC www.elnec.com • device programmer manufacturer • selling through contracted distributors all over the world • universal and dedicated device programmers • excellent support and after sale support • free SW updates • reliable HW • once a months new SW release • three years warranty for most programmers FIRST TECHNOLOGY TRANSFER LTD. http://www.ftt.co.uk/PICProTrng.html Microchip Professional C and Assembly Programming Courses. The future is embedded. Microchip Consultant /Training Partner developed courses: • Distance learning / instructor led • Assembly / C-Programming of PIC1 6, PIC1 8, PIC24, dsPIC microcontrollers • Foundation / Intermediate first Trtrfttfcr ltd. FUTURE TECHNOLOGY DEVICES http://www.ftdichip.com FTDI designs and sells USB-UART and USB-FIFO interface i.c.’s. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB FUTURLEC http://www.futurlec.com Save up to 60% on • Electronic Components • Microcontrollers, PIC, Atmel • Development Boards, Programmers Huge range of products available on-line for immediate delivery, at very competitive prices. HEROS TECHNOLOGY LTD www.herostechnology.co.uk Introducing Modular Concept for microcontrollers. Suitable for Developers, Pre-production, Educational and Hobby applications. • WinPIC2006 USB full speed programmer. • CPU microcontroller modules. • Peripheral modules for all microcontrollers. JLB ELECTRONICS www.jlbelectronics.com Suppliers of electrical / electronic parts and consumables. Including: • Cable ties / bases • Tools / hardware • Bootlace ferrules • Connectors • Solvent sprays & cleaners • PVC Tape • Heat Sink compound KMK TECHNOLOGIES Ltd. http://www.kmk.com.hk Low Cost DIY Robotic Kits and Computer Controller Boards. 102 elektor electronics - 12/2006 products and services directory LONDON ELECTRONICS COLLEGE NEW WAVE CONCEPTS SOURCEBOOST TECHNOLOGIES http://www.lec.org.uk Vocational training and education for national qualifications in Electronics Engineering and Information Technology (BTEC First National, Higher National NVQs, GCSEs and Advanced Qualifications). Also Technical Management and Languages. MODular ElecTRONics www.modetron.com • Plug and Program • FREE application s/w • Hobbyist ease-of-use • Professional finish with enclosure and LEXAN faceplate • We will design and brand your custom application • Growing range of PSU’s, i/o modules, displays and microcontrollers www.new-wave-concepts.com Software for Hobbyists: • Livewire - circuit simulation software, only £34.99 • PCB Wizard - PCB design software, only £34.99 • Circuit Wizard - circuit, PCB and breadboard design software, only £59.99 Available from all Maplin Electronics stores and www.maplin.co.uk PCB WORLD http://www.pcbworld.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. http://www.sourceboost.com Next generation C compiler and development products at highly affordable prices: • C, C++, and Basic compilers for PIC1 2, PIC1 6, PIC18 • Modern IDE, with PIC simulator, source level debugger and virtual devices. • RTOS for PICmicro. • PIC based controller and Development boards. • Download and try for Free from http://www.sourceboost.com SYTRONIC TECHNOLOGY LTD www.m2mtelemetry.com Supplier of wireless modules and accessories for remote monitoring M2M applications. •GSM/GPRS TCP/IP modules ROBOT ELECTRONICS MQP ELECTRONICS http://www.mqpelectronics.co.uk Leaders in Device Programming Solutions. • Online shop • Low Cost Adapters for all Programmers • Single Site and Gang Programmers • Support for virtually any Programmable Device http://www.robot-electronics.co.uk Advanced Sensors and Electronics for Robotics • Ultrasonic Range Finders • Compass modules • Infra-Red Thermal sensors • Motor Controllers • Vision Systems • Wireless Telemetry Links • Embedded Controllers SHOWCASE YOUR COMPANY HERE Elektor Electronics has a feature to help customers promote their business, Showcase - a permanent feature of the magazine where you will be able to showcase your products and services. • For just £220 + VAT (£20 per issue for eleven issues) Elektor will publish your company name, website adress and a 30-word description • For £330 + VAT for the year (£30 per issue for eleven issues) we will publish the above plus run a 3cm deep full colour image - e.g. a product shot, a screen shot from your site, a company logo - your choice Places are limited and spaces will go on a strictly first come, first served basis. So please fax back your order today! I wish to promote my company, please book my space: • Text insertion only for £220 + VAT • Text and photo for £330 + VAT NAME: ORGANISATION: JOB TITLE: ADDRESS: .TEL: PLEASE COMPLETE COUPON BELOW AND FAX BACK TO 00-44-(0)1932 564998 COMPANY NAME WEB ADDRESS 30- WORD DESCRIPTION • Embedded GSM/GPRS modem • Development Kits • GPS modules • GSM/GPS antennas • Adapter cables Online ordering facilities. Tel: 01728 685802 ULTRALEDS |Ui «&«■<* http://www.ultraleds.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://www.usb-instruments.com USB Instruments specialises in PC based instrumentation products and software such as Oscilloscopes, Data Loggers, Logic Analaysers which interface to your PC via USB. VIRTINS TECHNOLOGY www.virtins.com PC and Pocket PC based virtual instrument for electronics enthusiasts, students, professionals and scientists, including sound card real time oscilloscope, spectrum analyzer, and signal generator. Free to download and try. 12/2006 - elektor electronics 103 Quasar Electronics Limited PO Box 6935, Bishops Stortford CM23 4WP, United Kingdorfi Tel: 0870 246 1826 Fax: 0870 460 1045 E-mail: sales@quasarelec}t Web: www.QuasarElectro ronics.com nics.com 08717 Re All price Postage Delivery £6.95; lOrder o| Paymenj payable Call noW modules $ INCLUDE 1 7.5*51 & Packing Optio -£3.95; UK Main o VAT. ns (Up to 2Kg groks weight): UK and Next Day De livery - £8.95; Eu st of World - £9.95 (up to 0.5Kg). )iline for reduced price UK Postage! We accept all major credit/debit to Quasar Electronics. for our FREE CATALOGUE with details of over 3Q and publications. Discounts for bulk quantities Cr4dit Card Standard 3-7 Day rope (EU) - cards. Make chegues/PO’s 0 kits, projects, I 177 VISA VtSA Electron 168 SWITCH SOLO 3HV*S ilHo! Ho^aChri strops 2006 i§$m it's wa§£ i L BUT OpNT PANlCfl it M ( .. .. We have some fantastic gift ideas for young (and old) enquiring mindsE ?)( 30 in ONE -£15.95 Order Code EPL030KT 130 in ONE -£37.95 Order Code EPL130KT 300 in ONE -£59.95 Order Code EPL300KT 500 in ONE -£149.95 Order Code EPL500KT Robot Sensor - £19.95 Order Code EPLR20KT Digital Recording Laboratory - £29.95 Order Code EPLDRKT AM-FM Radio Kit -£6.95 Order Code ERKAFKT Short Wave Kit - £6.95 Order Code ERKSWKT Crystal Radio Kit - £6.95 Order Code ERKCKT Electronic Bell -£8.95 Order Code EAKEBKT Electronic Motor - £8.95 Order Code EAKEMKT Generator - £8.95 Order Code EAKEGKT Room Alarm - £4.95 Order Code EAKRAKT Hand Held Metal Detector - £9.95 Order Code ELMDX7KT Metal Detector - £9.95 Order Code ELMDKT Automech - £12.95 Order Code C21-605KT Coptermech -£12.95 Order Code C21-604KT Stegomech -£12.95 Order Code C21-602KT Tyrannomech -£12.95 Order Code C21-601KT Musical LED Jingle Bells -£17.95 Order Code 1176KT Trainmech - £12.95 Order Code C21-606KT Flashing LED Christ- mas Tree - £6.95 Order Code 4080KT Robomech -£12.95 Order Code C21-603KT See our website for even more great gift ideas! 'm WW 1 /v. Quasa \rEle >ctro nics a O 0 1 Secure Online G rdering Facilil ;ies • Full Product Listing, C Ascriptions & Photos • Kit 1 Documentatio n & Software 1 Downloads lektor Order now using the Order Form in the Readers Services section in this issue. CD-ROM Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Telephone +44 208 261 4509 Fax +44 208 261 4447 Email: sales@elektor.com BESTSELLERS USB TOOLBOX This CD-ROM contains tech- nical data about the USB interface. It also includes a large collection of data sheets for specific USB components from a wide range of manu- facturers. There are two ways to incorporate a USB interface in a microcontroller circuit: add a USB controller to an existing circuit, or use a microcontroller with an integrated USB inter- face. Included on this CD-ROM are USB Basic Facts, several useful design tools for hardware and software, and all Elektor Electronics articles on the subject of USB. £18.95 (US$ 34.95) Home Automation This CD-ROM provides an overview of what manufactu- rers offer today in the field of Home Networking, both wired and wireless. The CD-ROM contains specifications, stan- dards and protocols of com- mercially available bus and network systems. For develo- pers, there are datasheets of specific components and various items with application data. End-users and hobbyists will find ready-made applications that can be used immediately. £12.95 (US$ 22.90) ECD Edition 3 Elektor’s Components Data- base gives you easy access to design data for over 5,000 ICs, more than 35,000 transis- tors, FETs, thyristors and triacs, just under 25,000 dio- des and 1 ,800 optocouplers. All databank applications are fully interactive, allowing the user to add, edit and com- plete component data. £14.95 (US$ 26.50) Microcontroller Basics Microcontrollers have become an indispensable part of modern electronics. They make things possible that vastly exceed what could be done previously. Innumerable applications show that almost nothing is impossible. There’s thus every reason to learn more about them. This book offers more than just a basic introduction. It clearly explains the technology using various microcontroller circuits and programs written in several different programming languages. In the course of the book, the reader gradually develops increased competence in converting his or her ideas into microcontroller circuitry. ISBN 0-905705-67-X 230 Pages £18.70 (US$ 33.70) Visual Basic for Electronics Engineering Applications This book is targeted towards those people that want to control existing or home made hardware from their computer. After familiarizing yourself with Visual Basic, its development environment and the toolset it offers are discussed in detail. Each topic is accompanied by clear, ready to run code, and where necessary, schematics are provided that will get your projects up to speed in no time. I»r Electronics EnsjiJiEmng fljQllcalions ISBN 0-905705-68-8 476 Pages £27.50 (US$ 51 .50) BESTSELLING BOOKS — Top-5 Visual Basic for Electronics Engineering Applications ISBN 0-905705-68-8 £27.50 (US$ 51.50) Microcontroller Basics ISBN 0-905705-67-X £18.70 (US$ 33.70) PC-Interfaces under Windows ISBN 0-905705-65-3 £25.95 (US$ 52.00) Modern High-end Valve Amplifiers ISBN 0-905705-63-7 £25.95 (US$ 52.00) 308 Circuits ISBN 0-905705-66-1 £18.20 (US$ 37.00) More information on www.elektor.com Order o www.ele Order now using the Order Form in the Readers Services section in this issue. lektor USB-stick with ARM and RS232 (November 2006) Assembled and tested board 060006-91 £79.90/ $149.95 GameBoy ElectroCardioGraph (October 2006) PCB, ready built and tested 050280-91 £ 55.20 / $ 1 03.95 PIC In-Circuit Debugger/Programmer (October 2006) Kit of parts including PCB, programmed controller and all components. 050348-71 £ 34.50 / $ 64.95 RC Servo Tester / Exerciser (July/August 2006) Kit of parts including PCB, programmed controller and all components. 040259-71 £ 22.70 / $ 42.85 50.00 10.25 MORE READY-BUILT PROJECTS ClariTy 300-W Class-T Amplifier 030217-91 Amplifier board with SMDs pre-fitted; cores for LI & L2 Electrosmog Tester 050008-91 PCB, ready built and tested 050008-71 Matching enclosure Flash Microcontroller Starter Kit 01 0208-91 Ready-assembled PCB incl. software, cable, adapter & related articles 69.00 Gameboy Digital Sampling Oscilloscope (GBDSO) 990082-91 Ready-assembled board, incl. the PC software and related articles 103.00 LPC210x ARMee Development System 040444-91 Processor board, ready-made and tested 25.50 Micro Webserver with MSC1210 Board 030060-91 Microprocessor Board, ready-assembled 75.90 044026-91 Network Extension Board, ready-assembled 44.50 044026-92 Combined package (030060-91 & 044026-91 & related articles) 117.50 ECG using a Sound Card 34.50 55.70 94.25 19.30 112.50 183.00 48.05 142.95 83.95 220.95 NO. 361 DECEMBER 2006 Shortwave Capture 030417-1 PCB, bare (receiver board) www.thepcbshop.com 030417-2 PCB, bare (control & display boards) www.thepcbshop.com 030417-41 AT90S8515-8PC, programmed 11.40 21.45 NO. 360 NOVEMBER 2006 USB Stick with ARM and RS232 060006-1 PCB, bare 11.00 20.75 060006-41 AT91SAM7S64, programmed 27.60 51.95 060006-91 assembled & tested board 79.90 149.95 060006-81 CD-ROM, all project software 5.20 9.75 NO. 359 OCTOBER 2006 PIC In-Circuit Debugger/Programmer 050348-1 PCB 5.20 9.75 050348-41 PIC16F877, programmed 17.90 33.75 050348-71 Kit, incl. PCB, controller, all parts 34.50 64.95 GBECG - Gameboy ElectroCardioGraph 050280-91 PCB, ready built and tested 55.20 103.95 040479-1 PCB 5.20 9.75 040479-81 CD-ROM, all project software 5.20 9.75 NO. 358 SEPTEMBER 2006 Elektor RFID Reader 060132-91 PCB, ready assembled & tested, with USB cable 41.50 77.95 030451-72 Standard back-lit LC display 7.25 13.65 060132-71 Matching enclosure 8.90 16.85 060132-81 CD-ROM, all project software 5.20 9.75 Experimental RFID Reader 060221-11 Disk, all project software 5.20 9.75 060221-41 ATmegal 6, programmed 8.90 16.85 DiSEqC Monitor 040398-1 1 Disk, PIC source & hex code 5.20 9.75 040398-41 PIC16F628A-20/P, programmed 5.50 10.35 USB/DMX512 Converter 06001 2-1 1 Disk, all project software 5.20 9.75 060012-41 PIC16C745, programmed 6.90 12.95 NO. 356/357 JULY/AUGUST 2006 RC Servo Tester/Exerciser 040172-11 Disk, project software 5.20 9.75 040172-41 PIC1 6F84(A), programmed 10.30 19.40 040172-71 Kit, incl. PCB, controller, all parts 22.70 42.85 LED Thermometer 0301 90-1 1 Disk, project software 5.20 9.75 030190-41 PIC16F873-20/SP, programmed 16.50 31.00 Toothbrush Timer 050146-11 Disk, project software 5.20 9.75 050146-41 AT90S2313-10PC, programmed 6.90 12.95 Easy Home Control 050233-11 Disk, project software 5.20 9.75 050233-41 PIC16F84, programmed 10.30 19.40 Universal LCD Module 050259-11 Disk, project software 5.20 9.75 050259-41 AT90S2313, programmed 6.90 12.95 nline at ktor.com Due to practical constraints, final illustrations and specifications may differ from published designs. Prices subject to change. See www.elektor.com for up to date information. Elektor RFID-reader Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 (0) 208 261 4509 Fax: +44 (0) 208 261 4447 Email: sales@elektor.com Kits & Modules (September 2006) Ready-built and tested PCB with USB port for connection to the PC. Including USB cable; not including display and enclosure. - Read and write 13.56 MHz RFID cards - MIFARE and ISO 14443-A compatible - Programmable 060132-91 £ 41 .50 / $ 77.95 LC-display 030451-72 £7.25/ $13.65 Matching enclosure 060132-71 £ 8.90 / $ 1 6.85 CD-ROM (all project software) 060132-81 £ 5.20 / $ 9.75 GameBoy Programmable Logic Controller (July/August 2006) GBPLC Module Ready-assembled and tested GBPLC Module and Programming Interface 050190-91 ^ £ 84.95 / $ 1 59.95 GBPLC l 2 C I/O Box Ready assembled and tested board 060098-91 £ 84.95 / $ 1 59.95 Combined package GBPLC Module and I/O Extension £ 1 49.80 / $ 279.00 I 1-Wire Thermometer with LCD 060090-1 1 Disk, project software 5.20 9.75 060090-41 PIC16F84A-04CP, programmed 10.30 19.40 GBPLC - Gameboy PLC 050190-1+2 PCBs, bare, GBPLC Module & Programming Interface 11.70 22.00 050190-51 Programmed PAL, EEPROM and Flash 1C 11.00 20.75 050190-91 Ready-built and tested GBPLC Module and Programming Interface 84.95 159.95 GBPLC - I2C I/O Box 060098-1 PCB, bare 17.90 33.75 060098-91 Ready-built and tested board 84.95 159.95 Binary Clock 020390-1 1 disk, project software 5.20 9.75 020390-41 PIC6C54-04/P, programmed 8.05 15.10 No. 355 JUNE 2006 FM Stereo Test Transmitter 050268-1 PCB 11.70 22.00 Network Cable Analyser 050302-1 PCB 8.20 15.55 050302-1 1 Disk, PIC source code 5.20 9.75 050302-41 PIC1 6F874-20/P 16.90 31.85 NO. 354 MAY 2006 Onboard OBD-2 Analyser 0501 76-72 Kit of parts, incl. 0501 76-1 , 0501 76-2, 0501 76-42, all components, excl. LCD and Case 24.80 46.70 050176-73 LCD, 4x20 characters with backlight 28.80 54.50 050176-74 Case, Bopla Unimas 160 with Perspex cover and mounting plate 15.80 29.90 050176-42 ATmegal 6, programmed 10.30 19.45 050092-71 OBD-2 Analyser: Kit of parts without cable 52.50 96.95 050092-72 OBD-2 Analyser: DB9 to OBD adapter cable 27.55 51.95 Mini ATMega Board 0501 76-1 PCB, includes adapter PCB 0501 76-2 8.95 16.85 NO. 353 APRIL 2006 Simple recharable A Cell Analyser 050394-1 PCB, bare 4.80 9.04 050394-1 1 Disk, PC Software 5.18 9.75 Universal SPI Box 050198-41 AT89C2051-24PC, Programmed 7.25 13.65 No. 352 MARCH 2006 Application Board for R8C/13 050179-92 Ready-assembled board 48.27 90.94 050179-1 PCB 13.77 25.94 030451-72 LCD with backlight 7.25 13.65 030451-73 Poly-LED display 25.50 48.05 FPGA-Prototyping board 050370-91 Ready assembled board For subscribers 181.80 333.50 For non-subscribers 216.30 398.50 Telephone Eavesdropper 030379-1 PCB 9.05 17.05 Versatile FPGA Module 040477-91 Ready assembled plug-on module For subscribers 181.80 333.50 For non-subscribers 216.30 398.50 NO. 351 FEBRUARY 2006 Brushless Motor Controller 050157-41 ST7MC1, programmed 3.80 7.15 A 16-bit Tom Thumb 050179-91 R8C Starter Kit 8.30 15.60 050179-C5 Set of 5 pcs. R8C13 microcontroller only 20.70 39.00 No. 350 JANUARY 2006 95-watt Laptop PSU Adaptor 050029-1 PCB 4.80 9.05 Automatic Attic Window Controller 0501 39-1 1 Disk, PIC source & hex code 5.20 9.75 050139-41 PIC16F84A-20I/P, programmed 13.10 24.65 Products for older projects (if available) may be found on our website www.elektor.com home construction = fun and added value INFO & MARKET SNEAK PREVIEW Free CD-ROM from 1 Microchip/Labcenter/Elektor I In the January 2007 issue we launch EXPLORER- 1 6, a 1 6-bit PIC microcontroller project brought to you jointly by Microchip, Labcenter and Elektor Electronics magazine. The project is based on a number of hard- ware and software components, exclusively gathered for Elektor readers. The first instalment of the series covers the installation and practical use of two Microchip software contributions to the free CD-ROM: the MPLAB development suite for PIC micros and — buckle up — the C30 Compiler! Space allowing we will also introduce you to the workings of Proteus VSM, Labcenter's software that's so powerful it can simulate the inter- action between a microcontroller and any analogue or digital hardware connected to it! Overclocking CPUs and Micros For as long as we can remember, CPUs in PCs have been subjected to overclocking experiments, sometimes with catastrophic results. Whenever a new CPU appears on the market, it does not take speed tweakers long to make things run faster. What's rarely seen however is information on overclocking of laptop PCs. In our January issue we venture to cover the subject in some detail with a Centrino-based laptop as the guinea pig. Also... Multi-purpose Milling Machine; LED Rotating Text Display; Berlin Clock Remake; Texas Instruments Clock Generator; FPGA Course (8); Hexadoku. Nixie Clock in Sputnik Design Entirely fitting a January issue we have several articles on clocks and clocking systems. One of the pinnacles, we're sure, is our Sputnik Clock which uses nixie tubes for the time readout. The clock is designed to look like a miniature version of the first man-made satellite to make it into an orbit around the earth. r a RESERVE YOUR COPY NOW! The January 2007 issue goes on sale on Thursday 21 December 2006 (UK distribution only). UK mainland subscribers will receive the magazine between 1 8 and 20 December 2006. Article titles and magazine contents subject to change, please check www.elektor.com. NEWSAGENTS ORDER FORM SHOP SAVE / HOME DELIVERY Please save / deliver one copy of Elektor Electronics magazine for me each month Name: Address: Post code: Telephone: Date: Signature: lectronics Please cut out or photocopy this form, complete details and hand to your newsagent. Elektor Electronics is published on the third Thursday of each month, except in July. .elektor.com www.elektor.com www.elektor.com www.elektor.com www.elektor. Elektor Electronics 33 the web All magazine articles back to volume 2000 are available online in pdf format. The article summary and parts list (if applicable) can be instantly viewed to help you positively identify an article. Article related items are also shown, including software down- loads, circuit boards, programmed ICs and corrections and updates if applicable. Complete magazine issues may also be downloaded. In the Elektor Electronics Shop you'll find all other products sold by the publishers, like CD-ROMs, kits and books. A powerful search function allows you to search for items and references across the entire website. Also on the Elektor Electronics website: • Electronics news and Elektor announcements • Readers Forum • PCB, software and e-magazine downloads • Surveys and polls • FAQ, Author Guidelines and Contact 108 elektor electronics - 12/2006 Please supply the following. For PCBs, front panel foils, EPROMs, PALs, GALs, microcontrollers and diskettes, state the part number and description; for books, state the full title; for photocopies of articles, state full name of article and month and year of publication. PLEASE USE BLOCK CAPITALS. Description Price each Qty. Total Order Code CD-ROM USB Toolbox £ 18.95 CD-ROM Home Automation £ 12.95 Visual Basic for Electronics Engineering Applications £ 27.50 Elektor RFID Reader £ 41.50 Matching enclosure £ 8.90 Sub-total Prices and item descriptions suhject tn change The publishers reserve the right to change prices PZP without prior notification. Prices and item descriptions shown here supersede those in previous issues. E. & O.E. _ Total paid Name METHOD OF PAYMENT (see reverse before ticking as appropriate) □ □ □ □ Bank transfer Cheque (UK-resident customers ONLY) Giro transfer curocj^e'i iWdtfBffard m Expiry date: Verification code: SWITCH ONLY: Start date: Issue number: .... Please send this order form to * (see reverse for conditions) Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Address + Post code Tel. Email Date - - 2006 Signature EL12 Tel.: +44 208 261 4509 Fax: +44 208 261 4447 www.elektor.com sales@elektor.com *USA and Canada residents may (but are not obliged to) use $ prices, and send the order form to: Old Colony Sound Lab P.O. Box 876, Peterborough NH 03458-0876. Tel. (603) 924-6371, 924-6526, Fax: (603) 924-9467 Email: custserv@audioXpress.com Yes, I am taking out an annual subscription to Elektor Electronics and receive a free 1 W Luxeon LED Torchlight. I would like: I I Standard Subscription (11 issues) Subscription-Plus (11 issues plus the Elektor Volume 2006 CD-ROM) * Offer available to Subscribers who have not held a subscription to Elektor Electronics during the last 12 months. Offer subject to availability. See reverse for rates and conditions. METHOD OF PAYMENT (see reverse before ticking as appropriate) □ □ □ □ Bank transfer Cheque (UK-resident customers ONLY) Giro transfer cunocueD iV.jsiP/fjrri Expiry date: Verification code: SWITCH ONLY: Start date: Name Address + Post code Tel. Email Date - - 2006 Signature * cross out what is not applicable EL12 Issue number: Please send this order form to Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 208 261 4509 Fax: +44 208 261 4447 www.elektor.com subscriptions@elektor.com ORDERING INSTRUCTIONS, P&P CHARGES Except in the USA and Canada, all orders, except for subscriptions (for which see below), must be sent BY POST or FAX to our Brentford address using the Order Form overleaf. On-line ordering: http://www.elektor-electronics.co.uk Readers in the USA and Canada may (but are not obliged to) send orders, except for subscriptions (for which see below), to the USA address given on the order form. Please apply to Old Colony Sound for applicable P&P charges. Please allow 4-6 weeks for delivery. Orders placed on our Brentford office must include P&P charges (Priority or Standard) as follows: UK: £4.00 Europe: £5.00 (Standard) or £7.00 (Priority) Outside Europe: £8.00 (Standard) or £12.00 (Priority) HOWTO PAY All orders must be accompanied by the full payment, including postage and packing charges as stated above or advised by Customer Services staff. Bank transfer into account no. 40209520 held by Elektor Electronics (Publishing) / Segment b.v. with ABN-AMRO Bank, London. IBAN: GB35 ABNA 4050 3040 2095 20. BIC: ABNAGB2L. Currency: sterling (UKP). Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Elektor Electronics (Publishing) / Segment b.v.. We can only accept sterling cheques and bank drafts from UK-resident customers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. Giro transfer into account no. 34-1 52-3801 , held by Elektor Electronics (Publishing) / Segment b.v. Please do not send giro transfer/deposit forms directly to us, but instead use the National Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA, Access, MasterCard, JCBCard and Switch cards can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL-protected for your security. COMPONENTS Components for projects appearing in Elektor Electronics are usually available from certain advertisers in this magazine. If difficulties in the supply of components are envisaged, a source will normally be advised in the article. Note, however, that the source(s) given is (are) not exclusive. TERMS OF BUSINESS Delivery Although every effort will be made to dispatch your order within 2-3 weeks from receipt of your instructions, we can not guarantee this time scale for all orders. Returns Faulty goods or goods sent in error may be returned for replacement or refund, but not before obtaining our consent. All goods returned should be packed securely in a padded bag or box, enclosing a covering letter stating the dispatch note number. If the goods are returned because of a mistake on our part, we will refund the return postage. Damaged goods Claims for damaged goods must be received at our Brentford office within 10-days (UK); 14-days (Europe) or 21 -days (all other countries). Cancelled orders All cancelled orders will be subject to a 10% handling charge with a minimum charge of £5-00. Patents Patent protection may exist in respect of circuits, devices, components, and so on, described in our books and magazines. Elektor Electronics (Publishing) does not accept responsibility or liability for failing to identify such patent or other protection. Copyright All 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 any form or by any means, including photocopying and recording, in whole or in part, without the prior permission 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 nature. Notwithstanding the above, printed-circuit boards may be produced for private and personal use without prior permission. Limitation of liability Elektor Electronics (Publishing) shall not be liable in contract, tort, or otherwise, for any loss or damage suffered by the purchaser whatsoever or howsoever arising out of, or in connexion with, the supply of goods or services by Elektor Electronics (Publishing) other than to supply goods as described or, at the option of Elektor Electronics (Publishing), to refund the purchaser any money paid in respect of the goods. Law Any question relating to the supply of goods and services by Elektor Electronics (Publishing) shall be determined in all respects by the laws Of England. January 2006 SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION Standard Plus United Kingdom £41 .90 £48.80 Surface Mail Rest of the World £54.50 £61.40 USA & Canada US$ 95.50 US$106.50 Airmail Rest of the World £68.90 £75.80 USA & Canada US$120.00 US$131.00 HOWTO PAY Bank transfer into account no. 40209520 held by Elektor Electronics (Publishing) / Segment b.v. with ABN-AMRO Bank, London. IBAN: GB35 ABNA 4050 3040 2095 20. BIC: ABNAGB2L. Currency: sterling (UKP). Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Elektor Electronics (Publishing) / Segment b.v.. We can only accept sterling cheques and bank drafts from UK-resident customers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. Giro transfer into account no. 34-152-3801, held by Elektor Electronics (Publishing) / Segment b.v. Please do not send giro transfer/ deposit forms directly to us, but instead use the National Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA, Access, MasterCard, JCBCard and Switch cards can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL-protected for your security. SUBSCRIPTION CONDITIONS The standard subscription order period is twelve months. If a perma- nent change of address during the subscription period means that copies 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% (twenty per cent) reduc- tion in current rates, must be supported by evidence of studentship signed by the head of the college, school or university faculty. A standard Student Subscription costs £33.50, a Student Subscription- Plus costs £40.40 (UK only). Please note that new subscriptions take about four weeks from receipt of 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 higher, plus the cost of any issues already dispatched. Subsciptions cannot be cancelled after they have run for six months or more. January 2006 Order now using the Order Form in the Readers Services section in this issue. Elektor Electronics (Publishing) Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel. +44 208 261 4509 See also www.elektor.com There are two ways to incorporate a USB interface in a microcontroller circuit. You can add a USB controller to an existing circuit, or use a microcontroller with an integrated USB interface. Both options are available on this CD-ROM. USB Toolbox provides information on all ICs suitable for different applications. A sub-division has been made in controllers, hubs, micro- controllers and others. What is perhaps more interesting for many designers however, is the extremely extensive software collection which contains drivers, tools and components for Windows, Delphi and various microcontroller families. Of course, none of the Elektor Electronics articles on the subject of USB are missing on this CD-ROM leading the way lectromcs CD-ROM ISBN 90-5381-212-1 £18.95 /US$34.95 USB TOOLBOX Embedded USB Know How This CD-ROM contains all the essential information a designer needs to start working with the USB interface. It includes a large collection of data sheets for specific USB components from a wide range of manufacturers. Know Index of Advertisers ATC Semitec Ltd, Showcase www.atcsemitec.co.uk 102 Avit Research, Showcase www.avitresearch.co.uk 102 BAEC, Showcase http://baec.tripod.com 102 Beijing Draco www.ezpcb.com 37 Beta Layout, Showcase www.pcb-pool.com 7, 102 Bitscope Designs www.bitscope.com 3 By Vac www.byvac.co.uk 69 Compulogic, Showcase www.compulogic.co.uk 102 Conford Electronics, Showcase www.confordelec.co.uk 102 Cricklewood www.cctvcentre.co.uk 69 Danbury, Showcase www.DanburyElectronics.co.uk 102 Easysync, Showcase www.easysync.co.uk 102 Elnec, Showcase www.elnec.com 102 Eptsoft www.eptsoft.com 78 Euro circuits www.eurocircuits.com 6 First Technology Transfer Ltd, Showcase .www.ftt.co.uk 102 Future Technology Devices, Showcase . . .www.ftdichip.com 98, 99, 102 Futurlec, Showcase www.futurlec.com 102 FHeros Technology, Showcase www.herostechnology.co.uk 102 Intronix Test Instruments www.pcTestlnstruments.com 41 Jaycar Electronics www.jaycarelectronics.co.uk 2 JB Systems, Showcase www.modetron.com 103 JLB Electronics, Showcase www.jlbelectronics.com 102 KMK Technologies Ltd, Showcase www.kmk.com.hk 102 Labcenter www.labcenter.co.uk 112 Lichfield Electronics www.lichfieldelectronics.co.uk 37 London Electronics College, Showcase . .www.lec.org.uk 103 MQP Electronics, Showcase www.mgpelectronics.co.uk 103 New Wave Concepts, Showcase www.new-wave-concepts.com 103 Newbury Electronics www.newburyelectronics.co.uk 22 Number One Systems www.numberone.com 69 Nurve Networks www.xgamestation.com 22 PCB World, Showcase www.pcbworld.org.uk 103 Pico www.picotech.com 7 Quasar Electronics www.guasarelectronics.com 104 Redline www.redlineplc.com 78 Robot Electronics, Showcase www.robot-electronics.co.uk 103 Scantool www.ElmScan5.com/elektor 6 Showcase 102,103 SourceBoost Technologies, Showcase . . .www.sourceboost.com 103 Sytronic Technology Ltd, Showcase www.m2mtelemetry.com 103 Ultraleds, Showcase www.ultraleds.co.uk 103 USB Instruments, Showcase www.usb-instruments.com 103 Velleman www.velleman.eu i-TRIXX backcover Virtins Technology, Showcase www.virtins.com 103 Advertising space for the issue of 22 January 2007 may be reserved not later than 22 December 2006 with Huson International Media - Cambridge House - Gogmore Lane - Chertsey, Surrey KT16 9AP - England - Telephone 01932 564 999 - Fax 01 932 564998 - e-mail: aerrvb@husonmedia.com to whom all correspondence, copy instructions and artwork should be addressed. 12/2006 - elektor electronics 111 ELECTRONIC DESIGN ISIS SCHEMATIC CAPTURE A powerful capture package tailored for todays engineer and designed to allow rapid entry of complex schematics for simulation and PCB Layout. r_ PHo 5 PICE MIXED MODE SIMULATOR A customised implementation of the industry standard Berkeley SPICE 3F5 engine with extensive optimisations and enhancements for true mixed mode simulation and circuit animation. SCHEMATIC CAPTURE EMBEDDED SIMULATION PCB DESIGN VSM VIRTUAL SYSTEM MODELLING The worlds first and host schematic based microcontroller co-simulation software. Proteus VSM allows you to simulate the Interaction between software running on a microcontroller and any analog cr digital electronics connected to it. This streamlines the project lifecycle and obviates the need for expensive hardware analysis tools, iin ■■ 14 ii iii A modern and professional layout package which seamlessly integrates with the 1SI$ capture software. Features such as outplacement and auto routing, interactive DRC and an Intuitive Interface all serve to maximise productivity and reduce time to market, EOtVTACT US HOW A technology pioneer In the EDA Industry since I960, to discuss requirements or Technical support direct from the program authors, request a FREE evaluation copy. Flexible packages and pricing tailored to customer requirements* Tel: 01756 753440 Fax: CM 756 751857 Email: infD#]abtEiiter.cQ.uk Labce-nter EIelLi uorlcu Ltd., Main Street;, Grassingtan, North Yorks. BOB 3 5AA. Registered in England 4692454