November 2010 + The 5532 OpAmplifier - part 2 t Senso rless Motor Speed Measurement a Basic Antennas + Real Time Gas Measurements + Portable Oxygen Meter Multi TriS9er ui.2 JPG # ©8/07 2010 m fkAUH . * K mbed DESIGN CHALLENGE Start prototyping the mbed way Redefine the way people build prototypes! NXP and ARM/mbed are challenging you to use the mbed NXP LPC1768 prototyping board and mbed online "Cloud” compiler to develop an innovative hardware- or software-based application. Succeed, and you could walk away with part of a prize pool worth S 1 0,000! Deadline for entries is February 28, 201 1 Register for the challenge at www.circuitcellar.com/nxpmbeddesignchallenge NXP mbed Design Challenge empowered by: CIRCUIT CELLAR mbed 6 YtAHS OK DEVELOPMENT *>YS1 tM IMPHOVl MINI iinkriuQ-liihlLQmh^ B&guasgg il!lt!!!!ilil«l! Illlifo tU^. rjfr im —r* t i mikroC, mikroBASIC and mikroPASCAL PRO for dsPIC3G/33 and P1C24 COMPILERS SUPPORTED TOUCH ME* IDS!* i^Ttl .jt.. FiikroElekironik-= -■vl f, LCD Testin'; .Xus ■ S *S- »* ■»♦“ m — a i* »■**** IN-CIRCUIT DEBUGGER SAVE YOUR POWER WITH The Easy24-33 v6 development system supports 14-, 18-, 20- and 28-pin PIC24and dsPlC33 devices from Microchip. It comes with a PIC24F16KA102 (PIC24 16-bit Microcontroller featuring nanoWatt XLP™for extreme Low Power consumption) designed for power constrained and battery powered applications. The system features a USB 2.0 programmer with mikrolCD and many peripheral modules, such as Touch Sense, Serial RAM, EEPROM, etc, suitable for developing low power, sensor and wireless devices. CHECK OUT our accessory boards compatible with Easy24-33 v6! THE EASIEST WAY TO CREATE YOUR OWN LOW POWER DEVICES Mikrollektronika DEVELOPMENT TOOLS I COMPIL ERS I BOOKS 'i L f l GET IT NOW www.mikroe.com - * . ^ ft Privileged When it comes to (high end) audio, ESek- tor has standards and a reputation to maintain. Many of our amplifier designs have reached legendary' status and apparently are still built. In recent years, audio as a subject has suffered under the weight of microcontroller projects, and we promise to make amends. Unusually, our current audio amplifier project (of which the first instalment appeared last month), Is not a pure in-house design but originally develo- ped by Douglas Self, a widely respected author of articles and books on the design of audio amplifiers. However in good Elektor fashion the 5532 0 pAmpli- fier design was tweaked and optimized. Ton Ciesberts here at Elektor Labs was asked to supervise the post engineering phase of the project. And what do you think happens if let two ambitious audio designers work together on a project? They will not take each other's word for any decibel when approaching the noise floor of the AP analyser! Questions, com- ments, criticisms and amendments got sent hack and forth over the past few months. Eventually this led to a design that's improved and polished in some areas; ‘the best of two minds', so to speak, right up to the board design and the publication proper. The resulting project is a rather unu- sual power amplifier with an output stage that consists of cheap, paral- leled opamps — lots of them! If you are Interested, do not hesitate to build your own Op Amplifier. In terms of parts cost, it won't break the bank, apart from the power supply of course which is traditio- nally the biggest cost factor Let us know what you think of it! My colleague Harry Baggen was the first to be able to listen to the OpAmplifier within the peace of his own home and he was pleasantly sur- prised by the performance of all those little opamps. It sure is a privilege to be an Elektor editor — with the soldering irons still smoking you can listen to the latest audio creations straight away. 6 Colophon Who's who at Elektor magazine. 8 News & New Products A monthly roundup of all the latest in electronics land. 14 Introducing imbed 16 What's That in the Air? Here we tackle the theory and methods of real-time oxygen and hydrocarbon compound measurements. 20 MicroFuel Cell Measures Oxygen Concentration A must read and must have not just for divers and cave explorers. 24 The 5532 OpAmplifier {2) Besides construction and test results, the closing instalment also covers bridged operation and modification for 4 ohms. 32 Sensorless Motor Speed Measurement A technology is described that enables the speed of an electric motor to be measured by means of an ammeter circuit, 36 Wireless Instrumentation Network Add Maxstream and Xbee modules, stir in some Arduino and you have a measurement network with no wires., 41 Portable Energy Alternative energy sources for your cell phone, iPod and other gizmos normally operating from rechargeable batteries, 43 jTAC Live Buzz (E-Labs inside) jTAG is Increasingly used for boundary scan methods, calling for new 1C architectures. 44 USB port from a 9-pin sub-D con- nector (E-Labs Inside) FTDI have again come up with the goods! Jan Suiting, Editor 46 Rapid Prototyping (E-Labs Inside) The Auto Fab product from Muvtum 4 10-2010 elektor CONTENTS Volume 36 November 2010 no. 407 20 MicroFuel Cell Measures Oxygen Concentration We have previously described carbon dioxide sensors based on chemical and optical principles in Elektor, and an oxygen sensor complements these designs nicely* The meter described here is based around an Elektor MmimodiS micro- controller board featuring an ATmega328 microcontroller and a two -line back- lit LCD panel. presents a new approach to circuit prototyping, 48 Image Processing Made Easy Bluff your way into motion detection with a webcam. 54 Designing and Making Basic Antennas It's surprisingly easy to make monopoles, dipoles and directional antennas for the 2.4 GHz ISM band* 24 The 5532 OpAmplifier (2) This month we get real by building the 5532 OpAmplifier project and putting it through its paces. The test results are pleasing if not impressive and definitely put the design in the high-end audio class. Bridging and 4 ohm conversion are also described. 36 Wireless Instrumentation Network In this project, the node consists of an Arduino nodule with an XBee shield module. The gateway also consists of these two modules, plus an EtherShield module for communication with the Internet. The resulting measurement data can be retrieved from the Pachube website. 60 Talk Show (ATM18 series) VRBot Speakjet and ATM18 are the main ingredients of an experimental voice synthesizer with a giant t-pixel indicator thrown in for fun. 66 Uniiab Duo Here we show how the Unilab bench PSU gets converted into a twin supply together with the September 2010 V/l readout. 69 Design Tips LED remote control for RC models Simple IR remote control tester 70 Camera Interval Timer A fully programmable timer & multishot controller for photo cameras like the Canon EOS. 74 Light Tracker Very likely one of the simplest robotics circuits around that succeeds in finding light sources. 70 Camera Interval Timer The camera shutter operating system described here enables you to take pho- tos at a predefined Interval, or to trigger two cameras together for stereoscopic shots. This way you can take a series of photos every 30 minutes of a flower as it opens, a baby bird hatching, etc. so as to include them in a video. The system was originally designed for a Canon EOS camera, but it can readily be adapted for other cameras that are able to be remote controlled. 75 Hexadoku Our monthly puzzle with an electronics touch. 76 Retronics: Chauvin-Arnoux MF7 Precision Astatic Wattmeter Regular feature on electronics L odd& ancient'. Series Editor: Jan Suiting 84 Coming Attractions Next month in Elektor magazine. elektor 10-2010 5 elektor international media bv Elektor International Media provides a multimedia and interactive platform for every one 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. + Quart us | Altera FPCA Design Simulation + 80 Candles for the Pentode OlTHefcfl" - UHCpr I a-ll + S-FSK Power line Communication ektor ANALOGUE • DIGITAL < MICROCONTROLLERS & EMBEDDED AUDIO • TEST & MEASUREMENT ; <4 k* * Volume 36, Number 407. November 2010 ISSN 1757-0875 Elektor aims at inspiring people to master electronics at any personal level by presenting construe linn projects and spotting developments in electronics and information techno-logy, Elektor international Media, Reg us Brentford. iouo Great West Road, Brentford TW& 9 HH, England. Tel. (+44) 30S 261 4509, fax: f +44) 20S 261 4447 www.dektor.com The magazine is available from newsagents, bookshops and electronics retail outlets, or on subscription. Elektor is published it tunes a year with a double issue for July Si August, Elektor is also published in French, Spanish. American English, German and Dutch, Together with franchised editions the magazine is on circulation 10 more than 50 countries. t dlLui la I ■ , "> f -1: at Hedwig Hen ne kens (.secretariat . elektor.nl) Giel Dols. Mart Schroijen Paul Snakkers Wisse Hcttinga (w.hettinga ^elektor.nl) Carlo van Nisteirooy [an Buitirtg [editor@elektor.com) Harry Baggen, Thijs Beckers, Eduardo Corral, Ernst Krempel sauer. Jens Nickel. Clemens Valens, Christian Vossen (Head), Ton Giesberts, Luc Lem me ns, jan Visser. Elektor International Media. Reg us Brentford, 1000 Great West Road, Brentford TW8 gHH, England. Tel, I+44) 208 261 4509, fax: (*44)208 281 4447 Int e met ; www, elektor. co m / s u bs 6 11-2010 elektor Elektor Personal V' Organizer 2011 c=> Contents refill available separately The Elektor Personal Organizer 2011 makes planning your appointments a real pleasure, and you always have ready access to have handy information that everyone who works with electronics needs to know. A The Organizer 20 T 1 ata glance: ■ 2011 calendar (two pages per week) * Appointments calendar (with corner perforations) in six languages * 60 pages of technical information on electronics * Seven sections, separated by tab sheets ■ Al ph a b eti c ad d ress a n d te lepho n e boo k * H a ndy month I y pi a n ner * Lined pages foryournotes * Five credit-card pockets and a pocket for business cards * Push-button ciosure * Six-ring binder mechanism * Luxurious grey imitation- leather binding * Free pen and SMD Tool (with com plete package only) Contents refill 201 1 If you purchased the Elektor Organ izer last year, the content refill for 2011 can be ordered separately for £14.80 (US S23.go). ISBN 978-90-5381-259-4 * £24.90 * US $40.20 Contains 60 pages of technical information on Electronics! Further information and ordering at www.elektor.com/organizer VJ Ema il: su bsa ipt ionslstelektor. co m Rates and terms are given on the Subscription Order Form, Elektor International Media b.v. P. 0 , Box it ML-S114-ZG Susteren The Netherlands Telephone: (*31) 46 4389444, fax: (+31)464370161 Distribution: Seymour, 2 East Poultry Street, London EClA, England Telephone: +4 4 207 429 4073 UK Advertising: Hu son International Media. Cambridge House, Cogmore Lane. Chertsey, Surrey KTi6 9AP. England. Felephone; +44 1932 564999, Fax: +441932 56499s Email: r.elga rS'h u son m ed ia.co m Internet: www. huso n m ed ta, com Advertising rates and terms available on request. Copyi ight toutice 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 earners and article texts published in our books and magazines (other than third-party advertisements) are copyright Elektor International Media b.v. and may not be reproduced or transmit- ted in any Form or by any means, including photocopying, scan- ning an recording, in whole or in part without prior written per- mission from the Publisher. Such written permission must also be obtained before any part of this publication is stored m j retrieval system ol any nature. Patent protection may exist in respect of circuits, devices. Components etc. described in this magazine. The Publisher does not accept responsibility for failing to identify such patent(s) or other protection. The submission of designs or articles implies permission to the Publisher to alter the text and design, and to use the contents In other Elektor International Media publications and activities. The Publisher cannot guaran- tee to return any material submitted to them. Disc laimec Prices and descriptions of publication-related items subject to change. Errors and omissions excluded, i lektur international Mc-d ia b.v. 2010 Printed in t he N ethcflands 1 elektor 11-2010 7 NEWS & NEW PRODUCTS World’s first ultra-thin waterproof piezoelectric speaker Featuring a thickness of only 0.9 mm, Murata has launched the world's first ultra-thin waterproof piezoelectric speaker. Based on Murata's proprietary piezoelectric technology, the speaker is waterproof to IPX5/IPX7, The speaker measures 1 9.5 by 14.1 by 0.9 mm; its rec- tangular shape reduces dead-space from designs while its ultra-thin dimensions contribute to greater freedom in equip- ment design. ing of mobile equipment. Given there are so many different areas that require waterproofing, there were many tech- nical challenges and cost issues to over- come when developing the waterproof speaker. Conventional methods of water- proofing dynamic speakers used water- proof sheets which covered the output sound holes, reducing sound quality. Murata's approach incorporates a rub- ber film Into the speaker itself, leaving the output sound holes open. The width of the metal frame housing the speaker has been increased to improve the seal between the metal frame and the chas- sis, preventing water penetration. Of the 50 new Japanese mobile phone models announced for 2010, almost one in four will be waterproof mobile phones, one of numerous indicators of a growing trend towards the waterproof- The new waterproof , speaker has been des- \y ignated part number ‘ V5LBG1914E14G0- TO, Its average sound pressure level (SPL) is 92,0 ±3.0 dB (1500 Hz k /2000 Hz/2500 Hz/30 f , . 00 Hz average) with a resonant frequency of 1400 Hz+20%. Since no magnets are used, there is no possibil- ity of malfunctions caused by iron sand, or electromagnetic effects on magnetic sensors. www.rnurata.eu (100639- IX) Mainstream universal controller platform for RF and IR The M-Remote from Audivo is the first mainstream universal RF remote control platform to complement RF with tradi- tional IR capabilities, and offer a color (LCD or OLED) display. By using Nordic Semi- conductor's nRF24LE1 2.4 GHz SoCs and Gazell RF software protocol, the M-Remote can seamlessly control the latest video and audio wireless streaming devices via bi- directional Rf. The device also controls tra- ditional IR-only eguipped appliances such as TVs, set-top boxes (STBs), and A/Vamps. Universal controllers have the ability to oper- ate consumer electronics (CE) appliances from different manufacturers eliminating the need for multiple dedicated remote controls. Until now, however, mass-market universal controllers have typically only employed tra- ditional IR (infrared) technofogy. The M-Remote OEM platform offers both RF and IR and targets consumer electronics (CE) manufacturers of the latest networked A/V devices such as streaming music servers, Internet radios and wireless multimedia cent- ers. These appliances demand more advanced user interfaces than traditional push-button, one-way IR technology can support. RF offers the high-bandwidth, bi-directional wire- less connectivity required to support more advanced user interface mechanisms such as scroll wheels, touch-screens, and track-balls. These are all designed to make it easier and more intuitive for end users to access and enjoy their digital content and services. This includes the ability to browse large libraries of stored music or long lists of Internet radio stations, or have continuous (live') playing status info (including that usually shown on a front pane! but often too small or far away for users to be able to see) and graph- ics (e.g. album artwork) displayed directly on a remote's display, in addition, RF elimi- nates the need for iR's line-of-sight access, allowing dev ices to be controlled through objects and even interior walls (usually up to a range of about 1 5m and assuming wall building materials do not excessively atten- uate RF signals). In operation, a \ordit nRF24LE1 located in the universal M-Remote communicates with a second nRF24LE1 -based module embedded into the A/V networked stream- ing dev ice using the Nordic Gazell software protocol The Nordic nRF24LE1 utilizes a proven Nordic nRF24LQ1+ transceiver core and features an up to 2 Mbps on-air data rate combined vv ith ultra low power (ULP) operation and advanced power manage- ment. The Gazell RF protocol provides fea- tures for advanced navigation, background data transfers (e.g. of larger files such as album artwork), and advanced pairing schemes, while being able to handle up to five remote devices at the same time, in addition. Gazell is a frequency agile protocol that is highly immune to interference from other 2,4 GHz radio sources such as Blue- tooth wireless technology and Wi-Fi. To conserve power, the M-Remote will typically enter an ultra-low power (22 pA) standby sleep mode when not in use (after 30 s in default mode, or between ten and 90 s if set by the user). This, however, is all hidden from the end user by the use of an 8 11-2010 elektor inbuilt motion sensor that means if the remote is picked up it activates a rapid power up (including the display) in 200 ms ready to respond immediately to any user input request. The M- Remote is able to offer over a week of operation before battery recharge. The fully customizable M- Re mote is a com- plete solution including the remote con- trol handset with integrated rechargeable lithium-ion (Li-ion) battery, charging cra- dle, host A/V device RF module, IR trans- mitter for standard devices (optional), API source codes (making it very easy to inte- grate the M-Remote platform into any modern A/V device), product design sup- port, development kit, automatic pairing, and an optional touch (scroll) wheel* A full touchscreen could also be integrated if required, and multi-room (zone) control is also supported. wwwmordicsemi.com (100639- VII) Online IGBT selection tool International Rectifier has introduced a new online Insulated Gate Bipolar Transis- tor (IGBT) selection tool that enables design optimization in a wide range of applications including motor drives, uninterruptable power supplies (UPS), solar inverters, and welding. Product Selection Tool IR's new IGBT Selection Tool evaluates appli- cation conditions including bus voltage, switching frequency, and short circuit pro- tection requirements. Located at mypower. irf.com/IGBT, the online tool provides an estimate of losses and suggests parts that can function within the given constraints. The tool also provides pricing for each part to enable designers to consider the effects of device choice on system cost, IR offers a broad array of IGBT products ena- bling optimized inverter designs for differ- ent applications. The new online selection tool enables engineers to quickly and easily compare choices to select the optimal IGBT for their design. IGBT selection requires evaluation of many parameters that cannot be simplified into a single metric. As switching losses can be traded for conduction losses, for exam- ple, calculating operating losses requires both operating frequency and bus voltage parameters, in addition to operating cur- rent. Also, the requirement of some motor drive inverters for minimum short circuit withstand time comes at the expense of higher losses. IR offers a wide selection of IGBTs offering various tradeoffs in switching speed as well as devices designed for applications that do not have minimum short circuit require- ments. The newsefection tool helps design- ers make use of IR s broad IGBT portfolio and weigh the performance tradeoffs, www.irf.com (ioo63g-X) 6GHz RMS power detector with digital output Linear Technology introduces the LTC5587, a n 1 nd ustry fi rst 40 dB dynamic range 6 GHz RMS detector integrated with a high sam- pling rate 12-bit serial A/D converter. The digital output RMS RF detector provides ±1 dB measurement accuracy of high crest- factor signals, independent of the modula- tion used. The detector is capable of oper- ating over a wide frequency range from 10 MHz to 6 GHz, The integrated 12-bit ADC captures and digitizes the detector measurement at a rate of up to 500 ksam- ples/second and delivers the data via a bit umm SPEED. PERFORMANCE. A programmable system-on-chip USB 2.0 Host / Slave controller - Dual channel USB 2.0 interface, handles all USB host and data transfer functions in single 1C. - On-chip 15-bit Harvard architecture MCU core with 25 6 Kbyte Flash and 16kbyxe RAM. - External UART, FIFO, SPi Slave, SPI Master, GPIO and PWM interfaces. -Vinculum-11 software development tools available for user application development. - Multiple package size options including VNC1L backwards compatible package option. - Targeted fonange of USB applications, from portable media devices and cell phones to industrial and automotive applications. Vinculum-!! evaluation modules - V2DIP1/2 - Miniature VNC2 Development Module with Single or Dual USB Connectors - V2-EVAL - Complete Evaluation & Development Kit for VNC2 -VNC2 Debug Module ■ i * 0- + ■ B B- # + S B- » ■ B * + P ■ ■ • I ♦ ■ « ' V P « USB MADE EASY www.ftdichip.com elektor n-2010 NEWS & NEW PRODUCTS Fame 1 1 first to stock new Microchip developmen board Farnell is the first European dis- tributor to stock the new Micro- stick for dsPIC33F and PIC24H development board, which pro- vides a complete, low-cost solu- tion for designing with Microchip's 16-bit PiC24H microcontrollers and dsPIC33F Digital Signal Controllers {DSCs)* In a compact 20x76 mm footprint. The low-cost Microstick offers an integrated USB pro- grammer/debugger, which shortens learning curves. For maximum flexibility, the Microstick can be used stand-alone or plugged into a prototyping board. Many engineers, educators, students and hobbyists need a low-cost solution for work- ing with and debugging code on 1 6-bit microcontrollers and DSCs, in addition to its other benefits, the Microstick is populated with a socketed microcontroller that can be easily swapped out. The Microstick works with the PfC24Hj64CPS02, which is the high- est performance 1 6-bit MCU in the industry, and the dsPIC33FJ64MC802 DSC, which seamlessly blends DSP and MCU resources into a single architecture. Software sup- port includes the same free MPLAB® Integrated Development Environment (IDE) and software libraries that work with all of Microchip's 8/1 6/ 32 -bit PIC i microcontrollers and DSCs, Additionally, the dsPIC33F DSCs are supported by the free demo version of Microchip's Device Blocksets forfhe MATLAB® language and Simulink® environment, which work seamlessly within the MPLAB IDF. This combination of low-cost tools and free software prov ides an industry-leading platform for experimentation and development of smart-sensor and a host of other embedded-control applications. Through its industry-leading websites featuring tools such as Live Chat, and easily accessible data sheets, Farnell Is able to support its electronics design engineering customers with information and ideas to help them select the most appropriate com- ponents and devices for their new designs. The element! 4 online engineering commu- nity provides a unique additional resource. Further information about the Microstick fordsP!C33Fand PIC24H development board can be found at http: /www.element-14, com/community/docs/DGC-23484, www.microchip.com/get/EOKR v. v, .farnelI.co.uk (100639X1) stream over a serial SPI port. The RF detec- tor operates with single-ended input and requires no external balun transformer. Its small 3mm x 3mm DFN package provides a highly compact solution. The LTC5587 s ±1 dB accuracy over a 40 dB dynamic range and over the full tempera- ture range from -40°C to 85 P C offers best- in-class performance. Combined with a 1 2- bit A/D converter, the device provides 0.014 dB per bit measurement resolution. Its low power consumption is Ideal for applications in cellular basestations, pico- cells, and femtocelfs supporting all stand- ards including LTE t W-CDMA, TD-SCDMA* CDMA/2k* GSM/EDGE and WiMAX. Other applications include MIMO radios, repeat- ers, point-to-point microwave links, military radios with complex modulation, remote power measurements, and portable test and measurement instruments. The detec- tor is particularly useful in FPGA-based sys- tems where no A/D converters are available. The LTC5587 Is powered from a single 3.3 V supply. During sampling mode, its total operating current is 3 mA, consuming only 10 mW of power, its consumption is fur- ther reduced by one-half when the ADC Is idled, making the LTC55S7 suitable for bat- tery powered or portable remote RF meas- urement systems. The device also has shut- down capability, drawing less than 10 pA supply current when disabled. The LTC5587 is offered in a small 3mm x 3mm 1 2-pin DFN package, providing a compact solution foot- print, The LTC5587 is available from stock. http: //www, I i n ea r. co m / 5587 Copy protection and license-management security over a single- contact interface Maxim Integrated Products introduces the DS28E1G, a thallenge-and-response secure authentication 1C that includes user- programmable nonvolatile (NV) memory. Authentication is implemented with the industry-proven FIPS 1SQ-3 secure hash algorithm (SHA-1) combined with com- mands that operate on a programmable private secret and random challenge from a host controller. The device provides flexi- bility to implement private secret sizes from 64 bits to 288 bits; the host challenge size is 96 bits. These large secret and challenge sizes make algorithmic brute-force attacks to discover the private secret mathemati- cally impractical. Because die-level probe methods are the more likely method of security attack, the DS28E10 implements proprietary circuits and methods to protect sensitive data from being captured. This authentication solution is well suited for a broad range of cost-sensitive consumer, medical, and industrial products. The D528E10 provides 28 bytes of user-pro- grammable OTP-EPROM portioned with pro- grammable protection modes. This memory can be used to store end-product informa- tion such as calibration constants, manufac- turing data, and feature settings. Additionally, a unique, unalterable, factory-programmed, 64-bit serial number (ROM ID) is included and can be used as an i nput parameter for authen- tication security functions and/or as a unique identifier for the end product. Communication w ith the D328E1 G is imple- mented using Maxim's 1-Wire interface. The single-contact 1 O interface enables the part to be easily added to a design from a spare microcontroller or FPGA port pin. 10 11-2010 elektor The DS28E10 operates from 2.8 V to 3,6 V and is fully specified over the -40 degrees Celsius to +85 degrees Celsius extended temperature range. It Is available in small 3-pin SOT23 and 6-pin TSOC packages. An evaluation kit{D528E10EVKIT+) isalso avail- able to assist with end application develop- ment and to program device memory, www. maxim-ic.com/DS28E 1 0 (100639-XJU) Tinytag eurrent/voltage loggers The new battery-powered 1 -channel data loggers with 16-bit resolution have a rug- ged housing with LCD display of the current readings. There is the mode! TV-4704 avail- able with an input voltage range of 0-25 VDC and a resolution of 1 mV, as well as the model TV-4804 with the input current range of 0-25 mA DC and a resolution of 1 liA, With the above mentioned current and volt- age ranges a variety of industry standard sensors and transducers can be connected, which enables the recording of a wide range of process and environmental parameters. The devices have a memory capacity of 30,000 readings and the housing protec- tion Is rated at 1P67. They are supplied with an input connection cable. The optional data logger software enables the scaling of the readings, that means, during the evaluation of the signals the real values of the connected sensors as well as the suitable physical units can be displayed. There are user-programmable sampling intervals between 1 s and 10 days and two programmable alarms available, and there is also an option for delayed start up to 45 days, direct start via reed switch and three stop functions (when memory is full; after n readings or overwrite oldest data). After the run is finished, the stored data can be transferred to a computer via an inter- face cable, and they can be displayed a s a curve or spreadsheet, printed or processed in other applications. www .priggen.com (100-XII) IPS for servo motor controllers Images Scientific Instruments Inc. new IPS (Integrated! Power Supply) is setting the new standard of excellence in servomotor controllers. Our line of servo motor control- lers allows you to use a variety of inexpen- sive power supplies to run both your con- troller board and servomotors. Use available power supplies; transformers, batteries, wall transformers, etc. anything from 6V to 30V either AC or DC, The IPS system will regulate the power to run your servomo- tors efficiently. Power is supplied through 2,5 mm power socket on board, A discrete 2,5 mm power jack is provided with our controllers for connecting your own power supply. The picture shows the newest products in the Servobotics line of servo motor control- lers; starting at the upper right and moving clockwise; the PS2-SMC-06, USB-SMC-05, U5B-SMC-4 and USB-SMG08. http: / / www. imagesco.com (10 0708-1) LeCroy: fastest oscilloscope in the world LeCroy Corporation's new line of WaveMas- ter SZi-A digital oscilloscopes — the S Zi-A Series - now provides up to 45 GHz of band- width and 120 GS/s of sample rate — the world’s highest bandwidth and fastest sam- ple rate real-time oscilloscope - combined with 76S Megapoints of analysis memory. Ttmwell innovative -3&4 tuning tunable BP Filter uhf Helical SMD Pin Type Bandpass Filter 7S Series mm 1 7,7 Temweil Filter '*""77 * Toko Type SMD Size Diagram * Better Spec Performance * Customized High level Spec Pas; Band 2 fulling j 7 S2 series] | 3 Tuning f 733 sorter} Te mwell'P.'N’Fo-E W IL Ternwell P n Fo sw IL 221 -2«M TD5-2C 1 2B-23DM-1-3 '.l }5 TTS-3fli2&-23CM-1AM 24S-275M TDS.2QMFJ6IWU5M J - *5 276-3 13M TDS-2C34T-:-.; M-lpP.I -1 TT5-iD34 F-3D0M s.M 50 3J1-350M TDS-2tH50-3 1 4M-1GM 3.5 TTS-3044B-335M- 1 9M 35 311-35W 2.0 TTS-3D46F414M-22M asuooM TD£-2053f’37^1-13M AD TTS-3D65e-37f.M-12M 5 1 3sHQBM TDS-2G54f.375M.2QM — TS-3O56F-375M-20'.' 55 40T-455M TDS-2G6flM2WM5M 3 0 TTS-3DBBB4Z0M’1BM 45 4QM55M TDS-2K' 7 E -J4Qr.‘-1 DM 3.0 TTS-3D64FJ34M42M 33 453-51 5M TD5-2OT5B-460L'-1*M 3 0 TTS-3076B470M- 1 9M t 5 JS&-S1M1 rDS-2GT2B-J&5M-37M J-5 TTS-3D72C -ifl 5M-20M 43 S16’555>V1 IDMDB4&SMM-1BM 4,0 TTS-30G3C-53FM-37M 4 : 5Sv-5S5M TDS-20&JD-5BDLM7H 2 5 nS-3094lM4WM-15M 3 5 5SS-640M TDS-21WM14Mr2aM TfS-Sil IUD-61 JM-14M 3 3 iDS-zioiA-etmiM 3 5 TTS-3 1 0 1 A-G 1 4F.| ■ it M ' ■i-i v tDS-Zn4A4SWi-iSM Si TTS-31 24,A-fi90M.i7M ~V-700M TDS-2 1 24D-660M-21M 1 TTS-3 1 24D-6&DM-2 1 M ! a.D 70P-750M K2SD-750W"20M-20M 3.0 K3SD-750M-20M.2CM 4 0 751’8WM TDS-2 U7A-775M-5DM T5 TTS4U7A‘775M4SV 20 751 -MOM TDS-2UiA-600M-22M :o TTS-3144A-SMM.21M mi -bum K2SD-S' 'M-MM-20M 30 TTS’31WM15M-5ZW ~.Q Ml ’MOM K2SfcU3M-20M-2OM 30 TTS-3 !6-5A-«'.'v..i2M 5 : MH)6QH TDS-2 1 S2A-&4 5M-63M Z-3 rT54lG2A4J5M>62M 2 0 M1-SBDM X2SD470M-2DM-2QM n TTS^t7JA-a7CM-lBM C? MI-BOOM TDS-2 1fl4A,S90M.22M 3: TTS-2T34A-55CM-17M 11 4 0 MHflMM X2SD-90DM-20M-20M 5 K3SD.aDOM-2CM.2DM . 90M30M mo-mu-xmw . M FT S-3t$ EA?H 2 0 9J1-SHM TDS-22OJA-0ADM-23M Vt 1TS-32tMA.MCM.2aM 45 95M75M TDS-2212A-950M-2SM 2 5 nS-32^-:^M-i7M 5 0 •351 -575P.1 K2SD-980M-ZDN-2W 3D TTS32S3A-M2W-BDM 35 976-1 DOW TD&-222JA-997M-20M 3 2 TTS.3221A.W7M.56M 25 1O0WO5QM TD8-2M3A-1025IM5M. (5 TTS-3? 7 .3A.Ti75M-fi5M 3.5 1051-rlHh' TDS2241A-10T5M-64M 35 TTS-324 1A-1 D76M-64 F.l i 5 11QM35QM TQS -Z24 3A- 1 1 2SM-5B K1 23 TTS.3261A-M70M.21M 4 F 11DMZ5QM TD5-2245A-1225M-&6M 25 TTS-324SA- 1 125M-60M 39 1251-s i(' )V TD5-2274A-127QM-37M TTS-3274A-1i70M-32M 13OT-13&0U IDS424GM27SM.TCM 2 0 TTS-3246A- 1 275M-7BM Biggest-webShop-VHF UHF Standard Bandpass Filter Temwell&Toko Type: Alternative online- 72hr shipping ©7HW/7HTIoko 302MXP type UHF (2/3 Tuning Filter) TW4/N-FS4W TW-PN-FOBW TW-P N-FO-EW I TW-P.'N-fO'BW K2B1-380M-10M K2Bt-505HM3M 1 K38T435M.2DM K3CT1-B33M.21M K2B1-370M-10M K2BV525M-13M K36T455M.2DM K3ei^35XI’29M K2B1-3B0M-10M K3BT-370M4I1M K30T-A6SM-1SM «CTl WW-W ! K2E1.39DM- ■ K3BT.37CM-1&I K3B465M-2DM K3BT-Se)h!-25M K2BM1DM-JCW H3BT-MCU-TGM K3 9T -E 1 CM ■ 1 5M K3CT1-PMM.T2M K2B1420M-TM JGBT^CAi-tSM K3BT.K0M.16M K3CTi.9i5M.t»l K2B1-435M- 1 « M <3E74 L 0V TV K3CT2-600M-2CAI K3CTl-93flM-!SM K2E 1 ^ISQIW-1 1 M K3BT^t2M-i8M K3CTl4i?M.ieM K2BM60M-TM K;ST41EM.15V K3CT2-653M.1tW K3CT14GDMi tli tin tel -.44-3415,4 QOCMQ5 ITEMWELL CORPORATION! Made Ml Tdtxvar’ [JiOttlfjrscM" A iM; jn utile turei t *.por(-f:r www.Iorrwulli.CDiil.tvj' t WISH: JogGtJ temwoll.com.tw elektor 11-2010 11 NEWS & NEW PRODUCTS ; New boards galore i from mikroelektronika i Mikroelektronika have released a number of new boards to the microcontroller/ embedded markets. The SmartTMl Board allows users to useTeftonika TJV1 1 module in their GSM/CPRS application design. The tool supports Teltonika TM1 GSM/ GPRS module and has on-board vol- tage regulation, so there is no need for additional power supply circuit. All you need to do is to connect power supply to the board, attach a GSM antenna and you are ready for your d evtce designing. Each f ea - ture of the board is supported by example written in mikroC, mikroPasca! and mikro- ■ Basic PRO compilers. The new XMEGA-Ready is a full-featured prototype board that contains ATx me- ga 128 A! device (it is connected to SMhz oscillator). It also features a USB support via FT232R, This tool . Is ideal for exploring and desiging devices using new Atmel® XMEGA™A1 family. The development tool called mikroXMEGA is a small -package pro- totype board with ATxmegal28Al device (running at S MHz). This tool contains the FT232R(USBto serial UART Interface) that can be easily connected to a PC. Now you can explore the new Atmel® XMEGA™ A1 family at a low price. The EasyPULl board contains 8 pull-up resistors : (10 kQ or 1 kQ option). It can be used to fix an input pin to a known state if no input is present. On-board jumpers set pull-up/pull-down resistors for each pin connected to your prototype device. Also new is the Easy WiFi Board — a full-featured add-on tool for deve- * lopment of devices that use 2,4 GHz wireless communication, it features the ZeroG ZG2100M module that provides fast data transmission and a wide data range. The board can be con- nected to your system or micro- controller via IDC1 0 connectors. Besides this, the tool features voltage translators which allows tool to work on both 3.3 V and I 5 V voltage systems. Finally there's the EasyLED Board, This tool features eight LEDs that can be used for visual indication of output signals. Also, it can be connected to external electronic circuits via IDC10 connector and extension pins. The board is ideal for embedded projects that need some kind of visual indication, which can be used for signal monitoring purposes, www.mikroe.com I (100708-!!) Additionally, the introduction of a model with 20 GHz of band- width on four channels provides the highest performance and sig- nal fidelity available on four mea- surement channels. On all models, acquisition capability can be dou- bled with the use of the Zi-8CH- SYNCH Oscilloscope Synchroniza- tion Kit, with all acquired channels displayed on a single display grid. The standard sample rate is 120 GS/s for 45 GHz bandwidth, 80 GS/s for 25 to 30 GHz bandwidths, and 40 GS/s on all 4 channels at 20 GHz bandwidth. For 4 to 20 GHz bandwidths, the standard sample rate is 40 GS/s on all four channels with an option to increase the sampling rate to 80 GS/s on two channels. All memory is available at full record lengths for analysis processing, 20 Mpts/ch is provi- ded standard, with memory options up to 256 Mpts/ch available, in 1 20 and 80 GS/s mode, memory can be interleaved to 768 and 512 Mpts/ch. The Wave Master 8Z1-A models utilize sec- ond generation silicon germanium (SIGe) components to ensure high performance. SEGe is the most widely adopted and deployed semiconductor fabrication pro- cess with many years of commercial deploy- ment. Additionally, it has none of the ther- mal conductivity, reliability, yield, cost and other concerns that cap- tive in-house processes must con- tend with. LeGroy’s 30 to 45 GHz 8Z1-A models make use of sixth generation Digital Bandwidth Interleave (DBI) to effectively and reliably extend bandwidth without the deleterious effects of band- width "boosting", LeCroy has designed the 8 Zi-A Series as a single hardware plat- form, supporting all nine mod- els spanning from 4 to 45 GHz of bandwidth. This means engineers can leverage their investment and stay current with emerging high- speed technologies and serial data standards by purchasing only the bandwidth needed for current designs, and upgrading to additional bandwidth as needs change. Customers who had previously pur- chased an 8 Zi model can upgrade to 8 Zi-A performance and bandwidth. www.lecroy.com (100708-11!) 12 11-2010 elektor Low-Power Microcontrollers for Battery-Friendly Design Microchip Offers Lowest Currents for Active and Sleep Modes f SOW *,'K!WEUJ 31 """‘‘Hill it, :: ITS 1 Fjp CO UUss M- ~ & Extend the battery life in your application using PIC” microcontrollers with nanoWatt XLP Technology and get the industry's lowest currents for Active and Sleep modes. Microchip's new peripheral-rich PICI2F182X, PIC16F182X and PIC16F19XX families offer active currents of less than SO pA and sleep currents down to 20 nA, These products enable you to create battery-friendly designs that also incorporate capacitive touch sensing, LCD, communications and other functions which help differentiate your products in the marketplace. Microchip's Enhanced Mid-range 8-bit architecture provides up to 50% increased performance and 14 new instructions that result in up to 40% better code execution over previous-generation 8-bit PIC16MCUs. GET STARTED IN 3 EASY STEPS 1. View the Low Power Comparison videos 2. Download the Low Power Tips 'n Tricks 3. Order samples and development tools www.microchip.com/XLP PICT2F182X and PIC16F182X families include: • Packages ranging from 8 To 64 pins • mTouthT capacitive touch-sensing • Multiple communications peripherals • Dual l 2 C75PI interfaces • PWM outputs with independent time bases • Data signal modulator PIC16F19XX family includes: • mlouch capacitive touch-sensing • LCD drive • Multiple communications peripherals • More PWM channels, with independent timers • Up to 28 KB of Flash program memory • Enhanced data EEPROM • 32-feve! bandgap reference • Three raiko-rail input comparators VP o mimmm PfCl6F193X Fl r Evaluation Platform - OM164130-1 Intelligent Electronics start with Microchip microchip www.microchip.com/xlp www. -nicrCiicHipdii'ectiCom © Microchip - - • ■ ■ _ - p - ..i-Mt 1 and logs.'. the .VbcfMhip tog® and PlC are register?!* |redeiTurfcsAn.rt roTouch is a tradetTurh of Microchip Tt-t.hnu?0ijy Uicorp-Of attef i n the ULS A and atht’r caunlTi«s 2010 ErwrglUBr.tnetgiier and other marks jr* IraflemJH ks .ui'.-r Alt other trademark* mpnEipneri herein aiB property tif E^ieir respective coin panics. 2010. Microchip Technology Incorporated, All Rights Reserved. MElSTErxg/OS.IO Microcontrollers Digital Signal Analog Memory Controllers NXP MSEC) DESIGN CHALLENGE Ready to start prototyping the mbed way? Here you learn how m bed’s co creator Simon Ford took the design from concept to creation! The mbed microcontroller and tools now make rapid prototyping a cinch. By Simon Ford (UK) When Circuit Cellar and Elektor approached me about running a "design challenge" around mbed, I saw an opportunity to do some- thing special. Bringing together the mbed platform we've been developing and a gaggfe of innovative engineers should be a recipe for some great results! We Ye setting out to help make the micro- controller world a better place by laying down a very specific, yet wide-ranging, challenge: What technology can you help unlock for your fellow innovators? I grew up on magazines like Circuit Cellar and Elektor, and many of my early experiments were inspired by the projects people had sent in. A few years on, 1 wrote a couple of articles about projects I had designed, and got them published too. My hope was that the articles would serve to inspire my comrades in the same way. \ was still at school at the time, so getting paid to do my hobby was a huge novelty. Interestingly, st is a novelty I have man- aged to keep going at ARM, and one that I plan to continue! The point: progress is ail about standing on the shoulders of giants, but sometimes I wonder if the embedded world missed that memo. I started mbed as a skunk works project with Chris, a friend from work. We were both volunteering, trying to help people with microcontroller projects, and it was really pain- ful. You can only make so many excuses for the tools, processes, and general fiddliness until you have to step back and ask, "Why does it have to be so hard?" That led to many evenings of research and experiments to understand bow we could help people get stuff done. Fast forward a few years and it has become an official ARM project and we've grown an excellent team that Is making the Idea a reality. But what makes me really proud is the great community springing up around it; everyone has been incredibly supportive of each other, and it is a nice reminder that engineers are fundamen- tally enthusiastic, inventive, selfless, and helpful. If you haven't already seen what we are up to, take a look at http:// mbed.org. The mbed Microcontroller is the hardware component. taking a top-end ARM microcontroller and packaging it in a (XT pitch form factor with built-in USB programmer. The mbed Compiler aims to simpl ify tools too, making them accessible online just like web mall, so it "just works," And the developer website we’re build- ing is helping to provide the support, the resources, and the tools to allow you to share your developments, programs, libraries, and write-ups to help others get the next job done faster. This is where the challenge really kicks in. WeYe looking for you to collectively enable as much technology as possible: get components talking, create a killer library, build an innovative reference design, or invent some form of interest- ing product prototype. This basically means anything that can be shared on http:. / mbed.org and reused by the next person to inspire and build their prototypes even faster. In reality, this is less of a competition against other developers (although that is very much encouraged!) than it is a challenge against the stranglehold of complexity and obscurity that hangs around micro- controller technology. HI be at Elektor Live! in Eindhoven, The Netherlands, on November 20, 201 0. So, if you are around, please track me down and say hello, lit would be great to hear your plans, problems, and progress first hand. The most successful projects are ones where you scratch your own itch. Our itch was a full-on allergic reaction to all the barriers to pro- totyping with microcontrollers. We’ve tried to get things moving, and I hope you’ll take up the challenge to join us. So, get yourself an mbed. get involved In the design challenge, and get building the foundations for enabling the products of the future. Help us set embedded technology free! (100617) Simon Ford, co -creator of mbed, is a lifelong electronics and comput- er engineer. He works at ARM. and before starting m b ed wa s tec h n i- cal lead for the ARMv7/NEON architecture now found in most new smartphones. :p bed DESIGN CHALLENGE To enter the NXP mbed Design Challenge 2010, go to: www.circuitceflar.com/nxpmbeddesignchallenge/ 14 11-2010 elektor QUASAR el ectron ics Quasar Electronics Limited PO Box 6935, Bishops Stortford CM23 4WP> United Kingdom Tel: 01279 407799 Fax; 01279 267799 E -m a i I : sa I e s@ q u a s a re lectronics.com Web; www.quasarelectron1cs.com s.wjrcp# iVte5^rCa«t Alt prices INCLUDE 17,5% VAT. Postage $ Packing Options (Up to IKg gross weight); UK Standard 3-7 Day Delivery £4 95 UK Mainland Next Day Delivery - £1 1 .95; Europe (EU) - £10.95 Rest of World £12.95 (up toO.SKg). f Order online for reduced price UK Postage! Payment We accept all major credit/debit cards. Make cheques/PO's payable to Quasar Electronics. Please visit our online shop now for full details of over S00 kits, projects, modules and publications Discounts for bulk quantities. Ho! Ho! Ho! Christmas 2010 is on it's way but — sSTSu t — ijs — rr'f — , , We have some fantastic gift ideas for young (and old) enquiring minds ^ # tv 'k ♦ ♦ Electronic Project Labs An electronics course in a box! Alf assume no previous knowledge and require NO solder. See website for full details 30 in ONE -El 9.95 Order Code EPL030KT 130 in ONE - £49.95 Order Code EPL130KT 300 in ONE - £89.95 Order Code EPL300KT 500 in ONE -£199.95 Order Code EPL5Q0KT Robot Sensor -£21.95 Order Code EPLR20KT Digital Recording Laboratory - £34.95 Order Code EPLDRKT Solderless Electronic Project Kits AM/ FM Radio Kit- £11.95 Order Code ERKAFKT Shortwave Kit *£11.95 Order Code ERKSWKT Crystal Radio Kit - £8.95 Order Code ERKCKT Electronic Bell -£8.95 Order Code EAKE0KT Room Alarm -£4.95 Order Code EAKRAKT Electronic Motor - £8.95 Order Code EAKEMKT Generator - £8.95 Order Code EAKEGKT Hand Held Metal Detector - £9.95 Order Code ELMDX7 Metal Detector - £9.95 Order Code ELMDKT Robot & Con- struction Kits Future engineers can learn about the opera- tion of electronics, robotics and transmis- sions systems. Trainmech — £13,95 Order Code C21-606KT QUASAR - !■ m- | Peppy - £23.95 Order Code MR969E Line Tracker - £49.95 Order Code 4021 KT Air Shooter - £39.95 Order Code 4025KT Running Microbug - £12.95 Order Code MK127KT Tyrannomech -£12*95 Order Code C21-601KT Festive Electronic Project Kits Musical LED Jingle Bells -£17.95 Order Code1176KT Flashing LED Christ- mas Tree - £7.95 Order Code MK1Q0KT See our website for even more great gift ideas! Secure Online Ordering Facilities • Full Product Listing, Descriptions & Photos • Kit Documentation & Software Downloads CAS DETECTION What’s That in the Air? By Rolf Blijleven (The Netherlands) Detection and analysis of gasses is a requirement for numerous branches of industry and science, from petrochemical to medical instrumentation. In this article we discuss the theory and methods of real-time gas measurements of two important groups: oxygen and hydrocarbon compounds. All real-time gas analysers measure partial pressure. The reading you take from a barometer is actually nothing more than the weight of the molecules in the air around us. Dry air consists of 78.02% nitro- gen (l\l 2 ). 20.94% oxygen (G 2 ), 0.04% carbon-dioxide (CO?) and a small amount of noble gasses and water vapour. All together these gasses at sea level add up to a pressure of 760 mm Hg = 1 01 .3 l 2PbO + 2hbO + 46- cathode 0 2 + 2H 2 0 + 4e- -> 4QH- The total reaction in both cases is: 2Pb + 0 2 -> 2Pb0 2 . The oxidis- ing reaction consumes the anode material, so this type of cell will not last forever. If the sensor is continually exposed to high oxygen concentrations then its life expectancy will be shortened. There is a lot of choice in oxygen cells. The life expectancy of most cells is around one and a half to two years, but, for example, the KS-50 from the Japanese JS Yuasa Id has an extremely Jong life expectancy of 1 0 years at 2 1 % 0 2 and 20* C. The response time is quite slow at 60 s, response times of 6 to 1 0 s are more usual E 2 L Teledyne calls its A-l , for industrial applications, with less than 4 s, ultra fast P), but for medical application Teledyne can also supply the UFO-1 30-2 (Figure 4), which at 1 30 ms is another 30 (!) times faster. A measuring range of 0 to 1 00% 0 2 Is typical, but a smaller range, from 0 to 30% is also common. = electrons ? 00535-0 Figure 3. functional schematic of an electrochemical oxygen cell. elektor 11-3010 V GAS DETECTION Figure 4. The UFO-1 30-2 oxygen sensor from Tefedyne has a very short response time of 1 30 ms (photo: Teledyne), 100525 -U Figure 5. A CCh molecule. Hydrocarbons and family: non-dispersed infrared Gas molecules consist of atoms. Figure 5 shows a carbon-dioxide atom (t0 2 ), but such a picture also applies to carbon-monoxide (CQ), nitrogen-dioxide (l\J0 2 ) T nitrogen-monoxide (NO), ozone (0 3 ), methane (CH 4 ), sulphur-dioxide (S0 2 ), etc. The bond between atoms has one or more resonant Frequencies which are a character- istic of a particular molecule and so for the gas of interest, infrared (IR) is a generic term for radiation with a wavelength of 0.75pm near the visible red light u p to about 1 000 pm for fa r i nf ra - red (FIR). Heat radiation or thermal IR has a wavelength of about 3 tot 1 5 pm. When a gas is radiated with infra red energy in that spectrum, then gas molecules will absorb energy at their characteristic resonant frequencies. At the other end of the gas we detect the remaining [R-energy. From the frequencies that are no longer present, follows which gas has been detected. I he generation of radiation with a frequency range of 3 tot 1 5 pm is possible using bundled infrared light which passes through a prism, so that the radiation is dispersed into a range of wavelengths. This is called dispersed infrared, but is not very common in practice. Non- dispersed infrared (NDIR) is by far the most common method of ]R- detection* the principle of which is illustrated in Figure 6. At the far left is the IR-source. This tan be a simple 3R-LED. an incan- descent lamp that gives off a little heat, or a special IR-source l 4 L This light passes though the gas in the sample cell, at the other end of which is the detector. Filter B, usually made from coloured glass, forms a band-pass filter, the centre frequency if which Is equal to that of the gas to be detected. This filter can also be placed in front of the IR-source, in the position of filter A. The gas sample normally also contains other gasses which also absorb a small amount of IR, but we do not want to detect those. The absorption spectra of CO and CO : are right next to each other (Figure 7). Say we want to measure CO, but the gas sample also contains C0 2 and the combination of detector and band-pass filter is not selective enough. A solution is to place a block of 1 00% C0 2 after the IR-source, in the position of filter A. This acts as a steep band-stop filter: all IR-energy that the CO- can absorb is completely absorbed before the radiation enters the sample cell; how much CQ 2 that contains is now no longer relevant. In this way the detec- tor contains a signal related only to CO. IN OUT 1M53.5-T5 All gas analysers have unavoidable problems with fluctuation of the zero point (zero drift). In addition, the signal from the gas is buried deep in noise — not unexpected if you want to measure 0.3% gas. The most popular solution for this is shown in Figure 3. The chopper is a rotating disk with a hole in it. An IR-beam passes through this hole onto the concave min or on the left, and in turn through the sample- cell followed by the reference cell By subtracting one signal from the other tt ts possible to automatically compensate for zero drift and eliminate the noise. Furthermore, the IR radiation takes a longer path, which results in greater absorption and improves the signal. Figure 6, The principle of infrared gas detection (see text). Because of all the mechanical parts such an analyser is quite size- able, count on a box of about 20x1 0x1 0 cm. Thanks to mathemati- cs n-2010 elektor GAS DETECTION Figure 8. Infrared analyser with chopper motor, reference cell and concave mirrors (source: [8]) Figure 7, The absorption spectra of CO and C0 2 are right next to each other. cal noise reduction and fast Fourier analysis (FFT, Fast Fourier Trans- form) the chopper and reference cell can be omitted. Miniature ver- sions of the design of Figure Bare now possible, such as theZG-01 and ZG02 IR modules from ZyAura f?l (Figure 9), which we used in our C0 2 monitor in the May 2010 edition of Elektor. The Japa- nese Shinyei uses the principle of IR detection in integrated detec- tors for dust particles and pollen [5], fully integrated with sample- pump and measuring cell on a board measuring about 6 by 5 cm (see Figure ID). And those are not the only ones. ICx Technologies came in 2006 with the SensorChip-C02 (Figure 11). an integrated MEMS chip (Micro Electro -Mechanical System). This sensor measures 0.45 cm square, has a response time of less than one second, uses only 70 mW and detects C0 2 from 0 to 1 00% with a resolution of better than ±50 ppm f 6 L Detection of gasses is a subject on its own with many specialisa- tions. In this article we showed a few of the common techniques. As a matter of course this also involves a lot of pneumatics and mechanics. We hope you have enjoyed this overview crossing the borders off the purely electronics domain, (100535-1) Figure 9. The ZG-Q2 IR-module from ZyAura (photo: ZyAura) Figure 10. This detector from Shinyei uses IR light for the detection of dust particles and pollen. Sources and Internet links 1 . www.gs-yuasa.com/gyid/us/products/ke_series/index.html 2. www.aiil.com/Rep_02_sensor5ditm 3. www,te3edyne-aLcom/mdustrialsemors,asp 4. http://photonicsjcxt.coin/index.php7page-pulsEr 5 . www. s h i nye i . co p f S TC /optical/ dusl_e.html 6. http://photonicsdcxt.corn/upload5/files/Datasheets/ 5ensorChipC02-ds.pdf 7 . www. zy a u ra . co m / p rod u c ts / ZG % 2 0 m od u I e. asp 8 . www J n t J se n s o r. co m / p d f / i n f ra red. pdf 9. http://intlsensor.com/pdf/electrochemicaj.pdf Figure 1 1 . The SensorChip-C02 is a MEMS chip for measuring C0 2 (photo: ICX Technologies). elektor 11-2010 19 TEST & MEASUREMENT Micro Fuel Cell Measures Oxygen Concentration By Helge Weber (Germany) Oxygen makes up about 21 % 9 of the air in the atmosphere. Normally we take this for granted but for some, oxygen m 1 concentration can be a matter of life and death. For a diver it — is essential to know the oxygen A iarm RES (*> concentration in the breathing KAL A gas in his cylinder, and a cave explorer needs to know the oxygen level in the ambient air he is breathing. This article describes an oxygen concentration sensor and how to process its output. m We have previously described carbon diox- ide sensors based on chemical HI and opti- cal 1 2] principles in Eiektor, and an oxygen sensor complements these designs nicely. The meter described here is based around a Minimodi 8 microcontroller board H] Fea- turing an ATmega328 microcontroller and a two-line backlit LCD panel. Background Hypoxia (inadequate oxygen supply to the body) can lead to life-threatening situa- tions s in particular for divers and cavers. Symptoms range from a general reduction of awareness through uncontrolled move- ments to complete loss of consciousness, in such cases medical treatment involves pro- viding emergency respiration, ideally with 1 00 % oxygen. Oxygen concentration meters are useful in recreational diving. On many dives these days a breathing gas is used with a higher concentration of oxygen than that found in atmospheric air. These + nitrox‘ HI mixtures usually have an oxygen level of between 22 % and 40 %. A further application is in so-called ‘rebreathers’ used by divers. It is vital for divers to know the concen- tration of oxygen in the gas they are to breathe. If the concentration is more than 1 % away from the correct value the gas should not be used: the discrepancy must be checked and the dive planned afresh. The oxygen meter described here wifi give a sufficiently accurate indication of the oxygen concentration of the gas in scuba breathing equipment, A second use for the oxygen concentration meter is in caving, for example to moni- tor the oxygen concentration in the air in a cave. European standard EN5G104 for ‘Electrical apparatus for the detection and measurement of oxygen 1 applies in this case. Oxygen meters used for professional purposes must behave according to the specifications in this standard and be tested against it. Hazards when caving include dangerously high levels of gases such as CO, C0 2 , CH 4 and H 2 S as well as reduced levels of oxygen. The oxygen meter can thus be a useful addition to gas detector tubes and other monitoring devices. Principle of operation Oxygen can be detected relatively straight- forwardly using an electrochemical sensor l 5 M, also known as a micro fuel cell. The method was first used (and patented) In 1 964 for medical applications by the Amer- ican company Teledyne Analytical Instru- ments as a sensor in artificial respiration systems. The internals of the sensor (Figure 1) are based around a Teflon membrane with a gold cathode and a lead anode. Oxygen gas molecules diffuse through the Teflon mem- brane and are electrochemically reduced Readers Circuits contain contributions from Elektor readers for experimental purposes and further development by others. The circuits) presented on these pages have not been tested for reproducibility or actual use in the Elektorlabs. 20 ii- 20 io elektor TEST & MEASUREMENT at the gold cathode. The electrons for this reduction are provided by oxidation of the lead cathode, resulting in a flow of anions and cations between the electrodes. This ion flow corresponds to a current which will increase in magnitude as more oxy- gen molecules diffuse. The current flow is turned into a voltage using a resistor, and the output of the sensor is in the region of a few millivolts , The tra nsfer cha ra cteristics of the sensor change with age (Figure 2). In normal atmospheric air the output voltage of the sensor in lies somewhere between 7 mV and 1 3 mV, rising linearly with increased oxygen concentration. The lifetime of a micro fuel cell sensor of this type varies from manufacturer to manufacturer and depending on the environment in which it is used, and is typically two or three years. The meter circuit The first task i s to convert the output of the sensor into a level suitable for input to the A/D converter in the microcontroller. Alter- natively, if the sensor is to be used without the microcontroller circuit, the output of the front-end can be connected directly to a milJivoltmeter capable of displaying volt- ages from 0 mV to 1 99,9 mV. The conver- sion is done using an operational amplifier connected in a non-inverting configuration. Figure 3 shows the complete cir- cuit of the front-end stage built around an OP9Q PI, with the out- put taken to the A/D con- verter input of the micro- controller or to the millivoltmeter as appropriate. The gain d of the amplifier is set by feedback resistors R1 and R2 and is given by the for- mula A=1+(R2/R1 ). The values given in the circuit diagram result in a gain of 16. Offset compensation of the opamp in Fig- ure 3 is done by R3 and R4. if the output of the opamp is being used to drive a mil- livoltmeter for display purposes it is worth connecting a trimmer to pins 1 and 5 and adjusting it to cancel the offset voltage of the opamp. Furthermore, a second trimmer potentiometer can be added in series with resistor R2, to allow the output voltage to be set to exactly 20.9 mV in atmospheric air so that the concentration can be read directly from the meter's display. Construction The Mmimod I8 is at the heart of the meter unit. The module includes everything needed for rapid and trouble-free system Bild 1, Sensor with adapterfor connecting to a diver's breathing kit. construction and integration. The oxygen sensor itself is built into the enclosure (see Figures). The front-end circuit of Figure 4 can be assembled on a piece of prototyping board. All the required connections are to K1 on the Minimodi 8 board: pin 1 AREF reference voltage connection pin 2 +5 V power supply pin 3 ADCG sensor signal pin 9 CND power supply Oxygen sensor response +- aged * average new +5V tf it > O EJ a 5 Figure 2. Typical characteristic curve of an oxygen sensor. Figure 3, Front-end amplifier circuit to interface the oxygen sensor to an A/D converter. elektor 11-2010 21 TEST & MEASUREMENT +5V Figure 4, If a millivoltmeter is to be used as a display readout, two calibration potentiometers should be added to the amplifier circuit. A suitable voltage reference is the LM336- 2.5V from National Semiconductor l a l The amplified sensor signal must of course be calibrated against the reference voltage. The other pins can be used for further expansion. For example, pin 4 (ADC7) could be used to connect another sensor; other inputs could be used to add buttons and so on. Software Software for the Min imodl 8 can easily be written using, for example, BASCOM AVR orCodeVisionAVR, In this case, the author developed software for the prototype using BASCOM. Figure 6 gives an overview of the program as a flowchart; source and hex files for the project are available for download from the Eiektor web pages for this article l 9 T Two versions of the code are available: the first is intended for use as a breathing gas (nitrox) analyser; the second is designed for monitoring ambient oxygen levels in air. The unit can be calibrated using either a one-point method or a two-point method. In the one-point method we assume that the sensor plus front-end circuit have a lin- ear characteristic that passes through the ( Stan ) ~r measure voltage of ambient air in mV calibrate switch T calibrate xx mV = 20,9 % measure and report oxygen vol. % 5 ( display \ value J 100476-14 Figure 5. View of the prototype. Figure 6. The flowchart illustrates the simple structure of the program. 22 11-2010 eiektor TEST & MEASUREMENT About the author Helge Weber is a power electronics engineer and works as a site manager specialising in metallurgy. In his free time he is a rescue diver and diving teacher with the German Life Saving Association. origin, and so we only need to calibrate the meter to one other point, for example the 20.9 % concentration of oxygen in ordinary atmospheric air. However, the circuit might exhibit an over- all offset, with the straight-line transfer function not passing exactly through the origin. In such cases a two -point calibra- tion gives better accuracy. A reference gas sample, ideally pure oxygen, is needed. The first calibration point is the reading in atmospheric air (concentration 20.9 %, as stated above), and the second point is the reading in the reference gas, with known oxygen concentration. It should be noted that even this process is not perfectly accu- rate, as the oxygen concentration in atmos- pheric air is not exactly 20.9 % since the partial pressure of oxygen varies with bar- ometric pressure, humidity and tempera- ture, Inaccuracy due to these effects can however be neglected in the two applica- tions we are considering here. The unit in practice A suitable gas sampling device is needed to use the unit to measure the oxygen content of breathing gases. One option is the ‘Quick OxMioi, When using the unit to monitor ambient air it is a good idea to add warning indicators using LEDs and a buzzer. The author fitted three LEDs to his prototype. A green LED lights when the ambient oxygen concentra- tion is dose to the normal level of 20.9 %, if the concentration falls below 1 9 % a red LED lights, and if the concentration further falls to beiow 1 7 % the buzzer also sounds, A blue LED lights to indicate a concentration of above 22 %, which is useful when check- ing for leaks when refilling or mixing with oxygen. The source code can be freely modified to implement further functions. As we have seen, the hardware required to make an oxygen meter is minimal; just the sensor, an o pam p and either a mi II ivoltmeter, or fo r more sophisticated applications, the Mini- modi 8 and a voltage reference. (100476) References and links [1 1 Pektor January 2008: http://www.elektor.com/070802 [2 1 ElektorMay 2010: http://www.el ektor.com/ 100020 [3 1 Elektor January 2010: htLp://www.elektor.com/090773 [4 j http://en.wikipedia.org/wiki/NHrox |5| www.teledyne-ai.com/oern/diving.asp (Teledyne oxygen sensors) |6| www.aii 1 .com /Rep J22„se nsors.htm (Analytic Industries oxygen sensors) m www.analog.com/static/importedriiles/data_sheets/OP90.pdf (opamp datasheet) IS) www. national. co m/ds/LM/LM 1 36-2. 5. pdf (voltage reference datasheet) [91 www.elektor.com, 400476 (pages tor this article, including downloads) [ 1 0J www.vandagraph.co. uk/?page^catagory&cat“ r 294&subcat=2&6 (Quick Ox gas sampling adaptor) Prototype & small series PCB specialists CUITS PCB proto STANDARD pool TECH pool IMS pool On demand dedicated widest choice 1 - 10Q pm techno! metal-backed P' all options up to ice ALL SERVICES - Instant online pricing - Instant online ordering - Low pooling prices - Deliveries from 2 days - No tooling charges - Stencil service Call us: 020 8816 7005 Email; euro@eurodrcuits.com New website - new services www.eurocircuits.com elektor rt-2010 23 By Douglas Self (UK) and Ton Ciesberts (Elektor Labs) i " ,ver amplifi J 11 igh- ena auc 1 1 o non nr i a H r ri i i ' w 1 v 1 p rr i j n p n t SDvCITrC alions i n 1* i** i-ft * tort ic I ■ § nance. 1 fhere are also c n < :i 1 lo ones fc ir you. 1 j 1 1 uu j opera 1 1 i cj h p i r nt itn hm i o t? r ci t i ^ if If you thought that paralleling 3 few dozen IME55 3 2 opamps i s a cun ous way of des i g n- ing a high-end audio amplifier and typical of Elektor's off-the-beaten track approach to electronics you are probably right. Last month's design considerations did not fail to trigger responses from you, our reader- ship, in particular from all and sundry aspir- ing or even claiming to be a high-end audio designer. This month we get real by building the 5532 OpAmplifier project and putting it through its paces. Construction — amp board The amplifier proper is buift on a double- sided through plated circuit board of which the component overlay is shown in Fig- ure 1 . Two of these boa rds a re requ ired for a stereo amplifier. Boards supplied by Elektor come with through plating, a solder mask and holes predrilled. As such they are the best guarantee for success in replicating the project. While on the subject of quality, you are looking at an expensive, high-end ampli- fier If you use mishmash components and ditto assembly methods and tools, you'll get mishmash results. More on selecting the best NE5532 brand to use m the inset. Construction on the 205 x 84 rnm board should not present problems as only stand- ard through-hole parts are used. A properly functioning amp can be expected if you work with care and precision, like Ton Cies- berts of Elektor Audio Labs who designed, built and tested all the boards pictured. Some notes and caveats deserve mention- ing, however Most resistors are mounted vertically. Use a uniform method of bending the long ter- minal twice to obtain right angles. Semicir- cles indicate where the resistors sit on the board. Where rectangles are printed, the resistor is mounted flat on the board. Although it's possible to solder all opamps directly on the board, you do so at a risk (see part 1 ), hence the prototype was built using turned-pin S-way OIL sockets for all opamps. It is essential to use premium qual- ity sockets here — don't be tempted to use cheap ones with dodgy spring contacts; it is false economy. The tallest components on the board are capacitors C2, coil L] , relay RE1 and the screw terminal blocks for the loudspeaker and supply connections. The coil consists of 10 turns of 1 mm diameter (AWC1S) enamelled copper wire (ECW) with an inter- nal diameter of 20 mm. The coil windings should be spread evenly to obtain an over- all length to suit the footprint on the board. Fit the coil first, then R106 at a height of 5-10 mm above the board surface and not touching LI anywhere. Although printed on the silk screen PCS overlay, capacitors C24, C25, C26 and C27 are not fitted. Instead, a single 1,000 liF, 63 V electrolytic capacitor is used, its ter- minals being inserted directly into terminal blocks K1 6/K1 7 (observe the polarity and provide the leads with sleeving for insula- tion}, This should be a high quality electro- lytic capacitorwith low ESR. The modifica- tion proved necessary to get rid of unex- pected distortion levels occurring at about 20 kHz in the initial design and was found to totally cure the problem. The amplifier specifications printed last month apply to the capacitor-modified version only. The four corners of the amplifier board have holes for PCS standoffs — we used 10 mm tall ones. The finished amplifier board should be given a thorough visual inspection before taking into use. Did you get all the polarised com- ponents' orientations right? Are all solder joints beyond reproach? It often helps to have a friend look at the board. Figure 1 once again show s the amp board for your reference, See how close you can get to this level of sophistication in building high-end audio circuitry. Construction — P5U board This is also a classic board with nothing but standard components, hence should be easy to assemble and get working. It's just the heatsinking of the voltage regulators that requires some mechanical work. The two bridge rectifiers EH and B2 should be fitted with 2 mm thick 70 x 35 mm alu- minium plates bolted directly to the flat sides. The two voltage regulators IC1 and IC2 are secured to a single black, finned, extruded aluminium heatsink of which the mounting outline Is shown on the compo- nent overlay. The heatsink is secured to the board with three M4 screws or bolts, for which holes need to be drilled and tapped in the underside. Venting holes are pro- vided in the RGB area under the heatsink 24 n-2010 elektor mmeoommm it? Figure 1 . Perfect sound from perfect construction. Can you match it? Please note that capacitor positions C24-C27 must remain empty. Figure 2. The power supply board is conventional as far as construction and assembly is concerned* but do make sure you get the mounting of the heatsink and the voltage regulators right. An ABS suitcase as shown here is not recommended as a permanent housing for the amplifier. elektor 11-2010 25 Figure 3. OpAmplifier interwiring diagram. Note that this is for the 2x15 watts, 8-ohm version. The electrical ratings of the toroidal transformer and the fuse should match your local AC line voltage. High amps and loudspeaker connections are shown in slightly thicker lines. 26 n-2010 elektor Masterclass #1 : Extension of design for 4 ohm speakers It is an inherent property of the 5532 power amplifier that its output current 3s limited by the internal overload protection of the opamps used. This means that if more current is needed in the load, you need to put more opamps in parallel. The basic design is intended to drive 8 Ohm loudspeakers with a reasonable safety margin, but as it stands it is definitely not recommended for 4 ohm operation. To extend the 5532 amplifier for 4 ohm operation, it is necessary to double the number of 5532 sections driving the output. This is easier than it might sound because facilities are provided for adding one or more power amplifier PCBs in parallel. The connector K4 (see circuit schematic published last month) is used as an output from the main power amplifier RGB; it comes from the ‘zero-impedance’ stage IC3A, so the output is at a very low impedance (l measured 0.24 ohms at 1 kHz) but is immune to HP instability caused by cable capacitance. Any desired length of cable can be used. The output from t<4 drives an identical power amplifier PC B that has the all the output opamps in place, but the redundant input amplifier circuitry omitted. The equivalent connector K4 on this PCB is used as an in- put, and drives the output opamps in exactly the same way as on the main power amplifier PCB, The connectors K14, K1 5 are used to connect together the outputs of the two amplifier PCBs. Note that this connection is made up- stream of the output muting relay RET, to preserve full protection for the loudspeaker in case of a DC fault. White this conversion for 4 ohm operation is relatively straightfor- ward, it is essential to remember that the power supply require- ments are doubted along with the current output. You will need to consider a larger power transformer, more capable rectifiers, larger reservoir capacitors, and increased supply regulator capacity. In view of these various requirements, this 4 ohm version is mentioned here more as an option for the experimenter rather than a fully cut-and- dried design. Figure 4. The OpAmpliffier was duly 'grilled' on our AP System 2 analyser. Graph (a); THD & noise vs. output power. Graph (b): distortion vs. output power (1 kHz, BW = 22 KHz). Graph (c): FFT graph for 1 kHz, 1 watt, 8 ohms. to assist cooling. The LT1 083CP devices are secured to the heatsink with a heat con- ducting washer inserted. Two holes have to be drilled for the M3 bolts and nuts that hold the regulators firmly on the heatsink. First, determine the location of the holes for the regulators: then secure the heatsink to the board. The regulator terminals should be ‘kinked outward' slightly for thermal relief. The two LT1 083 regulators should be mounted, secured and soldered last. Figure 2 shows the P5U board in a "travel & demo" version of the amplifier. PCB stand- offs are used as with the amplifier board. The PSU can be tested (carefully) by tem- porarily connecting the secondaries of the toroidal transformer to the AC input termi- nals and checking for the correct output voltage of 1 8,0 V DC ±0.7 V on each rail. The complete amplifier The OpAmplifier should be built into in a metal case observing all relevant precau- tions in respect of electrical safety, spe- cifically with respect to earthing and the use of wiring carrying the AC grid voltage (230 V or 1 1 5 V). The size and shape of the case will depend on the number of ampli- fier boards used, as well as the associated power supply, see the insets on bridged operation and 4-ohm conversion. Allow for quite some heat developing in the amplifier case, from the heatsink as well as from the NE5532s. All those milliwatts add up! Everything ahead of the bridge rectifier AC terminals should be built, secured and wired with the high currents and voltages always in mind. If possible, do not extend the transformer wires. The amplifier inter- wiring diagram for the 8 ohm 2x15 watts elektor 11-2010 27 AUDIO i ' operation as far as current output is concerned, both amplifiers are effectively Two power amplifiers are bridged when they are driven with anti- phase signals and the load connected between their outputs; the load is not connected to ground in any way. This method of working doubles the signal voltage across the load, which in theory at least quadruples the output power. It is a convenient and inexpensive way to turn a stereo amplifier into a more powerful mono amplifier. Most conventional power amplifiers do not give anything close to power quadrupling- in reality the increase in available power will be consid- erably less, due to the power supply sagging and extra voltage losses in the two output stages, which are effectively in series, Jn most cases you will get something like three times the power rather than tour times, and it may be less. I have come across many power am- plifiers where the bridged mode only gave twice the output power, and it has to be said that in many cases the bridged mode looks like something of an afterthought. The 5532 power amplifier will give better results than that for two reasons - firstly the power supply rails are regulated, and will not droop significantly under heavy loading. Secondly, the parallel struc- ture minimises voltage losses: for example, all the 1 ohm output combining resistors are in parallel and their effective resistance is therefore very small. Bridged mode is so called because If you draw the four output tran- sistors of a conventional amplifier with the load connected between them, as in Figure A, it looks something like the four arms of a Wheatstone bridge. Amplifier Ampfifier In the drawing, the S ohm load has been divided into two 4 ohm halves, to emphasise that the voltage at their centre is zero, and so driving 4 Ohms loads to ground. The current capability required is therefore doubled, with all that that implies for increased losses in the output stages, A unity-gain inverting stage is shown generat- ing the anti-phase signal; there are other ways to do it but this is the most straightforward and it simply adds one more 5532 section to a design that already contains quite a few of them. The simple shunt- feedback unity-gain stage shown does the job very nicely, and the 5532 power amplifier incorporates a version of this circuit. The resis- tors In the inverting stage need to be kept as low in value as possible to reduce their Johnson noise contribution, but not of course made so low that the opamp distortion is increased by driving them. The capacitor Cl across the feedback resistor R2 assures HP stability - with the circuit values shown it gives a roll-off that is -3 dB at 5 MHz, so it does not in any way imbalance the audio frequency response of the two amplifiers. You sometimes see the glib statement that bridging always reduces the distortion seen across the load because the push-pull action causes cancellation of the distortion products. It is not true. Push- pull systems can cancel even-order distortion products; odd -order harmonics will not be cancelled. The 5532 power amplifier has facilities for bridging built in. The last stage in the input amplifier is the inverting stage around IC3A t which is needed to get the phase between amplifier input and output cor- rect. If we take the signal off from before this stage, then it is invert- ed with respect to the amplifier outpuL and can so be used to drive another power amplifier board in anti-phase; this PCB can be built with the input amplifier circuitry omitted, as for the 4 ohm conver- sion described above. This inverted signal is available at connector K3. The loudspeaker is connected between the two output terminals on the amplifier PCBs and the output ground terminals are not used. As explained above, driving an 8 ohm load v. ith two bridged power amplifiers means that each amplifier s effectively driving a 4 ohm load to ground, so to take full advantage of the bridging capability requires the output stages to be doubled l.o, so that there are two power amplifier PCBs in parallel driving in-phase, and two power am- plifier PCBs in parallel driving in anti-phase. This is of course quite a serious undertaking, as the number of output o pa nips has been dou- bled for bridging, and then doubled again to give adequate output current capability. The power supply capability will also need to be suitably increased. stereo version of the amplifier is shown In Figure 3. The rating of the AC power fuse should match the tine voltage in your area (115 V/60 Hz or 230 V/50 Hz). Whichever, an approved I EC style appliance socket with integral fuseholderand double-pole rocker switch must be used. We should emphasise that the 8,3-amp toroidal transformer indicated In the drawing is advised for the 2x15 watt T 8-ohm version of the OpAmplifier. A much beefier transformer is required if you decide to build a 4 -ohm or bridged version of the amplifier. As with nearly all audio power amplifiers, it‘s essential to have a good deal of spare capacity In the ‘amps department' so do not skimp on the transformer. The test result s The basic concept behind the 5532 power amplifier is to create an amplifier which has the very low distortion of the 5532 opamp. Preserving this performance when large currents are flowing to and fro on a cir- cuit board is something of a challenge and requires very careful attention to ground- ing topology, supply-rail routing, and 28 11-2010 elektor m os pr^i.L'i. r~ £ TT { 1 1 a n Amplifier board (one channel) Resistors 5%, G.25W, Farnell/MultEcomp MCF series, un- less otherwise indicated. R1,R14.R17«47n R2 = 220kQ R3 = 47kn R4.R6 = 91 OU 1 % 0.25W, Multicomp type MF25 910R R5 t R7,R10,Rll,R15,R16 = 2.2kn RS,R9,R32,R33 - 10Q R12 = 1 kQ R1 3 = 2.00kQ 1 % 0.25W, Multicomp type MF25 2K R18.R21 = 1 50kQ R19.R22 = 1 QOQ R20,R23 - 68kO R24-R31 - 8200 R34,R35 = lOMn R36 = lOOkQ R37*R38 ( R7 VR72 = 22kn R39-R70,R73R1O4 ^ IQ R105 = 10kn R106 = 10115% 3W, Tyco Electronics type R0X3SJ 1 OR Capacitors C1 t C12,C14,CI 6-C19 = lOOpF. 2.5% t 160V, polystyrene, axial (LCR Components) C2 = 2,2liF 5% 250V, polypropylene, Evox Rif a type PHE426HF7220JR06L2 C3 C4,C6,C8,C9 - 33pF = 1 pF 1 60V, axial, poly- styrene (LCR Components) C5,C7.C1 0,0 5,C20.C23,C28-C59 = 1 0OnF 10% 100V, lead pitch 7.5mm, Epcos type B32560J1 104K Cl 1,03 = 47pF 20% 35V non polarised, Mul- ticomp type NP35V476M8X1 1 .5 (Farnell # 1236671) C21 - 22nF 1 0%, 400V, lead pitch 7,5mm. Ep- cos type B32560J6223K (Farnell # 9752366) C22 = IjiF, 10%. 10V, lead pitch 7.5mm, Epcos type B32560J1 1 05l< (Farnell # 9752382) C24-C27 = not fitted, see text Inductors LI = 1.7uH; 10 turns! mm(ISAWC) ECW, diameter 20mm, effective length 20mm Semiconductors D1 ,D2 = 1N5402 D3 = 1 N4148 iC1-IC5dC7-IC38 = NE5532 (see text for notes on device selection) IC6 = OP1 77 (Analog Devices) Miscellaneous K1 ,K5-K1 2,K1 4,K1 5 - 2-pin SIL pinheader. lead pitch 0.1 inch K2,K3 t K4,K1 3 = 3-pin SIL pinheader. lead pitch 0.1 inch K16*K19,LS1 - 2-way PCB terminal block, lead pitch 5mm (PI = 3-pin SIL pinheader and jumper, lead pitch 0.1 inch RE1 - PCB mount relay, PCB t DPCO, 24VDC/ 1 1 00 Zlj 5A. 0 mron type G2R-2 24DC Phono socket, chassis mount, black, Neutrik type NYS367-0 XLR socket, chassis mount, 3-way, Pro Signal type PSCO 1588 PCB# 1001 24-1, Elektor Shop, see www. elektor.com/l 00549 decoupling arrangements. For this reason it is strongly recommended that you use the Elektor PCB design — better still, ready- made boards supplied by Elektor The completed prototype was measured using Elektor labs’ Audio Precision Sys- tem Two Cascade Plus 2722 Dual Domain test-set, and Figures 4a T 4b and 4c show the pleasing and impressive results. Fig- ure 4a shows the harmonic distortion and noise as a function of signal frequency. Measurements carried out at 1 watt (red) and 8 watts (blue) of output power within 80 kHz bandwidth. The graph in Figure 4b shows distortion as a function of output power at 1 kHz and a bandwidth of 22 kHz, From about 3 watts the amplifier actu- ally gets dose to the lower measurement threshold and noise floor of our analyserl At 1 5 watts (roughly) the amplifier veers off into dipping. The curve in Figure 4c. finally, is an FFT plot for 1 kHz t 1 watt into S ohms. The fundamental frequency is suppressed. The second harmonic is way down at -121 dB and the third harmonic slightly higher at -1 1 5 dB, At a bandwidth elektor 11-2010 29 AUDIO & VIDEO ENT LIST Power supply board Resistors 5%, 0.25W, Farnell/Multicomp MCF series, un- less otherwise indicated. R1,R5 = 1000 R2.RG = 1.30kn 1%0,25W, Multicomp MF25 1K3 R3.R7 = 39n R4,R8 = 1 ,5kn 5% 1 W, MulLicomp MCF 1 W 1K5 R9,R1 1 t RT6,R20-R22 ~ 2.2kQ R10.R12-R] 5,R19 = 47kQ R17 = 1 50kn R18 = 470kfl Capacitors Cl ,C3X24 - 47pF 20% 25V. lead pitch 2.5mm, Rubycon type 25ZLG47M6.3X7 C2.C4 = 1 OOliF 20% 25V. lead pitch 2.5mm. 1 .43A AC, Nichicon type UPM 1 1 ] 01 MED 05. CS = 1 OOnF 10% 100V, lead pitch 7.5mm, Epcos type B32560J1104K CG f C7,C9,C1 0 = 4700pF 20% 35V, lead pitch 10mm, snap in, Panasonic type FCOS1 VP- 472BA (25mm max. diameter) C 1 1 -C 1 8 = 47n F 1 0% 50V ceramic, lead pitch 5mm Cl 9,C2Q - 47nF 20%, 630VDC X2, lead pitch 15mm, Vi shay BCcomponents BFC233620473 C21 = 4.7llF2G% 63V, lead pitch 2.5mm C22.C23 = 22uF 20% 35V, non polar- ised, lead pitch 2.5mm t Multicomp N P3 5 V226M 6.3X11 Semiconductors D1-D4.D7 - 1 N4002 D5 ,D8-D 16 = 1 N41 48 D6.D17 = LED, green, 3mm T1 ,T3J4,T6 - BC337 12,15,17 = BC327 IC1 JC2 = LT1 083 {Linear Technology) B1 t B 2 = G5IB1 520 (1 5A/200V bridge rectifier) (Vishay General Semiconductor) Miscellaneous K1 ,K2,K4 - 2 -way PCS terminal block, lead pitch 5mm l<3 = 3-way PCS terminal block, lead pitch 5mm D6.D1 7, SI = 2-pin SIL pinheader, lead pitch 0.1 inch K5.K6 = 3-pin SIL pinheader, lead pitch 0. 1 inch FI ,F2 = fuse, 6. 3A antisurge (time lag), with 20x5mm PCB mount fuseholder and cover Heatsink, Fischer Elektronik type SK92/755A 1 .6 K VV. size: 100x40mm. Farnell # 4621578. Reichelt^ V733 1 G Miscellaneous, mechanical M3 screws, nuts and washers for mounting IC1 and IC2 to heatsink (see text) T0-3P thermal pad. i Bergquist type K6-104) M4x 1 0 screws for mounting heatsink to PCB PCB £ 1 001 24-2, Elektaor Shop, see www. etektor.com 100549 of 22 kHz, the total level of noise and har- monics is about 0.0005%. If the distortion is measured for the two strongest harmonics only, it is at a level of 0.0002%. Conclusion To the iion-initiated, the OpAmplifier with its case dosed may be just another high-end audio amplifier albeit with quite impressive specs relative to the investment. To the dis- cerning electronic engineer, it's a delight- ful and off-the beaten path approach to get- ting high-quality audio watts from a dead common component like the NE5532 you normally associate with nano-amperes and microvolts electronics-wise, and pennies in the financial department! The proof of the pudding is in the eating. That's why a demo version of the GpAmpti- fier was cased up in a rugged suitcase for easy transporting, packaging and demoing, At the time of writing, it’s about to leave Elektor House on a journey along several audiophiles and audio communities around the world for listening tests. Their feedback is awaited eagerly. (100549) 30 n-2010 elektor □CflE AUDIO & VIDEO Spoilt for choice — which 5532? It is an unsettling fact that not all 5532 opamps are created equal* The design Is made by a number of manufacturers, and there are definite performance differences. While the noise characteristics ap- pear to show little variation in my experience* the distortion perfor- mance does appear to vary significantly from one manufacturer to another. Although, to the best of my knowledge, all versions of the 5532 have the same internal circuitry* they are not necessarily made from the same masks, and even if they were, there would inevitably be process variations between manufacturers Since the distortion performance of the amplifier is unusually, and possibly uniquely* dependent on only one type of semiconductor* it makes sense to use the best parts you can get* In the course of the development of this project 5532s from several sources were tested* I took as wide a range of samples as l could* ranging from brand-new devices to parts over twenty years old, and it was reassuring to find that without exception* every part tested gave the good linearity w r e expect from a 5532* The information here will be of use not only in the 5532 power amplifier project, but should prove very valuable for anyone using 5532s in high-quality applications. The main sources at present are Texas Instruments, Fairchild Semi- conductor, ON Semiconductor, (was Motorola) NJR, (New japan Radio) andJRC (Japan Radio Company). It, ON Semi and Fairchild samples were compared in the Elektor labs by Ton Giesberts* The au- thor for his part did THD tests on six samples from Fairchild, ]RC, and Texas, plus one old Signetics 5532 for historical interest. The Elektor lab tests were carried out on an actual and very crucial section of the OpAm pi i tier design: the driver section! See Figure A for the circuit and figure B for the AP2 plots. As it turned out, the Texas 5532s (green line) proved to be distinctly inferior* both in the Elektor Labs and in the author’s tests. We have to admit this surprised us, as we have always thought that the Texas part was one of the best available, but the measurements say other- wise. Distortion at 20 kHz ranges from 0.001% to 0.002%. showing more variation than Fairchild and ON Semi as well as being higher in general level. The low-frequency section of the plot, below 1 0 kHz, is approaching the measurement floor, as for all the other devices, and distortion is only just visible in the noise. Compared with other maker's parts, the THD above 20 kHz is much higher— and at least 3 times greater at 30 kHz, Fortunately this should have no effect unless you have very high levels of ultrason- ic signals that could cause intermodulation. If you have, then you have bigger problems on your hands than picking the best opamp manufacturer**. The graphs show undisputed ly that the Fairchild 5532s (blue line) are top of the bill and true audio purists should select these devices even if they come at a slightly higher price as well as being awkward in terms of type code print on the device. Check with your supplier, it should be worth your while. There is effectively no distortion visible above the noise floor up to about 12 kHz, and distortion at 20 kHz is less than 0,0005%. I'] SO m 20$ 5dn Ik Ik Sk 1 □ k 2Dk elektor 11-2010 31 SPEED MEASUREMENT Sensorless Motor Speed Measurement i m iTl ri % A § § ~ i“ j^*\ 1 I ""** m V | 1 I B - B - ** i^k B 11 ^ *'■' if w %' ^ y*— \ § | / '»■ 1 ij i. c * / *f jj j! r l ? * i I ( ! ■ ' cj ? * j ( f ij j ( \ j I j \ ■-* j | | 1 j ( } l flllll w# — <# ^W* V— •' \mmr I ■ - %p-l 1 I ■ • 1 V» I I I III' I 1 III I By Ernesto Vazquez Sanchez and Jaime Gomez Gil (Spain) A characteristic property of DC motors is that they can also act as generators, due to the complementary nature of Faraday’s and Lenz’s laws of magnetic induction. Thanks to this relationship, it is possible to devise a technique that measures the speed of a DC motor by monitoring the current drawn by the motor. In this article we describe a method of this sort, which can be used in a wide variety of applications. Figure 1 * Supply current waveform of a DC motor. Figure 2. Wiring diagram of the various components. Technological progress and the automation of all sorts of tasks that were formerly performed manually has led to a dramatic increase in the use of motors in various applications. For exam- ple, the simple task of manually opening or dosing a car win- dow, formerly performed man- ually with a crank mechanism, is now performed by pressing a button, which causes a motor to raise or lower the window, DC motors of this sort (and their relatives, such as step- per motors, servo motors and brushless DC motors) are pri- marily used In situations were positioning speed and posi- tioning accuracy are the main considerations, rather than effi- ciency or power consumption. Their popularity is partly due to fact that it is easy to drive a DC motor. In many applications of DC motors, the motor speed (rpm) must be controlled by a closed-loop system, which means that it is necessary to measure how fast the motor is turning. Transducers and sensors such as tachometers, encoders and Hall-effect devices are com- monly used for this purpose. They are fitted on or near the motor shaft, preferably dose to the load. These components increase the risk of malfunc- tions, as well as the overall cost of the system. As an alternative to sensors and transducers of this sort, here we describe a method for measur- ing the motor speed that operates solely on the basis of the current drawn by the DC motor. This method is based on the electromo- tive force (EMF) generated in the motor windings. As you know. Table i* DC motor specifications. Parameter EMG 30 Rated voltage 12 V No- load current 530 mA Rated speed 3000 rpm Resistance (RJ 1 .8 £1 Back EMF constant (c) 0,0178 V/rpm 32 n-2010 elektor SPEED MEASUREMENT Figure 3. The system hardware. the EMF induced in a coil rotating in the magnetic field of a motor has a sinusoidal waveform. This signal is rectified by the commuta- tor on the rotor. After it is rectified, a small ripple voltage remains. The amplitude of this ripple voltage is proportional to the number of windings in the motor. This ripple voltage is an AC voltage whose frequency is directly proportional to the speed of the DC motor as indicated by equation (1), where/ is the frequency of the AC volt- age (this is called the ripple f requency), p is the number of pole pairs in the DC motor, k d is the number of commutator segments on the rotor, n is the speed of the motor in rpm, and r\ is the greatest com- mon denominator of 2p and k. 60 rj Figure 1 shows an example of the current measured at the terminals of a DC motor. Here you can see that the current consists of a DC component with a value of approximately 0.3 A and an AC compo- nent with a peak-to-peak amplitude of 0.1 A. System hardware Figure 2 shows the schematic diagram of our system hardware. It includes a DC motor, in this case a type EMC3Q, whose specifica- tions are listed in Table 1 . The current is sensed by a 20 mC2 sense resistor. The voltage across this resistor is measured by an inexpen- sive data acquisition card (N! USB-6008), which has a maximum sampling rate of 10 kHz. This card has four differential analogue inputs, which can be configured to have a measuring range from ±1 V to ±20 V, One of these inputs is used here to sample the motor current by means of the sense resistor. The data acquisition card is connected to a PC, which processes the sampled signal and determines the speed of the DC motor. The PC is a laptop model with an Intel TS300 CPU, 3 GB of RAM and a 320-GB hard disk. The operating system is Windows Vista, and the develop- ment environment is LabVIEW 8,5. Figure 3 shows a photo of the hardware used in the system. Measurement algorithm Now let's look at the algorithm we used to determine the motor speed. Figure 4 depicts the method in block diagram form. It con- sists of three blocks: a ripple detector, a frequency meter, and a con- Figure 4. Block diagram of the motor speed detection method. elektor 11-2010 33 SPEED MEASUREMENT Figure 5. Block diagram of the ripple detector. verter. The ripple detector ensures that all variations in the motor current waveform are detected* The frequency meter calculates the period of each waveform cycle, thereby determining the fre- quency of the AC component. Finally, the converter translates this frequency into the speed of the motor. Ripple detector This function of this block is to detect the starting point of every waveform cycle of the AC component of the motor current. Figure S shows the block diagram of the ripple detector. The signal from the sense resistor is fed to a maximum peak detector and a minimum peak detector, which determine the minimum and maximum sig- nal levels* The threshold level of the peak detectors is successively reduced at regular intervals* As a result, the detector circuit can 09019a - 16 Figure 6* Flow chart of the frequency meter. adapt quickly and dynamically to the actual minimum and maxi- mum signal levels. After detection, the average value of the minimum and maximum values (l avg ) is calculated. This value is then compared to the total current by a comparator, which operates with hysteresis to suppress the effects of small noise signals* The square-wave output signal from the comparator is fed to an edge detector. The logical output of the edge detector is 'True' if the sampled signal is high and the previously sampled signal was low. Here we should also mention that the system processes each sam- ple in turn and the processing takes place in real time. This means that when the output of the edge detector is True 1 , the crossover point of the signal has already occurred at the time when the signal was sampled. Frequency meter This block calculates the motor speed based on the signal crossover times. The flow chart is shown in Figure 6, First it checks whether a level change has occurred. If nothing has changed, no action is taken. Otherwise, when a level change has occurred, the time when the change occurred is added to the list of crossover points T k + lt where k is the number of detected crossovertimes. After this, the ripple frequency is calculated using an approximation formula (2), where N is the number of crossover points for which the average value must be calculated as indicated in equation (3), f k is the ripple frequency determined for the most recently detected crossover, f k+1 is the ripple frequency currently being calculated, and T p is the length of time over which the average value is calculated. The operation [■] determines the integer value. This method yields a noise-free motor speed measurement, and it tracks changes in the motor speed well if the value of T.. is chosen properly. Finally, the number of detected crossover points k h incremented by 1 . N = [T P fk] ( 3 ! Converter This block is responsible for deriving the DC motor speed in rpm from the ripple frequency determined by the previous block. Equa- tion (1 ) is used for this purpose. Testing and results To see whether the described method for the determining the motor speed works properly, we performed a variety of tests* First we determined the mean error and the deviation of the error with the motor running at a constant speed. Next we measured the error and the lag with the motor speed changing linearly (constant acceleration). Finally, we made step changes in the motor speed 34 11-2010 elektor SPEED MEASUREMENT Figure 7* Linear speed change with an EMG30 motor. Figure 8. Step change in motor speed with an EM G 30 motor and measured how long ft took for the new speed to be indicated. The results at various speeds are summarised in Table 2. Figure 7 shows the performance with linearly changing motor speed. The mean error in tracking the motor speed was 17.39 rpm in this situ- ation, with a deviation of 8.90 rpm. The time lag for tracking the motor speed was 0.2 s* which is negligible for many applications. The error that occurred with a step change in the motor speed can be seen in Figure 8. The time required for the indicated speed to reach the actual speed was 0,4 s. Conclusions In this article, we have described a method for determining the speed (rpm) of DC motors by observing only the motor current. Although the method described here is based on a system incorporating a computer, this does not mean that it cannot be implemented in other ways. The ripple detector could also be constructed using opamps, and the other two blocks could be implemented with an inexpensive microcontroller, or with the microcontrofler used to control the motor. Various tests were performed after the system was put together. The measured performance of the system Is good enough for use in a large number of applications. This method has several advantages: it is not necessary to fit any objects on the motor shaft, the risk of malfunctions is lower, and the cost of the total system is lower. We can therefore conclude that this method forms a good alterna- tive for measuring the speed of a DC motor under normal condi- tions. Multiplexing techniques could also be used with this method to measure the speeds of several motors, which is not possible with conventional methods. (090198-1) Table 2. Measurement errors in the measured speed Actual speed (rpm) Mean error (rpm) Deviation (rpm) 500 676.18 157.82 721 117.60 73,47 1023 1.86 7,91 1242 0.74 3.74 1516 0.23 5.0s 2015 0.19 4.86 ! 2514 0.30 3021 1.28 3502 1,96 745 4037 0,06 436 4492 0.50 731 5000 0,51 9.69 5518 1,27 11.94 About the authors Jaime Comez-Cif was born in 1971 in Aguilar de Bureba, Spain, He studied at the University of Valladolid, where he received a degree in telecommunication engineering in 2000 and was subsequently awarded a PhD degree in 2005, He has been employed there since 2001 as a lecturer in signal and communication theory and telecommunication engineering. His research areas are communication, GPS applications for agricultural use, sensodess technology for motors, artificial vision and augmented reality. Ernesto Vazquez- Sanchez was horn in 1985 in Plasencia, Spam, He studied at the University of Valladolid, where he received a degree in telecommunication engineering in 2008 and a degree in electrical engineering in 2010. He is currently working on his doctoral thesis. He has been employed in the Department of Signal and Communication Theory of the University of Valladolid since 2009, with a study con- tract as a recently graduated staff researcher. His interests and r esearch encompass communication and sensorless technology for motors elektor 11-2010 35 READER’S CIRCUITS Wireless Instrumental! on Network In this article we describe how to put together a wireless instrumentation network with the Arduino platform and MaxStream XBee modules. The network uses an EtherShield module to automatically make measurement data accessible via the Internet. It’s not difficult to construct a wireless instrumentation network with the Arduino platform. Here we use two stations to form the network (see Figure 1 ). The first station is the node, which takes readings from the sensors and sends the results to the second sta- tion, which is the gateway. The node consists of an Arduino nodule with an XBee shield module. The gateway also consists of these two modules, plus an EtherShield module for communication with the internet. The resulting measurement data can be retrieved from the Pachube website Ml, Arduino Arduino is an open-source microcontroller platform with a user- friendly development environment, based on an 8-bit Atmel AVR microcontroller. It is used primarily by hobbyists and artists to create interactive projects. The Arduino platform has a low entry threshold. You don’t need to know how to program in assembly lan- guage or write your own boot loader. The programming language you use is a lot like G, but all of the difficult tasks such as initialising the microcontroller and communication with a PC are already taken care of. The Arduino development environment is based on a pro- gram called Processing, which is used by graphic artists to create visual masterpieces. It includes a handy library with lots of routines to help you achieve useful results quickly. The Arduino module has several digital ports and analogue inputs. The analogue inputs utilise the A/D converter of the AVR microcon- troller, Some of the outputs can be driven In pulse width modulation (PWM) mode. If you add a small RC filter, the result is a nice ana- logue signal. The basic functionality can be extended with modules called shields, which can be plugged onto headers on the Arduino module. Shields are available for all sorts of applications, such as video and audio, joysticks, MP3 and so on. A program for the Arduino module is called a sketch, and it includes a setup routine and a loop routine. In the setup routine, the ports are defined as inputs or outputs and the serial port is initialised. Serial commu- nication is an important part of Arduino sketches. Most peripheral devices use this to communicate with the PC. The loop routine contains the actual program, which controls read- ing data or a signal from individual inputs, responding to the input signals, and driving the outputs. XBee XBee modules are a convenient way to add wireless communication to a design. The modules from MaxStream are an implementation of theZigBee technology developed by theZigBee Alliance, a nonprofit consortium of chip makers, technology providers, OEMs and end users. ZigBee technology is intended to facilitate the creation of inex- pensive, low-power w ire I ess sensor networks. The modules transmit data at rates up to 250 kbps over a range of 30 to 1 00 in, depending on the version (1 mWor 1 0 mW) and the ambient conditions. The modules can be used to replace a serial communication cable, but they can also be controlled through the Application Program- ming Interface (API) mode to form a more complex wireless net- work, The modules are configured using AT commands. For serial line emulation, it is i inportant that both mod u les are config u red with the same network ID and the same channel (CH). By default, the MY parameter (the 1 6-bit module address), the DL parameter and the DH parameter are set to *0\ This means that both modules can Iden- tify each other. The DL and DH parameters specify the destination address (DL = lower 1 6 bits, DH = upper 1 6 bits). They determine the reception options. These parameters may be configured in various ways. If DH is ’0" and DL is less than 'GxFFFF\ every module whose MY parameter matches the value of DL receives data from the trans- By Johan van den Brande (Belgium) (johan@vandenbrande,com) Readers Circuits contain contributions from Eiektor readers [or experimental purposes and further development by others. the crrcLf/tfs) presented o/t {best? bow nof been tested for reproducibility or actual use in the Elektorlab, 36 n-2010 elektor READER’S CIRCUITS mitting module. Jf DH is and DL is OxFFFF', every module receives the data transmitted by this module. If DH is not l Q P and DL is greater than OxFFFFL data is received only by modules whose serial number matches the destination address of the transmitting module (5H of the receiving module = DH of the transmitting module and SL of the receiving module = DL of the transmitting module). Extension shields In this project we use a ready-made shield called EtherShield, which provides Internet access capability for the Arduino module. It has an RJ45 connector and can be linked to a router ora switch by a UTP cable. A separate software library is available for the EtherShield module. It s usually possible to stack several Arduino shields on top of each other, as long as there aren't any conflicts between the inputs and outputs that are used. Although a standard XBee shield Is available for the Arduino module, it poses a problem here because it can- not be stacked with the EtherShield module. For this reason, we developed a shield that can accept an XBee module and can also be plugged on top of the EtherShield module. The design of our shield module Is reasonably straightforward (see Figure 2). We included the voltage regulator because the Pro ver- sion of the XBee module can draw up to TOO mA p which Is too much for the integrated regulator of the Arduino module. The XBee mod- ule also requires a 3.3 -V supply voltage. The XBee module communicates with the Arduino module via pins 1 (RX) and 2 (TX). The Arduino module also uses these pins for serial communication with the PC. As we want to be able to pro- gram the Arduino module with the XBee shield fitted, we inserted a pair of switches In the communication path. The Arduino module normally communicates with TTL- level signals on pins 1 and 2, so a voltage divider reduces the level of the input signal on the XBee RX pin to 3 V. Level adjustment Is not necessary in the other direction, since the Arduino sees 3.3 V as a high level. The PCS layout has been kept simple, and all of the components (except the pushbutton) are leaded types. The Eagle and PDF files of the PCS layout are included in the download file for this article PL Sensor options We use the analogue inputs of the Arduino module in this project, which means we can use simple sensors, such as an IDR to measure light intensity. Another interesting application is measuring rela- tive humidity. You can make a simple sensor for this by embedding two nails about half a centimetre apart in plaster of Paris inside a length of plastic pipe. Connect one of the nails to +5 V and the other to an analogue input pin and to ground via a 1 0-kQ resistor (see Figure 3). A lot of other quantities can be measured using the digital inputs. The number of ports can be expanded with an PC bus device, such as the Texas Instruments PCA9535. All together now As already mentioned, our system consists of two stations: the node formed by the Arduino and XBee shield modules (Fig- ure 4) and the gateway formed by the Arduino, XBee shield and Figure 1 . The instrumentation network consists of a node, a gateway and a data platform at www.pachube.tom. Figure 2. The schematic diagram of our Arduino shield Is reasonably straightforward. 09t09? - 1? Figure 3. A simple humidity sensor can be made by embedding two nails in plaster of Paris inside a length of plastic pipe. elektor n-2010 37 READER’S CIRCUITS The Internet of Thinqs In Lhe last while there's been, a lot of activity related to the Internet of Things', which means connecting everyday objects to the Internet. Sensor data platforms such as the Pachube website are a good exa tu- ple of this. On this site you can store and retrieve sensor data For pur- poses such as displaying a chart or maintaining a log. Another poten- tial application is monitoring sensor values and performing a suitable action if they exceed a defined level, such as sending an e-mail or text message. Pachube is a publicly accessible site with a simple protocol for sending data to the site. You can assign geographic coordinates to your sensors, which are then shown on a map of the world. The data can be viewed in the form of charts, and you can also grant other peo- ple access to your data. Instead of sending data directly to other par- lies, you can publish it once on the Pachube site, where other parties can subscribe to receive your data stream. After registering on the Pachube site, you have to create a feed. You should dick 'Manual update' when you configure your feed, since this allows the microcontroller to determine when to publish new data. With the other option, 1 Automatic', the Pachube site actively sends Web request commands to fetch the data. To make this possible, you would have to embed a web server in the microcontroller and config- ure your network to allow access to the microcontroller from the Inter- net, After you create your feed, you are assigned an API key. The microcontroller uses the HTTP protocol for manual updating. This is a very simple text-based protocol that supports the usual task of retrieving data (GET command), as well as sending data (PUT com- mand}, modifying data (POST command), and deleting data (DELETE command). An HTTP request consists of a header and a body, separated by a blank tine. The first header line contains the protocol version, the command EtherShreld modules (Figure 5). Plug the EtherShiekl module onto the Arduino gateway module first, and then plug the XBee shield module on top so its pins and switches are readily accessible. Set both switches in the USB position when you want to program the Arduino module t and set them to the XBee position when you want to transmit or receive data with the XBee module. If you only want to receive data from the XBee module, set the RX switch to the XBee position and the IX switch to the USB position. This allows you to display IDE debug information on the serial port con- sole of the Arduino module. It may be convenient to fit the board with headers with jumpers instead of switches so you can open the TX signal path between the Arduino and XBee modules, which is handy for debugging. XBee modules must be properly configured in order to communi- cate with each other. They are supplied with a factory default con- figuration for operation in serial line emulation mode. You can con- figure them by using the terminal emulator utility in a Windows, Mini com or Linux environment to send them Hayes AT commands, or by using the X-CTU software supplied by Max St ream DL This does not require any special hardware. Set both switches to the USB posi- tion and unplug the AYR microcontroller from the Arduino module. Now you can use the USB link to communicate with the XBee mod- ule via the PC. type (GET, POST. PUT or DELETE) and the resource, which is where the command is supposed to do its work. It may be followed by other header lines that supply various parameters to the web server, such as the type of content your client is able to process. A header line consists of a name and value. For the application described in this article, the API key belonging to the feed is placed in a header line. The header is followed by the data. The following is an example of a PUT request to Lhe Pachube website: PUT / v2 / feed s / E N I E R_FE E D J D_H E R E. cs v HTTP/ 7,1 Host: a pi, pachube, corn X-PachubeApiKey: E NTER JYO U R_PAC HUB E_A P1JCE Y_H ERE Content-Length; 1 0 Connection: close 0,100 1 .244 The HTTP protocol is easy to implement in a sketch (an HTTP-based protocol of this sort is called a REST API). It is even possible to test the adaptation of Lhe feed from the console, for example with the cur/ command: curl -request PUT -header "X-PachubeApiKey: YQUR_API J Settings at [1]). Connect the gateway to a router or switch so it can access the Figure 4. The node for reading the sensors consists of an Arduino module and an XBee shield. Internet directly. Configure the network parameters in lines 16 to 1 8 by putting the MAC of the EtherShield module in line 1 6 and its IP address in line 1 7. A MAC address identifies a specific device in an Ethernet network. You can use nearly any value you want for the MAC as long as it does not cause a conflict with other devices connected to the router or switch. Choose an unused IP address in the address space of your local area net- work and enter it in line 17. Here you must replace the dots in the IP address with commas, since the code in lines 16-18 defines a set of arrays. The IP address of the Pachube site is spec- ified in line 1 8. In more elaborate software you could use the Domain Name Service (DNS), which translates domain names mto IP addresses, but the approach used here is adequate for our purposes. I ine 20 allows you to set a debug flag that activates the LOG macro in line 23. This macro first reserves 256 bytes on the stack AFFORDABLE EXPERTISE I HE PC OSCILLOSCOPE RANGE FROM PICO TECHNOLOGY BANDWIDTH 20 MHz to 12 Gi-k SAMPLING RATES SOM 5/ s to 5 G S / s MEMORY RESOLUTION 8 to 16 bits PRICES Latest Softwai e Updates: PC & CAN bus decoding mask limit testing, advanced triggers, digital low pass filtering, rapid triggering Uektor n-2010 39 READER’S CIRCUITS Figure 5. The gateway, with an adapter board that allows the XBee shield to be used together with an EtherShield module. as a C string in the m variable. This is followed by a formatted print command (s nprintf) for this string. Like the printf {and snprintf) func- tion, this macro can receive a variable number of parameters. This is indicated to the compiler by the ellipsis (...) in the macro defini- tion* The construction ## VA ARCS expands this variable num- ber of parameters in code that calls snprintf * If you disable the debug function by commenting out line 20 , the _LOG macro is expanded to nothing (line 25). Lines 27 and 28 link in the Ethernet library. This library is necessary for using the EtherShield module. The string library (line 29) is nec- essary for snprintf and strncat, among other things. Line 30 specifies that six sensors will be read, and lines 3 1 -34 define the sensor structure. The data received from the remote sensor is transformed to this structure. Line 35 creates an EtherShield client object: the TCP client, which establishes a connection to server on port 80 at the Pachube IP address* The core of the sketch is the loop function in lines 103-112, which runs reiteratively* Lines 105 and 1 06 define a character buffer (buf) for the data read from the remote node* The data is read in by call- ing the function readRemoteSensors (line 109). After a full line has been received, it is analysed in line 1 10 . The parse function con- verts the data to the sensor structure. The pachbubePost function in line 1 1 1 sends the converted data to the Pachube site. The reodRemoteSensor function defined in lines 85-97 reads data from the serial port and places it in the buffer ( buf) until the 'new line' character is received or the buffer as full (while loop at line 90). line 9 1 checks for new data on the serial input. If new data is present, it is read in line 92 and placed in the buffer, and the buffer pointer t is shifted one position to the right. When all the data for the buffer has been read, the routine sets the current buffer loca- tion to ‘O’ and exits. The parse function in lines 67-84 uses the strtok function to analyse the data in the buf variable* It split the string each time it encounters any of the characters defined in the sep (separator) variable, which in this case are the colon (:) and comma (,) characters. The strtok function returns the next token or character each time it is called* As a result, when the for loop in lines 78-82 has completed execu- tion, the full line has been analysed and the corresponding sensor values are located in the sensor structure. The atoi function converts an ASCII number to an integer value* The connection to the Pachube site is established by the pachubePost function (line 36). It receives the sensor structure as an input parame- ter, The name is not used, but you could use it to select a different feed. Lines 42-46 convert the sensor values into comma-separated values* The format consists of the sequential number of the sensor and the value, separated by a comma. Each sensor is on a separate line. Lines 49-61 handle the actual data transfer between the gate- way and the Pachube site* Line 49 establishes a connection to the Pachube site at the TCP level. Once this connection is available, the print and println functions can send data to the Pachube site* Line 52 outputs a PUT command to Pachube, along with the feed name (FEEDJO). The data is sent as a CSV file, which is why the key has the .csv extension. The HTTP 1 . 1 protocol is used for this. Sev- eral header fines are sent as well. Line 53 sends the host header line, which indicatesthat the data is intended for the pachube.com host* This construction allows more than one domain to be hosted from a single IP address. Line 54 sends the API key. Pachube uses this unique key instead of a user name and password. Line 59 terminates the header with a blank line, after which the sensor data is sent by line 60. The data length must be the same as the value stated in the Content-Length header. After this operation, the feed has been supplied with new data and the current values and history can be retrieved from the Pachube website. Final remarks It’s easy to put together a wireless instrumentation network with MaxStream XBee modules linked to Arduino modules* Serial line emulation allows data to be sent and received relatively easily. An EtherShield module handles the connection to the Internet. Although it is possible to use more then one sensor node, you have to watch out for interference when two nodes send data at the same time. It h s therefore better to switch to API operation and configure a mesh network or star network. This requires considerably more complex software, although the hardware remains the same* (ogiog 2 -l) Internet links [ 1 ] www. pa c h u be.co m (2 1 www.elektor.com/091092 [3] www.digi.com/support/kbase/kbasLTesLiltdetLj5p7kb-125 [4] www.ardu ino.ee/en/IVain/ ArduinoXbeeShield [ 5 ] www.ladya d a, net/ ma ke/xbee/ard uino.html [ 6 ] www* f a I uci i . co m / p ro j ec ts / comm o n -xb e e-mi s ta ke s 1 7] www.adafmit.corn/index, php?main_page=productJnfo&cPaLh=29£iproducts_id=l 26 40 11-2010 elektor PORTABLE ENERGY Portable Energy Harry Baggen (Elektor Netherlands Editorial) These days we all carry a whole array of portable devices along with us. Very handy, but those mobile phones and MP3 players have to be recharged Frequently and a convenient power point is unfortunately not always at hand. Fortunately there are a multitude of alternative energy sources available, or so - manufacturers have us believe... Tug-of-war The Universal Mobile-device Charger made by Yogen uses hand power to generate elec- trical energy. The idea is ancient: You pull a rope to get something else to rotate, in this case a kind of miniature flywheel Add some electronics to regulate the voltage and a handy power cord with different adap- tor plugs, and your universal hand-powered charger is complete* It does, however, not mention anywhere how long you have to pull the cord before your phone is charged up. Available in black and transparent plas- tic — expect to pay around $50* www, y o q e n s to r e .co m /I n d ex * h tm I Gust of wind With the HYmini wind generator you can gen- erate energy while cycling or jogging* Mount the device on your upper arm, or on the han- dlebar of your bicycle or scooter Depending on the force of the wind, the built-in Li-ion bat- tery, rated at 1 200 mAh, is charged slower or faster. Afterwards this energy can then be used to charge your mobile phone or iPod. If there is no wind then you can charge the battery from a wall socket using the supplied adaptor. Available in three colours, the unit is priced at around $50, All sorts of mounting hardware is aval table separately, w ww. hy m i n i ,co m / h t ml / HYmini . html#detaiL1 Versatile radio Radios without a battery, but with a handle for generating energy by hand, have been around for years already. But the SGLARIink FR600 from Eton is a very fancy and versa- tile implementation of this concept. You can power the radio using either the han- dle, a built-in solar panel, three batteries or an AC power adaptor To store energy, the radio has a built-in NiMH battery* The digi- tal AM/FM tuner has a display with RD5 and the device can also operate as a torch. The built-in battery can also be used to charge your mobile phone or other portable equip- ment* Price is about $80* www. s h o pe to n eo rp .co m/ d e ta if/ ETO+NFR600B+BLK Mini-hydrogen power station The Hydrogen Power Station made by Horizon Fuel Cell Technologies is the first affordable mini-hydrogen power station for use at home. The hydrogen, which is generated using solar energy, is stored in small tanks, so-called Hydrosticks, which have dimensions similar to a battery. A full Hydrostick can be plugged into a small power generator which goes by the name of MiniPAK and can generate about 2.5 watts. The amount of hydrogen in the Hydrostick is sufficient to completely re- charge a depleted mobile phone battery several times* The only thing standing in the way of purchasing this handy device elektor 11-2010 41 PORTABLE ENERGY is probably the price, which is around the $750 mark. www.horizonf Lielcel Ixo-m/electro nics .h tm Sturdy dyno-torch Who does not remember them from the past? This type of torch, which required repeated squeezing to get some light, is available these days in modern, high-effi- ciency versions. The Shark Diving Torch is a waterproof torch fitted with a generator which produces energy when cranking the handle. This energy is stored in the built-in battery and can be used to power the built- in LEDs or charge your mobile phone. The torch is fitted with several standard LEDs plus a powerful 1 -watt LED, so that a con- siderable amount of light is available* The manufacturer claims that after one minute of cranking the handle, the battery will have sufficient energy to power the 1-watt LED for 20 minutes, a respectable time] Price about €35 (£30, $50). http://shop,ecogadget5xom/index. p h p?cat= E co_ To rch es_ L a n to r n s& Ac \ i nicSlD“df7232c6bab7b44952aef49d ca 6 35420 Walking is healthy! Using the nPower PEC you can charge prac- tically any mobile phone, MP3 player or any other hand-held device while you walk. The device is in the shape of a pipe with a bulge in the middle. Put it in your backpack or attach it to your belt. As a result of the repetitive motion of your body the nPower PEC prod utes sufficient electricity to quickly cha rge you r mobile phone — says the manu- facturer Tremont Electric, A normal phone battery can supposedly be charged to 80% of its nominal capacity in only one hour. The device is able to deliver no less than 4 watts. You can register your interest at the man- ufacturer's website, but the exact date it becomes available is not known. The price is around the $150 mark. www . g re en n p ow e r. co m Pumping for a full battery The companies Cotwind and Orange pre- sent an alternative method to charge the battery of your mobile phone or iPod , the Power Pump, This is a small wind generator where you generate the wind yourself using a foot pump. Handy while going camping, and thanks to its small dimensions it is unlikely not to Ht in your backpack some- where! Orange presented this device last year at the Glastonbury Festival, where vis- itors could try it for themselves. As far as we know the device is not yet available for sale, vv w w, g o t w ind.org/o ra n q e_ p o w e r_ p u m p. h t in Batteries on water Fora number of years already the Japanese manufacturer APS (Aqua Power System) has been offering AA and AAA batteries which work using water, juice, coffee or other liq- uids. When you want to use a battery you fill it with a few drops of liquid and it is immediately ready for use. You can re-fill the battery about 10 times, according to the manufacturer. The second generation of the so-called NoPoPo-batteries is now in production and D-size cells will be available soon as well. Not really energy saving, but nevertheless very alternative. Perhaps they will also be available in US and European shops in the near future, www, a ps-j.jp/cnqlish/index, b t m I 42 11-2010 elektor CaPTlAE TeiE IfT? VCtl.'l .TK irtmil ■f3 -T u . r HA > 4 ! iMKtj M SKfM TW &M**I 42 wem 41* WfijS ,Tif fuftri ■T‘ Cif»W MiiliOl ^ J isl li, j 2 ] 9 uri - |Jf ■ Tap? TDt nt>2« ■ Dial ■ Tapi toq ■ Tap? - 1 Di olffl oCWC* • Uft-TDO tt £6 in : IOC: rug i?.-e«t*rn siuiLiiioiieflonota T-TJ.P nc>iGO<)m fltoc iP C 3 C 1 O 0 Q 0 OP i 1 oflocaoi COCOC 31 QC 991 1 t-t** Ch^ii planter 111 it tut □ o, « ' 5 W* 3 ( 3001 E*!.'.’' 13Tfc»flOO?)j r 1 3 57 2* jMGTl 41^ 1 5 57 24 jDQO: ■ r.' 'VfrjfK llL^IDQMI e./C r " j fiCiLrm It Vrmia-I ritaUSifiLniVliDjKfj'iTrti JUG l h* flam jRuij I^hfluiliyl JTAG interface connector. In theory, with this arrangement a complete connectivity test of the components on the PCB can be carried out, based on the netlist of the complete circuit and the Boundary Scan Description Language (BSDL) files of the components. In practice, there are | limitations because some components do 1 not have boundary scan capability — for example, passive components and buffers. Nevertheless, the majority of the PCB can be L tested for open connections and shorts with this method. By Luc Lemmens (Elektor Labs) For most of us, the term 'JTAC* primarily means an interface for in-system programming. Few people realise that it also refers to a test method called 'boundary scan', and even then they probably couldn't say exactly what this means. As early as the 1 980s it became dear that traditional measurement methods using instruments such as multimeters and oscilloscopes would eventually become unfeasible due to the ongoing miniaturisation of electronic devices. Multilayer PCBs went mainstream, with the result that interconnects were inaccessible, p ” bourctoryHICtn oofiiiiUta JT 3705, nj 56 many and with modern components (such as BCA packages) it is often impossible to put a probe on device contacts. To deal with this problem, JTAG developed the boundary scan method. Of course, in-system programming is also important, and it can be done using the same ]TAG interface. Boundary scan requires adaptation of the 1C architecture. A boundary scan cell is added, containing a multiplexer and a latch for each pin of the device. This cell can read data from each pin or read logic levels from signals originating from the core of the device, and it can place data on the pins of the 1C* 1 he data that is read is output serially from the 1C and compared with the expected result. In practice, the boundary scan cells of several ICs are connected in series to form a scan path or scan chain* The first !C in the chain receives JTAG data directly from the interface connecter on its TDI (Data In) pin, while its IDO (Data Out) pin is connected to the TDI pin of the next 1C in the chain. Finally, the TOO pin of the last device in the chain is connected back to the To familiarise (potential) users with boundary scan technology, JTAG Technology I 1 ! offers the free program JTAG Live Buzz* The functionality of this program can also be enhanced with the Clip and Script modules, which require payment* To work with JTAG Live, you also need a JTAG pod and a PCB with a boundary scan chain, as well as the schematic diagram and the B5DL files of the components on the board. For our hands-on evaluation of JTAG Live B uzz, we were provided with two scan chains and a USB boundary scan controller with two JTAG taps* The first thing JTAG Live needs to know is the configuration of the scan chains, for mow which type of JTAG controller you have and which ICs are in the chains (and in which sequence). The ICs are characterised by their BSDL files. Once all this data is complete, the real work can begin. After everything is connected, the first thing you have to do is to select ‘Test infrastructure', which causes JTAG Live to EJMTJ 3 elektor 11-2010 43 E-LABs INSIDE check whether the scan chain is correct and works properly. Beside configuration errors, there may be a bad connection or a short in the chain, which wilt prevent the boundary scan from working. If everything is OK the message shown in Figure 1 is displayed, and you can continue with the functional testing of the rest of the hardware. The actual measurement process starts with ‘Open Buzz', The inputs and outputs of the ICs in the scan chain are listed in the column on the left in Figure 2, You can drag them one by one to the measurement panels in the window. The ‘Watch’ panel lets you observe the state of an 1C input In the example shown here, this is an input of a CPLD (pin 1 7 of D5GQ), which is driven by a switch on the demo board. The ‘Value’ field shows the current logic state of the selected input in real time. This allow you to check whether the connection between the switch and the 1C is OK. The ‘Buzz' panel lets you check a connection between two pins of ICs in the scan chain, which is comparable to conventional continuity testing with a multimeter. The ‘Measure’ panel offers tests similar to the ‘Buzz’ panel, but with the added feature that you can directly set the state of an output to 0, 1 or HiZ in the ‘Value (Drive}’ column. In this example, a 74138 (decoder/demultiplexer) is located between the outputs of D5Q00 (left column) and the inputs in the right column, and it is not included in the scan chain. This function allows the operation of this 1C to be checked, despite this Fact. The ‘Constraints 1 panel allows you to cause specific control signals on the PCB (such as Chip Select or Output Enable) to assume defined states for the tests in the ‘Measure' panel. Although all of this may not sound especially spectacular, you should bear in mind that here we are performing tests with a PC that would be difficult or impossible with a multimeter or oscilloscope, for the simple reason that the connections on the PCB are not physically accessi ble to a probe. The bou ndary scan method allows the hardware to be tested (for the most part} despite this difficulty. The Buzz program is solely intended to demonstrate the power and simplicity of boundary scan technology. With complex hardware, it would be far too cumbersome to enter and check each connection by hand, which is why you would need the resources of the more powerful JTAC Live modules Clip and Script. (100590-!) Internet Links m www.jtag.com USB port from a 9-pin Sub-D connector By Ernst Krempelsauer (Elektor Germany Editorial) The company FDTI specialise in products providing intercon- nection solutions. At first glance their latest offerings look like standard 9-way sub-D RS232 PCB mount connectors and indeed fit the hole-spacing for such a connector on a PCB. A closer look reveals a mini-B USB socket where the RS232 cable should plug in! For sure there must be a lot more in the plastic housing than just 9 bent wires. These novel converter/ conn ac- tors allow a USB port to be easily added to any PCB fitted with an RS232 connector. No layout, circuit or firmware changes are necessary. The unit on test here is the female sub-D version; a male version is also available. Elektor readers familiar with the USB to RS232 cable from FTDI will probably be thinking that the engineers have fitted the same circuit into the RS232 connector housing. The block dia- gram in Figure 1 confirms this, two iCs are shown: an FT232R converts between USB 2.0 and serial TTL data and a voltage level shifter interfaces TTL and RS232 levels. With the first sample sitting on the work bench we looked fora suitable PCB to adapt. The Elektor Internet Radio project (April 2008) looked like a good candidate; among its connectors is an RS232 de-bug port using a sub-D PCB mounted 9-way con- nector, perfect! We set to work de-soldering the sub-D and 44 11-2010 elektor then mounted the FTDI USB Sub-D male module (it fits!). Next we plugged a USB cable into the socket (needs a bit of coaxing to get it all the way home), switched on and connected to a PC. The FTOJ driver practically installs itself; you only need enter a virtual COM port number and select a baud rate. The FTDI data sheet gives more details of this procedure and the function of the device. It behaves in exactly the same way as if the USB/RS232 con- verter cable from FTDI had been plugged in to the origi- nal 9-way RS232 port on the board, A disadvantage of fit- ting the DB9-U5B-R5232 mod- ule is that if you ever need to communicate with the board via an RS232 port it would be necessary to swap the connec- tor back again. The advantage however is that the equipment now has a new lease of life and can connect to any modern PC using a standard USB cable. Speed is another advantage, the virtual COM port driver software can be configured to operate at up to 921,600 Baud. Ensure that the board can make use of the higher data rate by changing the port configuration or modifying the firmware as necessary. Natural curiosity prompted us to pop the cover of the hous- ing and check outthe internals USE Mini B CtierU Connector RS232 levet Shifter DB9 RGB Decal of this device. The complete PCB now lifts out for closer inspection. The manufactur- ing process is not quite as triv- ial as we might have expected; the nine pins of the sub-D module are soldered from one side of the board only {the component side). The pins do not extend through the PCB but instead are fitted into blind holes ('buried via*) which extend approximately 0.5 mm into the PCB. Our Lab manager Antoine Authier removed one pin with a sol- dering iron and has sketched the approximate dimensions. The more-complex manu- facturing process is reflected in the price of the unit which works out a little bit more expensive than the cheap- est USB/RS232 converter cable from FTDI. I cant imag- ine a quicker or more simple method {excluding the use of an USB/RS232 cable) of pro- viding an older piece of kit with an up-to-date comms port. It can of course be used in new designs also and like all good ideas it f gk ma ke s m e won der wh y nobody thought of it before. (100104) Internet Link www. ftd rc h i p, co m / Pro d uct s/ Modules. htm elektor 11-2010 45 E-LABs INSIDE Rapid Prototyping By Jens Nickel (Elek tor Germany Editorial) There's even more to the story. The latest version of the free Virtual Breadboard (VBB) software — a simulator program from the same supplier, which has been available for some time already — also supports virtual design with the AutoFAB boards. For this purpose, virtual FlexTiles are selected from a list and plugged into a simulated Flex Router board on the com- puter. At the press of bu tton, t he software imports the compo- nents into the simulator. As usual with programs of this sort, you use the mouse to connect the component in this view, ^ after which the resulting circuit can be simulated. An especially unusual feature here is that you can program the microcontroller in Java, which is converted into exeait- - able hex code by a special ^ J J compiler Bfc Of course, it v takes a certain amount of r ' f// p time to master the Simula- ^ iV'Jr tor's learning curve. After you've drafted the schematic, there comes a step in the design process that many electronics enthusiasts and profes- sionals don't enjoy at all: putting together the bill of materials and the time-consuming process of ordering the components. This despite the fact that the day-to-day work of designers fre- quently involves the same mundane tasks, such a providing a regulated supply voltage, equipping a microcontroller board with a USB interface, or integrating a display. The aim of the AutoFAB system from the Dutch tool foundry Muvium is V to solve this problem by adding another level of abstraction y * I 1 1 The system is based on Or small PCB modules called 1 & ^ FlexTiles, which provide commonly used circuit func- tions. For example, there is a Flex- . 0 Tile module with a dual 5-V power o supply, a module with two potentiome- ters, a module with an LCD. a module with an FT232, and many more. Intelligence is provided by FlexTiles fitted with a PIC microcontroller, and an Arduino-compatible module is also available. ajr ^ ^ f If you are interested in this concept, d Jr we recommend attending a workshop / to be held during the Elektor Live! event \ • in Eindhoven, The Netherlands on Novem- , / her 20, 2010 PI. During the workshop, Muvium CEO and pri ncipal engineer James Caska will dem- onstrate how quickly prototypes can be developed using AutoFAB and the Virtual Breadboard system. Unlike similar modular systems, all f •MhPv modules in this system have the same l — width and are fitted with pins — — ... . — - — facing downward. This allows ^ the FlexTiles to be plugged into a special breadboard xr called the Flex Router board, similar to a perforated prototyping board. When a FlexTile module is plugged in, each of its contact pins is connected to a row of solder pads on the Flex Router board. The system also has a board of the same size with tracks perpendic- ular to the rows on the Flex Router board, which is secured to the latter board at the end of the process. The clever part of this scheme consists of small contact pins fitted between these two boards, which allow the contact rows for the module pins to be connected to the tracks on the rear board. For example, if the module pin is the output of a 5-V voltage regulator, a 5-V supply A brand-new development here is U^^TOSfrimi V ^ ^ a stripped-down version of the virtual breadboard concept, — env * ror,nient (Java required) end is specifically tailored to the AutoFAB system l 4 L After you have placed the FlexTiles on the virtual Flex Router board, you use the mouse to interconnect the pins in a sort of schematic view. However, this version lacks the simulation function. Once the connections have been made, both programs allow you to view the rear of the Flex Router board to see where the metal pins must be fitted. All you need to do now is to copy this on the real hardware. This means that putting together a pro- totype still requires some manual effort, which may disappoint users with poor eyesight or clumsy fingers. The ideal solution Using additional contact pins, other modules can be connected to this track to supply them with power. (for lazy users) would be a small software configurable com- ponent that inserts the pins for you, so you can enjoy a cup of coffee while it interconnects the rows and columns. (100413-1) Based on our experience with an evaluation system, the hard- ware (which is being regularly extended with additional mod- p ] www.virtualbreadboard.com ules) is well made, although working with the small metal [2] www.muvium.com pins is somewhat fiddly. Nevertheless, the result after the two pj eje^^e n j boards are screwed together is a prototype that is very robust [4] ^ vJrtua ||^ bo art. C om /d | k y/ d iky.html and compact, since it lacks the interconnect wiring of a con- ventional breadboard. 46 n-2010 elektoi “Elektor? Prescribed reading our R&D staff because that’s whe we need professional guidance for microcontroller technology.” - Frank Hawkes, 39, development engineer - Mi oqr aim nablfc ^ tJlYAHO Advantages to subscribers / rl*rtrk ,f t hTirSceptie Extension Bo.ird vy m dndil ■■■ *■* i -• . . 1 ■ - . r i i r.— p B »• I ill JiH.-l. -Bbl. . .. IB-fP -r ■ ‘ ■ ! -ir--'*. > 1*1 Hi' BI-. I- 1 1 'IPI1..1 ■i_u I .1 HmiMitl + ! “W|l ■iPi-'* ItTiTi - *'d- 1 ■ ‘ -« ■±] ir- ji *i *-+ ' * I jaJhlkl - + •■* Right-click Formsb in the So /uP’on Explorer window to display the corresponding code, which defines how the form responds to events such as button clicks. The actual image pro- cessing procedures are contained in a separate code module named PicProcedures. vb , Unfor Luna Lely, there is not enough room here to describe how to perform tasks such as placing new buttons on the form and linking them to corresponding code, but a free online tutorial on Visual Studio and Visual Basic .NET is available from Microsoft. IF you want to work more extensively with this very power ful and entirely free PC development environ- ment, it would certainly be worthwhile to buy a book on Visual Basic 2010. Several books are available at prices ranging from 30 to 50 pounds/ eur os. Before purchasing one of these books, you should check whether the learning curve demanded by the book matches your existing knowledge: the levels of the various books differ considerably. Before you tryout the software by clicking the green arrow (Debugging), you should also ensure that WlAAut.dil is installed correctly. After opening the Pics project in the Solution Explorer window, you will see a References folder. Click the V sign next to the folder icon to see a fist of the software libraries used by the program. You should see WIA in this list. If the WtA icon is marked with an X, Visual Studio cannot access the WfAAuLdi! file. All of this is somewhat pointless without a source of live imagery. Fortunately, the .MET framework facilitates access to all sorts of hardware, including webcams. For this purpose the framework comes with a collection of classes that encapsulate hard- ware accesses via the corresponding Win- dows library (,d//) files. If you want to use the classes (i.e. the corresponding com- mands, status variables and so on) in your own software, you only need to give Visual Studio a suitable reference. Unfortunately, many of these classes are not especially well documented. In the course of a Song Satur- day afternoon, the author finally discovered which , dll file is the most suitable for this pu r- pose (WlAAut.dil) and how to get a webcam to take snapshots under VB.NET so they can be used In user-developed software. A major advantage of this approach is that it does not require any manufacturer-specific drivers. Once the webcam has been recognised as a USB device, it's all systems go. After a bit of fiddling around, the author persuaded his Logitech QuickCam S5500 to start producing a continuous stream of snapshots that could be used for five image processing. However, we have to live with a couple of limitations here. Everything is very (very!) slow, probably because the images are stored in webcam memory. Further- more, this memory eventually becomes full. To clear the memory, you have to dick the webcam camera icon under *My Computer* (in Windows XP) and then dick ‘Delete pic- tures on camera’ to clear the stored images (see Figure 6), After the memory was cleared, the author’s webcam achieved a dizzying speed of one frame per second, which would certainly leave something to be desired for security-critical applications. However, all we were interested in at this point was trying a few things out, ... and! go live If we compare each webcam image with its previous image, it’s possible to detect motion ’continuously’. However, even with the low resolution of the webcam snapshots it would take fartoo much time to first cal- culate the greyscale values of both images and then compare them pixel by pixel, ana- 50 11-2010 elektor AUDIO & VIDEO Figure 6, The image memory of the webcam should be cleared from time to time. Figure 7 . The development environment Figure 8. The demo software forms a good for Visual Basic 2010 can be downloaded basis for DIY projects, free of charge. Even beginners can quickly achieve useful results. lyse the differential image again, and so on. A significant Increase in speed can be achieved by storing the greyscale represen- tation of each image in a sort of buffer, so that it is available for comparison with the next image. As we do not display the actual greyscale images, we can also omit the divi- sion by 3 and simply sum the red, green and blue components. The MotfonP/cfure function in the example software contains all the code for motion detection. It outputs a bitmap image show- ing a combination of the original image and the supplementary motion data melded with the image. This function expects the following inputs: the original image picNew , the parameter intiimit, and the Boolean variable hooiDrowDtf {Points t which speci- fies whether the detected pixels are to be coloured green. The 'relevance' of the r LEDsI Elektor Special Protect , ec ial Pr°i eCt This special edition offers not only theoretical information but also shows how and where LEDs are applied nowadays. Additionally, this edition contains some tested electronic circuits for DIY, Theory and applications: * Control electronics and heat management for LED lighting * LE D p roj ecto r tec h n o I o gy * Voltage converter with consta nt-current output for Power LEDs - LED power and control unit on a single chip DIY projects: * Ambilight with Bluetooth * Budget LED dimmer * Computerised LED Christmas light * Programmable LED lamp And much more! ^jelcor lOtJ pages * £ 9.90 Elektor Regus Brentford 1000 Great West Road Brentford TWS9HH United Kingdom Tel. +44 208261 4509 J Further information and ordering at www.ele elektor 11-2010 5 ^ Installing WlAAut. AUDIO & VIDEO WIAAut.dll is not included in all Windows installations. If the WiAAut.dll file is missing in the C: \ WINDOWS 1 system 32 folder it must be downloaded from the Web HI. After extract- ing the .dll file from the downloaded Zip file (MAAut.sdk). drag it to the above-mentioned folder (which also holds the other dll files). Next you must register the new library with the operating system, fo do this, open the small Windows command line window by clicking Run... in the Start menu (with Windows XP). Enter the command regsvr32 wiaaut .dll in the window and click OK. After this you must re-configure the corresponding reference in Visual Studio. You can view all the references in the Solution Explorer window after you open the Pics project (see the Installing Visual Studio 1 inset). If WiA is marked with an X, you must first delete the reference (by right-clicking WIA) and then create an new reference. To do this, right-click References and d ick Add Refer- ence in the pop-up menu* In the window that this opens up. select the COM tab and then select Microsoft Windows Image Acquisition Library v2.0 in the long list. A valid reference should then appear in the Solution Explorer window. Ht-taVl ..wwi ,-*f tO wM-m ; rro Lit . 11 ■ IquF, i & M^TiF Ud ilH .. . ttwrt «*i : .(■ f . E .* **:• :w*! Wrt 1 1 I Itart »H, vi * M **f '■«- .*4 fO SoWCtH. 44 4 0 IM Tie " >0 SO : « ■ . .HK * t : >i Lli .ip -4rt. rUyF ■ : ' Ktt.Pr'- 4 j ■ I 'AM-I FtTijr.-tfFFj.’,-^. I n d _;*sra |.-0 t| Him 4 Bmy r Jt '$***-. -FI ‘-■j ■ ■ 5 h*Js.» .-ri-t- - tnt motion is returned to the calling routine in the intMotion parameter. The value of this parameter corresponds to the square root of the number of detected pixels. Motion- Picture also loads the image into a greyscale buffer for the subsequent image compari- son. This buffer is empty when the function is first called, so It must be initialised with the data of the first image before the first image comparison (this is handled by the subroutine InitGreyBuffer), Demo program The author has written a small sample pro- gram to demonstrate everything described in this article. Although the user interface isn't likely to win any design prizes, it is fully adequate for initial experiments. This software is solely intended to form a starting point for developing your own applications. Users can also change the val- ues of constants in the source code (see the code for this). For this reason, the author has not generated an .exe file: the software must always be run inside the development environment. The installation process for Visual Basic Studio 2010 is describe in an inset, while linking in the webcam library is described in another inset. After you open the example project in Vis- ual Studio (see Figure 7), click the green arrow on the toolbar to run the program. The main form (Figure 8) appears after you select the webcam. After you dick Start , the webcam starts taking snapshots. The cur- rent and previous images are shown at the top left, and the result of the motion detec- tion process is shown at the top right. The left slider adjusts the value of intiimK while the right slider sets the value of intMotion, which is the threshold level for triggering an alarm (see above). When this happens, the corresponding image is shown below the slider and saved as a file. The X buttons are provided to delete the displayed ‘false alarm" images. False alarms occur regularly when the auto- matic brightness control of the webcam causes the entire image to become brighter or darker. To partially filter out this effect, the MotionP/cturefunction includes an algo- rithm that detects global intensity changes. In addition, you should always avoid allow- ing too much daylight to enter the room under observation, since outdoor lighting conditions are almost always constantly changing. If you play with this program for a while, you will quickly discover a significant short- coming of the motion detection scheme described here: it only works with dark objects moving in front of a Sight back- ground. and furthermore, in case of objects with different colours the system primary detects the motion of their dark-coloured portions (see Figure 3). This is a conse- quence of the fact that we discard negative changes in the greyscale values, as previ- ously mentioned. If you wish, you can try using the magnitude of the greyscale dif- ference instead of the signed value. With the latter approach, both bright and dark objects will be detected. However, if the moving object is already visible in the first image, it will appear twice in the output image: once in its original location, and again in its new location. This is because the greyscale values of the pixels change at both locations. The described experimental scheme is reasonably well suited to checking for the presence of an object, or for similar non- critical monitoring tasks. If you wish to use this motion detection scheme in a security context, increasing the frame rate is essen- tial, It should be at least 5 frames per sec- ond (1 0 would be better) for use in practi- cal situations, so that fast motions can also be detected reliably. Unfortunately, due to lack of time the author was not able to try out other image sources, such as a TV card or the like. We would certainly appreciate reader feedback in this regard. (1G0539-I) Internet Links [ 1 ] www.elektor.com/090334 [ 2 ] WWW, e I e k t or. com / 1 0 Q 5 3 9 [3] www. m i c rosof l . co m / express/ Downloads/ |4] www. m i c nos of t . co rn / d own I o ad s / d e ta i I s. aspx?familyid=a332a77a-01 b8-4de6- 91c2-b7ea32537e29&dlsplaylang zi en 52 n -2010 elektor The Definitive UK Event for Electronic Design Innovation and > 0 U CD > 1 tJI Q) ^ T3 .a “O E , CL if] CL L_ => U Lf) CD c o c CD CD o £= s— CD CL CD lO C tf) ° *E in h CD ° 5 o O N- CD — J -i— ' o £Z CO O e CD £ 8 ^ o P ro ui a> CD U >> _a ID O Q_ in c >. V c u cn 0 a in CT» CD CD in Z3 u Q_ OJ in "O £ CD 4— ■ X CD L_ LL OJ LO c a o rj ° E 2 E CC o < o elektor n-2010 53 RF & RADIO Designing and Making Basic Antennas By Jean Marie Floc’h (France) The antennas presented in this article were designed for a frequency of 2.45 GHz, This frequency is within the 2,4 GHz LSM band (Industrial, Scientific, and Medical) that can be used without a licence in many countries in the world. Some simple rules explained below make it easy to design antennas for other frequencies. The prototypes were made from (adhe- sive) copper laminate to make them easier to adjust to the correct frequencies (using a craft knife). But we recommend you to make the final versions of these anten- nas on double-sided PCB laminate, so they will stand up to the weather better. Unless otherwise stated all antennas have a foot impedance of 50 ohms. /J 2 6 o A B Simple dipole M1D95-T1 The dipole is one of the simplest antenna you can make. The simple dipole comes in the form of /,/2-long metal conductor divided in two. It is fed from the centre. The currents in the two elements must be in opposite phase, so that the current js maximum at the centre of the dipole. Feeding a dipole requires the use of 0 balun (for balanced-unbalanced) device to produce currents in antiphase and in order to present it with the correct impedance. The impedance across the terminals has a value close to 13 il t and it radiates omnidirectionally, except in line with the elements, where the radiation is zero. The theoretical gain of the dipole is 2,1 5 dBL The term cJBi denotes decibels with respect to an isotropic antenna radiating uniformly in ail directions and which has absolute unity gain. Guide coaxial Coaxial dipole One trick lor avoiding the balun and the impedance transformer is to feed the dipole directly via a coaxial feeder, In practice, the physical length of the dipole is slightly shorter (a few percent) than the electrical length. 091095 - *3 One of the elements is soldered direcLly to the centre core of the coax, the other to the ground, I he length here is set at 56 mm (two 27 mm elements with a 2 mm gap) so as to obtain a resonant frequency close to 2.45 GHz. At this frequency, the half-wave length is 60 mm .It's best to start with elements that are a little bit longer (making sure that both elements stay the same length), so as to be able to then adjust them to get the resonant frequency required. Bandwidth h around 400 JVIHz, i.e, 16% of the band's centre frequency. A maximum gain of the order of 2 dBi has been measured. The red curve shows the radiation pattern in line with the dipole (referred to as the E plane, note the humps); the radiation in the plane at 90°, referred to as the H plane, (green curve) is virtually omnidirectional. 54 11-2010 efektor RF & RADIO Dual dipole with ground plane You can try to reduce the backwards radiation from the coaxial dipole by placing a metal ground plane approximately a/4 a way. To be effective, the diameter of this ground plane must be at least 0.75 L lo keep the radiation pattern symmetrical it‘s best to use a disc. Watch out, a slight shift in the resonant Frequency is often noticed, so it’s necessary to re-trim the lengths of the dipoles. II you want a crass- polarized f H/V) antenna, you can use two coaxial dipoles together. * J - 1 <■ . W Band width is around 450 MHz (1 8%). The dual resonance is due to the effect of mutual coupling between the two dipoles. It's best to terminate the unused feed with a 50 Q resistor to a vo id spurious effects* Measurements on the antenna reveal the hole in the radiation in line with the dipole (green curve) and the reduction in backwards radiation (around -1 5 dB). You can also see greater directivity in both planes, due to the presence of the second dipole in the plane pcrpendrcularto the first one. This results in a significant gain value of G dB L The same results are noted for the other feed point. Monopole If you want to reduce antenna size, one simple way is to make use of the electrical images generated by a ground plane. In this way, you obtain a monopole whose size is a/4, Le, half the size. The ground plane also reduces the backwards radiation, Themonopole shown here is fed via a micro striplinc (1,5 mm wide) produced on FR-4 PCB laminate. The mo no pole's 30 mm long element Is soldered directly to the line. This is a very simple technique for producing antennas directly on PCBs. You get a bandwidth of around 450 MHz {18%), A hole is seen in the radiation on the axis of the monopole, and omnidirectional radiation in I he perpendicular plane. A slight reduction in the rear radiation due to the presence of the ground plane can be seen. The gain is of the order of 1 dBi. n m J Jfl I-**, rr^ ■##< j » 00 1 ( 195 - 1*1 Broadband monopole If you want to achieve greater band widths,. you need to adapt the shape of the monopole. "I fius you can use an ellipse (see photo). The dimensions of this ellipse — made from 0.3 mm thick copper sheet — are 45 mm high by 30 mm wide. The height of the ellipse corresponds to the antenna resonance centre frequency (here, 1 .86 GHz) and is around a/4- The bandwidth is 550 MHz (30%), twice that of dipoles and simple monopoles. The radiation pattern looks the same as that of the simple monopole and the gain too has a value of the same order. elektor 11-2010 55 t i * L B * I- 29 mm Printed dipole f lie two dements of the dipole are now printed each on one side of the substrate. They are fed via a 2 -wire feeder, to which an SMA connector is soldered (the centre pin to one element and bulkhead to ground). The antenna proper was made from copper foil, so as to make it easier to adjust the dimensions* But once you've got the dimensions right, we recommend you to make the antennas on double-sided copper-clad board, to improve performance ( particularly gain) and get an antenna that will last The length of the dipole elements and the distance between the elements and ground is A/4. The board used is 0.8 mm thick and has low permittivity (2.2), resulting in slightly higher gain (of the order of 2.4 d Bi) and improved bandwidth (of the order of 470 MHz, Le, 19%). The disruption in the radiation pattern beneath the dipole is due to the measuring system and U presence of the feeder and connector* ie -4-4K— “ j r ““ 37 J -** Printed dipole with reflector If you want to radiate in a half-space and limit backwards radiation, one widely-used technique is to piece a reflector soldered to the ground side of the feeder line. The size will be chosen to be slightly larger than the two elements of the dipole. For good matching, the dimensions change slightly compared to the simple dipole. 1 his antenna has a bandwidth of 350 MHz (14%), Le, narrower than the simple printed dipole. With this antenna, you can look forward to a reduction in backwards radiation of over 10 dB. The maximum gain Is 5 dBL Also note the radiation 'hole' in fine with the dipole elements. If you want to increase the antenna's gain, simply place a director in front of the dipole elements, at a distance of around X/4. This director is markedly shorter than the two dipole elements, in this way, the gain increases by 1 .5 dBL There is a reduction in real radiation and an increase in directivity (narrower forward angle in the F and H planes). Electromagnetically-coupled printed dipole in this type of configuration, the dipole is positioned above a micro stripllne by the use of a substrate, in this way, you get a dual-layer structure wit h a feed layer and a radiating layer with the dipole, i he energy is coupled to the dipole by proximity or by a capacitive effect. Two configurations are possible: * Longitudinal coupling: the substrate used is FR-4 RGB laminate, 0*8 mm thick for the feeder line and 1,6 mm for the dipole, The dipole measures 9 * 30 mm (a half wavelength). The feeder line is 1.5 mm wide, in order to obtain a characteristic impedance of 50 Q. The position of the dipole is adjusted by hand to obtain good coupling and hence good matching of the antenna. To avoid air bubbles and ■n-2010 elektor for better reproducibility, it F s advisable to put some Vaseline ^ between the two substrates. The bandwidth of 55 MHz (2%) is narrower than for a simple dipole. The measured gain is around 1 dBi. This low value is explained by the use of FR-4 laminate, which exhibits significant losses. • Transverse coupling: this time, the dipole is positioned laterally with respect to the feeder line. The dimensions of the dipole and the characteristics of the substrates are identical with the previous antenna. The dipole position is adjusted in the same way to obtain good coupling between the line and the dipole. The bandw idth is of the order of 40 MHz (1.5%). Lc. slightly narrower than the longitudinally-coupled antenna. The measured gain is around 1.5 dBi. Patch fed by a micro stripline Numerous possible patch structures exist for producing antennas. Here, we're going to confine ourselves to just the following two types: • Fed by micro stripline the patch is a 30 mm x 30 mm square on standard l'R-4 PCB (thickness 1 .6 mm. permittivity l - 4,3 @ 2.45 GHz. >^c/(fVt r )),The patch feeder is a 1.5 mm wide micro stripline* with a characteristic impedance of 50 a Matching to the patch is achieved using a 9 mm long stub (short section of micro stripline connected at one end only, thus presenting a purely reactive impedance), positioned 20 mm from live patch. This matching can also be achieved using a quarter-wave transformer. Bandwidth is around 55 MHz, l.e. a little Over 2%. The measured gain is o\ the order of 0,5 dBi. efektor n -2010 57 - Achieving matching using the Smith chart 1 n ord er to ach i eve matching, you fi rst measure the im pedance of the patch at resonance using a network analyser (on the edge of the patch). The impedance for the prototype was 125D, purely real at the resonant frequency. You then use a Smith chart to carry out the matching: - the patch's impedance normalised to 50 Q Is 1 25/50 = 2,5 t f.e. a normalised admittance of y = 1 /2.5 = 0.4. The constant-reflection coefficient circle {with the point r = 1 as its centre) Intersects the circle r = 1 at 1 + 0.9 5/ and 1 - 0.95/. You accept the solution 1 ±0,95 j, - When the antenna is matched, you are at the centre of the chart at point 1 , Hence the stub needs to contribute an imaginary component of 0.95/ in order to compensate for the patch's admittance, i.e. (1 - 0.95 j) + 0.95/ = 1] - to get from y = 0.4 to 1 ± 0.95/, you need to move 0.34 X round the perimeter of the Smith chart in the direction of the generator, which means that the stub will need to be positioned 0,34 x 60 mm = 20.4 mm from the patch. In the prototype, the stub was positioned at around 20 mm. “ Still on the perimeter of the Smith chart, going from y co (open-circuit admittance) to a value of 0.95/, you find 0,1 2 X as the stub length, i.e. 0. 1 2 * 60 mm - 7.2 mm. In order to be able to cut 3t down to adjust, you'll make it slightly longer. The stub on the prototype was 9 mm long. UlP- k H ■ -m # Coax fed: the dimensions of the patch arc also 30 x 30 mm. Coax feed is achieved using an SMA connector soldered to i he ground plane on the other side of the board, with the centre core to the patch. Feeding in this way makes il possible to reduce the losses in the substrate. Experience shows that the patch should be fed at a point centred 1 /3 of the way in from the edge of the patch ( 1 0 mm in our case). The measured gain is of the order of 4dBi. IF you want circular polarization, you need to make a notch of about 1 0% (here 3 mm) at 45 a in the two opposite corners of the patch. Depending on the position of the slots with respect to the feed point, you will get either right- or left-hand (RH/LH) polarisation. l j-ti . — L Near-field measurement setup ■ Radiation diagrams illustrating the antennas covered in this article were obtained using a Satimo Stargate 32 near- field measurement setup. This makes it possible to perform measurements between 400 MHz and 6 GHz, The system consists of an arch fitted with detectors that measure in real time a cross- \\ section of the radiation pattern of the antenna under test. The antenna Is then rotated in order to obtain a 3D diagram. The measurements made below the antenna need to be interpreted with care, as there are no detectors under the antenna and these values are extrapolated, * — — — ^ ~ — — — — — _ ^ ~ ^ _ j (091095) 58 TV 2010 efektor mm nurve neTUJorKS i i c P^CB^Boar^ ^ fcjfXGS Gamepad Controller. g"2^25 + Page Printed Manual. =\ mgkAtrnti AVR ISP MKII Programmer. L5* *8k 9V ^wer SuppJy & A/V Cable. = * W^PC Serial Port to XGS Converter. DVD-ROM. { 1GB Micro SD Card + Adapter , Bonus; eBooks on Hardware, Ga m e. C p n so I e Destg n f _a.n d_M_or_ej The Most Complete Atmel MEGA AVR Dev Kit Availagle! WWW. X GAM E SXATJ.P.N...C.O.M. WWW. elektor. com THE ORIGINAL SINCE 1994 PCB-E0J3L Specialising in Prototype PCBs HlW Free Laser Stencil with all Prototype PCB orders 1 WD prototype service Chemical Tin Finish (no extra cost) UK 0800 389 8560 (U Simply send your layout files and order ONLINE PC8-P00L.C0M • salest?pcb -poof.com MM ** m £ HM I ****** lu. . r.'V IJ!;il[| l^' 1 R S.2T4>X Pul ‘.□r.i.H Order custom-designed boards from the Elektor PCB Service The advantages at a glance •Professional quality PCBs. • Wo film charges or start-up charges * ° rder QUantlty or char 9 e this service. Available to private and commercial customers. • Design check applied to all entries. We’ll let you know within 4 hours! • Two PCBs supplied - three produced. If the third board is also okay, you receive it as well - free of charge! Quick, cheap and secure www.elektorpcbservice.com elektor tvzoio 59 AT Mi 8 Talk Show By Gregory Ester (France) Would you like to equip your project with voice recognition, a voice synthesizer, or maybe a giant RGB pixel? Well, here we’re offering you some building-blocks you can put together to suit yourself Since April 2008, to the delight of many of our readers, the pages of this magazine have been liberally sprinkled with a multitude of applications based on use of the ATIV11 8 AVR board. On the Elek- tor forum, under the topic heading "Elektor ATM18 / / overview of instalments published [1 ] you'll find convenient links to all instal- ments in the Elektor / CC2 ATM1 8 series. In this article, it's not our aim to enter into the details of a complex implementation of the now world famous ATM 18- Mol Quite the reverse. For once, let s leave aside the structuia! and mathemati- cal aspects, and spend a little time looking at how to use ‘prefabri- cated' modules. These days, the manufacturers 1 constant efforts to offer us ready-to- use modules mean we can forget the hardware in order to concen- trate a bit more on putting these building-blocks together and pro- gramming them. It’s now easy to create, put together, take apart, and combine functions to produce your latest ‘toy * Of course, we shouldn’t ever lose sight of the fact that electronics leaves no room for chance, and our keyword must be rigorousness. After all, there's no reason why you can’t have fun and learn at the same time, is there? For this particular construction game, I wanted to use voice rec- ognition as well as the reproduction of sound effects and words. To make it a bit more fun, I've added a driver for an RGB module.,, so "Look, no hands!" Here are the building-blocks (easy to find [3]) weTe going to be using: • VRbot; voice recognition module. • Speakjet: a board that can generate voice messages and com- plex sounds. • BlinkM MaxM: module with three RGB high-brlghtness 10 mm LEDs designed to be driven via an PC bus. The whole project is based on solid foundations: Elektor ATM1 8, the 2-wire LCD display, and all the software developments that have already appeared and can be downloaded for free (BASCOM-AVR or AVR-CCC) and which can be used as a starting-point to modify or expand as necessary. What would you say to a third hand? What do you think of the ability to react to voice commands to replace pressing a button while your two poor little hands are busy holding test probes for precision measurements? The VRbot voice recognition module can make this dream come true. The recognition is virtually Speaker Dependent (SD), i.e. the timbre of the voice is taken into account in the voice recognition. 5ay "Open Ssesame! " and VRbot wilt respond to you, and only you! By default, VRbot also offers 25 pre-recorded words in a Speaker Independent (SI) mode. Table i. The VRbot vocabulary, divided into seven groups. 1 * SD1 11 Red. Green. Blue, Mood light. Seasons, Thunderstorm, 5.O.S., Black, Hue cycle. Virtual candle, White flash 5D2 | 6 Left, Right, Up T Down. Forward. Back ] SD3 i 8 Action , Move. Tu rn . Ru n . Look, Attack, Stop, Hello — SD4 4 Elektor, VRbot. CC2, Adelek Sll 8 Action. Move, Turn. Run, Look, Attack. Stop. Hello SS2 6 Left Right, Up, Down, Forward, Backward fiS 1 11 Zero One Two t Three, Four, Five, Six, Seven, Eight. Nine, Ten 6 o u-2010 elektor ATMiS The user stores a collection of words in groups. At start-up, press- ing button SI on the ATM IS board (connected to PBO) allows you to navigate through a menu to choose one of seven groups: SD1 to SD4 { 5PEAKJ ET_VR BOT_TEST_SD. has) and SI1 to SO (SPEAKJET_ VRBOT_TE5T_SLbas). The program loops through the selected test to let you test all the words in the group and, where applicable, see the action produced. You have a few seconds in which to speak. If VRbot understands what you say, it displays the word spoken on the 2-wire LCD dis- play. If it hears noise or if the word is poorly-pronounced or isn’t in the memory, it will display “What 7!?' 1 If you take too long speaking when you are supposed to. it will display “Too late", VRbot originally does not speak French, so the author decided to teach it a few words of his native language (SDZand SD3 in Table 1, English equivalents are shown). In group SD4. it's also taught four new words: Elektor, VRbot. CC2, Adelek. The First group (SD 1 ) con- tains the names of the mood lights you need to say to drive the RGB module. Let's take a moment to see how to teach VRbot one of the words in group SD 1 . To do this, we're going to use the famous USB/5 V TTL serial umbilical cord (4) that will allow us to connect the mod- ule to the PC on which you will already have installed VRbot GUI (VI * 1 .5) [5j. Connect the module to the USB/TTL cable, following the colours as shown in Figure 1 , to end up with a cross-wired serial link. Pfug the other end into a vacant USB port on your PC. Start the VRbot GUI software and select the language you want to use to speak the words in the SI group. Select the appropriate COM port and establish the link (‘connect* ); the software automatically imports words already recorded. A progress bar indicates how the import process Is progressing. It 1 s worth noting here that by default, VRbot Is configured to operate at 9600 baud. Now click on the group you want to add words to. Select ’add command' and give it a name, like WHITEWASH (for example) for index 10 in group 1 (SD1). Figure 2 shows that the command has been created, but not yet recorded (‘Trained: 0 T ), This is not the moment to be struck dumb with excitement, you’re going to have to speak: soprano or tenor, it doesn't matter! You just need to repeat the same word twice with the same intonation at about 40 cm from the mic so that the command can then be recognized Figure 1 . VRbot and the USB link. Don't forget to connect up a microphone. vn bat GUI - *1.3.5 Ffcr Ed 1 Torif Help zJ * M t Group Lift GlOl^ t CrJ-nwd Lr! ' Inde? Dwtipbcn Cgnuwi^t lnden uw Tiered Ctrifcl 0 Tuggor 0 0 RED 2 OK 1 GlUUf] 11 Gfleew 2 OK 2 &1LJLIU £ 2 BLUE 2 OK 3 SlOUp a 3 HDDDJJGHT 2 OK. 4 tiioup 4 1 SEASONS 2 OK 5 0 $ THUNDERSTORM 2 OK E Grate- 0 £ SOS 2 OK 7 Gitmj 0 7 BLACK 2 OK ft Giolc 0 a HUUTVOE 2 OK 9 Gioup □ 9 VIRTUALJANDUE 2 Ok 1$ Gmp 10 WHITE.FIASH 0 ok] 11 Gitjld 0 If Figure 2, Fleven mood lights. The last one has not been taught (‘Trained = 0'). 6i elektor 11-2010 ATMi8 Figure 3. How to connect VRbot to the ATM1 8 board. Connect the ATM1 8 board's SI push-button to P80. by the system (‘train command'). Once the groups have been cre- ated, you can have fun testing them ('tool', then test group*); if the word is recognized, it is highlighted in flashing green. At this stage, the VRbot module is ready to be built in to the system. Figure 3 shows the pin-out to follow for connecting to the ATM IS board, Figure 4 shows the same thing for the 2- wire LCD display. Figure 4. Connecting up the 2 -wire LCD display, as described in P]. Speakjet*.. >**uses a phoneme’-based voice synthesis technique, just as humans do. Phonemes are the building -blocks that allow us to construct words. An allophone is a possible sound variant of a phoneme Com- bined end-to-end. Hie phonemes form words or phrases. There are 72 sound components available, and using [hem we're going to be able to form the word Elektor'. It's also possible to adjust a multi- tude of parameters to add tone of voice, a slangy pronunciation, of a question at the end of a sentence, for example. So you need to think of it i n terms of the sounds that come out of our mouths, while also allowing for the fact that sounds will be pronounced differently according to their position in the word and the influence of the sur- rounding vowels, l or example, the fi in book will not be pronounced the same way as the B in baby. Figure 5. Speakjet and the USB link. This is a one-way connection: this talkative module is too snobby to talk to the computer! There are numerous nuances, but the device's technical documen- tation is very comprehensive and you’JI find il essential reading. You'll be able to learn all about the use of diphthongs, silences, stressed and unstressed intonations, and so on. A bit more fun is the possibility of producing 43 sound effects (alarm, biological noises, etc.) and 12 DTMF Frequencies. So we're going to implement the board based around the Speakjet fC. The Phrase-A-Lator [6| software lets you communicate directly with the module so you can test the words in the built-in dictionary or ones you've made up yourself, along with the sounds. It's also possible to control events according lo the state of certain inputs, and to store words in EEPROM memory so that you can then very easily call them up using just a few lines of code. A small area with solder pads will let you very quickly solder an adjacent row ot six male pins, which will let you program the hoard directly* once again using the USB/ 5 V TTL serial cable. To do this, you need to solder three wires as shown in Figure 5: TxDof the USB/TTl serial cable (pin 4, orange) to the 'pin 2 * on the Speakjet board that's next to the 'TX‘ Table 2. Here's how a few other words can be formed. And \SLOW \AY \SLOW \NE \0D ATM1S \EYIY \IY \TU \IY \IY \EH \EH \MM \NTF#2 \EYIY \P4 \TT \!Y \NE Present \P0 \FAST \RR \EY \SE \EH \NE \TT Speakjet \SE \PE \SLOW \!Y \EK \JH \EH \TT [vRbot \SLOW \VV \SLOW \IY \P6 \PG \AWRR \P6 \P6 \B0 \0H \TT 62 11-2010 elektor AT Mi 8 Say Data mm \\H ME \£H ME \NTFtt2 \TU kAXRR Say It View Codes Say Selection □ear Say Data View Codes tor Selection Dictionary jelektor Load Overwrite Load Insert Load & Say Next Word Save Shut Up Done Figure 6. Make it say what you want it to* pin; the +5 V rail (pin 3. red) and ground (pin 1, black) for powering the board will be derived from the USB port via the same connector After installing the Phrase-A-Lator software, connect the whole thing to a vacant USB port on your PC You should then hear a robotic voice say "ready telling you that everything is in order. Run the software, select the COM port and click ‘Test serial con- nection'; you should hear another "ready" to indicate the link is working. Now dick on Phrase-A-Lator and compose the word *Ele- ktor\ with the help of Figure 6* Click on the 'say it?' button* and hey presto! it’s said it. Table 2 shows how to construct the other words of the welcome message ‘'Elektor and ATM 18 present Speakjet and VRbot" which wilt be heard when the Talk Show is powered up. You'll need to save the words into EEPROM memory so you If be able to call them later on using a few lines written in BASCOM-AVR. The procedure is simple. Run the Phrase-A-Lator software* then select 'EEPROM editor '. When editing the last word (in this case* ‘Elektor ), refer to Figure 7 for the four steps to follow for saving all the words to the EEPROM, Youll need to take care to store all the terms in the correct places in the EEPROJVt memory. Clicking on 'view codes' will let you generate part of the code needed to complete the program in BASCOM-AVR (Figure 8), Click the save' button to save your composition into the dictionary. Lastly. Figure 9 shows how to connect the Speakjet module to the Ai MIS board. Make sure you use the right 'pin 2' — it's the one next to the TX* pin. Mega i-pixel display ] he last building-block we re going to be using (Figure 1 0) includes three 10 mm high-brightness RGB LEDs. Figure 1 1 shows how to connect this “mega" pixel to the ATM 18 board. The whole thing is designed to be driven via an PC bus. Additive synthesis is used, and 3 * S bits allow the colour mix to be con- trolled very precisely. And that's not all — there are lots of options for configuring this giant pixel, like the generation of various display sequences in stand-alone mode, the choice of transition speed, ran- dom illumination* etc. At start-up, by way of a test* the colour displayed will be Elektor red (217 / 0 / 0 in decimal). Our 'smart pixel' will Follow pre-defined scripts. Say one of the eleven mood lights In group SD1 in order to see it appear on the RGB LEDs: 'storm 1 , 'virtual candle', 'seasons', etc. - whatever you feel like. Summary of Talk Show operation At start-up* you'll hear ‘ready** so Speakjet is ready to speak. The PC address of the RGB module is detected automatically. The welcome screen comes up and Speakjet speaks the text at the same time. Next it displays the number of words in VRbot's first four SD groups (Table 1)* Pressing SI* accompanied by a pretty tinkling sound, will let you browse a menu where you can select the group to be tested. By de- fault. group SD1 orSII is active (depending on the program loaded). Speak when you are prompted to. If you take too long, you'll get the reply “Too late”; if you pronounce the word badly or there is back- ground noise, the reply is “What ?!?" If the word spoken is recogni- zed ("Fine!!!”), it is displayed and, where applicable, the event is trig- gered. As it stands, the mood lights (SDT ) are activated and emitted by BlinkM MaxM or the word "Elektor” is spoken (SD4). Pressing SI will take you back to the main menu, otherwise the test will loop indefinitely through the selected group. Note that if a problem arises while the VRbot module is being detected, a superb alarm generated by Speakjet is set off and the message "YOU MUST RESET!!!” is displayed. In this event, press button S4 (RST) on your AT Ml 8 board (pC reset) or wait ten seconds for the program to re boot of its own accord. elektor 11-2010 63 A I Mi 8 Figure 7. End with “Elektor" so you can then finally save the words in the EEPROM memory (step 4). And have you tried number seven (fxrobotbede)? Does it remind you of anything?] figure 10* The mega-pixel BlinkM MaxM display is amazingly powerful it generates a light source 1 000 times brighter than a standard high-brightness LED! So it's vital never to look directly at the light source, at risk of serious eye damage. Figure 8. The code generated for the word "Elektor’C The values mean that the volume (20) is set to 96, speed (21 ) to 1 1 4. pitch (22) to 88, bend (23) to 5, then 22 and 65 (sets the frequency to C#2), 1 29 (\IH), 145 (\LE) t 131 (\EH). 194 (\KE) P 22 and 87 (sets the frequency to F#2) ( 192 (\TU), and to end 151 (\AXRR). RS. The author used the ATMI 8-DIP version (090896) as published in the 2010 double issue instead of the ATMI 8 controller board (071035-91) (100360) Internet links [1 j www.elektorxom/forum/elektoeforums/ recent-main-projects-and-artides/elektonatmlS.1 1 49868 Jynkx [2] www.elektor.corn / 07 1 03 5 [3] Modules: www.lextronit.fr [4| USB / TTL serial cable: www.elektor.com/usb-ttl |S| VRbot: www.tigai.com/ 1 770 1 6] Speakjet: http://www.magnevation.com (Download page) 17 J BlinkM MaxM: www.sparkfun.com/commerce/ product Jnfaphp?productsJd=9O00 1 8 j Project software: www.elektor.com/ 1 003 6Q Figure 9. Connecting up the Speakjet. Note that the pin referred to as '? is the one next to the TX' pin. Figure 1 1 . Connecting up the giant pixel. 64 11-2010 elektor Subscribe now to the leading US-based computer applications magazine specializing in embedded systems and design! 5Q Carnal Low-Pass, nq futert, p, VI \ lor Ptcvtnlinn -TfcVL," V b-t 1, V.* ^ sancuvi EV\ AC l ■k MCU -Based DoppVet Radar Transmission Si "Reception A. Review oi Essential Frequency Domain Instruments ReaV-time reetoacV. *BuiW a etvWemr. Prototype IlflV Select your personal subscription at www.cc-access.com/subs oe» E$Ve! CIRCUIT 12 editions per year for just Print: $63 Digital: $38 Print + Digital: $90 POWER SUPPLIES UniLab Duo The UniLab bench supply we published in the April 2010 issue of Elektor has proved very popular. Here we show how to extend the project into a twin-output supply taking full advantage of the dual voitage/current display published in the September 2010 issue, including wiring plan and front panel design. i / Ij-jektor + - * I 9 . ?U i 0-ifl \[UNC0L3 22, 6 UNILA m CURRENT LIMIT UniLab Is a bench power supply based on a switching regulator. Technical details and a circuit description can be found on the Ele- ctor website Ml; and you can purchase the printed circuit board (order code 09G7S6- 1 ) from the Elektor Shop, as well as a kit of parts (090786-71) which includes the printed circuit board along with all compo- nents apart from the mains transformer For the twin-output version of the supply we need two populated boards plus the dual voltage/current display circuit. The four-line by twenty-character display shows the two output voltages and output currents as well as the temperature inside the unit's enclo- sure, Again, the display circuit is available as a complete kit of parts from the Ekktor shop (order code 100166-71), including printed circuit board. Optionally you can add the soft-start cir- cuit from our 1997 Summer Circuits issue ('Mains on delay circuit’), included in the wiring plan in Figure 1, which limits the input current on the mains side to avoid those embarrassing moments when you switch the power supply on and trip the cir- cuit breaker in your consumer unit, plung- ing the house into darkness. The printed cir- cuit board can be obtained via the project web page IU Transformer and enclosure For the prototype shown here we used a toroidal transformer with two 25 V second- aries rated at 3.2 A, The two 8 V windings for powering the voitage/current display were manually added to the transformer, as described in the original article In Septem- 66 n-2010 elektor POWER SUPPLIES LCD 1KJ529.11 Figure 1. Overall wiring diagram for the twin-output bench supply. ber 201 0. it is of course afso possible to use a separate 33 VA transformer with two 8 V windings to power the display, assuming it wifi fit in the enclosure. The two-part metal enclosure we used is the Telet LC1050, which has been used in Elektor projects in the past. Sadly Telet has since disappeared from the market The case measures 22 cm wide by 25 cm deep by 1 2 cm high {8.7 x 1 0 x 4.7 inch). A front panel was designed for use with the enclo- sure (Figure 2), and the layout is available as a freely downloadable PDF file on the pro- ject web page Hi, Various methods for mak- ing the front panel overlay were described in an Elektor article in November 1 997 (arti- cle available, see E 5 I). It is of course possible to use a different model of enclosure as long as it is large enough to hold all the boards and trans- former (or transformers). The dimensions of the front panel will need to be adjusted accordingly. Construction The first step is to equip the enclosure with an extra baseplate made from 2 mm (0.08 in.) aluminium sheet, designed to fit the enclosure's side mounting rails. This 'mez- zanine floor 1 simplifies mounting the vari- ous parts and avoids modifying the enclo- sure's bottom panel. Everything apart from the voltage/current display, the cur- rent-limit LEDs, the output sockets and the mains inlet is fixed to this plate. To economise on space the two Uni- Lab boards are mounted vertically. The required mounting brackets can be made from 1.5 mm (0.06 in.) sheet aluminium: mark the fold line and bend the sheet in a vice with the help of a short wooden batten. The dimensions of the brackets are available as a downloadable PDF along with the front panel drawings HI, The mounting positions of the two UniLab boards are determined by the position of the holes for the potentiometer spindles in the front panel. In our prototype the poten- tiometers were bolted to the mounting elektor 11-2010 67 POWER SUPPLIES V © / [3ektor ® CURRENT LIMIT UNILAB - o + ® CURRENT LIMIT ® 0 i *00529 - FRONT Figure 2. The front pane! design can be downloaded free from the Elektor website and printed out onto a suitable film. brackets behind the front panel rather than to the panel itself, but at the same height as the holes in the panel. The bracket and the Uni Lab boards were then fixed to the baseplate using M3 screws. Take care to ensure that there is enough space for the display board and the three output sockets between the two UniLab boards, if neces- sary, fit pieces of insulating material to pre- vent short circuits. The toroidal transformer is mounted on the baseplate behind the UniLab boards using the MG screw and nut supplied with it. On the right next to the transformer there is enough space on the rear panel of the enclosure to fit a mains inlet module, incor- porating a mains switch and fuseholder. The optional soft-start circuit board can be mounted to the left of the transformer. The display requires a rectangular cut-out in the aluminium front panel measuring 76 mm by 25 mm (3x2 in.). This can be made using a fine-toothed fretsaw, neaten- ing up the results with a warding fife. To mount the voltage/current display we fixed M3 bolts to the inside of the front panel using a two-component adhesive. It is important to key and degrease the relevant areas of the panel before applying the glue. Wiring The complete wiring plan is shown in Fig- ure 1 . It is important to observe the gauges of the various wires involved: the con- nections to the output sockets should be made using 2.5 mnT (approx. 13 AWG) wire, while ordinary 0.75 mm 2 (approx. IS AWG) insulated stranded hook-up wire can be used for all the other connections. Exposed metal on all wires carrying mains voltages should be carefully insulated at the AC power inlet module using heatshrink tubing* and of course you must ensure that the chassis is securely connected to AC pow- erline Earth. The voltage/current display Is simply connected using six-way flat cables and headers. ( 100529 ) Internet Links [ 1 ] www.efektor.com/ 090786 {UniLab bench supply) [2] www.elektor.com/ 1 00166 (dual vokage/current display) [3) Mains On Delay Circuit', Elektor Electronics July & August 1997 (article on Elektor 1990-1999 DVD) HI www. el ektor.com /1 00529 (front panel artwork) j 5 1 'Make your own Front Panels', Elektoi Electronics Novembei 1997 (article on Elektor 1990-1999 DVD) 68 11-2010 elektor DESIGN TIPS LED remote control for RC models By Af Baur (Israel) When flying a remote controlled (RC) airplane in the dark, it helps to have different colored lights on the wings. The use of high -intensity red and blue LEDs on the wings allows a visual takeoff/landing Indi- cation to be added to the plane and seen from a distance. When used on helicopters the different color LEDs are sure to stir up UFO stories in the local newspaper within a few days. Most RC transmitters have a spare channel for a simple on/off function ('SWITCH)' transmitting fixed 1 ms or 2 ms pulse lengths; if not, a nor- mal 'stick channel* is also suitable for use with this circuit shown here. The circuit consists of three ICs in essence. Two halves of a CD4538 operate as fixed-length pulse generators triggered by the receiver’s output pulses, ICl.A supplying 1,25 ms pulses and IC1.B, 1.75 ms pulses. Two flip-flops in a 4013 package, 1C2.A and JC2.B, compare the reference pulses with those obtained from the receiver, which are either 1 ms or 2 ms for an l on/off type of channel, or vary in length between 1 ms and 2 ms for a stick channel. Each flipflop toggles its Q and Q outputs depending on the outcome of the length comparison. Using gate IC3.A the circuit decides ICs a 1 .5 ms pulse if neither 1 ms or 2 ms is detected, thus adding the third digital output. Unless you are using very low current LEDs (not recommended), the red and blue wing LEDs should be connected through transistor drivers. (081145) +sv Simple IR remote control tester By Tom van Steenkiste (The Netherlands) On the Internet you can find them in all shapes and sizes: circuits to test remote controls. Here we describe a simple and cheap method which is not that well-known. This method is based on the principle that an LED does not only generate light when you apply a voltage to it, but also works in the opposite direction to gener- ate a voltage when light falls on it. Within constraints it can therefore be used as an alternative for a proper photo transistor or photo diode. The major advantage is that you will usually have an LED around somewhere, which may not be true for a photodiode. This is also true for IR (infra-red) diodes and this makes them eminently suitable for testing a remote control You only need to connect a voltmeter to the IR diode and the remote control tester is finished. Set the multimeter so it measures DC voltage and turn it on. Hold the remote control close to the (R diode and push any button. If the remote control Is working then the voltage shown on the display will quickly rise. When you release the button the volt- age will drop again. However, don't expect a very high voltage from the IR diodel The voltage generated by the diode will only be about 300 mV, but this is suf- ficient to show whether the remote control is working or not. There are quite a few other objects that emit IR radiation. So first note the voltage indicated by the voltme- ter before pushing any of the buttons on the remote control and use this as a reference value. Also, don't do this test in a well lit room or a room with the sun shining in, because there is the chance that there is too much IR radia- tion present. To quickly reduce the diode volta ge to zero before doing the next measure- ment you can short-circuit the pins of the diode briefly. This will not damage the diode. (090480) elektos 11-2010 69 PHOTOGRAPH V Camera Interval Timer By ]ean-Pierre Gauthier (France) \f\J |4 C 1 | 1 \j ar g— 4>- 1 ■ XI y U! dtLILc )L Taking a or tr\r\i LiU JA 1 < at my c dnirfa s instrut :tions t 1 1 1 | I Tl 111 rl I rpssi hip viz ! 3 1 3 C K S 0 C ket. Tha 1 st what 1 need Technical characteristics * PIC16F886 microcontroller * Compatible with Sony SIRt remote controls * Number of photos programmable between 1 and roo * Interval programmable between t and 3,599 s * Automatic standby * Optimised for Canon EOS camera, but can be used for any other purpose The camera shutter operating system described here makes it possible to take photos at a predefined interval, or to trig- ger two cameras together for stereoscopic shots. This device makes it possible, for example, to take a series of photos every 30 minutes of a flower as it opens, a baby bird hatching, etc. so as to include them in a video. The system was originally designed 70 n-2010 elektor for a Canon EOS camera, but it can readily be adapted for other cameras that are able to be remote controlled. The timer is capable of taking from t to 100 photos at intervals from 1 second to 59 min- utes, 59 seconds, with or without pre-focus- Ing. The parameters are stored in EEPROM. An alphanumeric LCD uses four lines of 20 characters to show the number of shots taken and display menus to help you con- figure the device. The backlight is controlled by the microcontroller. If necessary, you can adjust the focus and shot at any time between shots by using a remote control compatible with Sony's SIRC protocol PL Once all the photos have been taken, the timer goes into stand-by mode to save power. Thanks to the use of a microcontroller, the circuit itself (Figure 1) has been kept simple: four push-buttons, a liquid crystal display, and a few additional components are all it — Qtinnr — FOCUS r L ~r _* GND TRIGGER Figure 2 . Here’s how to wire up the control plug for the Canon camera. D2 1N4Q04 Figure 1 . The timer is a basic microcontroller project. elektor 11-2010 71 Figure 3. Setting key 1 of the remote. Figure 4. Setting key 2 of the remote. Figure 5, Setting the number of photos to Figure 5, Setting the number of photos to be taken. Figure 6. The first menu in ‘Normal’ mode. Figure 7. Setting the interval between two shots. Figure 8. The screen during shooting. takes to control the camera. The shutter and focus commands are produced using two relays RE1 and RE2, driven by transis- tors T2 and T3, The two relays connect the contacts of the jack socket K6 to ground via the switches In S5, Figure 2 shows how to wire the jack so as to be compatible with a Canon camera. Provision has been made for two additional terminal blocks (l<4 and K5) in case the pro- ject is going to be used to drive something other than a Canon camera. In this case, the positions of the S5 switches depend on the application. Each output has an LED to let you see at a distance if one of the relays is on or not. The buzzer BZ 1 offers the possibility of produc- ing an audible signal, for those instances where you might not be able to see the LEDs, The remote control signal is picked up by IR detector IC3. Transistor T1 is used to enable the backlight only when it is needed — a handy function that all too often still gets overlooked. Thanks to regulator IC1 , the circuit can be powered from any voltage between 8 and 1 2 Vdc. As for every microcontroller circuit, the software is what makes ail the functions possible. Here, the software (available free from I i I) has been written in C and compiled using the free 1ite T version of the Hi-Tech C for PIC1 0/1 2/16 compiler (version 9.70) i 2 L Interaction with the software is achieved via a series of menus, around which we navi- gate with the help of the four push-buttons SI -S4. Their function depends on the menu selected and is displayed on the LCD using little ‘icons'. If SI is pressed while power is applied to the circuit, the software goes first into configuration mode before going into nor- mal mode. A series of menus appear that let you configure the remote-control keys (Figures 3 and 4) that will be recognized by the timer (see Tabfe 1, don't use the same code twice!) and the number of pho- tos to be taken (Figure 5) .In these menus, pressing S2 decreases the value displayed, while pressing S3 increases it. SI lets you store the value in the EEPROM and go on to the next menu. S4 is only used in the third menu, where it offers the possibility of ena- bling the backlight. in normal mode, a menu is displayed (Fig- ure 6) that shows the status of the buzzer (S3) and pre-focus (S2). Pressing S4 brings up a new menu where S2 and S3 are used to set the time delay between shots from 0 to 3,599 seconds (i.e. 1 hour less 1 sec- ond, Figure?). For user convenience, if you keep one of these two switches pressed, the value increases or decreases automatically. This function works in the other menus too. Table i: The codes for some of the keys on an SIRC remote control, as seen by the timer. It only accepts codes between 1 23 and 1 37, i.e, the ‘O' to ‘9’ keys. 1 , . 0x80 128 1 0x81 129 2 0x82 130 3 0x83 r i3i 4 0x84 132 5 0x85 133 6 0x86 134 7 0x37 135 8 0x88 136 9 0x89 137 0 OxSC 140 1- 0x8 D 141 2- 0x90 144 Program + 0x91 145 Program- 0x92 146 Volume+ 0x93 147 Volume- 0x94 148 Mute 0x95 149 Standby 0x96 150 Norma! 0xA5 165 TV/Video 0xB4 180 + 0xB5 181 - 0xB6 182 Sleep Ox BA 186 Display OxBC 188 Select 72 11-2010 elektor If your version of the timer works first time, It's thanks to Daniel in the Elektor lab. If it doesn’t work, then it's entirely your own fault. Pressing S4 starts shooting. The Focus out- put Is active for 400 ms ten seconds before each shot is taken (If pre-focusing has been enabled, of course). Depending on how the buzzer is configured, this event may be accompanied by an audible signal. Fir* rng the Trigger output, also for 400 ms, also activates the buzzer (if enabled). The elapsed time is displayed briefly, and press- ing S3 Jets you mute the buzzer. The number of photos taken is updated then displayed on the LCD after each shot (Figure 8), Pressing 54 for at least 2 s allows you to stop the count at any time and go back to the start menu. If the timer finishes its program without being interrupted, it plays a little tune and then goes into stand-by. You then have to reboot It, or 'wake it up' using the remote control, followed by a long (at least 2 s) press on S4 to start a new series of photos. As indicated above, the timer can be con- trolled by a Sony remote control or any other remote capable of 'speaking' 5IRC PI — for example, a 'universal' remote. The remote lets you activate the Trigger or Focus outputs manually at any moment (except in stand-by) without affecting the Resistors (5%, 0,25 W unless otherwise indicated) Ri *4.7ka R2 - icon R3-10Q, 0,5 W R4 = 2.7 kn R5.R6 = 6SkQ R7,R8 = IkQ R9.R10 - lOOkil PI - lOkft tnmpot, horizontal Capacitors Cl M7 GliF 25V radial C2,C3,C5,C6 = IDOnF ceramic C4 * 47pF 16V radial C7,C8 = 22pF ceramic NPO C9 = 4.7pF 1 6V radial Semiconductors D! .02 = 1N4004 D3.D4 = LED, red, low current, 3mm IC1 =7805. TO-22G case IC2 - PEC 1 6F8864/5P, SPDIP28 IC3 = TSQP1 1 38, 38 kHz JR receiver (e.g. Far- nell #4913036) T1 = BC337 72,13 = BC547 Miscellaneous BZ1 = piezo buzzer, lead pitch 7.62mm (e.g, Parnell# 1502726) RE1.RE2 = relay, miniature 5P5T-NO, 5 VDC (e.g, Fafnell #9561 757) K1 ,K4,I<5 - PC8 terminal block, lead pitch 5mm 1(2 = 8-pin pinheader, lead pitch 0.1 inch K3 = 5-pin pinheader, lead pitch 0,1 inch K6 = 2.5m m 3-way jack socket (e.g. Fa rnel I # 1308867) LCD 1 = LCD, 4x20 (e.g. Elektor # 050176-73) SI -S4 = SPNO pushbutton (e.g. Farnell # 1555982) S5 - 2 -element DIP switch XI = 4 MHz quartz crystal SPDIP28 socket for IC2 PCB, Elektor# 081 184*1 [1] program currently running. It also lets you ' wake up“ the circuit, in association with 54, This is possible through the use of an exter- nal interrupt, provided by O. Table 1 shows the correspondence between the remote control key number (as seen by the timer) and its function as envisaged by 5ony, (081184) Internet Links [1 ] www.elektorcom/081 1 84 [2] www, htsoft.com/down loads/ [3 ] picprojects.org . u k/ projects/ sir cj elektor 11-2010 73 ROBOTICS Light Tracker Simple means sometimes provide amaz- ingly good results. For instance, the pre- sent circuit is able to track a source of light, such as the sun or a powerful torch, provided, of course, that its output 3s con- nected to a small motor. It may be used, for instance, to ensure that solar cells are always directed towards the sun, or to make a robot cart follow a track, or what- ever the reader may decide. The circuit is intended to be linked to a small motor with some hysteresis that allows the circuit to rotate 360 degrees. The motor moves clockwise or anti-clockwise until the bright- est light is detected. The circuit is virtually self-explanatory. The 1C, Type 74HC24G, contains eight logic gates (inverting amplifiers) of which two are connected in parallel three times to ensure sufficient current for the motor. Each motor driver is controlled by one amplifier to which a photodiode is connected. The two diodes are connected in anti-parallel. When light falls on to one diode, this deliv- ers a current the level of which depends on the luminous flux. If the light incidence on the two diodes is the same, the resulting diode currents cancel one another. In case of unequal fluxes, the resultant current is that from the diode with the greatest flux onto it. This current causes an increasing charge on either Cl orC2 and a diminish- ing one on the other capacitor This results in a changing voltage across the capacitors and at a certain instant this change will be enough to cause the relevant logic gate to switch its output level. The motor then changes direction. This results after a short while in a change in the luminous flux on the diodes and a little later the motor changes direction again. This process repeats itself endlessly. Provided the values of Cl and C2 have been chosen correctly, the motor assumes a stable position and should not wob- ble around the direction of the strongest light If it does, reduce the value of the two capacitors. The 1C operates from supply voltages of 2-6 V, which means that the motor must be capable of working with the same volt- age. The 1C is intentionally a buffer type because this provides a higher current at its outputs. Nevertheless, the total current from the three parallel-connected outputs should not exceed 1 00 mA to prevent the 1C from over-heating. The photodiodes may be of a variety of types. However, they differ in light sensi- tivity and two aspects should therefore be borne in mind. A less sensitive diode will function only with sufficiently strong light, so it should be used only in the outdoors, not in enclosed spaces. Also, such a diode provides a smaller current and this will increase the likelihood of motor wobble. This may, of course, as mentioned before, be countered by reducing the values of Cl andC2. The photograph of the prototype shows that even standard, low-cost LEDs may be used as sensors. Their sensitivity is, how- ever, small and they therefore provide a current of only a few milliamperes, In other words, they are usable only in bright sunlight. {064009-1) icon 10Qn 1-*- ] ] — < : - — Ml o (W-JMrf ■ M +2V...+6V QG40O9 - 1 2 74 11 "2010 dektor Hexadoku INFOTAINMENT It’s gratifying to see the monthly response to Hexadoku measured in terms of correct solutions received from readers all over the globe. Thank you all for making this a success and do you reckon you can solve the one below? Enter the right numbers in the puzzle, send the ones in the grey boxes to us and you automatically enter the prize draw for four Elektor Shop vouchers. Have fun! The instructions for this puzzle are straightforward. Fully geared to electronics fans and programmers, the Hexadoku puzzle employs the hexadecimal range 0 through F. In the diagram composed of 16x16 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 Solve Hexadoku and win! Correct solutions received from the entire Elektor readership automati- cal ly enter a prize d raw for o ne Elektor Shop voucher worth £ 80,00 and three Elektor Shop Vouchers worth £ 40.00 each, which should encourage all Elektor readers to participate. in each column and in each of the 4*4 boxes (marked by the thicker black lines), A number of clues are given in the puzzle and these determine the start situation. Correct entries received enter a draw for a main prize and three lesser prizes. All you need to do is send us the numbers in the grey boxes. Participate! Before December 1 , 20 1 0, send your solution (the numbers in the grey boxes) by email, fax or post to Elektor Hexadoku - 1 000, Great West Road - Brentford TW8 9HH United Kingdom. Fax (+44) 208 26 1 4447 Email: hexadoku@elektor.com Prizewinners The solution of the September 2010 Hexadoku is: 3AE58. The £80,00 voucher has been awarded to: Udo Altmann (Germany). The £40,00 vouchers have been awarded to: Stefanie Kalkbrenner (Germany), Suzanne Pecado (France) and W.J, Vis (the Netherlands), Congratulations everyone! F 1 2 D A 0 C 6 9 7 5 1 3 A F 2 E D A 2 E 0 8 9 B 5 6 4 A 6 C D 3 B E 3 0 C D 6 5 0 D 1 4 E 2 8 A 9 2 5 9 3 7 F B 0 E 4 9 3 8 C 6 A B 5 7 5 D F 8 2 1 F 6 0 4 C 7 8 4 6 3 A D F 6 A 1 3 7 4 2 B C 5 2 B 8 D C 0 5 5 F 2 6 A 1 C A 7 4 F 9 3 8 B 4cgi PZZL com F 8 3 4 C 2 B 7 1 0 D 5 6 9 E A A 0 5 6 D 4 F 9 C E 7 — 3 B 8 2 1 E D C 1 8 0 5 A 2 6 B 9 F 7 3 4 2 9 B 7 E 6 1 3 F 4 A 8 C D 0 5 D 3 A E 5 8 6 0 B 7 4 F 9 1 C 2 9 1 0 C 4 F 7 B E D 6 2 3 5 A 8 5 7 6 8 1 9 2 D 0 C 3 A E 4 F B 4 B 2 \ F 3 A E C 5 8 9 1 7 0 6 D 1 6 4 D 9 B 8 E 3 2 5 0 A F 7 fc 3 E 8 B A C 4 2 D 1 F 7 5 6 9 0 0 C 9 5 F 7 3 1 6 A 8 B D 2 4 E 7 A F 2 |° 5 D 6 4 9 C e] 8 B | 1 3 6 4 7 9 2 D A 5 8 3 1 c 0 E B F B F 1 A 6 E C 4 9 5 0 D 2 3 8 7 8 2 D 0 7 3 9 F A B E 4 1 C 5 6 C 5 E 3 B 1 0 8 7 F 2 6 4 A D 9 The competition is not open to employees of Efektor international Media, its business partners and/or associated publishing houses. elektor 1 1-2010 75 RETRONICS -Arnoux MD7 the two currents: we have created an analogue multiplier. The stationary coil consists of a small number of turns of large-diameter wire and is connected in series with the device under test (DUT). The moving coil has a large number of turns of fine wire and is connected, via a series resistor, in parallel with the DUT. The first is called a 'current winding’, the second a 'voltage winding'. This special voltmeter is the heart of the commonest analogue wattmeters: electrodynamic wattmeters. Unlike the ferromagnetic voltmeter, the magneto-electric voltmeter can only operate on direct current, since the sense of the deviation depends on the direction of the current. But in the case By Jean-Marc Dubrunfaut (France) Since the famous compass that Ampere christened a 'galvanometer 1 , two successive types of voltmeter have held sway. The first of these combined the idea of having the conductor wire make several turns around the needle with Ampere's astatic system (the idea of using two mechanically-coupled magnetic needles with opposing poles, with only one of the needles subject to the influence of the electrical current, in order to get round the problem of the Earth’s magnetic field). The second was the moving-coil voltmeter, where it is no longer a magnet that moves within a coil, but a coil that moves within a magnet. If we combine these two principles by placing one moving coil within another coil, the deviation obtained depends on the product The switch wiring. of a wattmeter, the fact that the polarities to both stationary and moving windings are inverted together means that it works just as well on AC as DC, and without the user even needing to change ranges! Better still, the value obtained in AC is inherently the active power. The deviation is linked to the product of the instantaneous values of voltage and current. This product is smoothed by the inertia of the moving element and by the air damper, hence we obtain the mean value of the instantaneous power, which is what is measured by the supply authority's meter, i.e, U * 1 x cos(d) in the case of a pure sine wave. And we don't need to do anything further to obtain a value that integrates both AC and DC components, as this is what happens by default. However, one real limitation compared to digital wattmeters is that the frequency of the current to be measured must remain within narrow limits. If it's too low. the mechanical smoothing would be insufficient: if it's too high, the measurement will be distorted by the self-inductance of the coils. The usable operating frequency range of this type of device never exceeds a few hundred hertz (the dial of the MD7 indicates 50 Hz, but our experiments show that it manages ten times that). So this bandwidth excludes high-frequency signals if they are too distorted, because of their harmonics. But at low frequencies, and in particular at 50 Hz, the measurement is accurate for signals of any shape (including squarewaves and dipped sinewaves). The separate / and U circuits (they are even electrically isolated) offer several advantages. Firstly, they allow a choice between upstream and downstream measurement, which is useful, given the Z n of 5 kQ. Then, when making measurements on a transformer, there's nothing to stop you measuring the current in the primary and the voltage on the secondary, or vice-versa (not forgetting to take the transformer ratio into account), with the object of making the best use of the input ranges of the device depending on the values to be measured. Lastly, the four terminals makes it possible to significantly extend the range of measurements possible. In this way, it can be adapted to very high currents by using a measuring 76 11-2010 elektor RETRONICS Precision Astatic Wattmeter transformer (the principle of the current clamp), measure just the reactive power, etc. Astatism requires the moving element to he doubled up: two moving coils fitted headl-to-tail react in an opposing fashion when they are subjected to the same magnetic held. So that they move when under the influence of the current to be measured, each is placed within a dedicated stationary coil, both of which are also wired head-to-taif, So for the system to be astatic, i,e. very little influenced by the Earth's magnetic field or polluters like motors, dynamos, or high-current conductors, we need four coils. So why this costly astatism when just some good magnetic shielding would have sufficed? Probably because the manufacturer knows, because of their long experience, that such an instrument can lose a great deal of its accuracy because of Foucault currents. In the presence of a massive metallic element, and even more so if it is enclosed in a metal case, a device generating a variable magnetic field wilf induce Foucault currents into the conductive mass, which will create a magnetic field in opposition to the field that induced them, whence a measurement that is disrupted in a not very predictable manner "All wood and Bakelite" is not only an aesthetic choice: minimizing the amount of metal as much as possible is also the best technical option, even though that may not be intuitively obvious. What's more, the designers have taken advantage of this doubling-up of the windings and offered the possibility of wiring the stationary windings in parallel or series, In order to have two current ranges available: 5 A and 10 A. But the selector switch offers a mysterious third position *CC to that is not described in the instructions and with no maximum current value. In fact. In the 'CC position the current measurement inputs are simply bypassed. So 'CC doesn't stand for ‘DC (French CC: courant continu}, but rather, 'short circuit'! The astatic operation means that the MD7 works as a real synchronous demodulator, i.e. even when placed in a noisy electromagnetic environment, it only extracts that which is at the exact frequency of the current passing through the DUT. It does not react to either static fields or those at different frequencies. But if the DUT itself radiates, the MD7 will include this unwanted field into its measurement. In this event, the 'CC position makes it possible to measure the spurious field alone. A simple subtraction and the measured value becomes accurate again! But there's a price to be paid for the accuracy of this fine device. It would be out of the question to subject such a delicate mechanism to any kind of shock. Or to use it without first using a spirit-level to check it is level. What's more, it's obvious that compensating for spurious fields using the famous ‘CC position is only valid if one is careful not to move the instrument at all between the two measurements, nor to change its orientation. And the most important thing of all: be wary of 'invisible' range overloads. You can merrily burn out your collector's piece while the needle is innocently showing very modest values. Mot only can the current exceed the set range if the voltage is very low (and vice-versa), but, since what we see is the product of three value (the third being The stationary windings are offset to reduce mutual coupling. the phase angle cos(p)), we can unwittingly burn out both U and I circuits at the same time when the phase angle gets dose to 90°. And with a ‘single-/3-phase’ selector switch connected directly to the voltages being measured, we're a long way from IEC1010 measuring instruments! (100381) The range resistors are wound flat so as to have negligible self- inductance and hence an extended frequency response, and are trimmed to the nearest ohm. There are 14 of them (for six ranges), which makes it possible to reduce the power dissipated in each of them (never more than 1,5 watts) and hence the thermal drift — all the more so, since they are particularly well ventilated: accuracy, accuracy, accuracy! Retronics is a monthly column covering vintage electronics including legendary tlektar designs. Contributions . suggestions and requests are welcomed; please send an email to editor@elektor.com elektor n-2010 77 EL KTOR SHOWCASE To book your showcase space contact Huson International Media Tel. (0) 1 932 564999 Fax 0044 (0) 1 932 564998 ASTROBE V3.0 www.as l rob exam Windows Development System for LPC20QQ microcontrollers. * Develop high-arid low-level software without C or assembler * Generate fast 32-bit native ARM code * No special programming hardware required * Personal, Standard and Professional Editions ATOMIC PROGRAMMING LTD www.atomicprogrammingxom • AP-1 14 ISP/JTAG Programming System • JTAG Programming and Testing • Boundary Scan Testing • Universal In-System Programming • EEPROM and SPI Flash Out-of-Circuit Programming • Generic GD6 Proxy I *jf Server / /;• • Jennie JN51 48 ZigBee Development ’ ■ Applications ■ Training Platform available ByVac www.byvacxorn • PIC 32 With BASIC • ARM With Forth • USB to I2C • Serial Devices • VT100 LCD Displays CEDA wwwxeda.in ceda@vsnlxom ( )i it ) A PADS | OrCAD | PCB layout i e-learning ftlUEGRO @ $5 Hourly /ft If 15 A * PCB Layout @ S5 Hourly * Learn PCB Designing with Multimedia DVD in OrCAD, PADS & ALLEGRO * Self or e-learning with support by email, phone & web-meeting AVIT RESEARCH www.avi (research, 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 cost of the usual manufacturer’s prices. DESIGNER SYSTEMS http://www.desi gnersystems.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) 345 5192306 % EASYSYNC http://wwwxasysync.co.uk EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and RS485 converters at competitive prices. BLACK ROBOTICS www, b I ackro boticsxom Robot platforms and brains for research, hobby and education. * Make your robot talk! * TalkBotBrarn is open-source * Free robot speech software * Robot humanisation technology * Mandibot Gripper Robot ELNEC www.elnecxom Europe's leading device programmers manufacturer: * reliable HW: 3 years warranty for \ most programmers * support over 56.000 devices * free SW updates * SW release: few times a week * excellent technical support: Algorithms On Request. On Demand * all products at stock / fast delivery SW EMBEDDED ADVENTURES wwwxmbeddedadventures.com From news and tutorials to modules, components and kits, we have everything for your next microcontroller based project. Your embedded adventure starts here. embedded FIRST TECHNOLOGY TRANSFER LTD. http://wwwJlt.coxk • Training and Consulting first for IT. Embedded and U|3 Technology R 6 al Ti rn e Sy ste m S Trans f e r Lfa • Assembler, C f C++ (all levels) • 8, 16 and 32 bit microcontrollers • Microchip, ARM, Renesas, TI, Freescale • CMX, uCOSII, FreeRTOS, Linux operating systems • Ethernet, CAN, USB. TCP/IP. Zigbee, Bluetooth programming FLEXIPANEL LTD www.flexipanat.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 TECHNOLOGY DEVICES http : // w w w, ftdichip.ee m FTD1 designs and sells USB-UART and USB-FIF0 interface ix.'s. ^ m Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB Instruments A Rohde&Schwarz Company 0 0 0 0 0 Oscilloscopes Power Supplies Spectrum Analyzers RF Instruments Programmable Measuring Instruments Great Value in Test & Measurement www.hameg.com ?s n-2010 elektor products and services directory HEXWAX LTD wvM.hexwax.com World leaders in Driver-Free USB ICs: • USB - U ART/SPI/I2C bridges • TEAleaf-USB authentication dongles • expandiO-USB I/O USB expander • USB-FileSys flash drive with SRI interface • USB-DAG data fogging flash drive — — = ^ it 160 pages of tech audio articles Linear Audio Self ' Linkw J ^ Corde ": Pass a '°- your Tech audio resource W\AfW/+IfHG(Jf(lU(jfO. P@t 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 WWW. com ROBOT ELECTRONICS http: //www. robot-electronics. CD.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://wvmroboliq.muk Build your own Robot! Fun for the whole family] Now, available in time for X-mas * Arduino Starter Kits *NEWP* * Lego NXT Mindstorms * Affordable Embedded Linux Boards * Vex Robotics (kits and components) * POB Robots (kits and components) email; sales@robotlq.co.uk Tel: 020 3669 0769 STEORN SKDB LITE Join the SKDB Lite, the place to understand, discuss and experiment with magnetics. • Learn more about magnetics and electromagnetics • Participate in developer fomms and discussion surrounding magnetics and related topics. For FREE access to SKDB Lite: h tips ://kd b , ste o rn . c o m/ref 2 5 USB INSTRUMENTS http :// www .ush-instruments.ee 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 he able to showcase your products and services. For just £242 + VAT t£22 per issue for eleven issues) Elektor will publish your company name, website address and a 30- word description For £363 + VAT for the year ( £33 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-plcase fax back your order today! I wish to promote my company, please book m\ space: * Text insertion only for £242 4- VAT * Text and photo for £363 + VAT X- J ^ ^ l t ■ -J . , . . . , .. . . .. . ■ . i . » . . .. .. .. n, a. . a . u . . .. a...... .. an ... a, a, r, r.H r , .. rrH,. r , r , ,, ,, , + h ^ ^ k C . J ■ | ^ | M,P + i + , + . + S + . + ,'t. H , ■ ,I,,,.,I + B + ,,P + M . 4 ,. bb,.b ,bj.bj . j a . a . .It ) U I I J Ll j , aaaaaaiB iBaB,B,BTBBB,BaaaBBP,B, a, par, a aa,aa + , + HH0*H. . a. a. aBB.BBB^B. ........... a B.B.BtBBB.B*B.Ba.B*B*Ba.BaBa.BBB,BBaBBB»Baa a. a aai AnnRFSv i 1 « IIL^ 1 X I i 1 hJ fcJ ■ + + n ■■■■«■ r ■«•■* i r ■« i *■» i « t i ■ t i » i * fc i « r i «■»■ i n ■*■■«■■■ i ■*■■■■ ■ m mm mm mm a a ■ a a a ■■ ■ ■ a i « ■ a ■ ■ ■ ■ ■ a ■ ir ■ * ■ ■ an a a r a ■ ar a t a i a ir ■ i PLEASE COMPLETE COUPON BELOW AND FAX BACK TO 00-44-<0) 1 932 364998 COMPANY NAME ... a a a -a a m a * a * a a a#i + MI4 fc * MM*' M I «- M * ■ fc ■ -fc * PI- ■ WEB ADDRESS.. a 1 a a aa a a a a a a -a a- a a aa aa pa ( t i N I j 4 I’t i + 1 fN ^ M B - * rniiatariaii ■ ei a bp a 4 a 4"a a aa aa aa pa aa pa pa -pa ■ a -a a -a a -a a M4a4i + < + i4i + lti4l + fi + l4l4N + I4aH + Hi + l + )494P4M ■ # ■ » » J ■ 30- WORD DESCRIPTION ..„ a a aa aa aa pa a aa bp a HiiUffHaa L M » M M *i p a pa fc afr -■ H - §fc 41- 4 + <4 -p a + 8 + H fc a a 4 fc 4- fc - H + aaata + i + ' + si' + S + f + liM*”*" + i a * a * a a a an a a ■ ■ a a mm a a Pa p - - - r a - - - - - - *■ - a f a a a a a a a a p p - p p a - a - - - - - ■* - - fc 4 - --- - a - a - ajj.aj.fc ■ a a a 4- a a fc a H a 4' a a- fc 4 -a a -a a p a p - - - a - - b J a a aa a a- a a ia«tM4 > 9 + I + i + Hi> + it a a’ a 4 aa a pa pa p a r ap aia p ar p a p a r a p a p a p a -p a ¥ a ¥ a 4 + a + a + a + a + B + B + i + fc a * a ¥ * fc 4- 4->i"fc" fc a * a i a j, a a a j a j a a a a p a p a pa pa fc # -p 4 + 4 * 4 -fc 8- a 4 -fc a + i* 4- i 4- * - 4- “ a a a- pa pa pa papa - - -4 pa fc 4 P 4 *■ - - B ■ ■ ■ * 6 J *■ a BB - Ba B - *■ - *■ a B a B a ■ ■ "P 4 BBJ.B i.a m a a a j a :■ aa ■ ■ aa a ;i aa aa aa aa ■ a fb aa aa raa aa aa pa aa -■•pa papa r - - - - a - - pa pa pa p - pfcJ.fcJ.aJ a J a a. a a aa bj aa aa aa- aa aa aa aa aa aa auicnitii at aa a a- a a aa a a- a a mi r i mi pa pa a a p a a p a- - - pa - -l pa papa aa pa pa pa pa pa p a a a p a p a a a a pa pa pa pa aa pa fc 4- "fe 4 -fe a r *r i ■•»• + • + 4 + • ■ H p - fc 4 fcJfc-fc-i-JfcJfcJ i i i a j a J. ■ 1 ■ elektor 11-2010 79 SHOP BOOKS, CD-ROMs, DVDs, KITS & MODULES Going Strong A world of electronics from a single shop! Visual Studio C# 2010 Program and PC interfacing at ANVONF *HO WANT& thK l J r„ TOLE A^ iQCikJ ; ■ r llC OVtH5 iwtepF acino t ^: j : epts p pom -*** ****** OSf? * M M 1 JL p„Q&* T ° o9JECt °r^ THPe^* 0 DATAe AsE? frlT JOHN ALLWORK rtiektor 0 Limited Period Offer for Subscribers’ £4 DISCOUNT www.elektor.com! c#2010 Visual Studio C# 201 0 Programming and PC interfacing This book is aimed at anyone who wants to learn about C# programming and interfacing to a PC It covers programming concepts from the basics to object oriented programming, displaying graphs, threading and databases. The book is complete with many full program examples, self assessment exercises and links to supporting videos. All code examples used are available -free of charge- from the www.elektor.com support website; you can easily create your own results to demonstrate the concepts explained and reinforce your learning in the process. Professional quality software tools are downloadable -also free of charge- from Microsoft. The Microsoft Visual Studio 201 0 environment is extensively covered with user controls and their properties, methods and events. Detailed guidance is provided for those wishing to control hardware from a PC with PC interfacing chapters which explain the legacy serial and parallel ports, analogue inter- facing using the sound card and use of Microsoft DirectX drivers, interfacing to the ubiquitous USB port is explained in-depth with a detailed hardware and software design fora USB connected PIC-based hardware target included, 306 pages * ISBN 978-0-505705-95-8 - £29.50 * USS47.6Q ARM Microcontroller Interfacing HAAfWAHE A*#D fiOPTWArtt Use only free or open source software! ARM Microcontroller Interfacing Learn to interface and program hardware devices in a wide range of useful applica- tions, using ARM? microcontrollers and the C programming language. Examples covered in full detail include a simple LED to a multi-megaby te SD card ru fining the FAT file system. Interface to LEDs, transis- tors, optocouplers, relays, solenoids, switches, keypads. LCD displays, seven segment displays, DC motors, stepper mo- tors. external analogue signals using the ADC, RS-232, RS-4S5, TW1, USB, SPI and SD memory cards. 250 pages * ISBN 978-0-905705-91 -0 £29.50 * US $47.60 Get started quickly and proceed rapidly Python Programming and GUIs This book is aimed at people who want to interface PCs with hardware projects using graphic user interfaces. The pro- gramming language used is Python, an object-oriented scripting language. The book guides you through starring with Linux by way ofa free downloadable, live bootable distribution that can be ported around different computers with- out requ i ring hard drive installation. 224 pages * ISBW978-B-905705-87-3 £29.50 ■ US $47.60 So Prices and item descriptions subject to change. E, & G,E 11-2010 elektor Experiments with Digital Electronics 50 practical circuits Experiments with Digital Electronics The field of digital electronics is central to modern technology. This book presents fundamental circuits using gates* flip-flops and counters from the CMOS 4000 Senes, Each of the 50 experiments has a circuit dia- gram as well as a detailed Illustration of the circuit's construction on solderless bread- board, Building these digital circuits will improve your knowledge and will be fun to boot. Many of the circuits presented here have practical real-life applications. A kit of parts for this book is available via www. ele ktor.co m / d 1 g i ta 1 ex pe ri m e nts . 1 76 pages * ISBM 97S-0-905705-97 2 £26.50 * US $42.80 Principles, Application and Design Power Electronics in Motor Drives This book is aimed at people who want to understand how AC inverter drives work and how they are used in industry. The book is much more about the practical design and application of drives than about the mathematical principles behind them. The detailed electronics of DC and AC drive are explained* together with the theore- tical background and the practical design Issues such as cooling and protection. 240 pages ■ ISBN 978-0-905705-89-7 £29. SO * US S 47,60 elektor n -2010 U ■»>«> mm £h r*#t High-end Valve Amplifiers 2 New models and applications High-End Valve Amplifiers 2 Nobody has any doubt that valve ampli- fiers produce a remarkably beautiful sound. They have a lively, deep, clear, and expressive sound* and dync-imically they do not appear to have any limitations. Menno van der Veen investigates* in a sys- tematic theoretical approach, the reasons for these beautiful properties. He devel- ops new models for power valves and transformers* thus enabling the designer to determine the properties of the ampli- fierduring the design process. You will no- tice in this book that the author not only writes about amplifier technique, but tells about the way the development of valve amplifierscan have an influence on your daily fife: even the usefulness of patents is discussed. Summarizing: new theories and solutions for perfect audio with valve amplifiers* Not only the professional and the DIY-er but everyone who wants to un- derstand valve amplifiers will read this book with much pleasure. 420 pages * 15 Rl\f 978 0-905705-90-3 £37,00 * US 559.70 v ~ v More information on the Elektor Website: www.elektor.com Elektor Regius Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel: +44 20 8261 4509 Fax: +44 20 8261 4447 Email: saies@elektor.com A must-have for audiophiles dvd Masterclass High- End Valve Amplifiers in this Mas terdass Menno van der Vee n wi 1 1 examine the predictability and perceptibil- ity of the specifications of valve amplifiers* The DVD represents 3.5 hours of video ma- terial. Bonus elements on the DVD include the complete PowerPoint presentation (74 slides), scanned overhead sheets (22 pcs), AES Publications mentioned during the Masterclass. Not forgetting the bombshel l: 2 5 El ekto r p ubl ica t Ion s a bo Lit va Ives . ISBN 97S-0-9G57O5-3S-6 £24,90 ■ US 540.20 75 Audio designs for home construction dvd The Audio Collections A unique DVD for the true audio lover* containing more than 75 different audio circuits from the volumes 2002-2008 of Elektor. The articles on the DVD-ROM cover Amplifiers, Digital Audio* Loud- speakers* PC Audio, Test & Measurement and Valves, Highlights include the ClariTy 2x300 W Class-T amplifier, High-End Power Amp* Digital VU Meter, Valve Sound Converter* paX Power Amplifier. Active Loudspeaker System, MP3 preamp and much more. Using the Included Adobe Readeryou are able to browse the a rticles on your computer, as well as print texts* circuit diagrams and PCB layouts. ISDN 97S-90-53S1 -263-1 £17,90 * US $28*90 J 81 3«»SeS“j=4!S iWi""' I5'" 1; fll af ifadinwMJ_ SHOP BOOKS, CD-ROMs, DVDs. KITS & MODULES 110 issues, more than 2,1 00 articles (July/ August 2010) 1990 through 1999 This DVD-ROM contains the full range of 1990-1999 volumes (all 1 10 issues) of Elektor Electronics magazine (PDF), The more than 2, 1 00 separate articles have been classified chronologically by their dates of publication (month/year), but are also listed alphabetically by topic. A comprehensive index enables you to search the entire DVD. ISBN 97 S -0- 9 057 05-7 6*7 Many radio amateurs in practice use two receivers, one portable and the other a fixed receiver with a PC control facility. The Elektor DSP radio can operate in ei- ther capacity, with a USB interface giving the option of PC control. An additional feature of the SJSB interface is that it can be used as the source of power for the re- ceiver, the audio output being connected to the PC's powered speakers. To allow portable s V battery operation the circuit also provides for an audio amplifier with one or two loudspeakers. £69,00 * US SI 00.00 See the light on Solid State Lighting dvd LED Toolbox This DVD-ROM contains carefully-sorted comprehensive technical documentation about and around LEDs. Forstandard mod- els, and for a selection of LED modules, this Toolbox gathers together data sheets from all the manufacturers, application notes, design guides, white papers and so on. It of- fers several hundred drivers for powering and controlling LEDs in different configura- tions, along with ready-to-use modules (power supply units, DMX controllers, dim- mers), In addition to optical systems, light d etecto rs . hardware, etc . , t hi s DV D al so a d - dresses the main shortcoming of power LEDs: heating. This DVD contains more than 1 DO articles on the subject of LEDs. ISBN 978-90-5381 -245-7 £28*50 - US $46.00 PCS , ossemb/ed and tested (June 2010) In our March issue, we introduced Sceptre, a fast prototyping system fitted with a 32- bit microcontroller. Even on its own, this board will let you produce some great re- sults, but if we add an extension board to make it easier to access all its peripherals, the Sceptre platform becomes downright powerful. What's more, if you fit this extension board into a suitable case, you 11 be able right from the start to develop a prototype that you can use properly' in a installation, with no trailing wires orbits of sticky tape holding everything together. Now that's what you call fast, convenient prototyping! Kit of parts, contains PCB and components dsPIC Control Board (May 2010) This control board has been designed for incorporation into typical industrial elec- tronics applications like controlling mo- tors or adjustment of static up- or down-converters.The objectives were to obtain a board with a large num ber of pul- sewidth modulation (PWM) generators, which enables us to control several mo- tors and static converters at the same time. The cost of the control board nee- ded to be as low as possible too. In addi- tion, it must be possible to construct the board using a soldering iron, without re- quiring use of a reflow oven. PCB, populated and tested (March 2010) This open-source & open-hardware pro- ject aims to be more than just a little board with a big microcontroller and a few use- ful peripherals — it seeks to be a fast pro- totyping system. To justify this title, in addition to a very useful little board, we also need user-friendly develop ment tools and libraries that allow fast implementa- tion of the board’s peripherals. Ambitio- us? Maybe, but nothing should deter you from becoming Master of Embedded Sys- tems Universe with the help of the Elektor Sceptre. PCB, populated and tested, test software loaded (excluding Bluetooth module} Art a UOUWJ 91 * £K4 DO • US S143 GO 82 Prices and item descriptions subject to change. E. & O.E n-zoio elektor November 201 0 (No, 407) uss + + + Product Shortlist November : See www.elektOf.com * + + October 2010 (No. 406) CL- 3 Digital Rotary Combination Lock 1 0002641 .. .. Atmel ATTlN Y231 3 '20PU, programmed , 8.00 1 2,90 WheelieCT 100479-71 .... Kit of parte upgrade kit controller board + 2x Hall sensor board 1 05,00 1 69,40 September 2010 (No. 405) Elektor Project Case 1 00500-71 „„ Predrtlled Lexan sheets with standoffs 1 4.90 .24. 1 0 Digital Multi 'Effects Unit 090835-31 ....EEPROM24LC32 4.00, 6.50 090835-41 „,.ATmega8-16PU 8.30 13.40 090835-42 .... ATtiny231 3-20PU 830 .1140 090835-71 Kit of parts including PCBs. programmed controllers andEEPROM 165.00 266,20 Dual Voltage) Current Display 100166-71 „„ Kit of parts End . PC B, i te m -4 1 . LCD „ 62, 00 100.00 Vision System for Small Microcontrollers 090334-1 „ PCS 19,90 32,10 090334-41 .... PIC16F690-S/P, programmed. 8.00 12.90 ]u \yf Augu s 1 20 1 0 [N o.4 03 / 404 ) The Elektor DSP radio 100126-41 ....ATmegaISS PU P* ■ "1 ■ f + P ■ »■* ■ + ■• ■ ►** + ■ a ■ + ■ »■ u M P“-B “ ¥ 12.50 .20.20 1 00 1 26-91 . PCB p assembl ed and tested . 1 49.0 0 240 ,4 0 Daggerboard Position Detector 08030 7 -4 1 .... . PI C 1 6F628 A-Dl L-1B, prog ra mm ed 8.00 .12.90 PIC RJ45 Cable Tester 090643-41 „„ PIG 6F72, programmed .......8.00, 12.90 3D LED Pyramid 0909404 1 .... ATtiny23 1 3-2QSU, programmed S,00.,„.„ 1 2,90 DigitalThumbwheelSwitch 090538-41 .... ATtiny23 1 3 dlp20, programmed 8.00 1 2.90 Whistler: Electronic Trainer) Coach 10020341 .. .. PIC1 6F88 DIP1 8, programmed 8.00.......12.90 Solar Cell Battery Charger) Monitor 090544-41 .... PIC16F877A, programmed 16.50. ...... 26. 70 Universal Timer with Zero Standby Current 09053441 ATTiny23 13, programmed. 8.00 12.90 Tiny Timer 091044-41 ATtiny231 3, programmed 8.00 12.90 Universal PWM Driver 0908564 1 .... PIC1 6F62S-1 ,'P. programmed ....... 8 + 0O..., + „ 1 2.90 BinaryCtock 090187-41 .... PIC1 65F877-20/PDIP40, programmed 18,50 29.90 USB Tilt Sensor 070829-41 .... AT megaS-l GAU (TQFP), programmed S.00 3 2.90 090645-91 .... MM A7G20 breakout board ♦ 8,50 1 3.80 Bench PSU for PC 090863-41 .... PIC 1GF61 64/P. programmed 8. 00 ....... 12.90 Sailor’s Battery Meter 0901 1 7-41 .... PIG 6F690 DIP. programmed 8.00 1 2.90 Tiny Pulser 09044441 .. .. AT TINY 1 3-20 P4, programmed 8.00 12.90 MicroMinimal Thermometer 09063441 .„. ATTlN Y1 3(A)dip8. programmed 8,00 ...12.90 Waterproof Bathroom Switch 090537-41 .... ATtinyl 3A, programmed 8.00 12,90 Lights Control for Model Cars 09083441 Programmed controller ATt i ny 4 5 DIP-8 S,0Q„„.„ 1 2.90 Modeller's Clock 09002341 .... PIC1 SLF1320 I/P DILI 8, programmed.......... 8.00,,,,.,, 12.90 High-End Valve Amplifiers 2 ISBN 978-0-905705-90-3.,,. £37.00 US$59.70 Power Electronics in Motor Drives ISBN 978-0-905705-89-7,.,, £29.50 US $47.60 Elektor Personal Organizer 201 1 ISBN 978-90-5381-259-4.... £24.90 US$40.20 50 PIC Microcontroller projects ISBN 978-0-905705-88-0,... £36.00 US $58.10 DVD The Audio Collection 3 ISBN 978-90-5381-263-1 .... £17.90 US $28.90 Masterclass DVD High-End Valve Amplifiers ISBN 978-0-905705-86-6.... £24.90.... US$40,20 DVD Elektor 1 990 through 1 999 ISBN 978-0-905705-76-7,,.. £69.00 ...US $100.00 DVD LED Toolbox ISBN 978-90-S381 -245-7,... £28.50 US$46.00 DVD Elektor 2009 ISBN 978-90-5381 -251-8,... £17.50 U5 $28.30 Elektor DSP radio Art. #1001 26-91 £149.00 US$240.40 Reign with the Sceptre Art. it 090559-91 £89.00 ...US $ 1 43,60 OBD2 Mini Simulator Art. #080804-71 £84.00 US$135.50 InterSceptre Art.# 100174-71 £116.00 ...US $187.10 WheelieCT Art. #100479-71 £105.00 US $1 69.40/ www.elektor.com/shop or use the Order Form near the end of the magazine! Elektor Reg us Brentford 1000 Great West Road Brentford TW8 9HH * United Kingdom Tel, +44 20 8261 4509 Fax +44 20 8261 4447 Email: sales!? elektorxom elektor 11-2010 S3 COMING ATTRACTIONS NEXT MONTH IN ELEKTOR Stroboscopic PC Fan Many PC users constantly attempt to adorn their computers with visual gadgets whose main purpose is to draw attention, PC cases with a transparent side panel in particular offer super opportunities for special effects. Our circuit based on an ATtrny25 micro con- trols an LED in such a way as to make the PC ventilator fan blades appear to stand still, turn slowly in either direction, or turn at intervals. A fascinating effect] Ethernet Module Adding an Ethernet connection to your circuit allows you to easily capture data from sen- sors, actuators and other devices, through the Internet. Unfortunately, many electronics enthusiasts find it hard to master or at least get to grips with the relevant hardware and software. Now, a handy solution is found in a small module comprising a PIC micro with an on-chip Ethernet transceiver, an isolating transformer and a network connector. The project is completed with a free software library and lots of examples to get you going. Elektor Embedded Special In the December 2010 edition you can look forward to finding a special insert totally dedi- cated to embedded projects. Space allowing well be covering: an infra-red thermometer, a USB-to-RS485 converter with galvanic isolation, an intelligent modular LED display, a breadboard interface for an XPort module, a carrier board for the Arduino Nano, several projects for our own MiniModiS and lots morel Article titles anti magosine . onjems subject to change; please check the Magazine tab an www^eleklar.cQtw Elektot UK/ European edition: on sate No vemember iS. 2010. Elektor USA edition: published November 1 r. 2010. w. elektor. com www.elektor.com www. ktor.com www.elektor.com www.elektor.com Elektor on the web fafUjtf All magazine articles back to volume 2000 are available online In pdf format. The article summary and parts list (if applicable) can be instantly viewed to help you positively identify an article. Article related items are also shown, including software downloads, circuit boards, programmed ICs and corrections and updates if applicable. Complete magazine issues may also be downloaded. In the Elektor Shop you'll find all other products sold by the publishers, like CD-ROMs, DVDs, kits, modules, equipment, tools and books. A powerful search function allows you to search for items and references across the entire website. & ,i- " = ... SriifcsentK nip* Also on the Elektor website: Electronics news and Elektor announcements * Readers Forum PCB, software and e-magazine downloads • Time limited offers FAQ, Author Guidelines and Contact y F > TOlfrt. y mflWD-HOMi y tun t y E’ o ' 001 yftUt ,n,T -K ~ V it aRf tyw-J Irpf. ntnttbAe * 1 j' S,nj4(K*T ’T.ff KHW ur^iun nmcrt M*irte em* «. m T r K"Ai4 r r~ K'-W wir ainft* !KM L • */ ' ny Cm, II ml * ti-M J< (me- ■ 4UJ ’ C H DISCOUNT Kft Of pflrts ElektortVh * Q It ftMKEar NkgUlM y y E'icv Cwi-li y Programming Embedded PEC MitroronJf dIIets bdtort* -a. t L J - ' 1 1 -H- jty Cc."^ t ' E‘-!4 l k*uj !“|j 1 : :• dt. O FWPhulj B u r, "?id U« 1 « * a-i L-u p 'c-arj rump - . ! >§ . • t « j 5 *z - ■ * -r and. 1*f h-nnla^rv %. | -n it! %Ol" !«*>■ Tt Kt O-.'t- •.'•i Ik- TV J-p-r 1 *-wt **± v *«*■ *■-. ert * l-rl-) £41. elektor.com USA and Canada residents should Lise S prices. :ind send the older form to; Elektor US PQ Box 180 Vernon CT D60ti6 USA Phone: 8G0-«7S-219y Fa*: 860-871-0411 f mail: safes '* dektar.com bt+BIB- *■■■■■ Yes, I am taking out an annual subscription to Elektor and receive the E-book Microcontroller Basics totally free! (Please fill in your e mail ad dress below) I would like: □ Standard Subscription (11 issues) Subscription-Plus (1 1 issues plus the Elektor Volume 2010 DVD-ROM + exclusive access to www.elektor-plus.com) 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. METHOD OF PAYMENT (see reverse before ticking as appropriate) _ | Sank transfer [~J Cheque (UK-resident customers OIMLY) □ TIsT □ Expiry date: Name Verification code: Address + Post code Please send this order form to Tel Erne?;/ Dofe Signature ELI 1 Elektor Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel.: -*-44 20 8261 4509 Fax: *44 20 8261 4447 www.elekt or.com subscriptions elektonxom % ORDERING INSTRUCTIONS, P&P CHARGES 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 should send orders, except for subscriptions (for which see below), to the USA address given on the order form. Please apply to Eiektor US 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 £1 1.00 (Priority) HOW TO 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. 402702 1 1 held by Eiektor International Media BV with The Royal Bank of Scotland. London. I BAM: GB96 ABNA 4050 3040 2702 1 1. BIO ABNAGB2L, Currency: sterling (UKP). Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Eiektor 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, CCredtt card VISA and MasterCard can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL- protec ted for your security, COMPONENTS Components for projects appearing in Eiektor 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 guaran- tee 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. Eiektor does not accept responsi- bility 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 adver- tisements) 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 Eiektor 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 Eiektor 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 Eiektor other than to supply goods as described or, at the option of Eiektor, to refund the purchaser any money paid in respect of the goods. Law Any question relating to the supply of goods and services by Eiektor shall be determined in all respects by the laws of England. January 2010 ■ i t -t- i- t- SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION Standard Plus United Kingdom & Ireland £49.00 £61.50 Surface Mail Rest of the World £63.00 £75.50 Airmail Rest of the World £79.00 £91,50 USA £64,95 See www.efektor.com/usa Canada £75.95 for special offers HOW TO PAY Bank transfer into account no. 4027021 1 held by Eiektor International Media BV with The Royal Bank of Scotland, London, IBAN;; CB96 ABNA 4050 3040 2702 1 1 . BIC: A8NAGB2L Currency: sterling (UKP). Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Eiektor Electronics. We can only accept sterling cheques and bank drafts from UK-resident cus- tomers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. 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 permanent 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 studentship signed by the head of the college, school or university faculty. A standard Student Subscription costs £39,20, a Student Subscription-Plus costs E5 1 .70 (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 2010 k Come see us at electronica 2010 components | systems | applications Munich, 09-12 November Visit elektronica 201 0, the world’s leading trade fair for components, systems and applications. Meet the makers of Elektor; Hall A5 / Booth #531 New Munich Trade Fair Centre Opening hours: Tuesday-Thursday 09-1 1 November 9 a*rn* - 6 p.m. Friday 12 November 9a.rrL-5p.rn* ^ electronica 2010 camDanenti systems 1 appJotiorv Eingang West Entrance West Further information at www.electronica.de/.en Index of Advertisers Astrabe. Showcase uwj>a 5 trobs.com ... 7S Alomic Programming Ltd. Showcase ,:v.v, atomtcprogmmmiflg. com . 78 AvrI Research. Showcase . . . mrA.awtresearrtico.uk .73 Beijing Draco Electronics Ltd vm w. siocQ.com 57 Beta Layout. Showcase *vv/u pcb-pool.com 59. 78 Black Robotics. Showcase . a tv 0 i 3 cmDGitcs.com . * 78 By Vac. Showcase . , . . WWW dyvac. com ...... ♦ 78 CEO A, Showcase. ... www. ceda.in 78 Designer Systems. Showcase ^wvMeSignmystems.coMk 78 Easy sync. Showcase . . ivtv.v easysynt.co.uk , * * 78 Einec, Showcase v/ww.etnec coni . . 78 Embedded Adventures. Showcase a . w r emOsbbeCadvsntiires.com 73 Embedded Live tvww. em^tf tfetMra.com 53 Eure circuits vat/,*. eoroctrcufts.com . 23 First Technology Transfer Ltd. Showcase www.ttt co.uk - . ■ 78 RexiPanel ltd. Showcase wwwMxipanet.com 78 Future Technology Devices. Showcase wwwJtdiChip.com . . . . - 9, 78 Hameg, Showcase www.hameg com 78 HexWax Lid. Showcase www.bexwax.com — 79 Lahcenter, . , * mwJ3bcenter.com 83 Linear Audio. Showcase. Microchip + ............. . MikroElektromka, MQP Electronics, Showcase. Nurve Networks NXP Contest. www.isrw3raudio.net . .79 wwwmiccochip.com/xIp 1 3 www.mikroe.com 3 wwmmqp'CQm. 79 www. xga m es ta tio fl.com .59 m/w.circoiwe}lar.com'ni(pmbetid$sigrichaiisnge . . 2 Pico. . . , , . www.picotecticom?scQpe2023 _ , ► . . .39 Quasar Electronics mm. quasarefectronics. com *15 Robot Electronics. Showcase www.robot-efecfronics.couk 79 Robotic. Showcase * . www.roboUQ.coMk ♦..,*> > 79 Showcase . „ 78. 79 Sleorn SKD0 Lite, Showcase www.kdbMeorn.com/ref25 79 Tern welt Corporation . . WWW. ternwett. com. tw 1 1 USB instruments. Showcase wmv.usb-instnrmetus com . . 79 Virtins Technology, Showcase . . www.virtrns.com , 79 Advertising space lor Ihe issue 23 December 2010 may be reserved not laler than 23 November 2010 with Husan International Media - Cambridge House - Gogmore Lane - Chertsey, Surrey KT16 9AP - England - Telephone 01932 564 999 - Fax 01932 564 998 - e-mail; ros, eigar@husonmedLa.com to whom all correspondence, copy instructions and artwork should be addressed. elektor 11-2010 CHECK All Connections Routed - CHECK Power Planes Generated - CHECK No Design Rule Violations Design with Confidence: The latest version of the Proteus PCB Design Software provides a multi stage Pre-Production Check which will detect and prevent a variety of common mistakes prior to your boards being sent for manufacture. PROTEU5 DESIGN SUITE Feature Board Autopiacement & Gateswap Optimiser. Direct CADCAM, ODB++, IDF & PDF Output. Integrated 3D Viewer with 3DS and DXF export Mixed Mode SPICE Simulation Engine. Co-Simulation of PIC, AVR, 8051 and ARM7. Direct Technical Support at no additional cost. Hardware Accelerated Performance. Unique Thru-View™ Board Transparency. Over 35k Schematic & PCB library parts. Integrated Shape Based Auto-router. Flexible Design Rule Management. Polygonal and Split Power Plane Support All levels of the Proteus Design Suite Include a world class, fully integrated shape-based autorouter at no additional cost - prices start from just £150 exc. VAT & delivery Electronics 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