www.elektor.com APRIL 2008 aus$ 12.90 -nz$ 15.50 -sar 84.95 -us$ 9.95 DigiButler - a Coldfire home automation server Sweep Generator - with a Parallax SX28 micro ATM18 AVR Board - ATmega88 building block 9 770268 45113 5 ft yv II [1 II 1 ft. 1 r. )1 T. fl r, riffc aytar Catalogue OUT NOW rder on-line at electronics, co. uk/ catalogue Automotive Kits ■ i ■l I i. Ignition System KC-5442 £26.25 + post & packing This advanced and versatile ignition system can be used on both two & four stroke engines. The system can be used to modify the factory ignition timing or as the basis for a stand-alone ignition system with variable ignition timing, electronic coil control and anti-knock sensing. Kit supplied with PCB, diecast case and all electronic components. Features include: • Timing retard & advance over a wide range • Suitable for single coil systems • Dwell adjustment • Single or dual mapping ranges • Max & min RPM adjustment • Optional knock sensing • Optional coil driver Knock Sensor KC-5444 £5.00 + post & packing Add this option to your KC-5442 Programmable High Energy Ignition system and the unit will automatically retard the ignition timing if knocking is detected. Ideal for high performance cars running high octane fuel. Requires a knock sensor which is cheaply available from most auto recyclers. Kit %■ : h* « , supplied with PCB, and all electronic components. Ignition Coil Driver KC-5443 £13.00 + post & packing Add this ignition coil driver to the KC-5442 Programmable Ignition System and you have a complete stand-alone ignition system that will trigger from a range of sources including points, Hall Effect sensors, optical sensors, or the 5 volt signal from the car's ECU. Kit includes PCB with overlay and all specified components. Be one of the first to get our brand new colour catalogue. It’s bursting with over 800 new products, „ a? all with PDS pricing and in «l full colour. Hand Controller KC-5386 £25.95 + post & packing This LCD hand controller is required during the initial setting-up procedure. It plugs into the main unit and can be used while the engine is either running or stopped. Using this Hand Controller, you can set all the initial parameters and also program the ignition advance/retard curve. Kit supplied with silk screened and machined case, PCB, LCD, and all electronic components. hi Three Stage FM Transmitter KJ-8750 £6.50 + post & packing This is a Three-Stage radio transmitter that is so stable you could use it as your personal radio station and broadcast all over you house. Great for experiments in audio transmission. Includes a mic, PCB with overlay and all other parts • Requires 9V battery (not included) • Instructions included in kit How To Order Post and Packing Charges Order Value Cost Order Value £200 -£499.99 £500+ Cost £30 £40 £10 - £49.99 £5 £50 - £99.99 £10 £100 -£199.99 £20 Max weight 121b (5kg). Heavier parcels POA. Minimum order £10. Note: Products are despatched from Australia, so local customs duty and taxes may apply. How to order: Phone: Call Australian Eastern Standard Time Mon-Fri on 0800 032 7241. Fax: +61 28832 3118 Email: techstore@jaycarelectronics.co.uk Post: 320 Victoria Rd, Rydalmere NSW 2116 Australia Expect 10-14 days for air parcel delivery Check out the Jaycar range in your FREE Catalogue - logon to www.jaycarelectronics.co.uk/elektor or check out the range at www.jaycarelectronics.co.uk More Projects 0800 032 7241 (Monday - Friday 09.00 to 17.30 GMT + 10 hours only) For those who want to write: 320 Victoria Rd, Rydalmere NSW 2116 AUSTRALIA Variable Boost Kit for Turbochargers KC-5438 £6.00 + post & packing It's a very simple circuit with only a few components to modify the factory boost levels. It works by intercepting the boost signal from the car's engine management computer and modifying the duty cycle of the solenoid signal. Kit supplied in short form with PCB with overlay, and all specified electronic components. Combine these two kits to get the most cost effective car performance increase on the market! Fuel Cut Defeat Kit KC-5439 £6.00 + post & packing This simple kit enables you to defeat the factory fuel cut-out signal from your car's ECU and allows your turbo charger to go beyond the typical 15-17psi factory boost limit. Note: Care should be taken to ensure that the boost level and fuel mixture don’t reach unsafe levels. Kit includes PCB with overlay, and all electronic components. IOA iZV DC motor Speed Controller KC-5225 £7.75 + post & packing Use this kit for controlling 12V DC motors in cars such as fuel injection pumps, water/air intercoolers and water injection on performance cars. You can also use it for headlight dimming and for running 12VDC motors in 24V vehicles. The kit will control loads up to 10 amps, although the addition of an extra MOSFET transistor will double that capacity to an amazing 20 amps. • Kit includes PCB plus all electronic components to build the 10A version. I nucar BitScope PC Oscilloscopes & Analyzers DSO Test Instrument Software for BitScope Mixed Signal Oscilloscopes 4 Channel BitScope 2 Channel BitScope Pocket Analyzer Digital Storage Oscilloscope Up to 4 analog channels using industry standard probes or POD connected analog inputs. Mixed Signal Oscilloscope Capture and display up to 4 analog and 8 logic channels with sophisticated cross-triggers. Spectrum Analyzer Integrated real-time spectrum analyzer for each analog channel with concurrent waveform display. Logic Analyzer 8 logic, External Trigger and special purpose inputs to capture digital signals down to 25nS. Data Recorder Record anything DSO can capture. Supports live data replay and display export. Networking Flexible network connectivity supporting multi-scope operation, remote monitoring and data acquisition. BitScope DSO Software for Windows and Linux BitScope DSO is fast and intuitive multi-channel test and measurement software for your PC or notebook. Whether it's a digital scope, spectrum analyzer, mixed signal scope, logic analyzer, waveform generator or data recorder, BitScope DSO supports them all. Capture deep buffer one-shots or display waveforms live just like an analog scope. Comprehensive test instrument integration means you can view the same data in different ways simultaneously at the click of a button. DSO may even be used stand-alone to share data with colleagues, students or customers. Waveforms may be exported as portable image files or live captures replayed on other PCs as if a BitScope was locally connected. BitScope DSO supports all current BitScope models, auto-configures when it connects and can manage multiple BitScopes concurrently. No manual setup is normally required. Data export is available for use with third party software tools and BitScope's networked data acquisition capabilities are fully supported. Data Export Export data with DSO using portable CSV files or use libraries to build custom BitScope solutions. www.bitscope .com 4/2008 - elektor 3 Spring time! New initiatives at Elektor I do hope spring is in the air when you read this, because at the time of writing I can only see hail and sleet from the windows of Elektor House, and the wind is howling in the chimneys. Elektor staff, including myself, has just returned from the Embedded 2008 show in Nurem- berg, Germany. We were happy to see not only representatives of small, large and would-be companies active in the microcontroller arena, but also a good many readers of our publications. Long time subscribers, occasional newsstand buyers, newcomers... thanks for drop- ping by and letting us know what you like (and hate) about Elektor. Remark- ably, none of our direct competitors had a presence at the Embedded show, and even the Circuit Cellar booth was empty. Although the ATM1 8 and DigiButler projects published in this issue were developed well before the Embed- ded 2008 show, it was good to meet up with our contact persons at the companies behind the initiatives and discuss the progress. In the case of the ATM1 8, a working quadrocopter could be seen in action at the Elektor booth (video on YouTube soon). DigiButler, our open-source Coldfire home automation server, was demonstrated on the impres- sive Freescale stand. It's difficult if not impossible to pinpoint a single trend from this year's Embed- ded show, but the buzzwords are definitely C-to-hardware, open-source, development kits, CAN, fabless com- panies, core licensing and fun applica- tions. Unfortunately, there was also a lot of vapourware around. Back to the world of discrete compo- nents and (mostly) analogue design, I guess publishing an audio power amplifier using error correction can also be ca lied an initiative on our part, if only because the high-end audio scene seems to have regurgitated conventional feedback concepts for more years than I care to remember. Elektor having a fine reputation for high-end audio designs that can be built at home, it's time for a fresh, audacious, approach! The concept of i-TRIXX — simple circuits from the Elektor labs combined with 'geeks & gadgets' stuff supplied through a free weekly newsletter — has proved very successful in Germany and The Netherlands over the past year or so, and you may have seen a crop of i-TRIXX circuits already in our December 2006 and 2007 issues. The English language version of i-TRIXX was launched on 5 March — have a look at www.i-trixx. com and play the quiz — I did badly. Jan Buiting Editor lenor electronics worldwide Most solid state power amplifiers employ some form of global negative feedback to reduce non-linearities and output impedance. In some cases, designers exploit alternatives like feedforward to circumvent perceived disadvantages of global negative feedback. The present design uses er- ror correction as (re)defined by Malcolm Hawksford around 1984. 24 a Power Amplifier 56 Frequency Sweep Oscillator This project found its origins in a need to see and measure the frequency response of audio filters, tone controls and amplifiers in real time. An SX28 mi- crocontroller module from Paral- lax turned out to be a really good means of implementing the circuit. CONTENTS a Coldfire 32-bit home automation server (1) Here's advanced, all open-sour- ce hardware and PC software that allows remote switching of electrical loads across networks including the biggest we know - the Internet. The ingredients from the Freescale/Elektor kit- chen: 32-bit embedded techno- logy, free software, a low-cost kit for the hardware and free software tools. 1 6 Elektor Internet Radio (EIR) Nowadays you can access every Internet radio programme in the world by receiving, buffering and decompressing IP packages. This is all very easy with the state-of-the-art hard- ware described in this article. All open-source! Volume 34 April 2008 no. 376 projects 16 Elektor Internet Radio (EIR) 24 paX- a Power Amplifier with Error Correction Dig i Butler - a Coldfire 32-bit home automation server (1) 40 ATM 18 AVR Board 56 Frequency Sweep Oscilla- tor 62 Keyboard goes Game Controller Lucky Dip 74 Design Tips: Automatic aquarium feeder Ultra-responsive peak detector technology 48 Free, Open, Licentious Designing Capacitive Sensing Interfaces for Home Appliances 68 Energy Conscious 73 Labtalk: My microcontroller doesn't go... info & market 6 Colophon 8 Mailbox News & New Products 66 Review: (jC goes Analogue (Cypress PSoC) 81 Elektor SHOP Sneak Preview infotainment 76 Hexadoku 77 Retronics: Formant synthesizer (1977) ELECTRONICS WORLDWIDE elektor international media Elektor International Media provides a multimedia and interactive platform for everyone interested in electronics. From professionals passionate about their work to enthusiasts with professional ambitions. From beginner to diehard, from student to lecturer. Information, education, inspiration and entertainment. Analogue and digital; practical and theoretical; software and hardware. --aasw** Surround ■SjSftwJ're builds 1,1 'hardware UK Uinveriity Courses !«r IlWC'HKLr tlMI - Advanced Triggers In addition to the standard trippers the FitoScdpe 5000 senes comes its standard with pulse width, window, dropout, delay, arid logic level triggering. 25Q MHs Spectrum Analyser High-speed USB 2.0 Connection A u tomati t Measurements Arbitrary Waveform Generator Del me your own waveforms or select Irom 13 predefined signals with lht L M bit, 12 5 MS/s arbitrary waveform gent-rai&r. Waveform Playback Tool ^^B^h FkoScopc software now ji> l< i Wi yu ip In g,d but k„ r^virw, V and analyse up to 1000 captures within its waveform playback tool. Technology The P- coScope 30QO Series of oscilloscopes from Pico Tflthfioic.^y indudfis general purpose ,ind h-igh resolution models: With M bil resolution and 1% accuracy, the 10MHz PicoScope 3424 is .ihSe to detect changes as small as (X0£4% (244ppm) - making it the Ideal A channel osc loscopc for analog design and analysis. I he higher speed 13 hit mod' in the iPicoStop-e 3000 see cs ■ i:..i‘e i rmp irv r.ues ■.,{.* to "ZOOMS / 1 rind up to 1 MS/s irecu^d lengltn ^ m. 1 tML for general purpose and portable applications. The Ftco!Scope 2000 series oscilloscopes offer single and dual channel units that offer highly ^ porEabEe/low cost loluiicms 10 general purpose testing. The award winning 2 5 MHi. handheld Pi eoSc&pe 2 1 0 5 fix* R comfortably into the palm of your hjntf yet still indudei ^ rhe powerful fepTures found in larger oscilloscopes. www.pjcotech.com/scope464 to check out our full Bine of PC -based ^instruments or ca o 396 395 for information and r product catalog u 4/2008 - elektor 11 INFO & MARKET NEWS & NEW PRODUCTS QVGA for Microchip PIC24F/H micros Microchip announces a QVGA Graphics Solution for implement- ing graphics display and control in cost-sensitive applications. The new, easy-to-use solution for PIC24 16-bit microcontrollers includes a free, highly optimized graphics library with source code; third- party library support; and the new Graphics PICtail™ Plus daughter board. The free Microchip graphics li- brary supports rapid, low-risk de- velopment using two- and three-di- mensional objects, including text, circles, rectangles, buttons, meters, windows, progress bars and more, along with images, animation, and touch screen capabilities. In addi- tion, Microchip's third-party part- ners, Segger (www.segger.com) and Ramtex (www.ramtex.dk), of- fer compatible graphics libraries to provide even greater flexibility. Microchip's new Graphics PICtail Plus daughter board is designed to plug into the (Elektor) Explorer-16 development board and includes a Thin Film Transistor (TFT) LCD mod- ule that supports 320x240 (quar- ter VGA) graphic resolution and 65,000 colours along with touch- screen operation. The new QVGA Graphics Solu- tion supports any of Microchip's existing PIC24F 16-bit microcon- trollers, and will offer support for future PIC24H 16-bit microcontrol- lers, 16-bit dsPIC® digital signal controllers, and the new 32-bit PIC- 32 MX microcontrollers. The PIC24F family of devices pro- vide a parallel master port inter- face, 4-8 kB of RAM and 16- 128 kB of Flash program memory, offering maximum flexibility in sup- porting different LCD panel options. For example, using a 28-pin PIC24F microcontroller can enable high system perform- ance, an extremely small footprint and reduced total sys- tem cost. The graphics li- brary, application notes and ad- ditional design resources are all available from Microchip's website today, and the Graphics PICtail Plus daughter board can be pur- chased from www.microchipdirect. com. For further information visit Microchip's website below. www.microchip.com / graphics (080073-1) Compact 5.7-inch VGA TFT display with LED backlight Hitachi Display Products Group re- cently launched the TX14D14VM1 BAB that brings VGA resolution and a 40,000 hour LED backlight to the existing range of compact 5.7 inch LCD TFT displays. The 640(w) x 480(h) VGA reso- lution display de- livers 262,000 colours while a contrast ratio of 350:1 and typical brightness of 350cd/m2 ensure clear, bright images for all lighting conditions and environments. With module dimen- sions of (w) 1 3 1 .0mm x (h) 1 02 . 2 m m x (d) 1 0.9mm the TX14D14VM1 BAB form factor is compat- ible with the other com- pact displays in the 5.7 inch range and features an active matrix, trans- missive TFT LCD dis- play. A touchpanel ver- sion of the display, the TX1 4D1 4VM1 BPB, is also available, making this prod- uct ideal for a huge range of em- bedded industrial solutions from handheld data loggers to human- machine interfaces. Both product versions are avail- able immediately via Hitachi Dis- play Product Group's distribution partners across Europe. Hitachi Display Products Group is also able to design and develop cus- tomised display modules for spe- cific customer requirements. www.hitachi-displays-eu.com (071 168-VII) IP68 rated temperature sensors One of the main problems with temperature sensors is the ingress of moisture which can seriously affect the sensor performance — the weakest point often being the lead/sensor interface. So ATC Semitec have developed a range of TPE encapsulated sen- sors where the leads and sensor are made from the same material. This creates a waterproof barrier which is rated to IP68 and can op- erate up to 105 °C. These cost-effective sensors en- sure absolute integrity when used in outdoor locations (e.g. solar panels) as well as in under-floor heating and other HVAC applica- tions. There are also other options such as stiff lead versions and a high temperature variant rated tol50°C. Double-insulated and rated to 4 kV, these IP68 sensors offer complete peace of mind in applications where moisture ingress has previ- ously been a problem. http://www.atcsemitec.co.uk/ (080073-VI) 12 elektor - 4/2008 o Soldering .co.uk Supptmrs zf FGB Soldering Equipment £ Rework Stations NEW IN STOCK 328 Working Platform M7+45W Soldering Station Kn Wmom J - NrfAiiGun - ■6 k H ntdri wflh FutiG ftfesoibcr SS SoWn i nq tr&n Si 4iXl fr™ S-uktnr-g nyi Tip '*"0 Hfc-Jtlng Elcmcnl V,W. jliiti SuLlMKI fifcfl H^at Br-trfijni Pad J £ Tod 1 0 2 >. Cvfcflft FiliefS . * B Online Price £0^5 Online Price £74, 95 2 S 0 C 70 W S-oldfiHna Station Avdi^bie fij s r ? ! S CL Test-pins.co.uk d Tivf.pim fl--:^,-i>:. , vJ 4 F*fflfrw For Te^f-pins £ F/ofres VT-i/l www, n&t-pin Sr co, ak ^ton« d*HX>tir4 coda a so apdB& www.pcb-5oldering.co.uk A|!flna>lG E!fl«NHl!CSUdL*3 rioddutofl IrtflytHiaKenEr*. i -+44 {0)1 M2 AS®?® ¥¥ ***>■ OCb-EO daring w hH Piflda 1 ^Mn.HcddcsdDrv. HcrEl’ardihiw.EMl ll^F F ^44 450701 E 5-n , rvipcb-Hvd*nng Ca.uk Please see our updated website at www.paltronix.com for even more new products Paltronix Limited, Unit 3 Dolphin Lane, 35 High Street, Southampton, S014 2DF | Tel: 0845 226 9451 | Fax: 0845 226 9452 | Email: sales@paltronix.com Secure on-line ordering. Major credit and debit cards accepted. Prices exclude delivery and VAT. Control Systems Educational Products Tools & Prototyping IK ^ 0845 226 9451 C9UIPNEHT i-qp [|_[C TRONIC 5 DEVELOPMENT T RAj Hi| M 0 fc CKPEfllME Hi TAT I OH Microcontroller Development Tools Robots & Accessories Test Equipment Similar boards available for 8051 , ARM, AVR, dsPIC and PSoC, plus compatible add-on boards and compilers. Other robot kits available based on 68HC1 1 , 8051 , AVR, BASIC Stamp and PIC, plus large range of accessories. The PoScope features a logic analyser with serial bus decoding, oscilloscope, pattern generator, spectrum analyser, chart recorder and square-wave/PWM generator in one low- cost instrument from £79. New range of high-specification logic analysers from ZeroPlus now also available. The PICPLC16B makes an ideal platform for developing and imple- menting automation applications with its 16 relay outputs, 16 opto- isolated inputs and Ethernet controller for £99. A wide range of microcontroller and PC-based control boards and add-ons are also available. Other training systems available for microcontroller and electronics teaching. The IDL-800 is a low- cost digital circuit lab incorporating a large solderless breadboard, DC power supply, function generator, volt meter and useful switches and displays for £199. We stock prototyping products from breadboards to advanced digital and analogue circuit labs. Start experimenting with robotics with the Robo-Box 3.0 robot kit. Contains everything required to build wheel and track-based robots and carry out a large range of fun experi- ments from £79. Designed specifically for teaching about 8051 microcontrollers, the NX-51 V2 incorporates a useful range of I/O devices and comes complete with detailed example programs for £99. Gain the best start with PIC microcontrollers with MikroElektronika’s EasyPIC5 development system. High-speed USB PIC programmer, in-circuit debugger and plentiful I/O devices on one board from £79. 4/2008 - elektor 13 INFO & MARKET NEWS & NEW PRODUCTS New PicoScope 2000 series scopes Each new model in the PicoScope 2000 series is an oscilloscope, spectrum analyser, signal genera- tor and arbitrary waveform gener- ator (AWG) all in one unit, mak- ing it extremely versatile and eco- nomical. Unbeaten for functionality and price, with bandwidths up to 25 MHz and sampling rates up to 200 MS/s, the new scopes have a compact footprint of 100 mm x 1 35 mm (3.93 in x 5.3 1 in), small enough to fit easily into a laptop or travel bag. The new PicoScope 2000 se- ries scopes have two BNC input channels, a third BNC for a sig- nal generator and arbitrary wave- form generator output, and a USB port. Power is taken directly from the PC, and the scopes use the full USB 2.0 bandwidth of 480 Mbps to achieve rapid display updates without compromising accuracy and detail. All PicoScope PC Oscilloscopes are supported by the same fully functional version of PicoScope 6 for Windows, which makes the most of the PC's processing power, storage, graphics and communica- tions. The familiar Windows inter- face and controls make the soft- ware easy to learn and operate, and convenient for everyday use. PicoScope owners can download software updates, feature exten- sions and improvements that will remain free of charge for the life- time of the product. They can also contact Pico's technical specialists for support by web, email, phone or Skype, at no extra charge. PicoScope 6 can save data in a range of formats including CSV text, PNG and BMP images and MATLAB binary files. Drivers and examples are included for Lab- VIEW, C, C++, Delphi and Visual Basic for integration into custom applications. The new PicoScope 2203, 2204 and 2205 PC Oscilloscopes are available from local distributors, or direct from Pico Technology, priced from £159 to £300 + VAT and delivery. www.picotech.com (080073-11) Rambus xdr (tm) memory architecture named 2008 Designvision winner The International Engineering Con- sortium (IEC) has chosen the Ram- bus XDR (tm| memory architecture as the winner in the 2008 DesignVi- sion Awards category for Semi- conductors and ICs (IP). The IEC DesignVision Awards recognize technologies, applications, prod- ucts, and services judged to be the most unique and beneficial to the industry. Rambus recently announced that Toshiba has taken a license for the XDR memory architecture for its next-generation HDTV chipsets. In addition, Qimonda has begun shipping its first samples of XDR DRAM, and Elpida has begun ship- ping 4.8 GHz XDR memory, the world's fastest production DRAM. Key components enabling the breakthrough performance of the XDR memory architecture are: - The XDR DRAM, a high-speed memory 1C that turbo-charges standard CMOS DRAM cores with a high-speed interface capable of 4.0 GHz data rates providing up to 8 GB/s of bandwidth with a sin- gle device. • The XIO controller 10 cell provid- ing the same high-speed signaling capability found on the DRAM, but adding additional enhancements like FlexPhase(tm) technology that optimizes timing and eliminates the need for trace length matching. • The XMC memory controller, a fully synthesizable logical memory controller that is optimized to take advantage of innovations like Dy- namic Point-to-Point which provides for capacity expansion while deliv- ering the signal integrity benefits of point-to-point signaling. • The XCG clock generator provid- ing the system clocks with four pro- grammable outputs, guaranteed to meet the clocking requirements for the XIO and XDR DRAM devices. www.rambus.com (080073-IV) SMS Electronics wins major deal Nottingham based SMS Electron- ics Ltd have secured a multi year / multimillion pound deal with Siemens Enterprise Communica- tions Limited to provide a range of services including Field Repair Unit support, Second user equipment refurbishment, Recycling (WEEE) and logistics. Under the terms of the deal SMS will acquire the Sie- mens Enterprise Communications Limited current operations based in Beeston Nottingham which will be transferred to a new company SMS Product Services Ltd. SMS Product Services Ltd will be located in 40,000 sq ft building adjacent to the SMS Electronics Ltd current facility and increases the manufacturing floor space available to SMS to a total of 1 10,000 sq ft. The additional capacity is also required to ca- ter for higher volumes from its ex- isting customer base and recent contract wins. SMS Electronics Ltd. have a long and successful relationship with Siemens and have also se- cured a further 5 year extension to their current Manufacturing agreement with Siemens Enter- prise Communications Ltd. www.smselectronics.co.uk (080073-VIII) 14 elektor - 4/2008 Quarter-brick DC-DC converters The Bel Power division of Bel Fuse Inc. announced the ORQB-COU Series of open-frame isolated DC- DC converters. Housed in the in- dustry standard !4 brick (2.28" L x 1 .45" W) package, the low- cost series provides up to 100 W of output power from a nominal 48 V input. Notably featuring a 4-to-l input voltage range to ac- commodate both a 24 V and 48 V standard input voltage in the same module, it is moreover engineered with built-in input and output filter- ing to further minimize part counts. The highly reliable devices operate at efficiencies up to 91% over an ultra wide range of output voltages extending from 1 .2 V to 12 V. Bel's newest UL/cUL 60950-1 approved series may be confi- dently specified for employment in a broad array of distributed power architecture applications where space is limited, and over- all weight is a factor. Among the most common uses for these high power density parts are in wire- less networks, optical and access networks, as well as in industrial networks and equipment. Addition- ally, their open-frame construction makes them ideally suited for con- vection-cooled environments. The isolated DC-DC converters offer a full complement of control and protec- tion features that include differential remote on/off, positive/negative re- mote sense, input over-/ under-voltage lockout, and over-temperature protec- tion. Parts also offer output voltage trim, current limit, and short circuit protection. These devices switch at a fixed frequency (285 kHz) and have an operating temperature range of -40 to +85 degrees C. www.belfuse.com (080073-III) NanoBoards open up new hardware possibilities Altium Limited has previewed its extended range of deploy- ment NanoBoards at DesignCon 2008 and will showcase the new solution in Europe at Embedded World 2008. Altium's new deployment Nano- Boards are standard, off-the-shelf design solutions that offer great- er design flexibility for electronics designers. They can customize these cases to their own require- ments. And by using Altium's Innovation Station electronics designers can develop and test device intelligence and transfer that design into the deployment NanoBoards for a complete and marketable product. Electronics designers can now, regardless of background or ex- pertise, deploy a design into final hardware making the end prod- uct immediately available. The extended range of deploy- ment NanoBoards features the same mother board and choice of daughter and peripheral boards as the Altium Desktop NanoBoard. Designers will have the choice of using a deployment NanoBoard as a final product, or integrating their deployment NanoBoards into larger systems such as mechanical devices. They will also be able to do semi- custom hardware design using the templates included with the Altium Designer software. The Modular Commercial Enclosure system comprises basic units avail- able in two sizes, a 1 .0 and a 0.5 module. They can be configured by designers and come with a range of interchangeable components for an array of installation options. The system is designed to support the pluggable NanoBoard hard- ware deployment platform and in- cludes all of the templates, mount- ing details and graphics specifica- tions required to produce a fully customised application. The stand- ard enclosures accommodate a mother board with a choice of FPGA daughter boards and a 3.5 inch touch screen display. The standard 0.5 module provides for a maximum of two peripheral boards while the 1 .0 module supports up to four peripheral boards. Altium's range of deployment NanoBoards will be available later in 2008. www.altium.com/Products / NanoBoard/ (080073-V) 4/2008 - elektor 15 INTERNET RADIO Listening to programmes Harald Kipp and Dr Thomas Scherer In the good old days, you had to modulate audio signals onto an RF carrier so they could be received and demodulated to produce something more or less audible. Nowadays things are different: audio signals are compressed and put into IP packets that are Streamed', and you can access every Internet radio programme in the world by receiving, buffering and decompressing these packages. This is all very easy with the state-of-the-art hardware described in this article. Internet radio is something quite spe- cial: even the most sensitive short- wave receiver cannot come close to providing such a broad range of pro- grammes, and the sound quality is simply not comparable. As the ‘Inter- net broadcasters’ that provide these programmes do not have to pump se- veral hundred kilowatts of RF energy in the air (with the resulting ‘ electro - smog’), this type of broadcasting ope- ration is also quite economical for rela- tively small target audiences. We could say a lot more about the ad- vantages of this new sort of radio (see inset), but what’s more important is to answer the question posed in the next section. Why not use a pure software solution? First of all, we have to say that the- re are several programs (WinAmp, iTunes, VLC, etc.) that are available entirely free of charge for all possible operating systems and can be used to listen to Internet radio. Every true 21st-century person has a PC, Mac or Linux machine available somewhere, so why should you spend money on a non-virtual, physical device, and on top of that build it yourself? Well, for one thing the hardware plat- form for a software radio consumes electricity, and quite a lot for this pur- pose. Anyone who spends a good deal of time listening to radio programmes with a PC is engaged in a very environ- mentally unfriendly activity. The solu- tion proposed here manages to do the job with a power consumption of only 1 watt. If you use it 10 hours a day, the savings in electricity costs alone (rela- tive to using a gamer PC as a radio) are enough to repay you investment within six months. For another thing, there are applica- tions for which a PC is not such a cle- ver solution, such as connection to a stereo system. A DIY Internet radio ba- sed on Open Source technology is easy to extend and adapt to special require- ments - and last but not least, the EIR keeps on working when your PC hangs or crashes . Operating principle As the EIR is a complex project that uses state-of-the-art hardware, it is impossible to deal adequately with all relevant topics in a single article. For this reason, the main objective of this article is to describe the hardware and tell you how to assemble it and put it into service. You can find additional in- formation in documents on the Elektor website (www.elektor.com) and the project website [1], and there will be additional articles on this subject in fu- ture issues. As you probably already realise, an In- ternet radio must receive, buffer and decode data streams. This means that one of its basic ingredients must be a reasonable microcontroller. As already mentioned in the last issue of Elektor [3], an ARM7 MCU [4] can provide the necessary processing power. The basic architecture is shown in Fi- gure 1. The MCU is shown in the up- per middle of the diagram, and it has access to a healthy 64 MB of SDRAM - which is sufficient for the buffer and quite a few ‘extras’. The MCU has room for the firmware, and there is also 4 MB of flash memory available for non-vola- tile data storage. A real-time clock ba- cked up by a Supercap allows the cir- cuit to be used to implement an alarm radio or other applications that depend on knowing the current time. To avo- id having to exploit the full capacity of the ARM7 MCU, audio decoding is handled by a VS1053 IC [5], which is specifically designed for this purpose. The EIR also provides a comfortable selection of interfaces: beside the man- datory Ethernet port (since the EIR has to access the Internet somehow), the- re is a USB programming interface for downloading new firmware, a serial port and a JTAG port (useful for de- bugging), and three useful expansion connectors at the port level. To allow you to record broadcasts if you so desire, there is also a slot for an MMC/SD memory card. General aspects The incoming data streams are normal- ly compressed to such an extent that they can handle sampled stereo data, which typically has a resolution of 16 elektor - 4/2008 Details As you can see immediately from look- ing at the schematic diagram in Fig- ure 2, this is a complex design. For this reason, the following description is based on the functional blocks. • Ethernet Access to the Internet is via an Ether- net connector with an integrated trans- former and two LEDs. The green LED lights up when data is being trans- ferred, while the yellow LED indicates that a connection is present. The Eth- ernet traffic is handled by a special- ised IC (IC10, a DM9000E). Buffer IC9 16 bits and a sampling rate of 44.1 kHz, using a data transmission rate as low as 192 kbit/s (or even less) instead of the normal rate of around 1.4 Mbit/s. This means that a buffer with a capa- city of approximately 10 seconds can be implemented with around 256 KB of RAM. This may not sound like much nowadays, but it is still quite a hefty chunk of memory for a microcontroller. If you want to be on the safe side and also want to have room for Internet ni- ceties and other ‘extras’, you can quik- kly end up with 512 kB or more. The ARM7 MCU selected for this design supports SDRAM, so the EIR with its 64 MB of RAM does not suffer from any shortage of memory. devise upgrades that support this capabili- ty and other conceivable features. In order to avoid constraining the form of any possible extensions, no user in- terface components (such as buttons or a display) are incorporated in the board. However, they can easily be connected via the expansion connec- tors. The EIR is intended to form the basis for user-designed expansions, and the firmware that comes with the board is thus designed to be used via an integrated website. However, the firmware is completely open, so other options are always possible. We chose Nut/OS as the operating system. It is quite accommodating in comparison with Linux and can ma- nage with less than 40 kB of memory. All in all, the software needs around 200 kB of memory. A capacity of 1 MB is ample for data storage. As the MCU already has 512 kB of flash memory on board for program data as well as an abundance of RAM, there are no bot- tlenecks. All of the software is Open Source, except for the flash program- ming software from Atmel. Incidentally, the microcontroller has sufficient processing power to allow a second audio stream to be recorded on the SD card while another stream is playing. It will certainly not take very long for the Open Source community to 5-24V Power Supply Reset Button MMC / SD-Card AT91SAM7SE512 64 MByte SDRAM 4 MByte DataFlash RTC / SuperCap DM9000E Ethernet USB Device / Prog. RS232 Expansion Connector JTAG Connector OLED Touch Wheel (later Upgrade) Figure 1. Block diagram of the Elektor Internet Radio. 4/2008 - elektor 17 INTERNET RADIO 2a Figure 2. As you can see immediately from the schematic diagram of the EIR, this is a sophisticated project. 18 elektor - 4/2008 2b to «0 t b 9 * o o c o Oil® It =L OM° It H aosa col oosa ^ | aosa VOSd 0 ej , T— CO CO CM o X O 0. . X X. X. 61.3d 81.3d \ \ \ z o i— CM CO in 00 O) CO b o o o o o o o 8 b b b b b b < < < CO X X X X X X X X X X X X X X X X X X X o 1— CO CM in r- 00 o T~ CO r*. CO in 1^ 00 1— in in in i— CO i— 7 — 7 X. !©- + q; i ] no |- co ml ^Icm 8 i=j=i =j=i8 CD o -m M 4 -H 4 >14 II CD XI in XI rf 0=1 CM <§ oil” 00 00 o < N DO HE 3 - 4 P' T T nuEHlt^' sLSJ iLE 1001- |- eo / x 1 1 + — =J >1001. I o t— cm co ^ in Oi— CNCO^inCOh-COOi— i— i— i— i— i— OOOOOOOQOOOOOOOO ICO |C0 X _l < < lo lx o Q o Q O O i- CM Oi— CMCO'd'iniDf'^COC^i— ■»— 1— <<<<<<<<<<<<< < cr o w zz A A / / / A / £ / o < T— < ICO l> z _l LU z OQ X lo 15 o o A ^ XX A CM < CD CM CO o —I 00 *3- 2 8 I 0Q § s X. A H (0 LU LU (0 h LU X X X j >1001 | 1 g p U h- O o_o (/)(/)(/) o LU DC O O) CM 00 CM CO CM 00 CO •st o 1- i- CO CO < < < < X X X X XXXXA Z n ] c o si 00 O i®- + >14 >14 >14 >14 o> c ™ - I s - O | | rt It 00 00 o < N DO ii ° c r - o or It II It £ t s H DC DO CO in o X y— z CM X X LU o LU < OQ Z Z o O -I -1 X (/) > Q_ 0. o o o o o 0. o < o CA) 0- o * * o o 2 CA) I I (/)(/> o CO in i— CM y— — i CO 1 — CM i— — ( 1 1 X m I II Q. CM CM CO CO o T“ CA) > II N X CO 00 CM CM \ >1001 | - | >1001 |- Q) X! O o O JH fh Q- 3 £ 0 co n D; S' § E CO in o T- CO > z 7Z Q) £ Q) £ Ui § CO «©■ + >u UOS y — | nos | - O CM CO in CO h- 00 O) o 1— CM co y— *5f in o o o o o o o o o o o o o o o o X X X X X X X X X X X X X X X X CO 00 o> o y— 1— 1— CM y— CO o> 00 00 00 00 CO 00 m 00 00 CO 00 CM 00 O 5 CA) + i X X >. 4-> ■> o < O o O O X X Z EC H I O g OP - ° CD 7©“ >101 y □Eh \ >1001- 1- _i < H z o o , Z _l 1— tn in 1 CO o W 1 H Z o Q CO V K oc < LU < lrt o o n (3 LU uos uos © o o 1- i- in o 00 y LL o CL o o (0 o N X oo h- CD X 1 1 II s s Oil? It fOI $ U. 0 o 1 CO 00 O) O i- "l *1 !Ii 1 — 1^ CO < O) 1 — 1 CO 1 in — i 1— ®i CD CO 1^ CO CO . CD . CM ] 8 >19 |- O i— CM CO rj- in co I s - 00 o> o i— CM CO in H IX q Q D Q o Q O Q Q O O y— O Z) LU in in tn (A) tn CA) CA) CA) CA) CA) Q O Q O Q O < la LU CA) CA) CA) CA) CA) CA) LU O z z X CA) o O + . o o X X + _l_ X X x oc O r CM CO 7“ o g o o 0. Q. 0. (3 0 0 0 & | CL |2 O) 00 h- CO m rr CO LU | CA) < CA) < CA) < CA) < CA) < CA) < CA) 5 X H X O o o O) Q o o o o x LU x 1 cc ^ C/) CO C/} CO CO CL LU LU LU 111 LU z * o Q LU LU O LU Q O _ * SI SI g CO LU o o o CM O CO Q o Q Q CM o CO Q o o o CM z 1 z -I o 1 _l 1 z Z 1— X X X X X X X X Q Q _l z X X z Q LU CA) H 1- H 1- X X X X 2 O -J X H _l CA) < X 0. 3 LU Z < o 00 CM 1— CM 1— CM CM o o o X X X & 1^ CO in CO Oi o> O) O) • — ( o> 1 — ( 1-1 I co^ ^ ^ m 'd- CM © UV CD cJ 1-' CM co^ ®o^^^mininin < IV > n CO 1 1 W 1 1 + CM OQ Ql Z co I 0)1 ©I i-l id I h-l mikroElektronika DEVELOPMENT TOOLS | COMPILERS | BOOKS with hardwarei In-Circuit Debugger The system supports 8-, 14-, 18-, 20-, 28- and 40- pin PIC microcontrollers (it comes with the PIC16F877A). Very fast USB 2.0 programmer including mikrolCD (In- circuit Debugger) on-board with simplified driver installa- tion enables very efficient debugging and fast prototype developing. Examples in C, BASIC and Pascal language are provided with the board. EasyPIC5 comes with print- ed documentation which includes: EasyPIC5 Manual, PICFIash2 Manual, mikrolCD Manual. Your development time can be considerably reduced, resulting in an early prototype design and fast time-to-market for your end product. Touch screen controller with connector available on- board. Touch screen is a display overlay having the ability to display and receive information on the same display. The effect of such overlays allows a display to be used as an input device. Touchscreens are popular in industry and in other situations, such as museum dis- plays or room automation, where standard inputs such as switches do not work very well. EasyPIC5 Add-On Boards Various range of additional daughter-boards for EasyPIC5 development board Digital POT - MCP41010 SPI I CAN-1 Board - Interfaces Interfaced digital potentiome- I CAN via MCP2551. ter. ' I CANSPI Board - Makes CAN SmartMP3 Board - VSIOOIk network with SPI interface. MP3 decoder with SPI f Interface. RS485 Board - Connects devices into RS-485 network Serial 7-seg Display 2 Board - MAX7219 SPI Interfaced, Serial Ethernet - Make LED Display Drivers with 8 ethernet network with SPI Common-Cathode LED Interface (ENC28J60). Displays lrDA2 Board - Irda2 serves as LightToFreq Board - wireless RS232 communica- TSL230BR programmable tion between two MCU’s. light-to-frequency converter. Port Expander Board - EasyConnect Board - MCP23S17 is the 16-bit port Connects your peripherals expander with SPI interface, easily and fast using connec- tors. Please visit our web page for more info http://www.mikroe.com 4/2008 - elektor 29 PROJECTS * t impedance current input Y and pin 5 labelled Tz is the current source output Z. It is readily seen that whatever cur- rent is injected into pin 2 (Y) comes out at pin 5 (Z) but in opposite direction. It seems this part has been custom de- signed for us! Other similar parts are Maxim’s MAX435 and MAX436 (now obsolete) and TI’s OPA860, which su- perseded the OPA660 and OPA2660. We can use the input stage for the CCII function, and the buffer to drive the output stage to isolate the input sum- mer from the output stage’s non-line- ar input impedance. We see that the current output terminal is already in- ternally connected to the buffer input, again, just what we need! Figure 7 shows the full output stage circuit, with component values. Note Figure 7. Full unity-gain output stage with Hawksford error correction. 30 elektor - 4/2008 \ T \ / 1 / i f ■ / f # V \ Jr Figure 8. Output stage distortion curve without (top) and with (bottom) error correction. P out = 50 W into 8 Q. that the amplifier input is at pin 5 of the AD844, not at pin 2 or pin 3 as we would expect in a classical opamp circuit. This is NOT an opamp circuit, but I’m sure a lot of people will be con- fused by this... Putting it all together This output stage has two pairs of output devices. The design goal was 100 watts in 8 Q and 200 watts in 4 Q. For a pure resistive load, one pair of de- vices would have been sufficient. How- ever, speakers are not purely resistive; depending on the signal frequency they can act capacitive or inductive, especially if there is a complex cross- over filter. This leads to phase shifts between the output voltage and output current, so you can get the situation that the output voltage is negative, Figure 9. Prototype amplifier module and output/protection board. CL> Extra Development Add-On Boards Large range of additional daughter-boards for various development boards SeriaIGthernEt Microchip's ENC28J60 is a 28-pin, 10BASE-T stand alone Ethernet Controller with on board MAC & PHY, 8 Kbytes of Buffer RAM and an SPI serial interface. SmartMP3 Add MP3 to your prototype with VSIOOIk MPEG audio layer 3 decoder with SPI Interface. Low Voltage Audio Power Amplifiers and Voltage Level Selection - 5V or 3.3V. 3-axis Accel The ADXL330 is a small, thin, low power, complete 3-axis accelerometer with signal conditioned voltage outputs, all on a single monolithic 1C. IrDAS Board MCP2120 encodes an asynchronous serial data stream, converting each data bit to the correspon- ding Infrared (IR) formatted pulse. MAX7219 SPI Interfaced, LED Display Drivers with 8 Common-Cathode LED Displays on-board. Connects via IDC10 con- nector on-board. RS485 Board Connect multiple devices into RS-485 network using LTC485 is a low power dif- ferential bus/line transceiv- er. It also meets the requirements of RS422. LightToFreq Add light to frequency con- verter to your prototype with TSL230BR program- mable light-to-frequency converter on-board. DAC Board The MCP4921 is a general purpose DAC intended to be used in applications where a precision, low- power DAC with moderate bandwidth is required. ADC Board 12-bit analog-to-digital con- verter (ADC) MCP3204 with SPI, operational ampli- fier MCP6024 ,4 inputs, 4.096V voltage reference. mikroDrive ULN2804 - High-current Darlington arrays are ideal- ly suited for interfacing between low-level logic cir- cuitry and multiple periph- eral power loads. Please visit our web page for more info http://www.mikroe.com 4/2008 - elektor 31 but that the current is coming from the positive side (the N-device). The N-device will have a quite large V ce , and the current it is allowed to source is much smaller with a large V ce than what you would think from the allow- able dissipation. Further details about the safe opera- tion area of the output devices will be given in a separate article next month. Anyway, because of the dual output devices, there is also an additional cur- rent source to bias the thermal track- ing diodes, as well as an extra bias ad- just trimmer. as the current conveyor will exhibit phase shift. In a ‘classical’ feedback amplifier, if the phase shift becomes too large, it will turn the nfb into pfb which, as we all know, will lead to in- stability and even oscillations. In H.ec this is also the case of course (it shares many attributes with a feedback am- plifier), so we need to roll off the loop gain for higher frequencies, just as in a classical nfb amplifier. C3 does just that by decreasing the effective correc- tion impedance (R25//C3) with increas- ing frequency. Also remember that this stage needs output stage can perfectly stand on its own when driven by a suitable voltage amplifier (Vas) stage. So, let’s take a break here; we’ll attack that Vas, and the power supply, in the next instal- ment and develop a full-fledged, high quality audio power amp. Stay tuned. ( 070987 - 1 ) Literature and note [1] Hawksford, M.J., 'Distortion correction in audio power amplifiers', JAES, Vol. 29, No. 1/2. pp. 27-30, Jan/Feb 1981. [2] HephaTstos, 'Thermal Distortion - it exists, _ / ■ ■ i v. jp 1 Iv \ Figuur 10. De opgebouwde versterker-module op z'n koellichaam. There are a few extra components in the circuit which we haven’t men- tioned before. R60 is a small resistor in series with the AD844 buffer output stage. A large part of the output drive goes via the two capacitors C2 and C4 to bypass the current mirrors. R60 isolates the buffer output from capacitive loads en- suring stability. Another capacitor, C3, is placed across R25. As the frequency increases, the loop through the output stage as well to be driven from a low impedance source, because the source output im- pedance forms part of the ec scaling resistor R25. Finally, there is the 6-pin connector J10 and some associated resistors. This is the connection to the protection board which we will discuss separately. It provides the V ce and I c related infor- mation of the output devices to the pro- tection circuitry. This output stage is pretty linear as at- tested by the curves in Figure 8. The I've seen it', L'Audiophile, no. 32, May 1984. (Ed.: Hephaistos was the Greek god of fire, metalworking, stonemasonry and the art of sculpture) [3] In the early 90's, an IC designer, Doug Wadsworth, designed a current conveyor for audio on his own money (PA630). The chip, the 'Swift Current' chip, eventually found its way into Wadia DACs. It is no longer availa- ble for other parties, but I had bought some from him and knew they were a well kept se- cret for hi-end audio. 32 elektor - 4/2008 SERVICING YOUR COMPLETE PROTOTYPE NEEDS 1 EUROCARD (160x 100 mm) + Tooling + Photoplots + VAT Fi' s K 2 Price example Any size and contour possible! Optional: • Soldermask • Fast-turnaround • Silkscreen 4-Layer Multilayer • 6-Layer Multilayer WWmMTt QWt Freephone Q) 0800-38985 60 C * . 1 i ■ Simply send your files A/IA A /I /If and order ONLINE: rV V m rVVfct V Wwt Professional PCB Supplier * URL: WWM'ElPGR'COlIt Email; sale5@e2pcu.com Tel: +SS 139 1002 1704 HDI Up To 5Q Layers. 2.§mil T7C 0.1mm Hgle $i£e Othef P^oducte - Stencils. Keypads. Frantpaneb, Flex PCS. Enckrauc&s. Turnkey Services Microchip PIC Boards Free project download with source code Embedded Webserver USB, ELhyiritH. Dallas 1-wire RS232/4B5 r I2C CAN-BUS Serial LCD ARM Development Boards High performance 32hit RISC USB JTAG Ethernet and USB R5233, I2C. CAN -BUS NXP lpc and Atm el sam Free C compiler and IDE Free ARM 7 tutorial download Embedded Linux Boards Low cost embedded Linux ward Two USB host Interact Two 40 pins sockets For ejySrnsion GSM / GPS Module udri on Create CGI using C language Apache r PHP ana SQLite RSS Reader and LCD demo Free SDK compiler download Secure online ordering www.skpang.co.uk sales@skpang.co.ulc tel. 01298 70012 fax. 01298 70046 www.peakelec.co.uk sales@peakelec.co.uk Handheld Test Gear - Cool, Smart. Atlas ESR Atlas DCA Model DCA55 Atlas ESR Model ESR60 Semiconductor Analyser Identifies type and pinout! Atlas LCR*^9 Atlas LCR Model LCR40 ESR and Capacitance Meter Resolution of 0.01 ohms! Atlas SCR Atlas SCR Model SCR100 Inductor, Capacitor, Resistor Analyser Triac and Thyristor Analyser Automatic part identification. Auto gate test current up to 100mA UK: Please add £1.00 p&p to your order. Prices include UK VAT. Please see website for overseas pricing. 4/2008 - elektor 33 HOME AUTOMATION SERVER home automation server Part 1: introduction and circuit descriptions Richard Sumka (Freescale Semiconductor Inc.), Luc Lemmens & Jan Buiting (Elektor) This project employs a Freescale Coldfire micro and associated PC software that allows remote switching of electrical loads across networks including the biggest we know - the Internet. The ingredients from the Freescale/Elektor kitchen: 32 -bit embedded technology, free software, a low-cost kit for the hardware and free tools to expand the functionality of the server to your own liking.ln the first instalment we describe the general structure of the server and the optional Turbo BDM programmer for Coldfire devices. Out for the night and forgotten to switch off the lights at home, or the heat- ing? This project could be the solution, providing the ability to control equipment remotely over the Internet using a web browser or WAP enabled phone. Sure, that application alone may look trivial considering the sheer power of the microcontroller used but that’s also the crux of the project: it’s expandable and totally geared to open-source de- velopment as we have made sure that elektor - 4/2008 all resources are available either free (software) or at low cost (hardware). Networked home automation server Connecting applications together is fast becoming a necessity rather than an option, especially where Ethernet networking is concerned. This home automation server using a Freescale 32-bit Coldfire device and Freescale software allows remote switching of loads across Ethernet networks and the Internet. And with some ingenui- ty, simple modifications allow the serv- er to be used for remote sensing and monitoring. Crossing the internet (and WAP gateways) Web pages are transferred across the Internet using HyperText Transport Protocol (HTTP). HTTP is a request- response protocol and can be used to send any type of data including binary data. The client - a web browser - re- quests a web page from a web serv- er and the web server responds with the web page contents. Simple as that may sound, there’s a lot of technology behind it all! As illustrated in Figure 1, DigiButler is a mini web server that will happily sit behind an Internet connected router. Alternatively, it may be connected to a local network or directly to a PC. For most of this article we will describe the connection as though it were be- hind a router. The unit will accept commands from, and return data to, any Internet-con- nected PC or WAP telephone that has DigiButler’ s IP number. Password pro- tection is also provided by the client software. About the MCF52231 The Freescale Coldfire MCF- 52231CAF60 in its LQFP80 case is a member of the MCF5223x family of 32- bit connectivity microcontrollers. Its architecture is shown in Figure 2. The two key features of the family are the integrated 10/100 Mbit/s Fast Ethernet Controller (FEC) and Ethernet Physi- cal Layer (EPHY); in brief, everything needed to get a single chip application onto an Ethernet network. If you want to delve really deep into this, there’s a must-read article available from Eric Gregory [1]. This device also has a CAN 2. OB con- troller. CAN is commonly used as an i Main specifications i • 32-bit Coldfire MCF5223 1 microcontroller i • Open-source project i • C source code i • Free CodeWarrior software development platform 1 • Doubles as a low-cost Coldfire development system 1 i • Connectivity: EtFiernet (RJ45), RS232, BDM, analogue, l 2 C, timers | • 1 relay (on board) suitable for mains loads up to 2 A i • Accessible tFirough Internet or WAP i • Client software witFi password and username protection i • TCP/IP and RTOS stack witFi HTTP, DHCP, UDP, ICM8 ARP support ■ i • Easy IP setup i • Ideal for web-driven remote sensing and control i • Kit of parts available from Elektor SFiop i L — — — — J Optional Additional Modules Crypto CAN — r BDM PLL GPIO "1 JTAG 4-ch., 32-bit timer 4-ch. DMA i i > ; io/ioo ; | Q. i FEC i O 1 i 4-ch., 16-bit timer l 2 C UART 2-ch., PIT QSPI UART 4-ch., 8-ch. PWM 2 x 4-ch., 12-bit ADC UART RTC 32 KB SRAM i O i ColdFire® | i M2 w 1 Core i System Integration 071101-14 Figure 2. MCF52231 'Coldfire' architecture (courtesy Freescale). 4/2008 - elektor 35 HOME AUTOMATION SERVER MCF52231 - bits to remember • 128 l > > / / X J12 SDA GPTO GPT2 o a o o o o SCL 6 GPT1 \ 8 DIGITAL J11 \ AN1 \ AN3 \ AN6 AN4 O a o o o o o o ANO / _AN2/ mjy 10 _AN5/ ANALOG QSPLOUT QSPI SCK QSPI-CSO SYNCA SYNCB 31 Trot S.IRQ4 29 \IRQ7 40 IRQ11 41 SDA 80 SCL 79 vgpto 78 VGPT1 77 \GPT2 76 VGPT3 75 V ANO 68 \ AN1 67 S. AN2 66 AN3 65 V AN4 61 S..AN5 62 S, AN6 63 \ AN7 64 IRQ11 U1 MCF52231 80-pin LQFP RSTO RSTI JTAG EN / ** \JTAG EN 12 48_ 49_ 55 46 JTAG EN PHY VDDA PHYVDDTX PHYVDDRX PHY RBIAS a. < -J CO CO oc > > > XTAL EXTAL i- oi X X i- 04 CO 10 CO CO CO CO CO CO > > > > JP2 BDM_EN C4 220n C3 220n C2 220n R3 If) CO CM 1- h- M R5 CM < » — | 10M | — < Y1 r I I a a 1 1 1 l CO C5 ■ < 22p i i 25MHz 50 51 53 54 ALLPST 8 TINO / 9 TIN1 / 13 TIN2 y 14 TIN3 / 7 ALLPST/ TRST TDO/DSO TDI/DSI RCON TMS TCLK PHY_VSSA PHY_VSSTX PHY_VSSRX TEST UTXD1 URXD1 UCTS1 URTS1 UTXD0 URXDO UCTSO URTSO rsti U? RSTI/ KRSJL _[RST/ 5 TDO/DSO / 4 TDI/DSI / ^ALLPST 3 RCON / ™S/ tclk/ 47 52 56 38 U2 LD29080 J3 -6 -o □ M 500mA 1N4002 R14 C22 330p 16V green ^C16 Jc R8 R9 C17 220n T1 16 15 14 SI J2 11 10 RJ45 J1 R11 RIO R12 R13 S2 13 15 25 O O o a o o |- 26 10 12 14 BDM PORT TRST TDI/DSI TDO/DSO ALLPST "N JP1 BDM_SEL0 R2 R1 a o CM T- ’ CM J tX C143 lOOn 12 R15 D3 J14 D4 2 cm R16 yellow 1 • 3 2 4- © Cl 44 lOOn R176 Cl 45 II II lOOn 2 v+ C1 + © U4 Cl- T1IN TIOUT RIOUT RUN R20UT R2IN T2IN T20UT C2+ MAX3232ESE C2- V 16 14 13 J13 X 15 Cl 47 It lOOn UART0 1N4148 R17 OMRON G6D Q1 BC546B T 071101 - 11 Figure 3. Schematic of the home automation server. The circuit has been designed for expandability — in fact it makes a great development system for Coldfire 32-bit microcontrollers. 36 elektor - 4/2008 industrial control serial data bus be- cause of its suitability for use in real- time communication environments and its reliable operation in conditions of harsh EMI. The MCF52231’s big- ger brother the MCF52235 also has Cryptographic Ac- celeration Unit and random number generator for se- cure hardware en- cryption. Some of the other important features of the MCF52231 are listed in the inset. Electronics If we include the transistor and the voltage regulator, there are four ac- tive components in the circuit dia- gram in Figure 3. Let’s take a tour of the schematic. ing is reduced. J1 is the BDM (Background Debug Mode) interface, allowing in-circuit debugging of the application code and Coldfire Flash memory erasing and programming. The associated pro- Everyone's encouraged to improve & extend the DigiButler C code and let us know the results grammer (for optional use) is described further on. RS232 port J13 is driven by the internal UART of the Coldfire and voltage level translation is provided by U4, the fa- miliar MAX232. A regular RS232 cable should be used to connect the port to a PC, i.e. not a null-modem cable. Pushbutton SI is the main Reset and its activation will restart the applica- Voltage regulator U2 steps the input voltage down to provide the Coldfire device with a stable 3.3 V, which is fur- ther decoupled by lots of 100 nF and 220 nF SMD capacitors in key posi- tions. The VDDA supply for U1 is also derived from the + 3.3 V line and has additional fil- tering by ferrite bead FBI and a pair of low-volt- age SMD 4.7 jliF capacitors, C20 and C21. Clean as whistle! Relay control A key feature of the home automation board is its capacity to control hard- ware remotely via the Internet. The ability to control mains voltage equip- ment is especially interesting but re- Elektor is again proud and glad to work together with Freescale Semiconductor Inc. for the benefit of its readership. After the great success of the 8-bit MC9S08 SpYder and Accelerometer articles in March and April 2007 we now take a giant leap to a 32-bit embed- ded system we hope will challenge and inspire the thousands of mi- crocontroller fans among you. The effort is boosted by a kit of parts we're selling at a low price for the DigiButler project. Historically Freescale has successfully concentrated on the auto- motive market for its microcontrollers and as a result has held a leadership position there for many years. More recently however, there has been a real push to significantly increase support to the markets served by the distribution network. This increase for the mass market also extends to students and enthusiasts and has led Freescale to work with Elektor. Interestingly, Freescale has also been asked by some of their largest OEM customers to work with Elektor so that graduates coming into industry are familiar with their products when they start their careers. At the heart of the circuit sits the Freescale MCF52231 Coldfire device (Ul). The 10 or 100 Mbit/s 802.3 ready Ethernet interface is provided by iso- lation transformer T1 and the physical RJ45 Ethernet connector J2. Crystal Y1 (25 MHz) sets the clock fre- quency of the Coldfire microcontroller. This is multiplied up by the device’s internal PLL to give a core clock fre- quency of 60 MHz. Eight 12-bit analogue inputs are avail- able on connector Jll. These are rout- ed directly to the ADC pins of the Cold- fire. A further six of the Coldfire ’s dig- ital input/outputs are available on J12. All can be used as general-purpose I/O and two may be configured to connect to the I 2 C module in the microproces- sor. The two I 2 C lines, SDA and SCL, are fitted with 10 kQ pull-up resistors. The I 2 C can operate at up to 100 kbps with maximum I 2 C bus loading and timing, and even faster if the bus load- tion code. S2 is directly connected to pin IRQ7 of the Coldfire, with a pull-up to the +3.3 V supply, acts as a general purpose pushbutton input. If you want to ‘program it in’, feel free to do so! Jumpers JP1 and JP2 on the board are for programming purposes and will be discussed in part 2. It’s not shown in the circuit diagram, but a large prototyping area on the board gives the user lots of room for experimentation and to expand the board’s functionality. Any low-cost regulated or unregulated power adapter with an output voltage of 5-8V DC at about 500 mA is suitable for powering the circuit. This input mi- nus the drop across D1 is used to sup- ply relay RE1, which has a maximum coil voltage rating of 8 V. As would be expected for such a design, there is reverse polarity (Dl) and over-current protection (FI), and an LED (D2) to in- dicate power on. quires special precautions. As with any life threatening voltages, safety is paramount and there must be elec- trical isolation between the low volt- age of the board and any mains volt- age. Isolation is provided by relay RE1 whose contacts can switch a 250 VAC, 2 A load, the current capacity being limited by the width of the PCB tracks from RE1 to connector J14. Yellow LED D4 shows the relay on/off status. DigiButler software The project firmware is a modified ver- sion of the Coldfire Lite HTTP server software available free from Freescale and described in Application notes AN3455 [2] and AN3470 [3]. A wealth of information covering the software operation and including training pres- entations can be found at [4] and [5]. In this project, modifications have been made to the Freescale software to pro- 4/2008 - elektor 37 HOME AUTOMATION SERVER Yes, Milord • The project is open-source with all C code available free for every- one to alter, recompile and flash • The hardware and software are designed for expansion and experimenting • You are working with real 32-bit embedded technology • The project has been designed and tested in close cooperation with Elektor labs • The PCB in the kit comes with the micro programmed and SMD parts pre-soldered • The hardware is fun to build on a high-quality board with SMDs p re -stuffed • There is a large community of knowledgeable Freescale microcon- troller users • The CodeWarrior programming suite is free and easy to use • East Kilbride is a wet & windy place • There may well be several Coldfire micros in your new car vide authentication using username and password and to allow access from WAP enabled phones and web browsers. There are a large number of code modules in the project and all are written in ‘C’. As the microcontroller is operating at a whopping 60 MHz there is no need for any assembly language code. In the project settings, 81 kB of Flash memory has been reserved for code space and 45 kB of it for web content. If code optimization Level 1 is used when building the project then only 58 kB of code space is used — give it a try! The board implements an HTTP web server using a free TCP/IP and real time operating system stack from Freescale. The term ‘stack’ is used as the software is designed as one proto- col stack on top of another, as shown in Figure 4. For those interested in the in- ternal workings of the stack, a browse through the project source code will show that the stack supports DHCP, UDP, ICMP and ARP proto- cols in addition to TCP/ IP and HTTP Thanks to lots of free information being available on Cold- fire TCP/IP stack pro- gramming, very little knowledge of the code operation is needed to modify web pages and access the board hard- ware across the Inter- net or a WAP phone. by the ‘embedded’ underground com- munity. Some members have actual- ly developed low-cost alternatives to Freescale’ s proprietary programming and debugging systems for various mi- crocontroller families, including the high- end ones! In all cases, the concept of TBLCF is optional, open-source, USB and costs less than $10 to has BDM is used to access the micros. SpY- der [6] is a BDM for MC9S08 micros. A “Turbo BDM Light Coldfire Inter- face” (TBLCF) for use with CodeWar- rior was developed by Daniel Malik. It is found on the Freescale 68K/Coldfire Processors forum [7]. In good commu- nity spirit Daniel released all relevant material on his design into the free- ware domain. If you master the art of ‘judicious sampling’, TBLCF should not cost more than a tenner for parts. An important point to mention is that TBLCF is optional for the present TBLCF: open-source and optional It’s heartening to see that many Freescale mi- cros have been adopted with great enthusiasm Freescale Web Server Freescale Compile Time FFS Freescale Run-Time FFS ColdFire TCP/IP Lite RTOS and Console ColdFire TCP/IP Lite Mini-Socket TCP API ColdFireTCP/IPJLite TCP ColdFire_TCP/IP_Lite UDP ColdFire_TCP/IP_Lite ICMP ColdFire_ TCP/IP_Lite IP Layer ColdFire TCP/IP Lite FEC Driver Freescale Ethernet PHY Freescale Hardware API FFS = Flash File Figure 4. TCP/IP and RTOS stack implemented on the Coldfire micro. project. The DigiButler board in the kit supplied by Elektor contains a ready- programmed MCF52231 micro that will not normally require re-programming or debugging. So, TBLCF is for advanced users wishing to modify the DigiBut- ler firmware — everyone is encouraged to do so and show the results. Daniel Malik’s de- scription of TBLCF is exhaustive and eminently present- ed in free documents and even artwork to make the PCB. There’s an associat- ed DLL and a step-by-step software installation guide. Here, we will limit ourselves to a condensed circuit de- scription referring to Figure 5, cour- tesy Daniel. TBLCF has USB connectivity to the PC. The hardware has two main parts: the MC68HC908JB16 MCU and the BDM interface driver based on a 74VHC14 buffer. The ‘VHC14 is used to achieve low-cost translation of BDM signals with voltages anywhere between 3.3 V and 5 V to the 5 V logic of the MCU. The VHC logic accepts overvoltage on inputs, however the output voltage swing is limited by the power rail voltages. When the 74VHC14 is powered by a 3.3 V source, resistors R3 and R4 would not be able to pull the sig- nals above the 3.3 V rail and would only inject current into the pow- er rail of the 74VHC14. Alas, 3.3V is below the minimum High level input voltage of the MC68HC908JB16 and the circuit would not be guaranteed to work. Diodes D2 and D3 have 071101-15 38 elektor - 4/2008 been added to increase the high level voltages. The better alternative, two N-channel MOSFET transistors, would increase the cost and complicate the PCB layout. The RSTO signal is brought to two dif- ferent pins of the MCU. This is strictly speaking not needed and a connection to pin PTE1 would be sufficient. How- ever connecting the signal to PTA6 as well simplified the PCB design! The ColdFire BDM connector has been here for a long time. In the past, boards usually contained a lot of components and were fairly large. A 26- way con- nector with 0.1” spacing was therefore of a reasonable size. Size of boards is however shrinking and the connector is becoming too large for smaller appli- cations. Two optional enhancements have been made to the standard BDM connector: 1. Where the 26-way connector is too large you can use a 10-way subset of the connector (pins 1 through 10). The only signal which is then miss- ing is TA (Transfer Acknowledge) on pin 26, but this is only needed in systems with external memory bus where the debugger is configured incorrectly and accesses an area for which a TA is not generated (nei- ther internally nor externally). So, the probability that it will be needed is quite low and the absence of the signal can be compensated for by a careful use of the debugger. 2. The RSTO signal has been added to pin 1 of the connector, which was so far unused. This enables the in- terface to detect resets of the micro- controller caused by, for example, the COP/watchdog circuit or a user RE- SET button. Note that the above enhancements are suggestions only and the interface will happily operate even with the original 26- way connector. Pins 11 and 12 of the 26-way connector can be removed to make the interface compatible with both the 10-way and 26-way ribbon cables. Next month It is planned to have kits for the Digi- Butler project available with the publi- cation of the May 2008 issue of Elektor. We then finish the article by discuss- ing hardware assembly and test, net- work connection, Ethernet setup and creating and uploading web pages. For advanced users, CodeWarrior-driven compilation and reflashing of the MPU is also discussed. ( 071101 - 1 ) References and Internet Links Note: documents also available from the project web page: www.elektor.com/digibutler_en [1] ColdFire Ethernet, by Eric Gregori. [2] www.freescale.com/files/microcontrollers/ doc/app_note/AN3455.pdf [3] www.freescale.com/files/microcontrollers/ doc/app_note/AN3470.pdf [4] www.freescale.com/webapp/sps/site/ homepage. jsp?nodeld = 01 62468rH3YTLC [5] www.emgware.com/ [6] Attack of the SpYder, Elektor Electronics March 2007. [7] http://forums.freescale.com/freescale/ board/ message? board. id = CFCOMM&thread. id = 624 VDD 10 MMSD4148 Figure 5. Circuit diagram of TBLCF, the open-source, optional debugger/programmer for Coldfire micros. TBLCF should not cost you more than $10 to build. 4/2008 - elektor 39 PROJECTS MICROCONTROLLERS This new series of articles presents a tiny processor module based on an ATmega88 microcontroller, ideal for use at the heart of any number of different projects. We begin with a reaction time tester and quickly move on to more advanced projects such as a precision weather station and a 3D magnetometer. Our most ambitious and final project will use the ATmega to provide autonomous control to a four-motor aircraft. Each application example provides an easy-to-understand demonstration of how to work with AVR microcontrollers. Elektor readers will already have seen the ATmega8, ATmegal6 and AT- mega32 used in real-world applica- tions. In this series we will be using the ATmega88, which is a small, light- weight and powerful microcontroller (see text box). In comparison to the ATmega8, which is the same physi- cal size, the device offers a higher clock rate, up to six PWM outputs, and many other extras to make life easier for developers. Our AVR projects centre around an ATM18 microcontroller module fit- ted with an ATmega88. To make the unit universally useful, it has been de- signed to be as small and lightweight as possible. The printed circuit board is tried and (thoroughly) tested: it is based on a design that has been used successfully for years in autonomous aircraft made by Microdrones in Ger- many, adapted to suit our particular needs. Anyone who has seen one of these four-propeller aircraft in opera- tion (for example, at Embedded World 2008) will appreciate how important it is to pack as much computing power as possible into a tiny volume. The project essentially consists of two printed circuit boards. The first is the ATM 18 microcontroller module, meas- uring 18 mm square; the second is the ATM 18 test board, which sports a wide range of interfaces and which is intended to be used to help with de- velopment. Of course, surface-mount technology is inevitable in a project like this, and so manually populating the boards is somewhat tricky. How- ever, Elektor comes to the rescue with ready-made modules and test boards: only the connectors need to be sol- dered manually. This has the advan- tage that the connectors not required for a particular application need not be fitted. In some applications it is appro- priate to connect the microcontroller module directly to other printed circuit boards or sensors, and so the module is also available as a separate item so that you can use a single test board to develop a range of different projects based on the module. The ATM18 microcontroller module The module takes the form of a carrier board, similar in style to that featured in the R8C project which will be famil- iar to Elektor readers. We have used a special thin material for the printed cir- cuit board to keep the weight and over- all size of the module to a minimum. 40 elektor - 4/2008 4 The ATM 18 Project on Computer .club ATM18 was developed jointly by Elektor and Computer:club 2 (www.cczwei.de) with contri- butions from Udo Jurss, the main developer of www.microdrones.de. Elektor is pleased to support the project through articles in the magazine, ready-stuffed boards supplied through the Elektor Shop, supplementary information, software downloads and the forum at www. elektor.com. Each month, the latest deveopments and applications of the ATM1 8 system are presented by Wolfgang Rudolph of Computer:club 2 in a TV broadcast on the German NRW-TV network. The boards and example programs from this article instalment can be seen in Broadcast #9 of CC 2 -tv on 20 March 2 008, Some understanding of German required! CC 2 -tv is also broadcast as a Livestream on the Internet at www.nrw.tv/home/cc2. i CC 2 -tv Podcasts are available from www.cczwei.de and - a few days later - from i i sevenlood.de. i L____ __________ ______________ The TQFP32 version of the ATmega88 is used (the device is also available in a 28-pin DIL package). Also featuring on the board is a 16 MHz crystal and the necessary SMD capacitors, and two resistors. Measuring just 18 mm square the unit is smaller than a post- age stamp, and, once programmed, it forms a self-contained autonomous unit. For reasons of space, the head- er connectors are laid out on a 2 mm pitch; in very space-critical applica- tions the headers can be replaced with a cable soldered directly to the board. Headers with a 2 mm pitch are reason- ably widely available since they have long been in common use in Japan. Unfortunately, we cannot use stand- ard perforated board with the mod- ule, but of course we can use the test board, which brings the signals out to 2.54 mm (0.1 inch) pitch box headers. Experiments can then be performed very simply using insulated wire (0.8 mm) to connect the various inputs and buttons. Figure 1 shows the pinout of the AT- mega88 and Figure 2 shows the pinout of the module: the similarities (and the differences) should be evident. A to- tal of 32 pins is reduced to 29, as the GND and VCC connections are repeat- ed on the TQFP package. The connec- tions required for in-system program- ming (ISP) are made available in a single row to simplify connection to a programmer. The crystal and a couple of capacitors are located on the reverse of the mod- ule (see Figure 3). This is all that is needed to get the microcontroller run- ning: see the circuit diagram in Fig- ure 4. The analogue supply voltage AVCC is derived from the main supply via a filter comprising R1 and C3, and there is a 10 kQ pull-up resistor (R2) on the reset input. The printed circuit board layout is shown in Figure 5, with the 2 mm pitch pin headers on all four sides clearly visible. When these are fitted to the board, they mate perfectly with the corresponding sockets on the test board. When soldering these headers it is important to ensure that they are mounted exactly vertically: it is pos- sible to use the test board as a jig to simplify the job: mate the pin head- ers with their corresponding sockets on the test board and then place the microcontroller module on top. This 4/2008 - elektor 41 MICROCONTROLLERS CO p (D h 00 CM — — O O O Q_ 0- _ _ CL O Q O O p W W Q. Q. LU LO CO CM Q Q CO O O O O 5XXLUQOOO £ i- a: o i<<<< o Q. o O O CL 0- (D ifi M- CO (M a o o o o CL CL CL CL CL CM t- O Q Q Q CL CL CL nnnnnnnn (PCINT 1 9/OC2B/INT 1 ) PD3 C (PCINT20/XCK/T0) PD4 C GND C VCC c GND C VCC c (PCINT6/XTAL1/T0SC1 ) PB6 C (PCINT7/XTAL2/TOSC2) PB7 C CM 1- O oo oo co O) CO N CD LO CM CM CM CM CM o o o 24 23 22 21 20 19 18 17 05 CM 00 M- If) CD TTTTTT O CD N a □ a CL CL CL U U U U U Ot-CMCO'd- CD CO CD CD CD CL CL CL CL CL C0 O O o oo CM < < o a o CM O CM CL < ^ CM O - “ GOO O P P _j o o o CO CD < 2 m CM H ^ ^ o Z — CM >< 7T a CL a CL o CL a CL a CL o co a CL a CL □ PCI (ADC1/PCINT9) □ PCO (ADC0/PCINT8) □ ADC7 □ GND □ AREF □ ADC6 □ AVCC □ PB5 (SCK/PCINT5) 071035- 13 Supply ISP PD7_AINi — PB0_ICP1 — PBl_0ClA PBZ_SS_0C1B “ GN0_TSP PC6JJESET - PB3_ttOSI PB4_mS0 — L PBS^SCK — PD-I.XCK.Te - E gno ucc PS6_XTftLl — PB7_XTftL2 - — PD6_DC0A_AIN0 PD5_OC0O P03_INTl PD2_INT0 P01_T)(D PDG_RXD PC5_ADC5^SCL PC4_fiDC4_SOA PC3_ADC3 PC2_ADC2 PCl_fi0Cl PC0_AOC0 ADC? AREF AQCG Figure 1. The pinout of the ATmega88 in a TQFP package. Figure 2. Pinout of the ATM18 microcontroller module. will keep everything at the correct an- gle while soldering. Do a single pin on each connector first, and then make a thorough visual inspection, adjusting the positions of the connectors if nec- essary. When everything is in order the remaining pins can be soldered. The test board This printed circuit board is of course rather larger. It provides a wide range of external interfaces as well as a pow- er supply for the ATM18, providing an easy way to experiment with the r — — — — — — — — — — — — — — — — — - - n ATM18 micro- controller module Quick data i Microcontroller: ATmega88 1 Operating voltage: 2.7 V to 5 V i Processor clock: 0 Hz to 20 MHz | (typically 1 6.0 MHz) i Current consumption: approximately i 1 8 mA (at 5 V and 1 6 MHz) i Hardware features Two 8-bit counter/timers (TimerO, i Timer2) 1 One 1 6-bit counter/timer (Timerl ) i One synchronous serial interface (SPI) i One asynchronous serial interface (UART) i One two-wire interface (l 2 C) One 10-bit A/D converter with 8 inputs (ADCO to ADC7) | One analogue comparator Up to 23 digital I/O lines 1 L_ ___ __ ___ __ ___J Figure 3. Top and bottom views of the ATIVI18 microcontroller module. module and connect extra hardware, sensors, actuators and other bits and pieces. The board measures 80 mm by 50 mm and the mounting holes are spaced at 72 mm and 44 mm. Figure 6 is the circuit diagram of the test board. IC1 is a type LM2594-5.0 step-down converter, which provides a regulated supply voltage of 5 V for the microcontroller and peripherals from an input supply (on connector Kl) of between 7 V and 16 V without dissipating large amounts of power as heat. Current demand is low, and a simple mains adaptor can be used. Battery power, using rechargeable or dry cells, is also feasible. Diode D1 protects against accidental reverse polarity connection of the power sup- ply: a Schottky diode is used as it has a lower forward voltage drop. The regulated voltage, EXT + 5 V, is used as the supply for the board if jump- er JP6 is set to ‘EXT’, bridging pins 1 and 2. If JP6 is set to bridge pins 2 and 3 (‘USB’), the supply is obtained from K2, the connector for the TTL- level serial interface. If an FTDI TTL- 232R adaptor [1] is connected to K2, the 5 V supply will be taken from the connected PC via its USB port. The adapter will be available from the Elektor shop in the near future. There is also a 3.3 V version of the adaptor, which can equally well be used. The selected supply voltage is available on eight pins of connector K8. There are 42 elektor - 4/2008 r i AVR, ATtiny and ATmega It was decided to use an Atmel ATmega microcontroller for this project. This comprises an entire family of devices, with the main dif- ference between individual devices being in their processing power. The design is particularly flexible and modern and ideal for low-cost implementations. The original AVR design was produced at the Nor- wegian Institute of Technology in Trondheim before being bought by Atmel. The AVR core is particularly small and can be implemented in as few as 4000 gates. Atmel, the only manufacturer of processors using this core, produces two series of devices: the ATtiny series and the ATmega series. The AVR has a RISC (reduced instruction set com- puter) architecture; traditional CISC (complex instruction set compu- ter) architectures offer more powerful and sophisticated instructions, but decoding such an instruction takes considerably longer than does the decoding of a RISC instruction. Furthermore, a CISC processor generally takes longer to respond to an interrupt request than a RISC processor, impairing real-time performance. All ICs in the AVR family are structured in essentially the same way, differing only in the quantity of memory available and the number and types of timers provided. Some also feature an A/D converter or a UART (universal asynchronous receiver/transmitter) to provide a se- rial interface on the chip. The AVR was designed with the efficient execution of programs writ- ten in high-level languages in mind. From the point of view of both price and performance a RISC microcontroller of this type makes the ideal basis for our projects. also a further eight ground pins, giv- ing a total of eight points from which a supply can be obtained to power ex- ternal devices. Six more ground pins are available at K9. Jumper JP2 is also concerned with power supply options. If it is fitted, the +5 V supply is used as the refer- ence voltage for the A/D converters in the microcontroller. A low-pass filter is used here to smooth the reference volt- age in the same way as the analogue supply is filtered on the module board. Together these filters ensure that the reference used for A/D conversions is stable and free of interference. The TXD and RXD signals on K2 are compatible with TTL levels and are not inverted. If proper RS-232 levels are required, an external interface device (such as a MAX232) must be used. The interface is designed for direct connec- tion to an FTDI TTL-232R USB-to-serial converter. There is a total of four pushbuttons on the test board (Figure 7). Switch SW1 is the reset button, allowing the mi- crocontroller program to be restarted at any time. SW2, SW3 and SW4 are general-purpose buttons connected to K12. They can be connected to the mi- crocontroller’s I/O ports so that their state can be determined by a suitably- written program. The test board also provides outputs, a ULN2003 power output driver giving seven high-current outputs on Kll. Each open-collector output can sink up to 500 mA, and so is capable of driv- +5V Figure 4. Circuit diagram of the ATJVll 8 microcontroller module. Figure 5. Printed circuit board for the ATJVll 8 microcontroller module. COJVIPONENTS LIST ATJVll 8 controller module Resistors (SJVID 805) ri = ion R2 = 1 OkQ Capacitors (SJVID 805) Cl ,C2,C3 = 4^7 6.3 V (Farnell # 922-7857) C4,C5 = 22pF Semiconductors IC1 = ATmega88 (TQFP32 case), Atmel) Miscellaneous Q1 = 1 6MHz quartz crystal, SMD (7mm x 5mm) 3x 8-way pinheader, 2mm lead pitch lx 5-way pinheader, 2mm lead pitch PCB, ref. 071035-1 (track layouts free download from www.elektor.com) PCB, ready populated with SMDs, test- ed, including pinheaders, Elektor-Shop # 071035-91 4/2008 - elektor 43 PROJECTS MICROCONTROLLERS ing motors and relays directly. Seven LEDs (with current-limiting resistors) are provided to show the states of the output signals. The inputs to the power driver IC are available on K10, allowing them to be connected to any desired port on the microcontroller as required by the user or programmer. One of the most important interfaces on the board is ISP connector K7, used for connection to a programmer. The pinout is compatible with the six-pin ISP connector on the STK500 as well as Atmel’s ISP mkll. A less expensive op- tion is the Elektor USB AVR program- mer, compatible with the ISP mkll. This design will appear in next month’s is- sue, but the unit is already available K1 V 7 6. ..16V D1 MBRS130 -Hr K2 VIN GND +5V © FB IC1 VIN OUTPUT LM2594-5.0 ON/OFF GND Cl □ 47n LI ywvY 100nH D2 +5V © C2 □ MBRS130 47pc K5 C3 □ | R 2 a 47pc C4 4|j7 LED9 *^^reen PD1/TXD PDO/RXD ■\ USART +5 V JP2 AREF C5 1*7 AREF C6 4|a7 I +5V © +5V ©- R3 S4 PC6/RESET USB+5V +5V © JP1 rE° o PWR SEL It EXT+5V K4 11 13 15 o a o a o a ■o a o a o a o a o a 10 12 14 16 DEV PWR K12 -1 f < O Q C/3 C/3 in CO CM 1— o o o o O o o 1— H x X Q Q a o Z t: pc 01 12 02 13 03 14 04 15 05 16 06 17 07 DS GND LED! ED7 +5V © LED8 os T 1 ^ 15 2 O 4 , 3 03 4 02 5 Oi 6 oo 7 9 8 SI [R5 ' R7 | R9 □ S2 H 8 ULN2003 EXTLOAD S3 N K3 MGND +5V PB4/MISO 1 _r\ a_ 2 ^PBS/SCK 3 r\. 4 r pC6/RESET 5 _r\ r\. 6 / \~r ISP K8 KEY OUT J 071035-12 Figure 6. Circuit diagram of the ATM18 test board. in conjunction with the ATM 18 test board. The USB AVR programmer is based on the popular general-purpose USBprog programmer published in the October 2007 issue of Elektor. Another alternative is to make a simple Pony- Prog compatible connection directly to the connector on the processor module board. The power supply and interface op- tions are summarised in the accompa- nying text boxes. Rapid prototype The ATM18 test board is fitted with a large number of 2.54 mm pitch con- nectors. These can be connected with- out the need for a soldering iron: any desired configuration can be realised quickly and simply using lengths of insulated wire with stripped ends. Wire with a gauge of 0.8 mm is ideal: with a few 8 cm lengths of such wire to hand the necessary connections can be made and changed as needed for any desired application or experiment (Figure 8). If connections to external modules or devices are needed, a pin header can be used along with a suit- able length of ribbon cable. Software Udo Jiirss [2], the designer of the ATM18 system, is a professional en- gineer and normally uses professional software tools. For the applications we will be looking at, the IAR C compiler fits the bill: it provides a powerful de- velopment environment offering almost every conceivable feature. As is so of- ten the case with such powerful tools, it is not always easy to use at first, and there is a degree of ‘running in’ as the programmer learns how to use the compiler to the desired effect. Time- or memory-limited demonstration ver- sions of the compiler are available from the IAR website download area [3]. The latter version is adequate for many applications. The ‘Kickstart Edi- tion’ of IAR Embedded Workbench for the Atmel microcontroller is not time limited, but can only generate code up to a maximum of 4 kbytes. A number of questions must be answered on the website before the software down- load can begin. We have arranged for a project file to be available for readers to download from the Elektor website: this greatly simplifies configuring the IAR compiler. All programs that fea- ture in this series are also available for download as hex object files. 44 elektor - 4/2008 r n Power supply Overview of the ATM18 test board • External supply from 7 V to 16V DC (K1 ). • Reverse polarity protection (Dl). • Select between external and USB power (PWR_SEL, JP6). • Selectable A/D converter (AREF, JP2). • Low-loss 5 V switching voltage regulator (1C 1 ) . • Eight connections for powering external modules (DEV_PWR, K8). • Auxiliary connection point for external power (VI N, JP1 ). • LED power indicator (LED1). • Additional ground reference (MGND, K9). • Current consumption: 9 mA at 1 2 V without ATM1 8 module, 27 mA with ATM1 8 module. Users who prefer not to use C and a sophisticated development environ- ment can work with assembler or BASCOM. BASCOM-AVR is a very ef- ficient high-level language for the AVR microcontroller, broadly comparable to QBasic. Programs are very clear and straightforward to write as complex our applications. BASCOM-AVR runs under Windows 95, 98, NT and XP and, with minor restrictions, under the Wine emulator on Linux platforms. LED running light in BASCOM Our first programming example with (16 MHz) is given here in units of Hz; the value is needed so that the delays in the program have the correct tim- ing. We have chosen to drive the LEDs from port C, which is therefore config- ured as an output. Finally a byte varia- ble ‘Leds’ is declared, initialised to the value 1 (corresponding to just the first Figure 7. Printed circuit board for the ATM18 test board. COMPONENTS LIST ATM18 test board Resistors (SMD 805) R1 = 10Q R2,R4,R6,R8 / R1 0-R1 3 = 330D R3,R5,R7,R9 = lOkD Capacitors Cl ,C2,C3 = 47jL/F 16V (SMD7343-43, Farnell # 498-762) C4,C5,C6 = 4jL/F7 6.3 V (SMD 805, Far- nell # 922-7857) Inductors LI = 100jL/H (SMD2220, Epcos # B82442A1 1 04K) Semiconductors D1,D2 = MBRS130 (BYS10), D0214-AC (Farnell # 995587) LED1 = SMD0603-LED, green (Farnell # 852-9833) LED2-LED8 = SMD0603 LED, red (Farnell # 852-9868) IC1 = LM2594-5.0, S08 (National Semiconductor) IC2 = ULN2003AD, SOI 6 Miscellaneous K1 = mains adapter socket, PCB mount, Lumberg NEB21 R (Farnell #121 7037) K2 = SIL pinheader, 6-way, angled pins K3 = SIL socket pinstrip, 7-way K4 = SIL socket pinstrip, 8-way K5 = SIL socket pinstrip, 9-way K6 = SIL socket pinstrip, 5-way K7 = double-row pinheader, 6-way, K8 = double -row pinheader, 16-way K9 = SIL pinheader, 5-way K10 = SIL socket pinstrip, 7-way K1 1 = SIL pinheader, 7-way K12 = socket pinstrip, 3-way JP1, JP2 = pinheader, 2-way JP6 = pinheader, 3-way SW1-SW4 = pushbutton, SPNO-B3S series, Omron (Farnell # 1 18-1016) PCB, ref. 071035-2, track layouts free download from www.elektor.com SMD-populated board and all parts, # 071035-92 from the Elektor Shop commands save the programmer a great deal of work. The demonstration version of BASCOM can be download- ed for free from the Internet [4]; again, there is a 4 kByte code size limit, but there are no functional limitations and the system is perfectly adequate for BASCOM-AVR is the now classic first test of a new microcontroller system, a LED running light. Note that the program (Listing 1) must specify the file m88def.dat; alternatively, the mi- crocontroller type can be specified in the options. The crystal frequency LED being lit). In the infinite loop (from ‘Do’ to ‘Loop’) this single set bit is shifted left one place at a time: this corresponds to a repeated multiplication of the variable by two: 1 becomes 2, 2 becomes 4 and so on. In this way the program drives Interfaces Overview of ATM18 test board: • ISP programming adaptor (ISP, K 7). • USART for FTDI USB-serial converter or TTL-level serial interface (USART, K2). • Three uncommitted pushbuttons that can be connected as required (SW1 , SW2, SW3, K12). • Seven LEDs that can be connected as required (LED2 to LED8, K10). • Seven power outputs (maximum 500 mA) that can be connected as required (K1 1 ). • Reset button (SW1). • Socket for ATM18 microcontroller module (K3, K4, K5, K6). 4/2008 - elektor 45 MICROCONTROLLERS the outputs high one after the other. After each change there is a delay of 100 ms. To test the program we first have to connect port C (six pins) to the inputs of the ULN2003 LED driver (seven pins). The lower six bits, PCO to PC5, are used, and the seventh input to the ULN2003 is left unconnected. If de- sired, a bit from another port could be used, or port D, which has eight pins, could be used instead of port C. Next we must flash the code into the microcontroller. For this we need a suit- able programmer such as the STK500 [5] or the Elektor USB AVR program- mer mentioned above. If you wish (and provided your PC has a parallel port) you can also use a simple parallel port programmer described in a free bonus article available from the Elektor web- site. An AVR ISP programming adaptor for the PC serial port was described in the ‘Mini ATMega Board’ article in the May 2006 issue of Elektor. Programming is carried out using the AVR tools, within which the program- mer itself is called up. It is essential to select the correct device (ATmega88) and to specify the generated hex ob- ject file (LEDl.hex): see Figure 9. The device must be programmed not only with the desired code, but also with the desired fuse settings. Partic- ularly important is the configuration to allow use of the crystal as clock source: as delivered by the manufacturer the Figure 8. Test board wired up ready for an experiment. Figure 9. Programming the flash memory. Web Links [1 ] http://www.ftdichip.com/Products/Evaluati- onKits/USB-Serial.htm [2] http://www.microdrones.de [3] http://www.iar.com [4] http://www.mcselec.com/elektor.htm [5] http://www.atmel.com r — — — — — — — — — — — — — — — — — — — n Listing 1 Running light (LEDl.hex) 1 ' 7 LEDs on PortD $regfile = "m88def.dat" i $crystal = 16000000 1 Config Portd = Output Dim Leds As Byte i Leds = 1 1 Do i Leds = Leds * 2 1 If Leds > 64 Then Leds = 1 Portd = Leds i Waitms 100 1 Loop L ___ __ ___ __ ___ J device is configured to use its internal oscillator with a divide-by-8 prescaler. Figure 10 shows the correct fuse set- tings (again using the STK500). If the programming procedure has been carried out correctly, the result is exactly what one would expect from a quick glance at the Basic program: the LEDs light in turn from right to left at the rate of one step every 100 ms. A further example BASCOM program is available for free from the project page on the Elektor website, as is the C project for the reaction time tester mentioned at the start of this article, which requires the IAR compiler. (071035-1) Figure 10. Configuring the AVR fuses. 57K50D |_J|_n|(x] Pn ij rim -U0C3 ! i ii i.fii::-: ti h/-i n .“i I Bii.ii I Aulit F EkI. CrrrtfalOae.; Frequency fiD-fiO MHz; Slait-up lime PWRDWN/RE F Hut Crystal Osc.; Frequency 3.0-D.D Ml Iz: Slait-uplime r^WTlDWH/PlC F Em Crj,malOse . Frequency 3 . D-G.0 MHz; Slait-Lp lime PVRDVvW/RE F but UrMalUae,; Frequency 3U HU MHz; Slart up lime FAVHOWHVHb r Fd rjjjjJril flsi : FrKqiKriy 3 ThFi fl MHz. : : il,nlij; i Iuiik Fy/RDVrffclVRF F Em Drytial Dae.; Frequency fifi-0.0 MHz; Start-tip lime PwROVvW/RE r but. Lrystal Uae.: Frequency HU HU MHz: Start up lime F’WHUWWVHt I F kI FjjjjJrfl flxi : . FrHifirn^pfifF MH t. Stall -i i| i linn PV/FI IW/N^RF Fl F Em CqjttalDse.; Frequency fiD- MHz; Startup rime PWfl DV/N^RE & F Cm Crystallise..: frequency QD- MHz: Start up time lAvTl CWN/riC S F E m Crystal Oic.; Frequency HD- MH z; Start-up rime FVlfl DWH^RE S F E m Ety&lal Oac.; Frequency H D MHz; Start up dmc PWR DWN^RE S F r ut r>juMrt1 (ljir. rrerjierwy (1 0- Ml Ir; Slnrt-up lime rWFI RWKiynr S F E m Crystal Ose.; Frequency fi D- MH z; S tart-up rime PUffi DWFWRE S ie b m Crystal Uac.; Frequency HU MH c; Start up dmc h'WH LMFJ^Hb S V th u) j AutoVcnly V Smart Warnings Pi 1 ijmivi V Killy RhV-ul Filramj fMiiji.iiniiTiy itimIk flKI ricadiio (uses .. G^ro. OkDD. OkIT . OK' Lezwinq prDqrammhq mode.. OK! 46 elektor - 4/2008 QUASAR electronics Quasar Electronics Limit PO Box 6935, Bishops Stc CM23 4WP, Tel: 0870 241 United Kingdp 6 1826 ed rtford m Fax: 0870 460 1045 E-mail: sales@quasarele Web: www.QuasarElectro ctronics.com nics.com 08717 Postage 3-7 Day Europe SOrder We acc to Quas Call no project4 95 & Packing Op Delivery - £3. (EU) -£6.95; R4 online for reduc opt all major cr ar Electronics, for our FREE modules and w ions (Up to 0.5 UK Mainland st of World - £! ed price UK P4 edit/debit cards Prices include CATALOGUE publications. : UK Standard jery - £8.95; I) (r assembled ^nd ready for use (AS prefix). 8-Ch Serial Isolated I/O Relay Module Computer controlled 8- channel relay board. 5A mains rated relay out- puts. 4 isolated digital inputs. Useful in a vari- ety of control and sens- ing applications. Controlled via serial port for programming (using our new Windows inter- face, terminal emulator or batch files). In- cludes plastic case 130x100x30mm. Power Supply: 12Vdc/500mA. Kit Order Code: 3108KT - £54.95 Assembled Order Code: AS3108 - £64.95 Computer Temperature Data Logger 4-channel temperature log- ger for serial port. °C or °F. Continuously logs up to 4 separate sensors located ^ 200m+ from board. Wide range ot tree software applications for stor- ing/using data. PCB just 45x45mm. Powered by PC. Includes one DS1820 sensor. Kit Order Code: 3145KT - £17.95 Assembled Order Code: AS3145 - £24.95 Additional DS1820 Sensors - £3.95 each Rolling Code 4-Channel UHF Remote State-of-the-Art. High security. 4 channels. Momentary or latching relay output. Range up to 40m. Up to 15 Tx’s can be learnt by one Rx (kit in- cludes one Tx but more avail- able separately). 4 indicator LED ’s. Rx: PCB 77x85mm, 12Vdc/6mA (standby). Two and Ten channel versions also available. Kit Order Code: 3180KT - £44.95 Assembled Order Code: AS3180 - £54.95 DTMF Telephone Relay Switcher Call your phone num- ber using a DTMF phone from anywhere in the world and re- motely turn on/off any of the 4 relays as de- sired. User settable Security Password, Anti- Tamper, Rings to Answer, Auto Hang-up and Lockout. Includes plastic case. Not BT ap- proved. 130x110x30mm. Power: 12Vdc. Kit Order Code: 3140KT - £54.95 Assembled Order Code: AS3140 - £69.95 Infrared RC Relay Board Individually control 12 on- board relays with included infrared remote control unit. Toggle or momentary. 15m+ range. 112x122mm. Supply: 12Vdc/0.5A Kit Order Code: 3142KT - £47.95 Assembled Order Code: AS3142 - £59.95 PIC & ATM EL Programmers We have a wide flange of low ATMEL Programmers. Comply documentation available from Programmer Ac 40-pin Wide ZIF 18Vac Power su Leads: Parallel (LDC441)£3.95 cessortes: socket (ZIF40W) £14.95 pply (PSU010) £18.95 (ILDC136) £395 /Serial / USB (LDC644) £2.95 (tost PIC and te range anc| bur web site. NEW! USB & Serial Port PIC Programmer USB/Serial connection. Header cable for ICSP. Free Windows XP software. Wide range of ;upported PICs - see website for complete listing. ZIF Socket/USB lead not included. Supply: 16-18Vdc. Kit Order Code: 3149EKT - £39.95 Assembled Order Code: AS3149E - £49.95 NEW! USB 'All-Flash' PIC Programmer USB PIC programmer for all ‘Flash’ devices. No external power supply making it truly portable. Supplied with box and Windows Software. ZIF Socket and USB lead not included. Assembled Order Code: AS3128 - £44.95 “PICALL” PIC Programmer “PICALL” will program virtu- ally all 8 to 40 pin serial- mode AND parallel-mode (PIC16C5x family) pro- grammed PIC micro control- lers. Free fully functional software. Blank chip auto detect for super fast bulk programming. Parallel port connection. Supply: 16-18Vdc. Assembled Order Code: AS31 17 - £24.95 ATMEL 89xxxx Programmer Uses serial port and any standard terminal comms program. Program/ Read/ Verify Code Data, Write Fuse/Lock Bits, Erase and Blank Check. 4 LED’s display the status. ZIF sockets not included. Supply: 16-18Vdc. Kit Order Code: 3123KT - £24.95 Assembled Order Code: AS3123 - £34.95 www. QuasarElectronics. corn cure Online Ordering Facilities • Full Product Listing, Descriptions & Photos • Kit Documentation & Software Downloads 4/2008 - elektor 47 TECHNOLOGY OPEN SOURCE R&D ...the liberties of Open Innovation Antoine Authier The boom in the Internet and rapid evolution of communication techniques and tools have made diffusion of knowledge and projects possible on a massive scale, and allowed work and discussion communities to be created on a global level. New ways of publishing and distributing artistic or technical creations, and contributing to collective projects or works have appeared. When these activities take place within a framework of openness and exchange, we talk about Open Innovation. open source This is the case with projects like GNU, Linux, Mozilla, Apache, The GIMP, MySQL, Amarok, OpenOffice, YAMPR or more recently OpenMoko - all re- ferred to as Open Source software or electronic designs. Artists too are taking advantage of this wave and these collaborative tools. Take a look at the Wallpaper project started by Alex Ciccius and The Sam- buki Social Crew: 100 artists are cre- ating a 100’ (approximately 32 m) long banner that can be viewed on www. thespacejockeys. com/ wallpaper. The vast quantity of information avail- able on this subject on the Internet is not very user-friendly and is difficult to summarize. The intention of this arti- cle is to first give a few historical land- marks and describe open innovation. Then we’ll take a look at a few exam- ples of the different modes of distribu- tion and their viabilities. We will of course highlight the special character of electronic hardware and describe the development process. There’s no question here of patents or copyright laws, so unfortunately we won’t have the opportunity to discuss the problematic local implementations of EUCD (European Union Copyright Directive). Maybe some other time. . . Open Source The Open Source movement arose in the late seventies at Berkeley Univer- sity in California, in a development project for an operating system com- patible with Unix, called BSD (Berkeley Software Distribution). The publication of the source code, with no restrictions and for the purpose of sharing, allowed this project to develop in a collabora- tive manner. In the event of collabora- tion on major projects, many contrib- utors may be involved without their necessarily having known each other at the outset. They work with the same aim in different locations around the globe, and they occasionally organize meetings to define the development plan. A little later, in 1983, Richard Stallman created the Free Software Foundation to provide a framework for the devel- opment of GNU (famously explained as ‘GNU is Not Unix’). Then he drew up the GPL (General Public Licence) in order to distribute the fruits of this la- bour, ensure its durability, and launch free software. The use of the ambigu- ous word ‘free’ has caused a lot of mis- understandings. A piece of ‘free’ soft- ware isn’t necessarily ‘free of charge’; it may be sold, though this is generally not the case. The co-operative development of the Linux core, launched by a Finnish stu- dent, then its incorporation into GNU (whose operating system was slow in coming), laid the foundations for this form of open innovation. When it in- volves mainly software, we talk about open source. There is no definitive definition of open source, nor does it correspond to a par- ticular software licence either. The term ‘open source’ doesn’t even have any inherent legal value in itself. We should also dispel once and for all the confusion between ‘free’ software and ‘open source’ software often per- petrated by the press. 48 elektor - 4/2008 Principal licences The information published in this inset has no legal value. The sheer amount of information in the licence documents is such that we have to content ourselves with merely extracting a few relevant passages just to give a taste of the subject. We have concentrated on the principal licences used for distributing source code or electronics projects. Read- ers interested in one particular licence or another will need to look up the corresponding complete document. You will find the texts of these various licences in their many revisions on the Internet via the links available at http://www.elektor.com/UK_open-innovation or directly from the FSF website. • BSD licence (Berkeley Software Distribution) allows the document it protects to be re-used, in whole or in part and without restriction, in a public or proprietary work. Unlike the public domain, it does however present a few constraints to be respected when redistributing the document. It also protects the names of the authors in derivative publications, and releases them from any problems that might arise out of the use of the work. It is one of the least restrictive. • GNU GPL licence (GNU General Public License) is certainly the most stringent. It makes the publication of modifications obligatory to the distribution of the software. It is based on the Copyleft principle, which relinquishes reproduction rights to the community (as distinct from Copyright). However, a document published under GPL belongs in a very real sense to its author, who will decide the appropriate licence for the dis- tribution of later versions of the document, thereby enabling them to change licences. It has a viral character, as it contaminates (closed) projects in which it is used. A project published under GPL must be GPL as a whole. This is certainly the oldest and most popular licence for free software. • GNU LGPL licence (GNU Lesser General Public License), a toned- down version of the previous one, allows association of code under a GNU GPL licence that is totally free with a resource that is not. In this way, it allows a piece of proprietary software to be written including free resources. It applies principally to software libraries. It's only really of very limited interest. • MPL licence (Mozilla Public License) allows combining both proprie- tary source code (normally unpublished) with free source code within a single project. It then guarantees the openness of the code specified as free. By virtue of its non-viral character, it is regarded by many as freer than the GPL licence. It guarantees the authors that the open character of their work will be preserved, without constraining other contributors (current or future) to doing the same. • Chronodegradable licences The free distribution of the source code takes place in a delayed fash- ion after marketing of the software - in principle when a new commer- cial version is published. This is the case with ID Software, famous for the success of 'Doom', its first 3D game, whose source code it decided to publish at the end of its software's lifetime, thereby benefiting from external contributions to the storyline. • IBMPL licence (IBM Public Licence) - used by IBM for distributing cer- tain of its source codes that are regarded as non-strategic - recog- nized by the OSI. It differs from the GPL in the way it handles managing and distributing patents. It makes the software publisher and distributor responsible, rather than the contributors. • SCSL licence (Sun Community Source Licence) is the licence original- ly used by SUN Microsystems for distributing its JAVA language. It does not allow the opening up of the JAVA source code and so is not regarded as 'open'. However, it does allow, on the one hand, acquisi- tion, use, and free redistribution of the JAVA virtual machine (without which it wouldn't be possible to interpret the code you write), and on the other hand, distribution of free libraries, software, and tools written in JAVA. Since 2005 SUN has introduced new licences in order to in- crease its openness, though still without publishing its sources. • Shared Source licence, set up by Microsoft in response to pressure from the free software world, constitutes several licence contracts and is reserved for Microsoft's largest commercial partners and certain in- fluential institutions (universities, Chinese government, etc.) It mainly lets them consult the source code and allows debugging. Very few have the right to modify. • Creative Commons licence is flexible and customizable. It offers four distribution options: paternity, no commercial use, no modification, share-alike of the original conditions, which can be combined to cre- ate a specific distribution licence. A refreshing, novel concept that is really starting to take off. The OSI (open source initiative) open source movement was created in 1998 to respond to the economic and tech- nical realities and defend the freedom of access to software source codes. In a few points, it defined the conditions for a piece of software to be described as open source; what’s more, it has be- come the official certification body for open source and its diverse publica- tion licences. Advantages and disadvantages In his document entitled ‘The Open Source Dynamic’, Robert Visseur lists the advantages and disadvantages of open source. We thought it worthwhile to sum these up here. • Quality: the stability and perform- ance of open source software like Linux or FreeBSD. • Reactivity: e.g. updates to software 4/2008 - elektor 49 TECHNOLOGY OPEN SOURCE R&D like Apache or Linux appear very quickly. • Durability: e.g. loyal users have re- programmed old operating systems like MS-DOS or CP/M. • Cost. • Freedom: independence from the developers • Competition: impossible for a monop- oly to take place, by virtue of the source code and communication standards. Stimulates competition between com- panies, as well as between nations! With open source code, the software can breathe freely and benefits from the support of the entire community. This goes hand-in-hand with the writ- ing and development of real, open, re- liable standards where everyone can cast a critical eye. • Protection of intellectual proper- ty: the principal complaint of open source’s adversaries is that secrecy and fierce competition are vital to sus- tain innovation. To which open source partisans argue that the mixing of ide- as and mutual and cross-fertilization favour innovation much more than the fact of appropriation. • Finish: interfaces have a reputation for being rustic • Risk of divergence: e.g. BSD gradu- ally split into three projects: FreeBSD (the most widespread and the most user-friendly, favouring performance), OpenBSD (favouring security) and the original branch, NetBSD (which favours adaptation to hardware). • Brand image: Linux is often poorly- regarded by the hierarchy for profes- sional use. • Support: Documentation is some- times lacking. The Wiki script, which came out in the mid-90s and has been made popular recently by the free en- cyclopaedia Wikipedia, is attempting to make up for some of these shortcom- ings. It offers readers the opportuni- ty to contribute to documentation on line. English is obligatory, despite some laudable translation efforts. Contributing to a project Nothing could be simpler than contrib- uting to an open source project. Con- tact its author by e-mail or IM, express yourself in the project forum, give your opinion, add a page of documentation or advice to the Wiki. You can contribute on several lev- els, from simple encouragement to a small donation. Your general remarks on features or the interface will be ap- preciated, a bug report, comment, or the review of the source code will be welcomed. And if you have a literary bent, don’t hesitate to participate in the project documentation. If you want to program, prove yourself by sending patches (corrections, improvements) and it won’t be long before you obtain write access to the version manager (CVS, sub version, and so on). Launching a project Launching a project is hardly any more complicated. You have an idea, you think it may be useful to a communi- ty, you want to share it. If you aren’t a natural webmaster, open an account at www.sourceforge.net and publish your project, distribute your sources and your work. If you want to keep con- trol of it and host your project website yourself, while benefiting from certain collaborative development tools, create your community space with the help of gforce. If not, then a simple website will do... Distributing a project How can the author of free software earn a living, or at least some money from it? Prior to distributing the fruits of your labours on the Internet or sim- ply opening it up to the world, and in order to be able to do so, it’s important to define the legal framework for it that will allow you to be recognized, to pro- tect yourself against possible abusive use, and to share it or not. Distributing code, circuits, drawings, photos, art, etc. freely and free of charge, while still retaining paternity, can be done by means of a licence (for example, Creative Commons). The in- set should help you choose a licence appropriate to your needs, from the fairly stringent open source (free soft- ware) licence to the shared source one, via various intermediate nuances. If your aim is to make money, you’ll need to conform, to a greater or lesser extent, to the economic models, strat- egy, and marketing that are usual prac- tice in our societies. The OSI is work- ing towards an economy for software with no user licences but based on the sale of services, hardware, and the support needed for rapid deployment. Several thousands of engineers in Eu- rope are employed by way of this eco- nomic model. Open Hardware The concept of open source hardware, or ‘open hardware’, is not all that dif- ferent. However, it is much easier to copy a piece of software than to repro- duce hardware, which requires more advanced skills and knowledge. Although the open source concept is still quite fuzzy, it is however clearly defined by its licences. The concept FreeBSD < 8 > of open source hardware, on the other hand, still does not have a definition that is recognized around the world, nor totally accepted. In an article published in ‘Linux Today’ in 1999, Richard Stallman, founder of the FSF (Free Software Foundation) and author of the GPL (General Public Licence), stated that the GPL licence was not suitable for electronic circuits, as they are difficult to modify or copy. Most of the people involved consider that the same applies to embedded software (firmware), generally stored in Flash memory, but in any event not at all comparable with the volatility of software in a computer’s RAM, at best stored on hard disk. Users of open source hardware must be able to modify the hardware and distribute it freely. This necessitates making available all the circuits, along with the source code of the compo- nents, in particular the HDL (Hardware Description Language) sources of the hardware and the firmware (most often written in C and assembler). 50 elektor - 4/2008 In an Elektor interview with Harald Kipp in Elektor March 2008, the father of the Ethernut said, rather tongue- in-cheek, that “for many people, open source is like communism, in the sense that everyone can take from the com- munity without paying anything. ” Kipp added that certain developers also re- gard open source as like communism, but because they perceive the hierar- chy as a dictatorship! Indeed, we might be tempted to im- agine that anarchy reigns in open source, but that’s far from being the case. The organization of open source projects is built on a solid framework, indeed highly hierarchical, most of the time with the owner of the project as incontestable master at the top of the structure. If he doesn’t like a contribution, he can withdraw it without asking anyone’s opinion. If it’s a developer he doesn’t like, he can send them packing without any other form of trial, and refuse any contribution from them. For small-scale projects, it’s also the owner who decides when and which version will be published. Source codes are (in general) freely redistributable, i.e. anybody can pro- claim themselves a distributor of free software (as long as the licence condi- tions are obeyed). If part of the com- munity, or an isolated (and frustrated) developer, thinks they can do better, they are free to take up the source code and branch off into a new project. This branching process is called ‘fork’ (from the name of the instruction in the POSIX standard for duplicating a proc- ess in C). Openness of minds It’s important for a company to gather malfunction (bug) reports from its us- ers. It may go even further and deploy a public forum where all users can ex- press themselves, criticize any defi- ciencies in the architecture, or sing its praises. This initiative can turn out to be an uncomfortable one. Allowing an- yone to freely study the quality of the source code and the hardware design in order to discuss it openly takes a de- gree of courage, a lot of getting used to, perseverance, and even a thick skin, such is the extent to which the criti- cism may turn out to be caustic. The more judicious criticisms are vital to enable projects to evolve efficiently. Without the pressure of a critical exter- nal viewpoint, most design defects will survive the various states, will become entrenched, and before long an initially elegant concept can turn into a huge, labyrinthine system like MS w****. Throughout the project, whether in soft- and/or hardware, you must be careful to stay legal and avoid infring- ing - intentionally or not - this or that patent. Difficult as such infringements are to detect in a ‘closed’ project, they will come to light all the quicker in an open project because the size and di- versity of the community. So you’ll need to take appropriate measures to ensure the validity of the copyright for each of the various contributions - no small task! The community spirit of open projects occasionally forces developers to spot such infringements and to take imme- diate action. At the present time, most open hard- ware and firmware projects are dis- tributed under a BSD licence - less re- strictive than the GPL licence - which allows, in particular, distribution of im- proved firmware without distribution of the corresponding source code. In this way, companies retain control over the publication of certain improvements, while keeping others secret, to protect the added value of the product. Commercial contribution So where is the interest for a compa- ny in contributing to an open source project, when this is not constrained by a licence? Why would it run the risk of one of its competitors possibly profiting from its work? Doubtless to benefit from the improvements of other contributors, but also because it judg- es that before its competitors catch up, the benefits of openness will have ena- bled it to establish a convincing lead, thanks to better products, better serv- ices, and quality that it knows is su- perior - even if all the competitors are using the same software. Certain companies will also make ‘late contributions’, initially keeping their improvements secret and only pub- lishing them once their product is well launched (see an example of a chrono- degradable licence in the inset). We would like to thank Harald Kipp for the interview he granted us. To discover this fascinating world in greater depth, come and have a browse at the following address: www. elektor. com/UK_open-innovation To your keyboards - happy surfing, and happy development! Elektor is distributing this article un- der the creative commons licence with an explicit mention of its paternity, ex- cluding all commercial use, and iden- tical sharing of the original conditions (share- alike). We are keen to open up the source code of our publications, and do so whenever possible. Certain of our authors are still reluctant and un- fortunately won’t give us their permis- sion. It’s often a hard choice for Elektor between refusing a very interesting but closed publication, and publishing it anyhow, to allow as many people as possible to benefit from it - but with- out the pleasure of sharing the source. In the long term, openness pays. ( 070948 - 1 ) Web links www.elektor.com/UK_open-innovation www.fsf.org www.fsf.org/campaigns www.opensource.org http://opencollector.org/Whyfree/ http://opencollector.org/Whyfree/vilbrandt.html www.presence-pc.com/tests/ Le-Hardware-Open-Source-1 12 http://features.linuxtoday.com/news_story. php3?ltsn= 1 999-06-22-005-05-NW-LF 4/2008 - elektor 51 Ryan Seguine (Cypress Semiconductor Corp.) With all the excitement about capacitive sensing in the portable media player, laptop PC and mobile handset markets, it is easy to forget that such interface technologies have been actively designed into White Goods applications for years. Significant improvements in sensing algorithms and control circuitry have expanded the suite of applications in which the technology can be implemented. Designers are seeing the value of capacitive sensing as a mechanical button and membrane switch replacement as well as discovering new, exciting applications such as touchscreens and proximity sensors. A capacitive sensor is constructed of a conductive pad, the surrounding ground, and its connection to a controller. In most applications, the conductive pad is a large copper footprint and the surrounding ground is a poured fill. As il- lustrated in Figure 1 , a native (parasitic) capacitance, C P , exists between these two objects. When a third conductive object, such as a human finger, is brought into proximity with the sensor, the capacitance of the system is increased by the capacitance of that object, C F . Methods to use There are several methods for detecting the increase in ca- pacitance caused by the addition of C F . Field-effect measurement uses an AC voltage divider between a sensor capacitor and a local reference capaci- tor. Finger detection is achieved by monitoring the change 52 elektor - 4/2008 Interfaces for Home Appliances The end of the switch as we know it? in voltage on this divider. Field-effect sensing is a highly- sensitive technique and robust with regard to environmental conditions, however it is implemented with a single ASIC per sensor and does not provide analogue functions. Charge transfer uses a switched capacitor circuit and a reference bus capacitance with repeated charge transfer steps from the smaller sensor capacitor to the larger bus capacitor. The voltage on the bus capacitor is proportional to the sensor capacitance. The capacitance can be deter- mined by measuring the voltage after a fixed number of steps or by counting the number of steps necessary to reach a threshold voltage. Charge transfer is a low impedance sensing method giving it good noise immunity and is capa- ble or supporting analogue features in capacitive sensors. The direct connection to V DD requires a high-quality, dedi- cated voltage regulator for the sensor controller. A relaxation oscillator is a charge time measurement where the charging ramp is determined by the current source (usually fixed) and the sensor capacitance value. Larger sensor capacitors yield longer ramp times, usually measured with a PWM and a timer. The relaxation oscillator is highly flexible and can be implemented in many standard microcontrollers, however the high-impedance inputs can make it susceptible to noise sources without firmware or hardware modifications to filter out such interference. Successive Approximation The Successive Approximation method (patents applied for by Cypress Semiconductor) implemented with the PSoC device uses a capacitance to vo tage converter and single-slope ADC. The capacitance measurement is achieved by converting the capacitance to a voltage, storing this voltage on a capacitor, and then by measuring the stored voltage using an adjust- able current source. The low-impedance technique has high immunity to interference and greater sensitivity and analogue characteristics. The current source and the connection scheme allow for more tolerance in voltage regulator quality. The capacitance-to-voltage converter shown in Figure 2 is implemented with switched capacitor technology. The circuitry brings the sensor capacitor to a voltage relative to the capacitance of the sensor. The switched capacitor is clocked by the PSoC's internal main oscillator. The sensor capacitor is connected to the analogue MUX bus and is charged via a programmable current output digital- to-analogue converter (iDAC) also connected to the bus. The charge on each bus is given by q = CV. Switch SW2 is opened and SW1 closed to bring the potential across C x to zero and reducing the charge on the bus by a value proportional to capacitance of the sensor capacitor. This charge-discharge process is repeated so that the sensor capacitor is a current load on the bus. With the switched capacitor circuit running, the iDAC uses a binary search to determine the value at which the voltage on the bus remains constant. This voltage is a factor of the switching frequency, the sensor capacitance and the iDAC value (current). The bus also functions as a bypass capaci- tor, stabilizing the resulting voltage. Additional capacitors can be added to the bus and affect performance and tim- ing of the circuit. The following equations apply: V x = [1 / (f ox x CJ] X / DAC ^BUS = ^REF ” Vx The calculated iDAC value is then used to charge the bus again and the time required to take the bus from an initial voltage to the comparator threshold is measured. The initial voltage with no finger present and therefore the charge time is known. A finger on the sensor increases the value of C X/ decreasing the initial voltage and increasing the charge time measurement — see Figure 3. Building a Sensor: the options Capacitive sensors have diverse forms and functions and they can use a variety of media. Their implementa- tion ranges from simple to complex. Also, application requirements determine sensor construction and imple- mentation details. Figure 1. Graphical representation of the elementary capacitances involved. Figure 2. Basic circuitry to implement capacitive sensing based on successive approximation. 4/2008 - elektor 53 TECHNOLOGY CAPSENSE DESIGN Figure 3. Charge time measurement. Figure 4. A slider control employing capacitive sensing. Figure 5. Capacitive and other sensors in various forms can be used to implement lots of user controls on electronic equipment. Buttons and sliders are most common. Buttons are large conductive pads connected to the controller. Capacitance is measured and compared against a series of thresholds. Decisions can be made as digital outputs or with more ana- logue characteristics for activation pressure or finger size. Sliders are linear or radial arrays of conductive pads. Cen- tre-of-mass algorithms determine the position of activation to a resolution far greater than the number of pins used to sense. Most often, simple capacitive sensors like buttons and sliders are deposited onto a printed circuit board using copper (Figure 4). Other substrates and deposition media such as silver ink can be used, however. Dynamic user interfaces use buttons or activation regions that reconfigure in response to the display itself. These displays are moving the user experience forward by promoting more seamless and intuitive interaction. The construction of these systems is somewhat more complex that simple buttons or sliders. Projected capacitance touch- screens use transparent conductive materials over a display. The conductive surface is deposited onto a substrate such as glass or PET film and connected to the control circuitry. The substrate is then adhered to the overlay between the overlay and the display. The position of the activation is determined in the same way as a slider. Two sliders, one for each axis are intertwined to provide complete coverage of the display area. Activation is detected on both axes and the position exported as x- and y-data. Because a pro- jected capacitance touchscreen is behind an overlay, it is protected from impact, flexion, and environmental factors that plague traditional resistive touchscreens. Proximity sensors are essentially large buttons. The ob- ject of a proximity sensor is not to detect the exact position of a conductive object; rather the presence. Since the de- vice does not need to know exact position, the response time may be slower (3-4 ms vs. 250 |js). The sensitivity of a proximity sensor is much greater; 30 cm can be achieved in a well constructed design. Since proximity sensors do not need to be associated with any display graphic, their place- ment on the device is more flexible. A copper ring around the outside of the control circuit board or a wire behind the overlay allow very basic, cost-effective construction of a proximity sensor. Home appliances and white goods Usage of capacitive sensors is expanding. The sensors de- scribed have created new opportunities for designers to work with such flexible, durable and elegant design ele- ments. Buttons are still used for basic menu navigation and activation. However, analogue characteristics of buttons that are not expensive potentiometers allow easier and less expensive implementation of increased functionality and safety features. LG's model LA-N131 DR Air Cleaner (Figure 6) uses five capacitive sensors for front panel display menu navigation buttons. These buttons have allowed the designers to im- plement a seamless chassis design while still realizing the user interface. The capacitive buttons detect the presence of a human finger through four millimetres of glass. The control circuitry is located on the non-sensor side of a two- layer printed circuit board. LG uses the PSoC Mixed-Signal Array to control the sensors and output status to the main device processor. Proximity sensors allow for reactive backlighting for night- time operation or for safety features requiring a larger acti- vating element such as an adult hand or metal pot to engage the range-top controls. Figure 5 shows how proximity sen- sors, buttons, sliders and even touchscreens can be controlled by a single processor using PSoC. Firmware routines allow changes in state based on user inputs or host commands. Putting It All Together The PSoC Mixed-Signal Array allows designers to imple- ment buttons, sliders, touchpads, touchscreens, proximity sensors and any combination of all these in a single chip. The pre-defined firmware development modules, reference code and calibration tools make designing a capacitive sensing application fast, easy and effective. Pre-defined firmware development tools include device in- terconnects, I/O drive modes and APIs. These are created with only a few clicks of the mouse in the PSoC Designer or PSoC Express development tools. Reference code provides a starting point with basic functionality, but the open-source 54 elektor - 4/2008 nature of the PSoC solution allows for customization and optimization for any project. Calibration tools accelerate development by providing real-time feedback for capacitive inputs. Adjust parameters, increase sensitivity, and calibrate sensors individually through the calibration tool. PSoC devices are more than just capacitive sensors. Analogue and digital resources are available for a myriad of other ap- plications [1]. Basic digital control is available on all PSoC devices. Drive LEDs, communicate through l 2 C, SPI and other media, and control a simple 8-bit PWM. Higher-function de- vices are capable of more digital functions as well as basic analogue. A single PSoC can be configured as a capacitive sensing and a temperature meter or a voltage meter. Create your capacitive sensing application The PSoC Mixed Signal Array is a configurable array of digital and analogue resources, flash memory and RAM, an 8-bit microcontroller, and several other features. These fea- tures allow PSoC to implement innovative capacitive sens- ing techniques in its CapSense portfolio. Use PSoC's intui- tive development environment to configure and reconfigure the device to meet design specifications and specification changes. New sensing technologies exhibit improved sen- sitivity and noise immunity, reduced power consumption, and increased update rate. (071137-1) Web Links [1] PSoC CapSense: www.cypress.com/capsense. Figure 6. Capsense is expected to become an established technology in home appliances and 'white goods' like this (conspicuously red) air cleaner from LG. Advertisement PCB House 4>Start from £30 ^Prototype & Production &No Min Order ^Fast Delivery WWW. elektor. com AwDH’E L-AMOTmE'Ei A 7>A7 ION Brcr-E^STEi" Haw tet Dl.'uj or maim waj.iP3 o-atw worn cn*rnaijrj frnJlfi lnspr«! by ih* Slrteukii 3TJC jg Ajjpli II £ GMnmad&rA £4! thir>i ffncre. * £ /■/' It; r- .r-i'Vi IK- h>- 'Trtftlh. Dpitkm AilE'HHml . y > tt^- F^n Wdr^l^niEmtadfedSjActfnil ^ fill liiiiiiiiiBin— rj ~ ft* i i'ii ii nu— ^ ‘CCTipfete-StfiMm C n^. tapii n. -n Hid • m b«4p*rgi|hfi XD1. (jwM* ' > iiiiJ Pidht Ibe kill':' ., www.XEameStation.cdm Pm: I m. I H- ^1 J n . C £■ I_J"J 1 B.gjfr &_«.Zj3_S;g I ur Fute fig 1 NU fcvtL li Lf - Wg - Tel: 01 63B 40347 Mr.vliun/ Elci:hninir:s LIH Fh:D 1KG 36143 brtEkl/HHrf HjfHili |- teikRdlfl EAD 2 in: I: clrr:.ilt'if nr?.vh i , v.h':r MCLR RTCC RAO RA1 RA2 RA3 7 8 r< 9 y> -0 IC2 SX28AC/DP RBO RBI RB2 RB3 RB4 RB5 RB6 RB7 co co > CN| o CO O RC7 RC6 RC5 RC4 RC3 RC2 RC1 RCO o co o 0 ©4 ©4 ©4 T“ T TRIGGER T W TRIGGER MARKER XI l[ll X 25 24 23 22 21 20 19 18 +5V X R12 S6 F RANGE +5V O K7 O > *> R1£ 20k C7 -ill- lOOu 25 V R18 <=> 120k ( IC3 = AD822AN IC3 © see text R13 IC1 HA78M05CKC C6 lOOn K2 3D* K1 8 -15V C2 lOOu 40V 1 0 ♦ C4 lOOn C3 lOOn Cl lOu 40V 070951 - 11 Figure 1. Circuit diagram of the sweep oscillator. The heart of the circuit is a Parallax SX28AC/DP microcontroller module. testing of audio, ultrasonic and infra- red communication circuits. • 50 Hz to 15 kHz. Primarily for higher resolution audio testing. 2. As component values in the circuit under test are changed, the change in frequency response is instantly ob- servable on an oscilloscope screen. This makes it easier to show the differ- ence in frequency response between various types of filter such as low- pass, high pass, bandpass and notch filters. You can even see the difference between filters with Butterworth and Chebychev responses. 3. The display on the scope shows a true logarithmic response and as such volts per decade/octave measure- ment can be taken directly from the display. 4. There is a facility to show a frequen- cy marker on a second channel of the oscilloscope. A frequency counter (a digital multimeter with a frequency range is adequate) connected to the Marker Frequency Output will then show the frequency at that point, the marker can be moved to any point on the display. This enables the easy measurement of the -3 dB roll off points and Q (quality factor) of any filter. 5. There is a facility for switching be- tween two different frequency sweeps and altering the amplitude of the out- put signal. 6. The output of the circuit is buffered so that it will not affect the response of the circuit under test. This means that both passive and active (amplifying) circuits can be tested. Circuit operation The circuit is very straightforward, see the schematic in Figure 1. The microcontroller (IC2) generates the 8-bit values that are then sent to the R/2R-based ADC (analogue to dig- ital converter) made from precision (1%) resistors R7 through R30. A dual precision operational amplifier type AD822AN (IC3) provides the buffer- ing needed in the circuit. A pot (PI) and a changeover switch (S8) allow the output signal level of the sweep oscillator to be attenuated as re- quired to match the sensitivity of the circuit under test if it’s ‘active’. The swept-frequency signal fed to the in- put of the filter or circuit under test is available on connector K2. The SX28AC/DP micro is clocked at 50 MHz using ceramic oscillator XI. The oscillator pins of the micro also serve to program the device and that’s done via K7, which also pro- vides the necessary ground and +5 V connections. The micro may be reset by pressing and releasing pushbutton S3. The power supply is convention- al, based on a 78M05 regulator (IC1) with its usual set of decoupling ca- pacitors for noise suppression on the supply rails. The unstabilised DC in- put voltage may be between 8 V and about 15 V from a mains adaptor with 300 mA or so current capacity. The microcontroller reads five push- button switches (SI through S5) and 4/2008 - elektor 57 TEST & MEASUREMENT Frequency Counter Oscilloscope mr © © □ □ CD CD Channel Trigger n © © ©° n □ A m B □° -A A A -Z-A— A-I- i Marker Marker Trigger Out Display Out Sweep Oscillator To Circuit Under Test t> Circuit Under Test 070951 -12 Figure 2. How to connect the sweep oscillator to the oscilloscope, the filter and the frequency counter. Figure 3. Component mounting plan of the sweep oscillator board. True-scale copper track layout available as a free download from www.elektor.com. two on/off switches (S6 and S7) to de- termine the operation and settings of the sweep oscillator. The switches are read on microcontroller port lines RB0- RB3 and RA0/RA1. The instrument supplies signals to the oscilloscope and the frequency meter via RB5/K4, RB6/K3 and RB7/K6 with 10 kQ resistors inserted to protect the micro against short circuits. RB4/K5 is provided for experimental purposes and future expansion. The same ap- plies to SX28 port pins RA2 and RA3. Let's get connected The functional connections to the cir- cuit are shown in Figure 2 mainly for those who have never used a sweep oscillator. Although some experienced users will be able to do without it and derive everything from the scope im- age, the frequency counter is extremely useful as it allows you to see the mark- er frequency instantly. Software & hardware development All the hard work is done by the pro- gram (‘firmware’) running within the SX28AC, a microcontroller developed by Parallax Inc. and available direct from them or through authorized dis- tributors [1]. Like so many other Paral- lax products (including their renowned Basic Stamps and recently the Propel- ler), the SX28 enjoys wide support from Internet communities. The SX28 is cheap by any standard, and lots of free software and documentation is available on the web. Datasheets, com- pilers, programming examples, simula- tors, you name it and it can be found — see [2] ‘for starters’. In terms of hardware development tools, the author used Parallax’s SX- Key™ Rev. F (now an ‘End of Life’ product, to be replaced soon by a USB equivalent). The software devel- oped for the project was written using SX-Key V3.10, also from Parallax. The source code may be obtained as a free download from the Elektor website, the archive file number is 070951-11. zip. We suggest you open it to be able to follow the discussion below. The main loop of the program outputs a continuous sine wave using a direct digital synthesis (DDS) algorithm to ac- cess values in a sinewave lookup ta- ble. This is a pretty standard method for creating a sinewave. The clever part comes by using an interrupt serv- 58 elektor - 4/2008 ice routine to alter the value which de- termines the frequency in the DDS rou- tine. A piece of the routine is shown in Listing 1. There is a facility in this program for two sweep tables. An ex- ternal switch is read by the program which then changes between the two sets of tables. Again, SX28 micros come as ‘blank’ ICs so you have to do your own program- ming. Fortunately, that’s easy using the information found on the Parallax web- site. If you want to delve into the intri- cacies of SX28 programming, the pub- lications [3] and [4] are sure to get you hooked on the device. Best of all, A1 Williams’s writings on assembly code programming are a free download! Construction Elektor Labs have designed a quality printed circuit board for the project. The component layout is shown in Fig- ure 3. The copper track layout is avail- able separately as a free download from the Elektor website. It’s a pdf at true scale you can print directly to a laser printer to make an acetate trans- parent or ‘direct to copper’ transfer for PCB production on a budget. IC sockets should be used for the SX- 28 AC micro and the AD822 opamp. The SX28AC micro should be programmed, of course, before it can be used in this circuit (yes there are readers out there inserting blank micros in Elektor cir- cuits and complaining it don't work). Populating the board should not present problems as the layout is gen- erous and no esoteric or extremely small parts are used. Everyone with a keen eye for detail, some patience and reasonable soldering skills should be able to pull this one off. BNC sockets should be used for the sweep oscillator analogue output (K2), the Trigger output (K3), Marker Display (K4) and Marker (K6). The BNC sock- ets are connected to the pinheaders on the PCB using short pieces of thin coax like RG174. The braid of the coax cable goes to Ground! Operation The operation of the device is straight- forward. Connect up the circuit as shown in Figure 2. Before switching on the power to the sweep oscillator and circuit under test, set the output ampli- tude pot and the attenuator switch to COMPONENTS LIST Resistors R1 = IkQ R2-R6 / R9 / R1 1 ,R1 2,R1 3,R1 5,R1 7,R1 9,R20- R23,R27,R29 = lOkD 1% R7,R8,R1 0,R1 4,R1 6,R1 8,R24,R28,R30 = 20I>8 ,-point M to Sine table mov W,#%10000110 ,-set RTCC interrupt mov ! OPTION, W / / G> L 1 G^ G> J\. GJ. G^ _L d j/ W _L G G^ 1 1 sb ra . 1 ; select time delay jmp : td sel 0 mov Time dly,#delay 1 ; ra . 1 is 1 jmp : td sel e : td sel 0 mov Time dly,#delay 2 ;ra.l : td sel e (end of fragment) 60 elektor - 4/2008 Electronics inside out! The free e-magazine about internet, computers, hacking, tweaking, modeling, gadgets, geekstuff, gaming and DIY electronics. The e-zine you have to check out now! Receive i-TRIXX in your mailbox FOR FREE V each Wednesday From the Elektor labs: Simple, useful and fun electronic circuits! Play the i-TRIXX Quiz and win! Test your knowledge about internet, computers and electronics. Take your chance now and play the i-TRIXX Quiz. There are great prices to win! Powered by Check i-TRIXX.com and subscribe now! MODDING & TWEAKING Keyboard goes Game G Abraham Vreugdenhil As a hobbyist you may often be designing a game or an application for your computer. When you're demonstrating your program or game at a computer fair it seems a shame that people have to use a standard keyboard. It would be much better if their attention was drawn to your creation rather than the computer. There are various reasons for wanting a Custom Input Device (CID). We can think of the following two examples. What about a pinball game on your computer? When you’ve created a great table or game using Visual Pinball [1], there is nothing so annoying as having to use the keyboard for the plunger and flippers. You want to put your hands on the sides of the table when using the flippers and pull a plunger to launch the ball. A computer keyboard is obvi- ously not suitable for this. Then there is the game of Rock, Paper, Scissors [2], where two players have to use their hands to show each other a symbol for a rock, paper or a pair of scissors. A rock beats a pair of scissors because the rock blunts the scissors. The scissors beat the paper because the scissors cut the paper. And the paper beats the rock because the pa- per can wrap round the rock. Instead of playing against another person you can also play against the computer. In that case it’s down to the computer program to ‘guess’ what its human op- ponent will do. From the Elektor web- site [3] you can download this game. You can use the following keys for your selection: [r] for rock, [s] for scissors and [p] for paper. This isn’t much fun, however. It would be much more en- joyable if you had a real rock, scissors and paper that you had to hit to make your choice. But how can we turn this bash on a rock or a flipper button into a computer signal? Read on! Keyboard To build your own Custom Input De- vice we propose the following meth- od. We’ll use a type of input that is well known and used by everybody: the keyboard. Inside each keyboard is some electronics that converts a key- matrix into a serial signal that can be Get hold of an old keyboard with either a PS2 or USB connector. Open it up to get at the internal electronics. 62 elektor - 4/2008 Build your own Custom Input Device PS2 or USB? In principle there is no difference between the operation of PS2 and USB keyboards when they're used to make a Custom Input Device. What could make a difference is if you connect a PS2 keyboard via a PS2 to USB converter to your PC or laptop. In games where timing is important, such as pinball games, you may notice when a short delay occurs in the operation of the Custom Input Device. The question is if the delay is caused by the PS2 to USB converter, the Visual Pinball program; or simply the PC you're working with or its graphics card. It has to be said that the author has never found any delay to be a hindrance. The nice thing about USB is that you can connect more than one device at the same time. So you can connect a standard keyboard for normal use, as well as your Custom Input Device. In theory you could con- nect up to 1 27 devices to your computer via USB. The PS2 to USB converters will come in very handy here. used by a computer. Instead of the more than 100 keys that are in a typi- cal keyboard we’ll only use those that are required by the game and connect those to the electronics. In our exam- ple for Rock, Paper, Scissors it will only be the [r], [p] and [s] keys. First you need to find an old, surplus keyboard and take it apart. After re- moving the screws from the underside we can prise the two halves apart. This exposes a membrane that con- sists of three layers. The outer layers have tracks on them and the middle layer keeps them apart. The top and bottom layers are connected to a small board of about 10 by 6 cm. This board also has a cable with a PS2 or USB con- nector at the end. The board should be carefully removed from the keyboard, with a note being made of the connec- tions to the membrane. The two con- nectors on the board for the membrane connections usually consist of a small- er one with about 8 pins and a larger one with about 21 pins. Key choices Now we have to determine which con- nections are used by a particular key. We place the top of the keyboard onto the membrane and look which contacts are underneath the required key. Next we can find out in two ways which connections are used by this key. The simplest is to follow the tracks from the key to the connector. You’ll have to look carefully and hope that you don’t make a mistake. The second method is more reliable from a technical point of view. Use a multimeter, (who can do without one these days) and put it to its resistance setting. Put one probe on the membrane contact underneath the key and with the other test each of the contacts that connect to the board. When you see a low resistance Behold the (simple) electronics (this can obviously look different if you have a different keyboard). The two layers that make up the key matrix are used to determine the correct connections. 4/2008 - elektor 63 MODDING & TWEAKING of about 60 to 120 Ohm you’ll know you’ve found the right contact. All the other contacts should return an infinite resistance. Once we’ve determined which con- nection is used by the key on the layer with the small connector, we have to do the same thing for the layer with the large connector. We’ve then found the point in the matrix for that particu- lar key. Next we connect two wires to the con- nections we’ve just found and connect the other ends to our switch. With the keyboard circuit connected to the com- puter, a press of the switch causes the appropriate keystroke to be detected by the computer. CID for Rock, Paper, Scissors For the game of Rock, Paper, Scissors we choose the [r], [p] and [s] keys and connected them to some cables. The other ends were connected to three switches that were mounted inside three wooden discs. The discs are mounted on springs and can be pressed down. When that happens a switch closes. On top of the discs we’ve placed images of a rock, paper and scissors. The keyboard electronics are actually fairly attractive to look at. There is a real 40-pin Zilog processor with a few peripheral parts. It would be a pity to hide this circuit out of sight. We’ve therefore put this board in a hollow wooden disc and put a clear plastic panel over the top. In that way everybody can admire the simplicity of the keyboard circuit and our Custom Input Device. CID voor Visual Pinball In the program for Visual Pinball we can specify which keys operate the flippers and which key launches the ball. We can also interrupt the game with the Esc key. We could use the 1 or 3 key to start a new game, for example. There is also a facility to assign keys to nudge the table in various directions. For all functions that we want to make use of we determine the switch con- nections on the keyboard circuit and connect them to small switches. We’ve used a sturdy, bash-proof plastic box measuring 40 by 30 by 12 cm for our Visual Pinball CID. When it’s placed sideways on the table it feels comfort- able with your hands on it. The two pushbuttons that operate the flippers are mounted on the sides of the case to give a more realistic feel of a pin- ball table. The plunger is made from a wooden knob mounted on the end of a 6mm diameter metal rod. On this rod we mount a ring that is normally pulled against a switch (by an elastic band for example), keeping it opened. When we pull the plunger (to launch the ball) the switch closes. And when we let go of the plunger the switch opens again and the ball is launched. In Visual Pin- ball the time that the switch is closed corresponds to the power of the launch. A short time gives less power and a long time gives more power. This type of interaction between your CID and the program adds a lot to the enjoyment. If we use a projector to display our Visual Pinball game on a large screen and put the CID some dis- tance away we can imagine that we’re standing in front of a giant pinball ma- chine. The show can begin! ( 070724 - 1 ) Web Links m www.pinballnirvana.com/index. php?name = UpDownload [2] http://en. wikipedia. org/wiki/Rock_Paper_Scissors [3] www.elektor.com This is all we'll use from the keyboard: the board with a cable and plug. You only need a few switches to make a functional CID. 64 elektor - 4/2008 Keyboard electronics or microcontroller Instead of using the electronics from a keyboard to build a CID you could also build all of the hardware and software yourself. We take an AVR processor made by Atmel and use the BASCOM-AVR compiler, for example. This compiler includes the commands to simulate a serial PS2 key- board. When we connect the switches of our CID to the inputs of the microcontroller then the rest of the electronics can be designed as we wish. Next we assign a particular 'key value' to each contact and use the microcontroller to send it to the computer. This key value is used in our pro- gram to perform a certain action. There are advantages and disadvantages in designing and building the hardware and software yourself. The advantage in building a system yourself with e.g. an AVR microprocessor is that you can make it very small. On an 8-pin microcontroller there are five pins available for I/O, but three are required for the PS2 connection, leaving two for switches. If we use a 20-pin controller then we have 1 5 I/O pins available. Taking away the connections required for PS2 leaves us with 1 2 pins for the switches. Even with a 20-pin 1C the circuit can be made very compact. The disadvantages of building the circuit yourself are the costs and time required. An AVR microcontroller still costs a few pounds and it will easily take up a few evenings before everything works. On top of that you need a cable with a PS2 connector, so you would probably have to take that from an old keyboard anyway. In that case you might as well use the internal electronics of the keyboard at the same time. The only reason to build the electronics and software for a CID yourself is when it needs to be very small or in a particular shape. This will only be the case when the look and size of your CID is very important to you. Visual Pinball Visual Pinball is a Visual Basic toolkit to create a pinball game on your computer. In the program are many objects, such as bumpers, flippers or rollovers that have unique properties and can react to various events. The method of programming, such as the code for an event, is very similar to Visual Basic. For example, when a ball goes across a rollover you could increase a counter (get points) or play a wav file. You can display images on the table or the backbox, etc. You could use it to build a table based on a real pinball game, but you could also design a futuristic game that in reality could never be built. A unique game, adapted for a particular theme or activity such as a Fancy Fair, can be made to look very interesting with the help of Visual Pinball. On the Internet you can find a wealth of information. A good place to start is this link [1]. From here you can also download Visual Pinball 7. w v nu a | jJBjxi ;mnm MOtt, i - i<- Wot With a few innovations (elastic band and positioning of the switches) the CID for the pinball table The 'controller' for the Rock, Paper, Scissors game is exposed to the world in all its glory, is like the real thing. 4/2008 - elektor 65 REVIEW PSOC Cypress PSoC development kit things. Cypress PSoCs combine a microcontroller Paul Goossens Your average embedded system will be primarily composed of digital components. However, analogue components are also necessary for filtering and amplifying signals, among other PSoC Firs'tTouch 1HE UUIMATESUB1EHKIT Featuring PSoC Express PSoC Expro«'“ PSoC Programmer Uung Window* 2000/XP/Vhta For more information about Cypreii'* PSoC' F.olTovch or softwore update* go to www.cypreu com/FiriiTour Hubby isLs ^ 1 ■ flil F.h i-t,. gi^ri+p 'LL LIT j - - -y.M I ■■ 1 L *-» ■ L 1 ... , , 13 ■{’ r-iip la 1 7*-i” . j a. m p..«- ■ Mr Fan -.a be f 'lau « ■■ ' - MM ’ w *r*w 3m fc> hii-a m. ri i ji. ?i !■» M- i"r! 1- 2 1 * la- igure 1. USB sound card. F&r ths fiiii inn-;, rhii dieuit -.vai tl*tlgned by two aulhari. i.U laurler Gandfort eT Burnaby in Bntlil'k C alumina Canada, and mysa-ir F2eas* inal a suit you JiH Laurel's tfie. Hantfy Dandy Lim-s Cfrcuits. Tnfe page it also avairawe in Ranch by clicking Mi ihe flag igure 2 Simple intercom. by now. So we won’t talk about those. Perhaps a little less well-known, but still a very popular do-it-yourself sub- ject is the modification of CD players manufactured by Marantz, specifical- ly the CD-63 and the practically iden- tical CD-67. These players have now reached quite a respectable age and can easily be obtained second hand. A large group of audio fanatics [1] knows how to improve this player, with a few modifications, to a level approaching that of high-end. Audio A famous website with all kinds of in- teresting audio projects is Elliott Sound Products [2]. But this is, of course, not the only source for interesting audio circuits. At [3], for example, we find a nice circuit for a USB sound card (Fig- ure 1). Building a simple sound card that connects to the USB port doesn’t require a university degree any more. Using an IC such as the PCM2706 from Texas Instruments you immediately have a headphone amplifier, a digital output (S/PDIF) and a hardware con- trol panel for your media player, with- out the need to install anything at all when used with Windows XP or Ma- cOS X. You can even download a PCB layout for this from this website [3]. For at home... ...there are naturally also a diverse range of interesting circuits to be found. For example, this doorbell in- tercom [4]. This handy circuit (see Fig- ure 2) uses the speaker for reproduc- ing as well as picking up sound. The volume can be adjusted with a poten- tiometer. A switch (indoors) is used to switch the circuit between listening and talking, so that 2 -way communica- tion becomes possible. Very handy, of course. A somewhat older ‘gimmick’, but there- fore not necessarily less entertaining, is the lightning bulb [5]. With a simple lamp, a piece of aluminium foil and a high voltage power supply, built from a car ignition coil, it appears that there is an electrical storm inside the glass envelope of the lamp (see Figure 3). It remains fascinating to see how the electrons work their way from one elec- trode (the filament) through the gas in the lamp to the other electrode (the aluminium foil). Of course, You need to watch out with these types of projects, because they operate at a dangerously high voltage of several kilovolts. Another thing that would be nice to have at home is a metal detector. In this instructional video [6] you can see how you can, in a few minutes, turn a radio and a calculator into a simple metal detector that you can use, for ex- ample, to find wires or pipes in a wall. The ‘circuit’ uses the clock frequency of the pocket calculator. fuC Very popular as well is the Arduino de- velopment board [7]. It is targeted at 70 elektor - 4/2008 Figure 3 Lightning bulb. igure 4. Arduino board. igure 5 Midi-drums. artists, designers and hobbyists and everyone who is interested in interac- tive applications. These little boards are usually based on an Atmel AT- megal68 microprocessor (see Fig- ure 4). There are quite a lot of these open-source applications and the number continues to grow. Examples of projects that have been designed with this mini board are drum pads with a MIDI interface (Figure 5), an in- teractive light system for a bridge and a virtual fish tank. Microprocessors always need to be programmed of course. One of the many AVR programmers that can be found online is the one from electron- ics-diy.com [8]. Together with the pro- gram called PonyProg [9] it is very straightforward to program hex files in, for example, a 28-pin ATmega8. The circuit is very compact and can be tidi- ly housed inside the shell for the serial connector (see Figure 6). Incidentally, on the PonyProg website you will also find a circuit for a programmer that is suitable for connecting to a parallel port. PC If you have poor reception of a WiFi signal you will definitely have to watch this video [10]. This explains how you can make a better antenna for just a few pennies. Just roll up your sleeves for five minutes and you’re done! “Finally a use for that old Windows 95 laptop”, that’s how this website [11] announces the circuit (Figure 7). With three ICs, a dual opamp and a handful of components you can make an excellent 12-bit data logger for less than £ 10 (€ 14). A simple Qbasic program does the rest. Qbasic.exe is generally on the original Windows 95 CD (usually in the folder ‘oldmsdos’) or alternatively can be downloaded from [12]. It will probably work with GWbasic as well. Figure 6. AVR-programmer. Web Links (also on the Elektor website) [1] www.diyaudio.com [2] http://sound.westhost.com [3] http://electronics-diy.com/PCM2706_USB_Soundcard.php [4] www.mitedu.freeserve.co.uk/Circuits/Audio/doorint.htm [5] www.uoguelph.ca/~antoon/circ/hv/l-bulb/l-bulb.html [6] www.instructables.com/id/HomeMade-Metal-Detector [7] www.arduino.ee [8] http://electronics-diy.com/avr_programmer.php [9] www.lancos.com/prog.html [10] www.metacafe.com/watch/837885/wifi_antenna_hack [11] www.techlib.com/electronics/serialport.htm [12] www.fluid.tue.nl/student/colleges/NLS/software.html [13] www.x-robotics.com/hardware_ing.htm [14] www. electronics- lab. com/projects/automotive/005/index.htm I [15] www.electronics-lab.com [1 6] http://home.hccnet.nI/e.vd.logt [1 7] www.zen221 42.zen.co.uk/Circuits/Power/add-on.html [18] www.belza.cz/hf/bug.htm 4/2008 - elektor 71 DO IT YOURSELF Figure 7. 12-bit ADC. Robotics Activating a robot (or something else) with a certain sound signal can be done with this [13] circuit (Figure 8). The IC compares the frequency of the input signal with that from its own fre- quency generator (adjustable with a resistor and capacitor) and switches its output low when they match. So you can for example, by whistling at a certain frequency have the robot carry out a pre-programmed action (make it come towards you, for instance). Miscellaneous A simple parking aid which uses an IR LED and IR photo diode is explained here [14]. Via the home page of this website [15] and the accompanying forum many more interesting projects are waiting to be found. What has brewing beer got to do with electronics? We find the answer here [16]. On this website we can see the building and brewing process of Emile van de Logt. A genuine PID control- ler and control with PC software are igure 8. Tone detector. deployed for this brewing process (Figure 9). A handy circuit for limiting the inrush current (Figure 10) of, for example, a bench power supply can be found on [17]. Very useful when turning a circuit on for the very first time. The maximum current is determined by 0.7/R2. This can therefore be easily adjusted as required. With a very small and simple circuit built around a single transistor (Fig- ure 11) you can build a spy microphone that can be received with an FM radio. The website [18] is unfortunately in Czech, but it is easy to understand the circuit without the text. There is even a PCB layout available, although it is rather spacious for a spy microphone. This was just a random selection of the immense number of circuits on of- fer. We hope that we have given you a few ideas and in the event that your own searches prove to be fruitless, you can always visit the Elektor website for more than 2,000 circuits on stock. ( 070955 - 1 ) Tha -second schematic has a couple of added feSluies. If you don'1 wart 1o use a voftmeter on the eulptf - use an LEO Instead. IMhe output voltage falls - the LED wilt dim or t riln-grtsh eannpletefy. This Is enough to lei you k now I hart Ihe load on the output Is excessive. Where the Current Limiter Is to be left unattended Ter any length of rime - say during a soak-last - Ihe Bu=ei Is useful. Should a problem develop* - and the output vaBage Tal by 2-volts or more - the circuit will sound the alarm. Add-On Current Limiter igure 10. Current limiter. PIP Control Settings Sample Time Ts PID Kc parameter PID T] parameter PID Td parameter LP-Fitter constant X 5 Seconds 80 %rc 282 Seconds 30 Seconds 0 Seconds Send PID Output signal to: r Electrical Heating Element r Non-modulating Gas-Burner P Modulating Gas Burner a-coefficient DAC value b-coefficient DAC value PID Controller Model First ebrew PID controller r l Jpdnted ebrew PTh controller C Allen Bradley Logix 5550 Type A • Allen Bradley Logix 5550 Type C Time-switch Control ^ Off r On — f” Show PID Controller Debug Info OK Cancel Help 1-2.04 232,05 Figure 9. PID controller for brewery. 72 elektor - 4/2008 LABTALK TECHNOLOGY My microcontroller doesn't go... It is impossible to imagine modem electronics without microcontrollers. What used to be done with combinational or sequential logic is now done with a single 1C that runs a program that does exactly what we want it to do. Or perhaps more accurately: should do exactly what we want it to do. ■ C:\Program Files\Microchip\MPASM Suite\startup.asm [~^~|[~n~][~x"| org OxOOO - start clrwdt * clear watchdog timer movlw b 1 11010111 1 ; assign prescaler, internal clock * and divide by 256 see p. 106 option SfcOVlW 0x00 * set w = 0 tris portB * port B is output cirf portB * port B all low go bsf portB, 0 * RBO * 1 , thus LED on p. 28 call delay call delay bcf portB, 0 i RBO * 0 , thus LED off call delay call delay goto go * repeat forever 1 delay cirf tmrO ; clear TMRO, start counting 1 again btfss tmrO, 0 ; if bit 0 s 1 goto again no, then check again btfss tmrO, 1 * if bit 1 » 1 goto again no, then check again btfss tmrO, 2 } if bit 2 « 1 goto again r no, then check again btfss tmrO, 3 * if bit 3 - 1 goto again no, then check again bt f ss tmrO, 4 * if bit 4 » 1 goto again i no, then check again btfss tmrO, S i if bit 5 * 1 Luc Lemmens Particularly during the early de- velopment phase of the hard- ware and software, we often run into perplexing problems. The most frustrating of these is when the microcontroller doesn't do anything at all (or appears not to do anything at all). With older microcontrollers that have external program memory an os- cilloscope or logic probe could often give an answer. A meas- urement on the address or data bus would give a quick indica- tion whether the microcontroller was 'awake' or not. But these days all memory is integrated in the 1C, in most cases, so only the I/O ports can sometimes provide consolation as to an indication of any sign of life. Fortunately (?) most controllers still have an external oscillator, so that we at least can check whether the clock is running. However, even this option isn't available with many small micro- controllers that have an internal oscillator. The simplest method to ensure that the oscillator is running and that the software, in principle, should be able to work, is to in- sert a short routine at the begin- ning of the program that toggles one of the port pins a few times. Preferably a port pin that has an LED connected to it, that gives immediate visual feedback and an oscilloscope is not required. Don't make the program wait for some external action (such as a button press, reception of data via the serial link, etc.), but just do 'something' on any pin what- soever. If there is still no indica- tion of any activity (and assum- ing that very basic checks like measuring the power supply and whether the reset line is at the desired level have already been done), there is a chance of ten to one that something has gone wrong during programming. The configuration fuses of the micro- controller are the main suspects. As has been mentioned in an earlier 'LabTalk' article, modern microcontrollers have a number of bits (fuses) that define the be- haviour of the 1C. In the scope of this article we first have to look at the settings, if there are any, for the oscillator (internal/exter- nal, frequency range). If these settings are wrong then in most cases nothing happens at all. The second suspect is — if present — the watchdog timer (WTD). If this has been turned on when programming and the ap- plication does not reset the timer, the microcontroller will repeated- ly be reset and often won't even reach the actual program. Number three is the setting for the reset circuit. For example, the reset signal for some micro- controllers can be selected to be internal or external. Consult the datasheet for the controller and check the remainder of the circuit to determine the correct settings. It can sometimes take a bit of looking around in the program- mer software to find where these settings are hidden — as we al- ready discussed in an earlier sto- ry — sometimes they have differ- ent names than what you would expect. In final desperation you could try all possible combina- tions of the fuses in the hope that one of them works. This sounds very awkward, but it will unfor- tunately be necessary at some point! Fortunately, reprogram- ming of a microcontroller is not such a time consuming job these days. A simple start-up indication built into the application saves a lot of time and frustration — at this point you know that the hard- ware is functioning and that noth- ing went wrong when program- ming the memory and fuses. At a later stage of development, you could remove the start-up rou- tine, but only do that if absolute- ly necessary. ( 070101 - 1 ) 4/2008 - elektor 73 DESIGN TIPS Automatic aquarium feeder Helmut Schaefer People come in all shapes and sizes and we all have our own character. You probably know people who are at their best first thing in the morning while others can only get things done when they are burning the mid- night oil. The feeding habits of different fish species also show variation; some (such as catfish) are nocturnal feeders while oth- ers feed during the day. Unless your own body clock is in sync with the fish in your aquarium you will not be providing them with food when they really need it. The solution described here is an automatic fish food dispenser. On the mechanical side the apparatus consists of an off-the-shelf DC mo- tor and reduction gear driving an external gear train sandwiched between two plates. It is necessary for the spacing between the plates to be greater than the thickness of the fish food pellet (see illustration). A hole in the upper plate is directly be- neath a vertical tube (or magazine) which contains a stack of food pellets. The hole in the lower plate is offset and the pellets will eventually drop through here into the aquarium below. In between these holes is the final cog in the gear train which has a hole made in it between the hub and toothed edge of the wheel. The hole must be slightly bigger than the diameter of the food pellet. When the hole is beneath the column of pellets a single pellet drops down into the hole in the gearwheel. At each feed time the pellet is swept around until it passes over the hole in the low- er plate where it drops through and provides a tasty snack to the fish waiting below. The pro- totype uses a motor/gearbox combination from Conrad Elec- tronics (model catalogue, part no. 242535) which operates on 3 to 6 V and produces an output speed of 1 1 to 22 rpm. An exter- nal set of gears provides a further 10:1 reduction. The final output gear takes around 30 seconds to complete one revolution and the low operating speed helps to avoid the possibility of a pellet becoming jammed in the mecha- nism. The frequency of feeding is actually controlled by an ex- ternal mains time-switch which switches a mains adapter pow- ering the whole feeding mecha- nism. The electronics incorporat- ed into the feeding mechanism ensures that each time the feeder is switched on it only dispenses a single food pellet. Modern time- switches can be programmed to switch several times in every 24hr period and can have an 'on' time of one minute or less. A small cam on the gear train output shaft actuates a micro- switch when a single revolution is completed. This technique of tuning the whole unit off in be- tween switching times means that the standby current (exclud- ing time-switch consumption) is zero. Another advantage is that each time the circuit is powered up it effectively performs a reset so it is not possible for the circuit to lock-up in an undefined state which sometimes occurs in digital circuits as a result of glitches and mains-borne interference. The central logic element in the circuit is the TTL SN74LS76N J-K flip flop. In addition to the syn- chronous functions of this chip (store, set, reset and toggle) there are two asynchronous in- puts namely 'preset' and 'clear' which are both active-low on this particular version of the flip flop. When power is applied to the circuit the preset input of 1C 1 A is held low by the RC network R6 and C4 which ensures that the flip flop will always be set (Q = 1) at power up. Transistor T1 switches on and the motor be- gins turning. A feeding cycle can also be initiated by pressing the manual pushbutton. When the output gear wheel has complet- ed one revolution and pushed a pellet over the hole in the lower plate a cam on the output shaft activates a micro-switch. This will ground the 'clear' input of IC1 B and produce a negative going signal to the clock input of flip flop IC1 A which clocks the state of the J input (0 V) through to the Q output to turn off T1 and the motor. The 'preset' and 'clear' inputs of IC1 B are connected di- rectly to the micro-switch output to provide a debounce function ensuring that a single clean clock edge is provided to IC1 A. All the other inputs of IC1 B re- lated to synchronous operation are unused and tied to ground (logical 0). Capacitors C2 and C3 should both be ceramic types and although res- ervoir capacitor C 1 is shown as a tantalum a normal electrolytic type can be substituted. The motor together with the circuit draws around 35 mA. A 50 mA fuse (FI ) is included in the supply to protect the motor and transistor should a food pellet become jammed in the mechanism and stall the motor. A more powerful motor can be used in the design but in this case it will be necessary to re- duce the value of R4 to give a greater drive current and swap T1 for a power transistor. The fuse rating will also need to be beefed-up to handle the increased current. A tip when drilling the plates is to start by making just two holes through the plates and then fit- ting two pins or bolts through the holes to fix the plates together be- fore drilling the remaining holes that are common to both plates. This ensures that the holes will be properly aligned. Although the design was devel- oped for feeding fish it could also be adapted fairly easily for other applications that require a programmable momentary me- chanical operation. ( 060354 - 1 ) +5V 74 elektor - 4/2008 Ultra-responsive peak detector Stephen Bernhoeft The peak detector presented here will respond to amplitude changes of the input signal with- in one-half of a cycle. Because no 'bleed' resistor is required on the output capacitor, droop is only limited by the 'off' resist- ance of a CMOS switch. Note that circuit is more accurately described as an amplitude detector, as the output level is equal to the average of the absolute values of the positive and negative amplitudes. For a sinusoidal input waveform, this corresponds to the peak detect function. Positive and negative peaks are measured separately. Whilst the positive peak is being acquired, the negative peak is output, or vice versa. At the time a positive-going zero-crossing is detected, the positive peak de- tector is reset, and similarly for negative signals. There are two key subcircuits. One is a peak detector, the other is a zero-crossing detector (ZCD). There are two instances of each type, corresponding to the two possible signs of the input signal. Note that all detec- tors (of both types) give a posi- tive output. When +ZCD goes high, this causes a brief pulse to reset the positive-peak detector. The reset has no effect on Vqut/ since the high level of the +ZCD means that the negative peak detec- tor is connected to Vqut this time. During this (positive) half of the input cycle, the +peak detector continuously registers the most positive input signal to date until such a time as it is reset. Now consider what happens over the negative-going excur- sion of the input signal. Firstly, +ZCD goes Low, then -ZCD goes High. In the short interval that both are Low, the output ca- pacitor is isolated. When +ZCD goes Low, Vqut is removed from the negative peak detector out- put, and because -ZCD is high, Vqut is instead connected to the positive peak detector output. The negative peak detector operates in the same way as described above for the posi- tive one, but because it sees an inverted copy of V !N , it gives a positive (absolute value) output, as required. The circuit shown is suitable for low frequencies up to a few kHz. The AD8534 is specified as unity-gain stable for capaci- tive loads of up to 10 nF. Em- pirically, it was found that even an ordinary opamp such as the LMC6484 gave no problems with ringing at Vqut; possibly the 'on' resistance of the switch in the 74HC4066 helped to iso- late the output capacitor. One speed restriction is the width of the reset pulse. It would be possible to use a monostable instead of the RC network. In order to allow short reset times, the MOS switches used here to short the peak detect capaci- tors could be supplemented with discrete, low R DS (on) NMOS transistors, such as TN0200K. If necessary, dedicated compara- tors may be used for the ZCD sections. Current consumption could also be reduced. Firstly, by swap- ping the comparator inputs around — the 'working' com- parator inputs are high-imped- ance. If this is done, be sure to invert the BAT54 diodes as well. Of course, now we have an inverted output to the peak detector, i.e. VoUT = “VpEAK Lastly, if desired the inverting opamp stage may be amended to use 100 kQ resistors. ( 060300 - 1 ) 2/2008 - elektor 75 INFOTAINMENT PUZZLE M^YAHAkII Puzzle with cm I I vAO\JUr\v4 electronics touch Despite all new-fangled computer programs the simple pencil & rubber are the preferred tools for solving our monthly Hexadoku puzzle. Add some good brain exercise and win one of the prizes: an E- blocks Starter Kit Professional and three Elektor Shop vouchers. The instructions for this puzzle are straightforward. In the diagram composed of 1 6 x 1 6 boxes, enter numbers such that all hexadecimal numbers 0 through F (that's 0-9 and A-F) occur once only in each row, once in each column and in each of the 4x4 boxes (marked by the thicker black lines). A number of clues are given in the puzzle and these determine the start situation. All correct entries received for each month's puzzle go into a draw for a main prize and three lesser prizes. All you need to do is send us the numbers in the grey boxes. The puzzle is also available as a free download from our website. SOLVE HEXADOKU AND WIN! We believe these prizes should encourage all our readers to participate! The competition is not open to employees of Elektor International Media, its business partners and/or associated publishing houses. worth £248.55 and three Elektor SHOP Vouchers worth £35.00 each. Correct solutions received enter a prize draw for an E-blocks Starter Kit Professional PARTICIPATE! Please send your solution (the numbers in the grey boxes) by email to: editor@elektor.com - Subject: hexadoku 4-2008 (please copy exactly). Include with your solution: full name and street address. Alternatively, by fax or post to: Elektor Hexadoku Regus Brentford - 1000 Great West Road - Brentford TW8 9HH United Kingdom - Fax (+44) 208 2614447 The closing date is 1 May 2008. PRIZE WINNERS The solution of the January 2008 puzzle is: 90467. The E-blocks Starter Kit Professional goes to: Richard Berends (UK). An Elektor SHOP voucher worth £35.00 goes to: Jos Hartman (CH), Mehmet Sukuroglu (TR); David Gill (UK). Congratulations everybody! E A 9 3 6 B 4 0 6 2 9 7 F D C 4 0 8 B E A 6 9 2 E F C 1 8 E 4 9 F 1 6 C 1 B A E 9 2 2 3 B 1 C 7 6 F 5 E A D 3 8 E 1 5 4 9 6 8 D 3 9 3 E 5 7 F A B D C B 8 D 1 0 3 5 3 7 4 0 E 9 D B D 8 5 0 4 C 8 3 D 2 9 1 B A 7 9 5 4 7 A D 8 B C 3 6 (c) PZZL.com F 6 2 0 A D B 4 9 5 E 3 8 7 1 C 3 9 E 7 2 1 5 C D 8 0 B A F 4 6 A D 4 B 0 E 6 8 F C 7 1 3 2 5 9 5 C 1 8 7 F 9 3 A 6 2 4 B D E 0 9 7 B C 4 3 E 1 8 F D 5 0 6 2 A 4 2 F 5 6 9 D 0 3 B A C E 8 7 1 8 1 6 A F B 7 5 2 0 9 E C 3 D 4 E 0 D 3 C 2 8 A 6 1 4 7 F B 9 5 C A 3 2 9 0 4 6 7 E 1 8 D 5 F B 0 8 7 E B 5 C D 4 9 6 F 1 A 3 2 D F 5 4 8 7 1 2 0 3 B A 6 9 C E 6 B 9 1 E A 3 F 5 D C 2 7 4 0 8 7 5 8 9 3 C 0 E B 2 F 6 4 1 A D 1 E A 6 5 4 2 B C 7 3 D 9 0 8 F B 3 C F D 8 A 9 1 4 5 0 2 E 6 7 2 4 0 D 1 6 F 7 E A 8 9 5 C B 3 76 elektor - 4/2008 RETRONICS INFOTAINMENT 'Formant' is with- out doubt one of the biggest names from the Elektor his- tory. The mega project goes back a good thirty years, was forgotten for about 25, and now hails us through Google and Ebay. Along with Chorosynth, it is one of the vintage instruments pre- sented at the fabulous www. synthmuseum.com [1] web- site brought to you by Paula Chase and Jay Williston. The scene: it's 1970 and 'groovy' sounds are heard from Robert A. Moog's syn- thesizers like the one used by bands like Yes and Emer- son, Lake & Palmer. The Moog synthesizer was the defocto standard at the time, with lots of more or less electronically minded musicians (or musically minded electronics fans) adapting and extending it all the time to create their own flavour of sound. The pitch wheel in particular created sound 'bends' that became forever associated with the Hippy age. For a nice his- tory of 'The Mooq', see (and hear) [2]. The Elektor Formant was origi- nally designed by C. Chapman and the project saw its first pub- lication in the May 1 977 issue of Elektor. In an attempt to jump the Moog bandwagon it was announced as "an instrument of advanced specification that bears comparison with many commercially available synthe- sisers, but at a fraction of the cost". The article series ended with part 1 0 (!) in the April 1 978 issue. Two Elektor editors, now retired, recalled that the pub- lications got immense acclaim but failed to sell significant numbers of the printed circuit boards. That changed dramati- cally, at first when the Formant article series were bundled into a book (1980), and a bit later (1 981 -82) when M. Aigner pub- lished follow-up articles (and a book) describing what looks like 'Formant mk.ll' containing good- ies like a Ring Modulator, Sample & Hold, Phase Shifter, Envelope Follower, Mixer, ADSR Controller, VC-LFOs, and other highly desir- able sound warping circuitry, some based on Curtis ICs. By contrast, the original Chapman design, although comprehensive by itself, is a conventional Moog- style synth with a classic 1 V/ octave characteristic and all the usual modules like VCO, VCF, LFO (made from 3 LFOs), Noise, ADSR, VCA, COM, RFM (not the manual but Resonance Filter Module) and a 24-dB VCF, not forgetting a keyboard and inter- [2] www.youtube.com/ watch ?v=TttYkC3NyjM Formant was rack-able consisting of circuit boards vertically mounted on a backplane with the controls (pots, switches) in bright colours on the front panel. The instrument pictured here is privately owned by my colleague Jan Visser from the Elektor labs who put it at my disposal for photography and sound checking of course! The wooden case was available at the time from electronics retailers advertising in the magazine. It's an almost fully loaded Formant com- plete with a keyboard and even a mini-oscilloscope to check the waveforms. With the current revival of sev- enties things & sounds, I reckon the instrument would fetch some hard cash on Ebay! The smaller unit pictured here is the Aigner version with a modest complement of dual VCO, VCF, Dual ADSR, LFO and COM. This fine sounding specimen was rescued from the skip and is currently in safe storage at Elektor House. Reportedly the instrument was played 'live' several times at electronics exhibitions and shows in France and Germany during the mid 1 980s. ( 070937 - 1 ) Formant synthesizer (1977) Jan Buiting face and of course a power supply — all DIY, built on Elektor 'EPS' printed circuit boards and taking almost 100 pages to describe in great (albeit dry) detail in the magazine. Retronics free download: Formant music synthesiser book (2 nd edition 1982). www. e I e kto r.com/ ret ro_f o r m a n t Web Links [1] www.synthmuseum.com/ elektor/eleformOl .html Retronics is a monthly column covering vintage electronics including legendary Elektor designs. Contributions, suggestions and requests are welcomed; please send an email to editor@elektor.com 4/2008 - elektor 77 ELEKTOR SHOWCASE To book your showcase space contact Huson International Media Tel. 0044 (0) 1 932 564999 ATC SEMITEC LTD www. atcse m itec . co . u k Thermal and current-sensitive components for temperature control and circuit protection; • NTC Thermistors • Current Diodes • Thermostats • Re-settable Fuses • Thermal Fuses • Temperature Sensors Call today for free samples and pricing Tel: 01 606 871 680 Fax: 01 606 872938 AVIT RESEARCH www.avitresearch.co.uk USB has never been so simple... with our USB to Microcontroller Interface cable. Appears just like a serial port to both PC and Microcontroller, for really easy USB connection to your projects, or replacement of existing RS232 interfaces. See our webpage for more details. From £10.00. BETA LAYOUT www.pcb-pool.com Beta layout Ltd Award- winning site in both English and German offers prototype PCBs at a fraction of the cost of the usual manufacturer’s prices. ■ JS m > .i. i . /- -■* J- -* " — * • li-i “ B0W00D ELECTRONICS LTD www. bowood-electronics.co.uk Suppliers of Electronic Components • Semiconductors • Opto Electronics • Passives • Enclosures • Switches • Stripboard • PCB Materials • Popular Special Offer Packs Online Store, all major cards Same day despatch upto 3.00pm Personal Service sales@bowood-electronics.co.uk BYVAC ELECTRONICS www.byvac.co.uk 32Bit ARM Microcontroller, USB, built in RTC with itis own operating system, no complex tools, just a terminal emulator, start writing programs in 20 minutes. Complete with CD-ROM, Software and 100 Page Foundation book DECIBIT CO.LTD. www.decibit.com Smallest 2.4 GHz ISM band MCU embedded transceiver modules. Complete tiny solution, ready to transmit RF data by only attaching as example a CR2032 coin cell to it. DESIGNER SYSTEMS http://www.designersystems.co.uk Professional product development services. • Marine (Security, Tracking, Monitoring & control) • Automotive (AV, Tracking, Gadget, Monitoring & control) • Industrial (Safety systems, Monitoring over Ethernet) • Telecoms (PSTN handsets, GSM/GPRS) • Audiovisual ((HD)DVD accessories & controllers) Tel: +44 (0)1872 223306 EasyDAQ www.easydaq.biz We design & supply low cost USB/RS232 based data acquisition, automation & control products: • USB connected & powered, 8 opto isolated voltage inputs chans, 4DI0 & 4 onboard relays capable of switching 240V@10A. With Labview, VC & VB examples - £60 EASYSYNC http://www.easysync.co.uk EasySync Ltd sells a wide range of single and multi- port USB to RS232/RS422 and RS485 converters at competitive prices. ELNEC www.elnec.com • device programmer manufacturer • selling through contracted distributors all over the world • universal and dedicated device programmers • excellent support and after sale support • free SW updates • reliable HW • once a months new SW release • three years warranty for most programmers YOUR ELECTRONICS OPEN SOURCE http://dev.emcelettronica.com Website full of Projects and Resources for Electronics Engineers and DIY. • Tutorial • Hardware (Schematic & Gerber) ^ • Firmware (Asm & C) • Reference Design Everyone can submit a story as a useful source! 'Share for life' first TethnalGCfY Trantftr ltd. FIRST TECHNOLOGY TRANSFER LTD. http://www.ftt.co.uk/PICProTrng.html Microchip Professional C and Assembly Programming Courses. The future is embedded. Microchip Consultant /Training Partner developed courses: • Distance learning / instructor led • Assembly / C-Programming of PIC1 6, PIC1 8, PIC24, dsPIC microcontrollers • Foundation / Intermediate FLEXIPANEL LTD www.flexipanel.com TEAclippers - the smallest PIC programmers in the world, from £20 each: • Per-copy firmware sales • Firmware programming & archiving • In-the-field firmware updates • Protection from design theft by subcontractors FUTURE TECHNOLOGY DEVICES http://www.ftdichip.com FTDI designs and sells USB-UART and USB-FIFO interface i.c.’s. Complete with PC drivers, these devices simplify the task of designing or upgrading peripherals to USB FUTURLEC http://www.futurlec.com Save up to 60% on • Electronic Components • Microcontrollers, PIC, Atmel • Development Boards, Programmers Huge range of products available on-line for immediate delivery, at very competitive prices. ILP ELECTRONICS LTD www.ilpelectronics.com Tel +441233750481 Fax +441 233750578 ILP have been manufacturing audio modules since 1 971 and apart from our standard range we also offer a custom design service for the OEM market. LONDON ELECTRONICS COLLEGE http://www.lec.org.uk Vocational training and education for national qualifications in Electronics Engineering and Information Technology (BTEC First National, Higher National NVQs, GCSEs and GCEs). Also Technical Management and Languages. HE 78 elektor - 4/2008 products and services directory MARCHAND ELECTRONICS www.marchandelec.com • power amplifier modules • electronic crossovers solid state /valve/ E passive • valve amplifiers • phono preamps • handheld sinewave generator • kits or assembled • software electronic instruments • custom design services INC. MQP ELECTRONICS www.mqp.com • Low cost USB Bus Analysers • High, Full or Low speed captures • Graphical analysis and filtering • Automatic speed detection • Bus powered from high speed PC • Capture buttons and feature connector • Optional analysis classes NEW WAVE CONCEPTS www.new-wave-concepts.com Software for Hobbyists: • Livewire - circuit simulation software, only £34.99 • PCB Wizard - PCB design software, only £34.99 • Circuit Wizard - circuit, PCB and breadboard design software, only £59.99 Available from all Maplin Electronics stores and www.maplin.co.uk RADIOMETRIX www.radiometrix.com The leading global developer of ISM band, low power radio modules for wireless data transmission: • Transmitters • Receivers • Transceivers • RF modems • Evaluation Kits ROBOT ELECTRONICS http://www.robot-electronics.co.uk Advanced Sensors and Electronics for Robotics • Ultrasonic Range Finders • Compass modules • Infra-Red Thermal sensors • Motor Controllers • Vision Systems • Wireless Telemetry Links • Embedded Controllers ROBOTIQ http://www.robotiq.co.uk Build your own Robot! Fun for the whole family! • MeccanoTM Compatible • Computer Control • Radio Control • Tank Treads • Hydraulics Internet Technical Bookshop, 1-3 Fairlands House, North Street, Carshalton, Surrey SM5 2HW email: sales@robotiq.co.uk Tel: 020 8669 0769 COMPONENTBIN.COM www.componentbin.com Kickstart your development with modules and parts from componentbin.com • ARM7 modules • Ethernet modules • Superb Graphic LCD displays (all with example software) and much much more... Online ordering and great prices! ULTRALEDS Ul tral eols.^ l* http://www.ultraleds.co.uk tel: 0871 7110413/01625 576778 Large range of low cost Ultra bright leds and Led related lighting products. Major credit cards taken online with same day depatch. USB INSTRUMENTS http://www.usb-instruments.com USB Instruments specialises in PC based instrumentation products and software such as Oscilloscopes, Data Loggers, Logic Analaysers which interface to your PC via USB. VIRTINS TECHNOLOGY www.virtins.com PC and Pocket PC based virtual instrument such as sound card real time oscilloscope, spectrum analyzer, signal generator, multimeter, sound meter, distortion analyzer, LCR meter. Free to download and try. SHOWCASE YOUR COMPANY HERE Elektor Electronics has a feature to help customers promote their business, Showcase - a permanent feature of the magazine where you will be able to showcase your products and services. For just £220 + VAT (£20 per issue for eleven issues) Elektor will publish your company name, website address and a 30-word description For £330 + VAT for the year (£30 per issue for eleven issues) we will publish the above plus run a 3cm deep full colour image - e.g. a product shot, a screen shot from your site, a company logo - your choice Places are limited and spaces will go on a strictly first come, first served basis. So-please fax back your order today! _ n I wish to promote my company, please book my space: • Text insertion only for £220 + VAT • Text and photo for £330 + VAT NAME: ORGANISATION: JOB TITLE: ADDRESS: TEL: PLEASE COMPLETE COUPON BELOW AND FAX BACK TO 00-44-(0)1932 564998 COMPANY NAME WEB ADDRESS 30- WORD DESCRIPTION 4/2008 - elektor 79 BOOKS, CD-ROMs, KITS & MODULES A world of electronics Ml iQC'T etVnJn ute m wiA CD-KOW iWT wi CO’HOfA AH* tfttn IfltiT if CD-ROM Annual Johrgong Annee Joorgong yy litenBS***! frt, 1 .i*im»Vi««U f*S#tWi*P*W trwl HO urrrtftT^^^ All articles published in 2007 from a sin Elektor 2007 This CD-ROM contains all articles published in Elektor Volume 2007. Using the supplied Adobe Reader program, articles are presented in the same layout as originally found in the magazine. An extensive search machine is available to locate keywords in any article. The installation program now allows Elektor year volume CD-ROMs you have available to be copied to hard disk, so you do not have to eject and insert your CDs when searching in another year volume. With this CD-ROM you can produce hard copy of PCB layouts at printer resolution, adapt PCB layouts using your favourite graphics program, zoom in / out on selected PCB areas and export circuit diagrams and illustrations to other programs. Modern technology for everyone FPGA Course in 9 chapters The nine lessons on this courseware CD-ROM are a step by step guide to the world of Field Programmable Gate Array technology. Subjects covered include not just digital logic and bus systems but also building an FPGA Webserver, a 4-channel multimeter and a USB controller. The CD also contains PCB layout files in pdf format, a Quar- tus manual, project software and various supplementary instructions. 978-90-5381 -225-9 • £14.50 • US$ 29.00 More than 68,000 components Elektor's Components Database 4 The program package consists of eight databanks covering ICs, germanium and silicon transistors, FETs, diodes, thyristors, triacs and optocouplers. A further eleven applications cover the calculation of, for example, LED series droppers, zener diode series resistors, voltage regulators and AMVs. A col- our band decoder is included for de- termining resistor and inductor values. ECD 4 gives instant access to data on more than 68,000 components. All databank applications are fully in- teractive, allowing the user to add, edit and complete component data. This CD-ROM is a must-have for all electronics enthusiasts. ISBN 978-90-5381-218-1 • £16.90 • US$33.80 ISBN 978-90-5381-159-7 • £15.90 • US$ 31.80 J \ J Prices and item descriptions subject to change. E. & O.E 80 elektor - 04/2008 r Visual Basic 5.® iD m HT 1444 \ for Electro mc« Engineering ApiillcalJons 5.0, 6.0, VBA, .NET, 2005 Visual Basic for Electronics Engineering Applications This book is targeted towards those peo- ple that want to control existing or self- built hardware from their computer. After familiarizing yourself with Visual Basic, its development environment and the tool- set it offers are discussed in detail. Each topic is accompanied by clear, ready to run code, and where necessary, sche- matics are provided that will get your projects up to speed in no time. 476 pages • ISBN 978-0-905705-68-2 £29.00 • US$ 58.00 PIC Microcontrollers Silent alarm, poetry box, night buzzer and more! PIC Microcontrollers This hands-on book covers a series of exciting and fun projects with PIC micro- controllers. You can built more than 50 projects for your own use. The clear ex- planations, schematics, and pictures of each project on a breadboard make this a fun activity. You can also use it as a study guide. The technical background infor- mation in each project explains why the project is set up the way it is, including the use of datasheets. Even after you've built all the projects it will still be a valuable reference guide to keep next to your PC. 446 pages • ISBN 978-0-905705-70-5 £27.00 • US$ 54.00 Datalogger "deLuxe" (March 2008) We have had the pleasure of proposing various data acquisition units over the last few years. This Datalogger "deLuxe" is a nice exercise in product development. It actually utilises an SD card as the media for data storage. The hardware design is compact and that makes the firmware and software features even more interes- ting. (March 2008) An ECIO acts as the brains of this PLC board that has relays, opto-isolators CAN (!) connectivity and an LCD. All this I/O capacity together with Flowcode allows the board to act as a versatile, powerful PLC for quite complex control and auto- mation projects. The LCD module is used to display ASCII characters to the user as a means of troubleshooting during the software development stage or for moni- toring the system. Kit of parts incl. PCB, programmed control- ler and display Art.# 070745-71 • £71.75 • US$ 143.50 More information on the Elektor Website: www.elektor.com Elektor Regus Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 20 8261 4509 Fax: +44 20 8261 4447 Email: sales@elektor.com r^lektor LZ3 shop Kit of parts incl. PCB , EClO-module and all other components Art.# 070786-71 • £76.00 • US$ 152.00 C0 2 Measurement (January 2008) Carbon dioxide (C02) is not just a threat to the environment, it is also an impor- tant and often ignored factor in deter- mining air quality in the office and at home. Too high a concentration of C02 leads to feelings of tiredness, disturbs concentration, and causes headaches. The Elektor C02 meter makes it easy to determine the concentration of carbon dioxide in the air. A microcontroller monitors the measured value and can trigger an alarm or start up a ventila- tion system when a preset threshold is exceeded. Kit of parts, PCB , Sensor PCB, ATtiny26 and display Art.# 070802-71 • £107.50 • US$215.00 04/2008 - elektor 81 PRODUCT SHORTLIST, BESTSELLERS ~\ April 2008 (No. 376) £ US$ Elektor Internet Radio (EIR) 071 081-71 .... PCB, SMD-populated 1 1 5.00 230.00 CC2-AYR-Board 1 071 035-91 .... PCB, partly populated, ATM1 8 Controller module 7.30 1 4.60 071 035-92 .... PCB, partly populated ATM1 8-Testboard 27.00 54.00 080083-71 ....SMD-populated board and all parts 23.50 47.00 Frequency Response Sweep Oscillator 070951-41 ....Programmed controller 5.40 10.80 March 2008 (No. 375) Data Logger "deLuxe" 070745-1 PCB, bare 16.30 32.60 070745-41 ....Programmed controller 19.90 39.80 070745-71 ....Kit of parts (PCB, programmed controller and display) ....71 .75 143.50 The Secrets of I2C 070600-1 PCB, bare 13.60 32.60 070600-41 ....Programmed controller 19.90 39.80 Cylon Voice 070859-41 ....Programmed controller 4.70 9.40 ECIO PLC 070786-1 PCB, bare 16.30 32.60 70786-71 Kit of parts (PCB, EClO-module, all other components)....76.00 152.00 February 2008 (No. 374) LEDBUS System 070459-1 PCB, power module 070459-2 PCB, central 070459-41 .... PIC1 2F638-I/SN, programmed (power module) 070459-42 .... ATmega32-l 6PC, programmed (central) RGB LED Mood Lighting 070892-1 PCB, bare 070892-2 PCB, bare 070892-3 PCB, bare Surround Light for PC Monitor 070491-1 PCB, bare 070491-2 PCB, bare LED Ringflash 070612-1 PCB, bare 070612-41 .... PIC1 6F628, programmed 070612-81 ....Software on CD-ROM TV Surround Light 070487-1 PCB, bare 070487-41 .... Programmed controller 070487-42 .... Programmed controller 070487-81 ....Software on CD-ROM CAN Explorer 060201 -1 PCB, MCP2515 and MCP2551 SN 060201 -W Testing & Error Sources Manual Thermometer / Thermostat 070852-11 ....Software www.thePCBshop.com www.thePCBshop.com 3.10 6.20 13.80 27.60 www.thePCBshop.com www.thePCBshop.com www.thePCBshop.com 21.50 43.00 5.00 10.00 www.thePCBshop.com 10.50 21.00 5.20 10.40 21.50 43.00 12.70 25.40 10.50 21.00 5.20 10.40 www.thePCBshop.com www.elektor.com www.elektor.com January 2008 (No. 373) C0 2 Measurement 070802-1 PCB. bare 14.40... 28.80 070802-41 .... Programmed controller ATtiny26 070802-71 .... Kit of parts, PCB, Sensor PCB, ATtiny26 7.20... 14.40 and display 107.50... ...215.00 070802-81 Software on CD-ROM 5.20... 10.40 Anti-Standby Switch 070797-1 PCB, bare 14.40... 28.80 070797-41 .... ATtiny25, programmed Control for Energy-saving Lamps 5.20... 10.40 070638-71 .... PCB, FAN771 ON and 2.5mH coil Versatile DC Power Meter 14.40... 28.80 070559-1 PCB, bare 9.30... 18.60 070559-41 .... Programmed controller ATmega8-l 6P 9.00... 18.00 / Prices and item descriptions subject to change. E. & O.E Bestsellers mr hi* \ PIC Microcontrollers 1 ISBN 978-0-905705-70-5 £27.00.. ...US$54.00 2 Visual BaSIC for Electronics Engineering Applications ISBN 978-0-905705-68-2 £29.00.. ...US$58.00 3 309 Circuits ISBN 978-0-905705-69-9 £19.95.. ...US$39.95 4 PC Interfaces under Windows ISBN 978-0-905705-65-1 £27.25.. ...US$54.50 Microcontroller Basics ISBN 978-0-905705-67-5 £19.50. US$ 39.00 lektor 2007 ISBN 978-90-5381-218-1 £16.90. US$ 33.80 FPGA ISBN 978-90-5381-218-1 £16.90. US$ 33.80 ISBN 978-90-5381-159-7 £15.90. US$31.80 USB Toolbox ISBN 978-90-5381-2 1 2-9 £1 9.90. US$ 39.80 Ethernet Toolbox ISBN 978-90-5381-2 1 4-3 £1 8.90. US$ 37.90 C0 2 Measurement Art.# 070802-71 E107.50...USS 215.00 USB Flash Board Art. # 070125-71 £36.20 USS 72.40 Datalogger "deLuxe" Art. # 070745-71 E71.75...USS 143.50 ECIO PLC Art. # 070786-71 .£76.00 USS 152.00 Reflow Solder Controller Art. # 060234-91 E171.80...USS 343.60 M Ik Order quickly and safe through www.elektor.com/shop or use the Order Form near the end of the magazine! Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH * United Kingdom Tel. +44 20 8261 4509 Fax +44 20 8261 4447 Email: sales@elektor.com 82 elektor - 04/2008 “Elektor? If our teachers knew just how easily some concepts can be explained...” - Daniel Judd, 23, student - . > Electronics at all the right levels Secure a head start in electronics with a Student Subscription!* Advantages to subscribers: Students qualify for a discount of no less than 20 % compared to the normal price of an annual subscription Subscribers get up to 40% discount on special Elektor products No queues, travelling, parking fees or ‘sold out’ Elektor is supplied to your doorstep every month Always up to date - read your copy before everyone else www.elektor.com/subs Tel. +44 (0) 208 261 4509 INFO & MARKET SNEAK PREVIEW I *h ru in- %t- Measure it with the PC and the soundcard Twenty-odd years ago, PCs were so slow no one dreamed of using them for live measurements. By contrast, today's machines happily run RTA (Real Time Analysis) and FFT (Fast Fourier Transformation) maths as a background task. Obviously the options for measurements depend strongly on the software used and that's why we examined a range of relevant products on the market. Also, the quality of the measurements results returned will be determined to a large extent by the sound card used; well it so happens that an Elektor test was planned for these. Frequency Counter with ATtiny 2313 Only a few low-cost function generators and signal generators we've seen have a frequency display and an accurate fre- quency adjustment. The module we propose cancels both shortcomings. The core of the circuit is an ATtiny231 3 microcontrol- ler and that's about it for special ICs! Frequencies up to 5 MHz can be measured (without a prescaler!) and the LCD can be switched between MHz, kHz and Hz readout. Mini-display-board with M16C Graphic displays have become affordable to the extent they can now be incorporated into small series and one-off applica- tions. However the programming of a graphic display is far more complex than that of a display supporting text only. A mini controller board based on the Ml 6C microcontroller from Renesas comes to your rescue by incorporating not only a Display-on-Glass module but also a Tiny Basic interpreter that greatly simplifies the creation of graphics by your programs. RESERVE YOUR COPY NOW! The April 2008 issue goes on sale on Thursday 24 April 2008 (UK distribution only). UK mainland subscribers will receive the magazine between 1 8 and 22 April 2008. Article titles and magazine contents subject to change, please check www.elektor.com. NEWSAGENTS ORDER FORM SHOP SAVE / HOME DELIVERY Please save / deliver one copy of Elektor magazine for me each month Name: Address: Post code: Telephone: Date: Signature: Please cut out or photocopy this form, complete details and hand to your newsagent. Elektor is published on the third Thursday of each month, except in July. Distribution S.O.R. by Seymour (NS). w.elektor.com www.elektor.com www.elektor.com www.elektor.com www. Elektor on the web All magazine articles back to volume 2000 are available online in pdf format. The article summary and parts list (if applicable) can be instantly viewed to help you positively identify an article. Article related items are also shown, including software down- be downloaded. Vf V/ 1 ■ V Vf 1 1 v-f 1 1 VI 1 1 VI issues may also e electronics worldwide l onttioi f Get B tSJkh6w Elektor Home Newt Mngnrme S fvop Subscribe now forum Service In the Elektor Shop you'll find all other products sold by the publishers, like CD-ROMs, kits and books. A powerful search function allows you to search for items and references across the entire website. Also on the Elektor website: • Electronics news and Elektor announcements • Readers Forum • PCB, software and e-magazine downloads • Surveys and polls • FAQ, Author Guidelines and Contact ■ Choose »n option ▼ Informative article. V Projects w Book! W CO-Kont* v«il Modules w (-blocks v PCDs v Controllers V Megatines w oners M Elektor CreO.li w Trial tuMovepn* ■t © TTT panels arc compat&e with Wide KG* itgh-pawer nr module support. 2 igbee PCIe peripheral controller provide* flc.iblc connectivity option* Taw »nd Measurement Product Cu>d* Briery Fuel CnuQC Download Elektor . Elektor February 2008 Elektor s 2008 TcOruary Issue can be downloaded 1 The downloadable version not only saves you time and money but alio offers ful last search options. [^P*P Construction prop •r K-venti Vie it CKine Elektor is organising a study trip to Chine on 12*2! April of this year and you're welcome to join ual Please enter »our email address t More © Bator* luOm rttmg Queiuont please review our r*o seeoorn R8C. taplorar 18; • t*plorrr-lh rpGA Hell . 09 from e kit Jk 84 elektor - 4/2008 Description Price each Qty. Total i Order Code CD-ROM FPGA Course £14.50 CD-ROM Elektor 2007 (323 £16.90 CD-ROM E CD 4 £15.90 PIC Microcontrollers £ 27.00 Data Logger “deLuxe” £ 71.75 Free Elektor Catalogue 2008 Prices and item descriptions subject to change. The publishers reserve the right to change prices without prior notification. Prices and item descriptions shown here supersede those in previous issues. E. & O.E. Sub-total P&P Total paid Name Address + Post code METHOD OF PAYMENT (see reverse before ticking as appropriate) □ □ □ □ Bank transfer Cheque (UK-resident customers ONLY) Giro transfer VISA iWasi&fCard Expiry date: Verification code: Please send this order form to* (see reverse for conditions) Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 20 8261 4509 Fax: +44 20 8261 4447 www.elektor.com sales@elektor.com Email Date - - Signature EL04 Yes, I am taking out an annual subscription to Elektor and receive a free 2GB MP3 player*. I would like: I I Standard Subscription (11 issues) Subscription-Plus (11 issues plus the Elektor Volume 2008 CD-ROM) * Offer available to Subscribers who have not held a subscription to Elektor during the last 12 months. Offer subject to availability. See reverse for rates and conditions. Name Address + Post code Tel. Email Date - - Signature EL04 *USA and Canada residents may (but are not obliged to) use $ prices, and send the order form to: Old Colony Sound Lab P.0. Box 876, Peterborough NH 03458-0876. Tel. (603) 924-6371, 924-6526, Fax: (603) 924-9467 Email: custserv@audioXpress.com METHOD OF PAYMENT (see reverse before ticking as appropriate) Bank transfer | Cheque (UK-resident customers ONLY) □ Giro transfer Expiry date: Verification code: Please send this order form to Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel.: +44 20 8261 4509 Fax: +44 20 8261 4447 www.elektor.com subscriptions@elektor.com ORDERING INSTRUCTIONS, P&P CHARGES Except in the USA and Canada, all orders, except for subscriptions (for which see below), must be sent BY POST or FAX to our Brentford address using the Order Form overleaf. Online ordering: www.elektor.com/shop Readers in the USA and Canada may (but are not obliged to) send orders, except for subscriptions (for which see below), to the USA address given on the order form. Please apply to Old Colony Sound for applicable P&P charges. Please allow 4-6 weeks for delivery. Orders placed on our Brentford office must include P&P charges (Priority or Standard) as follows: Europe: £6.00 (Standard) or £7.00 (Priority) Outside Europe: £9.00 (Standard) or £11.00 (Priority) HOWTO PAY All orders must be accompanied by the full payment, including postage and packing charges as stated above or advised by Customer Services staff. Bank transfer into account no. 40209520 held by Elektor Electronics with ABN-AMRO Bank, London. IBAN: GB35 ABNA 4050 3040 2095 20. BIC: ABNAGB2L. Currency: sterling (UKP). Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Elektor Electronics. We can only accept sterling cheques and bank drafts from UK-resident customers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. Giro transfer into account no. 34-152-3801, held by Elektor Electronics. Please do not send giro transfer/deposit forms directly to us, but instead use the National Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA and MasterCard can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL-protected for your security. COMPONENTS Components for projects appearing in Elektor are usually available from certain advertisers in this magazine. If difficulties in the supply of components are envisaged, a source will normally be advised in the article. Note, however, that the source(s) given is (are) not exclusive. TERMS OF BUSINESS Delivery Although every effort will be made to dispatch your order within 2-3 weeks from receipt of your instructions, we can not guarantee this time scale for all orders. Returns Faulty goods or goods sent in error may be returned for replacement or refund, but not before obtaining our consent. All goods returned should be packed securely in a padded bag or box, enclosing a covering letter stating the dispatch note number. If the goods are returned because of a mistake on our part, we will refund the return postage. Damaged goods Claims for damaged goods must be received at our Brentford office within 10-days (UK); 14-days (Europe) or 21 -days (all other countries). Cancelled orders All cancelled orders will be subject to a 10% handling charge with a minimum charge of £5.00. Patents Patent protection may exist in respect of circuits, devices, components, and so on, described in our books and magazines. Elektor does not accept responsibility or liability for failing to identify such patent or other protection. Copyright All drawings, photographs, articles, printed circuit boards, programmed integrated circuits, diskettes and software carriers published in our books and magazines (other than in third-party advertisements) are copyright and may not be reproduced or transmitted in any form or by any means, including photocopying and recording, in whole or in part, without the prior permission of Elektor in writing. Such written permission must also be obtained before any part of these publications is stored in a retrieval system of any nature. Notwithstanding the above, printed-circuit boards may be produced for private and personal use without prior permission. Limitation of liability Elektor shall not be liable in contract, tort, or otherwise, for any loss or damage suffered by the purchaser whatsoever or howsoever arising out of, or in connexion with, the supply of goods or services by Elektor other than to supply goods as described or, at the option of Elektor, to refund the purchaser any money paid in respect of the goods. Law Any question relating to the supply of goods and services by Elektor shall be determined in all respects by the laws of England. September 2007 SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION Standard Plus United Kingdom £42.00 £49.00 Surface Mail Rest of the World £56.00 £63.00 Airmail Rest of the World £71 .00 £78.00 USA & Canada For US$-p rices please check www.elektor.com HOWTO PAY Bank transfer into account no. 40209520 held by Elektor Electronics, with ABN-AMRO Bank, London. IBAN: GB35 ABNA 4050 3040 2095 20. BIC: ABNAGB2L. Currency: sterling (UKP). Please ensure your full name and address gets communicated to us. Cheque sent by post, made payable to Elektor Electronics. We can only accept sterling cheques and bank drafts from UK-resident customers or subscribers. We regret that no cheques can be accepted from customers or subscribers in any other country. Giro transfer into account no. 34-152-3801, held by Elektor Electronics Please do not send giro transfer/deposit forms directly to us, but instead use the National Giro postage paid envelope and send it to your National Giro Centre. Credit card VISA and MasterCard can be processed by mail, email, web, fax and telephone. Online ordering through our website is SSL- protected for your security. SUBSCRIPTION CONDITIONS The standard subscription order period is twelve months. If a perma- nent change of address during the subscription period means that copies have to be despatched by a more expensive service, no extra charge will be made. Conversely, no refund will be made, nor expiry date extended, if a change of address allows the use of a cheaper service. Student applications, which qualify for a 20% (twenty per cent) reduction in current rates, must be supported by evidence of student- ship signed by the head of the college, school or university faculty. A standard Student Subscription costs £33.60, a Student Subscription- Plus costs £39.20 (UK only). Please note that new subscriptions take about four weeks from receipt of order to become effective. Cancelled subscriptions will be subject to a charge of 25% (twenty- five per cent) of the full subscription price or £7.50, whichever is the higher, plus the cost of any issues already dispatched. Subsciptions cannot be cancelled after they have run for six months or more. January 2008 «k % PIC Microcoirtrol\ej;5 Hekla* r^lektor L.~ SHOP % PIC Microcontrollers Silent alarm, RGB fader, poetry box, night bifrzer ahd more! This hands-on book covers a series of exciting and fun projects with PIC microcontrollers. You can built more than 50 projects for your own use. The clear explanations, schematics, and pictures of each project on a breadboard make this a fun activity. You can also use it as a study guide. The technical background information in each project explains why the project is set up the way it is, including the use of datasheets. All software used in this book can be downloaded for free, including all of the source code, a program editor, and the JAL open source programming language. 446 pages • ISBN 978-0-905705-70-5 • £27.00 • US$ 54.00 Elektor Reg us Brentford 1 000 Great West Road Brentford TW8 9HH United Kingdom Tel. +44 20 8261 4509 Order quickly and safe through WWW.elektor.COIn/shop Index of Advertisers Allendale Electronics Ltd www.pcb-soldering.co.uk 13 ATC Semitec Ltd, Showcase www.atcsemitec.co.uk 78 Avit Research, Showcase www.avitresearch.co.uk 78 Beijing Draco www.ezpcb.com 33 Beta Layout, Showcase www.pcb-pool.com 33, 78 Bitscope Designs www.bitscope.com 3 Bowood Electronics Ltd, Showcase www.bowood-electronics.co.uk 78 Byvac Electronics, Showcase www.byvac.co.uk 78 Decibit Co. Ltd, Showcase www.decibit.com 78 Designer Systems, Showcase www.designersystems.co.uk 78 EasyDAQ, Showcase www.easydaq.biz 78 Easysync, Showcase www.easysync.co.uk 78 Elnec, Showcase www.elnec.com 78 EMCelettronica Sri, Showcase www.emcelettronica.com 78 Euro circuits www.eurocircuits.com 69 First Technology Transfer Ltd, Showcase . . www.ftt.co.uk 78 FlexiPanel Ltd, Showcase www.flexipanel.com 78 FLYPCB www.flypcb.com 55 Future Technology Devices, Showcase. . . . www.ftdichip.com 78 Futurlec, Showcase www.futurlec.com 78 ILP Electronics Ltd, Showcase www.iipeiectronics.com 78 Jaycar Electronics www.jaycarelectronics.co.uk 2 Labcenter www.labcenter.com 88 London Electronics College, Showcase . . . www.lec.org.uk 78 Marchand Electronics Inc, Showcase MikroElektronika MQP Electronics, Showcase New Wave Concepts, Showcase . . . Newbury Electronics Nurve Networks Paltronix SK Pang Electronics Peak Electronic Design Pico Quasar Electronics Radiometrix, Showcase Robot Electronics, Showcase Robotiq, Showcase Showcase Tsien (UK) Ltd, Showcase Ultraleds, Showcase USB Instruments, Showcase Virtins Technology, Showcase www.marchandelec.com 79 www.mikroe.com 27, 29, 31 www.mqp.com 79 www.new-wave-concepts.com 79 www.newburyelectronics. co.uk 55 www.xgamestation.com 55 www.paltronix.com 13 www.skpang.co.uk 33 www.peakelec.co.uk 33 www.picotech.com 11 www.quasarelectronics.com 47 www.radiometrix.com 79 www. robot-electronics, co.uk 79 www.robotiq.co.uk 79 78, 79 www.componentbin.com 79 www.ultraleds.co.uk 79 www.usb-instruments.com 79 www.virtins.com 79 Advertising space for the issue of 19 May 2008 may be reserved not later than 22 April 2008 with Huson International Media - Cambridge House - Gogmore Lane - Chertsey, Surrey KT 1 6 9AP - England - Telephone 01 932 564 999 - Fax 01932 564998 - e-mail: p.brady@husonmedia.com to whom all correspondence, copy instructions and artwork should be addressed. 4/2008 - elektor 87 DESIGN SUITE com>uT£i^ mvBV pbs/gn gHttA tKSV A [/ R ?ou£f|ul/ E^svf i© Use Sc^wxAiic C^piurc ivtiefAC.iiv^ H*Vc4i Mtxte STlCF Simula *£»©« U«Ve Mitfoton-troller C 0 -Si«^l*tie« ««d t>eW 3 ,« 3 FuUvf Fe*iure4i TC4h ttesi^w *«dl SD viewer i4©rUs First Sc.^c^iic. US& Si^wulfetio* TftxiuC't Hi C©*^ple4e 6M4m££riM SoWtiom K^pii Dcvdiepw^Cni SnvirowwxCni H*yi"*W»** KetMfW ©w IwvCstw^Cwt Foster Ti»^e to H^ftet « WINTER SPECIAL OFFER 20% off all new orders for the Proteus Design Suite when you spend £400 or more. Electronic Design from Concept To Completion LABCEIMTER ELECTRONICS LTD A technology Pioneer in the EDA industry since 1988. Technical support direct from the program authors. Flexible packages and pricing tailored to customer requirements. CONTACT US NOW to discuss your requirements or request a FREE evaluation copy. I abcenter A A A www.labcenter.com E I cz t r 0 n i (z TEL: +44 (OJ1756 753440 FAX: +44 (OJ1756 752857 Email: info @labcenter. com Labcenter Electronics Ltd., 53-55 Main Street, Grassington North Yorks, BD23 5AA. Registered in England 4692454