Cloud Altimeter 3 the sky is not the limit ■r* f f ■Ljn -n-„. £'Ji 'J'J- ‘I; 39 } 14 - & SlU' 1 ^sssa 1 - [«’ -rftlr r . W^S® W®> if i fHftfc * ^yrw for major applications a hands-on test of pipe & wire locators Worry-free Drilling ml USB MADE EASY www.ftdichip.com Handles USB host interfaces ad teta usingthe in-built 16-bit entaocedNOUti Flash and 16kbyteRAM. Royalty-free flexible 17 languagp kernel to provide the ill yi i wlifc i their own firmware: Libraries for several USBctasesHB'fle! Interfaces to DART, FIFO, SR 3»e; SR Ha Multiple package size optiasiodtaAtgV compatible option, provide aad fcui< e different applications. Time to market can beretfcEsfoaneliie wide range of available deudtanent mod Development a ries and RTOS u to customise support for the WE MAKE IT SIMPLE MIKROELEKTRONIKA is a well-known manufacturer of a wide range of development tools, compilers for various microcontroller families and books for electronics. Our goal is to provide our customers with reliable, high-quality, yet cost-effective products as well as the first-rate service EXPERIENCE THE EASE WITH OUR DEVELOPMENT TOOLS Mikroelektronika manufactures competitive development systems suitable for programming and experimenting with different microcontroller families such as PIC® dsPICMOF d!sPIC®33/PIC®24, PIC32 f ", AVR®, PSoC®, 8051 and ARM* They feature numerous on-board modules but also have the possibility of improving their performance by interfacing additional modules ordered separately. MAKE A GREAT CODE FOR YOUR MICROCONTROLLER WITH OUR COMPILERS Mikroelektronika also manufactures compilers and integrated development environments for popular microcontroller families. Mikroelektronika offers C, BASIC and Pascal compilers for PIC* 1 , dsPIC®30/33-PIC a 24, AVR® and 8051 microcontrollers. • FREE PRODUCT LIFETIME TECHNICAL SUPPORT - FREE UPDATES OF NEW COMPILER VERSIONS ■ WIDE-RANGE OF SUPPORTED MICROCONTROLLERS • NUMEROUS EASY TO USE PRACTICAL EXAMPLES LEARN MORE ABOUT MICROCONTROLLERS AND HOW TO USE THEM WITH OUR BOOKS What are microcontrollers, anyway? Electronics built into one single chip capable of controlling a small submarine, a crane or an elevator. . . It's up to you to decide what you want them to do. Just dump a program containing appropriate instructions into the chip.,. EXPLORE CAPABILITIES OF MICROCONTROLLERS WITH OUR ACCESSORY BOARDS Accessoiy boards are designed to allow students and engineers as well to easily experiment and explore the capabilities of various microcontrollers when connected to peripheral moduies such as ADC, DAC, CAN communication module, Ethernet, IrDA, MP3, RS485 module etc Mikrollektronika DEVELOPMENTTOOLS I COMPILERS I BOOKS GET IT NOW www.mikroe.com P B I Energetic with energy Although we are all electronics-minded people here at Elektor and this edition has a focus on sustainable energy sources and new ways of reducing energy consump- tion, it's curious and worrying to note that it took decades until electronics finally gets utilized to reduce the negative effects of, and created by, electronics itself. To be fair, that's the electronics at the heart of electrical equipment doing the actual amps guzzling from the wall outlet. It also underscores the powerful effect of good electronic design in high-energy consump- tion systems. Let's consider an indus- try-grade electric heater with a remote thermostat “embedded style’. As much as the microcontroller manufacturers will like to tell you that their 32-bit XYZ product is now down to nano-amp standby current and awake in nanoseconds in response to a non-maskable interrupter a key press, you should not care too much and get down to programming. Actually one second less of heater-on time due to smarter program- ming of the micro will result in a real energy saving and less carpet eating by the CFO as a result of the monthly energy bill (deliv- ered to him/her by post). This year’s Embedded Systems show in Nuremberg was all about ‘green approaches’ suitably backed by “rapid prototyping — see page 44. On the face of It, that's a logical combination — if you can't do the programming and prototyping in like’ underio minutes including removing the kit from the plastic blister packaging you are wasting valuable energy. Interfacing microcontrollers to the real world has never been easier and the traditional gap between the pale pizza -fed programmer and the construction engineer wielding big spanners and “doing the AC stuff' seems to vanish rapidly. The dsPIC board on page 20 and the associated solar heat collector application on page 26 are green as can be but fail miserably in terms of rapid prototyping, so don’t tell anyone and optimise the system programming like a good engineer should. We’re providing all the materials and design information to get you going, like a good publisher should, and it shall be our silent mutual under- standing, satisfaction and enjoyment once the system operates exactly as you want it and you’ve experienced a steep learning curve. Agreed? We put a lot of energy in it — not all electrical I’m glad to say, Jan Bui ting, Editor 6 Colophon Corporate information on Elektor magazine, 8 News & New Products A monthly roundup of all the latest in electronics land. 14 Clean Power from Hydrogen Hydrogen appears to be a very promising candidate lor mobile applications so let’s have a look at what you can actually do with fuel cells. 20 dsPIC Control Board A heavyweight control board for Industrie applications like motor control. 26 Solar Thermal Energy Regulator Put this board is at the hub of your solar collectors, valves, pumps and hot water storage tanks. 32 Worry-free Drilling Thirteen pipe and wire locators tested and compared for their ability to detect electrical wiring, wood and water pipes inwalls, 40 Make Room for the Roomba! At Elektor we like to take things apart. This month a Roomba robot vacuum cleaner was our unsuspecting victim. 42 Design Tip: Star LED instead of incandescent lamp Caveats and considerations on one for one replacement, which may not be feasible In all cases. 43 Measured again Further investigation into power factor correction (RFC) of LED lamps — with worrying results. 44 Embedded World 2010 A report on the world’s largest show on microcontrollers and embedded technologies. 4 15-2010 elektor CONTENTS 20 dsPIC Control Board The control board based on the dsP!C3oF6oioA microcontroller ‘Plus’ has been designed for incorporation into typical industrial electronics applications like controlling motors or adjustment of static up- or down-converters. 26 Solar Thermal Energy Regulator This board is useful for regulating installations comprising several sets of solar collectors with different orientations or configurations with several hot-water storage tanks, requiring several valves and pumps to be controlled. 32 Worry-free Drilling A pipe and wire locator (called stud locator in the USA) can come in very handy for locating all sorts of things inside walls before you start drilling, including electrical wiring, pipes, and even joists or studs. We tested thirteen different models in the Elektor lab to see what they can (and can’t) do and how deep they can find studs, joists, pipes and wiring inside walls. 48 Cloud Altitude Meter l AirControl f is a portable instrument indicating cloud altitude by measuring air temperature and humidity and then silently doing a mass of scientific calcula- tions, It should make an interesting meteorological tool for people who keep an eye on the sky. Volume 36 May 2010 no. 401 46 The making of the dsPIC board (2) Straight from the Elektor lab. the how-it- got-designed story of the dsPIC control board featured in this issue. 48 Cloud Altitude Meter Here’s Alrcontrol, a portable instrument that will tell you the height of the cloud base straight above you, 54 in-vehicle C 0 2 Meter This fast responding C 0 2 meter for use in cars reliably detects air conditions that can lead to loss of concentration. Time to open a window! 58 VisiOLED An ATM18 based wireless door opener using RFID for visitor identification, with his/her face appearing on an OLFD display. 64 Colossus — the Rebuild Resurrected and now on display at Bietchley Park, the 1943 computer with its valve-based XOR functions that helped crack Enigma encrypted messages in WW2, 68 Low-cost Electric Vehicle Charge Station Here comes the roadside coin-operated kWh vending machine; FV owners will like this! 74 Retronics: Grid Dipper (ca. 1950) Regular feature on electronics 'odd & ancient’* 77 Hexadoku Our monthly puzzle with an electronics touch. 84 Coming Attractions Next month in Elektor magazine. elektor 05-2010 5 elektor international media bv Elektor Internationa! Media provides a multimedia and interactive platform for everyone interested in electronics. From professionals passionate about their work to enthusiasts with professional ambitions. From beginner to diehard, from student to lecturer, information, education, inspiration and entertainment. Analogue and digital; practical and theoretical; software and hardware. the sky Is no* the limit ' . for major applications w rs, .« ektor ■ «!*(» ■ uti Worry-free Drilling ANALOGUE • DIGITAL MICROCONTROLLERS & EMBEDDED, AUDIO • TEST & MEASUREMENT Volume 3& p Number 401 1 May aono ISSN 1757- 0875 Llcktor aims at inspiring people to master electronics al any personal level by presenting construction projects and spotting developments in electronics and information technology, Elektor International Media, Regus Brentford, iooo Great West Road, Brentford TWB gHH, England, TeLf+44) 20S 261 4509. fax: ( +44) 20*8 261 4447 ww.V-clektoT.com The magazine is available from newsagents, bookshops and electronics retail outlets, or on subscription. Elektor is published n times a year with a double issue for july & August . Elektor is also published in French, Spanish, American English. German and Dutch. Together with franchised editions the magazine is on circulation in more than 50 countries. International Editor . Wisse Hettlnga (w.hettinga@elektor.nl) ]an Buiting (editor^e I ektor.com) Hairy Bag gen , Thijs Bee kers, Eduardo Corral, Ernst Krempelsauer.Jens Nickel, Clemens Valeris. Antoine Authier (Head), Ton Giesberts, Luc Lemmons, Daniel Rodrigues. Jan Visser, Christian Vossen Editorial secretariat: Hedwig Hennekens (sec retariaat@el ektor.nl) Giel Dels, Mart Schroijen Paul Snakkers Carlo van. Nistelrooy Elektor International Media, Regus Brentford, 1000 Great West Road. Brentford TW8 gHH, England, Tel. [-44) 261 4Sog. fax: (+44) 203 261 4447 I nte met : WWW, elektor. co m /s u bs 6 05-2010 elektor Specifically for audio designers, audiophiles, DIY enthusiasts etc. Masterclass including . 3. & howso*Vidflom8lfipal . PowerPcinL presentaNosi l7 * Scanned overhead Shee l5! . pj^ putficalions mention me Masterclass BONUS: 25 Elektor publication about valves ektor In this Masterclass Merino van der Veen will examine the predictability and perceptibility of the specifications of valve amplifiers. Covered are models that allow the characteristics of vafve amplifiers to be explored up to the limits of the audible domain from 20 Hz to 20 kHz. This then leads to the minimum stability requirements that the amplifier has to satisfy. The coupling between output valves and output transformer are also modeled. Including: * 3.5 hours of Video material PowerPoint presentation (74 slides) ■ Scanned overhead sheets (22 sheets) ■ AES Publications mentioned during the Masterclass Contents: Part 1 Preamplifiers Equivalent schematics, limits in the frequency. Part2 Power amplifiers Modeling of class A to B, interaction of the specif cations for Out- put Transformers (OPTs) and frequency range and damping factor, PartB Negative feedback How negative feedback can be done right, remarkable experi- ments in the project. Part A Output transformers Limitations and possibilities of the output transformer. ISBN 978-0-905705-86-6 * £24.90 - US $40.20 Further information and ordering at www.elektor.com/shop A Enia if: s u bscrtpt i ons@ele ktor.co m Rate*, and termed re given on the Subscription Order Form. £ I eklcr international Media b.v. P.O.Box ii Ml -6114-ZG Su stereo The Netherlands Telephone: {+31} 46 4389444,, Fax: (+31) 46 4370161 Distribution: Seymour, 2 East Poultry Street. London ECiA, England Telephone: ^44 207429 4073 UK Advei Using Huson International Media, Cambridge House, Go g mo re Lane, Chertsey, Surrey KT16 gAP, England. Telephone: +44 1932 564999, Fax: +44 1932564998 E m a i I r r.e I g ar % h .11 so n m ed i a. com J n ternet: www, huso nmedia.com Advertising rates and terms available on request. Copyright Notice The circuits described in this magazine are for domestic use only. All drawings, photographs, printed circuit board layouts, programmed Integrated circuits, disks, CD-ROMs, software carriers and article texts published in our books and magazines {other than third-party advertisements) are copyright Elektor International Media b.v. arid may not be reproduced oi' 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 par 1 of tiiis publication is stored in a retrieval system of arty 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 patents) or other protection. The submission of designs or articles implies permission to the Publisher Lo alter the text and design, and to use the contents in other Elektor International Media publications and activities. The F^ubfisher cannot guaran- tee to return any material submitted lo them. Disclaimei Prices and descriptions oF publication-related items subject to Change. Errors and omissions excluded. •£> Elektor I n terrvufonal Media Lev, ioag. Printed in the Netherlands, elektor 05-2010 7 NEWS & NEW PRODUCTS Active cell balancing chip for high-cell-count Li-Ion battery packs AtmeLs new battery management circuit ATA687G is daimed to be the industry's first solution that features active cell balancing with capacitors or inductors for high-cell-count Li- Ion batteries supporting supply volt- ages up to several hundreds volts such as used in electncal/hybrid vehi- cles, e-bikes or uninterruptible power supplies. The advantage of an active cell bal- ancing is that it avoids the energy loss as occurs with passive balancing methods. The charge is transferred with a shuffle capacitor or inductor from one cell to another with nearly no losses, leading to higher efficiency and a longer battery life, in passive methods, cells of large battery stacks are balanced by discharging overcharged cells through a resistor. In a typical battery pack, no cell is identical to another. The cells differ in the state- of-charge* self-discharge rate, cell impedance and capacity, and aging. After several charge and discharge cycles, this may result In increased voltage differences between the individual cells. This effect will impact the cells where several cells may no longer be properly charged, with the possibility of weak cells being over or undercharged. This will decrease the overall lifetime of a battery. Active balancing is a perfect method to constantly ensure that all the cells have the same state-of-charge. The new 1C monitors up to six battery cells and can be stacked up to 1 6 times. For the highest communication robustness between the stacked iCs, the 1C features level shift- ers based on current sources. In addition, the ATA6870 includes an 8-bit checksum monitor that helps further increase data communication robustness. The ATA6870 provides a dedicated AD converter for each battery cell to be monitored. This enables the device to simultaneously measure the voltage of all cells within one battery string for precise state-of-charge determination of Li- ton battery cells. Same as 1C, the integrated power supply for the microcontroller can be stacked. Therefore, the current required to supply the microcontroller can be taken from the top cell and be fed back Into the battery string's bottom cell. Asa result, the microcontroller’s current con- sumption will not cause any cell imbalance helping designers save expensive high-voltage devices. The on-board balancing capability can be used for various balancing techniques like passive balancing with a resistor or active balancing with a capacitor or an inductor, vwwv.atmd,com/dyn/products/product_card.asp?partjd i2 464 i (100266-!) Digital I/O board from Parallax The Parallax Digital I/O Board Kit enables your microcontroller to interface to high voltage circuits allowing you to read up to 8 opti- cally isolated inputs and control up to 8 iso- lated outputs. Inputs can be a voltage from 5-30VDC (AC compatible) and outputs can be either mechanical or so I id state relays that can switch up to 1 2 A toads, such as cooling fans, solenoids, heating elements and more. Simple parallel input/output control for ease of use or you can use the serial inter- face to minimize I/O pin usage. The logic circuits operate from 33 V to 5 V making ■ : i tT5 : . Si' — r ’ * •Si ( f 1 ! 1 1 « m * them compatible with most microcontrol - lers. The ICs in the kit are all socketed mak- ing replacement easy should it ever be nec- essary. 8 green and 8 red LEDs indicate the status of input and outputs. 2 yellow LEDs indicate relax ogic power, inputs can be configured re handle a different range of input voltages. T ne new kit retails at $49,99, In the K. contact Milford Instruments or Spin vent. On :he Parallax website, search for 27 11 3\ vwvw.parallax.com {100266-II) Dual synchronous buck regulator for ‘green’ applications and battery- powered devices Inters s 8LS0S8 dual synchronous buck i'-: . : - 5 exceptionally high power conver- sion e^’oency and low quiescent current in an l ra-small package. The ISL8088 is an SOO channel dual step-down regulator v. megrated power IVlOSFETs, The 2.7 V to 5 5 . Input voltage range and 35 micro- emos q j escent current make the ISL8088 ideal to ‘ battery powered and other ‘Green j , ver ap p nations. The selectable operation oetv.ee- forced PWM mode and automatic - /.Y D FM mode maximizes battery life. Feat^h-g a switching frequency as high as 2,25 MHz. along with internal digital scfi-st art and internal compensation, the ISLSCSB can reduce tota [component count, cost and overall size for a wide range of appL cat ons. External synchronization capa- bility up to 4 MHz reduces beat frequencies in multiple 1C systems. Independent Enable and Pow erCood signals for both channels provide inherent sequencing capability in a multi-chip system. Protection features include peak current limiting, short circuit protection and thermal shutdown for reli- able operation under adverse conditions. The ISL8088 is designed for a wide range of products including digital cameras, per- sonal media players, printers, copiers, stor- age drives, LCD-TVs, set-top boxes, graph- ics cards and automotive applications. In 8 05-2010 elektor NEWS & NEW PRODUCTS addition, it can be used in portable medi- cal instrumentation and industrial process control systems, providing the benefits of low-cost, flexible operation, low-power and ultra-small footprint. The ISL 8 Q 88 is available now in compact, space-saving 10-lead DFN packages. www. \ ntersi I . com j products/ de vi cei nfo . asp?pn=ISL 8 o 88 ( 100266 -IV) low resistance current sense resistors Providing design engineers with robust resistive devices capable of withstanding large surge currents, IT electronics IRC offers two series of low resistance metal alloy current sense chip resistors. Desig- nated the ULR and LRMA Series, the resis- tors feature a metal strip construction capa- ble of withstanding high temperatures and large currents. The ULR and LRMA resistors are constructed with a low temperature coefficient resistive alloy that provides a large mass, or cross sec- tion, for carrying current when compared to film-based devices. This large mass is claimed to provide a robust structure, ena- bling the resistors to withstand large surge currents resulting from fault or other tran- sient conditions that may exist in detection and protection circuits. The ULR and LRMA Series resistors are ideal for use in current sense circuits in power electronics and automotive systems. The RoHS compliant and halogen free ULR and LRMA Series resistors feature low ICRs (50, 75, and 1 00 ppm/‘C) and inductance values. Resistance ranges from 0.5 m£l to 100 m with power ratings from 1 W to 3 W, depending on device. The ULR Series resistors are offered in 1 206, 201 0 and 251 2 chip sizes, while the LRMA Series devices are available in 081 5, 1 206 and 2512 chip packages, www. i rctt .co m/produ c ts.a s px?f rmCate go ry =22 ( 100226 -V) Lotus Evora 414E hybrid with sound contouring Introduced at the 80 th International Geneva Motor Show, the Lotus Evora 41 4E Hybrid has a plug-in series hybrid drive system and new technologies for enhanced driver involvement. The Lotus Evora 41 4E Hybrid, so-named because this latest environmentally- focused tech- nology demonstrator from Lotus Engineering produces 41 4 PS (306 kW) of power, promises breathtaking performance from a highly efficient propulsion system. The concept show- cases new developments in plug-in, range -ex tended electric propulsion, new electronic technologies to enhance driver involvement, the adaptability of the Lotus Versatile Vehicle Architecture (WA) that underpins the Evora 41 4E Hybrid and a dramatic new roof system and interior concept from Lotus Design. Through all of these aspects it ultimately dem- onstrates the exceptional ability of Lotus Engineering to integrate and develop advanced technologies for exciting, efficient, high performance niche vehicles. The range extended electric drive of the Evora 41 4E Hybrid consists of two electric motors driving each of the rear wheels independently via single speed geartrain, inte- grated into a common transmission housing, thus enabling torque vectoring for stabil- ity control of the vehicle. Electrical power is stored in a lithium polymer battery pack optimised for energy density, efficiency and high power demand, mounted in the centre of the vehicle for stability and safety. Additional range is provided by the Lotus Range Extender engine, an optimised 1 ,2 litre, three-cylinder engine, designed specifically for series hybrid vehicles. The drivetrain is designed to combine astonishing performance with efficient, low emissions driving. Driver involvement is enhanced by the Incorporation of HALOsonic Internal and External Electronic Sound Synthesis technologies from Lotus and Harman International, which provide sound contouring within the cabin and improve pedestrian safety outside the vehicle. Integrated with the HALOsonic technology, the Evora 414E Hybrid also show- cases a brand new technology from Lotus Engineering, a sports mode that simulates a 7 speed, paddle shift transmission that combines exceptional driver involvement fora hybrid sports car and optimised energy recuperation. The Evora 41 4E Hybrid has a total hybrid range of over 300 miles (483 kilometres). The vehicle energy storage system Is made up of the latest Lithium Polymer battery chemis- try providing 1 7 kWh energy storage capacity. The battery pack is optimised for energy density, efficiency and high power demand, with over 100 kW discharge capability. For everyday commuting journeys, up to 35 miles can be travelled using battery power. The battery can be charged overnight using a conventional domestic mains supply through a socket concealed by the rear number plate. This permits the vehicle to oper- ate with zero tailpipe emissions. For longer journeys, exceeding the battery capacity, the highly efficient range extender engine is used as a generator to supply the motor with electrical power and top up the battery. www. I otus ca rs .co.uk (1 0 0266 - III) elektor 05-2010 9 NEWS & NEW PRODUCTS Key British computer innovator to speak at Britain’s first Vintage Computer Festival in June One of the leading innovators of British microchip and computing technology will be a special guest at Britain's first Vintage Com- puter Festival to be held at The National Museum of Computing at B letch ley Park on 1 9-20 June 2010. Sophie Wilson, co-designer of the BBC micro - the machine that introduced computing to a generation - and developer of the RISC / ARM processor - the chip at the heart of over 90% of mobile phones - will talk about her time and experiences at Acorn, when British brains led the world in the microcomputer revolution. “We are thrilled to have Sophie Wilson as a key speaker at this first Brit- ish Vintage Computing Festival” said Simon Hewitt, VCF Programme Co-ordinator at TNMOC "Anyone whose first computing experience was on a BBC B, and anyone who uses a mobile phone will be familiar with her work. This is a rare opportunity to hear her speak ” Hewitt continued; ‘The list of exhibitors, speakers and special guests is growing rapidly and we have some excellent surprises in store. Tickets, costing only £10, will be going on sale in April and we will be releasing more news as speakers and exhibitions are confirmed," Already other confirmed speakers include Christine Finn, print and broadcast journalist, and author of "Artifacts: an archaeologist's year in Silicon Valley', ZX Spectrum expert and former games developer Chris Smith, and Karl Pantling-James from the Retro Computer Museum. TNMOCs own system restoration experts including Tony Sale, leader of the Colossus rebuild project, and Tony Frazer, project manager of the Harwell/WITCH computer restoration, will also be in the line-up. One of the largest exhibitors will be Acorn World which will also be there in force with a display including Acorn micros through the ages, BBC games, a fully working Domesday system, new and retro software and even a Beeb repair centre where visitors can bring faulty BBC Micros in hope and expectation of a quick fi x. Retro-gamers will be in their element at the Retro Computer Museum with an eclectic display of hands-on systems, consoles and a special gaming competition. Other exhibitors include Amiga and Atari user groups, the Spectra Net project, the Sun- down Demoparty team, and the MK Amateur Radio Society, Media sponsors of the event are ZDIMet Companies interested in sponsoring other elements of the event should contact Kevin Murrell: email kevin.murreli@tnmoc.org. The National Museum of Computing at Bletchley Park, an inde- pendent charity, houses the largest collection of functional historic computers in Europe, including a rebuilt Colossus, the world's first electronic programmable computer. The Museum complements the Bletchley Park Trust's story of code breaking up to the Colossus and allows visitors to follow the development of computing from the ultra-secret pioneer- ing efforts ol the 1940s through the mainframes of the 1960s and 1970s, and the rise of personal computing in the 1980s, New working exhibits are regularly unveiled and the public can already view a rebuilt and fully operational Colossus 5 , the restoration of the Harwell / WITCH computer, and an 1CL 2966, one of the work- horse mainframes computers of the 1980s, plus many of the ear- liest desktops of the 1980s and 1990s. The latest display is the much -talked -a bout Technology of the Internet gallery. The Museum has recently launched a Foundation Sponsorship Pro- gramme for corporate. To date, funders of the Museum include BCS, PGP Corporation, IBM, NPL. HP Labs, lnsightSoftware.com, Biack Marble, and the School of Computer Science at the Univer- sity of Hertfordshire. The Museum is currently open on Thursdays and Saturdays from 1 pm. and on Bank Holidays fn spring and summer. Groups may visit at other times by arrangement, 1 see also “Colossus — the Rebuild" elsewhere in this edition. G e ne ra t : www. Ln m oc, o rg P rog ram m e: www. tnmoc.org / vcf-g b . as px (100266-VII) Ultra small synchronous DC/DC converter Linear Technology Corporation introduces the LTC3731 H, a Polyphase ' high efficiency (up to 95%} synchronous DC/DC control- ler with guaranteed operation for junction temperatures as high as 140-C offered In a 5mm x 5mm QFN package. This rugged DC/DC controller is expandable from 3- to 1 2-phase operation for 60 A to 240 A power supply designs. The precision ±5% output phase current matching simplifies thermal management by evenly spreading the heat among the output stages. Applications include high current ASIC and FPGA sup- plies, power distribution buses, automotive engine control units and network servers. The LTC3731 can be configured as a buck or boost converter and operates with all N-channel MOSFETs from an input volt- age ranging from 4.5 V to 28 V. The power- ful onboard gate drivers minimize MOSFET switching losses and allow the use of multi- ple MOSFETs connected in parallel. A fixed operating frequency can be programmed for each phase from 2S0 kHz to 600 kHz or can be synchronized to an external clock with its phase-locked loop (PLL). The device's minimum on-time of just 1 10 ns makes the LTC373 1 ideal for high step-down ratio appli- cations. The reference voltage maintains ±2% accuracy over the full -40- to 140 y Coperat- io 05-2010 elektor ing junction tem- perature range. The LTC3731H incorporates a power sav- ing Stage Shed- ding 1111 technique to increase the efficiency and improve battery Nfe at light loads by eliminating the gate charging losses and switching tosses of two of its out- put stages. Additional features include current mode control, programmable soft start, short-circuit and overload protection as well as adjustable soft-start. The LTC3731 Is now available in a 32-lead 5mm x 5mm QFN package as well as a 36-pin 5SOP package, www.linear.com (100266-VI ) -40°C to U8°C Junction Temp Operation CMOS linear VLDO regulator also for >1 amp, <1 volt ON Semiconductor has extended its product portfolio with the introduction of five new CMOS linear voltage regulator families. The NCP69x families are optimized for use in low current con- sumption portable battery-powered and ‘always on’ applica- tions such as cable modems, satellite receivers, digital-set-top boxes and electricity meters* The NCP690, NCP691, and NCP692 are Very Low Dropout (VLDO) 1 A reg- ulator devices available with an adjustable out- put voltage from 5.0 V down to 1.25 Vann fixed voltage versions. The devices offer a power supply rejection ratio (PSRR) of 62 dB, low quiescent current (145 pA typical) and low noise (50 uVrms) operation, as well as short circuit and thermal protection. They have greatly enhanced electro-static discharge (ESD) protection of 4 kV com- pared to standard CMOS LDOs and are designed to be utilized with low cost ceramic capacitors. The NCP691 includes an enable- low function, while the MCP692 has an enable-High function, TheNCP693 1 A regulator operates with a supply current of only 65 li A at no load, and a standby mode with a supply current less than 0*1 5 liA, selected by a chip enable pin* Standard voltage versions are 0*8 V, 1.0 V, 1,2 V, 2,5 V and 3.3 V. This series is c THE HIGHEST PERFORMANCE PC OSCILLOSCOPE 350 MHz BANDWIDTH 5 GS/s SAMPLING UP TO 1 GS MEMORY nm w m r'' •rust* 4 Channel oscilloscope with spectrum analyzer Built-in arbitrary waveform generator CAN bus decoding Advanced triggering Mask limit testing Full math and measurement functions High Speed USB connection Easy-to-use software SDK for major third party applications Five-year warranty All included, from only £2995 www.picGtech ,com/scope2G02 elektor 05-2010 11 NEWS & NEW PRODUCTS complemented by the MCP694, which is an Ultra Low Dropout (ULDO) 1 A regulator for applications where there rs a small differen- tial between the input and output voltage, it offers -3 mV (typical) load regulation, and a 60 pA (typical) quiescent current. A ripple rejection of 70 dB (typical), along with a cur- rent limit and thermal protection makes this a very robust and versatile device. It is avail- able in an adjustable version with a mini- mum output voltage of 1 ,0 V t and in fixed voltage options of 0. 8 V, 1 .0 V, 1 ,2 V, 2.5 V. and 3.3 V. The NCP690, MCP691 and NCP692 are all offered in 6-lead, 3 mm x 3 mm DFN pack- ages, The NCP693 comes in a 1 .8 x 2.0 mm DFN package. The NCP694 is housed in 6- pin HSON and 5-pin SOT-89 packages, http://www.onsemr.com (i 00266-VIH) Cache-In-Trash -Out events and the Magellan eXplorist CC Magellan, new eXplorist < MAG ELL Aft SACK CC is said to be the first dedicated CPS device for geocaching that includes out-of-the-box paperless geo- caching, pre- loaded with the most pop- ular geocaches in the world, a brilliant col- our screen, rich graphics and an easy to use interface all packed into a rugged and waterproof device, that con- nects seamlessly to www. geocaching, com. The Magellan eXplorist CC will ship in April. Geocjchit MENU ZOOM Geocaching is a high-tech version of a treasure hunt', where adventure seekers use CPS technology to hide and find physi- cal objects, solve location-based puzzles, and share experiences online. Geocaching is enjoyed by people of all ages and promotes a strong sense of community and support for the environment. The Magellan eXplorist CC CPS receiver is made exclusively for geocaching with an intuitive interface and the ability to sort and search thousands of geocaches. The device has multiple fun and familiar graph- ics, such as smiley faces for logs and merit- based awards to show off your geocaching expertise. Powered by two AA batteries, the device can provide up to 18 straight hours of out- door adventure along with a htghly-sensi- tive SIRFstarlll CPS chipset that provides 3 -meter accuracy. Geocachers can eas- ily mark finds and quickly add field notes. Additionally, the product comes pre-loaded with common outdoor GPS features such as waypoint creation, a worldwide basemap, active tracking and trip odometer. The Magellan eXplorist CC CPS device will be introduced at an M.S.R.P, of SI 99.99. The unit will ship with a USB cable and 2 lithium disposable A A batteries. With the purchase of a Magellan eXplorist GC GPS device cus- tomers will receive a 30-day free premium membership to geocaching.com. www. magcllangps.com,' exp I oristgc www.g eoc aching, com www. ma g el la n g ps. co m (100266-X) dsP!C33F ‘GS series’ Digital Signal Controllers for digital power supplies Microchip announces the expan- sion of its 16-bit dsPIC"' Digital Signal Controller (DSC) portfo- lio for digital power-conversion applications. Microchip's 16-bit dsPIC33F H G5* Series DSCs provide on-chip peripherals specifically designed for high-performance, digital power supplies. On-chip digital power peripherals include high-speed pulsewidth modula- tors (PWMs), ADCs and analogue co m p a r a tors. The new ly expa n d ed dsPIC33F 'GS' family supports applications such as induction cooking, umnterruptable power supplies, solar and pure sine-wave inverters, intelligent battery chargers, power factor correction, HID lighting, fluorescent lighting, LED lighting, and AC-DC and DC- DC power converters. These new DSCs provide up to four times the memory, compared to Microchip’s exist- ing SMP5 81 Digital Power Conversion families. Additionally, these flexible DSCs can be configured for a variety of topologies, giving power-supply designers the complete freedom to optimise for specific product applications. The eight new DSCs offer up to 18 channels of PWMs with 1 ns resolution, enabling an unprecedented number of completely independent digital control loops. The eight new dsPICBSF + CS’ series digital-power DSCs enable digital control loops with 1 2 to 1 S high-speed, 1 ns resolution PWMs and one or two 1 0-bit, on-chip ADCs, providing 2 to 4 million samples per second (MS PS) for low latency and high-resolution control. They range from 64 to 1 00 pins and 32 to 64 KB Flash memory. These DSCs feature interactive peripherals that both minimize the intervention of the processor and are able to handle the real-time needs of high-speed current-mode control. The dsPIC33F “CS* series DSCs are supported by the MPLA8 Integrated Development Environment, MPLAB C Compiler for dsPIC DSCs, MPLAB SIM 30 Software Simu lator, MPLAB 1CD 3 In-Circuit Debugger and MPLAB REAL ICE In-Circuit Emulation System. For advanced development. Microchip's Explorer 16 Development Board (part # DM240001 ) can be used with the Buck/Boost Converter PlCtail" Plus Daughter Board (part # ACT 641 33), A new dsPSC33F "GS” series Plug-in Module (part # MA330024) is available today for the Explorer 1 6, which enables development with this new DSC fam- ily; specifically, the 1 00-pin dsPIC33FJ64C561 0. www. miaochip.com (ioo266-IX) 12 05-2010 elektor How to Get a Large Screen, Modern Digital Oscilloscope Without the Hefty Price Tag (and No, it's NOT a USB scope) There are 10 reasons why you should request your free information pack to find out how you can replace your current oscilloscope and enjoy greater speed, efficiency, ease-of-use and convenience! And the good news is it's surprisingly affordable... ^•iTS^r pox f ~ re . 2ii*i lt flpaj Trigger ****rt> n*j nut r j ttr. *** fist* rtYdjj •J. ■- i'll fcn ■METHINti NEW has been introduced in oscilloscopes. And plenty of '. i rs from hobbyists to engineers have proven io themselves how it brings cm important benefits. find out how you can benefit, simply email us at nfo ft: scree nscopetraces.com for no obligation information on one of the -*■ \\cst developments in oscilloscopes - The Screen scope S SC- A 53 1 : a : \ I H / rea I - ti me stand a I one osc i II osco pc w i th a d i ffc renc e. E t w a I k s y o u ■ irougli these advantages: 1. Affordable & Large Clear Displ ay: Until now you simply couldn't • . e a stand alone oscilloscope with a large screen ichout breaking your bank. Screenscope solves this rroblem by letting you use a standard computer monitor for its display. You can pick up a very low cost (.CD nitor these days so you can now look at a large screen - ther than trying to decipher the signals From a tiny - .reen. (comparable to watching TV on a plasma vs a 9 neb screen) G Er Qyyiwvi* , K , *trttnc H6 Z. Easy to gel s tar ted : The main unit is a compact box nh just three BNC sockets on the Front panel, but no knobs. You'll find a ideo socket on the back panel which connects to that nice big monitor, “a is means all you need to do is plug a monitor, mouse and power j -.reedy into the unit and it's up and running in seconds. No computer - ,-q uired. No s o ft w are to install. 3. Perfect For virtu alh anv monitor: You can use Screen scope with any monitor. It doesn't matter if it's an old CRT, or a brand new LCD idescrecn, This means: you can take it anywhere, there’s always a monitor somewhere these days* Just plug it in, sw itch it on and you're ready to go. 4* Fun to use: All controls are graphical on the screen. They are well laid • it and in u lively easy to use. You can click controls or grab and drag races, markers, trig levels and position directly, and you've got a large r laying field, all of which makes screen scope a joy to use. 8. Easy to s ave & store scree n g rabs and wa veforms : Reference traces arc great for instant comparison of waveforms and Screenscope has Jour of these and with its USB host port, so you can load or save them externally. With a click you can also do a screen grab to a BMP file to gi vc y o u a W Y S 1 W Y G o f y o ur e nti re s c reen . wh i c h i s g i eat fo i inclusion into reports or just to save a view that is complete with all settings visible, 9. Lo ng ter m investment: Even though it weighs just 0.95kg. ids rugged, reliable, compact and designed fora long useful life. Also, ids easy to store and always ready for use when required. 10. Sa ve money: Without all those plastic controls and by separating the screen from the 5. Less hassle saves time: No more fiddling around with those plastic controls, knobs and menu buttons. Not to mention those controls that rouble as different functions w hen some options arc selected. instrument you get a better scope that costs less. ..saving you money. Email: ft. It is NOT a l SB oscilloscop e: The problem with USB oscilloscopes is on need to install software directly onto the computer - and you can then nty use it front your computer, Electronic workbenches can get messy, so ou don't want a big computer sitting there just to gel a big screen. infofg-screenscopetraces.CQm now for your free information pack. It will give you the information you need to get a system that's easier to operate,,, more efficient... fas ter., and less expensive too. Classv 50 MHz real-time scope with lots of Features; As well as the normal scope functions you get automeasures, and a nice set of manual measurement markers, all with easy to sec readouts on screen. It has FFT ..nd you can perform maths between channels and/or trace memories. At - ower timebases, Screenscope operates like a chart recorder where you ■ ,e samples being displayed immediately when they are taken. This mode , --ii log continuous data to a USB memory stick. A nd visit or i r vv eb site vv vv w. screenscopetraees , CO m INFO & MARKET By ThSjs Beckers (Elektor Netherlands Editorial) Sustainable energy is what everyone wants nowadays, but what's the best solution? The options include storing energy in large batteries* hydroelectric power plants with water reservoirs, and hydrogen, but there's still no dear answer to this question. Hydrogen appears to be a very promising candidate for mobile applications. Several car manufacturers already have prototype 'hydrogen cars' driving around* powered by fuel cells. Let’s have a look at what you can actually do with fuel cells. It appears that the worldwide demand for energy wifi continue to rise. Worldwide energy consumption In 200S was 474 exajoules (474 x 10 is j) , which amounts to a constant daily consumption of 1 5 terawatts (15x1 0 12 W). Worldwide energy consumption Is expected to increase by 54% between 1995 and 2015. This results for the most part from rising consumption in Asian countries, with an anticipated increase of 129%. Of course, this is mainly due to the fact that the per capita energy consumption in countries such as India and China is among the lowest in the world and that these countries expect to achieve very strong economic growth, which goes hand in hand with a strong increase in energy demand. Per capita energy consumption in the Western countries is already very high. For instance, the USA accounts for approximately 29% of worldwide energy consumption, despite the fact that its population is oniy about 5% of the total world population. The industrial and transportation sectors consume enormous amounts of fuel. The majority of this (around 80 to 90%) consists of oil and gas. The rest comes from nuclear energy and sustainable energy generated from natural sources, such as wind, water and sunlight. Fossil fuels At the start of the Industrial Revolution in the late eighteenth century, the main sou rces of energy were oil and coa I. We need energy i n our daily lives to run our central heating systems, refrigerators, televi- sion sets, PCs and cars. All of these systems and devices need energy, which is largely provided by fossil fuels. Our central heating systems run on natural gas, out household appliances run on electricity gener- ated by power plants that operate primarily coal or natural gas* and our cars run on petrol. Our society is almost entirely oriented toward energy from fossil fuels. However, these energy sources will not last forever. At some point the oil wells will be pumped dry, the gas deposits will be exhausted* and all the coaf will have been mined - and what will we do then? In response to this pressing question, innumerable projects and stud- ies for the development or exploitation of new energy sources have been launched. Including cold nuclear fusion* solar energy* biofuels, wind energy* and what have you. Alternatives 3n principle, the amount of energy from the sun that ‘bombards' the earth is more than adequate to meet all of our energy needs for the next hundred years. However, we have not yet developed a perfect method for converting this energy into a usable form. Although solar cells are becoming more and more efficient, it still takes a considerable amount of energy to produce them, and most of this energy still comes from fossil fuels. There's also the question of howto store this sustainable energy. One way to do this in a ‘green’ manner Is to store it in the form of hydro- gen. There are presently a good number of tricky issues here, but con- siderable effort Is currently being put into developing suitable storage options and a practical infrastructure for hydrogen as a fuel. H a Hydrogen is a naturally occurring substance that takes the form of hydrogen molecules (H 2 ) consisting of two hydrogen atoms. It is a gas at room temperature and normal pressure, with a density of 0.084 grams per litre. This makes it approximately 14 times lighter than air. Hydrogen Is the lightest and smallest of all elements. As a result, it can easily pass through porous materials and even through metals such as platinum, which is a characteristic that requires special attention in storage systems. Hydrogen forms an explosive mixture with air and gaseous chlorine* but pure hydrogen Is very stable. 14 05-2010 elektor INFO & MARKET Hydrogen H Excess Hydrogen (for reuse) Oxygen O Water Electrolysis Hydrogen can be produced in several ways. The most common method is to use an electric current to decompose water into hydro- gen and oxygen. This process is called electrolysis, and it works as follows. Two electrodes are placed in an electrolyte: first an anode, which is connected to the positive terminal of an external voltage source, and second a cathode, which is connected to the negative terminal of the voltage source* These electrodes are made from a metal that is not altered by the electrolytic process, but instead acts as a catalyst for the process. Platinum is often used for this purpose. The surface characteristics of the electrode have a strong effect on the amount of hydrogen that is released. A DC current is used for electrolysis. There are several options for the voltage source, such as a battery or a solar cell. An electrolyte, such as sodium sulphate (Na 2 S0 4 ), must first be added to the water to provide ions so that a current can flow, since pure water is a very poor conductor of electricity. Oxygen (0 2 ) forms at the anode (which is connected to the positive voltage), while hydrogen forms at the cathode. Due to the supply of electrodes to the cathode (neg- ative voltage), the following reaction occurs at the cathode: 2H 2 0 + 2e— *H Z + 20H- The hydrogen formed at the cathode rises through the liquid and can be captu red . The hydroxyl ions (OH ) formed at the cathode a re used in the reaction that occurs at the anode. The following reaction occurs there due to the shortage of electrons (positive voltage): 4 OH“ — ► O ^ + 2 H ? 0 + 4 e~ The oxygen formed at the anode also rises through the liquid and can be captured. The reaction at the anode requires twice as many OH" ions as are formed at the cathode. This means that two hydrogen atoms are released for every oxygen atom that is released. In other words, the process produces twice as much hydrogen as oxygen. Fuel cells The process of electrolysis is reversed in a fuel cell. The reverse reac- tion yields an electric current, along with pure water as a by-prod- uct. Here again an electrolyte is necessary to allow the reaction to occur. In fuel cells, the electrolyte takes the form of a special mem- brane. The fuel cells we examined for this article (described below) are all of the type called 'PEM fuel cells’, where "PEM’ stands for ‘proton exchange membrane*. The advantage of this type of fuel cell is that it can operate at room temperature. There are now many other types of fuel cells that operate under other conditions, includ- ing some that operate at much higher temperatures |3 k The membrane of a PEM fuel cell is made from Nation, This is a pol- ymer with a molecular structure so dense that only hydrogen ions can pass through the material; oxygen tons are held back. On each side of the membrane, there is an electrode consisting of a carbon mat with a coating of vapour-deposited platinum. The anode side receives a continuous stream of hydrogen, while the cathode side receives a continuous stream of oxygen. The platinum catalyst splits the arriving hydrogen molecules into hydrogen ions according to the following formula: The electrons are absorbed immediately by the electrode. They pass through the connected external load and arrive at the cathode. The positively charged hydrogen ions diffuse through the membrane to the cathode, where they react with the released oxygen ions to produce water according to the following formula: eleklor 05-2010 15 INFO & MARKET Vi Q 2 + 2 H* + 2 e' — * H 2 0 The electrons necessary for this reaction are supplied by the cath- ode, tn this way, the membrane allows hydrogen and oxygen to combine and form water in a clever manner without any visible combustion or explosion. The voltage generated by this type of fuel cell is usually between 0,6 and 0,9 V, which is too low for most applications. For this rea- son, St is common practice to connect several fuel cells in series in order to obtain the required voltage. The required current capacity is achieved by ensuring that each cell has sufficient surface area. Try it yourself ft's now relatively easy to perform your own experiments with fuel cells, since a number of kits are available commercially. They are primarily intended to be used for educational purposes in order to explain the concept of sustainable energy. We put several kits through their paces and examined what they could do (caution: most of the fuel cells concerned are intended to be used with the accompanying kit, but not for other experiments. Otherwise the warranty is rendered void). Fischertechnik We received the Hydro Cell Kit from Fischertechnik |31 . This kit con- sists of an integrated unit containing a PEM fuel cell, water tank and gas reservoir; a solar panel; and some fastening hardware. This kit is actually an accessory for the Eco Tech kit from Fischertechnik, in which ten different constructions operate from solar power. With the combination of the two kits, the fuel cel! can be used for elec- trolysis in order to buffer the solar energy by storing it in the form of hydrogen gas. When the solar panel does not receive enough light, the fuel celt can be used to generate electricity from the hydrogen gas. This combination illustrates precisely what is expected from a sustainable solution to our virtually insatiable demand for energy. Heliocentris We received the DrFuelCell Science Kit from Heliocentris |4| s a com- pany that specialises in fuel cells. This very extensive kit comes with four books full of theory, explanations and instructions for experi- ments and measurements, which are dearly oriented toward educa- tional use. The kit has a separate unit for electrolysis and storing the hydrogen and oxygen, a solar panel to supply power for electrolysis, a PEM fuel cell for DIY assembly, and a measuring unit with several different loads. The kit also includes a methanol fuel cell, which we ignored during our tests. This kit includes everything you need for experimenting with sustainable energy solutions. Eitech Eitech I 5 ! sent us their Construction Set GO. This kit includes instruc- tions for building th ree different structures powered by a hefty PE (Vf fuel cell. A special feature of this kit is that it comes with a small canister holding 2 0 I itres of hyd rogen gas, which can also be refilled (but only by the man u factu rer, unfortunately) . This kit is not suita ble for generating your own hydrogen. There is a booklet with a concise explanation of how it all works, and from the specifications alone 16 05-2010 elektor INFO & MARKET you can see that this fuel cell is more powerful than those in the other kits. All In all, this Is an excellent choice for DIY experiments. Kosmos Kosmos |6] sent us their Brennstojfzeile Classic (‘Classic Fuel Cell 1 ). This kit also includes a reversible PEM fuel cell, which means that it can be used to generate hydrogen or to generate electricity. Here the fuel cell is used to power a small car using hydrogen as the fuel. Everything necessary for performing experiments, such as hoses, cables, a gas canister, a multimeter and a solar panel, are included in the kit. The extensive assembly instructions also include a detailed description of the operating principle of the fuel cell (and the solar cell). Highly educational. Franzis The Lempaket Experimente mit der Brennstoffzefie (learning Kit for Fuel Cell Experiments’) from Franzis 7 I contains the components nec- essary for making your own fuel cell. With a bit of patience, you can assemble the small cell in 1 5 minutes. However, you have to make the fuel (hydrogen) yourself. Along with several other experiments, this is described in the accompanying user guide. This approach is not as user-friendly or convenient as the others, but it works. The fuel cell has the lowest power output of the lot, which is obviously due to the relatively small surface area of the membrane. Horizon We also included the Hydrocar from Horizon Fuel Cell Technologies in our test. This kit is similar to the Kosmos kit in terms of content, but the documentation is not nearly as extensive. A few measurements Naturally, the first thing we wanted to know about the fuel cells is how they actually performed in practice. For this reason, we made several measurements intended to dearly show the power and energy characteristics of the fuel cells at a glance. We connected the fuel cells to several different loads in order to obtain an idea of how much power they could supply. Determining the efficiency is more difficult because it is necessary to know exactly how much energy in total is used to generate the hydrogen. However, some of the kits specify that both reservoirs (oxygen and hydrogen) must be completely full in order to obtain maximum power. This results in the generation of more hydrogen than can be held in the hydrogen reservoir, so it bubbles out of the reservoir and is lost. Consequently, the energy that is used can never be fully recovered, which makes the efficiency appear worse than it actually is. Figures la and 1b show the output power of the kits versus time (during which the amount of fuel in the reservoir gradually decreases). Due to the low voltage generated by the cells, the loads have low resistance; 4 Cl for the first measurement and 1,2 Q for the second measurement. With such low load resistances, cable resist- ance and contact resistance also become important factors. For instance, the measurements with a 1 .2-0 load were actually made with a ]-Cl load resistor; the remaining 0.2 O came from the cable and contact resistances. With most of the cells, the output power remained fairly constant until It dropped abruptly when the fuel was used up. The cells from elektor 05-2010 17 NFO& MARKET Power into 4 Ohm Power into 1 ,2 Ohm |^~Fish«f ^~He1ioc&ntri5 Kosmos ~ — -Horizon ^~Franzis ^~Eitach ^—Fisher ^—Heliocentric Kosmos Horizon Franzis titech 0.5 0 AS 0.4 0.35 7 0,3 ^* 0.25 D. 0.2 0 15 0.1 0.Q5 la 0 H — i — i — i — i — i — i — i — i — i — r — i — i — i — i — i — i — i — i — i i i 1 1 i — '’'iiiii — i — ’ r i — >— i — «— i — r i . . 1 1 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 4t 43 T JC 39 3 iffltgi.ii Figure la/ 1b, The output power of the fuel cells drops abruptly when the fuel supply is used up. Ettech and Franzis were fuelled with hydrogen from the gas canister of the Eitech kit and therefore delivered a constant power level. Only the fuel cell in the Kosmos kit showed a slowly decreasing power level. This is probably related to the construction of the water res- ervoir and gas storage unit. The relative high power of the Ettech fuel cell is also remarkable — nearly three times as large as most of the other cells. With its two membranes, this fuel cell also has a considerably larger surface area. By contrast, the power output of the self-assembly fuel cell from Francis was rather low. Of course, this is partly due to the small surface area of the membrane, but it could also be partly due to the cell design intended for D1Y assem- bly, which results in higher contact resistance and reduces the over- ail performance. Figures 2a and 2 b show the amou nt of energy used by the fuel cel Is for electrolysis {indicated as U') and the amount of energy gen- erated by the fuel cells (indicated as ‘C p ) with different loads (4 Q and 1 .2 O), combined in a single chart for each resistance value. Of course, this does not include the Eitech and Franzis fuel ceils because they are not designed to generate hydrogen. Only the out- put energy is shown for these two fuel cells on the charts. The energy Input was stopped when the reservoirs were full. Depending on the individual kit, the total energy input for fuel gen- eration was 250 to 300 joules. The total energy output with a 4-ohm load ranged from 75 joules with the Horizon fuel cell to 1 23 joules with the Kosmos fuel cell, corresponding to an efficiency range of 27 to 40% (roughly speaking). This may not appear especially high, but it is actually not bad if you compare it with the efficiency of an internal combustion engine in a car (around 25%), The results are slightly worse with a 1. 2-ohm load: 63 joules from the Heliocentris fuel cell and 90 joules from the Kosmos fuel cell, with corresponding efficiencies of 24 and 30%. These are still very acceptable figures. Applications The small fuel cells we tested generate enough power to meet the needs of ‘small * 1 applications with power consumption up to 0.5 W. The Eitech fuel cell can be used to power a respectable pocket torch (1 watt) if you use a suitable voltage converter. The gas canister is small enough to be portable and contains a reasonable amount of hydrogen. Unfortunately, a practical and commercially feasible solu- tion to the problem of hydrogen storage is not yet available. How- ever, Toshiba has already developed a methanol fuel cell |S| that Is commercially available, so a solution for hydrogen should not be too faraway. Research on hydrogen storage in special alloys that allow it to be stored at room temperature with approximately the same density as in liquid form Is presently underway at full speed. is 05-2010 elektor INFO & MARKET Energy used and generated (into 4 ohms} —Fisher (U) -~"Heliocentr»5 (U) Ko&ntos (U) Horizon (U) — —Fi&her (G) Heiioceniris (C) Franzis ]G) Kosmos (G) Horizon (G) — ■ EsLeeh (G) 300 T x M a Mr® - u Energy used and generated (into 1,2 ohms] Figure 2a/ 2b. The total energy generated by the fuel cells is less than the amount of energy used to produce the hydrogen, but with a yield of around 30% for the overall process the efficiency of these simple cells is five percentage points better than the efficiency of a typical Internal combustion engine. Ready for the future? Our test results show that you can achieve respectable efficiency with a relatively simple fuel cell. With the PEM fuel cells in our test, the process of converting energy (such as solar energy) into stored energy in the form of hydrogen and then generating power from the stored hydrogen yielded an overall efficiency of around 30%. This already a good deal better than the efficiency of typical inter- nal combustion engines, even ignoring the energy necessary to produce the fossil fuel used by the internal combustion engine (the solar energy accumulated by plants millions of years ago, pumping the oil, refining the crude oil, transport and so on). The lifetime of early fuel cells was not especially satisfactory. Now- adays this Is not such a problem, although it varies considerably depending on the type of fuel cell. The lifetime of PEM fuel cells is now long enough for use in cars (including hybrid cars). A more significant problem Is hydrogen distribution (or hydrogen availability). Filling stations for conventional fuels are widely distrib- uted, but stations where you can fill up with hydrogen and locations where hydrogen tanks can be delivered are few and far between. To give the ‘society with water as a fuel 1 described byjules Verne in his novel The Secret island (i 874 ) a chance to become reality, our infra- structure must be adapted to using hydrogen as a fuel That's a tall order, but it doesn't seem impossible. The first hydrogen station for home use is already on the market [9] . The further course of these developments is something that only the future can tell. Nevertheless, the fact is that our fossil fuel resources are nearly exhausted and we must look for new options, (100036-!} We wish to express our thanks to Eitech. Fischertechnik, Franzis, Fteliocentris and Kosmos for providing the experiment kits. # Internet Links [1] http://en.wikipedia. org/wiki/World_energy_resources_and_consumptiDn [2 j http://en.wikipedia.org/wl k i/Fuel_cell [ 3 J ww w . fl sche r tec h n 1 k, co m [ 4 J www . h e I i o cent ri s . com [ 5 ] www.eitech.de [6] www.kosmos.de [7] www,f ranzls.de [ S ] www.toshlba.co.jp/abou t / press / 2009_1 0/pr220 1 . htm [9] www, horizon fuelcdl.com/slore/ hyd ro ITILh I m elektor 05-2010 19 INDUSTRIAL CONTROL BOARD dsPIC Control Board C * I i • i i * « tor industrial applications The control board shown in this article has been designed for incorporation into typical industrial electronics applications like controlling motors or adjustment of static up- or down-converters. * universal dsPEQjo microcontroller board * isolated CAN bus * serial port via USB * 14 analogue inputs * 8 PWM outputs * PC bus The objectives were to obtain a board with a large number of pulsewidth modulation (PWM) generators, which enables us to control several motors and static convert- ers at the same time. The cost of the control board needed to be as low as possible too. In addition, it must be possible to construct the board using a soldering iron, without requiring use of a reflow oven. On this basis, it was logical for us to turn to the range of ■ dedicated motor control micro- controllers offered by Microchip. Out of the range of devices on offer, our attention was drawn by the dsPICSOF series. This series of 16-bit hybrid microcon- trolier-DSP devices is capable of performing up to 30 MIPS and has a 40-bit register, thus allow- ing overflow detection along with the possibility of perform- ing 16 x 16 multiplications and 32 x 16 and 16^16 divisions, making it very interesting in adjustment applications To take advan- tage of maximum flexibility in this series of devices, we picked the dsPIC30F6010A microcontroller This microcontroller has 68 input/output ports and allows up to eight PWM signals to be generated. This characteristic meets our specifications per- fectly, especially since it has a 144 KB flash memory, allowing relatively complex appli- cations to be controlled. In addition to all these qualities, the dsPIC30F601 OA also has a 1 6-bit A/D con- verter, eight output compare outputs, eight input capture inputs, two UARTs, two SPI ports, two PC ports, two CAN controllers, and five counters. There is plenty of free documentation about this device, with numerous examples and applications. Another advantage is the MPLAB program- ming environment, which can be down- loaded free from the Microchip website I - 3 1 — but is unfortunately only available for Windows. However, even though this pro- gramming environment can be a bit labo- rious when applications are relatively com- 20 05-2010 elektor INDUSTRIAL CONTROL BOARD isolated 5V DC/DC regulator | CAN j— Opto 1 H - I l 2 C | USB/RS232 I 8 ICD2 ICPbit — t> D/A converter dsPIC 14/ analog inputs ± s digital digital inputs outputs/PWIW D90073- tl Figure 1 . Block diagram of the dsPIC control board. pi ex, Et does have the merit of offering lots of features, like the possibility of simulat- ing code and controlling the time needed to execute each instruction. Although these tools aren’t really essential for expert users, they do make [earning to program PIC microcontrollers more fun. The block diagram of the control board is shown in Figure 1. A 50-pin connector gives access to the microcontroller’s 43 config- urable pins, including the PWM modules, output compare, and input capture. This connector also carries the connections for the incremental detectors, allowing direct access to one of the dsPIC's counters. This port can also be used for expansion purposes. This board designed for controlling sys- tems of greater or lesser complexity needs to allow us to measure the dimensions to be adjusted. So 1 4 analogue values between 0 and 5 V can be read via a 20-pin connector. In addition to the analogue and digital ports, this board has a lot of communication peripherals. It has a CAM field bus, a UART connection via USB, and an PC connection. The board uses SMD components so as to keep it as small as possible — 80 * 100 mm on a double-sided PCB. However, the board is not difficult to build, with the help of a good soldering iron. The board in detail After a generic explanation of the func- tions implemented on this control board, we must explain in more detail the hard- ware used and the board’s various features, ft goes without saying that readers should refer back to the dsPOQFSGI OA documen- tation aval la bile from the M icrochip website. The circuit diagram of the board is shown in Figure 2, The big connector K5 makes it possible to utilise lots of the microcontroller’s func- tions. It offers access to: port A, which, in addition to the dig- ital input/output functions, also lets us deiine the analogue voltage levels for the A/D converter, ft offers two external interrupt inputs ( I NT), pins RC13 and RCMof port C, which make it possible to configure the second channel of the ICD (In-Circuit Debug- ger), as well as to implement an external timebase for a real-time dock, port D, which has 8 input capture mod- ules and 8 output compare modules. This register also allows programming of seven interrupts and access to the ICD’s third channel, port E, which lets us generate 8 PWM signals. This port also offers two exter- nal interrupt Inputs, ports RF4-RF8, which bring together the SPI 1 , UART 2, and ICD channel 4 functions, as well as two possibilities for external interrupts. ports RGG, RG1 , RG6-RC8 which make it possible to use the CAN2 controller, the SPI2 link, and three sources of externa! interrupts. the MCLR pin, which allows the micro- controller to be reset. Connector K4 Is assigned to measuring ana- logue signals, and so is connected to micro- controller pins RB2-RB1 5, allowing 14 ana- logue signals to be measured. The 4-channel, 10-bit digital/analogue con- verter used is ail AD5336 (IC4). The digital value to be converted is transferred via ports RE0-RE9. For the conversion to take place, the function has to be enabled by the microcontroller by way of pin RF4. The four analogue outputs are addressed by way of microcontroller pins RC1 and RC3, The microcontroller’s built-in CAN1 con- troller is used for communicating with the microcontroller via the CAN field bus. In order to avoid the control board's being destroyed by possible voltage surges on the line, it was decided to equip the interface with an isolated 5 V PSU (IC2) and twoopto- isolators in addition to the transceiver IC9. Two pufl-u p resistors are all it ta kes to imple- ment the \ 2 C bus. The resistor value will change, depending on the bus speed you want to achieve. The resistor value fitted to the board is 4,7 ki\ allowing a theoretical transmission speed of 100 kbit/s. In order to improve the control board's connectivity and so make it easier to use, an FT232RL chip (1C5) from FTDf has been used to allow it to be connected via a com- puter USB port. Together with the driver K this 1C has the effect of adding a virtual serial port when connected to the compu- ter This function thus allows the user to communicate via the USB port as if it was an RS-232 link. The board is powered from a DC supply of 5-55 V, thereby affording an opportunity to recycle an old mobile telephone charger, in our case, we used a Nokia charger that pro- vides a 5 V supply at a current of 890 mA. elektor 05-2010 21 INDUSTRIAL CONTROL BOARD +S V Q MCtfl Cl * H l£ li U'RX 1 * J. _a USTX a D 2 GNM LM«40CW3“S 1 , 2 , vouta __ i 5 ^ V 01 ITB E v WMJTC 7 v. voim> ft ■, i; 1 ft , 5 CKZ M l U Lai 11 L SGI LDAiC U +SV O H si •«LT“ T RESET GM 3 K 3 C 2 i 4 jT 2 WS 904 GSSH ^u 7 ^Oen^TpOnT Tfr GRDD L» L> CSL 5 r CEL'SJ 12 ■-> •^V INIHP * 5 V FUSED 0 o O'fC 1 let xcezFPSMiPfl d>C 3 U$B/5wlai Q+5V 18 16 , 15 ICE VCt lOI vec Ud lOI 102 US 3 S 31 GND GND GNDD *5V O YKtf-Jt VREf_C VREF_B VREF.A VOUT A. VOUT B VOUT C V 0 UT D CS CH IDfln ernt IC 4 O.R DBS DBD DB* DBS □B 5 DBA 00:3 DB 2 AD533EBRUZ Ac lOfeltOAC dm A 3 PD LEAC d GAIN 1 = &KKJ II n _ BACi^ is U PACO is EAC 6 > 21 □AC 5 > 21 □AC 4 > 2 D OACJj ts □AC 2 > 1 R □AC:> IT OACft 15 RGP AD DA j 2 ? CSYl GSZ 3 cm f 5 V fused q GC/DC Converts +Vin +Vp tez NA RA RA NA TSH 05 DSS -Vir -Vfl GND CAN CM Bus f 5 Y CAN * N res HCPL-GBSl OUT a CA z <3 T GNDD TMS «*N RSD IC& CJWi MCP2M1-B&H VHCF a RS UNO CAN SUS D 9 0 * SND CAN +5V o jet ^Jct ^Jca ^Jca to v •■: • DACE PACT Aft Al &DC m mL JZL ■.a ^CLR_ g‘--j la *CC 39 .-■■■ ll V. W- 17 IB \A*L is _anl n an; 22 _ANT_ z? .ML ARID AN'l 21 AN 12 AN 1 ] 35 . ANH 3 E DACI IS dac:- 14 EA? 21 RAIS 21 RCll 59 -£Hi. ED M. 39 2 L AD is’Ji- ~~j GNPfl I IC3 PWMBHS5 PWMALflffil FWMIHrai tiCK'RCi T 4 CK-RC 3 SiWWHSfflST SraZTCNIGAPEi sckhcwihm S 51 CN ' I RG 9 MCLH PGD.Ly.UO.'A’iiCNZ r:&: PGCIOWHAHinCHSIKBI AN 23 £ 5 liLVD!N'CN 4 .H 02 AS] !NDS,'C'i 5 'RB 3 ANtQEA'CNE S&i ANiiCEBiCNT RB 5 AMfQCFATRB: A ? n 7 t'P : !BT as-.rbe dsPIC30F601QA AWfflBa AMKURBtD ANlliPflM AHUffiBt! AtmfflBU ANiiflgri A*1*0CFBiCNUTOH FLTAVffTi,?ie 8 FLT&WTtiflM VREF-flWft VFIEF+'RAIP EWUDUMKtG«iiRCiS EUIJC IIWSGQTTI CWCKE RC <4 UZR!KN 17 A!F 4 B UZTi'CNIDfRFi ■LQ 40 03 i s s I. a § ?WU 3 L>fl £4 FTNMilVRES PWlfJbFEZ WIHUiREl nV.’WILHED CZHX'RGO CZTX'RGS C1TXJHF1 ClftXiRFS E»CJrtKi(19Dfl EUJ&10CMDL 0CJ.W03 0C4.DOI 0CKN1WKM OCtCNU'ftM OCTiCNI i, RE i ‘X&rcmiauFWftor Ifl.KlDt ffiimw ICJ’RDIO iCaRDU iCSfRDli SMilCiH’aiRDIJ KTICSifl'RDU tCfCFJtlRDIS INT 3 .RAH INUiRAtS 3CU1KJZ SDAHG 3 EWUCJSCKI.'INTft'RFE SDII.'RFI EJUUQliSDOl.'RFB yidJtRFZ S EJtTXfRF 3 ED 0 AC 4 , T 9 DAC 3 , mL 7 |_ jV_ lit LJ < 1 - u o ■■ TE **C 0 . 75 FD . 74 RCI ElflU., PCI Ki OC? 6J -- j7_ ■r M 54 «■ M 5? a it S7 : : 57 5S_ jT_ iL iL ti iL 41 oes pce PC?J OCL KM IC£ O 1C 4 IC5 _!£L J£L jcr^ x _L1 JWs s 5C.L _BEI RF 3 J'Rit. C* 22p +4 » RS-D Zis S NF-C RIB DP XI ■ ZDMHi: K 3 0AG CpftDKiDf 2 vou ra . A •3011 ! C ^ E MO d 3 5 a VOulA . G'iDA K 4 ADC CoftDKfor A?ilp _ARi. ASE A AS' IS AS 3 13 -SY -V5EP'> n r ONPA -O -o o 2 AN 1 > > 4 AN 11 , I AN 9 . a ANT , ID f> NS^ 12 AR 2 J U a R j v J. rD K5 Di’srjtjrConflActof PKM> +5Y 0 HCLP K2 ICSP 2 3 . PGB 4 Opgc a RJll ONDO □sao ONPA MOD?!- '1 Figure 2. Circuit diagram of the dsPIC microcontroller-based board. 22 05-2010 elektor INDUSTRIAL CONTROL BOARD COMPONENT LIST Resistors (1%. 250 mW. SMD 0805 unless indicated Otherwise) R1,R5,R6 “27G£L R2,R7,Rfc-10l& R3 = 910.Q R4 = 2.GkQ R9 I R14 i R15 = 4,7fca R10-R13 = 39GH R1 6 - OH, 1%, 1 25 mW, SMD 0805 R17,R18 = 100Q Capacitors Cl ,C2 = 1uF 16V, tantalum, case VV C3 T C1 0.C1 1 ,C1 3 t C1 5,C24,C26 = 4,7pF 1 6V, tantalum, case ’A' C4,C5 = 22pF, NPO* SMD 0805 CG t C7 l C8,C9,Cl2,Cl4 1 C16“19 r C22 t G23,C25 = 1 OOnF, X7R, SMD 0805 C20.C21 - 47pF, NPO, SMD 0805 Semiconductors iCI = XC62FP50Q2PR, SOT-89-3 (Torex) IC2 = ISM Q505S DC/ DC converter 5 V / 1 W (Traco) O = : dsP|C30F6010A-30l/PF (Microchip) IC4 - AD5336BRUZ (Analog Devices) ICS = FT232RL (FTDlj ICG = USB6B1 (STMieroelectronrcs) IC7.EC8 = FiCPL-0601 (Avago) IC9 - MCP255 1-E/5N CAN (Microchip) D1 = Diode SMCJ6V0A (Fairchild Semiconductor) D2 = LM4040CIM3-4. 1 /NOPB (National Semiconductor) □3 - zener diode BZXS4-C5V1 5, 1 V / 250mW, SOT23 (NXP) □4,03 = LED, green, SMD 1206 (e.g. Farnell it 1226377) 06 - LED. red, SMD 1206 [e.g. Farnell # 1318261) Tl = 2N3904BU (Fairchild Semiconductor) Miscellaneous K1 - 2-way boxheader, angled pins, lead pitch 3,5mm, Weidmuller typeSL 3.5/2/90G with mating 2 -way connector, Weidmuller type BL 3.5/2 K2 » RJ12 socket {e.g. Farnell# 3938359) K3 = 1 0-pin (2x5) psnheader K4 - 20 -pin (2x10) boxheader, 3M type N2520-6002-RB K5 = 50-pin (2x25) boxheader, 3M type N2550-GOO2-RB K6 = 9-way sub-D plug (male) (e*g* Farnell # 1097063) 3(7 = 4-pin pinheader, lead pitch 2.54mm K8 - USB- B connector (e.g. Farnell # 1 308876) FI - fuse. 1.25 A 125V, fast, SMD, e.g. Farnell # 1596473) F2 = fuse, 500mA, fast, SMD, (e.g. Farnell # 9922156) SI = pushbutton, SPNO (e.g, Farnell # 1555982) XI = 20.000MHz quartz crystal, HC-49U5 PCS# 090073-1, see [1] Programming and start-up The board is programmed using the MPLAB development software l 3 l* For the 1 6-bit range of microcontrollers, programming is done in ASM30 assembler directly avail- able in (VIPLAB For programming in C, the C30 compiler too can be downloaded from the Microchip website. First-time start-up requires a compati- ble programmer that will let you load the bootloader into the microcontroller. In our case, programming is performed using the ICD2 programmer f 5 I and the MPLAB pro- gramming environment. However, you can also use another compatible programmer. If everything goes according to plan, the programmer Is only required once, then the bootloader will be used for ‘flashing 1 the microcontroller via the USB port. The Tiny PIC bootloader used has to be downloaded from the Claudiu Chicufita website l 6 h A few modifications to the source file are needed to adapt it to the dsPIC30F6010A microcontroller. The mod- ified file has been renamed tinybld_ds601 0, s and is available in the download from l 1 !. ft's important to note that the microcon- troller's configuration parameters in this file have to be adapted to suit your require- ments. The bootloader is located at the end of the microcontroller's memory space, so take care not to overwrite it with an applica- tion that's too big. The first time you use the bootloader, the driver needed for using ICS's virtual COM port must be installed on the computer. Once the drivers are installed, you still need to configure ICS correctly, using the MPROG3.G program provided by FTDL Run the program and open the EEPROM-FTDI. eptfile (available in the download from I 1 !), The parameters needed for ICS to work cor- rectly will be displayed (Figure 3), Program the chip with these parameters. Once the bootloader has been programmed into the microcontroller and the FTDI 1C has been configured, the MPLAB software and programmer are no longer needed* From this point on, the microcontroller is pro- grammed using the tinybldwin software (Figure 4 and I 6 J), To put the microcontroller into bootloader mode, the reset mode has to be activated. To do this, an NPN bipolar transistor con- trolled by ICS's RTS signal forces the micro- controller's MCLR to zero. Tor this to work, the RTS command needs to be enabled in the tiny bid win program options. The trans- fer speed must be set to 1 9200 baud/s and the virtual ‘comX’ port must be selected. Pressing the ‘Check PIC’ button allows you to check the communication between the microcontroller and the computer. To program the microcontroller, load the HEX file req u i red and click on 44 Write Flash 1 '. When the microcontroller is rebooted after the reset, the bootloader is loaded. It waits 500 ms to see if there is a request elektor 05-2010 2 3 INDUSTRIAL CONTROL BOARD SI M ulli Etoyite [ 1 PROM Pr jmiiw r ( Progf.im Mtdt > 1 Fie Etntfe T«fc frfcfci p.^ui ill | | P | ? | * | *1 b&tc EMMS Device Type FTKBft * USB VK> 1 PC FTH Detail * l - ■ I - EM J'C Dcv»W Specific C^ior* ussvtfiBftNLrtw use 2 a r D-ietiiJ USSSer-iiMjatWf USB Power Wxm MflX Fvsrwcf ftH Pt VMfftd n* Arpi , SBd PSrtWSj USB Serial Nstnr (wire ^ Use F.*ed Sen* Fiied Stoifli ** 2 i*ier [ 0 ) AERBFZDJ FT2J3M optrorc FT2?2fl i mwBft r rweti tto l-rvnrl R>:D v tivstl PIS# ^ hveri CISJ ! Iwwl Dift* r hveriDSFtf r tTrBflDCO# hvtnPH Dam K> Pr.r ri USB SuspaW LT-il Remrte WbIt Up fnefcit LJSS Remote Uti lO&rtrcJ? jOKM j^CD iFiJMSaieSOrtY ) EnnSit And Roy jT*LEW - Cl PxlfiM C2 fvMKfJ* jOKlt jj C* i^TDckjc! And MwifKiii'cr Slru^i Mwulectue, RodUtf Descrriioii TFTtJ* FT 3£flU5ftUflftT r P KtflCirrartW&H 1" LoBdKSXcfcvef Figure 3, Howto configure MPROG for programming IC5. Figure 4. This program lets you load an application into a PIC microcontroller that T s been pre-programmed with the Tiny PIC Bootloader program. from the asynchronous R5-232 serial link. If yes, it goes into programming mode. If not, it runs the application stored in the microcontroller. Once the board has been commissioned, you can make use of the possibilities it offers, and particularly the use of the DSP library provided by Microchip. This board dedicated to adjusting and controlling applica- tions Internet links [1] www,elektorxom/090073 [2 1 wwl .microchip.com/downloads/en/ DeviccDoc/70 1 50D.pdf [ 3 j www. m icroch i p . co m / m p I a b [4| wwwTtdichip.com/ FT Drivers.htm [5| www. micro chip.com/icd 2 [61 www. etc. uga I . ro/cchiailita/softwa re/ picbootloader.htm needs to be able to carry out a few simple mathematical operations rapidly. To use these functions, the libdsp-coff.a library must be added to the project’s other libraries (Library Files), This file can be found (probably, depending on your installation) in C:\Program Fi1es\Microchtp\MPLAB C3G\ lib\libdsp“COff.a (090073-1) For its library, and for the Fast calculation application based on 1 6-hit registers, Microchip uses fixed-point fraction a Is coded using “1.1 5" no- tation. which makes it possible to represent numbers between -1 and 1 - 2 -15 (0,999969482), Thus -1 is represented by QxFFFF and 1 - 2' 15 by 0x7 FFF; hence the value 0x0001 corresponds to2~ 15 = 1/32768. The advantage of this coding is that it avoids overflow problems during multiplications, since the result of multiplying any numbers between -1 and 1 - 2 -15 also lies between -1 and 1 - 2° s (except for -1 * -1 ). Two decimal fractions can be multiplied rapidly by applying the mpy function from the DSP library. 2 4 05-2010 elektor THE ORIGINAL SINCE : Specialising in Prototype PCBs Free Laser Stencil PCB orders service Chemical Tin Finish (no extra cost) UK 0800 389 8560 (D Simply send your layout files and order ONLINE PCB-POOL.COM * sales@pcb-pool.com ^ |] Mi I ■ ■ I Pman-'M. Don f just Pest ft,,, ..Analyse it! Special Offer prices for limited penod or while stocks lush electronic design ltd The Famous Atlas LCR, Model LCR40 Passive component analyser. Identify inductors capacitors and resistors. Auto frequency selection. Removable probes. Optional SMD Tweezers. Crocs and Clutch Grabbers. Supplied with battery and universal hook probes. AutO'Ranges: luH - 1QH IpF - lO.OOOuF 1 Ohm - 2M Mom in a I Accuracy : Resistance 1% Inductance 1.5% Capacitance 1.5% Test frequencies: 1kHz. 15kHz and 200kHz Dimensions: 1Q3>:70x20rnm Af/as SCR ■ Model SCR100 Atlas ESR - Model ESRW Atlas ESR PLUS - ESR70 Connocl Triacs or Thyristors any way round. Aulo part-t pinout idenlification Chock gate IQGuAto lOQmA Measures gate Regulated Capacitance and ESR 1 Capacitance 1uF to 22.Q0CIUF ESR 0. Diohms to 20 ohms Gold plated croc clips £75.00 Audible alerts! ESR 0.01 ohms to 40 ohms. Capacitance measurement. Our best ESR ever 1 A Has OCA - Mode* DC ASS I 4ftes IT - Model UTP05 I Atlas Star Pack ( LCR/DCA ) The famous Peak Atlas! Now with premium probes. Connect any way round lo idenlify semiconductor type pinout and lots of parameters. TransiiSDr& Identify network cabling type Identify many fault types. Tests sockets and cables Complete with ait this: (£60. 00+ VAT) Ir lsgRa Includes the Atlas LCR, Allas DC A end a premium padded carry case wuh extra spare battery. Peek Electronic Design Ltd. West Road House. West Road. Buxton. Derbyshire SKI 7 6HF. 10101296 70012 www.peakelec.co.uk salos@peakeiecco.uk UK Please add E2 75 p&p per order, Prices include UK VAT. Soe website for overseas prices. Board Make a high voltage interface for your micrcontroiler with the Parallax Digital I/O Board Kit (# 271 13 ). Read uf> to 8 optically isolated 5-30 V inputs and control up to 8 isolated outputs. Outputs can be mechanical or solid state relays that can switch up to 12 A loads t such as cooling fans so/enoids, fteat/ng e/ements, and more. So/dering assembly required. Relays sold separately: Omron \ 2 A SPOT Relay (#400-00052); Sharp 8A So/rd State Relay (#400-00053). PEL AV &0WEP VDD Oauju SCLK.SLV Milford Instruments www.mi/inst.com Spin vent www.spinvent.co.uk www.para I tax. com M Paralhxlnc " on 7Wj££er p Focefrook, and YouTube elektor 05-2010 25 ALTERNATIVE ENERGY Solar Thermal Energy Regulator maximum power point tracking By Yves Birbaum (Switzerland) The aim of this project is to carry out regulation for thermal solar power installations. The unit shown here is useful for regulating installations comprising several sets of solar collectors with different orientations or configurations with several hot-water storage tanks, requiring several valves and pumps to be controlled. The solar energy regulator board has been designed so it can be used as a universal control board Commercial solar power regulators can han- dle one or two solar heat exchange arrays commonly known as collectors (Figure 1 ), but are not suitable for special configura- tions that comprise, for example, three collector arrays and two hot- water stor- age tanks (immersion tanks) for the heat- ing, including circulation between the two tanks. The regulation system given here is intended for solar power installations that are complex because of the number of solar collector arrays they have, or installa- tions that have been added on to an existing system designed to provide heating and/or domestic hot water for the home. It allows energy conscious home owners to maximize use of the stored solar energy and avoids an immersion heater or heating burner turning 26 05-2010 elektor ALTERNATIVE ENERGY Technical specifications * universal control board * 10 outputs 230 VAC @ 1,2 A / 120 VAC @ 2,5 A ■ io binary input/outputs (5 V), * standard LCD display interface * 5 pushbuttons * digital potentiometer on while there is still enough energy in the installation. Regulators for solar power Installations are based on the temperature difference between the roof mounted heat exchange units and the storage tank in order to determine if the circulating pump should be turned on or not. The thermal energy trans- ferred from the col- lectors to the storage t a n k depends on the solar energy received, convection and radiation losses throughout the installation, and the energy transfer on the heat exchanger within the storage tank. The proposed regulation system employs a technique known as MPPT (Maximum Power Point Tracking)* This enables the solar installation being controlled to always operate at the point where maxi- mum power is being transferred to the storage tank, which is achieved by adjust- ing the flow rate so that the temperature at the stora ge ta n k corresponds to the best possible heat transfer through the heat exchanger. To be able to control the system in this way, we need to know the tempera- ture of the storage tank and the solar col- lectors, the temperature difference of the heat transfer fluid between storage tank inlet and outlet, and the flow rate. The energy transferred to the storage tank is the product of the fluid flow rate in kg/s, the specific heat capacity, and the heat trans- fer fluid temperature difference between the hot inlet and the cold outlet. The reg- ulator will control the operating point by looking for the maximum instantaneous power supplied to the storage tank. In the current installation, the flow rate is adjusted by diverting part of the flow directly back from the pump outlet to its inlet, using a 3- way valve. Hardware The heart of this regulator is a board based around a dsPIC microcontroller from Micro- chip, described elsewhere in this issue. A simple microcontroller would have done just as well, as this application doesn’t use any calculations requiring a DSP, but as the dsPIC is very reasonably priced and the dsPIC board developed is the basic platform for several projects, we decided to use it for controlling our solar power regulator. The solar regulation board has been designed so it can be used as a universal control board, with ten binary inputs/out- puts (0 or 5V), a display with four lines of 20 characters, five switches for choosing func- tions or menus, and ten AC power outputs. The circuit diagram of the board is shown in Figure 2 . The AC power outputs (230 VAC or 1 20 VAC) are fitted with Panasonic AQH 3213 solid- state relays which incorporate an opto- iso- lator and a triac. These devices allow you to switch AC powered loads with a current of 1 ,2 A from a dsPIC board output via a 7406 ^ hot water Figure I. A thermal solar energy system using two solar collector arrays. The solar regulator has been designed for managing even more complex systems. efektor 05-2010 27 ALTERNATIVE ENERGY Figure 2. This project aims to be a board that can be used In many applications that require digital I/Os and controls for devices working off the AC grid. Regulating a solar energy system is only one possible application forthis board. open-collector buffer, which is able to sup- ply the current needed to drive the opto- isolator Using the type chosen, load switch- ing occurs at zero-crossings of the AC line voltage. All the AC power outputs are pro- tected by 1 2 A fuses (use 2.5 A for 1 20 VAC grid and loads). The flow-rate sensor chosen is a 1 50175 from Conrad Electronics 1 ^; it provides 80 pulses per litre and can operate at flow rates from 0.5 to 50 l/min. The pulse input from the flow meter is fed to the microcontroller's RC1 4/TICK digital input, allowing you to couple this input directly to an internal counter. The temperature sensors used are type DS1821 from Maxtm/Dallas, These are 1 - Wire interface sensors which provide an 8- bit digital value for temperatures between -55 and +125 °C. Solid-state temperature sensors may seem an unsuitable choice for a 28 05-2010 eleklor ALTERNATIVE ENERGY JP2 JP1 JP3 115 230 115 COMPONENT LIST Resistors R 1 -R5 - 1 kn 1 % 250m W SMD0805 R6 ~ 1kH5% 25QmW R8 “4.7kQ 4-element 5IL resistor array R7 = 4,7 kQ 8-element S!L resistor array R9. R 1 0 = 1 50H 8-element SIL resistor array Capacitors Cl = 47 OuF 25V, radial electrolytic, 10mm diam. C2-C5 = 1 GGnF, 5mm lead pitch Semiconductors IC1 r !C2 - SN74L506N (Texas Instruments or equivalent) IC3-1C 1 2 ~ AQH32.1 3 solid state refay (Panasonic) IC13 = AD8400ARZ1 (Analog Devices) 1C 1 4 = 7805 B1 - 1 KAB10EPBF bridge rectifier (Vishay), 1 *2A, 1 QOVpiv D1 — 1 N4004 Miscellaneous FI 1 = fuse. 200mA 250V (400mA, 1 20V), slow blow, 5x2Gmm F1-F10 = fuse, 1 2 A 250V, (2,5 A, 120 V) sfow blow. 5x20mm K1 -K1 1 = PCB terminal block, lead pitch 7.5mm K1 2 = 4-way 2 -level receptacle type MKKD5N 1 .5/8-5,08 (Phoenix Contact) K1 3 = 2-way 2-level receptacle type MKKD5N 1,5/2-5,08 (Phoenix Contact) K1 4, K1 6, K1 9. K20 = 2-way PCB terminal block, lead pitch 5.08mm (e,g. Farnell # 3041440) K1 5 = 8-way PCB terminal, lead pitch 5,08mm (0.2 inj(e.g. Farnell #3041 51 7) K17 - 50-way connector type N2 550-6002- RB(3M) LCDl = alphanumeric, 4 lines of 20 characters {flektor# 050 176*73) PI - 1 GkQ preset, horizontal SI -55 = pushbutton, SPNG TR1 = 2x6V 3.2VA power transformer (Farnell #1 131487) 1 1 holders for 5x20mm size Fuses (e,g* Farnell #146123) 10 1C sockets type DIL-8 2 1C sockets type DEL-14 PCB # 100038- K see [Ij solar power installation, as the sensor tem- perature may exceed 200 °C in the event of heat transfer flu id circulation stopping while the sun is shining. However, this type of sen- sor is suitable for installations where the cir- culating pump runs continuously when the sun is out. To avoid excessive domestic hot water temperature, we need to provide a discharge radiator or to use the excess solar energy to heat a swimming pool, which is the solution usually used. The advantage of this temperature sensor is the digital interface, which can be con- nected directly to any microcontroller port. The 1 - Wire protocol defines minimum and maximum times for holding the microcon- troller output at 0 for the sensor to inter- pret it as a 1 or a 0. The microcontroller is in charge of the communication, it sends a temperature read request, and the sensor elektor 05-2010 2 9 ALTERNATIVE ENERGY solar regulation program initialization delay loop interrupt routine called every 1 s read temperature sensors and ftow meter calculate instantaneous power and total energy I end calculate temperature difference dT between sensors and boifer i false true f run p ump F false increase flow decrease flow + ^ sensorl hotter^^ ^ false \than sensor 2 trueT increase ftow in sensor 1 decrease flow in sensor 1 run pump intermittently switch on overheating radiator I Simplified representation of flow control procedure depending on number of solar collectors 100033-14 Figure 3. The flow diagram for the software that drives the solar energy regulator board. sends the serial values at the microcontrol- ler's own pace. It takes the line briefly to 0 for each request for the next bit, 1 -Wire communication lets you wire up the tem- perature probes easily using 3-core cable: 0 V, +5 V, and data. The sensor pull-ups are the 4,7 kD resistors recommended by the manufacturer. However, for communication distances over 1 5 m, it may prove necessary to reduce the value of this resistor to around 2 kQ so as to ensure a signal waveform that can be interpreted correctly. An AD 8400 digital potentiometer from Analog Devices (SCI 3) lets you simulate a PT1000 temperature probe. This output is used where the boiler regulator allows control of a simple solar installation but the complexity of the installation requires a separate regulator for the solar system. The ADS400 connected to the heating sys- tem regulator lets you simulate the tem- perature of the solar collectors and in this way avoid the boiler’s starting up when the sun is out. The dsPIC board used for controlling this solar regulator includes a 20-pin connector wired to the microcontroller’s analogue inputs. These Inputs can be used if you want to use standard analogue sensors, via a cir- cuit for shaping the output signals fro mi the chosen temperature probes. The regulator measures the temperature of three solar collector arrays, the temperature of the top and bottom of the storage tank (immersion tank), the incoming hot heat transfer fluid from the collectors and the returning cold heat transfer fluid at the stor- age tank outlet, and the outdoor tempera- ture. The outdoor temperature measure- ment enables you to avoid the heat tra nsfer fluid's freezing in conditions of extreme cold below usual winter temperatures and there is no sun. When the temperature drops below the rated temperature for the water/ antifreeze mixture, the circulating pump cycles (1 0 s on, 30 s off) in order to avoid the heat transfer fluid’s solidifying in the piping, which would impair proper operation of the installation once the sun returns. The 4-line, 20-character display lets you read the various temperatures of the sen- sors, storage tank, and heat transfer fluid, and the outdoor temperature. The flow-rate and the Instantaneous energy being sup- plied by the solar collectors are displayed, and the total power supplied to the storage tank by the solar collectors is recorded. The five switches let you select the oper- ating mode for the regulator. The modes implemented are: * automatic mode; * discharge radiator / swimming poo! mode, which operates the valve to bring 30 05-2010 elcktor ALTERNATIVE ENERGY the corresponding section of the instal- lation into operation; * circulator mode, which runs the circulat- ing pump for 30 s to check It is working properly. In automatic mode, the circuit goes into swimming pool mode when the immer- sion tank temperature exceeds 85 °C, and the heat transfer fluid circuit is diverted via a 3 -way valve to a heat-exchanger connected to the swimming pool water circuit. The swimming-pool mode enables you to heat the swimming pool even when the immer- sion tank temperature is below 85 D C. Power for the system (the dsPIC board, the opto-isolators for the AC power outputs, the display, and the temperature probes) is pro- vided by a conventional supply comprising other is in shadow. A third probe checks the temperature of the solar collector on the west roof. The program sequence (Figure 3) starts by initializing the microcontroller and var- iables. The main program is implemented in the interrupt generated by timer2, The initialization function has been designed in such a way as to be able to configure the microcontroller easily depending on the desired application. It lets you configure the I/Os, counters, interrupts, and analogue/ digital conversions. The interrupt compris- ing the system adjustment section is called once a second: sun exposure parameters vary quite slowly, so more rapid contra] is unnecessary. Temperature measurements and the main checks are carried out once per second, flow-rate adjustment and valve setting is performed once every thirty sec- onds. This delay allows the system to reach Increasing the flow-rate will reduce the solar collector temperature; maintaining a tem- perature of 5-1 0 °C between the collectors and the storage tank should keep system losses close to the minimum possible. This quest for the optimum is especially worth- while during hazy sunshine. If the flow-rate i s too high, the temperatu re i n the solar col- lector d raps below the value that causes the pump to run, and the heated fluid is cooled in the pipes. It is necessary to find the flow- rate that lets you maintain an adequate temperature with causing frequent stop- ping of the pump. In strong sunshine, the flow- rate will tend towards maximum. The program includes detection of the max- imum temperature of the immersion tank. If this temperature is reached , the valve that diverts the heat transfer fluid to the swim- ming poo! heat-exchanger or overheating The flow-rate is adjusted to achieve maximum energy transfer to the storage tank a small 6 volts power transformer, followed by a diode bridge, a smoothing capacitor and a linear regulator. Software The program developed is intended for a solar energy installation with three solar collector arrays: two located on the flat roof of a south-facing carport, the third on the west side of the main house roof. At sunrise, the solar collectors on the car- port are Illuminated, but from early after- noon, they are gradually obscured by the shadow of the house. In Summer, they get the sun again partly in late afternoon, as the sun reappears in the north-west behind the house. From mid-morning til! sundown, the west-facing collectors on the roof are also illuminated. The collectors on the flat roof are connected in series, but two temperature probes have been posi- tioned according to the exposure of the collectors to the sun, in order to avoid one part of the collector overheating while the a new state of equilibrium after a change in the flow-rate or valve settings, before being able to carry out a fresh correction if necessary. The interrupt program goes and reads the temperature values from each sensor, it reads the flow-rate, then it calculates the instantaneous power being supplied to the installation and integrates the total energy supplied to the installation. The temperature differences between the solar collector arrays and the storage tank are calculated. If the temperature of an array is 3 °C higher than the storage tank, the circulating pump is started. The 3-way valve routing the heat transfer fluid between the solar collectors on the flat roof and the west roof is controlled accord- ing to the temperature differences between the various collectors. The system always seeks to balance the temperatures of the solar collectors. The flow-rate Is adjusted to achieve maxi- mum energy transfer to the storage tank. radiator is operated. In this event, the heat transfer fluid no longer passes through the immersion tank. This valve is also operated when there is no sun, thereby avoiding thermo-siphon circu- lation between the immersion tank and the solar collectors during the night. The minimum temperature of the heat transfer fluid is compared with the outdoor temperature, tf this drops below this value, the circulating pump is run intermittently, preventing freezing of the heat transfer fluid the circuit passes via the swimming pool heat exchanger or overheating radia- tor, and so does not have any cooling effect on the immersion tank. {100038-1) Internet Links [1 ] www.elektor.com/ 1 00038 [2 j www.conrad.fr/debitmetre_3_4_laiton_ pj 892 5_1 8937 _J 2785S _1 27856 elektor 05-2010 31 PIPES WIRE LOCATORS Worry-free Drilling By Harry Baggen (Elektor Netherlands Editorial) .'•m 1 | J ‘ H .f-i \ X*1 il! X J St'U A)! too often when you’re chilling holes in a wall, you hit an electrical conduit or (perhaps even worse) a water line, with the usual unpleasant consequences. A pipe and wire locator (called stud locator in the USA) can come in very handy for locating all sorts of things inside walls before you start drilling* including electrical wiring, pipes, and even joists or studs. We tested thirteen different models in the Elektor lab to see what they can (and can’t) do and how deep they can find studs, joists, pipes and wiring inside walls. Everyone who does handyman jobs on a regular basis, either at home or In someone else’s home, sooner or later encounters the problem that holes need to be drilled in a location where there s a good chance of encountering a water pipe or an electrical con- duit. If you guess wrong, you suddenly get a blast of water in your face or the earth leakage circuit breaker trips. You can avoid these problems by first using a pipe and wire locator to check whether there are any metal pipes or live conductors in the portion of the wall where you want to drill. Locators of this sort are also very handy for determining where wooden studs are located inside a wall, such as a wall sheathed with gypsum boards. A variety manufacturers now have pipe and wire locators in their product lines, including major brands in the powertools world such as Black & Decker and Bosch as well as companies that specialise in this area, such as Zircon. Prices range from around 20 pounds to 1 00 pounds, depending on the model and the features. There are also professional pipe and wire locators priced at 1 000 pounds or more, but they fall outside the scope of this survey. 32 05-2010 elektor PIPE & WIRE LOCATORS Naturally, the mam question when you're contemplating the pur- chase of a pipe and wire locator is: does it really work? What can this sort of instrument find, and how deep can it detect something in the wall? We were also curious about this. For this test, we asked several companies to provide us with various models of pipe and wire locators so we could see how well they perform in practice. Operation Most of these devices have several electrodes arranged close together for detecting pipes or studs insidewalls (see the example in Figure 1 }. These electrodes act as the plates of a capacitor form- ing part of an oscillator circuit. The coupling between the plates, and thus the capacitance of the capacitor, depends on the type of material near the plates. If the dielectric constant of the material in Practical use Almost all pipe and wire locators are used the same way in prac- tice. First you hold the unit against the wall in a location where you are sure that there is nothing inside the wall, and then you switch it on. The pipe and wire locator performs a self-calibra- tion procedure, which takes a few seconds. After this you slowly slide the unit over the walk preferably without lifting it away from the wall, in the area where you want to drill or saw. When it approaches a stud or a pipe, an LED strip or a multi-segment display indicates that the composition of the wall has changed. Using this technique, it's perfectly possible to detect wooden joists and studs or Iron and copper pipes up to a depth of sev- eral centimetres. PVC pipes are not detected unless they are rela- tively large, and ordinary PVC electrical conduits are almost never Figure 1 . The sensor surfaces on the back of the PCB are readily visible in this opened-up pipe and wire locator. There is also a coil at the top for detecting metal pipes. Figure 2. The Bosch and Skil pipe and wire locators use a coif facing the wall for accurate detection of metal objects. The PCB tracks around the coil form the plates of a capacitive sensor for wood detection. front of the capacitor plates changes, for example because there is a wooden stud inside the wall, the capacitance changes and with it the frequency orthe signal level. This is indicated visually by a set of LEDs or an LCD screen. Some scanners use sinusoidal signals, while others emit short pulse, and there are a few instruments that utilise pulse trains. From measurements on several scanners, it appears that the measuring f requency is usually well above 10 kHz, An additional sensor element in the form of a coil, possibly with a core, is often used for detecting metal pipes. This coil also forms part of an oscillator circuit. The coil responds to changes in the mag- netic field, which in turn affect the oscillator frequency or the sig- nal level. Most detectors operate with a measuring frequency of 100 kHz or more. In addition, many instruments have an AC field indicator to indicate the presence of an AC (mains) voltage. The 50- Hz or 60- Hz 'hum' emitted by power wiring can easily be picked up by a small surface antenna in the unit, which is usually already present in the form of the measuring electrodes. This signal can be amplified and used to drive an LED ora signal level meter. detected unless they have wiring inside, preferably live. Some of the pipe and wire locators we tested require you to hold a button pressed while you're scanning the wall Although this pro- longs the life of the batteries, it is sometimes not especially conven- ient, especially when you need to scan an area at the bottom of a wall or in a location that is not easily accessible. A more convenient solution is an instrument that switches on when you press a but- ton and then switches off automatically a while later. This aspect is mentioned in the description of each scanner. Another feature that can sometimes be annoying is the omnipres- ent beeper. Some models produce a rather irritating sound that you simply want to switch off after a while. Unfortunately, only two of the twelve Instruments we tested allow this (Skil 550 and Bosch PDO Multi). All pipe and wire locators utilise capacitive coupling between indi- vidual metal surfaces to detect wooden joists and studs. This allows the joist or stud location to be determined fairly accurately. Capaci- tive coupling is less suitable for detecting metal pipes, so it is not as elektor 05-2010 33 PIPE & WIRE LOCATORS easy to determine exactly where they are located in the wall with the capacitive coupling method. For this reason, some scanners also have a coil that responds to changes in the magnetic field. This makes it easier to determine the exact location. With some instru- ments equipped with a detection coil, the user guide also states that the device is more sensitive to metal pipes if you rotate it by 90° so the coil is parallel to the pipe. The Bosch and Skit units have an especially handy design feature (see Figure 2): a hole at the top of the instrument that shows exactly where the measuring coil is located. This way you can accurately determine where it's safe to drill and where it isn't. Almost all of the instruments we tested (excluding the Bosch PD06) can detect wooden studs and joists, iron and copper pipes, and wires or cables carrying AC voltage. Thin PVC conduits (for electri- cal wiring) are nearly impossible to detect if they do not contain any wiring. PVC pipes can only be detected if they have thick walls and a diameter of 5 cm or more. Iron, copper and steel pipes and alu- minium tubes can be detected reasonably well Uponor pipes, which are used in floor heating systems and have composite walls (includ- ing an aluminium layer), are also detected well All of the scanners also can also detect the presence of AC voltage, which is shown by an indication on the display or a separate LED. Black & Decker BDS300 Price: around £33 /e40 This bright orange pipe and wire locator is suitable for locating wooden joists and studs, metal pipes and live electrical wiring. The on/off button is on the side of the unit and must be held pressed while you’re scanning the wall. There is a switch for selecting either wood detection or metal detection. The indicator is a LED strip with five LEDs. A separate LED lights up when a voltage (AC mains volt- age) is detected. A buzzer sounds when the detected signal reaches the full-scale limit. Some of the scanners even provide ‘left 1 and 'right' indications on the display when you're looking for a stud or pipe, which can some- times come in handy. The Black & Decker BDS303, Zircon Multiscan- neri320 and Zircon Multiscanner i 700 provide this feature. Practical testing In order test the capabilities of the pipe and wire locators with vari- ous types of material at various depths, we assembled a setup in the Efektor lab with several types of pipes, wires and cables and a wooden stud behind a gypsum board, arranged such that the depth cou td be va ried. Th is made it easy to determ ine how deep a pa rticu- lartype of materia! could still be detected. All of the test results are listed in the table. These test results of the scanners in this test can readily be compared with each other, but you should be cautious when comparing them with the values stated in the manufacturer's specifications because we made all the measurements with the various pipes and studs located behind a single gypsum board. The results with thicker gypsum boards or solid wails containing embedded pipes or wiring may differ signifi- cantly. In any case, it’s always worthwhile to first experiment a bit on the wall where you want to locate a pipe, stud or wiring. Black & Decker BDS303 Price: around £50 / € 60 This larger B&D model has an entirely different form than its smaller brother, with a handle that lets you grasp it firmly. It Is also suitable for detecting wooden joists and studs, metal pipes and live electri- cal wiring. You have to hold the large power button pressed while scanning the wall, but this is fairly easy thanks to the shape of the handle. There is a slide switch for selecting either wood or metal detection. The large LCD screen with orange backlighting has three large bar scales to indicate when the unit has detected something; 34 05-2010 elektor PIPE & WIRE LOCATORS it can even sense studs to the left or right of the unit. The centre of a wooden joist or stud is indicated by a bull’s-eye icon. A separate LED lights up when an AC voltage is detected. All of this is supported by a buzzer for acoustic signalling. BASETech 3-in-l detector Pricer around £iG f £20 The least expensive instrument in the group, this unit can also detect wooden joists and studs, metal pipes and five electrical wiring. It’s even smart enough that you don’t have to set it to particular type of material - it indicates by itself whether it has found wood or metal. You can also use the Function button to manually set it to wood, metal, or AC voltage. The large display indicates the measured sig- nal level with a beefy 19-segment arrow. This instrument switches off automatically after several minutes of inactivity, or you can switch it off manually. A buzzer emits an irritating noise when the maximum signal level is reached, and at the same time an indicator LEO lights up. There is a separate calibration button for recalibration between measurements, so you can adjust the sensitivity as necessary. Bosch PD06 Price: around £50 / £Go The PD06 comes in the usual Bosch green and is the only instru- ment in the group designed solely to detect metal pipes and live electrical wiring, which Is all that many users need in actual practice. You press the on/off button to switch the unit on, and it switches off when you press the button again or after it remains idle for a while. The LCD screen is small but effective, with a bar scale for the signal level It also displays an icon when a voltage is detected. A hole at the top of the unit indicates the exact measuring point, so you can accurately determine and mark where you can or can't drill a hole. The green illumination of this hole changes to red when the meas- ured signal rises to a high level. In addition, the light starts blinking when a voltage is detected. Bosch PDO Multi Price: around £75 / £90 The ‘big brother’ of the PD06 can detect wood in addition to metal and voltage. It also has a distinctive illuminated measuring hole. This scanner has a separate on/off button, a button for wood detection, a button for metal detection, and a Zoom button. The instrument switches on when any button is pressed, and it switches off auto- matically after several minutes of inactivity. You can also switch it off manually with the on/ off button. The display has three separate bar scales: one for voltage and two for signal level. At high signal levels, the illumination of the measuring hole changes from green to red and the buzzer beeps. Fortunately, you can disable the buzzer if you wish. When you’re looking for metal objects, you can press the Zoom button to determine the precise location after initial detection. This activates an additional bar scale. The Zoom button must be pressed and held continuously when scanning for wooden objects. There is a pencil in the bottom of the unit for marking Identified locations. Brennenstuhl WMV Plus Price: around £16 / €20 This unit is housed in a modestly dimensioned enclosure and can detect wood, metal and AC voltage. It has a slide switch on the front that you first have to set to the desired position before you press the Scan but- elektor 05-2010 35 PIPE & WIRE LOCATORS ton. Unfortunately, after this the display does not provide any indica- tion of which function is selected, so you have to remember which posi- tion belongs to which function. There are two Scan buttons, and you can press whichever button is easier to reach in a particular situation. You must also hold it pressed while scanning. The display shows a two- digit number that indicates the signal level, along with a multi -segment bar scale as an extra indicator. Here again a buzzer provides the accom- panying acoustic indication. The instrument must be rotated by 9 G C for more accurate detection of metal pipes. Laserliner Starfinder Price: around £25 / 030 » a * This a small, handy scanner designed to detect studs and live electri- cal wiring. The user guide states that it can recognise metal studs as well as wooden studs and that no separate setting is necessary for this, Seven LEDs arranged in an arc are used to indicate the signal level as well as the selected sensitivity setting. Pressing the JVlode button switches on the scanner, which switches off automatically after several minutes. You can also use the Mode button to switch between stud detection and voltage detection. Three different sen- sitivity levels can be selected with the Set button. There is a large Cal button for calibrating the unit. A ‘calibrate 5 LED starts blinking when a new calibration is necessary. More LEDs light up when a stud ora voltage is detected, depending on the signal level* and a buzzer sounds when the maximum signal level is reached, A separate warn- ing LED also lights up when an AC voltage is detected. Laserliner Multifinder Pro Price: around £50 / 06 0 This hefty scanner with a built-in handle resembles the smaller Star- finder in terms of functionality and operation, but instead of LED indicators it has a large illuminated LCD screen with a big multi-seg- ment bar scale that indicates the signal level. The scanner has sepa- rate buttons for power on/off, wood, metal voltage, sensitivity, and calibration. It switches off automatically after several minutes of inac- tivity. The display dearly Indicates what you have to do. For example, the first thing you see Is a message telling you to place the scanner against the wall and then press the Cal button. A voltage indicator LED lights up when a voltage is detected. There are three manually selectable sensitivity levels, and of course there's a buzzer. Skil 550 multi-functional detector Price: around £62.50 / 075 The sizeable scanner has a separate on/off button, a button for wood detection, a button for metal detection, and a Focus button. Like the Bosch scanners, this instrument has a hole that shows the exact measuring point. The instrument switches on when any but- ton is pressed and switches off automatically after five minutes of inactivity, or earlier if you press the on/off button. The display has separate bar scales for voltage and wood or metal When the indi- cated value rises, a LED also lights up and a buzzer sounds. When you 1 re looking for metal objects, you can press the Focus button to determine the location more precisely after initial detection. The Focus button must be pressed and held continuously while scanning for wooden objects. Along with the Bosch PDO Multi, this is one of the few instruments that allows you to switch off the buzzer. Stanley Fatmax Stud Sensor 400 Price: around £35 / 042 36 05-2010 eleklor PIPE & WIRE LOCATORS This scanner in typical Stanley colours has only one button, which acts as an on /off switch, ft must be pressed constantly while you Ye scanning. The unit features automatic sensitivity setting, with the sensitivity level indicated by three LEDs below the LCD screen. The large display has several arrows and a bar scale to indicate the loca- tion of a stud or pipe. A buzzer sounds at the full-scale signal level or when an AC voltage is detected, A separate LED also lights up when a voltage is detected. There is a separate AC tracing' mode (selected by pressing the button twice in a row) for easy detection and tracing of electrical wiring. also detect AC voltage, which is shown by a blinking AC indicator on the display. The Instrument is fairly slim and has an on /off button on the side that must be held pressed during scanning. The display is virtually the same as the more expensive 1700 model, but without backlighting. The signal level is shown by a broad bar scale, which also indicates the location of the joist, stud, pipe or wiring. Natu- rally, there’s also a noisy buzzer, and like the other Zircon scanners we tested, this model has an LED that indicates the centre of the detected joist, stud, pipe or wiring. Zircon Multiscanner i700 Price: around £66 j £8 d Price: around £25 j £30 Price: around £66 j £Bo This model has a slide switch for selecting one of four different detection modes: wooden joists or studs, high sensitivity for deep joists or studs, metal, and voltage. The power button must be held pressed during scanning. The large LCD screen shows the selected settings, calibration mode, battery state, and - most importantly - the measured field strength with a 1 7 -segment arrow, where the number of illuminated segments increases with increasing signal level Here again a buzzer sounds when the maximum signal level is reached, and an LED lights up and shines on the exact measuring point on the wall to make it easier to mark the right location. Zircon 32 Price: around £41 / €50 This more expensive model from Zircon at least wins the prize for futuristic design. It consist of two sections joined by a hinge struc- ture. This arrangement forces you to press the bottom part (the ‘handle 1 ) slightly downward when the instrument is held against a wall, and this motion causes the scanner to switch on automati- cally. There is a slide switch for setting the scanner to wood, metal, or voltage mode. The large display has a horizontal bar scale that shows the signal level as well as left/ right/centre indication. There are two LEDs that light up to indicate the precise location of the centre of the joist, stud, pipe or wiring, augmented by a beeper. The final feature of this model is an integrated marker in the form of a pencil lead that marks a line on the wall when you press the Mark button on the bottom section of the scanner. Conclusion After making a lot of measurements andl performing various prac- tical tests, we have good news as well as bad news for you. First the good news: all of the tested units work properly, even including the least expensive unit (£1 G/€ 20 ), Now the bad news: if you want more features, more convenience or a more elaborate display, you have to spend a good deal more than 1 6 pounds. It’s difficult to pick a clear winner. The Black & Decker SDS303 is the best choice for wood detection, while the Bosch PDO Multi is the best for detecting metal objects and the Stanley FatMax Stud Sensor 400 is the undisputed champion in detecting AC voltage. The i320 closely resembles the Pro SL in terms of functionality. It also has a slide switch that can be set to metal, wood, or deep wood. The AC Scan mode of the Pro SL is missing here, but the i320 can In terms of the price/performance ratio, the BASETech is clearly the best instrument, but detecting wood is not its strong point. How- ever, all of its other test results are above average. Next comes the elektor 05-2010 37 PIPE & WIRE LOCATORS Zircon Multiscanner Pro SL t priced slightly higher, which is a some- what older model but nevertheless works just as well as the newer Zircon models in terms of the test results. For this money, you get an excellent all-rounder that is also suitable for detecting wood and AC voltage. If we consider ease of use in addition to the test results, we find that the Bosch PCO Multi and the Skil 550 (which clearly come from the same factory) have the most convenient design thanks to the com- bination of straightforward use, a clear display, and precise location of metal objects thanks to the coil located around the measuring hole. The only minus here is that you have to hold a button pressed while scanning for wood. Unfortunately, these units are also among the most expensive in our test. Our recommendation if you’re looking for a pipe and wire locator Is to first consider what you want to use it for (what do you want to find), how often you are likely to use it, and how much you’re will- ing to pay for the convenience. Based on this information, select a model from the table that meets your needs. Good luck with your handyman jobs, and always watch out for hid- den electrical conduits and water pipes! (ioqoi6-I) Block & Decker, Bosch, Brennenstuhl. Skil and Stanley scanners ore available at building merchants and DIV shops, BASETech products can be purchased from Conrad Electronics, www 1 .conrad-uk.com. Zircon: www , zl rco n , co m / b u y / wh er e to b uy . h t m I Laser! i nor: www. umarexdaser! iner.de. Table 1, Test results: detection range (cm). Model Wood 4,8 x 1.7 cm c 0 L-S Copper Aluminium Uponor PVC pipe PVC conduit with wiring AC voltage BASETech 3-irvl detector (€ 20) 2 10* 5* 5* 5* < 1 2 * 3 Black & Decker BD5300 (€ 40) 3 9* 4* 5* 5* 2.5** 2 1.5 Black & Decker BDS303 {€ 60) 6 ^7 3 4 5 4** 1 2 3 Bosch PDO 6 (€ 59) 8 5 6 5 - <1 2.5 Bosch PDO Multi (€ 92} 2.5 11 6 7 9 2 * * 1.5 2.5 Brennenstuhl MFD WMV Plus (€ 40) 3 1 4 2.5 2.5 3 < 1 1 5 Lasertiner Starfinder(€ 30) 3.5 4 3 4 5 <1 5 1.5 LaserLiner MultiHnder Pro (€ 62) 4.5 9 5 5 6 2.5** 2.5 3 Skil multi-functional detector 550 (€ 75) 2,5 | 9 6 6 8 2 * * 2 2.5 Stanley FalMax Stud Sensor 400 (€ 42) 4 7 6 3 6 <1 3.5 8 *** Zircon Multiscanner Pro SL (€ 30) 3.5 6 * 2.5 3 3.5 2** 4 r 7 Zircon Multiscanner i320 (€ 50) 4 6 * 2* 3.5* 3' <1 2 1,5 Zircon Multiscanner 1700 (€ 82} 2 6* 2.5* 3* 3.5* <1 2 2 PVC conduit, iron pipe and Uponor pipe diameter 5/8" (16 mm); copper pipe and aluminium tubing diameter 1 2 mm. All measurements made through a 9.5-mm gypsum board. Scanner rotated 90° ’ ' Wood detection mode ' * * AC detection LED lights up already at a distance of 16 cm Prices ore average retail prices including VAT. Euro / pound exchange rate: 0.83. 38 05-2010 elektor QUASAR electronics rhe Sscfronfc KH Spsciallsts Since TPV3 r-g-t. r .♦ •: i ■ » Quasar Electronics Limited PO Box 6935, Bishops Sfortford CM23 4WP, United Kingdom Tel: 01279 467799 Fax: 01279 267799 E-mail: sale 5 @qua 5 areiectronics.com Web: www.quasarelectronics.com nffaeum Please visit our online shop now for details of over SO0 kits, projects, modules and publications, Discounts for bulk quantities. Postage & Packing Options {Up to 0.5Kg gross weight). UK Standard 3-7 Day Delivery - £4.95 UK Mainland Next Day Delivery - £9.95; Europe |£U) - £8 95, Rest of World - £12 95 (up to 0.5Kg) tOrder online for reduced price UK Postage! We accept all major creditfdebtt cards. Make chequesfRO's payable to Quasar Electronics. Prices include 15.0% VAT. Motor Drivers/Controllers Here are just a few of our controller and driver modules for AC, DC, Unipolar/Bipolar stepper motors and servo motors, See website for full range and details. Computer Controlled / Standalone Unipo- lar Stepper Motor Driver Drives any 5-35Vdc 5, 6 or 8-lead unipolar stepper motor rated up to 6 Amps,. Provides speed and direc- tion control. Operates in stand-alone or PC- controlled mode for CNC use. Connect up to six 3179 driver boards to a single parallel port. Board supply: 9Vdc, PCB: 80x50mm. Kit Order Code: 3179KT - £15.95 Assembled Order Code: ASS 179 - £22.95 Computer Controlled B*-Polar Stepper Motor Driver Drive any 5-50Vdc, 5 Amp bi-polar stepper motor us- ing externally supplied 5V levels for STEP and DI- RECTION control. Opto- isolated inputs make it ideal for CNC applica- tions using 3 PC running suitable software. Board supply: 8-30Vdc. PCB: 75x85mm, Kit Order Code: 3158KT - £23,95 Assembled Order Code: AS3158 - £33,95 Bi-Directional DC Motor Controller (v2) Controls the speed of most common DC motors (rated up to 32Vdc t 10A) in both the forward and re- verse direction. The range of control is from fully OFF to fully ON in both directions. The direction and speed are controlled using a single potentiometer. Screw terminal block for connections. Kit Order Code: 316Gv2KT - £22.95 Assembled Order Code: A33166v2 - £32.95 DC Motor Speed Controller (10QV/7.5A) Control the speed of almost any DC motor rateo up to 100V/7.5A. Pulse width modulation output for maximum motor torque at all speeds. Supply: 5-15Vdc, Box supplied. Dimensions (mm): 60Wx10QLx60H, Kit Order Code: 3067KT - £1 7,95 Assembled Order Code: AS3067 - £24.95 Most items are available in kit form (KT suffix] or assembled and ready for use (AS prefix]. Controllers & Loggers Here are just a few of the controller and data acquisition and control units we have. See website for full details. Suitable PSU for all units: Order Code PSU445 £7,95 8-Ch Serial Isolated I/O Relay Module Computer controlled 8- channel relay board. 5A mains rated relay outputs. 4 isolated digital inputs. Useful in a variety of control and ^‘sensing applications. Con- trolled via serial port for programming (using our new Windows interface, terminal emula- tor or batch files). Includes plastic case 130x100x30mm, Power Supply: 12Vdc/50QmA. Kit Order Code: 3108KT - £64.95 Assembled Order Code: A331Q8 - £79,95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port, a C or C F. Continuously togs up to 4 separate sensors located 200m+ from board. Wide range of free software applications for stor- tng/using data, PCB just 45x45mm. Powered by PC. Includes one DS182G sensor. Kit Order Code: 3145KT - £19,95 Assembled Order Code: AS3145 - £26,95 Additional IDS182Q Sensors - £3.95 each Rolling Code 4-Channel UHF Remote State-of-the-Art Highsecurity. 4 channels. Momentary or latching relay output, Range up to 40m. Up to 15 Txs can be ieamt by one Rx {kit in- cludes one Tx but more avail- able separately), 4 indicator LED 's, Rx: PCB 77x85mm. 12Vdc/6mA (standby). Two and Ten channel versions also available. Kit Order Code: 3180KT - £49,95 Assembled Order Code: AS3180 - £59,95 DTMF Telephone Relay Switcher Call your phone num- ber using a DTMF phone from anywhere in the world and re- motely turn on/off any of the 4 relays as de- sired. User setts bte Security Password, Anti- Tarnper, Rings to Answer, Auto Hang-up and Lockout, Includes plastic case. Not BT ap- proved. 130x11Gx3Gmm. Power: 12Vdc. Kit Order Code: 314GKT - £74,95 Assembled Order Code: ASS 140 - £89.95 Infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control unit. Toggle or momentary. 15m+ range. 112x122mm, Supply: 12Vdc/G.5A Kit Order Code: 3142KT - £59.95 Assembled Order Code: ASS 142 - £69.95 New! 4-Channel Serial Port Temperature Monitor & Controller Relay Board 4 channel computer serial port temperature monitor and relay con- troller with four inputs for Dallas DS 18320 or DS18B20 digital ther- mometer sensors (£3.95 each). Four 5A rated relay channels provide output control Relays are independent of sensor channels, allowing flexibility to setup the linkage in any way you choose. Commands for reading temperature and relay control sent vaa the RS232 interface using simple text strings. Control using a simple terminal / comms program (Windows HyperTerminal) or our fre e W i nd 0 ws a ppl icatlo n s of l wa re . Kit Order Code: 3190KT - £69.95 PIC & ATMEL Programmers We have a wide range of low cost PIC and ATMEL Programmers. Complete range and documentation available from our web site. Programmer Accessories : 40-pin Wide Z1F socket (ZIF40W) £14.95 ISVdc Power supply (PSU120) £19.95 Leads: Serial (LDC441) £3.95 / USB (LDC644) £2,95 USB & Serial Port PIC Programmer USB/Serial connection. Header cable for ICSP. Free Windows XP software. Wide range of supported PICs - see website for complete listing. ZIF Sccket/USB lead not included. Supply 16-1 8Vdc Kit Order Code: 3149EKT - £49.95 Assembled Order Code: AS3149E - £59.95 USB ■Ail-Flash' PIC Programmer USB PIC programmer for all 'Flash' devices. No external power supply making it truly portable. Supplied with box and Windows Software. ZIF Socket and USB lead not included. Assembled Order Code: AS3128 - £49,95 See website for full range of PIC & ATMEL Programmers and development tools. Secure Online Ordering Facilities • Full Product Listing. Descriptions & Photos * Kit Documentation & Software Downloads ROOMBA Make Room for the Roomba! By Wisse Hettinga (Elektor Editorial) Without question, one of the duties we enjoy the most at Elektor is organising teardown parties, where the only objective is to take something apart. There’s nothing more fun or exciting than attacking a piece of equipment (preferably something expensive) with a screwdriver and a hobby knife, and with the vague expectation that we we'll be able put it all back together afterward. This time we wanted to have a cioser look at a robot vacuum cleaner, and one of our colleagues in Customer Service just happened to have one. Jolanda! How about loaning us your hoover for a little experiment? 05-2010 elektor Fortunately, she was willing to sacrifice her Roomba to the cause of science, and - believe it or not - she was even excited at the pros- pect. With a good supply of beverages and a keen photographer on hand, we were able to document the whole process for posterity. The iRobot Roomba is around 30 cm in diameter and stands 1 0 cm high, it (or should we say ‘she\ since it moves so gracefully?) travels around the room sucking up everything in its path. It comes complete with a charging unit, and It has an extra device you can use to cre- ate a virtual walk With its bumper, it automatically detects any obstacles in its path, and when it encounters an obstacle it takes a different route. After finishing the job (all ful'y configurable). It returns to Its charg- ing station, it has sensors to make sure It doesn’t fall down the stairs. If you turn it upside down, you can see that It's fitted with a roller brush, along with a small rotary brush (side brush) for the corners. Finally, there's an optical sensor on top of the Roomba that enables it to dock smoothly with its base station. Teardown When teardown time comes, there's only person on the team who can wield a screwdriver with no sign of hesitation: jan. Even the threat of docking his pay to cover any resulting damage doesn't hold him back. Now we can see what T s inside: a battery (3 A T 12 cells, 1 5.57 V) and sensor contacts, the spring-mounted wheels with their own motor (RS 540), a bunch of screws and bushes, and - of course - lots of dust. The front (steering) wheel has a black and white pattern, which makes it easy to see whether the Roomba ROOMBA Is moving. We also see another four IR sensors that help keep the Roomba on the right path. Some of the dust manages to get past the filter. Apparently IV s a good idea to dean the Roomba from time to time. Now we come to the electronics. There’s a sizeable PCB, with as its most prominent features a WiFi daughterboard with a Freescale MCI 3202 r, an ST ARM7 master micro- controller that looks after all the operating functions, and a connector for updating the software. Of course, there's also a *kinda’ control panel with LED display for setting the time and other functions. In order to maintain a good working relationship with its owner, the Roomba can report faults and problems in var- ious languages. Now we have a big pile of parts, and it's time for the miracle; putting it all back together and make Jolanda happy again. All’s well that ends well, as they say. With its update connector, the Roomba naturally lends itself to updating or reconfiguring the software. You can find all sorts of tweaks and hacks on the Web that let you use the Roomba for other purposes, such as a musical instrument. You can even turn it into a fighting machine, as illustrated at .... - http://roomba.pbwlki.com - www.makezine.com/ blog/a rch r ve/2006/03/ videos_f rom_room ba Jgh ts.htm I - http;//todbot.com/blog/2006/05/03/roombamidi-roomba-as‘midi-instrument elektor 05-2010 DESIGN TIPS Star LED instead of incandescent lamp By Co Slokker (The Netherlands) Traditional indicator lamps with a filament or often also available these days — on a one-for-one replacement basis - in versions made with LEDs. In this implementation the LED, together with a series resistor, is mounted in the traditional housing* In some applications there are wide variations in ambient light (for example day/night in the cabin of a vehicle)* The lamps are dimmed at lower ambient light levels so that they are not annoyingly bright, usually using a series resistor When you replace the incandescent signal lamp in such a circuit with an LED- lamp then the LED will be much too bright in the dimmed state. This is caused by the different characteristics between incandescent and LED-lamps* However, by taking these characteristics into account it is certainly possible to dim the LED lamps. As an example, we will compare the characteristics of a green CML StarLED 1 507 1 45G3 with a standard 28 V/45 mA incandescent lamp* We start by determining the cur- rent drawn as a function of applied voltage for each type of lamp. Then we measure* in a dark environment, the change of relative brightness as a function of the applied voltage (see Figure 1 ). From this we conclude the following; * At 28 V the LED is about four times as bright as the incandes- cent lamp at a third of the current * The current characteristic of the incandescent lamp is strongly non-linear, while that of the LED is practically linear (after over- coming the forward voltage drop), * The relative brightness of the incandescent lamp increases exponentially, while that of the LED is initially linear after which the slope gradually reduces. When dimming the incandescent lamp you reduce the voltage with a series resistor. From the graph you can see that the lamp still draws about 28 mA at 1 2 V, while the brightness is effectively nil* The series resistor amounts to (28-1 2) / 28*1 O' 3 = 571 a At 1 2 V the brightness of the LED hasn't even halved yet; 1 4.5 mS compared to 27,4 mS at 28 V* From measurements it appears that for the LED at 1 2 V to appear just as bright as the incandescent lamp (6.8 |iS [l1 }, a current of only about 24 pA is required; more than 1 000 times smaller than that for the incandescent lamp at 1 2 VI The series resistor required for this Is {28 - 2,5) / 24x1 O’ 6 - 1800-1 M£i (approx*) which is obviously much more than the 571 Q required for the incandescent lamp! Figure 2 shows a simple circuit for the practical evaluation of the automatic brightness control for two StarLEDs. Because the LEDs that we tested are at 6 V are already just as bright as the incandes- cent lamp at 28 V, a 9 V battery will suffice for the power supply. With SI you can select between automatic and manual control; the third position turns the circuit off. The automatic control is achieved with an LDR driven double current mirror, built around T1 , 12 and T3, The current through each LED is Figure 1* Brightness of the LED and incandescent lamp as a function of applied voltage. equal to the current that flows through R1 * You have to make sure that the position of the LDR is such that it is not illuminated by any of the LEDs, otherwise there is the chance of runaway feedback to maximum brightness. With SI in the ‘manual’ position you can also adjust the minimum desired brightness of the automatic control* In absolute darkness* after sufficient recovery time has elapsed, the LDR that we used here has a very high dark resistance (hundreds of MQ) and only the current through R, now determines the brightness. Once your eyes are sufficiently accustomed to the darkness you can set the desired brightness with potentiometer R . A logarithmic type is used for R, to make the adjustment of low brightness levels easier. Once SI is switched back to "automatic’ there is no need for any fur- ther adjustments. The potentiometer could then be replaced with a trimpot or fixed resistor of appropriate value. ( 090317 ) Figure 2, Circuit to evaluate the brightness of the LEDs. 4 2 05-2010 elektor E-LABS INSIDE arrow? iw soMzaeuwE ensiiiEa Measured again By Ton Giesberts (Elektor Labs) represents the measured value divided by 3, which also applies to all other current measurements). Cos <|> was a neat 0.98 , but the power factor was only 0.42. The latter is therefore a problem with energy-saving lamps, especially with LED lamps. The meas- ured pure power consumption was 5.87 W, the apparent power was 14 VA and the reactive power was 1 2.7 VAR. The follow- ing day we carried out the measurements again and obtained slightly different results: 5.83 W, 1 1 .3 VA and 9,67 VAR, PF = 0.51 en cos p = 0.975. The differences could possibly be The article "Blinded by the Light?' in the February 2010 edition showed that LED lamps didn't exactly present a clean load to the AC grid and in fact created quite a bit of pollution and distur- bance. A number of readers gave us some interesting feedback to this article. One of them was Gerard Grashof, who works for Fluke Industrial and provides product support for their Scopem- eterand advice on Power Quality. He wanted to point out that the behaviour of such malns-powered devices could be closely monitored and analysed with the help of some special measur- and the LED lamp ing equipment made by Fluke. We were keen Lo find out more about this and invited Gerard ___ == __ over to the Elektor Labs, obviously along wiLh a Fluke Power , ^30.3 uj 1 IB fl B When we previously made measu rements with a “norma I 1 oscil- % ioscope in the Elektor Lab on various types of lamp we already I determined that, although LED lamps were very energy effi- i I dent, they presented a strange, complex load to the AC grid. The harmonics created on the AC supply lines by these devices 1^ have an effect on the size of Lhe substations required at the end of the electricity distribution system. These harmonics are responsible for extra losses In the transformers, which means they should really be over-engineered to cope with this extra heat (larger losses). The losses in the transformers are propor- tional to the Frequency of the harmonic multiplied by its ampli- tude. This is represented by the so-called k-factor, which indi- cates how much a transformer should be de- rated as a result of harmonics in the current. Mid and high-voltage transformers in the power AC grid can normally cope with a k-factor of 3-4, m Fluke has designed an analyzer specifically For measurements on (three-phase) AC powered equipment: the 434 Power Qual- / ity Analyzer. With the help of such an analyzer we have once £ more made some measurements on an LED lamp. To make it easier to measure the current we used an 131 0s AC/DC Current Clamp. This time round we tested the Pharox lamp made by Lemnis, a 6-watt LED lamp marked by a peak value in its cur- rent consumption that's similar to Lhat of the LED lamps we used in the original article. In order to calibrate the equipment we first measured a 1 00- watt incandescent lamp. After carefully adjusting the current clamp (the Hall sensor used inside it is slightly temperature dependent) we measured a power factor of 0.98. With a pure ttETEB The most important measurement we obtained was the k-fac- tor for this LED lamp. This turned out to be a massive 99 {THD resistive load we were really expecting exactly 1 . At first we was 1 55 %)! The second measurement returned an even higher thought this might have been due to a slightly less than per- k-factor of 130, with a THD o' 150% (this changed as the lamp feet sinusoidal waveform of the mains voltage in our Lab. How- was on for longer). This really is an extreme value, especially ever, another reason could be that due to the small current flow when you consider that in many countries, AC power grid trans- the current clamp did not get a large enough signal to meas- formers are designed with a k-factor of 3-4 in mind... ure accurately. In this case a simple trick is to loop the cable twice through the current clamp instead of straight through. The measured value is then too big by a factor of 3, but at least the power factor was now found to be a perfect 1 . Now the time had come to take measurements on the LED These measurements show that big improvements have to be made in the design of LED lamps, otherwise there is a good chance that the electricity suppliers will suffer from big prob- lems once these LED lamps start to be used on a large scale! lamp. The current consumption was found to be 0.067 A {th/s {100099) 43 09-2010 elektor E-LABS INSIDE Embedded World 201 0 or how to Vision enhancement? (source: NurnbergMesse/Frank Boxler) Open vs. dosed source: Microsoft cohabiting with a penguin. ( so u rce: N u rn be rg M esse / Fra n k Boxl er) More than 700 students came to visit the show on Student Day. (source; Nu m berg M esse /Frank Boxfer) By Antoine Authier & Clemens Valens In the first week of March the German city of Nuremberg once again hosted the Embedded World Exhibition & Conference, 730 exhibitors showed T 8,350 visitors the full range of prod- ucts for embedded technologies in 201 0: hardware, software, tools, services and lots more. Eiektor was among the visitors — here is our report Four huge halls full of booths (not booze) loaded with electronic novelties really are too much to handle, even when you have three days. At Eiektor we knew this, so we came prepared with a list of exhibitors that we definitely wanted to visit. On this list was German Renesas distributor GJyn, and since they were conveniently located right in front of the main entrance, this was our first stop. Glyn staff informed us about the upcoming merger of Renesas and NEC, the companies continuing under the name 'Renesas Electronics Corporation' (REC). Other inter- esting news was the new RX MCU family positioned by Renesas as the upgrade successor to the H8SX and R32C, the latter well known to Eiektor readers. This faintly is supposed to provide more power at less consumption, which was clearly the lead theme for this exhibition. It was green and low-power all over the place. Being press we attended the official press conference and par- ticipated in a guided tour of the show. During this tour the green side of the show was once again emphasised wi th visi ts to (amongs others) Hitex, Mentor Graphics and Fraunhofer. Hitex presented a clever tool for current consumption analysis of soft- ware called PowerScale and won the Embedded World Award in the category Tools, The winner in the Hardware category was Energy Micro's EFM32, the world's most energy friendly 32-bit microcontroller that consumes only 180 pA per MHz when run- ning from 3 V. Microchip was of course present too with their extreme low- power (XLP) microcontroller family (50 pA per MHz). A novelty was their new MCP1640 ultra low-power boost regulator that took four years to develop. It will startup from 0,65 V and then pump from as low as 035 V up to 2 to 5.5 V which is obviously great to discharge batteries deeper. Touch technology was another important theme during this exhibition. Atmel for instance won the award in the Special Mer- its category for their new maXToucb technology presented in the form of the chip mXT224. This 1C allows for touch screens that support not just finger touch but also stylus, fingernails and even gloves for drawing or character recognition, Atmel's touch products are supported by the free Qtouch library and Allium integrated a module in their Designer schematic/PCB drawing software for quickly designing and drawing compatible touch sensors on PC8s in any shape you like, STMicroelectronics distributed for free (and not asking for address details!) tiny development kits for their new 5TM85 8-bit microcontroller family supported by free programming tools. This kit sports one capacitive touch key that controls an 44 05-2010 eiektor LED and a USB port. When connected to a computer ft becomes a "mass" storage device of 32 KB, That brings us to the third major theme of Embedded World 2010: making microcontroller development easy. An increasing number of microcontroller manufacturers offer free or "mildly restricted" tools to quickly get an application up and running. ST teamed up some years ago with the French company Ra iso- nance to develop cheap tools for SFs ARM products. The latest tool from Raisonance is the Open4 (business) that wifi be avail- able from ST too, albeit under another This tool, a Gameboy- ish device with a colour display, a touchscreen, a joystick, audio interface and USB debugging/programming port works with user supplied microcontroller cartridges that determine the functionality of the device. Software development for the user cartridge is done with cheap or even free programming tools and the device is supposed to sell for less than $ 1 00, Free tools are also available from FTDI for their brand new Vin- culum fl processor The first Vinculum was a cheap solution for easily building of USB products, but FTDI went one step further with the second version that has become a full blown generic 16 bit microcontroller with lots of other peripherals and of course USB. Programming and debugging is cheap as the tools are all free. After we signed a non-disclosure agreement FTDI showed us what will definitely be the next killer product for USB to R5-232 converters. Keep your eyes open, this product is going to change the world! Green, cheap and easy are also the main features of the mbed ARM Cortex-M3 board. Essentially an ARM product, it was pre- sented on the NXP stand because the currently available mbed boards have NXP processors. Software development for mbed employs a browser and a compiler farm on the internet. Write a program, compile it online and then download the executable to your mbed board. The boards are cheap and the tools are free, and many libraries are available. Following NXP and their LPCXpresso product line with free-ish (up to 128 KB executable) programming tools by Code Red, compiler manufacturer Keil too presented a kind-a-free Eclipse & GCC based open source compiler for ARM processors, the DS-5, Keil (owned by ARM) made a point of telling us that they actively participate in the open source community and they contribute to the GNU C/C++ compiler. Similar statements were made by other software producing companies, which brings us to the interesting observation that the open source commu- nity seems to be slowly taken over by commercial entities that pay their employees to write free software together with their competitors. Of course there were many more interesting products and dem- onstrations to see, but we do not have the space to mention them all here. So why don't you go and see for yourself next year? Nuremberg is a nice city with a well-preserved ancient centre and good food and accommodation. One warning though: try to not eat all the sweets, chocolates and cookies available on almost every booth, you need good teeth to eat your way through the information. (100215-!) Trntin at the Embedded World, (source: NurnbergMesse/Frank Boxler) Atmeis Qtouch suite n migmimpapi The Vinculum II (VNC 2 ) is more than just a USB host controller. elektor 05-2010 The making of the dsPIC board (2) Last month we began an insight to how we at Elektor hone a readers circuit to create a tested, reproducible design, the story continues..* in the first instalment Id we reported how one of our resident engineers, Daniel Rodrigues (who hails from Portu- gal) redesigned the PCB and finalised the parts list The compo- nents for this board were now on order and Daniel began work on the second set of boards for the project This is an expansion board containing interfaces to the peripherals such as motor- ised valves and sensors. The two boards together form a com- plete control unit which manages a solar heating installation to optimise the energy harvest (see the article elsewhere in this magazine). Once all the components for the dsPIC controller board had arrived Daniel began with the building process “I decided to use the SMD oven for one of the boards and hand-solder the other one”, explained Daniel. As luck would have it we received a visit by a representative from the Dutch distributor of the ‘Magnus' professional USB microscope for PCB inspection l 2 l (with our lab assistant jan Visser). This was too good an opportunity to miss; Daniel rigged it up to inspect the freshly built boa rds. 1 1 showed up a thin solder bridge between two microcontroller pins which curiously did not measure as a short circuit. In most cases this sort of failure can be quickly identified by simple electrical tests and easily remedied. Once he was happy with the build Daniel sent off a finished pro- totype controller board to the project’s authors for functional testing. Here in the Elektor lab we are familiar with Murphy's Law, we know if anything can go wrong then it will, in this case Yves Birbaum had unfortunately been laid low by an illness and wouldn’t be able to test the board for a few days. The uncer- tainty of the board’s functionality was worrying Daniel. He started browsing the software folders in the solar-array con- troller project trying to find a routine to help in testing. Hopes were raised when he found some C files with the word 'essaT (French for 'test’) in their titles; "unfortunately the functions were not much help for what I had in mind” recalled Daniel. Instead of sending characters back and forth between the con- troller and PC using a terminal emulator program he wanted a more useful test with the controller switching a few test LEDs. He built the test hardware (see photo) and quickly modified the Main function in the C program to 'sweep' the line of LEDs, “Up till now I had only worked with the standard range of PIC controllers but as you would expect there are a lot of similari- ties with the dsPIC instruction set and the MPLAB-IDE and C30 Compiler are really well documented” enthused Daniel. In the meantime Clemens Valens, our French editor responsible for the two articles had put the finishing touches to the original text and there was enough time for it to be sent for translation into the other languages. The Elektor test routine would likely be of interest to constructors so we have included it in with the rest of the software. By this time we had taken delivery of two of the bare expansion boards for this project. All of the components except the relays had been ordered from Farnell, unfortunately one of them; a hex inverter was not in stock "this added another week to the process" said Daniel and by the time everything arrived it was looking doubtful we would get the finished board to the authors in time. Daniel placed all the components and cranked up the reflow oven. We were soon to witness an extension to Murphy's Law which states that the chances of anything going wrong are multiplied by the inverse of the remaining time. During board testing a DC/ DC converter was found to be faulty; "when l took a closer look i could see two tiny beads of flux had apparently oozed out of the component housing". Chances are that the device had given up the ghost during the re-flow process using lead-free solder. With the component replaced he was relieved to send the boards off with a dean bill of health. The final func- tional test can now only really be carried out by the project's authors where both the Elektor boards will replace the author's original to control the solar installation. One practical test is worth a thousand simulations! (100216) 1 1 j www.elektor.com/09 1079 [2] www.tagamo.dk elektor 05-2010 46 DISTANCE LEARNING COURSE Programming Embedded PIC Microcontrollers K , special introductory price- I _ > using Assembly, C and Flowcode £ 40 |$ 70 |€ 50 DISCOuni W ww.elektor.com| distancetearryog In this course you will learn how to program an embedded microcontroller. We will start with the absolute basics and we will go into a lot of detail. You cannot learn about software without understanding the hardware so we will also take a close look at the components and schematics. At the end of the course you will be able to design your own embedded applications and write the appropriate software for it. Contents: Background Digital Ports Serial Communication (RS232) Analog Signals Pulse Width Modulation Timers/Counters/Interrupts Memory LCD Display PC Communication SP3 Communication USB Comm un ication Configuration (Fuses) Answers to the assignments Appendix Yourcourse package: * Courseware Ring Binder (747 pages) * CD-ROM including software andexample files * Application Board * Support at Elektor Forum * Elektor Certificate Price: £395.00 / $645.00 / €445.00 Please note: to be able to follow this course, E- blocks hardware ss required which you may already have {in part). All relevant products are available individually but also as a set at a discounted price. Please check www.dektor.co rn<' distancelearning for further information. * k-Y B .i,; r'* t \ ~ _ e I e k AC A D E \ i u\ the school of electronics Further information and ordering at www.elektor.com/distancelearning AERONAUTICS & METEOROLOGICAL Cloud Altitude Meter your head in the clouds with ‘AirControl’ By Antoine Authier (Elektor Labs} from an idea by Jurgen Marss (Germany) This circuit was dubbed AirControl because it indicates the altitude of the clouds by measuring air temperature and humidity and then silently doing a mass of scientific calculations. It should make an interesting meteorological tool for people who keep an eye on the sky. When it landed (on my desk), Jurgen Maiss' 7\i rC o ntro I r p rot ot y pe immedi ate I y a ro u sed my curiosity and seduced me by its originality: how could this circuit, using a simple humidity (and temperature) sensor, work out the alti- tude of the cloud base for cloud masses? “A gliding enthusiast, Jurgen is also a pilot; so meteorological data are vital to him, he's bound to know his subject!" I said to myself, though still sceptical “But are the results obtained In this way reliable?” In addition, this circuit uses a miniature dig- ital sensor that 1 hadn't ever used before,,, that was all it took to launch me into the adventure, without a balloon or tape-meas- ure in sight. From a meteorological point of view First of all, a few reminders about thermo- dynamics. Mot being a meteorologist, I poured over various encyclopaedias to try and understand the phenomena being exploited here. Here are some results of my research. This circuit measures the ambient air tem- perature and relative humidity. In order to determine the altitude of the cloud base, it is necessary to first calculate the alti- tude at which the water vapour in the air condenses. The dew point I 7 1 or dew temperature cor- responds to the saturation temperature of the air at a given pressure — in other words, the temperature at which the water vapour in the air is at a maximum. If, at constant pressure, the air temperature drops below this dew point (isobaric transformation), the excess water vapour will condense to form cloud, fog (low cloud), or dew, depending on the altitude at which the phenomenon occurs. The warmer the air, the more mois- ture it can hold. The August-Rocbe-IVtagnus formula lets us approximate this (dew) temperature T ri : y(T,RH) TjiTiRH) = T n ■ m — y(T n RH) y(T,RH) — In (RH\ m-T mjT^T using the constants j r, = 243.12 °C | ffj = 17.62 This approximation is valid 'above water’ (in the jargon), Le. for temperatures between 0 and 60 Celsius, and relative humidity between 1 and 100%. Specifications: - MCU; Atm eg a 32 4 PA- AL) from ALmel . jTAG su pport * SHT 11 humidity sensor from Sensirion, o-ioo % RH, accuracy 3 % - Powered by three AAA/R6 penllght cells * Minimum battery life one week (with new batteries and without using * Works out the cloud base altitude * 4 fine * 20 character display * Portable, sensor on detachable breakout board In order to understand the explanations that follow, you 11 probably find it help- ful to read up about ‘atmospheric pres- sure' and 'convective instability' from the link l s l. Let's now consider the standard atmosphere model as used by many mete- backlight) orologioal offices, with a vertical temper- ature gradient that remains of the order of -0,65 °C every 1 00 m {approx, 300 ft) in the lower atmosphere {also called troposphere). 48 05-2010 elektor AERONAUTICS & METEOROLOGICAL LCD! EA-DIP204-4 or DC 00 □n J 3000000 □□GODOT Dai 00 oin anuonnao 00000 □□DDE 30 □ □ 00 IDO 300 1 111 D00 « Q . =* (fl Q O Hi 5 > > > i K ur 5 /J O r- x n c +■ p S a 3 S S S 5 S J- 2 3 4 S § | IB T ft 9 ID 11 72 13 14 17 10 Ju2 EZl +5V m ®— QiU 090329 It z 0 being measurement altitude, we finally obtain "cloud This calculation assumes that the atmos- phere is standard and that the humidity is constant with altitude.,. All that remains is to go up in a balloon to check If this model actually works in the troposphere (up to about 16 km; 54,000 ft.). While we’re wait- ing for the air in our balloon to heat up, let me tell you about the hardware platform. Hardware To be appealing a project like this needs to be portable, compact, elegant but sturdy, and have long battery life. Its supply volt- age should not be more than 3.3 V. The dis- play should be as compact as possible, but have good resolution. Everything housed in a little case with the power source, small enough to fit into your breast pocket or even smaller bits of textile. Three 1,5 V AAA pen fight batteries or 1 .2 V rechargeables, i.e. 4. 5~3, 6 V when connected in series, will each provide around 1000 mAh. Wei! come back later to the backlight for the display, which requires 5 V. The supply for the various sensitive devices and modules is provided by an LP2980 1 4 1 regulator 1C from National, which can supply up to 50 mA with a very reasonable 0, 1 2 V voltage drop. Ideal for battery-powered applications, this device supplies more than enough current for this part of the circuit, which at worst will consume 10 mA (during the measurement phase). The devices that consume more power — the backlight and resonator— will be connected to the batter- ies via resistors, R8 protects the resonator l 5 J, which is only rated for a maximum voltage of 4 V, whereas eiektor 0^2010 49 AERONAUTICS & METEOROLOGICAL COMPONENT LIST Resistors (SMD 0805 ) R1--R4, R7 = lOkil R5, R6 = 1 kf 2 Rg t R9 = ioa PI = 1 0kn SMD preset (Vishay TS53) Capacitors (SMD 0805 ): Cl h C9 - 2.2pF 1 OV 1 0% tantalum (BR 8H) a-CBXIO.Cll - lOOnF Semiconductors 01 .02 = LED. red. 3mm. high efficiency 03 - 1N4148 (SMD version: LL4148) Ti J2.T3 = 2N7002, n-thannel MQSFET |C1 - LP2980AIM5-3.3. 3.3V / 50mA, regulator IC2 - AT mega324 PA-AU, programmed 1C3 “ SHT11 Miscellaneous XI = 32.768kHz oscillator module, CL = 6pF (Epson Toyocom MG306) LCD1 »= 4x20 characters (Electronic Assembly EA DIP204-4NLED) BZ1 - miniature resonator (CUI CST-931RP/A) 5 1 ® micro slide switch (E AO 09- 1 0290-0 1 } . 52-54 = pushbutton. SPNG. 1 2V / 5€mA, 6x6 mm -13 mm. Tyco Electronics FSM T 4|H K 1 = 6-pin SIL ptnheader, lead pitch 0.1 in. (2.54mm) K2. K6 - 6-pin pinheader, double row, angled pins, lead pitch 0.1 in. (2.5 imm) K3. K4 = 4- way pin receptacle, lead pitch Q J in. (2.54mm) K5 = 6-pin SIL pinheader, lead pitch 0.1 in. (2.54mm) > n , .rc Enclosure. Bopla type BOS400 Streamline with battery compartment for 3 AAA cells \ftop\a < Bs 401 F-7024 ) and decorative fixing (Bopia # B5 400 DI-D-7024) PCB # 090329-1 I 11 ) . _ _ 11, Front panel design , to print and cover with plastic foil. # 090329-F 1 - Complete kit (with SMD parts soldered on board) li you're interested in a kit version of this project. please let us know by e-mailing; editor@e!ektorxom. subject; AarControl KiL JTAG pinout A Txiyla 3.3Ubx(*>I gnd'V; , UflRT!. I Output three new high-grade alkalines will supply over 4.7 V. The frequency of the sound emit- ted (around 2.7 kHz) is pulsewidth modu- lation (PWM) controlled by the microcon- troller via PET TI . This also allows the power consumed by the resonator to be limited. Tests have shown that PWM with a duty cycle of 40 % makes it possible to obtain a good sound volume. The LC display is the well-known EAD1P204- 4 [3] from Electronic Assembly. This module is not cheap, but there’s nothing to com- pete with it either. Compact and connector- mounted, it provides four tines of 20 charac- ters and a table of characters and symbols that is more suited to our languages than the usual Oriental symbols. The main reason for my choice of this display Is the fact that It can be powered from 3.3 V, and doesn’t need a negative voltage on its contrast pin: just a preset is enough! Its being driven here in 4-bit mode, but it’s also compatible with the SPt bus (see the data sheet for the Sam- sung KS4Q73), which I would have liked to have used. Unfortunately. I didn’t have the time to experiment with that this time. The display can be turned off completely thanks to T3, which lets us save around 5- 6 mA when the user doesn’t need it. The complete Initialisation of the LCD control- ler takes a little time each time the unit is turned on. The LED backlight requires powering at 5 V, with resistor R9 to limit the current. The backlight is also connected to a micro- controller pin that can supply a PWM signal, which through FET T2 controls its bright- ness, and hence its power consumption. If the unit is powered from rechargeables rather than alkaline cells, the voltage to the backlight will only be 3.6 V (with fully charged batteries); in this event, the back- light brightness will be reduced, though that doesn’t affect the readability of the display. The circuit is based around an ATmeg- a324PA processor I 2 1 with numerous handy peripherals and very low power consump- tion. The ATmegaSS originally used soon proved inadequate in program memory capacity, and in the number of input/out- put pins. What's more, the ATmega324 also 50 05-2010 elektor AERONAUTICS & METEOROLOGICAL Figure 1 , The RGB and main components. The great shy microcontroller Is hiding under the display. contains a real-time counter, which wilt let us measure the time* Watch out! Atmel provides here an RTCounter which, even though it isn’t a true RTCIock, does prove jolly handy for developing a real-time dock in just a few minutes. This function will use a timer, a little bit of space in flash memory, an interrupt vector, and a few clock cycles* It’s important to connect to pins TOSC1 and TQSC2 of the microcontroller a crystal oscillator that presents a load of 6 pF, In this event, capacitors Cl 2 and Cl 3 are not fit- ted. If the capacitive loading of the crystal is different, it must be corrected using capaci- tors Cl 2 and Cl 3, the values for which can be determined with the help of the oscilla- tor and ATmega data sheets. The user interface consists of the display already described, three push-buttons, two LEDs, and a resonator. The temperature and relative humid- ity measurements are performed using a SHT1 1 1 1 ! from Sensirion, fitted onto a small breakout board, which will make it possible to fit it outside the case to improve meas- urement accuracy, as well as to use of for other projects (its size is smalt size, but not its price). On the circuit diagram, you'll note three expansion ports: K 1 is a serial port compatible with the USB- TTL232 cable available in the Elektor shop as ref, 080213-71, which is very handy for hassle-free development. This cable also lets you power the board from the USB bus 5 V rail, provided you make a solder bridge across RO on the back of the board. In this case, it's vital to remove the batteries, as they II be connected directly to the 5 V rail, which risks damaging them, or even causing them to explode! Resistors R1 0 to R1 3 provide basic protection for the external connector. 1 00 Q is fine. Figure 2. The breakboard PCB before / after K2 is an ISP connector for programming the microcontroller in situ, i.e, the pins of the SPS bus K7 offers a second serial port and the pins of the hardware PC module. Both may come En useful later on. Onboard software The source code files for the onboard soft- ware, written in C, are available as a free download on the project page on the Elektor website l 1 1 J; they can be compiled using the WinAVR software suite under Windows, or using avr-gee + avr-binutils under Linux (see the readme . txt file to find out about the versions used). I’ve tried to make everything as simple and easy to understand as possible. The program is structured in three layers* The hardware driver files have the prefix dr and contain the explicit name of the peripheral (e.g. drSHTlx * c /h for the Sensirion sen- sor). Only the driver layer can/needs to both access the hardware and provide a simple, but I hope effective, API (Application Pro- gramming Interface). The main file con- taining the 'main* function, which Is noth- ing but the program's entry point (a sort of starting point) is Ai rControl . c, the files containing the tools have the prefix t Ik and the user interface ui* The sensor uses a synchronous serial link and a proprietary protocol for communi- cating with the microprocessor. This proto- col is similar to the PC bus one, but is suf- ficiently different to prevent us from using the ATmega's built-in hardware l 2 C mod- ule. Mo worries, Sensirion provides good explanations and I’ve written you a driver for reading the temperature and relative humidity of the air by simply calling the drSHTlxjneasure function. This circuit returns the values for the air temperature or relative humidity. These values are linear- ized and compensated. The real-time dock is available in the file t ikTime . c/h* It contains the code for elektor 05-2010 AERONAUTICS & METEOROLOGICAL the date structure update interrupt vector every second, along with two functions for reading and setting the time. You'll also find special drivers for the LEDs, the keypad, the resonator, and the dis- play. There is also a driver for the serial port drUART . c, very handy for debugging the application* The tlkRH . c file contains the dew point and cloud base altitude calculation routines. It requires use of the math(ematics) library supplied with the libc for AVR, as I’ve implemented the calculations using float- ing point operators and variables to make the development faster... the downside is that the library takes up just over 2 KB of the flash memory, the code still runs fast, but I invite our readers to take up the chal- lenge and re-program the whole thing using integers* The dew point is calculated using the Mag- nus formula, the mathematical library pro- vides the logarithm to base 10 , knowing that In - = In (a) -In (6) \bj and 1 g '°* )- ta(Ioj and that y(T,RH) = ill * / In (fO)' (log t0 (/iff )~2.0) + — — — * n J with In (10) = 2.302585 te. the C code: H - (loglO(RH) - 2.0} *2 ,302585 + (m*T) / (Tn + T) ; Tdp - Tn*H/ (m - H) ; The application is fairly simple and displays all the values available alternately. Pressing the third push-button lets you set the time. All that remains is to program more economical power management, a turn-off delay time for the display, and con- figuration for the time interval between two measurements. Construction The circuit fits very snugly into the elegant BOS Streamline 400 case from Bopla with its decorative sealing gasket* as long as you solder the display module directly onto the PCS* It will be flush with the front panel. Before soldering in the display, check the basic functioning of the device* Once the display is fitted, it hinders access to the microcontroller and the JTAG port. Start by cutting off the part of the PCB intended for the SHT1 1 , unless you really do want to use It inside the case — in which event, remember to pr ovide good ventilation. Don't try to snap it off; you must saw it off, using for example a little circular saw (and a vacuum cleaner). Avoid exposing the com- ponents to fine dust particles, and take care as well to protect your eyes and respiratory tract during this operation* Connectors K3, K4, and K5 let you connect the humidity sensor inside or outside the case, depending on how you want to use it. For use outside, solder connector K4 on the back of the board. In this way, youll find it easy to cut an opening in the case opposite the sensor PCB T without falling foul of the sealing gasket. I recommend soldering the 5HT1 1 onto its piece of PCB with a very fine-pointed iron, and avoid taking too long over it. You need to avoid drying out the sensor (refer to the documentation provided by Sensirion where applicable). Then solder the SMS devices in the oven, then the through-hole components, finish- ing off with the connectors (only the ones you're going to be using) and the LEDs, which you'll need to fit under the front panel in the holes designed for this purpose. For the switch and the serial link, it's best to start by milling out vertically within the thickness of the lid so as to reduce it to around 1 mm. Then make the cut-out for the slide switch. The serial link is optional. If you're using neither it, nor the OUT1 / OUT2 signals, you don't need to make a hole in the case. All that remains for you to do is to fix the PCB using two or three 2 mm self-tapping screws above the battery compartment. Print the front panel, laminate it with self- adhesive plastic film, for example, and stick it into the recess in the lid. Conclusion Many readers will be wondering what use it is to measure cloud base altitude. It will be of interest to pilots, modelling enthu- siasts, and people who are simply curious about meteorology. But this project also forms a good base from which to develop a weather station or a climate-measuring device. Well certainly be coming back to this later in these pages. ( 090329 -!) Internet Links Note that, for easier reading, links in the printed magazine are truncated* For the full links, please go to the p roject page at [it J. |1j www.sensirion.com [2 1 www.atmel.com 131 www.lcd-module.de 1 4 ] www.natfonal.com [5 J www.cui.com (6) www.winavr.com [ 7 ] en.wikipedia.org/wiki/Dew_point [8] comprendre.meteofrance.com 19] www.astrosurf.com/luxorion/ meteo-nu- ayes.htm [ 1 0] http://en.wikipedia.org/wikl/ St a nda rd _te rnperatu re_a n d_pre ss u re http://en.wikipeclia.org/wiki/ Interna ti on a LSta n d a rd _Atm osph e re http:/ /en. wiki pedia ,org/ wiki/ U.S,_Standard_Atmosphere [ 1 1 1 www.elektof.com/090329 52 05-2010 elektor |GS AVRo-Bit Main PCS BoarS; LfXGS Gamepad Controller. EIJP25 + Page Printed Manual. X^^Atmel AVR ISP MKII Programmer. Power Supply St A/V Cable. - 7: PC Serial Port to XGS Converter. DVD-ROM. 1GB Micro SD Card + Adapter. , Bonus: eBooks on Hardware, G ame Consol e Design . and M o r ej >-£ 1 JIHC ImI ' The Most Complete MEGA AVR Dev Kir Available! Prototype & small series PCB specialists PCB proto STANDARD pool TECH pool ^^yd 1 IMS pool On demand dedicated prototype service widest choice 1*8 layers 100 pm technology metal '■backed PCBs aH options up to Call us: 020 8816 7005 Email: 8uro@eurocircuits.com New website - new services ALL SERVICES Instant online pricing Instant online ordering Low pooling prices Deliveries from 2 days No tooling charges Stencil service www-eurocircuits.com elektor 05-2010 S3 FAST RESPONDING C0 2 METER In-vehicle C0 2 Meter ^mrn IT' J \ I 1 # I M I Chris Vossen (Eiektor Labs) & Thijs Beckers (Eiektor Netherlands Editorial) C0 2 itself is not really that dangerous, but it can lead to poor concentration relatively quickly. Under certain circumstances dangerous situations may arise from this, for example while driving a closed vehicle. To warn you of this a fast responding C0 2 meter was developed specifically for in- vehicle use. Specifications * u V operation (via cigarette lighter socket) * Instantly read y for u se * Warns with indicator LEDs when CO., concentration is too high * Suitable for measurements of up to 3000 ppm oK0 2 The CO 2 Meter published in our January 2008 edition continues to operate very well so why bother to do a new design? The answer is both simple and obvious* In the previous article, we mentioned that too high a concentration of C0 2 negatively affects the ability to concentrate. And in which daily activity does the ability to con- centrate play an important role? Exactly! While driving a car (excluding convertibles). We therefore wanted a C0 2 meter that was suitable for in-car use* The 'old" C0 2 meter perfectly satisfied the requirements when it comes to its physi- cal dimensions, but the long warming-up period and calibration phase of two hours are of course not practical for use in a car, when you just want to start the engine and drive off. Measuring principle Since the long warming-up time was a requirement of the sensor that was used, there was no other option than searching for another (faster) sensor. And we found one! The ZG01 C made by Taiwanese manu- facturer ZyAura Ml (see Figure 1)* This sensor uses the NDIR measuring princi- ple. NDIR stands for Mon-Dispersive InfraRed absorption (see also i 2 l). This measures the concentration of C0 2 in a gas by using the fact that the C0 2 in the air absorbs infrared light with a specific wavelength of 4.27 pm. By taking a ‘tunnel 1 of known dimensions and filling it with the gas to be measured, and using a suitable sensor and light source, the concentration of C0 2 in the gas sample can be determined quite accurately. Since the concentration of C0 2 is (or should be) normally quite low in our intended appli- cation environment (the car), a relatively long optical path is required to obtain a suf- ficiently accurate measurement As a conse- quence, any suitable sensors are generally quite large and because of the high quality optics they contain, are also quite expen- sive. However, ZyAura have succeeded in manufacturing a relatively compact and affordable MDIR C0 2 sensor, which is per- fectly suited for our intended use. Intelligent sensor The sensor is suitable for C0 2 concentrations ranging from 0 to 3000 ppm (refer to speci- fications), which is sufficient for the appli- cation we have tn mind. The average C0 2 concentration outdoors amounts to about 400 ppm (parts per million). Values above 3000 are, certainly in a car, very undesirable and can lead the dangerous situations (see table l C0 2 concentration and effects'). The electronics integrated on the PCB of the sensor module takes much of the work out of our hands. The chip covered with resin (presumably an ASIC) already does all the measuring and interface work and makes the measured data available via an SP1 inter- face, In addition to the C0 2 sensor itself, the module also has a temperature sensor for 54 05-2010 eiektor FAST RESPONDING C0 2 METER ZC01 C specifications Measuring range : 0-3000 ppm / 03% Temperature range : 0-50 C Humidity range : 0-95% Warming-up time C0 2 : <60 s Measuring interval : 7 s Accuracy : ±50 ppm or 5% of the measured value Figure 1 * The sensor PCB is already fitted with all the electronics for interpreting the measurement data. calibration purposes, the measuring result of which is also available via the SPI bus. In fact, all we have to do is show the data from the SPI interface on a display. To do this we use a microcontroller, an ATmegaSS from Atmel. Its function Is to indicate the measured C0 2 concentration and tempera- ture on a display, Schematicand PCB layout Largely aware of what's required for the hardware, we can take a look at the sche- matic (see Figure 2). Since most of the work is already carried out by the electronics inte- grated En the sensor module, the schematic is a simple matter. The SPI data from the module goes via K2 and directly to the microcontroller, which subsequently shows it (via K1 ) on the dis- play, and depending on the C0 2 value it will turn on one of the LEDs D1 , D2 or D3. The microcontroller can be programmed In-cir- cuit via K3. However, you have to discon- nect the sensor module first, because both use the same (SPI) bus. For the display we chose a 2-lrne by 8-char- acter LCD display module with an HD447SG- compatible controller, so that for driving this display you can pick a 'standard 1 soft- ware library off the internet. The display contrast can be set with PI , For the power supply we started with the battery voltage from the car. The sensor electronics requires a voltage of 6 volts, which is derived from a 7806 powered from the battery voltage. The microcontrol- ler requires a regulated voltage of 5 volts, which is generated using a low-drop volt- age regulator type LP2950-5O, The power supply for the LEDs also comes from this 5 V, Diode D4 was added to protect against reversed polarity. When designing the PC8 layout the sensor PCB and LED were taken into account. Both can be mounted on the PCB with stand-offs, (see Figure 3), Software The software for the microcontroller is quite +5V Figure 2, The schematic is very modest thanks to the integrated electronics on the sensor PCB. elektor 05-2010 55 FAST RESPONDING C0 2 METER C0 2 or carbon dioxide is a colourless and odourless gas which is heavier than air. The aver- age concentration in outdoor air is about 380 ppm (- 0.0380% by volume). In cities this value is higher, typically around 700 ppm. In enclosed spaces and when there are (many) people, these values can easily be much higher. An example: exhaled air contains about 4-5% by volume of C0 2 , or expressed differently, about 30 cc. When breathing about 1 6 times per minute that amounts to just under 30 litres per hour. In a completely sealed space of 2 m 3 or 70 eft (small car) the concentration of C0 2 increases within 1 5 minutes from 0,05% (500 ppm) to 0.425% (4250 ppm). With four people in this same space this same value will be reached in only a few minutes! In the table you can see a brief overview of the number of CQ 2 values and their effects. The 'toxicity' of CQ 2 is not really due to the gas proper. At high concentrations (over 2%) it dissolves easily in blood, which raises the acidity level; think of dub soda or fizzy lemon- ade which has carbon dioxide dissolved in it to give it a refreshing taste . The result is that the blood (or actually the red haemoglobin) can only absorb a limited amount ot oxygen, which results in shortness of breath. The same effect is also observed during intense mus- cular effort and is known as acid build-up. The concentration of C0 2 does not have to be that high to start to have a detrimental ef- fect. Above about 800 ppm (0.08%) the sense of smell increases, which means that bad smells' can be noticed earlier and better. This contributes to the feeling that you find your- self in 'bad air 1 . Think about when entering an intensively used meeting room or a class mom with poor ventilation after an exam. CO ? -con cent rat ion by volume and effects | j C0 2 volume j Description % ppm 0.038 380 World mean value (= 380 ppm) 0.07 700 Urban air, outdoors 0.08 800 1 nc reased olfactory sensitivity 0.14 1,400 Urban air (indoors) 04 4.000 Max, value in classrooms 0,5 5,000 Long-term workplace exposure limit 2 20,000 Short-term workplace exposure limit 2,5 25,000 Intoxication 4 ike effects on divers 3 30.000 increased difficulty breathing 4-5.2 40.000-52.000 Exhaled air 5 50,000 (Onset of) dizziness and unconsciousness 6-8 60.000-80,000 Signs of paralysis S-1Q 80,000- 100.000 Lethal level straightforward because of the high degree of integration of the sensor. A software library was downloaded from the internet for controlling the display. After unitialising the hardware and configuring the controller as an SPI slave device, the display is cleared and the main loop waits for until it receives a frame. When the checksum of this frame is correct, the temperature and C0 2 value are shown on the display. Additionally, which LED should be turned on is also decided. If the checksum is incorrect, then the entire frame is ignored. The sensor electronics, on its own accord, sends a data frame every seven seconds via the SPI bus to the controller, so that every seven seconds the displayed value is updated; more than fast enough for our application. Construction and use The assembly of the PCB is not likely to cause any problems. As usual, start by sol- dering the smallest (lowest) components (resistors, diodes, etc.) and finish with the largest (tallest). You can see the compo- nent placement in Figure 4. Using hook-up wire, solder a 4-pole connector to the sen- sor PCB, which will then be connected to l<2. The schematic of Figure 2 shows how this connector should be wired. The PCB copper track layout can be down- loaded from the web page for this project l 3 k A kit is also available for this project, which has all the parts collected for you (see PI). After assembly, the PCB can obviously be fit- ted in the enclosure which we offer with the kit in the Elektor online shop, but you are of course free to choose a housing of your own preference. Note that the enclosure is not supplied with pre-machined openings, so keep in mind when mounting the board in the housing that you need to make a few openings for the ambient air to pass. The electronics will come to life as soon as the power supply is connected. The meas- ured temperature appears on the display immediately. The CO2 value requires 1 0 to 20 seconds of patience; the sensor needs a short warm-up period. As will be obvious by now, the display shows the measured C0 2 concentration in ppm (and the temperature in C). To make the readout slightly more noticeable in a car, three LEDs 5b 05-2010 elektor FAST RESPONDING C0 2 METER were added. The green LED ( D 1 ) is on when the C0 2 concentration Is less than 1 000 ppm and is "norma!’. The orange LED (D2) is on when the C0 2 concentration is between 1000 and 1400 ppm (elevated value) and the red LED (D3) will be on when the value is above 1400 ppm, at which point it is time to take action. Particularly when there are sev- era! people in the car, this value is reached quite quickly and easily exceeded (see also our 'test report’ in last month’s e-labs inside section C C0 2 meter under test \ where values in excess of 1 700 ppm were no exception). Particularly during long road trips, both for holidays and business, your concentration is likely to suffer after a while as a consequence of the in-vehicle C0 2 level. While this circuit does not actively keep you awa ke, it will in any case monitor a potentially dangerous environ- ment and warns you that it is time to open a window or turn up the ventilation a notch. ( 100020 ) Figure 3. Spacers are used to mount the sensor and display on the PCB. For connecting the display backlight (’A’ and 'K’) you can use a couple of leads trimmed from the resistors. Internet Links [ 1 1 www.zyaura.com [2] http:/ / n I , wi ki pedra . org/w[ki/Nondispersive_infrared_sensor [3] www.eleklur.com;' 4 00020 [4] www.elektor .com/09098 1 COMPONENT LIST Resistors R1,R2.R3 = 270O R4 - 68 a R5 - 1 Okil pi = ioka Capacitors C1.C3- IGOnF C2 - 10GpF25V C3 = 10pF 25V Semiconductors Dl = LLD, 5mm green D2 - LED, 5mm, amber D3 = LED, 5mm, red D4= 1N4007 IC1 - Atmega88-20pu. programmed IC2 = 7806 100020-1 (c) Elektor V1 10 ZG01C C02 module IC3 = LP295G'5G Miscellaneous Kl = 14-pin pinheader (1 4mm lead length) K2 - 4-way header 4-way socket for K2 K3 = 6-pin (2x3) pinheader K4 = DC adapter socket, PCB mount LCD type PCQ802LR5-AWA-B Q IR module type ZG01 Hookup wire PCB fr 100020-1 . see Dl Kit of parts, including sensor and LCD, Elektor order code 1 00020- 71 , see PI Enclosure, Elektor order code 1 00020-72, see Dl Figure 4. In the component overlay you can dearly recognise the space reserved for the sensor and LCD. Also keep in mind the contrast adjustment using PI . elektor 05-2010 57 MICROCONTROLLERS VisiOLED 9 Wolfgang Rudolph (Germany} and Gregory Ester (France) It’s a fascinating hardware combination, but what can we do with it? VisiOLED is a wireless door-opener featuring RFID cards for visitor identification, and visualisation using an OLED display. The whole thing is based around the ATM18 board. For a slightly more detailed overview, take a look at the block diagram in Figure 1 . The outdoor part of the system (situated near to the front door or front gate) and the indoor part, inside the house, employ the same printed circuit boards: the VisiOLED trans- ceiver board and the ATM13 test board. The only difference is in how they are con- nected up: the outdoor transceiver board is equipped with an RFID reader and an electri- cally-operated door latch, while the indoor board is connected to an OLED display. The indoor and outdoor stations communicate using a 433 MHz (or equivalent ISM band) wireless link. This is VisiOLED, your doorman The following functions are provided by the software running on the ATM1 8 boards. Visitors can announce their arrival at the door using a low-cost RFID card. The RFID data are sent to the indoor unit over the wireless link. If the visitor's RFID card is rec- ognised, an image of the visitor appears on the OLED display for confirmation. The door can now be opened remotely by pressing a button on the indoor unit. In communica- tions between the two units the indoor unit acts as the master and the outdoor unit as the slave. The source code for the project is. 58 05-2010 elektor MICROCONTROLLERS as always, made freely available and so can be used as the basis for other applications involving similar peripherals. The RFID reader comes from the same stable as the ATM18 board, and was described In the article ‘ATM 18 - RFID Savvy’ pub- lished in the June 2009 issue of Efektor l 'K A TDL2A 433-9 transceiver (see text box) is used to send the RFID code from the out- door unit to the indoor unit, where it is compared against a stored list of codes. If a code matches a buzzer sounds and the cor- responding image is fetched from the mem- ory card and shown on the OLED display. Printed circuit boards Each of the two stations requires an ATM1S test board and a transceiver board (Fig- ure 2), The boards are populated differently in the two stations, which is why we have given two separate parts lists.. The circuit diagram of the transceiver board is shown in Figure 3, It provides all the con- nections between the ATM 18 test board and the other components of the system. The wireless transceiver module (Modi ), the buzzer circuit (T2 and Bzl ) and the FTDI cable interface (K2) are fitted in both indoor and outdoor stations. The relay for the door latch (T 1 and Rel ) and the RFID reader board, plus its antenna coil Ant2, are fitted only in the outdoor station. The following items are only fitted in the indoor station: the OLED module, connected at Mod 2 (see separate text box); the 74HC4053 multi- plexer (IC1), used to switch the ATM18’s serial port signals (TXD and RXD) between the transceiver and the display module; R2 and R7, pull-up resistors that provide defined logic levels on otherwise open-cir- cuit inputs to the display and transceiver module; and R5 and R6, which protect the 74HC4053 when an FTDI interface cable is connected at K2 to program the unit Construction Populate the two transceiver boards accord- ing to their respective parts lists, and check over the boards carefully. In the outdoor unit, don't forget the wire links that run from R5 and R6 to pins 5 and 4 of K3. These are shown as white fines in the component mounting overlay on the circuit board (Fig- 1 Figure 1 * Block diagram of a VEsEOLED installation. The outdoor unit is located at the front door, while the indoor unit can be located in any convenient position inside the house. ure 2) and as dotted lines in the circuit dia- gram (Figure 3), The ATM 1 8 boa rd is simply plugged i nto the transceiverboard, mating K5 on the ATM IS board with K3 on the transceiver board. Since the transceiver board receives its 5 V supply from the ATM1 8 board over this con- nection, all three pins of JP1 on the ATM 18 board must be linked together. The ATM 18 board itself is powered from a mains adap- tor via K1 . A complete list of the necessary connections is given in Table 1 , Before use, the AT mega 8 8 microcontrollers on the ATM 18 boards must be programmed with the relevant software. As usual, the software is available as a free download |:| from the web pages accompanying this arti- cle, Within the software the outdoor unit is referred to as the ‘slave 5 and the indoor unit as the ‘master*. The program for the slave is written using BASCOM and the program for the master in C. The software in the master unit must be configured with the codes of the RFID cards Figure 2. Both indoor and outdoor units consist of a transceiver board and an ATM 18 test board. However, different subsets of the components are fitted in the two cases. clektor 05-2010 59 MICROCONTROLLERS Table 1 * List of connections 1 Required for; Connection Outdoor and indoor unit | JP1 : pin 1 to pins 2 and 3 (on ATM 1 8 board) Outdoor and indoor unit 1 2 V mains adaptorto K1 {on ATM1 8 board) Outdoor and indoor unit | K5 (on ATM! 8 board) to K3 {on transceiver board) Outdoor and indoor unit 17 cm whip antenna to Anti (on transceiver board) Outdoor unit / RFID antenna Antenna coil to Ant2 (on transceiver board) -] E Outdoor unit / relay (RE) K4 pi n T (o n tra n sceive r b oard ) to PC2 (ATM 18 board) Outdoor unit / buzzer (BUZ) |<4 pin 2 (on transceiver board) to PCI (ATM1 8 board) Outdoor unit/ RFID (SHD) | K4 pin 3 (on transceiver board) td PD5 (ATTVll 8 board) 1 Outdoor unit/ RFID (DEMOD OUT) j K4 pin 4 (on transceiver board) to PD3 (ATM1 S board) 1 Outdoor unit / RFID (MOD) | K4 pin 5 (on transceiver board) to PD4 ( ATM18 board) | Outdoor unit / TXD 1 Wire link from R5 to K3 pin 5 (on transceiver board) Outdoor unit / RXD Wire link from R6to K3 pin 4 (on transceiver board) 1 Indoor unit / IC1 (SI) | K4 pin 3 (on transceiver board) to PCO (ATM! 8 board) i Indoor unit / IC1 (S2) 1 K4 pin4 (on transceiver board) to PCI (ATWI1 8 board) Indoor unit/ button S3 I K8 pin3 (on ATM 18 board) to PD5 (ATM 18 board) Indoor* unit / Zoemer BZ1 | K4/pen22 (transceiver-print) met PC2 (ATM! 8) VCC 21 1Y1 1Z 2Y1 IC1 2YQ 1Y0 SI $2 S3 74HC4D53 3Y1 3 YD ENABLE 3Z VEE GND 11 ID X Mod3 O RFID Ant2 (ot- cH o o +5V 3 1 N 4 001 OUT MOD BC547 OB1 141 *11 Figure 3. The main job of the transceiver board is to connect the various modules (wireless link, RFID and OLED) to the ATM1 S board. 6o 05-2010 elektor MICROCONTROLLERS OLED: the future of light production There are many examples of luminescence in nature. One .veil* known example is the glow-worm {actually a kind of beetle), which can turn its yellowish light on and off just like an (Q)LED. The principle of operation of the glow-worm is biochemical rather than electrical; of course, and it can reach an energy efficiency as high as 95 %\ The first discoveries of electroluminescence In organic materials date back to 1953, Once it had been determined that certain natu- ral polymers exhibit semiconductor properties, processes were de- veloped to synthesise these materials, called conjugated polymers, artificially. The road was now open to manufacture semiconductors and other electronic components from plastics rather than based on a crystalline substrate. The principle behind light-production in conjugated polymers has parallels to that behind our old friend the light-emitting diode. However, the practical development of electroluminescent dis- plays only began in earnest in 1 987 r when Kodak, and shortly af- terwards Pioneer, started to invest in the technology. Now OLED technology stands on the threshold of wide commercial applica- tion, According to DispiaySearch, an American market research company, turnover in OLED displays will grow from USS 500m In 2004 to USS 7 bn by 2016. / Organic Material i Cathode (Electron Injection) (Electron Transport) ( R, G, E Emission) (Hole Transport) (Hole Injection) Anode 081141 *14 OLED manufacture OLED displays have a simple structure built from one or more organ- ic layers sandwiched between two electrodes. Typically the thick- ness of the layers is around 1 00 nm to 200 nm. Two types of organic material are used: long-chain polymers, prepared in solution, and smaller molecules that are deposited using thermal chemical vapour deposition in a vacuum. For so-called passive matrix displays the layers of molecules pre- pared in solution are deposited using spin coating, an inkjet process, or similar technique. The light emission principle of these ‘polymer OLEDs' is mainly based on fluorescence. OLEDs that employ the smaller molecules ('small molecule OLEDs') also rely on phospho- rescence, At voltages of between 3 V and 10V electrons are injected into the active layer from the cathode. The material of the cathode is chosen to have a low work function (the energy required to liber- ate electrons from its surface). Suitable choices are metals such as barium or calcium, as well as certain fluorides. Simultaneously holes (positive charges) are injected into the organic material from the anode, which is made from a transparent material such as indium tin oxide (ITO) with a higher work function, LCD versus DIED The advantages of OLEDs compared to LCDs arise directly from their principle of operation. The liquid crystal material inside the LCD works like a Venetian blind, either blocking or passing the light generated by the backlight to the observer. OLED displays have no backlight: the light is produced directly in the panel. To display a dark pixel, an LCD has to block its backlight; in an OLED display, the pixel is simply turned off and then draws no power, OLEDs are there- fore much more energy efficient than a fully backlit LCD, especially if (as is often the case for video material) the images to be displayed are largely dark. OLEDs have better contrast, some reaching ratios as high as 1 000 000 to 1 . Since there is no backlight, an OLED module can be very thin. The low power consumption and economy in ma- terials make them environmentally friendly, and the wafer-thin poly- mer layers do not contain any harmful substances. Disadvantages* however The materials used in OLED panels are extremely sensitive to mois- ture and oxygen and must therefore be protected behind a glass cover. Also, not all colours of light are produced with the same effi- ciency: this means higher current consumption and shorter lifetime, and is an obstacle to the widespread use of large full-colour panels. The lifetime or today’s OLED panels Is no match for that of an ordi- nary LED: to put this in perspective, however, Sony claims that its first OLED television has an operating life of 30 000 hours before the panel reaches half its original brightness, which corresponds to four hours of viewing every day For some twenty years. to be accepted along with the address of the image corresponding to each one: the software download includes instructions on how to do this, along with screenshots. The datasheet for the OLED panel includes the necessary information on how to store images on the 5D card in the module. All that is needed is an SD card adaptor for your PC or laptop and a program that you can download for free: seethe OLED mod- ule manufacturer’s website [3] for further details as well as the datasheet itself. It is possible to configure the Radlometrix transceiver module before use with the help of a seriaf-to-USB adaptor cable (or 'FTDI cable’) 08021 3-71 !4J connected at K2, Con- figuration is essential if, for example, several transceivers are to be used En close proxim- ity to one another. Normally this will not be the case, and the default configuration of the module will be perfectly satisfactory and no programming is necessary. On the other hand, if you do wish to program the 6i elcktor 05-2010 MICROCONTROLLERS OLED-128-C1 This compact low-cost OLED display module uses passive matrix technology. The module includes an embedded graphics controller to provide 'stand-alone 1 functionality. Two software platforms are available: the serial command platform (SCC) and the 4D Graphics Language (4DGL) platform. The SGC module that we have chosen for this project can be used o UQLED-12B-G1 00000. O o Host Controller PIC, AVR, ARM, STAMP, micfO'USB Q ■> E? 22 8S RESET -■ _TX J 35JU1 - i: as a slave device connected to a suitable host (see accompanying figure). The protocol used on the serial interface is very simple, with each command consisting of one or more bytes. jaOLED- 128-G1 features * 128 by 128 pixel resolution * 256 or 65k colours * 1.5 inch diagonal, module size 45.5 mm by 33.5 mm by 63 mm * Active screen area: 27 mm by 27 mm * Viewing angle: almost 180 0 ■ Simple five-pin interface ■ Operating voltage 3.6 V to 6.0 V * Current consumption typically 40 mA at 5 V * RS-232-Uke interface (o V/3.3 V levels} with automatic baud rate selection (300 baud to 256 kbaud) * Two software versions: serial command platform or4D Graphics Language COMPONENT LIST Transceiver board ft 081 1 41 *1 with RFID (outdoor) Resistors R1 ,R3 ” IQkQ R4 = 1 k a Capacitors Cl C3 = lOOnF C4 - 1 OOjuF 25V radial Semiconductors D1 = 1 N4001 T1 *T2 = BC547B D2 = LED, red, low current, 3mm Miscellaneous Rel = 5V relay with 250VAC/5A contacts (e.g. Gmron type G6D-1 A-ASI 5 DC) Bzl = 5V piezo buzzer (e.g. Megacera type CPM121A0A) Modi - 433MHz data transceiver, Radiometrix type TDL2A-433-9 or equivalent Mod3 = RFID module # 0809 10-91 from Ele- ktor Shop or www.elektor.com/0S0910 Anti = wire antenna, length = 170mm {6.7 in.) Ant2 - RFID antenna coil (160 turns 0.2mm / AWG#3l ecw, 23mm diarru, L* 780pH) ]P1 = 2-pin pin header with jumper K1 - 2-way PCB terminal block, lead pi tch 7,5mm [0.3 in.) K2.K3.® 6-pin pinheader K4 - 5-pin pinheader PCB # 081 141-1 from Elektor Shop or www, eiektor.com/081141 ATM 1 8 Test Board #07103 5-92 with con- troller module -91 (Elektor Shop or www. elektor.com/071 035) Transceiver board 081 141-1 with OLED (indoor) Resistors R2.R3.R7 = IGkn R4 - 1 kQ 5% R5.R6 = 2200 Capacitors Cl C2.C3 = lOOnF C4 - 1 OOjiF 25V Semiconductors T2 = BC547B D2 - LED red, low current, 3mm SCI = 74HC4053 Miscellaneous Bzl - 5V piezo buzzer, e.g, Megacera type CPM121A0A Modi = 433MHz data transceiver, Radiometrix type TDL2A-433-9 or equivalent Mod2 = OLED display module, 4D Systems type pOLED-128-Gl (SGC) Anti - wire antenna, length = 170mm jPl = 2-pin pinheader with jumper K2.K3 = 6-pin pinheader K4 = 5-pin pinheader PCB it 081 141-1 from Elektor Shop or www, elektor.com/081141 ATM 1 8 Test Board # 071 035-92 With con- troller module -91 (Elektor Shop or www. dektor.com/071 035) TDL2A 433-9 transceiver module The TDL2A from Radiometrix is a 9600 baud half duplex multichan- nel wireless module for use in the 433 MHz ISM (license-free) band. St is designed to emulate a simple serial cable wirelessly, offering automatic synchronisation, bit balancing and error detection, as well as automatic noise squelch in the absence of an RF signal. The TDL2A can be set to one of eight different addresses, and can be programmed to operate on one of five preset frequencies within the 433 MHz band. The channels used are non-overlapping, and so sev- eral TDL2A wireless links can be used simultaneously. TDL2A 433-9 features * Default operating frequency: 433,925 MHz (ISM) * Modulation: 16 kbps bi phase FSK * Power supply: 5 V at 28 mA (transmitting), 22 mA (receiving) ■ Transmit power: +io dBm [to mW) * Sensitivity: -107 dBm (for 1 % BEK} * Adjacent channel rejection: 65 dB at ±320 kHz * Receiver blocking: 84 dB - 32 byte data buffer 62 05-2010 eleklor MICROCONTROLLERS transceiver module, you will find a descrip- tion of the various available settings for ID codes and channels on page 6 of the Radi- ometrix datasheet l \ Support from lex- tronic [6 L the French distributor of both the 4D Systems DIED module and the Radiome- trix wireless module, has been very helpful in the development of this project. Operation The functions provided by the VisiOLED sys- tem were described in the introduction to this article. Communication between slave and master to implement these functions uses a very simple protocol. When the slave reads an RFID card it sends the ID code to the master and then switches its transceiver to receive (or listen*) mode. The master receives the ID code and looks through its stored ID code list. If the received code matches an entry on the list It displays the corresponding stored image on the OLED panel and sounds the buzzer (the 'doorbell*). Simultaneously it sends the ASCII character capital 'A* to the slave, which in turn sounds its buzzer, indicating to the visitor that the RFID card has been recognised. If button S3 on the ATM 1 8 board i n the mas- ter unit is now pressed, it will send the ASCII character capita I ‘ET to the slave. When this character is received the slave software sounds the buzzer and activates the door latch relay Rel for 20 seconds. The slave then returns to listen mode. And that is essentially all there is to it. The software has deliberately been kept sim- ple with space for you to make your own extensions and modifications. Devious readers will have spotted immediately that it is possible to build a master unit based on the design In this article that allows unau- thorised opening of any door controlled by a slave unit. This can be prevented by modi- fying the software to use a more intelligent protocol than just the character B h to con- trol the opening of the door. Also, the slave can be protected from casual hacker attack by switching it off when leaving the house. Furthermore, since identification is based solely on possession of an RFID card, the Figure 4, The board for the outdoor unit, fitted with wireless link and RFID modules. system offers no protection againstfhe use of stolen or cloned cards. An advantage of the wireless connection is that it Is possible to use one slave with more than one master, allowing the front door to be opened from several different places within the house. (081141) Internet Links [ 1 ] www, efektor.com/08G91 0 [2] www.elektor.com/08 1 1 4 1 [ 3] www.4dsystems.com ,au /prod, ph p?i d= 78 [4] www.elektor.com/Q8021 3 [5] www, radiometrlx.co.uk/dsheets/tdl2a.pdf [6] wwwJextronic.fr ir p 1 lyj 1 y 1 Hi UpJ 1 1 •iTH BiVITW . " 1 ■ till Suj TV . u Xdc E 1 ■ -<[3 ■ . ^B r, ^B r > CXI fe*l ■ ■1 Figure 5. The transceiver board is connected as an extension to the ATM! 8 board. elektor 05-2010 63 HISTORICAL COMPUTING Colossus — the Rebuild ViWA By Charles Coultas (UK) Colossus was a digital computer that contained 2400 valves and ran its programs as fast as a modern computer. It was designed in 1943 and made a significant contribution to ending World War 2. This is the story of that machine and the rebuilt version that you can visit at Bletchley Park (UK). How did Colossus came about, and how were valves made into computing elements? During World War 2 Enigma provided a high level of security for bat- tlefield messaging but Hitlerwanted something much more secure, an encryption method that couldn’t be broken by clever cryptana- lysts, (High Command never knew that Enigma had been broken, they were convinced it was secure.) The machine they chose was called the Lorenz SZ42. It had 1 2 code wheels (see Figure 1), sim- ilar to Enigma’s three but each wheel had a number of tabs that could be folded in or out. The total number of tabs was 50 1 . In very simplified form, each message character was scrambled by these tabs, then the wheels moved on exposing the next set of tabs. The wheels didn’t all move together. This scrambling process was actu- ally the Exclusive-Or function (see later). It was the job of Colossus to find the starting position of these 1 2 wheels. The message was now effectively randomised and unintelligible — and sure, it was transmitted by radio. As an aside, at ElektorLive! 2009, Messrs Marc Simons and Paul Reu- vers demonstrated their Enigma-E kit based on PIC microcontroller technology — the legend lives on! Secure — in theory At the receiving station the process was reversed: each scrambled character was exclusive-or’ed (XOR'ed) with an identical set of 1 2 wheels with the same tab settings. The resulting unscrambled text was the original message (if you exclusive-OR twice, you finish up with the original), The receiving station had to know the tab set- tings in advance of course; these were distributed by highly secure manual means. This was pretty secure because it was virtually impossible to guess the settings of the wheels. There were strict operating procedui es which limited the length of each message, and several other things to make decryption virtually impossible, Vou might be thinking that letter frequency analysis could lead to a solution but letters were not converted to the same corresponding code letter each time. The method was almost a One Time Pad which is unbreakable (Google it: Wiki One Time Pad). But on the 30 th of August 1 941 a German operator sent a long mes- sage to a High Command Post, probably in Vienna or Athens. The messages all began with a 1 2 character identifier (technically known as The identifier), something like MESSAGE NO 4. He sent his 4000 character message via his Lorenz machine. But the reply came back over the air "Didn't get that, send it again”. Of course, all messages were in German. Breaking a very important rule, both parties reset their machines to the same initial state and the sender retyped his message. He was obviously fed up by this process because he abbreviated some words and made a few mistakes. This nullifies the One Time Pad aspect, allowing analysts to break into the code and possibly solve it. A British listening post at Knockholt (in Kent) received both mes- sages and the astute operator realised that it was probably the 64 05-2010 elektor HISTORICAL COMPUTING same message (nearly) again. The results were rushed to Bletchley Park where analysts set to work on it To have two essentially differ- ent messages encoded with the same key was a fantastic gift and Bill Tutte worked out the logical structure of the machine that had encrypted the message. From this the first Colossus machine was designed and built. It got its name from its high level of complexity. The Mkl version had 1 500 valves and numerous relays and uniselectors. Its sole purpose was to help work out the wheel tab settings — Colossus didn’t decode the encrypted messages, that was done on another machine called Tunny pictured In Figure 2. A full description of Colossus and the theory of this type of encryption would take up this whole maga- zine, so please refer to the references at the end, they will point you to full and interesting descriptions. The rest of this article will con- centrate on using valves as computing elements. Into technology The main reason for starting work on Colossus was to store a possi- ble key, all 501 bits of it, electronically. Previous methods used two paper tapes running side by side In a machine nicknamed Heath Robinson due to its weird appearance and complexity. One tape contained the encrypted message, the other contained a tentative key. These two tapes ran at high speed and valve/relay logic did statistical analysis on the resulting data stream. The problem was speed. To run the tapes fast enough to make code-breaking possible in a reasonable time, high speeds were needed, in excess of 1000 characters per second. The results were not good. Tapes broke and keeping the two tapes synchronised was a real problem. A brilliant engi neer at the Post Office had a bright Idea . Tom my Flow- ers had been experimenting with valves (as part of the telephone network) and he saw a way of storing the possible key electronically, in a form of memory. Only one paper tape (the message) would then run and the electronically stored key would be accessed using valves. This promised to give enough speed to make the whole task feasible (Colossus runs at 5000 characters per second). The whole project was highly secret of course. Churchill was so impressed that he made unlimited resources available. Critics of Flowers warned that valve failure would be so great that the machine would never work. But Flowers knew otherwise, by never switching the filaments (heaters) off, very high levels of reli- ability could be achieved. Heater energy worries The rebuild of the Colossus was started in 1994 by Tony Sale. In 1943 the engineers working on Colossus kept the valve heaters on as long as possible, 24 hours a day, 7 days a week. Tony Sale knew' this but the thought of several kilowatts day and night was a worry. His solution was to use a large rotary transformer driven by a motor (Google: Variac). This applies the heater voltages (4 and 63 volts) very slowly, over a period of a couple of minutes. Similarly, the heaters are powered down by a reverse process. This technique has stood the test of time with very few valve failures over several years. It is the sudden heating that causes heater failure in valves. Figure 1 . The coding wheels in a Lorenz machine were a wonder of precision metalworking. The 12 wheels with their 501 tabs are simulated by 501 valves called thyratrons. These are gas filled and once conducting they will stay in that state until triggered off by pulling the anode Low' and extin- guishing the conduction ('quenching'). They are like a single valve flip-flop. Unfortunately the heaters of these need 4 V at 1 ,4 A. This gives 2.8 kilowatts just for the heaters of the thyratrons! These 501 thyratrons are arranged in 1 2 loops to simulate the 1 2 wheels of the Lorenz machine. Complicated circuits drive these in exactly the same way as the Lorenz wheels; see Figure 3 for 1 of 1 2 controllers - 1 for each wheel. And this is where some of the programmability of Colossus comes in: the starting point of each wheel simulation can be changed, either by hand or automatically by Colossus itself. In effect the machine will automatically search for wheel start posi- tions that seem to give a better match to the key being tried. But how did valves become logic elements? From amplifier to logic element Valves were always intended to be analogue amplifying devices. With just a cathode and an anode, we have a thermionic diode. If the anode is more positive than the cathode, current will flow. But if the cathode is more positive than the anode, no current will flow. Add a fine grid of wires between the anode and cathode (called the control grid) and w'e have the triode. This grid controls the current flow between cathode and anode. Apply a varying voltage to the grid and an amplified version of this flows as a current in the tri- ode. Now comes the clever bit, i ommy Flowers was a dab hand with va I ves a nd he knew all about vafves with more electrodes than just cathode, grid and anode, I would guess that he woke up one morn- ing and realised that you didn't have to use the grids for the purpose they were designed for. A pentode has two extra grids between the cathode and the anode: it has a control grid, a screen grid and a suppressor grid. The latter two grids are to improve the amplify- elcktor 05-2010 65 HISTORICAL COMPUTING Figure 2. Little known, this machine called Tunny did the actual decoding of Enigma-encrypted messages. ing characteristics of the valve but Flowers used them all as control grids. If you keep any one of these grids negative with respect to the cathode, it doesn't matter what you do to the other grids, no cur- rent will flow. It Is rather like a NAND gate - all three grids have to be positive to cause the anode to pass current, in other words, any grid being Low (negative) will cause the valve to cut off. We have a logic element, (I have simplified this process somewhat,} One circuit that is used very many times in Colossus is the Exdu- sive-Or circuit (XOR). Remember that the function of Colossus was to detect the subtle key settings on the 12 wheels of the Lorenz machine and this involved making many comparisons. "Does the current character on the input tape match this part of the key” for example. The XOR function produces no output if its two inputs are the same. You might like to try to design such a circuit. Let's say that a T input is a positive voltage and a O’ input is a zero voltage. If both inputs are ‘1 1 then the output is ‘O'. If both inputs are ‘0 + then the output is l 0\ But if either input differs from the other the output is ‘1 * — a true XOR function. Figure 4 shows one of the XOR circuits from Colossus. The actual XOR function is done by VI and V2. V3 and V4 are an output buffer, it works as follows: each input is made up of two signals, A and B as shown in the drawing. A and B are always opposite in polarity. If A is positive, then B is negative. The actual voltage levels are plus and minus 80 volts, a hangover from the days of telegraphs and tel- eprinters, They are a differential pair, and remember this is only one input. To simplify your understanding how the XOR works assume that if any grid of the valve in question is negative with respect to its cathode, then that valve will not conduct, it will be cut off and its anode voltage will rise. If all grids are positive with respect to the cathode, that valve will conduct and its anode voltage will fall. Look at VI , One of its grids is driven by I/PI A line. Another of its grids is driven by I/P2, A line. Thus for VI to conduct, I /PI A must be a high voltage, as must the A line of !/P2. Now what does this mean a bout in puts 1 and 2? Well, it means that both As of inputs 1 and 2 are High. In other words both inputs 1 and 2 are in the same state, A=80 V and B=-S0V, andVl will turn on. If either A of i/PI orl/P2 is Low, at -80 V, VI will not conduct and Vi's anode will rise. Now look at V2, Exactly the same situation exists but this time with the B inputs of I/PI and 1/P2. If both B lines are High, it means that both inputs 1 and 2 are in the same state, with A--80 V and 8=4-80 V. If both B lines are at +80 V then V2 will turn on and its anode voltage will fall. If this seems complicated then just keep going over the various states, it Is really quite logical. Notice that the anodes of VI and V2 are tied together. If they are both off (not conducting) then their anodes rise, pulled towards +200 V by the 68 k Q resistor, causing the control grid of V3 to rise above its cathode voltage, and V3 conducts, pulling Its anode Low. But if the anode of V3 goes Low, the control grid of V4 also goes Low, causing V4 to stop conducting, and Its anode goes High. To summarise: if I/PI and 1/P2 both have their A lines High at +80 V (and this automatically means that their B lines will be Low at ~80 V) then VI will turn on. If the situation is reversed and both B lines are High, then V2 will turn on. If either VI or V2 turns on, then the anodes of both VI and V2 will go Low, V3 will turn off allowing the B output line to go High (+80 V), V3 going off will force V4on and out- put line A will swing Low. So if both Inputs 1 and 2 are the same, out- put line A will be Low (-80 V) and output line B will be High (+80 V). If the two inputs are different, output line A will be High and B will be Low. Exclusive-OR using just two valves! V3 and V4 are simply to buffer the output. These signals can be used in many different ways inside Colossus. The resistors are potential dividers to ensure that the valves are comfortably on or off, well away from any doubt about what logic 66 05-2010 elektor HISTORICAL COMPUTING level is being represented. A simple yet elegant solution to quite a complicated problem. You might like to try designing this using transistors* This explanation is simplified somewhat, you can't make each grid act as a control grid without careful biasing* But this circuit dia- gram is a real part of Colossus. Notice that the screen grids of VI and V2 are at +1 00 V, which ensures that they don't hold the valve off. In some other parts of Colossus the screen grids are also used for logic purposes* You might notice that the screen grids of V3 and V4 are near zero volts and this would suggest that the valves could not be turned on. But look at the cathodes of V3 and V4, they are tied to -100 V and this means that the screen is in fact 100 volts above the cathode voltage so the screen grid will not stop the valve being turned on. You will see a three pole jack socket on the diagram. Several such sockets are mounted on a patch panel, they allow an operator to interconnect signals using flexible patch cords (as were used in tel- ephone exchanges in those days), VI and V2 are EF37A, V3 and V4 are 6V6 (later to become very popular in guitar amplifiers). The valve with most electrodes used in Colossus is the 6KSG, it is a double valve with one cathode, two anodes and five grids. It is used in the control circuit for each ring of thyratrons (in the front row, middle of Figure 3) — a very complicated circuit. You can Google on *6K8G datasheet* A good description of pentode valves can be found at Other valves used in Colossus included types EF36 t EF37, EF37A, 6J5 t 6V6, 6K8, 807 and CT1 C. At the end of the war ten Colossi were operating at Bietchley Park with two more nearing completion. Churchill had them dismantled (although another two about to be delivered went to GCHQ)* Famous last words Tony Sale masterminded and initially funded the Colossus rebuild. Some twenty other retired or part-retired engineers helped him with the rebuild. Tony's website •• contains interesting informa- tion. Tony who had the idea of rebuilding this magnificent British computer in the first place must have the last word: H i feel very privileged to have met Tommy Flowers before he died in 1998 and to have had the opportunity to recreate his wartime masterpiece, the Colossus computer. The rebuild was started in 1994 and phase one was completed in 1996. the 50th anniversary of the American ENIAC computer* It just made the point that Colossus was the first in 1944 and was British. Because Colossus was kept secret until the 1 970s the Americans had got away for far too long with the myth that ENIAC was the first* Now computer history has right- fully been corrected.” Thanks to Bob Alexander (on the rebuild team) for his help with the XOR circuit diagram. You can see Colossus at The National Museum of Computing [3 L Much more detailed information on Colossus and Lorenz can be found at ^ ] * (100130) Figure 3. The valve equivalent of a single Lorenz wheel. Figure 4, Typical Colossus XOR circuit based on panel j 1 1 . Internet Links [1 ] http://en.wikipedia.org/wiki/Pentode [2 ] http:/ /www. vec torsite, net/ttcode_09, htm! ttm 3 [3 1 http://www.tn mocorg [4] http:// www.codesandcipher 5 .org.uk/lorenz/ fish. htm 67 elektor 05-2010 READERS CIRCUITS Low-cost Electric Vehicle Charge Station ■ ■ \ A / V V machine By Miguel Martin Ballbe (Spain) The acceptance of electric cars seems to be hindered by a general lack of stations where you can charge your battery just as you would ‘fill up’ at a fuel station, but taking some more time, of course. Here’s a design for an electrical energy vending machine that’s operated with coins, it’s PIC based and the software was developed with Flowcode. IW*" • Until recently, the widespread introduc- tion of the Electric Vehicles (EV) as a main- stream option ran into two major obstacles. First, there's the higher price (Tesla Road- ster: 100 k$; Mini-e: 50 k$; Reva Microcar: 1 2 k€) which does not yet ba lance the lower running cost compared to an ICE (internal combustion engine) vehicle. The other problem is related to EV s limited range (typ. 100 km / 60 miles) compared to the ICE cars, and the need for an AC power outlet to charge the batteries. The latter is serious — nobody wants to be stuck with empty batteries during the daily commute. However there are some things to consider: 1 . the daily to commute distance (home to work), is typically less than 60 km (40 miles); 2. there are AC power outlets (almost) eve- rywhere, far more than gas stations; 3. the cost per kilometre/mrle Es about one third compared to ICE, because the per- formance of an electric motor Is about 85% while ICE performance is about 30%, where most of the energy is dissipated as heat by the exhaust, radiator, dutch, gearbox and brakes. Installing public AC power outlets close to, or on, parking places is relatively simple, and seems to require only a small Invest- ment. EV charging stations can be installed in or near places like restaurants, shopping centres, motorway service areas, municipal- ity parking areas, train stations and so on. For example, there are big shopping malls Readers Circuits contain contributions f ram Elektor readers far experimental purposes and further development by others . [he drcuit(s) presented on these poges hove not been tested for reproducibility or actual use in the Oektor Lab. 68 05-2010 elektor READERS CIRCUITS VPP MCLR VOD TARGET VgS GND ICS P DAT ICSPCLK AUX {CSP +12V © ti£ !2^ 12^ !I^ IPy U > > I C ill jn ”^0Ot 19 13 17 13 12 11 10 CONTRAST VDD RAltfANQ RCWAN4 RA17AN1 1 I C fiCUANS RA2/AN2 U J RC2/AN6 FA3/MCLR RC3/AN7 RH4 RC4 RBS PtC1SF6960000 then kWmin^ kWmin+ 1 : and carry^W/s^ ca rry_W/s - 60000 - if kWm in >= 6 then substract 1 1 00 Wh from credit and set kWmin = 0 -Credit 3 credit - 1 - then go to macro 'update LCD' - return Compare credit. IF credit <=Q then switch relay off and goto init. return Let's suppose an EV drawls 10 A, and the user has paid effectively for 6 kWh I.e. 360 kWmin) power 3 10 Ax230 V-2.3kW time= 1 /2,3 kWh = 0,434 hours = 26 minutes, (i.e. 1 kWh is trans- ferred every 26 minutes) The system measures l rms every second. / rms = 1 0 A Power - / rms x 230 V = 2300 Ws carry_W/s will reach the value 60000 every 26 seconds (60000 Ws / 2300 Ws ~ 26) 60000 Ws = 1 kWmin and 60 kWmin 3 1 kWh Every 26 seconds kWmin will decrease one unit, from 360 downwards. After 360 x 26 seconds = 0360 seconds = 156 minutes (shopping done ©), the relays wifi switch off. The 'set-up 1 macro A setup facility is provided to allow the owner to adjust the system to the voltage present in the installation, to calibrate the accounting of energy, and to change the kWh vending price. Set-up is entered when the system boots while switch 'setup' is pressed. The Coin switch doubles as '+'; Setup doubles as Start doubles as 'confirm'. The AC grid voltage, price and calibration are stored in EEPROM for use in the macro ‘main 1 . The 'finish' macro This clears the LCD and switches off the relays. the START button and the relays close. Even Top Gear's Captain Slow should be able to do this. Credit = coin credit><6x6Q. i.e. 6 kWh; how- ever the internal unit is kWmin (1 kWh = 60 kWmin). If credst>0, START charging after 30 sec- onds, even without the user pressing START. This is to resume charging in the event of a power failure. The program has a loop to take 2000 (or 'calibration number’) measurements of the V_out signal from the current sensor. The actual value will be compared and max. and min. values will be saved. The output of the ACS756SCA is linear, depending on the cur- rent flow, so knowing V_out, implies know- ing the instantaneous current value (IP). The Allegro's V our is V C J2 when i ? = 0. In terms of the ADC (10-bit) this equals 1024/2= 512 ADC, since V tc = 5 V « 1 024 ADC. The current is AC and sensitivity is 40 mV/A. The current / rms is measured and calculated from: l rm - / peak / 2<2. A discussion of the rest of 'main' and other macros, including several calculations per- formed by the system may be found the inset. You may want to refer to the Flow- code program in archive file 090866-1 1 ,zip to be able to follow the use of some labels. "Lest we forget**, the PIC config bits: XT, WDT-OFF, POWUPTMR-ON, MCLR- Exter- nal Fail-Safe dock enabled. A 4 MHz quartz crystal ts used. First start-up The first time the system is powered up, the data in the EEPROM is inconsistent, show- ing abnormally high credit values. To solve this, simply switch the system ON with the elektor 05-2010 71 READERS CIRCUITS START button pressed. The display will show ‘credit cleared*. Next, run the SETUP macro, this will load correct values into several variables. This is done by switching the system ON but this time keeping 'SETUP' pressed. Some instructions are displayed about the COIN switch acting as the '+ T key, likewise 'SETUP 1 doubling as and 'START* to confirm your selection. First the system asks for the voltage setting. You can press keys to increase or decrease AC grid voltage. The initial value is 230 VAC. Set the actual value in your area, not the nominal value. Second, the calibration value — lowering it makes the system calculate faster. Finally the selling price is adjusted by setting the number of kWhs credited by one coin. Example! Test conditions: Velleman Power Monitor, input 230 VAC but only 220 VAC out when loaded with a 1400-watts heater. Credit equal to 6 kWh, shows 360 kWmin on dis- play. Power monitor showing 0.0 kWh. Cal- ibration value default: 2000. Connected load (1400 W heater), 6 A detected both in Velleman and EV charger. After approx. 46 minutes, the Velleman Power Monitor reading changed from 0.9 to 1 .0 kWh, The credit on the EV Charger was 302 kWmin, End of test. So the EV Charger accounted for 58 kW / min, instead of 60 kWmin. Recalling that 1 kWh - 3,600,000 Ws, we have 58 kWmin- 3,480,000 Ws and consequently a difference of 1 20,000 Ws to account for. The upshot is that the macro 'second* was called in a too large period. With 3,600,000/3,480,000= 1.034 you get an approximation only, but the period of calling macro 'second' appears to be 34 ms too long. Now, if 1 .034 s is achieved with calibration '2000* then 1 second is achieved with 2000/1 .034 - 1 933, which will be the required calibra- tion value. Closing considerations and ideas Looking at different kinds of EV, a typical electrical scooter charge in kWh is: 48 V x 60 Ah = 2.88 kWh, An electric car charge In ts much larger at up to 30 kWh, say, for the BMW Mini-e AC Propulsion, or the Tesla Roadster. The ElektorWheelie, then: 24 V x 9 Ah = 2 1 6 Wh which in the author's country cost 3 eurocents to recharge (assuming 1 € gives 33 recharge units). An electric scooter takes only one hour to recharge, while a car can take up to eight hours. The use of an Allegro current sensor was inspired by the ElektorWheelie article. The 756AC5 device being bidirectional, it's bet- ter suited for AC applications. The device comes factory calibrated and a comparison of readings against a hrgh-end Fluke current damp gave identical results. Future enhancements include improving the disconnecting of the relays when the credit Is zero. First check for and if the cur- rent Is still large, say larger than 4 A, switch the relays when the current passes the zero crossing. This involves delays in the relay, the driver and the MCU to be accounted for. Lastly, I'd like to see an AC fine voltage measurement included to ensure energy calculations are fair to both vendor and customer. (090866) Some interesting websites http://evworld.com/indcx.cfm http:/ / fadisel .com/vend ing-cebek/ coms-selectorJP_325.aspx www.a bberfieid.com. a u/a/ 6Q.html Electrical safet The hardware is connected to an AC power outlet and does not constitute an isolating device between the AC grid and the load. Consequently, all relevant elec- trical safety precautions for equipment carrying and routeing live AC power must be observed when bu ilding and using this project. This should not be taken tightly and some help is provided by the red lines in the circuit diagram: these indicate connections carrying live AC and requiring suitable Isolation. Constructors should also observe ’safety guidelines for charging 1 supplied by the manufacturer of any EV connected up. It is mandatory to install proper earthing for outdoor use. as well as an external current limiter. The Comps/teAC Mon/tor from Elektor June 2009 is an ideal com- plement for ad hoc grids with 1 0 A or less available. Alt plugs, cables, wiring and sockets used on. or rn conjunction with, the EV Charger must be rated and approved for outdoor use. The unit should be mount- ed in a rugged enclosure complying with your national or local electrical safety regulations and the same goes for the coin validator Finally, beginners should seek the assist- ance of a qualified electrician when build- ing this project. 72 05-2010 elektor § gu*lof_t^ WK.THtflPi nffM WU1W TO WMOVl" LET THE m?*i sceptre SK RULE! mm sees* J|j4g!l'-y V..- lyitill' ,*, Junior tVKW** 11 ** . rW BhC*Wlf' teri3,!E ' r -sS MODULO D The upgraded Elektor-PLUS subscription! All 1 1 issues including the Summer Circuits edition Included in your PLUS subscription: Annua! DVD 2010 20 % cheaper than normal retail price When taking out an Eiektor PLUS subscription you get exclusive access to www.elektor-p1us.com where the three latest editions of Eiektor magazine are available in the form of pdf files (i.e. the current issue and the two pre- ceding ones). With a simple click you download the complete issue (front to back!) or any single article, www.elsktor-plusxom also sup- plies the most extensive Eiektor search engine found on the web. However the upgraded PLUS subscription offers many more interesting extras like free E-books and supplementary articles. Welcome gift worth £25 Up to 40% discount on selected Eiektor products Eiektor is delivered to your doorstep every month Read your copy before everyone else NEW: On your personalized Eiektor PLUS website, you have permanent access to the three latest issues of the magazine in PDF format, as well as to a fast Eiektor search engine! www.elektor.com/subs • Tel. +44 (0 20 8261 4509 Or use the subscription order form near the end of the magazine* RETRONICS Grid Dipper By Ronaid Dekker (The Netherlands) For a long time, the grid dip meter was the *HF multimeter' of every RF engineer or technician. Like an ordinary multimeter, it is a sim- ple instrument that can be used fora wide variety of quick and use- ful measurements on high frequency circuits, such as determining the resonant frequency of an LC circuit, determining the values of unmarked coifs or capacitors, and checking the signal paths of RF stages. A grid dip meter essentially consists of nothing more than an LC oscillator with a moving-coil meter that provides an indication of the amount of power drawn by the oscillator. The oscillator coil is mounted outside of the grid dipper enclosure so that it can be brought close to the LC circuit to be measured. The operating prin- ciple is very simple in practice. The frequency of the oscillator is varied slowly by adjusting a variable capacitor. When the oscilla- tor frequency matches the resonant frequency of the circuit being measured, the circuit will start to resonate. The circuit thus draws power from the oscillator, which is indicated by a 'dip' on the meter. The resonant frequency of the circuit being measured can be deter- mined by reading the oscillator frequency from a calibrated scale attached to the tuning knob. Grid dip meters usually have plug-in coils to make it easy to connect different coils. This allows the meter to be used over a wide range of frequencies. The name ‘grid dip meter 1 originates from the time when these instruments were built using valves. In these instruments, the grid current drops when the oscillator draws more power. This may sound a bit strange at first glance, since increased power consump- tion is ordinarily associated with increased current. To understand what’s happening here, let’s first examine the circuit of a grid dip meter in its most rudimentary form. Figure 1 shows a Colpitts oscil- lator built around an RF triode. The advantage of a Colpitts oscilla- tor is that It has a single simple coil without any taps, which makes it easy to exchange coils using a pi ug-and -socket connector. The drawback of this arrangement is that the circuit requires a two-gang variable capacitor. Immediately after the oscillator is switched on, the grid voltage will be nearly zero and the valve current wilt be high. At first this current will be a noise signal resulting from the noise generated by the grid resistor or other noise sources. As the anode load consists of a tuned circuit, only one frequency component of this noise signal will be present on the anode. In addition, the LC circuit is designed to feed back part of the amplified signal to the grid in phase, which causes the circuit to start oscillating with gradually increasing signal ampli- tude at the oscillating frequency. Of course, the amplitude cannot increase indefinitely. After a few cycles, the signal amplitude on the grid increases to the point that the grid goes positive on the positive half-cycles of the signal, which causes a grid current to flow. This grid current imposes a negative DC component on the grid volt- age, which acts to cut off the valve and reduce the gain. This control mechanism stabilises the oscillator at a constant signal amplitude. If 74 05-2010 elcktor RETRONICS a second circuit tuned to the same frequency is now brought dose to the oscillator, it will draw power from the oscillator. This power loss is offset by a slight reduction in the negative DC component of the grid voltage, which increases the gain. Naturally, this causes the grid current to drop, which produces the ‘grid dip'. The Philips Research laboratory, originally established as the ’Nat- uurkundig Laboratorium’ (physics laboratory) or NatLab for short, will celebrate its 1 00 th anniversary in 2014. Despite what the name may suggest, during the past 1 00 years it has carried out research not only in the field of physics, but also in many other fields such as chemistry, mathematics, semiconductor fabrication and (of course) electrical engineering and electronics. Especially at the time when you couldn't simply order or purchase everything you needed, the NatLab had extensive workshops for the fabrication of mechanical and electronic devicesand glassware, where highly skilled craftsmen produced outstanding Instruments to order for the researchers* It's hardly surprising that very intriguing items can occasionally be found in the nooks and crannies of a laboratory with such a rich history. For example, the grid dipper shown In Figure 2 turned up during a housecleaning operation in the instrumentation section - the group within NatLab that is responsible for purchasing and rent’ ing test equipment This splendid instrument, which was produced exclusively in the service shops, bears a strong resemblance to the famous Model 59 grid dip meter from Measurements Corporation I 1 L It consists of a probe head housing a high-frequency oscillator and a small enclosure housing the power supply (Figure 3) and the moving-coil meter, along with a compartment holding a set of coils for frequency ranges extending from 22 MHz to 400 MHz (Fig- ure 4). Sadly, the documentation for this Instrument was no longer available, but the point-to-point wiring makes it easy to trace the circuit diagram (Figure 5). This instrument had probably not been used for 30 years or so, so it was certainly a good idea to first care- fully reform the electrolytic capacitors in the power supply HI, After we treated the selector switch with a little bit of contact spray, the dipper worked perfectly - practically as good as new! The Colprtts oscillator is built around a type 955 acorn triode valve (Figure 6 ). This type of miniature valve, which is called an ‘acorn’ on account of Its shape, was developed by RCA in 1 935 \ 2 l The spe- cial method used to fabricate the contacts minimises the parasitic capacitance and inductance of the lead wires, so the valves can be Ld elektor 05-2010 75 RETRONICS Winding data forl^ (all cofls wound on 19-mm plastic coil forms unless otherwise specified) Frequency range [MHz] Number of turns Wire diameter [mm] 2.2-5 113 0.15 5-10 52 0.5 10-22 21 0.7 22-45 7 1.0 45-100 3 1,0 100-220 1 turn, length 4,5 cm, width 18 mm 220 “ 400 1 turn, length 11 mm, width 8 mm used to build oscillators operating Into the gigahertz range. The oscillator of the grid dipper Is built entirely in accordance with the rules of high-frequency engineering, with the leads kept as short as possible by connecting the grid and the anode directly to the tuning capacitor via tubular capacitors C3 and C7. As the gain of the 955 varies considerably over the full frequency range, PI is pro- vided to allow the operating point of the valve to be adjusted over a wide range. The grid dip meter is easy to use. First you select a coil according to the estimated resonant frequency of the circuit to be measured and plug it in to the probe head. With SI in the Dipper position, you then adjust PI until the pointer is somewhere to the right of the midrange position. Next you place the sense coil close to the coil to be measured (Figure 7), The strongest magnetic coupling is obtained when the windings of the two coils are parallel. Now you rotate the tuning knob until you see a clear dip in the grid current. The oscillator frequency Is affected to a certain extent by the pres- ence of the circuit to be measured (frequency pulling), so the next step is to reduce the coupling by increasing the distance between the coifs and then repeat the measurement. When 51 is in the Modulate position, the oscillator is AM modulated at 50 Hz and the grid dip meter can be used as a signal generator. When 51 Is in the Diode position, the anode voltage of the oscillator is switched off and the instrument can be used to detect the pres- ence of a h rg h-frequency signal, either visua I fy by the motion of the meter pointer or audibly using headphones. If you aren't afraid of a bit of precision mechanical construction, this circuit is an excellent choice for building a D1Y copy of the instru- ment. You can use a Philips type 4761 (E1C) valve in place of the 955, or you can try using a normal RF triode such as an EC92, although this will considerably reduce the maximum frequency range. Be sure to use only one common ground point for the oscillator. Naturally, the valves in the power supply can be replaced by semiconductor diodes or Zener diodes. Coil 12 consists of a TO-kQ resistor wound with 30 turns of 0.1 5-mm copper wire (Figure 6). The winding data for coil L d Is given in the table. Finally, for those of you who regard messing about with valves and high voltages as a waste of time, lots of schematic diagrams for dip meters using transistors can be found on the Webl 4 l ( 100101 - 1 ) Links and Reference documents |1| http://oak.cats + ohiou.edu/‘postr/bapix/Dip_59.htm [2] www, antiquewireless.org/otb/acorntube.htm [3 1 "Reforming Old Capacitors’, Elektor May 2006 [4| www.qsLnet/iz7ath/web/02_brew/15Jab/02_dipper/ pag01_eng.htm Retronics is a monthly column covering vintage electronics including legendary Elektor designs. Contributions , suggestions and requests ore welcomed: please send an email to editoh@elektor.com 76 05-2010 elektor INFOTAINMENT Hexadoku r\ j ’ii _ rl I // P W I r\ \ 4 *- - ^ D v V V fl w I 1 V-* High time for some puzzle fun with this new May 2010 Hexadoku, Leave the lawn mower in the shed, the solder iron in the stand and get cracking with this month's challenge. Send the hexadecimal numbers 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 16 >06 boxes, enter numbers such that alt hexadecimal numbers 0 through F (that’s 0-9 and A-F) occur once only in each row, once Correct solutions received from the entire Flektor readership automa- tically enter a prize draw for one Elektor Shop voucher worth £ 80,00 and three Elektor Shop Vouchers worth £ 40.00 each, which should encourage all Elektor readers to participate. Prize winners The solution of the March 2010 Hexadoku is: 51 E7A. The £80.00 voucher has been awarded to: jan Schoubo (Denmark). The £40.00 vouchers have been awarded to: Paul Kirsch (Luxembourg), Laurence Hamel in (France) and Maarten Koppe{The Netherlands). Congratulations everybody! Solve Hexadoku and win! in each column and in each of the 4x4 boxes (marked by the thicker black lines), A number of clues are given in the puzzle and these determine the start situation. 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 June 1 , 201 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 261 4447 Email: hexadoku@elektorxom ironies touch 3 2 5 0 4 E 7 F A 1 D 5 0 2 5 E A 1 8 7 4 4 0 1 6 B 2 F D 3 A C 0 5 E 6 A E 0 2 1 D 8 7 C B 9 A 3 F 4 0 C 3 8 E 9 1 4 7 B A E C 3 6 C 5 9 B 8 9 5 B A E 4 0 C 7 6 3 F 7 C 9 3 1 B 2 A 1 B 5 6 B 7 2 E D 1 C 8 9 4 8 5 F E 0 A A F 1 4 6 3 [Ci PZZL mm 1 9 C F 3 7 8 D A 4 E B 2 0 6 5 5 2 7 4 6 E 0 B F C D 3 9 A 8 1 3 D I 6 0 C 2 A 9 5 1 7 8 F E 4 [b _8_ _E_ 'b _A J_ 5 _4_ F o] 2_ _9_ 6 C D_ 3_ 7_ 7 1 E [9" 4 0 2 6 3 8 B T D C 5 A 6 8 5 D B C 7 A 4 9 1 0 3 [f 2 E I 2 0 F 3 8 D 5 1 E 7 A c 4 6 B 9 4 C A _B_ F 9 3 E 6 D 5 _2_ 7 "l j _8_ A 4 2 6 0 8 1 7 B 3 C 5 E 9 F D B 7 0 5 9 6 1 E 2 1 j A F _D 8 3 c 4 i 9 F 1 _8 D 1 3 C 5 7 6 4 E B [2 A 0 _C_ 3 _D_ E A F _B_ 4 _2_ _oJ a 9 5 7 1 _6_ D A 3 2 5 4 6 8 C E 0 7 T B 9 F F B 9 7 2 [1 D 0 8 5 3 A 6 4 E c E 6 8 1 7 A F C 9 B 2 ‘4 0 5 D 1 3 0 5 4 C E B 9 3 D F 6 1 A 8 7 2 The competition is not open to employe [if Elektor International Media, its business partners and/or associated publishing houses. elektor 05-2010 77 ELEKTOR To book your showcase SHOWCASE contact Huson International Media Tel. ( 0 ) 1932 ARMAIDE www, arm aide, com An integrated software development system targeting NXP LPC2000-famiiy microcontrollers. * Efficient native ARM7 code without C or assembler * Suits Pascal / Delphi programmers * IEEE Floating-point Real support Professional software at hobbyist prices. ATOMIC PROGRAMMING LTD www atom icpro g ra m m i n g . c om • AP-t 1 4 ISP/JTAG Programming System » JTAG Programming and Testing » Boundary Scan Testing • Universal In-System Programming • EEPRQM and SPI Flash Out- of- Circuit Programming • Generic GDB Proxy M Server - Jennie JN5148 (■ ZigBee Development Applications • Training Platform available *Jr / - AVIT RESEARCH www.avitresearch.co.uk USB has never been so simple.,, with our USB to Microcontroller Interface cable. Appears just like a serial port to both PC and Microcontroller, for really easy USB connection to your projects, or replacement of existing RS232 interfaces. See our webpage for more details. From £10.00. turnon 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. BLACK ROBOTICS www. bl ac kre b o ties .com Robot platforms and brains for research, hobby and education. * Mahe your robot talk! * TalkBotBrain is open-source * Free robot speech software * Robot humanisation technology * Mandibot Gripper Robot ByVac www.byvac.com * P1C32 With BASIC * ARM With Forth * USB to 120 * Serial Devices • VT1Q0 LCD Displays DECIBIT CO. LTD www.decibit.com * Development Kit 2.4 GHz * Transceiver nRF24L01 * AVR mcu ATmegai 68 CEDA www.ceda.in ceda@vsnl.com \ e-learning $5 Hourly • PC8 Layout @ S5 Hourly • Learn PCB Designing with Multimedia DVD in QrCAD, PADS & ALLEGRO • Self or e-learning with support by email, phone & web-meeting DESIGNER SYSTEMS htt p://www. design ersy ste ms.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) 845 5192306 EASYSYNC http :// w w w. easysy nc.co.uk EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and RS485 converters at competitive prices. ' ELNEC www.elnec.com Europe's leading device programmers manufacturer; • reliable HW: 3 years warranty for \ most programmers • support over 52.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 9 First Technology Transfer Ltd , FIRST TECHNOLOGY TRANSFER LTD. http://www.ftt.co.uk * Training and Consulting for IT, Embedded and Real Time Systems * Assembler, C, C++ (all levels) * 8, 1 6 and 32 bit microcontrollers * Microchip, ARM. Renesas J1, Freescale * CMX, uCOSII, FreeRTOS, Linux operating systems * Ethernet, CAM, USB, TCP/IP, Zigbee, Bluetooth programming FLEXIPANEL LTD www.flexipanel.com TEAclippers - the smallest P3C 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 Instruments A Ftohd e & S chwa rz Com pa ny 0 Oscilloscopes 0 Power Supplies 0 Spectrum Analyzers 0 RF Instruments 0 Programmable Measuring Instruments Great Value in Test & Measurement www.hameg.com 78 05-2010 elektor products and services direc FUTURE TECHNOLOGY DEVICES tittp ://w w w;ftd i c h i p .coni FTDI designs and sells USB-UART and USB-F1FO interface Lc/s. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB HEXWAX LTD www, h ex wax, com World leaders in Driver-Free USB ICs: * USB-UART/SPI/I2C bridges * TEAleaf-USB authentication dongles * expandlO-USB I/O USB expander * USB-FileSys flash drive with SRI interface * USB-DAQ data logging flash drive 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 vww. elektor. com RFID COMPONENTS h ttp/ww w. apdang 1 ia. org.uk For D1Y, OEM's & Experimenters * EM4100 Cards .99 p (Prices inc vat) * Keyfobs£1.09 • R/W Keyfobs £1.65 • RFID Coils £2,95 • RFID PCB with RS232 port * RFID IC’S FM4095 - U2270B * microRFID module (similar to Core ID12) • Free Reader download - Technical pages Order online 24 hrs - Tel: 01244 520684 ROBOT ELECTRONICS littp://www.robot-electronlcs,co.uk Advanced Sensors and Electronics for Robotics * Ultrasonic Range Finders * Compass modules * Infra-Red Thermal sensors * Motor Controllers * Vision Systems * Wireless Telemetry Links * Embedded Controllers ROBOTIC USB INSTRUMENTS JHtp://www.usb-insiruments.com USB instruments specialises in PC based instrumentation products and software such as Oscilloscopes, Data Loggers, Logic Anaiaysers which interface to your PC via USB. http://www.robotiq,co.uk Build your own Robot! Fun for the whole family 1 Now, available in time for X-mas * Arduino Starter Kits *NEWN* * Lego NXT Windstorms * Affordable Embedded Linux Boards * Vex Robotics (kits and components) * POB Robots (kits and components) email: saies@robotiq.co.uk Tel: 020 8669 0769 VIRTINS TECHNOLOGY www.vlrtins.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 CO IV1 PAN Y HERE Elektor Elec ironies has a feature to help customers promote iheir business, Showcase - a permanent feature of the magazine where you will be able to showcase y t >u r prod ucts and s er v i ce s . IT, For just £242 + VAT (£22 per issue for eleven issues) Elekior 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 i he above plus run a 3cm deep full colour image - e g. a product shot, a screen shot Uom your site, a company logo - your choice Places are limited and spaces will go on a strictly first come, first served basis. S o- p I eas e tax back your order today ! I wish to promote my company, please book my space: * Text insertion only for £242 + VAT - Text and photo for £363 + VAT NAME. — — ORGANISATION : r pTTri p. • fc ... ADDRESS: 1 1 ■ • r a r a a a r a ■ a Ml i* ivn i M + I + ■ ■ ■ ■ ■ ■ ■ MfMiTiTit BrBaaakakarsraaaaa lanaaBa-aa a a- k - , ■■ ■ ■ i ■ i “ * ■ * “ - - - - i , ■ t-Si-aa-a-raa-a r a -r a a- a a- a n i a - - ........ ■-tpapapa ■ aak.k.... Mt BTflCBiai a a a a k. , ■ - • a a a ■ a riaiiaaafif |^,i a a i I * - -i F , B >1 *■ - t a- a a “ - r e -r a r a ■ “ 3 ■* Hra r a ■ a 1’FL* lllitkiiai J * — •> It—* a a r a a a ■ ■■ ■ a i ^ a _ r B i a ■ ■ ■ h t 14.1. p , „ „ PLEASE COMPLETE COUPON BELOW AND FAX BACK TO 00-44^(0)1932 564998 COMPANY NAME WEB ADDRESS 30-WORD DESCRIPTION ■a 1 » * a a H pa r *■ i a a a a ■ a ■ a i k - a. 4 k _ ff + atia a ■ a ■ a a a a k s .a _ u “ r p r ■ r a n a ai a ■ a a. p a k -• * b b a- a ■■■ a -r a a ■ ■ * ■ * ■ r a a. a a a a k a a a a- a -a a a a a a . . _ _ p , , ■ 3 p a a a 1 a 1 1 *" 4 > a r a r a n a a. a a. ■ a. aa r B a -3 r a r a a a a a ■ a -r a a a n aa aa aa k a k a a- a ■ a. a 4. a a a a a *■ 3 + fe i- ei ni na a a aa aa M + a r - ■ "Paaaaaaa a a k a _ ■--para ■ “ “ “ a ra pa a a .a a ka.i, TfT1TI1l Ml ► + + B P B I *-■ -*■- a p a p a a a a a. a .#■ _ ,. f a a 1 a a a- p b -p a p a ■ a ■ a a a a . a k . . a + S' 'P a a a a' a 1 k a k m m a a a a 1 “ ■* H pa p bib *■ b + a a a- a a a 1 1 a a k a _ , Mbb piti ta i a a - apaaB’aaaaaaa , . a a a ■ a 1 a M t u « » . a Itfi I 1. a .. a i- a ■ a ■ a a a a a. _ **■** bb pi ra ■ aa-kB-k^-T.., Ml aa a ■ aa ■ ■ 3 ■ ■* ■ * + P a M H pa ■ L >-r-« a a aa ■ “■i S3 i-a p a p a « a a a a a .a a 4. B B B , ■ a a a a a . j ■ p + - a- a a p ■ a a a . r B , a ■ ‘ . a 11 ia 1 !■ fa * i a- a a aa a a a - Sara ■3 *■“ pa pa pa ra«a*ai a j a 4 r a ■ a k a * a a. - T B , ■ ka.a.apipii F 8 TBTBTE ! * 4 M pa a a a a a a a. a a p a -i Mti^BTBIBIBiaBI Ptl, • ■paSapaaai J elektor 05-2010 79 SHOP BOOKS, CD-ROMs, DVDs, KITS & MODULES Going Strong A world of electronics from a si # python 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. Desktop and web based applications are covered. The programming language used is Python, an object-oriented scripting language; a higher level language than, say, C Obviously hav- ing fewer lines of code will be quicker to write but also fewer lines of code means fewer opportuni- ties to make mistakes. Code will be more readable, and easier to modify at a later date. You can concentrate on the overall operation of the system you are making. This abstraction also applies when writing graphic user-interfaces. Writing low level code for graphics and mouse clicks and the like is something that you do not have to do. In Python all this is wrapped up In relatively simple functions. The book guides you through starting with Linux by way of a free downloadable, live bootable distribution that can be ported around different computers without requiring hard drive installation. Practical demonstration circuits and downloadable, full software examples are pre- sented that can be the basis for further projects, 224 pages * ISBN 978-Q-9Q5705-87-3 * £29,30 * US 547.60 V. C# 2008 AND .NET Programming fOP EuTT-:- I?,!- ! lidmCEPI J£]-in ji-Li-WbMK. 0 lekto r Microsoft approved*. learn more about C# programming and ,NET C# 2008 and .NET programming This book is aimed at Englneersand Scien- tists who want to learn about the .NET en- vironment and C# programming or who have an interest in interfacing hardware to a PC, The book covers the Visual Studio 2008 development environment, the .NET framework and C# programming language from data types and program flow to more advanced concepts including object ori- ented programming. 240 pages * ISBN 97 8-0-905705 -8 M £29.50 * US 547,60 Circuit design and programming Complete practical measure ment systems using a PC This book covers both hardware and soft- ware aspects of designing typical embed- ded systems based on personal computers running the Windows operating system. It’s use of modem techniques in detailed, numerous examples has been designed to show dearly how straightforward it can be to create the interfaces between digital and analog electronics, programming and Web-design, Readers are encouraged by examples to program with ease; the book provl d es cl ea r g uide I i nes as to t he a ppropri - ate programming techniques “on the fly”. 292 pages * I5BN 978-0-905705-79-8 £28,50 * US S46.00 l So Prices and item descriptions subject to change. E. & O.E 05-2010 elektor Home electric power Your own Eco- Electrical Home Power System This book provides the semi-technical, power-conscious homeowner a place to begin in the quest for home electric power. Both the essential principles and detailed information on howto build or maintain a home electric system off the utility grid are presented in an easy-going style. This booklet will help you to safeguard or de- velop your own home electricity supply. It contains step-by-step calculations, practi- cal details, examples and much more. 75 pages * ISBW 978-0-905705-82-S £16.50 * US $26.70 PIC Cookbook for Virtual Instrumentation The software simulation of gauges, con- trol-knobs, meters and indicators which behave just like real hardware components on a PC's screen is known as virtual instru- mentation. In this book, the Delphi pro- gram is used to create these mimics and PIC based external sensors are connected via a USB/R5232 converter communication link to a PC. Case studies of virtual instruments are detailed including a compass, an oscillo- scope. a d tg ital a nd an a log ue th ermomete r and virtual displays forcars and aircraft. 264 pages * ISBN 978-0-905705-84-2 £29,50 * Li5 $47.6(3 Look into the electronics of eco-power Practical Eco-Electrical Home Power Electronics This book is a sequel to Your own £co- Ekctrical Home Power System and goes deeper into the electronics of photovol- taic and thermal solar tech nologies, wind power conversion, inverter circuits, and loads such as electronic lighting. Power electronics circuit theory is presented while analyzing commercial circuits, including little-known converters and subtleties such as snubbers and leakage inductance. The book also offers in-depth coverage of power system strategic ng for optimal efficiency and utility, inclu- ding a 1 70 V DC bus, commercial solar charger design with detailed circuit explanations, wind generator electric machine electromechanical theory, wind converter design requirements and the series-L zero -current-switching converter and power supplies found inside loads connected to home power systems and their potential problems and conse- quences for inverters. 150 pages - ISBN 978 T)-90 57 05-83-5 £24,90 * US $40.20 v J r ^ More information on the Eiektor Website: www.elektor.com ektor Eiektor Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 20 8261 4509 Fax: +44 20 8261 4447 Email: sales@elektor.com See the light on Solid State Lighting DVD LED Toolbox This DVD-ROM contains carefully-sorted com p re he n si ve tech n i ca I d oc u m en ta tio n about and around LEDs, For standard mod- els, and for a selection of LED modules, this Tool box gathers together data sheets from all the manufacturers, application notes, design guides, white papers and so on. It offers several hundred drivers for power- ing and controlling LEDs in different con- figurations, along with ready-to-use modules (power supply units, DMX con- trollers, dimmers, etc). In addition to opti- cal systems, light detectors, hardware, etc,, this DVD also addresses the main shortcoming of power LEDs: heating. This DVD contains several Eiektor articles (more than 1 00) on the subject of LEDs, ISBN 978-90-5381-245-7 £28.50 * US 546.00 1 10 issues, more than 2,100 articles DVD Eiektor 1990 through 1999 This DVD-ROM contains the full range of 1990-1 999 volumes (all 110 issues) of Eiektor 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 alphabetical ly by topic, A comprehensive index enables you to search the entire DVD. ISBN 978-0-905705-76-7 ££9.00 • US$11130 8 i eiektor 05-2010 SHOP BOOKS, CD-ROMs, DVDs, KITS & MODULES A whole year of Elektor magazine onto a single disk DVD Elektor 2009 This DVD-ROM contains all editorial arti- cles published in Volume 2009 of the Eng- lish, American, Spanish, Dutch, French and German editions of Elektor* Using the supplied Adobe Reader program, articles are presented in the same layout as origi- nally found in the magazine. An extensive search machine is available to locate key- words in any article. With this DVD you can also produce hard copy of PCB layouts at printer resolution, adapt PCS layouts using your favourite graphics program, zoom in / out on selected PCB areas and export circuit diagrams and illustrations to other programs. Modulo D (April 2010) (March 2010) A power supply with adjustable output voltage and current limiting is part of the basic equipment of every electron ics lab. However, the increased complexity of a switch-mode design scares away many potential builders, even though it actually isn't all that complicated if you use a sui- table combination of well-known techno- logies. This circuit is suitable for building a single or d ua! power su pply. PCB and ail components, less power transformer The external appearance of this small mod ule w f ith an LC display a I most be] res what it has inside: a complete stereo preamplifier and final amplifier with IR remote control, adjustable tone, volume and signal levels, and an output power of 2 x 20 w {Class D), all with a single 1 2-V supply voltage. This makes it perfect for use in a car. boat or motor home. PCBs, SMD-populated , and ail other components ISBN 97B-9G-5381-251-8 £17. SO ■ US $28.30 Completely updated Elektor’s Components Database 5 The program package consists of eight data- banks covering ICs, germanium and silicon transistors, FETs t diodes, thyristors, triacs and optocouplers. A further eleven applica- tions cover the calculation of, for example. LED series droppers, zener diode series resis- tors , vo I tage reg u lators a nd A M Vs . A colo u r band decoder is included for determining resistor and inductor values. ECO 5 gives in- stant access to data on more than 69,000 components* All databank applications are fully interactive, allowing the user to add, ed Stand comp! ete co m po nen t da ta . ISBN 978-90-5381-1 59-7 £24.90 * US $40.20 TpM“*£v i; 11 w i. l 'rftnfinTtl'-u (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 development 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. PCS, populated and tested, test software boded ArU 090559-91 * El 3200 * US$212.90 (December 2009) Elektor s Software Defined Radio (SDR) is deservedly popular. The performance of a receiver depends to a large extent on its input filters. A selective input circuit improves antenna matching and immu- nity to interference from other strong signals. This preselector a i lows the use of u p to fou r fil ters, tuned under soft wa re control using varicap diodes. A tuned loop antenna is also described that lets you use our SDR without an outdoor antenna. Kit of parts , contains portly populated board. , coil formers f ferrite rod with coils V V 82 Prices and item descriptions subj ect to change. E. & O.E 05-2010 elektor May 2010 (No. 401) £ US $ ds PIC Con trot Board 090073-9 T .... PCS, populated and tested wwu.elektor.com Cloud Altitude Meter 0903 29*91 .... Populated PCB j n endosu re (see poll).. wwvv.dek to r.ca m In-vehicle CG2 Meter 100020 71 .... k i , of part? 137. 0 0 . , _ _ . 2 2 i .20 1 00020-72 ....Enclosure ■■■ «*i B4.J ta - b.j g + 19.00.,,. 30,70 VisiOLED OS 1 1 4 1 - 1 Prl n ted dr cu it boar d 1 3 .30 .21.50 April 20 10 (No* 400) Uni Lab Small is Beautiful: MtnirnodlS 09077 3 - 4 1 , ... Prog ram med control I er with B oo t ba dor p re-prog rammed. ..... 090773-91 .... PCB, populated and tested with Bootloader pre-prog rammed...... Bluetooth forOBD-2 Fun with Fireflies 1 00014-1 ...... Printed i 100014-41 ....Progran Beep. beep... Sesame 5 V Power Controller 0907 19-1 ...... Pri nted c i re u it boa rd March 2010 (No, 399) Rei g n wl tluh e See pt re 090559-91 .... PCB, populated and lesLei Modulo D 090563-71 .... PCB, SMD-populated,anc February 2010 (No. 398) Battery Checker 071131-41 .... ATmega32-1 6 PU, programmed ... 071 131-71 .... Kit of parts, exd. enclosure ... Winamp Controller 090531 -71 .... Kit of parts . The ATM 1 8 Radio Computer 090740-71 .... PCB with 514734/35 radio 1C ready moun ted an d te ste d., ........ ... .*. .............. . January 20 TO (No. 397) USB Magic Eye 09078S-1 ...... Printed circuit board jailiBlirJlt.lll.JBI 4 BIJI.IJi.. J B 1 B B I B BJ - *. .1 IBJBIJ B ■ if ■ | J *4 1 I 1 R B + 9 P •"* ■ * » 0-1 lltlHi M - I 4 BB 1|J B -- B i .1JJH P > Ml AC fa r Horn e Autom a tion 090278-91 .„. Populated PCB Dimmer with a Micro December 2009 (No. 396) Preselector for Elektor SDR 0906 15-71 . ... Kit of p arts , conta iris partly popula ted boa rd , coil formers, ferrite rod with coils,..., Top*of-the*Bfl I Lights Sequencer 0901 25-1 ...... PCB, bare (master module).., 0901 25-2 PCB, bare (lamp module) 090125-41 Controller (PIC1 8F2550) fo r ma i n PC B , prog ram me d 090125-42 .... Controller (P1C1 2F508-I/5N) for lamp unit, programmed ... The Vikings Are Coming! 080948-71 .... Kit of parts: bare PCB and bluetooth module BTM222 - H-B-iM r -- pri Hrnriin 11P1PP1BPT1P1HP1 ■ riafiiniriR p H ■ + 4 !■ + ■ #■ H ‘- l » H - t-i - ri - .... 16.00,.. ...64,00.,, ,,,,25,90 ..103,30 ‘■r ■» b >2 1 j SO fe + i 35.20 56,00 ... ,,,,90,40 ... 26.70... .,..43.10 ...11.00... ... 1LGG... ...17.80 7.80 ... 15.50. .. ..,.25,00 r on ■ ■ r ■ ■ lur ■ mjr "J bib ....14.40 , 132,00,,. .,212,90 ... 69.90..., ..112.80 ... 1 7. SO.,,. , 1 24.00.,.. 28.80 ,.200,00 .,.89,00 143.60 27.50,,,. ,,,,44,40 9.90,... 9.90..., ...16,00 ...16.00 .154.00 .248,40 7.60..,. ...12.30 ... 47.00.,., ...75.90 10.80..., 2.30.... ...17,50 3.80 14.50.... ...23,40 2,30..,. .... 3,80 ... 23.70,,,. ...38,30 Complete practical measurement using a PC ISBN 978-0-905705-79-8.... £28.50 .....US $46,00 C# 2008 and .NET programming ISBN 978-0-905705-81-1 .... £29.50 US$47.60 PIC Microcontrollers ISBN 978-0-905705-70-5..., £32.00 US $51 .70 Practical Eco-Electrical Home Power Electronics ISBN 978-0-905705-83-5 .... £24.90 US S40.20 DVD Elektor 2009 ISBN 978-90-5381-251-8.... £17.50 US$28.30 Masterclass DVD High-End Valve Amplifiers ISBN 978-0-905705-86-6.... £24.90 .... US $40.20 DVD LED Toolbox ISBN 978-90-5381 -245-7.... £28.50 US$46.00 I DVD Elektor 1 990 through 1 999 ISBN 978-0-905705-76-7 £69,00 ...US S1 11 .30 ECD 5 ISBN 978-90-5381-1 59-7.... £24.90 US S40.20 1 2 3 4 5 Modulo D Art. #090563-71 £69.90 ...US$112.80 SDR Preselector Art. #09061 5-71 £47.00 US$75.90 Bluetooth forOBD-2 Art. # 090918-71 £26.70 .....US S43.1 0 WinAmp Controller Art. # 090531 -71 £85.00 ...US S143.60 Battery Checker Art. #071 131 -71 £124.00 ...US $200.00/ r ^ Order quickly and securely through www.elektor.com/shop or use the Order Form near the end of the magazine! L j Elektor Reg us Brentford 1000 Great West Road Brentford TWS 9HH * United Kingdom TeL +44 20 8261 4509 Fax +44 20 8261 4447 Email: sa I es@e I ektor.com elektor 05*2010 83 COMING ATTRACTIONS NEXT MONTH IN ELEKTOR Unilab V/i/Temp. Readout The lab power supply published in the April 2010 edition now gets a dedicated measure- ment circuit showing not just voltage and current on a 4 x 20 character LCD, but also tem- perature inside the case. The A-D conversion and calculations are handled by an At meg a 168 processor. A special circuit configuration is used to measure tiie current in the nega- tive supply rail. Program your Own RFIDs RFID devices type EM4102 are widely available and a suitable reader was described in Elektor some months ago, based on an EM4095 reader chip on a small circuit board. The same board is now used to implement an RFID reader based on an ATtiny23i3 micro. As part of the project, you'll be making your own sensor RFIDs for wireless transmitting of measured sensor data to the reader. OBD2 Mini Simulator Those of you keen on writing or developing utilities for vehicle diagnosis will soon discover that a real car is bit of a problem to have around in the electronics lab. In cases where a professional OBD-2 analyser is not available or affordable, our mini simulator for 08 D sig- nals may prove useful. The circuit supports four OBD-2 protocols and is likely to become indispensable to everyone working with 0 RD hardware and software. We regret that 'Auto Balancer for LiPo Battery Packs' could not be accommodated in the May 2010 issue as planned. Article tides and magazine contents subject to change: please check the Magazine tab on www.elektor.com t lektar UK/Fmnpean edition; on sale May 2 o. 2 0 10 . Elektor USA edition ; pa biis hed May rj. 2010. V V ww.elektor.com www.elektor.com www.elektor.com www.elektor.com Li. ewe 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 (Cs and corrections and updates if appl! In the Elektor Shop youll 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. Also on the Etektor website: Electronics news and Elektor announcements • Readers Forum • PCB, software and e-magazine downloads • Time limited offers FAQ, Author Guidelines and Contact icable. Complete magazine issues may also be downloaded. v rl.'j. » v 6 'W«k» s. PCS* v wEWnn ■w = ekiiL 1 Create *#■ Sable Wt tkfctor Biiliflif* LdiFflrni V-" It 1 «|LC. >1 . ! 7! 0 , f-r>TE* I 1 1* *79 - ■= 111 discount Kit of pSftS EtoktoiWhee I PragriUtliSlirte EnibeddFd PICMitr«(HtErfllk?S 0 E!«H*r >t*gixl StiM-ibq i’-cw la IN* frEjClLl f rtijaJ ... itia fpt-a ?' *r*c;rpm- .nitiT ieoh uttirowG,! TSi. tll,lav.Jrr 11C |rrri4Mtll*HIMifl *'ld (ftn.w.-n, k# 1 tu t 9Ca en^dixlldr. IPLd I* mu Sidle ’ irj p^b m PCKi Taa> gfli - hrfii 1 !■*: I lL cir» lE 3 Taa !■<■. I dv, WjLOoM «rvr fl'E* -■ V fntt, .mu E.r s 1 a::, a is USB lim AoquisHiDii 84 05-2010 elektor Description Price each Qty. Total Order Code Python Programming and GUIs £29,50 DVD Masterclass High-End Valve Amplifiers- £24.90 i m ■ 'i : fWrl DVD Eiektor 2009 £17.50 PIC Cookbook for Virtual Instrumentation £29.50 Complete practical measurement systems using a PC £28.50 Sub -to to/ P rices and item d escri pti o ns su bjec t to ch a nge. The publishers reserve the right to change prices P&P without prior notification. Prices and item descriptions shown here supersede those in previous issues. £* & O.E, Totoi paid i ■ — < Verne Address - Postcode METHOD OF PAYMENT [see reverse before ticking as appropriate) | Bank transfer P] Cheque (UK-resident customers ONLY) n Giro transfer n ^IsJT □ Expiry date: Verification code: Please send this order form to ' (see reverse for tondfriom) Eiektor Reg us Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel. +44 2G 8261 4509 Fax: +44 20 8261 4447 www.eiektor.com sales - elektoi.com tef. Dote EL05 ■ ill! ■ ■ ■ ■ ■ i i ■ :■ ■ ■ ■ r 1 ■■ I - - ■ I *>- 4 ++-*+*?** Email Signature USA. and Canada residents shuuW use S prices, and send the order form to: Eiektor US POflo* ISO Vernon CT 06066 USA Phone: 860-875-2199 Fa*: 860-871-0411 F-rnail: safest elektar.com Yes, I am taking out an annual subscription to Eiektor and receive a free 2GB MP3 player' I would like: □ □ Standard Subscription (11 issues) Subscription-Plus (11 issues plus the Eiektor Volume 201 0 DVD-ROM + exclusive access to www.eiektor-plus.com) ' Offer available to Subscribers who hove not held a subscription to Eiektor during the last 12 months. Offer subject to availability. See reverse for rates and conditions. METHOD OF PAYMENT (see reverse before ticking as appropriate) Bank transfer | | Cheque (UK- re si dent customers ONLY) | j Giro transfer □ ™ “ □ Expiry date: Name Verification code: Address - Post code JeL Email Date - - Signature Please send this order form to Eiektor Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 20 8261 4509 i-ax: +44 20 8261 4447 www.elektoi.com subscriptions ° elektor.com ELU5 ORDERING INSTRUCTIONS, P&P CHARGES AH 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.dektor.tom/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 Elektor 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 he accompanied by the full payment, including postage and packing charges as stated above or advised by Customer Services staff. Bank transfer into account no, 40209520 held by Elektor Electronics with ABN-AMRO Bank, London. IBAN: GB35 ARNA 4050 3040 2095 20, BIC; ABNAGB2L. Currency: sterling (UKP), Please ensure your Full name and address gets communicated to us. Cheque sent by post, made payable to Elektor Electronics. We can only accept sterling cheques and bank drafts from UK-resident customers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. Giro transfer into account no, 34-152-3801 , held by Elektor Electronics, Please do not send giro transfer/ deposit forms directly to us T but instead use the National Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA and MasterCard can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL-protected for your security. COMPONENTS Components for projects appearing in Elektor are usually available from certain advertisers in this magazine. If difficulties in the supply of components are envisaged, a source will normally be advised in the article. Note, however, that the source(s) given is (are) not exclusive. TERMS OF BUSINESS Delivery Although every effort will be made to dispatch your order within 2-3 weeks from receipt of your instructions, we can not 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 exisL in respect of circuits, devices, components, and so on, described in our books and magazines, Elektor 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 Elektor in writing. Such written permission must also be obtained before any part of these publications Is stored in a retrieval system of any nature. Notwithstanding the above, printed-circuit boards may be produced for private and personal use without prior permission. Limitation of liability Elektor shall not be liable in contract, tort, or otherwise, for any loss or damage suffered by the purchaser whatsoever or howsoever arising out of, or in connexion with, the supply of goods or services by Elektor other than to supply goods as described or, at the option of Elektor, to refund the purchaser any money paid in respect of the goods. Law Any question relati ng to the supply of goods and services by Elektor shall be determined in a 1 1 respects by the laws of England, i SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION Standard Plus United Kingdom £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.elektorcomjusa Canada £75.95 for special offers HOW TO PAY Bank transfer into account no. 40209520 held by Elektor Elec- tronics. with ABN-AMRO Bank, London. IBAN: GB35 ABNA 4050 3040 2095 20. BIG: ABNAGB2L. Currency: sterling (UKP), Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Elektor Electronics. We can only accept sterling cheques and bank drafts from UK-resident cus- tomers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. Giro transfer into account no. 34-1 52-3801 , held by Elektor Elec- tronics. Please do not send giro transfer/deposit forms directly to us, but instead use the National Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA and MasterCard can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL-protected for your security. SUBSCRIPTION CONDITIONS The standard subscription order period is twelve months. If a 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 bead of the college, school or university faculty, A standard Student Subscription costs £39,20, a Student Subscription-Plus costs £51 ,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 E7.50, whichever is the higher, plus the cost of any issues already dispatched. Subsdptions cannot be cancelled after they have run for six months or more. January 2U1 0 lektor Order custom-designed boards from the Elektor PCB Service The advantages at a glance • Professional quality PCBs. • No film charges or start-up charges. • No minimum order quantity or charge for this service • Available to private and commercial customers. • Design check applied to all entries. We'll let you know within 4 hours! • Two RGBs supplied - three produced. If the third boarc is also okay, you receive it as well - free of charge I Quick, cheap and secure www.elektorpcbservice.com Index of Advertisers Arm aide, Showcase A PD, Showcase Atomic Programm no l\c o ,vcase AviT Research Showcase Beijing Draco Eiecsrcni-s Ltd Beta Layout, Showcase Black Robotic s, Showcase By Vac. Showcase CEDA, Showcase. . . Dec i bit Co. Ltd, Showcase D es igne r Systems , S hov. case Diamond Systems ... Easysync, Showcase . . ... El nee, Showcase Eurocircuits First Technology Transfer Ltd. Showcase . . Flexi Panel Ltd, Showcase , Future Technology Devices, Showcase . Hameg, Showcase wwwafmaitie.com ,78 www.aptianglla. org. uk + 79 wmv.atomicpfQgramminQ. com . , 78 www.avitresearcftXQMk 78 www.ezpcn.com 53 mm.pcb-pooi.com 25. 78 www. blackrobotics. com ...... ....... 78 www byvac.com , . . 78 wve'w.ceda.in — t . 78 www.decftjilcom . * 7B www. designersystems. co. uk 78 www.screenscopetranes.com 13 www, easy sync. co. uk >78 www.elflec.com -78 www.euroofcults.com ♦ ...... 53 WWWM co.uk ......... a ..... t . 78 www.ffexipanekcom *♦ . 78 WWWrftdfchip.com „ . 2, 79 ivww.hameg.com , > 78 Hex Wax Ltd, Showcase Labcenter. MikroElekironika MQP Electronics, Showcase Nurve Networks Parallax * > . . . * ■ - Peak Electronic Design. > . . . . I 4 C 0 - . i ..41 ....... . ... . .... . .. . . . , Quasar Electronics. Rohoi Electronics. Showcase Robotiq. Showcase Showcase ♦ * USB Instruments, Showcase . Virtms Technology, Showcase wwwftexwax.cortt 79 wwwMbcenter.com 88 www.mikroe.com .3 ivww.mgp.co/n 79 www.xgsnrestation.com 53 www.pefBlfAX.com 25 www.pBBkelec.co.uk. . . 25 wwmpfcotech.com/scope2002 , . ...... 1 1 www. quss a reie c Irani cs.com. ... . 39 www.robot-efectfontcs.co.uk . ... 79 www.robotiq.co.uk 79 78, 79 www. us b - ins bum ents.com. 79 www.vfctins.com. 79 Advertising space for the issue 24 June 2010 may be reserved not later than 25 May 2010 with Huson International Media - Cambridge House - Gogmore Lane - Chertsey, Surrey KT16 9AP - England - Telephone 01932 564 999 - Fax 01932 564 993 - e-mail: ros, el gar@hiiSonmedia.com to whom all correspondence, copy instructions and artwork should be addressed. elektor 05-2010 The latest version of the Proteus Design Suite harnesses the power of your computer’s graphics card to provide lightning fast performance. Together with unique transparency options it’s now easier than ever to navigate and understand large, multi-layer boards. PROTEUS DESIGN SUITE Features Board Autoplacement & Gateswap Optimiser. Direct CAD CAM, ODB++ & 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 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 i VL u/ fir 'll? 1 1 M-Tj hS |