www.elektor-magazine.com •magazine December 2013 | £ 4.90 USB Multi I/O for FPGA Dev Network Tester , Enter BeagleBone Black Hood Surfin' the RPi Wave Insulation Tester • Microgrids Board | Home and Office Battery Tester FlowStone I Joule Robbin' Bendix Hi-Pot 77 268 451 73 9 Shop languages Components Power supply systems Measuring technology Shop & soldering technology Home & security technology Network technology PC technology Sat/TV technology Communication Your competent online partner for 3D printer kit Create your project! Unlimited creativity Experience the fabbster 3D printer in action: The fabbster is a 3D printer for office, home and hobby use. fabbster makes three-dimensional models designed on your PC or MAC into real objects you can touch. The appliance is equipped with an earthed connector plug. A connecting cable for your country can be found on the article page in our online shop. Professional support thanks to industrial backup: reliable supply chain Specially adapted software “netfabb for fabbster” included Award-winning design Made in Germany Precise and reliable material system: STICK DEPOSITION MOULDING (SDM) Multi-coloured 3D printing: Give colour to your ideas! Largest printer in its class: 3D objects can be printed with an edge length of 20 cm SDM - Stick Deposition Moulding Material for fabbster 3D printer In Stick Deposition Moulding the extruder is loaded with original fabbster LIKE sticks, which are profiled on the side. These sticks offer the advantage of non-slip feeding as opposed to conventional circular filament material. The result is precise dosage of the melted material and objects with optimal material properties. We offer sticks in the following colours: black, white, blue, yellow, green, orange, red, pink, silver, light blue and natural A 100 sticks/ 200 g ABS FABBSTER ... € a i The 3D printer Max. model size: 23 x 23 x 21 cm Objects can be printed in multiple colours order now! www.reichelt.com English Hotline: +49 (0)4422 955-360 Daily prices! Prices as of: 28/10/2013 International payment method: PayPal For consumers: The statutory right of withdrawal for consumers shall apply. All stated prices in € include the legal value added tax, ex works Sande/Germany, plus forwarding charges for the entire shopping cart. Our general terms and conditions shall apply exclusively (under www.reichelt.com/agb). Subject to prior sale. All brands, product names and logos are property of the respective manufacturers. Images can be similar. Subject to misprint, errors and changes in prices, reichelt elektronik GmbH & Co. KG, Elektronikring 1 , 26452 Sande/Germany (HRA 200654 Oldenburg) DEVELOPMENT SYSTEMS FROM *>) ¥, DISPLAY AUDIO TOUCH C N < EMBEDDED VIDEO ENGINE A REVOLUTIONARY SOLUTION ENABLING HI-QUALITY, HUMAN MACHINE INTERFACES AT A LOWER COST DISPLAY HADE EASY WATCH EVE DEMOS ONLINE FTDICHIP.COM Contents Community 8 Elektor World • The Electronic Roundabout: tell us a new story! • Clouds— as we know them • Start Printing in 3D! • And more • Security • The Gate Projects 10 UltiProp Clock (1) This article gives you the key details that hopefully will enable you to successfully build your own high-quality clock, which is bound to draw admiring, envious cries of "Wow!" from your guests. It's high time you too discover Elektor's Ulti(mate) Prop(eller) Clock. 22 Multi I/O for FPGA Development Board (1) Elektor's December 2012 FPGA is expanded with: GPS receiver; temperature sensor; pressure sensor; RGB color sensor; 2 x 16 character LCD; 4 pushbuttons; 4 LEDs; rotary encoder; 7 external digital expan- sion pins; and 3 external analog inputs. 32 Home and Office Network Tester The circuit presented here offers easy one-button testing of common home and office networks, with red-amber-green indication of the network status, and any faults. The design is really simple, just a microcontroller, an Ethernet interface, a pushbutton for starting the test and status LEDs to show the condition of the network. Still, it does do a lot more than a simple cable tester. 40 USB Battery Tester Testing batteries is a fairly common task among electronics enthusiasts. Instead of using a complex stand-alone meter, you can put the intelligence of a PC to good use for this. Here we add a battery in- terface to the general-purpose USB-I024 cable presented in a previous edition of Elektor magazine. 48 Enter BeagleBone Black Yet another platform has been released to the embedded audience: the Bea- gleBone Black. Recently we (finally) got one on our workbench. It looks like a very promising platform with powerful hardware and a lot of potential. Does it outperform the Raspberry Pi? 52 The Flowstone of Wisdom There are many visual programming languages out there, but Flowstone is one with a twist. Clemens Valens examines. 56 Joule Robbin' Hood This circuit steals (energy) from the rich (batteries) and gives it to the poor (plants). 4 December 2013 | www.elektor-magazine.com Volume 39 December 2013 - No. 444 • DesignSpark 58 DesignSpark Tips & Tricks Day #6: after the layout DesignSpark's online BOM and PCB quot- ing tools enable you to find out how much it would cost to build our example project. These tools can be a great time saver. • Industry 64 News & New Products A selection of news items received from the electronics industry, labs and organizations. pggjlfaT x <- tj 2 beagieboard.org GeningSUOStarted i-J = Step 2 install dnvtrs > lieiLill Ihi? dirwn; Id* you* ;ipn!r;iEnx| !>y:;lisrii la gim ynu siMwoifc Own USH Wtisiis ED yaur Hinugl It; diiviirii Labs 62 Surfin' the RPi Wave An overview of Raspberry Pi based projects currently lining up at www. elektor-labs.com, including outlines of RPi Prototyping, mass storage and refrigera- tor monitoring. # Tech The Future 68 Microgrids Microgrids are one of the answers to the question of how to increase the share of sustainable sources in the energy mix. TTF investigates on the Faroe Islands. • Magazine 70 Bendix 60B4-1-A AC/DC Insulation Tester Warning: High Potential! Chuck Hansen takes a nostalgic yet technical look at a 1960s instrument designed to check and ensure electrical safety. Series Editor: Jan Buiting. 76 Hexadoku Elektor's monthly puzzle with an electronics touch. 77 Gerard's Columns: Retronics Personified A column or two from our columnist Gerard Fonte. 82 Next Month in Elektor A sneak preview of articles on the Elektor publication schedule. www.elektor-magazine.com ] December 2013 5 •Community Volume 39, No. 444 December 2013 ISSN 1947-3753 (USA / Canada distribution) ISSN 1757-0875 (UK / ROW distribution) www.elektor.com Elektor Magazine is published 10 times a year including double issues in January/February and July/August, concurrently by Elektor International Media 111 Founders Plaza, Suite 300 East Hartford, CT 06108, USA Phone: 1.860.289.0800 Fax: 1.860.461.0450 and Elektor International Media 78 York Street London W1H 1DP, UK Phone: (+44) (0)20 7692 8344 Head Office: Elektor International Media b.v. PO Box 11 NL-6114-ZG Susteren The Netherlands Phone: (+31) 46 4389444 Fax: (+31) 46 4370161 USA / Canada Memberships: Elektor USA P.O. Box 462228 Escondido, CA 92046 Phone: 800-269-6301 E-mail: elektor@pcspublink.com Internet: www.elektor.com/members UK / ROW Memberships: Please use London address E-mail: service@elektor.com Internet: www.elektor.com/member USA / Canada Advertising: Peter Wostrel Phone: 1.978.281.7708 E-mail: peter@smmarketing.us UK / ROW Advertising: Johan Dijk Phone: +31 6 15894245 E-mail: j.dijk@elektor.com www.elektor.com/advertising Advertising rates and terms available on request. Copyright Notice The circuits described in this magazine are for domestic and educational use only. All drawings, photographs, printed circuit board layouts, programmed integrated circuits, disks, CD-ROMs, DVDs, software carriers, and article texts published in our books and magazines (other than third-party advertisements) are copyright Elektor International Media b.v. and may not be reproduced or transmitted in any form or by any means, including photocopying, scanning and recording, in whole or in part without prior written permission from the Publisher. Such written permission must also be obtained before any part of this publication is stored in a retrieval system of any nature. Patent protection may exist in respect of circuits, devices, components etc. described in this magazine. The Publisher does not accept responsibility for failing to identify such patent(s) or other protection. The Publisher disclaims any responsibility for the safe and proper function of reader-assembled projects based upon or from schematics, descriptions or information published in or in relation with Elektor magazine. © Elektor International Media b.v. 2013 Printed in the USA Printed in the Netherlands 3-D Redefined: Electrical, Mechanical, Programming It's rewarding to see Elektor readers and con- tributors come out of the Pure Electronics closet and give due respect to the shape, appearance and user friendliness of their 'constructions'. Thanks to the 'mechanical touch' and 3-D print- ing, perfectly working electronics projects previ- ously confined to a drawer in the designer's lab can now go public and be used and enjoyed by everyone. Not built, necessarily. A properly designed case, slick appearance, compactness, light weight and a good eye for safety are the tickets to progress from nerd to esteemed prod- uct designer, even if your gizmo contains just one AVR micro and a bunch of LEDs. The UltiProp Clock prominently featured in this edition is a fine example of electronics designed to suit— even serve— a mechanical design. After all, if that propeller does not spin properly, text or numbers will fail to appear floating in the air as promised. Consequently, the two in-panel PCBs and the way the motor is constructed should be the best of both worlds in terms of electronics and mechanical design. Or should we say three worlds, as the software also interacts at the components and functionality levels? Less ambitious but certainly not less clever in terms of industrial design, is the USB Battery Tester on page 40, where the good old 25-pin sub-D connector resurfaces and determines the shape of a circuit board. Ten points for everyone shouting "Centronics" when you demonstrate the tester on a suspect battery, and 20 points if you can salvage and repurpose two of these connectors from an old "parallel printer" cable. To balance out the fair number of relatively high-tech projects in this edition, Robin Hood in electronic guise on page 56 redefines the meaning of "stealing from the rich and giving to the poor". In this case, we can't see any real losers, or a conflict for that matter, as the remaining energy in "empty" batteries fated to waste disposal actually helps to help plants grow and blossom. Enjoy reading this edition of Elektor, Jan Buiting, Editor-in-Chief The Team Editor-in-Chief: Publisher / President: Membership Managers: International Editorial Staff: Laboratory Staff: Graphic Design & Prepress: Online Manager: Market Director: Managing Director: Jan Buiting Hugo Van haecke Shannon Barraclough (USA / Canada), Raoul Morreau (UK / ROW) Harry Baggen, Eduardo Corral, Denis Meyer, Jens Nickel Thijs Beckers, Ton Giesberts, Wisse Hettinga, Luc Lemmens, Mart Schroijen, Clemens Valens, Jan Visser, Patrick Wielders Giel Dols Danielle Mertens Carlo van Nistelrooy Don Akkermans 6 December 2013 www.elektor-magazine.com Our network United Kingdom Wisse Hettinga +31 (0)46 4389428 w.hettinga@elektor.com USA Hugo Vanhaecke +1 860-875-2199 h.vanhaecke@elektor.com Germany Ferdinand te Walvaart +49 241 88 909-17 f.tewalvaart@elektor.de France Denis Meyer +31 46 4389435 d.meyer@elektor.fr Netherlands Harry Baggen +31 46 4389429 h.baggen@elektor.nl Spain Eduardo Corral +34 91 101 93 95 e.corral@elektor.es Italy Maurizio del Corso +39 2.66504755 m.delcorso@inware.it Sweden Wisse Hettinga +31 46 4389428 w.hettinga@elektor.com Brazil Joao Martins +31 46 4389444 j.martins@elektor.com Portugal Joao Martins +31 46 4389444 j.martins@elektor.com India Sunil D. Malekar +91 9833168815 ts@elektor.in Russia Nataliya Melnikova +7 (965) 395 33 36 Elektor. Russia@gmail.com Turkey Zeynep Koksal +90 532 277 48 26 zkoksal@beti.com.tr South Africa Johan Dijk +31 6 1589 4245 j.dijk@elektor.com China Cees Baay +86 21 6445 2811 CeesBaay@gmail .com VOICE 11 COIL CIRCUIT CELLAR THE WOWLOS SOURCE fO* EM6ECCCD CLECTRCAlCS f NCUNFf MFORUHIQN fifTM MUZIEK - FILM - LIFESTYLE Jechfhe future Connects you to Supporting Companies riswisi AP Circuits www.apcircuits.com Beta Layout 47 rfvdRlQlSI IntociwvtwTrtAA www.pcb-pool.com 29 Crystalfontz www.crystalfontz.com 47 Microchip DLP Design www.dlpdesign.com Eurocircuits www.eiektorpcbservice.com 46 plCO 39 f # reichelt FTDI www. ftdichip. com 3 SchaettEi/'* Intelligent Soc s.l. www.soclutions.com 31 Labcenter www.labcenter.com 84 Microchip www. microchip, com/get/eumplabx 21 Pico Technology www.picotech.com/PS238 83 Reichelt www. reichelt. com 2 Schaeffer AG www.schaeffer-ag.de 46 Not a supporting company yet? Contact Peter Wostrel (peter@smmarketing.us, Phone 1 978 281 7708, to reserve your own space in Elektor Magazine, Elektor«POST or Elektor.com www.elektor-magazine.com December 2013 7 •Community Compiled by Wisse Hettinga Elektor World Every day, every hour, every minute, at every given moment designers and enthusiasts are thinking up, tweaking, reverse-engineering and developing new electronics. Chiefly for fun, but occasionally fun turns into serious business. Elektor World connects some of these events and activities — for fun and business. Electronic Roundabout: toll US 3 flGW Story! Every year Elektor RSVP's a number of freelance authors, project developers and regular contributors around the table to discuss the latest trends and technolo- gies— in electronics of course. This year more than 50 experts joined us Hanau, near Frankfurt, Germany. In an Electronic Roundabout (three slides— three min- utes floor time) a number of authors presented their work, ideas and proposals. The only briefing they got from Elektor: we've heard enough about Arduino and Raspberry Pi— please, tell us a new story! And they did. Clouds - as we know them Giles Harrison, Professor of Atmospheric Physics in the Meteorology department of the University of Reading, UK, kicked off with his introduction to electricity in the atmosphere, including methods of measuring the tiniest currents and voltages. A deeper understanding of this, Giles told his audience, can help predict the forming of clouds and thunderstorms. His department is launching balloons with all sorts of equipment in small payload boxes, called Pandora's. His question was; can you help define and select new sensors to fill Pandora's Box? Find out more at www.met.reading.ac.uk/~swshargi/ 8 December 2013 www.elektor-magazine.com All Around the World ... Start Printing in 3D! Makers all over the world are crazy about the latest 3D printing and laser cutting. In his presentation, Miguel Sanchez, Professor at the University of Valencia and an enthusiastic builder of huge CNC equipment, shared his passion for 3D printing and CNC gear. Being a keen maker himself he challenged the audience to test the waters called 3D technology and CNC machining. Security Remember this name: Nico Maas. Sounds Dutch, but he is 100% German. This student showed us why new MCU and SOC technologies need to merge. But more impor- tantly, he stressed the need for more secure platforms— now that Arduinos are seeing increasing use in vital pro- cesses, security is becoming a necessity. And more Franz-Peter Zantis took us back to the basics of good old Visual Basic. He explained that there are large groups of peo- ple interested in straightforward stress-free solutions, something you can achieve easily with Visual Basic. And we had Bart Huyskens— the kind of teacher anyone would dream of having had in their student days. He works very hard to get students all over Belgium to choose Technology. Elbert Jan Van Veldhuizen, PhD, MSc, showed us the possibilities of a Universal PIC12F1840 mini board— a very versatile solution. The Gate Menno van der Veen is a well-known developer and author on Tube Audio equipment. Many of you will have built, bought or listened to one of his celebrated designs. Apart from Menno's love for electronics and audio he is also a fireside philosopher. He took the audience of pro- fessors and independent developers by surprise by introducing them to the deeper thinking about what motivates people, and what brings them new ideas. In his spoken parable called The Gate he challenged the audience to go a step further in making decisions and not stay in the comfort zone. Menno specifically asked to take the last turn on the Electronic Roundabout— a worthy end to a feature rich afternoon. And then there were drinks and food and more discussions till the early morning. www.elektor-magazine.com December 2013 9 Projects UltiProp Clock (1) time & date floating in the air Part 1 Electronics is never so fine as when it skillfully combines magic with physics, me- chanics with software, imagination with thoroughness and precision, and a taste for beauty with good workmanship. This timepiece was designed to display the time and date in an original way— but I admit I did also design it to draw cries of amazement from the visitors who find it in my lounge. I'll bet many of you will want to do the same in your own homes. On the Internet, with keywords like "Propeller Clock" or "mechanical sweep display", you can find a number of projects based on this prin- ciple— but not many of these get beyond the laboratory prototype stage. Here, I'm proposing not just to discover how one works, but above all I give you the key details that hopefully will enable you to successfully build your own high-quality clock, which is bound to draw admiring, envious cries of "Wow!" from your guests. It's high time you too ciple of the scanning in CRT TVs and of illuminated matrices of all types. Whatever the process, since even a fleeting image remains stamped on our retina for a few tens of milliseconds, all we have to do is refresh the display often enough to give the impression of stability or smooth movement. tor's Ulti(mate) Prop(eller) Clock. The principle of persistence of vision (POV) (Figure 1) is well known, particularly in the cinema and in the multiplexing of LED displays, where each seg- ment is in fact only lit for a frac- tion of a second. The eye doesn't discern the flickering of the points of light, which go on and off very fast; instead, it perceives a complete and relatively stable image. This is also the prin- lies in the number of points. The more there are, the more costly the hard- ware and the harder it is to control. Using a static display matrix, the cost goes through the roof as soon as we want to display more than a few pixels. Here we have a virtual circular matrix; in reality, it consists of a strip of 50 (2x25) LEDs mounted on the blades of a propeller, which as it rotates describes a display area of 3200 two- color points arranged in concentric circles. When this turns fast enough, our eyes perceive a colorful clock face! A cleverly-programmed micro- controller turns these LEDs on and off at the right moment, according to their position in the rotation, thereby displaying figures and symbols that seem to float in the air, detached from any physical support. 10 December 2013 www.elektor-magazine.com iir By David Ardouin (France) That's easy to say The idea is promising, but comes up against two electromechanical obstacles which gave me quite a headache: first, powering the LEDs on the propeller; and then the communication with the propeller microcontroller. No question of fit- ting a battery— it wouldn't last long. No question either of using slip-rings or brushes. Those would wear out quickly and be noisy. To transfer the power without contact, I chose to make use of the magic of electricity, by way of induction in a custom-built transformer. The choice of the propeller motor is crucial, as it needs to be silent, fast, easy to source every- where, and with as long a life as possible. Obvi- ously, the ordinary old carbon-brush motor won't do. Inaudible and hard-wearing, a magnificent brushless motor out of a hard disk drive would have been very tempting, but its metal body proved incompatible with the induction process. So I fell back on a computer fan motor— easy to source, reliable and quiet, sufficiently powerful, and made of plastic. There now remains the thorny question of the user interface. The control elements, their management and that of most of the func- tions are on a stationary base unit; on the propeller, I only fit the strict necessary for light- ing the LEDs. In this way, I reduce the masses involved, particularly to avoid vibration, noise, and wear. To communicate without wires between the base and propeller, I've designed an infrared link using a fixed ring of emitters, above which rotates a photo-detector fitted to the propeller. After a great deal of trial and error and several generations of prototypes, all this ended up giving the circuit, the block diagram of which is given in Figure 2. The two most important components in this project are, in the center of the diagram : transformer Trl, along with the motor M on which it is wound; Trl is what powers the propeller LEDs and their drive circuit. You won't find either of these components in either the base unit or propeller circuit diagrams, but we're going to be talking a lot about them. Magic propeller I'm going to start with the propeller, as this is doubtless the part that's intriguing you the most. The algorithm for obtaining this image that seems to float without any physical sup- port is simple. The propeller determines its own angular position thanks to a phototransistor at the end of one of its blades, illuminated at each rotation as it passes in front of an infrared LED on the fixed unit. In this way, the microcon- troller receives one short pulse every rotation. An internal counter measures the time between two pulses, i.e. the duration of a revolution. The value read is divided by 128, which corresponds to the number of 'spokes' making up the circular image. This result is then entered into a second counter, which will interrupt the running of the program 128 times per rotation. A matrix of 128 bytes, where each bit represents the state of one LED, is then scanned and the value it contains converted into a light code. So much for the theory. Simple, isn't it? Every- thing is handled in a few lines in the interrupts in such a way as to make only modest demands on the processor resources. Thanks to this constant measurement of the actual duration of a revo- lution, the display remains spectacularly stable whatever the rotational speed. In practice, it's a little bit more complicated, for three reasons. Firstly, since each column has two colors and is formed from 25 LEDs (Figure 3a), so the matrix consists of 768 bytes rather than 128. Secondly, to improve the stability of the display, the processor anticipates the duration of the current revolution by deducing the accelera- tion of the propeller by comparing the duration of the two preceding rotations. Thirdly, experi- mentation had taught me that to avoid the dis- Figure 1. Images of the clock obtained through persistence of vision (POV). www.elektor-magazine.com December 2013 11 Ten points to the circuit 1. The clock includes two ATMega 328 microcontrollers, one fitted in a fixed base unit and the other on the two- bladed propeller. 2. The propeller microcontroller drives 2 x 25 LEDs, employing persistence of vision to display a circular image made up of 3200 points. 3. The propeller is glued to the hub of a fan motor and turns with it. 4. The stator of this same motor is glued to the base unit. 5. The electrical energy is transferred without wires from the base to the propeller via a transformer with two concentric windings, wound around the motor, whose fan blades have been cut off. 6. The transformer primary (outer winding) is glued to the base. The secondary (inner winding) is glued to the motor hub. 7. The display control data are sent to the propeller microcontroller by means of an infrared signal emitted by a ring of emitters on the base, above which turns a photodiode. 8. The propeller is virtually inaudible, as it spins relatively slowly, the image obtained through persistence of vision is stable, on the one hand because the two blades take it in turns to produce the same fragment, and on the other, because the microcontroller adapts it to the actual rotational speed of the propeller. 9. Virtually all of the tasks are handled by four interrupts. 10. A single rotary encoder with push-button on the base unit is used to perform all the settings: standby, time and date setting, brightness and daytime and night- time rotational speed, language selection, and display mode selection (61 possible configurations!) play's flickering, it needed a fairly high speed; now higher speed means more noise. So I use a double refresh: each half of the propeller emits the same light signals as its counterpart, but with a delay of half a rotation, i.e. 64 spokes. The more stable display thus obtained is even more pleasant to the eye, even at a fairly low speed of the order of 1500 rpm. At this speed, the propeller is almost inaudible! The biggest task the propeller microcontroller has to handle is filling our matrix of points, the data of which are never fixed. So it has to decode the sequences received on its serial port over the infrared link and fill this dis- play table with one of the two built-in typefaces (5x7 and 6x10 pixels). It also has to handle the flipping of the characters, depending on whether they are in the top or bottom semi-circle of the disk. The microcontroller also drives the luminous power and draws the hands of the clock in ana- log mode, along with the seconds count around the perimeter (Figure 1). Figure 2. Block diagram of the clock in two PCBs— the base unit and the propeller. Between these, three essential mechanisms: the motor, the transformer, and the invisible but indispensable infrared radiation. DEBUG REMOTE IR AMBIENT LIGHT 120732 - 15 12 December 2013 www.elektor-magazine.com UltiProp Clock Figure 3a. The most visible half of the propeller circuit diagram: 50 two-color LEDs and their four drivers. www.elektor-magazine.com December 2013 13 Projects Figure 3b. The active half of the propeller circuit diagram: the power supply, the microcontroller, and the photo-detectors. UltiProp circuit The 25 LEDs per propeller blade make it possi- ble to display three lines of 8-pixel high char- acters. The last one draws the seconds display on the outer circle. I've chose red and white two-color LEDs. The MAX6957 ICs use constant current drive, so the rated working voltage of these LEDs is unimportant. So you'll be able to choose other types, with the colors you like, as long as the pin-outs are compatible. The drive ICs U1-U4 are very handy, they drive up to 28 outputs each with the help of a simple SPI (Serial Peripheral Interface) link. The current for each output can be adjusted up to 20 mA via the bus, which is perfect for controlling the overall brightness. With modern high-brightness LED's (over 100 mcd), the power is more than enough for indoor use. I chose the ATmega328 microcontroller (Fig- ure 3b) above all because it has at least 1 KB of RAM for storing the display matrix. It is clocked at 20 MHz to offer as fast as possible an SPI link, needed for refreshing the LEDs. So that the infrared link between base and propel- ler is maintained throughout the entire 360° rota- tion of the propeller, I've chosen a fast wide-an- gle photodiode (SFH2400). The FA version of this device also offers visible light filtering, which can't do any harm. Illuminated by an infrared light source, this diode delivers a current of a few microamps, which is amplified and inverted by Q3 to make the output level directly compatible with the Rx input on the USART U6. The angular position of the propeller is given by phototransistors Q1 and Q2 located at the end of each blade each time they pass in front of a fixed LED. The propeller supply voltage is taken from the secondary of transformer Trl (we'll come back to this later) via Jl, rectified by the four diode D52, D53, D68, and D69, and filtered by L2 and Cl 1 . Off load, the voltage here is of the order of 15 V, dropped to 5 V by U5 and its associated components. Before leaving the propeller to describe the base unit circuit, just a little more about the... UltiProp software The functioning of the software becomes simple once you have grasped the principle of the float- ing display. After a phase of initialization of the peripherals (internal and SPI), the code goes into wait. Everything is handled by four interrupts. When a serial sequence is received, the software stores the bytes received, decodes them, and 14 December 2013 www.elektor-magazine.com UltiProp Clock +5VB VSLY5850 ? — 4 — +5VB © C27 lOOn +5VB -© 32 10 11 J3 +VCC MOSI GND o o o o- o o 29 1 MISO 3 SCK 5 RESET 16 17 19 ISP 6 18 20 "^C21 ^00n VCC VCC AVCC AREF PDO PD1 PD2 PD3 PD4 PD5 PD6 PD7 PC6 PB4 PB5 ADCS GND GND PBS U10 ATmega328-AU PB7 PCO PCI PC2 PC3 PC4 PC5 PBO PB1 PB2 PB3 ADC7 GND 3 5 1 Y2 8 t ( h I C41 C40 ■ 20MHz" 33p 33p TT 23 24 25 26 27 28 12 13 14 15 22 21 r -o DC C33 47u 25V C34 lOOn C28 1u C29 1u BOURNS-PEC11- 4xxxx ■ Sxxxx SI -O i C35 1 u ROTARY ENCODER B +5VB 16 15 R35 C30 II lOn IN BOOST U9 sw SYNC LM2670S-ADJ ON/OFF FB GND PAD 8 L5 ywY\ 33uH 3A5 +9VB © D66 l R33 R34 I C31 lOOu 16V D64 BAT54 R25 V( :c SCL Int/sqw SDA 32KHZ U12 RST VBAT DS3231S NC NC NC NC NC NC NC NC GND 13 C32 1 0Ou 16V 14 10 11 12 +5VB R29 J13 " — I | C2 I d> TSOP6238 +5VB 0 R41 LDR I R30 C25 lOOn C36 0F1 GOLDCAP MBRS140LT3G Cl 8 1u 50V C19 1u 50V VIN CB FB U8 LM22674MR-5.0 ON/OFF VSW GND PGND Cl 6 lOn L3 D63 68uH 0A84 T 1 +5VB -© D54...D62 = SFH421-Z +5VB R22 Cl 7 22u 16V MBRS140LT3G I R17 +9VB -© BC847A +9VB © [77 | C4 2 HlOOn ± R20 6 VDD U14 INA OUTA INB OUTB TC4427ACOA GND R23 T_X TRANSFO SMBJ48A BC847A +9VB © lOOn B R24 L4 r~r C22 |c; 1 C23 lOOn /WY> L. ImH 0A12 INA VDD U11 OUTA INB TC4427ACOA GND OUTB I- 5 D72 BAT 54 C43 1u 50V i J6 MOT IRLML0060 120732 - 11 Figure 4. Base unit circuit diagram. The motor and transformer are shown only in Figure 2. www.elektor-magazine.com December 2013 15 Listing 1 - Protocol for communication between base unit and propeller Command : [DISPLAY_TYPE] : 0x00 Data : [ANA/NUM , DATEEN, TEMPEN, MDC0L , MDEN , SECCOL, SECRNG1 , SECRNGO] : - ANANUM Display format [0: Analog, 1: Numeric] - DATEEN Display date [0: Disabled, 1: Enabled] - TEMPEN Display temperature [0: Disabled, 1: Enabled] - MDCOL Minutes dots color [0: Color 1, 1: Color 2] - MDEN Display minutes dots [0: Disabled, 1: Enabled] - SECCOL Seconds ring color [0: Color 1, 1: Color 2] - SECRNG Seconds ring type [00: Disabled, 01: Elapsed Seconds, 10: Full ring, 11: Fixed ring] Command : [LUM_P0WER] 0x01 Data : [UNUSED, UNUSED, UNUSED, UNUSED, LUMPWR3 , LUMPWR2 , LUMPWR1, LUMPWR0] - UNUSED Unused [0000] - LUMPWR Luminous Intensity [0000: Minimum to 1111: Full power] Command : [TIME] 0x02 Data : [HMCOL , UNUSED, UNUSED, H0URS4 , H0URS3 , H0URS2 , H0URS1, HOURS©] - HMCOL Hands color (Analog mode), Hours text color (numeric mode) [0: Color 1, 1: Color 2] - UNUSED Unused [00] - HOURS Current hour [0x00 to 0x17] [UNUSED, UNUSED, MINUT5 , MINUT4 , MINUT3 , MINUT2 , MINUT1, MINUTO] - UNUSED Unused [00] - MINUT Current minute [0x00 to 0x3B] [UNUSED, UNUSED, SEC0N5 , SEC0N4 , SEC0N3 , SEC0N2 , SEC0N1, SECON0] - UNUSED Unused [00] - SECON Current second [0x00 to 0x3B] Command : [DATE] 0x03 Data : [DATCOL, UNUSED, LANG1 , LANGO, M0NTH3 , M0NTH2 , M0NTH1 , MONTH©] - DATCOL Date text color [0: Color 1, 1: Color 2] - UNUSED Unused [0] - LANG Display language [00: Eng, 01: Fr, 10: Ger, 11: Undefined] - MONTH Current month [0x00 to OxOB] [DAYWK2 , DAYWK1 , DAYWKO , DATE4 , DATE3 , DATE2 , DATE1 , DATE©] - DAYWK Day of week [000: Monday to 110:Sunday] - DATE Current date [0x00 to OxlE] Command : [TEMPERATURE] : 0x04 Data : [TEMPCOL , UNUSED, TEMP6 , TEMP5 , TEMP4 , TEMP3 , TEMP2 , TEMPI] - TEMPCOL Temperature text color [0: Color 1, 1: Color 2] - UNUSED Unused [0] - TEMP : Integer portion of temperature [TEMPFRAC1 , TEMPFRACO, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED] - TEMPFRAC Fractional portion of temperature - UNUSED Unused [000000] Command : [DISPLAY_TEXT] : 0x05 Data : [TXTCOL, TXTCLR , TXTSIZE, UNUSED, UNUSED, UNUSED, SECT1, SECT©] - TXTCOL Text color [0: Color 1, 1: Color 2] - TXTCLR Clear sector prior to write new data [0: Keep previous text, 1: Clear then write] - TXTSIZE Text font [0: F0NT_6x7, 1: F0NT_8xl6] - UNUSED Unused [000] - SECT Sector number [0x00 to 0x03] [UNUSED, TXT 6 , TXT5 , TXT4 , TXT3 , TXT2 , TXT1, TXTO] - UNUSED Unused [0] - TXT ASCII Character to display[0x30 to 0x3A, 0x41 to 0x5A, 0x61 to 0x7A] [TXT] - Max 10 ASCII Characters in F0NT_6x7 or 8 chars in F0NT_8xl6 Command : [TEST_FRAME] : 0x06 No Data Command : [CHRISTMAS_TREE] : 0x07 Data : [UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, UNUSED, TREEEN] - UNUSED Unused [0000000] - TREEEN Christmas Tree [0: Disabled, 1: Enabled] 16 December 2013 www.elektor-magazine.com UltiProp Clock performs the corresponding actions (filling the matrix with new values, updating the time, or driving the overall LED current). During an exter- nal interrupt triggered via Q1 or Q2, the value in counter 1 is read— this corresponds to the dura- tion of a revolution. Divided by 128, this value is injected into counter 0 and the display pointer is reinitialized. If the counter reaches maximum without having been reset, the rotational speed is too low, and so the drive to the LEDs is disabled. Otherwise, during the periodic interrupt triggered by counter 0 (hence 128 times per revolution) the display matrix pointer is incremented, and the corresponding value is sent to the LED drive circuits. If the time is being displayed in ana- log mode, the software also handles the lighting up of the hands and the seconds count at this instant (see Listing 2 with the pseudo-code for the propeller). Powering The fundamental function of the base unit (Fig- ure 4) is to provide the power to the propeller. The custom-wound transformer around the motor hub is concentric with the axis of rotation. The primary, wound on the outside, is fixed to the base and so doesn't move. The secondary, with a slightly smaller diameter, is positioned in the center of the primary, around the motor, and so turns with the propeller. The alternating voltage applied to the primary of this transformer via U14, Q5, and Q6 induces a magnetic flux coaxial with the axis of rotation, which in turn induces an alternating voltage in the secondary. This trans- former is wired in a push-pull configuration: the primary is divided into two halves, driven by Q5 and Q6, themselves driven alternately by a squarewave at a frequency of 50 kHz from counter 0 and outputs OCOA and OCOB of the microcontroller. Thanks to the transformer ratio of 1.73, we recover on the secondary a square- wave voltage between -15 and +15 V, rectified, smoothed, and regulated down to 5 V. The damp- ing circuit R39 and C37, helped by 'transzorb' diodes (a sort of very fast zener diode) D70 and D71, limits voltage transients at the transistor terminals during switching. In order to guarantee clean switching on, the driver U14 provides the transistors with a current significantly higher than that of a simple microcontroller output. Inserted between the sources and ground, resistor R40 offers a point for examining an image of the cur- rent (Figure 5), whose triangular shape you will Frit Vitwr Chfnnel Trigger Cuw Mtiwc Diipfiy Acquire Utility Hfllp 3 a j Ct ti I R fci 4 an » [V m | m m Hsnzcnr* a 7 f!4,V •-T* - CiV iccjs t Format vr'KJ •f Chi ICG . * J -Hi ■ 10 Tftacir ^ ncair Ms> 7) —1) ; //reset and enable timer 1 MCU_EnableTimerl() ; //Update display variable MCU_UpdateColumn ( ) ; //Update LED status LED_Update ( ) ; } //Interrupt called 128 times per revolution #pragma vector = TIMER0_COMPA_vect interrupt void MCU_ColumnInter rupt (voi d) { //Increment index u8_columnIndexHand0++; //Update display variable MCU_UpdateColumn ( ) ; //Update LED status LED_Update ( ) ; } //This function updates display bytes from display matrix void MCU_UpdateColumn (voi d) { //Update display variable for hand 0 g_currentColumn . hand0OuterWhi te = g_u8_di splayOuterWhi te [u8_columnIndexHand0] ; g_currentColumn . handOOuterRed = g_u8_di splayOuterRed [u8_columnIndexHand0] ; g_currentColumn . hand0Mi ddleWhi te = g_u8_di splayMi ddleWhi te [u8_columnIndexHand0] ; g_currentColumn . hand0Mi ddleRed = g_u8_di splayMi ddleRed [u8_columnIndexHand0] ; g_currentColumn . hand0InnerWhi te = g_u8_di splaylnnerWhi te [u8_columnIndexHandO] ; g_currentColumn . handOInnerRed = g_u8_di splaylnnerRed [u8_columnIndexHand0] ; 18 December 2013 www.elektor-magazine.com UltiProp Clock position of the transistor; referenced to ground in this way makes it easier to drive. However, the output is no longer directly at the negative voltage— but that's no problem for us in this par- ticular instance. The propeller communicates Now it turns, all that's left to do is to trans- mit— without wires, of course— the information to be displayed to the propeller. The rotating part includes a photodiode to receive infrared signals, which sees a ring of nine wide emission angle infrared LEDs D54-D62, mounted on the base unit. These LEDs are all powered together and modulated simply according to the level present on the ATmega's UART output. Q7 takes care of supplying the current needed to light them. Due to the inversion by Q4, the quiescent logic high on the Tx pin corresponds to the unlit state of the LEDs. The choice of fast diodes for emitting and receiving means we can ensure a data rate of 19,200 baud. At this speed the reliability of the communication is impressive. Packetizing of the data transmitted offers better immunity to any brief interruptions to the com- munication channel. Each sequence starts with the ASCII code Data Link Escape DLE (0x10), followed by the STX Start of Text byte (0x02). Then come a maximum of 66 useful bytes. The packet sequence ends with another DLE byte followed by an ETX End of Text (0x03). Now it is possible that an 0x10 byte might occur within the useful data being transmitted. In order to avoid its being mistaken for the DLE code, the byte will be automatically sent twice and treated in paral- lel upon reception. Thus sequences of any length can be transmitted; the receiver sorts them out and only keeps complete sequences (Figure 6). The communication protocol for these bytes is specific to the propeller. The complete list of the commands available is given in Listing 1. Each sequence transmitted starts with the pair DLE/STX, then continues with a command byte between 0 and 5. The bytes following are the parameters for the command, whose length can vary. Lastly, the pair DLE/ETX ends the sequence and triggers processing of the data received. For displaying text, the display zone is divided into four sectors (Figure 7). Up to ten alphanu- meric characters can be displayed in each zone in the smallest type size. A second set of char- acters, slightly larger, gives a maximum of eight symbols. In this case, only sectors zero and one DLE STX 'A' 'B' 'C 'D' y E' DLE ETX 0x10 0x02 0x41 0x42 0x43 0x44 0x45 0x10 0x03 are available. The software automatically handles Figure 6. the rotation of the bytes forming each symbol Example of packetizing of a displayed, in which each bit corresponds to the sequence "ABCDE". lighting of a LED. Specifically, bit 0 corresponds to the upper symbol edge. When in the upper edge, there is no rotation of the bytes, and bit 0 (i.e. top edge of symbols) is on the exterior circle. By contrast, in the lower semicircle the rotation is required to place bit 0 (i.e. top edge of symbols) on the inner circle. Microcontroller and peripherals Just like for the propeller, the base unit microcon- troller is an ATmega328. Two thirds of its 32 kB program memory are free (for future applica- tions...). In order to adjust the display brightness, the ambient light level is sensed by LDR R41. The infrared LED D65 is a narrow-angle type, as it is used as a position detector for the propeller. Turning this LED off immediately disables the propeller display. SI is a rotary encoder with built-in push-button which handles the whole man/machine interface, including the configu- ration menu and the adjustments to the settings. D67 is a simple orange LED used for perfecting the program. You can leave it out if its flashing every second bothers you. The Maxim DS3232 real time clock (U12) calcu- lates the time and date, with a maximum drift of 2 ppm, or around a mere 30 seconds a year, Figure 7. Display sectors. www.elektor-magazine.com December 2013 19 Projects Figure 8. thanks to the thermal compensation of its built-in State machine for base unit oscillator. In the absence of power, the internal software. counter will carry on running for several days thanks to the power supplied by the super-ca- pacitor C36. When you turn the clock back on, it will have kept time. The base unit power supply is in two parts, a 5 V one of just a few milliamps for the logic part, and a second more powerful 9 V one for powering the transformer, motor, and infrared LEDs. This power section can be shut down to save power consumption in standby. Apple MP3 players [3]. With its simple six-key interface, it is ideal for controlling our clock. On this transmitter, the data are sent under the NEC protocol, which defines a '0' bit by the transmis- sion of a burst @ 38 kHz for 562 ps followed by a blank of the same duration. The logic '1' is coded using the same transmission time, followed by a triple-length blank, i.e. 1.62 ms. Each press on one of the keys causes four bytes to be sent, the first two of which identify the remote-con- trol, while the last two indicate the key pressed. Base unit software The state machine in Figure 8 gives an idea of the overall operation of the base unit software. Using counters 0 and 2 to produce the power control signals and with counter 1 dedicated to decoding the remote-control sequences, I found myself short of clocks for timing the program. So to control an interrupt input, I used the 1.024 kHz signal from U12. With each second that passes, the real time clock is read and its value sent to the propeller. The system takes advantage of this to check the ambient light level (weighted over five measurements) and adjust the display brightness if necessary. The rotary encoder is also handled via an interrupt, not without a software de-bounce filter. Tempus fugit (time flies) The moment has come to hit Pause. I hope I've whetted your appetite and invite you to join me again in the next issue of Elektor, where I'll be talking about building my UltiProp Clock. To lessen the frustration this tempus interruptus may cause you, the PCB designs for the project are released with this installment. I am also planning to put a selection of the available documentation on the article's page on the Elektor website [1, 2], I'm sure you can wait a few weeks— I've been per- fecting this project for over six years! ( 120732 ) Remote control To add a little more magic to the operation of this clock, I've grafted on an infrared remote-control receiver (U13) which talks to the microcontrol- ler via its Input Capture function. This receiver includes a demodulator for 38 kHz signals at a wavelength of 950 nm, but other types are avail- able, so you can choose them to suit the transmit- ter you want to use. In my own case, I've used a nice white control originally intended to control Internet Links [1] 120732 - Propeller Clock - Montage.pdf [2] Downloadable software, including ATmega source code: www.elektor.com/120732 [3] Remote-control for Apple Universal Dock: http://store.apple.com/us/product/ MC746LL/A/apple-universal-dock?fnode=72 20 December 2013 www.elektor-magazine.com One platform for 8-, 16- and 32-bit development - with Microchip's MPLAB® X IDE tnvlrourn^nf 8 bit PIC* I Microcontrollers 128 K Flash 16 IVIIPS 250+ Options f l 16-bit PIC® Microcontrollers & dsPIC 0 Digital Signal Controllers 25SK Rash 70 MIPS 150+ Options f 32-bit PIC® Microcontrollers 512K Flash 1.5 DMIPS/MHz 80 MHz 500+ CO** 1 * A *= Sc '! IRII"! ► Integrated Development Environment Open-Source Cross-Platform Universal L MPLAB® X IDE is the free, integrated toolset for all of Microchip's 900+ 8-, 16- and 32-bit PIC® Microcontrollers, dsPIC® Digital Signal Controllers, and memory devices. Based on the open-source NetBeans platform, MPLAB X runs on Windows® OS,MAC® OS and Linux, supports many third-party tools, and is compatible with many NetBeans plug-ins. MPLAB XC compilers help increase code speed of any PIC® Microcontroller or dsPIC® digital signal controller by 30%, whilst also cutting code size by 35%. These new compilers give designers the choice of Free, Standard or Pro code optimisation levels for 8-bit, 16- or 32-bit development, or a single C compiler suite to support all Microchip Microcontrollers and digital signal controllers. Microchip's tool chain of compatible compilers and debugger/programmers operate seamlessly within the universal, cross platform open-source MPLAB® X integrated development environment, reducing both learning curves and tool investments. START DEVELOPING TODAY Download a free copy of MPLAB X and choose from a choice of new C compilers: ■ MPLAB XC8 for 8-bit MCUs ■ MPLAB XC16for 16-bit MCUs and DSCs ■ MPLAB XC32 for 32-bit MCUs ■ MPLAB XC Suite for all 900+ PIC MCUs and dsPIC DSCs. Evaluate MPLAB X today! www.microchip.com/get/eumplabx Microchip Microcontrollers • Digital Signal Controllers • Analog • Memory • Wireless The Microchip name and logo, PIC, dsPIC, and MPLAB are registered trademarks of Microchip Technology Inc. in the USA and other countries. All other trademarks mentioned herein are the property of their respective companies. © 2012, MicrochipTechnology Incorporated. All Rights Reserved. ME1020Eng/04.12 Projects Multi I/O for FPGA Development Board (1) Add a display, sensors, GPS, pushbuttons, LEDs and more By Andreas MokroB, Dominik Riepl, Christian Winkler and Professor Thomas Fuhrmann (Germany) Back in December 2012 in an article titled Taming the Beast' we introduced you to our FPGA development board. The board offers speed and convenience to the task of integrating a programmable logic chip into a project design. It already has a host of intercon- nect possibilities but, up till now, no integrated peripherals. Enter the expansion board... The FPGA development board is a useful tool for both professional and amateur use. Its practical layout makes it easy to incorporate into a design or to use as a teaching aid for University students. As part of a student project at the Ostbayeri- sche Technische Hochschule (OTH) Regensburg in Germany an expansion board was developed containing a host of peripheral devices. Now the FPGA development board has sensors to talk to and we can interface with them using VHDL. The board concept Figure 1 shows the expansion board block dia- gram. Peripheral components all connect to the FPGA. The simpler peripherals such as pushbut- tons and the rotary encoder connect directly to FPGA I/O pins and require no specialized protocol to communicate. The LCD, GPS-module and A/D converter all transfer data and commands using a digital serial interface following their own pro- tocol. Seven unused pins from the FPGA devel- opment board are available at a connector for general I/O use. The sensors with analog output signals are con- nected to the eight multiplexed inputs of an A/D converter. An RGB color sensor uses three inputs; one for red, one for green and one for blue. Another two inputs are used by a pressure sen- sor and a temperature sensor. The remaining three unassigned analog inputs are taken to a connector to allow the measurement of external analog signals. Note: we use both the FPGA chip pin numbers and the Elektor FPGA board pin numbers in this text. Expansion Board + FPGA Development Board The circuit diagram of the expansion board with- out the power adapter is shown Figure 2. The FPGA development board connects to the expan- sion board using two strips of socket headers. Connections on the expansion board have been grouped together along these strips according to the peripherals in order to simplify the lay- out and make debugging easier. The first part of the labels used to describe each signal refers to the module or component name. Next is the description of its function followed by a number. Digital I/Os Unused I/O pins from the FPGA development board are available at the 10-way pinheader JP4. Features • GPS receiver • Temperature sensor • Pressure sensor • RGB color sensor • 2 x 16 character LCD • 4 Pushbuttons • 4 LEDs • Rotary encoder • 7 external digital expansion pins • 3 external analog inputs 22 December 2013 www.elektor-magazine.com FPGA Expansion Board The header also provides connection to 5 V at pin 1, 3.3 V at pin 2 and ground at pin 10. The FPGA pins 48, 49, 53, 54, 57, 58 and 60 available at this connector are not provided with any form of protective circuit so be careful during experimentation when applying a voltage to any of these pins. The maximum input voltage range allowed on the I/O pins is 0.5 V above the FPGA's supply voltage and ±0.5 V. The pins are also not protected against ESD so ensure that the board is used and stored in an electrostatically neutral environment. The basic input and output options using LEDs, pushbuttons, rotary encoders are integrated into the expansion board design. Using the hard- ware description language VHDL it is relatively simple job to interface with them and test their operation. LEDs The board contains four (LED5 to LED8) general purpose green LEDs which can be controlled via VHDL from the FPGA. They use standard thru- hole leads with the anodes connected to 3.3 V supply via 180 Q resistors and their cathodes to the FPGA output pins. The resistor value chosen gives a current of approximately 5 mA through the LEDs. They are bright and visible but not dazzling. 130148 - 11 / \ 3 Analog Inputs v > Figure 1. The block diagram. www.elektor-magazine.com December 2013 23 Projects Figure 2. The circuit diagram. The LEDs are connected so that they light when the corresponding FPGA output is Low (logic 'O') i.e. they are 'active-Low'. A High output from the FPGA pin turns the LED off. They connect to pins 14, 15, 16 and 44 of the FPGA board which corresponds to pins 24, 61, 62 and 65 of the FPGA chips. Pushbuttons and rotary encoder Four pushbuttons are provided for manual input. They are positioned beneath the LCD so they can be easily associated with displayed menu options and can be used without obscuring the LCD with your hand. The pushbutton and rotary encoder inputs have 10 kQ. pull down resistors fitted. The input signal state from these switches will therefore be logic '0' if the buttons are not pressed and '1' when pressed. The four push- buttons connect to pins 13, 15, 16 and 17 on the FPGA. The rotary encoder S6 gives 24 pulses per revo- lution. Its two outputs provide a 2-bit incremental Gray-code signal connected to pins 18 and 23 of the FPGA. The rotary shaft also functions as a pushbutton switch. Pressing the shaft puts a logic ' 1 ' on input pin 22 of the FPGA. +5V +5V 12 TP1 1 0 n TP2 12Vmax D1 1N5817 VIN VSW ss LM2672N SYNC ' 5, ° F ON/OFF GND 1N5817 CATH +3V3 KPS-5130PD7C | COLOR R11 R12 PRESSURE 20 VREF VCC IC4 NEB21R TP4 V+ C5 C7 lOn ADC0838CCN AGND COM DGND 11 GND ( GND < Cl 330u 16V LED1 R5 TP5 1N5817 LED2 +3V3 TP3 13 ADC_SE 14 ADC Do' MODI 720099 - 91 IC2 MCP1825S-33EAB 1 5 ADC SARS n 16 ADC.CLK' FPGA_3V3 1 17 ADC Dl — 18 ADC CS AVR RESET_ GND i 10 R9 TEMPERATURE K5 1 HEADER3 3 Y HEADERS 5 Y HEADER7 7 Y HEADER9 9 O O O O O O O O HEADER4 HEADER!^ _8 HEADER8' 10 PROTOTYPE AREA +3V3 ^HEADERS 8 -o 'HEADER? 9 ^HEADERS 1 0 'HEADERS 1 1 ''hEADERA 1 2 ^HEADERS 1 3 ^LED5 14 ^LED6 1 5 ^LED7 1 6 ■vy r\ ^ADC_CS 17 ^ADC_DI 18 ^ADC_CLK 19 ^ADC_SARS 20 ^ADC_D0 21 ^ADC_SE 22 -vy r\ ^GPS_0N/0FF 23 ^GPS_TX 24 'GPS RX 25 y ■o O O O O O O O-- si N R13 2 1 , JP3 R15 I 10k GPS RESET 10 VCC3.3V RST |C3 RXO BOOTSEL TXO EXT/INT ON/OFF WAKEUP I2C-DI0 VOUT I2C-CLK TM-GPI05 GPI06 GPI04 GPI07 NC GPI09 NC NC NC GND GND GND A2035-H GND GND GND GND GND GND 6 0 > JP1 C4 lOu 10V LED3 43 ENC_B 21 GPS_RX O 42 ENC„BUT^ 41 ENC_A ^ 40 SW5 ^ 39 SW4 ^ 38 SW3 ' 37 SW2 ^ 36 LCD_DB7^ D 35LCD_DB6^ 34LCD_DB5^ 33 LCD_DB4 ' v-r 32 LCD_DB3^ 31 LCD_DB2^ { > > oz et Ot-CMC*3^1/3CDC~ mmmmrnmmm OOQOOOOO JP2 +3V3 +5V ©— ^ Q CH R16 LED4 "iBSSffiSffiS] 1 2 I3 4 5 6 7 8 9 10 11 12 13 141516 1 PPS BC547 rvr m m m m ppi rn m LED8 Z 4 l K3 < > -C > < > < > FTDI 13D148 ■ 24 December 2013 www.elektor-magazine.com FPGA Expansion Board Display During the concept phase of the expansion board's development we looked at the pros and cons of the different types of display available. For simplicity and cost we settled on the rela- tively basic black/white text display rather than a more complex graphic display. The controller built into this type of display also stores the dis- played characters so it's only necessary to send character codes to the display. Based on these criteria the project group chose the standard monochrome alphanumeric display consisting of two lines of 16 characters which has an on-board controller compatible with the Hitachi HD44780. It doesn't require any complex control protocol and works directly with ASCII character codes. The display is positioned below the FPGA devel- opment board just above the row of input push- buttons. This gives the possibility of displaying characters or symbols directly above the push- button they refer to. The display plugs in to the expansion board and can be easily removed or swapped as necessary. The display connects directly to pins on the FPGA: Register Select (RS) connects to pin 94 of the FPGA. Enable (EN) connects to pin 95 of the FPGA. The 8-bit data bus connects to pins 2 to 5 and 9 to 12 of the FPGA. The LCD specified here doesn't have a back- light. You can use a compatible display with a backlight, it this case it will be necessary to fit resistor R28 and a short length of wire. The short wire jumper connects +3.3 V from K4 to either pin 15 or 16 via resistor R28. Whichever pin is used (depending on the backlight LED polarity); the remaining pin (pin 16 or 15 on K4) must be connected to ground with a wire link to complete the backlight circuit. The A/D converter The sensors fitted to the expansion board can be used to measure environmental variables. They have analog output signals which require con- version to digital values before they can be used by the FPGA. IC4 is a Texas Instruments AD0838CCN A/D con- verter. This device is packaged in a DIP20 out- line and has a serial data output, providing dig- ital measurements with an 8-bit resolution. The conversion process uses successive approxima- tion. Each bit from the successive approximation comparator appears at the output irrespective of the selection control SE. After eight clocks the conversion is complete. Depending on the status of the control input SE the value will be output again, this time LSB first, at Data Out. Conversion time is 32 ps/S, which gives a maxi- mum sampling rate of 32 kS/s. The IC is powered from the 5 V supply and has eight analog inputs which can be used to measure single-ended inputs referenced to ground or in pairs as differential inputs. A configuration command is sent to the converter to start conversion. The digital value is then sent as a serial data stream to the FPGA synchronized to the clock generated by the FPGA. The clock signal comes from pin 68 of the FPGA and must have a value between 10 kHz und 400 kHz. Each rising clock edge is used to read the serial control data to the controller. The con- verter uses each falling edge of the clock to out- put the next data bit. The FPGA uses the rising clock edge to read the value of this new bit. A/D converter connections to the FPGA: • Chip Select: FPGA-Pin 66. • Data In: FPGA-Pin 67. • SAR STATUS: FPGA-Pin 70. • SE: FPGA-Pin 83. • Data Out: FPGA-Pin 71. Pressure sensor IC6 is an atmospheric pressure sensor type MPX4115A from Freescale Semiconductor. It is powered from 5 V and produces an output volt- age dependant of air pressure in the range of approximately 0.25 V to 4.75 V at room tempera- ture (25 °C). As pressure increases the output voltage increases and the A/D converter digitizes this value and supplies it to the FPGA. An output level of 0.25 V corresponds to an air pressure of <15 kPa while 4.75 V >115 kPa. The output voltage can be described using the transfer function: \/ out = ^in x (0-009 x P - 0.095) ± (Error x Tem- perature factor x 0.009 x \/ jn ) where V m = 5 V ±0.25 V; P = Pressure in kilopascal; Error = ±1.5 kPa www.elektor-magazine.com December 2013 25 Projects RGB Sensor The RGB sensor type KPS-5130PD7C from King- bright (IC5) is useful for measuring the bright- ness and sensing color. It uses three photo diodes with integrated red, green and blue color filters. In operation the photo diodes are reverse biased. The so-called photo effect causes light (photons) incident on the PN junction to liberate free charge carriers which produce a current. The dark cur- rent of the photodiodes is very low. The reverse current increases in proportion to the level of illu- mination. The resulting current passes through a resistor to ground. The voltage produced across the resistor can then be measured by the A/D converter. The output voltage characteristic approximates very closely to a proportional relationship with illumination level. Using the voltage output val- ues obtained from the three photodiodes it is now possible to calculate the illumination color. Sensitivity of the photodiode is to some extent A GPS problem We bought two GPS modules for the prototype we built here in the Elektor lab. The first module worked straight out of the box but the second one didn't. We resorted to the manual where it pointed out twice the importance of ensuring that the module completes a clean shut down sequence whilst still powered otherwise there is a risk of Flash contents corruption. The question was now whether this had been overlooked in our module. Using a scope it was possible to see a brief serial data stream on the GPS_TX output from the GPS module when it powered up. To view the data we hooked up a USB/serial adapter cable to a PC (Figure 3) and ran Tera Term, a terminal emulator program. After a module reset we read the NEMA data string "$PSRF150,1*3E" and then nothing. Looking in the support area of Maestro web site we checked the knowledge base to find a short article acknowledging the problem. Apparently it has been known to occur in a few y rare cases'. Our (admittedly small) sample yields a probability of this fault occurring as 1 in 2! Not exactly rare. The web site also has the SiRFFIash tool which needs installing, and the update y GSD4e_4.1.2-P5Maestro.s' for our module. You can connect the module directly to the PC or use the expansion board update feature (fit jumper to JP3 and connect an FTDI cable to the odd-numbered pins of K3; remove jumper JP2, see Figure 2). With the tool installed, follow the instructions outlined in the .pdf installation guide at the site. In our case the fix was successful. Bug: http ://support.maestro-wireless. com/knowledgebase. php?article= 6 Reprogramming: http://support.maestro-wireless.com/knowledgebase. php?article=13 dependant on its output load resistance. The larger its value, the higher will be the voltage measured at a given light level. The diodes can be driven into saturation even at low levels of illumination. The sensitivity of each of the three photodiodes to filtered light is not identical. This is partly due to the light sensitivity/color response of the semiconductor material and also the filter properties. According to the data sheet: • Red: 0.33 A/W • Green: 0.25 A/W • Blue: 0.18 A/W Because of the different sensitivity of the pho- todiodes and the range of ambient light levels in different situations it may be necessary to change the value of the load resistors. The result of practical investigation in the lab yielded the following resistor values: R12 = 390 k Q (red), Rll = 510 kft (green) and RIO = 820 k Q (blue). Temperature sensor A standard NTC thermistor is used as a tempera- ture sensor. Thermistors are available with differ- ent resistance ranges and have a high resistance gradient with respect to temperature change. Together with resistor R9 the thermistor forms a voltage divider network. The resulting voltage level is read by the A/D converter. The voltage measured across R9 is around 1 V at 0 °C and 3.75 V at 50 °C. Analog expansion pins Three inputs to the A/D converters are not used by any of the sensors. They are brought out from the board together with +5 V, +3.3 V supply and ground on connector K2. You can connect the outputs of additional analog sensors here or measure a voltage level. The digital value of the signal can then be used by the FPGA. GPS The GPS receiver module type A2035-H is from Maestro Wireless Solutions. It is based on the A2100-A GPS receiver with a built-in ceramic GPS patch antenna, so that no additional com- ponents are required. The receiver uses 48 par- allel channels to evaluate the satellite data with high sensitivity. Working under ideal conditions it can resolve its position to within 2.5 m (8 feet). The GPS uses a serial UART interface to send positional data using the standard NMEA 0183 26 December 2013 www.elektor-magazine.com FPGA Expansion Board format. Altogether it uses just three connections to the FPGA board to send its data. With the sig- nal GPS_ON/OFF (FPGA pin 84) the FPGA can switch the GPS receiver on or off. It is important to power down the GPS module in the correct sequence; it should be turned off using GPS_ON/ OFF while it still has power. Failure to do so may result in corrupted flash memory contents. Pin RXO of the GPS module receives serial data from the FPGA (pin 86). Control data is sent to the GPS module over this path. The module is already configured so does not need any additional con- figuration commands. At switch on the module communication parameters default to 4800 Bd, 8 data bits, no parity and one stop bit. Serial output TXO from the GPS module connects to pin 85 of the FPGA. This output interface can config- ured as either a UART or SPI. A 10 kQ. resistor between GPI06 (pin 7 of the GPS module) and Vout (Pin 5) selects UART mode. h: ON/OFF Cl lOOn 10 +3V3 -© IC1 CLR B Q IC1.B A Q RCext Cext C2 ■OH 4u7 10V 12 REPROGRAM S2 M RESET VCC3.3V RST IC3 RXO BOOTSEL TXO EXT/INT ON/OFF WAKEUP I2C-DIO VOUT I2C-CLK TM-GPI05 GPI06 GPI04 GPI07 NC GPI09 NC NC NC GND GND gnd A2035-H gnd GND GND GND GND GND 6 : 74HC123N +3V3 0 ■*- 0 IC1 0 CLR B Q IC1.A A Q RCext Cext 15 13 14 +3V3 0 MODI GPS_RX GPS_TX +5V VCIO CBUS4 - - +3V3 CBUS3 - CBUS2 - TXD CBUS1 - RXD CBUSO - BOB-FT232R - CTS RESET - - r? DCD - - RTS DSR - DTR - GND LED1 JP1 in position 3V3 . 1 PPS BC547 130148 - 13 Figure 3. Hook up the PC and GPS module to update firmware. Pin 15 (TM_GPI05) of the module outputs a signal of one pulse per second (1 p/s) when it is receiv- ing signals from a sufficient number of satellites to enable a positional fix. There is insufficient drive current from this pin to directly light an LED so a transistor driver stage (Tl) is incorporated. Connector K3 can be used to connect another GPS module or if you need a real serial port con- nection. K3 is compatible with the standard FTDI cable connector layout. The odd pins 7 and 9 are looped around to the even pins 10 and 8. Plug- ging in to the strip of odd-numbered pins gives you a 'straight through 7 connection. Plugging in to the even numbered strip swaps the RX and TX signals. This is useful fortesting the GPS module using a PC or if you need to update its firmware. For the last case don't forget to fit jumper JP3. Jumper JP2 gives the option to power an external GPS module connected at K3 from 5 V or 3.3 V. Don't use K3 to supply power for the board. Remove the jumper on JP2 before connecting an FTDI here. Power to the Boards The expansion board needs both a 5 V and 3.3 V supply. The FPGA board, A/D converter and ana- log sensors are all powered from 5 V while the display, pushbuttons, LEDs and GPS receiver need 3.3 V. Each of the two rails requires around 100 mA. Power for the boards can be supplied by a mains power adapter with an output between 7 and 12 V. The adapter cable plugs into socket Kl, note that the centre pin of this connector is 0 V and the outer shell positive. The Schottky diode D1 protects the circuit from accidental supply voltage reversal. Linear regulators are less efficient than switch- mode regulators, if we used a linear regulator here in place of IC1 to produce 5 V from a 12 V input it would dissipate around 1.6 W (ignoring current drawn by any additional circuitry con- nected to the expansion pins). Without a heatsink this would lead to unacceptable temperature rise of the limited PCB area and surrounding compo- nents and ultimately impact system reliability. For this reason a step-down switching regulator was chosen. The IC LM2672N-5.0 (IC1) chosen for this job accepts a wide input voltage range from +6.5 V to +40 V and delivers 5 V with a cur- rent capability up to 1 A. The low-drop regulator IC2 derives the 3.3 V supply from the 5 V supply rail. In this case the voltage dropped across the regulator is just 1.6 V. The resulting power loss is just 160 mW which can be comfortably dissi- pated by the component surfaces with no need to resort to a more efficient switched regulator. Fit a jumper between pins 1 and 2 of JP1 to con- nect this regulator's 3.3 V output to the board components. Resistors R6 and R7 provide a con- venient method to measure the current drawn from each of the voltage rails. www.elektor-magazine.com December 2013 27 Projects jpi Don't forget to remove jumper JPI from the plug-in FPGA development board when the whole system is powered from an external mains adapter. Be aware that there is a jumper labeled JPI on both the development board and the expansion board. For applications which only require low current it is possible to power the system completely from the USB connection on the FPGA development board. In this case switch the jumper from pins 1 and 2 of JPI on the expansion board to pins 2 and 3. On the FPGA development board it is also necessary to fit a jumper to position JPI. Diode D3 in the expansion board circuit will now effec- tively isolate the 5 V regulator output. When power is supplied from a mains adapter via K1 diode D3 introduces a 0.3 V voltage drop in the 5 V supply which is acceptable for most applications. In cases where a precise 5 V supply is required the regulator IC1 can be swapped for The FPGA board gets new Firmware Elektor reader 'ruudje' has made available a newer version of the FPGA board firmware at the Elektor.Labs website. This version provides a much quicker boot sequence. Also other names for .exe files are now possible and a serial port is implemented. To program the FPGA board it is necessary to hook up a 6-pin ISP connector to the SD card position (use the first 6 pins). You may need to make an adapter to connect an AVR programmer (see Figure 4). It's important to keep in mind that the ATmega32U4 is a 3.3 V variant and requires a compatible programmer. We used AVRDUDE together with an AVR-ISP-MK2 programmer from Olimex (we also needed to make up a 10/6 pin adapter). The command line for AVRDUDE is: avrdude -c avrispmkll -P usb -p m32u4 -u -U flash : w : FPGA_boa rd_Conf i g . hex Once the new firmware has been flashed you can try out the features. Connect the FPGA board to a PC. When it was successful before, it should now also be possible to install the mass-storage driver. Otherwise consult the original article. Also when the board is classified as a mass storage device Windows will indicate that it has found an unknown device. Using the Windows Device Manager, install the driver contained in the INF file of the downloads for this article. The driver resides in the 'FPGA_board_Config_vl_0' folder, the device manager will then extract the information it needs. After a while you should see a message indicating that a communications port has been installed. The Device Manager will tell you which port number has been assigned. Y ou can now talk to the board using a terminal emulator program like Tera Term. Make sure you configure the terminal emulator to use the port assigned to the board. Use the status command to check that it is functioning correctly. The reply should look like this: Startup configuration file = config.bin FPGA configuration result = Successfully configured Sd card type = SD version 2, 1875MB That's all folks! The exchange with ruudje can be found here: www.elektor-labs.com/91 30903536 Files: www.elektor-magazine.com/pub/Elektor%20 Labs/120099_fpga 28 December 2013 www.elektor-magazine.com FPGA Expansion Board a type LM2672N-ADJ and the values of R4 and R5 adjusted to provide 5 V on the board. In this case you can use 1 % resistors, 5.1 kQ for R4 and 1.5 kQ for R5, the regulator now supplies 5.3 V which becomes +5 V after the voltage dropped by D3. LEDs 1 to 3 indicate the supply status; LED1 = external supply available, LED2 = +5 V and LED3 = +3.3 V. Assembly and testing The design does not use any components that are difficult to fit so populating the boards will be quite straightforward. Start by fitting the smaller components and then go on to the larger items. Leave the fitting of IC2 to IC6, the FPGA develop- ment board and the display until the 5 V regulator circuitry has been fitted and tested. Once this has been tested fit IC2 and check that 3.3 V is at the output before fitting the remaining components. Pin 1 of the pressure sensor IC6 is identified by a small nick along the edge of this lead; line this up with the white dot printed on the PCB. It is a sensible precaution to initially solder the GPS module IC3 to the board using small lengths of thin hook-up wire. This gives you the opportu- nity to test the unit before finally soldering it into place. Once it is in its final position it will be tricky to de-solder it. There are two rows of four holes in the PCB under the GPS unit. They facilitate soldering the GPS earth plane to the expansion board ground (this is however not strictly neces- sary). A small hot-air station will be useful here if you choose to make the connection. The color sensor packaging does not identify pin 1 instead it has a green dot at pin 4, the common cathode which is diagonally opposite pin 1. The sensor red segment should be aligned nearest the FPGA and the blue segment nearest the NTC thermistor (R8). Once all the components have Advertisement THE ORIGINAL SINCE 1994 PCB-PnOL" Beta LAYOUT create : electronics % e STORE Beta LAYOUT Develop, assemble, solder FREE! SMT laser stencil with every PCB Prototype order Assembly service From as little as one component Embedded RFID authenticate, track & protect your product www.magic-pcb.com Free Phone UK: 0800 389 8560 sales(5>pcb-pool.com www.pcb-pool.com Bete create: electronics Raspberry Pi Model B 512 MB RAM UHF RFID Starterkit Basic Reflow Controller L v € 129, 00 / e 279, 00 f www.beta-eSTORE.com Bela create : electronics www.elektor-magazine.com December 2013 29 eSTORE® is a registered trademark of Beta LAYOUT GmbH Projects been fitted use a continuity tester to check the connections. A diode drop should be measured between the 5 V rail (cathode) and every out- put (anode). There is a compiled executable available for the FPGA development board to help test the expan- sion board. Copy the file to an SD card and plug it into the development board slot. A few seconds after switch on the message 'Welcome' should appear on the first line of the display. An arrow- head displayed above S5 indicates that this should be pressed to progress with the test. Next is a small menu controlled program to test the func- tion of switches S2 to S4. When the GPS module is used under poor sig- 75% of true size nal conditions it may take several hours before TEMPERATURE (C) Elektor 130148-1 U2.3 COLOR FPGA 120099-91 1PPS PRESSURE LED4 •1 CENTER PIN IS GND ,LED5 LED6 +5U +3U3 GND GND GND LED7 LED8 • BACKLIGHT • • • LED3 LED1 it manages to get a positional fix. Activate the GPS module from the menu, LEDs 7 and 8 should flash; if not then GPS isn't running or has malfunctioned. When LED4 flashes at one second intervals it indicates that the module is functioning. To read sensor values via the ADC menu use pushbutton S4 (REF). The A/D converter does not continually read the value; each press starts a new measurement. The temperature sensor should return a value of around 0x7C at aver- age room temperature. The air pressure sensor supplies values up to OxDO in normal weather conditions. The color sensor requires a well-lit subject otherwise it returns low values. To be continued... We've now looked at how to control the com- ponents and modules fitted on the expansion board. We mentioned that using VHDL is not so complicated. In the next installment we will explain, with examples of simple control using VHDL. (130148) Internet Link [1] www.elektor-magazine.com/130148 COMPONENT LIST C4 = 10p 10V Miscellaneous C5 = lpF 16V electrolytic JP1,JP2 = 3-pin pinheader, 0.1" pitch Resistors C6 = 470pF 50V ceramic JP3 = 2-pin pinheader, 0.1" pitch (.25W except R6,R7) K1 = adapter socket with center pin R1,R16 = lk ft Inductors K2,K3 = 12-pin (2x6) pinheader, 0.1" pitch R2 = 390ft LI = 33pH 1.4 A K4 = 16-pin pinheader, 0.1" pitch R3,R14,R17-R20 = 180ft K5 = 10-pin (2x5) pinheader, 0.1" pitch R4 = Oft* Semiconductors K6,K7 = 25-way SIL receptacle for FPGA R5,R28 = not fitted * LED1-LED8 = LED, green, 3mm Board R6,R7 = 1ft 0.5 W D1,D2,D3 = 1N5817 (Schottky) LCD = 2x16 characters, HD44780-compatible R8 = NTC 22kft, type ND03P00223J T1 = BC547 (Newark /Farnell # 1847939) R9 = 22kft IC1 = LM2672N-5.0, switch-mode regulator S1-S5 = pushbutton, 6x6 mm RIO = 820kft IC2 = MCP1825S-33EAB, low-drop regulator S6 = EC12E rotary encoder, 24 P/U, with Rll = 510kft IC3 = A2035-H, GPS Module (Newark / Far- pushbutton R12 = 390kft nell # 2281693) 8-pin IC socket for IC1 (optional) R13,R15,R21-R27 = lOkft IC4 = ADC0838CCN/NOPB, ADC 20-pin IC socket for IC4 (optional) IC5 = KPS-5130PD7C, color sensor 16-way SIL receptacle for LCD, 0.1" pitch Capacitors IC6 = MPX4115A, pressure sensor PCB #130148-1 rev2.3 Cl = 330pF 16 V C2,C7 = lOnF ceramic C3 = 68pF 16V 30 December 2013 www.elektor-magazine.com The latest on electronics and information technology Videos, hints, tips, offers and more Exclusive bi-weekly project for GREEN and GOLD members Elektor behind the scenes In your email inbox each Friday elektor t post Th * 6 * si " n ' n9 a Silicon based life forms of (be World, SleMo.POJT mOntftt wq tUIwi httofi work inn h ^" i ** ^ tfuir .1 Tty* POST mciyi ^ ~ m one or mo now prooucti and «■ «V07 two *t«ks more ^ a tw pec^c, ™ m ** ftw Df4A or EtetBor ramans «r« ,, ** prwtets up sate unite! i a cosy every Meet, L *• and we pm 9 * / in# flatter r**n Wm * • Inwmawnai Oi«a« @ektor THINKING AUDIO OVER IP APPLICATIONS ARE HARD? too r ,& i jtions All solutions available in clear and secure modes E.VLH HIU^ CrtN [JO IT WjTH t'K' l IJTIOMSi One-way voice- band IP -PA System |PA over IP;- ISL0A12E/SE One-way broad -band IP -PA System i.PA over IPs KSLOA1 5E/SE Two-way peer-to-peei (P2P voir.fl-nand and broad -band (Intercom) toe iSLOAISfc Pt2Ml omcot *dHu< onu" wv k / V soclutions.com Mastering Microcontrollers Helped by Arduino NEW This book will not only familiarize you with the world of Arduino. The author, Elektor Expert Clemens Valens, also provides the reader with the basic theoretical knowledge necessary to program any microcontroller: inputs and outputs (analog and digital), interrupts, communication buses (RS-232, SPI, l 2 C, 1-wire, SMBus, etc.), timers, and much more. The programs and sketches presented in the book show how to use a variety of common electronic components: matrix keyboards, displays (LED, alphanumeric and graphic color LCD), motors, sensors (temperature, pressure, humidity, sound, light, and infrared), rotary encoders, piezo buzzers, pushbuttons, relays, etc. Theory is put into practice on an Arduino board using the Arduino programming environment. This book will be your first book about microcontrollers with a happy ending! 348 pages • ISBN 978-1-907920-23-3 £34.95 • € 39.95 • US $56.40 OFF for 31,(1 m Men,ter s Further Information and Ordering at www.elektor.com/arduinobook Projects Home and Office Network Tester Fffnr+iocci Ethernet connections Testing TCP/IP networks can be a hassle. This small, battery powered circuit makes your life a whole lot easier by auto-testing any hard wired network for vari- ous levels of operation. By Jeremy Bentham (UK) Because I supposedly "know about networking", I'm frequently asked to do fault-finding, and go through the same steps each time; check network cabling, router communications, DHCP negotia- tion, ADSL communication, Internet connectivity, et cetera. These steps are difficult to describe to network novices, due to the vagaries of operating systems and network configurations, so this unit was designed to automate the process, providing a simple display that anyone can understand. The circuit presented here offers easy one-button testing of common home and office networks, with red-amber-green indication of the network status, and any faults. The design is really simple, just a microcontroller, an Ethernet interface, a pushbutton for starting the test and status LEDs to show the condition of the network. You can't expect a simple low-cost unit such as this to test everything. Nevertheless, this design does do a lot more than a simple cable tester: • Low-level: is the cable connected? • Medium-level: is there connectivity to an Internet gateway? • High-level: is there connectivity to the Internet? Where is the Ethernet controller? The design offers a ground-breaking feature: an Ethernet interface without an Ethernet controller. This has various advantages: • Simpler hardware design • Much lower power consumption • Simpler device drivers • Educational: notan obscured 'black-box' design. Omitting the Ethernet controller has its difficul- ties. Microcontrollers often lack the necessary 32 December 2013 www.elektor-magazine.com Ethernet Network Tester hardware to implement a serial protocol, and it isn't unusual for the software to direct-drive I/O lines to create the same effect: a process com- monly known as 'bit-bashing' or 'bit-banging'. Software drivers for RS232, I 2 C, SPI and even low-speed USB are readily available, but the much higher data rate of Ethernet (10 Mbit/s) presents a major challenge. The data is Manchester-encoded. The software has to prepare 'raw' frame data, with a minimum of two samples per bit, making the minimum transmit data rate 20 Mbit/s. Receiving requires an even higher rate; in the absence of any hardware to lock in to the incoming signal, it is neces- sary to read in the data much faster, then do edge-detection in software. So we need a microcontroller with shift registers that can handle at least four times the bit-rate; in this design, they are clocked at 48 Mbit/s, with a fractional-division algorithm to produce the correct data rate. There is no point reading in the data if it can't be stored in memory, and even a simple CPU read-store-increment loop can be too slow for the incoming 6 Mbytes/sec. Fortunately there is one microcontroller family that can manage this; the ARM-based SAM7 series. The standard ARM architecture isn't up to the task, but Atmel have turbo-charged the chip by adding fast data-han- dling hardware, most notably DMA (Direct Mem- ory Access) controllers to transfer data to and from the shift registers without CPU intervention. Even with this acceleration, the microcontroller is working very hard for the duration of the Ethernet transfers; its internal data busses are saturated, so the CPU can only idle at this time. However, this situation is not unusual with network inter- faces; there is a brief period of frenetic activity when transmitting, a (relatively) long wait for the response, then another period of intense activity decoding the incoming message. As ever, there is a trade-off between hardware and software complexity, and this project pushes that boundary to the limit; it is amazing that a small microcontroller consuming around 100 mW can achieve this level of performance. Hardware The block diagram (Figure 1) shows the prin- ciple elements of the design, demonstrating its inherent simplicity. The Serial Peripheral Inter- face (SPI) shift registers in the microcontroller handle the network traffic, with DMA controllers to transfer data to and from memory. Transceiver ICs act as buffers between the network and the processor, the transmit buffer being controlled by the chip-select output of the SPI interface. The frame timer solves the tricky problem of detect- ing when the end-of-frame has been reached; the processor can't do this without disrupting the incoming data flow, so a microcontroller timer is configured as a retriggerable monostable, gen- erating an interrupt when the received data line stops toggling. Turning to the circuit diagram, despite looking rather intimidating, it really isn't all that compli- cated (see Figure 2). It's just that the microcon- troller (IC1) has a lot of pins and takes up a lot of space (in the schematic, not on the PCB). There are several pin-compatible parts in the Atmel SAM7 range that can be fitted to the board, differ- ing mainly in the memory sizes. AT91SAM7S128, 256 and 512 have been tested, smaller parts such as the AT91SAM7S32 or 64 will not work due to the demands of Ethernet transmission. The design does include some optional features; Figure 1. The block diagram demonstrates the inherent simplicity of the circuit. www.elektor-magazine.com December 2013 33 Projects programming the CPU is via JTAG (K4) or USB (K3); if the latter is used, K4 may be omitted. IC3 is an optional 256Kbit EEPROM for storing con- figuration data, not used in the current software. K1 is an Ethernet connector with built-in trans- former; R21-24 use a combination or zero-ohm links and not placed (NP) parts to provide some capability for accommodating alternative pinouts, but there is very little standardization amongst these devices, so careful study of the datasheet is necessary if contemplating alternatives. IC4 and 5 are transceivers that buffer the net- work interface, turning the single-ended micro- controller SPI signals into differential lines for the network. The transmitter IC5 is enabled using the SPI Chip Select output, with inverter IC6 to correct the polarity. And finally IC7 is a voltage supervisory device that keeps the microcontrol- ler in reset until the system voltage has reached the proper level and stabilizes. Ethernet We are using is lOBaseT Ethernet, where the 10 refers to the bit rate in Mbit/s, and the 'T' means a twisted-pair interface. Although slow by modern standards, this rate is more than adequate for testing networks. Even the fastest of Ethernet hubs will auto-configure to a lower rate when necessary. The hardware uses two twisted pairs, transmit and receive, on an RJ45 connector. These are normally transformer- coupled, to avoid any ground-loop problems. When an Ethernet node is connected to a hub, it announces itself sending Link Integrity Test (LIT) pulses on the transmit line; a simple 100-200 ns pulse every 16 ms is all that is needed to light the link' LED on the hub, and enable its network interface. Patterns of these pulses can also be sent, to allow communication between the unit and the hub, a process called auto-negotiation, but the current software plays dumb, and sends simple pulses. An Ethernet message (frame) contains bit-wise data, plus extra information needed to synchronize the receiver and transmitter. There are two elements to this synchronization: bit-sync and byte-sync. Each bit is synchronized by ensuring there is at least 1 edge per bit-time, the 0 and 1 values being marked by either 1 or 2 edges within the bit-time; this is known as Manchester encoding. This coding method can take various forms, Ethernet uses a non-return-to-zero (NRZ) method, whereby a single edge per bit-time indicates a data transition (0-to-l, or l-to-0) and two edges indicate a constant data value (all 0 or all 1). addresses, a two-byte field indicating the type of data that follows, and up to 1500 bytes of frame data. This will house an Internet Protocol (IP) frame, the lowest level of the TCP/ IP stack. A final piece of Internet magic is how the network 'knows' where to send the data, either to a local system, or one that is far-distant. The trick is that for any given address, a node only needs to determine if the destination is local or remote. If local, it is sent direct across the current network ('subnet' in IP parlance) to the recipient, if remote, it is sent to a 0 0 0 1 0 1 1 1 120052 - 14 NRZ Manchester coding. Preamble s F D 60-1514 bytes CRC \ \ \ Destination Source Type Data address address 46 - 1500 bytes 120052 - 15 Ethernet frame byte format. Byte synchronization is achieved by sending a preamble (a known training sequence) and a start-of-frame-delimiter (single byte to mark the start of data). At the end of the frame there is a 4-byte Cyclic Redundancy Check (CRC) so the message integrity can be checked. Each frame carries a payload of 60 to 1514 bytes; if less than 60 is needed, it must be padded to the minimum length, in order to maintain the hardware timing specifications. The payload has 6-byte source & destination router, which knows how to forward it on to the destination. This explains a critical frustration with TCP/IP networking: You can have two adjacent systems on your bench refusing to communicate, as the network configuration is telling them they are remote from each other. So your local network traffic ends up on the Internet, seeking a far-distant home, when the real destination is a few meters away. Such is the power, and frustration, of Internet communications! 34 December 2013 www.elektor-magazine.com Ethernet Network Tester VDD33 Q C22 74AHC1GU04] REN GND _L RJ45_MAG SN65HVD10 GND VDD33 VDD33 O 45 i 58 1 C21 C11 C12 C13 3 m _4 lOOn lOOn lOOn 100n 5 VDD28 gnq TCK 18 53 GND MCP130T-300I/TT VDD33 VDD28 Q 0 TD! 33 ' TDO 49 ' TMS 51 ' RST 39 / DDM 56 ' DDP 57 Jc5 T GND VDDIO VDDIO VDDIO ADVREF AD4 AD5 AD6 AD7 VDDCORE VDDCORE VDDCORE o a > TST ERASE JTAGSEL VDDFLASH VDDPLL TCK TDI TDO TMS RST DDM DDP PLLRC □ o z z O O a PAO/PGMENO PA1/PGMEN2 PA2/PGMEN2 PA3 PA4/PGMNCMD PA5/PGMRDY PA6/PGMN0E PA7/PGMNVALID PA8/PGMM0 PA9/PGMM1 PA10/PGMM2 PA11/PGMM3 PA12/PGMD0 PA13/PGMD1 PA14/PGMD2 PA1 5/PGMD3 AT91SAM7S512 PA1 6/PGMD4 PA17/PGMD5/AD0 PA18/PGMD6/AD1 PA19/PGMD7/AD2 PA20/PGMD8/AD3 PA21/PGMD9 PA22/PGMD10 PA23/PGMD11 IC1 Z3 o x o 5 o CL PA24/PGMD12 PA25/PGMD13 PA26/PGMD14 PA27/PGMD15 PA28 PA29 PA30 PA31 o o z z o o CM XI hPh ci 22p C2 22p 36 SCL ' 35 RXD ' 34 32. V 31 30. 29 REN 28 PCSN ' 27 MISO ' 22 MOSI 21 spclk' 48_ 47 44 43 52 S2 18.432 MHz PAO MISO MISO PA2 ^ SPA 23 25 26 H 38 o Q 5 i! _l _i 42. R3 R2 M -ff PAO —fi PA1 —fS PA2 K5 3V3 FTDI cable TXD RXD GND 120052 - 11 All of the capacitors are for decoupling or buffer- ing of the supply voltage, except for Cl and C2, which stabilize the clock for IC1, and C18-20, which form a low pass filter so the data signals conform to the USB specification. Parts R9/C3/ C4 are required to stabilize the microcontroller's internal phase-lock-loop, which scales the xtal frequency up to the desired CPU clock. SI resets the microcontroller and S2 starts a test sequence. K3 can be used to connect the microcontroller to a PC. The correct pinout is shown in Fig ure 3. The unbuffered serial lines on K5 provide a simple way of getting diagnos- tic information from the CPU; useful diagnostic messages are emitted at 38,400 baud, which can be viewed by connecting a 3.3 V FTDI seri- al-to-USB cable. There are three different ways to power the circuit: 1. via USB. Make sure that R19 (0 ohms) is mounted and that there's no (battery) supply connected to K2. 2. via the FTDI cable. Check that R19 is mounted and that there's no USB cable connected. Run a jumper wire from K5 pin 3 to K3 pin 1; no supply connected to Kl. Please note that the 3.3 V FTDI-cables have 5 V supply on their VDD connection— do not hook that directly up to the 3.3 V supply of the tester! Figure 2. The circuit isn't all that complicated. Just the microcontroller has a lot of pins that are connected. Figure 3. A USB connection to the microcontroller can be established using this diagram. www.elektor-magazine.com December 2013 35 Projects Figure 5. With the switches and LEDs mounted on the bottom, the circuit is easily built into a COMPONENT LIST Resistors (all 0603) R1,R2,R3,R7 = 220ft 1% R6,R8 = lOkft 1% R9,R32 = 1.5kft 1% R10,R11 = 4.7kft 1% R12,R19,R20,R21,R22,R23, R24 = Oft, not mounted, see text R14,R15,R16,R17, R18 = 47kft 1% R30,R31 = 27ft 1% Capacitors (0603 unless specified otherwise) C1,C2 = 22pF 5% C3 = lOnF 10% C4,C5 = InF 10% C6,C7,C8,C9,C11,C12,C13,C16, C21,C22,C23 = lOOnF 20% CIO = 2.2pF 6.3V 10%, 0805 C17 = 10 pF 6.3V 20%, 0805 C18 = 33pF 5% C19,C20 = 15pF 5% Figure 4. The 64-pin LQFP package with its lead pitch of 0.5 mm will be a challenge to mount. pitch K5 = 6-pin pinheader, 0.1" pitch S1,S2 = tactile switch, 6mm square XI = 18.432MHz quartz crystal, 5x3. 2mm Case Hammond 1593PGY Semiconductors D1 = LED 3mm, red, low current D2 = LED 3mm, yellow, low current D3 = LED 3mm, green, low current IC1 = AT91SAM7S512 IC2 = XC6206P332 IC3 = 24LC256 IC4,IC5 = 65HVD10 IC6 = 74AHC1GU04 IC7 = MCP130 Miscellaneous K1 = RJ45 jack with integrated mag- netics (Stewart Connector type SI-60002-F) K2 = 2-pin pinheader, 0.1" pitch K3 = 4-pin pinheader, 0.1" pitch K4 = 20-pin (2x10) pinheader, 0. small enclosure. 3. Battery powered. Two 1.5 V AA cells can power the tester for portable analysis. In this case R19 is not mounted, so it doesn't matter if power is connected to the USB and/ or FTDI connector. This is useful for portabil- ity. As the overall supply current is around 50 mA, two AA cells should provide many hours of operation. As soon as the battery voltage drops below 3.0 V, IC7 will reset the ARM controller. The components that are used in this circuit are readily available from catalogue suppliers at mod- est cost. Surface-mount assembly (SMA) will be required. Soldering the microcontroller— housed in a 64-pin LQFP package with a lead pitch of 0.5 mm— will be beyond the capability of many enthusiast builders and may even pose a chal- lenge to the more experienced engineer; the Elek- tor book LabWorX 2: Mastering Surface Mount Technology [1] is recommended reading, together with a supply of fine solder wick, to remove the inevitable solder bridges between pins. The PCB (Figure 4) has been designed to fit within a Hammond case, with the switches and LEDs mounted on the underside of the board (see Figure 5), poking though drilled holes. Alterna- tively, all the components may be mounted on the top side of the board, which is more convenient when using an uncased board for bench-testing. Programming and testing There are two ways of programming the unit; the conventional way for ARM processors is the JTAG interface K4, and a suitable USB-JTAG adap- tor, such as the J-Link ARM. When used with an appropriate development environment, this method provides an excellent source-level debug capability— but at a cost. A low-cost alternative is the special software tool provided by Atmel called SAM-BA (SAM Boot Assistant) for programming firmware via the USB port of the network analyzer. This utility is free for download on Atmel's website; there are ver- sions for Windows and Linux. We've only used V2.12 for Windows. The microcontroller has a boot loader mechanism that must be activated by pulling the PA0, PA1, PA2 and TST pins high while powering up and waiting for about ten sec- onds. Then power off, release these four pins and power up again. After that, SAM-BA can be started on your PC and the firmware transferred to the flash memory of the microcontroller. 36 December 2013 www.elektor-magazine.com Ethernet Network Tester On the PCB all these four pins of the microcon- troller are accessible. TST can directly be con- nected to VDD via a zero Ohm resistor R20, the three port pins have an extra connection by the side of the AT91SAM7S that can be connected to VDD using jumper wires. The whole module can be USB powered by shorting R19, so no external power supply is needed while programming the network tester. Connect a USB cable between K3 and a free port on your computer. Windows will report that the USB device is not recognized, don't worry about that for now. Wait for about ten seconds (a few more won't harm) and then unplug the USB cable. Remove the connections of the three port pins and TST pin. R19 will remain shorted until later. Now connect the USB cable again, Windows should recognize the device now as an 'AT91 USB to serial converter' and install the corresponding driver. When you start SAM-BA, select the correct type of microcontroller in the board field, in this case y at91sam7s256-ek', see Figure 6. Programming with SAM-BA is very straightforward. Figure 6. Click on 'connect' to start communi- cation with the network tester. Then select the binary file for the microcontroller and click on 'program'. The firmware will then be loaded into the flash memory of the ARM processor. Now the processor must be reset, either by power cycling or pushing reset button SI. D1 should blink every two or three seconds, signaling the micro is running. In an ideal world, the USB interface would also provide diagnostic information on the inner work- ings of the software, but the code is already quite complex, so that accommodating the USB drivers, Diagnostics The software transmits diagnostics on the K5 serial link at 38,400 baud. Here's an example: ETHERLEAN v0 . 34 00:0B:75:01:O2:03->FF:FF:FF:FF:FF:FF IP len 278 0 . 0 . 0 . 0->255 . 255 . 255 . 255 DHCP 00:24:FE:C8:9B:75->00:0B:75:01:02:03 IP len 576 10 . 1 . 1 . 100->10 . 1 . 1 . 221 DHCP 00:0B:75:O1:02:03->FF:FF:FF:FF:FF:FF IP len 278 10 . 1 . 1 . 221->255 . 255 . 255 . 255 DHCP O0:24:FE:C8:9B:75->00:0B:75:O1:02:03 IP len 576 10 . 1 . 1 . 100->10 . 1 . 1 . 221 DHCP DHCP ACK: my IP 10.1.1.221 router 10.1.1.100 DNS 10.1.1.100 00:0B:75:O1:02:03->FF:FF:FF:FF:FF:FF ARP REQ 10 . 1 . 1 . 221->10 . 1 . 1 . 100 O0:24:FE:C8:9B:75->00:0B:75:01:O2:03 ARP RSP 10 . 1 . 1 . 100->10 . 1 . 1 . 221 O0:0B:75:01:02:03->O0:24:FE:C8:9B:75 IP len 61 10 . 1 . 1 . 221->10 . 1 . 1 . 100 DNS OO:24:FE:C8:9B:75->OO:0B:75:O1:O2:O3 IP len 157 10 . 1 . 1 . 100->10 . 1 . 1 . 221 DNS DNS: www.elektor.com 92.52.84.11 The DHCP transactions show the unit requesting the allocation of an IP address, and being given 10.1.1.221 by the server, which also provides addresses for contacting the Internet (via a router at 10.1.1.100) and resolving host names (via a DNS server at 10.1.1.100). The unit uses Address Resolution Protocol (ARP) to find a hardware address for 10.1.1.100, then puts through a DNS request, asking for the address of that well-known Web site, www.elektor.com. The DNS server gives the response 95.52.84.11, showing that all is well with the Ethernet, DHCP and DNS; the most common points of network failure. It is educational to watch the protocol transfers using monitoring software running on a PC. A good monitoring program is the excellent free Wireshark, which can display network traffic in considerable detail. Be warned though, modern Ethernet hubs (switches) intelligently route network data across their ports, and see no reason to send all the traffic to a monitoring PC. There are two solutions to this problem; either an expensive 'managed' switch, which can be configured to copy traffic across to a specific port, or the opposite approach: an old Ethernet hub that has no intelligence, and copies all traffic to all ports. www.elektor-magazine.com December 2013 37 Projects and getting them to cooperate with the Ethernet code, is one challenge too many for the author. Instead, the software transmits messages on the K5 serial link at 38,400 baud; terse, but highly informative. An example is given in the inset 'Diagnostics'. Software The essence of networking software is a layered approach; when transmitting, the data passes down through the layers, each of which adds encapsulation with headers and/or trailers, until it is sent on the network. On arrival at its desti- nation, the encapsulation is stripped off as the data travels back up through the layers, until it emerges at the top in the original form it was sent. This begs the question: why bother with all these layers, why not send the data as-is? Well, firstly, if you want to communicate over the Internet, you must play by its rules, and these mandate the TCP/IP family of protocols. Secondly, each layer provides specific function- ality, for example: Less well documented is the process for generating and decoding Ether- net frames. We'll have a stab at it in the inset 'Ethernet'. Despite the external sim- plicity of the unit, there is a signifi- cant amount of software for handling the low-level Ethernet interface, the higher-level TCP/IP functions and the user interface (button and LEDs). There is no operating system, real- time kernel or third-party TCP/IP stack; all the software is custom-written, or adapted from the author's 'TCP/IP Lean' code. The software, avail- able for free from [2], is written in C, using the IAR EWARM development environment. The code is sufficiently small that the free 'kickstart' edition can be used; it will also be adapted for use with the GNU toolset when time permits. The software will be released under an open-source license. (120052) Internet Links [1] www.elektor.com/labworx [2] www.elektor-magazine. com/120052 • Ethernet is a low-level transport, with 6-byte hardware (MAC) addresses; • IP provides 4-byte logical addresses, which are mapped onto MAC addresses; • ARP provides a mechanism for translating MAC addresses to IP addresses; • ICMP allows low-level diagnostic messages (pings) to be sent and received; • DHCP allows a computer to establish a net- work identity, using only a MAC address; • DNS provides a method of translating a domain name into an IP address. Using TCP/IP protocols, two computers can com- municate with each other at opposite sides of the earth, as easily as if they were connected to the same network hub; but this capability is only obtained at the price of considerable complex- ity. There are many books on TCP, including the author's 'TCP/IP Lean', sadly now out of print. About the Author Jeremy Bentham is an embedded systems designer, producing hardware, software and PCB designs professionally. He wrote the book 'TCP/IP Lean; Web Servers for Embedded Systems', quite a popular book that was even translated into Chinese. Nowadays, hardware and software consultancy work has taken precedence over writing. 38 December 2013 www.elektor-magazine.com powered by Eurocircuits a Nk*AA •* lektor * » H-.it 7 rit.-rw/ JlSNlDQ Professional Quality Trusted Service Secure Ordering IWkiar IS I uiiui Mjin ttmu 33 PCS Che%_ -er L gam ■k. p«(«t mfjtfX inM ‘.000 users havr u>.- ?n reyls^l EurOcircuns decided to extend tieir service mu ; Ktor a i Efefct i '& prtiRHvffK, ftff flpu! «r#wr ■At«l 4 UKp •wJ • f imi^i ul* — #i»jm artfri ■«Au* ( WY 3 WB W 2 rt H dr 7 *L% p 1: j Huijji in H glc Bone hid USB Instaa ■drrrtfs Srepfc Browse to wet) server on board Trouoittnootiig Update to f-aie-st software QtttiM software options H>rOwjr* OrXvrn4fit4a0n hltp:Wwww fto.iro for & PHhoir* of other appheations. ALSO AVAILABLE: The all-paperless GREEN Membership, which delivers all products and services, including Elektor.MAGAZINE, online only. By CtantMus Valtiu (Homer tovfl apcfejban, wah most browser*, m that used sWcrs so c4fnpIe.ojm*| I File Edit View Toolbox Schematic Option) Window Help it o 1 0 0 ej oj of 1)1 Bo, ©CO EKm 3 FfhO^X CmM loo _ Mm* M mm 9 ** C, < Ernttop* Fp#c**f Fra On) Cm ZtM QLZ> A £9 FH PfT rVvf<*y •1 oT Top ASaOfti 7 a Am 1 (•) * ««.**->»< ai *:»e J - * ► S ^ ^ F-req HiNonMik. f-Q XN70+P0(90fii Drag camponcnb to « tihemitk. Click ttvtul timet then dug to odd mullyk component^ nqhl-ckl to dtiiwt the cowl CPU - 0/1% find the component you are looking for, then it probably does not exist. The schematic grid is quite large and a special navigation window is available for quickly scrolling and panning through your design. It also features a thumbnail zoom view providing an overview of the design together with detailed views of some modules. The life of the experienced FlowStone user is made even easier by tons of shortcuts. Furthermore, a detailed user manual is available for download. Looking through the toolbox you will notice a lot of audio functions and signal processing compo- nents, but more generic functions like text han- dling or line drawing are available too. Highly interesting also are the external hardware com- ponents that make interfacing to for instance a Wiimote (the remote control of a Wii game con- sole), an X10 network (a popular home automa- tion protocol) or Phidgets (low-cost USB building blocks for sensing and control) very easy. Spe- cial FlowStone hardware exists too, notably the FlowBoard DAQ, a board sporting eight analog inputs, sixteen digital inputs and sixteen digital outputs. FlowStone now also supports commu- nication through HID devices (see inset). Creating a design in FlowStone is very easy (I did not say working design); you just drag and drop components from the toolbox onto the schematic (other ways of placing components are available too). If you place a component close to another with compatible inputs and/or outputs, the con- necting links can be drawn for you, speeding up your work. When you select a component in the schematic a short help text is shown for its connectors, making it easier to understand their purpose. Manually connecting components always starts at an output and ends at an input. Usually the outputs are on the right side of a component and the inputs on the left. When dragging a link to a component, only the connectors compatible with the data type transported by the link will be accessible. Links do not always have to be drawn, they can Figure 1. A FlowStone schematic showing simple audio processing using a parametric EQ and a display to plot the FFT of the resulting signal. www.elektor-magazine.com December 2013 53 Projects Control your own hardware The latest version of FlowStone is capable of communicating with HID devices, meaning you can develop your own HID board and control it from FlowStone. The Elektor Wi-Fi Controller Board [2] for instance is such a compatible board. Because it has a bootloader it is a perfect platform for developing FlowStone controlled applications. Create some sort of music application like a synthesizer or a complicated sound processing tool and use the Wi-Fi Controller Board to create accompanying light effects or make a robot dance. Or use FlowStone for your hi-tech scientific data acquisition and processing application and control the physical process with the Wi-Fi Controller Board. I have given it a try and it works fine. To give you a head start my C18 project can be downloaded (for free, of course) from [3]. also be wireless. Such links are similar to the net labels found in schematic capture programs with one subtle difference: wireless outputs can only send to modules on a lower level in the hierarchy. FlowStone recognizes more than 30 data types, divided in three categories: streams, events and triggered. Streams are continuously flow- ing data streams like audio or video samples. Triggered types and events are signals caused by events. The difference between these two categories is that triggered types only signal that something has changed whereas events (can) carry data. Also, events are scheduled, meaning that they only occur at times speci- fied by the programmer. Interestingly, streams come in two flavors, monophonic (mono) and polyphonic (poly), and the way they behave is quite different. As the user manuals states: "Poly is only used for audio applications where sound signals are generated from MIDI notes. If you're not generating audio in this way then you can ignore Poly completely." Even though FlowStone is a graphical program- ming language, it is easy to write (part of) a program in the traditional way using the Ruby programming language. This of course violates the graphical programming paradigm, but it is a logical option as some functions may be easy to draw whereas others may be more quickly implemented by writing an algorithm. Unfortunately, space restrictions for this article do not allow an in-depth review of FlowStone and all it has to offer, which is plenty. If you want to play around with the tool yourself, I suggest you download the free demo version from [1]. If you happen to own a copy of the latest version of the digital audio workstation (DAW) FLStudio then you already have FlowStone as it is part of the package (older versions of FLStudio shipped with SynthMaker). ( 130064 ) Internet Links [1] Flowstone main page: www.dsprobotics.com/flowstone.html [2] Wi-Fi Controller Board: www.elektor.com/120718 [3] Downloads for this article: www. elektor. com/1 30064 54 December 2013 www.elektor-magazine.com electronics DISCUSS . desii tutorial ° ° engineering tools : system au d i O business ■ networking medra ; lGCIId MS Stwe/ tAmf irtta*^s4s ■ KS> f. %V%: CIRCUIT CELLAR / AUD OXPRESS / ELEKTOR Projects Joule Robbin' Hood Powering a grow lamp from nearly empty batteries By Rolf Blijleven (Netherlands) Even if your camera, mouse or key- board says that its batteries (AA or AAA) are flat, this does not mean that they are exhausted. In many cases there's still quite a bit of juice left in the batteries, which you can put to good use. The circuit described here is based on the famous Joule Thief [1] and is guaranteed to suck batteries dry. The Joule Thief lets you use the leftover energy in a battery. It comprises the circuitry outside the dashed line in Figure 1. Transformer T consists of two coupled coils, each with approximately 20 dual windings of 0.15-mm (AWG 34) enam- eled copper wire on a toroidal core, connected in opposite phase. It's easy to wind this trans- Figure 1. Joule Robbin' Hood is an expanded version of the Joule Thief. former yourself on a small ferrite core with an inside diameter of 5 to 8 mm and a height and thickness of 5 mm. The circuit forms an oscillator with sufficient amplitude to switch the transistor on and off on each cycle and light up an LED. The idea for the present version came when I was watching a television program about modern greenhouse cultivation, where LEDs are being used more and more. Plants do not need green light. In fact, the reason they are green is that they reflect green light. However, they do need blue and red light. Blue light is mainly necessary for germination and for forming sturdy leaves and stems, while red light is necessary for blossoming. So I thought: why not use a Joule Thief to power a grow lamp? The results exceeded my expecta- tions (see [2] for more details). This marked the birth of Joule Robbin' Hood, which steals from the rich battery and gives to the poor plants. The rest of the circuit is fairly straightforward. The LDR (with a dark resistance of 100 kQ) and resistor R2 form a voltage divider in combination with R4. The resistance of the LDR is low when it 56 December 2013 www.elektor-magazine.com Joule Robbin' Hood is illuminated, so the resistance of R4 dominates and the voltage across R4 is relatively high. This causes transistor T2 to conduct and switch off Tl. When it's dark the situation is exactly the opposite— then the LDR and R2 dominate, so T2 is off and Tl can conduct. There's no need for light from the LEDs when full natural light is available, so resistor R3 reduces the base current of T2 to the point that it just barely conducts. After all, we don't want to have T2 drain all the energy from the battery; as much as possible should go to the LEDs. After a bit more experimentation I discovered that with two nearly empty batteries connected in series and a transistor with a bit higher power rating for Tl (e.g. a 2N1711), it's possible to power up to 10 LEDs in parallel for two days (Fig- ure 2a). If you connect pairs of LEDs in series and then wire these pairs in parallel (Figure 2b), you would expect them to go dark much sooner than single LEDs in parallel, but there is actually very little difference in operating time or bright- ness. This means that for a grow lamp you can connect pairs of red and blue LEDs in series and then connect several of these pairs in parallel, which is easier to wire up than separate strings of red LEDs and blue LEDs. Be sure to use superbright LEDs for this applica- tion, as mentioned below. Avoid looking directly at the LEDs while experimenting, since they are rather bright. There are lots of possible variations on this circuit, and it is easy to build with point- to-point wiring or on a piece of prototyping board. (130314-1) Suitable LEDs: • superbright red (e.g. Sloan L5-R52U) • superbright blue (e.g. Kingbright L-7113QBC-G; Newark/Farnell # 2080007). Internet Links [1] http://en.wikipedia.org/wiki/Joule_thief [2] http://rolfblijleven.blogspot.nl/2013/04/ led-groeilamp-op-bijna-lege-batterijen.html (in Dutch) www.elektor-magazine.com December 2013 57 DESIGNSPARK PCB DesignSpark Tips & Tricks Day #6: after the layout By Neil Gruending Today we're going to use the DesignSpark online BOM and PCB quoting tools to (C3 D3cl 3) find out how much it would cost to build our example project. These tools can be a great time saver. EtM d«ljkils- ^ Ignore rov^ 4 IT* 1 ipw lit 11 H Hill Pjrt Hu. Miimf Kturvr RSStwtHA HP’-J MMET3 90-* Accept Accept MVHT3B04LT1G MMHT39041.T1G ON Semiccnducter ON Semiconductor $43-0343 50 545-0343P 50 HEma Figure 1. Best matching of the generic type code 'NPN MMBT3904' to RS Components part numbers. BOM Quotation In our last installment we generated a bill of materials (BOM) as a spreadsheet that could be used to manually order the parts we need for the board. Some supplier websites will let you upload your BOM to order your parts, but DesignSpark cuts out the intermediate steps and connects to the RS Components website for you. The web- site doesn't work worldwide yet, but I hear that they're working on it. For this article I set my locale to the United Kingdom (Settings — Prefer- ences menu) since the website connection doesn't work for Canadians yet. Figure 2. Flere we find the RS Components part numbers for 3k6 (3.6 kQ) and 3k9 (3.9 kQ) SMD resistors. So let's see what will happens when we click on the BOM Quote since the components I cre- ated didn't have any RS part numbers. Once you click on the button DesignSpark will run the built in BOM report using the fields that it knows about: Reference Designator, Quantity, Compo- nent Name, Component Value, Package Name, Edit delays ® Ignor* rov/ Acc*pt C_ Accept Manufacturer, Manufacturer Part Number, RS Part Number and the Component Description. Note that the Package Name field is a separate field in the schematic symbol and not the PCB foot- print name. Next DesignSpark will log you into the RS website with your ModelSource ID so that the BOM can be uploaded to the RS website. The website will then do its best to match the compo- nent fields in the BOM to RS part numbers. When the RS part number field is blank, the website will propose its best matches. For example, Figure 1 shows the proposed matches for the MMBT3904 in our design. There you can see that the website is using the Compo- nent Name "NPN MMBT3904" as the main search term and that the website is proposing its clos- est matches. If you click on the View full product details arrow on the bottom row the table will expand to show more details like the component cost. In this case we'll accept the first match because it's the correct part number. Figure 2 shows another example. This time the website couldn't find an appropriate match which leaves a couple of options to find the correct part. If you have a RS account then you can click on the Edit details link to modify the part information, but you will need to do this every time you upload a BOM that uses this part. For that reason I like to correct the part informa- tion in DesignSpark's libraries instead. The manufacturer part number "0805 100 5%" that was used by the website was actually the Component Name for R3 which means we should rename it. First, open the Library Manager and then navigate to the 100R component in the resis- tor library. Here you will find a Rename button so that you can rename the part "0805 lOOr 5%". 58 December 2013 | www.elektor-magazine.com Tips & Tricks The next step is to tell DesignSpark to reload the part parameters for R3 from the library. Normally you would use the "Update Components — All Components" command in the Tools menu or right clicking on R3 and selecting "Update Component". But since we've changed the Component Name we'll need to replace R3 with the updated com- ponent by going into the Component Properties and clicking the Change button, see Figure 3. The "Change Component" window will then open so that you will be able to select our new resistor from the library. Now when you click the "BOM Quote" button the RS website will recognize the modified 100R resistor. Some parts like the LED will be difficult to match with just the component name so you could set the RS part number in the "RS Part Number" field instead. Then just update the component instead of changing the component. Once all the components have been updated then you can create an order pad by pressing "Add accepted items to order pad" where you can see the total costs and place an order. PCB Quotation We'll also need a printed circuit board if we're going to make our design so let's try using DesignSpark's PCB quoting function. As part of the quoting process, DesignSpark will check if you've ran a design rule check (DRC) on the board and that it's within the design limits for the service. I had problems using Chrome as my default browser when trying the quotation function so I used Internet Explorer for the rest of the quotation process. If you try and quote the circuit board as is DesignSpark will warn you that the board is too small because the minimum size for quoting is 30 mm x 30 mm and our board is 20 mm x 20 mm. If you ignore the error and try and get a quotation anyways the quotation website will fail. We will have to panelize our board to make it large enough to meet the minimum PCB size requirement. Panelizing a circuit board refers putting multi- ple copies of the circuit board onto a larger PCB panel for manufacturing. This is how a circuit board manufacturer produces circuit boards, but there is a point where it becomes cost prohibitive to cut out smaller boards out of large panels. So what we will do for our board is to duplicate the board four times to make it 43 mm x 43 mm instead as a 2 x 2 array of boards with 3 mm between them. The extra 3mm gives you room to cut out the boards. DesignSpark can't automatically panelize our board for us but it is possible to do it manually by selecting the entire board, copying it and then pasting it back into the PCB file. Just make sure that you choose to not to merge the +5 V and GND nets when DesignSpark asks. Unfortunately DesignSpark will also automatically increment all of the reference designators so that they don't conflict with the rest of the boards. The only way to fix this is to manually edit but this is tricky with DesignSpark because it requires that every component have a unique reference designator. One method is to give each board a unique suf- fix to the designators when renaming them. For example R1 could be R1A, RIB, R1C and RID. DesignSpark will now be able to quote the pan- elized board, but you will still need to contract the PCB manufacturer to make sure that they are able to accept panelized boards. Conclusion Today we modified our design so that DesignSpark could give us BOM and PCB cost estimates. Next time we'll look at how DesignSpark can render a 3D image of the board. (130247) Figure 3. The component renaming window. www.elektor-magazine.com | December 2013 59 ARDUINO DUE 32-bit power thanks to an ARM processor Features Microcontroller Operating Voltage Input Voltage (recommended) Input Voltage (limits) Digital I/O Pins r AT91SAM3X8E 3.3V 7-12V 6-20V 54 (of which 12 provide PWM output) PWM Channels 12 Analog Input Pins 12 Analog Outputs Pins 2 (DAC) DC Current per I/O Pin 1 30 mA DC Current for 3.3V Pin 800 mA DC Current for 5V Pin 800 mA Flash Memory SRAM Clock Speed 512 KB (all available for the user applications) 96 KB (two banks: 64KB and 32KB) 84 MHz € 52.77 • US $76.50 99 saseciee eeeeeooj S 8 * ° "f ' * pxcitm. trtw-ilLS ARDUINO .eonardO ARDUINO LEONARDO Especially good for USB applications Features Microcontroller ATmega32u4 Operating Voltage 5V Input Voltage 7-12V (recommended) Input Voltage (limits) 6-20V Digital I/O Pins 20 (of which 7 provide PWM output) PWM Channels 7 Analog Input Pins 12 DC Current per I/O Pin 40 mA DC Current for 3.3V Pin 50 mA Flash Memory 32 KB (of which 4 KB used by bootloader) SRAM 2.5 KB EEPROM 1 KB Clock Speed 16 MHz £22.10 •€ 24.81 • US $36.00 L A ATmega328 5V 7-12V 6-20V 14 (of which 4 provide PWM output) 10 to 13 used for SPI 4 used for SD card 2 W5100 interrupt (when bridged) 6 40 mA 50 mA 32 KB (of which 0.5 KB used by bootloader) 2 KB 1 KB 16 MHz Analog Input Pins DC Current per I/O Pin DC Current for 3.3V Pin Flash Memory SRAM EEPROM Clock Speed Arduino Pins reserved Microcontroller Operating Voltage Input Voltage (recommended) Input Voltage (limits) Digital I/O Pins < lektor Features Microcontroller Operating Voltage Input Voltage (recommended) Input Voltage (limits) Digital I/O Pins V ATmega2560 5 V 7-12V 6-20V 54 (of which 15 provide PWM output) Analog Input Pins DC Current per I/O Pin DC Current for 3.3 V Pin Flash Memory 16 40 mA 50 mA 256 KB (of which 8 KB used by bootloader) SRAM EEPROM Clock Speed 8 KB 4 KB 16 MHz • € 52.77 • US $76.50 ATmega328 5V 7-12V 6-20V 14 (of which 6 provide PWM output) Microcontroller Operating Voltage Input Voltage (recommended) Input Voltage (limits) Digital I/O Pins PWM Channels Analog Input Pins DC Current per I/O Pin DC Current for 3.3V Pin Flash Memory SRAM EEPROM Clock Speed 6 6 40 mA 50 mA 32 KB (of which 0.5 KB used by bootloader) 2 KB 1 KB 16 MHz 1.40 • € 27.35 • US $39.70 ARDUINO YUN Two processors Features AVR Arduino microcontroller Microcontroller ATmega32u4 Operating Voltage 5V Input Voltage 5 V Digital I/O Pins 20 PWM Channels 7 Analog Input Channels 12 DC Current per I/O Pin 40 mA DC Current for 3.3V Pin 50 mA Flash Memory 32 KB (of which 4 KB used by bootloader) SRAM 2.5 KB EEPROM 1 KB Clock Speed 16 MHz Features Linux microprocessor Processor Atheros AR9331 Architecture MIPS @400 MHz Operating Voltage 3.3V Ethernet IEEE 802.3 1 0/1 OOMbit/s WiFi IEEE 802.1 1 b/g/n USB Type-A 2.0 Host/Device Card Reader Micro-SD only RAM 64MBDDR2 Flash Memory 16 MB PoE compatible 802. 3af card support £62.30 • € 6 L. 9.95 • US $101 .40 £48.10 *€53.98* US $78.30 3 Products for just £45.00* Products to choose !k_ from.o oiler Programming thla UVD Approx. €53 / $72. Offer valid until 1 January 201 4 and *** — ** w > , ’ p— ~* * fT nBU rdl^M >v .1 1 ftp I kt si j ' Hiyvlii]! h f c AHpbibKJ j> Jr y 1 as long as stocks last. Excl. Shipping & Handling. lessons 1 K t t, 1 EV* / ■ ■ , (■! - VL pr B rj. V __ A- J nEL TP p v ■■ . *** Labs Surfin' the RPi Wave Numitro ‘'"Sica" cooiponentg 1 * ' U *<"9 only By Clemens Valens (Elektor.Labs) Raspberry Pi (RPi) may very well enter electronics history as the board that changed the game. The RPi team has shown that it is possible for "normal" engi- neers to develop systems that can compete with products marketed by big com- panies with tons of resources. Due to the RPi's attractive pricing and its impressive capabilities over a million pieces were sold in a year. It's no wonder quite few RPi based projects appear on the Elektor.Labs website. Getting Started OP ale, well known to regular Elektor readers from his excellent Sounding Balloon project published in Elektor.Post #17 (see below), came up with an add-on card for the RPi. But, since this OP is into teaching, he also wrote three detailed RPi How-To articles. Albeit they're written in French, the articles are full of annotated screenshots and photographs, making them accessible to an extent to all of us. And if you really don't understand what the OP is talking about, contact him through the project's webpage. He (or possibly someone else) will be glad to help you out. www. elektor-labs. com/node/3084 Never Lose Data Again As Murphy's Law says, there are two types of computer users: those who have lost data and those who are about to lose data. To prevent a second event of this type, OP Antoni has built a Network Attached Storage (NAS) composed of a 2-Terabyte USB hard disk and a Raspberry Pi, which connects the hard disk to the OP's home network via Ethernet. A USB hard disk is much cheaper than an Ethernet version, so this is an economical solution to your data storage worries. The OP provides detailed instructions on configuring and setting up the system. Now you no longer have an excuse for not backing up your important data. www.elektor-labs.com/node/2892 62 December 2013 www.elektor-magazine.com elektor labs Prototyping Board This RPi prototype board provides a beefier 3.3 V DC power supply than the RPi's on-board regulator. Now you have up to 800 mA available for your experiments. Furthermore, the prototyping board provides an easy means to access the signals from the RPi expansion connector. A special connector breaks out the RPi signals, allowing you to use them easily in your circuits. This project was published in the March 2013 edition of Elektor and the PCB is available through the Elektor Store, www. elektor-labs. com/node/2703 ■rf LMJ O O D O O O C l; Ci O O Q Hj O i.KflBRBtibCfiCtifc &[» » * * g # O P Q Q V 1 V V V V ■-> 1*1 B aJxjLyjLriiTiTii.ojni O n n n ^ u b u u Kj u u f; f.i f; C € C t 1 u 0 . ConnnciBBd * *. \ oooccoepfl-. . r * 0 O * G C 0 * O C ■■ * 6 O n n o C Ci ci ii u O ft oooocoOoo OOOOOCOOO> O ... ft O ft e 6 it Id U H fi b f 1 t 1 ° !?!?“ Cl no ' . 0 i j n h j eoooooooo 0000000*0 m m n ■ ■ OP*******"" - * 1 O ft O f> O Cl ft ft O U (J Dnoroflnnrvfin. U bbi iw CCQQQ r n n w n www.elektor-labs.com Refrigerator Watchdog Soon after the apparition of the RPi, enclosure companies started to produce RPi enclosures, especially for those people who only wanted to use their RPi as a Media Center. These enclosures are rather cheap and some even look nice. This triggered OP joergt to use them for his 8-bit AVR projects too. This example shows how to create a nice-looking fridge surveillance system on a shoestring using an RPi enclosure. Now that's what I call out-of-the-box thinking! www.elektor-labs.com/node/3596 Five Cool Projects Universal Display Extension www. elektor-labs. com/node/3602 LP Gas Fuel Injection for Single Cylinder Engines www.elektor-labs.com/node/3585 MOS6581-based Chiptunes Player www.elektor-labs.com/node/3575 Embedded Chip-8 Video Game System www.elektor-labs.com/node/3555 Using Your Hand as a Mouse www.elektor-labs.com/node/3489 olektOr P OSt There's More If vou are into or interests in .POST If you are into or interested in Raspberry Pi projects and if you are an Elektor Member, you have access to six additional RPi articles. These articles were sent to every Member who also receives our weekly newsletter Elektor.Post. If you have missed these articles, you can still read them as they are archived on the Elektor.Magazine website. As an Elektor Member you have access to this website from where you can download these articles (and many more). Your login credentials for Elektor.Magazine are the same as for Elektor.Labs. Did you know that over the last months some twenty extra projects have been sent to our members through our newsletter called Elektor.POST? You did not receive them or you accidentally deleted one? No sweat, they're all available on our website. Sign up for Elektor.POST at www.elektor.com and never miss a free project again. Get previously published .POST articles here: www.elektor-magazine.com/com/extra/post.html Note: OP stands for Original Poster— the person who started an online project or discussion. OPs wishing to qualify for their project being published in Elektor magazine (i.e. on paper) must regularly check the email address they use to access Elektor.Labs. This is our only means of contact. www.elektor-magazine.com December 2013 63 Industry Atmel: New ARM Cortex-MO+ Microcontroller Family Atmel Corporation announced the new Atmel® SAM D20, the first series in a new family of embedded Flash microcontrollers based on the ARM® Cortex™-M0+ processor core and designed ideally for home automation, consumer, smart metering and industrial applications. Leveraging two decades of microcontroller experience and success with the company's easy-to- use AVR- and ARM-based products, the new series combines innovative and proven technolo- gies including intelligent peripherals with Atmel's Event System and capacitive touch support for button, slider and wheel capability and proximity sensing. The new SAM D20 series is also supported by the latest version of Atmel Studio and Atmel Software Framework, the integrated development platform for developing and debugging Atmel ARM Cortex-M and Atmel AVR® MCU- based applications. Bosch Sensortec GmbH is among the first adopters of the new Atmel SAM D20 device. Atmel's SAM D20 Cortex-M0+ ARM-based series integrates several popular features including high-precision 12-bit analog and internal oscillators, up to eight 16-bit timer/counters, real- time performance, peripheral event system, and flexible clocking options and sleep modes. The new devices also include a serial communication module (SERCOM module) that can be configured from the application to act as an USART, UART, SPI and I 2 C; each device in this new family includes four to six SERCOM modules. The new devices are also designed for a simple and intuitive migration between devices with identical peripheral modules, hex compatible code, pin compatible migration paths, and a linear address map. The family supports button, slider and wheel touch capability as well as proximity without the need for external components, and features 14 new devices available in 32-, 48- and 64-pin package options with 16 to 256 KB of Flash memory. To accelerate design, the SAM D20 Xplained PRO evaluation kits are available today for USD $39. The kit features a 64-pin, 256 KB SAM D20 device along with a programmer/debugger and hardware to evaluate both the processor and the peripherals. The Xplained PRO kit also comes pre-loaded with software that can easily be re-programmed, debugged and prototyped without any additional tools. www.atmel.com (130202-VI) Varta MicroBattery: Power Pack Solutions Successfully designing high-end power packs for the Industrial, Medical and Communications markets, VARTA Microbattery now expands with the BIKE division to bring their know-how into pedelecs and e-bikes. The service offers a package from design-in to testing, the complete range of steps from A to Z which are indispens- able to offer a strong, safe and aesthetically pleasing Power Pack for pedelecs. One design example is the new off-the-shelf product which provides a continuous discharge current of 25 A and a peak current of 30 A. Common pedelec power packs provide just continuous discharge currents of 14 A to 15 A and peak currents of 20 A. Thanks to this high discharge rate the VARTA Microbattery battery can run the motor longer at its maximum power of 250 W than other systems can. www.varta-microbattery.com/cellpacbike (130202-VIII) 64 | December 2013 | www.elektor-magazine.com news & new products Wireless Battery-Free Sensor Systems Farsens (Spain) has developed wireless sensor devices that can be used without the need of batteries on the sensors. These battery free sensor tags are based on UHF RFID technology and are able to continuously mon- itor and transmit data, together with the 96-bit EPC unique tag identifier, to any EPC Gen 2 standard compli- ant reader. Farsens has packed everything you need to have a full passive sensor system up and running with no effort. Their Full Battery-Free Sensor kits come with their wireless battery free sensor tags of choice plus a commercial UHF RFID reader, a reader antenna, reader power supply and Ethernet cable to connect to your PC or laptop. The kit also comes with a software program that displays the sensor tag data on your computer. Tags in these kits come in non-protected PCB formats for custom encapsulation or embedding in non-metallic assets/materials. There are four sensor options for the Basic and Regular choices: • Battery Free Temperature Sensor (BFTS)— any kit focused on temperature monitoring includes FENIX wireless battery-less temperature sensor tags. • Battery Free Pressure Sensor (BFPS)— pressure monitoring kits include VORTEX wireless bat- tery-less pressure sen- sor tags. • Batter Free Orienta- tion Sensor (BFOS)— when the users need a kit to monitor spatial orientation of assets KINEO wireless battery free sensor tags are shipped. • Battery Free Switch Sensor (BFSS)— any kit desired to monitor the open/ close status of a mechanical switch is shipped with XI wireless battery free switches. Farsens designs and manufactures full passive RFID sen- sor solutions. Their proprietary UHF RFID IC allows Far- sens to develop long range solutions for asset tracking— via the unique ID— and monitoring— via the attached sensor— without the need of any battery on the tag. (130202-VII) PIC32 Bluetooth® Audio Development Kit Microchip announced a new PIC32 Bluetooth® Audio Development Kit. The full-fea- tured kit enables custom application development on the PIC32 microcontrollers (MCUs) for Bluetooth and USB digital audio solutions. The creation of the Advanced Audio Distribution Profile (A2DP) by the Bluetooth Special Interest Group (SIG) has enabled convenient wireless stereo audio for applications such as smartphone home and automotive audio docks, wireless speakers, A/V receivers and all-in-one compact audio systems among others. Bluetooth audio support is now a regu- larly seen requirement for smartphone docking solutions. Consumers are able to use their phone as a music source, as well as, a remote control to select the song of their choice and play it from across the room. The PIC32 Bluetooth Audio Development Kit that ships with audio streaming demo code delivers up to 24-bit, 192 kHz audio and has been tested with over 100 different Bluetooth audio enabled devices, spanning 18 different manufacturers. The Bluetooth Flardware module and the Bluetooth A2DP audio software have been Bluetooth.org certified, sav- ing the developer significant certification costs. The modular design allows developers to swap out the included daughter boards (one for Audio and one for Bluetooth), to create their own custom versions with their preferred audio and wireless solution. The kit also supports USB Host and Device connectivity, Apple® device authentication module interface, a 2-inch color LCD, five general-purpose but- ton switches, 5 LEDs and a Plug-In-Module interface for PIC32 microcontroller upgrades. The PIC32MX450F256 MCU is included which runs at 80 MHz with 256 KB Flash and 64 KB RAM. With such a broad feature-set and flexibility, the kit makes an excellent general purpose development tool. The PIC32 Bluetooth Audio Development Kit (part # DV320032, $199.99), Bluetooth Audio Suite 1 (part# SW320014-1, $299.00), Blue- tooth Audio Suite 2 (part# SW320014-2, $499.00) are available for purchase today. www.microchip.com/get/lFL9 (130249-1) www.elektor-magazine.com | December 2013 | 65 Industry NANOTHERM™ Dramatically Improves Chip-on- Heat-Sink Technology UK firm Cambridge Nanotherm has won a Frost & Sullivan Innovation Award for Chip- on-Heat-Sink designs enabled by NANOTHERM™, a substrate technology that combines ultra-low thermal resistance with high dielectric strength. Manufacturers of electronic devices that run hot, such as power supplies, power LEDs and thermoelectric circuits, can achieve excellent thermal performance and electrical isolation by using NANOTHERM, at a substantially lower cost than comparable alumi- num nitride-based substrates in use today. By reducing the cost of producing a strong dielectric (75 kV/mm) with ultra-low ther- mal resistance (0.02°Ccm 2 /W), Cambridge Nanotherm has thus brought high thermal performance within reach of a much wider range of applications. NANOTHERM draws on a patented technique for growing a dielectric ceramic layer of nano-scale aluminum oxide crystals on aluminum of any shape. It enables precise control of the ceramic layer's thickness to sub- micron tolerances, to produce substrates with precisely specified dielectric strength and thermal resistance. In the Chip-on-Heat-Sink (CoHS) implementation cited by Frost & Sullivan, a NANOTHERM dielectric layer grown on a heat sink is combined with metallization, which bonds a copper circuit layer to the dielectric. This allows a chip to be mounted directly on a heat sink, eliminating the PCB and adhesive layers which are required in conventional assemblies, and which constrict the flow of heat from the chip to the heat sink. Frost & Sullivan has recognized the value of this technology to manufacturers of LED lighting equipment, awarding Cambridge Nanotherm its 2013 European Thermal Management Solutions for LED Light- ing Technology Innovation Award. NANOTHERM technology allows the temperature at which the LED die runs to be lowered by up to 22°C. As such, higher power can be pushed to the LED, thus increasing its light output. This in turn means customers can operate fewer LEDs but get higher light output at the same time. Steven Curtis, Chief Engineering Officer at Cambridge Nanotherm, said: "This Frost & Sullivan innovation award is a testament to the huge impact NANOTHERM is set to make across of a wide range of high-temperature electronics applications. Until now, the very high thermal performance of advanced dielectric materials has only been matched by their very high price. The innovative mass-production techniques underpinning our NANOTHERM technology mean that a dielectric offering negligible thermal resistance is now available to every mainstream and cost-sensitive application." Products based on NANOTHERM technology are available now in production volumes. These include isolated heat sinks, CoHS implementations, substrates for hybrid circuits, and lightweight replacements for direct- bonded copper substrate. www.camnano.com. (130249-VI) Audio Precision Brings AP Performance to Loudspeaker Test Audio Precision announced a new software release that expands the features of the electro-acoustic test suite for APx audio analyzers. APx v3.4 adds Thiele/Small parameters, Complex Impedance and Loudspeaker Pro- duction Test to the APx platform. This expanded elec- tro-acoustic capability makes APx audio analyzers the preferred choice for designing and testing integrated audio products that incorporate electronics, digital sig- nal processing and loudspeakers. In addition to the new measurements, the APx electro-acoustic suite includes an Energy Time Curve (for quasi-anechoic measure- ments), Impulse Response, Frequency Response, Rela- tive Level, Phase, Distortion Product Ratio, Distortion Product Level, Rub and Buzz, and Modulated Noise (for air leak detection). Output options include waterfall charts and polar plots via APx utilities. Converged Audio Test covers all aspects of today's integrated audio prod- ucts. AP is the recognized standard in analog audio test with ultra-low distortion, wide input and output ranges and high accuracy measurements, while APx I/O options provide native connectivity for a wide range of digital formats including Bluetooth, HDMI, PDM, and Digital Serial. With the expansion of the APx electro-acoustic test suite, integrated audio products can be tested in 66 December 2013 www.elektor-magazine.com news & new products every domain, at every step from R&D to Production. R&D engineers working on integrated audio prod- ucts must be able to obtain reliable results from each part of the signal chain, from analog inputs to digi- tally processed compensation to power amplifiers and loudspeakers. The complete APx electro-acoustic suite is ideal for these tasks, with incredible flexibility and reporting capacity. The full range of Thiele/Small parameters may be obtained using added mass, known volume or known mass methods. For high speed production test, impedance magnitude and phase plus a limited set of Thiele-Small parameters are calculated (along with Frequency Response, Rela- tive Level, Phase, Distortion Product Ratio, Distortion Product Level, Rub and Buzz) from a single log sweep. Because APx is a unified platform, R&D can define tests and acceptable ranges of results, sending this informa- tion directly to the factory for complete quality control of the manufacturing process. The new electro-acoustic measurements are enabled through two new software options. Both options are available concurrent with the APx500 v3.4 release. An APx analyzer is required to run the measurements. All models support the below options. APX-SW-SPK-RD (for R&D): Impedance magnitude, Impedance phase, Impedance real, Impedance imagi- nary, complete Thiele-Small Parameters, Energy Time Curve, Impulse Response, Frequency Response, Rela- tive Level, Phase, Distortion Product Ratio, Distortion Product Level, Rub and Buzz, and Modulated Noise. Includes all measurements in the Loudspeaker Produc- tion test measurement detailed below and polar plots and waterfall graph utilities. Price is $1500 in US. APX-SW-SPK-PT (for production test): Frequency response, Relative Level, Phase, Distortion Product Ratio, Distortion Product Level, Rub and Buzz, Impedance Mag- nitude, Impedance Phase, Limited Thiele-Small Param- eters and Modulated Noise. Price is $750 in US. http://ap.com (130249-11) PCB Pixture: Personalized PCBs Why would you want to personalize the appearance of your PCB design? Well, your boards may be visible in the final product and you want to add customer appeal or brand awareness. Or as a prototype designer you want your customers and prospects to recognize your work and send you new projects. Existing ways to personalize PCBs include adding a logo in the legend; using a different solder mask color or designing a recognizable board shape. Now Eurocircuits offers something more— PCB PIXture. Eurocircuits developed software to break a graphical image into pixels and convert the image to DPF (dynamic process format) or extended Gerber. These are formats used in PCB production. With this software tool, graphical layers as well as other PCB design layers can be combined. Eurocircuits can now add any graphical image into a PCB dataset and create an extra image layer for printing as a solder mask layer. The PCB PIXture is printed on the boards as a double solder mask layer. The first layer is a white photo imageable solder mask made in the normal way. The second layer, printed over the first, is a black solder mask layer with the artwork based on the PIXture file. This process does not affect the functionality of the board or the solderability, as the material used is standard photo imageable solder mask ink. PCB Pixture is now available on request and will be implemented soon in Eurocir- cuits PCB pooling services. http://www.eurocircuits.com/index.php/eurocircuits-printed-circuits-blog (130249-V) www.elektor-magazine.com | December 2013 | 67 Tech The Future Microgrids Independent local power grids By Tessel Renzenbrink (Elektor TTF Editor) The residents of the Faroe Islands have set up their own microgrid. A microgrid is an autonomous local network of distributed power sources and loads. It can operate either independently ("island mode") or linked to the main power grid. When linked to the main power grid, it can supply or receive power. An important property of a microgrid is that it acts as a single controllable unit with respect to the main power grid. Microgrids are one of the answers to the question of how to increase the share of sustainable sources in the energy mix. At the Microgrid Forum held in Amsterdam on September 18 and 19, Bjarti Thomsen, an engi- neer and project developer at the Faroese Earth and Energy Directorate, explained why they opted for a microgrid. The Faroe Islands are sit- uated in the North Atlan- tic Ocean approximately halfway between Norway and Iceland. They form an autonomous adminis- trative district within the Kingdom of Denmark. Due to their isolated location, the Faroe Islands have never been connected to the mainland power grid. Their main source of energy is imported oil. Staying warm, particularly in the winter, is an expensive proposition. The average household consumes about 1,000 gallons of oil per year at a cost of 24,000 Danish crowns (about $4,300; €3300; £2700). The island residents, numbering roughly 50,000, decided to make the move from fossil fuels to sustainable energy. They have various reasons for this, including the anticipated economic pres- sure from rising oil prices, greater independence in meeting their energy needs, and reducing C0 2 emissions. The climate and the location of the Faroe Islands offer good prospects for utilizing alternative energy resources. There's nothing to stop the wind in the middle of the ocean, and particularly in the winter months— when energy demand is •CfwwiUnd yM ■; ' JL Harvfogiatr Sifjf Ai ' ' ■ I / FWO£ ISLANDS’', jggfdj ^ ^ ti.WV.JAi 9 f r_i ■■nlBl Afortfl Attorrtft EJcmw ^ — -J -■ ■ | B | U nviiii n inn IHcbikkiJ kM« • f [. Wrwy k. Jr W t * m Aiaed l.linrf. fi ferric n f Cl T ^4 NurtA QMIlUlt 1 J 1 if ' ™ ‘ MAf« . . lit . f l* HI in - B ndUnd HfitwHpndi man my l-WiAd J an etWLr* greatest— there is a lot of wind. A microgrid has been established on Nolsoy, one of the eighteen Faroe Islands, to add wind to the energy mix. Sustainable power integration The power grid of the Faroe Islands, like most national grids, is not designed to accommodate the large-scale integration of distributed intermit- tent power sources. It is a centralized grid with a limited number of large power plants. The distri- bution network only works in one direction: from the power plants to the loads. The network man- ager can control the supply, but not the demand. Connecting a large number of sources supplying power on an irregular basis to a grid of this sort causes variations in the grid voltage. By contrast, a microgrid can accommodate fluc- tuations in generation because it uses computer systems to manage the power balance intelli- gently and dynamically. Demand and supply are coordinated by shedding loads when less gen- erating capacity is available. Based on a priority scheme, the supply of power to specific devices, such as those having their own batteries (elec- tric cars and laptop computers, for example), is temporarily discontinued. Another important component of a microgrid is energy storage. This acts as a buffer to handle periods when generating capacity is greater or less than demand. Energy can be stored in bat- teries or other facilities when the grid voltage rises, and then fed back into the grid when the voltage drops. Dynamic network management enables a micro- grid to handle a large number of distributed 68 December 2013 www.elektor-magazine.com Microgrids sources, such as wind turbines and solar pan- els. It uses them primarily to supply power to the loads in its own network. If excess capacity is available, it supplies power to the main grid as a single entity. In this way it acts as an inter- mediary between distributed energy sources and the main grid. Obstacles Microgrids do not come cheap. At present the cost per kilowatt-hour is not competitive with conventional power grids. This is why microg- rids are mainly implemented in isolated locations such as islands, mining sites and isolated rural communities. Most of the people attending the forum in Amsterdam were stakeholders: inves- tors, companies, engineers and representatives of areas where microgrids are potential option. Accordingly, a lot of attention was also given to the obstacles to cost-effective operation. Microgrids do not scale easily. Each location is unique in terms of energy demand and available energy resources. In the case of the Faroe Islands system, the main requirement is to meet the demand for heat, and wind energy is available. By contrast, a microgrid for a mining site in the outback of Australia has to able to keep heavy machinery running using diesel generators, solar panels and wind energy. It is therefore not pos- sible to build an optimized microgrid that can be exported to every corner of the world. A related aspect is the lack of standardization. Microgrids rely on complex interactions between generators, storage facilities, voltage and fre- quency control systems and computer infrastruc- ture. From many of the stories related by various speakers at the forum, it was apparent that each time a microgrid is developed and implemented, the parties involved in the process have to devise new solutions in order to achieve interoperability between the various systems. The forum attend- ees agreed that better coordination between the players in the chain would foster the develop- ment of microgrids. It was also clear that energy storage is still a bottleneck for the large-scale implementation of intermittent energy resources. Enormous advances in battery technology with regard to quality and cost have be been made as a result of the automobile industry's massive interest in electric vehicles. However, the cost per kilo- watt-hour of energy from sustainable resources in combination with battery storage is still sig- nificantly higher than with a conventional power grid. It can be cost-effective for isolated areas without access to a power grid, such as the Faroe Islands, but for ordinary use battery storage is still too expensive. A member of the audience raised the question of why the discussion on energy storage focuses almost entirely on batteries instead of considering other options, such as hydrogen or flywheels. No truly satisfactory answer was given. Nevertheless, there is a genuine future for micro- grids. The share of renewable energy in the mix will continue to grow due to the finite nature of fossil fuels and the resulting rise in fuel prices, as well as efforts to reduce C0 2 emissions. Popular support for alternative forms of energy can also be seen from the fact that more and more peo- ple want to look after their own energy needs. At the household level this can be achieved by installing solar panels on the roof, but it can also be achieved at a larger scale by joining together to launch a wind turbine project. To enable the utilization of distributed intermit- tent resources, current centralized power grids will have to be transformed into smart, dynamic 21st-century systems. Microgrids offer a means to implement this transition in a phased manner. The next edition of the (130250-1) Microgrid Forum will be Internet Link held on November 11-13 in [1] www.microgridforum.com/ Singapore. www.elektor-magazine.com December 2013 69 •Magazine By Chuck Hansen (USA) Figure 1. 0B4 Insulation Tester front panel. Bendix 60B4-1-A AC/DC Insulation Tester Megger, Hi-Pot, and Arc-in-the-Dark The theory behind insulation and dielectric testing is that if the insulation system in the equipment under test can withstand a deliberate overvoltage stress, it will easily operate under all specified normal and abnormal electrical and environmen- tal conditions for its entire design life. The original insulation test method used a high voltage AC power supply with an external mil- liammeter to read the leakage current. Back in the late 1950's Bendix decided to design a more versatile AC-DC high-voltage insulation tester. It was assigned Bendix type number 60B4-1-A. While it was initially designed for in-house pro- duction testing, a market evolved among their customers since the 60B4 was quite robust and fool-proof. 60B4 testers even show up occasion- ally on eBay. The tester came with an aluminum carrying case and a latching removable front cover. It is roughly 16 x 10 x 8 inches (415 x 260 x 200 mm). With its three large power transformers and a variac, it weighed a hefty 28.5 lbs (13 kg). The three- wire power cord and three test probes are stored in a compartment at the bottom-front of the tes- ter, and are an integral part of the tester. This is done to prevent loss of the expensive probes or substitution of unsafe probes (alligator clips, etc.) with inadequate insulation (Figure 1). The 60B4 has an output voltage range of 0 to 3500 volts AC or DC, with an adjustable trip level from 2 to 15 mA. Testing could be monitored by means of the 0-3500 voltmeter and 0-15 mA meter on the front panel. The tester has three test probes constructed from Bakelite tubes. The black probe is common, while the red probe (above) is for DC testing and the yellow probe is for AC testing. The high-voltage brass probe tips are spring-loaded and automat- ically retracted inside the Bakelite handle when the operator released the extension slide button (the white button on the probe above). The rotary switch next to the front panel volt- meter selects AC or DC test mode. The trip adj control next to the milliammeter is used to adjust the mA trip level, which trips a relay to cut off the applied voltage if the test current exceeded the trip level. This trip current is set in either AC or DC mode with the following procedure: 1. Set the test voltage to zero with the eo adj variac control. 2. If the trip light is illuminated, press the reset switch on the right, below the ac dc MILLIAMMETER. 3. Turn the trip adj control fully clockwise. 4. Press, then hold in, the calibrate pushbut- ton switch. 5. Slowly increasing the eo adj variac until the desired value of trip current is shown on the ac dc milliampere meter. 6. With the calibrate switch still depressed, turn the trip adj control slowly counter-clockwise until the trip lamp illuminates. 70 December 2013 | www.elektor-magazine.com /ftefoarecg XXL Aerospace and military test requirements The MIL specs to which aerospace electric power equipment is designed calls for the following insu- lation and high-potential (Hi-Pot) dielectric test methods: 1. There is an initial insulation resistance test with a hand-cranked permanent magnet gen- erator that produces 500 VDC. This device, also called a Megger, has a very high megohm resistance scale. The insulation resistance must read above a specified megohm value. 2. Next, a Dielectric Strength (Hi-Pot) Test at commercial power line frequency is applied between the machine current-carrying con- ductors and metal frame for the specified time. Electronic Control units are tested from each connector terminal to case. 3. RFI filter capacitors and electronic devices shall be disconnected if this test is likely to damage them. Electronic units required use of a special shorting connector which con- nects all active connector pins together, with a separate pigtail wire which is connected to the metal chassis. Test condition A pertains through qualification and field usage, and the higher-stress condition B is required during acceptance testing. a. Circuits of 50 V and less; 500 V rms for 1 minute or 600 V rms for 5 seconds. b. Circuits over 50 V; Twice rated voltage plus 1,000 V rms for 1 minute, or 120 percent of the 1 minute voltage for 1 second. c. Capacitors and electronic devices prior to assembly shall be subjected to and shall withstand a dc test voltage of twice the maximum peak voltage encountered during normal operating conditions. 4. Equipment designed for 28 VDC aircraft power (a) is Hi-Pot tested at 500 V rms (Test condition A) or 600 V rms (Test condition B). 5. Equipment designed for 115 VAC three-phase aircraft power (b) is Hi-Pot tested at 1250 V rms (test condition A) or 1500 V rms (test condi- tion B). This particular AC test level is used because a 115 VAC power source, generator or inverter, has to compensate the feeder volt- age drop between the source output terminals and the 115 VAC point-of-regulation at the power contactor input terminals. With all the IESF 20041 Retronics is a monthly section covering vintage electronics including legendary Elektor designs. Contributions, suggestions and requests are welcome; please telegraph editor@elektor.com tolerances on rated voltage and up to 5 V rms feeder drop, this could result in a steady-state 125 V rms at the source output terminals, thus the 1250 or 1500 V rms test level. You can see how this procedure could require a three- or four-handed operation, since it required holding two test probes against the unit under test (uut), then slowly adjusting eo to the speci- fied test voltage while also monitoring the leakage current. This inevitably led to many resourceful, but unauthorized, methods to defeat the auto-re- tract safety feature of the test probes using alli- gator clip leads to connect at least one probe to the uut. When AC voltage is used for the Hi-Pot test, there will always be some leakage current because of the capacitance from windings or circuitry to the metal frame or chassis. The operator slowly increases the test voltage up to the specified limit. There is always the chance for any insulation breakdown to be potentially damaging (pun intended). The 60B4, with its mA Trip protec- tion is designed to prevent extensive insulation damage in case of an arc-over. An electrical arc might leave a carbon track or even break through the insulating material. The operator then has the chore of finding the exact the arc fault loca- tion, which requires darkening the work area in order to see the arc during a retest. Bendix furnished large black cloths at the test stands. The worker had to cover himself and the unit under test along with the Hi-Pot probes, then repeat the Hi-Pot test until he managed to notice the brief arc flash that pointed the way to the insulation failure location. In the summer, it was quite warm under the black cloth because Bendix had not yet air conditioned the production areas. Later 60B4 units had a motorized Eo variac with an automatic voltage rise-time control circuit similar to that in a triac light dimmer. Eo is the output voltage (AC or DC) at the Ml voltmeter. www.elektor-magazine.com j December 2013 | 71 •Magazine Figure 2. After the operator pre-set the maximum Eo uut 60B4-1-A schematic voltage, he used a foot-pedal switch to start and diagram. stop the Eo test. That made it easier to concen- trate on finding the insulation failure. Assuming the equipment passes the Megger and Hi-Pot test, it then had to pass a follow-up Meg- ger test to ensure there is no latent insulation damage from the Hi-Pot test. 60B4 Circuitry Fig ure 2 shows the schematic for the 60B4. When power switch S4 is closed, AC line power is connected to the primary of transformer T3, which supplies 5 VAC filament power to vacuum tube VI. VI is a 3B24WB half-wave rectifier rated for 20 kV PIV and 60 mA average DC current. It supplies high-voltage DC for the DC test mode. About Bendix Bendix Red Bank Division (later the Bendix Electric Power Division) in Eatontown, NJ was in the aerospace electric power business. They made starter-generators, dynamotors, alternators, transformer-rectifier units (TRUs), power converters and associated control units, primarily for aircraft. Part of the production test requirements was to verify the integrity of the insulation systems in these products. Insulation is necessary to isolate the current-carrying conductors from the iron laminations in the rotors and stators, and from the steel or aluminum equipment chassis. The tube in the unit featured in this Retronics installment was manufactured by Cetron. The secondary of T3 is also connected to the secondary of another 5 V transformer, T4. The 115 VAC primary winding of reverse-connected T4 is applied through the normally-closed (NC) contact of K1 to the coil of relay K2 when momen- tary reset Switch S2 is pressed. The coil circuit is sealed in by one of the normally-open (NO) contacts of K2 so S2 can be released. The second K2 contact set applies power to the trip indicator DS2 when tripped, and to Variac T1 when K2 is closed. Note that the low side of Relay K2 coil is connected to the 60B4 chassis rather than to the AC line neutral. In AC test mode variac T1 provides variable AC line voltage to the primary of high voltage trans- former T2, rated for 3500 VAC at 17 mA. The high side secondary of T2 is connected directly to the yellow AC test probe. The low side of T2 is in series with the AC connections of a full-wave diode bridge consisting of CR1-CR4, R7 and the wiper of one contact set of AC-DC mode switch SI. SI connects R7 to the AC input stud of mil- liammeter M2. The common lug of M2 is con- nected to the black Common test probe, com- pleting the circuit from the AC test probe through the dielectric/insulation material being tested. Voltmeter Ml shows the test voltage level. The CR1-CR4 rectifier bridge DC output is loaded by the coil of Kl, which serves as the test current sensing circuit. The bridge is also shunt loaded by R5 and trip adj control R6. When the control is fully CW to its minimum resistance, most of the bridge current flows through R5. As the trip adj control is adjusted CCW to increase its resis- tance, more current flows through the coil of trip relay Kl. Once the trip current level is reached, Kl will operate and open the 5 VAC winding of T4. This removes the 115 VAC from the coil of K2. K2 will trip and open the AC line connection to variac Tl, and illuminate the trip indicator. When calibrate switch S3 is depressed, it completes a circuit to the black Common probe through dummy load resistor R8. R8 is 100 kohms, 91 watts (!) and draws 1 mA for each 100 volts AC or DC of test voltage. In DC test mode the high-voltage winding of T2 is switched by SI to the plate cap of VI. The half-wave rectified high-voltage at the filament/ cathode is filtered by Cl into a smooth DC level 72 December 2013 f www.elektor-magazine.com ^efawitcd XXL and applied to the red DC test probe. R1-R4 will discharge Cl when the power is turned off. The DC test current follows the same path through the current sense circuit as the AC test mode. The custom-made voltage and milliamp meters have three studs rather than the usual two. One stud is the common and the other two are the connections for the AC and DC modes, switched through SI. The Common (-DC) stud on voltmeter Ml is con- nected to the low side of step-down resistors Rll- R15. Inside voltmeter Ml, there is a full-wave bridge rectifier and a resistor calibration network connected in series. The meter movement and its parallel 133-ft step-down divider resistor are connected directly across the dc output of the internal rectifier bridge. In the AC mode, the AC meter current is switched by SI to the AC stud, then though the internal rectifier bridge across the meter movement. The R11-R15 divider com- pletes the meter AC sensing circuit back at the Common stud. In DC mode, the +DC stud has an additional series calibration resistor pair from the +DC stud to the AC stud. From there the voltme- ter circuit path is the same as for AC mode. In both AC and DC modes the meter current passes through the internal meter voltmeter full-wave Figure 3. 60B4 internal construction. ■ Advertisement powered by Eurocircuits Elektor Benefit now: Elektor PCB Service offers a permanent 90-day launch discount on new Elektor PCBs! Check www.elektor.com/ncb.for an overview of all Elektor PCBs www.elektor-magazine.com : December 2013 | 73 •Magazine Figure 4. 60B4 more internal construction meter rectifier. rotary switch, in the center of the photo, was built by Bendix Test Equipment department from aluminum oxide wafers and cylinders (Bendix Red Bank was also in the vacuum tube business from 1951-1962 and used lots of aluminum oxide for their tube element supports [1], The switch has a notched nylon disk with a spring-loaded follower on the front panel for indexing the two AC and DC switch positions. The large oil capacitor on the lower left is DC fil- ter cap Cl. The two large R7 and R8 wire-wound 91-watt bar resistors are mounted on long hex spacers above Cl. The trip adj pot is directly in front of them. The calibrate pushbutton switch and its actuator rod can be seen in front of the hex spacers. The M2 milliammeter also has an internal full- wave rectifier bridge and, as with the voltmeter, both AC and DC mode current pass through the rectifier bridge. The bridge is loaded by a current shunt resistor and the meter movement. Internal Construction Figure 3 shows the internal construction of the 60B4 Insulation Tester. The 3B24WB high-volt- age rectifier tube is mounted between the three fixed transformers. The two large transformers were custom-built by Thordarson for Bendix. The smaller 5-volt transformer is a standard (now called COTS, for 'commercial-off-the-shelf') unit. All the other components are mounted on a thick piece of Micarta insulating material. The Dale power resistors on the right are R11-R15 step- down resistors for the Ml voltmeter, which is directly in front on the aluminum face plate. K1 relay is located below these resistors, next to the small transformer. The rear wafer of the custom high-voltage SI I'm shocked! You might remember the AC-DC five-tube AM radios from the 1940's and 50's. It was common practice for the series-connected filaments and high voltage plate supply to be derived directly from the AC line voltage (115V or 220V). In the USA, line cord plugs were not polarized back then and three-prong AC sockets were rare, so if the plug was inserted backwards, the 115 VAC live voltage appeared on the steel chassis. If someone were to accidentally touch the chassis, they could get quite a good shock. Thus the radio's owner unwittingly served as a type of insulation tester. The T1 voltage adjust variac windings can be seen in Figure 4 just below the white front wafer switch insulators for SI. The voltmeter c, dc and ac stud connection designations are epoxy ink stamped on the top edge of the Micarta board. The corresponding wire connections to the volt- meter studs are shown. The neon indicator and resistor, the power switch and fuse are located on the lower right next to the probe compartment. This particular unit was apart because it needed a voltmeter recalibration. Disassembling the volt- meter to access the internal resistor network is delicate work, since the backing plate holding the two Va W metal-film resistors and four 1N4002 bridge diodes is part of the dial face, and it all has to be slipped past the meter needle to remove and replace it. The repairman wisely decided to put the new resistors on the rear +DC and AC studs. This will make it easier for the next repairman if the meter needs recalibration in the future. Finally, I should mention that the 60B4 is not qualified fortesting to international safety stan- dards IEC60950-1 or IEC60601-1. (130251) Reference [1] A Brief History of Bendix Red Bank Tubes, Charles Hansen, ISBN 1-882580-50-8, Audio Amateur Press/Old Colony Sound Labs (now audioXpress, an Elektor International Media publication). 74 December 2013 | www.elektor-magazine.com Ordering Information ORDERING INFORMATION To order, contact customer service for your region: USA / CANADA Elektor US 111 Founders Plaza, Suite 300 East Hartford, CT 06108 USA Phone: 860.289.0800 E-mail: service@elektor.com Customer service hours: Monday-Friday 8:30 AM-4:30 PM EST. UK / ROW Elektor International Media 78 York Street London W1H 1DP United Kingdom Phone: (+44) (0)20 7692 8344 E-mail: service@elektor.com Customer service hours: Monday-Thursday 9:00 AM-5:00 PM CET. PLEASE NOTE: While we strive to provide the best possible information in this issue , pricing and availability are subject to change without notice. To find out about current pricing and stock , please call or email customer service for your region. COMPONENTS Components for projects appearing in Elektor are usually available from certain advertisers in the magazine. If difficulties in obtaining components are suspected, a source will normally be identified in the article. Please note, however, that the source(s) given is (are) not exclusive. TERMS OF BUSINESS Shipping Note: All orders will be shipped from Europe. Please allow 2-4 weeks for delivery. Returns Damaged or miss-shipped goods may be returned for replacement or refund. All returns must have an RA #. Call or email customer service to receive an RA# before returning the merchandise and be sure to put the RA# on the outside of the package. Please save shipping materials for possible carrier inspection. Requests for RA# must be received 30 days from invoice. Patents Patent protection may exist with respect to circuits, devices, components, and items described in our books, magazines, online publications and presentations. Elektor accepts no responsibility or liability for failing to identify such patent or other protection. Copyright All drawings, photographs, articles, printed circuit boards, programmed integrated circuits, discs, and software carriers published in our books and magazines (other than in third-party advertisements) are copyrighted and may not be reproduced (or stored in any sort of retrieval system) without written permission from Elektor. Notwithstanding, printed circuit boards may be produced for private and educational 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 connection 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 with respect to the goods. MEMBERSHIPS Membership renewals and change of address should be sent to the Elektor Membership Department for your region: USA / CANADA Elektor USA P.O. Box 462228 Escondido, CA 92046 Phone: 800-269-6301 E-mail: elektor@pcspubNnk.com UK / ROW Elektor International Media 78 York Street London W1H 1DP United Kingdom Phone: (+44) (0)20 7692 8344 E-mail: service@elektor.com O Do you want to become an Elektor GREEN or GOLD Member or does your current Membership expire soon? Go to www.elektor.com/member . www.elektor-magazine.com | December 2013 I 75 •Magazine Hexadoku Puzzle with an electronic touch For all of you who can't get enough of our special hexadecimalized Sudoku, here's a fresh puzzle for the long winter or hot summer evenings depending on where you are on the globe or in hyperspace. Find the solution in the gray boxes, submit it to us online, and you automatically enter the prize draw for one of four vouchers. The Hexadoku puzzle employs numbers in the hexadecimal range 0 through F. In the diagram composed of 16 x 16 boxes, enter numbers such that all hexadecimal numbers 0 through F (that's 0-9 and A-F) occur once only in each row, once in each column and in each of the 4x4 boxes (marked by the thicker black lines). A number of clues are given in the puzzle and these determine the start situation. Correct entries received enter a prize draw. All you need to do is send us the numbers in the gray boxes. Solve Hexadoku and win! Correct solutions received from the entire Elektor readership automatically enter a prize draw for one Eurocircuits PCB voucher worth $ 140.00 (£ 80 . 00 ) and three Elektor book vouchers worth $ 60.00 (£ 40 . 00 ) each, which should encourage all Elektor readers to participate. Participate! Before January 1, 2014, supply your personal details and the solution (the numbers in the gray boxes) to the web form at www.elektor.com/hexadoku Prize winners The solution of the October 2013 Hexadoku is: FCDE8. The Eurocircuits $140.00 (£80.00) voucher has been awarded to D. Jacobs (Germany). The Elektor $60.00(£40.00) book vouchers have been awarded to Gilbert Luyckx (Belgium), Esko Viruu (Finland); Walter Mei (Italy). Congratulations everyone! 4 2 1 7 B 8 0 9 3 B F E A 2 9 D F 7 1 E 9 3 F D 1 9 0 C 2 8 F D A F 2 B 1 D 0 4 E 8 0 8 D 7 4 C E 5 9 j A D 7 1 2 3 4 A 7 E 1 2 5 6 8 D 7 F E 1 C F D 5 7 6 9 F 8 i 3 6 0 6 7 B 2 9 A 8 F 3 D 7 F 4 [ C 2 5 e" B C 5 °1 B F 1 E D 9 6 The competition is not open to employees of Elektor International F 0 5 4 E 9 3 8 2 D 7 B 1 6 A C 1 3 8 C 5 A B 0 E F 9 6 2 4 7 D 2 A D 6 F 1 C 7 3 0 4 8 B 5 9 E 7 9 B E 2 4 D 6 1 5 A C 3 8 F 0 0 1 E F 3 2 A 4 B C 5 7 8 9 D 6 c B 3 D 1 8 5 F 9 2 6 0 A 7 E 4 4 7 2 5 6 B 9 E 8 A D 1 C F 0 3 A 6 9 8 0 C 7 D 4 3 F E 5 B 2 1 8 E 6 7 4 F 1 5 C B 2 9 D 0 3 A 9 4 F 2 7 6 0 A 5 1 3 D E C B 8 5 C 0 3 8 D 2 B 6 7 E A F 1 4 9 B D A 1 C 3 E 9 F 8 0 4 6 2 5 7 3 5 7 A 9 E 8 1 0 6 B F 4 D C 2 6 2 4 0 A 7 F C D E 8 5 9 3 1 B D F 1 9 B 0 6 2 A 4 C 3 7 E 8 5 E 8 C B D 5 4 3 7 9 1 2 0 A 6 F Media, its business partners and/or associated publishing houses. 76 December 2013 f www.elektor-magazine.com Gerard's Columns Retronics Personified By Gerard Fonte (USA) Reading the Retronics pages in Elektor got me thinking about my 50 years in electronics. I started at age twelve and was lucky to experience the transformation from tubes to transistors to integrated circuits to personal computers to embedded computers and to the Internet. I don't think any 50-year period has seen such a transformation in any craft in history. And I don't think it's likely to happen again. In the Beginning A kid without much money had a hard time getting parts for projects. But unlike today, old radios and TVs could be disassembled and their parts reused. In a few years I had drawers of recycled tubes and transformers and hundreds of resistors and capacitors. Of course these parts were nowhere near the quality of today's parts. Standard resistors had 20% tolerance. Worse, these components were screened to remove the 10% and 5% parts which sold at a better price. So your 1000-ohm resistor was either 800 to 900 ohms or 1100 to 1200 ohms. It's amazing that anything worked at all. Most experimenters only had a VOM (Volt-Ohm-Milliammeter) or VTVM (Vacuum-Tube-Volt-Meter) for instrumentation. And they were expen- sive. My VOM cost $29.95 in 1967 ($216 today) and I mailed in a $5.00 payment for 6 months. There were no bank credit cards in those days. I had an after-school job as a stock-boy (now "stock-clerk") in a local drugstore that paid $1.85 an hour. (I knew that it would only give my parents a good laugh if I asked them to pay for it.) In a few years I was able to acquire the Holy Grail of instruments— an oscilloscope! It cost $129 as a kit (Eico 460) and was a "wide-band" 'scope that could respond all the way up to 5 MHz. My parents tried hard to talk me out of wasting my money with this expensive instrument. But they couldn't. And in the long run I think that they agreed that I got my mon- ey's worth from it. Electronics was not just another passing fad for me. The projects of those days were very simple when compared to today. After all, what could you do with a just couple of tubes or transistors? There were uncounted variations of oscillators and amplifiers and simple radios. Amateur radio (Ham Radio) was a big thing. Everybody had a short-wave radio of some sort if they were "serious" about electronics. That meant lots of experimentation with antennas. This was both a simple and complex topic. There was considerable math in regards to optimal length for a particular frequency, etc. But, that was generally ignored. It was much more fun to build strange and wonderful creations and then climb out onto the roof to try them out. A Different World In 1961 the US invaded Cuba (Bay of Pigs). In 1962 there was the Cuban Missile Crisis where the US and the Soviet Union came within a hair's- breadth of full-scale nuclear war. In 1963 President Kennedy was assas- sinated. The 60's was the time of hippies and the "counterculture". There were three TV channels (ABC, CBS and NBC). Color TV, stereo phonographs and FM radio were just coming into their own. Getting involved in electron- ics was easy. All you really needed was a 150-watt sol- dering gun (nobody used irons— they were much too weak). There were many more magazines about electronics, radio and TV than now. The public library was a major asset. Nowadays it's much harder. First you have to pick a specialty. Are you inter- ested in computers? If so, then there are the subsets of PC's or embedded with operating systems of Linux or Windows. Or computer hardware ver- sus software. And then there are the "Apps" for various phones and pads. It takes a great deal of effort just to find out if an area is interesting. No hobbyist had a specialty fifty years ago. There wasn't even much special- ization in the profession of electrical engineering. The Internet is such a fantastic tool that didn't exist then. First and fore- most is the access to so much information. It doesn't matter if you are an electronics novice or an expert, you can find what you need with a few keystrokes. Back then, you had to write a letter to the company and hope that they would mail you a catalog. Curiously, there were many more stores that sold electronic parts than today— probably because electronics was much less reliable then. There was Olsen, Lafayette and Tandy/Radio-Shack among others. So you could go downtown to buy resistors or capacitors for your project in an after- noon. Otherwise, you would have to mail-order them. Yes, snail-mail was a lot bigger in those days. (Fed-Ex didn't exist and UPS was not national.) The company typically mailed parts out at the end of the month or when- ever they felt like it (whichever was longer). It was not unusual to wait six weeks or more for your parts to arrive. Unchanging However there is one thing that hasn't changed a bit in fifty years: that's the curiosity and energy of hobbyists. People of all ages are still eager to learn and do new things. We form communities to share our knowledge and experience with others. We push the envelope to build amazing cre- ations and advance the state of the art for our own enjoyment. We are relentless in our pursuit of enlightenment. This doesn't occur very much in other areas of science (perhaps astronomy). So electronic hobbyists are a special breed. And, that's something to be proud about. (130387) www.elektor-magazine.com j December 2013 j 77 •Store 10°/o DISCOUNT for GREEN and GOLD Members! www.elektor.com/books I Process Measurements with C# Applications Measurement is vital to the successful control of any process. This book introduces PC based measurement systems and software tools for those needing to under- stand the underlying principles or apply such technigues. Throughout the book, the C# programming language is used to give the reader immediate practical desktop involvement. C-Sharp has a wide support base and is a popular choice for engineering solutions. The basics of measurement and data capture systems are presented, followed by examples of software post-processing. Application examples are provided from a range of pro- cess industries, with reference to remote monitoring, distributed systems and current industrial practices. 144 pages • ISBN 978-1-907920-24-0 £24.50 • € 27.50 • US $39.50 Learning to fly with Eagle . EAGLE V6 Getting Started Guide This book is intended for anyone who wants an intro- duction to the capabilities of the CadSoft's EAGLE PCB design software package. This book will quickly allow you to obtain an overview of the main mod- ules of EAGLE: the schematic editor; layout editor and autorouter in one single interface. You will apply your knowledge of EAGLE commands to a small project, learn more about some of the advanced concepts of EAGLE and its capabilities and understand how EAGLE relates to the stages of PCB manufacture. After reading this book while practicing some of the examples, and completing the projects, you should feel confident about taking on more challenging endeavors. 208 pages • ISBN 978-1-907920-20-2 £29.50 • € 34.50 • US $47.60 The luxury of precision within everyone's reach E 500 ppm LCR Meter The remarkable precision of this device and its amazing ease of use are the result of careful design. It works so well behind its uncluttered front panel that one could almost forget the subtleties of the measurement tech- niques employed. A dream opportunity for our readers who are passionate about measurement to enjoy them- selves. If, like us, you wonder at the marvels modern techniques bring within our reach, come along and feel the tiny fraction of a volt. Set: main board and LCD board, assembled and tested Art.# 110758-93 See www.elektor.com/lcrmeter Display, buttons, real time clock and more Elektor Linux Board E Extension This extension board was developed to further propel our Embedded Linux series of articles and the match- ing GNUblin board. It has a display, buttons, a real time clock and 16 GPIOs. Linux devotees, switch on your solder irons. The Linux extension board includes everything needed to provide the user interface for a wide variety of projects! Module, SMD-populated and tested board, incl. LCD1, XI, K1-K4, BZ1, BT1 for home assembly Art.# 120596-91 £31.10 • € 34.95 • US $50.20 140 Minutes video presentation and more . DVD Feedback in Audio Amplifiers In this Masterclass we address several aspects of feed- back in audio amplifiers. The focus of this Master- class, although not entirely math-free, is on providing insight and understanding of the issues involved. Presenter Jan Didden provides a clear overview of the benefits that can be obtained by feedback and its sib- ling, error correction; but also of its limitations and disadvantages. Recommended to audio designers and 78 December 2013 | www.elektor-magazine.com Books, CD-ROMs, DVDs, Kits & Modules Gvrhani H. Jdolk Ktnkfi Bitntn WIFARl Did (ortMtku Cards mi Applj'aifon serious audio hobbyists! ISBN 978-907920-16-5 £24.90 • € 29.95 • US $40.20 Taming the Beast FPGA Development Board fePGAs are unquestionably among the most versatile but complex components in modern-day electronics. An FPGA contains a maze of gates and other circuit ele- ments that can be used to put together your own digital circuit on a chip. This FPGA development board (designed in the Elektor Labs) shows how easy it is for any electron- ics enthusiast, whether professional or amateur, to work with these programmable logic devices. Module, ready build and tested Art.# 120099-91 See www.elektor.com/fpgaboard Programming step-by-step I Android Apps This book is an introduction to programming apps for Android devices. The operation of the Android system is explained in a step by step way, aiming to show how personal applications can be programmed. A wide variety of applications is presented based on a solid number of hands-on examples, covering anything from simple math programs, reading sensors and GPS data, right up to programming for advanced Internet appli- cations. Besides writing applications in the Java pro- gramming language, this book also explains how apps can be programmed using Javascript or PHP scripts. When it comes to personalizing your smartphone you should not feel limited to off the shelf applications because creating your own apps and programming Android devices is easier than you think! 244 pages • ISBN 978-1-907920-15-8 £34.95 • € 39.95 • US $56.40 MIFARE and Contactless Cards in Application EE RFID MIFARE is the most widely used RFID technology, and this book provides a practical and comprehensive intro- duction to it. Among other things, the initial chapters cover physical fundamentals, relevant standards, RFID antenna design, security considerations and cryptog- raphy. The complete design of a reader's hardware and software is described in detail. The reader's firmware and the associated PC software support programming using any .NET language. The specially developed PC program, "Smart Card Magic.NET", is a simple devel- opment environment that supports sending commands to a card at the click of a mouse, as well as the ability to create C# scripts. Alternatively, one may follow all of the examples using Visual Studio 2010 Express Edition. Finally, the major smart card reader API standards are introduced. The focus is on programming contactless smartcards using standard PC/SC readers using C/ C++, Java and C#. 484 pages • ISBN 978-1-907920-14-1 £44.90 • €49.90 • US $72.50 t More than 75,000 components CD Elektor's Components ‘ Database 7 This CD-ROM gives you easy access to design data for over 11,100 ICs, 37,000 transistors, FETs, thy- ristors and triacs, 25,100 diodes and 2,000 opto- couplers. The program package consists of eight databanks covering ICs, transistors, diodes and optocouplers. A further eleven applications cover the calculation of, for example, zener diode series resistors, voltage regulators, voltage dividers and AMV's. A colour band decoder is included for deter- mining resistor and inductor values. All databank applications are fully interactive, allowing the user to add, edit and complete component data. ISBN 978-90-5381-298-3 £24.90 • € 29.50 • US $40.20 www.elektor-magazine.com December 2013 [ 79 •Store Wireless and button-free Android * Elektorcardioscope Instructive, fascinating, and potentially useful to everyone: perform your own electrocardiograms on your Android smartphone or tablet! The project involves skillfully combining a small PIC interface to control an analog input stage with a great deal of software. Our ECG interface is available in the form of a ready- to-use module to which you just have to add four electrodes and an Android application for smartphone or tablet; there's no physical connection between this terminal and the interface, as it uses Bluetooth com- munication! Ready assembled board Art.# 120107-91 See www.elektor.com/elektorcardioscope 0 issues, more than 2,100 articles DVD Elektor 1990 through 1999 This DVD-ROM contains the full range of 1990-1999 volumes (all 110 issues) of Elektor Electronics mag- azine (PDF). The more than 2,100 separate articles have been classified chronologically by their dates of publication (month/year), but are also listed alpha- betically by topic. A comprehensive index enables you to search the entire DVD. What's more, this DVD also contains the entire 'The Elektor Datasheet Col- lection 1...5' CD-ROM series, with the original full datasheets of semiconductors, memory ICs, micro- controllers, and much more. ISBN 978-0-905705-76-7 £69.00 • € 89.00 • US $111.30 0 Concept, implementation and assessment Designing Tube Amplifiers This book looks at tube amplifiers from more than just a theoretical perspective. It focuses primarily on the design phase, where decisions must be taken with regard to the purpose and requirements of the ampli- fier, and it addresses the following questions: How do these aspects relate to subjective and objective criteria? Which circuits sound the best, and why? If you want to develop and market an amplifier, what problems should you expect? What are the significance and meaning of measurements? Are they still meaningful, or have they lost their relevance? Thanks to the enormous process- ing power of computers, we can now measure more details than ever before. How can these new methods be applied to tube amplifiers? Menno van der Veen will give you all the answers! 188 pages • ISBN 978-1-907920-22-6 £29.50 • € 34.50 • US $47.60 Belped By Arduino Mastering Microcontrollers The aim of this book is not only to let you enter the World of Arduino, but also to help you emerge victori- ous and continue your microcontroller programming learning experience by yourself. In this book theory is put into practice on an Arduino board using the Arduino programming environment. Having completed this fun and playful course, you will be able to program any microcontroller, tackling and mastering I/O, memory, interrupts, communication (serial, I 2 C, SPI, 1-wire, SMBus), A/D converter, and more. This book will be your first book about micro- controllers with a happy ending! 348 pages • ISBN 978-1-907920-23-3 £34.95 • € 39.95 • US $56.40 80 December 2013 | www.elektor-magazine.com Books, CD-ROMs, DVDs, Kits & Modules Mastering Surface Mount Technology Vsflcenl H' mpi* LabWorX 2 Companion DO IT YOURSELF Kits available www.elektor.com/labworx ; Prwtirv.il T S Di ^ ital Signal Processing 1 \ "usirifT hA..*rpccn iiuy. j?rs \\ ■f r— ■-* /V i v NX i Doliji - ! Ifcmjiiirn X ,T - 1 1 0lektor CIRCUIT CFI I Alt Display, SD card, Ethernet, RS-485, buttons and LEDs E! XMEGA Web Server Board This microcontroller board is particularly well suited to monitoring and control applications. The plug-in TCP/IP module allows you to implement a web server and other network-oriented applications and a microSD card provides mass storage. Four LEDs, four buttons, and a removable display provide the user interface options. And of course the board comes with a wide range of external interfaces. Controller Module Art.# 120126-91 See www.elektor.com/xmega LabWorX 2 I Mastering Surface Mount Technology This book takes you on a crash course in techniques, tips and know-how to successfully introduce surface mount technology in your workflow. Even if you are on a budget you too can jumpstart your designs with advanced fine pitch parts. Besides explaining method- ology and equipment, attention is given to SMT parts technologies and soldering methods. Many practical tips and tricks are disclosed that bring surface mount technology into everyone's reach without breaking the bank. A comprehensive kit of parts comprising all SMT components, circuit boards and solder stencils is avail- able for readers wishing to replicate three projects described in this book. 282 pages • ISBN 978-1-907920-12-7 £29.50 • € 34.50 • US $47.60 Ideal reading for students and engineers Practical * Digital Signal Processing using Microcontrollers This book on Digital Signal Processing (DSP) reflects the growing importance of discrete time signals and their UK /ROW Elektor International Media 78 York Street London - W1H 1DP United Kingdom Phone: +44 20 7692 8344 E-mail: service@elektor.com use in everyday microcontroller based systems. The author presents the basic theory of DSP with minimum mathematical treatment and teaches the reader how to design and implement DSP algorithms using popular PIC microcontrollers. The author's approach is practical and the book is backed with many worked examples and tested and working microcontroller programs. The book should be ideal reading for students at all levels and for the practicing engineers who may want to design and develop intelligent DSP based systems. Undergraduate students should find the theory and the practical proj- ects invaluable during their final year projects. Simi- larly, postgraduate students should be able to develop advanced DSP based projects with the aid of the book. 428 pages • ISBN 978-1-907920-21-9 £44.90 • € 49.90 • US $72.50 Elektor US 111 Founders Plaza, Suite 300 East Hartford, CT 06108 USA Phone: 860.289.0800 E-mail: service@elektor.com Further Information and Ordering: WWW.elektOI\COITl/store or contact customer service for your region USA / CANADA www.elektor-magazine.com j December 2013 81 •Magazine NEXT MONTH IN ELEKTOR MAGAZINE Extra Thick Double January & February 2014 Edition Traditionally Elektor's first edition of the year is a double one with extra load of projects, ideas and tips. The scope is varied and consists of a mix of large and small items. Of course there are various microcontroller projects, but there is also room for measurement and con- trol projects, analog electronics such as audio amplifiers, and small experimental stuff. Apart from the two mainline projects below you can look forward to seeing: • RS485 Module • Electronic Rain Gauge • Flow Probe • Adjustable DC Power source • Wireless Power Transfer • 12-V LED Dimmer • DDS Function Generator • 3D Printer • General Purpose DSP Board (titles subject to change) Class-D 555'd Audio Power Stage Class-D power amplifiers are no longer a nov- elty. You can get them with discrete compo- nents as well as with special ICs. In our case however the idea was to check out the popular 555 timer IC as the basis for an audio amplifi- er. That has resulted in a fun and easy to build stereo design with a power output of approxi- mately 6 watts. It all goes to show that class D is not necessarily 'exotic ' or 'difficult'. Solar cell-charge controller This arrangement was originally designed for powering a small weather station, but it is also suitable for other low-power applications. The circuit is suitable for 12-V solar panels rated between 10 and 50 watts and can easily be adapted for larger capacities. To ensure high efficiency a switching power supply is used, also benefiting from very low dissipation. The charging process is accurately controlled by a microcontroller. Article titles and magazine contents subject to change, please check the Magazine tab at www.elektor.com Elektor January & February 2014 is processed for mailing to US, UK and ROW Members starting January 8, 2014. See what's brewing @ Elektor Labs 24/7 Check out www.elektor-labs.com and join, share, participate! HIcTCKontnsOFr Learning PHotferm 9,1*3 » e-i 4 * * * * MumHroni Ardu ma Clock and Tfiarmafnvtar [ 1 2074 0*1 |i 5,1*5 4 * 4 4 * Low-Cost Debugging WaWnar 24/10/2013 Itt* pitwj 4 4444 Create a Project Cr«& i promt w i Wt PSift, toOCKX * rrpn WntfWWOTL Mid niste to, rt II net El cE,TQr|i«ti y«j want to jvwr a project but you ate not a member? ’\5tSQQ can C lick here to- send 3 description of your project Including a circuit diagram and « pftntogMpti for pvalualHWi And maylw yr.M.i will lw Minted 82 December 2013 | www.elektor-magazine.com PC Oscilloscope MEASUREMENTS & STATISTICS UART 2 i MATH CHANNELS up to 200 MHz from £159 *1 # SPECTRUM ANALYZER I Serial decoding Advanced triggers PERSISTENCE DISPLAY LIN Mask tests COLOR PERSISTENCE WWW. .com/PS238 Uont forget your toothbrush CAD CONNECTED Labcenter Electronics Ltd. 21 Hardy Grange, Grassington, BD23 5AJ, Tel: +44 (0)1756 753440, Email: info@labcenter.com Registered in England 4692454 abcenter www.labcenter.coin PROTEUS DE5IGIM SUITE VERSION Featuring a brand new application framework, common parts database, live netlist and 3D visualisation, a built in debugging environment and a WYSIWYG Bill of Materials module, Proteus 8 is our most integrated and easy to use design system ever. Other features include: . Hardware Accelerated Performance. . Board Autoplacement & Gateswap Optimiser. . Unique Thru-View™ Board Transparency. . Direct CADCAM, ODB++, IDF & PDF Output. . Over 35k Schematic & PCB library parts. . Integrated 3D Viewer with 3DS and DXF export. . Integrated Shape Based Auto-router. . Mixed Mode SPICE Simulation Engine. . Flexible Design Rule Management. . Co-Simulation of PIC, AVR, 8051 and ARM MCUs. . Polygonal and Split Power Plane Support. . Direct Technical Support at no additional cost.