£ 3.90 www.efektor.com JUNE 2008 aus $ 12.90 - nz $ 15.50 -sar 84.95 -us$ 9.95 electronics worldwide SATISFACT 9 770268 45113 5 imm II TFTI nWm aainf im J' Lai Wmsted l 1 . B 1 II V 9 | H ffAii *£ POPULAR KITS These are some of our most popular kits and there is something for eveyone. They are designed for ease of construction and robust reliability. All of our kits are supplied with quality fibreglass PCBs, board components and clear English instruction. Jaycar kits can be built with confidence. Full Function Smart Card Reader / Programmer Kit KC-5361 £15.95 + postage & packing Program both the microcontroller and EEPR0M in ISO-7816 compliant Gold, Silver and Emerald wafer cards. Powered by 9-12 VDC wall adaptor or a 9V battery. Kit supplied with PCB, wafer card socket and all electronic components. PCB measures: 141 x 101mm SMS Controller Module KC-5400 £15.95 + post & packing This kit will allow you to remotely control up to eight devices and monitor four digital inputs via an old Nokia handset such as the 5110, 6110, 3210, or 3310. Kit supplied with PCB, pre-programmed microcontroller and all electronics components with clear English instructions. Requires a Nokia data cable and handset. Micromitter Stereo FM Transmitter Kit KC-5341 £15.95 + post & packing This compact transmitter will connect to your CD or MP3 player and send your music to an FM radio anywhere in your house. Crystal locked to a preselected frequency to eliminate drift. Supplied with revised PCB with solder mask and overlay, case, silk screened lid and all electronic components. Some surface mounting soldering required. Audio Playback Adaptor for CD-ROM Drives KC-5459 £19.00 + post & packing Put those old CD-ROM drives to good use as CD players using this nifty adaptor kit. The adaptor accepts signals from common TV remote controls and operates the audio functions of the drive as easily as you would control a normal CD player. Kit features a double sided PCB, pre-programmed micro controller, and IDC connectors for the display panel. CATALOGUE FOR MORE EXCITING KITS & HOBBYIST EQUIPMENT TTivll ■ Starship Enterprise Door Sound Emulator KC-5423 £1 1 .75 + post & packing FOR ALL YOU TREKKIE FANS! This easy to build kit emulates the unique sound of a cabin door opening or closing on the Star Ship Enterprise. The sound can be triggered by switch contacts or even fitted to automatic doors. Comes with PCB with overlay, speaker, case and all specified components. 9- 12VDC regulated. Starter Projects & Tools 50MHz Frequency Meter Mh II KC-5440 £20.50 + post & packing This compact, low cost 50MHZ Frequency Meter is invaluable for servicing and diagnostic work. Kit includes PCB with overlay, enclosure, LCD and all electronic components. Features include: • 8 digit reading (LCD) • Prescaler switch • Autoranging Hz, kHz or MHz ■»- S Component Lead Forming Tool TH-1810 £2.00 + postage & packing This handy forming tool provides uniform hole spacing from 10 to 38mm. Made in USA from engineering plastic. • 138mm long Pin Extractor Press TH-2014 £3.00 + postage & packing A handy little pin-extractor/inserter press with a 0.8mm punch. Mainly intended for taking links out of watch bands, but endless other uses for jewellery making, model making and hobbies. • 2 spare pin punches • Assortment of 12 pins Screwdriver Helper NM-2830 £4.00 + postage & packing Dramatically increases the amount of torque you can apply to a damaged screw. Just apply a drop or two of Screwdriver Helper to instantly help remove or tighten screws with damaged heads. Silver Conductive Varnish NS-3030 £2.95 + postage & packing Repairs printed circuits, window antennas, window alarm loops etc. Very good conducting properties. Approximately 0.02 - 0.1 ohms/cm 2 . i f How To Order v / Post and Packing Charges Order Value Cost Order Value Cost £10 - £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 £10. Note: Products are despatched from Australia, so local customs duty and taxes may apply. How to order: Call Australian Eastern Standard Time Mon-Fri Phone: 0800 032 7241 Fax: +61 2 8832 3118 Email: techstore@jaycarelectronics.co.uk Post: P.0. Box 107, Rydalmere NSW 2116 Australia Expect 10-14 days for air parcel delivery Wire Glue 9ml NM-2831 £2.75 + postage & packing A conductive adhesive that enables you to make solder-free connections when you aren't able to solder. Hundreds of hobby, trade and electronics uses. Lead-free, cures overnight. • 9ml Hire Coax Seal Tape NM-2828 £3.00 + postage & packing This versatile material looks like ordinary PVC electrical tape but is actually a handy sealing system that fuses together to form a removable, waterproof seal once it has been applied. 12mm wide x 1.5m long. Check out the Jaycar range in your FREE Catalogue - logon to www.jaycarelectronics.co.uk/elektor or check out the range at www.jaycarelectronics.co.uk 0800 032 7241 (Monday - Friday 09.00 to 17.30 GMT + 10 hours only) For those who want to write: PO Box 107, Rydalmere NSW 2116 Sydney AUSTRALIA jaycar BitScope PC Oscilloscopes & Analyzers DSO Test Instrument Software for BitScope Mixed Signal Oscilloscopes 4 Channel BitScope 2 Channel BitScope Pocket Analyzer 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 DSO can capture. Supports live data replay and display export. Networking Flexible network connectivity supporting multi-scope operation, remote monitoring and data acquisition. 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. Data Export Export data with DSO using portable CSV files or use libraries to build custom BitScope solutions. www.bitscope .com 6/2008 - elektor 3 lekto r electronics worldwide More than audio Looking at this month's magazi- ne cover might suggest an over- abundance of audio projects. The balance is mote delicate however, although it can be argued that a fair number of articles are related in some way to audio. The pages on the SAPS-400 describe a switch-mode power supply unit (SMPSU) specially designed for audio power am- plifiers. This compact light- weight unit can supply a hefty 400 watts continuously. The main symmetrical output voltage is adjustable across a wide range and a separate ±15-V auxiliary supply is incorporated for powering a preamplifier or similar. SAPS-400 at last ena- bles high-power, high-end audio amps to be built where the enclosure is not 75 % filled with bulky transformers and reservoir electrolytics. SMPSUs are now used in lots of consumer and industrial equipment because of their small size and high efficiency. Still, many designers hate them for their design complexity and non-standard parts. Typically, the solution in these cases is to use a drop-in supply. Our theo- retical backgrounder on SMPSU design on page 40 goes to show that things might be less complex than you think. Our bench test of nine sound- cards is not about sound quality in the first place. Lots of electronics enthusiasts use the soundcard in their PC to do low-frequency measurements and for that it's essential to have a linear amplitude response and a known-good frequency characteristic. That's why we did extensive measurements on the technical specs for these soundcards. A handy application of the soundcard is described in the article '2-pound RLC Meter'. In it we show how an exquisite RLC meter can be built using no more than your PC, the sound- card, three components and a little Java program — very useful. Happy reading! Jan Buiting Editor The quality of A/D and D/A converters makes it quite tempting to use a sound card for audio equipment measurements, especially as it fits quite nicely in the Windows environment. However, it takes more than good converters to make a good With the SAPS-400 we offer a powerful, adjustable symmetrical supply that's ideal for lightweight audio power amplifiers and happily sits in less than a quarter of the space taken by a comparable supply of conventional design. CONTENTS Volume 34 June 2008 no. 378 test of nine sound cards roiects 26 SAPS-400 SMPSU for audio amplifiers 34 Profiler Update 58 Thermo-Snake 64 2-Pound RLC Meter 70 Invisible Commands 74 LED Tester technolo< instrument, as we all know. Our test shows how well a number of sound cards score with real signals. This low-cost project allows you to connect from 1 up to 1 28 digital thermometers like the Dallas DS1 8B20 directly on a single two-wire cable. All temperature values are recorded on your PC through a USB port without memory space limitation. Using the software manager developed for the project you can monitor the temperature in real time and set an alarm threshold value for each individual thermometer. Is it possible to make an RLC meter for less than two pounds? In this article the authors answer this question with a resounding 'yes' in the form of a simple and compact circuit that will enable you to make RLC measurements rapidly, accurately, and, above all, cheaply. 40 Cool Power 48 USB-to-TTL Serial Cable Other uses for EIR Elektor/lntel 'unplugged': results revealed 54 Air, Power, Sound and Heat 6C Ma ins Adapters info & market 6 Colophon 8 Mailbox News & New Products 18 Score: 7.5 A comparative test of nine sou nd cards 69 Electrical Safety page 80 ElektorSHOP Sneak Preview infotainment 76 Hexadoku 77 Retronics Neuwirth FUP1 D PMR test unit (1 973) ELEKTOR ELECTRONICS WORLDWIDE elektor international media Elektor International Media provides a multimedia and interactive platform for everyone interested in electronics. From professionals passionate about their work to enthusiasts with professional ambitions. From beginner to diehard, from student to lecturer. Information, education, inspiration and entertainment. Analogue and digital; practical and theoretical; software and hardware. \x ■ l- a 1 IIIHII L." — ka&h l I Ei r h i x 'M-'i' m h - ■1 t •> A L \ - ~y/ \ ■ — ■ Xfr - A 1 : — ~] - '. j “SF | w iCi; I ,'TT**^ . | i — ■ ■ ~ * ■ %(. j 5 # . WJVVA', ✓ ★ 4 : \ 1 iU -rr. . — - • ™ UsSKTS^C " '-"It \ ^ , T 4 " = \ W ** “ 1 * "kS*!— .■*— J una ■ i m r i “■« (T ‘ “ — 7.51 IS. r j -So -.M - -f 1 I A ' jr / - 7 ■ ■ . ■ 'aVaS hiu— > 1*1 *11' — I r -— >> / . ^ COA^K TAUNT ; THE PC TAKES CO iloktor iternet 3adio Software builds hardware ,V^"< Volume 34, Number 378, June 2008 ISSN 1 757-0875 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 International Media, Regus Brentford, 1000 Great West Road, Brentford TW8 9HH, England. Tel. (+44) 208 261 4509, fax: (+44) 208 261 4447 www.elektor.com The magazine is available from newsagents, bookshops and electronics retail outlets, or on subscription. Elektor is published 1 1 times a year with a double issue for July & August. Elektor is also published in French, Spanish, German and Dutch. Together with franchised editions the magazine is on circulation in more than 50 countries. International Editor: Wisse Hettinga (w.hettinga@elektor.nl) Editor: Jan Buiting (editor@elektor.com) International editorial staff: Harry Baggen, Thijs Beckers, Ernst Krempelsauer, Jens Nickel, Guy Raedersdorf. Design sta Antoine Authier (Head), Ton Giesberts, Luc Lemmens, Jan Visser, Christian Vossen Editorial secretariat: Hedwig Hennekens (secretariaat@elektor.nl) Graphic design / DT Giel Dols, Mart Schroijen Managing Director / Publisher: Paul Snakkers Marketing: Carlo van Nistelrooy Customer Services: Anouska van Ginkel Subscriptions: Elektor International Media, Regus Brentford, 1000 Great West Road, Brentford TW8 9HH, England. Tel. (+44) 208 261 4509, fax: (+44) 208 261 4447 Internet: www.elektor.com 6 elektor - 6/2008 Electronics inside out! The free e-magazine about internet, computers, hacking, tweaking, modeling, gadgets, geekstuff, gaming and DIY electronics. The e-zine you have to check out now! 23k Receive i-TRIXX in your mailbox FOR FREE f each Wednesday ■ Play the i-TRIXX Quiz and win! Test your knowledge about internet, computers and electronics. Take your chance now and play the i-TRIXX Quiz. There are great prices to win! MP3:B0pm,. I — From the Elektor labs: Simple, useful and fun electronic circuits! Check i-TRIXX.com and subscribe now! V Powered by Alektor Email: subscriptions@elektor.com Rates and terms are given on the Subscription Order Form Head Office: Elektor International Media b.v. P.0. Box 1 1 NL-61 1 4-ZG Susteren The Netherlands Telephone: (+31 ) 46 4389444, Fax: (+31 ) 46 43701 61 Distribution: Seymour, 2 East Poultry Street, London EC1A, England Telephone:+44 207 429 4073 UK Advertising Huson International Media, Cambridge House, Gogmore Lane, Chertsey, Surrey KT1 6 9AP, England. Telephone: +44 1932 564999, Fax: +44 1932 564998 Email: p.brady@husonmedia.com Internet: www.husonmedia.com Advertising rates and terms available on request. International Advertising Frank van de Raadt, address as Head Office Email: advertenties@elektor.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 carri- ers and article texts published in our books and magazines (other than third-party advertise- ments) 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 o retrieval system of ony nature. Patent protec- tion 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 permission to the Publishers to alter the text and design, and to use the contents in other Segment publications 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. © Elektor International Media B.V. 2008 Printed in the Netherlands 6/2008 - elektor 7 INFO & MARKET MAILBOX Software Formant Hi Elektor — I would like to respond to your Retronics article on the Formant synthesizer in the April 2008 issue. I have been reading Elektor since 1976. In the early 1980s, when I was 19, I built the Elektor Formant synthesizer, to my consid- erable satisfaction. Now, many years later, I have acquired the freedom to work creatively and innovatively with technology, including audio technology. I am presently developing my own surround format, which I call 'Heptaverton Surround'. A prototype decoder and a suitable speaker arrangement have been completed, and the results are amazing. To further enhance the capabilities of Heptaverton Surround, I wanted to build a (soft) synthesizer with surround features. I still had the Formant music synthesizer book in my bookshelf, so I went to work with it. I originally wanted to build the synthesizer in C++ with the Steinberg VST SDK (since I used this to write the code for the Heptaverton Surround decoder), but then I discovered the Synthmaker development environ- ment. With this program, it took me only a short time to learn how to copy and extend the Formant. Ultimately, the project grew beyond its original objective and I now have a complete remake of the Formant with many new features, named 'HV Formant'. A demo version of this VSTi softsynth can be downloaded free of charge from my website (www.ftec-audio.com). Anyone who is interested in the full version can purchase a licence key for 69. Although the Synthmaker development environment is intended to be used for developing audio applications, in my opinion it can also be used for many other applications. For instance, you could build a data acquisition system that communicates via MIDI. It would then be fairly easy to use Synthmaker to create a program that processes the data. Another strong point of Synthmaker is that it is easy to write and test DSP code in this environment. Using Synthmaker and the information available on the forums, I have acquired considerable expertise in develop- ing digital filters. A demo version of Synthmaker that works for one month can be downloaded from www. synth maker, com. I would also like to mention that as a tribute to Formant, I am presently developing 'Formant Classic', which can be downloaded free of charge from my website along with the Synthmaker source code. Maybe it would be an interesting idea to publish a full article on Synthmaker in the magazine sometime, possibly in combination with Formant Classic. Eef Fonken (www.ftec-audio.com) Thanks for that Eef. A whole lot of Formant fans would proba- bly enjoy seeing their old love reincornoted in digital form. Meanwhile 'the real thing ' con be seen ond heard on Elektor's very own YouTube channel. Location: Retronics Dungeon at Elektor House. Performing artist: Denis Meyer. Awesome! The ‘Dekatron’ decimal counter valve (2) Dear Editor — in the PS to the above article, the author, Mr. Jean Herman, states that he is on the lookout for Dekatron display valves. If you would be so kind to give me Mr. Herman's address I will be pleased to send him free of charge, a dozen together with their (chassis mounting) sockets. Roger Ellis (UK) That's a very kind offer ; Roger , showing community spirit. Mr. Herman's address has been communicated to you and we will compensate your P&P expenses. EIR schematic Dear Jan — yesterday I had an opportunity to admire the EIR in the latest issue of Elektor (April 2008, p. 24, Ed.). Now I wonder what software you use to generate the schematic diagrams. Marc Priggemeyer (Netherlands) For some time now we hove been using Altium Designer (a PCB design program formerly known as Protel) in the Elektor lab. The schematic diagrams produced and edited with Altium Designer are also used in the project articles in the maga- zine. We previously used a com- bination of Ultimate and OrCAD for many years. Ultimate has now been acquired by National Instruments. In addition , we still use McCad (www.mccad. com) for the graphic design of the schematic diagrams typical of Elektor ; in combination with a symbol library generated in- house. This was also the case with the schematic for the EIR. This was because the 'original' document was not generated in the Elektor lab with Altium Designer ; but instead produced by Harald Kipp (at Egnite) using Eagle 4. 16. Reset switch on C02 meter Dear Editor — I have soldered together the kit for the C02 Meter (Elektor January 2008, p. 16, Ed.), and it works 8 elektor - 6/2008 perfectly. However, I have the CDM41 61 A version (without the LED) and I'm not sure where to connect the Reset switch. Could you help me out here? Walter Sands (UK) Connect the Reset switch bet- ween pin 4 (Reset input) and pin 1 (5-V supply voltage) of the CDM4161A C02 meter module. When the switch is closed , a vol- tage of +5 V (High level) is ap- plied to the Reset input (pin 4) to trigger a reset. Making PCBs with a laser printer — a sequel Dear Jan — there exist meth- ods for using photo paper and a laser printer to make PCBs. I was happy to know, since the boards I made with photo resist usually did not turn out OK. I would like to know how I can find out whether the photo paper I have is suitable for use with a laser printer. As far as I know, you have to be careful in choosing materials to be printed with a laser printer due to the heat used in the printing process. Is all photo paper for ink-jet printers sufficiently heat resistant? I certainly don't want to destroy my laser printer! Jacques Thurlby (UK) Hi Jan — I have an old HP LaserJet 4L that I have used to print hundreds of letters and related documents in the last years, and it still works perfect- ly. Although a laser printer can handle 240-gram paper quite well, the powder does not ad- here very well. Especially not if you print double-sided. This afternoon I experimented with papers ranging from 20 to 240 gram. Heavy papers are not only thicker than thin paper, but also smoother and more glossier. I printed a reasonably fine Elektor PCB layout with the highest possible print density. I then scrubbed a piece of Conrad Electronics PCB material with pumice and ironed the paper print onto the board using an iron at various heat settings. As a prelimi- nary result, I can say that the highest heat setting gives the best results. Some parts are already acceptable. I got some photo paper from a chemist's - matte paper, 1 70 gram. It passes through my printer without any damage, and it releases the powder comple- tely at a low iron temperature ('synthetic fabrics'). Chelsea Derar Jan — I have now discovered that poor results are mainly due to the large temperature variation (hyster- N esis) of the iron (as measured with a cannibalised oven ther- mometer). Now I set it to the highest temperature and use a dimmer to control the power. This gives me a much more constant temperature. The results now with HP Premium Plus Photo Paper C6832A look very promising. If the paper sticks to the circuit board, you have to lower the temperature. Jacques Bogus transistors Dear Jan — it's been some time since Elektor published an article on bogus components on the market (September 2004, Ed.) Early 2007 I bought a set of hefty Sanken power transistors. I haven't used them till now however because I do not trust the pnp device. I suspect this to be a fake, see the accompany- ing photograph. Is the subject of bogus parts still topical? Chris Johnson It sure is , Chris. Lots of bogus parts are manufactured and sold [ both transistors and ICs. Looking at the photo you sent along with your email clearly reveals two different transistors. Still , that does not necessarily mean that one of them is a bogus part. Possibly the two devices come from different production batches and it's even possible that they were not manufactured in the same plant. This could go some way to explain the diffe- rences between the casings and the print. We do agree there is reason to be suspicious though. The only way to get certainty is to do extensive testing on these transistors or take them apart to reveal the silicon inside. The photo is printed here with an invitation to our readers to send us their experiences with these specific transistors. A stable audio signal Dear Elektor — in my home lab I do a lot measurements on audio circuits. One of the problems I'm faced with time and again is insufficient stability of the audio genera- tor output signal, particularly with varying load impedance and/or frequency. I recall hav- ing seen a circuit some time in Elektor that solved the problem by maintaining a constant output voltage of the audio generator. Unfortunately I am unable to find any reference to the circuit on your forums or in the Elektor archive. Can you help me locate the circuit? J. H. Monteban We do not re- member such a circuit but then that does not mean it was never published in Elektor. A sim- ple solution to your problem could be to add a small audio power amplifier at the output of the audio signal gene- rator (1 watt or less is sufficient). The output impedance of such an amplifier will be low enough for the output level to remain constant even with varying or relatively heavy loads. Mai I Box Terms • Publication of reader's orrespondence is at the discretion of the Editor. • Viewpoints expressed by correspondents 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.com or Elektor, The Editor, 1 000 Great West Road, Brentford TW8 9HH, England. 6/2008 - elektor 9 INFO & MARKET NEWS & NEW PRODUCTS Elnec BeeHive8S stand-alone multiprogramming system BeeHive8S is an extremely fast uni- versal 8x 48-pindrive Stand-Alone concurrent multiprogramming sys- tem designed for high volume pro- duction programming with minimal operator effort. The chips are pro- grammed at near maximum pro- gramming speed. The programmer consists of 8 independent isolat- ed universal programming mod- ules, based on popular single-site BeeProg-i- programmer hardware. This allows sockets to run asyn- chronously (concurrent program- ming mode). Each programming module starts programming the moment the 1C is detected when it is properly inserted in the sock- et — independent of the status of other programming modules. As a result, seven programming mod- ules can work while the operator is replacing the programmed 1C at the eighth module. The Graphics control unit with touch screen provides basic infor- mation about programming flow and allows a basic level of con- trolling of the BeeHive8S program- mer. Modular construction of the hardware allows the operation to continue when a part of the circuit becomes inoperable. It also makes service quick and easy. Hands-free operation is asynchronous and a concurrent operation, allowing ICs to be programmed immediately upon insertion. The operator mere- ly removes the programmed 1C and inserts a new one. Operator train- ing is therefore minimized. The BeeHive8S supports all kinds of silicon technologies of today and tomorrow, covering program- mable devices without a family-spe- cific module. The programmer fea- tures an extensive library of over 36,000 devices. The BeeHive8S's device library is constantly updat- ed. Users can be sure that future devices are supported by a soft- ware update and (if necessary) a simple package converter (pro- gramming adapter), minimizing ownership costs. An important feature of the Bee- Hive8S is its programming speed. It is a very fast programming due to high-speed FPGA driven hard- ware and execution of time-critical routines inside the programmer. As a result, the programmer waits for the operator, rather than the other way around. The BeeHive8S pro- vides is competitively priced, cou- pling excellent hardware design to reliable programming. In this class it might well be the best Value for money' programmer. www.elnec.com (080144-1) Highest-Accuracy multifunction data acquisition devices with USB connectivity National Instruments announced a new line of M Series USB data ac- quisition (DAQ) devices with 1 8-bit analogue input accuracy at sam- pling rates up to 62 5 kS/s. The Nl USB-6281 and USB-6289 feature an 1 8-bit ADC, which provides a 4x increase in resolution over tra- ditional 16-bit devices, equivalent to more than 516 digits of resolu- tion for DC measurements. These devices also offer enhanced ana- logue output channels that feature programmable range and offset settings. In addition to standard screw terminal or mass terminati- on connectivity options, board-only OEM versions are also available for integration with embedded sy- stems and include 34- and 50-pin insulation-displacement connectors (IDC) for easy board mating To ensure accuracy at all avail- able sampling rates, these devices incorporate the NI-PGIA 2 custom amplifier and NI-MCal self-calibra- tion to minimise settling time and guarantee maximum accuracy. An onboard lowpass filter can be pro- grammatically enabled to further improve measurement accuracy by eliminating high frequency noi- se. With the Nl USB-628x devices, engineers can deliver an absolute accuracy of 980 pV at a range of ±10 V and 28 pV at a range of ± 1 00 mV at a sampling rate of up to 625 kS/s. The USB-6281 features 16 single- ended (SE) and eight differential input (Dl) analogue input channels, two analogue output channels and 24 digital I/O (DIO) chan- nels, while the USB-6289 features 32 SE and 16 Dl analogue input channels, four analogue output channels and 48 DIO channels. Both devices offer 1 8-bit analogue inputs at up to 625 kS/s (500 kS/ s when scanning) and 16-bit ana- logue output at 833 kS/s. The new USB-628x devices are shipped with NI-DAQmx driver software and Nl LabVIEW Sig- nalExpress LE, an interactive mea- surement workbench for quickly ac- quiring, analysing and presenting data without additional program- ming. The NI-DAQmx driver also provides time-saving features such as code generation for both the LabVIEW graphical development environment and text-based lan- guages such as ANSI C/C++, C#, Visual Basic .NET and Visual Basic 6.0; more than 3,000 measure- ment examples; device simulation; and connection diagrams. www.ni.com/nati (080144-V) 10 elektor - 6/2008 PicoScope 5000 Series 250 MHz bandwidth - fl P RWa T , fe - I=| . IS jt P- ^ The No Compromise 1 G5/s real-time sample rate o PC Oscilloscopes 128 megasample record length o With class-leading bandwidth, sampling rate, memory depth and an array of advanced high-end features, the PicoScope 5000 PC Oscilloscopes give you the features and performance you need without any compromise. un LU QC LU Vi © un III LU M H 55 > Advanced Triggers In addition to t tie standard M^ers the PicaScope S 000 series comts as stafKJard with pulse width, window, dropout, delay, and logic levd triggering. 250 MHs Spectrum Analyser High-speed USB 2,0 Connection Automatic Measurements Arbitrary Waveform Generator Define you* - own waveforms or select from 3 predefined signiils with the 12 bit, i££ MS/s arbitrary w^vffej'rti generator. Waveform Playback Tool ft f^iccScopc software now allows you to gd bade, review, i 9 and analyse up to 1000 captures ¥ within its waveform playback tool. Technology The PicoScope 33CK3 Senes or osc lloscopes from Pea Tffchcicdoigy includes general purpose- and high resolution mode's; With 12 bn resolution .ind ' \. accuracy, she TQM Hz PicoScope 3424 is able to detect changes is small as 0.024'^ (244ppm) - making it the ideal Channel oscilloscope for anafep. design and analysis. The higher speed S hit models in the Pieekopo 3000 scr cs fcilure samp i n t - rates up :o 2 G 0 MS/* dnd u p to 1 MS/v record length* for general purpose and portable ■tppSicntions. , The Pico^copc 2 (X 50 series oscilloscopes offer single and dual channel units that offer highly ^ portable/ low Cost solutions to jciilrlJ purpdtc telling. The .(.ward wmhirtf? 25 MHi: h.indhc-ld Ri« 35 ctipc 21 0 5 « fits comrocUWy into the pal m of your hand yet still includes VL ^ The powerful fenTures found in larger oscilloscopes. www.picotech.com/scope473 to check out our full lino of PC -b^ sod instruments or call 01480 396 395 for information and a product catalogue 6/2008 - elektor 11 INFO & MARKET NEWS & NEW PRODUCTS In 1 micro: 32-bit ARM, graphics control and processing Based on the ARM926EJ-S™ CPU core operating at up to 200 MHz, Toshiba's new TMPA91 OCRAXBG uses a 7-layer multibus architec- ture. This architecture significantly improves performance compared to other devices operating at si- milar processor speeds. The built- in LCD controller offers support for TFT and STN display sizes up to 1024 x 1024 pixels. An LCD data processor accelerator delivers image scaling, filtering and blen- ding functions and offers real time processing for movies at speeds up to 30 frames per second. The new micro has a CMOS im- age sensor interface that simpli- fies the implementation of appli- cations requiring image capture. A touchscreen interface further re- duces the need for external com- ponents in man machine interface (MMI) designs. Additional con- nectivity includes SPI, UART, l 2 C, l 2 S, and a high-speed USB device (480 Mbps). Toshiba has incorporated 56 kBytes of built-in embedded RAM for pro- gram, data and display memory, Boot ROM, and a memory con- troller that supports SDR and DDR SDRAM. Up to 2.5 GBytes of linear access space can be ad- dressed. An SD host controller sup- ports high-speed mode SD cards with capacities up to 32 GB. The new microprocessor is supplied in a 361 -pin FPGA package. Ad- ditional built-in peripherals include a 10-bit ADC, a six-channel, 16-bit timer, a watchdog timer, real time clock and alarm functionality. In addition to extensive software support that includes graphics li- braries and embedded operating systems, the new device is sup- ported through the availability of a Starter Kit that will further speed application development and prototyping. www.toshiba-components.com (080144-VII) New Cypress CapSense Express (tm) is fastest button and slider replacement Cypress Semiconductor Corp. introduced the CapSense Express ,tm| capacitive touch sens- ing solution for button and slider replacement. The CapSense Ex- press solution enables design- ers to implement up to 10 but- tons and/or sliders in as little as five minutes — with no coding. The PSoC Express ,tm| visual em- bedded system design tool and CapSense Express configurati- on tool allow designers to mo- nitor and tune the performance of the buttons and sliders in real time using a graphical user in- terface. Competing solutions re- quire designers to program and test each adjustment, adding de- sign time and cost. Cypress' PSoC (R| -ba sed CapSense devices have imple- mented over 2.5 billion buttons, sliders and other touch sens- ing interfaces in systems world- wide. The CapSense portfolio offers unmatched flexibility and integration, addressing a broad range of designs from complex, feature-rich applications to simp- le button replacement. More in- formation about the new solution is available at the link below. The CY8C201 X0 and CY- 8C201X2 CapSense Express de- vices offers up to ten capacitive and/or general purpose I/Os (GPIOs), allowing design flexibil- ity to implement combinations of buttons, sliders, and general pur- pose functions like LED control and interrupt outputs. For battery-powle button replacement. More informa- tion about the new solution is avail- able at the link below. The CY8C201X0 and CY- 8C201X2 CapSense Express de- vices offers up to ten capacitive and/or general purpose I/Os (GPIOs), allowing design flexibility to implement combinations of but- tons, sliders, and general purpose functions like LED control and inter- rupt outputs. For battery-powered applications, the devices offer low power consumption of just 1 mA active current and 2.6 pA in sleep mode. The new devices offer a wide operating voltage of 2.4 V to 5.25 V and an industrial tempera- ture range of -40 2 C to +85 2 C. In addition, 2 kB of Flash memory and an PC communication inter- face are provided so designers can choose whether to store tun- ing values in Flash or load them over PC at power-up. The new CY8C201X0 and CY- 8C201X2 CapSense Express devices are available now. They are packaged in 8- and 16-pin SOIC and 16-pin QFN pak- kages. Cypress is offering three evaluation kits for designers using the CapSense Express so- lution. The CY321 8-CAPEXP1 kit features three CapSense buttons, three backlighting LEDs, three LEDs for status and one me- chanical button. The CY3218- CAPEXP2 kit offers a 5-segment slider with four status LEDs and one mechanical button. The CY32 1 8-CAPEXP3 features two CapSense buttons with two sta- tus LEDs using the smallest pack- age, the 8-pin SOIC. The kits are available from the OnLine Store at www.cypress.com and from authorized distribution part- ners. The three kits are priced at USD $45 each. www.cypress.com / capsense (080144-IV) 12 elektor - 6/2008 mikroElektronika DEVELOPMENT TOOLS | COMPILERS | BOOKS CF Board - Easy way to use Compact flash in your design. MMC/SD Board - Easy way to use MMC and SD cards in your design. EEPROM Board - Serial EEPROM board via I2C interface. RTC Board - PCF8583 RTC with battery backup. 33V MICROCHIP ucvi MIPMI Ml BOARD EasyPIC5 is a world-class tool that enables immediate prototype design. Thanks to many new features of this development tool, you can start cre- ating your great devices immediately. EasyPIC5 supports 8-, 14-, 18-, 20-, 28- and 40- pin PIC microcontrollers (it comes with the PIC16F887). The mikrolCD (In-circuit Debugger) enables very efficient debugging. Examples in C, BASIC and Pascal language are provided with the board. EasyPIC5 comes with the following printed documentation: EasyPIC5 Manual, PICFIash2 Manual and mikrolCD Manual. Evolving product features and modern input design require the use of touch screens. The Touch screen controller with connector available on EasyPIC5 is a dis- play overlay with the ability to dis- play and receive information on the same display. It allows a dis- play to be used as an input device. Touch screens are popular in the industry, where standard inputs such as switches do not work very well. PICPLC16B Development Board Uni-DS 3 Development Board Complete Hardware and Software solution Complete Hardware and Software solution with on-board USB 2.0 programmer and mikrolCD with on-board USB 2.0 programmer Whether your prototype use Ethernet or USB communication LV18FJ development board will definitely satisfy your needs. System supports 64, 80 and 100 pin PIC18FxxJxx microcontrollers (it comes with PIC18F87J60 - PIC18 Microcontroller with an integrated 10Mbps Ethernet communications peripheral, 80 Pin Package). LV 18FJ is easy to use with the Microchip PIC18FxxJxx development system. The on-board USB 2.0 programmer with mikrolCD (In-Circuit Debugger) enables very efficient debugging and very fast prototype development. Examples in C, BASIC and Pascal language are pro- vided with the board. BIGPIC5 Development Board Complete Hardware and Software solution with on-board USB 2.0 programmer and mikrolCD Following the tradition of its predecessor BIGPIC4 as one of the best PIC development systems on the market, the BIGPIC5 provides newly revised features for the same price. System supports the latest (64) and 80-pin PIC microcontrollers (it is delivered with PIC18F8520). Many of these ready to go made examples in C, BASIC and Pascal language guarantee successful use of the system. A Touch screen controller with connector is available on-board. This development board has an on-board ultra fast USB 2.0 programmer, mikrolCD (In- circuit Debugger) and integrated connectors for MMC/SD memory cards, 2 x RS232 port, RS485, CAN, on-board RTC, PS/2 connector, DAC etc... Special Offers -Save time & money! Special Offers include all you need to start your development: Software, Development Board, Printed Manuals and Accessories. :fc c irr ' * PIC -Iasi i with mlkrttCO ferofirt PICFIash programmer - an ultra fast USB 2.0 programmer for the PIC microcontrollers. Continuing its tradition as one of the fastest PIC programmer on the market, a new PICFIash with mikrolCD now supports more PIC MCUs giving devel- oper a wider choice of PIC MCU for further prototype development. mikrolCD debugger enables you to execute mikroC / mikroPascal / mikroBasic pro- grams on the host PIC micro- controller and view variable val- ues, Special Function Regi- sters (SFR), memory and EEP- ROM while the program is run- ning. Supporting an impressive range of microcontrollers, an easy-to- use IDE, hundreds of ready-to-use functions and many integrated tools makes MikroElektronika compilers one of the best choices on the market today. Besides mikrolCD, mikroElektronika compilers offer a statistical module, simulator, bitmap generator for graphic dis- plays, 7-segment display conversion tool, ASCII table, HTML code export, communication tools for SD/MMC, UDP (Ethernet) and USB , EEPROM editor, programming mode management, etc. Each compiler has many routines and examples such as EEPROM, FLASH and MMC, reading/writing SD and CF cards, writing charac- ter and graphics on LCDs, manipulation of push-buttons, 4x4 key- board and PS/2 keyboard input, generation of signals and sounds, character string manipulation, mathematical calculations, I2C, SPI, RS232, CAN, USB, RS485 and OneWire communications, Manchester coding management, logical and numerical conversion, PWM signals, interrupts, etc. The CD-ROM contains many already- written and tested programs to use with our development boards. LV 18FJ Development Board Complete Hardware and Software solution with on-board USB 2.0 programmer and mikrolCD IE Minimize your time from prototype to final product by using market-proven PICPLC16B development board. PICPLC16B is a system designed for controlling industrial systems and machines. 16 inputs with optocouplers and 16 relays (up to 10A) can sat- isfy most industrial needs. The ultra fast mikrolCD (In-circuit Debugger) enables very efficient debugging and very fast proto- type development. Features: RS485, RS232, Serial Ethernet, USB 2.0 programmer and mikrolCD (In-Circuit Debugger) are available on-board. Thanks to many features UNI-DS3 is the world's easiest to use development board for different types of microcontrollers.The system supports PIC, dsPIC, AVR, 8051, ARM and PSoC microcontrollers with a large number of peripherals. In order to continue working with different chip in the same development environment, you just need to swich a card. You can choose between USB or External Power supply. Each MCU card has its own USB 2.0 programmer! The main reason for choosing our special offers is their very favorable price and the ease of use. Reduce prototype development and testing y • | p ■ time to hours or minutes. Our special offers include all the tools you need to get your project up and running fast for various types of micro- controller. mikroElektronika manufactures competitive development sys- tems. We deliver our products across the globe and our satis- fied customers are the best guarantee of our first-rate service. The company is an official consultant on the PIC microcon- trollers and the third party partner of Microchip company. We are also an official consultant and third party partner of Cypress Semiconductors since 2002 and official consultant of Philips Electronics company as well. All our products are RoHS compliant. http://www.mikroe.com/en/distributors/ Find your distributor: UK, USA, Germany, Japan, France, Greece, Turkey, Italy, Slovenia, Croatia, Macedonia, Pakistan, Malaysia, Austria, Taiwan, Lebanon, Syria, Egypt, Portugal, India, Thailand, Taiwan, Czech and Slovak Republic. CAN-1 Board - Interface CAN via MCP2551 . CANSPI Board - Make CAN network with SPI interface. RS485 Board - Connect devices into RS-485 network Serial Ethernet - Make ethernet network with SPI Interface (ENC28J60). lrDA2 Board - Irda2 serve as wireless RS232 communi- cation between two MCU’s. ADC Board - 12-bit analog- to-digital converter (ADC) with 4 inputs. DAC Board - 12-bit digital- to-analog converter (DAC) with SPI. Keypad 4x4 Board - Add keypad to your application. Accel. Board - Accel, is an electronic device that meas- ures acceleration forces . - All of our products are shipped in special protective boxes. -On-line secure ordering provides fast and safe way of buying our products. mikroElektronika Compilers Pascal, Basic and C Compilers for PIC microcontrollers I “7"— I Q i rr ftfcioC 1 w th on-board In-Circuit USB2.0 programmer & debugger Please visit our website for more info http://www.mikroe.com SOFTWARE AND HARDWARE SOLDTIONS FOR EMBEDDED WORLD 6/2008 - elektor 13 INFO & MARKET NEWS & NEW PRODUCTS Microchip: 32-bit PIC32 MCU family gets USB on-the-go From Microchip comes an ad- dition of integrated USB 2.0 On-The-Go (OTG) functionality to their 32-bit PIC32 microcon- troller family. The PIC32 family brings more performance and memory to embedded design- ers while maintaining pin, pe- ripheral and software compat- ibility with Microchip's 16-bit microcontroller and DSC fami- lies. The maximum operating frequency for the PIC32 family has been increased to 80 MHz, which further extends the perfor- mance reach of the new 32-bit PIC32 microcontroller family. To further ease migration and pro- tect tool investments, Microchip's is the only complete portfolio of 8-, 1 6- and 32-bit devices to be supported by a single Integrated Development Environment — the free MPLAB® IDE. Some USB products, such as PCs, operate only in a host role, whereas others — for example, USB Flash drives — operate only as devices. Products with OTG functionality can operate in either role — even auto-ne- gotiating which will be the USB host or device when encounter- ing another OTG product. The new PIC32 microcontrollers with integrated USB OTG provide de- signers with the flexibility to add all three modes of USB operation to their products. The new MCUs also include the USB OTG PHY, en- abling even lower costs and small- er PCB real estate. All PIC32 family products are sup- ported by Microchip's world-class development tools, including the MPLAB Development Environment, the MPLAB C32 C compiler, the MPLAB REAL ICE™ emulation sys- tem, the MPLAB ICD 2 in-circuit de- bugger, and the MPLAB PM3 uni- versal device programmer. Microchip also provides free source code for USB software stacks and class drivers to enable designers to get a head start on the development of their USB appli- cations. Microchip's free USB Host Stack, Device Stack, and Class Drivers (HID, MSD, CDC, Custom) are available at the website below. The free USB OTG Stack is current- ly in beta, with full release sched- uled for the Q2, 2008. The PIC32 family also enjoys broad tool support throughout the industry. Complete tool chains are available from Ashling, Green Hills, Hi-Tech and Lauterbach — including C and C++ compilers, IDEs and debuggers. RTOS sup- port is available from CMX, Ex- press Logic, FreeRTOS, Micrium, Segger and Pumpkin. Graphics tools providers include EasyGUI, Segger, RamTeX and Micrium. A full list of third-party support for the PIC32 family can also be found at the website below. The PIC32 USB Starter Kit comes complete with everything that developers need to get start- ed, including the USB-powered MCU board, the MPLAB IDE and MPLAB C32 C compiler, docu- mentation, sample projects with tutorials, schematics, and 16-bit compatible peripheral libraries. Application expansion boards are also being made available, which plug into the expansion slot on the bottom of the MCU board. The PIC32 USB Starter Kit (part number DM320003) is expected to be available in Q2, 2008 at www.microchipdi- rect.com. Elektor readers having the Mi- crochip's Explorer-16 develop- ment board can purchase a USB OTG PIC32 plug-in module (part number MA32002) and a USB PICtail™ Plus Daughter Board (part number AC 1 64 131). Both can be ordered from microchipdirect. The four new PIC32 family mem- bers with USB OTG have Flash program memory sizes from 1 28 kbytes to 5 1 2 kbytes in 64- or 100-pin TQFP packages. www.microchip.com/PIC32 (080144-X) u-blox GPS powers LandAirSea miniature GSM-based tracker LandAirSea Systems, announced today the launch of a miniature, battery-powered, GSM-based real- time vehicle tracking unit featuring u-blox 5 GPS technology. LandAirSea's new 8100G track- ing device incorporates the latest in GPS and wireless technology to accurately determine the exact location of a vehicle, and can be used to track individual vehicles or entire fleets. Based on the highly successful CDMA-based 8100, the innovative 8100G now additional- ly offers GSM network operability. As the prevalent mobile communi- cations standard worldwide, GSM operability significantly widens the device's geographical reach. The 8 1 00G will provide fleet manag- ers, government agencies, business owners, as well as consumers real- time vehicle and asset tracking de- vice that uses the immensely popular Google Earth program for high-reso- lution satellite imaging. Since GSM is the most prevalent mobile commu- nications standard worldwide, the new 8100G will allow LandAirSea to expand its customer base beyond the USA and Canada. The 8100 tracking unit features a u-blox GPS receiver boasting 2-meter position accuracy and - 160dBm sensitivity, which enables accurate, reliable tracking, even in difficult signal environments. The self-contained device measures approx. 1" x 2" x 3 3 A" (2.5cm x 5cm x 9.5 cm), and is battery-pow- ered and completely portable. It also can be hard-wired for permanent applications. Other key features of the 8100G include live 1 -second up- dates, a built-in lithium-ion recharge- able battery, a motion sensor, a wi- ring harness for permanent installati- on, in and out of zone geo-fencing with text message and/or e-mail no- tification and a data logging features that enables remote downloads. www.landairsea.com www.u-blox.com (080 144-VIII) 14 elektor - 6/2008 IX fir 0845 EGUiRME^T Rjp E LC-GTP'ONi C5 © EVE lGPU ENT, TRAiN- t-fr 4 E*PE n IhE NTATKJN o*k.- ifvSfev _ EasyPIC5 Starter Packs — everything needed to learn about and develop with PIC microcontrollers from only £99 UNI-DS3 Universal Development System dsPICPR03 Development System PICPLC16B Control System PoScope Multi-Function Instrument LAP-1 61 28U Logic Analyser Leaper-48 Universal Device Programmer Robo-PICA Robot Experiment Pack NX-51 V2 Microcontroller Trainer IDL Series Circuit Labs Please see our website at www.paltronix.com for further details of these and other products We stock components, control systems, development tools, educational products, prototyping aids and test equipment Paltronix Limited, Unit 3 Dolphin Lane, 35 High Street, Southampton, SOI 4 2DF I Tel: 0845 226 9451 I Fax: 0845 226 9452 I Email: sales@paltronix.com Secure on-line ordering. Major credit and debit cards accepted. Prices exclude delivery and VAT. We also stock a range of probes and test leads suitable for use with the PoScope as well as money-saving bundles. We can supply all ZeroPlus logic analysers and advanced protocol decoding options. We also stock Leap device programmers for EPROM/ EEPROM/Flash EPROM, 8051 and PIC. Four starter packs available, all of which include the EasyPIC5 development board, USB power/programming lead, blue backlit 16x2 character and 128x64 graphic LCDs, touch- screen overlay for GLCD, RS-232 lead, PIC16F877A 40-pin microcontroller and DS1820 temperature sensor plus manuals and software. EasyPIC5 Starter Pack - £99 Our EasyPIC5 Starter Pack is ideal for those wishing to learn about and program using assembly language or other makes of compiler. The pack contains the EasyPIC5 board, all required leads, character and graphic LCDs, touch-screen, PIC16F877A MCU and DS1820 temperature sensor. Exclusive to Paltronix, the pack also includes a getting started guide, tutorials and example programs — ideal for newcomers to microcontrollers. MikroElektronika’s EasyPIC5 development system simply must be the most versatile and best value PIC development system on the market. The board supports Flash-programmable devices in the PIC10F, 12F, 16F and 18F families in 8, 14, 18, 20, 28 and 40-pin packages and features a fast built-in USB2.0-based programmer. Also on the board are a useful range of I/O devices such as LEDs, pushbutton switches, potentiometers, RS-232 interface, USB and PS/2 connectors and provision for the easy fitting of character and graphic LCDs, touch-screen and DS1820 tempera- ture sensor (all of which are supplied in our starter packs). Clearly labelled DIP-switches and jumpers allow any I/O devices not being used to be disabled and all of the PIC’s I/O lines are available on IDC headers for easy expansion using MikroElektronika’s extensive range of add-on boards or for connection to your own circuits. Detailed documentation and example programs and our own getting started guide and tutorial make the EasyPIC5 ideal for beginners and experienced users alike. The PoScope features a 16-channel logic analyser with I2C, SPI, 1-wire and UART serial bus decoding, dual-channel oscilloscope, pattern generator, spectrum analyser, chart recorder and square-wave/PWM generator in one low-cost instrument for £79. As featured in last month’s Elektor magazine - Please note that our packs all include the LCD displays, touch-screen and DS1820 temperature sensor. EasyPIC5 BASIC Starter Pack - £149 EasyPIC5 C Starter Pack - £189 EasyPIC5 Pascal Starter Pack - £149 Get off to the best start with the EasyPIC5 and save money with one of our compiler starter packs, which include the contents of the above EasyPIC5 Starter Pack plus a full version of MikroElektronika’s mikroBASIC, mikroC or mikroPascal PIC compilers. These user- friendly compilers feature in-circuit debugging when used with the EasyPIC5 and also provide library routines to support all the EasyPIC5’s built-in I/O devices and optional add- on boards. Work with various MCUs using one development board with the UNI-DS3. Currently supporting PIC, dsPIC, AVR, 8051, ARM and PSoC devices, the UNI-DS3 has a wide range of I/O features from £109 including main board and one plug-on MCU card. We stock all MikroElektronika development and add-on boards and PIC, dsPIC/1 6-bit PIC, AVR and 8051 compilers. We stock a large range of similar development systems for PIC, dsPIC, AVR, 8051, ARM and PSoC microcontrollers. A wide range of microcontroller and PC-based control boards and add-ons are also available. Start experimenting with robotics with the Robo- PICA robot experiment pack. Contains everything required to build various PIC microcontroller-based robot projects and carry out a large range of fun experi- ments for £89. Similar robot kits stocked based on 68HC1 1 , 8051 , AVR and BASIC Stamp plus large range of accessories. Other training systems available for microcontroller and electronics teaching. We have a large range of prototyping products from bread- boards to advanced digital and analogue circuit labs. The LAP-1 61 28U from ZeroPlus is a powerful 16- channel 200MHz logic analyser with UART, I2C and SPI protocol decoding priced from £195. Further protocol decoding options available including 1-wire, Microwire, CAN, LIN, PS/2 and USB. The new dsPICPR03 is a development system for the dsPIC with advanced I/O and communications devices including RS-232, RS-485, CAN, Ethernet, real-time clock, SD card reader and displays. Starter packs priced from £149. The PICPLC16B makes an ideal platform for developing and implementing control and automation applications. This PIC microcontroller- based board has 1 6 relay outputs, 16 opto-isolated inputs plus RS-232, RS-485 and Ethernet interfaces for £99. Designed specifically for teaching 8051 microcon- troller interfacing and programming, the NX-51 V2 incorporates a useful range of I/O devices and comes complete with detailed example programs for £99. The IDL-400 Logic Trainer, IDL-600 Analogue Lab and IDL-800 Digital Lab all feature a large solderless breadboard, built-in DC power supplies, switches, displays and useful logic gates or test features and are priced from just £1 79. The Leaper-48 is a USB- based universal device pro- grammer supporting an exten- sive range of memories, programmable logic devices, microcontrollers and digital signal processors at a low price of £295. Please see our website for full list of sup- ported devices. 6/2008 - elektor 15 INFO & MARKET NEWS & NEW PRODUCTS Atanua real-time logic simulator for educational use Atanua sports an intuitive, OpenGL accelerated user interface, which allows the user to place compo- nents and wires. Components inclu- de all common logic blocks, inclu- ding gates, latches and flipflops. Additionally Atanua simulates about 30 different 74-series chips, as well as an 8051 microcontrol- ler variant. Simulated and pure logic parts can be mixed in the same circuit. Additional parts can be made us- ing the plug-in interface. As an ex- ample plug-in, driver for the Vel- leman K8055 USB experiment board is provided, with which the user can mix simulated and real- world components. On the I/O front, Atanua includes several different frequency clock inputs, constant level inputs as well as buttons which are bound to the user's keyboard. LEDs in various colors as well as 7-seg- ment displays are also included. There's also a simple logic probe for debugging. The simulated parts are designed to resemble their real-world coun- terparts, which is more attractive for the students than pure schematics. The students can practise lab expe- riments using the simulated chips. An anti-cheating tool is also avail- able for teachers who wish to use Atanua for homework. The simulation shows the signal state of each wire in real time. In addition to high and low signal level, parts may output an 'invalid' signal, stating that there is a prob- lem with the circuit, such as outputs connected together, or missing wir- ings from some chip. Versions for Windows, Linux and OS X are available. http://atanua.org. (080144-III) Fmicro NTC thermistor sensors for catheter & medical applications NTC manufacturer SeMitec's new- est product is a micro thermistor sensor designed primarily for use in medical applications. Utilising the latest FT thin-film technology combined with laser- trimming techniques, the Fmicro thermistor sensor is only 0.5 mm diameter by 2.3 mm long. The Fmi- cro is based on one of the small- est FT thermistors encapsulated in a polyamide tube and fitted with #38 AWG insulated leads. The Fmicro is accurate to ±0.2 K at 37 °C and is small enough to be incorporated within a cath- eter probe for internal body tem- perature measurement. The op- erating temperature ranqe is -10/+70 °C. ww.atcsemitec.co.uk (080144-11) — Farnell adds over 50,000 new products in 12 months Based on feedback from its custom- ers and consultations with its sup- pliers Farnell carefully selected new product additions to product cate- gories including semiconductors, passives, connectors, Emech and optoelectronics. Many new and in- novative, high-end technology prod- ucts from niche manufacturers have been identified and introduced with the aim of giving design engineers access to the latest technology as well as the broadest choice. In addition, the introduction of price reductions on 36,000 of the most popular component ranges bak- ked by extensive technical support makes Farnell the ideal cost com- petitive, single source for electronic design engineers across Europe. As Farnell continues to add new products, customers can quickly find out about them by visiting the 'What's new?' section of the com- pany's website. Accessed via the navigation bar on all websites, it includes brand new products to market, new niche suppliers of high-end technology, and a month- ly 'hot' product. (080427-1) 16 elektor - 6/2008 Nl Lab VIEW SignalExpress Tektronix Edition 2.5 Adds Support for New DP03000 Oscilloscopes National Instruments has an- nounced support for new Tektronix value line oscilloscopes in the latest version of LabVIEW SignalExpress Tektronix Edition, an interactive PC- based measurement software for quickly acquiring, analysing and presenting data without program- ming. Engineers and scientists can use LabVIEW SignalExpress Tektro- nix Edition 2.5 to connect to and control all value-line Tektronix oscil- loscopes including the new Tektro- nix DP03000 and TDS3000C dig- ital phosphor oscilloscopes as well as the MS04000 mixed-signal os- cilloscopes from their PCs with an easy-to-use, drag-and-drop environ- ment. The latest version of the soft- ware also introduces time-saving features such as measurement and waveform logging and new inter- active reporting capabilities. LabVIEW SignalExpress Tektronix Edition provides plug-and-play set- up with Tektronix oscilloscopes as well as more than 400 additional modular and benchtop instruments, making it easy for users to connect their stand-alone instruments to PCs and configure all instrument communication, view live meas- urement data and take control of the oscilloscope. With a few ad- ditional mouse clicks, users can log their data to a disk and export the data directly to a spreadsheet application, such as Microsoft Ex- cel, for easy analysis and report- ing. The software also offers ad- vanced data-logging features such as alarm monitoring and condition logging as well as the automation of common measurement tasks such as circuit characterisation and frequency sweeping. Additionally, LabVIEW SignalExpress Tektronix Edition provides users with more £ s § i§ * B*> - — —35 I 3 - . t ktj VJ- ^ v? i- “ ft 5 i to to to to to 1 > 0 *’ than 200 analysis and processing functions. The latest version of LabVIEW Sig- nalExpress Tektronix Edition intro- duces measurement and waveform logging capabilities that make it possible for users to record their measurements directly to their PCs, automating an often tedious and time-consuming task. LabVIEW SignalExpress Tektronix Edition 2.5 also adds new interactive re- porting features such as a drag- and-drop report that displays live data as well as the ability for users to save and print their reports as HTML pages. LabVIEW SignalExpress Tektronix Edition LE, a limited feature ver- sion of the software, is shipped as part of the standard configuration with all Tektronix value-line oscil- loscopes and AFG3000 arbitrary function generators including the new AFG301 1 high-amplitude model. Tektronix customers can upgrade to the full version for ad- vanced signal processing, analysis, documentation and data logging. Readers can learn more about La- bVIEW SignalExpress Tektronix Edition view an interactive tutorial and download technical white pa- pers at www.ni.com/tek. (080427-11) Cypress's PSoC (r) CapSense enables touch-sen sitnS in Acer Aspire 6920 and 8920G notebook PCs The single-chip Cypress CapSense solution enables touch-sensitive buttons, sliders and shuffle con- trols that provide users with a styl- ish, convenient way to access and control a rich array of multimedia capabilities. The CapSense device also controls LED indicator lights on the new laptops. The CapSense device offered Acer a programmable, flexible solution for the CineDash media console, a key feature in the new Aspire models. The CapSense solution al- lows designers to make last-minute changes, add features and control additional functions beyond the ca- pacitive touch interface — capa- bilities that are not available from other capacitive sensing products. A single CapSense device can re- place dozens of mechanical switches and controls with an elegant touch- sensitive interface, and the solution supports touch screens and proxim- ity sensing for superior product dif- ferentiation. CapSense-based 'but- ton' and 'slider' controls are more reliable than their mechanical coun- terparts because they are resistant to environmental wear-and-tear from temperature change and moisture. Cypress has garnered hundreds of CapSense design wins worldwide in applications that include mobile handsets, portable media players, white goods, computers, printers and automotive, among others. A single PSoC device can integrate as many as 100 peripheral func- tions saving customers design time, board space and power consump- tion while improving system qual- ity. Customers can save as much as $10 in system costs. www.cypress.com/psoc www.cypress.com/psoctraining. www.acer.com/us (080427-III) ZigBee®-based wireless system for parking lots Radiocrafts and Innovative Tech- nologies jointly announce the suc- cessful implementation of a novel ZigBee-based wireless system for parking lots. The intelligent parking lot system has been designed by Innovative Technologies based on the Radiocrafts RC2300 RF module using ZigBee technology. The European urban population struggles on a daily basis with un- derground parking lots and relat- ed challenges. Innovative Technol- ogies singled out this arena as a prime application area for automa- tion. Already experts in RFID, In- novative Technologies recently ex- pand their portfolio with ZigBee, a growing standard for wireless sen- sor monitoring and control. The parking automation system is based on placing Vehicle Detection Modules (VDM) above the parking space. Each VDM can control up to 2 parking spaces. Displays are set up at the entrance of the car park and will indicate to the driv- ers the number of available park- ing spaces and the ones which are the closest. Data management soft- ware provides the operator with a graphic map of each parking level showing in real time free parking spaces. The system brings both op- erators and users of parking lots major benefits. tern architecture is based on a low power compact ZigBee radio module, RC2300, provided by Radiocrafts, a pioneering sup- plier of ZigBee technology. www.radiocrafts.com (080427-IV) 6/2008 - elektor 17 INFO & MARKET SOUND CARDS rrrr rrrrrrrrr rrrrrrrrri rrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrri A comparative test of nine sound cards Rolf Hahle Modern sound cards are fitted with A/D and D/A converters that a few years ago could only be found in top-end measuring instruments. This makes it quite tempting to use a sound card for audio equipment measurements, especially as it fits quite nicely in the Windows environment. However, it takes more than good converters to make a good instrument, as we all know. Our test shows how well a number of sound cards score with real signals. There is a wide variety of sound cards available. There are sound cards oriented to the needs of musicians, which are designed for connection to an electric guitar or a mi- crophone. This naturally requires large jack sockets or XLR connectors, makes balanced inputs desirable, and of course requires adequate amplification because the input level is only a few tens of millivolts. Cards for home users are naturally quite different. Here Cinch connectors or small phone jacks are suitable be- cause the cards are intended to be connected to a stereo system, a home cinema system, or an iPod. There is prac- tically no need for signal amplification, since the avail- able signal sources supply signals in the range of several hundred millivolts to several volts (CD players), which lies at the upper end of the typical input voltage range of an A/D converter (2.5 V). A few decibels of additional gain - to improve the signal to noise ratio - are only helpful if you want to use signals from portable MP3 players. And if you want to finally realise your long-cherished ambition of digitising your collection of LPs, an integrated preampli- fier is also a good idea. rrrr rrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrr rrrrrrr rrrrrrrrrrrr rrrr rrrrrrrrrrr 18 elektor - 6/2008 The third category consists of internal sound cards (with the emphasis on sound), which are optimised with special drivers and DSPs to reproduce the artificial sound worlds of modern computer games as impressively and 'surround- ingly 7 as possible. Here 'optimised 7 means offloading the computational work necessary for sound generation from the CPU. Although the cards in this category have inputs for external signals, the main focus is on the software side and reproduction of multichannel digital signals (keyword: Dolby Digital). Several types of cards are available in all categories: inter- nal cards and cards with their own bus interface for con- necting external devices via an external breakout box, USB (common), or FireWire (relatively rare). The price structure is rather clear: internal cards are the least expensive, with the price rising (sometimes quite distinctly) if an external breakout box is included, and external devices are usually even more expensive. With the latter type, the price is pro- portional to the elaborateness and robustness of the enclo- sure. Unfortunately, the price is not always a good indicator of the quality of the technical specifications. Measuring setup As we wanted to measure the performance for conversion in both directions, part of the test consisted of sending the same test signals (16-bit, 44.1 kHz) from the hard disk to all the cards. The integrated sample rate converter comes into play automatically with all cards that operate at a dif- ferent clock rate. Its good or not-so-good properties thus contribute directly to the results of the measurements on the reproduced signals. In addition, all cards were given an opportunity to con- vert analogue test signals at their maximum resolution and sample rate, using signals supplied by a CD player and a fairly good preamplifier. The preamplifier was used to adjust the signal level to best match the individual input sensitivity of the device under test. The measurements were made on the resulting reproduced signal. Our measuring instrument was a Rhode & Schwarz UPL, which combines a low-distortion generator and a two-channel analyser. We relied on a program used in professional sound studios for recording and playback, which can confidently be assumed to have no problems dealing with one- or two-channel sig- nals: Wavelab from Steinberg, a producer of professional audio software. Almost all of the tested cards were sup- plied with an ASIO driver as well as a Windows driver. As the ASIO architecture was defined and developed by Steinberg, Wavelab is naturally well positioned to use it to access all available card functions. Assessment All of the measured results are presented in a large table along with charts showing the frequency response for play- back (red curve) and recording (green curve). Due to the differences in the configurations of the cards, breakout box- es and drivers, only very limited comparison of the meas- ured values is possible. Some cards have a true preampli- fier on board with a gain range of 60 dB, while others have only simple impedance converters or amplifiers with very modest gain. As a result, using distortion level measurements to deter- mine the maximum drive level was the least of our prob- lems. Adjusting the signal to match the input sensitivity was even more diffi cult because there are lots of places in Windows where the level can be adjusted. This dif- ficulty can only be avoided - with regard to measuring the level, that is - if an ASIO driver is used to control the card. This makes the card practically invisible to Win- dows, because it cannot make head or tail of the Stein- berg ASIO driver architecture. At least not yet - we'll have to see what happens when the patents expire next year. Maybe Microsoft will surprise us then with a new service pack including ASIO drivers. rrri rrrrrrrrrrrrrrrrrri rrrr rrrrrrrrr r rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr 6/2008 - elektor 19 INFO & MARKET SOUND CARDS • 1 db- IRE an. cm r*F ■ril. i sitUP 7 "5 IiJP vs nm) an sur irmimTE* 3 2.S 1.3 1 &.S 9 -fl.3 -1 -JL.S -Z -S.'S Mi » VC IW ffih> '/■) lk 2k Ik 5k ltfc i»k AuzenTech X-Fi Prelude 7.1 When you first see the package, you might get the impression that the Prelude is a Creative product. This is in good part due to the prominently displayed X-Fi logo, which is rightfully present. AuzenTech (Santa Clara, California) is the first licensee of Creative's X-Fi-CA20K sound processor that has developed its own card. The card that emerges from the box makes a distinctly good impression. The high component density and high- quality SMD electrolytic capacitors testify to attention to maintaining a stable supply voltage, and the audio amplifiers are among the better types. Aside from 64 MB of RAM available exclusively for audio purposes, the card is fitted with a 24-bit, 96-kHz A/D converter (AK5394A) and four 24-bit, 96-kHz D/A converters (AK4396). These ICs from Asahi Kasei Mi- crosystems, which is a respected name in hi-fi circles, offer a signal to noise ratio on the order of 1 20 d B(A) according to the data sheet. The converters allow two analogue inputs and eight analogue outputs to be im- plemented. Input and output buffering are provided by high-quality operational amplifiers (Tl OPA2134), and a socket-mounted (and thus user-replaceable!) National LM4562 opamp is fitted in the output stage for the front (stereo) channels. There's thus plenty of opportunity for DIY experimenting. The card can accept signals at all resolutions from 1 6 to 24 bits and clock rates of 24, 32, 44.1 and 48 kHz. The included driver supports ASIO 2.0 at all resolutions and supports direct monitoring. Two special 'Combo' Cinch sockets at the bottom of the mounting bracket provide the SPDIF input and output for coaxial and optical signals. A matching adapter for the customary TOSLink plug is included with the card. The Prelude is a typical game and home cinema card and boasts all possible associated sound and surround effects, but they can easily be disabled under software control for high-quality audio applications. Creative SB X-Fi Gamer TEH Itlf rttX ffl B M IW iHM jCO lh a 31; ^ HB. «k The charts show the frequency response for recording (green) and reproduction (red) The small Gamer from the Sound Blaster series is the first card from Creative in the test group. Like the other cards from this manufacturer, it is fitted with the X-Fi sound chipset developed in-house. The included driver is matched to this chip set and is the same for all of the cards. After the trouble-free installation of the in- cluded software, various modes can be selected on the audio console. We used the Audio Creation mode with all sound effect options disabled (bit-exact reproduction, no EAX, and no limiter) as the basis for our measurements. The card can record and reproduce signals at all resolutions from 1 6 to 24 bits and clock rates of 24, 32, 44.1 and 48 kHz. The included driver supports ASIO 2.0 at all resolutions and supports direct monitoring. The mounting bracket has only four 3.5-mm stereo jacks. All four of them are used for the 7. 1 outputs, while one of them assumes the function of headphone operation and provision of the optical digital output. Addi- tional inputs and outputs are only available internally: an Aux input via a 4-way pin header, a two-row head- er for SPDIF input and output, and a 2-by-5-way header for an Intel HD-compatible front panel. Thanks to its low-profile format, the card is suitable for use in typical media centre PCs. In addition, the opti- cal digital output can be use for connection to a home cinema system. With this configuration, the SB Gamer is a typical example of the game and home cinema category, and of course it supports the associated sound and surround effects. Most of the measured results score at the 'good average' level or above, but the linear- ity is hardly worthy of the name. Creative E-MU 0202 USB Several years ago, E-MU established a good reputation in the music world as a producer of synthesizers, and now it has been merged into the Creative fold. The model 0202 is the smallest version of a series of USB sound cards with a pleasantly tidy plastic enclo- sure. The inputs and outputs are at the rear, while the controls, indicators and headphone output are at the front. The large number of connectors are a bit confusing at first, but a glance at the manual clears things up quickly. There are only two mono inputs and two mono outputs, which can be combined into a stereo input by pressing the Mode button on the front panel. Although outputs in the form of two 6.3-mm jack sockets (mono) and a 3.5-mm mini jack are present on the back, they supply the same signal. The small jack is thus a sort of built-in adapter. The same holds true for the inputs: there are two large jack sockets (high-impedance mono) for two input signals, which can be amplified by 0 to 60 dB under the control of two potentiometers on the front panel (no detent position). For the microphone connection (with a 5-V phantom power supply), the left channel is imple- mented as a combined phone jack / XLR socket, with a small phone jack connected in parallel. Only a 6.35- mm phone jack is provided for the right channel. The volume control for the headphone is combined with a mechanical-detent on/off switch. All LEDs on the front panel light up briefly after the device is switched on, and when they go dark the 0202 is ready for use. A simple form of signal level indication is provided by a pair of LEDs for each channel. The green LED, which is labelled '-1 2', does in fact light up at exactly the transition from -1 2. 1 to -1 2 dB, but the red 'Clip' LED lights up 3.8 dB too late. During our measurements, we noticed that the E-MU rotates the phase when reproducing signals in 1 6-bit / 44.1 -kHz mode but not in 24-bit / 1 92-kHz mode. A level control is provided for direct monitoring. The two Ground Lift switches on the bottom of the enclo- sure (one for each channel) are a very convenient feature, which immediately proved to be useful during our measurements. The included accessories, which have the largest scope of all the tested cards (five CDs, with Cubase LE and other music production software) include a Windows driver that installs without any trouble, but unfortunately no ASIO driver. 20 elektor - 6/2008 RME Multiface II Hammerfall The only German manufacturer in the group unmistakeably aims its card at professionally oriented musicians, who are not put off by (in this case virtual) patch bays or matrix dis- tributors and complex signal routing using Send, Return, or Pre- and Post-fade Listening. The small PCI-bus card houses little more than the in- terface for the external breakout box, which goes by the name Hammerfall DSP Multiface II. The front panel of the very robust metal enclosure has MIDI In/Out and Line Out connectors. Eight analogue mono inputs and eight mono outputs are located on the back, all with large jack sockets, balanced, and operating at up to 24-bit resolution and 96- l80 kHz in a half-bridge to- pology. Details on the calculations on the transformer are in the textbox. We proceed in the same way to calculate the number of turns for the housekeep- ing and aux. secondaries, keeping in mind the headroom required for the lin- ear regulators (we design for an output of 18 V with the min. input, leading to four turns). The physical design of the transform- er is critical for the performance of the converter, and some guidelines are ex- posed here: - We must have as low leakage induct- 30 elektor - 6/2008 ance as possible. That means as tight as possible coupling between prima- ry and secondary and between wind- ings and the core. To help this, we have split the primary in two parts, 13 turns each, and the main secondary is tightly wound between them. This is called ‘sandwich winding’. - The wire cross-sectional area must be enough to have low resistance and produce low copper losses at the pow- er level we want. But we cannot sim- ply use as thick as possible wire: skin effect is an effect that makes current flow only in the surface of the entire conductor when frequency goes higher. At 85 kHz, it is pointless to use wires above 1 mm dia. or so, so we will use two wires in parallel for the primaries and also for the main secondaries. - Isolation and safety is a main con- cern. Under no circumstance may the primary and secondary wires be short- ed. Moreover, a typically 3 kV voltage shouldn’t produce an arc from one to another, that’s why some distances and materials are defined. We use sup- plementary isolation (special triple in- sulated wire in the primary) and tub- ing in the ends so the proper creep dis- tances and clearances are kept. Note that the primary and secondary pins are assigned to opposite ends of the coil former, so the PCB clearances can also be met (this PSU features 8 mm between primary and secondary, more than what regulation requires for this class of product). - And. . . of course: we must be able to fit all the wires in the bobbin! This may seem trivial but it is not. This trans- former has been tightly and tidily wound, otherwise it wouldn’t fit. There are many more considerations to be kept in mind during the design, such as Eddy currents, varnishing to avoid vibration or mechanical noises, etc, but these fall out of the scope of this description. Secondary sub-circuit Regarding the secondary part of the circuit, full-wave rectification has been used, with a central tap in the trans- former that becomes the GND refer- ence for the amplifier. Note that three dual ultrafast diodes have been used, as now we are rectifying a waveform of 85 kHz and standard-recovery di- odes would have too high losses. It swings from up to 160 V pp , so we have selected 200 V diodes. The worst-case average current that will flow through each diode is (P max /2)/35V = 5.8 A. We have selected 10 A diodes. Following rectification, an LC filter is used. The coil has a function of stor- age of energy when there is no volt- age switched to the transformer (when duty-cycle is below 50%), hence smoothing it with the aid of the capac- itors, so it must have enough induct- ance. Typically used cores are made of ferrite or iron-powder. We have wound both inductors on the same core (but with opposite direc- tions as the voltages have opposite sign). This increases cross-regula- tion drastically (if they were not cou- pled, the voltage in one rail will drop and the other one will rise slightly if the current drawn is not balanced for both rails). Using a toroidal core also has the advantage of having a closed magnetic loop, thus providing little ra- diated EMI. The capacitor bank (also present in linear PSUs), is designed in a different way in switching PSUs: capacitors are refreshed at 2 / switch , which is far more than 100 Hz. This results in a much more constant output voltage (less voltage ripple) for a given total capac- itance. For this reason, typical SMPSs can use output capacitors one or two orders of magnitude lower in capaci- tance than linear PSUs. However, for good reliability, the maximum ripple current rating must be high, and it is usually better to use two smaller caps in parallel than a single larger one, in terms of equivalent series resistance (that ultimately determines ripple cur- rent capability). Additionally, despite the higher re- fresh rate of the capacitor bank, for audio amplifiers it is very important to have a great immediate energy reserve available right at the output terminals of the PSU. That’s why we have cho- sen a relatively large capacitance, as opposed to other audio SMPS manu- facturers. This also allows for a rela- tively slow but very stable feedback loop, while still keeping output quite stiff even with widely varying dynamic loads. This feedback loop is one of the keys in the design of a good (audio) SMPS. Feedback, regulation and V ou , The total output voltage (from + V cc to -V ss ) is sensed with a resistor and selectable zener chain, plus an adjust- able 5 V to 30 V stage built around the TL431 (U2), that sets a reference and drives an optocoupler photodiode. The phototransistor is connected to the control circuit, providing the necessary information so it can control the duty Advertisement ClmScon ElmScan 5 is an advanced diagnostic package for use with EOBD compliant vehicles. • Read and clear trouble codes • Access up to 192 engine parameters • Advanced Graphing and Data Logging • Built-in Dyno and Drag Strip feature • And much more... For under £100! i II A 1 rj 6/2008 - elektor 31 SWITCHING POWER SUPPLY Transformer calculations For the calculation of the primary, we should use the fundamental equation of the transformer flux density, identified for a square wave- form that's related to the input voltage swing, frequency and section of the core: AB = E / (4xlO-8xA e xn pri xf switch ) or n pri = E/ (ABx4xl0 8 xA e xf switch ) where E = peak voltage in volts; A e = effective cross-sectional area in cm 2 ; AB = the peak flux density in Gauss; n prj = the number of turns of the primary; f switch = switching frequency in Hz. We have to ensure the frequency is as close as possible to the de- sired value of 85 kHz. Too high a frequency, and you will have high core losses and switching losses in the MOSFET transistors. Too low a frequency, and you will have excessive flux density, also resulting in higher core losses and reduced power capability for a given core size, as well as bigger secondary-side components (inductors and capaci- tors). A conservative number for AB is around 1 500 Gauss (0.1 5 Tesla) for Ferroxcube 3C90 material, at this frequency, producing around 2W core losses. Given that E is around 155V for 220Vinput (or 1 10VAC input using the proper voltage setting switch), this means that: n pri = 155/(1500x4xl0- 8 xl.25x85000) = 24.31 turns ~ 25 turns. We will split the primary in two halves making it 1 3 turns each, for a total of 26 turns. This allows for a somewhat higher voltage in- put and still have a low enough flux density, (with these numbers AB will change from 1 300 to 1 538 gauss from 200-240 Vac, or 100-120 Vac). Now, we have to calculate the secondary turns. In order to do that, we take the worst conditions to have some margin for the controller to be able to produce the maximum required output voltage. For the minimal nominal input voltage (say 200 VAC or 1 00 VAC with proper setting), we'll have a total of 280 V bus voltage. Assume that we need an output voltage of max. 60 V, and that the controller can put a max. duty cycle of D = 45% (it needs some dead-time). Then the required number of turns for each secondary will be: V out = V in xDxN sec /N pri = V in xDxTR; "^min ^out-max / (^in-min^^) = 0.476 so N sec = 0.476 xN pri = 0.476 x 26 = 1 2.38 turns, we will round off to 13 turns per secondary. (we should really ad up for the bridge rectifier drop, (two diodes drop around 1 .4 V), and for the output rectifier drop, (two fast diodes drop around 1 V), but that's negligible compared with the input and output voltages and we have already provided some margin. cycle of the switching MOSFETs and readjust the output voltage as neces- sary so it is kept constant. Besides im- proving line and load regulation dras- tically, this also allows us to tailor the output voltage to our requirements. It can be adjusted in two ranges (selecta- ble by means of jumper J14 and fine- tuned with the aid of potentiometer PI), between ±35 V and ±60 V. The feedback network and its com- pensation are also critical and the key to success in the applicability of this PSU to audio. We have kept the control board confidential as it is a key part of our technology, but its basic func- tion can be understood quite well as a PWM controller with a feedback input and some protections. Startup and housekeeping circuits The control board needs 10 to 15 V at 70 mA approx. There is a start-up reg- ulator, built around Q4, connected as an emitter follower with an 1 1 V zener acting as the reference at its base. This puts out around 10.3 V from an input between 300-350 V, with current lim- ited by R5 to around 75 mA and con- nected through diode D8 to the con- trol board supply. When the “house- keeping” supply (simply a 7812 12 V regulator fed from an auxiliary wind- ing of the transformer) produces 12 V, D8 gets reverse-biased, so no current flows across Q4, and hence no dissi- pation is produced (apart from that of the biasing resistors of the base zener, R13 and R14). If for some reason (failure, continued short-circuit, etc), the supply cannot start, R5 will warm-up until a thermal- ly-coupled thermostat, Tl, opens, pre- venting an overheating of the startup circuitry. If this happens, the supply won’t start again until Tl closes; this may take several minutes, providing additional protection. Overcurrent protection The current that passes through the primary of TF1 is sensed by means of a high-frequency current sense trans- former formed by a single turn prima- ry and a 100 turns secondary (actually resembling a wire crossing a toroidal coil). When rectified by a fast diode bridge (D15 to D18) and loaded by a 100 ohm resistor, it supplies 1 V/A, and goes to a comparator inside the control board that triggers the protection for 2 seconds when the sensed voltage is higher than approx. 4 V (4 A primary current, equivalent to around 400 W at 100 VAC). Note that the overcurrent limit is only approximate and its main purpose is to make the PSU short-cir- cuit proof. Auxiliary ± 15V supply The auxiliary and housekeeping sup- plies are very similar, comprising a secondary of the transformer (that puts out around 20 V, as its number of turns is 4), followed by a half-wave rectifier and linear post-regulators (7812 for the house-keeping and 7815/7915 for the aux. ±15 V output). If the aux. voltage needs to be extra- clean, an additional LC filter can be added at each output. A 10 to 100 |iH 32 elektor - 6/2008 inductor in series with the output, followed by a capacitor of 1000 |iF to ground will do the job. Note that this auxiliary supply is pro- tected against overcurrent and over- temperature by the 7x15 regulators themselves. Also note that AuxGND reference is floating, so it is NOT connected to the main output GND (you can do this if you need it), nor to mains EARTH. Installation, operation at low output voltage, etc. The PSU should be mounted on a flat aluminum base (such as a case for an audio amplifier), unpainted and total- ly clean, for proper thermal transfer. There won’t be any problems with au- dio use regarding to temperature, as the PSU is very efficient, but if continu- ous power capability tests are made, it is important to provide some forced cooling to the transformer and/or out- put diodes. In order to fix the PSU to a chassis with base thickness W (mm), use four M3 screws with a length between 1/17+2 and 1/17+4 mm, so it gets secure enough but doesn’t touch the PCB bottom. The power dissipation of the entire PSU with no load connected is around 5.5 W, including the output bleeder resistors. The chassis must always be connect- ed to mains Earth, as is prescribed for Class-I equipment. Use one of the screws near the input connector for that purpose. Although this PSU has been specifi- cally designed for symmetric output, it can still be used for single output, by taking the negative terminal from -V ss and the positive from + V cc (GND terminals must be left unconnected). This way, it can be adjusted from 70 V to 120 V. If a lower voltage is required, please ask and we will help you determine if it is doable by simply changing one of the zener diodes or if some other part (such as the transformer itself) needs to be replaced. Note that when working in the lower voltage ranges, the supply may pro- duce some noise or even shutdown with no load, so additional bleeder re- sistors (there is one per rail, RL+ and RL-, already installed) may be need- ed, calculated so they dissipate around 1.5 W max. (if the idle consumption of the circuit you are trying to feed is not enough). When debugging such applications, it is useful to carefully connect two wires to header J8 and measure with a mul- timeter. WARNING: J8 is not isolated from the mains, so respect all electrical safety regulations. Connect the PSU with no load, and the voltage shouldn’t go lower than 11 V. If so, it needs addi- tional loading to keep operating. (070688-1) Advertisement TfHl 01 @35 403*47 Mirwhury Eli:i:l rmii:::-: Llri Fm: Diem 36143 tarc&i/HioJ FLrf.u,- i hi: I: clrrataftnrvjl^ytHin.rci.ui: .«' ithIi m ryrd i>^ti rri n = . r:-a . i i k MM4 LH-rL DIKE ' ill Jk tjAMt. a 7 jA i 1 Q /N Lr aa/n 1 Hrcr-B^a tp Now tet Dli'ul.' fscvBidpJ raufl viM\a cowibu tj b-parlrnrl hvlh* ' 5 DwJtfi tnv^rwl ty Ihe* aoqom, sirtrt* zx kfHwtiniTYi, 4 * PYi'.ii.ii:5X-Kr*£0fTVL-iijii>M “ *V- ' ?■ tNCfSJnPR- < 4- ■ ■TnfiJh. Dffmsn iLTIhh-i! L THt Fyn ■fi'Jr $ ■ fuii AimnUrd Ml up Ucfcrti him] ,, r mOcak pn & thw hM ' .iiiJ hiMi r i jir.J.. . it*!- 1- h,- www:xEameStat!on.cdm Pm: 1 E .2 fr 6.Z3S r 3 | L n. • C* b" h n 6/2008 - elektor 33 MILLING Experience, tips and helpful hints Frank Jacops (Colinbus) A year and a half after the launch of the Profiler milling machine, it's time for a brief look back on this project. What can this machine do, and what experience have its users acquired with it? We also want to mention a few tips and helpful hints here. The Profiler projected initiated by Elektor in cooperation with Colinbus in January 2007 has proven to be an over- whelming success. At last there was an affordable milling machine available that could handle diverse jobs. Unfor- tunately, this machine proved to be more difficult to build and use that some of its purchasers expected. This led to a few unhappy users, especially in the early days. However, most users went to work enthusiastically and managed to produce true works of art with their Profiler within almost no time, which they exhibited on websites and in Elektor forums for the whole world to see. In this article, we want to summarise the experience of the past one and half years and discuss a few important as- pects of using milling machines in general and the Profiler in particular. What did we have in mind? The Profiler is a robust machine that is suitable for relatively substantial engraving and milling work. However, it has its limitations, just like all other machines on the market. What did people expect and what did they receive, what expe- rience did users have with machine tools, and how much time were they willing to invest in making up for any lack of experience? Many of the early purchasers clearly had unrealistic expectations about how easy it is to use a mill- ing machine of this sort, and they were thus disappointed with its capabilities or the results. When we put together the Profiler kit, what we had in mind was the following: the design and construction of the kit must be clear, so that everyone with a bit of technical knowl- edge could easily assemble the machine. The resulting ma- chine must be sturdy and sufficiently robust for machining light materials, and accurate enough for standard engrav- ing work. In other words, it should be a general-purpose tool for model builders as well as electronic hobbyists. The kit idea had one major advantage: the price could be reduced drastically. However, it had the immediate disad- vantage that the ultimate quality of the product was deter- mined by the builder. Within a few weeks after the launch, it became clear that this was a major factor. For example, quite early on there were a few dissatisfied customers who couldn't manage to put together a properly working Profiler, even after many fruitless telephone conversations and e- mail communications. They were invited to visit the Colinbus factory for personal assistance, and in most cases correct adjustment or better alignment turned out to be the answer to their problems. These users later proved to be the best promoters of the Profiler kit. 34 elektor - 6/2008 The included software Two software packages are included with the Profiler as standard: ColiDrive [1] and ColiLiner. Both of them are derived from professional programs that have more to of- fer in terms of options and performance. The supplied ver- sions are so specifically aligned to the needs of typical Profile users that every desirable function is available if the user has a bit of skill. You can import drawings for milling shapes and generate contours for milling prototype circuit boards. This works quite well, as can be seen on many user websites. However, the customer support department of Colinbus re- ceived many questions, especially about the ColiLiner con- version program, which converts Gerber files into contours for the Profiler. The problems here had less to do with the supplied software than with the complexity of the Gerber standard. This format has a vast number of options and variants. Besides using the prescribed apertures, makers of PCB design packages can also use forms they create themselves, and they can work with different units at the same time. Given this situation, producing software that provides the right conversion at the press of button un- der all conditions is practically impossible. The problem files that Profile users sent to the support department were read in using a variety of Gerber viewers. Where one file might work perfectly with viewers X and Y but not with A and B, another file would work OK with A and B but not with X and Y. However, most of the viewers and ColiLiner had one thing in common: after a few minor adjustments to the settings, the right PCB always appeared on the screen. Unfortunately, adjustments of this sort require a certain amount of knowledge of the Gerber format or suit- able patience. Once you have found the right settings for your CAD software, all subsequent files can be imported without any problems. As the name suggests, ColiDrive is the software that you use to drive the machine. Unlike what some people mistakenly understood, it is not a CAM package with integrated control functions. As with most CNC machines, the idea is that ColiD- rive receives machine code from a CAM package (ColiLiner is an example of a CAM package, but as already mentioned it is primarily designed for use in the electronics sector). Inci- dentally, with many CNC machines the users must write their own code, and this is also possible with ColiDrive. As the number of delivered Profiler kits increased, it became clear that there was a strong need for direct data import capability. In hindsight, this is not surprising. Up until then, ColiDrive had only been supplied to the professional sec- tor. In this sector, a machine is purchased for a particular purpose, and buying CAM software specifically made for this market is taken for granted. This is not the case with the Profiler. For this reason, a few weeks after the launch we decided to add an HPGL import function. As just about all commercial CAD packages can export in this format, with the inclusion of the import function it became possible to engrave or mill any desired shape without having to use a special CAM package. Of course, you can do a lot more with real CAM software. A lot professional CAM packages have a postprocessor for ColiDrive. If you do not have this, it is very easy to write one yourself. The ColiDrive data structure is described in the document available at the following link: www.colinbus. com/ profiler/ commandset.pdf. How to improve your Profiler The spindle motor When the Profiler was launched, the primary consideration was to supply a sound machine. To ensure that its owner could use also use it right away, the kit was completed with a simple spindle motor and an MDF base plate. This is a 6/2008 - elektor 35 MILLING good solution for experimental use or simple milling work. Depending on the objective, you can continue using the machine with this configuration or acquire more profes- sional tools The spindle motor included with the kit is suitable for mill- ing materials such as balsa wood and relatively soft plas- tics. If you want to machine harder materials or do more precise work, it is certainly worthwhile to invest in a better motor. The fact that quite a few people were nevertheless satisfied with the performance of the machine was a mat- ter of pure luck, since some of the motors had 0.01 mm of play, while others had 0.5 mm. But as many people re- marked on the Elektor forum, the price/performance ratio was reasonable. If you want something better, you must first ask yourself what sort of work you want to use it for. Do you want to do very nice, fine engraving, do you want a powerful motor for milling hard metals, or do you want both? A truly pro- fessional spindle motor is expensive - as much as several times the price of the Profiler. It is thus questionable whether such an investment is sensible. Practical experience shows that an AC spindle rated at around 500 watts is the most suitable. More powerful mo- tors are generally to large and too heavy for the Profiler. provide the basis for an inexpensive but stable support sur- face. If you want to invest a bit more, you can of course buy a plate with slots for T-nuts or a vacuum table. Each of these options has its own specific advantages, depending on what kind of work you want to do. A vacuum table is ideal for machining flat material and films or for securing material without subjecting it to exces- sively strong forces. A vacuum table is particularly suitable for jobs with repeat parts. You can simply place the work- piece against a stop on the table, switch on the vacuum, and start machining. With a few accessories, you can also have the vacuum table or dust extraction system switch on automatically. A T-slot table (see the lead photo) is ideal for clamping relative bulky workpieces. Nuts with a built-in spring can be slid into the slots and used with screws to secure clamps and blocks. The spring nuts can be shifted in the slots, which makes it very easy to clamp workpieces with differ- ent dimensions. Naturally, you can also use the Profiler to make your own T-slot or vacuum table. However, you should bear in mind that making a decent T-slot table is relatively expensive and takes a lot of work. By contrast, making a vacuum table is relatively easy. Unlike most DC motors, AC motors of this sort are also af- fordable. When looking for a motor, remember that it must be designed for machine mounting. You can see this from the steel mounting ring, which is used to attach the motor to the machine, and which also usually houses the bearings. The bearings must be suitable for machining use. Kress has a suitable motor, which is actually a bit too heavy for the Profiler, but the price is attractive. Colinbus can supply the IAC-500, which is ideal in terms of weight and precision, but it is it considerably more expensive. A variety of similar products are available under various brand names, and we recommend comparing them and carefully weighing their pros and cons. For Profile users with deep pockets, there is also the Jager brand. These motors are very powerful and highly precise, and they are very lightweight. The only problem here is the price. The base plate A relatively thin MDF board is supplied with the Profiler for use as the base plate. If you want something more robust, pick up a piece of board at a builder's merchant with a thickness of 20 mm (it hardly costs anything), which will Milling 2D, text and PCBs Beside learning how to operate machine tools, program- ming in G code and studying the properties of materials, professional milling machinists in training spend a year learning machining techniques. Naturally, the average Profiler user does not have this knowledge. Thanks to the user-friendly interface of the Profiler and mod- ern CAD/CAM packages, relatively inexperienced users can also produce very nice results with CNC machines. However, this does not mean that there is no longer any need for some knowledge of machining techniques. Al- though the user can usually have the machine do what he wants, the machine does not always do what it is sup- posed to do. In fact, it often doesn't. Poor milling results are usually not the fault of the machine or the software, but instead almost always a consequence of incorrect settings. Nevertheless, hundreds of users have shown that splendid results can be obtained with a bit of patience and experi- menting. If you do something wrong and the Profiler gets stuck, there's no need to panic. It may complain, but it won't break. The message here is: try to find the best settings for each machining operation. Milling 2D shapes and engraving text The Profiler is primarily constructed for milling all sorts of 2D shapes. Many users draw the shapes in ColiLiner, gen- erate the milling paths, and leave the rest of the work to ColiDrive. ColiLiner is not a real drawing package, but can still do quite a lot. For instance, you can use all standard text fonts, and most drawings work out nicely. However, if you want to use your own drawing package, simply ex- port the drawing as an HPGL file and import it directly into ColiDrive. Milling 3D shapes The Profiler is not actually designed for 3D work. Neverthe- less, it can be used to make very nice 3D shapes. This state- ment on our part drew a certain amount of criticism from users, and some explanation is in fact necessary. With a real 3D machine, the three axes are interpolated simultane- ously. This is not the case with the Profiler. Only two axes can be interpolated at the same time, so the third one al- 36 elektor - 6/2008 ways comes afterward. It is thus possible to mill 3D shapes, but the end result not as nice and it takes much longer. For this reason, may people who like to make 3D forms first mill the shape and then finish the piece by hand (sanding). The final result looks surprisingly good. Additional CAM software is necessary for 3D milling; it is not included with the Profiler. For example, Colinbus can supply DeskProto as an affordable solution. This package is not especially suitable for 2D milling, but it is a very power- ful tool for making 3D models. Milling PGBs The Profiler is supplied with ColiLiner Lite (especially for Ele- ktor readers who would like to mill the occasional PCB). The software supports reading in a Gerber or Excellon file and then milling channels around tracks and pads. This isn't as easy as it sounds. As far as we know, there are only a few software packages on the global market that can handle this, and they are either very expensive or are only supplied together with expensive milling machines. The fact that the Profiler is supplied with this software does not really mean that the Profiler is a true PCB milling ma- chine. This was already clearly stated in the first article. However, the many links and photos that users sent us clear- ly show that it is possible to mill good PCBs with this ma- chine. As we have received a lot of questions on this sub- ject, we want to address it here in somewhat more detail. Milling PCBs is becoming increasingly popular. This is not because it is better than etching, but instead because it is faster and more environmentally friendly for one-off boards. With a true PCB milling machine, you can easily mill five tracks between the pins of an 1C, which is more than good enough for modern circuitry. If you want to get acceptable results with the Profiler, it's only logical to have a look at how the pros do it: what tools do they use, and how do they achieve such amazing results? Fitting the PCB is an important factor. The best way to do this is to use two small pins, since this way you can also make double-sided boards (even with the Profiler). ColiD- rive is certainly not an obstacle here, since it is specifically made for this and shows an imaginary mirror line on the screen. In practice, you start by drilling a hole with a diameter of 2.95 mm, located approximately in the middle of the X axis and at the start of the Y axis. Press the first reference pin in this hole [4]. Use a 3-mm dowel pin and ensure that it protrudes by approximately 4 mm. Now drive the machine bridge straight backward and drill a second hole approxi- mately 20 cm away from the first one. Press the second ref- erence pin in this hole. Store the location data in ColiDrive so the software knows the position of the reference line. If you use a T-slot table, you can drill the holes in small plastic blocks. You can then use all different sizes of PCB material by sliding these blocks to different positions. To avoid any misunderstanding, note that the idea here is to mount PCB material on the machine and then mill one or more PCBs in the material. As you also have to drill holes in the PCB, you have to use underlay material. Use a small board with a thickness of 2 mm for this - preferably a material that stays nice and flat, such as MDF. In this material, drill two 3-mm holes with exactly the same spacing as the on the reference board, and then place it over the two reference pins. Do the same thing with the PCB material. Note: single-sided PCB mate- rial may be slightly bowed, and if it is, it must be held flat with clamps or tape. Now you have the material on the machine, and you can start making the PCB. Drill the holes first, as otherwise thin drills may break or thick drills may chew up the pads. There's not much that can go wrong during this process, since ColiDrive always asks you to fit the right drill in the holder. After all the holes are drilled, you can use small conical milling cutters to the tracks. End mills are too frag- ile for this work because the insulating channels are very thin, and they also wear much to quickly. To ensure that no residual copper is left, it is necessary to mill a little way into the tough epoxy material, and this dramatically reduces the life of the cutters. Using conical cutters also has some disadvantages. In par- ticular, the milling depth must be controlled precisely, as otherwise the width of the milled channel will vary, which creates problems with fine circuit board tracks. Most Profiler users solve this problem by first milling the base plate per- fectly flat. If the PCB material is then fastened securely and held flat, the milling depth remains constant. A better alternative is to use a floating cutter head. With this arrangement, the spindle motor is mounted in a holder that can move freely along the Z axis. The bottom ring slides over the surface of the PCB and ensures that the cutter - which is always at a fixed distance from the ring - main- tains a constant cutting depth in the copper. If you use this arrangement, it doesn't matter whether the material is flat or bowed (within certain limits, of course) - the milled chan- nels will always have a constant width. As floating cutter heads are usually adapted to the spindle motor that is used, they are difficult to find as commercial products. However, it's fairly easy to make one yourself once you understand the principle.. After the PCB has been completed, it can be milled out of the base material. This is usually done with a 2-mm rough- ing cutter. Do this at a very low feed rate, such as 5 mm/s, since otherwise too much heat will be generated and the tool will break. A manual for using the Profiler to make PCBs is available on the Colinbus website at www.colinbus.com. For instance, it describes how you can make double-sided PCBs, despite the limitations of ColiLiner Lite. Be sure to download it - it's certainly worthwhile. Handy milling tips If you read milling tips on the Web or consult professional literature, you often obtain information about using large milling machines to machine materials. The Profiler is not 6/2008 - elektor 37 MILLING a large milling machine, and it must be used in a different manner. In the first place, you use smaller tools with the Profiler. Un- less you are working with very soft material, a 6-mm cut- ter is already quite large. Given that you are working with relatively small tools, it is often advisable to use a fairly high feed rate (the rate of travel for milling) and restrict the cut- ting depth. It is thus better to mill somewhat faster but not too deep. If you follow the suggestions listed below, your milling work will look a lot better. How to mill: As we just mentioned, keep the cutting depth fairly shallow - the quality degrades quickly with increasing depth. Mill clockwise on inside curves and anti- clockwise on outside curves. This yields the best appear- ance on the final product. Which cutters: Cutters are available with one, two, three, or four flutes. This refers to the number of cutting edges around the circumference of the cutter. Each type has its own properties. Single- and double-flute cutters are used for most jobs with the Profiler. Triple- and quad-flute cutters are primarily used for hard alloys, and the Profiler is not suitable for these materials. Single-flute cutters are primarily used with wood and plas- tics, but nowadays they are also used with aluminium, due to the use of stronger cutter materials. Single-flute cutters enter the material better and have better chip removal than double-flute cutters. Double-flute cutters are the best choice for milling plastics and non-ferrous metals. They produce a smoother finish and wear less quickly. They are also often used for a final polishing round. Cooling: Cooling is almost always necessary [5]. The type of cooling depends on the material to be machined. As it is not possible to use liquid-stream cooling with the Profiler, the following tips can be helpful. Copper, bronze, brass and aluminium can be cooled quite well with methylated spirits. Thin oil is also good for cooling aluminium. You can use a small brush or plant sprayer to apply the liquid. A couple of handy youngsters remodelled a paintbrush and fitted it to the machine. Spindle speed: With plastics, the result is strongly de- pendent on the feed rate and spindle speed. A high spindle speed can be used for milling metals, but this is often inad- visable with plastics. With a high spindle speed, the plastic melts and sticks to the tool, and everything gets stuck. Although many people may not believe it, the feed rate is often too low. A lot of heat is generated if the cutter moves slowly through the material, and this causes problems. If nothing else works, try cooling with compressed air. Solid-core board (such as Trespa) can be milled very nicely, but it causes a high rate of tool wear. Always enter the ma- terial very slowly, because the highest rate of cutter wear occurs during plunge cutting. Always use single-flute cutters for milling polystyrene and foams. Cooling is rarely a problem with the correct machin- ing speeds. If cooling is necessary, you can only use air. Securing the tool and workpiece: Always insert the tool as far as possible into the holder. Tools that extend a long way create troublesome vibrations. The work table must be flat and stable. The T-slot table (optional acces- sory) is very suitable for this purpose. The workpiece must be held firmly so no vibrations can occur and it cannot slip (which is much worse). Use clamps to secure the workpiece firmly in place. Spray-on glue and double-sided tape are good options for thin or light materials. Applications Many enthusiastic users have sent photos, drawings, and stories about the various applications they have found for the Profiler. Many of them came from departments of large companies that use the Profiler as a platform for experi- ments, but they also came from many hobbyists and self- employed persons. Some examples: - A large cosmetics company used two Profilers to fill more than 800,000 bottles. - Several users drill hundreds of PCBs every day with the machines. - A builder of architectural models created a model of an entire neighbourhood in a month. - A user in the diamond business uses three Profilers to measure and check diamonds. - A lot of users employ the Profiler for potting and dispensing... - ...or for ultrasonic cutting of plastics. - A toy manufacturer uses it to produce all of its new models. - And of course, there are hundreds of hobbyists who make incredibly nice things, such as lifelike cockpits (hi Hessel), miniature cars, microscopic components, splendid jewel- lery, clocks, and very fine printed circuit boards. As you can see, everything is possible with this milling ma- chine if you just put some time and effort into it. Check the Profiler forum on the Elektor website for even more ideas, tips and reports on user experience. ( 071082 - 1 ) The Profiler kit can still be ordered on the j Elektor website. Col nbus presently has around 100 kits in stock in the warehouse. If you order now, the kit can thus be delivered quickly (as long as stocks last). 38 elektor - 6/2008 stactm:nc def tel. 01298 70012 / fax. 01298 70046 www.peakelec.co.uk sales@peakelec.co.uk Handheld Test Gear - Cool, Smart. Atlas ESR Atlas DCA Model DCA55 Atlas ESR Model ESR60 Semiconductor Analyser Identifies type and pinout! ESR and Capacitance Meter Resolution of 0.01 ohms! Atlas SCR Atlas LCR Model LCR40 Atlas SCR Model SCR100 Inductor, Capacitor, Resistor Analyser Triac and Thyristor Analyser Automatic part identification. Auto gate test current up to 100mA UK: Please add £1.00 p&p to your order. Prices include UK VAT. Please see website for overseas pricing. SERVICING YGUR COMPLETE PROTOTYPE NEEDS 1 EUROCARD (160 k 100 mm) + Tooling + Photoplofs + VAT Price example Any size and contour possible! Optional: • Soldermask • Fast-turnaround • Silkscreen • 4-Layer Multilayer • 6-Layer Multilayer mwhmo oust rz-:; Tiisc: : rii , Freephone Q) 0800-3 898560 £ ' ; : i, ■ pis-jJ g j ■ - i i.:.l Simply send your files A/IA A/|/|l and order ONLINE: ying New Thinkin electronics OigitoE Panel Meiers An rtn:yis gl LCD SftO LED vgHiiHtters | pcmd 'iy UiijJ-. ■in.-iurcty -iiicg^yruFriuril pi vralluEj^e, iUrtTEinfi -arid ri^b-luftce. Graphics and Dala Displays A rang* fit dol-mfllrljt and dala display* fra mioroerailrollef bated opfdicotiGrrs □variable LCD or LED. Custom Displays Cemprehemiv* cu slain duiign ierviee oNenng o choke of lechnologi^i lo deliver o tantbra’dj coi^ellechve and ^liable display totality* lor your rwt projed Whatever your display needs lor your next project, Lascar can help Tel: -1-44 (0)1 794 884567 - Fful; +44 (0)1794 884616 . E-mail: Sa les@ldicnr.co.uk www* lascarelectronics.com 6/2008 - elektor 39 TECHNOLOGY SMPSU THEORY Cool Power Switch mode power supplies: an introduction Sergio Sanchez Moreno Switch Mode Power Supply Units (SMPSUs) are often too quickly put aside because of their complexity. This article presents an overview to SMPSU technology and a brief description of the most widely used topologies, but in a practical way, trying to demystify the topic and encourage the electronics entusiasts to start developing his or her own 'switchers', or at least know how to choose the right topology for a given application. Electronic equipment needs power, mostly in the form of a static voltage (DC). The national grid delivers an alternating voltage (AC), so most electronic devices have a dedicated power supply (PSU) to convert this alternating voltage to the voltage that is needed by the circuitry. This conversion is never 1 00% efficient. Generally, we have two types of power supplies: linear and switching. A linear power supply uses a pass element such as a transistor that dissipates the excess energy. This, of course results in energy loss due to the simultaneous voltage drop and current flowing through the component. A switching power supply delivers its power in pulses or periodic "packets' (at typically 10 kHz to 1 MHz rate) that are averaged to provide a smooth output. The power is transferred to the load (circuit) by means of non-dissipa- tive components (at least theoretically), such as switches that operate only in two states, ON and OFF, inductors, capaci- tors and transformers. A theoretical switch doesn't dissipate power, (P=Vxt) because when it is open, no current flows through it, and when it is closed, it becomes a short-circuit (the voltage drop across it is 0). Of course there will be 40 elektor - 6/2008 some losses in practice, but for sure we start from a better point than with linear regulators in terms of energy usage! Why choose SMPSU? Efficiency: one of the key advantages of SMPS (switch- mode power supplies) is that power can be converted in a useful way to the load and still keep losses very low, typi- cally below 20% of the useful power. Generally this is way better than a linear PSU. Size: d espite a generally higher parts count, when all things are considered (the heat sink that may be required for this one, for example), a 'switcher's' size can be con- siderably smaller than a linear PSU. When transformers are involved, such as in AC/DC converters, the reduction is drastic, because switching transformers operate at much higher frequencies (10 kHz-1 MHz) so their size can be greatly reduced. Flexibility: switching regulators easily provide multiple voltages from a single input source, even higher in value or polarity-inverted. This is more difficult and costly to do with linear PSUs. Disadvantages of SMPS Noise and interference: the fast transitions occurring in a switching regulator can produce a lot of harmonics that are easily radiated. If not properly controlled, this may cause interference with nearby equipment or with the load itself. This noise can also be conducted in the forms of spu- rious noise or ripple. Fortunately, a lot of effort has been put into this issue and now it is possible to have very quiet SMPSUs even at high power levels. Complexity/Reliability: the higher number of parts in a typical SMPSU, including the control circuit, has an impact in reliability; the more parts, the more possible failures. Among them, power semiconductors are the most prone to failure, although with careful design and thanks to the out- standing evolution of semiconductors, very high reliability can be obtained now. Design difficulty: the design of a switching power sup- ply is totally different and generally more complicated than an equivalent linear PSU, and the designer must know a lot of fields (power electronics, magnetics, EMI/RFI, feedback theory, etc). Buck converter The most basic switching converter is the buck converter. It takes a DC input and converts it to a lower DC output. The basic architecture can be seen in Figure 1 . The buck converter comprises a switch, a diode (that acts like a second switch), an inductor, and a smoothing ca- pacitor. There are two possible status for the switch, ON and OFF, that are determined by a controller, whose main function is to get the output voltage to the desired value re- gardless of the input or load variations. When the switch is ON (closed), the diode is open as it is directly connected to the input and becomes reverse biased,. Then, V m =V v +V Q , so Vi=V\ \-V Q . The basic equation of an inductor is V^Ldl^ dt, then Vi -Vo L As -(V\-VJ/L doesn't depend on time, the increment of the current is constant and it becomes: Vi -Vo 1 (i.e. inductor current increases linearly during the ON phase). When the switch is OFF (open), the input voltage source gets disconnected from the circuit, and the diode gets for- ward biased, providing a patch for the current to flow. Vi=-V Q . So, similarly, we obtain AI L(off) -Vo L f °ff These are only increment rates, not absolute values. The average value of the current, / , depends on the load resistance, and will be the mean value of max. and min. currents. Continuous vs. discontinuous operation 2 In Figure 2 you can see the aspect of the inductor cur- rent, that is a triangle centered in the average current, ris- ing and falling linearly when the switch is ON and OFF, respectively. We assume that / L never drops to zero. We will call this mode "Continuous Conduction Mode (CCM)". Then in steady state it is clear that / L at the start of the cycle (t=0) must be the same as / L at the end of the cycle (t=T), because if not, the average current would indefinitely increase or de- crease. Thus, the increments A l L ( on j and A must be equal 6/2008 - elektor 41 TECHNOLOGY SMPSU THEORY but of opposite sign. That means that A/ L | on j = -A / L ( 0 ffj, so relation between V Q and Vj is not as simple as in CCM. For reference, the output voltage can be calculated then as: Vi -Vo 1 Vo L t off Vi 2L'Iavg , ^ D 2 'Vi'T + If we assign D (duty cycle) to the portion of the period T (=1/F S , switching frequency) that the switch is on, D=t on /T, then t on =DT, so the rest of the time the switch is off: t 0 ff=T(l-D). Substituting, Vi -Vo L DT = Vo L (1 -D)T As you can see, now it also depends on the switching pe- riod (T), the value of the inductor and the input voltage itself. The minimal average current that guarantees that the induc- tor current doesn't drop to zero (so we keep the converter in CCM), is: / > 1 avg(CCM) — Vi( 1 - D)DT 2 L or, simplified: Vi D will be always less than or equal to 1 , so V Q will always be less than or equal to than V r That's why the Buck con- verter is also called 'step down converter'. Note that, in CCM, V 0 only depends on the duty cycle and Fj. For example, if we want 5 V from a 1 2 V input, the con- troller will have to turn the switch on during 5/1 2=0.41 66 (41 .66%) of the time, regardless of the load, leaving it off the rest of the cycle. If the current drawn by the load is not large enough, the former current waveform will evolve as shown in Figure 3, eventually reaching zero when the switch is OFF. This mode of operation is called Discontinuous Conduction Mode (DCM). In DCM we can't apply the above equation that the increments Al L f on j and A have the same magnitude, and the math become more complicated. In this case the If one wants to keep control of a buck converter simple, a minimal load must be provided so it remains in CCM. There is no cause that impedes us running a buck regulator in DCM mode, although in this case it is sometimes better to use the variation of the switching frequency as the control parameter, instead of the duty cycle, (FM, frequency modu- lation instead of PWM, pulse width modulation). Boost converter 3 Figure 4 shows the basic architecture of a boost converter. The analysis is very similar to the buck converter, the main equations being V L = V x (ON state), so: t on Note that, during the ON state, the current to the load is supplied by the storage capacitor, thus the output voltage is smooth if it is large enough. For the OFF state Vi=V--V 0/ so: A / L(off) Vi-Vo Now we find that: 42 elektor - 6/2008 Vo 1 Vo -D Vi 1 -D Vi 1 -D D will always be less than or equal to 1 , so V Q will always be equal or greater than V r That's why the Boost converter is also called 'Step up converter'. In CCM, output voltage only depends on the duty cycle and input voltage. For example, if we want 1 2 V from a 5 V input, the controller will have to turn the switch on dur- ing 58.3% of the time, regardless of the load, leaving it off the rest of the cycle. However, as opposed to buck regulators, boost ones are more commonly used in DC M for stability reasons. The ex- pression for the output voltage becomes: So the buck-boost converter can provide a voltage from theoretically 0 to theoretically minus infinity from a positive input voltage. Of course, this converter can also operate in DCM if the load current / avg is not large enough. In this case, analyzing the storage of energy in the coil, we can demonstrate that the V 0 /V x relation becomes: Vo Vi v.d 2 t l 2 LI avg Vo Vi vd 2 t = l+- i — 2LI avg There are of course countless variations of these basic to- pologies, such as the "Cuk" converter, that provides the same V Q /V\ relationship as the Inverter topology but using two inductors. In order to allow for core flux reset and avoid saturation, D is usually limited to around 0.8. NOTE: There is another topology also called ‘Buck-boost’, consisting of a buck converter followed by a boost converter, with the additional difference that it doesn't invert polarity. Buck-boost or inverting converter The inverting converter is used to obtain negative voltages from a positive source. Figure 5 shows the basic schemat- ic. The analysis is very similar to the boost converter. The main equations for the ON state are Vj_=Vj, so: Vi Air, ,=—t Isolated converters When the input or output voltage is high enough to be dangerous, an isolated topology must be used, where the separation between input and output is not accomplished only by a semiconductor, but by a physical dielectric bar- rier. The circuit is then split in two parts: the primary (that gets power directly from the source) and the secondary (where the output(s) are connected). International regulation dictates some norms about the required distances (named clearance and creepage) between both parts in order to ensure safety. These norms must be had in mind when de- signing an isolated converter. The typical application of isolated converters (although not the only one) is AC/DC (mains input) PSUs, also called "offline converters". There are several topologies, some of them directly derived from the basic regulators explained before, while others are a bit more complicated and ap- peared in order to provide higher power levels. For the OFF state Vj_=— N/ 0 , so ^L{off) T t off Being in parallel with the inductor, the capacitor gets charged to a negative voltage during OFF phase, and then provides current to the load when the switch goes ON again, allowing for assumedly constant output. The follow- ing relationship between V Q and Vj exists: Flyback converter The basic schematic can be seen in Figure 6. It is clearly derived from the buck-boost (inverting) converter: the input inductor has been substituted by a transformer, with the di- ode and capacitor connected in its secondary. The dots and diode polarity have been rearranged so the output voltage is positive. Finally, the connection between primary and sec- ondary has been removed to provide galvanic isolation. When SI turns ON, the transformer current starts to ramp up linearly at a rate ixV/L p ^ where L pr] is the primary in- ductance. As primary and secondary have opposite polar- ity due to the different position of the dots, the secondary voltage is multiplied by the turns ratio N 2 /N^ and inverted in polarity, so the diode gets reverse biased. The load is 6/2008 - elektor 43 TECHNOLOGY SMPSU THEORY supplied current by the capacitor alone, that we assume previously charged. When SI turns OFF, there is no primary current, but the polarity reverses, and so does the secondary voltage: the diode gets now forward biased and hence the core energy can be discharged through the secondary (see Figure 7), at a linear rate of -txV Q /L sec . During this time, the load re- ceives current, and so does the capacitor, that replenishes its charge for the next ON time. During OFF time, the secondary voltage is reflected back ("flies back") to the primary, multiplied by the turns ratio, so the rating of SI must be at least \Z jn +V 0 xN 1 /N 2 plus some margin. Unlike in other types of isolated converters, the flyback transformer stores energy itself (as well as the capacitor that supplies the load during the first part of the cycle), and is usually constructed with ferrite materials, with a 'gap' or separation between the core halves that increases energy storage capacity. Using the expression of the energy stored in an inductor during the ON time, and assuming that it fully discharges during the OFF time (discontinuous mode), the expression for the output voltage is: ^ = z>. Ui- Vi \| 21 L . V avg pn The controller can adjust the output voltage by means of the duty cycle D. Note that the voltage at the primary is always positive, so only one quadrant of the transformer B/H curve is used, leading to inefficient core use. Other topologies such as push-pull or half/full-bridges can get at least double the pow- er from the same core volume. But even when a flyback is useful only for <200 W typically, it has lower cost (doesn't need output inductors, uses a single primary switch and sec- ondary diode, etc), and that's one of the main reasons for its popularity. Flyback converters can be found in every TV set, monitors, laptop chargers, small adapters, etc. The flyback can be constructed with many output voltages with the only addition of separate secondaries. Cross-regu- lation (regulation of each output when the load of another output changes) is particularly good in this topology, that's another reason of its success. 8 Push-Pull converter When higher power is needed, better transformer utilization is required, and hence a topology that uses two quadrants of the B-H curve (provides positive and negative voltage swing to the primary). The push-pull is one of these topolo- gies, see Figure 8. The transformer has a centre-tap in the primary, connected to the input source V u so it really has two identical primaries in series, each having N] turns. The same happens in the sec- ondary, there are two in series each one having N 2 turns. Both switches are activated by a control voltage with duty cycle varying between 0 and 50%. Both switches can never be ON at the same time. Figure 9 shows the basic wave- forms of this converter. When SI or S2 turns ON, its corresponding primary is set to almost 0V, so it primary 'sees' V r The total primary voltage then swings from -V, to +V r The current of each primary ramps up linearly during the corresponding ON time due to the primary inductance. The primary voltage is multiplied by N 2 /N 1 and applied to the secondary. The corresponding diode gets forward biased, so when any of both switches is on, there is current in one of the second- aries, so the inductor current, that supplies the load (and capacitor) ramps up. When both switches SI and S2 are OFF, the diodes block and the only current to the load is provided from the output inductor (and the smoothing capacitor), that starts ramp- ing down at a rate -txL 1 xV 0 . The expression for the output voltage is 44 elektor - 6/2008 Vo The controller can adjust the output voltage by means of the duty cycle. Note that we can get an output voltage that is lower or higher than the input, depending on the trans- former construction. There is a potential problem with push-pull converters that has limited their use: if the flux swing magnitude is not ex- actly the same for both half-primaries, the core will eventu- ally 'walk' into saturation. Its inductance drops drastically, behaving nearly as a short-circuit, so the switches will be destroyed. This can be detected because the current wave- forms of the switches don't have the same amplitude, and when the situation is really critical, one of the waveforms can start to curve upwards at the end of its ON time. This is less of a problem with MOSFETs, that provide some auto-correction due to their negative temperature coefficient (^ds(on) increases with current, so primary voltage drops due to the higher V ds(on) ). Note that the voltage each switch withstands is twice the input voltage, so they are not very suitable for high power off-line converters (each switch would have to be rated at nearly 1 KV and also high current, being expensive). This kind of converter is preferred for lower V, A typical application of push-pull converters are step-up inverters for powering audio amplifiers from car batteries, up to 1 KW. The primary currents are huge, but the voltage rating of the MOSFETs is only 30-60 V, so there are many high-current devices readily available. Half-bridge and Full-bridge converters For 230 VAC off-line converters, the voltage in the push- pull MOSFETs may become unpractical. Half-bridge and full-bridge converters, on the other hand, allow for a more relaxed rating of the switches, while still providing high output power and good use of the transformer. The sche- matic of the simpler of both, the half bridge, can be seen in Figure 10. This topology also uses two switches, two rectifier diodes and 1 output inductor. The transformer has a single pri- mary with N 1 turns, and two center-tapped secondaries, each one having N 2 turns. Note that the other transformer primary leg is connected to V/2, built with a capacitive voltage divider. Both switches are activated by a control voltage with duty cycle varying between 0 and 50%. Both switches can never be ON at the same time. Figure 1 1 shows the basic wave- forms of this converter. When SI or S2 turns ON, the transformer leg that is con- nected between them is switched either to V ] or 0V, and as the other leg is fixed at V/2, the total voltage in the prima- ry swings from -V/2 to +Vi/2. The current of the primary ramps up (in magnitude) linearly during the ON times. The primary voltage is multiplied by N 2 /N] and applied to the secondary. The corresponding diode gets forward biased, so when any of both switches is on, there is current in one of the secondaries and hence one of the diodes is forward- biased, so the inductor current that supplies the load (and 11 6/2008 - elektor 45 TECHNOLOGY SMPSU THEORY capacitor) ramps up. When both switches SI and S2 are OFF, the diodes block and the only current to the load is provided by the output inductor (and the smoothing capacitor), that starts ramping down at a rate -txL ] xV Q . The expression for the output voltage is similar to the push- pull topology, but as the voltage swing of the transformer is halved: Vo Vi The controller can thus adjust the output voltage by means of the duty cycle. Note that we can also get an output volt- age that is lower or higher than the input. The full bridge is very similar, but the transformer primary is connected between two sets of switches, for a total of 4. The left side top turns ON simultaneously with the right side bottom, and conversely. The capacitor voltage divider doesn't exist, and the voltage swing in the transformer pri- mary is doubled (and hence its use is fuller). The output/in- put relationship becomes: Vo Vi Sometimes, a coupling capacitor C c is added in series with the primary, in order to remove any DC in the transformer windings and avoid saturation. C c must have a value large enough so that it doesn't produce significant (<5%) volt- age "droop" on the top of the transformer primary voltage waveform. A high voltage polypropylene of good quality ceramic cap should be used. The voltage-divider capacitors in half-bridge must also be properly dimensioned, with a high-valued (20-100 k) resistor in parallel with each one to ensure proper balancing at V^ us /2. Half-bridge converters are commonly used for medium-pow- er (250 W-l KW) offline applications, the main one being PC PSUs. Another example of this kind of PSUs can be found in the SAPS-400 Audio SMPSU described else- where in this issue. This one has two symmetric outputs with coupled inductors for good cross-regulation, as well as a couple of auxiliary windings. Although full-bridges have four switches, the control circuit is the same as for half-bridge or push-pull, as the MOSFETs turn on in pairs so only two signals have to be provided. However, isolation is required for each gate-source voltage, as the sources of each MOSFET are not common. Full-bridges are more costly, so they are reserved for pow- ers above >1 KW. Losses in the converters Although the equations obtained above don't show this, there are of course some losses during the conversion in all this kind of converters, that have two main components: Conduction losses occur when the switch is ON, due to its ON resistance, R ds{on) in MOSFETs. In formula: p i 2 d n 'cond ' switchx' x ds(on)x L/ (the switch is only closed during a part of the cycle D) Switching losses: real switches don't change instanta- neously from ON to OFF, there are rise and fall times (f r and ff). During these times both current and voltage drop is developed at the switch simultaneously, producing power dissipation. These losses can be approximated by: P ^ switch I switch switching ( i r +t f )f There are other kinds of losses, such as the gate driver losses, the losses associated to the diodes "recovery time", losses in the wire and core of the magnetic components, etc., but they are usually smaller. A typical simple converter can quite easily reach efficiencies of around 90%. As a comparative example, if one needs 5 V from a 1 2 V input, with 2 A load current (P out =l 0 W), a linear regulator will dissipate (1 2-5)x2=l 4 W. A buck con- verter would do the job dissipating only around 1 .2 W. What topology to choose? On the Elektor website we present a table and a flowchart for free downloading. With it you can easily choose a to- pology that's best suited to the application. Topics as safety, input/output voltage, output power and costs will be cov- ered also. ( 080198 - 1 ) Web LlD (reference & tutorials) www.smps.com www.smps.us www.onsemi.com/pub_link/Collateral/SMPSRM-D.PDF http://sound.westhost.com/project89.htm http://schmidt-walter.eit.h-da.de/smps_e/smps_e.html http://members.tripod.com/valveaudio/Membuatsendiri.htm 46 elektor - 6/2008 Schaeffer Customized front panels can be designed effortlessly with the Front Panel Designer. The Front Panel Designer is available free on the Internet or on CD. automatic price calculation delivery in 5-8 days 24- Hour-Service if required FRONT PANELS & HOUSINGS Cost-effective single units and small production runs f rrrr r:z i Sample price: 32,50€ plus VAT/shipping Schaeffer AG • Nahmitzer Damm 32 • D-12277 Berlin • Tel +49 (0)30 8058695-0 Fax +49 (0)30 805 8695-33 • Web info@schaeffer-ag.de • www.schaeffer-ag.de We add value to PCBs when others just sel I it. - One Stop Manufacturing Service - Free Electronics Components - Free Prototyping Assembly - Professional Consultant High Qua III v Qoffipetiliire Price m mmCr *ati j* j- a IfLVPCB 8BL in / WWW. mm is IMP OS bluL iZ. elektor. PCB House^ # ^4 ^Start from £30 ■ ^Prototype & Production I 4 No Min Order ^Fast Delivery com »mt\SH0TV\\UOi sales@flVpcb.com * ^ All services National Electronics Week: Stand F79 On demand Email: euro@eurocircuits.com Call us: 020 8816 7005 www.eurocircuits.com Order pooling Prototype & small series PCB specialists Online price calculation Online ordering Online order tracking Online access 24/7 EURO CIRCUITS - widest pooling choices -1-8 layers - lowest pooling prices - no tooling charges - from 3 working days - 100% DRC verification - full options service -1-16 layers - custom builds - UL marking 6/2008 - elektor 47 INFO & MARKET USB-TTL CABLE Jan Buiting & Antoine Authier Many 'legacy' peripherals, microcontroller projects and older boards are left abandoned because they have no USB connectivity and therefore look terminally cut off from the modern PC (which, as many of you have painfully discovered) has no RS232 anymore. Customers today want plug & play behaviour from their electronic equipment and none of the old fumbling around with RS232 connectors and cables, let alone juggling with wires and sub-D connectors. No USB? Useless old grot. Elektor readers are different. To them, USB is just another step on in the evolution of connectivity in general. Also, they think it's a pity to waste all that fine I/O equipment and microcontroller stuff built over the past 10 years or so just The 5-V version of the USB-TTL cable is available from the Elektor Shop. because it doesn't have USB. Conversions and adaptations are in order and that's where electronics comes in. Mention 'USB to serial conversion' and you can't go round Future Technology Devices International (FTDI), a.k.a 'FT- Dlchip' headed by the amiable Fred Dart. At Embedded World 2008, Fred's assistant Daniel McCaf- frey gave us a handful of cables, boards and bits of heat- shrink sleeving. It was not after the show and with the help of some colleagues that we realized this stuff could be ex- tremely useful for Elektor readers. What's in the plug What looks like a 1 .8-m long cable with different connectors at either end, is actually an electronic circuit [1]. All parts except the 6-way receptacle are contained in the moulded USB-A plug. The circuit diagram is given in Figure 1 . No surprise an FT232RQ 1C is found. The circuit can be set for 3V3 or 5 V I/O voltage level using a wire link but that's not accessible to the user. Flence two versions of the cable ex- ist: 5.0 V and 3.3 V. Elektor only supplies the 5 V version. The TTL level signals CTS\, TXD, RXD and RTS\ are carried on the cable together with GND and VCC. At the other end of the cable is a 6-pin SIL receptacle you can plug onto a mating pinheader. The conversion circuit is powered by the USB host. Software All drivers for the cable are available from the FTDI website www.ftdichip.com. They come in two two classes: • Royalty-free COM PORT (VCP); • Royalty-free D2XX Direct Drivers (USB drivers + DLL s/w interface). 48 elektor - 6/2008 Either class covers: • Windows 98, 98SE, ME, 2000, Server 2003, XP; • Windows Vista / Longhorn; • Windows XP 64-bit; • Windows XP Embedded; • Windows CE.NET 4.2 & 5.0; • MAC OS 8 / 9, OS-X; • Linux 2.4 and greater. Besides these, Third party' drivers also exist. Driver installation is simply a case of plugging the device in and following on-screen prompts. All instructions on FTDI driver installation are at [2]. A different use FTDI also supply the same USB-TTL con- verter hardware without the moulding around the board/USB plug, and the cable attached (Figure 2). The min- iature PCB comes with three pieces of heat-shrink sleeving you should apply yourself using a heatgun. The bare plug and board make a nice security dongle! All is revea led at FB USB -A ubus a d- o D+ O GND O The 5-V version of the USB-TTL cable is available from the Elektor Shop as item # 080213-71. 4ja7 lOOn 22 21 _ 10 11 _ 9_ 15 14 27_ 28 INTERNAL 10 VOLTAGE SELECTION VCC box? a 19 18 3V30UT CBUS0 CBUS1 CBUS2 CBUS3 CBUS4 vcc reset vccio 3V30UT DSR DCD RTS FT232RQ RXD USBDM TXD USBDP DTR OSCI OSCO CTS rI TEST GND GND GND AGND 3]. Use is made of the ChipID techno ogy of the FT232R in combination with the D2XX driver [4]. An ActiveX component called SafeGuard-IT is provided to help set this feature up [5]. It employs an Asymmetric public-private key encryption scheme'. 47p — • 47p 17 20 16 1 I- 6 7 32 - | IQOflh 30 _ 31 8 - \ 1 00 12 1 - Figure 1. Circuit diagram of the TTL-232R cable. VCCIO RTS RXD TXD VCC CTS 6 pin Header green 6 Cable 1.8 m XT / yellow 5 // orange 4 7 / red brown 2 3 26 GND black 24 O 080213 - 11 ( 080213 - 1 ) Web Links [1] TTL-232R cable datasheet: www.ftdichip.com/Documents/DataSheets/Modules/DS TTL232R.pdf [2] www.ftdichip.com/Documents/lnstallGuides/ Windows_XP_lnstallation_Guide.pdf [3] www.ftdichip.com/ttl232r-pcbex.htm [4] D2XX driver page: www.ftdichip.com/Drivers/D2XX.htm [5] www.ftdichip.com/Projects/SafeGuard-IT.htm Figure 2. The USB converter without the cable makes a very low cost security dongle for a PC. 6/2008 - elektor 49 TECHNOLOGY ELEKTOR INTERNET RADIO Other uses for EIR Much more than just a radio: a powerful development card for ARM 7 Antoine Authier & Harold Kipp This article explains how to use the Elektor Internet Radio board for developing your own extensions and realizing your own projects around this amazing piece of condensed technology. Figure 1. Connect the LED cathode to pin 2 (PA1) and the resistor to pin 34 of connector Kl. In the first part, we're going to describe the tools needed and how to use them; in the second, well be developing a concrete example around an LED. Development environment Let's start by installing the working environment. In this ar- ticle, we've chosen to present the development tools avail- able for Microsoft's Windows operating system. Installation under Linux is possible (see the procedure de- scribed on the CD-ROM). We used Windows XP SP2 on a Pentium 4 and Windows 2000 on a Pentium 3. Let's start by recovering the files required from the CD-ROM supplied with your kit: they are available on the 'Tools' page. When you insert the CD-ROM into your computer, a menu is displayed in your browser; click on the link named: Tools required to develop for the EIR. (If this menu fails to display automatically, double click on the index.html file in the CD-ROM root directory) Then in the Windows section, copy the following programs: • install AT91-ISP vl.10.exe • yagarto-bu-2 . 18_gcc (...) .exe The others are not required for the purposes of this article. AVR91-ISP lets you program the microprocessor at the heart of the EIR's ARM7TDMI. Yagarto is a software suite that includes gcc, the C cross-compiler for ARM, and Eclipse, the programming environment. Now let's install these applications. We've chosen to install them in a special directory for this project d:\EIR\soft- ware in order to illustrate our example clearly. 50 elektor - 6/2008 Nut/O.S. firmware Now we're going to deploy the sources of the firmware. The files needed are also on the CD-ROM. Click on the firmware link, from the top left menu. Nut/O.S. has to be installed first. Copy the sources by clicking the link On your Windows PC in the devel- opment section; then ether nu\-4. 5 . 2.exe on the next page. Run this program. We've chosen to install it in d:\EIR\ethernut-4. 5.2. At the end of installation, check the option Start Nut/ OS Configurator — while we're about it, we'll set these parameters. The configurator asks us to choose a hardware descriptor file; select the one corresponding to the EIR, called eirlOb. conf . Then go into the Settings page from the Edit menu Edit>Settings or press [Ctrl+T]. Under the tab Build, enter the pathname for the Nut/O.S. sources (Source Directory) — d:\EIR\ethernut-4. 5 . 2\nut in our example. Select the orm-gcc platform then configure the paths for the compilation and library installation directories, Build directory and Install directory. The install directory must be called lib and must be within the compilation directory, which itself must be a sub-directory of Nut/O.S. So we've chosen d: \EIR\ethernut-4 . 5 . 2\nut\build and d:\ EIR\ethernut-4 . 5 . 2\nut\build\lib (see screenshot in Figure 4). Under the third Tools tab you'll need to enter two paths separated by a colon. The first points to the Nut/O.S. tools d: \EIR\ethernut-4 . 5 . 2\nut\tools\win32 and the sec- ond to those of the compilation chain installed with Yagarto, i.e. in our case d:\EIR\software\yagarto\bin. Under the fourth and last tab, enter the root path for the directory that is going to contain your applications; here we've chosen d: \EIR\ethernut-4 . 5 . 2\application (attention: whatever you do, don't choose the Nut/O.S. sources' sub-directory app). Lastly, choose the orm-jom pro- grammer, and then click OK. Once the configuration is finished, you need to compile the Nut/O.S. libraries. This step may take a few minutes; click on Build Nut/OS from the Build menu. In the event of an error, re-check your configuration. If everything has worked properly, you can now close this program. Our first application Now create a sub-directory in application to develop our example — let's call this blink. Download the 080199 - 1 1 .zip archive from the article page, and unzip it to this location. You'll note that the source code is simple (almost self-ex- planatory, if you've read Chapter 34, PIO: Parallel Input Output Controller, of the AT91 SAM7SE5 1 2 documentation, downloadable from the ATMEL website [2]). The PlOx_PER register allows us to enable each pin of port x of a PIO controller and disables the function of any internal peripheral that might be associated with it. As you can see here, we are configuring pin PA1 as a generic input/output. The Pl0x_0ER register allows us to configure each pin of port x as an output. Here we're configuring pin PA1 as an output. Then comes the infinite loop where the LED is alternately lit and extinguished. This action is provided by two further registers. First off, Pl0x_C0DR which allows us to force each pin of port x to logic 0. In this situation, there is a potential drop across the LED terminals, and it lights up. And then Pl0x_S0DR which allows us to force each pin of port x to logic 1 ; in this situation there is no longer any po- tential drop across the LED terminals, so it goes out. NutSleep is a timer provided by the Nut/O.S. libraries, which needs to be provided with a duration in milliseconds, defined in the file sys/timer.h. Now we're going to work with the Windows command in- terpreter in order to compile this source code. Before start- ing, read the box about PATH configuration. So open a command interpreter cmd.exe and go to your application directory — cd d:\EIR\ethernut-4 . 5 . 2\ap- |^Wut.'OSCo»lmurjta> He CJt Vtert tkJd Hafe -IQlxl Figure 2. The jumper for erasing the microprocessor's internal memory is fitted between pins 34 and 36 of connector K3. Figure 3. Have fun with navigating the EIR hardware parameters. Do not change anything! Figure 4. For all configuration operations it is esential to fetch the absolute paths of the subdirectories. 6/2008 - elektor 51 TECHNOLOGY ELEKTOR INTERNET RADIO plication\blink here. Then all you have to do is type make clean to purge previ- ous compilations, then make to build the binary file. If every- thing has gone OK, you'll see the file blink.bin appear. A bit of hardware With the aid of a female connector, connect the resistor and LED to Port A as per the circuit in Figure 1 . Binary programming on the microprocessor Now we're going to use the SAM-BA tool to program the microprocessor. Connect the USB cable between the EIR and your com- puter. First of all, you need to erase the microprocessor's Flash memory and restart it so it will go into USB program- ming mode by loading the appropriate program from its ROM. To do this, connect the jumper provided between pins 34 and 36 of connector K3 (alongside the legend Era, see Figure 2); then press the reset button. Remove the jumper. Windows ought then to find and install a new hardware peripheral. Installation ought to be automatic, if AVR91-ISP : Source code and applications : The information published here is based on the use of the source files and applications contained on the kit CD-ROM. Under Windows, take care that the compiler and tools exe- cuted by the command interpreter are indeed the Yagarto ones. To reduce the risk of confusion following the installa- tion of multiple compilation chains, always make sure you specify absolute access paths for the tool executables, and 1 during the configuration stages, enclose them in quotes — e.g., "c:\program files\yagarto\bin". has been installed correctly. Run the application SAM-BA and select \usb\ARM0 as the means of connection and AT91 SAM7SE5 1 2-EK as target, then click on Connect. Check that the tab Flash is displayed and select the file for programming by clicking on the Open icon on the Send File Name line. Find and select your blink.bin binary. Click on Send File. Once this operation is over, the software asks you if you want to block some regions of memory; answer No. You can also re-check that everything has gone OK by clicking on Compare send file with memory. Important: Now run the script Boot from Flash (GPNVM2) by selecting it from the list and clicking Execute. You can close the application. Then press the reset button on the EIR: the LED should flash. A second example We also provide you with the archive 080199-12.zip (downloadable free from www.elektor.com/EIR) with an- other example that let's us make the LED pulse, thanks to the microprocessor's PWM peripheral. You'll note that the archive contains two directories in its root. The version of Nut/O.S. supplied on the CD-ROM does not contain the description of the PWM peripheral for the AT91 SAM7SE. So you need to update your source tree and extract the files at91_pwmc.h and at91sam7se.h to d:\EIR\ethernut-4 . 5 . 2\nut\include\arch\arm (the second file already exists, you'll need to overwrite it). Then create a sub-directory pulse in your application subdirectrory and unzip the corresponding source code. The procedure for compiling and programming remains the same, see above. The source code describes a simple application for the mi- croprocessor's PWM module; refer to Chapters 34 & 37 ( Pulse Width Modulation Controller) of the microprocessor documentation. Getting back to the basic firmware: the radio In the directory firmware of the CD-ROM you'll find the archive webradio-1.2 .l.zip. Then all you need do in or- der to listen to the radio is unzip this into your application folder, compile it, and program your EIR with the webra- dio.bin binary generated. Don't use version 1 .2.0, it doesn't compile. : Setting the PATH We recommend you create a batch file to contain the update command for your (environment variable) PATH so that Windows will go there to find the Nut/O.S. and Yagarto tools. You need to store this script in your PATH default paths list; call it for example seteirenv.bat. In our example, it will contain the line set PATH=d:\EIR\ e thermit -4 . 5 . 2\nut\tools\win32 ;d: \EIR\sof tware\ yagarto\bin;%PATH% . i Run this before invoking the Nut/O.S. or Yagarto tools. Enjoy your development. And if you have produced an in- teresting application, don't hesitate to tell us all about it! Equipment required - EIR kit - USB cable type A male - type B male - stabilized 1 2 V power supply - red LED - 1 80 Q resistor - 2x20 pin female socket strip for headers. ( 080199 - 1 ) Bibliography and web links [1 ] www.ethernut.de/en/hardware/eir [2] www.atmel.com/ 52 elektor - 6/2008 elektor/intel 'unplugged': results revealed Elektor readers rise to the Intel Challenge Wisse Hettinga In our November 2007 edition we posed you the question, how can one power a notebook computer for half an hour without batteries or a mains supply? Actually the original challenge came from Intel, when the firm first raised this is- sue with a number of European universities. This gave our international editorial board an idea: why not get our read- ers involved as well? Elektor is now read in ten languages by an army of electronics experts nearly a million strong. And if this contest didn't arouse some reaction, what on earth would? No worries — the reactions came in by the shed load, in- cluding some absolutely way-out ideas. What's more, this contest was a fantastic opportunity for researchers in 'blue skies' domains such as 'free energy' and other 'alternative' approaches. Here was their moment to demonstrate what their theories were truly worth. We might have expected, for instance, some means of exploiting 'earth currents' or perhaps finding a way to harvest RF energy from a 2 km long antenna, then transform this into something usable. But nothing of the sort! A fact even more remarkable was that readers also scorned the 'obvious' starting places such as solar or wind energy... It was apparent that the greatest appeal of mains and bat- tery-free power was to our German readers. By a significant factor this was the group that produced the greatest number of creative solutions. Take for instance the contribution from Lothar Miller. On a visit to a Christmas market he and a friend came up with the wild idea, why not simply recycle the awesome sound energy of pealing church bells? No waiting, job done. He constructed a kind of 'proof of con- cept' demonstration from two air-coupled loudspeakers and demonstrated clearly that the electrical output from a reverse- connected speaker was sufficient to illuminate a lamp bulb. Achieving the same result in the field, from actual church bell sound energy, was clearly going to need a little more devel- opment work. So for now his ingenious set-up remains unfor- tunately just the preliminary stage of a working prototype. Alexander Westhoff sought a simpler solution, based around existing technology. This Elektor reader opted for using the brand new HydroPak (a carry-pack housing a water-activat- ed fuel cell device). The underlying idea, albeit not entirely a new one, is to turn hydrogen into electricity, a process that will not be launched onto the commercial marketplace until later this year. So it's understandable that Mr Westhoff is not quite ready yet to grant us a demonstration... A somewhat greater amount of original engineering input went into the offering from Michael Rosseler and Matthias Mikysek — to produce electricity out of thin air! A motor driven by compressed air operates a dynamo, the output of which is groomed by a DC-DC converter to produce sufficient voltage for a notebook. Con- vincing evidence that this works in practice can be seen in a vid- eo that the pair have uploaded to YouTube (check out 'Elektor' and 'Perpetuum Calculum'). Zany indeed but probably the wackiest idea came from Jur- gen Depke — at least in terms of practicality. He rejected sim- ple solutions like bicycle dy- namos and instead clicked on eBay to order some Peltier ele- ments from far-off China. Then he set them up in reverse, as a current generator in fact, and it all worked! This has got to be pure genius... Now comes the agonising part, to choose the absolute winner out of so much creativity. Even getting the jury to agree on the top-ranking solutions was not easy, as all of the contribu- tions had their own particular strong points. Nevertheless the unconventional process chosen by Jurgen Depke for producing electrical energy immediate- ly earned him the reward of a brand new laptop. You've prob- ably guessed which idea came second — yes, the compressed air gizmo. Michael Rosseler and Matthias Mikysek will be getting a visit from the postman — to de- liver a Rangeman Next wireless router by Netgear. Lothar Miller earns a special prize for original- ity and wins a router too. And if Alexander Westhoff can dem- onstrate even just a single proto- type of a fuel cell-driven laptop, industry will be beating a path to his door. ( 080067 ) 6/2008 - elektor 53 TECHNOLOGY ENERGY Dr. Thomas Scherer In November 2007 this magazine launched a competition under the title 'The Challenge'. The task was to power a laptop in an unconventional way. The cream of the contributions proves there is almost no limit to our readers' creativity. Figure 1. Internal and external views of the type of Peltier element used by Jurgen Depke. Note the multiple sub-elements connected electrically in series and thermally in parallel. Figure 2. The Peltier elements are fixed between two water- filled square channels (above) and a substantial aluminium heatsink (below). As mentioned earlier, our contestants disregarded conventi- onal low-hanging fruit (such as solar, wind and water pow- er) in favour of exploring genuinely new territory. It's time now to go over to the winners' podium and pay tribute to the top three contributions. First Prize: Heat Jurgen Depke astonished us in the stylish yet practical way he deployed a physical principle [1] little exploited outside the field of space flight. As is generally known, with Peltier elements [2] an electrical current flow leads to heat transfer. It also works in reverse, so that a temperature difference will cause electric current to flow. Before we all get too excited it must be said that the efficiency of a Peltier element is not very high and prize winners should be aiming not at a few milliwatts but something around 30 W! Assignments like this call for some serious head scratching — or else the sing- leness of purpose that Jurgen Depke has. Observing the ma- xim 'biggest is best' and blessed with plenty of confidence he ordered from a Chinese supplier ten of the largest Peltier elements that he could find (see Figure 1). Each of these elements was supposed to be rated at 1 36 W of electrical energy. The burning question was whether they would work in reverse mode. Figure 3. Depke's power generator under test: a gas burner heats from below while cold mineral water flows through the pipe system above. Water condensation results from the coldness and burnt gas. Eventually the eagerly awaited consignment arrived, along with a major disappointment: one of the ten elements was defective. Anxiously Jurgen worried whether the remaining nine elements would deliver enough power... One thing was clear — to produce maximum electrical output the temperature difference had to be as large as possible. Our champion reckoned cold water would be just the job for the cool pole of the element, whilst a gas burner would make an ideal energy source for the hot side. The water issue seemed straightforward enough but was heating components as delicate as Peltier elements with a gas burner such a good idea? Fortunately Depke is accomplished not only in physics and electronics; his competence extends to metal-bashing as well, as Figure 2 proves. The construction is a kind of 54 elektor - 6/2008 Heat competition sandwich composition — the lower component is a large, thick aluminium heatsink with ribs or fins, which subsequently will be heated with a gas fire panel. Above this lie two well-sealed pipes or channels of square cross section. Fitted at either end of the upper sides of these pipes are the input and output water connections. Moun- ted between them are the cherished Peltier elements, all smeared with plenty of heat transfer compound (heat con- ductive paste). Note the loving attention to detail: the wa- ter flow in the two pipes doubles back on itself so there is not the minutest chance that the aluminium heatsink might heat up unevenly! though the minds of Michael Ros- seler and Matthias Mikysek last year when they decided to devote the winter to meeting the Elektor challenge. Their goal was to convert (compressed) air into (electrical) ener- gy. What's more, they succeeded! After they had fiddled about, tested and finalised a functio- ning prototype, they sent us a PDF file of documentation. From this we extracted Figure 4, which is a kind of block diagram of their 'energy transposer'. A compressed air re- servoir provides air, via a pressure reducer, to a drive a pneumatic motor. The pressure reducer provides a regula- Figure 3 indicates at last how the set-up operates in practi- ce. Depke arranges for bottled mineral water with a tempe- rature of 6 °C to flow through the pipes. It works out that the burning gas raises the temperature of the heatsink such that 1 1 0 °C is measured on the upper side. The temperatures observed are within supportable limits for Peltier elements and the temperature difference was entirely acceptable at more than 100 °C. Using a load of two 12 V halogen lamps each rated 20 W, Depke was able to measure a constant nominal voltage of 20.12 V at a nominal current of 1 .53 A. In simple arithmetic his unconventional power source thus manages to deliver just over 30 W. As far as voltage is concerned, we are sure that a brand new gas canister would run a laptop for well over half an hour. You can admire his handiwork in all its glory in the photos on his website at [3]. In our opinion Jurgen Depke has won his new laptop most deservedly — and in an extremely interesting way. Our warmest congratulations! Second Prize: Air power There's nothing airy-fairy about this contribution. Right now serious consideration is being given to harnessing renewable energy on a large scale and storing it in un- derground caverns (for instance as compressed air pum- ped into disused salt mines). Afterwards suitable motors and generators can turn energy of this kind into electricity as and when required. A similar notion must have gone Figure 4. 'Schematic' of an air- to-electricity converter by Michael Rosseler and Matthias Mikysek. Figure 5. Construction of an air- to-electricity converter: pressure reducer (upper left), compressed air motor (upper centre), generator (upper right), DC-DC converter (centre right) and a smoothing buffer of electrolytic capacitors (below). 6/2008 - elektor 55 TECHNOLOGY ENERGY Figure 6. Air operation of a laptop in action: the photo shows an earlier prototype, which although equipped with only a single buffer capacitor still managed to deliver stable power to the laptop when not under heavy load. ted drive pressure to the motor (in this case 6 bar), regar- dless of variations in the input pressure delivered to the reservoir. The motor is naturally mechanical and coupled to a generator; with the electrical energy produced going to a DC-DC converter to produce the correct voltage for a laptop computer. So far, so theoretical. It's perfectly obvious that a propositi- on of this kind ought to work but the question is whether the theory would hold out in practice. But it certainly does and the pair turned the plan seen in Figure 4 into the practical set-up of Figure 5, which contains everything apart from the compressed air reservoir and the laptop. To assure the voltage required by the notebook, buffer electrolytics with a total capacity of a mighty 22.4 mF are fitted at the output of the DC-DC converter. According to Rosseler's und Mikysek's calculations on the basis of a generously rated 1 20 W motor an industry stan- Figure 7. Construction of a noise recycler: Noise generator (above) and directly connected (acoustically coupled) noise-to- electricity converter of the same kind (below). dard 50 litre compressed air canister and a filling pressu- re of 200 bar should provide 37 minutes of operation. If anyone is desperate to see the exact calculation, here it is. According to Boyle-Marriott [4] 50 litres at 200 bar cor- respond exactly to 10,000 litres of uncompressed air; the motor with a nominal power rating of 1 20 W requires no- minally 4.5 I/s (litres per second). That means the contest requirements were in fact exceeded by seven minutes! To make sure the impartial Elektor scrutineers could see that the set-up worked genuinely, honestly and actually, Michael Rosseler and Matthias Mikysek sent in not just a photo (Fi- gure 6) but also uploaded a video to YouTube [5]. We are totally convinced, finding their handiwork very attractive and fully deserving of the second place in our contest! Third Prize: Sound We also received some contributions that tended closer to theory than practice, making it rather difficult to demonstra- te how they would boot up a laptop, let alone power it for a whole thirty minutes. In some cases we had more than a little doubt. Now and again we were also obliged to raise an eyebrow at the unconventional techniques people were proposing. This was precisely the case with Lothar Miller's contribution, differentiated by its amazing 'noise recycling' strategy. Miller described his visit to a traditional market last Christ- mas, where he noticed how the booming reverberation of the church bells completely masked all conversation and reduce just about all other sounds to nothing. This set him wondering whether the energy in those deafening chimes could somehow be turned into enough electricity to power a laptop. Well, somebody had to think of this! No sooner thought than done. Lacking a peal of actual church bells in his workshop, Lothar made do with a 40-cm bass loudspeaker by the respected firm Visaton and (mis) used this as a church bell simulator. To produce a decent audio level the loudspeaker was fed with sinewave tones sourced from a function generator (a Voltcraft MXG-0802 from Conrad Electronics) and amplified substantially by a power mixer (MXH300 by Behringer). A second loudspea- ker of the identical type served as sou nd-to-cur rent conver- ter. Anyone interested in reproducing the set-up should take a look at the construction photo in Figure 7. Two bass loudspeakers screwed tightly against one ano- ther — is this going to work? Lothar Miller is not short of proof and has furnished a photo (Figure 8) of a 20 W halogen bulb driven by a sound wave converter producing just over 12 V. Which is plenty enough energy for surfing the Net with a notebook. Figure 8. Proof of concept: the sound wave generator drives a noise recycler. The 20-W halogen lamp bulb is burning too bright for comfort! Whilst this solution fails to demonstrate a practical means of coupling sound wave converters to church bells, we'll overlook that omission and concentrate on Lothar's wildly imaginative approach. On that basis his 'Proof of Concept' is certainly worthy of the Third Prize, don't you agree? ( 080200 - 1 ) Web Links [1 ] http://en.wikipedia.org/wiki/Thermocouple [2] http://en.wikipedia.org/wiki/Thermoelectric_cooling [3] www.depke.info/html/elektor_.html (in German) [4] http://en.wikipedia.org/wiki/ldeal_gas_law and http:// en.wikipedia.org/wiki/Boyle%27s_law [5] www.youtube. com/watch ?v=tJbHUccJBYc 56 elektor - 6/2008 QUASAR electronics Quasar Electronics Limit PO Box 6935, Bishops Stc CM23 4WP, Tel: 0870 241 United Kingdp 6 1826 ed rtford m Fax: 0870 460 1045 E-mail: sales@quasarele Web: www.QuasarElectro ctronics.com nics.com 08717 Postage 3-7 Day Europe SOrder We acc to Quas Call no project4 95 & Packing Op Delivery - £3. (EU) -£6.95; R4 online for reduc opt all major cr ar Electronics, for our FREE modules and w ions (Up to 0.5 UK Mainland st of World - £! ed price UK P4 edit/debit cards Prices include CATALOGUE publications. : UK Standard jery - £8.95; I) (r assembled ^nd ready for use (AS prefix). 8-Ch Serial Isolated I/O Relay Module Computer controlled 8- channel relay board. 5A mains rated relay out- puts. 4 isolated digital inputs. Useful in a vari- ety of control and sens- ing applications. Controlled via serial port for programming (using our new Windows inter- face, terminal emulator or batch files). In- cludes plastic case 130x100x30mm. Power Supply: 12Vdc/500mA. Kit Order Code: 3108KT - £54.95 Assembled Order Code: AS3108 - £64.95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port. °C or °F. Continuously logs up to 4 separate sensors located ^ 200m+ from board. Wide range ot tree software applications for stor- ing/using data. PCB just 45x45mm. Powered by PC. Includes one DS1820 sensor. Kit Order Code: 3145KT - £17.95 Assembled Order Code: AS3145 - £24.95 Additional DS1820 Sensors - £3.95 each Rolling Code 4-Channel UHF Remote State-of-the-Art. High security. 4 channels. Momentary or latching relay output. Range up to 40m. Up to 15 Tx’s can be learnt by one Rx (kit in- cludes one Tx but more avail- able separately). 4 indicator LED ’s. Rx: PCB 77x85mm, 12Vdc/6mA (standby). Two and Ten channel versions also available. Kit Order Code: 3180KT - £44.95 Assembled Order Code: AS3180 - £54.95 DTMF Telephone Relay Switcher Call your phone num- ber using a DTMF phone from anywhere in the world and re- motely turn on/off any of the 4 relays as de- sired. User settable Security Password, Anti- Tamper, Rings to Answer, Auto Hang-up and Lockout. Includes plastic case. Not BT ap- proved. 130x110x30mm. Power: 12Vdc. Kit Order Code: 3140KT - £54.95 Assembled Order Code: AS3140 - £69.95 Infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control unit. Toggle or momentary. 15m+ range. 112x122mm. Supply: 12Vdc/0.5A Kit Order Code: 3142KT - £47.95 Assembled Order Code: AS3142 - £59.95 PIC & ATM EL Programmers We have a wide flange of low ATMEL Programmers. Comply documentation available from Programmer Ac 40-pin Wide ZIF 18Vac Power su Leads: Parallel (LDC441)£3.95 cessortes: socket (ZIF40W) £14.95 pply (PSU010) £18.95 (ILDC136) £395 /Serial / USB (LDC644) £2.95 (tost PIC and te range anc| bur web site. NEW! USB & Serial Port PIC Programmer USB/Serial connection. Header cable for ICSP. Free Windows XP software. Wide range of ;upported PICs - see website for complete listing. ZIF Socket/USB lead not included. Supply: 16-18Vdc. Kit Order Code: 3149EKT - £39.95 Assembled Order Code: AS3149E - £49.95 NEW! USB 'All-Flash' PIC Programmer USB PIC programmer for all ‘Flash’ devices. No external power supply making it truly portable. Supplied with box and Windows Software. ZIF Socket and USB lead not included. Assembled Order Code: AS3128 - £44.95 “PICALL” PIC Programmer “PICALL” will program virtu- ally all 8 to 40 pin serial- mode AND parallel-mode (PIC16C5x family) pro- grammed PIC micro control- lers. Free fully functional software. Blank chip auto detect for super fast bulk programming. Parallel port connection. Supply: 16-18Vdc. Assembled Order Code: AS31 17 - £24.95 ATMEL 89xxxx Programmer Uses serial port and any standard terminal comms program. Program/ Read/ Verify Code Data, Write Fuse/Lock Bits, Erase and Blank Check. 4 LED’s display the status. ZIF sockets not included. Supply: 16-18Vdc. Kit Order Code: 3123KT - £24.95 Assembled Order Code: AS3123 - £34.95 www. QuasarElectronics. corn cure Online Ordering Facilities • Full Product Listing, Descriptions & Photos • Kit Documentation & Software Downloads 6/2008 - elektor 57 a 128-channel USB'ed datalogger for a 1-wire thermal monitoring network Carlo Tauraso It's often necessary to monitor the temperature of different rooms. For example in a green-house with various kinds of plant, in a wine cellar, on a motor surface or simply in your home. There are commercial dataloggers designed for this but they come at a price. Here's a DIY alternative with real-time monitoring and recording capabilities. Commercial temperature loggers typi- cally have a limited number of chan- nels. Normally, every channel is self- reliant so you have to install a com- munication line for each one. With Thermo-Snake you can connect from 1 up to 128 digital thermometers like the Dallas DS18B20 directly on a single two-wire cable. All temperature val- ues are recorded on your PC through a USB port without memory space limi- tation. Using the software manager de- veloped for the project you can mon- itor the temperature in real time and set an alarm threshold value for each individual thermometer. All tempera- ture values are recorded with date and time stamps in a text file that you can simply export to other applications for DALLAS DS18B20 Figure 1. DS18B20 appearance and pinout. graphic diagrams and statistical analy- sis. If a temperature exceeds the alarm threshold value the PC beeps and the relevant cell on the data grid becomes red. This project is inexpensive — we reckon it will set you back less than £15 for a minimal 4-channel datalog- ger configuration, and it is very simple to make. Thermo Network with the DS18B20 The DS18B20 Digital Thermometer from Maxim ICs (formerly Maxim/Dallas) provides 12-bit centigrade temperature measurements. The device, illustrated in Figure 1 , communicates over the ‘1- 58 elektor - 6/2008 Wire’ bus that by definition requires only one data line and GND (ground) for communication with a microproc- essor. It has an operating temperature range of -55 °C to + 125 °C and is accu- rate to ±0.5 °C over the range of -10 °C to +85 °C. A very interesting thing about the DS18B20 is its ability to take its supply power directly from the data line (‘parasite power’ Maxim calls it), eliminating the need for an external power supply. Also, each DS18B20 has a unique 64-bit serial code, which al- lows multiple DS18B20s to function on the same bus. So, it is simple to use one PIC18F2550 microcontroller to con- trol many DS18B20s distributed over a large area. With these features you are able to make a real thermometer network. The DS18B20 pinning goes like this: Pin Description 1 Ground DQ Data In/Out. Open-drain 1-Wire interface pin. It needs a pull-up resistor (4.7 l1113)123 (mm b Rodronm STOP l MTperatixe nor* omg Figure 8. Here, Thermo-Snake has three thermal sensing points installed in the home. Figure 9. Alarm! The temperature in the kitchen has exceeded the user-defined threshold. You can modify: position, description and alarm threshold directly by select- ing the relative cell and pushing the F2 button. Naturally, the 64-bit code is read only. When you have finished, to configure the network you can save it with a click on the Save Layout but- ton. This software saves all configura- tion information in an XML structure called rete.xml. You can delete a node simply by selecting the relative row and pushing the CANC button. If you make a mistake you can reload the con- figuration saved in the XML structure clicking on the Re- load button. You can sort all records by position, by de- scription, by 64-bit ID, push- ing on the relative column headers. When you are ready to start monitoring, click on the Start button (the button la- bel changes to ‘Stop’). During monitor- ing all controls are disabled, you can only stop the recording process by clicking on the Stop button again. The temperature values (‘Temp’ column) will be updated in real time. When a DS18B20 does not respond, the label ‘N.R.’ will appear. When a temperature value exceeds the Alarm threshold, the relative cell colour changes from green to red. Figure 9 shows a temperature alarm on the first node. Finally, click on the Stop button. Browse the program directory and you will see a text file. The file name for- mat is: T day-month-year-hhmmss It represents the date and time when software monitoring started, see Figure 10. The file format is very simple as shown in Table 1 and Figure 11. You can export data to different kinds of applications for drawing diagrams. The (long) cable When you build the Thermo -Snake you can use a simple two-wire cable, sol- dering each DS18B20 directly on to it and providing electrical isolation, of course. Alternatively, you can use com- mercial cables like the WRDOWY17 from Crystalfontz [1]. In private homes, distributed tempera- ture monitoring can help you discov- er ‘wasters’ and cut down on heat- ing costs. In the industry, it allows you to have a single over- view of what’s happening at many temperature meas- uring points along the pro- duction line. Have fun with Thermo-Snake. ( 070122 - 1 ) Web Link [1 ] www.crystalfontz.com/products/cables/ WRDOWY1 7_images.html Table 1. File format for time stamp Fieldl Field2 Field3 Field4 DATE TIME NODE ID TEMPERATURE * HET-IHERMD f__|(5)[x j B T21-2-20O7-154221.txt- Notepad File Edit Format View Help 23/02/2007 14. 02. 282, 280DE66E00000097, 25, 7 23/02/2007 14. 02. 293, 260DE66E0QQQQ097, 25,4 23/02/2007 14. 02. 301, 280DE66E00000Q97, 23,1 23/02/2007 14. 02. 323, 280DE66E00GGQG97, 25,4 23/02/2007 14. 02. 331, 280DE66E00000097, 23 23/02/2007 14. 02. 342, 280DE66E00000097, 25, 7 23/02/2007 14. 02. 353, 28QDE66EQQ0Q0097, 25,4 23/02/2007 14. 02. 361, 28QDE66E0000G097, 22, 9 23/02/2007 14. 02. 372, 280DE66E00QG0097, 25, 7 23/02/2007 14. 02. 383, 260DE66E0Q000097, 25,4 23/02/2007 14. 02. 391, 280DE66E00000097, 22, 8 Figure 10. Showing the location and format of the log file containing the measured temperatures. Figure 1 1. Temperature information measured and logged by Thermo-Snake is Time & Date stamped and can be exported to statistics programs or spreadsheets to make nice graphs. 62 elektor - 6/2008 LAB TALK TECHNOLOGY Mcains Adapters The case of the treacherous LED Dr. Thomas Scherer I notice on the cover of an old copy of Elektor in large print it states: 'Equipment is only as good as its power supply'. Even though that particular edi- tion is now more than thirty years old the statement is as true today as it was then. Relations Fourteen days ago I took a call from my wife's cous- in Tina; she was having trouble connecting to the internet. I pictured their network setup which I had installed a few years ago: an internet router with Ethernet connection to an access point providing WLAN coverage for all the family's laptops. It ap- peared that none of the lights were lit on the access point. The usual suspects had already been ruled out: the mains adapter had not been accidentally pulled out and power was definitely available at the wall socket. On the face of it this was almost cer- tainly a hardware failure, either a mains adapter or one of the pieces of equipment or maybe both; it was difficult to be more specific over the phone. The next time they visited they had the access point and mains adapt- er with them so I was able to run some tests. Firstly plug in the mains adapter, check the output voltage... nothing; this was going to be easier than I had thought. A rummage through my drawers did not produce a suitable replacement adapter capable of supplying 5 V at 2 A so for testing I rigged up a bench supply with the output set accordingly. The access point sprang into life and I could connect to it using my laptop. The diagnosis was clear; access point OK, mains adapter dead (makes a change, it's usually the expensive part that breaks first!). This adapter was totally encapsulated so it could not be fixed. I identified several suitable replacements advertised on the website of a local electronics store; this was the quickest and cheap- est solution to the problem. It was now only necessary to carry out an on-site reconnection of the equipment with the new adapter be- fore harmony (and internet access) could again be restored to the family. Two weeks later It's 1 0 pm on a Sunday evening and after a busy weekend it's usually a good time to sit down, check my inbox and look for any interesting new posts in the forum on the Elektor website. To the left of the screen next to the list of E-mail accounts I notice an unwelcome icon indicating that the last attempt to access the mail server was un- successful. A click on 'receive' does not clear the problem and while attempting to surf, the browser confirms that there is indeed no internet connection. Watson, Bring my spy glass What's going on? Maybe the router had somehow reset to its factory settings? Us- ing the browser to access the router's setup page indicates that the problem is more serious; it is not possible to view this page. I looked behind the monitor where my eight-way Gbit-hub is hidden and see that the power LED is lit but all of the other port LEDs are off. Perhaps the hub firmware has crashed? Disconnect the mains plug, wait a few minutes then plug in again... still only the power LED was lit. It was time to disconnect the equipment and take a closer look on the bench. It didn't look as if we had the same problem as Tina, the power LED indicated clearly that the adapter was supplying power. Just to be sure I measured the output voltage and although slightly low (7.39 instead of 7.5 V) it was certainly in the ball park and should not be the source of the problem. As a test I switched the adapter output to 9 V and tried again but still only the power LED lit up. It was fairly easy to identify two step-down regula- tors on the hub's circuit board, one of them was producing 3.32 V which is a fairly typical supply value for modern LSI devices while the other had an output of only 1.18 V. This value seemed way too low to power the chips on the PCB. With the finger of suspicion now pointing back at the mains adapter it was time to break out the bench supply again, this time set to 7.5 V with a 1 A current limit. Bingo, the hub booted up and all the LEDs lit up as if Christmas had come. It seems that the mains adapter had not been delivering the goods despite the power LED indicator. Mains adapter With the adapter safely disconnected from the mains and its cover off I had a closer look inside to see if anything was obviously amiss. This unit had performed flawlessly for the last three years and seemed in good condition but my eye was drawn to an electrolytic output capac- itor which had a 'lightly toasted' appearance. More disturbing were the bulges in its aluminium casing and swelling of the rubber gasket around the leads, this device had at some point obviously sustained a high internal pressure and over-temperature event. The picture shows the PCB with a new capacitor fitted; the red arrow points to the old one. It was a little curious, the power LED had in- dicated that the supply was OK and the no-load output voltage was almost correct but the hub did not function correctly. Markings printed on the case indicated that it was a 1 000 piF capacitor but measure- ment with a component tester yielded a value of just 65.4 jjF. A loss of 93.46 % of its capacitance would produce abysmal supply regulation es- pecially under load. The truth is an LED is not at all fussy about the quality of its dc supply but the same cannot be said for the high tech chips found in modern equipment. So the lesson here is don't be fooled by the reassuring glow of an LED and while it may be true that the equipment is only as good as its power supply, in this case the power supply is only as good as its capacitors... ( 080077 - 1 ) 6/2008 - elektor 63 ,?*' r Martin Klaper and Heinz Mathis Is it possible to make an RLC meter for less than two pounds? In this article the authors answer this question with a resounding 'yes' in the form of a simple and compact circuit that will enable you to make RLC measurements rapidly, accurately, and, above all, cheaply. For many years the two authors have used a Marconi RLC bridge. To use this device two controls are adjusted until a meter reads ‘null’, and then the value of the connected resistor, capacitor or inductor can be read from the settings of the controls. It is also possible to use the instrument to measure the loss fac- tor tan 5 and the Q (quality) factor. Not every household is lucky enough to own such an instrument or an expen- sive RLC meter; PCs and sound cards, however, are ubiquitous. And it turns out that these can be used to make ex- cellent measuring instruments, as one of the authors has already described in Elektor [1]. There we described how to make an ECG (electrocardiogram) re- corder using a sound card, and it is a relatively small step from that to the idea of measuring impedance using a sound card. In outline, this is how it works: us- ing the two input channels of a stereo sound card we can measure two volt- ages simultaneously. A resistor in se- ries with the device under test (R, L or C) is used to convert the current flow- ing through it into a voltage. If an al- ternating voltage is applied to the de- vice under test and the resulting cur- rent is measured, we can calculate its (complex) impedance. The alternating test voltage can be provided by an out- put of the sound card. Could we im- plement all of this on a PC? After a lit- tle contemplation, soldering and pro- gramming, the answer turned out to be yes. Almost any PC can be used for this project, even a dusty old 500 MHz ma- chine. There is even no need to open it up, as we only need access to the ex- ternal connections of the sound card. Of course, we cannot guarantee that every PC will work, but we have tried a range of machines, desktop and lap- top, running Windows XP and Vista, 64 elektor - 6/2008 and all have worked perfectly. Besides the PC very little is required: build the tiny circuit described below, connect it to the PC, and run the soft- ware provided. The hardware consists of just two re- sistors and a dual operational ampli- fier: total cost well under two pounds. The circuit can conveniently be built on perforated board or on a bread- board, and then, low-cost impedance meter in hand, you can test inductors, capacitors and resistors to your heart’s content. The circuit gives astonish- ingly good accuracy: its results have been checked against a much more expensive RLC meter on the authors’ bench. Impedance Impedance (from the Latin ‘impedire’, to hinder, hence ‘impediment’ etc.) is essentially the degree of opposition to current flow. It is a complex quantity, that is, it has real and imaginary parts. The impedance of a pure resistor has zero imaginary part, although the im- pedance of a practical resistor (and in particular a wirewound resistor) will have a small imaginary part. Ideal in- ductors and capacitors have a purely imaginary impedance, but again real inductors and capacitors have a small real part to their impedance along with a (hopefully dominant) imaginary part. This deviation from the ideal gives rise to power dissipation or losses in the component. For this project we imag- ine a real component to comprise an ideal component in series with a pure resistance, the latter representing the losses. At a specified frequency an im- pedance can be expressed in polar co- ordinates or in Cartesian coordinates: z = |z|ze = r + jx where |Z| = V(R 2 + X 2 ) and 0 = arctan (X/R) Here Z is the (complex) impedance, measured in ohms, | Z | is the magni- tude of Z, and 0 is the argument of Z. Z has real part R and imaginary part jX (see also the formulae in the accompa- nying box). Below we will describe two ways of measuring impedance, which (al- though both inspired by the previous article in Elektor mentioned above) have been developed independently of one another. Method A is an adaptive linear combiner using a least-squares method which makes a measure- ment at constant frequency, calculat- Figure 1. Block diagram for method A. ing phase lag and loss factor. Method B goes by the delightful name of ‘ap- proximation of the characteristic curve using a variable test frequency and the method of least squares’. And now to the gory details. Method A One of the two output channels of the sound card drives a voltage divider, consisting of a reference resistor R ref and the device under test Z x , with a sine wave (Figure 1). The second output of the sound card is unused. It could be used in an enhanced ver- sion of the meter to allow for switching ranges automatically (in the current version the range has to be changed manually). The two input channels measure the two voltages on the volt- age divider, which allows the ratio between these two quantities to be measured at any instant. In principle it Figure 2. The hardware for method A consists of just a dual opamp and two resistors. would be possible to assume that the voltage applied to R ref is simply propor- tional to the voltage that has been out- put by the program to the sound card. In practice, however, sound cards have a certain latency which means that there is a delay between the program sending a signal to the sound card out- put and its actually appearing there (see our test of sound cards elsewhere in this issue). Using two inputs on the sound card gets around this problem in an elegant way. R1 references the output of the sound card to ground. The two operational amplifiers, each with a gain of one, act as buffers with a high input imped- ance and a low output impedance. The sinusoidal voltage U r (from ‘line out’), which is applied to the test circuit, is measured on the right input channel. The voltage across the device under test, Z x , is measured using the left in- put channel. The operational amplifier used is a type LM358, although any similar device would do equally well. The supply voltage for the opamp is relatively low at ±3 V, in order to pro- tect the sound card input from dam- age in the event of something going wrong. The accuracy of the measurements made depends on the accuracy of ref- erence resistor R ref . It is therefore very important to know the value of this re- sistor as accurately as possible. R ref can be changed to change the meas- urement range: for best results the value of R ref should be comparable to the impedance of the device under test. For added convenience it would be possible to provide for automatic range switching using the spare out- put channel of the sound card. The concept The ratio between the amplitudes of the voltages dropped across the ref- erence resistor and the device under test, and the phase angle between these voltages, are the keys to comput- ing the impedance of the device. The series combination of the reference resistor and the device under test is driven by the signal U v which is one output of the sound card; a voltage is dropped across the device under test whose amplitude and voltage depend on its impedance. Our first approach works as follows: we measure using a constant-frequency stimulus volt- age (1250 Hz for example) and take the measured signal at U r into an adaptive linear combiner implemented in soft- ware. The combiner employs two vari- 6/2008 - elektor 65 INSTRUMENTATION Figure 3. Functional diagram for method A. able weights, w 0 and w 1( which can be thought of as equivalent to the poten- tiometers in an analogue RLC bridge. The program adjusts the weights until the voltage at the output of the com- biner matches that across the device under test as accurately as possible in amplitude and in phase. By ‘as accu- rately as possible’ we mean that we try to minimise the mean squared dif- ference between the two signals. The complex impedance of the device un- der test can then be determined from the weight values w 0 and w a . The system thus works in a very simi- lar fashion to the authors’ trusty Mar- coni bridge, with the adjustment of the (virtual) potentiometers under soft- ware control. The algorithm We use the so-called LMS (least mean squares) algorithm, which is an itera- tive approach to finding the optimal values of the weights w 0 and w a . At each time step it adjusts the weights and then recomputes the real and im- aginary parts of the resulting signal and thence the resulting error. The ad- justment is a small step in the direc- tion which reduces the error as quick- ly as possible (the ‘method of gradient descent’), seeking the minimum of the error function like a skier who always chooses the steepest downhill route with the aim of reaching the lowest point of a valley. When the error e(n) falls below a pre- set threshold the execution of the algo- rithm terminates, and the weight val- ues are taken as correct. Now we can use them to compute the impedance we are trying to measure. From the block diagram in Figure 1 we have: U x — ^Rref X = U im / R ref X Z x where U im = U T - U x . Now let U im = A x sin(ot) and U x = A x sin(ot + (p), and we can write U x = w qA x sin(cot) -l-w^ x cos(cot). Figure 3 shows the adaptive linear combiner. U x (from ‘line out’) is modi- fied using the weights w 0 and w 1 so that it is as close as possible to the de- sired signal U x ; e(n) is the computed error. The impedance of the device under test is then given by Z = -RrefWo + j R ref w l- Software The program that generates the sine- wave signals, reads back the signals on the line-in input, and calculates the impedance of the device under test is written in Java. The user interface shows the measured values as well as a display of the volt- ages across the reference resistor R ref and the device under test Z x . The LMS algorithm can be replaced by a differ- ent algorithm (see under the ‘Settings’ tab). The algorithm must be derived from the class Alg and implement the determine() method (see Figure 4). This allows a variety of different ap- proaches to be compared: for example, a second approach, which uses a vari- able frequency, is described below. It would also be possible to implement the classic three -voltmeter method. The software architecture is illustrated in Figure 5. The sound card The sound card samples the incoming signals 44100 times per second, and we allow a choice of test frequency from 1000 Hz, 1250 Hz and 2200 Hz. The sound card must have a stereo Alg {abstract} determ ine() zv NewAIg determineQ 080055 - 14 Line Output Sine wave generator Line Input Digital Signal Processing (DSP) User interface (GUI) Software System 080055 - 15 Figure 4. Deriving a new algorithm. Figure 5. Block diagram of the software. 66 elektor - 6/2008 r n About the authors Martin Klaper studied Electronic Engineering at the Swiss Federal Institute of Technology in Zurich, graduating in 1977. He then worked in devel- opment for 20 years at Crypto AG. From 2000 to 2005 he lectured in computing and telecommunications at the Solothurn University of Applied Sciences, and currently he lectures at the School of Engineering and Architecture in Horw, near Lucerne. He is also a keen radio amateur (call sign HB9ARK) and is particularly interested in the ideas behind software -defined radio. Heinz Mathis studied Electronic Engineering at the Swiss Federal Institute of Technology in Zurich, graduating in 1993. After several years working as a development engineer in industry at various companies in Switzer- land and in Britain, in 1997 he returned to the Swiss Federal Institute of Technology to become a research assistant. He received his doctorate in the field of signal process- ing in 2001 and went on to work for u-blox AG developing GPS receivers. Since 2002 he has lectured on mobile communications at Rapperswil University of Applied Sci- ences. His main interests are in the fields of high-frequency engineering and digital signal processing for mobile radio and GPS applications. input (watch out: some laptops only have a single input channel). There are two important points to note: if U x has a very high amplitude, it may distort. Although the actual am- plitude of U r does not enter into the final calculation, it must nevertheless be a pure sinewave. It is also possi- ble to overdrive the input amplifiers on the sound card, which will also lead to distortion. The program is able to display the in- put waveforms to allow the user to check for distortion. The relevant lev- els can be adjusted using the PC’s au- dio mixer settings. For a more precise measurement of the degree of distor- tion, connect an oscilloscope (or, even better, an audio spectrum analyser). It is also essential to ensure that the bal- ance between left and right channels is set exactly in the centre. The software oscilloscope display gives a good demonstration of the time relationship between the voltage across a capacitor or inductor and the current flowing through it. Installation and operation The RLC meter software can be down- loaded from the Elektor website [3]. It is also necessary to have the Java runtime environment [2] installed. Then it is a simple matter of unpack- ing the software and running it. The Java program consists of three parts, (rlc.jar, swt.jar and swt-win32-3236. dll) which must be kept in the same directory. The program is run by dou- ble-clicking on rlc.jar. Figure 6 shows the graphical user in- terface. Clicking on the relevant tabs switches between a simple meter mode and an expert mode. In simple mode the program just displays the measurement result in large charac- ters so that it can easily be read from Figure 6. How the software displays its results on the screen. 6/2008 - elektor 67 INSTRUMENTATION Figure 7. The hardware for method B consists of just four resistors. r n Phase shift cp: cp — arctan / \ a) x CO 0 Component characterisation: cp = 0: pure resistance cp < 0: capacitor cp > 0: inductor Impedance Z: z = R ef ) 2 +(a> l - R ef ) 2 Real (R) and imaginary (X L or X c ) parts: L Resistor: R = Z Inductor: 2 71 f a distance. The series equivalent cir- cuit is also shown graphically. In the case of a resistor the ohmic value is also displayed as the corresponding colour code. It is possible to make single measure- ments or continuous measurements: the latter is particularly useful when tuning components such as coils. In expert mode the display shows the input signals oscilloscope-fashion on the display, along with some inter- esting intermediate values computed by the LMS algorithm. Three different measurement frequencies are availa- ble. The ‘Settings’ menu allows the se- lection of a different sound card if more than one is present, and it is also pos- sible to switch to a different measure- ment algorithm (if one has been imple- mented) for comparison purposes. As mentioned above it is important to know the value of the reference resis- tor R ief accurately, as the accuracy of the whole measurement depends on it. Ideally we should aim for an accura- cy of 1 % or better, and if possible it is worth measuring the value of the resis- tor before use with a precision bridge. It is also important to use a film resis- tor for R ief rather than a wirewound type, as the latter will have significant inductance. Accurate measurements of reactance from 0.01 R ief to 100 R ief are possible. It is a good idea to arrange the circuit so that different resistors can easily be substituted for R ief to ex- tend the range of the instrument. Capacitor: 2jt f -Z Method B An even simpler approach, suitable for measuring an unknown impedance Z using a sound card, is to use only the voltage divider part from the above cir- cuit using a series resistor R. If we con- struct a symmetrical T-network it has the advantage that the circuit is sym- metric with respect to the inputs and outputs of the sound card. This method also has the advantage that it can be used with single-channel sound cards, although using two channels helps to reduce the noise in the measurement a little. We thus end up with the simple resistor network shown in Figure 7. R in is the input impedance of the sound card, which can be determined from the datasheets of the devices used. The details of the derivation of the for- mulae for calculating the unknown im- pedance are available in a supplemen- tary document that can be downloaded from the Elektor website. The task for the software in the me- ter is now to measure the amplitude of the signal levels at the inputs to the sound card. The measurement is car- ried out at a range of different audio frequencies. If the unknown imped- ance is purely resistive the amplitude will exhibit no frequency dependence, whereas for an inductive or capacitive load the amplitude will increase or de- crease (respectively) with increasing frequency. For each of the three quantities R, L and C the software calculates a nomi- nal value which minimises the squared error over the set of test frequencies used. The corresponding residuals (i.e., the normalised distances between the measured amplitudes and the theoreti- cal amplitudes for the calculated com- ponent value) are also computed. The value which leads to the smallest re- sidual is taken as the correct one and is displayed as the result, along with its corresponding unit. ( 080055 - 1 ) References and Internet links [1] Martin Klaper, 'ECG using a Sound Card', Elektor October 2006. http://www.elektor.com/magazines/2006/oc- tober/ecg-using-a-sound-card.58566.lynkx [2] Java compiler and development environ- ment (JRE and JDK): the Java Runtime Envi- ronment (J RE), version 5.0, is required to run the program, and the J2SE development kit (JDK), version 5.0, is required to modify and compile the program. http://java.sun.com/javase/downloads/in- dex.jsp [3] Software download: www.elektor.com; month of publication 68 elektor - 6/2008 INFO & MARKET ELECTRICAL SAFETY 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 sup- plied 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 con- sidered as a disconnect device. In an approved switch, the contact gap in the 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. 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 hazardous voltage level when the equip- ment is switched off. If the equipment uses an open- construction 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 protective 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 relevant British Standard fully meet all insulation 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 6/2008 - elektor 69 MICROCONTROLLERS Invisible Commands ATmega88 decodes infrared control commands Udo Jurss and Wolfgang Rudolph USB 1 6006 K5 USflRT R T „_ (M fit R8R10R11R12R13 K9 ii f i ® ™ & WadsanBEWaWsks* gno © ©©©CO©©© K12 o K + a K 10 © . ot ooooo O O O O © & 9 K7 & i SSSSSSS Cl C ll d. (9 Q Q. H d ATM18 Testboard (c)Elektor / Computerjcli d 2 R1 0803UJ 071035-2 ©OOk8 rst £ SL JS a H_£»S; &J3 S 3_!9 t _J| itvVv'i In the previous instalment in this series we connected an LCD panel to the ATM18 test board, allowing the microcontroller to speak to the outside world. Now we look at how to interface to an ordinary remote control using the RC-5 code, as found in any household. We display the received data on the LCD panel. We shall turn the ATM 18 board be- comes an analyser that can display the commands sent by an infrared remote control. The infrared signals are invis- ible to the naked eye, and in any case are too quick for a human to be able to read the code. Nevertheless, it is pos- sible to see the output of a remote con- trol indirectly, as many digital cameras have sensors that respond to infrared. Hold the remote control up to the cam- era and press a button on it, and the infrared LED should be visible in the camera’s electronic viewfinder. The actual pattern of pulses emitted 70 elektor - 6/2008 by the remote control can be inspect- ed using a photodiode and an oscillo- scope (Figure 1). In our circuit we use an integrated infrared receiver instead of a photodiode. Infrared receiver The device we have selected is the TSOP1736 made by Vishay (formerly Vishay Telefunken) (Figure 2). As can be seen from the block diagram (Fig- ure 3) the device includes a photodi- ode whose output signal is amplified, filtered and finally demodulated. At the output is a digital signal like that shown in Figure 1. The TSOP device is available in various versions which differ only in the centre frequency of the integrated band-pass filter. We use the 36 kHz version as this is compat- ible with most remote controls. Other versions cover frequencies between 30 kHz and 40 kHz. The exact frequen- cy is in any case not particularly criti- cal as the pass band of the internal fil- ter is relatively wide. The receiver will thus work at frequencies other than its nominal centre frequency, but its sen- sitivity will be somewhat reduced. The TSOP device is simply connect- ed to the power supply and to a suit- able port pin on the ATM 18 module: we chose port pin PBO. Power to the device (GND and V s ) is provided via a low-pass filter consisting of a 100 Q resistor and a 100 nF capacitor to en- sure that the supply voltage is clean. Figure 4 shows the connections. It is convenient to make up a flexible cable consisting of three wires, using red and blue or red and black for pow- er and a third colour for the signal wire (Figure 5). A two-way pin header can be soldered to the end, and this can be connected to connector K4 (external C I ■© * TB0-2»s Tri* Figure 1. Oscilloscope trace of an RC-5 signal. 5 V power supply) on the test board. Observe correct polarity: the ground pins of the connector are nearest to the edge of the printed circuit board. The output signal can also be termi- nated in a pin to fit the socket on the test board. On the TSOP 1736 infrared sensor the pin spaced apart from the others is the signal output (V 0 , pin 3). In the middle is the positive supply voltage (V s , pin 2), and at the other end from the signal output is the ground connection (GND, pin 1): see Figure 2. Signals Many infrared remote controls for tel- evisions, video recorders and other items of consumer electronics use the RC-5 standard originally defined by Philips. This modulates the infrared signal at a frequency between 30 kHz and around 50 kHz. The remote con- trol transmits bursts of this carrier, with each burst having a length of 0.888 ms or 1.776 ms. With a modula- tion frequency of 36 kHz this means that each short burst consists of 32 in- dividual pulses, and each long burst 64. The data packet lasts around 25 ms overall and is repeated every 100 ms for as long as the button on the remote control is held down. The protocol uses a bi-phase signal, with each bit having a duration of 1.776 ms. Half of this time is active, the other half inactive. When the 36 kHz signal is present in the first half of the bit time, a logic zero is being sent; when the signal is present in the sec- ond half of the bit time, a logic one is being sent. The signal always starts with the same fixed pattern, and then three data fields follow. Figure 6 shows the sig- Figure 2. Package and pinout of the TSOP1736. Figure 3. Block diagram of the infrared receiver. 6/2008 - elektor 71 MICROCONTROLLERS TSOP1736 ^ pci . ns • JPC0 " Da •jrefQ •JAD6Q 1 1 JP2 ^ C6 I'M 071149 - 12 Figure 4. Making the connections to the infrared receiver. Figure 5. TSOP with RC (resistor-capacitor) filter and connecting wires. nal received from a remote control as seen at the output of the TSOP 1736. • The control bit (Ctl) toggles between 0 and 1 each time a button is pressed. This allows the receiver to detect the difference between a button that is held down and a button that is pressed repeatedly. • The device address (Address) con- tains five bits, sent with the most sig- nificant bit first. Standard device ad- dresses include 0 for televisions and 5 for video recorders. This field allows several remote controls to be used in the same room. • The data field (Data) contains six bits, corresponding to one of up to 64 different buttons. Codes from 0 to 9 are assigned to buttons marked with those digits. Again, this field is sent with the most significant bit first. Other light sources can often interfere with infrared remote controls. Fluo- rescent tubes are a particular prob- lem, producing regular pulses of inter- ference. The RC-5 decoder software checks that the start sequence of the received signal is as expected: if not, it is likely that the signal arose from some kind of interference. Example application using CodeVisionAVR A ready-made application example using CodeVisionAVR is available for download from the Elektor website. A free version of this C compiler, special- ly produced to accompany this series of articles, is also available for down- load. This means that anyone is free to examine the code in detail and make their own modifications and exten- sions. C neophytes may prefer to work with the BASCOM example described in the next section. Trying out the program is a simple mat- ter of uploading the hex file provided. The following connections need to be made: • LED1 to LED6 should be connected to PCO to PC5; • connect the LCD expansion described in the previous article in the series (optional); • connect the serial interface (optional) using either an FTDI USB-to-serial con- verter cable or a level shifter. Reset the board and the program will greet you by flashing the LEDs three times. It then waits for a command from the RC-5 remote control. Buttons 1 to 6 are recognised and toggle the cor- responding LEDs on and off. Button 0 turns off all the LEDs. The output driv- ers on the test board can be used to switch external devices: the open col- lector outputs of the ULN2003 can sink a maximum current of 500 mA and can withstand voltages of up to 50 V. If an LCD or a serial interface is con- nected it is possible to see all the com- mands sent by the remote control. For example, a terminal program might show a received command as follows: Bits : 0,1111100000000001, Ctrl:l, Addr : 0, Cmd : 1, Err : 0 The device address was 0 (corre- sponding to a TV set) and button 1 was pressed. We now have a way of determining whether a given remote control does indeed use the RC-5 code and what device address it uses. This could form the basis of a very flexible RC-5 tester. How is it done? The source code re- veals all. Timer 1 on the ATmega88, which is 16 bits long, is used to de- code the signals from the infrared re- ceiver module. With each rising or fall- ing edge on PB0 triggers an Input Cap- ture Interrupt, and the value in Timer 1 at that moment is stored in Input Cap- ture Register ICR1. The pulse length is measured, and interference is reject- ed by comparing the length against Start Ctl Address Data ~ UlfU 1 c 1 ) 0 1 C \ / J 1 C rui ) 0 nrLn_n 0 111 Figure 6. Example RC-5 signal with address 5 and command 7. 72 elektor - 6/2008 preset minimum and maximum 1 values. The tolerance is defined in the include file 1 application. h\ Each Input Capture Interrupt ini- tiates a timeout (implemented us- ing an Output Compare Interrupt). When the timeout expires (after five times RC3_DOUBLE_TIME) the Output Compare Interrupt is triggered and the ‘rc5_ready’ flag is set. Then, in function ‘rc5_de- codeQ’ the number of received bits is determined and the signal timing is checked. If too many or too few bits have been received, or if the signal timing is in error, the ‘rc5_error’ flag is set. These two flags can be tested by the main control program. The re- ceived data, along with the error flag, are shown on the LCD panel: this should help give some idea as to how the program works and > make it easier to see how to mod- ify the program for a particular application. BASCOM-AVR example program Processing the RC-5 signals in BAS- COM is very straightforward be- cause the relevant commands are i already provided. Listing 1 shows a small example, where data are received on input PBO and trans- ferred to the outputs on port C. Using the same connections as for the C example above the bit pat- tern of the received command is displayed directly on the LEDs. Device address 0 is used, which is compatible with a remote con- trol for a television. This program allows three or four devices to be controlled very simply us- ing the number buttons: press- ing 0 switches all devices off, 1 switches just the first device on, 2 switches just the second device on, 3 switches on both of these de- Listing 1 RC-5 reception using BASCOM , RC5 receiver, input B.O , Outputs port C $regfile = "m88def.dat" $crystal = 16000000 Dim Address As Byte , Command As Byte Config Porte = Output Config Rc5 = Pinb.O Enable Interrupts Do Getrc5 (address , Command) If Address = 0 Then Command = Command And &B 01111111 Porte = Command End If Loop End vices, and so on. The main command in Listing 1 is Getrc5(address, command). This must be preceded by a CONFIG RC5 com- mand to specify the input pin that is The ATM18 Project on Computerrclub 2 aTMl 8 was developed jointly by Elektor and Com- puter:club2 (www.cczwei.de) with contributions from Udo Jurss, the main developer of www. microdrones, de. Each month, the latest developments and applica- tions of the ATMl 8 system are presented by Wolf- gang Rudolph of CC2-TV in a TV broadcast on the German NRW-TV network. The RC-5 decoding with the ATMl 8-AVR board can be seen in Broadcast # 1 1 of CC2-TV on 22 May 2008. CC2-TV is also broadcast as a Livestream on the In- ternet at www.nrw.tv/home/cc2. CC2-TV Podcasts are available from www.cczwei.de and — a few days later — from sevenload.de 1 being used (here PBO). Byte vari- ables ‘address’ and ‘command’ must be already declared, and the interrupt must be available. RC- 5 reception happens in the back- ground under interrupt control us- ing Timer 0. Each call to Getrc5() returns the most recently received data. If no signal has been re- ceived the returned values for ‘ad- dress’ and ‘command’ are both 255, and so whether a signal has been received can be tested by in- specting the value of ‘address’. If ‘address’ is 0 then a command has been received without error and the device address is 0 (a televi- sion). If the remote control belongs to a video recorder, ‘address’ must be compared against 5. When the correct address is seen, the con- tents of the variable ‘command’ ■ are valid. Bit 7 contains the tog- gle bit, which in this example we mask off. The other seven bits are output to port C. BASCOM uses a routine from Applica- tion Note AVR410, which can be down- loaded from the Atmel website. The RC-5 reception functions are imple- mented as an assembler subrou- ■ tine running in the background. It is possible to understand how Atmel’s code works by working through it in detail. Of course, you can perfectly happily use the code in BASCOM without understand- ing its innermost secrets; Atmel have done the spadework, and you can concentrate on building your application. The functions provid- ed allow you to control relatively complex processes in a straight- forward way, as the RC-5 process- ing goes on transparently in the background. ( 071149 - 1 ) A minimal application It is possible to build a tiny stand-alone RC-5 receiver using the ATMl 8 microcontroller module. With just 3 components and weighing just 0.8 g this board can switch an LED on and off in re- sponse to the RC-5 commands it receives. A tiny type TSOP4436 infrared receiver made by Vishay is located in the middle of the board above the processor. It is connected to PBO, PB1 and ground at the lower edge of the board. To the right there is a 390 D resistor with one end soldered to ground. An LED goes from the other end of the resistor to PC1_ADC1 . The connections to the power supply are visible on the left. Microcontroller with infrared module and LED __ ___ ___ __ __ ___ ___ __ __ ___ ___j 6/2008 - elektor 73 MINI PROJECT Ton Giesberts LEDs are used everywhere these days, not just as on/off indicators any more but now also as a source of light. Before you mount an LED in your circuit it would be nice if you could first check whether you have the right type and how much current it needs to have for it to be bright enough. The simple circuit described here al- lows you to test LEDs quickly and make a distinction between low-cur- rent and high-efficiency types. Low- current LEDs give quite a bit of light with a current of only 1 to 2 mA, while high-efficiency LEDs produce a lot of light at a current of 10 mA or more (re- fer to the characteristics in Figure 1). Moreover, when you design a circuit in which multiple LEDs are going to be on at the same time, it is important that all these LEDs are equally bright at a particular current. This can also be verified with this test circuit: two (or more) LEDs can be con- nected in series so that you can select them for equal brightness. In this circuit we start with an ad- justable current source. The current through the LED (or two in series con- nected LEDs) is adjustable from 0 up to 20 mA. Based on the brightness of the LED(s) while turning the potentiome- ter from 0 to maximum, you can deter- mine which type of LED (s) you have. A low-current LED will quickly be quite bright at a small current and will not get much brighter when the potenti- ometer is turned further. On the other hand, a high-efficiency LED will slowly continue to increase in brightness. If you would like to select LEDs for equal brightness then you can connect two, or even more than two, in series. Using red LEDs and a power supply voltage of 9 V you can even connect 4 in series, which makes the selection process significantly easier. If you like, you may increase the power supply voltage up to a maximum of 15 V (but not two 9-V batteries in series!). The maximum allowed power supply volt- age for the opamp that is used here, a TLC271, is only 16 V. At this voltage you can compare 6 to 8 LEDs (red, yel- low or green). The actual maximum number depends on the forward volt- age drop of the LEDs under test. With Figure 1. Forward voltage and intensity of a low-current LED (a) and a high-efficiency LED (b). Source: Osram Opto Semiconductors. ^SHE 'S ve*V TICKLISH , AND SHE CAN J r $ ret ho &E/A/E connected the WKOHG- WAV KOUNO . SHE ^ Doesn't L//ce hi oh voltages, [V e/THCR . . , / LIKE RNY OTHER MODE) she LIKES one VA XT! CO- LOR VOLTAGE. t.&VjlH \ HER CASE, /H STEAD OF THE NOXNAi Vi 0.1 V. j 'SHALL „ teach LESSON?! Hood IDEA, TRAM si. 74 elektor - 6/2008 JtWte ♦ » • * white LEDs this voltage is about 3.6 V, so at a power supply voltage of 15 V you can only measure 3 at the same time. Schematic The circuit (Figure 2) consists of the classic current source made from a transistor and an opamp. The opamp compares the voltage drop across the emitter resistor R5 of T1 with the set- point voltage at the wiper of poten- tiometer PI. The base of T1 is driven via voltage divider R3/ R4 by the output of the opamp. The values of this voltage divid- er have been chosen such that in a potential fault situation (for example when the output of IC 1 is driven to the supply rail), the current through T1 can never become too high. This maxi- mum is a little more that 20 mA. (But take note! If you increase the power supply voltage to the entire circuit, the maximum cur- rent through T1 in a fault condi- tion will also increase!) A zener diode (Dl) is used to generate a reference voltage in a simple manner, which makes the voltage across PI independ- ent of the supply voltage. The current through Dl is set frugally at 1 mA and as a result the reference voltage is only 4.2 V, instead of the nominal 4.7 V. The value of R2 was selected so that the voltage across PI is about 1 V. Before you fit this resistor, note the actual value of the potentiometer you have. This type of potentiometer of- ten has a tolerance of ±20%. If your potentiometer deviates more than 5% from the nominal value then you can adjust the value of R2 by the same proportion. PI is drawn as a preset in the sche- matic, but if you have a frequent need to select LEDs you can also use a nor- mal potentiometer for PI and maybe add a graduated scale as well. A 4.7-V zener diode is connected in parallel with each LED (D2 and D3). The function of these zeners is twofold. On the one hand, when one LED is re- R1 & BT1 9V 5 Dl 4V7 0W5 R2 2 fir TlOOk R4 ‘ _P1 ml \ TLC271CP BC547B 070938- 11 Figure 2. The LED-tester consists of an adjustable current source which can supply up to 20 mA at a power supply voltage of 9 V. moved the current through the other LED continues to flow uninterrupted. On the other hand when an LED is con- nected the wrong way around the zen- er diode prevents the voltage across the LED from exceeding the maximum reverse blocking voltage. This is often 5 V, but is sometimes specified to be lower than that! Construction The best way to build the circuit is to use a small piece of prototyping circuit board. The few parts and the connec- tions between them are easily fitted. To facilitate the quick insertion and re- moval of the LEDs, it is best if you use 2 times 2 connectors from a turned-pin IC socket. The maximum current consumption of our prototype was just under 23 mA and the minimum current was 1 mA (the current through Rl). The opamp is set to low-power mode by connecting pin 8 to the positive supply voltage; it now consumes mere microamps. If you want to be able to safely test (many) more LEDs at the same time, you can use a sepa- rate, higher power supply volt- age for the string of LEDs (but note the maximum ratings of the transistor). If necessary, at very high voltages you can use a power transistor for T1 (and fit a heatsink, if required). How- ever, don’t forget to connect a zener diode across each LED, this is much safer. (070938-1) extrait de la bande dessinee "Resi&Transi - lilchec auxMysteres”, 1984 6/2008 - elektor 75 INFOTAINMENT PUZZLE H^YAn^KFl Puzzle with an f iV^A UvJUrVvl electronics touch Here's the June 2008 instalment of Hexadoku, Elektor's brain teaser that looks here to stay on page 76! We never thought Hexadoku would become such a success and we thank the thousands of readers from all over the world who have participated so far. All correct entries received enter a prize draw. The instructions for this puzzle are straightforward. In the diagram 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. SOLVE HEXADOKU AND WIN! Correct solutions received enter a prize draw for an E-blocks Starter Kit Professional worth £248.55 and three Elektor SHOP Vouchers worth £35.00 each. We believe these prizes should encourage all our readers to participate! The competition is not open to employees of Elektor International Media, its business partners and/or associated publishing houses. PARTICIPATE! Please send your solution (the numbers in the grey boxes) by email to: editor@elektor.com - Subject: hexadoku 6-2008 (please copy exactly). Include with your solution: full name and street address. Alternatively, by fax or post to: Elektor Hexadoku Regus Brentford - 1000 Great West Road - Brentford TW8 9HH United Kingdom - Fax (+44) 208 2614447 The closing date is 1 July 2008. PRIZE WINNERS The solution of the April 2008 puzzle is: FA63E. The E-blocks Starter Kit Professional goes to: Paul Martin (UK). An Elektor SHOP voucher worth £35.00 goes to: Amir Omahic (CR); Odd-Arne Olsen (N); Michael McGovern (IRL). Congratulations everybody! 1 0 5 4 A 8 6 D 9 E 2 8 9 1 E B 7 5 6 F 4 A 1 9 5 0 A 5 9 7 F 2 4 8 9 6 1 E F 8 5 2 7 B 9 D B 1 0 C 8 E 6 0 E 8 C D 9 B 5 8 C 3 D 7 0 7 D 1 2 C E 4 F 4 E 5 0 2 8 1 6 A 9 A 6 D 8 7 E 2 E A D 1 4 0 1 8 A 2 9 3 4 F 7 D 6 2 9 D 6 3 F D C (c) PZZL.com E 0 8 A 5 C 4 9 3 2 7 F D 6 1 B B 7 9 F A 6 3 E 1 D C 4 5 0 2 8 1 6 3 5 B 2 D 8 9 E A 0 7 4 C F D C 4 2 1 F 7 0 8 B 6 5 E 9 3 A 6 4 0 9 2 E F A C 3 5 8 1 7 B D 8 D 7 E 0 4 9 5 B F 1 2 A C 6 3 5 F C 1 6 D B 3 A 7 E 9 0 8 4 2 2 3 A B 8 1 C 7 4 0 D 6 F 5 9 E 0 A D 6 3 7 8 F 5 C 9 B 4 2 E 1 F 2 5 C 4 9 6 B E 1 8 D 3 A 7 0 4 9 1 3 E 5 0 2 7 6 F A 8 B D C 7 E B 8 D A 1 C 0 4 2 3 6 F 5 9 3 1 F 7 C B 2 4 6 A 0 E 9 D 8 5 A B 2 D 9 8 E 6 F 5 3 7 C 1 0 4 C 8 6 0 F 3 5 D 2 9 4 1 B E A 7 9 5 E 4 7 0 A 1 D 8 B C 2 3 F 6 76 elektor - 6/2008 INFOTAINMENT RETRONICS Neuwirth FUP1D PMR test unit (1973) Jan Buiting Until well into the 1990s, the repair and alignment of personal mobile radio (PMR) equipment was done not only by the offi- cial dealers or equipment retail- ers, but also by Fred of the local radio/TV shop. All you needed, it seemed, was the right crys- tals for the customer's allocated channel frequency, an alignment manual and a set of (coil) adjust- ment tools. However most PMR equipment works in frequency bands like 68-88 MHz or 146- 1 74 MHz for which no RF equip- ment is available in the average RTV repair shack. Dummy loads, deviation and symmetry meters, who's ever heard of that? In the early 1970s a company with this ego boosting name: Dipl.-lng. Heinz-Gunther Neu- wirth Messgerate der Hochfrequ- enztechnik Hannover-Westerfeld recognised the market situation and packed everything you could possibly need to get a PMR on the air (again) into a single equip- ment. They called it: Funkuber- prufungsplatz hence the type code 'FUP', or Funkprufgerot. Both terms mean PMR checking station but the product became legendary as 'the Neuwirth FUP'. Shoptalk would go like this: "So this Moto MC80 from the cab- bies is as deaf as doornail , Fred , what does the FUP have to say about it?" "Dunno, d'ye know what channel it's on?" The FUP1A had four frequency ranges: 68-88 MHz; 80-95 MHz; 95-110 MHz and 140- 1 75 MHz. The later FUP1 D came with the 420-475 MHz UHF PMR band added. Still later the top notch FUP1DZ had an internal counter. The FUP is truly a combined piece of test equipment. It contains: LF generator, LF voltmeter, RF signal generator with NBFM modulation, deviation meter, RF power meter, dummy load. The FUP can be mains powered or from its internal rechargeable battery pack. The clever RF technician can combine and set up some of these sub-functions to do things like antenna SWR checking, devia- tion symmetry checks, S/N measurements, image rejection and spurious checking, not forgetting listening to local VHF FM stations in his workshop (simple: jack antenna into dev meter input, set to max. sensitivity and tune to 90 MHz or so). The electronic design of these FUPs is extremely simple and conserva- tive, and successfully so. PLL technology? None, a single FET is used. Yet the frequency stability of the equip- ment after about 15 minutes of warming up is almost uncanny. The reason for not including a PLL of any sort must have been: we do not want the extra com- plexity and the loop noise it brings along onto its output signal. The secret to the stabil- ity and amazing spec- tral cleanness of the RF output signal supplied by the FUP is not the BF256 FET in its totally classic oscillator circuit, nor the solid mechani- cal design of the output attenuator, but the use of NP0 ceramic and sil- ver-mica capacitors in all the right places. The result: a +750 Hz drift from a target frequency of 145.000 MHz after 15 minutes of warm- ing up, and never more than 200 Hz off the mark when the equip- ment remains on. More than adequate for those countless Motorola, Storno, Philips, Pye, Telefunken, SEL and GEC taxi radios of the 1970/80s, which were mostly simple xtal driven NBFM boxes. No PLL lock-up problems or dig- ital whine and shot noise on the FM modulation. I've seen at least one FUP on sale at radio ral- lies in Germany, Belgium or Holland. They're sometimes seen on Ger- man Ebay too. Most are battered after a lifetime of being hauled all over the country in thumping RTV service vans. Most have replaced knobs with badly chosen col- ours. Original manu- als are rare; the copies — tatty. Neuwirth's FUPlAs and 1 Ds were exported and widely rebranded for resale in various coun- tries and regions. The one photographed here is Dutch labeled. The best looking FUPs are light blue and marked 'mi'. I suspect these are from Italy. If any reader is able to identify the company, please let me know. I still use my own FUP1 D for two pur- poses. One is aligning vintage 4 metre PMRs radios (68-88 MHz) and the other, to silence my neighbour's FM radio left playing at vol. 1 0 in the garden shed or in the teepee long after the kiddies lawnparty is over. I stick a telescopic rod antenna on the FUP's RF output, crank up the level to 1 0 mV (max.) and then tune the frequency dial from 88 to 1 05 MHz until the radio is silenced. Read- justment is never nec- essary, and I never feel tempted to switch on the 1 -kHz AF test tone at the full ±25 kHz FM devia- tion. I've cable radio myself. ( 080196 - 1 ) 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 6/2008 - elektor 77 ELEKTOR SHOWCASE To book your showcase space contact Huson International Media Tel. 0044 (0) 1 932 564999 ATC SEMITEC LTD www. atcse m itec . co . u k 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: 01 606 871 680 Fax: 01 606 872938 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. From £10.00. 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 manufacturer’s prices. B0W00D ELECTRONICS LTD www. bowood-electronics.co.uk Suppliers of Electronic Components • Semiconductors • Opto Electronics • Passives • Enclosures • Switches • Stripboard • PCB Materials • Popular Special Offer Packs Online Store, all major cards Same day despatch upto 3.00pm Personal Service sales@bowood-electronics.co.uk BYVAC ELECTRONICS www.byvac.co.uk 32Bit ARM Microcontroller, USB, built in RTC with itis own operating system, no complex tools, just a terminal emulator, start writing programs in 20 minutes. Complete with CD-ROM, Software and 100 Page Foundation book DECIBIT CO.LTD. www.decibit.com Smallest 2.4 GHz ISM band MCU embedded transceiver modules. Complete tiny solution, ready to transmit RF data by only attaching as example a CR2032 coin cell to it. COMPONENTBIN.COM www.componentbin.com Kickstart your development modules and parts from componentbin.com • ARM7 modules • Ethernet modules • Superb Graphic LCD displays (all with example software) and much much more... Online ordering and great prices! DESIGNER SYSTEMS http://www.designersystems.co.uk Professional product development services. • Marine (Security, Tracking, Monitoring & control) • Automotive (AV, Tracking, Gadget, Monitoring & control) • Industrial (Safety systems, Monitoring over Ethernet) • Telecoms (PSTN handsets, GSM/GPRS) • Audiovisual ((HD)DVD accessories & controllers) Tel: +44 (0)1872 223306 EasyDAQ www.easydaq.biz • USB powered, 4 relays + 4 DIO channels • Will switch 240VAC @ 10 amps • Screw terminal access • LabVIEW, VB, VC • Free shipping • From £38 Design & supply of USB, USB Wireless, Ethernet & Serial, DAQ, Relay & DIO card products. info@easydaq.biz 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 YOUR ELECTRONICS OPEN SOURCE http://dev.emcelettronica.com Website full of Projects and Resources for Electronics Engineers and DIY. • Tutorial • Hardware (Schematic & Gerber) • Firmware (Asm & C) • Reference Design Everyone can submit a story as a useful source! 'Share for life' S first TethnalGCfY Trantftr ltd. 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 FLEXIPANEL LTD www.flexipanel.com TEAclippers - the smallest PIC programmers in the world, from £20 each: • Per-copy firmware sales • Firmware programming & archiving • In-the-field firmware updates • Protection from design theft by subcontractors 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. ILP ELECTRONICS LTD www.ilpelectronics.com Tel +441233750481 Fax +441 233750578 ILP have been manufacturing audio modules since 1 971 and apart from our standard range we also offer a custom design service for the OEM market. LONDON ELECTRONICS COLLEGE 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 GCEs). Also Technical Management and Languages. HE 78 elektor - 6/2008 products and services directory MARCHAND ELECTRONICS INC. www.marchandelec.com • power amplifier modules electronic crossovers solid state / valve / passive valve amplifiers phono preamps handheld sinewave generator kits or assembled software electronic instruments custom design services MQP ELECTRONICS www.mqp.com • Low cost USB Bus Analysers • High, Full or Low speed captures • Graphical analysis and filtering • Automatic speed detection • Bus powered from high speed PC • Capture buttons and feature connector • Optional analysis classes NEW WAVE CONCEPTS 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 OBD2CABLES.COM http://www.obd2cables.com • Thousands of OBD cables and connectors in stock • Custom cable design and manufacturing • OBD breakout boxes and simulators • Guaranteed lowest prices • Single quantity orders OK • Convenient online ordering • Fast shipping Visit our website, or email us at: sales@obd2cables.com ROBOT ELECTRONICS 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 ROBOTIQ http://www.robotiq.co.uk Build your own Robot! Fun for the whole family! • MeccanoTM Compatible • Computer Control • Radio Control • Tank Treads • Hydraulics Internet Technical Bookshop, 1-3 Fairlands House, North Street, Carshalton, Surrey SM5 2HW email: sales@robotiq.co.uk Tel: 020 8669 0769 RADIOMETRIX www.radiometrix.com The leading global developer of ISM band, low power radio modules for wireless data transmission: • Transmitters • Receivers • Transceivers • RF modems • Evaluation Kits SCANTOOL.NET http://www.scantool.net ScanTool.net offers a complete line of PC-based scan tools for under £50. • 1 year unconditional warranty • 90 day money back guarantee • For use with EOBD compliant vehicles • Fast shipping • Compatible with a wide range of diagnostic software Visit out website, or email us at: sales@scantool.net 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 such as sound card real time oscilloscope, spectrum analyzer, signal generator, multimeter, sound meter, distortion analyzer, LCR meter. Free to download and try. 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 address 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! _ n 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 6/2008 - elektor 79 BOOKS, CD-ROMs, KITS & MODULES Elektor Internet Radio (April 2008) In the good old days, you had to modulate audio signals onto an RF carrier so they could be received and demodulated to produce something more or less audible. Nowadays things are different. Audio signals are compressed and put into IP packets that are 'streamed', and you can access every Internet radio programme in the world by receiving, buffering and decompressing these packages. This is all very easy with the Elektor Internet Radio: listening to radio programmes with the latest ICs. And all open-source! If you take a look on the Web, you'll be astounded to see that Google presently finds more than 2 1 million hits for 'Internet radio', so it's obviously a hot topic! PCB, SMD-populated Art.# 071081-71 • £115.00 • US$230.00 A low-cost home automation server based on a Freescale Coldfire 32-bit mi- crocontroller. The project has been de- signed with open source in mind and doubles as a powerful Coldfire develop- ment system using free CodeWarrior soft- ware from Freescale. DigiButler activates electrical appliances in and around the home, accepting on/off commands from a WAP phone, through an Ethernet net- work or via a webpage at an allocated IP address and with full access security. Kit of parts including SMD-stuffed PCB , programmed microcontroller , all leaded parts and CD-ROM containing both Elektor articles , TBLCF documentation , datasheets , application notes and source code files. Art.# 071102-71 • £29.00 • US$ 58.00 Display Computer (May 2008) Programming a graphic display is dis- tinctly more difficult than programming a text display. Our mini microcontroller board features a new display-on-glass module and a high-performance Renesas Ml 6C microcontroller. The board is avail- able fully assembled, and the microcon- troller is pre-loaded with a TinyBasic interpreter to simplify the development of graphics applications - even for novices. Populated PCB in enclosure Art.#070827-91 • £78.80 • US$ 157.60 DigiButler (May & April 2008) Going Stron A world of electronics V ' V ' Prices and item descriptions subject to change. E. & O.E 80 elektor - 06/2008 All articles published in 2007 Elektor 2007 This CD-ROM contains all articles pub- lished in Elektor Volume 2007. Using the supplied Adobe Reader program, articles are presented in the same layout as originally found in the magazine. An extensive search machine is available to locate keywords in any article. The instal- lation program now allows Elektor year volume CD-ROMs you have available to be copied to hard disk, so you do not have to eject and insert your CDs when searching in another year volume. With this CD-ROM you can produce hard copy of PCB layouts at printer resolution, adapt PCB layouts using your favourite graphics program, zoom in / out on selected PCB areas and export circuit diagrams and illustrations to other programs. ISBN 978-90-5381-218-1 • £16.90 • US$33.80 Modern technology for everyone FPGA Course FPGAs have established a firm position in the modern electronics designer's toolkit. Until recently, these 'super components' were practically reserved for specialists in high-tech companies. The nine lessons on this courseware CD-ROM are a step by step guide to the world of Field Pro- grammable Gate Array technology. Sub- jects covered include not just digital logic and bus systems but also building an FPGA Webserver, a 4-channel multimeter and a USB controller. The CD also con- tains PCB layout files in pdf format, a Quartus manual, project software and various supplementary instructions. ISBN 978-90-5381-225-9 • £14.50 • US$29.00 Cumput^r Vision ftrlndpkK arid fractigA ■\ PI C Mlcroconjnjlgra WjV&.f.rli ter Ur^jinm i-M £ r^'Pi Principles and Practice Computer Vision Computer vision is probably the most ex- citing branch of image processing, and the number of applications in robotics, automation technology and quality control is constantly increasing. Unfor- tunately entering this research area is, as yet, not simple. Those who are inter- ested must first go through a lot of books, publications and software libraries. With this book, however, the first step is easy. The theoretically founded content is understandable and is supplemented by many practical examples. Among other subjects, the following are dealt with in the fundamentals section of the book: Lighting, optics, camera technology, transfer standards and stereo vision. The practical section provides the efficient im- plementation of the algorithms, followed by many interesting applications. 320 pages* ISBN 978-0-905705-71-2 £32.00 • US$ 64.00 \ J More information on the Elektor Website: www.elektor.com Elektor Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 20 8261 4509 Fax: +44 20 8261 4447 Email: sales@elektor.com r^llektor LT3 shop Silent alarm, poetry box, night buzzer and more! PIC Microcontrollers This hands-on book covers a series of exciting and fun projects with PIC micro- controllers. You can built more than 50 projects for your own use. The clear ex- planations, schematics, and pictures of each project on a breadboard make this a fun activity. You can also use it as a study guide. The technical background infor- mation in each project explains why the project is set up the way it is, including the use of datasheets. Even after you've built all the projects it will still be a valuable reference guide to keep next to your PC. 446 pages • ISBN 978-0-905705-70-5 £27.00 • US$ 54.00 for Elccl routes Engl in ring anuiicalions 5.0, 6.0, VBA, .NET, 2005 Visual Basic for Electronics Engineering Applications This book is targeted towards those peo- ple that want to control existing or self- built hardware from their computer. After familiarizing yourself with Visual Basic, its development environment and the tool- set it offers are discussed in detail. Each topic is accompanied by clear, ready to run code, and where necessary, sche- matics are provided that will get your projects up to speed in no time. 476 pages • ISBN 978-0-905705-68-2 £29.00 • US$ 58.00 v y 06/2008 - elektor 81 PRODUCT SHORTLIST, BESTSELLERS £ US$ June 2008 (No. 378) Thermo-Snake 070122-41 .... PIC1 8F2550, ready-programmed 13.20... 26.40 SAPS-400 070688-91 ....PCB, populated and tested, ready-mounted in aluminium U profile 159.00... ...318.00 USB-to-TTL Serial Cable 08021 3-71 .... USB-to-TTL converter cable 15.90... 31.80 May 2008 (No. 377) Two-wire LCD 071035-93 ....SMD-populated board with all parts and pinheaders Display Computer ..22.40... 44.80 070827-91 ....Populated PCB in enclosure DigiButler (2) ..78.80... ...157.60 071 1 02-1 PCB with SMDs premounted; empty microcontroller 071 1 02-71 .... Kit of parts incl. CD-ROM, PCB with SMDs premounted; ..18.00... 36.00 programmed microcontroller ..29.00... 58.00 071 102-81 ....Software on CD-ROM Elektor AVRprog ....5.20..., 10.40 080083-71 ....SMD-populated board with all cables Tiny Counter ..23.50... 47.00 070954-1 PCB, bare ..11.50... 23.00 070954-41 ....Programmed controller ....7.50..., 15.00 April 2008 (No. 376) Elektor Internet Radio (EIR) 071 081-71 .... PCB, SMD-populated 1 1 5.00 230.00 CC2-AVR-Board 1 071 035-91 .... PCB, partly populated, ATM1 8 Controller module 7.30 1 4.60 071 035-92 .... PCB, partly populated ATM1 8-Testboard 27.00 54.00 Frequency Response Sweep Oscillator 070951-41 ....Programmed controller 5.40 10.80 March 2008 (No. 375) Data Logger "deLuxe" 070745-1 PCB, bare 16.30 070745-41 .... Programmed controller 1 9.90 070745-71 .... Kit of parts (PCB, programmed controller and display) ....71 .75 The Secrets of I2C 070600-1 PCB, bare 13.60 070600-41 .... Programmed controller 1 9.90 Cylon Voice 070859-41 ....Programmed controller 4.70 ECIO PLC 070786-1 PCB, bare 16.30 70786-71 Kit of parts (PCB, EClO-module, all other components)....76.00 ..32.60 ..39.80 143.50 ..32.60 ..39.80 ....9.40 ..32.60 152.00 February 2008 (No. 374) LEDBUS System 070459-1 PCB, power module 070459-2 PCB, central 070459-41 .... PIC1 2F638-I/SN, programmed (power module) 070459-42 .... ATmega32-l 6PC, programmed (central) RGB LED Mood Lighting 070892-1 PCB, bare 070892-2 PCB, bare 070892-3 PCB, bare Surround Light for PC Monitor 070491-1 PCB, bare 070491-2 PCB, bare LED Ringflash 070612-1 PCB, bare 070612-41 .... PIC1 6F628, programmed 070612-81 ....Software on CD-ROM www.thePCBshop.com www.thePCBshop.com 3.10 6.20 13.80 27.60 www.thePCBshop.com www.thePCBshop.com www.thePCBshop.com 21.50 43.00 5.00 10.00 www.thePCBshop.com 10.50 21.00 5.20 10.40 / Prices and item descriptions subject to change. E. & O.E Bestsellers m r mi* \ O od 2 3 4 5 PIC Microcontrollers ISBN 978-0-905705-70-5 £27.00. US$ 54.00 Computer Vision ISBN 978-0-905705-71 -2 £32.00.... .US$64.00 Visual Basic for Electronics Engineering Applications ISBN 978-0-905705-68-2 £29.00 .....US$ 58.00 309 Circuits ISBN 978-0-905705-69-9 £19.95. US$ 39.95 Microcontroller Basics ISBN 978-0-905705-67-5 £19.50. US$ 39.00 ISBN 9! GA Course ISBN 978-90-5381-225-9 £14.50. US$ 29.00 2 Elektor 2007 ISBN 978-90-5381-2 1 8-1 £1 6.90..... US$ 33.80 ECD 4 ISBN 978-90-5381-159-7. £15.90. US$31.80 4 E 1 2 3 4 5 Ethernet Toolbox ISBN 978-90-5381-2 1 4-3 £1 8.90 .....US$ 37.90 USB Toolbox ISBN 978-90-5381-2 1 2-9 £1 9.90 .....US$ 39.80 Elektor Internet Radio Art.# 071081-71 £1 15.00...USS 230.00 DigiButler Art. # 071102-71 £29.00 US$ 58.00 ECIO PLC Art. # 070786-71 £76.00...US$ 152.00 Datalogger "deLuxe" Art. # 070745-71 £71.75...US$ 143.50 Display Computer Art. # 070827-91 £78.80...US$ 157.60 Order quickly and safe through www.elektor.com/shop or use the Order Form near the end of the magazine! Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH * United Kingdom Tel. +44 20 8261 4509 Fax +44 20 8261 4447 Email: sales@elektor.com lektor SHOP 82 elektor - 06/2008 j^J •r * 4 -t* * i u m- 1 “Elektor? Fun in finding solutions for my electronics hobby. Never failed to impress my boss or my wife.” - Thomas Gosling, 38, electronics enthusiast - Electronics at all the right levels : ' ii - v Secure a head start in electronics with a subscription! Advantages to subscribers: iIsLkf f \ -» t - f P 5 il l 1-YHDiX '{-ZAJ rrubltaa Par t'tt W«-flTtt4illh'! CD CWM-t LMrA AT AHslC FiHfl 84 elektor - 6/2008 Description Price each Qty. Total Order Code Computer Vision £ 32 .oo CD-ROM FPGA Course £14.50 U 1 CD-ROM Elektor 2007 £ 16.90 PIC Microcontrollers £27.00 Elektor Internet Radio ( 071081 - 71 ) £115.00 Display Computer ( 070827 - 91 ) £ 78.80 DigiButler (071102-71) £29.00 Free Elektor Catalogue 2008 Sub-total Prinns; and item descriptions snhjent tn change The publishers reserve the right to change prices p&p without prior notification. Prices and item descriptions rocr shown here supersede those in previous issues. E. & O.E. Total paid Name Address + Post code METHOD OF PAYMENT (see reverse before ticking as appropriate) □ □ □ □ Bank transfer Cheque (UK-resident customers ONLY) Giro transfer VISA Expiry date: Verification code: Please send this order form to* (see reverse for conditions) Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 20 8261 4509 Fax: +44 20 8261 4447 www.elektor.com sales@elektor.com Email Date - - Signature EL06 Yes, I am taking out an annual subscription to Elektor and receive a free 2GB MP3 player*. I would like: I I Standard Subscription (11 issues) Subscription-Plus (11 issues plus the Elektor Volume 2008 CD-ROM) * Offer available to Subscribers who have not held a subscription to Elektor during the last 12 months. Offer subject to availability. See reverse for rates and conditions. Name Address + Post code Tel. Email Date - - Signature EL06 *USA and Canada residents may (but are not obliged to) use $ prices, and send the order form to: Old Colony Sound Lab P.0. Box 876, Peterborough NH 03458-0876. Tel. (603) 924-6371, 924-6526, Fax: (603) 924-9467 Email: custserv@audioXpress.com METHOD OF PAYMENT (see reverse before ticking as appropriate) □ □ □ □ Bank transfer Cheque (UK-resident customers ONLY) Giro transfer Taw Expiry date: Verification code: Please send this order form to Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 20 8261 4509 Fax: +44 20 8261 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. Online ordering: www.elektor.com/shop 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: Europe: £6.00 (Standard) or £7.00 (Priority) Outside Europe: £9.00 (Standard) or £11.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 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. 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. 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 and MasterCard 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 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 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 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 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 other than to supply goods as described or, at the option of Elektor, 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 shall be determined in all respects by the laws of England. September 2007 SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION Standard Plus United Kingdom £42.00 £49.00 Surface Mail Rest of the World £56.00 £63.00 Airmail Rest of the World £71 .00 £78.00 USA & Canada For US$-p rices please check www.elektor.com HOWTO PAY Bank transfer into account no. 40209520 held by Elektor Electronics, 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. 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 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 and MasterCard 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) reduction in current rates, must be supported by evidence of student- ship signed by the head of the college, school or university faculty. A standard Student Subscription costs £33.60, a Student Subscription- Plus costs £39.20 (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 2008 f Computer Vision d^> Principles and Practice Computer vision is probably the most exciting branch of image processing, and the number of applications in robotics, auto- mation technology and quality control is constantly increasing. Unfortunately entering this research area is, as yet, not simple. Those who are interested must first go through a lot of books, NEW! -Ilektor SHOP publications and software libraries. With this book, however, the first step is easy. The theoretically founded content is under- standable and is supplemented by many practical examples. Among other subjects, the following are dealt with in the fun- damentals section of the book: Lighting, optics, camera tech- nology, transfer standards and stereo vision. The practical sec- tion provides the efficient implementation of the algorithms, followed by many interesting applications. 320 pages • ISBN 978-0-905705-71-2 • £32.00 • US$64.00 Elektor Regus Brentford • 1 000 Great West Road Brentford TW8 9HH • United Kingdom Tel. +44 20 8261 4509 V Order quickly and safe through www.elektor.com/shop Index of Advertisers ATC Semitec Ltd, Showcase www.atcsemitec.co.uk 78 Avit Research, Showcase www.avitresearch.co.uk 78 Beijing Draco www.ezpcb.com 47 Beta Layout, Showcase www.pcb-pool.com 39, 78 Bitscope Designs www.bitscope.com 3 Bowood Electronics Ltd, Showcase www.bowood-electronics.co.uk 78 Byvac Electronics, Showcase www.byvac.co.uk 78 Decibit Co. Ltd, Showcase www.decibit.com 78 Designer Systems, Showcase www.designersystems.co.uk 78 EasyDAQ, Showcase www.easydaq.biz 78 Easysync, Showcase www.easysync.co.uk 78 Elnec, Showcase www.elnec.com 78 EMCelettronica Sri, Showcase www.emcelettronica.com 78 Eurocircuits www.eurocircuits.com 47 First Technology Transfer Ltd, Showcase . . www.ftt.co.uk 78 FlexiPanel Ltd, Showcase www.flexipanel.com 78 FLYPCB www.flypcb.com 47 Future Technology Devices, Showcase. . . . www.ftdichip.com 78 Futurlec, Showcase www.futurlec.com 78 Flammond Electronics www.hammondmfg.com/uk 29 ILP Electronics Ltd, Showcase www.ilpelectronics.com 78 Jaycar Electronics www.jaycarelectronics.co.uk 2 Labcenter www.labcenter.com 88 Lascar www.lascarelectronics.com 39 London Electronics College, Showcase . . . www.lec.org.uk 78 Marchand Electronics Inc, Showcase www.marchandelec.com 79 MikroElektronika MQP Electronics, Showcase. . . . New Wave Concepts, Showcase Newbury Electronics Nurve Networks Paltronix Peak Electronic Design Pico Quasar Electronics Radiometrix, Showcase Robot Electronics, Showcase. . . Robotiq, Showcase ScanTool, Showcase Schaeffer AG Showcase Tsien (UK) Ltd, Showcase USB Instruments, Showcase . . . Virtins Technology, Showcase . . www.mikroe.com 13 www.mqp.com 79 www.new-wave-concepts.com 79 www.newburyelectronics. co.uk 33 www.xgamestation.com 33 www.paltronix.com 15 www.peakelec.co.uk 39 www.picotech.com 11 www.quasarelectronics.com 57 www.radiometrix.com 79 www. robot-electronics, co.uk 79 www.robotiq.co.uk 79 www.obd2cables.com, www.scantool.net . . 31, 79 www.schaeffer-ag.de 47 78, 79 www.componentbin.com 78 www.usb-instruments.com 79 www.virtins.com 79 Advertising space for the issue of 18 August 2008 may be reserved not later than 22 July 2008 with Huson International Media - Cambridge House - Gogmore Lane - Chertsey, Surrey KT 1 6 9AP - England - Telephone 01 932 564 999 - Fax 01932 564998 - e-mail: p.brady@husonmedia.com to whom all correspondence, copy instructions and artwork should be addressed. 6/2008 - elektor 87 The Proteus Design Suite Celebrating BO Years of Innovation 1988 1990 2000 2005 2008 Labcenter commences trading with PC-B for DOS 1 989. First integrated autorouter added for PCB Design. Schematic Capture added to PCB Layout package 1 99 1 . forid First Schematic Capture for Windows™ . 1 99B. Topological route editing for easier PCB layout. 1 993. Proteus offers fully integrated circuit simulation. 1 994. Autorouter enhanced with Rip-Up and Retry algorithm. Gridless, shape based power plane support 1 99G. True, mixed mode SPICE simulation introduced. 1 997. Interactive simulation - ideal for educational users. 1 998. PIC microcontroller simulation technology developed. 1 999. 8051 microcontroller simulation technology developed. Worlld First Interactive MCU co-simulation (VSM] EOOI . High level language support added for MCU simulation. EOOE. ELECTRA adaptive shape based router interface added. E003. forOd First 32 bit MCU simulation support with ARM7. E004. Integration between Proteus VSIVI and MPLAB™. Redesigned GUI across the Proteus Design Suite EOOG. 3D visualisation engine integrated with ARES PCB Design. EOD7. forid First USB schematic based USB Simulation. Coming Soon: Introduction of HDL support in simulation, ODB++ manufacturing output, improved core SPICE simulation algorithms, enhanced live DRC error checking and much more. LABCEIMTER ELECTRONICS LTD A technology pioneer in the EDA Industry since 1988 Technical Support direct from the program authors Flexible packages and pricing tailored to customer requirements. !Yean v Labcenter Electronics Ltd. 53-55 Main Street, Grassington, North Yorks. BD23 5AA. Registered in England 4692454 Tel: +44 (0)1756 753440, Email: info@labcenter.com